agentic-ui-libs 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AgentListView.d.ts.map +1 -1
- package/dist/components/AnalyticsChart.d.ts.map +1 -1
- package/dist/components/Dashboard.d.ts.map +1 -1
- package/dist/components/SectionControls.d.ts.map +1 -1
- package/dist/components/ToolListView.d.ts.map +1 -1
- package/dist/components/ui/IconPreview.d.ts +15 -0
- package/dist/components/ui/IconPreview.d.ts.map +1 -0
- package/dist/components/ui/MultiSelect.d.ts +3 -0
- package/dist/components/ui/MultiSelect.d.ts.map +1 -1
- package/dist/components/ui/Skeleton.d.ts.map +1 -1
- package/dist/data/sampleData.d.ts.map +1 -1
- package/dist/index.d.ts +6 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24699 -25177
- package/dist/lib/dashboard-api.service.d.ts +1 -0
- package/dist/lib/dashboard-api.service.d.ts.map +1 -1
- package/dist/types/index.d.ts +13 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/ui-libs.umd.js +129 -179
- package/package.json +1 -1
- package/dist/assets/style.css +0 -1
package/dist/ui-libs.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(me,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],S):(me=typeof globalThis<"u"?globalThis:me||self,S(me.AgenticUILibs={},me.React,me.ReactDOM))})(this,function(me,S,Zr){"use strict";var HU=Object.defineProperty;var YU=(me,S,Zr)=>S in me?HU(me,S,{enumerable:!0,configurable:!0,writable:!0,value:Zr}):me[S]=Zr;var Bt=(me,S,Zr)=>YU(me,typeof S!="symbol"?S+"":S,Zr);function Lb(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const bt=Lb(S);var _i=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ke(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ls={exports:{}},ia={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var ff;function Rb(){if(ff)return ia;ff=1;var e=S,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(s,l,u){var c,f={},d=null,h=null;u!==void 0&&(d=""+u),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(h=l.ref);for(c in l)n.call(l,c)&&!i.hasOwnProperty(c)&&(f[c]=l[c]);if(s&&s.defaultProps)for(c in l=s.defaultProps,l)f[c]===void 0&&(f[c]=l[c]);return{$$typeof:t,type:s,key:d,ref:h,props:f,_owner:a.current}}return ia.Fragment=r,ia.jsx=o,ia.jsxs=o,ia}var oa={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,246 +14,196 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+
|
|
19
|
-
`),st=
|
|
20
|
-
`),ze=
|
|
21
|
-
`+
|
|
17
|
+
*/var df;function Bb(){return df||(df=1,process.env.NODE_ENV!=="production"&&function(){var e=S,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),y=Symbol.iterator,p="@@iterator";function v(C){if(C===null||typeof C!="object")return null;var H=y&&C[y]||C[p];return typeof H=="function"?H:null}var g=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function O(C){{for(var H=arguments.length,re=new Array(H>1?H-1:0),le=1;le<H;le++)re[le-1]=arguments[le];x("error",C,re)}}function x(C,H,re){{var le=g.ReactDebugCurrentFrame,Pe=le.getStackAddendum();Pe!==""&&(H+="%s",re=re.concat([Pe]));var Me=re.map(function(ye){return String(ye)});Me.unshift("Warning: "+H),Function.prototype.apply.call(console[C],console,Me)}}var A=!1,m=!1,w=!1,T=!1,_=!1,$;$=Symbol.for("react.module.reference");function R(C){return!!(typeof C=="string"||typeof C=="function"||C===n||C===i||_||C===a||C===u||C===c||T||C===h||A||m||w||typeof C=="object"&&C!==null&&(C.$$typeof===d||C.$$typeof===f||C.$$typeof===o||C.$$typeof===s||C.$$typeof===l||C.$$typeof===$||C.getModuleId!==void 0))}function P(C,H,re){var le=C.displayName;if(le)return le;var Pe=H.displayName||H.name||"";return Pe!==""?re+"("+Pe+")":re}function j(C){return C.displayName||"Context"}function L(C){if(C==null)return null;if(typeof C.tag=="number"&&O("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof C=="function")return C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case a:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof C=="object")switch(C.$$typeof){case s:var H=C;return j(H)+".Consumer";case o:var re=C;return j(re._context)+".Provider";case l:return P(C,C.render,"ForwardRef");case f:var le=C.displayName||null;return le!==null?le:L(C.type)||"Memo";case d:{var Pe=C,Me=Pe._payload,ye=Pe._init;try{return L(ye(Me))}catch{return null}}}return null}var B=Object.assign,M=0,E,F,U,k,N,I,W;function z(){}z.__reactDisabledLog=!0;function V(){{if(M===0){E=console.log,F=console.info,U=console.warn,k=console.error,N=console.group,I=console.groupCollapsed,W=console.groupEnd;var C={configurable:!0,enumerable:!0,value:z,writable:!0};Object.defineProperties(console,{info:C,log:C,warn:C,error:C,group:C,groupCollapsed:C,groupEnd:C})}M++}}function Z(){{if(M--,M===0){var C={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:B({},C,{value:E}),info:B({},C,{value:F}),warn:B({},C,{value:U}),error:B({},C,{value:k}),group:B({},C,{value:N}),groupCollapsed:B({},C,{value:I}),groupEnd:B({},C,{value:W})})}M<0&&O("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Q=g.ReactCurrentDispatcher,ae;function te(C,H,re){{if(ae===void 0)try{throw Error()}catch(Pe){var le=Pe.stack.trim().match(/\n( *(at )?)/);ae=le&&le[1]||""}return`
|
|
18
|
+
`+ae+C}}var q=!1,Y;{var J=typeof WeakMap=="function"?WeakMap:Map;Y=new J}function D(C,H){if(!C||q)return"";{var re=Y.get(C);if(re!==void 0)return re}var le;q=!0;var Pe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Me;Me=Q.current,Q.current=null,V();try{if(H){var ye=function(){throw Error()};if(Object.defineProperty(ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ye,[])}catch(dt){le=dt}Reflect.construct(C,[],ye)}else{try{ye.call()}catch(dt){le=dt}C.call(ye.prototype)}}else{try{throw Error()}catch(dt){le=dt}C()}}catch(dt){if(dt&&le&&typeof dt.stack=="string"){for(var ve=dt.stack.split(`
|
|
19
|
+
`),st=le.stack.split(`
|
|
20
|
+
`),ze=ve.length-1,Ke=st.length-1;ze>=1&&Ke>=0&&ve[ze]!==st[Ke];)Ke--;for(;ze>=1&&Ke>=0;ze--,Ke--)if(ve[ze]!==st[Ke]){if(ze!==1||Ke!==1)do if(ze--,Ke--,Ke<0||ve[ze]!==st[Ke]){var jt=`
|
|
21
|
+
`+ve[ze].replace(" at new "," at ");return C.displayName&&jt.includes("<anonymous>")&&(jt=jt.replace("<anonymous>",C.displayName)),typeof C=="function"&&Y.set(C,jt),jt}while(ze>=1&&Ke>=0);break}}}finally{q=!1,Q.current=Me,Z(),Error.prepareStackTrace=Pe}var aa=C?C.displayName||C.name:"",Jr=aa?te(aa):"";return typeof C=="function"&&Y.set(C,Jr),Jr}function ie(C,H,re){return D(C,!1)}function K(C){var H=C.prototype;return!!(H&&H.isReactComponent)}function ee(C,H,re){if(C==null)return"";if(typeof C=="function")return D(C,K(C));if(typeof C=="string")return te(C);switch(C){case u:return te("Suspense");case c:return te("SuspenseList")}if(typeof C=="object")switch(C.$$typeof){case l:return ie(C.render);case f:return ee(C.type,H,re);case d:{var le=C,Pe=le._payload,Me=le._init;try{return ee(Me(Pe),H,re)}catch{}}}return""}var oe=Object.prototype.hasOwnProperty,Ce={},Te=g.ReactDebugCurrentFrame;function Ee(C){if(C){var H=C._owner,re=ee(C.type,C._source,H?H.type:null);Te.setExtraStackFrame(re)}else Te.setExtraStackFrame(null)}function et(C,H,re,le,Pe){{var Me=Function.call.bind(oe);for(var ye in C)if(Me(C,ye)){var ve=void 0;try{if(typeof C[ye]!="function"){var st=Error((le||"React class")+": "+re+" type `"+ye+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof C[ye]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw st.name="Invariant Violation",st}ve=C[ye](H,ye,le,re,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ze){ve=ze}ve&&!(ve instanceof Error)&&(Ee(Pe),O("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",le||"React class",re,ye,typeof ve),Ee(null)),ve instanceof Error&&!(ve.message in Ce)&&(Ce[ve.message]=!0,Ee(Pe),O("Failed %s type: %s",re,ve.message),Ee(null))}}}var Rt=Array.isArray;function gt(C){return Rt(C)}function Si(C){{var H=typeof Symbol=="function"&&Symbol.toStringTag,re=H&&C[Symbol.toStringTag]||C.constructor.name||"Object";return re}}function Ai(C){try{return ra(C),!1}catch{return!0}}function ra(C){return""+C}function Ti(C){if(Ai(C))return O("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Si(C)),ra(C)}var Pi=g.ReactCurrentOwner,$U={key:!0,ref:!0,__self:!0,__source:!0},Eb,jb;function CU(C){if(oe.call(C,"ref")){var H=Object.getOwnPropertyDescriptor(C,"ref").get;if(H&&H.isReactWarning)return!1}return C.ref!==void 0}function MU(C){if(oe.call(C,"key")){var H=Object.getOwnPropertyDescriptor(C,"key").get;if(H&&H.isReactWarning)return!1}return C.key!==void 0}function kU(C,H){typeof C.ref=="string"&&Pi.current}function NU(C,H){{var re=function(){Eb||(Eb=!0,O("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",H))};re.isReactWarning=!0,Object.defineProperty(C,"key",{get:re,configurable:!0})}}function DU(C,H){{var re=function(){jb||(jb=!0,O("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",H))};re.isReactWarning=!0,Object.defineProperty(C,"ref",{get:re,configurable:!0})}}var IU=function(C,H,re,le,Pe,Me,ye){var ve={$$typeof:t,type:C,key:H,ref:re,props:ye,_owner:Me};return ve._store={},Object.defineProperty(ve._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ve,"_self",{configurable:!1,enumerable:!1,writable:!1,value:le}),Object.defineProperty(ve,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Pe}),Object.freeze&&(Object.freeze(ve.props),Object.freeze(ve)),ve};function LU(C,H,re,le,Pe){{var Me,ye={},ve=null,st=null;re!==void 0&&(Ti(re),ve=""+re),MU(H)&&(Ti(H.key),ve=""+H.key),CU(H)&&(st=H.ref,kU(H,Pe));for(Me in H)oe.call(H,Me)&&!$U.hasOwnProperty(Me)&&(ye[Me]=H[Me]);if(C&&C.defaultProps){var ze=C.defaultProps;for(Me in ze)ye[Me]===void 0&&(ye[Me]=ze[Me])}if(ve||st){var Ke=typeof C=="function"?C.displayName||C.name||"Unknown":C;ve&&NU(ye,Ke),st&&DU(ye,Ke)}return IU(C,ve,st,Pe,le,Pi.current,ye)}}var sf=g.ReactCurrentOwner,$b=g.ReactDebugCurrentFrame;function na(C){if(C){var H=C._owner,re=ee(C.type,C._source,H?H.type:null);$b.setExtraStackFrame(re)}else $b.setExtraStackFrame(null)}var lf;lf=!1;function uf(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function Cb(){{if(sf.current){var C=L(sf.current.type);if(C)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of
|
|
23
|
+
Check the render method of \``+C+"`."}return""}}function RU(C){return""}var Mb={};function BU(C){{var H=Cb();if(!H){var re=typeof C=="string"?C:C.displayName||C.name;re&&(H=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+
|
|
25
|
+
Check the top-level render call using <`+re+">.")}return H}}function kb(C,H){{if(!C._store||C._store.validated||C.key!=null)return;C._store.validated=!0;var re=BU(H);if(Mb[re])return;Mb[re]=!0;var le="";C&&C._owner&&C._owner!==sf.current&&(le=" It was passed a child from "+L(C._owner.type)+"."),na(C),O('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',re,le),na(null)}}function Nb(C,H){{if(typeof C!="object")return;if(gt(C))for(var re=0;re<C.length;re++){var le=C[re];uf(le)&&kb(le,H)}else if(uf(C))C._store&&(C._store.validated=!0);else if(C){var Pe=v(C);if(typeof Pe=="function"&&Pe!==C.entries)for(var Me=Pe.call(C),ye;!(ye=Me.next()).done;)uf(ye.value)&&kb(ye.value,H)}}}function FU(C){{var H=C.type;if(H==null||typeof H=="string")return;var re;if(typeof H=="function")re=H.propTypes;else if(typeof H=="object"&&(H.$$typeof===l||H.$$typeof===f))re=H.propTypes;else return;if(re){var le=L(H);et(re,C.props,"prop",le,C)}else if(H.PropTypes!==void 0&&!lf){lf=!0;var Pe=L(H);O("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Pe||"Unknown")}typeof H.getDefaultProps=="function"&&!H.getDefaultProps.isReactClassApproved&&O("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function WU(C){{for(var H=Object.keys(C.props),re=0;re<H.length;re++){var le=H[re];if(le!=="children"&&le!=="key"){na(C),O("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",le),na(null);break}}C.ref!==null&&(na(C),O("Invalid attribute `ref` supplied to `React.Fragment`."),na(null))}}var Db={};function Ib(C,H,re,le,Pe,Me){{var ye=R(C);if(!ye){var ve="";(C===void 0||typeof C=="object"&&C!==null&&Object.keys(C).length===0)&&(ve+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var st=RU();st?ve+=st:ve+=Cb();var ze;C===null?ze="null":gt(C)?ze="array":C!==void 0&&C.$$typeof===t?(ze="<"+(L(C.type)||"Unknown")+" />",ve=" Did you accidentally export a JSX literal instead of a component?"):ze=typeof C,O("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ze,ve)}var Ke=LU(C,H,re,Pe,Me);if(Ke==null)return Ke;if(ye){var jt=H.children;if(jt!==void 0)if(le)if(gt(jt)){for(var aa=0;aa<jt.length;aa++)Nb(jt[aa],C);Object.freeze&&Object.freeze(jt)}else O("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Nb(jt,C)}if(oe.call(H,"key")){var Jr=L(C),dt=Object.keys(H).filter(function(VU){return VU!=="key"}),cf=dt.length>0?"{key: someKey, "+dt.join(": ..., ")+": ...}":"{key: someKey}";if(!Db[Jr+cf]){var KU=dt.length>0?"{"+dt.join(": ..., ")+": ...}":"{}";O(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,
|
|
30
|
+
<%s key={someKey} {...props} />`,cf,Jr,KU,Jr),Db[Jr+cf]=!0}}return C===n?WU(Ke):FU(Ke),Ke}}function UU(C,H,re){return Ib(C,H,re,!0)}function zU(C,H,re){return Ib(C,H,re,!1)}var GU=zU,qU=UU;oa.Fragment=n,oa.jsx=GU,oa.jsxs=qU}()),oa}process.env.NODE_ENV==="production"?Ls.exports=Rb():Ls.exports=Bb();var b=Ls.exports;function hf(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=hf(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function pe(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=hf(e))&&(n&&(n+=" "),n+=t);return n}var Fb=Array.isArray,lt=Fb,Wb=typeof _i=="object"&&_i&&_i.Object===Object&&_i,pf=Wb,Ub=pf,zb=typeof self=="object"&&self&&self.Object===Object&&self,Gb=Ub||zb||Function("return this")(),Ft=Gb,qb=Ft,Kb=qb.Symbol,sa=Kb,vf=sa,yf=Object.prototype,Vb=yf.hasOwnProperty,Hb=yf.toString,la=vf?vf.toStringTag:void 0;function Yb(e){var t=Vb.call(e,la),r=e[la];try{e[la]=void 0;var n=!0}catch{}var a=Hb.call(e);return n&&(t?e[la]=r:delete e[la]),a}var Xb=Yb,Jb=Object.prototype,Zb=Jb.toString;function Qb(e){return Zb.call(e)}var e0=Qb,mf=sa,t0=Xb,r0=e0,n0="[object Null]",a0="[object Undefined]",gf=mf?mf.toStringTag:void 0;function i0(e){return e==null?e===void 0?a0:n0:gf&&gf in Object(e)?t0(e):r0(e)}var Ht=i0;function o0(e){return e!=null&&typeof e=="object"}var Yt=o0,s0=Ht,l0=Yt,u0="[object Symbol]";function c0(e){return typeof e=="symbol"||l0(e)&&s0(e)==u0}var Qr=c0,f0=lt,d0=Qr,h0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,p0=/^\w*$/;function v0(e,t){if(f0(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||d0(e)?!0:p0.test(e)||!h0.test(e)||t!=null&&e in Object(t)}var Rs=v0;function y0(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ur=y0;const en=ke(ur);var m0=Ht,g0=ur,b0="[object AsyncFunction]",x0="[object Function]",w0="[object GeneratorFunction]",O0="[object Proxy]";function S0(e){if(!g0(e))return!1;var t=m0(e);return t==x0||t==w0||t==b0||t==O0}var Bs=S0;const de=ke(Bs);var A0=Ft,T0=A0["__core-js_shared__"],P0=T0,Fs=P0,bf=function(){var e=/[^.]+$/.exec(Fs&&Fs.keys&&Fs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function _0(e){return!!bf&&bf in e}var E0=_0,j0=Function.prototype,$0=j0.toString;function C0(e){if(e!=null){try{return $0.call(e)}catch{}try{return e+""}catch{}}return""}var xf=C0,M0=Bs,k0=E0,N0=ur,D0=xf,I0=/[\\^$.*+?()[\]{}|]/g,L0=/^\[object .+?Constructor\]$/,R0=Function.prototype,B0=Object.prototype,F0=R0.toString,W0=B0.hasOwnProperty,U0=RegExp("^"+F0.call(W0).replace(I0,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function z0(e){if(!N0(e)||k0(e))return!1;var t=M0(e)?U0:L0;return t.test(D0(e))}var G0=z0;function q0(e,t){return e==null?void 0:e[t]}var K0=q0,V0=G0,H0=K0;function Y0(e,t){var r=H0(e,t);return V0(r)?r:void 0}var Pr=Y0,X0=Pr,J0=X0(Object,"create"),Ei=J0,wf=Ei;function Z0(){this.__data__=wf?wf(null):{},this.size=0}var Q0=Z0;function ex(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var tx=ex,rx=Ei,nx="__lodash_hash_undefined__",ax=Object.prototype,ix=ax.hasOwnProperty;function ox(e){var t=this.__data__;if(rx){var r=t[e];return r===nx?void 0:r}return ix.call(t,e)?t[e]:void 0}var sx=ox,lx=Ei,ux=Object.prototype,cx=ux.hasOwnProperty;function fx(e){var t=this.__data__;return lx?t[e]!==void 0:cx.call(t,e)}var dx=fx,hx=Ei,px="__lodash_hash_undefined__";function vx(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=hx&&t===void 0?px:t,this}var yx=vx,mx=Q0,gx=tx,bx=sx,xx=dx,wx=yx;function tn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}tn.prototype.clear=mx,tn.prototype.delete=gx,tn.prototype.get=bx,tn.prototype.has=xx,tn.prototype.set=wx;var Ox=tn;function Sx(){this.__data__=[],this.size=0}var Ax=Sx;function Tx(e,t){return e===t||e!==e&&t!==t}var Ws=Tx,Px=Ws;function _x(e,t){for(var r=e.length;r--;)if(Px(e[r][0],t))return r;return-1}var ji=_x,Ex=ji,jx=Array.prototype,$x=jx.splice;function Cx(e){var t=this.__data__,r=Ex(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():$x.call(t,r,1),--this.size,!0}var Mx=Cx,kx=ji;function Nx(e){var t=this.__data__,r=kx(t,e);return r<0?void 0:t[r][1]}var Dx=Nx,Ix=ji;function Lx(e){return Ix(this.__data__,e)>-1}var Rx=Lx,Bx=ji;function Fx(e,t){var r=this.__data__,n=Bx(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Wx=Fx,Ux=Ax,zx=Mx,Gx=Dx,qx=Rx,Kx=Wx;function rn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}rn.prototype.clear=Ux,rn.prototype.delete=zx,rn.prototype.get=Gx,rn.prototype.has=qx,rn.prototype.set=Kx;var $i=rn,Vx=Pr,Hx=Ft,Yx=Vx(Hx,"Map"),Us=Yx,Of=Ox,Xx=$i,Jx=Us;function Zx(){this.size=0,this.__data__={hash:new Of,map:new(Jx||Xx),string:new Of}}var Qx=Zx;function ew(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var tw=ew,rw=tw;function nw(e,t){var r=e.__data__;return rw(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Ci=nw,aw=Ci;function iw(e){var t=aw(this,e).delete(e);return this.size-=t?1:0,t}var ow=iw,sw=Ci;function lw(e){return sw(this,e).get(e)}var uw=lw,cw=Ci;function fw(e){return cw(this,e).has(e)}var dw=fw,hw=Ci;function pw(e,t){var r=hw(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var vw=pw,yw=Qx,mw=ow,gw=uw,bw=dw,xw=vw;function nn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}nn.prototype.clear=yw,nn.prototype.delete=mw,nn.prototype.get=gw,nn.prototype.has=bw,nn.prototype.set=xw;var zs=nn,Sf=zs,ww="Expected a function";function Gs(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ww);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(Gs.Cache||Sf),r}Gs.Cache=Sf;var Af=Gs;const Ow=ke(Af);var Sw=Af,Aw=500;function Tw(e){var t=Sw(e,function(n){return r.size===Aw&&r.clear(),n}),r=t.cache;return t}var Pw=Tw,_w=Pw,Ew=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jw=/\\(\\)?/g,$w=_w(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Ew,function(r,n,a,i){t.push(a?i.replace(jw,"$1"):n||r)}),t}),Cw=$w;function Mw(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var qs=Mw,Tf=sa,kw=qs,Nw=lt,Dw=Qr,Pf=Tf?Tf.prototype:void 0,_f=Pf?Pf.toString:void 0;function Ef(e){if(typeof e=="string")return e;if(Nw(e))return kw(e,Ef)+"";if(Dw(e))return _f?_f.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Iw=Ef,Lw=Iw;function Rw(e){return e==null?"":Lw(e)}var jf=Rw,Bw=lt,Fw=Rs,Ww=Cw,Uw=jf;function zw(e,t){return Bw(e)?e:Fw(e,t)?[e]:Ww(Uw(e))}var $f=zw,Gw=Qr;function qw(e){if(typeof e=="string"||Gw(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Mi=qw,Kw=$f,Vw=Mi;function Hw(e,t){t=Kw(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Vw(t[r++])];return r&&r==n?e:void 0}var Ks=Hw,Yw=Ks;function Xw(e,t,r){var n=e==null?void 0:Yw(e,t);return n===void 0?r:n}var Cf=Xw;const xt=ke(Cf);function Jw(e){return e==null}var Zw=Jw;const ue=ke(Zw);var Qw=Ht,e1=lt,t1=Yt,r1="[object String]";function n1(e){return typeof e=="string"||!e1(e)&&t1(e)&&Qw(e)==r1}var a1=n1;const _r=ke(a1);var Vs={exports:{}},xe={};/**
|
|
31
|
+
* @license React
|
|
32
|
+
* react-is.production.min.js
|
|
33
|
+
*
|
|
34
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
35
|
+
*
|
|
36
|
+
* This source code is licensed under the MIT license found in the
|
|
37
|
+
* LICENSE file in the root directory of this source tree.
|
|
38
|
+
*/var Mf;function i1(){if(Mf)return xe;Mf=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),y;y=Symbol.for("react.module.reference");function p(v){if(typeof v=="object"&&v!==null){var g=v.$$typeof;switch(g){case e:switch(v=v.type,v){case r:case a:case n:case u:case c:return v;default:switch(v=v&&v.$$typeof,v){case s:case o:case l:case d:case f:case i:return v;default:return g}}case t:return g}}}return xe.ContextConsumer=o,xe.ContextProvider=i,xe.Element=e,xe.ForwardRef=l,xe.Fragment=r,xe.Lazy=d,xe.Memo=f,xe.Portal=t,xe.Profiler=a,xe.StrictMode=n,xe.Suspense=u,xe.SuspenseList=c,xe.isAsyncMode=function(){return!1},xe.isConcurrentMode=function(){return!1},xe.isContextConsumer=function(v){return p(v)===o},xe.isContextProvider=function(v){return p(v)===i},xe.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===e},xe.isForwardRef=function(v){return p(v)===l},xe.isFragment=function(v){return p(v)===r},xe.isLazy=function(v){return p(v)===d},xe.isMemo=function(v){return p(v)===f},xe.isPortal=function(v){return p(v)===t},xe.isProfiler=function(v){return p(v)===a},xe.isStrictMode=function(v){return p(v)===n},xe.isSuspense=function(v){return p(v)===u},xe.isSuspenseList=function(v){return p(v)===c},xe.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===r||v===a||v===n||v===u||v===c||v===h||typeof v=="object"&&v!==null&&(v.$$typeof===d||v.$$typeof===f||v.$$typeof===i||v.$$typeof===o||v.$$typeof===l||v.$$typeof===y||v.getModuleId!==void 0)},xe.typeOf=p,xe}var we={};/**
|
|
39
|
+
* @license React
|
|
40
|
+
* react-is.development.js
|
|
41
|
+
*
|
|
42
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the MIT license found in the
|
|
45
|
+
* LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/var kf;function o1(){return kf||(kf=1,process.env.NODE_ENV!=="production"&&function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),y=!1,p=!1,v=!1,g=!1,O=!1,x;x=Symbol.for("react.module.reference");function A(K){return!!(typeof K=="string"||typeof K=="function"||K===r||K===a||O||K===n||K===u||K===c||g||K===h||y||p||v||typeof K=="object"&&K!==null&&(K.$$typeof===d||K.$$typeof===f||K.$$typeof===i||K.$$typeof===o||K.$$typeof===l||K.$$typeof===x||K.getModuleId!==void 0))}function m(K){if(typeof K=="object"&&K!==null){var ee=K.$$typeof;switch(ee){case e:var oe=K.type;switch(oe){case r:case a:case n:case u:case c:return oe;default:var Ce=oe&&oe.$$typeof;switch(Ce){case s:case o:case l:case d:case f:case i:return Ce;default:return ee}}case t:return ee}}}var w=o,T=i,_=e,$=l,R=r,P=d,j=f,L=t,B=a,M=n,E=u,F=c,U=!1,k=!1;function N(K){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function I(K){return k||(k=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(K){return m(K)===o}function z(K){return m(K)===i}function V(K){return typeof K=="object"&&K!==null&&K.$$typeof===e}function Z(K){return m(K)===l}function Q(K){return m(K)===r}function ae(K){return m(K)===d}function te(K){return m(K)===f}function q(K){return m(K)===t}function Y(K){return m(K)===a}function J(K){return m(K)===n}function D(K){return m(K)===u}function ie(K){return m(K)===c}we.ContextConsumer=w,we.ContextProvider=T,we.Element=_,we.ForwardRef=$,we.Fragment=R,we.Lazy=P,we.Memo=j,we.Portal=L,we.Profiler=B,we.StrictMode=M,we.Suspense=E,we.SuspenseList=F,we.isAsyncMode=N,we.isConcurrentMode=I,we.isContextConsumer=W,we.isContextProvider=z,we.isElement=V,we.isForwardRef=Z,we.isFragment=Q,we.isLazy=ae,we.isMemo=te,we.isPortal=q,we.isProfiler=Y,we.isStrictMode=J,we.isSuspense=D,we.isSuspenseList=ie,we.isValidElementType=A,we.typeOf=m}()),we}process.env.NODE_ENV==="production"?Vs.exports=i1():Vs.exports=o1();var s1=Vs.exports,l1=Ht,u1=Yt,c1="[object Number]";function f1(e){return typeof e=="number"||u1(e)&&l1(e)==c1}var Nf=f1;const d1=ke(Nf);var h1=Nf;function p1(e){return h1(e)&&e!=+e}var v1=p1;const an=ke(v1);var $t=function(t){return t===0?0:t>0?1:-1},Er=function(t){return _r(t)&&t.indexOf("%")===t.length-1},X=function(t){return d1(t)&&!an(t)},y1=function(t){return ue(t)},Ve=function(t){return X(t)||_r(t)},m1=0,jr=function(t){var r=++m1;return"".concat(t||"").concat(r)},$r=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!X(t)&&!_r(t))return n;var i;if(Er(t)){var o=t.indexOf("%");i=r*parseFloat(t.slice(0,o))/100}else i=+t;return an(i)&&(i=n),a&&i>r&&(i=r),i},cr=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},g1=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},a=0;a<r;a++)if(!n[t[a]])n[t[a]]=!0;else return!0;return!1},We=function(t,r){return X(t)&&X(r)?function(n){return t+n*(r-t)}:function(){return r}};function ki(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):xt(n,t))===r})}var b1=function(t){if(!t||!t.length)return null;for(var r=t.length,n=0,a=0,i=0,o=0,s=1/0,l=-1/0,u=0,c=0,f=0;f<r;f++)u=t[f].cx||0,c=t[f].cy||0,n+=u,a+=c,i+=u*c,o+=u*u,s=Math.min(s,u),l=Math.max(l,u);var d=r*o!==n*n?(r*i-n*a)/(r*o-n*n):0;return{xmin:s,xmax:l,a:d,b:(a-d*n)/r}},x1=function(t,r){return X(t)&&X(r)?t-r:_r(t)&&_r(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function on(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 Hs(e){"@babel/helpers - typeof";return Hs=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},Hs(e)}var w1=["viewBox","children"],O1=["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"],Df=["points","pathLength"],Ys={svg:w1,polygon:Df,polyline:Df},Xs=["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"],Ni=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(S.isValidElement(t)&&(n=t.props),!en(n))return null;var a={};return Object.keys(n).forEach(function(i){Xs.includes(i)&&(a[i]=r||function(o){return n[i](n,o)})}),a},S1=function(t,r,n){return function(a){return t(r,n,a),null}},ua=function(t,r,n){if(!en(t)||Hs(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var o=t[i];Xs.includes(i)&&typeof o=="function"&&(a||(a={}),a[i]=S1(o,r,n))}),a},A1=["children"],T1=["children"];function If(e,t){if(e==null)return{};var r=P1(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function P1(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 Js(e){"@babel/helpers - typeof";return Js=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},Js(e)}var Lf={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"},Xt=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},Rf=null,Zs=null,Qs=function e(t){if(t===Rf&&Array.isArray(Zs))return Zs;var r=[];return S.Children.forEach(t,function(n){ue(n)||(s1.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Zs=r,Rf=t,r};function ut(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(a){return Xt(a)}):n=[Xt(t)],Qs(e).forEach(function(a){var i=xt(a,"type.displayName")||xt(a,"type.name");n.indexOf(i)!==-1&&r.push(a)}),r}function ht(e,t){var r=ut(e,t);return r&&r[0]}var Bf=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,a=r.height;return!(!X(n)||n<=0||!X(a)||a<=0)},_1=["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"],E1=function(t){return t&&t.type&&_r(t.type)&&_1.indexOf(t.type)>=0},Ff=function(t){return t&&Js(t)==="object"&&"clipDot"in t},j1=function(t,r,n,a){var i,o=(i=Ys==null?void 0:Ys[a])!==null&&i!==void 0?i:[];return r.startsWith("data-")||!de(t)&&(a&&o.includes(r)||O1.includes(r))||n&&Xs.includes(r)},fe=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(S.isValidElement(t)&&(a=t.props),!en(a))return null;var i={};return Object.keys(a).forEach(function(o){var s;j1((s=a)===null||s===void 0?void 0:s[o],o,r,n)&&(i[o]=a[o])}),i},el=function e(t,r){if(t===r)return!0;var n=S.Children.count(t);if(n!==S.Children.count(r))return!1;if(n===0)return!0;if(n===1)return Wf(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var a=0;a<n;a++){var i=t[a],o=r[a];if(Array.isArray(i)||Array.isArray(o)){if(!e(i,o))return!1}else if(!Wf(i,o))return!1}return!0},Wf=function(t,r){if(ue(t)&&ue(r))return!0;if(!ue(t)&&!ue(r)){var n=t.props||{},a=n.children,i=If(n,A1),o=r.props||{},s=o.children,l=If(o,T1);return a&&s?on(i,l)&&el(a,s):!a&&!s?on(i,l):!1}return!1},Uf=function(t,r){var n=[],a={};return Qs(t).forEach(function(i,o){if(E1(i))n.push(i);else if(i){var s=Xt(i.type),l=r[s]||{},u=l.handler,c=l.once;if(u&&(!c||!a[s])){var f=u(i,s,o);n.push(f),a[s]=!0}}}),n},$1=function(t){var r=t&&t.type;return r&&Lf[r]?Lf[r]:null},C1=function(t,r){return Qs(r).indexOf(t)},M1=["children","width","height","viewBox","className","style","title","desc"];function tl(){return tl=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},tl.apply(this,arguments)}function k1(e,t){if(e==null)return{};var r=N1(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function N1(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 rl(e){var t=e.children,r=e.width,n=e.height,a=e.viewBox,i=e.className,o=e.style,s=e.title,l=e.desc,u=k1(e,M1),c=a||{width:r,height:n,x:0,y:0},f=pe("recharts-surface",i);return S.createElement("svg",tl({},fe(u,!0,"svg"),{className:f,width:r,height:n,style:o,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),S.createElement("title",null,s),S.createElement("desc",null,l),t)}var D1=["children","className"];function nl(){return nl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},nl.apply(this,arguments)}function I1(e,t){if(e==null)return{};var r=L1(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function L1(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 be=S.forwardRef(function(e,t){var r=e.children,n=e.className,a=I1(e,D1),i=pe("recharts-layer",n);return S.createElement("g",nl({className:i},fe(a,!0),{ref:t}),r)}),R1=process.env.NODE_ENV!=="production",Jt=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),i=2;i<n;i++)a[i-2]=arguments[i];if(R1&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;console.warn(r.replace(/%s/g,function(){return a[o++]}))}};function B1(e,t,r){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(a);++n<a;)i[n]=e[n+t];return i}var F1=B1,W1=F1;function U1(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:W1(e,t,r)}var z1=U1,G1="\\ud800-\\udfff",q1="\\u0300-\\u036f",K1="\\ufe20-\\ufe2f",V1="\\u20d0-\\u20ff",H1=q1+K1+V1,Y1="\\ufe0e\\ufe0f",X1="\\u200d",J1=RegExp("["+X1+G1+H1+Y1+"]");function Z1(e){return J1.test(e)}var zf=Z1;function Q1(e){return e.split("")}var eO=Q1,Gf="\\ud800-\\udfff",tO="\\u0300-\\u036f",rO="\\ufe20-\\ufe2f",nO="\\u20d0-\\u20ff",aO=tO+rO+nO,iO="\\ufe0e\\ufe0f",oO="["+Gf+"]",al="["+aO+"]",il="\\ud83c[\\udffb-\\udfff]",sO="(?:"+al+"|"+il+")",qf="[^"+Gf+"]",Kf="(?:\\ud83c[\\udde6-\\uddff]){2}",Vf="[\\ud800-\\udbff][\\udc00-\\udfff]",lO="\\u200d",Hf=sO+"?",Yf="["+iO+"]?",uO="(?:"+lO+"(?:"+[qf,Kf,Vf].join("|")+")"+Yf+Hf+")*",cO=Yf+Hf+uO,fO="(?:"+[qf+al+"?",al,Kf,Vf,oO].join("|")+")",dO=RegExp(il+"(?="+il+")|"+fO+cO,"g");function hO(e){return e.match(dO)||[]}var pO=hO,vO=eO,yO=zf,mO=pO;function gO(e){return yO(e)?mO(e):vO(e)}var bO=gO,xO=z1,wO=zf,OO=bO,SO=jf;function AO(e){return function(t){t=SO(t);var r=wO(t)?OO(t):void 0,n=r?r[0]:t.charAt(0),a=r?xO(r,1).join(""):t.slice(1);return n[e]()+a}}var TO=AO,PO=TO,_O=PO("toUpperCase"),EO=_O;const Di=ke(EO);function Ne(e){return function(){return e}}const Xf=Math.cos,Ii=Math.sin,Ct=Math.sqrt,Li=Math.PI,Ri=2*Li,ol=Math.PI,sl=2*ol,Cr=1e-6,jO=sl-Cr;function Jf(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function $O(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Jf;const r=10**t;return function(n){this._+=n[0];for(let a=1,i=n.length;a<i;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class CO{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Jf:$O(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,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,i,o){this._append`C${+t},${+r},${+n},${+a},${this._x1=+i},${this._y1=+o}`}arcTo(t,r,n,a,i){if(t=+t,r=+r,n=+n,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let o=this._x1,s=this._y1,l=n-t,u=a-r,c=o-t,f=s-r,d=c*c+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>Cr)if(!(Math.abs(f*l-u*c)>Cr)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,y=a-s,p=l*l+u*u,v=h*h+y*y,g=Math.sqrt(p),O=Math.sqrt(d),x=i*Math.tan((ol-Math.acos((p+d-v)/(2*g*O)))/2),A=x/O,m=x/g;Math.abs(A-1)>Cr&&this._append`L${t+A*c},${r+A*f}`,this._append`A${i},${i},0,0,${+(f*h>c*y)},${this._x1=t+m*l},${this._y1=r+m*u}`}}arc(t,r,n,a,i,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(a),l=n*Math.sin(a),u=t+s,c=r+l,f=1^o,d=o?a-i:i-a;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>Cr||Math.abs(this._y1-c)>Cr)&&this._append`L${u},${c}`,n&&(d<0&&(d=d%sl+sl),d>jO?this._append`A${n},${n},0,1,${f},${t-s},${r-l}A${n},${n},0,1,${f},${this._x1=u},${this._y1=c}`:d>Cr&&this._append`A${n},${n},0,${+(d>=ol)},${f},${this._x1=t+n*Math.cos(i)},${this._y1=r+n*Math.sin(i)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function ll(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 CO(t)}function ul(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Zf(e){this._context=e}Zf.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 Bi(e){return new Zf(e)}function Qf(e){return e[0]}function ed(e){return e[1]}function td(e,t){var r=Ne(!0),n=null,a=Bi,i=null,o=ll(s);e=typeof e=="function"?e:e===void 0?Qf:Ne(e),t=typeof t=="function"?t:t===void 0?ed:Ne(t);function s(l){var u,c=(l=ul(l)).length,f,d=!1,h;for(n==null&&(i=a(h=o())),u=0;u<=c;++u)!(u<c&&r(f=l[u],u,l))===d&&((d=!d)?i.lineStart():i.lineEnd()),d&&i.point(+e(f,u,l),+t(f,u,l));if(h)return i=null,h+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:Ne(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:Ne(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Ne(!!l),s):r},s.curve=function(l){return arguments.length?(a=l,n!=null&&(i=a(n)),s):a},s.context=function(l){return arguments.length?(l==null?n=i=null:i=a(n=l),s):n},s}function Fi(e,t,r){var n=null,a=Ne(!0),i=null,o=Bi,s=null,l=ll(u);e=typeof e=="function"?e:e===void 0?Qf:Ne(+e),t=typeof t=="function"?t:Ne(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?ed:Ne(+r);function u(f){var d,h,y,p=(f=ul(f)).length,v,g=!1,O,x=new Array(p),A=new Array(p);for(i==null&&(s=o(O=l())),d=0;d<=p;++d){if(!(d<p&&a(v=f[d],d,f))===g)if(g=!g)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),y=d-1;y>=h;--y)s.point(x[y],A[y]);s.lineEnd(),s.areaEnd()}g&&(x[d]=+e(v,d,f),A[d]=+t(v,d,f),s.point(n?+n(v,d,f):x[d],r?+r(v,d,f):A[d]))}if(O)return s=null,O+""||null}function c(){return td().defined(a).curve(o).context(i)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:Ne(+f),n=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Ne(+f),u):e},u.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Ne(+f),u):n},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:Ne(+f),r=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Ne(+f),u):t},u.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Ne(+f),u):r},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(r)},u.lineX1=function(){return c().x(n).y(t)},u.defined=function(f){return arguments.length?(a=typeof f=="function"?f:Ne(!!f),u):a},u.curve=function(f){return arguments.length?(o=f,i!=null&&(s=o(i)),u):o},u.context=function(f){return arguments.length?(f==null?i=s=null:s=o(i=f),u):i},u}class rd{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 MO(e){return new rd(e,!0)}function kO(e){return new rd(e,!1)}const cl={draw(e,t){const r=Ct(t/Li);e.moveTo(r,0),e.arc(0,0,r,0,Ri)}},NO={draw(e,t){const r=Ct(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()}},nd=Ct(1/3),DO=nd*2,IO={draw(e,t){const r=Ct(t/DO),n=r*nd;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},LO={draw(e,t){const r=Ct(t),n=-r/2;e.rect(n,n,r,r)}},RO=.8908130915292852,ad=Ii(Li/10)/Ii(7*Li/10),BO=Ii(Ri/10)*ad,FO=-Xf(Ri/10)*ad,WO={draw(e,t){const r=Ct(t*RO),n=BO*r,a=FO*r;e.moveTo(0,-r),e.lineTo(n,a);for(let i=1;i<5;++i){const o=Ri*i/5,s=Xf(o),l=Ii(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*a,l*n+s*a)}e.closePath()}},fl=Ct(3),UO={draw(e,t){const r=-Ct(t/(fl*3));e.moveTo(0,r*2),e.lineTo(-fl*r,-r),e.lineTo(fl*r,-r),e.closePath()}},wt=-.5,Ot=Ct(3)/2,dl=1/Ct(12),zO=(dl/2+1)*3,GO={draw(e,t){const r=Ct(t/zO),n=r/2,a=r*dl,i=n,o=r*dl+r,s=-i,l=o;e.moveTo(n,a),e.lineTo(i,o),e.lineTo(s,l),e.lineTo(wt*n-Ot*a,Ot*n+wt*a),e.lineTo(wt*i-Ot*o,Ot*i+wt*o),e.lineTo(wt*s-Ot*l,Ot*s+wt*l),e.lineTo(wt*n+Ot*a,wt*a-Ot*n),e.lineTo(wt*i+Ot*o,wt*o-Ot*i),e.lineTo(wt*s+Ot*l,wt*l-Ot*s),e.closePath()}};function qO(e,t){let r=null,n=ll(a);e=typeof e=="function"?e:Ne(e||cl),t=typeof t=="function"?t:Ne(t===void 0?64:+t);function a(){let i;if(r||(r=i=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:Ne(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Ne(+i),a):t},a.context=function(i){return arguments.length?(r=i??null,a):r},a}function Wi(){}function Ui(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function id(e){this._context=e}id.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Ui(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ui(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function KO(e){return new id(e)}function od(e){this._context=e}od.prototype={areaStart:Wi,areaEnd:Wi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Ui(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function VO(e){return new od(e)}function sd(e){this._context=e}sd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Ui(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function HO(e){return new sd(e)}function ld(e){this._context=e}ld.prototype={areaStart:Wi,areaEnd:Wi,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function YO(e){return new ld(e)}function ud(e){return e<0?-1:1}function cd(e,t,r){var n=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(n||a<0&&-0),o=(r-e._y1)/(a||n<0&&-0),s=(i*a+o*n)/(n+a);return(ud(i)+ud(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(s))||0}function fd(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function hl(e,t,r){var n=e._x0,a=e._y0,i=e._x1,o=e._y1,s=(i-n)/3;e._context.bezierCurveTo(n+s,a+s*t,i-s,o-s*r,i,o)}function zi(e){this._context=e}zi.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:hl(this,this._t0,fd(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,hl(this,fd(this,r=cd(this,e,t)),r);break;default:hl(this,this._t0,r=cd(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function dd(e){this._context=new hd(e)}(dd.prototype=Object.create(zi.prototype)).point=function(e,t){zi.prototype.point.call(this,t,e)};function hd(e){this._context=e}hd.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,a,i){this._context.bezierCurveTo(t,e,n,r,i,a)}};function XO(e){return new zi(e)}function JO(e){return new dd(e)}function pd(e){this._context=e}pd.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=vd(e),a=vd(t),i=0,o=1;o<r;++i,++o)this._context.bezierCurveTo(n[0][i],a[0][i],n[1][i],a[1][i],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 vd(e){var t,r=e.length-1,n,a=new Array(r),i=new Array(r),o=new Array(r);for(a[0]=0,i[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,i[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,i[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/i[t-1],i[t]-=n,o[t]-=n*o[t-1];for(a[r-1]=o[r-1]/i[r-1],t=r-2;t>=0;--t)a[t]=(o[t]-a[t+1])/i[t];for(i[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function ZO(e){return new pd(e)}function Gi(e,t){this._context=e,this._t=t}Gi.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 QO(e){return new Gi(e,.5)}function eS(e){return new Gi(e,0)}function tS(e){return new Gi(e,1)}function sn(e,t){if((o=e.length)>1)for(var r=1,n,a,i=e[t[0]],o,s=i.length;r<o;++r)for(a=i,i=e[t[r]],n=0;n<s;++n)i[n][1]+=i[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function pl(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function rS(e,t){return e[t]}function nS(e){const t=[];return t.key=e,t}function aS(){var e=Ne([]),t=pl,r=sn,n=rS;function a(i){var o=Array.from(e.apply(this,arguments),nS),s,l=o.length,u=-1,c;for(const f of i)for(s=0,++u;s<l;++s)(o[s][u]=[0,+n(f,o[s].key,u,i)]).data=f;for(s=0,c=ul(t(o));s<l;++s)o[c[s]].index=s;return r(o,c),o}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:Ne(Array.from(i)),a):e},a.value=function(i){return arguments.length?(n=typeof i=="function"?i:Ne(+i),a):n},a.order=function(i){return arguments.length?(t=i==null?pl:typeof i=="function"?i:Ne(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(r=i??sn,a):r},a}function iS(e,t){if((n=e.length)>0){for(var r,n,a=0,i=e[0].length,o;a<i;++a){for(o=r=0;r<n;++r)o+=e[r][a][1]||0;if(o)for(r=0;r<n;++r)e[r][a][1]/=o}sn(e,t)}}function oS(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,i=n.length;r<i;++r){for(var o=0,s=0;o<a;++o)s+=e[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}sn(e,t)}}function sS(e,t){if(!(!((o=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,i,o;n<i;++n){for(var s=0,l=0,u=0;s<o;++s){for(var c=e[t[s]],f=c[n][1]||0,d=c[n-1][1]||0,h=(f-d)/2,y=0;y<s;++y){var p=e[t[y]],v=p[n][1]||0,g=p[n-1][1]||0;h+=v-g}l+=f,u+=h*f}a[n-1][1]+=a[n-1][0]=r,l&&(r-=u/l)}a[n-1][1]+=a[n-1][0]=r,sn(e,t)}}function ca(e){"@babel/helpers - typeof";return ca=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},ca(e)}var lS=["type","size","sizeType"];function vl(){return vl=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},vl.apply(this,arguments)}function yd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function md(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yd(Object(r),!0).forEach(function(n){uS(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uS(e,t,r){return t=cS(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cS(e){var t=fS(e,"string");return ca(t)=="symbol"?t:t+""}function fS(e,t){if(ca(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ca(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dS(e,t){if(e==null)return{};var r=hS(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(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}var gd={symbolCircle:cl,symbolCross:NO,symbolDiamond:IO,symbolSquare:LO,symbolStar:WO,symbolTriangle:UO,symbolWye:GO},pS=Math.PI/180,vS=function(t){var r="symbol".concat(Di(t));return gd[r]||cl},yS=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 a=18*pS;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),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}},mS=function(t,r){gd["symbol".concat(Di(t))]=r},qi=function(t){var r=t.type,n=r===void 0?"circle":r,a=t.size,i=a===void 0?64:a,o=t.sizeType,s=o===void 0?"area":o,l=dS(t,lS),u=md(md({},l),{},{type:n,size:i,sizeType:s}),c=function(){var v=vS(n),g=qO().type(v).size(yS(i,s,n));return g()},f=u.className,d=u.cx,h=u.cy,y=fe(u,!0);return d===+d&&h===+h&&i===+i?S.createElement("path",vl({},y,{className:pe("recharts-symbols",f),transform:"translate(".concat(d,", ").concat(h,")"),d:c()})):null};qi.registerSymbol=mS;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 yl(){return yl=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},yl.apply(this,arguments)}function bd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function gS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bd(Object(r),!0).forEach(function(n){fa(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xS(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,wd(n.key),n)}}function wS(e,t,r){return t&&xS(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function OS(e,t,r){return t=Ki(t),SS(e,xd()?Reflect.construct(t,r||[],Ki(e).constructor):t.apply(e,r))}function SS(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 AS(e)}function AS(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xd=function(){return!!e})()}function Ki(e){return Ki=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ki(e)}function TS(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&&ml(e,t)}function ml(e,t){return ml=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},ml(e,t)}function fa(e,t,r){return t=wd(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wd(e){var t=PS(e,"string");return ln(t)=="symbol"?t:t+""}function PS(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 St=32,gl=function(e){function t(){return bS(this,t),OS(this,t,arguments)}return TS(t,e),wS(t,[{key:"renderIcon",value:function(n){var a=this.props.inactiveColor,i=St/2,o=St/6,s=St/3,l=n.inactive?a:n.color;if(n.type==="plainline")return S.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:i,x2:St,y2:i,className:"recharts-legend-icon"});if(n.type==="line")return S.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(i,"h").concat(s,`
|
|
47
|
+
A`).concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(i,`
|
|
48
|
+
H`).concat(St,"M").concat(2*s,",").concat(i,`
|
|
49
|
+
A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(i),className:"recharts-legend-icon"});if(n.type==="rect")return S.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(St/8,"h").concat(St,"v").concat(St*3/4,"h").concat(-St,"z"),className:"recharts-legend-icon"});if(S.isValidElement(n.legendIcon)){var u=gS({},n);return delete u.legendIcon,S.cloneElement(n.legendIcon,u)}return S.createElement(qi,{fill:l,cx:i,cy:i,size:St,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,a=this.props,i=a.payload,o=a.iconSize,s=a.layout,l=a.formatter,u=a.inactiveColor,c={x:0,y:0,width:St,height:St},f={display:s==="horizontal"?"inline-block":"block",marginRight:10},d={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(h,y){var p=h.formatter||l,v=pe(fa(fa({"recharts-legend-item":!0},"legend-item-".concat(y),!0),"inactive",h.inactive));if(h.type==="none")return null;var g=de(h.value)?null:h.value;Jt(!de(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 O=h.inactive?u:h.color;return S.createElement("li",yl({className:v,style:f,key:"legend-item-".concat(y)},ua(n.props,h,y)),S.createElement(rl,{width:o,height:o,viewBox:c,style:d},n.renderIcon(h)),S.createElement("span",{className:"recharts-legend-item-text",style:{color:O}},p?p(g,h,y):g))})}},{key:"render",value:function(){var n=this.props,a=n.payload,i=n.layout,o=n.align;if(!a||!a.length)return null;var s={padding:0,margin:0,textAlign:i==="horizontal"?o:"left"};return S.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(S.PureComponent);fa(gl,"displayName","Legend"),fa(gl,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var _S=$i;function ES(){this.__data__=new _S,this.size=0}var jS=ES;function $S(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var CS=$S;function MS(e){return this.__data__.get(e)}var kS=MS;function NS(e){return this.__data__.has(e)}var DS=NS,IS=$i,LS=Us,RS=zs,BS=200;function FS(e,t){var r=this.__data__;if(r instanceof IS){var n=r.__data__;if(!LS||n.length<BS-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new RS(n)}return r.set(e,t),this.size=r.size,this}var WS=FS,US=$i,zS=jS,GS=CS,qS=kS,KS=DS,VS=WS;function un(e){var t=this.__data__=new US(e);this.size=t.size}un.prototype.clear=zS,un.prototype.delete=GS,un.prototype.get=qS,un.prototype.has=KS,un.prototype.set=VS;var Od=un,HS="__lodash_hash_undefined__";function YS(e){return this.__data__.set(e,HS),this}var XS=YS;function JS(e){return this.__data__.has(e)}var ZS=JS,QS=zs,eA=XS,tA=ZS;function Vi(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new QS;++t<r;)this.add(e[t])}Vi.prototype.add=Vi.prototype.push=eA,Vi.prototype.has=tA;var Sd=Vi;function rA(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Ad=rA;function nA(e,t){return e.has(t)}var Td=nA,aA=Sd,iA=Ad,oA=Td,sA=1,lA=2;function uA(e,t,r,n,a,i){var o=r&sA,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var f=-1,d=!0,h=r&lA?new aA:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var y=e[f],p=t[f];if(n)var v=o?n(p,y,f,t,e,i):n(y,p,f,e,t,i);if(v!==void 0){if(v)continue;d=!1;break}if(h){if(!iA(t,function(g,O){if(!oA(h,O)&&(y===g||a(y,g,r,n,i)))return h.push(O)})){d=!1;break}}else if(!(y===p||a(y,p,r,n,i))){d=!1;break}}return i.delete(e),i.delete(t),d}var Pd=uA,cA=Ft,fA=cA.Uint8Array,dA=fA;function hA(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var pA=hA;function vA(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var bl=vA,_d=sa,Ed=dA,yA=Ws,mA=Pd,gA=pA,bA=bl,xA=1,wA=2,OA="[object Boolean]",SA="[object Date]",AA="[object Error]",TA="[object Map]",PA="[object Number]",_A="[object RegExp]",EA="[object Set]",jA="[object String]",$A="[object Symbol]",CA="[object ArrayBuffer]",MA="[object DataView]",jd=_d?_d.prototype:void 0,xl=jd?jd.valueOf:void 0;function kA(e,t,r,n,a,i,o){switch(r){case MA:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case CA:return!(e.byteLength!=t.byteLength||!i(new Ed(e),new Ed(t)));case OA:case SA:case PA:return yA(+e,+t);case AA:return e.name==t.name&&e.message==t.message;case _A:case jA:return e==t+"";case TA:var s=gA;case EA:var l=n&xA;if(s||(s=bA),e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;n|=wA,o.set(e,t);var c=mA(s(e),s(t),n,a,i,o);return o.delete(e),c;case $A:if(xl)return xl.call(e)==xl.call(t)}return!1}var NA=kA;function DA(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var $d=DA,IA=$d,LA=lt;function RA(e,t,r){var n=t(e);return LA(e)?n:IA(n,r(e))}var BA=RA;function FA(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++r<n;){var o=e[r];t(o,r,e)&&(i[a++]=o)}return i}var WA=FA;function UA(){return[]}var zA=UA,GA=WA,qA=zA,KA=Object.prototype,VA=KA.propertyIsEnumerable,Cd=Object.getOwnPropertySymbols,HA=Cd?function(e){return e==null?[]:(e=Object(e),GA(Cd(e),function(t){return VA.call(e,t)}))}:qA,YA=HA;function XA(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var JA=XA,ZA=Ht,QA=Yt,eT="[object Arguments]";function tT(e){return QA(e)&&ZA(e)==eT}var rT=tT,Md=rT,nT=Yt,kd=Object.prototype,aT=kd.hasOwnProperty,iT=kd.propertyIsEnumerable,oT=Md(function(){return arguments}())?Md:function(e){return nT(e)&&aT.call(e,"callee")&&!iT.call(e,"callee")},wl=oT,Hi={exports:{}};function sT(){return!1}var lT=sT;Hi.exports,function(e,t){var r=Ft,n=lT,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,s=o?r.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||n;e.exports=u}(Hi,Hi.exports);var Nd=Hi.exports,uT=9007199254740991,cT=/^(?:0|[1-9]\d*)$/;function fT(e,t){var r=typeof e;return t=t??uT,!!t&&(r=="number"||r!="symbol"&&cT.test(e))&&e>-1&&e%1==0&&e<t}var Ol=fT,dT=9007199254740991;function hT(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=dT}var Sl=hT,pT=Ht,vT=Sl,yT=Yt,mT="[object Arguments]",gT="[object Array]",bT="[object Boolean]",xT="[object Date]",wT="[object Error]",OT="[object Function]",ST="[object Map]",AT="[object Number]",TT="[object Object]",PT="[object RegExp]",_T="[object Set]",ET="[object String]",jT="[object WeakMap]",$T="[object ArrayBuffer]",CT="[object DataView]",MT="[object Float32Array]",kT="[object Float64Array]",NT="[object Int8Array]",DT="[object Int16Array]",IT="[object Int32Array]",LT="[object Uint8Array]",RT="[object Uint8ClampedArray]",BT="[object Uint16Array]",FT="[object Uint32Array]",Ie={};Ie[MT]=Ie[kT]=Ie[NT]=Ie[DT]=Ie[IT]=Ie[LT]=Ie[RT]=Ie[BT]=Ie[FT]=!0,Ie[mT]=Ie[gT]=Ie[$T]=Ie[bT]=Ie[CT]=Ie[xT]=Ie[wT]=Ie[OT]=Ie[ST]=Ie[AT]=Ie[TT]=Ie[PT]=Ie[_T]=Ie[ET]=Ie[jT]=!1;function WT(e){return yT(e)&&vT(e.length)&&!!Ie[pT(e)]}var UT=WT;function zT(e){return function(t){return e(t)}}var Dd=zT,Yi={exports:{}};Yi.exports,function(e,t){var r=pf,n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,o=i&&r.process,s=function(){try{var l=a&&a.require&&a.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s}(Yi,Yi.exports);var GT=Yi.exports,qT=UT,KT=Dd,Id=GT,Ld=Id&&Id.isTypedArray,VT=Ld?KT(Ld):qT,Rd=VT,HT=JA,YT=wl,XT=lt,JT=Nd,ZT=Ol,QT=Rd,eP=Object.prototype,tP=eP.hasOwnProperty;function rP(e,t){var r=XT(e),n=!r&&YT(e),a=!r&&!n&&JT(e),i=!r&&!n&&!a&&QT(e),o=r||n||a||i,s=o?HT(e.length,String):[],l=s.length;for(var u in e)(t||tP.call(e,u))&&!(o&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||ZT(u,l)))&&s.push(u);return s}var nP=rP,aP=Object.prototype;function iP(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||aP;return e===r}var oP=iP;function sP(e,t){return function(r){return e(t(r))}}var Bd=sP,lP=Bd,uP=lP(Object.keys,Object),cP=uP,fP=oP,dP=cP,hP=Object.prototype,pP=hP.hasOwnProperty;function vP(e){if(!fP(e))return dP(e);var t=[];for(var r in Object(e))pP.call(e,r)&&r!="constructor"&&t.push(r);return t}var yP=vP,mP=Bs,gP=Sl;function bP(e){return e!=null&&gP(e.length)&&!mP(e)}var da=bP,xP=nP,wP=yP,OP=da;function SP(e){return OP(e)?xP(e):wP(e)}var Xi=SP,AP=BA,TP=YA,PP=Xi;function _P(e){return AP(e,PP,TP)}var EP=_P,Fd=EP,jP=1,$P=Object.prototype,CP=$P.hasOwnProperty;function MP(e,t,r,n,a,i){var o=r&jP,s=Fd(e),l=s.length,u=Fd(t),c=u.length;if(l!=c&&!o)return!1;for(var f=l;f--;){var d=s[f];if(!(o?d in t:CP.call(t,d)))return!1}var h=i.get(e),y=i.get(t);if(h&&y)return h==t&&y==e;var p=!0;i.set(e,t),i.set(t,e);for(var v=o;++f<l;){d=s[f];var g=e[d],O=t[d];if(n)var x=o?n(O,g,d,t,e,i):n(g,O,d,e,t,i);if(!(x===void 0?g===O||a(g,O,r,n,i):x)){p=!1;break}v||(v=d=="constructor")}if(p&&!v){var A=e.constructor,m=t.constructor;A!=m&&"constructor"in e&&"constructor"in t&&!(typeof A=="function"&&A instanceof A&&typeof m=="function"&&m instanceof m)&&(p=!1)}return i.delete(e),i.delete(t),p}var kP=MP,NP=Pr,DP=Ft,IP=NP(DP,"DataView"),LP=IP,RP=Pr,BP=Ft,FP=RP(BP,"Promise"),WP=FP,UP=Pr,zP=Ft,GP=UP(zP,"Set"),Wd=GP,qP=Pr,KP=Ft,VP=qP(KP,"WeakMap"),HP=VP,Al=LP,Tl=Us,Pl=WP,_l=Wd,El=HP,Ud=Ht,cn=xf,zd="[object Map]",YP="[object Object]",Gd="[object Promise]",qd="[object Set]",Kd="[object WeakMap]",Vd="[object DataView]",XP=cn(Al),JP=cn(Tl),ZP=cn(Pl),QP=cn(_l),e_=cn(El),Mr=Ud;(Al&&Mr(new Al(new ArrayBuffer(1)))!=Vd||Tl&&Mr(new Tl)!=zd||Pl&&Mr(Pl.resolve())!=Gd||_l&&Mr(new _l)!=qd||El&&Mr(new El)!=Kd)&&(Mr=function(e){var t=Ud(e),r=t==YP?e.constructor:void 0,n=r?cn(r):"";if(n)switch(n){case XP:return Vd;case JP:return zd;case ZP:return Gd;case QP:return qd;case e_:return Kd}return t});var t_=Mr,jl=Od,r_=Pd,n_=NA,a_=kP,Hd=t_,Yd=lt,Xd=Nd,i_=Rd,o_=1,Jd="[object Arguments]",Zd="[object Array]",Ji="[object Object]",s_=Object.prototype,Qd=s_.hasOwnProperty;function l_(e,t,r,n,a,i){var o=Yd(e),s=Yd(t),l=o?Zd:Hd(e),u=s?Zd:Hd(t);l=l==Jd?Ji:l,u=u==Jd?Ji:u;var c=l==Ji,f=u==Ji,d=l==u;if(d&&Xd(e)){if(!Xd(t))return!1;o=!0,c=!1}if(d&&!c)return i||(i=new jl),o||i_(e)?r_(e,t,r,n,a,i):n_(e,t,l,r,n,a,i);if(!(r&o_)){var h=c&&Qd.call(e,"__wrapped__"),y=f&&Qd.call(t,"__wrapped__");if(h||y){var p=h?e.value():e,v=y?t.value():t;return i||(i=new jl),a(p,v,r,n,i)}}return d?(i||(i=new jl),a_(e,t,r,n,a,i)):!1}var u_=l_,c_=u_,eh=Yt;function th(e,t,r,n,a){return e===t?!0:e==null||t==null||!eh(e)&&!eh(t)?e!==e&&t!==t:c_(e,t,r,n,th,a)}var $l=th,f_=Od,d_=$l,h_=1,p_=2;function v_(e,t,r,n){var a=r.length,i=a,o=!n;if(e==null)return!i;for(e=Object(e);a--;){var s=r[a];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<i;){s=r[a];var l=s[0],u=e[l],c=s[1];if(o&&s[2]){if(u===void 0&&!(l in e))return!1}else{var f=new f_;if(n)var d=n(u,c,l,e,t,f);if(!(d===void 0?d_(c,u,h_|p_,n,f):d))return!1}}return!0}var y_=v_,m_=ur;function g_(e){return e===e&&!m_(e)}var rh=g_,b_=rh,x_=Xi;function w_(e){for(var t=x_(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,b_(a)]}return t}var O_=w_;function S_(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var nh=S_,A_=y_,T_=O_,P_=nh;function __(e){var t=T_(e);return t.length==1&&t[0][2]?P_(t[0][0],t[0][1]):function(r){return r===e||A_(r,e,t)}}var E_=__;function j_(e,t){return e!=null&&t in Object(e)}var $_=j_,C_=$f,M_=wl,k_=lt,N_=Ol,D_=Sl,I_=Mi;function L_(e,t,r){t=C_(t,e);for(var n=-1,a=t.length,i=!1;++n<a;){var o=I_(t[n]);if(!(i=e!=null&&r(e,o)))break;e=e[o]}return i||++n!=a?i:(a=e==null?0:e.length,!!a&&D_(a)&&N_(o,a)&&(k_(e)||M_(e)))}var R_=L_,B_=$_,F_=R_;function W_(e,t){return e!=null&&F_(e,t,B_)}var U_=W_,z_=$l,G_=Cf,q_=U_,K_=Rs,V_=rh,H_=nh,Y_=Mi,X_=1,J_=2;function Z_(e,t){return K_(e)&&V_(t)?H_(Y_(e),t):function(r){var n=G_(r,e);return n===void 0&&n===t?q_(r,e):z_(t,n,X_|J_)}}var Q_=Z_;function eE(e){return e}var fn=eE;function tE(e){return function(t){return t==null?void 0:t[e]}}var rE=tE,nE=Ks;function aE(e){return function(t){return nE(t,e)}}var iE=aE,oE=rE,sE=iE,lE=Rs,uE=Mi;function cE(e){return lE(e)?oE(uE(e)):sE(e)}var fE=cE,dE=E_,hE=Q_,pE=fn,vE=lt,yE=fE;function mE(e){return typeof e=="function"?e:e==null?pE:typeof e=="object"?vE(e)?hE(e[0],e[1]):dE(e):yE(e)}var fr=mE;function gE(e,t,r,n){for(var a=e.length,i=r+(n?1:-1);n?i--:++i<a;)if(t(e[i],i,e))return i;return-1}var ah=gE;function bE(e){return e!==e}var xE=bE;function wE(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}var OE=wE,SE=ah,AE=xE,TE=OE;function PE(e,t,r){return t===t?TE(e,t,r):SE(e,AE,r)}var _E=PE,EE=_E;function jE(e,t){var r=e==null?0:e.length;return!!r&&EE(e,t,0)>-1}var $E=jE;function CE(e,t,r){for(var n=-1,a=e==null?0:e.length;++n<a;)if(r(t,e[n]))return!0;return!1}var ME=CE;function kE(){}var NE=kE,Cl=Wd,DE=NE,IE=bl,LE=1/0,RE=Cl&&1/IE(new Cl([,-0]))[1]==LE?function(e){return new Cl(e)}:DE,BE=RE,FE=Sd,WE=$E,UE=ME,zE=Td,GE=BE,qE=bl,KE=200;function VE(e,t,r){var n=-1,a=WE,i=e.length,o=!0,s=[],l=s;if(r)o=!1,a=UE;else if(i>=KE){var u=t?null:GE(e);if(u)return qE(u);o=!1,a=zE,l=new FE}else l=t?[]:s;e:for(;++n<i;){var c=e[n],f=t?t(c):c;if(c=r||c!==0?c:0,o&&f===f){for(var d=l.length;d--;)if(l[d]===f)continue e;t&&l.push(f),s.push(c)}else a(l,f,r)||(l!==s&&l.push(f),s.push(c))}return s}var HE=VE,YE=fr,XE=HE;function JE(e,t){return e&&e.length?XE(e,YE(t)):[]}var ZE=JE;const ih=ke(ZE);function oh(e,t,r){return t===!0?ih(e,r):de(t)?ih(e,t):e}function dn(e){"@babel/helpers - typeof";return dn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dn(e)}var QE=["ref"];function sh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Zt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sh(Object(r),!0).forEach(function(n){Qi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ej(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lh(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,ch(n.key),n)}}function tj(e,t,r){return t&&lh(e.prototype,t),r&&lh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function rj(e,t,r){return t=Zi(t),nj(e,uh()?Reflect.construct(t,r||[],Zi(e).constructor):t.apply(e,r))}function nj(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 aj(e)}function aj(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uh=function(){return!!e})()}function Zi(e){return Zi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Zi(e)}function ij(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&&Ml(e,t)}function Ml(e,t){return Ml=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ml(e,t)}function Qi(e,t,r){return t=ch(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ch(e){var t=oj(e,"string");return dn(t)=="symbol"?t:t+""}function oj(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)}function sj(e,t){if(e==null)return{};var r=lj(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function lj(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 uj(e){return e.value}function cj(e,t){if(S.isValidElement(e))return S.cloneElement(e,t);if(typeof e=="function")return S.createElement(e,t);t.ref;var r=sj(t,QE);return S.createElement(gl,r)}var fh=1,hn=function(e){function t(){var r;ej(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=rj(this,t,[].concat(a)),Qi(r,"lastBoundingBox",{width:-1,height:-1}),r}return ij(t,e),tj(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,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>fh||Math.abs(a.height-this.lastBoundingBox.height)>fh)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,n&&n(a)):(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?Zt({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var a=this.props,i=a.layout,o=a.align,s=a.verticalAlign,l=a.margin,u=a.chartWidth,c=a.chartHeight,f,d;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&i==="vertical"){var h=this.getBBoxSnapshot();f={left:((u||0)-h.width)/2}}else f=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var y=this.getBBoxSnapshot();d={top:((c||0)-y.height)/2}}else d=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Zt(Zt({},f),d)}},{key:"render",value:function(){var n=this,a=this.props,i=a.content,o=a.width,s=a.height,l=a.wrapperStyle,u=a.payloadUniqBy,c=a.payload,f=Zt(Zt({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return S.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(h){n.wrapperNode=h}},cj(i,Zt(Zt({},this.props),{},{payload:oh(c,u,uj)})))}}],[{key:"getWithHeight",value:function(n,a){var i=Zt(Zt({},this.defaultProps),n.props),o=i.layout;return o==="vertical"&&X(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||a}:null}}])}(S.PureComponent);Qi(hn,"displayName","Legend"),Qi(hn,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var dh=sa,fj=wl,dj=lt,hh=dh?dh.isConcatSpreadable:void 0;function hj(e){return dj(e)||fj(e)||!!(hh&&e&&e[hh])}var pj=hj,vj=$d,yj=pj;function ph(e,t,r,n,a){var i=-1,o=e.length;for(r||(r=yj),a||(a=[]);++i<o;){var s=e[i];t>0&&r(s)?t>1?ph(s,t-1,r,n,a):vj(a,s):n||(a[a.length]=s)}return a}var vh=ph;function mj(e){return function(t,r,n){for(var a=-1,i=Object(t),o=n(t),s=o.length;s--;){var l=o[e?s:++a];if(r(i[l],l,i)===!1)break}return t}}var gj=mj,bj=gj,xj=bj(),wj=xj,Oj=wj,Sj=Xi;function Aj(e,t){return e&&Oj(e,t,Sj)}var yh=Aj,Tj=da;function Pj(e,t){return function(r,n){if(r==null)return r;if(!Tj(r))return e(r,n);for(var a=r.length,i=t?a:-1,o=Object(r);(t?i--:++i<a)&&n(o[i],i,o)!==!1;);return r}}var _j=Pj,Ej=yh,jj=_j,$j=jj(Ej),kl=$j,Cj=kl,Mj=da;function kj(e,t){var r=-1,n=Mj(e)?Array(e.length):[];return Cj(e,function(a,i,o){n[++r]=t(a,i,o)}),n}var mh=kj;function Nj(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var Dj=Nj,gh=Qr;function Ij(e,t){if(e!==t){var r=e!==void 0,n=e===null,a=e===e,i=gh(e),o=t!==void 0,s=t===null,l=t===t,u=gh(t);if(!s&&!u&&!i&&e>t||i&&o&&l&&!s&&!u||n&&o&&l||!r&&l||!a)return 1;if(!n&&!i&&!u&&e<t||u&&r&&a&&!n&&!i||s&&r&&a||!o&&a||!l)return-1}return 0}var Lj=Ij,Rj=Lj;function Bj(e,t,r){for(var n=-1,a=e.criteria,i=t.criteria,o=a.length,s=r.length;++n<o;){var l=Rj(a[n],i[n]);if(l){if(n>=s)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return e.index-t.index}var Fj=Bj,Nl=qs,Wj=Ks,Uj=fr,zj=mh,Gj=Dj,qj=Dd,Kj=Fj,Vj=fn,Hj=lt;function Yj(e,t,r){t.length?t=Nl(t,function(i){return Hj(i)?function(o){return Wj(o,i.length===1?i[0]:i)}:i}):t=[Vj];var n=-1;t=Nl(t,qj(Uj));var a=zj(e,function(i,o,s){var l=Nl(t,function(u){return u(i)});return{criteria:l,index:++n,value:i}});return Gj(a,function(i,o){return Kj(i,o,r)})}var Xj=Yj;function Jj(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Zj=Jj,Qj=Zj,bh=Math.max;function e$(e,t,r){return t=bh(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=bh(n.length-t,0),o=Array(i);++a<i;)o[a]=n[t+a];a=-1;for(var s=Array(t+1);++a<t;)s[a]=n[a];return s[t]=r(o),Qj(e,this,s)}}var t$=e$;function r$(e){return function(){return e}}var n$=r$,a$=Pr,i$=function(){try{var e=a$(Object,"defineProperty");return e({},"",{}),e}catch{}}(),xh=i$,o$=n$,wh=xh,s$=fn,l$=wh?function(e,t){return wh(e,"toString",{configurable:!0,enumerable:!1,value:o$(t),writable:!0})}:s$,u$=l$,c$=800,f$=16,d$=Date.now;function h$(e){var t=0,r=0;return function(){var n=d$(),a=f$-(n-r);if(r=n,a>0){if(++t>=c$)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var p$=h$,v$=u$,y$=p$,m$=y$(v$),g$=m$,b$=fn,x$=t$,w$=g$;function O$(e,t){return w$(x$(e,t,b$),e+"")}var S$=O$,A$=Ws,T$=da,P$=Ol,_$=ur;function E$(e,t,r){if(!_$(r))return!1;var n=typeof t;return(n=="number"?T$(r)&&P$(t,r.length):n=="string"&&t in r)?A$(r[t],e):!1}var eo=E$,j$=vh,$$=Xj,C$=S$,Oh=eo,M$=C$(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Oh(e,t[0],t[1])?t=[]:r>2&&Oh(t[0],t[1],t[2])&&(t=[t[0]]),$$(e,j$(t,1),[])}),k$=M$;const Dl=ke(k$);function ha(e){"@babel/helpers - typeof";return ha=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},ha(e)}function Il(){return Il=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},Il.apply(this,arguments)}function N$(e,t){return R$(e)||L$(e,t)||I$(e,t)||D$()}function D$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
50
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I$(e,t){if(e){if(typeof e=="string")return Sh(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 Sh(e,t)}}function Sh(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 L$(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function R$(e){if(Array.isArray(e))return e}function Ah(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ll(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ah(Object(r),!0).forEach(function(n){B$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ah(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function B$(e,t,r){return t=F$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function F$(e){var t=W$(e,"string");return ha(t)=="symbol"?t:t+""}function W$(e,t){if(ha(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ha(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function U$(e){return Array.isArray(e)&&Ve(e[0])&&Ve(e[1])?e.join(" ~ "):e}var z$=function(t){var r=t.separator,n=r===void 0?" : ":r,a=t.contentStyle,i=a===void 0?{}:a,o=t.itemStyle,s=o===void 0?{}:o,l=t.labelStyle,u=l===void 0?{}:l,c=t.payload,f=t.formatter,d=t.itemSorter,h=t.wrapperClassName,y=t.labelClassName,p=t.label,v=t.labelFormatter,g=t.accessibilityLayer,O=g===void 0?!1:g,x=function(){if(c&&c.length){var j={padding:0,margin:0},L=(d?Dl(c,d):c).map(function(B,M){if(B.type==="none")return null;var E=Ll({display:"block",paddingTop:4,paddingBottom:4,color:B.color||"#000"},s),F=B.formatter||f||U$,U=B.value,k=B.name,N=U,I=k;if(F&&N!=null&&I!=null){var W=F(U,k,B,M,c);if(Array.isArray(W)){var z=N$(W,2);N=z[0],I=z[1]}else N=W}return S.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(M),style:E},Ve(I)?S.createElement("span",{className:"recharts-tooltip-item-name"},I):null,Ve(I)?S.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,S.createElement("span",{className:"recharts-tooltip-item-value"},N),S.createElement("span",{className:"recharts-tooltip-item-unit"},B.unit||""))});return S.createElement("ul",{className:"recharts-tooltip-item-list",style:j},L)}return null},A=Ll({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),m=Ll({margin:0},u),w=!ue(p),T=w?p:"",_=pe("recharts-default-tooltip",h),$=pe("recharts-tooltip-label",y);w&&v&&c!==void 0&&c!==null&&(T=v(p,c));var R=O?{role:"status","aria-live":"assertive"}:{};return S.createElement("div",Il({className:_,style:A},R),S.createElement("p",{className:$,style:m},S.isValidElement(T)?T:"".concat(T)),x())};function pa(e){"@babel/helpers - typeof";return pa=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},pa(e)}function to(e,t,r){return t=G$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function G$(e){var t=q$(e,"string");return pa(t)=="symbol"?t:t+""}function q$(e,t){if(pa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var va="recharts-tooltip-wrapper",K$={visibility:"hidden"};function V$(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return pe(va,to(to(to(to({},"".concat(va,"-right"),X(r)&&t&&X(t.x)&&r>=t.x),"".concat(va,"-left"),X(r)&&t&&X(t.x)&&r<t.x),"".concat(va,"-bottom"),X(n)&&t&&X(t.y)&&n>=t.y),"".concat(va,"-top"),X(n)&&t&&X(t.y)&&n<t.y))}function Th(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,a=e.offsetTopLeft,i=e.position,o=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,u=e.viewBoxDimension;if(i&&X(i[n]))return i[n];var c=r[n]-s-a,f=r[n]+a;if(t[n])return o[n]?c:f;if(o[n]){var d=c,h=l[n];return d<h?Math.max(f,l[n]):Math.max(c,l[n])}var y=f+s,p=l[n]+u;return y>p?Math.max(c,l[n]):Math.max(f,l[n])}function H$(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 Y$(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,a=e.position,i=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,c,f;return o.height>0&&o.width>0&&r?(c=Th({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=Th({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),u=H$({translateX:c,translateY:f,useTranslate3d:s})):u=K$,{cssProperties:u,cssClasses:V$({translateX:c,translateY:f,coordinate:r})}}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 Ph(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _h(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ph(Object(r),!0).forEach(function(n){Bl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ph(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function X$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J$(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,jh(n.key),n)}}function Z$(e,t,r){return t&&J$(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Q$(e,t,r){return t=ro(t),eC(e,Eh()?Reflect.construct(t,r||[],ro(e).constructor):t.apply(e,r))}function eC(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 tC(e)}function tC(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Eh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Eh=function(){return!!e})()}function ro(e){return ro=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ro(e)}function rC(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&&Rl(e,t)}function Rl(e,t){return Rl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Rl(e,t)}function Bl(e,t,r){return t=jh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jh(e){var t=nC(e,"string");return pn(t)=="symbol"?t:t+""}function nC(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)}var $h=1,aC=function(e){function t(){var r;X$(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=Q$(this,t,[].concat(a)),Bl(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Bl(r,"handleKeyDown",function(o){if(o.key==="Escape"){var s,l,u,c;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(l=r.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&s!==void 0?s:0,y:(u=(c=r.props.coordinate)===null||c===void 0?void 0:c.y)!==null&&u!==void 0?u:0}})}}),r}return rC(t,e),Z$(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>$h||Math.abs(n.height-this.state.lastBoundingBox.height)>$h)&&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,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,s=a.animationDuration,l=a.animationEasing,u=a.children,c=a.coordinate,f=a.hasPayload,d=a.isAnimationActive,h=a.offset,y=a.position,p=a.reverseDirection,v=a.useTranslate3d,g=a.viewBox,O=a.wrapperStyle,x=Y$({allowEscapeViewBox:o,coordinate:c,offsetTopLeft:h,position:y,reverseDirection:p,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:g}),A=x.cssClasses,m=x.cssProperties,w=_h(_h({transition:d&&i?"transform ".concat(s,"ms ").concat(l):void 0},m),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&f?"visible":"hidden",position:"absolute",top:0,left:0},O);return S.createElement("div",{tabIndex:-1,className:A,style:w,ref:function(_){n.wrapperNode=_}},u)}}])}(S.PureComponent),iC=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},dr={isSsr:iC()};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 Ch(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Mh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ch(Object(r),!0).forEach(function(n){Wl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ch(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sC(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,Nh(n.key),n)}}function lC(e,t,r){return t&&sC(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function uC(e,t,r){return t=no(t),cC(e,kh()?Reflect.construct(t,r||[],no(e).constructor):t.apply(e,r))}function cC(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 fC(e)}function fC(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kh=function(){return!!e})()}function no(e){return no=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},no(e)}function dC(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&&Fl(e,t)}function Fl(e,t){return Fl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Fl(e,t)}function Wl(e,t,r){return t=Nh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nh(e){var t=hC(e,"string");return vn(t)=="symbol"?t:t+""}function hC(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 String(e)}function pC(e){return e.dataKey}function vC(e,t){return S.isValidElement(e)?S.cloneElement(e,t):typeof e=="function"?S.createElement(e,t):S.createElement(z$,t)}var Wt=function(e){function t(){return oC(this,t),uC(this,t,arguments)}return dC(t,e),lC(t,[{key:"render",value:function(){var n=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,s=a.animationDuration,l=a.animationEasing,u=a.content,c=a.coordinate,f=a.filterNull,d=a.isAnimationActive,h=a.offset,y=a.payload,p=a.payloadUniqBy,v=a.position,g=a.reverseDirection,O=a.useTranslate3d,x=a.viewBox,A=a.wrapperStyle,m=y??[];f&&m.length&&(m=oh(y.filter(function(T){return T.value!=null&&(T.hide!==!0||n.props.includeHidden)}),p,pC));var w=m.length>0;return S.createElement(aC,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:d,active:i,coordinate:c,hasPayload:w,offset:h,position:v,reverseDirection:g,useTranslate3d:O,viewBox:x,wrapperStyle:A},vC(u,Mh(Mh({},this.props),{},{payload:m})))}}])}(S.PureComponent);Wl(Wt,"displayName","Tooltip"),Wl(Wt,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!dr.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=Ft,mC=function(){return yC.Date.now()},gC=mC,bC=/\s/;function xC(e){for(var t=e.length;t--&&bC.test(e.charAt(t)););return t}var wC=xC,OC=wC,SC=/^\s+/;function AC(e){return e&&e.slice(0,OC(e)+1).replace(SC,"")}var TC=AC,PC=TC,Dh=ur,_C=Qr,Ih=NaN,EC=/^[-+]0x[0-9a-f]+$/i,jC=/^0b[01]+$/i,$C=/^0o[0-7]+$/i,CC=parseInt;function MC(e){if(typeof e=="number")return e;if(_C(e))return Ih;if(Dh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Dh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=PC(e);var r=jC.test(e);return r||$C.test(e)?CC(e.slice(2),r?2:8):EC.test(e)?Ih:+e}var Lh=MC,kC=ur,Ul=gC,Rh=Lh,NC="Expected a function",DC=Math.max,IC=Math.min;function LC(e,t,r){var n,a,i,o,s,l,u=0,c=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(NC);t=Rh(t)||0,kC(r)&&(c=!!r.leading,f="maxWait"in r,i=f?DC(Rh(r.maxWait)||0,t):i,d="trailing"in r?!!r.trailing:d);function h(w){var T=n,_=a;return n=a=void 0,u=w,o=e.apply(_,T),o}function y(w){return u=w,s=setTimeout(g,t),c?h(w):o}function p(w){var T=w-l,_=w-u,$=t-T;return f?IC($,i-_):$}function v(w){var T=w-l,_=w-u;return l===void 0||T>=t||T<0||f&&_>=i}function g(){var w=Ul();if(v(w))return O(w);s=setTimeout(g,p(w))}function O(w){return s=void 0,d&&n?h(w):(n=a=void 0,o)}function x(){s!==void 0&&clearTimeout(s),u=0,n=l=a=s=void 0}function A(){return s===void 0?o:O(Ul())}function m(){var w=Ul(),T=v(w);if(n=arguments,a=this,l=w,T){if(s===void 0)return y(l);if(f)return clearTimeout(s),s=setTimeout(g,t),h(l)}return s===void 0&&(s=setTimeout(g,t)),o}return m.cancel=x,m.flush=A,m}var RC=LC,BC=RC,FC=ur,WC="Expected a function";function UC(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(WC);return FC(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),BC(e,t,{leading:n,maxWait:t,trailing:a})}var zC=UC;const Bh=ke(zC);function ya(e){"@babel/helpers - typeof";return ya=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},ya(e)}function Fh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ao(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fh(Object(r),!0).forEach(function(n){GC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function GC(e,t,r){return t=qC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qC(e){var t=KC(e,"string");return ya(t)=="symbol"?t:t+""}function KC(e,t){if(ya(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ya(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function VC(e,t){return JC(e)||XC(e,t)||YC(e,t)||HC()}function HC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
51
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YC(e,t){if(e){if(typeof e=="string")return Wh(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 Wh(e,t)}}function Wh(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 XC(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function JC(e){if(Array.isArray(e))return e}var ZC=S.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,a=n===void 0?{width:-1,height:-1}:n,i=e.width,o=i===void 0?"100%":i,s=e.height,l=s===void 0?"100%":s,u=e.minWidth,c=u===void 0?0:u,f=e.minHeight,d=e.maxHeight,h=e.children,y=e.debounce,p=y===void 0?0:y,v=e.id,g=e.className,O=e.onResize,x=e.style,A=x===void 0?{}:x,m=S.useRef(null),w=S.useRef();w.current=O,S.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 T=S.useState({containerWidth:a.width,containerHeight:a.height}),_=VC(T,2),$=_[0],R=_[1],P=S.useCallback(function(L,B){R(function(M){var E=Math.round(L),F=Math.round(B);return M.containerWidth===E&&M.containerHeight===F?M:{containerWidth:E,containerHeight:F}})},[]);S.useEffect(function(){var L=function(k){var N,I=k[0].contentRect,W=I.width,z=I.height;P(W,z),(N=w.current)===null||N===void 0||N.call(w,W,z)};p>0&&(L=Bh(L,p,{trailing:!0,leading:!1}));var B=new ResizeObserver(L),M=m.current.getBoundingClientRect(),E=M.width,F=M.height;return P(E,F),B.observe(m.current),function(){B.disconnect()}},[P,p]);var j=S.useMemo(function(){var L=$.containerWidth,B=$.containerHeight;if(L<0||B<0)return null;Jt(Er(o)||Er(l),`The width(%s) and height(%s) are both fixed numbers,
|
|
52
|
+
maybe you don't need to use a ResponsiveContainer.`,o,l),Jt(!r||r>0,"The aspect(%s) must be greater than zero.",r);var M=Er(o)?L:o,E=Er(l)?B:l;r&&r>0&&(M?E=M/r:E&&(M=E*r),d&&E>d&&(E=d)),Jt(M>0||E>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
53
|
+
please check the style of container, or the props width(%s) and height(%s),
|
|
54
|
+
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
55
|
+
height and width.`,M,E,o,l,c,f,r);var F=!Array.isArray(h)&&Xt(h.type).endsWith("Chart");return S.Children.map(h,function(U){return S.isValidElement(U)?S.cloneElement(U,ao({width:M,height:E},F?{style:ao({height:"100%",width:"100%",maxHeight:E,maxWidth:M},U.props.style)}:{})):U})},[r,h,l,d,f,c,$,o]);return S.createElement("div",{id:v?"".concat(v):void 0,className:pe("recharts-responsive-container",g),style:ao(ao({},A),{},{width:o,height:l,minWidth:c,minHeight:f,maxHeight:d}),ref:m},j)}),zl=function(t){return null};zl.displayName="Cell";function ma(e){"@babel/helpers - typeof";return ma=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},ma(e)}function Uh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Gl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Uh(Object(r),!0).forEach(function(n){QC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QC(e,t,r){return t=eM(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eM(e){var t=tM(e,"string");return ma(t)=="symbol"?t:t+""}function tM(e,t){if(ma(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ma(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yn={widthCache:{},cacheCount:0},rM=2e3,nM={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},zh="recharts_measurement_span";function aM(e){var t=Gl({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var ga=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||dr.isSsr)return{width:0,height:0};var n=aM(r),a=JSON.stringify({text:t,copyStyle:n});if(yn.widthCache[a])return yn.widthCache[a];try{var i=document.getElementById(zh);i||(i=document.createElement("span"),i.setAttribute("id",zh),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=Gl(Gl({},nM),n);Object.assign(i.style,o),i.textContent="".concat(t);var s=i.getBoundingClientRect(),l={width:s.width,height:s.height};return yn.widthCache[a]=l,++yn.cacheCount>rM&&(yn.cacheCount=0,yn.widthCache={}),l}catch{return{width:0,height:0}}},iM=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function ba(e){"@babel/helpers - typeof";return ba=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},ba(e)}function io(e,t){return uM(e)||lM(e,t)||sM(e,t)||oM()}function oM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
56
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sM(e,t){if(e){if(typeof e=="string")return Gh(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 Gh(e,t)}}function Gh(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 lM(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function uM(e){if(Array.isArray(e))return e}function cM(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qh(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,dM(n.key),n)}}function fM(e,t,r){return t&&qh(e.prototype,t),r&&qh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function dM(e){var t=hM(e,"string");return ba(t)=="symbol"?t:t+""}function hM(e,t){if(ba(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ba(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Kh=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Vh=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,pM=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,vM=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Hh={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},yM=Object.keys(Hh),mn="NaN";function mM(e,t){return e*Hh[t]}var oo=function(){function e(t,r){cM(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!pM.test(r)&&(this.num=NaN,this.unit=""),yM.includes(r)&&(this.num=mM(t,r),this.unit="px")}return fM(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,a=(n=vM.exec(r))!==null&&n!==void 0?n:[],i=io(a,3),o=i[1],s=i[2];return new e(parseFloat(o),s??"")}}])}();function Yh(e){if(e.includes(mn))return mn;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=Kh.exec(t))!==null&&r!==void 0?r:[],a=io(n,4),i=a[1],o=a[2],s=a[3],l=oo.parse(i??""),u=oo.parse(s??""),c=o==="*"?l.multiply(u):l.divide(u);if(c.isNaN())return mn;t=t.replace(Kh,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,d=(f=Vh.exec(t))!==null&&f!==void 0?f:[],h=io(d,4),y=h[1],p=h[2],v=h[3],g=oo.parse(y??""),O=oo.parse(v??""),x=p==="+"?g.add(O):g.subtract(O);if(x.isNaN())return mn;t=t.replace(Vh,x.toString())}return t}var Xh=/\(([^()]*)\)/;function gM(e){for(var t=e;t.includes("(");){var r=Xh.exec(t),n=io(r,2),a=n[1];t=t.replace(Xh,Yh(a))}return t}function bM(e){var t=e.replace(/\s+/g,"");return t=gM(t),t=Yh(t),t}function xM(e){try{return bM(e)}catch{return mn}}function ql(e){var t=xM(e.slice(5,-1));return t===mn?"":t}var wM=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],OM=["dx","dy","angle","className","breakAll"];function Kl(){return Kl=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},Kl.apply(this,arguments)}function Jh(e,t){if(e==null)return{};var r=SM(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function SM(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 Zh(e,t){return _M(e)||PM(e,t)||TM(e,t)||AM()}function AM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
57
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TM(e,t){if(e){if(typeof e=="string")return Qh(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 Qh(e,t)}}function Qh(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 PM(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function _M(e){if(Array.isArray(e))return e}var ep=/[ \f\n\r\t\v\u2028\u2029]+/,tp=function(t){var r=t.children,n=t.breakAll,a=t.style;try{var i=[];ue(r)||(n?i=r.toString().split(""):i=r.toString().split(ep));var o=i.map(function(l){return{word:l,width:ga(l,a).width}}),s=n?0:ga(" ",a).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},EM=function(t,r,n,a,i){var o=t.maxLines,s=t.children,l=t.style,u=t.breakAll,c=X(o),f=s,d=function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return M.reduce(function(E,F){var U=F.word,k=F.width,N=E[E.length-1];if(N&&(a==null||i||N.width+k+n<Number(a)))N.words.push(U),N.width+=k+n;else{var I={words:[U],width:k};E.push(I)}return E},[])},h=d(r),y=function(M){return M.reduce(function(E,F){return E.width>F.width?E:F})};if(!c)return h;for(var p="…",v=function(M){var E=f.slice(0,M),F=tp({breakAll:u,style:l,children:E+p}).wordsWithComputedWidth,U=d(F),k=U.length>o||y(U).width>Number(a);return[k,U]},g=0,O=f.length-1,x=0,A;g<=O&&x<=f.length-1;){var m=Math.floor((g+O)/2),w=m-1,T=v(w),_=Zh(T,2),$=_[0],R=_[1],P=v(m),j=Zh(P,1),L=j[0];if(!$&&!L&&(g=m+1),$&&L&&(O=m-1),!$&&L){A=R;break}x++}return A||h},rp=function(t){var r=ue(t)?[]:t.toString().split(ep);return[{words:r}]},jM=function(t){var r=t.width,n=t.scaleToFit,a=t.children,i=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!dr.isSsr){var l,u,c=tp({breakAll:o,children:a,style:i});if(c){var f=c.wordsWithComputedWidth,d=c.spaceWidth;l=f,u=d}else return rp(a);return EM({breakAll:o,children:a,maxLines:s,style:i},l,u,r,n)}return rp(a)},np="#808080",so=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,u=l===void 0?"0.71em":l,c=t.scaleToFit,f=c===void 0?!1:c,d=t.textAnchor,h=d===void 0?"start":d,y=t.verticalAnchor,p=y===void 0?"end":y,v=t.fill,g=v===void 0?np:v,O=Jh(t,wM),x=S.useMemo(function(){return jM({breakAll:O.breakAll,children:O.children,maxLines:O.maxLines,scaleToFit:f,style:O.style,width:O.width})},[O.breakAll,O.children,O.maxLines,f,O.style,O.width]),A=O.dx,m=O.dy,w=O.angle,T=O.className,_=O.breakAll,$=Jh(O,OM);if(!Ve(n)||!Ve(i))return null;var R=n+(X(A)?A:0),P=i+(X(m)?m:0),j;switch(p){case"start":j=ql("calc(".concat(u,")"));break;case"middle":j=ql("calc(".concat((x.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:j=ql("calc(".concat(x.length-1," * -").concat(s,")"));break}var L=[];if(f){var B=x[0].width,M=O.width;L.push("scale(".concat((X(M)?M/B:1)/B,")"))}return w&&L.push("rotate(".concat(w,", ").concat(R,", ").concat(P,")")),L.length&&($.transform=L.join(" ")),S.createElement("text",Kl({},fe($,!0),{x:R,y:P,className:pe("recharts-text",T),textAnchor:h,fill:g.includes("url")?np:g}),x.map(function(E,F){var U=E.words.join(_?"":" ");return S.createElement("tspan",{x:R,dy:F===0?j:s,key:"".concat(U,"-").concat(F)},U)}))};function hr(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function $M(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Vl(e){let t,r,n;e.length!==2?(t=hr,r=(s,l)=>hr(e(s),l),n=(s,l)=>e(s)-l):(t=e===hr||e===$M?e:CM,r=e,n=e);function a(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;r(s[f],l)<0?u=f+1:c=f}while(u<c)}return u}function i(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;r(s[f],l)<=0?u=f+1:c=f}while(u<c)}return u}function o(s,l,u=0,c=s.length){const f=a(s,l,u,c-1);return f>u&&n(s[f-1],l)>-n(s[f],l)?f-1:f}return{left:a,center:o,right:i}}function CM(){return 0}function ap(e){return e===null?NaN:+e}function*MM(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const xa=Vl(hr).right;Vl(ap).center;class ip extends Map{constructor(t,r=DM){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(op(this,t))}has(t){return super.has(op(this,t))}set(t,r){return super.set(kM(this,t),r)}delete(t){return super.delete(NM(this,t))}}function op({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function kM({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function NM({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function DM(e){return e!==null&&typeof e=="object"?e.valueOf():e}function IM(e=hr){if(e===hr)return sp;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 sp(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const LM=Math.sqrt(50),RM=Math.sqrt(10),BM=Math.sqrt(2);function lo(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),i=n/Math.pow(10,a),o=i>=LM?10:i>=RM?5:i>=BM?2:1;let s,l,u;return a<0?(u=Math.pow(10,-a)/o,s=Math.round(e*u),l=Math.round(t*u),s/u<e&&++s,l/u>t&&--l,u=-u):(u=Math.pow(10,a)*o,s=Math.round(e/u),l=Math.round(t/u),s*u<e&&++s,l*u>t&&--l),l<s&&.5<=r&&r<2?lo(e,t,r*2):[s,l,u]}function Hl(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,i,o]=n?lo(t,e,r):lo(e,t,r);if(!(i>=a))return[];const s=i-a+1,l=new Array(s);if(n)if(o<0)for(let u=0;u<s;++u)l[u]=(i-u)/-o;else for(let u=0;u<s;++u)l[u]=(i-u)*o;else if(o<0)for(let u=0;u<s;++u)l[u]=(a+u)/-o;else for(let u=0;u<s;++u)l[u]=(a+u)*o;return l}function Yl(e,t,r){return t=+t,e=+e,r=+r,lo(e,t,r)[2]}function Xl(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?Yl(t,e,r):Yl(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function lp(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function up(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function cp(e,t,r=0,n=1/0,a){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(a=a===void 0?sp:IM(a);n>r;){if(n-r>600){const l=n-r+1,u=t-r+1,c=Math.log(l),f=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1),h=Math.max(r,Math.floor(t-u*f/l+d)),y=Math.min(n,Math.floor(t+(l-u)*f/l+d));cp(e,t,h,y,a)}const i=e[t];let o=r,s=n;for(wa(e,r,t),a(e[n],i)>0&&wa(e,r,n);o<s;){for(wa(e,o,s),++o,--s;a(e[o],i)<0;)++o;for(;a(e[s],i)>0;)--s}a(e[r],i)===0?wa(e,r,s):(++s,wa(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function wa(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function FM(e,t,r){if(e=Float64Array.from(MM(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return up(e);if(t>=1)return lp(e);var n,a=(n-1)*t,i=Math.floor(a),o=lp(cp(e,i).subarray(0,i+1)),s=up(e.subarray(i+1));return o+(s-o)*(a-i)}}function WM(e,t,r=ap){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,a=(n-1)*t,i=Math.floor(a),o=+r(e[i],i,e),s=+r(e[i+1],i+1,e);return o+(s-o)*(a-i)}}function UM(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,i=new Array(a);++n<a;)i[n]=e+n*r;return i}function At(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 Jl=Symbol("implicit");function Zl(){var e=new ip,t=[],r=[],n=Jl;function a(i){let o=e.get(i);if(o===void 0){if(n!==Jl)return n;e.set(i,o=t.push(i)-1)}return r[o%r.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new ip;for(const o of i)e.has(o)||e.set(o,t.push(o)-1);return a},a.range=function(i){return arguments.length?(r=Array.from(i),a):r.slice()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return Zl(t,r).unknown(n)},At.apply(a,arguments),a}function Oa(){var e=Zl().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,i,o,s=!1,l=0,u=0,c=.5;delete e.unknown;function f(){var d=t().length,h=a<n,y=h?a:n,p=h?n:a;i=(p-y)/Math.max(1,d-l+u*2),s&&(i=Math.floor(i)),y+=(p-y-i*(d-l))*c,o=i*(1-l),s&&(y=Math.round(y),o=Math.round(o));var v=UM(d).map(function(g){return y+i*g});return r(h?v.reverse():v)}return e.domain=function(d){return arguments.length?(t(d),f()):t()},e.range=function(d){return arguments.length?([n,a]=d,n=+n,a=+a,f()):[n,a]},e.rangeRound=function(d){return[n,a]=d,n=+n,a=+a,s=!0,f()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(d){return arguments.length?(s=!!d,f()):s},e.padding=function(d){return arguments.length?(l=Math.min(1,u=+d),f()):l},e.paddingInner=function(d){return arguments.length?(l=Math.min(1,d),f()):l},e.paddingOuter=function(d){return arguments.length?(u=+d,f()):u},e.align=function(d){return arguments.length?(c=Math.max(0,Math.min(1,d)),f()):c},e.copy=function(){return Oa(t(),[n,a]).round(s).paddingInner(l).paddingOuter(u).align(c)},At.apply(f(),arguments)}function fp(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return fp(t())},e}function Sa(){return fp(Oa.apply(null,arguments).paddingInner(1))}function Ql(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function dp(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Aa(){}var Ta=.7,uo=1/Ta,gn="\\s*([+-]?\\d+)\\s*",Pa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ut="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",zM=/^#([0-9a-f]{3,8})$/,GM=new RegExp(`^rgb\\(${gn},${gn},${gn}\\)$`),qM=new RegExp(`^rgb\\(${Ut},${Ut},${Ut}\\)$`),KM=new RegExp(`^rgba\\(${gn},${gn},${gn},${Pa}\\)$`),VM=new RegExp(`^rgba\\(${Ut},${Ut},${Ut},${Pa}\\)$`),HM=new RegExp(`^hsl\\(${Pa},${Ut},${Ut}\\)$`),YM=new RegExp(`^hsla\\(${Pa},${Ut},${Ut},${Pa}\\)$`),hp={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};Ql(Aa,_a,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:pp,formatHex:pp,formatHex8:XM,formatHsl:JM,formatRgb:vp,toString:vp});function pp(){return this.rgb().formatHex()}function XM(){return this.rgb().formatHex8()}function JM(){return xp(this).formatHsl()}function vp(){return this.rgb().formatRgb()}function _a(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=zM.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?yp(t):r===3?new ct(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?co(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?co(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=GM.exec(e))?new ct(t[1],t[2],t[3],1):(t=qM.exec(e))?new ct(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=KM.exec(e))?co(t[1],t[2],t[3],t[4]):(t=VM.exec(e))?co(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=HM.exec(e))?bp(t[1],t[2]/100,t[3]/100,1):(t=YM.exec(e))?bp(t[1],t[2]/100,t[3]/100,t[4]):hp.hasOwnProperty(e)?yp(hp[e]):e==="transparent"?new ct(NaN,NaN,NaN,0):null}function yp(e){return new ct(e>>16&255,e>>8&255,e&255,1)}function co(e,t,r,n){return n<=0&&(e=t=r=NaN),new ct(e,t,r,n)}function ZM(e){return e instanceof Aa||(e=_a(e)),e?(e=e.rgb(),new ct(e.r,e.g,e.b,e.opacity)):new ct}function eu(e,t,r,n){return arguments.length===1?ZM(e):new ct(e,t,r,n??1)}function ct(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Ql(ct,eu,dp(Aa,{brighter(e){return e=e==null?uo:Math.pow(uo,e),new ct(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ta:Math.pow(Ta,e),new ct(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ct(kr(this.r),kr(this.g),kr(this.b),fo(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:mp,formatHex:mp,formatHex8:QM,formatRgb:gp,toString:gp}));function mp(){return`#${Nr(this.r)}${Nr(this.g)}${Nr(this.b)}`}function QM(){return`#${Nr(this.r)}${Nr(this.g)}${Nr(this.b)}${Nr((isNaN(this.opacity)?1:this.opacity)*255)}`}function gp(){const e=fo(this.opacity);return`${e===1?"rgb(":"rgba("}${kr(this.r)}, ${kr(this.g)}, ${kr(this.b)}${e===1?")":`, ${e})`}`}function fo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function kr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Nr(e){return e=kr(e),(e<16?"0":"")+e.toString(16)}function bp(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Mt(e,t,r,n)}function xp(e){if(e instanceof Mt)return new Mt(e.h,e.s,e.l,e.opacity);if(e instanceof Aa||(e=_a(e)),!e)return new Mt;if(e instanceof Mt)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),i=Math.max(t,r,n),o=NaN,s=i-a,l=(i+a)/2;return s?(t===i?o=(r-n)/s+(r<n)*6:r===i?o=(n-t)/s+2:o=(t-r)/s+4,s/=l<.5?i+a:2-i-a,o*=60):s=l>0&&l<1?0:o,new Mt(o,s,l,e.opacity)}function ek(e,t,r,n){return arguments.length===1?xp(e):new Mt(e,t,r,n??1)}function Mt(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Ql(Mt,ek,dp(Aa,{brighter(e){return e=e==null?uo:Math.pow(uo,e),new Mt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ta:Math.pow(Ta,e),new Mt(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,a=2*r-n;return new ct(tu(e>=240?e-240:e+120,a,n),tu(e,a,n),tu(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new Mt(wp(this.h),ho(this.s),ho(this.l),fo(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=fo(this.opacity);return`${e===1?"hsl(":"hsla("}${wp(this.h)}, ${ho(this.s)*100}%, ${ho(this.l)*100}%${e===1?")":`, ${e})`}`}}));function wp(e){return e=(e||0)%360,e<0?e+360:e}function ho(e){return Math.max(0,Math.min(1,e||0))}function tu(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 ru=e=>()=>e;function tk(e,t){return function(r){return e+r*t}}function rk(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 nk(e){return(e=+e)==1?Op:function(t,r){return r-t?rk(t,r,e):ru(isNaN(t)?r:t)}}function Op(e,t){var r=t-e;return r?tk(e,r):ru(isNaN(e)?t:e)}const Sp=function e(t){var r=nk(t);function n(a,i){var o=r((a=eu(a)).r,(i=eu(i)).r),s=r(a.g,i.g),l=r(a.b,i.b),u=Op(a.opacity,i.opacity);return function(c){return a.r=o(c),a.g=s(c),a.b=l(c),a.opacity=u(c),a+""}}return n.gamma=e,n}(1);function ak(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(i){for(a=0;a<r;++a)n[a]=e[a]*(1-i)+t[a]*i;return n}}function ik(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ok(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),i=new Array(r),o;for(o=0;o<n;++o)a[o]=bn(e[o],t[o]);for(;o<r;++o)i[o]=t[o];return function(s){for(o=0;o<n;++o)i[o]=a[o](s);return i}}function sk(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function po(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function lk(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=bn(e[a],t[a]):n[a]=t[a];return function(i){for(a in r)n[a]=r[a](i);return n}}var nu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,au=new RegExp(nu.source,"g");function uk(e){return function(){return e}}function ck(e){return function(t){return e(t)+""}}function fk(e,t){var r=nu.lastIndex=au.lastIndex=0,n,a,i,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=nu.exec(e))&&(a=au.exec(t));)(i=a.index)>r&&(i=t.slice(r,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(a=a[0])?s[o]?s[o]+=a:s[++o]=a:(s[++o]=null,l.push({i:o,x:po(n,a)})),r=au.lastIndex;return r<t.length&&(i=t.slice(r),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?ck(l[0].x):uk(t):(t=l.length,function(u){for(var c=0,f;c<t;++c)s[(f=l[c]).i]=f.x(u);return s.join("")})}function bn(e,t){var r=typeof t,n;return t==null||r==="boolean"?ru(t):(r==="number"?po:r==="string"?(n=_a(t))?(t=n,Sp):fk:t instanceof _a?Sp:t instanceof Date?sk:ik(t)?ak:Array.isArray(t)?ok:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?lk:po)(e,t)}function iu(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function dk(e,t){t===void 0&&(t=e,e=bn);for(var r=0,n=t.length-1,a=t[0],i=new Array(n<0?0:n);r<n;)i[r]=e(a,a=t[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return i[s](o-s)}}function hk(e){return function(){return e}}function vo(e){return+e}var Ap=[0,1];function ot(e){return e}function ou(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:hk(isNaN(t)?NaN:.5)}function pk(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function vk(e,t,r){var n=e[0],a=e[1],i=t[0],o=t[1];return a<n?(n=ou(a,n),i=r(o,i)):(n=ou(n,a),i=r(i,o)),function(s){return i(n(s))}}function yk(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),i=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)a[o]=ou(e[o],e[o+1]),i[o]=r(t[o],t[o+1]);return function(s){var l=xa(e,s,1,n)-1;return i[l](a[l](s))}}function Ea(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function yo(){var e=Ap,t=Ap,r=bn,n,a,i,o=ot,s,l,u;function c(){var d=Math.min(e.length,t.length);return o!==ot&&(o=pk(e[0],e[d-1])),s=d>2?yk:vk,l=u=null,f}function f(d){return d==null||isNaN(d=+d)?i:(l||(l=s(e.map(n),t,r)))(n(o(d)))}return f.invert=function(d){return o(a((u||(u=s(t,e.map(n),po)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,vo),c()):e.slice()},f.range=function(d){return arguments.length?(t=Array.from(d),c()):t.slice()},f.rangeRound=function(d){return t=Array.from(d),r=iu,c()},f.clamp=function(d){return arguments.length?(o=d?!0:ot,c()):o!==ot},f.interpolate=function(d){return arguments.length?(r=d,c()):r},f.unknown=function(d){return arguments.length?(i=d,f):i},function(d,h){return n=d,a=h,c()}}function su(){return yo()(ot,ot)}function mk(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function mo(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 xn(e){return e=mo(Math.abs(e)),e?e[1]:NaN}function gk(e,t){return function(r,n){for(var a=r.length,i=[],o=0,s=e[0],l=0;a>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),i.push(r.substring(a-=s,a+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return i.reverse().join(t)}}function bk(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var xk=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ja(e){if(!(t=xk.exec(e)))throw new Error("invalid format: "+e);var t;return new lu({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]})}ja.prototype=lu.prototype;function lu(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+""}lu.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 wk(e){e:for(var t=e.length,r=1,n=-1,a;r<t;++r)switch(e[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var Tp;function Ok(e,t){var r=mo(e,t);if(!r)return e+"";var n=r[0],a=r[1],i=a-(Tp=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=n.length;return i===o?n:i>o?n+new Array(i-o+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+mo(e,Math.max(0,t+i-1))[0]}function Pp(e,t){var r=mo(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const _p={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:mk,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)=>Pp(e*100,t),r:Pp,s:Ok,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Ep(e){return e}var jp=Array.prototype.map,$p=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Sk(e){var t=e.grouping===void 0||e.thousands===void 0?Ep:gk(jp.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?Ep:bk(jp.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f){f=ja(f);var d=f.fill,h=f.align,y=f.sign,p=f.symbol,v=f.zero,g=f.width,O=f.comma,x=f.precision,A=f.trim,m=f.type;m==="n"?(O=!0,m="g"):_p[m]||(x===void 0&&(x=12),A=!0,m="g"),(v||d==="0"&&h==="=")&&(v=!0,d="0",h="=");var w=p==="$"?r:p==="#"&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",T=p==="$"?n:/[%p]/.test(m)?o:"",_=_p[m],$=/[defgprs%]/.test(m);x=x===void 0?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function R(P){var j=w,L=T,B,M,E;if(m==="c")L=_(P)+L,P="";else{P=+P;var F=P<0||1/P<0;if(P=isNaN(P)?l:_(Math.abs(P),x),A&&(P=wk(P)),F&&+P==0&&y!=="+"&&(F=!1),j=(F?y==="("?y:s:y==="-"||y==="("?"":y)+j,L=(m==="s"?$p[8+Tp/3]:"")+L+(F&&y==="("?")":""),$){for(B=-1,M=P.length;++B<M;)if(E=P.charCodeAt(B),48>E||E>57){L=(E===46?a+P.slice(B+1):P.slice(B))+L,P=P.slice(0,B);break}}}O&&!v&&(P=t(P,1/0));var U=j.length+P.length+L.length,k=U<g?new Array(g-U+1).join(d):"";switch(O&&v&&(P=t(k+P,k.length?g-L.length:1/0),k=""),h){case"<":P=j+P+L+k;break;case"=":P=j+k+P+L;break;case"^":P=k.slice(0,U=k.length>>1)+j+P+L+k.slice(U);break;default:P=k+j+P+L;break}return i(P)}return R.toString=function(){return f+""},R}function c(f,d){var h=u((f=ja(f),f.type="f",f)),y=Math.max(-8,Math.min(8,Math.floor(xn(d)/3)))*3,p=Math.pow(10,-y),v=$p[8+y/3];return function(g){return h(p*g)+v}}return{format:u,formatPrefix:c}}var go,uu,Cp;Ak({thousands:",",grouping:[3],currency:["$",""]});function Ak(e){return go=Sk(e),uu=go.format,Cp=go.formatPrefix,go}function Tk(e){return Math.max(0,-xn(Math.abs(e)))}function Pk(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(xn(t)/3)))*3-xn(Math.abs(e)))}function _k(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,xn(t)-xn(e))+1}function Mp(e,t,r,n){var a=Xl(e,t,r),i;switch(n=ja(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(i=Pk(a,o))&&(n.precision=i),Cp(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=_k(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=Tk(a))&&(n.precision=i-(n.type==="%")*2);break}}return uu(n)}function pr(e){var t=e.domain;return e.ticks=function(r){var n=t();return Hl(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return Mp(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,i=n.length-1,o=n[a],s=n[i],l,u,c=10;for(s<o&&(u=o,o=s,s=u,u=a,a=i,i=u);c-- >0;){if(u=Yl(o,s,r),u===l)return n[a]=o,n[i]=s,t(n);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function bo(){var e=su();return e.copy=function(){return Ea(e,bo())},At.apply(e,arguments),pr(e)}function kp(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,vo),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return kp(e).unknown(t)},e=arguments.length?Array.from(e,vo):[0,1],pr(r)}function Np(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],i=e[n],o;return i<a&&(o=r,r=n,n=o,o=a,a=i,i=o),e[r]=t.floor(a),e[n]=t.ceil(i),e}function Dp(e){return Math.log(e)}function Ip(e){return Math.exp(e)}function Ek(e){return-Math.log(-e)}function jk(e){return-Math.exp(-e)}function $k(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Ck(e){return e===10?$k:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Mk(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 Lp(e){return(t,r)=>-e(-t,r)}function cu(e){const t=e(Dp,Ip),r=t.domain;let n=10,a,i;function o(){return a=Mk(n),i=Ck(n),r()[0]<0?(a=Lp(a),i=Lp(i),e(Ek,jk)):e(Dp,Ip),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const l=r();let u=l[0],c=l[l.length-1];const f=c<u;f&&([u,c]=[c,u]);let d=a(u),h=a(c),y,p;const v=s==null?10:+s;let g=[];if(!(n%1)&&h-d<v){if(d=Math.floor(d),h=Math.ceil(h),u>0){for(;d<=h;++d)for(y=1;y<n;++y)if(p=d<0?y/i(-d):y*i(d),!(p<u)){if(p>c)break;g.push(p)}}else for(;d<=h;++d)for(y=n-1;y>=1;--y)if(p=d>0?y/i(-d):y*i(d),!(p<u)){if(p>c)break;g.push(p)}g.length*2<v&&(g=Hl(u,c,v))}else g=Hl(d,h,Math.min(h-d,v)).map(i);return f?g.reverse():g},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=ja(l)).precision==null&&(l.trim=!0),l=uu(l)),s===1/0)return l;const u=Math.max(1,n*s/t.ticks().length);return c=>{let f=c/i(Math.round(a(c)));return f*n<n-.5&&(f*=n),f<=u?l(c):""}},t.nice=()=>r(Np(r(),{floor:s=>i(Math.floor(a(s))),ceil:s=>i(Math.ceil(a(s)))})),t}function Rp(){const e=cu(yo()).domain([1,10]);return e.copy=()=>Ea(e,Rp()).base(e.base()),At.apply(e,arguments),e}function Bp(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Fp(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function fu(e){var t=1,r=e(Bp(t),Fp(t));return r.constant=function(n){return arguments.length?e(Bp(t=+n),Fp(t)):t},pr(r)}function Wp(){var e=fu(yo());return e.copy=function(){return Ea(e,Wp()).constant(e.constant())},At.apply(e,arguments)}function Up(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function kk(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Nk(e){return e<0?-e*e:e*e}function du(e){var t=e(ot,ot),r=1;function n(){return r===1?e(ot,ot):r===.5?e(kk,Nk):e(Up(r),Up(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},pr(t)}function hu(){var e=du(yo());return e.copy=function(){return Ea(e,hu()).exponent(e.exponent())},At.apply(e,arguments),e}function Dk(){return hu.apply(null,arguments).exponent(.5)}function zp(e){return Math.sign(e)*e*e}function Ik(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Gp(){var e=su(),t=[0,1],r=!1,n;function a(i){var o=Ik(e(i));return isNaN(o)?n:r?Math.round(o):o}return a.invert=function(i){return e.invert(zp(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,vo)).map(zp)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(r=!!i,a):r},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return Gp(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},At.apply(a,arguments),pr(a)}function qp(){var e=[],t=[],r=[],n;function a(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o<s;)r[o-1]=WM(e,o/s);return i}function i(o){return o==null||isNaN(o=+o)?n:t[xa(r,o)]}return i.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},i.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(hr),a()},i.range=function(o){return arguments.length?(t=Array.from(o),a()):t.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.quantiles=function(){return r.slice()},i.copy=function(){return qp().domain(e).range(t).unknown(n)},At.apply(i,arguments)}function Kp(){var e=0,t=1,r=1,n=[.5],a=[0,1],i;function o(l){return l!=null&&l<=l?a[xa(n,l,0,r)]:i}function s(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*t-(l-r)*e)/(r+1);return o}return o.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},o.range=function(l){return arguments.length?(r=(a=Array.from(l)).length-1,s()):a.slice()},o.invertExtent=function(l){var u=a.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,n[0]]:u>=r?[n[r-1],t]:[n[u-1],n[u]]},o.unknown=function(l){return arguments.length&&(i=l),o},o.thresholds=function(){return n.slice()},o.copy=function(){return Kp().domain([e,t]).range(a).unknown(i)},At.apply(pr(o),arguments)}function Vp(){var e=[.5],t=[0,1],r,n=1;function a(i){return i!=null&&i<=i?t[xa(e,i,0,n)]:r}return a.domain=function(i){return arguments.length?(e=Array.from(i),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var o=t.indexOf(i);return[e[o-1],e[o]]},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return Vp().domain(e).range(t).unknown(r)},At.apply(a,arguments)}const pu=new Date,vu=new Date;function He(e,t,r,n){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const o=a(i),s=a.ceil(i);return i-o<s-i?o:s},a.offset=(i,o)=>(t(i=new Date(+i),o==null?1:Math.floor(o)),i),a.range=(i,o,s)=>{const l=[];if(i=a.ceil(i),s=s==null?1:Math.floor(s),!(i<o)||!(s>0))return l;let u;do l.push(u=new Date(+i)),t(i,s),e(i);while(u<i&&i<o);return l},a.filter=i=>He(o=>{if(o>=o)for(;e(o),!i(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!i(o););else for(;--s>=0;)for(;t(o,1),!i(o););}),r&&(a.count=(i,o)=>(pu.setTime(+i),vu.setTime(+o),e(pu),e(vu),Math.floor(r(pu,vu))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(n?o=>n(o)%i===0:o=>a.count(0,o)%i===0):a)),a}const xo=He(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);xo.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?He(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):xo),xo.range;const er=1e3,Tt=er*60,tr=Tt*60,rr=tr*24,yu=rr*7,Hp=rr*30,mu=rr*365,Dr=He(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*er)},(e,t)=>(t-e)/er,e=>e.getUTCSeconds());Dr.range;const gu=He(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*er)},(e,t)=>{e.setTime(+e+t*Tt)},(e,t)=>(t-e)/Tt,e=>e.getMinutes());gu.range;const bu=He(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Tt)},(e,t)=>(t-e)/Tt,e=>e.getUTCMinutes());bu.range;const xu=He(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*er-e.getMinutes()*Tt)},(e,t)=>{e.setTime(+e+t*tr)},(e,t)=>(t-e)/tr,e=>e.getHours());xu.range;const wu=He(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*tr)},(e,t)=>(t-e)/tr,e=>e.getUTCHours());wu.range;const $a=He(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Tt)/rr,e=>e.getDate()-1);$a.range;const wo=He(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/rr,e=>e.getUTCDate()-1);wo.range;const Yp=He(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/rr,e=>Math.floor(e/rr));Yp.range;function Ir(e){return He(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())*Tt)/yu)}const Oo=Ir(0),So=Ir(1),Lk=Ir(2),Rk=Ir(3),wn=Ir(4),Bk=Ir(5),Fk=Ir(6);Oo.range,So.range,Lk.range,Rk.range,wn.range,Bk.range,Fk.range;function Lr(e){return He(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)/yu)}const Ao=Lr(0),To=Lr(1),Wk=Lr(2),Uk=Lr(3),On=Lr(4),zk=Lr(5),Gk=Lr(6);Ao.range,To.range,Wk.range,Uk.range,On.range,zk.range,Gk.range;const Ou=He(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());Ou.range;const Su=He(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());Su.range;const nr=He(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());nr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:He(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)}),nr.range;const ar=He(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());ar.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:He(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)}),ar.range;function Xp(e,t,r,n,a,i){const o=[[Dr,1,er],[Dr,5,5*er],[Dr,15,15*er],[Dr,30,30*er],[i,1,Tt],[i,5,5*Tt],[i,15,15*Tt],[i,30,30*Tt],[a,1,tr],[a,3,3*tr],[a,6,6*tr],[a,12,12*tr],[n,1,rr],[n,2,2*rr],[r,1,yu],[t,1,Hp],[t,3,3*Hp],[e,1,mu]];function s(u,c,f){const d=c<u;d&&([u,c]=[c,u]);const h=f&&typeof f.range=="function"?f:l(u,c,f),y=h?h.range(u,+c+1):[];return d?y.reverse():y}function l(u,c,f){const d=Math.abs(c-u)/f,h=Vl(([,,v])=>v).right(o,d);if(h===o.length)return e.every(Xl(u/mu,c/mu,f));if(h===0)return xo.every(Math.max(Xl(u,c,f),1));const[y,p]=o[d/o[h-1][2]<o[h][2]/d?h-1:h];return y.every(p)}return[s,l]}const[qk,Kk]=Xp(ar,Su,Ao,Yp,wu,bu),[Vk,Hk]=Xp(nr,Ou,Oo,$a,xu,gu);function Au(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 Tu(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 Ca(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function Yk(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,i=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,u=Ma(a),c=ka(a),f=Ma(i),d=ka(i),h=Ma(o),y=ka(o),p=Ma(s),v=ka(s),g=Ma(l),O=ka(l),x={a:F,A:U,b:k,B:N,c:null,d:rv,e:rv,f:g2,g:E2,G:$2,H:v2,I:y2,j:m2,L:nv,m:b2,M:x2,p:I,q:W,Q:uv,s:cv,S:w2,u:O2,U:S2,V:A2,w:T2,W:P2,x:null,X:null,y:_2,Y:j2,Z:C2,"%":lv},A={a:z,A:V,b:Z,B:Q,c:null,d:iv,e:iv,f:D2,g:q2,G:V2,H:M2,I:k2,j:N2,L:ov,m:I2,M:L2,p:ae,q:te,Q:uv,s:cv,S:R2,u:B2,U:F2,V:W2,w:U2,W:z2,x:null,X:null,y:G2,Y:K2,Z:H2,"%":lv},m={a:R,A:P,b:j,B:L,c:B,d:ev,e:ev,f:f2,g:Qp,G:Zp,H:tv,I:tv,j:s2,L:c2,m:o2,M:l2,p:$,q:i2,Q:h2,s:p2,S:u2,u:e2,U:t2,V:r2,w:Qk,W:n2,x:M,X:E,y:Qp,Y:Zp,Z:a2,"%":d2};x.x=w(r,x),x.X=w(n,x),x.c=w(t,x),A.x=w(r,A),A.X=w(n,A),A.c=w(t,A);function w(q,Y){return function(J){var D=[],ie=-1,K=0,ee=q.length,oe,Ce,Te;for(J instanceof Date||(J=new Date(+J));++ie<ee;)q.charCodeAt(ie)===37&&(D.push(q.slice(K,ie)),(Ce=Jp[oe=q.charAt(++ie)])!=null?oe=q.charAt(++ie):Ce=oe==="e"?" ":"0",(Te=Y[oe])&&(oe=Te(J,Ce)),D.push(oe),K=ie+1);return D.push(q.slice(K,ie)),D.join("")}}function T(q,Y){return function(J){var D=Ca(1900,void 0,1),ie=_(D,q,J+="",0),K,ee;if(ie!=J.length)return null;if("Q"in D)return new Date(D.Q);if("s"in D)return new Date(D.s*1e3+("L"in D?D.L:0));if(Y&&!("Z"in D)&&(D.Z=0),"p"in D&&(D.H=D.H%12+D.p*12),D.m===void 0&&(D.m="q"in D?D.q:0),"V"in D){if(D.V<1||D.V>53)return null;"w"in D||(D.w=1),"Z"in D?(K=Tu(Ca(D.y,0,1)),ee=K.getUTCDay(),K=ee>4||ee===0?To.ceil(K):To(K),K=wo.offset(K,(D.V-1)*7),D.y=K.getUTCFullYear(),D.m=K.getUTCMonth(),D.d=K.getUTCDate()+(D.w+6)%7):(K=Au(Ca(D.y,0,1)),ee=K.getDay(),K=ee>4||ee===0?So.ceil(K):So(K),K=$a.offset(K,(D.V-1)*7),D.y=K.getFullYear(),D.m=K.getMonth(),D.d=K.getDate()+(D.w+6)%7)}else("W"in D||"U"in D)&&("w"in D||(D.w="u"in D?D.u%7:"W"in D?1:0),ee="Z"in D?Tu(Ca(D.y,0,1)).getUTCDay():Au(Ca(D.y,0,1)).getDay(),D.m=0,D.d="W"in D?(D.w+6)%7+D.W*7-(ee+5)%7:D.w+D.U*7-(ee+6)%7);return"Z"in D?(D.H+=D.Z/100|0,D.M+=D.Z%100,Tu(D)):Au(D)}}function _(q,Y,J,D){for(var ie=0,K=Y.length,ee=J.length,oe,Ce;ie<K;){if(D>=ee)return-1;if(oe=Y.charCodeAt(ie++),oe===37){if(oe=Y.charAt(ie++),Ce=m[oe in Jp?Y.charAt(ie++):oe],!Ce||(D=Ce(q,J,D))<0)return-1}else if(oe!=J.charCodeAt(D++))return-1}return D}function $(q,Y,J){var D=u.exec(Y.slice(J));return D?(q.p=c.get(D[0].toLowerCase()),J+D[0].length):-1}function R(q,Y,J){var D=h.exec(Y.slice(J));return D?(q.w=y.get(D[0].toLowerCase()),J+D[0].length):-1}function P(q,Y,J){var D=f.exec(Y.slice(J));return D?(q.w=d.get(D[0].toLowerCase()),J+D[0].length):-1}function j(q,Y,J){var D=g.exec(Y.slice(J));return D?(q.m=O.get(D[0].toLowerCase()),J+D[0].length):-1}function L(q,Y,J){var D=p.exec(Y.slice(J));return D?(q.m=v.get(D[0].toLowerCase()),J+D[0].length):-1}function B(q,Y,J){return _(q,t,Y,J)}function M(q,Y,J){return _(q,r,Y,J)}function E(q,Y,J){return _(q,n,Y,J)}function F(q){return o[q.getDay()]}function U(q){return i[q.getDay()]}function k(q){return l[q.getMonth()]}function N(q){return s[q.getMonth()]}function I(q){return a[+(q.getHours()>=12)]}function W(q){return 1+~~(q.getMonth()/3)}function z(q){return o[q.getUTCDay()]}function V(q){return i[q.getUTCDay()]}function Z(q){return l[q.getUTCMonth()]}function Q(q){return s[q.getUTCMonth()]}function ae(q){return a[+(q.getUTCHours()>=12)]}function te(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var Y=w(q+="",x);return Y.toString=function(){return q},Y},parse:function(q){var Y=T(q+="",!1);return Y.toString=function(){return q},Y},utcFormat:function(q){var Y=w(q+="",A);return Y.toString=function(){return q},Y},utcParse:function(q){var Y=T(q+="",!0);return Y.toString=function(){return q},Y}}}var Jp={"-":"",_:" ",0:"0"},Ze=/^\s*\d+/,Xk=/^%/,Jk=/[\\^$*+?|[\]().{}]/g;function ge(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i<r?new Array(r-i+1).join(t)+a:a)}function Zk(e){return e.replace(Jk,"\\$&")}function Ma(e){return new RegExp("^(?:"+e.map(Zk).join("|")+")","i")}function ka(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function Qk(e,t,r){var n=Ze.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function e2(e,t,r){var n=Ze.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function t2(e,t,r){var n=Ze.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function r2(e,t,r){var n=Ze.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function n2(e,t,r){var n=Ze.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Zp(e,t,r){var n=Ze.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Qp(e,t,r){var n=Ze.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function a2(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 i2(e,t,r){var n=Ze.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function o2(e,t,r){var n=Ze.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function ev(e,t,r){var n=Ze.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function s2(e,t,r){var n=Ze.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function tv(e,t,r){var n=Ze.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function l2(e,t,r){var n=Ze.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function u2(e,t,r){var n=Ze.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function c2(e,t,r){var n=Ze.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function f2(e,t,r){var n=Ze.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function d2(e,t,r){var n=Xk.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function h2(e,t,r){var n=Ze.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function p2(e,t,r){var n=Ze.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function rv(e,t){return ge(e.getDate(),t,2)}function v2(e,t){return ge(e.getHours(),t,2)}function y2(e,t){return ge(e.getHours()%12||12,t,2)}function m2(e,t){return ge(1+$a.count(nr(e),e),t,3)}function nv(e,t){return ge(e.getMilliseconds(),t,3)}function g2(e,t){return nv(e,t)+"000"}function b2(e,t){return ge(e.getMonth()+1,t,2)}function x2(e,t){return ge(e.getMinutes(),t,2)}function w2(e,t){return ge(e.getSeconds(),t,2)}function O2(e){var t=e.getDay();return t===0?7:t}function S2(e,t){return ge(Oo.count(nr(e)-1,e),t,2)}function av(e){var t=e.getDay();return t>=4||t===0?wn(e):wn.ceil(e)}function A2(e,t){return e=av(e),ge(wn.count(nr(e),e)+(nr(e).getDay()===4),t,2)}function T2(e){return e.getDay()}function P2(e,t){return ge(So.count(nr(e)-1,e),t,2)}function _2(e,t){return ge(e.getFullYear()%100,t,2)}function E2(e,t){return e=av(e),ge(e.getFullYear()%100,t,2)}function j2(e,t){return ge(e.getFullYear()%1e4,t,4)}function $2(e,t){var r=e.getDay();return e=r>=4||r===0?wn(e):wn.ceil(e),ge(e.getFullYear()%1e4,t,4)}function C2(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ge(t/60|0,"0",2)+ge(t%60,"0",2)}function iv(e,t){return ge(e.getUTCDate(),t,2)}function M2(e,t){return ge(e.getUTCHours(),t,2)}function k2(e,t){return ge(e.getUTCHours()%12||12,t,2)}function N2(e,t){return ge(1+wo.count(ar(e),e),t,3)}function ov(e,t){return ge(e.getUTCMilliseconds(),t,3)}function D2(e,t){return ov(e,t)+"000"}function I2(e,t){return ge(e.getUTCMonth()+1,t,2)}function L2(e,t){return ge(e.getUTCMinutes(),t,2)}function R2(e,t){return ge(e.getUTCSeconds(),t,2)}function B2(e){var t=e.getUTCDay();return t===0?7:t}function F2(e,t){return ge(Ao.count(ar(e)-1,e),t,2)}function sv(e){var t=e.getUTCDay();return t>=4||t===0?On(e):On.ceil(e)}function W2(e,t){return e=sv(e),ge(On.count(ar(e),e)+(ar(e).getUTCDay()===4),t,2)}function U2(e){return e.getUTCDay()}function z2(e,t){return ge(To.count(ar(e)-1,e),t,2)}function G2(e,t){return ge(e.getUTCFullYear()%100,t,2)}function q2(e,t){return e=sv(e),ge(e.getUTCFullYear()%100,t,2)}function K2(e,t){return ge(e.getUTCFullYear()%1e4,t,4)}function V2(e,t){var r=e.getUTCDay();return e=r>=4||r===0?On(e):On.ceil(e),ge(e.getUTCFullYear()%1e4,t,4)}function H2(){return"+0000"}function lv(){return"%"}function uv(e){return+e}function cv(e){return Math.floor(+e/1e3)}var Sn,fv,dv;Y2({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 Y2(e){return Sn=Yk(e),fv=Sn.format,Sn.parse,dv=Sn.utcFormat,Sn.utcParse,Sn}function X2(e){return new Date(e)}function J2(e){return e instanceof Date?+e:+new Date(+e)}function Pu(e,t,r,n,a,i,o,s,l,u){var c=su(),f=c.invert,d=c.domain,h=u(".%L"),y=u(":%S"),p=u("%I:%M"),v=u("%I %p"),g=u("%a %d"),O=u("%b %d"),x=u("%B"),A=u("%Y");function m(w){return(l(w)<w?h:s(w)<w?y:o(w)<w?p:i(w)<w?v:n(w)<w?a(w)<w?g:O:r(w)<w?x:A)(w)}return c.invert=function(w){return new Date(f(w))},c.domain=function(w){return arguments.length?d(Array.from(w,J2)):d().map(X2)},c.ticks=function(w){var T=d();return e(T[0],T[T.length-1],w??10)},c.tickFormat=function(w,T){return T==null?m:u(T)},c.nice=function(w){var T=d();return(!w||typeof w.range!="function")&&(w=t(T[0],T[T.length-1],w??10)),w?d(Np(T,w)):c},c.copy=function(){return Ea(c,Pu(e,t,r,n,a,i,o,s,l,u))},c}function Z2(){return At.apply(Pu(Vk,Hk,nr,Ou,Oo,$a,xu,gu,Dr,fv).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Q2(){return At.apply(Pu(qk,Kk,ar,Su,Ao,wo,wu,bu,Dr,dv).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Po(){var e=0,t=1,r,n,a,i,o=ot,s=!1,l;function u(f){return f==null||isNaN(f=+f)?l:o(a===0?.5:(f=(i(f)-r)*a,s?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,r=i(e=+e),n=i(t=+t),a=r===n?0:1/(n-r),u):[e,t]},u.clamp=function(f){return arguments.length?(s=!!f,u):s},u.interpolator=function(f){return arguments.length?(o=f,u):o};function c(f){return function(d){var h,y;return arguments.length?([h,y]=d,o=f(h,y),u):[o(0),o(1)]}}return u.range=c(bn),u.rangeRound=c(iu),u.unknown=function(f){return arguments.length?(l=f,u):l},function(f){return i=f,r=f(e),n=f(t),a=r===n?0:1/(n-r),u}}function vr(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function hv(){var e=pr(Po()(ot));return e.copy=function(){return vr(e,hv())},Qt.apply(e,arguments)}function pv(){var e=cu(Po()).domain([1,10]);return e.copy=function(){return vr(e,pv()).base(e.base())},Qt.apply(e,arguments)}function vv(){var e=fu(Po());return e.copy=function(){return vr(e,vv()).constant(e.constant())},Qt.apply(e,arguments)}function _u(){var e=du(Po());return e.copy=function(){return vr(e,_u()).exponent(e.exponent())},Qt.apply(e,arguments)}function eN(){return _u.apply(null,arguments).exponent(.5)}function yv(){var e=[],t=ot;function r(n){if(n!=null&&!isNaN(n=+n))return t((xa(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let a of n)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(hr),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,a)=>t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,i)=>FM(e,i/n))},r.copy=function(){return yv(t).domain(e)},Qt.apply(r,arguments)}function _o(){var e=0,t=.5,r=1,n=1,a,i,o,s,l,u=ot,c,f=!1,d;function h(p){return isNaN(p=+p)?d:(p=.5+((p=+c(p))-i)*(n*p<n*i?s:l),u(f?Math.max(0,Math.min(1,p)):p))}h.domain=function(p){return arguments.length?([e,t,r]=p,a=c(e=+e),i=c(t=+t),o=c(r=+r),s=a===i?0:.5/(i-a),l=i===o?0:.5/(o-i),n=i<a?-1:1,h):[e,t,r]},h.clamp=function(p){return arguments.length?(f=!!p,h):f},h.interpolator=function(p){return arguments.length?(u=p,h):u};function y(p){return function(v){var g,O,x;return arguments.length?([g,O,x]=v,u=dk(p,[g,O,x]),h):[u(0),u(.5),u(1)]}}return h.range=y(bn),h.rangeRound=y(iu),h.unknown=function(p){return arguments.length?(d=p,h):d},function(p){return c=p,a=p(e),i=p(t),o=p(r),s=a===i?0:.5/(i-a),l=i===o?0:.5/(o-i),n=i<a?-1:1,h}}function mv(){var e=pr(_o()(ot));return e.copy=function(){return vr(e,mv())},Qt.apply(e,arguments)}function gv(){var e=cu(_o()).domain([.1,1,10]);return e.copy=function(){return vr(e,gv()).base(e.base())},Qt.apply(e,arguments)}function bv(){var e=fu(_o());return e.copy=function(){return vr(e,bv()).constant(e.constant())},Qt.apply(e,arguments)}function Eu(){var e=du(_o());return e.copy=function(){return vr(e,Eu()).exponent(e.exponent())},Qt.apply(e,arguments)}function tN(){return Eu.apply(null,arguments).exponent(.5)}const xv=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Oa,scaleDiverging:mv,scaleDivergingLog:gv,scaleDivergingPow:Eu,scaleDivergingSqrt:tN,scaleDivergingSymlog:bv,scaleIdentity:kp,scaleImplicit:Jl,scaleLinear:bo,scaleLog:Rp,scaleOrdinal:Zl,scalePoint:Sa,scalePow:hu,scaleQuantile:qp,scaleQuantize:Kp,scaleRadial:Gp,scaleSequential:hv,scaleSequentialLog:pv,scaleSequentialPow:_u,scaleSequentialQuantile:yv,scaleSequentialSqrt:eN,scaleSequentialSymlog:vv,scaleSqrt:Dk,scaleSymlog:Wp,scaleThreshold:Vp,scaleTime:Z2,scaleUtc:Q2,tickFormat:Mp},Symbol.toStringTag,{value:"Module"}));var rN=Qr;function nN(e,t,r){for(var n=-1,a=e.length;++n<a;){var i=e[n],o=t(i);if(o!=null&&(s===void 0?o===o&&!rN(o):r(o,s)))var s=o,l=i}return l}var wv=nN;function aN(e,t){return e>t}var iN=aN,oN=wv,sN=iN,lN=fn;function uN(e){return e&&e.length?oN(e,lN,sN):void 0}var cN=uN;const yr=ke(cN);function fN(e,t){return e<t}var dN=fN,hN=wv,pN=dN,vN=fn;function yN(e){return e&&e.length?hN(e,vN,pN):void 0}var mN=yN;const Eo=ke(mN);var gN=qs,bN=fr,xN=mh,wN=lt;function ON(e,t){var r=wN(e)?gN:xN;return r(e,bN(t))}var SN=ON,AN=vh,TN=SN;function PN(e,t){return AN(TN(e,t),1)}var _N=PN;const EN=ke(_N);var jN=$l;function $N(e,t){return jN(e,t)}var CN=$N;const Rr=ke(CN);var An=1e9,MN={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Cu,Be=!0,Pt="[DecimalError] ",Br=Pt+"Invalid argument: ",ju=Pt+"Exponent out of range: ",Tn=Math.floor,Fr=Math.pow,kN=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pt,Qe=1e7,Le=7,Ov=9007199254740991,jo=Tn(Ov/Le),ne={};ne.absoluteValue=ne.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},ne.comparedTo=ne.cmp=function(e){var t,r,n,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(n=i.d.length,a=e.d.length,t=0,r=n<a?n:a;t<r;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return n===a?0:n>a^i.s<0?1:-1},ne.decimalPlaces=ne.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Le;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r},ne.dividedBy=ne.div=function(e){return ir(this,new this.constructor(e))},ne.dividedToIntegerBy=ne.idiv=function(e){var t=this,r=t.constructor;return $e(ir(t,new r(e),0,1),r.precision)},ne.equals=ne.eq=function(e){return!this.cmp(e)},ne.exponent=function(){return Ge(this)},ne.greaterThan=ne.gt=function(e){return this.cmp(e)>0},ne.greaterThanOrEqualTo=ne.gte=function(e){return this.cmp(e)>=0},ne.isInteger=ne.isint=function(){return this.e>this.d.length-2},ne.isNegative=ne.isneg=function(){return this.s<0},ne.isPositive=ne.ispos=function(){return this.s>0},ne.isZero=function(){return this.s===0},ne.lessThan=ne.lt=function(e){return this.cmp(e)<0},ne.lessThanOrEqualTo=ne.lte=function(e){return this.cmp(e)<1},ne.logarithm=ne.log=function(e){var t,r=this,n=r.constructor,a=n.precision,i=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(pt))throw Error(Pt+"NaN");if(r.s<1)throw Error(Pt+(r.s?"NaN":"-Infinity"));return r.eq(pt)?new n(0):(Be=!1,t=ir(Na(r,i),Na(e,i),i),Be=!0,$e(t,a))},ne.minus=ne.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Pv(t,e):Sv(t,(e.s=-e.s,e))},ne.modulo=ne.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(Pt+"NaN");return r.s?(Be=!1,t=ir(r,e,0,1).times(e),Be=!0,r.minus(t)):$e(new n(r),a)},ne.naturalExponential=ne.exp=function(){return Av(this)},ne.naturalLogarithm=ne.ln=function(){return Na(this)},ne.negated=ne.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},ne.plus=ne.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Sv(t,e):Pv(t,(e.s=-e.s,e))},ne.precision=ne.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Br+e);if(t=Ge(a)+1,n=a.d.length-1,r=n*Le+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r},ne.squareRoot=ne.sqrt=function(){var e,t,r,n,a,i,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Pt+"NaN")}for(e=Ge(s),Be=!1,a=Math.sqrt(+s),a==0||a==1/0?(t=Gt(s.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Tn((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new l(t)):n=new l(a.toString()),r=l.precision,a=o=r+3;;)if(i=n,n=i.plus(ir(s,i,o+2)).times(.5),Gt(i.d).slice(0,o)===(t=Gt(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),a==o&&t=="4999"){if($e(i,r+1,0),i.times(i).eq(s)){n=i;break}}else if(t!="9999")break;o+=4}return Be=!0,$e(n,r)},ne.times=ne.mul=function(e){var t,r,n,a,i,o,s,l,u,c=this,f=c.constructor,d=c.d,h=(e=new f(e)).d;if(!c.s||!e.s)return new f(0);for(e.s*=c.s,r=c.e+e.e,l=d.length,u=h.length,l<u&&(i=d,d=h,h=i,o=l,l=u,u=o),i=[],o=l+u,n=o;n--;)i.push(0);for(n=u;--n>=0;){for(t=0,a=l+n;a>n;)s=i[a]+h[n]*d[a-n-1]+t,i[a--]=s%Qe|0,t=s/Qe|0;i[a]=(i[a]+t)%Qe|0}for(;!i[--o];)i.pop();return t?++r:i.shift(),e.d=i,e.e=r,Be?$e(e,f.precision):e},ne.toDecimalPlaces=ne.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(zt(e,0,An),t===void 0?t=n.rounding:zt(t,0,8),$e(r,e+Ge(r)+1,t))},ne.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=Wr(n,!0):(zt(e,0,An),t===void 0?t=a.rounding:zt(t,0,8),n=$e(new a(n),e+1,t),r=Wr(n,!0,e+1)),r},ne.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?Wr(a):(zt(e,0,An),t===void 0?t=i.rounding:zt(t,0,8),n=$e(new i(a),e+Ge(a)+1,t),r=Wr(n.abs(),!1,e+Ge(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)},ne.toInteger=ne.toint=function(){var e=this,t=e.constructor;return $e(new t(e),Ge(e)+1,t.rounding)},ne.toNumber=function(){return+this},ne.toPower=ne.pow=function(e){var t,r,n,a,i,o,s=this,l=s.constructor,u=12,c=+(e=new l(e));if(!e.s)return new l(pt);if(s=new l(s),!s.s){if(e.s<1)throw Error(Pt+"Infinity");return s}if(s.eq(pt))return s;if(n=l.precision,e.eq(pt))return $e(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,i=s.s,o){if((r=c<0?-c:c)<=Ov){for(a=new l(pt),t=Math.ceil(n/Le+4),Be=!1;r%2&&(a=a.times(s),_v(a.d,t)),r=Tn(r/2),r!==0;)s=s.times(s),_v(s.d,t);return Be=!0,e.s<0?new l(pt).div(a):$e(a,n)}}else if(i<0)throw Error(Pt+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Be=!1,a=e.times(Na(s,n+u)),Be=!0,a=Av(a),a.s=i,a},ne.toPrecision=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?(r=Ge(a),n=Wr(a,r<=i.toExpNeg||r>=i.toExpPos)):(zt(e,1,An),t===void 0?t=i.rounding:zt(t,0,8),a=$e(new i(a),e,t),r=Ge(a),n=Wr(a,e<=r||r<=i.toExpNeg,e)),n},ne.toSignificantDigits=ne.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(zt(e,1,An),t===void 0?t=n.rounding:zt(t,0,8)),$e(new n(r),e,t)},ne.toString=ne.valueOf=ne.val=ne.toJSON=ne[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Ge(e),r=e.constructor;return Wr(e,t<=r.toExpNeg||t>=r.toExpPos)};function Sv(e,t){var r,n,a,i,o,s,l,u,c=e.constructor,f=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),Be?$e(t,f):t;if(l=e.d,u=t.d,o=e.e,a=t.e,l=l.slice(),i=o-a,i){for(i<0?(n=l,i=-i,s=u.length):(n=u,a=o,s=l.length),o=Math.ceil(f/Le),s=o>s?o+1:s+1,i>s&&(i=s,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(s=l.length,i=u.length,s-i<0&&(i=s,n=u,u=l,l=n),r=0;i;)r=(l[--i]=l[i]+u[i]+r)/Qe|0,l[i]%=Qe;for(r&&(l.unshift(r),++a),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=a,Be?$e(t,f):t}function zt(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Br+e)}function Gt(e){var t,r,n,a=e.length-1,i="",o=e[0];if(a>0){for(i+=o,t=1;t<a;t++)n=e[t]+"",r=Le-n.length,r&&(i+=mr(r)),i+=n;o=e[t],n=o+"",r=Le-n.length,r&&(i+=mr(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}var ir=function(){function e(n,a){var i,o=0,s=n.length;for(n=n.slice();s--;)i=n[s]*a+o,n[s]=i%Qe|0,o=i/Qe|0;return o&&n.unshift(o),n}function t(n,a,i,o){var s,l;if(i!=o)l=i>o?1:-1;else for(s=l=0;s<i;s++)if(n[s]!=a[s]){l=n[s]>a[s]?1:-1;break}return l}function r(n,a,i){for(var o=0;i--;)n[i]-=o,o=n[i]<a[i]?1:0,n[i]=o*Qe+n[i]-a[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,i,o){var s,l,u,c,f,d,h,y,p,v,g,O,x,A,m,w,T,_,$=n.constructor,R=n.s==a.s?1:-1,P=n.d,j=a.d;if(!n.s)return new $(n);if(!a.s)throw Error(Pt+"Division by zero");for(l=n.e-a.e,T=j.length,m=P.length,h=new $(R),y=h.d=[],u=0;j[u]==(P[u]||0);)++u;if(j[u]>(P[u]||0)&&--l,i==null?O=i=$.precision:o?O=i+(Ge(n)-Ge(a))+1:O=i,O<0)return new $(0);if(O=O/Le+2|0,u=0,T==1)for(c=0,j=j[0],O++;(u<m||c)&&O--;u++)x=c*Qe+(P[u]||0),y[u]=x/j|0,c=x%j|0;else{for(c=Qe/(j[0]+1)|0,c>1&&(j=e(j,c),P=e(P,c),T=j.length,m=P.length),A=T,p=P.slice(0,T),v=p.length;v<T;)p[v++]=0;_=j.slice(),_.unshift(0),w=j[0],j[1]>=Qe/2&&++w;do c=0,s=t(j,p,T,v),s<0?(g=p[0],T!=v&&(g=g*Qe+(p[1]||0)),c=g/w|0,c>1?(c>=Qe&&(c=Qe-1),f=e(j,c),d=f.length,v=p.length,s=t(f,p,d,v),s==1&&(c--,r(f,T<d?_:j,d))):(c==0&&(s=c=1),f=j.slice()),d=f.length,d<v&&f.unshift(0),r(p,f,v),s==-1&&(v=p.length,s=t(j,p,T,v),s<1&&(c++,r(p,T<v?_:j,v))),v=p.length):s===0&&(c++,p=[0]),y[u++]=c,s&&p[0]?p[v++]=P[A]||0:(p=[P[A]],v=1);while((A++<m||p[0]!==void 0)&&O--)}return y[0]||y.shift(),h.e=l,$e(h,o?i+Ge(h)+1:i)}}();function Av(e,t){var r,n,a,i,o,s,l=0,u=0,c=e.constructor,f=c.precision;if(Ge(e)>16)throw Error(ju+Ge(e));if(!e.s)return new c(pt);for(Be=!1,s=f,o=new c(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(Fr(2,u))/Math.LN10*2+5|0,s+=n,r=a=i=new c(pt),c.precision=s;;){if(a=$e(a.times(e),s),r=r.times(++l),o=i.plus(ir(a,r,s)),Gt(o.d).slice(0,s)===Gt(i.d).slice(0,s)){for(;u--;)i=$e(i.times(i),s);return c.precision=f,t==null?(Be=!0,$e(i,f)):i}i=o}}function Ge(e){for(var t=e.e*Le,r=e.d[0];r>=10;r/=10)t++;return t}function $u(e,t,r){if(t>e.LN10.sd())throw Be=!0,r&&(e.precision=r),Error(Pt+"LN10 precision limit exceeded");return $e(new e(e.LN10),t)}function mr(e){for(var t="";e--;)t+="0";return t}function Na(e,t){var r,n,a,i,o,s,l,u,c,f=1,d=10,h=e,y=h.d,p=h.constructor,v=p.precision;if(h.s<1)throw Error(Pt+(h.s?"NaN":"-Infinity"));if(h.eq(pt))return new p(0);if(t==null?(Be=!1,u=v):u=t,h.eq(10))return t==null&&(Be=!0),$u(p,u);if(u+=d,p.precision=u,r=Gt(y),n=r.charAt(0),i=Ge(h),Math.abs(i)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=Gt(h.d),n=r.charAt(0),f++;i=Ge(h),n>1?(h=new p("0."+r),i++):h=new p(n+"."+r.slice(1))}else return l=$u(p,u+2,v).times(i+""),h=Na(new p(n+"."+r.slice(1)),u-d).plus(l),p.precision=v,t==null?(Be=!0,$e(h,v)):h;for(s=o=h=ir(h.minus(pt),h.plus(pt),u),c=$e(h.times(h),u),a=3;;){if(o=$e(o.times(c),u),l=s.plus(ir(o,new p(a),u)),Gt(l.d).slice(0,u)===Gt(s.d).slice(0,u))return s=s.times(2),i!==0&&(s=s.plus($u(p,u+2,v).times(i+""))),s=ir(s,new p(f),u),p.precision=v,t==null?(Be=!0,$e(s,v)):s;s=l,a+=2}}function Tv(e,t){var r,n,a;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(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=Tn(r/Le),e.d=[],n=(r+1)%Le,r<0&&(n+=Le),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=Le;n<a;)e.d.push(+t.slice(n,n+=Le));t=t.slice(n),n=Le-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),Be&&(e.e>jo||e.e<-jo))throw Error(ju+r)}else e.s=0,e.e=0,e.d=[0];return e}function $e(e,t,r){var n,a,i,o,s,l,u,c,f=e.d;for(o=1,i=f[0];i>=10;i/=10)o++;if(n=t-o,n<0)n+=Le,a=t,u=f[c=0];else{if(c=Math.ceil((n+1)/Le),i=f.length,c>=i)return e;for(u=i=f[c],o=1;i>=10;i/=10)o++;n%=Le,a=n-Le+o}if(r!==void 0&&(i=Fr(10,o-a-1),s=u/i%10|0,l=t<0||f[c+1]!==void 0||u%i,l=r<4?(s||l)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||l||r==6&&(n>0?a>0?u/Fr(10,o-a):0:f[c-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(i=Ge(e),f.length=1,t=t-i-1,f[0]=Fr(10,(Le-t%Le)%Le),e.e=Tn(-t/Le)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=c,i=1,c--):(f.length=c+1,i=Fr(10,Le-n),f[c]=a>0?(u/Fr(10,o-a)%Fr(10,a)|0)*i:0),l)for(;;)if(c==0){(f[0]+=i)==Qe&&(f[0]=1,++e.e);break}else{if(f[c]+=i,f[c]!=Qe)break;f[c--]=0,i=1}for(n=f.length;f[--n]===0;)f.pop();if(Be&&(e.e>jo||e.e<-jo))throw Error(ju+Ge(e));return e}function Pv(e,t){var r,n,a,i,o,s,l,u,c,f,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),Be?$e(t,h):t;if(l=e.d,f=t.d,n=t.e,u=e.e,l=l.slice(),o=u-n,o){for(c=o<0,c?(r=l,o=-o,s=f.length):(r=f,n=u,s=l.length),a=Math.max(Math.ceil(h/Le),s)+2,o>a&&(o=a,r.length=1),r.reverse(),a=o;a--;)r.push(0);r.reverse()}else{for(a=l.length,s=f.length,c=a<s,c&&(s=a),a=0;a<s;a++)if(l[a]!=f[a]){c=l[a]<f[a];break}o=0}for(c&&(r=l,l=f,f=r,t.s=-t.s),s=l.length,a=f.length-s;a>0;--a)l[s++]=0;for(a=f.length;a>o;){if(l[--a]<f[a]){for(i=a;i&&l[--i]===0;)l[i]=Qe-1;--l[i],l[a]+=Qe}l[a]-=f[a]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(t.d=l,t.e=n,Be?$e(t,h):t):new d(0)}function Wr(e,t,r){var n,a=Ge(e),i=Gt(e.d),o=i.length;return t?(r&&(n=r-o)>0?i=i.charAt(0)+"."+i.slice(1)+mr(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+mr(-a-1)+i,r&&(n=r-o)>0&&(i+=mr(n))):a>=o?(i+=mr(a+1-o),r&&(n=r-a-1)>0&&(i=i+"."+mr(n))):((n=a+1)<o&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-o)>0&&(a+1===o&&(i+="."),i+=mr(n))),e.s<0?"-"+i:i}function _v(e,t){if(e.length>t)return e.length=t,!0}function Ev(e){var t,r,n;function a(i){var o=this;if(!(o instanceof a))return new a(i);if(o.constructor=a,i instanceof a){o.s=i.s,o.e=i.e,o.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(Br+i);if(i>0)o.s=1;else if(i<0)i=-i,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(i===~~i&&i<1e7){o.e=0,o.d=[i];return}return Tv(o,i.toString())}else if(typeof i!="string")throw Error(Br+i);if(i.charCodeAt(0)===45?(i=i.slice(1),o.s=-1):o.s=1,kN.test(i))Tv(o,i);else throw Error(Br+i)}if(a.prototype=ne,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=Ev,a.config=a.set=NN,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 a.config(e),a}function NN(e){if(!e||typeof e!="object")throw Error(Pt+"Object expected");var t,r,n,a=["precision",1,An,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((n=e[r=a[t]])!==void 0)if(Tn(n)===n&&n>=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(Br+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Br+r+": "+n);return this}var Cu=Ev(MN);pt=new Cu(1);const je=Cu;function DN(e){return BN(e)||RN(e)||LN(e)||IN()}function IN(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
58
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LN(e,t){if(e){if(typeof e=="string")return Mu(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 Mu(e,t)}}function RN(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function BN(e){if(Array.isArray(e))return Mu(e)}function Mu(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 FN=function(t){return t},jv={},$v=function(t){return t===jv},Cv=function(t){return function r(){return arguments.length===0||arguments.length===1&&$v(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},WN=function e(t,r){return t===1?r:Cv(function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];var o=a.filter(function(s){return s!==jv}).length;return o>=t?r.apply(void 0,a):e(t-o,Cv(function(){for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];var c=a.map(function(f){return $v(f)?l.shift():f});return r.apply(void 0,DN(c).concat(l))}))})},$o=function(t){return WN(t.length,t)},ku=function(t,r){for(var n=[],a=t;a<r;++a)n[a-t]=a;return n},UN=$o(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),zN=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return FN;var a=r.reverse(),i=a[0],o=a.slice(1);return function(){return o.reduce(function(s,l){return l(s)},i.apply(void 0,arguments))}},Nu=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},Mv=function(t){var r=null,n=null;return function(){for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return r&&i.every(function(s,l){return s===r[l]})||(r=i,n=t.apply(void 0,i)),n}};function GN(e){var t;return e===0?t=1:t=Math.floor(new je(e).abs().log(10).toNumber())+1,t}function qN(e,t,r){for(var n=new je(e),a=0,i=[];n.lt(t)&&a<1e5;)i.push(n.toNumber()),n=n.add(r),a++;return i}var KN=$o(function(e,t,r){var n=+e,a=+t;return n+r*(a-n)}),VN=$o(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),HN=$o(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const Co={rangeStep:qN,getDigitCount:GN,interpolateNumber:KN,uninterpolateNumber:VN,uninterpolateTruncation:HN};function Du(e){return JN(e)||XN(e)||kv(e)||YN()}function YN(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
59
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XN(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function JN(e){if(Array.isArray(e))return Iu(e)}function Da(e,t){return eD(e)||QN(e,t)||kv(e,t)||ZN()}function ZN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
60
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kv(e,t){if(e){if(typeof e=="string")return Iu(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 Iu(e,t)}}function Iu(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 QN(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,i=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){a=!0,i=l}finally{try{!n&&o.return!=null&&o.return()}finally{if(a)throw i}}return r}}function eD(e){if(Array.isArray(e))return e}function Nv(e){var t=Da(e,2),r=t[0],n=t[1],a=r,i=n;return r>n&&(a=n,i=r),[a,i]}function Dv(e,t,r){if(e.lte(0))return new je(0);var n=Co.getDigitCount(e.toNumber()),a=new je(10).pow(n),i=e.div(a),o=n!==1?.05:.1,s=new je(Math.ceil(i.div(o).toNumber())).add(r).mul(o),l=s.mul(a);return t?l:new je(Math.ceil(l))}function tD(e,t,r){var n=1,a=new je(e);if(!a.isint()&&r){var i=Math.abs(e);i<1?(n=new je(10).pow(Co.getDigitCount(e)-1),a=new je(Math.floor(a.div(n).toNumber())).mul(n)):i>1&&(a=new je(Math.floor(e)))}else e===0?a=new je(Math.floor((t-1)/2)):r||(a=new je(Math.floor(e)));var o=Math.floor((t-1)/2),s=zN(UN(function(l){return a.add(new je(l-o).mul(n)).toNumber()}),ku);return s(0,t)}function Iv(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new je(0),tickMin:new je(0),tickMax:new je(0)};var i=Dv(new je(t).sub(e).div(r-1),n,a),o;e<=0&&t>=0?o=new je(0):(o=new je(e).add(t).div(2),o=o.sub(new je(o).mod(i)));var s=Math.ceil(o.sub(e).div(i).toNumber()),l=Math.ceil(new je(t).sub(o).div(i).toNumber()),u=s+l+1;return u>r?Iv(e,t,r,n,a+1):(u<r&&(l=t>0?l+(r-u):l,s=t>0?s:s+(r-u)),{step:i,tickMin:o.sub(new je(s).mul(i)),tickMax:o.add(new je(l).mul(i))})}function rD(e){var t=Da(e,2),r=t[0],n=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(a,2),s=Nv([r,n]),l=Da(s,2),u=l[0],c=l[1];if(u===-1/0||c===1/0){var f=c===1/0?[u].concat(Du(ku(0,a-1).map(function(){return 1/0}))):[].concat(Du(ku(0,a-1).map(function(){return-1/0})),[c]);return r>n?Nu(f):f}if(u===c)return tD(u,a,i);var d=Iv(u,c,o,i),h=d.step,y=d.tickMin,p=d.tickMax,v=Co.rangeStep(y,p.add(new je(.1).mul(h)),h);return r>n?Nu(v):v}function nD(e,t){var r=Da(e,2),n=r[0],a=r[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Nv([n,a]),s=Da(o,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[n,a];if(l===u)return[l];var c=Math.max(t,2),f=Dv(new je(u).sub(l).div(c-1),i,0),d=[].concat(Du(Co.rangeStep(new je(l),new je(u).sub(new je(.99).mul(f)),f)),[u]);return n>a?Nu(d):d}var aD=Mv(rD),iD=Mv(nD),oD=process.env.NODE_ENV==="production",Lu="Invariant failed";function ft(e,t){if(oD)throw new Error(Lu);var r=typeof t=="function"?t():t,n=r?"".concat(Lu,": ").concat(r):Lu;throw new Error(n)}var sD=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];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 Mo(){return Mo=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},Mo.apply(this,arguments)}function lD(e,t){return dD(e)||fD(e,t)||cD(e,t)||uD()}function uD(){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 cD(e,t){if(e){if(typeof e=="string")return Lv(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 Lv(e,t)}}function Lv(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 fD(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function dD(e){if(Array.isArray(e))return e}function hD(e,t){if(e==null)return{};var r=pD(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function pD(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 vD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yD(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,Fv(n.key),n)}}function mD(e,t,r){return t&&yD(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gD(e,t,r){return t=ko(t),bD(e,Rv()?Reflect.construct(t,r||[],ko(e).constructor):t.apply(e,r))}function bD(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 xD(e)}function xD(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Rv=function(){return!!e})()}function ko(e){return ko=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ko(e)}function wD(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&&Ru(e,t)}function Ru(e,t){return Ru=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ru(e,t)}function Bv(e,t,r){return t=Fv(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fv(e){var t=OD(e,"string");return Pn(t)=="symbol"?t:t+""}function OD(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)}var _n=function(e){function t(){return vD(this,t),gD(this,t,arguments)}return wD(t,e),mD(t,[{key:"render",value:function(){var n=this.props,a=n.offset,i=n.layout,o=n.width,s=n.dataKey,l=n.data,u=n.dataPointFormatter,c=n.xAxis,f=n.yAxis,d=hD(n,sD),h=fe(d,!1);this.props.direction==="x"&&c.type!=="number"&&(process.env.NODE_ENV!=="production"?ft(!1,'ErrorBar requires Axis type property to be "number".'):ft());var y=l.map(function(p){var v=u(p,s),g=v.x,O=v.y,x=v.value,A=v.errorVal;if(!A)return null;var m=[],w,T;if(Array.isArray(A)){var _=lD(A,2);w=_[0],T=_[1]}else w=T=A;if(i==="vertical"){var $=c.scale,R=O+a,P=R+o,j=R-o,L=$(x-w),B=$(x+T);m.push({x1:B,y1:P,x2:B,y2:j}),m.push({x1:L,y1:R,x2:B,y2:R}),m.push({x1:L,y1:P,x2:L,y2:j})}else if(i==="horizontal"){var M=f.scale,E=g+a,F=E-o,U=E+o,k=M(x-w),N=M(x+T);m.push({x1:F,y1:N,x2:U,y2:N}),m.push({x1:E,y1:k,x2:E,y2:N}),m.push({x1:F,y1:k,x2:U,y2:k})}return S.createElement(be,Mo({className:"recharts-errorBar",key:"bar-".concat(m.map(function(I){return"".concat(I.x1,"-").concat(I.x2,"-").concat(I.y1,"-").concat(I.y2)}))},h),m.map(function(I){return S.createElement("line",Mo({},I,{key:"line-".concat(I.x1,"-").concat(I.x2,"-").concat(I.y1,"-").concat(I.y2)}))}))});return S.createElement(be,{className:"recharts-errorBars"},y)}}])}(S.Component);Bv(_n,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"}),Bv(_n,"displayName","ErrorBar");function Ia(e){"@babel/helpers - typeof";return Ia=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},Ia(e)}function Wv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ur(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wv(Object(r),!0).forEach(function(n){SD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function SD(e,t,r){return t=AD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AD(e){var t=TD(e,"string");return Ia(t)=="symbol"?t:t+""}function TD(e,t){if(Ia(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ia(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Uv=function(t){var r=t.children,n=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,o=ht(r,hn);if(!o)return null;var s=hn.defaultProps,l=s!==void 0?Ur(Ur({},s),o.props):{},u;return o.props&&o.props.payload?u=o.props&&o.props.payload:i==="children"?u=(n||[]).reduce(function(c,f){var d=f.item,h=f.props,y=h.sectors||h.data||[];return c.concat(y.map(function(p){return{type:o.props.iconType||d.props.legendType,value:p.name,color:p.fill,payload:p}}))},[]):u=(n||[]).map(function(c){var f=c.item,d=f.type.defaultProps,h=d!==void 0?Ur(Ur({},d),f.props):{},y=h.dataKey,p=h.name,v=h.legendType,g=h.hide;return{inactive:g,dataKey:y,type:l.iconType||v||"square",color:Fu(f),value:p||y,payload:h}}),Ur(Ur(Ur({},l),hn.getWithHeight(o,a)),{},{payload:u,item:o})};function La(e){"@babel/helpers - typeof";return La=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},La(e)}function zv(e){return jD(e)||ED(e)||_D(e)||PD()}function PD(){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 _D(e,t){if(e){if(typeof e=="string")return Bu(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 Bu(e,t)}}function ED(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jD(e){if(Array.isArray(e))return Bu(e)}function Bu(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 Gv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Fe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gv(Object(r),!0).forEach(function(n){En(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function En(e,t,r){return t=$D(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $D(e){var t=CD(e,"string");return La(t)=="symbol"?t:t+""}function CD(e,t){if(La(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(La(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ye(e,t,r){return ue(e)||ue(t)?r:Ve(t)?xt(e,t,r):de(t)?t(e):r}function Ra(e,t,r,n){var a=EN(e,function(s){return Ye(s,t)});if(r==="number"){var i=a.filter(function(s){return X(s)||parseFloat(s)});return i.length?[Eo(i),yr(i)]:[1/0,-1/0]}var o=n?a.filter(function(s){return!ue(s)}):a;return o.map(function(s){return Ve(s)||s instanceof Date?s:""})}var MD=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=-1,s=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var l=i.range,u=0;u<s;u++){var c=u>0?a[u-1].coordinate:a[s-1].coordinate,f=a[u].coordinate,d=u>=s-1?a[0].coordinate:a[u+1].coordinate,h=void 0;if($t(f-c)!==$t(d-f)){var y=[];if($t(d-f)===$t(l[1]-l[0])){h=d;var p=f+l[1]-l[0];y[0]=Math.min(p,(p+c)/2),y[1]=Math.max(p,(p+c)/2)}else{h=c;var v=d+l[1]-l[0];y[0]=Math.min(f,(v+f)/2),y[1]=Math.max(f,(v+f)/2)}var g=[Math.min(f,(h+f)/2),Math.max(f,(h+f)/2)];if(t>g[0]&&t<=g[1]||t>=y[0]&&t<=y[1]){o=a[u].index;break}}else{var O=Math.min(c,d),x=Math.max(c,d);if(t>(O+f)/2&&t<=(x+f)/2){o=a[u].index;break}}}else for(var A=0;A<s;A++)if(A===0&&t<=(n[A].coordinate+n[A+1].coordinate)/2||A>0&&A<s-1&&t>(n[A].coordinate+n[A-1].coordinate)/2&&t<=(n[A].coordinate+n[A+1].coordinate)/2||A===s-1&&t>(n[A].coordinate+n[A-1].coordinate)/2){o=n[A].index;break}return o},Fu=function(t){var r,n=t,a=n.type.displayName,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Fe(Fe({},t.type.defaultProps),t.props):t.props,o=i.stroke,s=i.fill,l;switch(a){case"Line":l=o;break;case"Area":case"Radar":l=o&&o!=="none"?o:s;break;default:l=s;break}return l},kD=function(t){var r=t.barSize,n=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var o={},s=Object.keys(i),l=0,u=s.length;l<u;l++)for(var c=i[s[l]].stackGroups,f=Object.keys(c),d=0,h=f.length;d<h;d++){var y=c[f[d]],p=y.items,v=y.cateAxisId,g=p.filter(function(T){return Xt(T.type).indexOf("Bar")>=0});if(g&&g.length){var O=g[0].type.defaultProps,x=O!==void 0?Fe(Fe({},O),g[0].props):g[0].props,A=x.barSize,m=x[v];o[m]||(o[m]=[]);var w=ue(A)?r:A;o[m].push({item:g[0],stackList:g.slice(1),barSize:ue(w)?void 0:$r(w,n,0)})}}return o},ND=function(t){var r=t.barGap,n=t.barCategoryGap,a=t.bandSize,i=t.sizeList,o=i===void 0?[]:i,s=t.maxBarSize,l=o.length;if(l<1)return null;var u=$r(r,a,0,!0),c,f=[];if(o[0].barSize===+o[0].barSize){var d=!1,h=a/l,y=o.reduce(function(A,m){return A+m.barSize||0},0);y+=(l-1)*u,y>=a&&(y-=(l-1)*u,u=0),y>=a&&h>0&&(d=!0,h*=.9,y=l*h);var p=(a-y)/2>>0,v={offset:p-u,size:0};c=o.reduce(function(A,m){var w={item:m.item,position:{offset:v.offset+v.size+u,size:d?h:m.barSize}},T=[].concat(zv(A),[w]);return v=T[T.length-1].position,m.stackList&&m.stackList.length&&m.stackList.forEach(function(_){T.push({item:_,position:v})}),T},f)}else{var g=$r(n,a,0,!0);a-2*g-(l-1)*u<=0&&(u=0);var O=(a-2*g-(l-1)*u)/l;O>1&&(O>>=0);var x=s===+s?Math.min(O,s):O;c=o.reduce(function(A,m,w){var T=[].concat(zv(A),[{item:m.item,position:{offset:g+(O+u)*w+(O-x)/2,size:x}}]);return m.stackList&&m.stackList.length&&m.stackList.forEach(function(_){T.push({item:_,position:T[T.length-1].position})}),T},f)}return c},DD=function(t,r,n,a){var i=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),u=Uv({children:i,legendWidth:l});if(u){var c=a||{},f=c.width,d=c.height,h=u.align,y=u.verticalAlign,p=u.layout;if((p==="vertical"||p==="horizontal"&&y==="middle")&&h!=="center"&&X(t[h]))return Fe(Fe({},t),{},En({},h,t[h]+(f||0)));if((p==="horizontal"||p==="vertical"&&h==="center")&&y!=="middle"&&X(t[y]))return Fe(Fe({},t),{},En({},y,t[y]+(d||0)))}return t},ID=function(t,r,n){return ue(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},qv=function(t,r,n,a,i){var o=r.props.children,s=ut(o,_n).filter(function(u){return ID(a,i,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,c){var f=Ye(c,n);if(ue(f))return u;var d=Array.isArray(f)?[Eo(f),yr(f)]:[f,f],h=l.reduce(function(y,p){var v=Ye(c,p,0),g=d[0]-Math.abs(Array.isArray(v)?v[0]:v),O=d[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(g,y[0]),Math.max(O,y[1])]},[1/0,-1/0]);return[Math.min(h[0],u[0]),Math.max(h[1],u[1])]},[1/0,-1/0])}return null},LD=function(t,r,n,a,i){var o=r.map(function(s){return qv(t,s,n,i,a)}).filter(function(s){return!ue(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},Kv=function(t,r,n,a,i){var o=r.map(function(l){var u=l.props.dataKey;return n==="number"&&u&&qv(t,l,u,a)||Ra(t,u,n,i)});if(n==="number")return o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,u){for(var c=0,f=u.length;c<f;c++)s[u[c]]||(s[u[c]]=!0,l.push(u[c]));return l},[])},Vv=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},Hv=function(t,r,n,a){if(a)return t.map(function(l){return l.coordinate});var i,o,s=t.map(function(l){return l.coordinate===r&&(i=!0),l.coordinate===n&&(o=!0),l.coordinate});return i||s.push(r),o||s.push(n),s},or=function(t,r,n){if(!t)return null;var a=t.scale,i=t.duplicateDomain,o=t.type,s=t.range,l=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,u=(r||n)&&o==="category"&&a.bandwidth?a.bandwidth()/l:0;if(u=t.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?$t(s[0]-s[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(f){var d=i?i.indexOf(f):f;return{coordinate:a(d)+u,value:f,offset:u}});return c.filter(function(f){return!an(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,d){return{coordinate:a(f)+u,value:f,index:d,offset:u}}):a.ticks&&!n?a.ticks(t.tickCount).map(function(f){return{coordinate:a(f)+u,value:f,offset:u}}):a.domain().map(function(f,d){return{coordinate:a(f)+u,value:i?i[f]:f,index:d,offset:u}})},Wu=new WeakMap,No=function(t,r){if(typeof r!="function")return t;Wu.has(t)||Wu.set(t,new WeakMap);var n=Wu.get(t);if(n.has(r))return n.get(r);var a=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,a),a},RD=function(t,r,n){var a=t.scale,i=t.type,o=t.layout,s=t.axisType;if(a==="auto")return o==="radial"&&s==="radiusAxis"?{scale:Oa(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:bo(),realScaleType:"linear"}:i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Sa(),realScaleType:"point"}:i==="category"?{scale:Oa(),realScaleType:"band"}:{scale:bo(),realScaleType:"linear"};if(_r(a)){var l="scale".concat(Di(a));return{scale:(xv[l]||Sa)(),realScaleType:xv[l]?l:"point"}}return de(a)?{scale:a}:{scale:Sa(),realScaleType:"point"}},Yv=1e-4,BD=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,a=t.range(),i=Math.min(a[0],a[1])-Yv,o=Math.max(a[0],a[1])+Yv,s=t(r[0]),l=t(r[n-1]);(s<i||s>o||l<i||l>o)&&t.domain([r[0],r[n-1]])}},FD=function(t,r){if(!t)return null;for(var n=0,a=t.length;n<a;n++)if(t[n].item===r)return t[n].position;return null},WD=function(t,r){if(!r||r.length!==2||!X(r[0])||!X(r[1]))return t;var n=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]),i=[t[0],t[1]];return(!X(t[0])||t[0]<n)&&(i[0]=n),(!X(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<n&&(i[1]=n),i},UD=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,o=0,s=0;s<r;++s){var l=an(t[s][n][1])?t[s][n][0]:t[s][n][1];l>=0?(t[s][n][0]=i,t[s][n][1]=i+l,i=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+l,o=t[s][n][1])}},zD=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,o=0;o<r;++o){var s=an(t[o][n][1])?t[o][n][0]:t[o][n][1];s>=0?(t[o][n][0]=i,t[o][n][1]=i+s,i=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},GD={sign:UD,expand:iS,none:sn,silhouette:oS,wiggle:sS,positive:zD},qD=function(t,r,n){var a=r.map(function(s){return s.props.dataKey}),i=GD[n],o=aS().keys(a).value(function(s,l){return+Ye(s,l,0)}).order(pl).offset(i);return o(t)},KD=function(t,r,n,a,i,o){if(!t)return null;var s=o?r.reverse():r,l={},u=s.reduce(function(f,d){var h,y=(h=d.type)!==null&&h!==void 0&&h.defaultProps?Fe(Fe({},d.type.defaultProps),d.props):d.props,p=y.stackId,v=y.hide;if(v)return f;var g=y[n],O=f[g]||{hasStack:!1,stackGroups:{}};if(Ve(p)){var x=O.stackGroups[p]||{numericAxisId:n,cateAxisId:a,items:[]};x.items.push(d),O.hasStack=!0,O.stackGroups[p]=x}else O.stackGroups[jr("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[d]};return Fe(Fe({},f),{},En({},g,O))},l),c={};return Object.keys(u).reduce(function(f,d){var h=u[d];if(h.hasStack){var y={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(p,v){var g=h.stackGroups[v];return Fe(Fe({},p),{},En({},v,{numericAxisId:n,cateAxisId:a,items:g.items,stackedData:qD(t,g.items,i)}))},y)}return Fe(Fe({},f),{},En({},d,h))},c)},VD=function(t,r){var n=r.realScaleType,a=r.type,i=r.tickCount,o=r.originalDomain,s=r.allowDecimals,l=n||r.scale;if(l!=="auto"&&l!=="linear")return null;if(i&&a==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var c=aD(u,i,s);return t.domain([Eo(c),yr(c)]),{niceTicks:c}}if(i&&a==="number"){var f=t.domain(),d=iD(f,i,s);return{niceTicks:d}}return null};function jn(e){var t=e.axis,r=e.ticks,n=e.bandSize,a=e.entry,i=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ue(a[t.dataKey])){var s=ki(r,"value",a[t.dataKey]);if(s)return s.coordinate+n/2}return r[i]?r[i].coordinate+n/2:null}var l=Ye(a,ue(o)?t.dataKey:o);return ue(l)?null:t.scale(l)}var Xv=function(t){var r=t.axis,n=t.ticks,a=t.offset,i=t.bandSize,o=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+a:null;var l=Ye(o,r.dataKey,r.domain[s]);return ue(l)?null:r.scale(l)-i/2+a},HD=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var a=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return a<=0&&i>=0?0:i<0?i:a}return n[0]},YD=function(t,r){var n,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Fe(Fe({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(Ve(i)){var o=r[i];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},XD=function(t){return t.reduce(function(r,n){return[Eo(n.concat([r[0]]).filter(X)),yr(n.concat([r[1]]).filter(X))]},[1/0,-1/0])},Jv=function(t,r,n){return Object.keys(t).reduce(function(a,i){var o=t[i],s=o.stackedData,l=s.reduce(function(u,c){var f=XD(c.slice(r,n+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],a[0]),Math.max(l[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},Zv=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Qv=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Uu=function(t,r,n){if(de(t))return t(r,n);if(!Array.isArray(t))return r;var a=[];if(X(t[0]))a[0]=n?t[0]:Math.min(t[0],r[0]);else if(Zv.test(t[0])){var i=+Zv.exec(t[0])[1];a[0]=r[0]-i}else de(t[0])?a[0]=t[0](r[0]):a[0]=r[0];if(X(t[1]))a[1]=n?t[1]:Math.max(t[1],r[1]);else if(Qv.test(t[1])){var o=+Qv.exec(t[1])[1];a[1]=r[1]+o}else de(t[1])?a[1]=t[1](r[1]):a[1]=r[1];return a},Do=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!n||a>0)return a}if(t&&r&&r.length>=2){for(var i=Dl(r,function(f){return f.coordinate}),o=1/0,s=1,l=i.length;s<l;s++){var u=i[s],c=i[s-1];o=Math.min((u.coordinate||0)-(c.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},ey=function(t,r,n){return!t||!t.length||Rr(t,xt(n,"type.defaultProps.domain"))?r:t},ty=function(t,r){var n=t.type.defaultProps?Fe(Fe({},t.type.defaultProps),t.props):t.props,a=n.dataKey,i=n.name,o=n.unit,s=n.formatter,l=n.tooltipType,u=n.chartType,c=n.hide;return Fe(Fe({},fe(t,!1)),{},{dataKey:a,unit:o,formatter:s,name:i||a,color:Fu(t),value:Ye(r,a),type:l,payload:r,chartType:u,hide:c})};function Ba(e){"@babel/helpers - typeof";return Ba=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},Ba(e)}function ry(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ny(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ry(Object(r),!0).forEach(function(n){JD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ry(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JD(e,t,r){return t=ZD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZD(e){var t=QD(e,"string");return Ba(t)=="symbol"?t:t+""}function QD(e,t){if(Ba(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ba(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Io=Math.PI/180,eI=function(t){return t*180/Math.PI},tt=function(t,r,n,a){return{x:t+Math.cos(-Io*a)*n,y:r+Math.sin(-Io*a)*n}},tI=function(t,r){var n=t.x,a=t.y,i=r.x,o=r.y;return Math.sqrt(Math.pow(n-i,2)+Math.pow(a-o,2))},rI=function(t,r){var n=t.x,a=t.y,i=r.cx,o=r.cy,s=tI({x:n,y:a},{x:i,y:o});if(s<=0)return{radius:s};var l=(n-i)/s,u=Math.acos(l);return a>o&&(u=2*Math.PI-u),{radius:s,angle:eI(u),angleInRadian:u}},nI=function(t){var r=t.startAngle,n=t.endAngle,a=Math.floor(r/360),i=Math.floor(n/360),o=Math.min(a,i);return{startAngle:r-o*360,endAngle:n-o*360}},aI=function(t,r){var n=r.startAngle,a=r.endAngle,i=Math.floor(n/360),o=Math.floor(a/360),s=Math.min(i,o);return t+s*360},ay=function(t,r){var n=t.x,a=t.y,i=rI({x:n,y:a},r),o=i.radius,s=i.angle,l=r.innerRadius,u=r.outerRadius;if(o<l||o>u)return!1;if(o===0)return!0;var c=nI(r),f=c.startAngle,d=c.endAngle,h=s,y;if(f<=d){for(;h>d;)h-=360;for(;h<f;)h+=360;y=h>=f&&h<=d}else{for(;h>f;)h-=360;for(;h<d;)h+=360;y=h>=d&&h<=f}return y?ny(ny({},r),{},{radius:o,angle:aI(h,r)}):null};function Fa(e){"@babel/helpers - typeof";return Fa=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},Fa(e)}var iI=["offset"];function oI(e){return cI(e)||uI(e)||lI(e)||sI()}function sI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
63
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lI(e,t){if(e){if(typeof e=="string")return zu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zu(e,t)}}function uI(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cI(e){if(Array.isArray(e))return zu(e)}function zu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function fI(e,t){if(e==null)return{};var r=dI(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function dI(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 iy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Xe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iy(Object(r),!0).forEach(function(n){hI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hI(e,t,r){return t=pI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pI(e){var t=vI(e,"string");return Fa(t)=="symbol"?t:t+""}function vI(e,t){if(Fa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Fa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wa(){return Wa=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},Wa.apply(this,arguments)}var yI=function(t){var r=t.value,n=t.formatter,a=ue(t.children)?r:t.children;return de(n)?n(a):a},mI=function(t,r){var n=$t(r-t),a=Math.min(Math.abs(r-t),360);return n*a},gI=function(t,r,n){var a=t.position,i=t.viewBox,o=t.offset,s=t.className,l=i,u=l.cx,c=l.cy,f=l.innerRadius,d=l.outerRadius,h=l.startAngle,y=l.endAngle,p=l.clockWise,v=(f+d)/2,g=mI(h,y),O=g>=0?1:-1,x,A;a==="insideStart"?(x=h+O*o,A=p):a==="insideEnd"?(x=y-O*o,A=!p):a==="end"&&(x=y+O*o,A=p),A=g<=0?A:!A;var m=tt(u,c,v,x),w=tt(u,c,v,x+(A?1:-1)*359),T="M".concat(m.x,",").concat(m.y,`
|
|
64
|
+
A`).concat(v,",").concat(v,",0,1,").concat(A?0:1,`,
|
|
65
|
+
`).concat(w.x,",").concat(w.y),_=ue(t.id)?jr("recharts-radial-line-"):t.id;return S.createElement("text",Wa({},n,{dominantBaseline:"central",className:pe("recharts-radial-bar-label",s)}),S.createElement("defs",null,S.createElement("path",{id:_,d:T})),S.createElement("textPath",{xlinkHref:"#".concat(_)},r))},bI=function(t){var r=t.viewBox,n=t.offset,a=t.position,i=r,o=i.cx,s=i.cy,l=i.innerRadius,u=i.outerRadius,c=i.startAngle,f=i.endAngle,d=(c+f)/2;if(a==="outside"){var h=tt(o,s,u+n,d),y=h.x,p=h.y;return{x:y,y:p,textAnchor:y>=o?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var v=(l+u)/2,g=tt(o,s,v,d),O=g.x,x=g.y;return{x:O,y:x,textAnchor:"middle",verticalAnchor:"middle"}},xI=function(t){var r=t.viewBox,n=t.parentViewBox,a=t.offset,i=t.position,o=r,s=o.x,l=o.y,u=o.width,c=o.height,f=c>=0?1:-1,d=f*a,h=f>0?"end":"start",y=f>0?"start":"end",p=u>=0?1:-1,v=p*a,g=p>0?"end":"start",O=p>0?"start":"end";if(i==="top"){var x={x:s+u/2,y:l-f*a,textAnchor:"middle",verticalAnchor:h};return Xe(Xe({},x),n?{height:Math.max(l-n.y,0),width:u}:{})}if(i==="bottom"){var A={x:s+u/2,y:l+c+d,textAnchor:"middle",verticalAnchor:y};return Xe(Xe({},A),n?{height:Math.max(n.y+n.height-(l+c),0),width:u}:{})}if(i==="left"){var m={x:s-v,y:l+c/2,textAnchor:g,verticalAnchor:"middle"};return Xe(Xe({},m),n?{width:Math.max(m.x-n.x,0),height:c}:{})}if(i==="right"){var w={x:s+u+v,y:l+c/2,textAnchor:O,verticalAnchor:"middle"};return Xe(Xe({},w),n?{width:Math.max(n.x+n.width-w.x,0),height:c}:{})}var T=n?{width:u,height:c}:{};return i==="insideLeft"?Xe({x:s+v,y:l+c/2,textAnchor:O,verticalAnchor:"middle"},T):i==="insideRight"?Xe({x:s+u-v,y:l+c/2,textAnchor:g,verticalAnchor:"middle"},T):i==="insideTop"?Xe({x:s+u/2,y:l+d,textAnchor:"middle",verticalAnchor:y},T):i==="insideBottom"?Xe({x:s+u/2,y:l+c-d,textAnchor:"middle",verticalAnchor:h},T):i==="insideTopLeft"?Xe({x:s+v,y:l+d,textAnchor:O,verticalAnchor:y},T):i==="insideTopRight"?Xe({x:s+u-v,y:l+d,textAnchor:g,verticalAnchor:y},T):i==="insideBottomLeft"?Xe({x:s+v,y:l+c-d,textAnchor:O,verticalAnchor:h},T):i==="insideBottomRight"?Xe({x:s+u-v,y:l+c-d,textAnchor:g,verticalAnchor:h},T):en(i)&&(X(i.x)||Er(i.x))&&(X(i.y)||Er(i.y))?Xe({x:s+$r(i.x,u),y:l+$r(i.y,c),textAnchor:"end",verticalAnchor:"end"},T):Xe({x:s+u/2,y:l+c/2,textAnchor:"middle",verticalAnchor:"middle"},T)},wI=function(t){return"cx"in t&&X(t.cx)};function nt(e){var t=e.offset,r=t===void 0?5:t,n=fI(e,iI),a=Xe({offset:r},n),i=a.viewBox,o=a.position,s=a.value,l=a.children,u=a.content,c=a.className,f=c===void 0?"":c,d=a.textBreakAll;if(!i||ue(s)&&ue(l)&&!S.isValidElement(u)&&!de(u))return null;if(S.isValidElement(u))return S.cloneElement(u,a);var h;if(de(u)){if(h=S.createElement(u,a),S.isValidElement(h))return h}else h=yI(a);var y=wI(i),p=fe(a,!0);if(y&&(o==="insideStart"||o==="insideEnd"||o==="end"))return gI(a,h,p);var v=y?bI(a):xI(a);return S.createElement(so,Wa({className:pe("recharts-label",f)},p,v,{breakAll:d}),h)}nt.displayName="Label";var oy=function(t){var r=t.cx,n=t.cy,a=t.angle,i=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,c=t.outerRadius,f=t.x,d=t.y,h=t.top,y=t.left,p=t.width,v=t.height,g=t.clockWise,O=t.labelViewBox;if(O)return O;if(X(p)&&X(v)){if(X(f)&&X(d))return{x:f,y:d,width:p,height:v};if(X(h)&&X(y))return{x:h,y,width:p,height:v}}return X(f)&&X(d)?{x:f,y:d,width:0,height:0}:X(r)&&X(n)?{cx:r,cy:n,startAngle:i||a||0,endAngle:o||a||0,innerRadius:u||0,outerRadius:c||l||s||0,clockWise:g}:t.viewBox?t.viewBox:{}},OI=function(t,r){return t?t===!0?S.createElement(nt,{key:"label-implicit",viewBox:r}):Ve(t)?S.createElement(nt,{key:"label-implicit",viewBox:r,value:t}):S.isValidElement(t)?t.type===nt?S.cloneElement(t,{key:"label-implicit",viewBox:r}):S.createElement(nt,{key:"label-implicit",content:t,viewBox:r}):de(t)?S.createElement(nt,{key:"label-implicit",content:t,viewBox:r}):en(t)?S.createElement(nt,Wa({viewBox:r},t,{key:"label-implicit"})):null:null},SI=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 a=t.children,i=oy(t),o=ut(a,nt).map(function(l,u){return S.cloneElement(l,{viewBox:r||i,key:"label-".concat(u)})});if(!n)return o;var s=OI(t.label,r||i);return[s].concat(oI(o))};nt.parseViewBox=oy,nt.renderCallByParent=SI;function AI(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var TI=AI;const PI=ke(TI);function Ua(e){"@babel/helpers - typeof";return Ua=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},Ua(e)}var _I=["valueAccessor"],EI=["data","dataKey","clockWise","id","textBreakAll"];function jI(e){return kI(e)||MI(e)||CI(e)||$I()}function $I(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
66
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CI(e,t){if(e){if(typeof e=="string")return Gu(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 Gu(e,t)}}function MI(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kI(e){if(Array.isArray(e))return Gu(e)}function Gu(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 Lo(){return Lo=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},Lo.apply(this,arguments)}function sy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ly(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){NI(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 NI(e,t,r){return t=DI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DI(e){var t=II(e,"string");return Ua(t)=="symbol"?t:t+""}function II(e,t){if(Ua(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ua(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uy(e,t){if(e==null)return{};var r=LI(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function LI(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 RI=function(t){return Array.isArray(t.value)?PI(t.value):t.value};function qt(e){var t=e.valueAccessor,r=t===void 0?RI:t,n=uy(e,_I),a=n.data,i=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,u=uy(n,EI);return!a||!a.length?null:S.createElement(be,{className:"recharts-label-list"},a.map(function(c,f){var d=ue(i)?r(c,f):Ye(c&&c.payload,i),h=ue(s)?{}:{id:"".concat(s,"-").concat(f)};return S.createElement(nt,Lo({},fe(c,!0),u,h,{parentViewBox:c.parentViewBox,value:d,textBreakAll:l,viewBox:nt.parseViewBox(ue(o)?c:ly(ly({},c),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}qt.displayName="LabelList";function BI(e,t){return e?e===!0?S.createElement(qt,{key:"labelList-implicit",data:t}):S.isValidElement(e)||de(e)?S.createElement(qt,{key:"labelList-implicit",data:t,content:e}):en(e)?S.createElement(qt,Lo({data:t},e,{key:"labelList-implicit"})):null:null}function FI(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,a=ut(n,qt).map(function(o,s){return S.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return a;var i=BI(e.label,t);return[i].concat(jI(a))}qt.renderCallByParent=FI;function za(e){"@babel/helpers - typeof";return za=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},za(e)}function qu(){return qu=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},qu.apply(this,arguments)}function cy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function fy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cy(Object(r),!0).forEach(function(n){WI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function WI(e,t,r){return t=UI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UI(e){var t=zI(e,"string");return za(t)=="symbol"?t:t+""}function zI(e,t){if(za(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(za(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var GI=function(t,r){var n=$t(r-t),a=Math.min(Math.abs(r-t),359.999);return n*a},Ro=function(t){var r=t.cx,n=t.cy,a=t.radius,i=t.angle,o=t.sign,s=t.isExternal,l=t.cornerRadius,u=t.cornerIsExternal,c=l*(s?1:-1)+a,f=Math.asin(l/c)/Io,d=u?i:i+o*f,h=tt(r,n,c,d),y=tt(r,n,a,d),p=u?i-o*f:i,v=tt(r,n,c*Math.cos(f*Io),p);return{center:h,circleTangency:y,lineTangency:v,theta:f}},dy=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.startAngle,s=t.endAngle,l=GI(o,s),u=o+l,c=tt(r,n,i,o),f=tt(r,n,i,u),d="M ".concat(c.x,",").concat(c.y,`
|
|
67
|
+
A `).concat(i,",").concat(i,`,0,
|
|
68
|
+
`).concat(+(Math.abs(l)>180),",").concat(+(o>u),`,
|
|
69
|
+
`).concat(f.x,",").concat(f.y,`
|
|
70
|
+
`);if(a>0){var h=tt(r,n,a,o),y=tt(r,n,a,u);d+="L ".concat(y.x,",").concat(y.y,`
|
|
71
|
+
A `).concat(a,",").concat(a,`,0,
|
|
72
|
+
`).concat(+(Math.abs(l)>180),",").concat(+(o<=u),`,
|
|
73
|
+
`).concat(h.x,",").concat(h.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},qI=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,c=t.endAngle,f=$t(c-u),d=Ro({cx:r,cy:n,radius:i,angle:u,sign:f,cornerRadius:o,cornerIsExternal:l}),h=d.circleTangency,y=d.lineTangency,p=d.theta,v=Ro({cx:r,cy:n,radius:i,angle:c,sign:-f,cornerRadius:o,cornerIsExternal:l}),g=v.circleTangency,O=v.lineTangency,x=v.theta,A=l?Math.abs(u-c):Math.abs(u-c)-p-x;if(A<0)return s?"M ".concat(y.x,",").concat(y.y,`
|
|
74
|
+
a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
|
|
75
|
+
a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
|
|
76
|
+
`):dy({cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:u,endAngle:c});var m="M ".concat(y.x,",").concat(y.y,`
|
|
77
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(h.x,",").concat(h.y,`
|
|
78
|
+
A`).concat(i,",").concat(i,",0,").concat(+(A>180),",").concat(+(f<0),",").concat(g.x,",").concat(g.y,`
|
|
79
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(O.x,",").concat(O.y,`
|
|
80
|
+
`);if(a>0){var w=Ro({cx:r,cy:n,radius:a,angle:u,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),T=w.circleTangency,_=w.lineTangency,$=w.theta,R=Ro({cx:r,cy:n,radius:a,angle:c,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),P=R.circleTangency,j=R.lineTangency,L=R.theta,B=l?Math.abs(u-c):Math.abs(u-c)-$-L;if(B<0&&o===0)return"".concat(m,"L").concat(r,",").concat(n,"Z");m+="L".concat(j.x,",").concat(j.y,`
|
|
81
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(P.x,",").concat(P.y,`
|
|
82
|
+
A`).concat(a,",").concat(a,",0,").concat(+(B>180),",").concat(+(f>0),",").concat(T.x,",").concat(T.y,`
|
|
83
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(_.x,",").concat(_.y,"Z")}else m+="L".concat(r,",").concat(n,"Z");return m},KI={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},hy=function(t){var r=fy(fy({},KI),t),n=r.cx,a=r.cy,i=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,l=r.forceCornerRadius,u=r.cornerIsExternal,c=r.startAngle,f=r.endAngle,d=r.className;if(o<i||c===f)return null;var h=pe("recharts-sector",d),y=o-i,p=$r(s,y,0,!0),v;return p>0&&Math.abs(c-f)<360?v=qI({cx:n,cy:a,innerRadius:i,outerRadius:o,cornerRadius:Math.min(p,y/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:c,endAngle:f}):v=dy({cx:n,cy:a,innerRadius:i,outerRadius:o,startAngle:c,endAngle:f}),S.createElement("path",qu({},fe(r,!0),{className:h,d:v,role:"img"}))};function Ga(e){"@babel/helpers - typeof";return Ga=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},Ga(e)}function Ku(){return Ku=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ku.apply(this,arguments)}function py(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function vy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?py(Object(r),!0).forEach(function(n){VI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):py(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VI(e,t,r){return t=HI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HI(e){var t=YI(e,"string");return Ga(t)=="symbol"?t:t+""}function YI(e,t){if(Ga(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ga(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yy={curveBasisClosed:VO,curveBasisOpen:HO,curveBasis:KO,curveBumpX:MO,curveBumpY:kO,curveLinearClosed:YO,curveLinear:Bi,curveMonotoneX:XO,curveMonotoneY:JO,curveNatural:ZO,curveStep:QO,curveStepAfter:tS,curveStepBefore:eS},Bo=function(t){return t.x===+t.x&&t.y===+t.y},qa=function(t){return t.x},Ka=function(t){return t.y},XI=function(t,r){if(de(t))return t;var n="curve".concat(Di(t));return(n==="curveMonotone"||n==="curveBump")&&r?yy["".concat(n).concat(r==="vertical"?"Y":"X")]:yy[n]||Bi},JI=function(t){var r=t.type,n=r===void 0?"linear":r,a=t.points,i=a===void 0?[]:a,o=t.baseLine,s=t.layout,l=t.connectNulls,u=l===void 0?!1:l,c=XI(n,s),f=u?i.filter(function(p){return Bo(p)}):i,d;if(Array.isArray(o)){var h=u?o.filter(function(p){return Bo(p)}):o,y=f.map(function(p,v){return vy(vy({},p),{},{base:h[v]})});return s==="vertical"?d=Fi().y(Ka).x1(qa).x0(function(p){return p.base.x}):d=Fi().x(qa).y1(Ka).y0(function(p){return p.base.y}),d.defined(Bo).curve(c),d(y)}return s==="vertical"&&X(o)?d=Fi().y(Ka).x1(qa).x0(o):X(o)?d=Fi().x(qa).y1(Ka).y0(o):d=td().x(qa).y(Ka),d.defined(Bo).curve(c),d(f)},zr=function(t){var r=t.className,n=t.points,a=t.path,i=t.pathRef;if((!n||!n.length)&&!a)return null;var o=n&&n.length?JI(t):a;return bt.createElement("path",Ku({},fe(t,!1),Ni(t),{className:pe("recharts-curve",r),d:o,ref:i}))},Vu={exports:{}},Fo={exports:{}},Oe={};/** @license React v16.13.1
|
|
84
|
+
* react-is.production.min.js
|
|
85
|
+
*
|
|
86
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the MIT license found in the
|
|
89
|
+
* LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/var my;function ZI(){if(my)return Oe;my=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function x(m){if(typeof m=="object"&&m!==null){var w=m.$$typeof;switch(w){case t:switch(m=m.type,m){case l:case u:case n:case i:case a:case f:return m;default:switch(m=m&&m.$$typeof,m){case s:case c:case y:case h:case o:return m;default:return w}}case r:return w}}}function A(m){return x(m)===u}return Oe.AsyncMode=l,Oe.ConcurrentMode=u,Oe.ContextConsumer=s,Oe.ContextProvider=o,Oe.Element=t,Oe.ForwardRef=c,Oe.Fragment=n,Oe.Lazy=y,Oe.Memo=h,Oe.Portal=r,Oe.Profiler=i,Oe.StrictMode=a,Oe.Suspense=f,Oe.isAsyncMode=function(m){return A(m)||x(m)===l},Oe.isConcurrentMode=A,Oe.isContextConsumer=function(m){return x(m)===s},Oe.isContextProvider=function(m){return x(m)===o},Oe.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},Oe.isForwardRef=function(m){return x(m)===c},Oe.isFragment=function(m){return x(m)===n},Oe.isLazy=function(m){return x(m)===y},Oe.isMemo=function(m){return x(m)===h},Oe.isPortal=function(m){return x(m)===r},Oe.isProfiler=function(m){return x(m)===i},Oe.isStrictMode=function(m){return x(m)===a},Oe.isSuspense=function(m){return x(m)===f},Oe.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===u||m===i||m===a||m===f||m===d||typeof m=="object"&&m!==null&&(m.$$typeof===y||m.$$typeof===h||m.$$typeof===o||m.$$typeof===s||m.$$typeof===c||m.$$typeof===v||m.$$typeof===g||m.$$typeof===O||m.$$typeof===p)},Oe.typeOf=x,Oe}var Se={};/** @license React v16.13.1
|
|
91
|
+
* react-is.development.js
|
|
92
|
+
*
|
|
93
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
94
|
+
*
|
|
95
|
+
* This source code is licensed under the MIT license found in the
|
|
96
|
+
* LICENSE file in the root directory of this source tree.
|
|
97
|
+
*/var gy;function QI(){return gy||(gy=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function x(D){return typeof D=="string"||typeof D=="function"||D===n||D===u||D===i||D===a||D===f||D===d||typeof D=="object"&&D!==null&&(D.$$typeof===y||D.$$typeof===h||D.$$typeof===o||D.$$typeof===s||D.$$typeof===c||D.$$typeof===v||D.$$typeof===g||D.$$typeof===O||D.$$typeof===p)}function A(D){if(typeof D=="object"&&D!==null){var ie=D.$$typeof;switch(ie){case t:var K=D.type;switch(K){case l:case u:case n:case i:case a:case f:return K;default:var ee=K&&K.$$typeof;switch(ee){case s:case c:case y:case h:case o:return ee;default:return ie}}case r:return ie}}}var m=l,w=u,T=s,_=o,$=t,R=c,P=n,j=y,L=h,B=r,M=i,E=a,F=f,U=!1;function k(D){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),N(D)||A(D)===l}function N(D){return A(D)===u}function I(D){return A(D)===s}function W(D){return A(D)===o}function z(D){return typeof D=="object"&&D!==null&&D.$$typeof===t}function V(D){return A(D)===c}function Z(D){return A(D)===n}function Q(D){return A(D)===y}function ae(D){return A(D)===h}function te(D){return A(D)===r}function q(D){return A(D)===i}function Y(D){return A(D)===a}function J(D){return A(D)===f}Se.AsyncMode=m,Se.ConcurrentMode=w,Se.ContextConsumer=T,Se.ContextProvider=_,Se.Element=$,Se.ForwardRef=R,Se.Fragment=P,Se.Lazy=j,Se.Memo=L,Se.Portal=B,Se.Profiler=M,Se.StrictMode=E,Se.Suspense=F,Se.isAsyncMode=k,Se.isConcurrentMode=N,Se.isContextConsumer=I,Se.isContextProvider=W,Se.isElement=z,Se.isForwardRef=V,Se.isFragment=Z,Se.isLazy=Q,Se.isMemo=ae,Se.isPortal=te,Se.isProfiler=q,Se.isStrictMode=Y,Se.isSuspense=J,Se.isValidElementType=x,Se.typeOf=A}()),Se}var by;function xy(){return by||(by=1,process.env.NODE_ENV==="production"?Fo.exports=ZI():Fo.exports=QI()),Fo.exports}/*
|
|
98
|
+
object-assign
|
|
99
|
+
(c) Sindre Sorhus
|
|
100
|
+
@license MIT
|
|
101
|
+
*/var Hu,wy;function eL(){if(wy)return Hu;wy=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function a(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(o).map(function(c){return o[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Hu=a()?Object.assign:function(i,o){for(var s,l=n(i),u,c=1;c<arguments.length;c++){s=Object(arguments[c]);for(var f in s)t.call(s,f)&&(l[f]=s[f]);if(e){u=e(s);for(var d=0;d<u.length;d++)r.call(s,u[d])&&(l[u[d]]=s[u[d]])}}return l},Hu}var Yu,Oy;function Xu(){if(Oy)return Yu;Oy=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Yu=e,Yu}var Ju,Sy;function Ay(){return Sy||(Sy=1,Ju=Function.call.bind(Object.prototype.hasOwnProperty)),Ju}var Zu,Ty;function tL(){if(Ty)return Zu;Ty=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Xu(),r={},n=Ay();e=function(i){var o="Warning: "+i;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function a(i,o,s,l,u){if(process.env.NODE_ENV!=="production"){for(var c in i)if(n(i,c)){var f;try{if(typeof i[c]!="function"){var d=Error((l||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=i[c](o,c,l,s,null,t)}catch(y){f=y}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in r)){r[f.message]=!0;var h=u?u():"";e("Failed "+s+" type: "+f.message+(h??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Zu=a,Zu}var Qu,Py;function rL(){if(Py)return Qu;Py=1;var e=xy(),t=eL(),r=Xu(),n=Ay(),a=tL(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return Qu=function(s,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(N){var I=N&&(u&&N[u]||N[c]);if(typeof I=="function")return I}var d="<<anonymous>>",h={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:O(),arrayOf:x,element:A(),elementType:m(),instanceOf:w,node:R(),objectOf:_,oneOf:T,oneOfType:$,shape:j,exact:L};function y(N,I){return N===I?N!==0||1/N===1/I:N!==N&&I!==I}function p(N,I){this.message=N,this.data=I&&typeof I=="object"?I:{},this.stack=""}p.prototype=Error.prototype;function v(N){if(process.env.NODE_ENV!=="production")var I={},W=0;function z(Z,Q,ae,te,q,Y,J){if(te=te||d,Y=Y||ae,J!==r){if(l){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}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ie=te+":"+ae;!I[ie]&&W<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+te+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),I[ie]=!0,W++)}}return Q[ae]==null?Z?Q[ae]===null?new p("The "+q+" `"+Y+"` is marked as required "+("in `"+te+"`, but its value is `null`.")):new p("The "+q+" `"+Y+"` is marked as required in "+("`"+te+"`, but its value is `undefined`.")):null:N(Q,ae,te,q,Y)}var V=z.bind(null,!1);return V.isRequired=z.bind(null,!0),V}function g(N){function I(W,z,V,Z,Q,ae){var te=W[z],q=E(te);if(q!==N){var Y=F(te);return new p("Invalid "+Z+" `"+Q+"` of type "+("`"+Y+"` supplied to `"+V+"`, expected ")+("`"+N+"`."),{expectedType:N})}return null}return v(I)}function O(){return v(o)}function x(N){function I(W,z,V,Z,Q){if(typeof N!="function")return new p("Property `"+Q+"` of component `"+V+"` has invalid PropType notation inside arrayOf.");var ae=W[z];if(!Array.isArray(ae)){var te=E(ae);return new p("Invalid "+Z+" `"+Q+"` of type "+("`"+te+"` supplied to `"+V+"`, expected an array."))}for(var q=0;q<ae.length;q++){var Y=N(ae,q,V,Z,Q+"["+q+"]",r);if(Y instanceof Error)return Y}return null}return v(I)}function A(){function N(I,W,z,V,Z){var Q=I[W];if(!s(Q)){var ae=E(Q);return new p("Invalid "+V+" `"+Z+"` of type "+("`"+ae+"` supplied to `"+z+"`, expected a single ReactElement."))}return null}return v(N)}function m(){function N(I,W,z,V,Z){var Q=I[W];if(!e.isValidElementType(Q)){var ae=E(Q);return new p("Invalid "+V+" `"+Z+"` of type "+("`"+ae+"` supplied to `"+z+"`, expected a single ReactElement type."))}return null}return v(N)}function w(N){function I(W,z,V,Z,Q){if(!(W[z]instanceof N)){var ae=N.name||d,te=k(W[z]);return new p("Invalid "+Z+" `"+Q+"` of type "+("`"+te+"` supplied to `"+V+"`, expected ")+("instance of `"+ae+"`."))}return null}return v(I)}function T(N){if(!Array.isArray(N))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),o;function I(W,z,V,Z,Q){for(var ae=W[z],te=0;te<N.length;te++)if(y(ae,N[te]))return null;var q=JSON.stringify(N,function(J,D){var ie=F(D);return ie==="symbol"?String(D):D});return new p("Invalid "+Z+" `"+Q+"` of value `"+String(ae)+"` "+("supplied to `"+V+"`, expected one of "+q+"."))}return v(I)}function _(N){function I(W,z,V,Z,Q){if(typeof N!="function")return new p("Property `"+Q+"` of component `"+V+"` has invalid PropType notation inside objectOf.");var ae=W[z],te=E(ae);if(te!=="object")return new p("Invalid "+Z+" `"+Q+"` of type "+("`"+te+"` supplied to `"+V+"`, expected an object."));for(var q in ae)if(n(ae,q)){var Y=N(ae,q,V,Z,Q+"."+q,r);if(Y instanceof Error)return Y}return null}return v(I)}function $(N){if(!Array.isArray(N))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var I=0;I<N.length;I++){var W=N[I];if(typeof W!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(W)+" at index "+I+"."),o}function z(V,Z,Q,ae,te){for(var q=[],Y=0;Y<N.length;Y++){var J=N[Y],D=J(V,Z,Q,ae,te,r);if(D==null)return null;D.data&&n(D.data,"expectedType")&&q.push(D.data.expectedType)}var ie=q.length>0?", expected one of type ["+q.join(", ")+"]":"";return new p("Invalid "+ae+" `"+te+"` supplied to "+("`"+Q+"`"+ie+"."))}return v(z)}function R(){function N(I,W,z,V,Z){return B(I[W])?null:new p("Invalid "+V+" `"+Z+"` supplied to "+("`"+z+"`, expected a ReactNode."))}return v(N)}function P(N,I,W,z,V){return new p((N||"React class")+": "+I+" type `"+W+"."+z+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+V+"`.")}function j(N){function I(W,z,V,Z,Q){var ae=W[z],te=E(ae);if(te!=="object")return new p("Invalid "+Z+" `"+Q+"` of type `"+te+"` "+("supplied to `"+V+"`, expected `object`."));for(var q in N){var Y=N[q];if(typeof Y!="function")return P(V,Z,Q,q,F(Y));var J=Y(ae,q,V,Z,Q+"."+q,r);if(J)return J}return null}return v(I)}function L(N){function I(W,z,V,Z,Q){var ae=W[z],te=E(ae);if(te!=="object")return new p("Invalid "+Z+" `"+Q+"` of type `"+te+"` "+("supplied to `"+V+"`, expected `object`."));var q=t({},W[z],N);for(var Y in q){var J=N[Y];if(n(N,Y)&&typeof J!="function")return P(V,Z,Q,Y,F(J));if(!J)return new p("Invalid "+Z+" `"+Q+"` key `"+Y+"` supplied to `"+V+"`.\nBad object: "+JSON.stringify(W[z],null," ")+`
|
|
102
|
+
Valid keys: `+JSON.stringify(Object.keys(N),null," "));var D=J(ae,Y,V,Z,Q+"."+Y,r);if(D)return D}return null}return v(I)}function B(N){switch(typeof N){case"number":case"string":case"undefined":return!0;case"boolean":return!N;case"object":if(Array.isArray(N))return N.every(B);if(N===null||s(N))return!0;var I=f(N);if(I){var W=I.call(N),z;if(I!==N.entries){for(;!(z=W.next()).done;)if(!B(z.value))return!1}else for(;!(z=W.next()).done;){var V=z.value;if(V&&!B(V[1]))return!1}}else return!1;return!0;default:return!1}}function M(N,I){return N==="symbol"?!0:I?I["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&I instanceof Symbol:!1}function E(N){var I=typeof N;return Array.isArray(N)?"array":N instanceof RegExp?"object":M(I,N)?"symbol":I}function F(N){if(typeof N>"u"||N===null)return""+N;var I=E(N);if(I==="object"){if(N instanceof Date)return"date";if(N instanceof RegExp)return"regexp"}return I}function U(N){var I=F(N);switch(I){case"array":case"object":return"an "+I;case"boolean":case"date":case"regexp":return"a "+I;default:return I}}function k(N){return!N.constructor||!N.constructor.name?d:N.constructor.name}return h.checkPropTypes=a,h.resetWarningCache=a.resetWarningCache,h.PropTypes=h,h},Qu}var ec,_y;function nL(){if(_y)return ec;_y=1;var e=Xu();function t(){}function r(){}return r.resetWarningCache=t,ec=function(){function n(o,s,l,u,c,f){if(f!==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 a(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i},ec}if(process.env.NODE_ENV!=="production"){var aL=xy(),iL=!0;Vu.exports=rL()(aL.isElement,iL)}else Vu.exports=nL()();var oL=Vu.exports;const Ae=ke(oL);var sL=Object.getOwnPropertyNames,lL=Object.getOwnPropertySymbols,uL=Object.prototype.hasOwnProperty;function Ey(e,t){return function(n,a,i){return e(n,a,i)&&t(n,a,i)}}function Wo(e){return function(r,n,a){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,a);var i=a.cache,o=i.get(r),s=i.get(n);if(o&&s)return o===n&&s===r;i.set(r,n),i.set(n,r);var l=e(r,n,a);return i.delete(r),i.delete(n),l}}function jy(e){return sL(e).concat(lL(e))}var cL=Object.hasOwn||function(e,t){return uL.call(e,t)};function Gr(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var fL="__v",dL="__o",hL="_owner",$y=Object.getOwnPropertyDescriptor,Cy=Object.keys;function pL(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 vL(e,t){return Gr(e.getTime(),t.getTime())}function yL(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function mL(e,t){return e===t}function My(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var a=new Array(n),i=e.entries(),o,s,l=0;(o=i.next())&&!o.done;){for(var u=t.entries(),c=!1,f=0;(s=u.next())&&!s.done;){if(a[f]){f++;continue}var d=o.value,h=s.value;if(r.equals(d[0],h[0],l,f,e,t,r)&&r.equals(d[1],h[1],d[0],h[0],e,t,r)){c=a[f]=!0;break}f++}if(!c)return!1;l++}return!0}var gL=Gr;function bL(e,t,r){var n=Cy(e),a=n.length;if(Cy(t).length!==a)return!1;for(;a-- >0;)if(!Ny(e,t,r,n[a]))return!1;return!0}function Va(e,t,r){var n=jy(e),a=n.length;if(jy(t).length!==a)return!1;for(var i,o,s;a-- >0;)if(i=n[a],!Ny(e,t,r,i)||(o=$y(e,i),s=$y(t,i),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function xL(e,t){return Gr(e.valueOf(),t.valueOf())}function wL(e,t){return e.source===t.source&&e.flags===t.flags}function ky(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var a=new Array(n),i=e.values(),o,s;(o=i.next())&&!o.done;){for(var l=t.values(),u=!1,c=0;(s=l.next())&&!s.done;){if(!a[c]&&r.equals(o.value,s.value,o.value,s.value,e,t,r)){u=a[c]=!0;break}c++}if(!u)return!1}return!0}function OL(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 SL(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 Ny(e,t,r,n){return(n===hL||n===dL||n===fL)&&(e.$$typeof||t.$$typeof)?!0:cL(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var AL="[object Arguments]",TL="[object Boolean]",PL="[object Date]",_L="[object Error]",EL="[object Map]",jL="[object Number]",$L="[object Object]",CL="[object RegExp]",ML="[object Set]",kL="[object String]",NL="[object URL]",DL=Array.isArray,Dy=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,Iy=Object.assign,IL=Object.prototype.toString.call.bind(Object.prototype.toString);function LL(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,a=e.areFunctionsEqual,i=e.areMapsEqual,o=e.areNumbersEqual,s=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,c=e.areSetsEqual,f=e.areTypedArraysEqual,d=e.areUrlsEqual;return function(y,p,v){if(y===p)return!0;if(y==null||p==null)return!1;var g=typeof y;if(g!==typeof p)return!1;if(g!=="object")return g==="number"?o(y,p,v):g==="function"?a(y,p,v):!1;var O=y.constructor;if(O!==p.constructor)return!1;if(O===Object)return s(y,p,v);if(DL(y))return t(y,p,v);if(Dy!=null&&Dy(y))return f(y,p,v);if(O===Date)return r(y,p,v);if(O===RegExp)return u(y,p,v);if(O===Map)return i(y,p,v);if(O===Set)return c(y,p,v);var x=IL(y);return x===PL?r(y,p,v):x===CL?u(y,p,v):x===EL?i(y,p,v):x===ML?c(y,p,v):x===$L?typeof y.then!="function"&&typeof p.then!="function"&&s(y,p,v):x===NL?d(y,p,v):x===_L?n(y,p,v):x===AL?s(y,p,v):x===TL||x===jL||x===kL?l(y,p,v):!1}}function RL(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,a={areArraysEqual:n?Va:pL,areDatesEqual:vL,areErrorsEqual:yL,areFunctionsEqual:mL,areMapsEqual:n?Ey(My,Va):My,areNumbersEqual:gL,areObjectsEqual:n?Va:bL,arePrimitiveWrappersEqual:xL,areRegExpsEqual:wL,areSetsEqual:n?Ey(ky,Va):ky,areTypedArraysEqual:n?Va:OL,areUrlsEqual:SL};if(r&&(a=Iy({},a,r(a))),t){var i=Wo(a.areArraysEqual),o=Wo(a.areMapsEqual),s=Wo(a.areObjectsEqual),l=Wo(a.areSetsEqual);a=Iy({},a,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:l})}return a}function BL(e){return function(t,r,n,a,i,o,s){return e(t,r,s)}}function FL(e){var t=e.circular,r=e.comparator,n=e.createState,a=e.equals,i=e.strict;if(n)return function(l,u){var c=n(),f=c.cache,d=f===void 0?t?new WeakMap:void 0:f,h=c.meta;return r(l,u,{cache:d,equals:a,meta:h,strict:i})};if(t)return function(l,u){return r(l,u,{cache:new WeakMap,equals:a,meta:void 0,strict:i})};var o={cache:void 0,equals:a,meta:void 0,strict:i};return function(l,u){return r(l,u,o)}}var WL=gr();gr({strict:!0}),gr({circular:!0}),gr({circular:!0,strict:!0}),gr({createInternalComparator:function(){return Gr}}),gr({strict:!0,createInternalComparator:function(){return Gr}}),gr({circular:!0,createInternalComparator:function(){return Gr}}),gr({circular:!0,createInternalComparator:function(){return Gr},strict:!0});function gr(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,a=e.createState,i=e.strict,o=i===void 0?!1:i,s=RL(e),l=LL(s),u=n?n(l):BL(l);return FL({circular:r,comparator:l,createState:a,equals:u,strict:o})}function UL(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function Ly(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function a(i){r<0&&(r=i),i-r>t?(e(i),r=-1):UL(a)};requestAnimationFrame(n)}function tc(e){"@babel/helpers - typeof";return tc=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},tc(e)}function zL(e){return VL(e)||KL(e)||qL(e)||GL()}function GL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
103
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qL(e,t){if(e){if(typeof e=="string")return Ry(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 Ry(e,t)}}function Ry(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 KL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function VL(e){if(Array.isArray(e))return e}function HL(){var e={},t=function(){return null},r=!1,n=function a(i){if(!r){if(Array.isArray(i)){if(!i.length)return;var o=i,s=zL(o),l=s[0],u=s.slice(1);if(typeof l=="number"){Ly(a.bind(null,u),l);return}a(l),Ly(a.bind(null,u));return}tc(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){r=!0},start:function(i){r=!1,n(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function Ha(e){"@babel/helpers - typeof";return Ha=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},Ha(e)}function By(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Fy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?By(Object(r),!0).forEach(function(n){Wy(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):By(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wy(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=XL(e,"string");return Ha(t)==="symbol"?t:String(t)}function XL(e,t){if(Ha(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ha(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var JL=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,a){return n.filter(function(i){return a.includes(i)})})},ZL=function(t){return t},QL=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},Ya=function(t,r){return Object.keys(r).reduce(function(n,a){return Fy(Fy({},n),{},Wy({},a,t(a,r[a])))},{})},Uy=function(t,r,n){return t.map(function(a){return"".concat(QL(a)," ").concat(r,"ms ").concat(n)}).join(",")},eR=process.env.NODE_ENV!=="production",Uo=function(t,r,n,a,i,o,s,l){if(eR&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,a,i,o,s,l],c=0;console.warn(r.replace(/%s/g,function(){return u[c++]}))}};function tR(e,t){return aR(e)||nR(e,t)||zy(e,t)||rR()}function rR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
104
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nR(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function aR(e){if(Array.isArray(e))return e}function iR(e){return lR(e)||sR(e)||zy(e)||oR()}function oR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
105
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zy(e,t){if(e){if(typeof e=="string")return rc(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 rc(e,t)}}function sR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lR(e){if(Array.isArray(e))return rc(e)}function rc(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 zo=1e-4,Gy=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},qy=function(t,r){return t.map(function(n,a){return n*Math.pow(r,a)}).reduce(function(n,a){return n+a})},Ky=function(t,r){return function(n){var a=Gy(t,r);return qy(a,n)}},uR=function(t,r){return function(n){var a=Gy(t,r),i=[].concat(iR(a.map(function(o,s){return o*s}).slice(1)),[0]);return qy(i,n)}},Vy=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0],i=r[1],o=r[2],s=r[3];if(r.length===1)switch(r[0]){case"linear":a=0,i=0,o=1,s=1;break;case"ease":a=.25,i=.1,o=.25,s=1;break;case"ease-in":a=.42,i=0,o=1,s=1;break;case"ease-out":a=.42,i=0,o=.58,s=1;break;case"ease-in-out":a=0,i=0,o=.58,s=1;break;default:{var l=r[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var u=l[1].split(")")[0].split(",").map(function(v){return parseFloat(v)}),c=tR(u,4);a=c[0],i=c[1],o=c[2],s=c[3]}else Uo(!1,"[configBezier]: arguments should be one of oneOf 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', instead received %s",r)}}Uo([a,o,i,s].every(function(v){return typeof v=="number"&&v>=0&&v<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",r);var f=Ky(a,o),d=Ky(i,s),h=uR(a,o),y=function(g){return g>1?1:g<0?0:g},p=function(g){for(var O=g>1?1:g,x=O,A=0;A<8;++A){var m=f(x)-O,w=h(x);if(Math.abs(m-O)<zo||w<zo)return d(x);x=y(x-m/w)}return d(x)};return p.isStepper=!1,p},cR=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,a=t.damping,i=a===void 0?8:a,o=t.dt,s=o===void 0?17:o,l=function(c,f,d){var h=-(c-f)*n,y=d*i,p=d+(h-y)*s/1e3,v=d*s/1e3+c;return Math.abs(v-f)<zo&&Math.abs(p)<zo?[f,0]:[v,p]};return l.isStepper=!0,l.dt=s,l},fR=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Vy(a);case"spring":return cR();default:if(a.split("(")[0]==="cubic-bezier")return Vy(a);Uo(!1,"[configEasing]: first argument should be one of 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', 'linear' and 'spring', instead received %s",r)}return typeof a=="function"?a:(Uo(!1,"[configEasing]: first argument type should be function or string, instead received %s",r),null)};function Xa(e){"@babel/helpers - typeof";return Xa=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},Xa(e)}function Hy(e){return pR(e)||hR(e)||Xy(e)||dR()}function dR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
106
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pR(e){if(Array.isArray(e))return ac(e)}function Yy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function rt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yy(Object(r),!0).forEach(function(n){nc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nc(e,t,r){return t=vR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vR(e){var t=yR(e,"string");return Xa(t)==="symbol"?t:String(t)}function yR(e,t){if(Xa(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xa(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mR(e,t){return xR(e)||bR(e,t)||Xy(e,t)||gR()}function gR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
107
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xy(e,t){if(e){if(typeof e=="string")return ac(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 ac(e,t)}}function ac(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 bR(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function xR(e){if(Array.isArray(e))return e}var Go=function(t,r,n){return t+(r-t)*n},ic=function(t){var r=t.from,n=t.to;return r!==n},wR=function e(t,r,n){var a=Ya(function(i,o){if(ic(o)){var s=t(o.from,o.to,o.velocity),l=mR(s,2),u=l[0],c=l[1];return rt(rt({},o),{},{from:u,velocity:c})}return o},r);return n<1?Ya(function(i,o){return ic(o)?rt(rt({},o),{},{velocity:Go(o.velocity,a[i].velocity,n),from:Go(o.from,a[i].from,n)}):o},r):e(t,a,n-1)};const OR=function(e,t,r,n,a){var i=JL(e,t),o=i.reduce(function(v,g){return rt(rt({},v),{},nc({},g,[e[g],t[g]]))},{}),s=i.reduce(function(v,g){return rt(rt({},v),{},nc({},g,{from:e[g],velocity:0,to:t[g]}))},{}),l=-1,u,c,f=function(){return null},d=function(){return Ya(function(g,O){return O.from},s)},h=function(){return!Object.values(s).filter(ic).length},y=function(g){u||(u=g);var O=g-u,x=O/r.dt;s=wR(r,s,x),a(rt(rt(rt({},e),t),d())),u=g,h()||(l=requestAnimationFrame(f))},p=function(g){c||(c=g);var O=(g-c)/n,x=Ya(function(m,w){return Go.apply(void 0,Hy(w).concat([r(O)]))},o);if(a(rt(rt(rt({},e),t),x)),O<1)l=requestAnimationFrame(f);else{var A=Ya(function(m,w){return Go.apply(void 0,Hy(w).concat([r(1)]))},o);a(rt(rt(rt({},e),t),A))}};return f=r.isStepper?y:p,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(l)}}};function $n(e){"@babel/helpers - typeof";return $n=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},$n(e)}var SR=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function AR(e,t){if(e==null)return{};var r=TR(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function TR(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function oc(e){return jR(e)||ER(e)||_R(e)||PR()}function PR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
108
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _R(e,t){if(e){if(typeof e=="string")return sc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sc(e,t)}}function ER(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jR(e){if(Array.isArray(e))return sc(e)}function sc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Jy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function kt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jy(Object(r),!0).forEach(function(n){Ja(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ja(e,t,r){return t=Zy(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $R(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CR(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,Zy(n.key),n)}}function MR(e,t,r){return t&&CR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zy(e){var t=kR(e,"string");return $n(t)==="symbol"?t:String(t)}function kR(e,t){if($n(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if($n(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NR(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&&lc(e,t)}function lc(e,t){return lc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},lc(e,t)}function DR(e){var t=IR();return function(){var n=qo(e),a;if(t){var i=qo(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return uc(this,a)}}function uc(e,t){if(t&&($n(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cc(e)}function cc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function IR(){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 qo(e){return qo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qo(e)}var Nt=function(e){NR(r,e);var t=DR(r);function r(n,a){var i;$R(this,r),i=t.call(this,n,a);var o=i.props,s=o.isActive,l=o.attributeName,u=o.from,c=o.to,f=o.steps,d=o.children,h=o.duration;if(i.handleStyleChange=i.handleStyleChange.bind(cc(i)),i.changeStyle=i.changeStyle.bind(cc(i)),!s||h<=0)return i.state={style:{}},typeof d=="function"&&(i.state={style:c}),uc(i);if(f&&f.length)i.state={style:f[0].style};else if(u){if(typeof d=="function")return i.state={style:u},uc(i);i.state={style:l?Ja({},l,u):u}}else i.state={style:{}};return i}return MR(r,[{key:"componentDidMount",value:function(){var a=this.props,i=a.isActive,o=a.canBegin;this.mounted=!0,!(!i||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var i=this.props,o=i.isActive,s=i.canBegin,l=i.attributeName,u=i.shouldReAnimate,c=i.to,f=i.from,d=this.state.style;if(s){if(!o){var h={style:l?Ja({},l,c):c};this.state&&d&&(l&&d[l]!==c||!l&&d!==c)&&this.setState(h);return}if(!(WL(a.to,c)&&a.canBegin&&a.isActive)){var y=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var p=y||u?f:a.to;if(this.state&&d){var v={style:l?Ja({},l,p):p};(l&&d[l]!==p||!l&&d!==p)&&this.setState(v)}this.runAnimation(kt(kt({},this.props),{},{from:p,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,o=a.from,s=a.to,l=a.duration,u=a.easing,c=a.begin,f=a.onAnimationEnd,d=a.onAnimationStart,h=OR(o,s,fR(u),l,this.changeStyle),y=function(){i.stopJSAnimation=h()};this.manager.start([d,c,y,l,f])}},{key:"runStepAnimation",value:function(a){var i=this,o=a.steps,s=a.begin,l=a.onAnimationStart,u=o[0],c=u.style,f=u.duration,d=f===void 0?0:f,h=function(p,v,g){if(g===0)return p;var O=v.duration,x=v.easing,A=x===void 0?"ease":x,m=v.style,w=v.properties,T=v.onAnimationEnd,_=g>0?o[g-1]:v,$=w||Object.keys(m);if(typeof A=="function"||A==="spring")return[].concat(oc(p),[i.runJSAnimation.bind(i,{from:_.style,to:m,duration:O,easing:A}),O]);var R=Uy($,O,A),P=kt(kt(kt({},_.style),m),{},{transition:R});return[].concat(oc(p),[P,O,T]).filter(ZL)};return this.manager.start([l].concat(oc(o.reduce(h,[c,Math.max(d,s)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=HL());var i=a.begin,o=a.duration,s=a.attributeName,l=a.to,u=a.easing,c=a.onAnimationStart,f=a.onAnimationEnd,d=a.steps,h=a.children,y=this.manager;if(this.unSubscribe=y.subscribe(this.handleStyleChange),typeof u=="function"||typeof h=="function"||u==="spring"){this.runJSAnimation(a);return}if(d.length>1){this.runStepAnimation(a);return}var p=s?Ja({},s,l):l,v=Uy(Object.keys(p),o,u);y.start([c,i,kt(kt({},p),{},{transition:v}),o,f])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var o=a.duration;a.attributeName,a.easing;var s=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var l=AR(a,SR),u=S.Children.count(i),c=this.state.style;if(typeof i=="function")return i(c);if(!s||u===0||o<=0)return i;var f=function(h){var y=h.props,p=y.style,v=p===void 0?{}:p,g=y.className,O=S.cloneElement(h,kt(kt({},l),{},{style:kt(kt({},v),c),className:g}));return O};return u===1?f(S.Children.only(i)):S.createElement("div",null,S.Children.map(i,function(d){return f(d)}))}}]),r}(S.PureComponent);Nt.displayName="Animate",Nt.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},Nt.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 Za(e){"@babel/helpers - typeof";return Za=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},Za(e)}function Ko(){return Ko=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},Ko.apply(this,arguments)}function LR(e,t){return WR(e)||FR(e,t)||BR(e,t)||RR()}function RR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
109
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BR(e,t){if(e){if(typeof e=="string")return Qy(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 Qy(e,t)}}function Qy(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 FR(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function WR(e){if(Array.isArray(e))return e}function em(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function tm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?em(Object(r),!0).forEach(function(n){UR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):em(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function UR(e,t,r){return t=zR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zR(e){var t=GR(e,"string");return Za(t)=="symbol"?t:t+""}function GR(e,t){if(Za(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Za(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rm=function(t,r,n,a,i){var o=Math.min(Math.abs(n)/2,Math.abs(a)/2),s=a>=0?1:-1,l=n>=0?1:-1,u=a>=0&&n>=0||a<0&&n<0?1:0,c;if(o>0&&i instanceof Array){for(var f=[0,0,0,0],d=0,h=4;d<h;d++)f[d]=i[d]>o?o:i[d];c="M".concat(t,",").concat(r+s*f[0]),f[0]>0&&(c+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+l*f[0],",").concat(r)),c+="L ".concat(t+n-l*f[1],",").concat(r),f[1]>0&&(c+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`,
|
|
110
|
+
`).concat(t+n,",").concat(r+s*f[1])),c+="L ".concat(t+n,",").concat(r+a-s*f[2]),f[2]>0&&(c+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(u,`,
|
|
111
|
+
`).concat(t+n-l*f[2],",").concat(r+a)),c+="L ".concat(t+l*f[3],",").concat(r+a),f[3]>0&&(c+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(u,`,
|
|
112
|
+
`).concat(t,",").concat(r+a-s*f[3])),c+="Z"}else if(o>0&&i===+i&&i>0){var y=Math.min(o,i);c="M ".concat(t,",").concat(r+s*y,`
|
|
113
|
+
A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t+l*y,",").concat(r,`
|
|
114
|
+
L `).concat(t+n-l*y,",").concat(r,`
|
|
115
|
+
A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*y,`
|
|
116
|
+
L `).concat(t+n,",").concat(r+a-s*y,`
|
|
117
|
+
A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t+n-l*y,",").concat(r+a,`
|
|
118
|
+
L `).concat(t+l*y,",").concat(r+a,`
|
|
119
|
+
A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t,",").concat(r+a-s*y," Z")}else c="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(a," h ").concat(-n," Z");return c},qR=function(t,r){if(!t||!r)return!1;var n=t.x,a=t.y,i=r.x,o=r.y,s=r.width,l=r.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(i,i+s),c=Math.max(i,i+s),f=Math.min(o,o+l),d=Math.max(o,o+l);return n>=u&&n<=c&&a>=f&&a<=d}return!1},KR={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},fc=function(t){var r=tm(tm({},KR),t),n=S.useRef(),a=S.useState(-1),i=LR(a,2),o=i[0],s=i[1];S.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var A=n.current.getTotalLength();A&&s(A)}catch{}},[]);var l=r.x,u=r.y,c=r.width,f=r.height,d=r.radius,h=r.className,y=r.animationEasing,p=r.animationDuration,v=r.animationBegin,g=r.isAnimationActive,O=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||f!==+f||c===0||f===0)return null;var x=pe("recharts-rectangle",h);return O?S.createElement(Nt,{canBegin:o>0,from:{width:c,height:f,x:l,y:u},to:{width:c,height:f,x:l,y:u},duration:p,animationEasing:y,isActive:O},function(A){var m=A.width,w=A.height,T=A.x,_=A.y;return S.createElement(Nt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:p,isActive:g,easing:y},S.createElement("path",Ko({},fe(r,!0),{className:x,d:rm(T,_,m,w,d),ref:n})))}):S.createElement("path",Ko({},fe(r,!0),{className:x,d:rm(l,u,c,f,d)}))};function dc(){return dc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},dc.apply(this,arguments)}var Vo=function(t){var r=t.cx,n=t.cy,a=t.r,i=t.className,o=pe("recharts-dot",i);return r===+r&&n===+n&&a===+a?bt.createElement("circle",dc({},fe(t,!1),Ni(t),{className:o,cx:r,cy:n,r:a})):null};function Qa(e){"@babel/helpers - typeof";return Qa=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},Qa(e)}var VR=["x","y","top","left","width","height","className"];function hc(){return hc=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},hc.apply(this,arguments)}function nm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function HR(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nm(Object(r),!0).forEach(function(n){YR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function YR(e,t,r){return t=XR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XR(e){var t=JR(e,"string");return Qa(t)=="symbol"?t:t+""}function JR(e,t){if(Qa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ZR(e,t){if(e==null)return{};var r=QR(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function QR(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 e3=function(t,r,n,a,i,o){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(o,",").concat(r,"h").concat(n)},t3=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,o=t.top,s=o===void 0?0:o,l=t.left,u=l===void 0?0:l,c=t.width,f=c===void 0?0:c,d=t.height,h=d===void 0?0:d,y=t.className,p=ZR(t,VR),v=HR({x:n,y:i,top:s,left:u,width:f,height:h},p);return!X(n)||!X(i)||!X(f)||!X(h)||!X(s)||!X(u)?null:S.createElement("path",hc({},fe(v,!0),{className:pe("recharts-cross",y),d:e3(n,i,f,h,s,u)}))},r3=Bd,n3=r3(Object.getPrototypeOf,Object),a3=n3,i3=Ht,o3=a3,s3=Yt,l3="[object Object]",u3=Function.prototype,c3=Object.prototype,am=u3.toString,f3=c3.hasOwnProperty,d3=am.call(Object);function h3(e){if(!s3(e)||i3(e)!=l3)return!1;var t=o3(e);if(t===null)return!0;var r=f3.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&am.call(r)==d3}var p3=h3;const v3=ke(p3);var y3=Ht,m3=Yt,g3="[object Boolean]";function b3(e){return e===!0||e===!1||m3(e)&&y3(e)==g3}var x3=b3;const w3=ke(x3);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 Ho(){return Ho=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},Ho.apply(this,arguments)}function O3(e,t){return P3(e)||T3(e,t)||A3(e,t)||S3()}function S3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
120
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function A3(e,t){if(e){if(typeof e=="string")return im(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 im(e,t)}}function im(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 T3(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function P3(e){if(Array.isArray(e))return e}function om(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function sm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?om(Object(r),!0).forEach(function(n){_3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):om(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _3(e,t,r){return t=E3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E3(e){var t=j3(e,"string");return ei(t)=="symbol"?t:t+""}function j3(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)}var lm=function(t,r,n,a,i){var o=n-a,s;return s="M ".concat(t,",").concat(r),s+="L ".concat(t+n,",").concat(r),s+="L ".concat(t+n-o/2,",").concat(r+i),s+="L ".concat(t+n-o/2-a,",").concat(r+i),s+="L ".concat(t,",").concat(r," Z"),s},$3={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},C3=function(t){var r=sm(sm({},$3),t),n=S.useRef(),a=S.useState(-1),i=O3(a,2),o=i[0],s=i[1];S.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var x=n.current.getTotalLength();x&&s(x)}catch{}},[]);var l=r.x,u=r.y,c=r.upperWidth,f=r.lowerWidth,d=r.height,h=r.className,y=r.animationEasing,p=r.animationDuration,v=r.animationBegin,g=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||f!==+f||d!==+d||c===0&&f===0||d===0)return null;var O=pe("recharts-trapezoid",h);return g?S.createElement(Nt,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:d,x:l,y:u},to:{upperWidth:c,lowerWidth:f,height:d,x:l,y:u},duration:p,animationEasing:y,isActive:g},function(x){var A=x.upperWidth,m=x.lowerWidth,w=x.height,T=x.x,_=x.y;return S.createElement(Nt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:p,easing:y},S.createElement("path",Ho({},fe(r,!0),{className:O,d:lm(T,_,A,m,w),ref:n})))}):S.createElement("g",null,S.createElement("path",Ho({},fe(r,!0),{className:O,d:lm(l,u,c,f,d)})))},M3=["option","shapeType","propTransformer","activeClassName","isActive"];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 k3(e,t){if(e==null)return{};var r=N3(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function N3(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 um(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Yo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?um(Object(r),!0).forEach(function(n){D3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):um(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function D3(e,t,r){return t=I3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function I3(e){var t=L3(e,"string");return ti(t)=="symbol"?t:t+""}function L3(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 R3(e,t){return Yo(Yo({},t),e)}function B3(e,t){return e==="symbols"}function cm(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return S.createElement(fc,r);case"trapezoid":return S.createElement(C3,r);case"sector":return S.createElement(hy,r);case"symbols":if(B3(t))return S.createElement(qi,r);break;default:return null}}function F3(e){return S.isValidElement(e)?e.props:e}function pc(e){var t=e.option,r=e.shapeType,n=e.propTransformer,a=n===void 0?R3:n,i=e.activeClassName,o=i===void 0?"recharts-active-shape":i,s=e.isActive,l=k3(e,M3),u;if(S.isValidElement(t))u=S.cloneElement(t,Yo(Yo({},l),F3(t)));else if(de(t))u=t(l);else if(v3(t)&&!w3(t)){var c=a(t,l);u=S.createElement(cm,{shapeType:r,elementProps:c})}else{var f=l;u=S.createElement(cm,{shapeType:r,elementProps:f})}return s?S.createElement(be,{className:o},u):u}function Xo(e,t){return t!=null&&"trapezoids"in e.props}function Jo(e,t){return t!=null&&"sectors"in e.props}function ri(e,t){return t!=null&&"points"in e.props}function W3(e,t){var r,n,a=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,i=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return a&&i}function U3(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function z3(e,t){var r=e.x===t.x,n=e.y===t.y,a=e.z===t.z;return r&&n&&a}function G3(e,t){var r;return Xo(e,t)?r=W3:Jo(e,t)?r=U3:ri(e,t)&&(r=z3),r}function q3(e,t){var r;return Xo(e,t)?r="trapezoids":Jo(e,t)?r="sectors":ri(e,t)&&(r="points"),r}function K3(e,t){if(Xo(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(Jo(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 ri(e,t)?t.payload:{}}function V3(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,a=q3(r,t),i=K3(r,t),o=n.filter(function(l,u){var c=Rr(i,l),f=r.props[a].filter(function(y){var p=G3(r,t);return p(y,t)}),d=r.props[a].indexOf(f[f.length-1]),h=u===d;return c&&h}),s=n.indexOf(o[o.length-1]);return s}var H3=Math.ceil,Y3=Math.max;function X3(e,t,r,n){for(var a=-1,i=Y3(H3((t-e)/(r||1)),0),o=Array(i);i--;)o[n?i:++a]=e,e+=r;return o}var J3=X3,Z3=Lh,fm=1/0,Q3=17976931348623157e292;function e5(e){if(!e)return e===0?e:0;if(e=Z3(e),e===fm||e===-fm){var t=e<0?-1:1;return t*Q3}return e===e?e:0}var dm=e5,t5=J3,r5=eo,vc=dm;function n5(e){return function(t,r,n){return n&&typeof n!="number"&&r5(t,r,n)&&(r=n=void 0),t=vc(t),r===void 0?(r=t,t=0):r=vc(r),n=n===void 0?t<r?1:-1:vc(n),t5(t,r,n,e)}}var a5=n5,i5=a5,o5=i5(),s5=o5;const Zo=ke(s5);function ni(e){"@babel/helpers - typeof";return ni=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ni(e)}function hm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function pm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hm(Object(r),!0).forEach(function(n){vm(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vm(e,t,r){return t=l5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l5(e){var t=u5(e,"string");return ni(t)=="symbol"?t:t+""}function u5(e,t){if(ni(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ni(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var c5=["Webkit","Moz","O","ms"],f5=function(t,r){var n=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=c5.reduce(function(i,o){return pm(pm({},i),{},vm({},o+n,r))},{});return a[t]=r,a};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 Qo(){return Qo=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},Qo.apply(this,arguments)}function ym(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function yc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ym(Object(r),!0).forEach(function(n){vt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ym(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function d5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mm(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,bm(n.key),n)}}function h5(e,t,r){return t&&mm(e.prototype,t),r&&mm(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p5(e,t,r){return t=es(t),v5(e,gm()?Reflect.construct(t,r||[],es(e).constructor):t.apply(e,r))}function v5(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 y5(e)}function y5(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gm=function(){return!!e})()}function es(e){return es=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},es(e)}function m5(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mc(e,t)}function mc(e,t){return mc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},mc(e,t)}function vt(e,t,r){return t=bm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bm(e){var t=g5(e,"string");return Cn(t)=="symbol"?t:t+""}function g5(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 b5=function(t){var r=t.data,n=t.startIndex,a=t.endIndex,i=t.x,o=t.width,s=t.travellerWidth;if(!r||!r.length)return{};var l=r.length,u=Sa().domain(Zo(0,l)).range([i,i+o-s]),c=u.domain().map(function(f){return u(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(n),endX:u(a),scale:u,scaleValues:c}},xm=function(t){return t.changedTouches&&!!t.changedTouches.length},Mn=function(e){function t(r){var n;return d5(this,t),n=p5(this,t,[r]),vt(n,"handleDrag",function(a){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(a):n.state.isSlideMoving&&n.handleSlideDrag(a)}),vt(n,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&n.handleDrag(a.changedTouches[0])}),vt(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=n.props,i=a.endIndex,o=a.onDragEnd,s=a.startIndex;o==null||o({endIndex:i,startIndex:s})}),n.detachDragEndListener()}),vt(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),vt(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),vt(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),vt(n,"handleSlideDragStart",function(a){var i=xm(a)?a.changedTouches[0]:a;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return m5(t,e),h5(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var a=n.startX,i=n.endX,o=this.state.scaleValues,s=this.props,l=s.gap,u=s.data,c=u.length-1,f=Math.min(a,i),d=Math.max(a,i),h=t.getIndexInRange(o,f),y=t.getIndexInRange(o,d);return{startIndex:h-h%l,endIndex:y===c?c:y-y%l}}},{key:"getTextOfTick",value:function(n){var a=this.props,i=a.data,o=a.tickFormatter,s=a.dataKey,l=Ye(i[n],s,n);return de(o)?o(l,n):l}},{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 a=this.state,i=a.slideMoveStartX,o=a.startX,s=a.endX,l=this.props,u=l.x,c=l.width,f=l.travellerWidth,d=l.startIndex,h=l.endIndex,y=l.onChange,p=n.pageX-i;p>0?p=Math.min(p,u+c-f-s,u+c-f-o):p<0&&(p=Math.max(p,u-o,u-s));var v=this.getIndex({startX:o+p,endX:s+p});(v.startIndex!==d||v.endIndex!==h)&&y&&y(v),this.setState({startX:o+p,endX:s+p,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,a){var i=xm(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var a=this.state,i=a.brushMoveStartX,o=a.movingTravellerId,s=a.endX,l=a.startX,u=this.state[o],c=this.props,f=c.x,d=c.width,h=c.travellerWidth,y=c.onChange,p=c.gap,v=c.data,g={startX:this.state.startX,endX:this.state.endX},O=n.pageX-i;O>0?O=Math.min(O,f+d-h-u):O<0&&(O=Math.max(O,f-u)),g[o]=u+O;var x=this.getIndex(g),A=x.startIndex,m=x.endIndex,w=function(){var _=v.length-1;return o==="startX"&&(s>l?A%p===0:m%p===0)||s<l&&m===_||o==="endX"&&(s>l?m%p===0:A%p===0)||s>l&&m===_};this.setState(vt(vt({},o,u+O),"brushMoveStartX",n.pageX),function(){y&&w()&&y(x)})}},{key:"handleTravellerMoveKeyboard",value:function(n,a){var i=this,o=this.state,s=o.scaleValues,l=o.startX,u=o.endX,c=this.state[a],f=s.indexOf(c);if(f!==-1){var d=f+n;if(!(d===-1||d>=s.length)){var h=s[d];a==="startX"&&h>=u||a==="endX"&&h<=l||this.setState(vt({},a,h),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,l=n.fill,u=n.stroke;return S.createElement("rect",{stroke:u,fill:l,x:a,y:i,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,l=n.data,u=n.children,c=n.padding,f=S.Children.only(u);return f?S.cloneElement(f,{x:a,y:i,width:o,height:s,margin:c,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,a){var i,o,s=this,l=this.props,u=l.y,c=l.travellerWidth,f=l.height,d=l.traveller,h=l.ariaLabel,y=l.data,p=l.startIndex,v=l.endIndex,g=Math.max(n,this.props.x),O=yc(yc({},fe(this.props,!1)),{},{x:g,y:u,width:c,height:f}),x=h||"Min value: ".concat((i=y[p])===null||i===void 0?void 0:i.name,", Max value: ").concat((o=y[v])===null||o===void 0?void 0:o.name);return S.createElement(be,{tabIndex:0,role:"slider","aria-label":x,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(m){["ArrowLeft","ArrowRight"].includes(m.key)&&(m.preventDefault(),m.stopPropagation(),s.handleTravellerMoveKeyboard(m.key==="ArrowRight"?1:-1,a))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,O))}},{key:"renderSlide",value:function(n,a){var i=this.props,o=i.y,s=i.height,l=i.stroke,u=i.travellerWidth,c=Math.min(n,a)+u,f=Math.max(Math.abs(a-n)-u,0);return S.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:c,y:o,width:f,height:s})}},{key:"renderText",value:function(){var n=this.props,a=n.startIndex,i=n.endIndex,o=n.y,s=n.height,l=n.travellerWidth,u=n.stroke,c=this.state,f=c.startX,d=c.endX,h=5,y={pointerEvents:"none",fill:u};return S.createElement(be,{className:"recharts-brush-texts"},S.createElement(so,Qo({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,d)-h,y:o+s/2},y),this.getTextOfTick(a)),S.createElement(so,Qo({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,d)+l+h,y:o+s/2},y),this.getTextOfTick(i)))}},{key:"render",value:function(){var n=this.props,a=n.data,i=n.className,o=n.children,s=n.x,l=n.y,u=n.width,c=n.height,f=n.alwaysShowText,d=this.state,h=d.startX,y=d.endX,p=d.isTextActive,v=d.isSlideMoving,g=d.isTravellerMoving,O=d.isTravellerFocused;if(!a||!a.length||!X(s)||!X(l)||!X(u)||!X(c)||u<=0||c<=0)return null;var x=pe("recharts-brush",i),A=S.Children.count(o)===1,m=f5("userSelect","none");return S.createElement(be,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:m},this.renderBackground(),A&&this.renderPanorama(),this.renderSlide(h,y),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(y,"endX"),(p||v||g||O||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var a=n.x,i=n.y,o=n.width,s=n.height,l=n.stroke,u=Math.floor(i+s/2)-1;return S.createElement(S.Fragment,null,S.createElement("rect",{x:a,y:i,width:o,height:s,fill:l,stroke:"none"}),S.createElement("line",{x1:a+1,y1:u,x2:a+o-1,y2:u,fill:"none",stroke:"#fff"}),S.createElement("line",{x1:a+1,y1:u+2,x2:a+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,a){var i;return S.isValidElement(n)?i=S.cloneElement(n,a):de(n)?i=n(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(n,a){var i=n.data,o=n.width,s=n.x,l=n.travellerWidth,u=n.updateId,c=n.startIndex,f=n.endIndex;if(i!==a.prevData||u!==a.prevUpdateId)return yc({prevData:i,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o},i&&i.length?b5({data:i,width:o,x:s,travellerWidth:l,startIndex:c,endIndex:f}):{scale:null,scaleValues:null});if(a.scale&&(o!==a.prevWidth||s!==a.prevX||l!==a.prevTravellerWidth)){a.scale.range([s,s+o-l]);var d=a.scale.domain().map(function(h){return a.scale(h)});return{prevData:i,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o,startX:a.scale(n.startIndex),endX:a.scale(n.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(n,a){for(var i=n.length,o=0,s=i-1;s-o>1;){var l=Math.floor((o+s)/2);n[l]>a?s=l:o=l}return a>=n[s]?s:o}}])}(S.PureComponent);vt(Mn,"displayName","Brush"),vt(Mn,"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 x5=kl;function w5(e,t){var r;return x5(e,function(n,a,i){return r=t(n,a,i),!r}),!!r}var O5=w5,S5=Ad,A5=fr,T5=O5,P5=lt,_5=eo;function E5(e,t,r){var n=P5(e)?S5:T5;return r&&_5(e,t,r)&&(t=void 0),n(e,A5(t))}var j5=E5;const $5=ke(j5);var Kt=function(t,r){var n=t.alwaysShow,a=t.ifOverflow;return n&&(a="extendDomain"),a===r},wm=xh;function C5(e,t,r){t=="__proto__"&&wm?wm(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var M5=C5,k5=M5,N5=yh,D5=fr;function I5(e,t){var r={};return t=D5(t),N5(e,function(n,a,i){k5(r,a,t(n,a,i))}),r}var L5=I5;const R5=ke(L5);function B5(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var F5=B5,W5=kl;function U5(e,t){var r=!0;return W5(e,function(n,a,i){return r=!!t(n,a,i),r}),r}var z5=U5,G5=F5,q5=z5,K5=fr,V5=lt,H5=eo;function Y5(e,t,r){var n=V5(e)?G5:q5;return r&&H5(e,t,r)&&(t=void 0),n(e,K5(t))}var X5=Y5;const Om=ke(X5);var J5=["x","y"];function kn(e){"@babel/helpers - typeof";return kn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kn(e)}function gc(){return gc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gc.apply(this,arguments)}function Sm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ai(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Sm(Object(r),!0).forEach(function(n){Z5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Z5(e,t,r){return t=Q5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Q5(e){var t=eB(e,"string");return kn(t)=="symbol"?t:t+""}function eB(e,t){if(kn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(kn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tB(e,t){if(e==null)return{};var r=rB(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(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){var r=e.x,n=e.y,a=tB(e,J5),i="".concat(r),o=parseInt(i,10),s="".concat(n),l=parseInt(s,10),u="".concat(t.height||a.height),c=parseInt(u,10),f="".concat(t.width||a.width),d=parseInt(f,10);return ai(ai(ai(ai(ai({},t),a),o?{x:o}:{}),l?{y:l}:{}),{},{height:c,width:d,name:t.name,radius:t.radius})}function Am(e){return S.createElement(pc,gc({shapeType:"rectangle",propTransformer:nB,activeClassName:"recharts-active-bar"},e))}var aB=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,a){if(typeof t=="number")return t;var i=X(n)||y1(n);return i?t(n,a):(i||(process.env.NODE_ENV!=="production"?ft(!1,"minPointSize callback function received a value with type of ".concat(kn(n),". Currently only numbers or null/undefined are supported.")):ft()),r)}},iB=["value","background"],Tm;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 oB(e,t){if(e==null)return{};var r=sB(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function sB(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 ts(){return ts=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},ts.apply(this,arguments)}function Pm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function qe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Pm(Object(r),!0).forEach(function(n){br(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,jm(n.key),n)}}function uB(e,t,r){return t&&_m(e.prototype,t),r&&_m(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function cB(e,t,r){return t=rs(t),fB(e,Em()?Reflect.construct(t,r||[],rs(e).constructor):t.apply(e,r))}function fB(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 dB(e)}function dB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Em(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Em=function(){return!!e})()}function rs(e){return rs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},rs(e)}function hB(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&&bc(e,t)}function bc(e,t){return bc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},bc(e,t)}function br(e,t,r){return t=jm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jm(e){var t=pB(e,"string");return Nn(t)=="symbol"?t:t+""}function pB(e,t){if(Nn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Nn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Dn=function(e){function t(){var r;lB(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=cB(this,t,[].concat(a)),br(r,"state",{isAnimationFinished:!1}),br(r,"id",jr("recharts-bar-")),br(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),br(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return hB(t,e),uB(t,[{key:"renderRectanglesStatically",value:function(n){var a=this,i=this.props,o=i.shape,s=i.dataKey,l=i.activeIndex,u=i.activeBar,c=fe(this.props,!1);return n&&n.map(function(f,d){var h=d===l,y=h?u:o,p=qe(qe(qe({},c),f),{},{isActive:h,option:y,index:d,dataKey:s,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return S.createElement(be,ts({className:"recharts-bar-rectangle"},ua(a.props,f,d),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value,"-").concat(d)}),S.createElement(Am,p))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,a=this.props,i=a.data,o=a.layout,s=a.isAnimationActive,l=a.animationBegin,u=a.animationDuration,c=a.animationEasing,f=a.animationId,d=this.state.prevData;return S.createElement(Nt,{begin:l,duration:u,isActive:s,easing:c,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var y=h.t,p=i.map(function(v,g){var O=d&&d[g];if(O){var x=We(O.x,v.x),A=We(O.y,v.y),m=We(O.width,v.width),w=We(O.height,v.height);return qe(qe({},v),{},{x:x(y),y:A(y),width:m(y),height:w(y)})}if(o==="horizontal"){var T=We(0,v.height),_=T(y);return qe(qe({},v),{},{y:v.y+v.height-_,height:_})}var $=We(0,v.width),R=$(y);return qe(qe({},v),{},{width:R})});return S.createElement(be,null,n.renderRectanglesStatically(p))})}},{key:"renderRectangles",value:function(){var n=this.props,a=n.data,i=n.isAnimationActive,o=this.state.prevData;return i&&a&&a.length&&(!o||!Rr(o,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var n=this,a=this.props,i=a.data,o=a.dataKey,s=a.activeIndex,l=fe(this.props.background,!1);return i.map(function(u,c){u.value;var f=u.background,d=oB(u,iB);if(!f)return null;var h=qe(qe(qe(qe(qe({},d),{},{fill:"#eee"},f),l),ua(n.props,u,c)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:c,className:"recharts-bar-background-rectangle"});return S.createElement(Am,ts({key:"background-bar-".concat(c),option:n.props.background,isActive:c===s},h))})}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.data,s=i.xAxis,l=i.yAxis,u=i.layout,c=i.children,f=ut(c,_n);if(!f)return null;var d=u==="vertical"?o[0].height/2:o[0].width/2,h=function(v,g){var O=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:O,errorVal:Ye(v,g)}},y={clipPath:n?"url(#clipPath-".concat(a,")"):null};return S.createElement(be,y,f.map(function(p){return S.cloneElement(p,{key:"error-bar-".concat(a,"-").concat(p.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,offset:d,dataPointFormatter:h})}))}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.data,o=n.className,s=n.xAxis,l=n.yAxis,u=n.left,c=n.top,f=n.width,d=n.height,h=n.isAnimationActive,y=n.background,p=n.id;if(a||!i||!i.length)return null;var v=this.state.isAnimationFinished,g=pe("recharts-bar",o),O=s&&s.allowDataOverflow,x=l&&l.allowDataOverflow,A=O||x,m=ue(p)?this.id:p;return S.createElement(be,{className:g},O||x?S.createElement("defs",null,S.createElement("clipPath",{id:"clipPath-".concat(m)},S.createElement("rect",{x:O?u:u-f/2,y:x?c:c-d/2,width:O?f:f*2,height:x?d:d*2}))):null,S.createElement(be,{className:"recharts-bar-rectangles",clipPath:A?"url(#clipPath-".concat(m,")"):null},y?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(A,m),(!h||v)&&qt.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:a.curData}:n.data!==a.curData?{curData:n.data}:null}}])}(S.PureComponent);Tm=Dn,br(Dn,"displayName","Bar"),br(Dn,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!dr.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),br(Dn,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,a=e.bandSize,i=e.xAxis,o=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,u=e.stackedData,c=e.dataStartIndex,f=e.displayedData,d=e.offset,h=FD(n,r);if(!h)return null;var y=t.layout,p=r.type.defaultProps,v=p!==void 0?qe(qe({},p),r.props):r.props,g=v.dataKey,O=v.children,x=v.minPointSize,A=y==="horizontal"?o:i,m=u?A.scale.domain():null,w=HD({numericAxis:A}),T=ut(O,zl),_=f.map(function($,R){var P,j,L,B,M,E;u?P=WD(u[c+R],m):(P=Ye($,g),Array.isArray(P)||(P=[w,P]));var F=aB(x,Tm.defaultProps.minPointSize)(P[1],R);if(y==="horizontal"){var U,k=[o.scale(P[0]),o.scale(P[1])],N=k[0],I=k[1];j=Xv({axis:i,ticks:s,bandSize:a,offset:h.offset,entry:$,index:R}),L=(U=I??N)!==null&&U!==void 0?U:void 0,B=h.size;var W=N-I;if(M=Number.isNaN(W)?0:W,E={x:j,y:o.y,width:B,height:o.height},Math.abs(F)>0&&Math.abs(M)<Math.abs(F)){var z=$t(M||F)*(Math.abs(F)-Math.abs(M));L-=z,M+=z}}else{var V=[i.scale(P[0]),i.scale(P[1])],Z=V[0],Q=V[1];if(j=Z,L=Xv({axis:o,ticks:l,bandSize:a,offset:h.offset,entry:$,index:R}),B=Q-Z,M=h.size,E={x:i.x,y:L,width:i.width,height:M},Math.abs(F)>0&&Math.abs(B)<Math.abs(F)){var ae=$t(B||F)*(Math.abs(F)-Math.abs(B));B+=ae}}return qe(qe(qe({},$),{},{x:j,y:L,width:B,height:M,value:u?P:P[1],payload:$,background:E},T&&T[R]&&T[R].props),{},{tooltipPayload:[ty(r,$)],tooltipPosition:{x:j+B/2,y:L+M/2}})});return qe({data:_,layout:y},d)});function ii(e){"@babel/helpers - typeof";return ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ii(e)}function vB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $m(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,Mm(n.key),n)}}function yB(e,t,r){return t&&$m(e.prototype,t),r&&$m(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Cm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Dt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cm(Object(r),!0).forEach(function(n){ns(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 ns(e,t,r){return t=Mm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mm(e){var t=mB(e,"string");return ii(t)=="symbol"?t:t+""}function mB(e,t){if(ii(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ii(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gB=function(t,r,n,a,i){var o=t.width,s=t.height,l=t.layout,u=t.children,c=Object.keys(r),f={left:n.left,leftMirror:n.left,right:o-n.right,rightMirror:o-n.right,top:n.top,topMirror:n.top,bottom:s-n.bottom,bottomMirror:s-n.bottom},d=!!ht(u,Dn);return c.reduce(function(h,y){var p=r[y],v=p.orientation,g=p.domain,O=p.padding,x=O===void 0?{}:O,A=p.mirror,m=p.reversed,w="".concat(v).concat(A?"Mirror":""),T,_,$,R,P;if(p.type==="number"&&(p.padding==="gap"||p.padding==="no-gap")){var j=g[1]-g[0],L=1/0,B=p.categoricalDomain.sort(x1);if(B.forEach(function(V,Z){Z>0&&(L=Math.min((V||0)-(B[Z-1]||0),L))}),Number.isFinite(L)){var M=L/j,E=p.layout==="vertical"?n.height:n.width;if(p.padding==="gap"&&(T=M*E/2),p.padding==="no-gap"){var F=$r(t.barCategoryGap,M*E),U=M*E/2;T=U-F-(U-F)/E*F}}}a==="xAxis"?_=[n.left+(x.left||0)+(T||0),n.left+n.width-(x.right||0)-(T||0)]:a==="yAxis"?_=l==="horizontal"?[n.top+n.height-(x.bottom||0),n.top+(x.top||0)]:[n.top+(x.top||0)+(T||0),n.top+n.height-(x.bottom||0)-(T||0)]:_=p.range,m&&(_=[_[1],_[0]]);var k=RD(p,i,d),N=k.scale,I=k.realScaleType;N.domain(g).range(_),BD(N);var W=VD(N,Dt(Dt({},p),{},{realScaleType:I}));a==="xAxis"?(P=v==="top"&&!A||v==="bottom"&&A,$=n.left,R=f[w]-P*p.height):a==="yAxis"&&(P=v==="left"&&!A||v==="right"&&A,$=f[w]-P*p.width,R=n.top);var z=Dt(Dt(Dt({},p),W),{},{realScaleType:I,x:$,y:R,scale:N,width:a==="xAxis"?n.width:p.width,height:a==="yAxis"?n.height:p.height});return z.bandSize=Do(z,W),!p.hide&&a==="xAxis"?f[w]+=(P?-1:1)*z.height:p.hide||(f[w]+=(P?-1:1)*z.width),Dt(Dt({},h),{},ns({},y,z))},{})},km=function(t,r){var n=t.x,a=t.y,i=r.x,o=r.y;return{x:Math.min(n,i),y:Math.min(a,o),width:Math.abs(i-n),height:Math.abs(o-a)}},bB=function(t){var r=t.x1,n=t.y1,a=t.x2,i=t.y2;return km({x:r,y:n},{x:a,y:i})},Nm=function(){function e(t){vB(this,e),this.scale=t}return yB(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]:{},a=n.bandAware,i=n.position;if(r!==void 0){if(i)switch(i){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(a){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+l}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),a=n[0],i=n[n.length-1];return a<=i?r>=a&&r<=i:r>=i&&r<=a}}],[{key:"create",value:function(r){return new e(r)}}])}();ns(Nm,"EPS",1e-4);var xc=function(t){var r=Object.keys(t).reduce(function(n,a){return Dt(Dt({},n),{},ns({},a,Nm.create(t[a])))},{});return Dt(Dt({},r),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.bandAware,s=i.position;return R5(a,function(l,u){return r[u].apply(l,{bandAware:o,position:s})})},isInRange:function(a){return Om(a,function(i,o){return r[o].isInRange(i)})}})};function xB(e){return(e%180+180)%180}var wB=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=xB(a),o=i*Math.PI/180,s=Math.atan(n/r),l=o>s&&o<Math.PI-s?n/Math.sin(o):r/Math.cos(o);return Math.abs(l)},OB=fr,SB=da,AB=Xi;function TB(e){return function(t,r,n){var a=Object(t);if(!SB(t)){var i=OB(r);t=AB(t),r=function(s){return i(a[s],s,a)}}var o=e(t,r,n);return o>-1?a[i?t[o]:o]:void 0}}var PB=TB,_B=dm;function EB(e){var t=_B(e),r=t%1;return t===t?r?t-r:t:0}var jB=EB,$B=ah,CB=fr,MB=jB,kB=Math.max;function NB(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:MB(r);return a<0&&(a=kB(n+a,0)),$B(e,CB(t),a)}var DB=NB,IB=PB,LB=DB,RB=IB(LB),BB=RB;const FB=ke(BB);var WB=Ow(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("")});function as(e){"@babel/helpers - typeof";return as=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},as(e)}var wc=S.createContext(void 0),Oc=S.createContext(void 0),Dm=S.createContext(void 0),Im=S.createContext({}),Lm=S.createContext(void 0),Rm=S.createContext(0),Bm=S.createContext(0),Fm=function(t){var r=t.state,n=r.xAxisMap,a=r.yAxisMap,i=r.offset,o=t.clipPathId,s=t.children,l=t.width,u=t.height,c=WB(i);return S.createElement(wc.Provider,{value:n},S.createElement(Oc.Provider,{value:a},S.createElement(Im.Provider,{value:i},S.createElement(Dm.Provider,{value:c},S.createElement(Lm.Provider,{value:o},S.createElement(Rm.Provider,{value:u},S.createElement(Bm.Provider,{value:l},s)))))))},UB=function(){return S.useContext(Lm)};function Wm(e){var t=Object.keys(e);return t.length===0?"There are no available ids.":"Available ids are: ".concat(t,".")}var Um=function(t){var r=S.useContext(wc);r==null&&(process.env.NODE_ENV!=="production"?ft(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):ft());var n=r[t];return n==null&&(process.env.NODE_ENV!=="production"?ft(!1,'Could not find xAxis by id "'.concat(t,'" [').concat(as(t),"]. ").concat(Wm(r))):ft()),n},zB=function(){var t=S.useContext(wc);return cr(t)},GB=function(){var t=S.useContext(Oc),r=FB(t,function(n){return Om(n.domain,Number.isFinite)});return r||cr(t)},zm=function(t){var r=S.useContext(Oc);r==null&&(process.env.NODE_ENV!=="production"?ft(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):ft());var n=r[t];return n==null&&(process.env.NODE_ENV!=="production"?ft(!1,'Could not find yAxis by id "'.concat(t,'" [').concat(as(t),"]. ").concat(Wm(r))):ft()),n},qB=function(){var t=S.useContext(Dm);return t},KB=function(){return S.useContext(Im)},Sc=function(){return S.useContext(Bm)},Ac=function(){return S.useContext(Rm)};function In(e){"@babel/helpers - typeof";return In=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},In(e)}function VB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Vm(n.key),n)}}function YB(e,t,r){return t&&HB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function XB(e,t,r){return t=is(t),JB(e,Gm()?Reflect.construct(t,r||[],is(e).constructor):t.apply(e,r))}function JB(e,t){if(t&&(In(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ZB(e)}function ZB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Gm=function(){return!!e})()}function is(e){return is=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},is(e)}function QB(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&&Tc(e,t)}function Tc(e,t){return Tc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Tc(e,t)}function qm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Km(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qm(Object(r),!0).forEach(function(n){Pc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pc(e,t,r){return t=Vm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vm(e){var t=e4(e,"string");return In(t)=="symbol"?t:t+""}function e4(e,t){if(In(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(In(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function t4(e,t){return i4(e)||a4(e,t)||n4(e,t)||r4()}function r4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
121
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n4(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 a4(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function i4(e){if(Array.isArray(e))return e}function _c(){return _c=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},_c.apply(this,arguments)}var o4=function(t,r){var n;return S.isValidElement(t)?n=S.cloneElement(t,r):de(t)?n=t(r):n=S.createElement("line",_c({},r,{className:"recharts-reference-line-line"})),n},s4=function(t,r,n,a,i,o,s,l,u){var c=i.x,f=i.y,d=i.width,h=i.height;if(n){var y=u.y,p=t.y.apply(y,{position:o});if(Kt(u,"discard")&&!t.y.isInRange(p))return null;var v=[{x:c+d,y:p},{x:c,y:p}];return l==="left"?v.reverse():v}if(r){var g=u.x,O=t.x.apply(g,{position:o});if(Kt(u,"discard")&&!t.x.isInRange(O))return null;var x=[{x:O,y:f+h},{x:O,y:f}];return s==="top"?x.reverse():x}if(a){var A=u.segment,m=A.map(function(w){return t.apply(w,{position:o})});return Kt(u,"discard")&&$5(m,function(w){return!t.isInRange(w)})?null:m}return null};function l4(e){var t=e.x,r=e.y,n=e.segment,a=e.xAxisId,i=e.yAxisId,o=e.shape,s=e.className,l=e.alwaysShow,u=UB(),c=Um(a),f=zm(i),d=qB();if(!u||!d)return null;Jt(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=xc({x:c.scale,y:f.scale}),y=Ve(t),p=Ve(r),v=n&&n.length===2,g=s4(h,y,p,v,d,e.position,c.orientation,f.orientation,e);if(!g)return null;var O=t4(g,2),x=O[0],A=x.x,m=x.y,w=O[1],T=w.x,_=w.y,$=Kt(e,"hidden")?"url(#".concat(u,")"):void 0,R=Km(Km({clipPath:$},fe(e,!0)),{},{x1:A,y1:m,x2:T,y2:_});return S.createElement(be,{className:pe("recharts-reference-line",s)},o4(o,R),nt.renderCallByParent(e,bB({x1:A,y1:m,x2:T,y2:_})))}var Ec=function(e){function t(){return VB(this,t),XB(this,t,arguments)}return QB(t,e),YB(t,[{key:"render",value:function(){return S.createElement(l4,this.props)}}])}(S.Component);Pc(Ec,"displayName","ReferenceLine"),Pc(Ec,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function jc(){return jc=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},jc.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 Ym(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Xm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ym(Object(r),!0).forEach(function(n){ss(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ym(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function u4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c4(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,Zm(n.key),n)}}function f4(e,t,r){return t&&c4(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function d4(e,t,r){return t=os(t),h4(e,Jm()?Reflect.construct(t,r||[],os(e).constructor):t.apply(e,r))}function h4(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 p4(e)}function p4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Jm=function(){return!!e})()}function os(e){return os=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},os(e)}function v4(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&&$c(e,t)}function $c(e,t){return $c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},$c(e,t)}function ss(e,t,r){return t=Zm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zm(e){var t=y4(e,"string");return Ln(t)=="symbol"?t:t+""}function y4(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 m4=function(t){var r=t.x,n=t.y,a=t.xAxis,i=t.yAxis,o=xc({x:a.scale,y:i.scale}),s=o.apply({x:r,y:n},{bandAware:!0});return Kt(t,"discard")&&!o.isInRange(s)?null:s},ls=function(e){function t(){return u4(this,t),d4(this,t,arguments)}return v4(t,e),f4(t,[{key:"render",value:function(){var n=this.props,a=n.x,i=n.y,o=n.r,s=n.alwaysShow,l=n.clipPathId,u=Ve(a),c=Ve(i);if(Jt(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!c)return null;var f=m4(this.props);if(!f)return null;var d=f.x,h=f.y,y=this.props,p=y.shape,v=y.className,g=Kt(this.props,"hidden")?"url(#".concat(l,")"):void 0,O=Xm(Xm({clipPath:g},fe(this.props,!0)),{},{cx:d,cy:h});return S.createElement(be,{className:pe("recharts-reference-dot",v)},t.renderDot(p,O),nt.renderCallByParent(this.props,{x:d-o,y:h-o,width:2*o,height:2*o}))}}])}(S.Component);ss(ls,"displayName","ReferenceDot"),ss(ls,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1}),ss(ls,"renderDot",function(e,t){var r;return S.isValidElement(e)?r=S.cloneElement(e,t):de(e)?r=e(t):r=S.createElement(Vo,jc({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function Cc(){return Cc=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},Cc.apply(this,arguments)}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 Qm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function eg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qm(Object(r),!0).forEach(function(n){cs(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function g4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b4(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,rg(n.key),n)}}function x4(e,t,r){return t&&b4(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function w4(e,t,r){return t=us(t),O4(e,tg()?Reflect.construct(t,r||[],us(e).constructor):t.apply(e,r))}function O4(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 S4(e)}function S4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tg=function(){return!!e})()}function us(e){return us=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},us(e)}function A4(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mc(e,t)}function Mc(e,t){return Mc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Mc(e,t)}function cs(e,t,r){return t=rg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rg(e){var t=T4(e,"string");return Rn(t)=="symbol"?t:t+""}function T4(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 P4=function(t,r,n,a,i){var o=i.x1,s=i.x2,l=i.y1,u=i.y2,c=i.xAxis,f=i.yAxis;if(!c||!f)return null;var d=xc({x:c.scale,y:f.scale}),h={x:t?d.x.apply(o,{position:"start"}):d.x.rangeMin,y:n?d.y.apply(l,{position:"start"}):d.y.rangeMin},y={x:r?d.x.apply(s,{position:"end"}):d.x.rangeMax,y:a?d.y.apply(u,{position:"end"}):d.y.rangeMax};return Kt(i,"discard")&&(!d.isInRange(h)||!d.isInRange(y))?null:km(h,y)},fs=function(e){function t(){return g4(this,t),w4(this,t,arguments)}return A4(t,e),x4(t,[{key:"render",value:function(){var n=this.props,a=n.x1,i=n.x2,o=n.y1,s=n.y2,l=n.className,u=n.alwaysShow,c=n.clipPathId;Jt(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Ve(a),d=Ve(i),h=Ve(o),y=Ve(s),p=this.props.shape;if(!f&&!d&&!h&&!y&&!p)return null;var v=P4(f,d,h,y,this.props);if(!v&&!p)return null;var g=Kt(this.props,"hidden")?"url(#".concat(c,")"):void 0;return S.createElement(be,{className:pe("recharts-reference-area",l)},t.renderRect(p,eg(eg({clipPath:g},fe(this.props,!0)),v)),nt.renderCallByParent(this.props,v))}}])}(S.Component);cs(fs,"displayName","ReferenceArea"),cs(fs,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1}),cs(fs,"renderRect",function(e,t){var r;return S.isValidElement(e)?r=S.cloneElement(e,t):de(e)?r=e(t):r=S.createElement(fc,Cc({},t,{className:"recharts-reference-area-rect"})),r});function ng(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],a=0;a<e.length;a+=t)n.push(e[a]);return n}function _4(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return wB(n,r)}function E4(e,t,r){var n=r==="width",a=e.x,i=e.y,o=e.width,s=e.height;return t===1?{start:n?a:i,end:n?a+o:i+s}:{start:n?a+o:i+s,end:n?a:i}}function ds(e,t,r,n,a){if(e*t<e*n||e*t>e*a)return!1;var i=r();return e*(t-e*i/2-n)>=0&&e*(t+e*i/2-a)<=0}function j4(e,t){return ng(e,t+1)}function $4(e,t,r,n,a){for(var i=(n||[]).slice(),o=t.start,s=t.end,l=0,u=1,c=o,f=function(){var y=n==null?void 0:n[l];if(y===void 0)return{v:ng(n,u)};var p=l,v,g=function(){return v===void 0&&(v=r(y,p)),v},O=y.coordinate,x=l===0||ds(e,O,g,c,s);x||(l=0,c=o,u+=1),x&&(c=O+e*(g()/2+a),l+=u)},d;u<=i.length;)if(d=f(),d)return d.v;return[]}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 ag(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function at(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ag(Object(r),!0).forEach(function(n){C4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ag(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function C4(e,t,r){return t=M4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function M4(e){var t=k4(e,"string");return oi(t)=="symbol"?t:t+""}function k4(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)}function N4(e,t,r,n,a){for(var i=(n||[]).slice(),o=i.length,s=t.start,l=t.end,u=function(d){var h=i[d],y,p=function(){return y===void 0&&(y=r(h,d)),y};if(d===o-1){var v=e*(h.coordinate+e*p()/2-l);i[d]=h=at(at({},h),{},{tickCoord:v>0?h.coordinate-v*e:h.coordinate})}else i[d]=h=at(at({},h),{},{tickCoord:h.coordinate});var g=ds(e,h.tickCoord,p,s,l);g&&(l=h.tickCoord-e*(p()/2+a),i[d]=at(at({},h),{},{isShow:!0}))},c=o-1;c>=0;c--)u(c);return i}function D4(e,t,r,n,a,i){var o=(n||[]).slice(),s=o.length,l=t.start,u=t.end;if(i){var c=n[s-1],f=r(c,s-1),d=e*(c.coordinate+e*f/2-u);o[s-1]=c=at(at({},c),{},{tickCoord:d>0?c.coordinate-d*e:c.coordinate});var h=ds(e,c.tickCoord,function(){return f},l,u);h&&(u=c.tickCoord-e*(f/2+a),o[s-1]=at(at({},c),{},{isShow:!0}))}for(var y=i?s-1:s,p=function(O){var x=o[O],A,m=function(){return A===void 0&&(A=r(x,O)),A};if(O===0){var w=e*(x.coordinate-e*m()/2-l);o[O]=x=at(at({},x),{},{tickCoord:w<0?x.coordinate-w*e:x.coordinate})}else o[O]=x=at(at({},x),{},{tickCoord:x.coordinate});var T=ds(e,x.tickCoord,m,l,u);T&&(l=x.tickCoord+e*(m()/2+a),o[O]=at(at({},x),{},{isShow:!0}))},v=0;v<y;v++)p(v);return o}function kc(e,t,r){var n=e.tick,a=e.ticks,i=e.viewBox,o=e.minTickGap,s=e.orientation,l=e.interval,u=e.tickFormatter,c=e.unit,f=e.angle;if(!a||!a.length||!n)return[];if(X(l)||dr.isSsr)return j4(a,typeof l=="number"&&X(l)?l:0);var d=[],h=s==="top"||s==="bottom"?"width":"height",y=c&&h==="width"?ga(c,{fontSize:t,letterSpacing:r}):{width:0,height:0},p=function(x,A){var m=de(u)?u(x.value,A):x.value;return h==="width"?_4(ga(m,{fontSize:t,letterSpacing:r}),y,f):ga(m,{fontSize:t,letterSpacing:r})[h]},v=a.length>=2?$t(a[1].coordinate-a[0].coordinate):1,g=E4(i,v,h);return l==="equidistantPreserveStart"?$4(v,g,p,a,o):(l==="preserveStart"||l==="preserveStartEnd"?d=D4(v,g,p,a,o,l==="preserveStartEnd"):d=N4(v,g,p,a,o),d.filter(function(O){return O.isShow}))}var I4=["viewBox"],L4=["viewBox"],R4=["ticks"];function Bn(e){"@babel/helpers - typeof";return Bn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bn(e)}function Fn(){return Fn=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},Fn.apply(this,arguments)}function ig(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Je(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ig(Object(r),!0).forEach(function(n){Ic(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ig(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Nc(e,t){if(e==null)return{};var r=B4(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function B4(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 F4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function og(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,lg(n.key),n)}}function W4(e,t,r){return t&&og(e.prototype,t),r&&og(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function U4(e,t,r){return t=hs(t),z4(e,sg()?Reflect.construct(t,r||[],hs(e).constructor):t.apply(e,r))}function z4(e,t){if(t&&(Bn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return G4(e)}function G4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sg=function(){return!!e})()}function hs(e){return hs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},hs(e)}function q4(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&&Dc(e,t)}function Dc(e,t){return Dc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Dc(e,t)}function Ic(e,t,r){return t=lg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lg(e){var t=K4(e,"string");return Bn(t)=="symbol"?t:t+""}function K4(e,t){if(Bn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Bn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Wn=function(e){function t(r){var n;return F4(this,t),n=U4(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return q4(t,e),W4(t,[{key:"shouldComponentUpdate",value:function(n,a){var i=n.viewBox,o=Nc(n,I4),s=this.props,l=s.viewBox,u=Nc(s,L4);return!on(i,l)||!on(o,u)||!on(a,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var a=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var a=this.props,i=a.x,o=a.y,s=a.width,l=a.height,u=a.orientation,c=a.tickSize,f=a.mirror,d=a.tickMargin,h,y,p,v,g,O,x=f?-1:1,A=n.tickSize||c,m=X(n.tickCoord)?n.tickCoord:n.coordinate;switch(u){case"top":h=y=n.coordinate,v=o+ +!f*l,p=v-x*A,O=p-x*d,g=m;break;case"left":p=v=n.coordinate,y=i+ +!f*s,h=y-x*A,g=h-x*d,O=m;break;case"right":p=v=n.coordinate,y=i+ +f*s,h=y+x*A,g=h+x*d,O=m;break;default:h=y=n.coordinate,v=o+ +f*l,p=v+x*A,O=p+x*d,g=m;break}return{line:{x1:h,y1:p,x2:y,y2:v},tick:{x:g,y:O}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,o;switch(a){case"left":o=i?"start":"end";break;case"right":o=i?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,o="end";switch(a){case"left":case"right":o="middle";break;case"top":o=i?"start":"end";break;default:o=i?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,l=n.orientation,u=n.mirror,c=n.axisLine,f=Je(Je(Je({},fe(this.props,!1)),fe(c,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var d=+(l==="top"&&!u||l==="bottom"&&u);f=Je(Je({},f),{},{x1:a,y1:i+d*s,x2:a+o,y2:i+d*s})}else{var h=+(l==="left"&&!u||l==="right"&&u);f=Je(Je({},f),{},{x1:a+h*o,y1:i,x2:a+h*o,y2:i+s})}return S.createElement("line",Fn({},f,{className:pe("recharts-cartesian-axis-line",xt(c,"className"))}))}},{key:"renderTicks",value:function(n,a,i){var o=this,s=this.props,l=s.tickLine,u=s.stroke,c=s.tick,f=s.tickFormatter,d=s.unit,h=kc(Je(Je({},this.props),{},{ticks:n}),a,i),y=this.getTickTextAnchor(),p=this.getTickVerticalAnchor(),v=fe(this.props,!1),g=fe(c,!1),O=Je(Je({},v),{},{fill:"none"},fe(l,!1)),x=h.map(function(A,m){var w=o.getTickLineCoord(A),T=w.line,_=w.tick,$=Je(Je(Je(Je({textAnchor:y,verticalAnchor:p},v),{},{stroke:"none",fill:u},g),_),{},{index:m,payload:A,visibleTicksCount:h.length,tickFormatter:f});return S.createElement(be,Fn({className:"recharts-cartesian-axis-tick",key:"tick-".concat(A.value,"-").concat(A.coordinate,"-").concat(A.tickCoord)},ua(o.props,A,m)),l&&S.createElement("line",Fn({},O,T,{className:pe("recharts-cartesian-axis-tick-line",xt(l,"className"))})),c&&t.renderTickItem(c,$,"".concat(de(f)?f(A.value,m):A.value).concat(d||"")))});return S.createElement("g",{className:"recharts-cartesian-axis-ticks"},x)}},{key:"render",value:function(){var n=this,a=this.props,i=a.axisLine,o=a.width,s=a.height,l=a.ticksGenerator,u=a.className,c=a.hide;if(c)return null;var f=this.props,d=f.ticks,h=Nc(f,R4),y=d;return de(l)&&(y=d&&d.length>0?l(this.props):l(h)),o<=0||s<=0||!y||!y.length?null:S.createElement(be,{className:pe("recharts-cartesian-axis",u),ref:function(v){n.layerReference=v}},i&&this.renderAxisLine(),this.renderTicks(y,this.state.fontSize,this.state.letterSpacing),nt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,a,i){var o,s=pe(a.className,"recharts-cartesian-axis-tick-value");return S.isValidElement(n)?o=S.cloneElement(n,Je(Je({},a),{},{className:s})):de(n)?o=n(Je(Je({},a),{},{className:s})):o=S.createElement(so,Fn({},a,{className:"recharts-cartesian-axis-tick-value"}),i),o}}])}(S.Component);Ic(Wn,"displayName","CartesianAxis"),Ic(Wn,"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 V4=["x1","y1","x2","y2","key"],H4=["offset"];function qr(e){"@babel/helpers - typeof";return qr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qr(e)}function ug(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function it(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ug(Object(r),!0).forEach(function(n){Y4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ug(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Y4(e,t,r){return t=X4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X4(e){var t=J4(e,"string");return qr(t)=="symbol"?t:t+""}function J4(e,t){if(qr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kr(){return Kr=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},Kr.apply(this,arguments)}function cg(e,t){if(e==null)return{};var r=Z4(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Z4(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 Q4=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,a=t.x,i=t.y,o=t.width,s=t.height,l=t.ry;return S.createElement("rect",{x:a,y:i,ry:l,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function fg(e,t){var r;if(S.isValidElement(e))r=S.cloneElement(e,t);else if(de(e))r=e(t);else{var n=t.x1,a=t.y1,i=t.x2,o=t.y2,s=t.key,l=cg(t,V4),u=fe(l,!1);u.offset;var c=cg(u,H4);r=S.createElement("line",Kr({},c,{x1:n,y1:a,x2:i,y2:o,fill:"none",key:s}))}return r}function e6(e){var t=e.x,r=e.width,n=e.horizontal,a=n===void 0?!0:n,i=e.horizontalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(s,l){var u=it(it({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(l),index:l});return fg(a,u)});return S.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function t6(e){var t=e.y,r=e.height,n=e.vertical,a=n===void 0?!0:n,i=e.verticalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(s,l){var u=it(it({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(l),index:l});return fg(a,u)});return S.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function r6(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,i=e.width,o=e.height,s=e.horizontalPoints,l=e.horizontal,u=l===void 0?!0:l;if(!u||!t||!t.length)return null;var c=s.map(function(d){return Math.round(d+a-a)}).sort(function(d,h){return d-h});a!==c[0]&&c.unshift(0);var f=c.map(function(d,h){var y=!c[h+1],p=y?a+o-d:c[h+1]-d;if(p<=0)return null;var v=h%t.length;return S.createElement("rect",{key:"react-".concat(h),y:d,x:n,height:p,width:i,stroke:"none",fill:t[v],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return S.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function n6(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,i=e.x,o=e.y,s=e.width,l=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var c=u.map(function(d){return Math.round(d+i-i)}).sort(function(d,h){return d-h});i!==c[0]&&c.unshift(0);var f=c.map(function(d,h){var y=!c[h+1],p=y?i+s-d:c[h+1]-d;if(p<=0)return null;var v=h%n.length;return S.createElement("rect",{key:"react-".concat(h),x:d,y:o,width:p,height:l,stroke:"none",fill:n[v],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return S.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var a6=function(t,r){var n=t.xAxis,a=t.width,i=t.height,o=t.offset;return Hv(kc(it(it(it({},Wn.defaultProps),n),{},{ticks:or(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.left,o.left+o.width,r)},i6=function(t,r){var n=t.yAxis,a=t.width,i=t.height,o=t.offset;return Hv(kc(it(it(it({},Wn.defaultProps),n),{},{ticks:or(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.top,o.top+o.height,r)},Un={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function dg(e){var t,r,n,a,i,o,s=Sc(),l=Ac(),u=KB(),c=it(it({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Un.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Un.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:Un.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:Un.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:Un.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Un.verticalFill,x:X(e.x)?e.x:u.left,y:X(e.y)?e.y:u.top,width:X(e.width)?e.width:u.width,height:X(e.height)?e.height:u.height}),f=c.x,d=c.y,h=c.width,y=c.height,p=c.syncWithTicks,v=c.horizontalValues,g=c.verticalValues,O=zB(),x=GB();if(!X(h)||h<=0||!X(y)||y<=0||!X(f)||f!==+f||!X(d)||d!==+d)return null;var A=c.verticalCoordinatesGenerator||a6,m=c.horizontalCoordinatesGenerator||i6,w=c.horizontalPoints,T=c.verticalPoints;if((!w||!w.length)&&de(m)){var _=v&&v.length,$=m({yAxis:x?it(it({},x),{},{ticks:_?v:x.ticks}):void 0,width:s,height:l,offset:u},_?!0:p);Jt(Array.isArray($),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(qr($),"]")),Array.isArray($)&&(w=$)}if((!T||!T.length)&&de(A)){var R=g&&g.length,P=A({xAxis:O?it(it({},O),{},{ticks:R?g:O.ticks}):void 0,width:s,height:l,offset:u},R?!0:p);Jt(Array.isArray(P),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(qr(P),"]")),Array.isArray(P)&&(T=P)}return S.createElement("g",{className:"recharts-cartesian-grid"},S.createElement(Q4,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),S.createElement(e6,Kr({},c,{offset:u,horizontalPoints:w,xAxis:O,yAxis:x})),S.createElement(t6,Kr({},c,{offset:u,verticalPoints:T,xAxis:O,yAxis:x})),S.createElement(r6,Kr({},c,{horizontalPoints:w})),S.createElement(n6,Kr({},c,{verticalPoints:T})))}dg.displayName="CartesianGrid";var o6=["type","layout","connectNulls","ref"],s6=["key"];function zn(e){"@babel/helpers - typeof";return zn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zn(e)}function hg(e,t){if(e==null)return{};var r=l6(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function l6(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 si(){return si=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},si.apply(this,arguments)}function pg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function yt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pg(Object(r),!0).forEach(function(n){It(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Gn(e){return d6(e)||f6(e)||c6(e)||u6()}function u6(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
122
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c6(e,t){if(e){if(typeof e=="string")return Lc(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 Lc(e,t)}}function f6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function d6(e){if(Array.isArray(e))return Lc(e)}function Lc(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 h6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vg(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,mg(n.key),n)}}function p6(e,t,r){return t&&vg(e.prototype,t),r&&vg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v6(e,t,r){return t=ps(t),y6(e,yg()?Reflect.construct(t,r||[],ps(e).constructor):t.apply(e,r))}function y6(e,t){if(t&&(zn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return m6(e)}function m6(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yg=function(){return!!e})()}function ps(e){return ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ps(e)}function g6(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&&Rc(e,t)}function Rc(e,t){return Rc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Rc(e,t)}function It(e,t,r){return t=mg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mg(e){var t=b6(e,"string");return zn(t)=="symbol"?t:t+""}function b6(e,t){if(zn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(zn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var li=function(e){function t(){var r;h6(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=v6(this,t,[].concat(a)),It(r,"state",{isAnimationFinished:!0,totalLength:0}),It(r,"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),It(r,"getStrokeDasharray",function(o,s,l){var u=l.reduce(function(g,O){return g+O});if(!u)return r.generateSimpleStrokeDasharray(s,o);for(var c=Math.floor(o/u),f=o%u,d=s-o,h=[],y=0,p=0;y<l.length;p+=l[y],++y)if(p+l[y]>f){h=[].concat(Gn(l.slice(0,y)),[f-p]);break}var v=h.length%2===0?[0,d]:[d];return[].concat(Gn(t.repeat(l,c)),Gn(h),v).map(function(g){return"".concat(g,"px")}).join(", ")}),It(r,"id",jr("recharts-line-")),It(r,"pathRef",function(o){r.mainCurve=o}),It(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),It(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return g6(t,e),p6(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.points,s=i.xAxis,l=i.yAxis,u=i.layout,c=i.children,f=ut(c,_n);if(!f)return null;var d=function(p,v){return{x:p.x,y:p.y,value:p.value,errorVal:Ye(p.payload,v)}},h={clipPath:n?"url(#clipPath-".concat(a,")"):null};return S.createElement(be,h,f.map(function(y){return S.cloneElement(y,{key:"bar-".concat(y.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,dataPointFormatter:d})}))}},{key:"renderDots",value:function(n,a,i){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,u=s.points,c=s.dataKey,f=fe(this.props,!1),d=fe(l,!0),h=u.map(function(p,v){var g=yt(yt(yt({key:"dot-".concat(v),r:3},f),d),{},{index:v,cx:p.x,cy:p.y,value:p.value,dataKey:c,payload:p.payload,points:u});return t.renderDotItem(l,g)}),y={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return S.createElement(be,si({className:"recharts-line-dots",key:"dots"},y),h)}},{key:"renderCurveStatically",value:function(n,a,i,o){var s=this.props,l=s.type,u=s.layout,c=s.connectNulls;s.ref;var f=hg(s,o6),d=yt(yt(yt({},fe(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:a?"url(#clipPath-".concat(i,")"):null,points:n},o),{},{type:l,layout:u,connectNulls:c});return S.createElement(zr,si({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,a){var i=this,o=this.props,s=o.points,l=o.strokeDasharray,u=o.isAnimationActive,c=o.animationBegin,f=o.animationDuration,d=o.animationEasing,h=o.animationId,y=o.animateNewValues,p=o.width,v=o.height,g=this.state,O=g.prevPoints,x=g.totalLength;return S.createElement(Nt,{begin:c,duration:f,isActive:u,easing:d,from:{t:0},to:{t:1},key:"line-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(A){var m=A.t;if(O){var w=O.length/s.length,T=s.map(function(j,L){var B=Math.floor(L*w);if(O[B]){var M=O[B],E=We(M.x,j.x),F=We(M.y,j.y);return yt(yt({},j),{},{x:E(m),y:F(m)})}if(y){var U=We(p*2,j.x),k=We(v/2,j.y);return yt(yt({},j),{},{x:U(m),y:k(m)})}return yt(yt({},j),{},{x:j.x,y:j.y})});return i.renderCurveStatically(T,n,a)}var _=We(0,x),$=_(m),R;if(l){var P="".concat(l).split(/[,\s]+/gim).map(function(j){return parseFloat(j)});R=i.getStrokeDasharray($,x,P)}else R=i.generateSimpleStrokeDasharray(x,$);return i.renderCurveStatically(s,n,a,{strokeDasharray:R})})}},{key:"renderCurve",value:function(n,a){var i=this.props,o=i.points,s=i.isAnimationActive,l=this.state,u=l.prevPoints,c=l.totalLength;return s&&o&&o.length&&(!u&&c>0||!Rr(u,o))?this.renderCurveWithAnimation(n,a):this.renderCurveStatically(o,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,o=a.dot,s=a.points,l=a.className,u=a.xAxis,c=a.yAxis,f=a.top,d=a.left,h=a.width,y=a.height,p=a.isAnimationActive,v=a.id;if(i||!s||!s.length)return null;var g=this.state.isAnimationFinished,O=s.length===1,x=pe("recharts-line",l),A=u&&u.allowDataOverflow,m=c&&c.allowDataOverflow,w=A||m,T=ue(v)?this.id:v,_=(n=fe(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},$=_.r,R=$===void 0?3:$,P=_.strokeWidth,j=P===void 0?2:P,L=Ff(o)?o:{},B=L.clipDot,M=B===void 0?!0:B,E=R*2+j;return S.createElement(be,{className:x},A||m?S.createElement("defs",null,S.createElement("clipPath",{id:"clipPath-".concat(T)},S.createElement("rect",{x:A?d:d-h/2,y:m?f:f-y/2,width:A?h:h*2,height:m?y:y*2})),!M&&S.createElement("clipPath",{id:"clipPath-dots-".concat(T)},S.createElement("rect",{x:d-E/2,y:f-E/2,width:h+E,height:y+E}))):null,!O&&this.renderCurve(w,T),this.renderErrorBar(w,T),(O||o)&&this.renderDots(w,M,T),(!p||g)&&qt.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,a){for(var i=n.length%2!==0?[].concat(Gn(n),[0]):n,o=[],s=0;s<a;++s)o=[].concat(Gn(o),Gn(i));return o}},{key:"renderDotItem",value:function(n,a){var i;if(S.isValidElement(n))i=S.cloneElement(n,a);else if(de(n))i=n(a);else{var o=a.key,s=hg(a,s6),l=pe("recharts-line-dot",typeof n!="boolean"?n.className:"");i=S.createElement(Vo,si({key:o},s,{className:l}))}return i}}])}(S.PureComponent);It(li,"displayName","Line"),It(li,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!dr.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),It(li,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,o=e.dataKey,s=e.bandSize,l=e.displayedData,u=e.offset,c=t.layout,f=l.map(function(d,h){var y=Ye(d,o);return c==="horizontal"?{x:jn({axis:r,ticks:a,bandSize:s,entry:d,index:h}),y:ue(y)?null:n.scale(y),value:y,payload:d}:{x:ue(y)?null:r.scale(y),y:jn({axis:n,ticks:i,bandSize:s,entry:d,index:h}),value:y,payload:d}});return yt({points:f,layout:c},u)});var x6=["layout","type","stroke","connectNulls","isRange","ref"],w6=["key"],gg;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 bg(e,t){if(e==null)return{};var r=O6(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function O6(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 Vr(){return Vr=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},Vr.apply(this,arguments)}function xg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function xr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xg(Object(r),!0).forEach(function(n){Vt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function S6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Sg(n.key),n)}}function A6(e,t,r){return t&&wg(e.prototype,t),r&&wg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function T6(e,t,r){return t=vs(t),P6(e,Og()?Reflect.construct(t,r||[],vs(e).constructor):t.apply(e,r))}function P6(e,t){if(t&&(qn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _6(e)}function _6(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Og(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Og=function(){return!!e})()}function vs(e){return vs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},vs(e)}function E6(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&&Bc(e,t)}function Bc(e,t){return Bc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Bc(e,t)}function Vt(e,t,r){return t=Sg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sg(e){var t=j6(e,"string");return qn(t)=="symbol"?t:t+""}function j6(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 String(e)}var wr=function(e){function t(){var r;S6(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=T6(this,t,[].concat(a)),Vt(r,"state",{isAnimationFinished:!0}),Vt(r,"id",jr("recharts-area-")),Vt(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),de(o)&&o()}),Vt(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),de(o)&&o()}),r}return E6(t,e),A6(t,[{key:"renderDots",value:function(n,a,i){var o=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(o&&!s)return null;var l=this.props,u=l.dot,c=l.points,f=l.dataKey,d=fe(this.props,!1),h=fe(u,!0),y=c.map(function(v,g){var O=xr(xr(xr({key:"dot-".concat(g),r:3},d),h),{},{index:g,cx:v.x,cy:v.y,dataKey:f,value:v.value,payload:v.payload,points:c});return t.renderDotItem(u,O)}),p={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return S.createElement(be,Vr({className:"recharts-area-dots"},p),y)}},{key:"renderHorizontalRect",value:function(n){var a=this.props,i=a.baseLine,o=a.points,s=a.strokeWidth,l=o[0].x,u=o[o.length-1].x,c=n*Math.abs(l-u),f=yr(o.map(function(d){return d.y||0}));return X(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(yr(i.map(function(d){return d.y||0})),f)),X(f)?S.createElement("rect",{x:l<u?l:l-c,y:0,width:c,height:Math.floor(f+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var a=this.props,i=a.baseLine,o=a.points,s=a.strokeWidth,l=o[0].y,u=o[o.length-1].y,c=n*Math.abs(l-u),f=yr(o.map(function(d){return d.x||0}));return X(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(yr(i.map(function(d){return d.x||0})),f)),X(f)?S.createElement("rect",{x:0,y:l<u?l:l-c,width:f+(s?parseInt("".concat(s),10):1),height:Math.floor(c)}):null}},{key:"renderClipRect",value:function(n){var a=this.props.layout;return a==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,a,i,o){var s=this.props,l=s.layout,u=s.type,c=s.stroke,f=s.connectNulls,d=s.isRange;s.ref;var h=bg(s,x6);return S.createElement(be,{clipPath:i?"url(#clipPath-".concat(o,")"):null},S.createElement(zr,Vr({},fe(h,!0),{points:n,connectNulls:f,type:u,baseLine:a,layout:l,stroke:"none",className:"recharts-area-area"})),c!=="none"&&S.createElement(zr,Vr({},fe(this.props,!1),{className:"recharts-area-curve",layout:l,type:u,connectNulls:f,fill:"none",points:n})),c!=="none"&&d&&S.createElement(zr,Vr({},fe(this.props,!1),{className:"recharts-area-curve",layout:l,type:u,connectNulls:f,fill:"none",points:a})))}},{key:"renderAreaWithAnimation",value:function(n,a){var i=this,o=this.props,s=o.points,l=o.baseLine,u=o.isAnimationActive,c=o.animationBegin,f=o.animationDuration,d=o.animationEasing,h=o.animationId,y=this.state,p=y.prevPoints,v=y.prevBaseLine;return S.createElement(Nt,{begin:c,duration:f,isActive:u,easing:d,from:{t:0},to:{t:1},key:"area-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(g){var O=g.t;if(p){var x=p.length/s.length,A=s.map(function(_,$){var R=Math.floor($*x);if(p[R]){var P=p[R],j=We(P.x,_.x),L=We(P.y,_.y);return xr(xr({},_),{},{x:j(O),y:L(O)})}return _}),m;if(X(l)&&typeof l=="number"){var w=We(v,l);m=w(O)}else if(ue(l)||an(l)){var T=We(v,0);m=T(O)}else m=l.map(function(_,$){var R=Math.floor($*x);if(v[R]){var P=v[R],j=We(P.x,_.x),L=We(P.y,_.y);return xr(xr({},_),{},{x:j(O),y:L(O)})}return _});return i.renderAreaStatically(A,m,n,a)}return S.createElement(be,null,S.createElement("defs",null,S.createElement("clipPath",{id:"animationClipPath-".concat(a)},i.renderClipRect(O))),S.createElement(be,{clipPath:"url(#animationClipPath-".concat(a,")")},i.renderAreaStatically(s,l,n,a)))})}},{key:"renderArea",value:function(n,a){var i=this.props,o=i.points,s=i.baseLine,l=i.isAnimationActive,u=this.state,c=u.prevPoints,f=u.prevBaseLine,d=u.totalLength;return l&&o&&o.length&&(!c&&d>0||!Rr(c,o)||!Rr(f,s))?this.renderAreaWithAnimation(n,a):this.renderAreaStatically(o,s,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,o=a.dot,s=a.points,l=a.className,u=a.top,c=a.left,f=a.xAxis,d=a.yAxis,h=a.width,y=a.height,p=a.isAnimationActive,v=a.id;if(i||!s||!s.length)return null;var g=this.state.isAnimationFinished,O=s.length===1,x=pe("recharts-area",l),A=f&&f.allowDataOverflow,m=d&&d.allowDataOverflow,w=A||m,T=ue(v)?this.id:v,_=(n=fe(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},$=_.r,R=$===void 0?3:$,P=_.strokeWidth,j=P===void 0?2:P,L=Ff(o)?o:{},B=L.clipDot,M=B===void 0?!0:B,E=R*2+j;return S.createElement(be,{className:x},A||m?S.createElement("defs",null,S.createElement("clipPath",{id:"clipPath-".concat(T)},S.createElement("rect",{x:A?c:c-h/2,y:m?u:u-y/2,width:A?h:h*2,height:m?y:y*2})),!M&&S.createElement("clipPath",{id:"clipPath-dots-".concat(T)},S.createElement("rect",{x:c-E/2,y:u-E/2,width:h+E,height:y+E}))):null,O?null:this.renderArea(w,T),(o||O)&&this.renderDots(w,M,T),(!p||g)&&qt.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:a.curPoints,prevBaseLine:a.curBaseLine}:n.points!==a.curPoints||n.baseLine!==a.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])}(S.PureComponent);gg=wr,Vt(wr,"displayName","Area"),Vt(wr,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!dr.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),Vt(wr,"getBaseValue",function(e,t,r,n){var a=e.layout,i=e.baseValue,o=t.props.baseValue,s=o??i;if(X(s)&&typeof s=="number")return s;var l=a==="horizontal"?n:r,u=l.scale.domain();if(l.type==="number"){var c=Math.max(u[0],u[1]),f=Math.min(u[0],u[1]);return s==="dataMin"?f:s==="dataMax"||c<0?c:Math.max(Math.min(u[0],u[1]),0)}return s==="dataMin"?u[0]:s==="dataMax"?u[1]:u[0]}),Vt(wr,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,a=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,l=e.dataKey,u=e.stackedData,c=e.dataStartIndex,f=e.displayedData,d=e.offset,h=t.layout,y=u&&u.length,p=gg.getBaseValue(t,r,n,a),v=h==="horizontal",g=!1,O=f.map(function(A,m){var w;y?w=u[c+m]:(w=Ye(A,l),Array.isArray(w)?g=!0:w=[p,w]);var T=w[1]==null||y&&Ye(A,l)==null;return v?{x:jn({axis:n,ticks:i,bandSize:s,entry:A,index:m}),y:T?null:a.scale(w[1]),value:w,payload:A}:{x:T?null:n.scale(w[1]),y:jn({axis:a,ticks:o,bandSize:s,entry:A,index:m}),value:w,payload:A}}),x;return y||g?x=O.map(function(A){var m=Array.isArray(A.value)?A.value[0]:null;return v?{x:A.x,y:m!=null&&A.y!=null?a.scale(m):null}:{x:m!=null?n.scale(m):null,y:A.y}}):x=v?a.scale(p):n.scale(p),xr({points:O,baseLine:x,layout:h,isRange:g},d)}),Vt(wr,"renderDotItem",function(e,t){var r;if(S.isValidElement(e))r=S.cloneElement(e,t);else if(de(e))r=e(t);else{var n=pe("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=bg(t,w6);r=S.createElement(Vo,Vr({},i,{key:a,className:n}))}return r});function Kn(e){"@babel/helpers - typeof";return Kn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kn(e)}function $6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C6(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,Pg(n.key),n)}}function M6(e,t,r){return t&&C6(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function k6(e,t,r){return t=ys(t),N6(e,Ag()?Reflect.construct(t,r||[],ys(e).constructor):t.apply(e,r))}function N6(e,t){if(t&&(Kn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return D6(e)}function D6(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ag(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ag=function(){return!!e})()}function ys(e){return ys=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ys(e)}function I6(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fc(e,t)}function Fc(e,t){return Fc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Fc(e,t)}function Tg(e,t,r){return t=Pg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pg(e){var t=L6(e,"string");return Kn(t)=="symbol"?t:t+""}function L6(e,t){if(Kn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Kn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ms=function(e){function t(){return $6(this,t),k6(this,t,arguments)}return I6(t,e),M6(t,[{key:"render",value:function(){return null}}])}(bt.Component);Tg(ms,"displayName","ZAxis"),Tg(ms,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var R6=["option","isActive"];function ui(){return ui=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},ui.apply(this,arguments)}function B6(e,t){if(e==null)return{};var r=F6(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function F6(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 W6(e){var t=e.option,r=e.isActive,n=B6(e,R6);return typeof t=="string"?bt.createElement(pc,ui({option:bt.createElement(qi,ui({type:t},n)),isActive:r,shapeType:"symbols"},n)):bt.createElement(pc,ui({option:t,isActive:r,shapeType:"symbols"},n))}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 ci(){return ci=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},ci.apply(this,arguments)}function _g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).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?_g(Object(r),!0).forEach(function(n){Or(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_g(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function U6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eg(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,$g(n.key),n)}}function z6(e,t,r){return t&&Eg(e.prototype,t),r&&Eg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function G6(e,t,r){return t=gs(t),q6(e,jg()?Reflect.construct(t,r||[],gs(e).constructor):t.apply(e,r))}function q6(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 K6(e)}function K6(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jg=function(){return!!e})()}function gs(e){return gs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},gs(e)}function V6(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&&Wc(e,t)}function Wc(e,t){return Wc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Wc(e,t)}function Or(e,t,r){return t=$g(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $g(e){var t=H6(e,"string");return Vn(t)=="symbol"?t:t+""}function H6(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 bs=function(e){function t(){var r;U6(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=G6(this,t,[].concat(a)),Or(r,"state",{isAnimationFinished:!1}),Or(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0})}),Or(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1})}),Or(r,"id",jr("recharts-scatter-")),r}return V6(t,e),z6(t,[{key:"renderSymbolsStatically",value:function(n){var a=this,i=this.props,o=i.shape,s=i.activeShape,l=i.activeIndex,u=fe(this.props,!1);return n.map(function(c,f){var d=l===f,h=d?s:o,y=_t(_t({},u),c);return S.createElement(be,ci({className:"recharts-scatter-symbol",key:"symbol-".concat(c==null?void 0:c.cx,"-").concat(c==null?void 0:c.cy,"-").concat(c==null?void 0:c.size,"-").concat(f)},ua(a.props,c,f),{role:"img"}),S.createElement(W6,ci({option:h,isActive:d,key:"symbol-".concat(f)},y)))})}},{key:"renderSymbolsWithAnimation",value:function(){var n=this,a=this.props,i=a.points,o=a.isAnimationActive,s=a.animationBegin,l=a.animationDuration,u=a.animationEasing,c=a.animationId,f=this.state.prevPoints;return S.createElement(Nt,{begin:s,duration:l,isActive:o,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(c),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(d){var h=d.t,y=i.map(function(p,v){var g=f&&f[v];if(g){var O=We(g.cx,p.cx),x=We(g.cy,p.cy),A=We(g.size,p.size);return _t(_t({},p),{},{cx:O(h),cy:x(h),size:A(h)})}var m=We(0,p.size);return _t(_t({},p),{},{size:m(h)})});return S.createElement(be,null,n.renderSymbolsStatically(y))})}},{key:"renderSymbols",value:function(){var n=this.props,a=n.points,i=n.isAnimationActive,o=this.state.prevPoints;return i&&a&&a.length&&(!o||!Rr(o,a))?this.renderSymbolsWithAnimation():this.renderSymbolsStatically(a)}},{key:"renderErrorBar",value:function(){var n=this.props.isAnimationActive;if(n&&!this.state.isAnimationFinished)return null;var a=this.props,i=a.points,o=a.xAxis,s=a.yAxis,l=a.children,u=ut(l,_n);return u?u.map(function(c,f){var d=c.props,h=d.direction,y=d.dataKey;return S.cloneElement(c,{key:"".concat(h,"-").concat(y,"-").concat(i[f]),data:i,xAxis:o,yAxis:s,layout:h==="x"?"vertical":"horizontal",dataPointFormatter:function(v,g){return{x:v.cx,y:v.cy,value:h==="x"?+v.node.x:+v.node.y,errorVal:Ye(v,g)}}})}):null}},{key:"renderLine",value:function(){var n=this.props,a=n.points,i=n.line,o=n.lineType,s=n.lineJointType,l=fe(this.props,!1),u=fe(i,!1),c,f;if(o==="joint")c=a.map(function(x){return{x:x.cx,y:x.cy}});else if(o==="fitting"){var d=b1(a),h=d.xmin,y=d.xmax,p=d.a,v=d.b,g=function(A){return p*A+v};c=[{x:h,y:g(h)},{x:y,y:g(y)}]}var O=_t(_t(_t({},l),{},{fill:"none",stroke:l&&l.fill},u),{},{points:c});return S.isValidElement(i)?f=S.cloneElement(i,O):de(i)?f=i(O):f=S.createElement(zr,ci({},O,{type:s})),S.createElement(be,{className:"recharts-scatter-line",key:"recharts-scatter-line"},f)}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.points,o=n.line,s=n.className,l=n.xAxis,u=n.yAxis,c=n.left,f=n.top,d=n.width,h=n.height,y=n.id,p=n.isAnimationActive;if(a||!i||!i.length)return null;var v=this.state.isAnimationFinished,g=pe("recharts-scatter",s),O=l&&l.allowDataOverflow,x=u&&u.allowDataOverflow,A=O||x,m=ue(y)?this.id:y;return S.createElement(be,{className:g,clipPath:A?"url(#clipPath-".concat(m,")"):null},O||x?S.createElement("defs",null,S.createElement("clipPath",{id:"clipPath-".concat(m)},S.createElement("rect",{x:O?c:c-d/2,y:x?f:f-h/2,width:O?d:d*2,height:x?h:h*2}))):null,o&&this.renderLine(),this.renderErrorBar(),S.createElement(be,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!p||v)&&qt.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}}])}(S.PureComponent);Or(bs,"displayName","Scatter"),Or(bs,"defaultProps",{xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!dr.isSsr,animationBegin:0,animationDuration:400,animationEasing:"linear"}),Or(bs,"getComposedData",function(e){var t=e.xAxis,r=e.yAxis,n=e.zAxis,a=e.item,i=e.displayedData,o=e.xAxisTicks,s=e.yAxisTicks,l=e.offset,u=a.props.tooltipType,c=ut(a.props.children,zl),f=ue(t.dataKey)?a.props.dataKey:t.dataKey,d=ue(r.dataKey)?a.props.dataKey:r.dataKey,h=n&&n.dataKey,y=n?n.range:ms.defaultProps.range,p=y&&y[0],v=t.scale.bandwidth?t.scale.bandwidth():0,g=r.scale.bandwidth?r.scale.bandwidth():0,O=i.map(function(x,A){var m=Ye(x,f),w=Ye(x,d),T=!ue(h)&&Ye(x,h)||"-",_=[{name:ue(t.dataKey)?a.props.name:t.name||t.dataKey,unit:t.unit||"",value:m,payload:x,dataKey:f,type:u},{name:ue(r.dataKey)?a.props.name:r.name||r.dataKey,unit:r.unit||"",value:w,payload:x,dataKey:d,type:u}];T!=="-"&&_.push({name:n.name||n.dataKey,unit:n.unit||"",value:T,payload:x,dataKey:h,type:u});var $=jn({axis:t,ticks:o,bandSize:v,entry:x,index:A,dataKey:f}),R=jn({axis:r,ticks:s,bandSize:g,entry:x,index:A,dataKey:d}),P=T!=="-"?n.scale(T):p,j=Math.sqrt(Math.max(P,0)/Math.PI);return _t(_t({},x),{},{cx:$,cy:R,x:$-j,y:R-j,xAxis:t,yAxis:r,zAxis:n,width:2*j,height:2*j,size:P,node:{x:m,y:w,z:T},tooltipPayload:_,tooltipPosition:{x:$,y:R},payload:x},c&&c[A]&&c[A].props)});return _t({points:O},l)});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 Y6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X6(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,kg(n.key),n)}}function J6(e,t,r){return t&&X6(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Z6(e,t,r){return t=xs(t),Q6(e,Cg()?Reflect.construct(t,r||[],xs(e).constructor):t.apply(e,r))}function Q6(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 eF(e)}function eF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Cg=function(){return!!e})()}function xs(e){return xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xs(e)}function tF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Uc(e,t)}function Uc(e,t){return Uc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Uc(e,t)}function Mg(e,t,r){return t=kg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kg(e){var t=rF(e,"string");return Hn(t)=="symbol"?t:t+""}function rF(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 zc(){return zc=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},zc.apply(this,arguments)}function nF(e){var t=e.xAxisId,r=Sc(),n=Ac(),a=Um(t);return a==null?null:bt.createElement(Wn,zc({},a,{className:pe("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return or(o,!0)}}))}var ws=function(e){function t(){return Y6(this,t),Z6(this,t,arguments)}return tF(t,e),J6(t,[{key:"render",value:function(){return bt.createElement(nF,this.props)}}])}(bt.Component);Mg(ws,"displayName","XAxis"),Mg(ws,"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 Yn(e){"@babel/helpers - typeof";return Yn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yn(e)}function aF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iF(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,Ig(n.key),n)}}function oF(e,t,r){return t&&iF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function sF(e,t,r){return t=Os(t),lF(e,Ng()?Reflect.construct(t,r||[],Os(e).constructor):t.apply(e,r))}function lF(e,t){if(t&&(Yn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uF(e)}function uF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ng(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ng=function(){return!!e})()}function Os(e){return Os=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Os(e)}function cF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gc(e,t)}function Gc(e,t){return Gc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Gc(e,t)}function Dg(e,t,r){return t=Ig(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ig(e){var t=fF(e,"string");return Yn(t)=="symbol"?t:t+""}function fF(e,t){if(Yn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Yn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function qc(){return qc=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},qc.apply(this,arguments)}var dF=function(t){var r=t.yAxisId,n=Sc(),a=Ac(),i=zm(r);return i==null?null:bt.createElement(Wn,qc({},i,{className:pe("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:a},ticksGenerator:function(s){return or(s,!0)}}))},Ss=function(e){function t(){return aF(this,t),sF(this,t,arguments)}return cF(t,e),oF(t,[{key:"render",value:function(){return bt.createElement(dF,this.props)}}])}(bt.Component);Dg(Ss,"displayName","YAxis"),Dg(Ss,"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 Lg(e){return yF(e)||vF(e)||pF(e)||hF()}function hF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
123
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pF(e,t){if(e){if(typeof e=="string")return Kc(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 Kc(e,t)}}function vF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yF(e){if(Array.isArray(e))return Kc(e)}function Kc(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 Vc=function(t,r,n,a,i){var o=ut(t,Ec),s=ut(t,ls),l=[].concat(Lg(o),Lg(s)),u=ut(t,fs),c="".concat(a,"Id"),f=a[0],d=r;if(l.length&&(d=l.reduce(function(p,v){if(v.props[c]===n&&Kt(v.props,"extendDomain")&&X(v.props[f])){var g=v.props[f];return[Math.min(p[0],g),Math.max(p[1],g)]}return p},d)),u.length){var h="".concat(f,"1"),y="".concat(f,"2");d=u.reduce(function(p,v){if(v.props[c]===n&&Kt(v.props,"extendDomain")&&X(v.props[h])&&X(v.props[y])){var g=v.props[h],O=v.props[y];return[Math.min(p[0],g,O),Math.max(p[1],g,O)]}return p},d)}return i&&i.length&&(d=i.reduce(function(p,v){return X(v)?[Math.min(p[0],v),Math.max(p[1],v)]:p},d)),d},Rg={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(l,u,c){this.fn=l,this.context=u,this.once=c||!1}function i(l,u,c,f,d){if(typeof c!="function")throw new TypeError("The listener must be a function");var h=new a(c,f||l,d),y=r?r+u:u;return l._events[y]?l._events[y].fn?l._events[y]=[l._events[y],h]:l._events[y].push(h):(l._events[y]=h,l._eventsCount++),l}function o(l,u){--l._eventsCount===0?l._events=new n:delete l._events[u]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var u=[],c,f;if(this._eventsCount===0)return u;for(f in c=this._events)t.call(c,f)&&u.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},s.prototype.listeners=function(u){var c=r?r+u:u,f=this._events[c];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,h=f.length,y=new Array(h);d<h;d++)y[d]=f[d].fn;return y},s.prototype.listenerCount=function(u){var c=r?r+u:u,f=this._events[c];return f?f.fn?1:f.length:0},s.prototype.emit=function(u,c,f,d,h,y){var p=r?r+u:u;if(!this._events[p])return!1;var v=this._events[p],g=arguments.length,O,x;if(v.fn){switch(v.once&&this.removeListener(u,v.fn,void 0,!0),g){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,c),!0;case 3:return v.fn.call(v.context,c,f),!0;case 4:return v.fn.call(v.context,c,f,d),!0;case 5:return v.fn.call(v.context,c,f,d,h),!0;case 6:return v.fn.call(v.context,c,f,d,h,y),!0}for(x=1,O=new Array(g-1);x<g;x++)O[x-1]=arguments[x];v.fn.apply(v.context,O)}else{var A=v.length,m;for(x=0;x<A;x++)switch(v[x].once&&this.removeListener(u,v[x].fn,void 0,!0),g){case 1:v[x].fn.call(v[x].context);break;case 2:v[x].fn.call(v[x].context,c);break;case 3:v[x].fn.call(v[x].context,c,f);break;case 4:v[x].fn.call(v[x].context,c,f,d);break;default:if(!O)for(m=1,O=new Array(g-1);m<g;m++)O[m-1]=arguments[m];v[x].fn.apply(v[x].context,O)}}return!0},s.prototype.on=function(u,c,f){return i(this,u,c,f,!1)},s.prototype.once=function(u,c,f){return i(this,u,c,f,!0)},s.prototype.removeListener=function(u,c,f,d){var h=r?r+u:u;if(!this._events[h])return this;if(!c)return o(this,h),this;var y=this._events[h];if(y.fn)y.fn===c&&(!d||y.once)&&(!f||y.context===f)&&o(this,h);else{for(var p=0,v=[],g=y.length;p<g;p++)(y[p].fn!==c||d&&!y[p].once||f&&y[p].context!==f)&&v.push(y[p]);v.length?this._events[h]=v.length===1?v[0]:v:o(this,h)}return this},s.prototype.removeAllListeners=function(u){var c;return u?(c=r?r+u:u,this._events[c]&&o(this,c)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s})(Rg);var mF=Rg.exports;const gF=ke(mF);var Hc=new gF,Yc="recharts.syncMouseEvents";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 bF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xF(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Bg(n.key),n)}}function wF(e,t,r){return t&&xF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xc(e,t,r){return t=Bg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bg(e){var t=OF(e,"string");return fi(t)=="symbol"?t:t+""}function OF(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 String(e)}var SF=function(){function e(){bF(this,e),Xc(this,"activeIndex",0),Xc(this,"coordinateList",[]),Xc(this,"layout","horizontal")}return wF(e,[{key:"setDetails",value:function(r){var n,a=r.coordinateList,i=a===void 0?null:a,o=r.container,s=o===void 0?null:o,l=r.layout,u=l===void 0?null:l,c=r.offset,f=c===void 0?null:c,d=r.mouseHandlerCallback,h=d===void 0?null:d;this.coordinateList=(n=i??this.coordinateList)!==null&&n!==void 0?n:[],this.container=s??this.container,this.layout=u??this.layout,this.offset=f??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 a=this.container.getBoundingClientRect(),i=a.x,o=a.y,s=a.height,l=this.coordinateList[this.activeIndex].coordinate,u=((r=window)===null||r===void 0?void 0:r.scrollX)||0,c=((n=window)===null||n===void 0?void 0:n.scrollY)||0,f=i+l+u,d=o+this.offset.top+s/2+c;this.mouseHandlerCallback({pageX:f,pageY:d})}}}])}();function AF(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e==null?void 0:e[0],a=e==null?void 0:e[1];if(n&&a&&X(n)&&X(a))return!0}return!1}function TF(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function Fg(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,i=e.endAngle,o=tt(t,r,n,a),s=tt(t,r,n,i);return{points:[o,s],cx:t,cy:r,radius:n,startAngle:a,endAngle:i}}function PF(e,t,r){var n,a,i,o;if(e==="horizontal")n=t.x,i=n,a=r.top,o=r.top+r.height;else if(e==="vertical")a=t.y,o=a,n=r.left,i=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,l=t.cy,u=t.innerRadius,c=t.outerRadius,f=t.angle,d=tt(s,l,u,f),h=tt(s,l,c,f);n=d.x,a=d.y,i=h.x,o=h.y}else return Fg(t);return[{x:n,y:a},{x:i,y:o}]}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 Wg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function As(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){_F(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 _F(e,t,r){return t=EF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EF(e){var t=jF(e,"string");return di(t)=="symbol"?t:t+""}function jF(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 $F(e){var t,r,n=e.element,a=e.tooltipEventType,i=e.isActive,o=e.activeCoordinate,s=e.activePayload,l=e.offset,u=e.activeTooltipIndex,c=e.tooltipAxisBandSize,f=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||!i||!o||d!=="ScatterChart"&&a!=="axis")return null;var y,p=zr;if(d==="ScatterChart")y=o,p=t3;else if(d==="BarChart")y=TF(f,o,l,c),p=fc;else if(f==="radial"){var v=Fg(o),g=v.cx,O=v.cy,x=v.radius,A=v.startAngle,m=v.endAngle;y={cx:g,cy:O,startAngle:A,endAngle:m,innerRadius:x,outerRadius:x},p=hy}else y={points:PF(f,o,l)},p=zr;var w=As(As(As(As({stroke:"#ccc",pointerEvents:"none"},l),y),fe(h,!1)),{},{payload:s,payloadIndex:u,className:pe("recharts-tooltip-cursor",h.className)});return S.isValidElement(h)?S.cloneElement(h,w):S.createElement(p,w)}var CF=["item"],MF=["children","className","width","height","style","compact","title","desc"];function Xn(e){"@babel/helpers - typeof";return Xn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xn(e)}function Jn(){return Jn=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},Jn.apply(this,arguments)}function Ug(e,t){return DF(e)||NF(e,t)||qg(e,t)||kF()}function kF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
124
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NF(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function DF(e){if(Array.isArray(e))return e}function zg(e,t){if(e==null)return{};var r=IF(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function IF(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 LF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RF(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Vg(n.key),n)}}function BF(e,t,r){return t&&RF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function FF(e,t,r){return t=Ts(t),WF(e,Gg()?Reflect.construct(t,r||[],Ts(e).constructor):t.apply(e,r))}function WF(e,t){if(t&&(Xn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return UF(e)}function UF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Gg=function(){return!!e})()}function Ts(e){return Ts=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ts(e)}function zF(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&&Jc(e,t)}function Jc(e,t){return Jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Jc(e,t)}function Zn(e){return KF(e)||qF(e)||qg(e)||GF()}function GF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
125
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qg(e,t){if(e){if(typeof e=="string")return Zc(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 Zc(e,t)}}function qF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function KF(e){if(Array.isArray(e))return Zc(e)}function Zc(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 Kg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function G(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){se(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 se(e,t,r){return t=Vg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vg(e){var t=VF(e,"string");return Xn(t)=="symbol"?t:t+""}function VF(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)}var HF={xAxis:["bottom","top"],yAxis:["left","right"]},YF={width:"100%",height:"100%"},Hg={x:0,y:0};function Ps(e){return e}var XF=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},JF=function(t,r,n,a){var i=r.find(function(c){return c&&c.index===n});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var o=i.coordinate,s=a.radius;return G(G(G({},a),tt(a.cx,a.cy,s,o)),{},{angle:o,radius:s})}var l=i.coordinate,u=a.angle;return G(G(G({},a),tt(a.cx,a.cy,l,u)),{},{angle:u,radius:l})}return Hg},_s=function(t,r){var n=r.graphicalItems,a=r.dataStartIndex,i=r.dataEndIndex,o=(n??[]).reduce(function(s,l){var u=l.props.data;return u&&u.length?[].concat(Zn(s),Zn(u)):s},[]);return o.length>0?o:t&&t.length&&X(a)&&X(i)?t.slice(a,i+1):[]};function Yg(e){return e==="number"?[0,"auto"]:void 0}var Qc=function(t,r,n,a){var i=t.graphicalItems,o=t.tooltipAxis,s=_s(r,t);return n<0||!i||!i.length||n>=s.length?null:i.reduce(function(l,u){var c,f=(c=u.props.data)!==null&&c!==void 0?c:r;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var h=f===void 0?s:f;d=ki(h,o.dataKey,a)}else d=f&&f[n]||s[n];return d?[].concat(Zn(l),[ty(u,d)]):l},[])},Xg=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},o=XF(i,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,c=MD(o,s,u,l);if(c>=0&&u){var f=u[c]&&u[c].value,d=Qc(t,r,c,f),h=JF(n,s,c,i);return{activeTooltipIndex:c,activeLabel:f,activePayload:d,activeCoordinate:h}}return null},ZF=function(t,r){var n=r.axes,a=r.graphicalItems,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,d=t.stackOffset,h=Vv(c,i);return n.reduce(function(y,p){var v,g=p.type.defaultProps!==void 0?G(G({},p.type.defaultProps),p.props):p.props,O=g.type,x=g.dataKey,A=g.allowDataOverflow,m=g.allowDuplicatedCategory,w=g.scale,T=g.ticks,_=g.includeHidden,$=g[o];if(y[$])return y;var R=_s(t.data,{graphicalItems:a.filter(function(W){var z,V=o in W.props?W.props[o]:(z=W.type.defaultProps)===null||z===void 0?void 0:z[o];return V===$}),dataStartIndex:l,dataEndIndex:u}),P=R.length,j,L,B;AF(g.domain,A,O)&&(j=Uu(g.domain,null,A),h&&(O==="number"||w!=="auto")&&(B=Ra(R,x,"category")));var M=Yg(O);if(!j||j.length===0){var E,F=(E=g.domain)!==null&&E!==void 0?E:M;if(x){if(j=Ra(R,x,O),O==="category"&&h){var U=g1(j);m&&U?(L=j,j=Zo(0,P)):m||(j=ey(F,j,p).reduce(function(W,z){return W.indexOf(z)>=0?W:[].concat(Zn(W),[z])},[]))}else if(O==="category")m?j=j.filter(function(W){return W!==""&&!ue(W)}):j=ey(F,j,p).reduce(function(W,z){return W.indexOf(z)>=0||z===""||ue(z)?W:[].concat(Zn(W),[z])},[]);else if(O==="number"){var k=LD(R,a.filter(function(W){var z,V,Z=o in W.props?W.props[o]:(z=W.type.defaultProps)===null||z===void 0?void 0:z[o],Q="hide"in W.props?W.props.hide:(V=W.type.defaultProps)===null||V===void 0?void 0:V.hide;return Z===$&&(_||!Q)}),x,i,c);k&&(j=k)}h&&(O==="number"||w!=="auto")&&(B=Ra(R,x,"category"))}else h?j=Zo(0,P):s&&s[$]&&s[$].hasStack&&O==="number"?j=d==="expand"?[0,1]:Jv(s[$].stackGroups,l,u):j=Kv(R,a.filter(function(W){var z=o in W.props?W.props[o]:W.type.defaultProps[o],V="hide"in W.props?W.props.hide:W.type.defaultProps.hide;return z===$&&(_||!V)}),O,c,!0);if(O==="number")j=Vc(f,j,$,i,T),F&&(j=Uu(F,j,A));else if(O==="category"&&F){var N=F,I=j.every(function(W){return N.indexOf(W)>=0});I&&(j=N)}}return G(G({},y),{},se({},$,G(G({},g),{},{axisType:i,domain:j,categoricalDomain:B,duplicateDomain:L,originalDomain:(v=g.domain)!==null&&v!==void 0?v:M,isCategorical:h,layout:c})))},{})},QF=function(t,r){var n=r.graphicalItems,a=r.Axis,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,d=_s(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),h=d.length,y=Vv(c,i),p=-1;return n.reduce(function(v,g){var O=g.type.defaultProps!==void 0?G(G({},g.type.defaultProps),g.props):g.props,x=O[o],A=Yg("number");if(!v[x]){p++;var m;return y?m=Zo(0,h):s&&s[x]&&s[x].hasStack?(m=Jv(s[x].stackGroups,l,u),m=Vc(f,m,x,i)):(m=Uu(A,Kv(d,n.filter(function(w){var T,_,$=o in w.props?w.props[o]:(T=w.type.defaultProps)===null||T===void 0?void 0:T[o],R="hide"in w.props?w.props.hide:(_=w.type.defaultProps)===null||_===void 0?void 0:_.hide;return $===x&&!R}),"number",c),a.defaultProps.allowDataOverflow),m=Vc(f,m,x,i)),G(G({},v),{},se({},x,G(G({axisType:i},a.defaultProps),{},{hide:!0,orientation:xt(HF,"".concat(i,".").concat(p%2),null),domain:m,originalDomain:A,isCategorical:y,layout:c})))}return v},{})},e8=function(t,r){var n=r.axisType,a=n===void 0?"xAxis":n,i=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.children,f="".concat(a,"Id"),d=ut(c,i),h={};return d&&d.length?h=ZF(t,{axes:d,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(h=QF(t,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),h},t8=function(t){var r=cr(t),n=or(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Dl(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Do(r,n)}},Jg=function(t){var r=t.children,n=t.defaultShowTooltip,a=ht(r,Mn),i=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(o=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},r8=function(t){return!t||!t.length?!1:t.some(function(r){var n=Xt(r&&r.type);return n&&n.indexOf("Bar")>=0})},Zg=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"}},n8=function(t,r){var n=t.props,a=t.graphicalItems,i=t.xAxisMap,o=i===void 0?{}:i,s=t.yAxisMap,l=s===void 0?{}:s,u=n.width,c=n.height,f=n.children,d=n.margin||{},h=ht(f,Mn),y=ht(f,hn),p=Object.keys(l).reduce(function(m,w){var T=l[w],_=T.orientation;return!T.mirror&&!T.hide?G(G({},m),{},se({},_,m[_]+T.width)):m},{left:d.left||0,right:d.right||0}),v=Object.keys(o).reduce(function(m,w){var T=o[w],_=T.orientation;return!T.mirror&&!T.hide?G(G({},m),{},se({},_,xt(m,"".concat(_))+T.height)):m},{top:d.top||0,bottom:d.bottom||0}),g=G(G({},v),p),O=g.bottom;h&&(g.bottom+=h.props.height||Mn.defaultProps.height),y&&r&&(g=DD(g,a,n,r));var x=u-g.left-g.right,A=c-g.top-g.bottom;return G(G({brushBottom:O},g),{},{width:Math.max(x,0),height:Math.max(A,0)})},a8=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},i8=function(t){var r=t.chartName,n=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,u=t.legendContent,c=t.formatAxisMap,f=t.defaultProps,d=function(g,O){var x=O.graphicalItems,A=O.stackGroups,m=O.offset,w=O.updateId,T=O.dataStartIndex,_=O.dataEndIndex,$=g.barSize,R=g.layout,P=g.barGap,j=g.barCategoryGap,L=g.maxBarSize,B=Zg(R),M=B.numericAxisName,E=B.cateAxisName,F=r8(x),U=[];return x.forEach(function(k,N){var I=_s(g.data,{graphicalItems:[k],dataStartIndex:T,dataEndIndex:_}),W=k.type.defaultProps!==void 0?G(G({},k.type.defaultProps),k.props):k.props,z=W.dataKey,V=W.maxBarSize,Z=W["".concat(M,"Id")],Q=W["".concat(E,"Id")],ae={},te=l.reduce(function(Rt,gt){var Si,Ai,ra=O["".concat(gt.axisType,"Map")],Ti=W["".concat(gt.axisType,"Id")];ra&&ra[Ti]||gt.axisType==="zAxis"||(process.env.NODE_ENV!=="production"?ft(!1,"Specifying a(n) ".concat(gt.axisType,"Id requires a corresponding ").concat(gt.axisType,"Id on the targeted graphical component ").concat((Si=k==null||(Ai=k.type)===null||Ai===void 0?void 0:Ai.displayName)!==null&&Si!==void 0?Si:"")):ft());var Pi=ra[Ti];return G(G({},Rt),{},se(se({},gt.axisType,Pi),"".concat(gt.axisType,"Ticks"),or(Pi)))},ae),q=te[E],Y=te["".concat(E,"Ticks")],J=A&&A[Z]&&A[Z].hasStack&&YD(k,A[Z].stackGroups),D=Xt(k.type).indexOf("Bar")>=0,ie=Do(q,Y),K=[],ee=F&&kD({barSize:$,stackGroups:A,totalSize:a8(te,E)});if(D){var oe,Ce,Te=ue(V)?L:V,Ee=(oe=(Ce=Do(q,Y,!0))!==null&&Ce!==void 0?Ce:Te)!==null&&oe!==void 0?oe:0;K=ND({barGap:P,barCategoryGap:j,bandSize:Ee!==ie?Ee:ie,sizeList:ee[Q],maxBarSize:Te}),Ee!==ie&&(K=K.map(function(Rt){return G(G({},Rt),{},{position:G(G({},Rt.position),{},{offset:Rt.position.offset-Ee/2})})}))}var et=k&&k.type&&k.type.getComposedData;et&&U.push({props:G(G({},et(G(G({},te),{},{displayedData:I,props:g,dataKey:z,item:k,bandSize:ie,barPosition:K,offset:m,stackedData:J,layout:R,dataStartIndex:T,dataEndIndex:_}))),{},se(se(se({key:k.key||"item-".concat(N)},M,te[M]),E,te[E]),"animationId",w)),childIndex:C1(k,g.children),item:k})}),U},h=function(g,O){var x=g.props,A=g.dataStartIndex,m=g.dataEndIndex,w=g.updateId;if(!Bf({props:x}))return null;var T=x.children,_=x.layout,$=x.stackOffset,R=x.data,P=x.reverseStackOrder,j=Zg(_),L=j.numericAxisName,B=j.cateAxisName,M=ut(T,n),E=KD(R,M,"".concat(L,"Id"),"".concat(B,"Id"),$,P),F=l.reduce(function(W,z){var V="".concat(z.axisType,"Map");return G(G({},W),{},se({},V,e8(x,G(G({},z),{},{graphicalItems:M,stackGroups:z.axisType===L&&E,dataStartIndex:A,dataEndIndex:m}))))},{}),U=n8(G(G({},F),{},{props:x,graphicalItems:M}),O==null?void 0:O.legendBBox);Object.keys(F).forEach(function(W){F[W]=c(x,F[W],U,W.replace("Map",""),r)});var k=F["".concat(B,"Map")],N=t8(k),I=d(x,G(G({},F),{},{dataStartIndex:A,dataEndIndex:m,updateId:w,graphicalItems:M,stackGroups:E,offset:U}));return G(G({formattedGraphicalItems:I,graphicalItems:M,offset:U,stackGroups:E},N),F)},y=function(v){function g(O){var x,A,m;return LF(this,g),m=FF(this,g,[O]),se(m,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),se(m,"accessibilityManager",new SF),se(m,"handleLegendBBoxUpdate",function(w){if(w){var T=m.state,_=T.dataStartIndex,$=T.dataEndIndex,R=T.updateId;m.setState(G({legendBBox:w},h({props:m.props,dataStartIndex:_,dataEndIndex:$,updateId:R},G(G({},m.state),{},{legendBBox:w}))))}}),se(m,"handleReceiveSyncEvent",function(w,T,_){if(m.props.syncId===w){if(_===m.eventEmitterSymbol&&typeof m.props.syncMethod!="function")return;m.applySyncEvent(T)}}),se(m,"handleBrushChange",function(w){var T=w.startIndex,_=w.endIndex;if(T!==m.state.dataStartIndex||_!==m.state.dataEndIndex){var $=m.state.updateId;m.setState(function(){return G({dataStartIndex:T,dataEndIndex:_},h({props:m.props,dataStartIndex:T,dataEndIndex:_,updateId:$},m.state))}),m.triggerSyncEvent({dataStartIndex:T,dataEndIndex:_})}}),se(m,"handleMouseEnter",function(w){var T=m.getMouseInfo(w);if(T){var _=G(G({},T),{},{isTooltipActive:!0});m.setState(_),m.triggerSyncEvent(_);var $=m.props.onMouseEnter;de($)&&$(_,w)}}),se(m,"triggeredAfterMouseMove",function(w){var T=m.getMouseInfo(w),_=T?G(G({},T),{},{isTooltipActive:!0}):{isTooltipActive:!1};m.setState(_),m.triggerSyncEvent(_);var $=m.props.onMouseMove;de($)&&$(_,w)}),se(m,"handleItemMouseEnter",function(w){m.setState(function(){return{isTooltipActive:!0,activeItem:w,activePayload:w.tooltipPayload,activeCoordinate:w.tooltipPosition||{x:w.cx,y:w.cy}}})}),se(m,"handleItemMouseLeave",function(){m.setState(function(){return{isTooltipActive:!1}})}),se(m,"handleMouseMove",function(w){w.persist(),m.throttleTriggeredAfterMouseMove(w)}),se(m,"handleMouseLeave",function(w){m.throttleTriggeredAfterMouseMove.cancel();var T={isTooltipActive:!1};m.setState(T),m.triggerSyncEvent(T);var _=m.props.onMouseLeave;de(_)&&_(T,w)}),se(m,"handleOuterEvent",function(w){var T=$1(w),_=xt(m.props,"".concat(T));if(T&&de(_)){var $,R;/.*touch.*/i.test(T)?R=m.getMouseInfo(w.changedTouches[0]):R=m.getMouseInfo(w),_(($=R)!==null&&$!==void 0?$:{},w)}}),se(m,"handleClick",function(w){var T=m.getMouseInfo(w);if(T){var _=G(G({},T),{},{isTooltipActive:!0});m.setState(_),m.triggerSyncEvent(_);var $=m.props.onClick;de($)&&$(_,w)}}),se(m,"handleMouseDown",function(w){var T=m.props.onMouseDown;if(de(T)){var _=m.getMouseInfo(w);T(_,w)}}),se(m,"handleMouseUp",function(w){var T=m.props.onMouseUp;if(de(T)){var _=m.getMouseInfo(w);T(_,w)}}),se(m,"handleTouchMove",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&m.throttleTriggeredAfterMouseMove(w.changedTouches[0])}),se(m,"handleTouchStart",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&m.handleMouseDown(w.changedTouches[0])}),se(m,"handleTouchEnd",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&m.handleMouseUp(w.changedTouches[0])}),se(m,"handleDoubleClick",function(w){var T=m.props.onDoubleClick;if(de(T)){var _=m.getMouseInfo(w);T(_,w)}}),se(m,"handleContextMenu",function(w){var T=m.props.onContextMenu;if(de(T)){var _=m.getMouseInfo(w);T(_,w)}}),se(m,"triggerSyncEvent",function(w){m.props.syncId!==void 0&&Hc.emit(Yc,m.props.syncId,w,m.eventEmitterSymbol)}),se(m,"applySyncEvent",function(w){var T=m.props,_=T.layout,$=T.syncMethod,R=m.state.updateId,P=w.dataStartIndex,j=w.dataEndIndex;if(w.dataStartIndex!==void 0||w.dataEndIndex!==void 0)m.setState(G({dataStartIndex:P,dataEndIndex:j},h({props:m.props,dataStartIndex:P,dataEndIndex:j,updateId:R},m.state)));else if(w.activeTooltipIndex!==void 0){var L=w.chartX,B=w.chartY,M=w.activeTooltipIndex,E=m.state,F=E.offset,U=E.tooltipTicks;if(!F)return;if(typeof $=="function")M=$(U,w);else if($==="value"){M=-1;for(var k=0;k<U.length;k++)if(U[k].value===w.activeLabel){M=k;break}}var N=G(G({},F),{},{x:F.left,y:F.top}),I=Math.min(L,N.x+N.width),W=Math.min(B,N.y+N.height),z=U[M]&&U[M].value,V=Qc(m.state,m.props.data,M),Z=U[M]?{x:_==="horizontal"?U[M].coordinate:I,y:_==="horizontal"?W:U[M].coordinate}:Hg;m.setState(G(G({},w),{},{activeLabel:z,activeCoordinate:Z,activePayload:V,activeTooltipIndex:M}))}else m.setState(w)}),se(m,"renderCursor",function(w){var T,_=m.state,$=_.isTooltipActive,R=_.activeCoordinate,P=_.activePayload,j=_.offset,L=_.activeTooltipIndex,B=_.tooltipAxisBandSize,M=m.getTooltipEventType(),E=(T=w.props.active)!==null&&T!==void 0?T:$,F=m.props.layout,U=w.key||"_recharts-cursor";return S.createElement($F,{key:U,activeCoordinate:R,activePayload:P,activeTooltipIndex:L,chartName:r,element:w,isActive:E,layout:F,offset:j,tooltipAxisBandSize:B,tooltipEventType:M})}),se(m,"renderPolarAxis",function(w,T,_){var $=xt(w,"type.axisType"),R=xt(m.state,"".concat($,"Map")),P=w.type.defaultProps,j=P!==void 0?G(G({},P),w.props):w.props,L=R&&R[j["".concat($,"Id")]];return S.cloneElement(w,G(G({},L),{},{className:pe($,L.className),key:w.key||"".concat(T,"-").concat(_),ticks:or(L,!0)}))}),se(m,"renderPolarGrid",function(w){var T=w.props,_=T.radialLines,$=T.polarAngles,R=T.polarRadius,P=m.state,j=P.radiusAxisMap,L=P.angleAxisMap,B=cr(j),M=cr(L),E=M.cx,F=M.cy,U=M.innerRadius,k=M.outerRadius;return S.cloneElement(w,{polarAngles:Array.isArray($)?$:or(M,!0).map(function(N){return N.coordinate}),polarRadius:Array.isArray(R)?R:or(B,!0).map(function(N){return N.coordinate}),cx:E,cy:F,innerRadius:U,outerRadius:k,key:w.key||"polar-grid",radialLines:_})}),se(m,"renderLegend",function(){var w=m.state.formattedGraphicalItems,T=m.props,_=T.children,$=T.width,R=T.height,P=m.props.margin||{},j=$-(P.left||0)-(P.right||0),L=Uv({children:_,formattedGraphicalItems:w,legendWidth:j,legendContent:u});if(!L)return null;var B=L.item,M=zg(L,CF);return S.cloneElement(B,G(G({},M),{},{chartWidth:$,chartHeight:R,margin:P,onBBoxUpdate:m.handleLegendBBoxUpdate}))}),se(m,"renderTooltip",function(){var w,T=m.props,_=T.children,$=T.accessibilityLayer,R=ht(_,Wt);if(!R)return null;var P=m.state,j=P.isTooltipActive,L=P.activeCoordinate,B=P.activePayload,M=P.activeLabel,E=P.offset,F=(w=R.props.active)!==null&&w!==void 0?w:j;return S.cloneElement(R,{viewBox:G(G({},E),{},{x:E.left,y:E.top}),active:F,label:M,payload:F?B:[],coordinate:L,accessibilityLayer:$})}),se(m,"renderBrush",function(w){var T=m.props,_=T.margin,$=T.data,R=m.state,P=R.offset,j=R.dataStartIndex,L=R.dataEndIndex,B=R.updateId;return S.cloneElement(w,{key:w.key||"_recharts-brush",onChange:No(m.handleBrushChange,w.props.onChange),data:$,x:X(w.props.x)?w.props.x:P.left,y:X(w.props.y)?w.props.y:P.top+P.height+P.brushBottom-(_.bottom||0),width:X(w.props.width)?w.props.width:P.width,startIndex:j,endIndex:L,updateId:"brush-".concat(B)})}),se(m,"renderReferenceElement",function(w,T,_){if(!w)return null;var $=m,R=$.clipPathId,P=m.state,j=P.xAxisMap,L=P.yAxisMap,B=P.offset,M=w.type.defaultProps||{},E=w.props,F=E.xAxisId,U=F===void 0?M.xAxisId:F,k=E.yAxisId,N=k===void 0?M.yAxisId:k;return S.cloneElement(w,{key:w.key||"".concat(T,"-").concat(_),xAxis:j[U],yAxis:L[N],viewBox:{x:B.left,y:B.top,width:B.width,height:B.height},clipPathId:R})}),se(m,"renderActivePoints",function(w){var T=w.item,_=w.activePoint,$=w.basePoint,R=w.childIndex,P=w.isRange,j=[],L=T.props.key,B=T.item.type.defaultProps!==void 0?G(G({},T.item.type.defaultProps),T.item.props):T.item.props,M=B.activeDot,E=B.dataKey,F=G(G({index:R,dataKey:E,cx:_.x,cy:_.y,r:4,fill:Fu(T.item),strokeWidth:2,stroke:"#fff",payload:_.payload,value:_.value},fe(M,!1)),Ni(M));return j.push(g.renderActiveDot(M,F,"".concat(L,"-activePoint-").concat(R))),$?j.push(g.renderActiveDot(M,G(G({},F),{},{cx:$.x,cy:$.y}),"".concat(L,"-basePoint-").concat(R))):P&&j.push(null),j}),se(m,"renderGraphicChild",function(w,T,_){var $=m.filterFormatItem(w,T,_);if(!$)return null;var R=m.getTooltipEventType(),P=m.state,j=P.isTooltipActive,L=P.tooltipAxis,B=P.activeTooltipIndex,M=P.activeLabel,E=m.props.children,F=ht(E,Wt),U=$.props,k=U.points,N=U.isRange,I=U.baseLine,W=$.item.type.defaultProps!==void 0?G(G({},$.item.type.defaultProps),$.item.props):$.item.props,z=W.activeDot,V=W.hide,Z=W.activeBar,Q=W.activeShape,ae=!!(!V&&j&&F&&(z||Z||Q)),te={};R!=="axis"&&F&&F.props.trigger==="click"?te={onClick:No(m.handleItemMouseEnter,w.props.onClick)}:R!=="axis"&&(te={onMouseLeave:No(m.handleItemMouseLeave,w.props.onMouseLeave),onMouseEnter:No(m.handleItemMouseEnter,w.props.onMouseEnter)});var q=S.cloneElement(w,G(G({},$.props),te));function Y(gt){return typeof L.dataKey=="function"?L.dataKey(gt.payload):null}if(ae)if(B>=0){var J,D;if(L.dataKey&&!L.allowDuplicatedCategory){var ie=typeof L.dataKey=="function"?Y:"payload.".concat(L.dataKey.toString());J=ki(k,ie,M),D=N&&I&&ki(I,ie,M)}else J=k==null?void 0:k[B],D=N&&I&&I[B];if(Q||Z){var K=w.props.activeIndex!==void 0?w.props.activeIndex:B;return[S.cloneElement(w,G(G(G({},$.props),te),{},{activeIndex:K})),null,null]}if(!ue(J))return[q].concat(Zn(m.renderActivePoints({item:$,activePoint:J,basePoint:D,childIndex:B,isRange:N})))}else{var ee,oe=(ee=m.getItemByXY(m.state.activeCoordinate))!==null&&ee!==void 0?ee:{graphicalItem:q},Ce=oe.graphicalItem,Te=Ce.item,Ee=Te===void 0?w:Te,et=Ce.childIndex,Rt=G(G(G({},$.props),te),{},{activeIndex:et});return[S.cloneElement(Ee,Rt),null,null]}return N?[q,null,null]:[q,null]}),se(m,"renderCustomized",function(w,T,_){return S.cloneElement(w,G(G({key:"recharts-customized-".concat(_)},m.props),m.state))}),se(m,"renderMap",{CartesianGrid:{handler:Ps,once:!0},ReferenceArea:{handler:m.renderReferenceElement},ReferenceLine:{handler:Ps},ReferenceDot:{handler:m.renderReferenceElement},XAxis:{handler:Ps},YAxis:{handler:Ps},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((x=O.id)!==null&&x!==void 0?x:jr("recharts"),"-clip"),m.throttleTriggeredAfterMouseMove=Bh(m.triggeredAfterMouseMove,(A=O.throttleDelay)!==null&&A!==void 0?A:1e3/60),m.state={},m}return zF(g,v),BF(g,[{key:"componentDidMount",value:function(){var x,A;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,A=x.children,m=x.data,w=x.height,T=x.layout,_=ht(A,Wt);if(_){var $=_.props.defaultIndex;if(!(typeof $!="number"||$<0||$>this.state.tooltipTicks.length-1)){var R=this.state.tooltipTicks[$]&&this.state.tooltipTicks[$].value,P=Qc(this.state,m,$,R),j=this.state.tooltipTicks[$].coordinate,L=(this.state.offset.top+w)/2,B=T==="horizontal",M=B?{x:j,y:L}:{y:j,x:L},E=this.state.formattedGraphicalItems.find(function(U){var k=U.item;return k.type.name==="Scatter"});E&&(M=G(G({},M),E.props.points[$].tooltipPosition),P=E.props.points[$].tooltipPayload);var F={activeTooltipIndex:$,isTooltipActive:!0,activeLabel:R,activePayload:P,activeCoordinate:M};this.setState(F),this.renderCursor(_),this.accessibilityManager.setIndex($)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,A){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==A.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==x.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==x.margin){var m,w;this.accessibilityManager.setDetails({offset:{left:(m=this.props.margin.left)!==null&&m!==void 0?m:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0}})}return null}},{key:"componentDidUpdate",value:function(x){el([ht(x.children,Wt)],[ht(this.props.children,Wt)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=ht(this.props.children,Wt);if(x&&typeof x.props.shared=="boolean"){var A=x.props.shared?"axis":"item";return s.indexOf(A)>=0?A:i}return i}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var A=this.container,m=A.getBoundingClientRect(),w=iM(m),T={chartX:Math.round(x.pageX-w.left),chartY:Math.round(x.pageY-w.top)},_=m.width/A.offsetWidth||1,$=this.inRange(T.chartX,T.chartY,_);if(!$)return null;var R=this.state,P=R.xAxisMap,j=R.yAxisMap,L=this.getTooltipEventType(),B=Xg(this.state,this.props.data,this.props.layout,$);if(L!=="axis"&&P&&j){var M=cr(P).scale,E=cr(j).scale,F=M&&M.invert?M.invert(T.chartX):null,U=E&&E.invert?E.invert(T.chartY):null;return G(G({},T),{},{xValue:F,yValue:U},B)}return B?G(G({},T),B):null}},{key:"inRange",value:function(x,A){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,w=this.props.layout,T=x/m,_=A/m;if(w==="horizontal"||w==="vertical"){var $=this.state.offset,R=T>=$.left&&T<=$.left+$.width&&_>=$.top&&_<=$.top+$.height;return R?{x:T,y:_}:null}var P=this.state,j=P.angleAxisMap,L=P.radiusAxisMap;if(j&&L){var B=cr(j);return ay({x:T,y:_},B)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,A=this.getTooltipEventType(),m=ht(x,Wt),w={};m&&A==="axis"&&(m.props.trigger==="click"?w={onClick:this.handleClick}:w={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 T=Ni(this.props,this.handleOuterEvent);return G(G({},T),w)}},{key:"addListener",value:function(){Hc.on(Yc,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Hc.removeListener(Yc,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,A,m){for(var w=this.state.formattedGraphicalItems,T=0,_=w.length;T<_;T++){var $=w[T];if($.item===x||$.props.key===x.key||A===Xt($.item.type)&&m===$.childIndex)return $}return null}},{key:"renderClipPath",value:function(){var x=this.clipPathId,A=this.state.offset,m=A.left,w=A.top,T=A.height,_=A.width;return S.createElement("defs",null,S.createElement("clipPath",{id:x},S.createElement("rect",{x:m,y:w,height:T,width:_})))}},{key:"getXScales",value:function(){var x=this.state.xAxisMap;return x?Object.entries(x).reduce(function(A,m){var w=Ug(m,2),T=w[0],_=w[1];return G(G({},A),{},se({},T,_.scale))},{}):null}},{key:"getYScales",value:function(){var x=this.state.yAxisMap;return x?Object.entries(x).reduce(function(A,m){var w=Ug(m,2),T=w[0],_=w[1];return G(G({},A),{},se({},T,_.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(x){var A;return(A=this.state.xAxisMap)===null||A===void 0||(A=A[x])===null||A===void 0?void 0:A.scale}},{key:"getYScaleByAxisId",value:function(x){var A;return(A=this.state.yAxisMap)===null||A===void 0||(A=A[x])===null||A===void 0?void 0:A.scale}},{key:"getItemByXY",value:function(x){var A=this.state,m=A.formattedGraphicalItems,w=A.activeItem;if(m&&m.length)for(var T=0,_=m.length;T<_;T++){var $=m[T],R=$.props,P=$.item,j=P.type.defaultProps!==void 0?G(G({},P.type.defaultProps),P.props):P.props,L=Xt(P.type);if(L==="Bar"){var B=(R.data||[]).find(function(U){return qR(x,U)});if(B)return{graphicalItem:$,payload:B}}else if(L==="RadialBar"){var M=(R.data||[]).find(function(U){return ay(x,U)});if(M)return{graphicalItem:$,payload:M}}else if(Xo($,w)||Jo($,w)||ri($,w)){var E=V3({graphicalItem:$,activeTooltipItem:w,itemData:j.data}),F=j.activeIndex===void 0?E:j.activeIndex;return{graphicalItem:G(G({},$),{},{childIndex:F}),payload:ri($,w)?j.data[E]:$.props.data[E]}}}return null}},{key:"render",value:function(){var x=this;if(!Bf(this))return null;var A=this.props,m=A.children,w=A.className,T=A.width,_=A.height,$=A.style,R=A.compact,P=A.title,j=A.desc,L=zg(A,MF),B=fe(L,!1);if(R)return S.createElement(Fm,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},S.createElement(rl,Jn({},B,{width:T,height:_,title:P,desc:j}),this.renderClipPath(),Uf(m,this.renderMap)));if(this.props.accessibilityLayer){var M,E;B.tabIndex=(M=this.props.tabIndex)!==null&&M!==void 0?M:0,B.role=(E=this.props.role)!==null&&E!==void 0?E:"application",B.onKeyDown=function(U){x.accessibilityManager.keyboardEvent(U)},B.onFocus=function(){x.accessibilityManager.focus()}}var F=this.parseEventsOfWrapper();return S.createElement(Fm,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},S.createElement("div",Jn({className:pe("recharts-wrapper",w),style:G({position:"relative",cursor:"default",width:T,height:_},$)},F,{ref:function(k){x.container=k}}),S.createElement(rl,Jn({},B,{width:T,height:_,title:P,desc:j,style:YF}),this.renderClipPath(),Uf(m,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(S.Component);se(y,"displayName",r),se(y,"defaultProps",G({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),se(y,"getDerivedStateFromProps",function(v,g){var O=v.dataKey,x=v.data,A=v.children,m=v.width,w=v.height,T=v.layout,_=v.stackOffset,$=v.margin,R=g.dataStartIndex,P=g.dataEndIndex;if(g.updateId===void 0){var j=Jg(v);return G(G(G({},j),{},{updateId:0},h(G(G({props:v},j),{},{updateId:0}),g)),{},{prevDataKey:O,prevData:x,prevWidth:m,prevHeight:w,prevLayout:T,prevStackOffset:_,prevMargin:$,prevChildren:A})}if(O!==g.prevDataKey||x!==g.prevData||m!==g.prevWidth||w!==g.prevHeight||T!==g.prevLayout||_!==g.prevStackOffset||!on($,g.prevMargin)){var L=Jg(v),B={chartX:g.chartX,chartY:g.chartY,isTooltipActive:g.isTooltipActive},M=G(G({},Xg(g,x,T)),{},{updateId:g.updateId+1}),E=G(G(G({},L),B),M);return G(G(G({},E),h(G({props:v},E),g)),{},{prevDataKey:O,prevData:x,prevWidth:m,prevHeight:w,prevLayout:T,prevStackOffset:_,prevMargin:$,prevChildren:A})}if(!el(A,g.prevChildren)){var F,U,k,N,I=ht(A,Mn),W=I&&(F=(U=I.props)===null||U===void 0?void 0:U.startIndex)!==null&&F!==void 0?F:R,z=I&&(k=(N=I.props)===null||N===void 0?void 0:N.endIndex)!==null&&k!==void 0?k:P,V=W!==R||z!==P,Z=!ue(x),Q=Z&&!V?g.updateId:g.updateId+1;return G(G({updateId:Q},h(G(G({props:v},g),{},{updateId:Q,dataStartIndex:W,dataEndIndex:z}),g)),{},{prevChildren:A,dataStartIndex:W,dataEndIndex:z})}return null}),se(y,"renderActiveDot",function(v,g,O){var x;return S.isValidElement(v)?x=S.cloneElement(v,g):de(v)?x=v(g):x=S.createElement(Vo,g),S.createElement(be,{className:"recharts-active-dot",key:O},x)});var p=S.forwardRef(function(g,O){return S.createElement(y,Jn({},g,{ref:O}))});return p.displayName=y.displayName,p},o8=i8({chartName:"ComposedChart",GraphicalChild:[li,wr,Dn,bs],axisComponents:[{axisType:"xAxis",AxisComp:ws},{axisType:"yAxis",AxisComp:Ss},{axisType:"zAxis",AxisComp:ms}],formatAxisMap:gB});const ef="-",s8=e=>{const t=u8(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const s=o.split(ef);return s[0]===""&&s.length!==1&&s.shift(),Qg(s,t)||l8(o)},getConflictingClassGroupIds:(o,s)=>{const l=r[o]||[];return s&&n[o]?[...l,...n[o]]:l}}},Qg=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?Qg(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join(ef);return(o=t.validators.find(({validator:s})=>s(i)))==null?void 0:o.classGroupId},eb=/^\[(.+)\]$/,l8=e=>{if(eb.test(e)){const t=eb.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},u8=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return f8(Object.entries(e.classGroups),r).forEach(([i,o])=>{tf(o,n,i,t)}),n},tf=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const i=a===""?t:tb(t,a);i.classGroupId=r;return}if(typeof a=="function"){if(c8(a)){tf(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,o])=>{tf(o,tb(t,i),r,n)})})},tb=(e,t)=>{let r=e;return t.split(ef).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},c8=e=>e.isThemeGetter,f8=(e,t)=>t?e.map(([r,n])=>{const a=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,s])=>[t+o,s])):i);return[r,a]}):e,d8=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(i,o)=>{r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return a(i,o),o},set(i,o){r.has(i)?r.set(i,o):a(i,o)}}},rb="!",h8=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],i=t.length,o=s=>{const l=[];let u=0,c=0,f;for(let v=0;v<s.length;v++){let g=s[v];if(u===0){if(g===a&&(n||s.slice(v,v+i)===t)){l.push(s.slice(c,v)),c=v+i;continue}if(g==="/"){f=v;continue}}g==="["?u++:g==="]"&&u--}const d=l.length===0?s:s.substring(c),h=d.startsWith(rb),y=h?d.substring(1):d,p=f&&f>c?f-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:p}};return r?s=>r({className:s,parseClassName:o}):o},p8=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},v8=e=>({cache:d8(e.cacheSize),parseClassName:h8(e),...s8(e)}),y8=/\s+/,m8=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,i=[],o=e.trim().split(y8);let s="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:h}=r(u);let y=!!h,p=n(y?d.substring(0,h):d);if(!p){if(!y){s=u+(s.length>0?" "+s:s);continue}if(p=n(d),!p){s=u+(s.length>0?" "+s:s);continue}y=!1}const v=p8(c).join(":"),g=f?v+rb:v,O=g+p;if(i.includes(O))continue;i.push(O);const x=a(p,y);for(let A=0;A<x.length;++A){const m=x[A];i.push(g+m)}s=u+(s.length>0?" "+s:s)}return s};function g8(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=nb(t))&&(n&&(n+=" "),n+=r);return n}const nb=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=nb(e[n]))&&(r&&(r+=" "),r+=t);return r};function b8(e,...t){let r,n,a,i=o;function o(l){const u=t.reduce((c,f)=>f(c),e());return r=v8(u),n=r.cache.get,a=r.cache.set,i=s,s(l)}function s(l){const u=n(l);if(u)return u;const c=m8(l,r);return a(l,c),c}return function(){return i(g8.apply(null,arguments))}}const Re=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},ab=/^\[(?:([a-z-]+):)?(.+)\]$/i,x8=/^\d+\/\d+$/,w8=new Set(["px","full","screen"]),O8=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,S8=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,A8=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,T8=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,P8=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sr=e=>Qn(e)||w8.has(e)||x8.test(e),Sr=e=>ea(e,"length",N8),Qn=e=>!!e&&!Number.isNaN(Number(e)),rf=e=>ea(e,"number",Qn),hi=e=>!!e&&Number.isInteger(Number(e)),_8=e=>e.endsWith("%")&&Qn(e.slice(0,-1)),he=e=>ab.test(e),Ar=e=>O8.test(e),E8=new Set(["length","size","percentage"]),j8=e=>ea(e,E8,ib),$8=e=>ea(e,"position",ib),C8=new Set(["image","url"]),M8=e=>ea(e,C8,I8),k8=e=>ea(e,"",D8),pi=()=>!0,ea=(e,t,r)=>{const n=ab.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},N8=e=>S8.test(e)&&!A8.test(e),ib=()=>!1,D8=e=>T8.test(e),I8=e=>P8.test(e),L8=b8(()=>{const e=Re("colors"),t=Re("spacing"),r=Re("blur"),n=Re("brightness"),a=Re("borderColor"),i=Re("borderRadius"),o=Re("borderSpacing"),s=Re("borderWidth"),l=Re("contrast"),u=Re("grayscale"),c=Re("hueRotate"),f=Re("invert"),d=Re("gap"),h=Re("gradientColorStops"),y=Re("gradientColorStopPositions"),p=Re("inset"),v=Re("margin"),g=Re("opacity"),O=Re("padding"),x=Re("saturate"),A=Re("scale"),m=Re("sepia"),w=Re("skew"),T=Re("space"),_=Re("translate"),$=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto",he,t],j=()=>[he,t],L=()=>["",sr,Sr],B=()=>["auto",Qn,he],M=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],E=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>["start","end","center","between","around","evenly","stretch"],k=()=>["","0",he],N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>[Qn,he];return{cacheSize:500,separator:":",theme:{colors:[pi],spacing:[sr,Sr],blur:["none","",Ar,he],brightness:I(),borderColor:[e],borderRadius:["none","","full",Ar,he],borderSpacing:j(),borderWidth:L(),contrast:I(),grayscale:k(),hueRotate:I(),invert:k(),gap:j(),gradientColorStops:[e],gradientColorStopPositions:[_8,Sr],inset:P(),margin:P(),opacity:I(),padding:j(),saturate:I(),scale:I(),sepia:k(),skew:I(),space:j(),translate:j()},classGroups:{aspect:[{aspect:["auto","square","video",he]}],container:["container"],columns:[{columns:[Ar]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...M(),he]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",hi,he]}],basis:[{basis:P()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",he]}],grow:[{grow:k()}],shrink:[{shrink:k()}],order:[{order:["first","last","none",hi,he]}],"grid-cols":[{"grid-cols":[pi]}],"col-start-end":[{col:["auto",{span:["full",hi,he]},he]}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":[pi]}],"row-start-end":[{row:["auto",{span:[hi,he]},he]}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",he]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",he]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...U()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...U(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...U(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[O]}],px:[{px:[O]}],py:[{py:[O]}],ps:[{ps:[O]}],pe:[{pe:[O]}],pt:[{pt:[O]}],pr:[{pr:[O]}],pb:[{pb:[O]}],pl:[{pl:[O]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",he,t]}],"min-w":[{"min-w":[he,t,"min","max","fit"]}],"max-w":[{"max-w":[he,t,"none","full","min","max","fit","prose",{screen:[Ar]},Ar]}],h:[{h:[he,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[he,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[he,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[he,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ar,Sr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",rf]}],"font-family":[{font:[pi]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",he]}],"line-clamp":[{"line-clamp":["none",Qn,rf]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",sr,he]}],"list-image":[{"list-image":["none",he]}],"list-style-type":[{list:["none","disc","decimal",he]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...E(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",sr,Sr]}],"underline-offset":[{"underline-offset":["auto",sr,he]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...M(),$8]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",j8]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},M8]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...E(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:E()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...E()]}],"outline-offset":[{"outline-offset":[sr,he]}],"outline-w":[{outline:[sr,Sr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[sr,Sr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ar,k8]}],"shadow-color":[{shadow:[pi]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ar,he]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[x]}],sepia:[{sepia:[m]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[m]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",he]}],duration:[{duration:I()}],ease:[{ease:["linear","in","out","in-out",he]}],delay:[{delay:I()}],animate:[{animate:["none","spin","ping","pulse","bounce",he]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[hi,he]}],"translate-x":[{"translate-x":[_]}],"translate-y":[{"translate-y":[_]}],"skew-x":[{"skew-x":[w]}],"skew-y":[{"skew-y":[w]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",he]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",he]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",he]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[sr,Sr,rf]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function ce(...e){return L8(pe(e))}const vi=({className:e,width:t,height:r,rounded:n=!1})=>b.jsx("div",{className:ce("animate-pulse bg-gray-200",n?"rounded-full":"rounded",e),style:{width:typeof t=="number"?`${t}px`:t,height:typeof r=="number"?`${r}px`:r}}),Es=({className:e})=>b.jsxs("div",{className:ce("rounded-lg border border-gray-200 bg-white p-4",e),children:[b.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[b.jsx(vi,{className:"h-4 w-16"}),b.jsx(vi,{className:"h-4 w-4",rounded:!0})]}),b.jsxs("div",{className:"flex items-baseline gap-3",children:[b.jsx(vi,{className:"h-8 w-20"}),b.jsx(vi,{className:"h-6 w-12 rounded-md"})]})]}),R8=({className:e,chartType:t="line",height:r=300})=>{const n=o=>{if(o.length===0)return"";let s=`M ${o[0].x} ${o[0].y}`;for(let l=1;l<o.length;l++){const u=o[l-1],c=o[l],f=u.x+(c.x-u.x)*.4,d=u.y,h=u.x+(c.x-u.x)*.6,y=c.y;s+=` C ${f} ${d} ${h} ${y} ${c.x} ${c.y}`}return s},a=(o=7)=>Array.from({length:o},(c,f)=>({x:f/(o-1)*100,y:80-Math.random()*60})),i=()=>{switch(t){case"bar":return b.jsx("div",{className:"absolute inset-0 flex items-end justify-between px-4 pb-4",children:[...Array(7)].map((v,g)=>b.jsx(vi,{className:"w-8 bg-blue-100",height:`${Math.random()*60+20}%`},g))});case"line":const o=a(12),s=n(o),l=o[o.length-1],u=o[0],c=`${s} L ${l.x} 100 L ${u.x} 100 Z`;return b.jsx("div",{className:"absolute inset-0 p-4",children:b.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[b.jsxs("defs",{children:[b.jsxs("linearGradient",{id:"skeleton-area-fill",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[b.jsx("stop",{offset:"0%",stopColor:"#8b5cf6",stopOpacity:"0.1",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.1;0.15;0.1",dur:"3s",repeatCount:"indefinite"})}),b.jsx("stop",{offset:"100%",stopColor:"#8b5cf6",stopOpacity:"0.02",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.02;0.05;0.02",dur:"3s",repeatCount:"indefinite"})})]}),b.jsxs("linearGradient",{id:"skeleton-line-shimmer",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[b.jsx("stop",{offset:"0%",stopColor:"#e2e8f0",stopOpacity:"0.3",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2.5s",repeatCount:"indefinite"})}),b.jsx("stop",{offset:"50%",stopColor:"#cbd5e1",stopOpacity:"0.6",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.6;0.3;0.6",dur:"2.5s",repeatCount:"indefinite"})}),b.jsx("stop",{offset:"100%",stopColor:"#e2e8f0",stopOpacity:"0.3",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2.5s",repeatCount:"indefinite"})})]})]}),b.jsx("path",{d:c,fill:"url(#skeleton-area-fill)"}),b.jsx("path",{d:s,stroke:"url(#skeleton-line-shimmer)",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]})});case"area":const f=a(),d=n(f),h=f[f.length-1],y=f[0],p=`${d} L ${h.x} 90 L ${y.x} 90 Z`;return b.jsx("div",{className:"absolute inset-0 p-4",children:b.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[b.jsxs("defs",{children:[b.jsxs("linearGradient",{id:"skeleton-area-gradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[b.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.2",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.2;0.4;0.2",dur:"2s",repeatCount:"indefinite"})}),b.jsx("stop",{offset:"100%",stopColor:"#3b82f6",stopOpacity:"0.05",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.05;0.1;0.05",dur:"2s",repeatCount:"indefinite"})})]}),b.jsxs("linearGradient",{id:"skeleton-area-line",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[b.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.4",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.4;0.8;0.4",dur:"2s",repeatCount:"indefinite"})}),b.jsx("stop",{offset:"50%",stopColor:"#3b82f6",stopOpacity:"0.8",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.8;0.4;0.8",dur:"2s",repeatCount:"indefinite"})}),b.jsx("stop",{offset:"100%",stopColor:"#3b82f6",stopOpacity:"0.4",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.4;0.8;0.4",dur:"2s",repeatCount:"indefinite"})})]})]}),b.jsx("path",{d:p,fill:"url(#skeleton-area-gradient)"}),b.jsx("path",{d:n(f),stroke:"url(#skeleton-area-line)",strokeWidth:"2.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]})});case"pie":return b.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-4",children:b.jsxs("svg",{className:"w-32 h-32",viewBox:"0 0 42 42",children:[b.jsxs("defs",{children:[b.jsx("linearGradient",{id:"skeleton-pie-gradient-1",children:b.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.3",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite"})})}),b.jsx("linearGradient",{id:"skeleton-pie-gradient-2",children:b.jsx("stop",{offset:"0%",stopColor:"#10b981",stopOpacity:"0.3",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"0.5s"})})}),b.jsx("linearGradient",{id:"skeleton-pie-gradient-3",children:b.jsx("stop",{offset:"0%",stopColor:"#f59e0b",stopOpacity:"0.3",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"1s"})})}),b.jsx("linearGradient",{id:"skeleton-pie-gradient-4",children:b.jsx("stop",{offset:"0%",stopColor:"#ef4444",stopOpacity:"0.3",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"1.5s"})})})]}),b.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"#e5e7eb",strokeWidth:"3"}),b.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-1)",strokeWidth:"3",strokeDasharray:"40 60",strokeDashoffset:"25"}),b.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-2)",strokeWidth:"3",strokeDasharray:"25 75",strokeDashoffset:"65"}),b.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-3)",strokeWidth:"3",strokeDasharray:"20 80",strokeDashoffset:"90"}),b.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-4)",strokeWidth:"3",strokeDasharray:"15 85",strokeDashoffset:"110"})]})});default:return b.jsx("div",{className:"absolute inset-0 p-4",children:b.jsxs("div",{className:"w-full h-full relative",children:[b.jsx("div",{className:"absolute inset-0 flex items-center",children:b.jsx("div",{className:"w-full h-0.5 bg-gradient-to-r from-transparent via-gray-300 to-transparent opacity-60",children:b.jsx("div",{className:"w-full h-full bg-gradient-to-r from-transparent via-blue-400 to-transparent animate-pulse"})})}),b.jsx("div",{className:"absolute inset-0 flex items-center justify-between px-2",children:[...Array(7)].map((v,g)=>b.jsx("div",{className:"w-2 h-2 bg-blue-300 rounded-full animate-pulse",style:{animationDelay:`${g*.2}s`}},g))})]})})}};return b.jsx("div",{className:ce("w-full",e),children:b.jsxs("div",{className:"relative bg-gray-50/30 py-3",children:[b.jsxs("div",{className:"relative mb-6",style:{height:`${r}px`},children:[b.jsxs("div",{className:"absolute left-0 top-0 h-full flex flex-col justify-between items-end pr-3",children:[b.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"})]}),b.jsxs("div",{className:"ml-14 h-full relative overflow-hidden px-0 py-2 flex flex-col justify-between",children:[t!=="pie"&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"})]}),i()]}),t!=="pie"&&b.jsxs("div",{className:"ml-14 flex justify-between items-center mt-3",children:[b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"})]})]}),b.jsxs("div",{className:"flex items-center justify-between px-0 py-3 mt-2",children:[b.jsx("div",{className:"flex-1",children:b.jsx("div",{className:"bg-gray-100 h-3 rounded w-64"})}),b.jsxs("div",{className:"flex items-center gap-2 w-24 justify-center",children:[b.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded flex-1"})]})]})]})})},B8=({active:e,payload:t,label:r,config:n})=>{var o;if(!e||!t||!t.length)return null;const a=t.filter(s=>s.name&&s.name!==""&&s.name!==s.dataKey);if(a.length===0)return null;const i=((o=n.tooltip)==null?void 0:o.style)==="dark";return b.jsxs("div",{className:ce("rounded-lg border px-3 py-2 text-sm shadow-lg",i?"bg-gray-900 border-gray-700 text-white":"bg-white border-gray-200 text-gray-900"),children:[b.jsx("div",{className:ce("font-medium mb-1",i?"text-gray-300":"text-gray-600"),children:new Date(r||"").toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}),b.jsx("div",{className:"space-y-1",children:a.map((s,l)=>b.jsxs("div",{className:"flex items-center justify-between gap-4",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:s.color}}),b.jsx("span",{className:ce("text-sm",i?"text-gray-300":"text-gray-600"),children:s.name})]}),b.jsx("span",{className:ce("font-medium",i?"text-white":"text-gray-900"),children:typeof s.value=="number"?s.value.toLocaleString():s.value})]},l))})]})},ob=({config:e,className:t,isLoading:r})=>{const{data:n,dataKey:a,color:i="#3b82f6",lines:o,dateRange:s,yAxisLabel:l,height:u=300,tooltip:c={show:!0,style:"dark"}}=e,f=p=>{const v=new Date(p);return isNaN(v.getTime())?p:v.getDate().toString()},d=p=>p>=1e3?`${(p/1e3).toFixed(0)}k`:p.toString(),y=o&&o.length>0?o:[{dataKey:a||"value",color:i,label:e.title,strokeWidth:2}];return r?(console.log("AnalyticsChart: Loading state active"),b.jsx(R8,{className:t,chartType:e.type,height:u})):!n||n.length===0?(console.log("AnalyticsChart: No data provided",{data:n,config:e}),b.jsx("div",{className:ce("w-full",t),children:b.jsxs("div",{className:"relative bg-gray-50/30 py-6",children:[b.jsxs("div",{className:"relative h-[300px] mb-6",children:[b.jsxs("div",{className:"absolute left-0 top-0 h-full flex flex-col justify-between items-end pr-3",children:[b.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"})]}),b.jsxs("div",{className:"ml-14 h-full relative overflow-hidden px-0 py-2 flex flex-col justify-between",children:[b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-4",children:[b.jsx("div",{className:"bg-white border border-gray-300 rounded-[10px] w-12 h-12 flex items-center justify-center",children:b.jsx("svg",{className:"w-6 h-6 text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})}),b.jsxs("div",{className:"text-center max-w-[352px]",children:[b.jsx("h3",{className:"font-semibold text-gray-900 text-base mb-1",children:"There is no data to display for this period"}),b.jsx("p",{className:"font-normal text-gray-600 text-sm leading-5",children:"Try selecting a different date range or ensure your app is deployed and receiving traffic."})]})]})]}),b.jsxs("div",{className:"ml-14 flex justify-between items-center mt-3",children:[b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"})]})]}),b.jsxs("div",{className:"flex items-center justify-between px-0 py-3 mt-2",children:[b.jsx("div",{className:"flex-1",children:b.jsx("div",{className:"bg-gray-100 h-3 rounded w-64"})}),b.jsxs("div",{className:"flex items-center gap-2 w-24 justify-center",children:[b.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded flex-1"})]})]})]})})):(console.log("=== ANALYTICS CHART DEBUG ==="),console.log("AnalyticsChart config:",e),console.log("AnalyticsChart data:",JSON.stringify(n,null,2)),console.log("AnalyticsChart dataKey:",a),console.log("Chart lines configuration:",y),console.log("Sample data point:",n[0]),console.log("Data point keys:",Object.keys(n[0]||{})),console.log("=== END ANALYTICS CHART DEBUG ==="),b.jsxs("div",{className:ce("w-full",t),children:[b.jsx("div",{className:"relative bg-gray-50/30 py-6",children:b.jsx(ZC,{width:"100%",height:u,children:b.jsxs(o8,{data:n,margin:{top:20,right:30,left:20,bottom:20},children:[b.jsx("defs",{children:y.map((p,v)=>b.jsxs("linearGradient",{id:`gradient-${p.dataKey}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[b.jsx("stop",{offset:"5%",stopColor:p.color,stopOpacity:.08}),b.jsx("stop",{offset:"95%",stopColor:p.color,stopOpacity:.01})]},`gradient-${v}`))}),b.jsx(dg,{strokeDasharray:"2 2",className:"opacity-30",stroke:"#d1d5db",horizontal:!0,vertical:!1}),b.jsx(ws,{dataKey:"date",tickFormatter:f,axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#6b7280"},tickMargin:10}),b.jsx(Ss,{axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#6b7280"},tickFormatter:d,tickMargin:10,label:l?{value:l,angle:-90,position:"insideLeft",style:{textAnchor:"middle",fontSize:12,fill:"#6b7280"}}:void 0}),c.show&&b.jsx(Wt,{content:p=>b.jsx(B8,{...p,config:e}),cursor:{stroke:"#d1d5db",strokeWidth:1,strokeDasharray:"4 4"},allowEscapeViewBox:{x:!1,y:!1}}),y.map(p=>b.jsx(wr,{type:"monotone",dataKey:p.dataKey,stroke:"none",fill:`url(#gradient-${p.dataKey})`,fillOpacity:1,isAnimationActive:!1,name:""},`area-${p.dataKey}`)),y.map(p=>b.jsx(li,{type:"monotone",dataKey:p.dataKey,stroke:p.color,strokeWidth:2.5,strokeDasharray:p.strokeDasharray,dot:!1,activeDot:{r:5,fill:p.color,stroke:p.color,strokeWidth:2},name:p.label},p.dataKey))]})})}),b.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[b.jsx("div",{children:s&&b.jsxs("p",{className:"text-sm text-muted-foreground",children:["Showing data from ",new Date(s.start).toLocaleDateString("en-US",{day:"numeric",month:"short",year:"numeric"})," - ",new Date(s.end).toLocaleDateString("en-US",{day:"numeric",month:"short",year:"numeric"})]})}),b.jsx("div",{className:"flex items-center gap-4",children:b.jsx("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:y.map(p=>b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:p.color}}),b.jsx("span",{children:p.label})]},p.dataKey))})})]})]}))};/**
|
|
31
126
|
* @license lucide-react v0.294.0 - ISC
|
|
32
127
|
*
|
|
33
128
|
* This source code is licensed under the ISC license.
|
|
34
129
|
* See the LICENSE file in the root directory of this source tree.
|
|
35
|
-
*/var
|
|
130
|
+
*/var F8={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
36
131
|
* @license lucide-react v0.294.0 - ISC
|
|
37
132
|
*
|
|
38
133
|
* This source code is licensed under the ISC license.
|
|
39
134
|
* See the LICENSE file in the root directory of this source tree.
|
|
40
|
-
*/const
|
|
135
|
+
*/const W8=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),mt=(e,t)=>{const r=S.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:s="",children:l,...u},c)=>S.createElement("svg",{ref:c,...F8,width:a,height:a,stroke:n,strokeWidth:o?Number(i)*24/Number(a):i,className:["lucide",`lucide-${W8(e)}`,s].join(" "),...u},[...t.map(([f,d])=>S.createElement(f,d)),...Array.isArray(l)?l:[l]]));return r.displayName=`${e}`,r};/**
|
|
41
136
|
* @license lucide-react v0.294.0 - ISC
|
|
42
137
|
*
|
|
43
138
|
* This source code is licensed under the ISC license.
|
|
44
139
|
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
-
*/const
|
|
140
|
+
*/const U8=mt("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
|
|
46
141
|
* @license lucide-react v0.294.0 - ISC
|
|
47
142
|
*
|
|
48
143
|
* This source code is licensed under the ISC license.
|
|
49
144
|
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
-
*/const
|
|
145
|
+
*/const sb=mt("Calendar",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}]]);/**
|
|
51
146
|
* @license lucide-react v0.294.0 - ISC
|
|
52
147
|
*
|
|
53
148
|
* This source code is licensed under the ISC license.
|
|
54
149
|
* See the LICENSE file in the root directory of this source tree.
|
|
55
|
-
*/const
|
|
150
|
+
*/const js=mt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
56
151
|
* @license lucide-react v0.294.0 - ISC
|
|
57
152
|
*
|
|
58
153
|
* This source code is licensed under the ISC license.
|
|
59
154
|
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
-
*/const
|
|
155
|
+
*/const z8=mt("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
61
156
|
* @license lucide-react v0.294.0 - ISC
|
|
62
157
|
*
|
|
63
158
|
* This source code is licensed under the ISC license.
|
|
64
159
|
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/const
|
|
160
|
+
*/const G8=mt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
66
161
|
* @license lucide-react v0.294.0 - ISC
|
|
67
162
|
*
|
|
68
163
|
* This source code is licensed under the ISC license.
|
|
69
164
|
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
-
*/const
|
|
165
|
+
*/const lb=mt("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
71
166
|
* @license lucide-react v0.294.0 - ISC
|
|
72
167
|
*
|
|
73
168
|
* This source code is licensed under the ISC license.
|
|
74
169
|
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/const
|
|
170
|
+
*/const q8=mt("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
76
171
|
* @license lucide-react v0.294.0 - ISC
|
|
77
172
|
*
|
|
78
173
|
* This source code is licensed under the ISC license.
|
|
79
174
|
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/const
|
|
175
|
+
*/const K8=mt("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
81
176
|
* @license lucide-react v0.294.0 - ISC
|
|
82
177
|
*
|
|
83
178
|
* This source code is licensed under the ISC license.
|
|
84
179
|
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/const
|
|
180
|
+
*/const V8=mt("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
86
181
|
* @license lucide-react v0.294.0 - ISC
|
|
87
182
|
*
|
|
88
183
|
* This source code is licensed under the ISC license.
|
|
89
184
|
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
-
*/const
|
|
185
|
+
*/const ub=mt("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
91
186
|
* @license lucide-react v0.294.0 - ISC
|
|
92
187
|
*
|
|
93
188
|
* This source code is licensed under the ISC license.
|
|
94
189
|
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
-
*/const
|
|
190
|
+
*/const H8=mt("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/**
|
|
96
191
|
* @license lucide-react v0.294.0 - ISC
|
|
97
192
|
*
|
|
98
193
|
* This source code is licensed under the ISC license.
|
|
99
194
|
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/const
|
|
195
|
+
*/const Y8=mt("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/**
|
|
101
196
|
* @license lucide-react v0.294.0 - ISC
|
|
102
197
|
*
|
|
103
198
|
* This source code is licensed under the ISC license.
|
|
104
199
|
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
-
*/const n0=ht("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);function mf(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=mf(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ve(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=mf(e))&&(n&&(n+=" "),n+=t);return n}const Fs="-",a0=e=>{const t=o0(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const s=o.split(Fs);return s[0]===""&&s.length!==1&&s.shift(),gf(s,t)||i0(o)},getConflictingClassGroupIds:(o,s)=>{const l=r[o]||[];return s&&n[o]?[...l,...n[o]]:l}}},gf=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?gf(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join(Fs);return(o=t.validators.find(({validator:s})=>s(i)))==null?void 0:o.classGroupId},bf=/^\[(.+)\]$/,i0=e=>{if(bf.test(e)){const t=bf.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},o0=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return l0(Object.entries(e.classGroups),r).forEach(([i,o])=>{Ws(o,n,i,t)}),n},Ws=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const i=a===""?t:xf(t,a);i.classGroupId=r;return}if(typeof a=="function"){if(s0(a)){Ws(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,o])=>{Ws(o,xf(t,i),r,n)})})},xf=(e,t)=>{let r=e;return t.split(Fs).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},s0=e=>e.isThemeGetter,l0=(e,t)=>t?e.map(([r,n])=>{const a=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,s])=>[t+o,s])):i);return[r,a]}):e,u0=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(i,o)=>{r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return a(i,o),o},set(i,o){r.has(i)?r.set(i,o):a(i,o)}}},wf="!",c0=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],i=t.length,o=s=>{const l=[];let u=0,c=0,f;for(let y=0;y<s.length;y++){let x=s[y];if(u===0){if(x===a&&(n||s.slice(y,y+i)===t)){l.push(s.slice(c,y)),c=y+i;continue}if(x==="/"){f=y;continue}}x==="["?u++:x==="]"&&u--}const d=l.length===0?s:s.substring(c),h=d.startsWith(wf),m=h?d.substring(1):d,v=f&&f>c?f-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:v}};return r?s=>r({className:s,parseClassName:o}):o},f0=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},d0=e=>({cache:u0(e.cacheSize),parseClassName:c0(e),...a0(e)}),h0=/\s+/,p0=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,i=[],o=e.trim().split(h0);let s="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:h}=r(u);let m=!!h,v=n(m?d.substring(0,h):d);if(!v){if(!m){s=u+(s.length>0?" "+s:s);continue}if(v=n(d),!v){s=u+(s.length>0?" "+s:s);continue}m=!1}const y=f0(c).join(":"),x=f?y+wf:y,O=x+v;if(i.includes(O))continue;i.push(O);const w=a(v,m);for(let T=0;T<w.length;++T){const p=w[T];i.push(x+p)}s=u+(s.length>0?" "+s:s)}return s};function v0(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Of(t))&&(n&&(n+=" "),n+=r);return n}const Of=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Of(e[n]))&&(r&&(r+=" "),r+=t);return r};function y0(e,...t){let r,n,a,i=o;function o(l){const u=t.reduce((c,f)=>f(c),e());return r=d0(u),n=r.cache.get,a=r.cache.set,i=s,s(l)}function s(l){const u=n(l);if(u)return u;const c=p0(l,r);return a(l,c),c}return function(){return i(v0.apply(null,arguments))}}const Ie=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Sf=/^\[(?:([a-z-]+):)?(.+)\]$/i,m0=/^\d+\/\d+$/,g0=new Set(["px","full","screen"]),b0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,x0=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,w0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,O0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,S0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ht=e=>Qr(e)||g0.has(e)||m0.test(e),ur=e=>en(e,"length",C0),Qr=e=>!!e&&!Number.isNaN(Number(e)),Us=e=>en(e,"number",Qr),la=e=>!!e&&Number.isInteger(Number(e)),A0=e=>e.endsWith("%")&&Qr(e.slice(0,-1)),pe=e=>Sf.test(e),cr=e=>b0.test(e),T0=new Set(["length","size","percentage"]),P0=e=>en(e,T0,Af),_0=e=>en(e,"position",Af),j0=new Set(["image","url"]),E0=e=>en(e,j0,k0),$0=e=>en(e,"",M0),ua=()=>!0,en=(e,t,r)=>{const n=Sf.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},C0=e=>x0.test(e)&&!w0.test(e),Af=()=>!1,M0=e=>O0.test(e),k0=e=>S0.test(e),N0=y0(()=>{const e=Ie("colors"),t=Ie("spacing"),r=Ie("blur"),n=Ie("brightness"),a=Ie("borderColor"),i=Ie("borderRadius"),o=Ie("borderSpacing"),s=Ie("borderWidth"),l=Ie("contrast"),u=Ie("grayscale"),c=Ie("hueRotate"),f=Ie("invert"),d=Ie("gap"),h=Ie("gradientColorStops"),m=Ie("gradientColorStopPositions"),v=Ie("inset"),y=Ie("margin"),x=Ie("opacity"),O=Ie("padding"),w=Ie("saturate"),T=Ie("scale"),p=Ie("sepia"),g=Ie("skew"),A=Ie("space"),P=Ie("translate"),_=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",pe,t],C=()=>[pe,t],W=()=>["",Ht,ur],U=()=>["auto",Qr,pe],F=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],N=()=>["solid","dashed","dotted","double","none"],D=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>["start","end","center","between","around","evenly","stretch"],E=()=>["","0",pe],j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>[Qr,pe];return{cacheSize:500,separator:":",theme:{colors:[ua],spacing:[Ht,ur],blur:["none","",cr,pe],brightness:I(),borderColor:[e],borderRadius:["none","","full",cr,pe],borderSpacing:C(),borderWidth:W(),contrast:I(),grayscale:E(),hueRotate:I(),invert:E(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[A0,ur],inset:M(),margin:M(),opacity:I(),padding:C(),saturate:I(),scale:I(),sepia:E(),skew:I(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",pe]}],container:["container"],columns:[{columns:[cr]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...F(),pe]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",la,pe]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",pe]}],grow:[{grow:E()}],shrink:[{shrink:E()}],order:[{order:["first","last","none",la,pe]}],"grid-cols":[{"grid-cols":[ua]}],"col-start-end":[{col:["auto",{span:["full",la,pe]},pe]}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":[ua]}],"row-start-end":[{row:["auto",{span:[la,pe]},pe]}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",pe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",pe]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...L()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...L(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...L(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[O]}],px:[{px:[O]}],py:[{py:[O]}],ps:[{ps:[O]}],pe:[{pe:[O]}],pt:[{pt:[O]}],pr:[{pr:[O]}],pb:[{pb:[O]}],pl:[{pl:[O]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",pe,t]}],"min-w":[{"min-w":[pe,t,"min","max","fit"]}],"max-w":[{"max-w":[pe,t,"none","full","min","max","fit","prose",{screen:[cr]},cr]}],h:[{h:[pe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[pe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[pe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[pe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",cr,ur]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Us]}],"font-family":[{font:[ua]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",pe]}],"line-clamp":[{"line-clamp":["none",Qr,Us]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ht,pe]}],"list-image":[{"list-image":["none",pe]}],"list-style-type":[{list:["none","disc","decimal",pe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...N(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ht,ur]}],"underline-offset":[{"underline-offset":["auto",Ht,pe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",pe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...F(),_0]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",P0]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},E0]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...N(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:N()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...N()]}],"outline-offset":[{"outline-offset":[Ht,pe]}],"outline-w":[{outline:[Ht,ur]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[Ht,ur]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",cr,$0]}],"shadow-color":[{shadow:[ua]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...D(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":D()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",cr,pe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[p]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[p]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",pe]}],duration:[{duration:I()}],ease:[{ease:["linear","in","out","in-out",pe]}],delay:[{delay:I()}],animate:[{animate:["none","spin","ping","pulse","bounce",pe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[la,pe]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[g]}],"skew-y":[{"skew-y":[g]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",pe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",pe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",pe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ht,ur,Us]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function ue(...e){return N0(ve(e))}const Tf=({data:e,className:t,onClick:r})=>{const{title:n,value:a,change:i,info:o,highlighted:s}=e,l=f=>typeof f=="number"?f.toLocaleString():f.toString(),u=f=>`${f}%`,c=()=>{r&&r(e)};return b.jsxs("div",{className:ue("rounded-lg border p-4 transition-all duration-200 bg-white",!s&&"border-gray-200 shadow-sm",s&&["!border-[#84adff]"],r&&"cursor-pointer",t),onClick:c,children:[b.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[b.jsx("span",{className:"text-sm font-medium text-gray-600",children:n}),o&&b.jsxs("div",{className:"relative group",children:[b.jsx(Qb,{className:"h-4 w-4 text-gray-400 cursor-help"}),b.jsxs("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-3 py-2 text-xs text-white bg-gray-900 rounded-md opacity-0 group-hover:!opacity-100 transition-opacity duration-200 whitespace-nowrap z-10 shadow-lg",children:[o,b.jsx("div",{className:"absolute top-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-l-4 border-r-4 border-t-4 border-transparent border-t-gray-900"})]})]})]}),b.jsxs("div",{className:"flex items-baseline gap-3",children:[b.jsx("span",{className:"text-2xl font-semibold text-gray-900",children:l(a)}),i&&b.jsxs("div",{className:ue("flex items-center gap-1 px-2 py-1 text-sm font-medium",(i.type==="increase","")),style:i.type==="increase"?{color:"rgb(21 128 61 / var(--tw-text-opacity, 1))",border:"1px solid #ABEFC6",borderRadius:"150px",background:"rgba(16, 185, 129, 0.10)"}:{color:"rgb(185 28 28 / var(--tw-text-opacity, 1))",border:"1px solid #FCA5A5",borderRadius:"150px",background:"rgba(239, 68, 68, 0.10)"},children:[i.type==="increase"?b.jsx(n0,{className:"h-3 w-3"}):b.jsx(r0,{className:"h-3 w-3"}),b.jsx("span",{children:u(i.value)})]})]})]})};var D0=Array.isArray,lt=D0,I0=typeof Pi=="object"&&Pi&&Pi.Object===Object&&Pi,Pf=I0,R0=Pf,L0=typeof self=="object"&&self&&self.Object===Object&&self,B0=R0||L0||Function("return this")(),Bt=B0,F0=Bt,W0=F0.Symbol,ca=W0,_f=ca,jf=Object.prototype,U0=jf.hasOwnProperty,z0=jf.toString,fa=_f?_f.toStringTag:void 0;function K0(e){var t=U0.call(e,fa),r=e[fa];try{e[fa]=void 0;var n=!0}catch{}var a=z0.call(e);return n&&(t?e[fa]=r:delete e[fa]),a}var q0=K0,G0=Object.prototype,V0=G0.toString;function H0(e){return V0.call(e)}var Y0=H0,Ef=ca,X0=q0,J0=Y0,Z0="[object Null]",Q0="[object Undefined]",$f=Ef?Ef.toStringTag:void 0;function ex(e){return e==null?e===void 0?Q0:Z0:$f&&$f in Object(e)?X0(e):J0(e)}var Yt=ex;function tx(e){return e!=null&&typeof e=="object"}var Xt=tx,rx=Yt,nx=Xt,ax="[object Symbol]";function ix(e){return typeof e=="symbol"||nx(e)&&rx(e)==ax}var tn=ix,ox=lt,sx=tn,lx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ux=/^\w*$/;function cx(e,t){if(ox(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||sx(e)?!0:ux.test(e)||!lx.test(e)||t!=null&&e in Object(t)}var zs=cx;function fx(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var fr=fx;const rn=ke(fr);var dx=Yt,hx=fr,px="[object AsyncFunction]",vx="[object Function]",yx="[object GeneratorFunction]",mx="[object Proxy]";function gx(e){if(!hx(e))return!1;var t=dx(e);return t==vx||t==yx||t==px||t==mx}var Ks=gx;const he=ke(Ks);var bx=Bt,xx=bx["__core-js_shared__"],wx=xx,qs=wx,Cf=function(){var e=/[^.]+$/.exec(qs&&qs.keys&&qs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ox(e){return!!Cf&&Cf in e}var Sx=Ox,Ax=Function.prototype,Tx=Ax.toString;function Px(e){if(e!=null){try{return Tx.call(e)}catch{}try{return e+""}catch{}}return""}var Mf=Px,_x=Ks,jx=Sx,Ex=fr,$x=Mf,Cx=/[\\^$.*+?()[\]{}|]/g,Mx=/^\[object .+?Constructor\]$/,kx=Function.prototype,Nx=Object.prototype,Dx=kx.toString,Ix=Nx.hasOwnProperty,Rx=RegExp("^"+Dx.call(Ix).replace(Cx,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Lx(e){if(!Ex(e)||jx(e))return!1;var t=_x(e)?Rx:Mx;return t.test($x(e))}var Bx=Lx;function Fx(e,t){return e==null?void 0:e[t]}var Wx=Fx,Ux=Bx,zx=Wx;function Kx(e,t){var r=zx(e,t);return Ux(r)?r:void 0}var Pr=Kx,qx=Pr,Gx=qx(Object,"create"),ji=Gx,kf=ji;function Vx(){this.__data__=kf?kf(null):{},this.size=0}var Hx=Vx;function Yx(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Xx=Yx,Jx=ji,Zx="__lodash_hash_undefined__",Qx=Object.prototype,ew=Qx.hasOwnProperty;function tw(e){var t=this.__data__;if(Jx){var r=t[e];return r===Zx?void 0:r}return ew.call(t,e)?t[e]:void 0}var rw=tw,nw=ji,aw=Object.prototype,iw=aw.hasOwnProperty;function ow(e){var t=this.__data__;return nw?t[e]!==void 0:iw.call(t,e)}var sw=ow,lw=ji,uw="__lodash_hash_undefined__";function cw(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=lw&&t===void 0?uw:t,this}var fw=cw,dw=Hx,hw=Xx,pw=rw,vw=sw,yw=fw;function nn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}nn.prototype.clear=dw,nn.prototype.delete=hw,nn.prototype.get=pw,nn.prototype.has=vw,nn.prototype.set=yw;var mw=nn;function gw(){this.__data__=[],this.size=0}var bw=gw;function xw(e,t){return e===t||e!==e&&t!==t}var Gs=xw,ww=Gs;function Ow(e,t){for(var r=e.length;r--;)if(ww(e[r][0],t))return r;return-1}var Ei=Ow,Sw=Ei,Aw=Array.prototype,Tw=Aw.splice;function Pw(e){var t=this.__data__,r=Sw(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Tw.call(t,r,1),--this.size,!0}var _w=Pw,jw=Ei;function Ew(e){var t=this.__data__,r=jw(t,e);return r<0?void 0:t[r][1]}var $w=Ew,Cw=Ei;function Mw(e){return Cw(this.__data__,e)>-1}var kw=Mw,Nw=Ei;function Dw(e,t){var r=this.__data__,n=Nw(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Iw=Dw,Rw=bw,Lw=_w,Bw=$w,Fw=kw,Ww=Iw;function an(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}an.prototype.clear=Rw,an.prototype.delete=Lw,an.prototype.get=Bw,an.prototype.has=Fw,an.prototype.set=Ww;var $i=an,Uw=Pr,zw=Bt,Kw=Uw(zw,"Map"),Vs=Kw,Nf=mw,qw=$i,Gw=Vs;function Vw(){this.size=0,this.__data__={hash:new Nf,map:new(Gw||qw),string:new Nf}}var Hw=Vw;function Yw(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Xw=Yw,Jw=Xw;function Zw(e,t){var r=e.__data__;return Jw(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Ci=Zw,Qw=Ci;function e1(e){var t=Qw(this,e).delete(e);return this.size-=t?1:0,t}var t1=e1,r1=Ci;function n1(e){return r1(this,e).get(e)}var a1=n1,i1=Ci;function o1(e){return i1(this,e).has(e)}var s1=o1,l1=Ci;function u1(e,t){var r=l1(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var c1=u1,f1=Hw,d1=t1,h1=a1,p1=s1,v1=c1;function on(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}on.prototype.clear=f1,on.prototype.delete=d1,on.prototype.get=h1,on.prototype.has=p1,on.prototype.set=v1;var Hs=on,Df=Hs,y1="Expected a function";function Ys(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(y1);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(Ys.Cache||Df),r}Ys.Cache=Df;var If=Ys;const m1=ke(If);var g1=If,b1=500;function x1(e){var t=g1(e,function(n){return r.size===b1&&r.clear(),n}),r=t.cache;return t}var w1=x1,O1=w1,S1=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,A1=/\\(\\)?/g,T1=O1(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(S1,function(r,n,a,i){t.push(a?i.replace(A1,"$1"):n||r)}),t}),P1=T1;function _1(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var Xs=_1,Rf=ca,j1=Xs,E1=lt,$1=tn,Lf=Rf?Rf.prototype:void 0,Bf=Lf?Lf.toString:void 0;function Ff(e){if(typeof e=="string")return e;if(E1(e))return j1(e,Ff)+"";if($1(e))return Bf?Bf.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var C1=Ff,M1=C1;function k1(e){return e==null?"":M1(e)}var Wf=k1,N1=lt,D1=zs,I1=P1,R1=Wf;function L1(e,t){return N1(e)?e:D1(e,t)?[e]:I1(R1(e))}var Uf=L1,B1=tn;function F1(e){if(typeof e=="string"||B1(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Mi=F1,W1=Uf,U1=Mi;function z1(e,t){t=W1(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[U1(t[r++])];return r&&r==n?e:void 0}var Js=z1,K1=Js;function q1(e,t,r){var n=e==null?void 0:K1(e,t);return n===void 0?r:n}var zf=q1;const xt=ke(zf);function G1(e){return e==null}var V1=G1;const fe=ke(V1);var H1=Yt,Y1=lt,X1=Xt,J1="[object String]";function Z1(e){return typeof e=="string"||!Y1(e)&&X1(e)&&H1(e)==J1}var Q1=Z1;const _r=ke(Q1);var Zs={exports:{}},xe={};/**
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
* @license React
|
|
115
|
-
* react-is.development.js
|
|
116
|
-
*
|
|
117
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
118
|
-
*
|
|
119
|
-
* This source code is licensed under the MIT license found in the
|
|
120
|
-
* LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/var qf;function tO(){return qf||(qf=1,process.env.NODE_ENV!=="production"&&function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m=!1,v=!1,y=!1,x=!1,O=!1,w;w=Symbol.for("react.module.reference");function T(G){return!!(typeof G=="string"||typeof G=="function"||G===r||G===a||O||G===n||G===u||G===c||x||G===h||m||v||y||typeof G=="object"&&G!==null&&(G.$$typeof===d||G.$$typeof===f||G.$$typeof===i||G.$$typeof===o||G.$$typeof===l||G.$$typeof===w||G.getModuleId!==void 0))}function p(G){if(typeof G=="object"&&G!==null){var re=G.$$typeof;switch(re){case e:var oe=G.type;switch(oe){case r:case a:case n:case u:case c:return oe;default:var Ce=oe&&oe.$$typeof;switch(Ce){case s:case o:case l:case d:case f:case i:return Ce;default:return re}}case t:return re}}}var g=o,A=i,P=e,_=l,R=r,M=d,C=f,W=t,U=a,F=n,N=u,D=c,L=!1,E=!1;function j(G){return L||(L=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function I(G){return E||(E=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function B(G){return p(G)===o}function z(G){return p(G)===i}function V(G){return typeof G=="object"&&G!==null&&G.$$typeof===e}function Z(G){return p(G)===l}function Q(G){return p(G)===r}function ee(G){return p(G)===d}function te(G){return p(G)===f}function q(G){return p(G)===t}function Y(G){return p(G)===a}function J(G){return p(G)===n}function k(G){return p(G)===u}function ie(G){return p(G)===c}we.ContextConsumer=g,we.ContextProvider=A,we.Element=P,we.ForwardRef=_,we.Fragment=R,we.Lazy=M,we.Memo=C,we.Portal=W,we.Profiler=U,we.StrictMode=F,we.Suspense=N,we.SuspenseList=D,we.isAsyncMode=j,we.isConcurrentMode=I,we.isContextConsumer=B,we.isContextProvider=z,we.isElement=V,we.isForwardRef=Z,we.isFragment=Q,we.isLazy=ee,we.isMemo=te,we.isPortal=q,we.isProfiler=Y,we.isStrictMode=J,we.isSuspense=k,we.isSuspenseList=ie,we.isValidElementType=T,we.typeOf=p}()),we}process.env.NODE_ENV==="production"?Zs.exports=eO():Zs.exports=tO();var rO=Zs.exports,nO=Yt,aO=Xt,iO="[object Number]";function oO(e){return typeof e=="number"||aO(e)&&nO(e)==iO}var Gf=oO;const sO=ke(Gf);var lO=Gf;function uO(e){return lO(e)&&e!=+e}var cO=uO;const sn=ke(cO);var $t=function(t){return t===0?0:t>0?1:-1},jr=function(t){return _r(t)&&t.indexOf("%")===t.length-1},X=function(t){return sO(t)&&!sn(t)},fO=function(t){return fe(t)},Ve=function(t){return X(t)||_r(t)},dO=0,Er=function(t){var r=++dO;return"".concat(t||"").concat(r)},$r=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!X(t)&&!_r(t))return n;var i;if(jr(t)){var o=t.indexOf("%");i=r*parseFloat(t.slice(0,o))/100}else i=+t;return sn(i)&&(i=n),a&&i>r&&(i=r),i},dr=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},hO=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},a=0;a<r;a++)if(!n[t[a]])n[t[a]]=!0;else return!0;return!1},We=function(t,r){return X(t)&&X(r)?function(n){return t+n*(r-t)}:function(){return r}};function ki(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):xt(n,t))===r})}var pO=function(t){if(!t||!t.length)return null;for(var r=t.length,n=0,a=0,i=0,o=0,s=1/0,l=-1/0,u=0,c=0,f=0;f<r;f++)u=t[f].cx||0,c=t[f].cy||0,n+=u,a+=c,i+=u*c,o+=u*u,s=Math.min(s,u),l=Math.max(l,u);var d=r*o!==n*n?(r*i-n*a)/(r*o-n*n):0;return{xmin:s,xmax:l,a:d,b:(a-d*n)/r}},vO=function(t,r){return X(t)&&X(r)?t-r:_r(t)&&_r(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function ln(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 Qs(e){"@babel/helpers - typeof";return Qs=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},Qs(e)}var yO=["viewBox","children"],mO=["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"],Vf=["points","pathLength"],el={svg:yO,polygon:Vf,polyline:Vf},tl=["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"],Ni=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(S.isValidElement(t)&&(n=t.props),!rn(n))return null;var a={};return Object.keys(n).forEach(function(i){tl.includes(i)&&(a[i]=r||function(o){return n[i](n,o)})}),a},gO=function(t,r,n){return function(a){return t(r,n,a),null}},da=function(t,r,n){if(!rn(t)||Qs(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var o=t[i];tl.includes(i)&&typeof o=="function"&&(a||(a={}),a[i]=gO(o,r,n))}),a},bO=["children"],xO=["children"];function Hf(e,t){if(e==null)return{};var r=wO(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function wO(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 rl(e){"@babel/helpers - typeof";return rl=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},rl(e)}var Yf={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"},Jt=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},Xf=null,nl=null,al=function e(t){if(t===Xf&&Array.isArray(nl))return nl;var r=[];return S.Children.forEach(t,function(n){fe(n)||(rO.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),nl=r,Xf=t,r};function ut(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(a){return Jt(a)}):n=[Jt(t)],al(e).forEach(function(a){var i=xt(a,"type.displayName")||xt(a,"type.name");n.indexOf(i)!==-1&&r.push(a)}),r}function pt(e,t){var r=ut(e,t);return r&&r[0]}var Jf=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,a=r.height;return!(!X(n)||n<=0||!X(a)||a<=0)},OO=["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"],SO=function(t){return t&&t.type&&_r(t.type)&&OO.indexOf(t.type)>=0},Zf=function(t){return t&&rl(t)==="object"&&"clipDot"in t},AO=function(t,r,n,a){var i,o=(i=el==null?void 0:el[a])!==null&&i!==void 0?i:[];return r.startsWith("data-")||!he(t)&&(a&&o.includes(r)||mO.includes(r))||n&&tl.includes(r)},de=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(S.isValidElement(t)&&(a=t.props),!rn(a))return null;var i={};return Object.keys(a).forEach(function(o){var s;AO((s=a)===null||s===void 0?void 0:s[o],o,r,n)&&(i[o]=a[o])}),i},il=function e(t,r){if(t===r)return!0;var n=S.Children.count(t);if(n!==S.Children.count(r))return!1;if(n===0)return!0;if(n===1)return Qf(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var a=0;a<n;a++){var i=t[a],o=r[a];if(Array.isArray(i)||Array.isArray(o)){if(!e(i,o))return!1}else if(!Qf(i,o))return!1}return!0},Qf=function(t,r){if(fe(t)&&fe(r))return!0;if(!fe(t)&&!fe(r)){var n=t.props||{},a=n.children,i=Hf(n,bO),o=r.props||{},s=o.children,l=Hf(o,xO);return a&&s?ln(i,l)&&il(a,s):!a&&!s?ln(i,l):!1}return!1},ed=function(t,r){var n=[],a={};return al(t).forEach(function(i,o){if(SO(i))n.push(i);else if(i){var s=Jt(i.type),l=r[s]||{},u=l.handler,c=l.once;if(u&&(!c||!a[s])){var f=u(i,s,o);n.push(f),a[s]=!0}}}),n},TO=function(t){var r=t&&t.type;return r&&Yf[r]?Yf[r]:null},PO=function(t,r){return al(r).indexOf(t)},_O=["children","width","height","viewBox","className","style","title","desc"];function ol(){return ol=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},ol.apply(this,arguments)}function jO(e,t){if(e==null)return{};var r=EO(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function EO(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 sl(e){var t=e.children,r=e.width,n=e.height,a=e.viewBox,i=e.className,o=e.style,s=e.title,l=e.desc,u=jO(e,_O),c=a||{width:r,height:n,x:0,y:0},f=ve("recharts-surface",i);return S.createElement("svg",ol({},de(u,!0,"svg"),{className:f,width:r,height:n,style:o,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),S.createElement("title",null,s),S.createElement("desc",null,l),t)}var $O=["children","className"];function ll(){return ll=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},ll.apply(this,arguments)}function CO(e,t){if(e==null)return{};var r=MO(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function MO(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 be=S.forwardRef(function(e,t){var r=e.children,n=e.className,a=CO(e,$O),i=ve("recharts-layer",n);return S.createElement("g",ll({className:i},de(a,!0),{ref:t}),r)}),kO=process.env.NODE_ENV!=="production",Zt=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),i=2;i<n;i++)a[i-2]=arguments[i];if(kO&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;console.warn(r.replace(/%s/g,function(){return a[o++]}))}};function NO(e,t,r){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(a);++n<a;)i[n]=e[n+t];return i}var DO=NO,IO=DO;function RO(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:IO(e,t,r)}var LO=RO,BO="\\ud800-\\udfff",FO="\\u0300-\\u036f",WO="\\ufe20-\\ufe2f",UO="\\u20d0-\\u20ff",zO=FO+WO+UO,KO="\\ufe0e\\ufe0f",qO="\\u200d",GO=RegExp("["+qO+BO+zO+KO+"]");function VO(e){return GO.test(e)}var td=VO;function HO(e){return e.split("")}var YO=HO,rd="\\ud800-\\udfff",XO="\\u0300-\\u036f",JO="\\ufe20-\\ufe2f",ZO="\\u20d0-\\u20ff",QO=XO+JO+ZO,eS="\\ufe0e\\ufe0f",tS="["+rd+"]",ul="["+QO+"]",cl="\\ud83c[\\udffb-\\udfff]",rS="(?:"+ul+"|"+cl+")",nd="[^"+rd+"]",ad="(?:\\ud83c[\\udde6-\\uddff]){2}",id="[\\ud800-\\udbff][\\udc00-\\udfff]",nS="\\u200d",od=rS+"?",sd="["+eS+"]?",aS="(?:"+nS+"(?:"+[nd,ad,id].join("|")+")"+sd+od+")*",iS=sd+od+aS,oS="(?:"+[nd+ul+"?",ul,ad,id,tS].join("|")+")",sS=RegExp(cl+"(?="+cl+")|"+oS+iS,"g");function lS(e){return e.match(sS)||[]}var uS=lS,cS=YO,fS=td,dS=uS;function hS(e){return fS(e)?dS(e):cS(e)}var pS=hS,vS=LO,yS=td,mS=pS,gS=Wf;function bS(e){return function(t){t=gS(t);var r=yS(t)?mS(t):void 0,n=r?r[0]:t.charAt(0),a=r?vS(r,1).join(""):t.slice(1);return n[e]()+a}}var xS=bS,wS=xS,OS=wS("toUpperCase"),SS=OS;const Di=ke(SS);function Ne(e){return function(){return e}}const ld=Math.cos,Ii=Math.sin,Ct=Math.sqrt,Ri=Math.PI,Li=2*Ri,fl=Math.PI,dl=2*fl,Cr=1e-6,AS=dl-Cr;function ud(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function TS(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return ud;const r=10**t;return function(n){this._+=n[0];for(let a=1,i=n.length;a<i;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class PS{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?ud:TS(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,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,i,o){this._append`C${+t},${+r},${+n},${+a},${this._x1=+i},${this._y1=+o}`}arcTo(t,r,n,a,i){if(t=+t,r=+r,n=+n,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let o=this._x1,s=this._y1,l=n-t,u=a-r,c=o-t,f=s-r,d=c*c+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>Cr)if(!(Math.abs(f*l-u*c)>Cr)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,m=a-s,v=l*l+u*u,y=h*h+m*m,x=Math.sqrt(v),O=Math.sqrt(d),w=i*Math.tan((fl-Math.acos((v+d-y)/(2*x*O)))/2),T=w/O,p=w/x;Math.abs(T-1)>Cr&&this._append`L${t+T*c},${r+T*f}`,this._append`A${i},${i},0,0,${+(f*h>c*m)},${this._x1=t+p*l},${this._y1=r+p*u}`}}arc(t,r,n,a,i,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(a),l=n*Math.sin(a),u=t+s,c=r+l,f=1^o,d=o?a-i:i-a;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>Cr||Math.abs(this._y1-c)>Cr)&&this._append`L${u},${c}`,n&&(d<0&&(d=d%dl+dl),d>AS?this._append`A${n},${n},0,1,${f},${t-s},${r-l}A${n},${n},0,1,${f},${this._x1=u},${this._y1=c}`:d>Cr&&this._append`A${n},${n},0,${+(d>=fl)},${f},${this._x1=t+n*Math.cos(i)},${this._y1=r+n*Math.sin(i)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function hl(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 PS(t)}function pl(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function cd(e){this._context=e}cd.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 Bi(e){return new cd(e)}function fd(e){return e[0]}function dd(e){return e[1]}function hd(e,t){var r=Ne(!0),n=null,a=Bi,i=null,o=hl(s);e=typeof e=="function"?e:e===void 0?fd:Ne(e),t=typeof t=="function"?t:t===void 0?dd:Ne(t);function s(l){var u,c=(l=pl(l)).length,f,d=!1,h;for(n==null&&(i=a(h=o())),u=0;u<=c;++u)!(u<c&&r(f=l[u],u,l))===d&&((d=!d)?i.lineStart():i.lineEnd()),d&&i.point(+e(f,u,l),+t(f,u,l));if(h)return i=null,h+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:Ne(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:Ne(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Ne(!!l),s):r},s.curve=function(l){return arguments.length?(a=l,n!=null&&(i=a(n)),s):a},s.context=function(l){return arguments.length?(l==null?n=i=null:i=a(n=l),s):n},s}function Fi(e,t,r){var n=null,a=Ne(!0),i=null,o=Bi,s=null,l=hl(u);e=typeof e=="function"?e:e===void 0?fd:Ne(+e),t=typeof t=="function"?t:Ne(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?dd:Ne(+r);function u(f){var d,h,m,v=(f=pl(f)).length,y,x=!1,O,w=new Array(v),T=new Array(v);for(i==null&&(s=o(O=l())),d=0;d<=v;++d){if(!(d<v&&a(y=f[d],d,f))===x)if(x=!x)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),m=d-1;m>=h;--m)s.point(w[m],T[m]);s.lineEnd(),s.areaEnd()}x&&(w[d]=+e(y,d,f),T[d]=+t(y,d,f),s.point(n?+n(y,d,f):w[d],r?+r(y,d,f):T[d]))}if(O)return s=null,O+""||null}function c(){return hd().defined(a).curve(o).context(i)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:Ne(+f),n=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Ne(+f),u):e},u.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Ne(+f),u):n},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:Ne(+f),r=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Ne(+f),u):t},u.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Ne(+f),u):r},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(r)},u.lineX1=function(){return c().x(n).y(t)},u.defined=function(f){return arguments.length?(a=typeof f=="function"?f:Ne(!!f),u):a},u.curve=function(f){return arguments.length?(o=f,i!=null&&(s=o(i)),u):o},u.context=function(f){return arguments.length?(f==null?i=s=null:s=o(i=f),u):i},u}class pd{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 _S(e){return new pd(e,!0)}function jS(e){return new pd(e,!1)}const vl={draw(e,t){const r=Ct(t/Ri);e.moveTo(r,0),e.arc(0,0,r,0,Li)}},ES={draw(e,t){const r=Ct(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()}},vd=Ct(1/3),$S=vd*2,CS={draw(e,t){const r=Ct(t/$S),n=r*vd;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},MS={draw(e,t){const r=Ct(t),n=-r/2;e.rect(n,n,r,r)}},kS=.8908130915292852,yd=Ii(Ri/10)/Ii(7*Ri/10),NS=Ii(Li/10)*yd,DS=-ld(Li/10)*yd,IS={draw(e,t){const r=Ct(t*kS),n=NS*r,a=DS*r;e.moveTo(0,-r),e.lineTo(n,a);for(let i=1;i<5;++i){const o=Li*i/5,s=ld(o),l=Ii(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*a,l*n+s*a)}e.closePath()}},yl=Ct(3),RS={draw(e,t){const r=-Ct(t/(yl*3));e.moveTo(0,r*2),e.lineTo(-yl*r,-r),e.lineTo(yl*r,-r),e.closePath()}},wt=-.5,Ot=Ct(3)/2,ml=1/Ct(12),LS=(ml/2+1)*3,BS={draw(e,t){const r=Ct(t/LS),n=r/2,a=r*ml,i=n,o=r*ml+r,s=-i,l=o;e.moveTo(n,a),e.lineTo(i,o),e.lineTo(s,l),e.lineTo(wt*n-Ot*a,Ot*n+wt*a),e.lineTo(wt*i-Ot*o,Ot*i+wt*o),e.lineTo(wt*s-Ot*l,Ot*s+wt*l),e.lineTo(wt*n+Ot*a,wt*a-Ot*n),e.lineTo(wt*i+Ot*o,wt*o-Ot*i),e.lineTo(wt*s+Ot*l,wt*l-Ot*s),e.closePath()}};function FS(e,t){let r=null,n=hl(a);e=typeof e=="function"?e:Ne(e||vl),t=typeof t=="function"?t:Ne(t===void 0?64:+t);function a(){let i;if(r||(r=i=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:Ne(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Ne(+i),a):t},a.context=function(i){return arguments.length?(r=i??null,a):r},a}function Wi(){}function Ui(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function md(e){this._context=e}md.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Ui(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ui(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function WS(e){return new md(e)}function gd(e){this._context=e}gd.prototype={areaStart:Wi,areaEnd:Wi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Ui(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function US(e){return new gd(e)}function bd(e){this._context=e}bd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Ui(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function zS(e){return new bd(e)}function xd(e){this._context=e}xd.prototype={areaStart:Wi,areaEnd:Wi,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function KS(e){return new xd(e)}function wd(e){return e<0?-1:1}function Od(e,t,r){var n=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(n||a<0&&-0),o=(r-e._y1)/(a||n<0&&-0),s=(i*a+o*n)/(n+a);return(wd(i)+wd(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(s))||0}function Sd(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function gl(e,t,r){var n=e._x0,a=e._y0,i=e._x1,o=e._y1,s=(i-n)/3;e._context.bezierCurveTo(n+s,a+s*t,i-s,o-s*r,i,o)}function zi(e){this._context=e}zi.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:gl(this,this._t0,Sd(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,gl(this,Sd(this,r=Od(this,e,t)),r);break;default:gl(this,this._t0,r=Od(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Ad(e){this._context=new Td(e)}(Ad.prototype=Object.create(zi.prototype)).point=function(e,t){zi.prototype.point.call(this,t,e)};function Td(e){this._context=e}Td.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,a,i){this._context.bezierCurveTo(t,e,n,r,i,a)}};function qS(e){return new zi(e)}function GS(e){return new Ad(e)}function Pd(e){this._context=e}Pd.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=_d(e),a=_d(t),i=0,o=1;o<r;++i,++o)this._context.bezierCurveTo(n[0][i],a[0][i],n[1][i],a[1][i],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 _d(e){var t,r=e.length-1,n,a=new Array(r),i=new Array(r),o=new Array(r);for(a[0]=0,i[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,i[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,i[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/i[t-1],i[t]-=n,o[t]-=n*o[t-1];for(a[r-1]=o[r-1]/i[r-1],t=r-2;t>=0;--t)a[t]=(o[t]-a[t+1])/i[t];for(i[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function VS(e){return new Pd(e)}function Ki(e,t){this._context=e,this._t=t}Ki.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 HS(e){return new Ki(e,.5)}function YS(e){return new Ki(e,0)}function XS(e){return new Ki(e,1)}function un(e,t){if((o=e.length)>1)for(var r=1,n,a,i=e[t[0]],o,s=i.length;r<o;++r)for(a=i,i=e[t[r]],n=0;n<s;++n)i[n][1]+=i[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function bl(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function JS(e,t){return e[t]}function ZS(e){const t=[];return t.key=e,t}function QS(){var e=Ne([]),t=bl,r=un,n=JS;function a(i){var o=Array.from(e.apply(this,arguments),ZS),s,l=o.length,u=-1,c;for(const f of i)for(s=0,++u;s<l;++s)(o[s][u]=[0,+n(f,o[s].key,u,i)]).data=f;for(s=0,c=pl(t(o));s<l;++s)o[c[s]].index=s;return r(o,c),o}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:Ne(Array.from(i)),a):e},a.value=function(i){return arguments.length?(n=typeof i=="function"?i:Ne(+i),a):n},a.order=function(i){return arguments.length?(t=i==null?bl:typeof i=="function"?i:Ne(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(r=i??un,a):r},a}function eA(e,t){if((n=e.length)>0){for(var r,n,a=0,i=e[0].length,o;a<i;++a){for(o=r=0;r<n;++r)o+=e[r][a][1]||0;if(o)for(r=0;r<n;++r)e[r][a][1]/=o}un(e,t)}}function tA(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,i=n.length;r<i;++r){for(var o=0,s=0;o<a;++o)s+=e[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}un(e,t)}}function rA(e,t){if(!(!((o=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,i,o;n<i;++n){for(var s=0,l=0,u=0;s<o;++s){for(var c=e[t[s]],f=c[n][1]||0,d=c[n-1][1]||0,h=(f-d)/2,m=0;m<s;++m){var v=e[t[m]],y=v[n][1]||0,x=v[n-1][1]||0;h+=y-x}l+=f,u+=h*f}a[n-1][1]+=a[n-1][0]=r,l&&(r-=u/l)}a[n-1][1]+=a[n-1][0]=r,un(e,t)}}function ha(e){"@babel/helpers - typeof";return ha=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},ha(e)}var nA=["type","size","sizeType"];function xl(){return xl=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},xl.apply(this,arguments)}function jd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ed(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jd(Object(r),!0).forEach(function(n){aA(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aA(e,t,r){return t=iA(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iA(e){var t=oA(e,"string");return ha(t)=="symbol"?t:t+""}function oA(e,t){if(ha(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ha(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sA(e,t){if(e==null)return{};var r=lA(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function lA(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 $d={symbolCircle:vl,symbolCross:ES,symbolDiamond:CS,symbolSquare:MS,symbolStar:IS,symbolTriangle:RS,symbolWye:BS},uA=Math.PI/180,cA=function(t){var r="symbol".concat(Di(t));return $d[r]||vl},fA=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 a=18*uA;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),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}},dA=function(t,r){$d["symbol".concat(Di(t))]=r},qi=function(t){var r=t.type,n=r===void 0?"circle":r,a=t.size,i=a===void 0?64:a,o=t.sizeType,s=o===void 0?"area":o,l=sA(t,nA),u=Ed(Ed({},l),{},{type:n,size:i,sizeType:s}),c=function(){var y=cA(n),x=FS().type(y).size(fA(i,s,n));return x()},f=u.className,d=u.cx,h=u.cy,m=de(u,!0);return d===+d&&h===+h&&i===+i?S.createElement("path",xl({},m,{className:ve("recharts-symbols",f),transform:"translate(".concat(d,", ").concat(h,")"),d:c()})):null};qi.registerSymbol=dA;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 wl(){return wl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wl.apply(this,arguments)}function Cd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function hA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cd(Object(r),!0).forEach(function(n){pa(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vA(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,kd(n.key),n)}}function yA(e,t,r){return t&&vA(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mA(e,t,r){return t=Gi(t),gA(e,Md()?Reflect.construct(t,r||[],Gi(e).constructor):t.apply(e,r))}function gA(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 bA(e)}function bA(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Md(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Md=function(){return!!e})()}function Gi(e){return Gi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Gi(e)}function xA(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&&Ol(e,t)}function Ol(e,t){return Ol=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ol(e,t)}function pa(e,t,r){return t=kd(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kd(e){var t=wA(e,"string");return cn(t)=="symbol"?t:t+""}function wA(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 St=32,Sl=function(e){function t(){return pA(this,t),mA(this,t,arguments)}return xA(t,e),yA(t,[{key:"renderIcon",value:function(n){var a=this.props.inactiveColor,i=St/2,o=St/6,s=St/3,l=n.inactive?a:n.color;if(n.type==="plainline")return S.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:i,x2:St,y2:i,className:"recharts-legend-icon"});if(n.type==="line")return S.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(i,"h").concat(s,`
|
|
122
|
-
A`).concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(i,`
|
|
123
|
-
H`).concat(St,"M").concat(2*s,",").concat(i,`
|
|
124
|
-
A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(i),className:"recharts-legend-icon"});if(n.type==="rect")return S.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(St/8,"h").concat(St,"v").concat(St*3/4,"h").concat(-St,"z"),className:"recharts-legend-icon"});if(S.isValidElement(n.legendIcon)){var u=hA({},n);return delete u.legendIcon,S.cloneElement(n.legendIcon,u)}return S.createElement(qi,{fill:l,cx:i,cy:i,size:St,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,a=this.props,i=a.payload,o=a.iconSize,s=a.layout,l=a.formatter,u=a.inactiveColor,c={x:0,y:0,width:St,height:St},f={display:s==="horizontal"?"inline-block":"block",marginRight:10},d={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(h,m){var v=h.formatter||l,y=ve(pa(pa({"recharts-legend-item":!0},"legend-item-".concat(m),!0),"inactive",h.inactive));if(h.type==="none")return null;var x=he(h.value)?null:h.value;Zt(!he(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 O=h.inactive?u:h.color;return S.createElement("li",wl({className:y,style:f,key:"legend-item-".concat(m)},da(n.props,h,m)),S.createElement(sl,{width:o,height:o,viewBox:c,style:d},n.renderIcon(h)),S.createElement("span",{className:"recharts-legend-item-text",style:{color:O}},v?v(x,h,m):x))})}},{key:"render",value:function(){var n=this.props,a=n.payload,i=n.layout,o=n.align;if(!a||!a.length)return null;var s={padding:0,margin:0,textAlign:i==="horizontal"?o:"left"};return S.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(S.PureComponent);pa(Sl,"displayName","Legend"),pa(Sl,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var OA=$i;function SA(){this.__data__=new OA,this.size=0}var AA=SA;function TA(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var PA=TA;function _A(e){return this.__data__.get(e)}var jA=_A;function EA(e){return this.__data__.has(e)}var $A=EA,CA=$i,MA=Vs,kA=Hs,NA=200;function DA(e,t){var r=this.__data__;if(r instanceof CA){var n=r.__data__;if(!MA||n.length<NA-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new kA(n)}return r.set(e,t),this.size=r.size,this}var IA=DA,RA=$i,LA=AA,BA=PA,FA=jA,WA=$A,UA=IA;function fn(e){var t=this.__data__=new RA(e);this.size=t.size}fn.prototype.clear=LA,fn.prototype.delete=BA,fn.prototype.get=FA,fn.prototype.has=WA,fn.prototype.set=UA;var Nd=fn,zA="__lodash_hash_undefined__";function KA(e){return this.__data__.set(e,zA),this}var qA=KA;function GA(e){return this.__data__.has(e)}var VA=GA,HA=Hs,YA=qA,XA=VA;function Vi(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new HA;++t<r;)this.add(e[t])}Vi.prototype.add=Vi.prototype.push=YA,Vi.prototype.has=XA;var Dd=Vi;function JA(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Id=JA;function ZA(e,t){return e.has(t)}var Rd=ZA,QA=Dd,eT=Id,tT=Rd,rT=1,nT=2;function aT(e,t,r,n,a,i){var o=r&rT,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var f=-1,d=!0,h=r&nT?new QA:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var m=e[f],v=t[f];if(n)var y=o?n(v,m,f,t,e,i):n(m,v,f,e,t,i);if(y!==void 0){if(y)continue;d=!1;break}if(h){if(!eT(t,function(x,O){if(!tT(h,O)&&(m===x||a(m,x,r,n,i)))return h.push(O)})){d=!1;break}}else if(!(m===v||a(m,v,r,n,i))){d=!1;break}}return i.delete(e),i.delete(t),d}var Ld=aT,iT=Bt,oT=iT.Uint8Array,sT=oT;function lT(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var uT=lT;function cT(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Al=cT,Bd=ca,Fd=sT,fT=Gs,dT=Ld,hT=uT,pT=Al,vT=1,yT=2,mT="[object Boolean]",gT="[object Date]",bT="[object Error]",xT="[object Map]",wT="[object Number]",OT="[object RegExp]",ST="[object Set]",AT="[object String]",TT="[object Symbol]",PT="[object ArrayBuffer]",_T="[object DataView]",Wd=Bd?Bd.prototype:void 0,Tl=Wd?Wd.valueOf:void 0;function jT(e,t,r,n,a,i,o){switch(r){case _T:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case PT:return!(e.byteLength!=t.byteLength||!i(new Fd(e),new Fd(t)));case mT:case gT:case wT:return fT(+e,+t);case bT:return e.name==t.name&&e.message==t.message;case OT:case AT:return e==t+"";case xT:var s=hT;case ST:var l=n&vT;if(s||(s=pT),e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;n|=yT,o.set(e,t);var c=dT(s(e),s(t),n,a,i,o);return o.delete(e),c;case TT:if(Tl)return Tl.call(e)==Tl.call(t)}return!1}var ET=jT;function $T(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var Ud=$T,CT=Ud,MT=lt;function kT(e,t,r){var n=t(e);return MT(e)?n:CT(n,r(e))}var NT=kT;function DT(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++r<n;){var o=e[r];t(o,r,e)&&(i[a++]=o)}return i}var IT=DT;function RT(){return[]}var LT=RT,BT=IT,FT=LT,WT=Object.prototype,UT=WT.propertyIsEnumerable,zd=Object.getOwnPropertySymbols,zT=zd?function(e){return e==null?[]:(e=Object(e),BT(zd(e),function(t){return UT.call(e,t)}))}:FT,KT=zT;function qT(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var GT=qT,VT=Yt,HT=Xt,YT="[object Arguments]";function XT(e){return HT(e)&&VT(e)==YT}var JT=XT,Kd=JT,ZT=Xt,qd=Object.prototype,QT=qd.hasOwnProperty,eP=qd.propertyIsEnumerable,tP=Kd(function(){return arguments}())?Kd:function(e){return ZT(e)&&QT.call(e,"callee")&&!eP.call(e,"callee")},Pl=tP,Hi={exports:{}};function rP(){return!1}var nP=rP;Hi.exports,function(e,t){var r=Bt,n=nP,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,s=o?r.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||n;e.exports=u}(Hi,Hi.exports);var Gd=Hi.exports,aP=9007199254740991,iP=/^(?:0|[1-9]\d*)$/;function oP(e,t){var r=typeof e;return t=t??aP,!!t&&(r=="number"||r!="symbol"&&iP.test(e))&&e>-1&&e%1==0&&e<t}var _l=oP,sP=9007199254740991;function lP(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=sP}var jl=lP,uP=Yt,cP=jl,fP=Xt,dP="[object Arguments]",hP="[object Array]",pP="[object Boolean]",vP="[object Date]",yP="[object Error]",mP="[object Function]",gP="[object Map]",bP="[object Number]",xP="[object Object]",wP="[object RegExp]",OP="[object Set]",SP="[object String]",AP="[object WeakMap]",TP="[object ArrayBuffer]",PP="[object DataView]",_P="[object Float32Array]",jP="[object Float64Array]",EP="[object Int8Array]",$P="[object Int16Array]",CP="[object Int32Array]",MP="[object Uint8Array]",kP="[object Uint8ClampedArray]",NP="[object Uint16Array]",DP="[object Uint32Array]",Re={};Re[_P]=Re[jP]=Re[EP]=Re[$P]=Re[CP]=Re[MP]=Re[kP]=Re[NP]=Re[DP]=!0,Re[dP]=Re[hP]=Re[TP]=Re[pP]=Re[PP]=Re[vP]=Re[yP]=Re[mP]=Re[gP]=Re[bP]=Re[xP]=Re[wP]=Re[OP]=Re[SP]=Re[AP]=!1;function IP(e){return fP(e)&&cP(e.length)&&!!Re[uP(e)]}var RP=IP;function LP(e){return function(t){return e(t)}}var Vd=LP,Yi={exports:{}};Yi.exports,function(e,t){var r=Pf,n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,o=i&&r.process,s=function(){try{var l=a&&a.require&&a.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s}(Yi,Yi.exports);var BP=Yi.exports,FP=RP,WP=Vd,Hd=BP,Yd=Hd&&Hd.isTypedArray,UP=Yd?WP(Yd):FP,Xd=UP,zP=GT,KP=Pl,qP=lt,GP=Gd,VP=_l,HP=Xd,YP=Object.prototype,XP=YP.hasOwnProperty;function JP(e,t){var r=qP(e),n=!r&&KP(e),a=!r&&!n&&GP(e),i=!r&&!n&&!a&&HP(e),o=r||n||a||i,s=o?zP(e.length,String):[],l=s.length;for(var u in e)(t||XP.call(e,u))&&!(o&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||VP(u,l)))&&s.push(u);return s}var ZP=JP,QP=Object.prototype;function e_(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||QP;return e===r}var t_=e_;function r_(e,t){return function(r){return e(t(r))}}var Jd=r_,n_=Jd,a_=n_(Object.keys,Object),i_=a_,o_=t_,s_=i_,l_=Object.prototype,u_=l_.hasOwnProperty;function c_(e){if(!o_(e))return s_(e);var t=[];for(var r in Object(e))u_.call(e,r)&&r!="constructor"&&t.push(r);return t}var f_=c_,d_=Ks,h_=jl;function p_(e){return e!=null&&h_(e.length)&&!d_(e)}var va=p_,v_=ZP,y_=f_,m_=va;function g_(e){return m_(e)?v_(e):y_(e)}var Xi=g_,b_=NT,x_=KT,w_=Xi;function O_(e){return b_(e,w_,x_)}var S_=O_,Zd=S_,A_=1,T_=Object.prototype,P_=T_.hasOwnProperty;function __(e,t,r,n,a,i){var o=r&A_,s=Zd(e),l=s.length,u=Zd(t),c=u.length;if(l!=c&&!o)return!1;for(var f=l;f--;){var d=s[f];if(!(o?d in t:P_.call(t,d)))return!1}var h=i.get(e),m=i.get(t);if(h&&m)return h==t&&m==e;var v=!0;i.set(e,t),i.set(t,e);for(var y=o;++f<l;){d=s[f];var x=e[d],O=t[d];if(n)var w=o?n(O,x,d,t,e,i):n(x,O,d,e,t,i);if(!(w===void 0?x===O||a(x,O,r,n,i):w)){v=!1;break}y||(y=d=="constructor")}if(v&&!y){var T=e.constructor,p=t.constructor;T!=p&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof p=="function"&&p instanceof p)&&(v=!1)}return i.delete(e),i.delete(t),v}var j_=__,E_=Pr,$_=Bt,C_=E_($_,"DataView"),M_=C_,k_=Pr,N_=Bt,D_=k_(N_,"Promise"),I_=D_,R_=Pr,L_=Bt,B_=R_(L_,"Set"),Qd=B_,F_=Pr,W_=Bt,U_=F_(W_,"WeakMap"),z_=U_,El=M_,$l=Vs,Cl=I_,Ml=Qd,kl=z_,eh=Yt,dn=Mf,th="[object Map]",K_="[object Object]",rh="[object Promise]",nh="[object Set]",ah="[object WeakMap]",ih="[object DataView]",q_=dn(El),G_=dn($l),V_=dn(Cl),H_=dn(Ml),Y_=dn(kl),Mr=eh;(El&&Mr(new El(new ArrayBuffer(1)))!=ih||$l&&Mr(new $l)!=th||Cl&&Mr(Cl.resolve())!=rh||Ml&&Mr(new Ml)!=nh||kl&&Mr(new kl)!=ah)&&(Mr=function(e){var t=eh(e),r=t==K_?e.constructor:void 0,n=r?dn(r):"";if(n)switch(n){case q_:return ih;case G_:return th;case V_:return rh;case H_:return nh;case Y_:return ah}return t});var X_=Mr,Nl=Nd,J_=Ld,Z_=ET,Q_=j_,oh=X_,sh=lt,lh=Gd,ej=Xd,tj=1,uh="[object Arguments]",ch="[object Array]",Ji="[object Object]",rj=Object.prototype,fh=rj.hasOwnProperty;function nj(e,t,r,n,a,i){var o=sh(e),s=sh(t),l=o?ch:oh(e),u=s?ch:oh(t);l=l==uh?Ji:l,u=u==uh?Ji:u;var c=l==Ji,f=u==Ji,d=l==u;if(d&&lh(e)){if(!lh(t))return!1;o=!0,c=!1}if(d&&!c)return i||(i=new Nl),o||ej(e)?J_(e,t,r,n,a,i):Z_(e,t,l,r,n,a,i);if(!(r&tj)){var h=c&&fh.call(e,"__wrapped__"),m=f&&fh.call(t,"__wrapped__");if(h||m){var v=h?e.value():e,y=m?t.value():t;return i||(i=new Nl),a(v,y,r,n,i)}}return d?(i||(i=new Nl),Q_(e,t,r,n,a,i)):!1}var aj=nj,ij=aj,dh=Xt;function hh(e,t,r,n,a){return e===t?!0:e==null||t==null||!dh(e)&&!dh(t)?e!==e&&t!==t:ij(e,t,r,n,hh,a)}var Dl=hh,oj=Nd,sj=Dl,lj=1,uj=2;function cj(e,t,r,n){var a=r.length,i=a,o=!n;if(e==null)return!i;for(e=Object(e);a--;){var s=r[a];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<i;){s=r[a];var l=s[0],u=e[l],c=s[1];if(o&&s[2]){if(u===void 0&&!(l in e))return!1}else{var f=new oj;if(n)var d=n(u,c,l,e,t,f);if(!(d===void 0?sj(c,u,lj|uj,n,f):d))return!1}}return!0}var fj=cj,dj=fr;function hj(e){return e===e&&!dj(e)}var ph=hj,pj=ph,vj=Xi;function yj(e){for(var t=vj(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,pj(a)]}return t}var mj=yj;function gj(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var vh=gj,bj=fj,xj=mj,wj=vh;function Oj(e){var t=xj(e);return t.length==1&&t[0][2]?wj(t[0][0],t[0][1]):function(r){return r===e||bj(r,e,t)}}var Sj=Oj;function Aj(e,t){return e!=null&&t in Object(e)}var Tj=Aj,Pj=Uf,_j=Pl,jj=lt,Ej=_l,$j=jl,Cj=Mi;function Mj(e,t,r){t=Pj(t,e);for(var n=-1,a=t.length,i=!1;++n<a;){var o=Cj(t[n]);if(!(i=e!=null&&r(e,o)))break;e=e[o]}return i||++n!=a?i:(a=e==null?0:e.length,!!a&&$j(a)&&Ej(o,a)&&(jj(e)||_j(e)))}var kj=Mj,Nj=Tj,Dj=kj;function Ij(e,t){return e!=null&&Dj(e,t,Nj)}var Rj=Ij,Lj=Dl,Bj=zf,Fj=Rj,Wj=zs,Uj=ph,zj=vh,Kj=Mi,qj=1,Gj=2;function Vj(e,t){return Wj(e)&&Uj(t)?zj(Kj(e),t):function(r){var n=Bj(r,e);return n===void 0&&n===t?Fj(r,e):Lj(t,n,qj|Gj)}}var Hj=Vj;function Yj(e){return e}var hn=Yj;function Xj(e){return function(t){return t==null?void 0:t[e]}}var Jj=Xj,Zj=Js;function Qj(e){return function(t){return Zj(t,e)}}var eE=Qj,tE=Jj,rE=eE,nE=zs,aE=Mi;function iE(e){return nE(e)?tE(aE(e)):rE(e)}var oE=iE,sE=Sj,lE=Hj,uE=hn,cE=lt,fE=oE;function dE(e){return typeof e=="function"?e:e==null?uE:typeof e=="object"?cE(e)?lE(e[0],e[1]):sE(e):fE(e)}var hr=dE;function hE(e,t,r,n){for(var a=e.length,i=r+(n?1:-1);n?i--:++i<a;)if(t(e[i],i,e))return i;return-1}var yh=hE;function pE(e){return e!==e}var vE=pE;function yE(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}var mE=yE,gE=yh,bE=vE,xE=mE;function wE(e,t,r){return t===t?xE(e,t,r):gE(e,bE,r)}var OE=wE,SE=OE;function AE(e,t){var r=e==null?0:e.length;return!!r&&SE(e,t,0)>-1}var TE=AE;function PE(e,t,r){for(var n=-1,a=e==null?0:e.length;++n<a;)if(r(t,e[n]))return!0;return!1}var _E=PE;function jE(){}var EE=jE,Il=Qd,$E=EE,CE=Al,ME=1/0,kE=Il&&1/CE(new Il([,-0]))[1]==ME?function(e){return new Il(e)}:$E,NE=kE,DE=Dd,IE=TE,RE=_E,LE=Rd,BE=NE,FE=Al,WE=200;function UE(e,t,r){var n=-1,a=IE,i=e.length,o=!0,s=[],l=s;if(r)o=!1,a=RE;else if(i>=WE){var u=t?null:BE(e);if(u)return FE(u);o=!1,a=LE,l=new DE}else l=t?[]:s;e:for(;++n<i;){var c=e[n],f=t?t(c):c;if(c=r||c!==0?c:0,o&&f===f){for(var d=l.length;d--;)if(l[d]===f)continue e;t&&l.push(f),s.push(c)}else a(l,f,r)||(l!==s&&l.push(f),s.push(c))}return s}var zE=UE,KE=hr,qE=zE;function GE(e,t){return e&&e.length?qE(e,KE(t)):[]}var VE=GE;const mh=ke(VE);function gh(e,t,r){return t===!0?mh(e,r):he(t)?mh(e,t):e}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)}var HE=["ref"];function bh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Qt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bh(Object(r),!0).forEach(function(n){Qi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function YE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xh(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,Oh(n.key),n)}}function XE(e,t,r){return t&&xh(e.prototype,t),r&&xh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function JE(e,t,r){return t=Zi(t),ZE(e,wh()?Reflect.construct(t,r||[],Zi(e).constructor):t.apply(e,r))}function ZE(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 QE(e)}function QE(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wh=function(){return!!e})()}function Zi(e){return Zi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Zi(e)}function e$(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&&Rl(e,t)}function Rl(e,t){return Rl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Rl(e,t)}function Qi(e,t,r){return t=Oh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Oh(e){var t=t$(e,"string");return pn(t)=="symbol"?t:t+""}function t$(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 r$(e,t){if(e==null)return{};var r=n$(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function n$(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function a$(e){return e.value}function i$(e,t){if(S.isValidElement(e))return S.cloneElement(e,t);if(typeof e=="function")return S.createElement(e,t);t.ref;var r=r$(t,HE);return S.createElement(Sl,r)}var Sh=1,vn=function(e){function t(){var r;YE(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=JE(this,t,[].concat(a)),Qi(r,"lastBoundingBox",{width:-1,height:-1}),r}return e$(t,e),XE(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,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>Sh||Math.abs(a.height-this.lastBoundingBox.height)>Sh)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,n&&n(a)):(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?Qt({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var a=this.props,i=a.layout,o=a.align,s=a.verticalAlign,l=a.margin,u=a.chartWidth,c=a.chartHeight,f,d;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&i==="vertical"){var h=this.getBBoxSnapshot();f={left:((u||0)-h.width)/2}}else f=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var m=this.getBBoxSnapshot();d={top:((c||0)-m.height)/2}}else d=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Qt(Qt({},f),d)}},{key:"render",value:function(){var n=this,a=this.props,i=a.content,o=a.width,s=a.height,l=a.wrapperStyle,u=a.payloadUniqBy,c=a.payload,f=Qt(Qt({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return S.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(h){n.wrapperNode=h}},i$(i,Qt(Qt({},this.props),{},{payload:gh(c,u,a$)})))}}],[{key:"getWithHeight",value:function(n,a){var i=Qt(Qt({},this.defaultProps),n.props),o=i.layout;return o==="vertical"&&X(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||a}:null}}])}(S.PureComponent);Qi(vn,"displayName","Legend"),Qi(vn,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Ah=ca,o$=Pl,s$=lt,Th=Ah?Ah.isConcatSpreadable:void 0;function l$(e){return s$(e)||o$(e)||!!(Th&&e&&e[Th])}var u$=l$,c$=Ud,f$=u$;function Ph(e,t,r,n,a){var i=-1,o=e.length;for(r||(r=f$),a||(a=[]);++i<o;){var s=e[i];t>0&&r(s)?t>1?Ph(s,t-1,r,n,a):c$(a,s):n||(a[a.length]=s)}return a}var _h=Ph;function d$(e){return function(t,r,n){for(var a=-1,i=Object(t),o=n(t),s=o.length;s--;){var l=o[e?s:++a];if(r(i[l],l,i)===!1)break}return t}}var h$=d$,p$=h$,v$=p$(),y$=v$,m$=y$,g$=Xi;function b$(e,t){return e&&m$(e,t,g$)}var jh=b$,x$=va;function w$(e,t){return function(r,n){if(r==null)return r;if(!x$(r))return e(r,n);for(var a=r.length,i=t?a:-1,o=Object(r);(t?i--:++i<a)&&n(o[i],i,o)!==!1;);return r}}var O$=w$,S$=jh,A$=O$,T$=A$(S$),Ll=T$,P$=Ll,_$=va;function j$(e,t){var r=-1,n=_$(e)?Array(e.length):[];return P$(e,function(a,i,o){n[++r]=t(a,i,o)}),n}var Eh=j$;function E$(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var $$=E$,$h=tn;function C$(e,t){if(e!==t){var r=e!==void 0,n=e===null,a=e===e,i=$h(e),o=t!==void 0,s=t===null,l=t===t,u=$h(t);if(!s&&!u&&!i&&e>t||i&&o&&l&&!s&&!u||n&&o&&l||!r&&l||!a)return 1;if(!n&&!i&&!u&&e<t||u&&r&&a&&!n&&!i||s&&r&&a||!o&&a||!l)return-1}return 0}var M$=C$,k$=M$;function N$(e,t,r){for(var n=-1,a=e.criteria,i=t.criteria,o=a.length,s=r.length;++n<o;){var l=k$(a[n],i[n]);if(l){if(n>=s)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return e.index-t.index}var D$=N$,Bl=Xs,I$=Js,R$=hr,L$=Eh,B$=$$,F$=Vd,W$=D$,U$=hn,z$=lt;function K$(e,t,r){t.length?t=Bl(t,function(i){return z$(i)?function(o){return I$(o,i.length===1?i[0]:i)}:i}):t=[U$];var n=-1;t=Bl(t,F$(R$));var a=L$(e,function(i,o,s){var l=Bl(t,function(u){return u(i)});return{criteria:l,index:++n,value:i}});return B$(a,function(i,o){return W$(i,o,r)})}var q$=K$;function G$(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var V$=G$,H$=V$,Ch=Math.max;function Y$(e,t,r){return t=Ch(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=Ch(n.length-t,0),o=Array(i);++a<i;)o[a]=n[t+a];a=-1;for(var s=Array(t+1);++a<t;)s[a]=n[a];return s[t]=r(o),H$(e,this,s)}}var X$=Y$;function J$(e){return function(){return e}}var Z$=J$,Q$=Pr,eC=function(){try{var e=Q$(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Mh=eC,tC=Z$,kh=Mh,rC=hn,nC=kh?function(e,t){return kh(e,"toString",{configurable:!0,enumerable:!1,value:tC(t),writable:!0})}:rC,aC=nC,iC=800,oC=16,sC=Date.now;function lC(e){var t=0,r=0;return function(){var n=sC(),a=oC-(n-r);if(r=n,a>0){if(++t>=iC)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var uC=lC,cC=aC,fC=uC,dC=fC(cC),hC=dC,pC=hn,vC=X$,yC=hC;function mC(e,t){return yC(vC(e,t,pC),e+"")}var gC=mC,bC=Gs,xC=va,wC=_l,OC=fr;function SC(e,t,r){if(!OC(r))return!1;var n=typeof t;return(n=="number"?xC(r)&&wC(t,r.length):n=="string"&&t in r)?bC(r[t],e):!1}var eo=SC,AC=_h,TC=q$,PC=gC,Nh=eo,_C=PC(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Nh(e,t[0],t[1])?t=[]:r>2&&Nh(t[0],t[1],t[2])&&(t=[t[0]]),TC(e,AC(t,1),[])}),jC=_C;const Fl=ke(jC);function ya(e){"@babel/helpers - typeof";return ya=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},ya(e)}function Wl(){return Wl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wl.apply(this,arguments)}function EC(e,t){return kC(e)||MC(e,t)||CC(e,t)||$C()}function $C(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
125
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CC(e,t){if(e){if(typeof e=="string")return Dh(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 Dh(e,t)}}function Dh(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 MC(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function kC(e){if(Array.isArray(e))return e}function Ih(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ul(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ih(Object(r),!0).forEach(function(n){NC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ih(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function NC(e,t,r){return t=DC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DC(e){var t=IC(e,"string");return ya(t)=="symbol"?t:t+""}function IC(e,t){if(ya(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ya(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function RC(e){return Array.isArray(e)&&Ve(e[0])&&Ve(e[1])?e.join(" ~ "):e}var LC=function(t){var r=t.separator,n=r===void 0?" : ":r,a=t.contentStyle,i=a===void 0?{}:a,o=t.itemStyle,s=o===void 0?{}:o,l=t.labelStyle,u=l===void 0?{}:l,c=t.payload,f=t.formatter,d=t.itemSorter,h=t.wrapperClassName,m=t.labelClassName,v=t.label,y=t.labelFormatter,x=t.accessibilityLayer,O=x===void 0?!1:x,w=function(){if(c&&c.length){var C={padding:0,margin:0},W=(d?Fl(c,d):c).map(function(U,F){if(U.type==="none")return null;var N=Ul({display:"block",paddingTop:4,paddingBottom:4,color:U.color||"#000"},s),D=U.formatter||f||RC,L=U.value,E=U.name,j=L,I=E;if(D&&j!=null&&I!=null){var B=D(L,E,U,F,c);if(Array.isArray(B)){var z=EC(B,2);j=z[0],I=z[1]}else j=B}return S.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(F),style:N},Ve(I)?S.createElement("span",{className:"recharts-tooltip-item-name"},I):null,Ve(I)?S.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,S.createElement("span",{className:"recharts-tooltip-item-value"},j),S.createElement("span",{className:"recharts-tooltip-item-unit"},U.unit||""))});return S.createElement("ul",{className:"recharts-tooltip-item-list",style:C},W)}return null},T=Ul({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),p=Ul({margin:0},u),g=!fe(v),A=g?v:"",P=ve("recharts-default-tooltip",h),_=ve("recharts-tooltip-label",m);g&&y&&c!==void 0&&c!==null&&(A=y(v,c));var R=O?{role:"status","aria-live":"assertive"}:{};return S.createElement("div",Wl({className:P,style:T},R),S.createElement("p",{className:_,style:p},S.isValidElement(A)?A:"".concat(A)),w())};function ma(e){"@babel/helpers - typeof";return ma=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},ma(e)}function to(e,t,r){return t=BC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BC(e){var t=FC(e,"string");return ma(t)=="symbol"?t:t+""}function FC(e,t){if(ma(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ma(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ga="recharts-tooltip-wrapper",WC={visibility:"hidden"};function UC(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return ve(ga,to(to(to(to({},"".concat(ga,"-right"),X(r)&&t&&X(t.x)&&r>=t.x),"".concat(ga,"-left"),X(r)&&t&&X(t.x)&&r<t.x),"".concat(ga,"-bottom"),X(n)&&t&&X(t.y)&&n>=t.y),"".concat(ga,"-top"),X(n)&&t&&X(t.y)&&n<t.y))}function Rh(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,a=e.offsetTopLeft,i=e.position,o=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,u=e.viewBoxDimension;if(i&&X(i[n]))return i[n];var c=r[n]-s-a,f=r[n]+a;if(t[n])return o[n]?c:f;if(o[n]){var d=c,h=l[n];return d<h?Math.max(f,l[n]):Math.max(c,l[n])}var m=f+s,v=l[n]+u;return m>v?Math.max(c,l[n]):Math.max(f,l[n])}function zC(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 KC(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,a=e.position,i=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,c,f;return o.height>0&&o.width>0&&r?(c=Rh({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=Rh({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),u=zC({translateX:c,translateY:f,useTranslate3d:s})):u=WC,{cssProperties:u,cssClasses:UC({translateX:c,translateY:f,coordinate:r})}}function yn(e){"@babel/helpers - typeof";return yn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yn(e)}function Lh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Bh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lh(Object(r),!0).forEach(function(n){Kl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GC(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,Wh(n.key),n)}}function VC(e,t,r){return t&&GC(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function HC(e,t,r){return t=ro(t),YC(e,Fh()?Reflect.construct(t,r||[],ro(e).constructor):t.apply(e,r))}function YC(e,t){if(t&&(yn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return XC(e)}function XC(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Fh=function(){return!!e})()}function ro(e){return ro=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ro(e)}function JC(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&&zl(e,t)}function zl(e,t){return zl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},zl(e,t)}function Kl(e,t,r){return t=Wh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wh(e){var t=ZC(e,"string");return yn(t)=="symbol"?t:t+""}function ZC(e,t){if(yn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Uh=1,QC=function(e){function t(){var r;qC(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=HC(this,t,[].concat(a)),Kl(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Kl(r,"handleKeyDown",function(o){if(o.key==="Escape"){var s,l,u,c;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(l=r.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&s!==void 0?s:0,y:(u=(c=r.props.coordinate)===null||c===void 0?void 0:c.y)!==null&&u!==void 0?u:0}})}}),r}return JC(t,e),VC(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>Uh||Math.abs(n.height-this.state.lastBoundingBox.height)>Uh)&&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,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,s=a.animationDuration,l=a.animationEasing,u=a.children,c=a.coordinate,f=a.hasPayload,d=a.isAnimationActive,h=a.offset,m=a.position,v=a.reverseDirection,y=a.useTranslate3d,x=a.viewBox,O=a.wrapperStyle,w=KC({allowEscapeViewBox:o,coordinate:c,offsetTopLeft:h,position:m,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:x}),T=w.cssClasses,p=w.cssProperties,g=Bh(Bh({transition:d&&i?"transform ".concat(s,"ms ").concat(l):void 0},p),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&f?"visible":"hidden",position:"absolute",top:0,left:0},O);return S.createElement("div",{tabIndex:-1,className:T,style:g,ref:function(P){n.wrapperNode=P}},u)}}])}(S.PureComponent),eM=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},pr={isSsr:eM()};function mn(e){"@babel/helpers - typeof";return mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mn(e)}function zh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Kh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zh(Object(r),!0).forEach(function(n){Gl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tM(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rM(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,Gh(n.key),n)}}function nM(e,t,r){return t&&rM(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function aM(e,t,r){return t=no(t),iM(e,qh()?Reflect.construct(t,r||[],no(e).constructor):t.apply(e,r))}function iM(e,t){if(t&&(mn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oM(e)}function oM(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qh=function(){return!!e})()}function no(e){return no=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},no(e)}function sM(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&&ql(e,t)}function ql(e,t){return ql=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},ql(e,t)}function Gl(e,t,r){return t=Gh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gh(e){var t=lM(e,"string");return mn(t)=="symbol"?t:t+""}function lM(e,t){if(mn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(mn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function uM(e){return e.dataKey}function cM(e,t){return S.isValidElement(e)?S.cloneElement(e,t):typeof e=="function"?S.createElement(e,t):S.createElement(LC,t)}var Ft=function(e){function t(){return tM(this,t),aM(this,t,arguments)}return sM(t,e),nM(t,[{key:"render",value:function(){var n=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,s=a.animationDuration,l=a.animationEasing,u=a.content,c=a.coordinate,f=a.filterNull,d=a.isAnimationActive,h=a.offset,m=a.payload,v=a.payloadUniqBy,y=a.position,x=a.reverseDirection,O=a.useTranslate3d,w=a.viewBox,T=a.wrapperStyle,p=m??[];f&&p.length&&(p=gh(m.filter(function(A){return A.value!=null&&(A.hide!==!0||n.props.includeHidden)}),v,uM));var g=p.length>0;return S.createElement(QC,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:d,active:i,coordinate:c,hasPayload:g,offset:h,position:y,reverseDirection:x,useTranslate3d:O,viewBox:w,wrapperStyle:T},cM(u,Kh(Kh({},this.props),{},{payload:p})))}}])}(S.PureComponent);Gl(Ft,"displayName","Tooltip"),Gl(Ft,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!pr.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 fM=Bt,dM=function(){return fM.Date.now()},hM=dM,pM=/\s/;function vM(e){for(var t=e.length;t--&&pM.test(e.charAt(t)););return t}var yM=vM,mM=yM,gM=/^\s+/;function bM(e){return e&&e.slice(0,mM(e)+1).replace(gM,"")}var xM=bM,wM=xM,Vh=fr,OM=tn,Hh=NaN,SM=/^[-+]0x[0-9a-f]+$/i,AM=/^0b[01]+$/i,TM=/^0o[0-7]+$/i,PM=parseInt;function _M(e){if(typeof e=="number")return e;if(OM(e))return Hh;if(Vh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Vh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=wM(e);var r=AM.test(e);return r||TM.test(e)?PM(e.slice(2),r?2:8):SM.test(e)?Hh:+e}var Yh=_M,jM=fr,Vl=hM,Xh=Yh,EM="Expected a function",$M=Math.max,CM=Math.min;function MM(e,t,r){var n,a,i,o,s,l,u=0,c=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(EM);t=Xh(t)||0,jM(r)&&(c=!!r.leading,f="maxWait"in r,i=f?$M(Xh(r.maxWait)||0,t):i,d="trailing"in r?!!r.trailing:d);function h(g){var A=n,P=a;return n=a=void 0,u=g,o=e.apply(P,A),o}function m(g){return u=g,s=setTimeout(x,t),c?h(g):o}function v(g){var A=g-l,P=g-u,_=t-A;return f?CM(_,i-P):_}function y(g){var A=g-l,P=g-u;return l===void 0||A>=t||A<0||f&&P>=i}function x(){var g=Vl();if(y(g))return O(g);s=setTimeout(x,v(g))}function O(g){return s=void 0,d&&n?h(g):(n=a=void 0,o)}function w(){s!==void 0&&clearTimeout(s),u=0,n=l=a=s=void 0}function T(){return s===void 0?o:O(Vl())}function p(){var g=Vl(),A=y(g);if(n=arguments,a=this,l=g,A){if(s===void 0)return m(l);if(f)return clearTimeout(s),s=setTimeout(x,t),h(l)}return s===void 0&&(s=setTimeout(x,t)),o}return p.cancel=w,p.flush=T,p}var kM=MM,NM=kM,DM=fr,IM="Expected a function";function RM(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(IM);return DM(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),NM(e,t,{leading:n,maxWait:t,trailing:a})}var LM=RM;const Jh=ke(LM);function ba(e){"@babel/helpers - typeof";return ba=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},ba(e)}function Zh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ao(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zh(Object(r),!0).forEach(function(n){BM(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function BM(e,t,r){return t=FM(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FM(e){var t=WM(e,"string");return ba(t)=="symbol"?t:t+""}function WM(e,t){if(ba(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ba(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function UM(e,t){return GM(e)||qM(e,t)||KM(e,t)||zM()}function zM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
126
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KM(e,t){if(e){if(typeof e=="string")return Qh(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 Qh(e,t)}}function Qh(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 qM(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function GM(e){if(Array.isArray(e))return e}var VM=S.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,a=n===void 0?{width:-1,height:-1}:n,i=e.width,o=i===void 0?"100%":i,s=e.height,l=s===void 0?"100%":s,u=e.minWidth,c=u===void 0?0:u,f=e.minHeight,d=e.maxHeight,h=e.children,m=e.debounce,v=m===void 0?0:m,y=e.id,x=e.className,O=e.onResize,w=e.style,T=w===void 0?{}:w,p=S.useRef(null),g=S.useRef();g.current=O,S.useImperativeHandle(t,function(){return Object.defineProperty(p.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),p.current},configurable:!0})});var A=S.useState({containerWidth:a.width,containerHeight:a.height}),P=UM(A,2),_=P[0],R=P[1],M=S.useCallback(function(W,U){R(function(F){var N=Math.round(W),D=Math.round(U);return F.containerWidth===N&&F.containerHeight===D?F:{containerWidth:N,containerHeight:D}})},[]);S.useEffect(function(){var W=function(E){var j,I=E[0].contentRect,B=I.width,z=I.height;M(B,z),(j=g.current)===null||j===void 0||j.call(g,B,z)};v>0&&(W=Jh(W,v,{trailing:!0,leading:!1}));var U=new ResizeObserver(W),F=p.current.getBoundingClientRect(),N=F.width,D=F.height;return M(N,D),U.observe(p.current),function(){U.disconnect()}},[M,v]);var C=S.useMemo(function(){var W=_.containerWidth,U=_.containerHeight;if(W<0||U<0)return null;Zt(jr(o)||jr(l),`The width(%s) and height(%s) are both fixed numbers,
|
|
127
|
-
maybe you don't need to use a ResponsiveContainer.`,o,l),Zt(!r||r>0,"The aspect(%s) must be greater than zero.",r);var F=jr(o)?W:o,N=jr(l)?U:l;r&&r>0&&(F?N=F/r:N&&(F=N*r),d&&N>d&&(N=d)),Zt(F>0||N>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
128
|
-
please check the style of container, or the props width(%s) and height(%s),
|
|
129
|
-
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
130
|
-
height and width.`,F,N,o,l,c,f,r);var D=!Array.isArray(h)&&Jt(h.type).endsWith("Chart");return S.Children.map(h,function(L){return S.isValidElement(L)?S.cloneElement(L,ao({width:F,height:N},D?{style:ao({height:"100%",width:"100%",maxHeight:N,maxWidth:F},L.props.style)}:{})):L})},[r,h,l,d,f,c,_,o]);return S.createElement("div",{id:y?"".concat(y):void 0,className:ve("recharts-responsive-container",x),style:ao(ao({},T),{},{width:o,height:l,minWidth:c,minHeight:f,maxHeight:d}),ref:p},C)}),Hl=function(t){return null};Hl.displayName="Cell";function xa(e){"@babel/helpers - typeof";return xa=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},xa(e)}function ep(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Yl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ep(Object(r),!0).forEach(function(n){HM(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ep(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HM(e,t,r){return t=YM(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YM(e){var t=XM(e,"string");return xa(t)=="symbol"?t:t+""}function XM(e,t){if(xa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(xa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gn={widthCache:{},cacheCount:0},JM=2e3,ZM={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},tp="recharts_measurement_span";function QM(e){var t=Yl({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var wa=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||pr.isSsr)return{width:0,height:0};var n=QM(r),a=JSON.stringify({text:t,copyStyle:n});if(gn.widthCache[a])return gn.widthCache[a];try{var i=document.getElementById(tp);i||(i=document.createElement("span"),i.setAttribute("id",tp),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=Yl(Yl({},ZM),n);Object.assign(i.style,o),i.textContent="".concat(t);var s=i.getBoundingClientRect(),l={width:s.width,height:s.height};return gn.widthCache[a]=l,++gn.cacheCount>JM&&(gn.cacheCount=0,gn.widthCache={}),l}catch{return{width:0,height:0}}},ek=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Oa(e){"@babel/helpers - typeof";return Oa=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},Oa(e)}function io(e,t){return ak(e)||nk(e,t)||rk(e,t)||tk()}function tk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
131
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rk(e,t){if(e){if(typeof e=="string")return rp(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 rp(e,t)}}function rp(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 nk(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function ak(e){if(Array.isArray(e))return e}function ik(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,sk(n.key),n)}}function ok(e,t,r){return t&&np(e.prototype,t),r&&np(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function sk(e){var t=lk(e,"string");return Oa(t)=="symbol"?t:t+""}function lk(e,t){if(Oa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Oa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ap=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,ip=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,uk=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,ck=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,op={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},fk=Object.keys(op),bn="NaN";function dk(e,t){return e*op[t]}var oo=function(){function e(t,r){ik(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!uk.test(r)&&(this.num=NaN,this.unit=""),fk.includes(r)&&(this.num=dk(t,r),this.unit="px")}return ok(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,a=(n=ck.exec(r))!==null&&n!==void 0?n:[],i=io(a,3),o=i[1],s=i[2];return new e(parseFloat(o),s??"")}}])}();function sp(e){if(e.includes(bn))return bn;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=ap.exec(t))!==null&&r!==void 0?r:[],a=io(n,4),i=a[1],o=a[2],s=a[3],l=oo.parse(i??""),u=oo.parse(s??""),c=o==="*"?l.multiply(u):l.divide(u);if(c.isNaN())return bn;t=t.replace(ap,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,d=(f=ip.exec(t))!==null&&f!==void 0?f:[],h=io(d,4),m=h[1],v=h[2],y=h[3],x=oo.parse(m??""),O=oo.parse(y??""),w=v==="+"?x.add(O):x.subtract(O);if(w.isNaN())return bn;t=t.replace(ip,w.toString())}return t}var lp=/\(([^()]*)\)/;function hk(e){for(var t=e;t.includes("(");){var r=lp.exec(t),n=io(r,2),a=n[1];t=t.replace(lp,sp(a))}return t}function pk(e){var t=e.replace(/\s+/g,"");return t=hk(t),t=sp(t),t}function vk(e){try{return pk(e)}catch{return bn}}function Xl(e){var t=vk(e.slice(5,-1));return t===bn?"":t}var yk=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],mk=["dx","dy","angle","className","breakAll"];function Jl(){return Jl=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},Jl.apply(this,arguments)}function up(e,t){if(e==null)return{};var r=gk(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function gk(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 cp(e,t){return Ok(e)||wk(e,t)||xk(e,t)||bk()}function bk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
132
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xk(e,t){if(e){if(typeof e=="string")return fp(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 fp(e,t)}}function fp(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 wk(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function Ok(e){if(Array.isArray(e))return e}var dp=/[ \f\n\r\t\v\u2028\u2029]+/,hp=function(t){var r=t.children,n=t.breakAll,a=t.style;try{var i=[];fe(r)||(n?i=r.toString().split(""):i=r.toString().split(dp));var o=i.map(function(l){return{word:l,width:wa(l,a).width}}),s=n?0:wa(" ",a).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},Sk=function(t,r,n,a,i){var o=t.maxLines,s=t.children,l=t.style,u=t.breakAll,c=X(o),f=s,d=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return F.reduce(function(N,D){var L=D.word,E=D.width,j=N[N.length-1];if(j&&(a==null||i||j.width+E+n<Number(a)))j.words.push(L),j.width+=E+n;else{var I={words:[L],width:E};N.push(I)}return N},[])},h=d(r),m=function(F){return F.reduce(function(N,D){return N.width>D.width?N:D})};if(!c)return h;for(var v="…",y=function(F){var N=f.slice(0,F),D=hp({breakAll:u,style:l,children:N+v}).wordsWithComputedWidth,L=d(D),E=L.length>o||m(L).width>Number(a);return[E,L]},x=0,O=f.length-1,w=0,T;x<=O&&w<=f.length-1;){var p=Math.floor((x+O)/2),g=p-1,A=y(g),P=cp(A,2),_=P[0],R=P[1],M=y(p),C=cp(M,1),W=C[0];if(!_&&!W&&(x=p+1),_&&W&&(O=p-1),!_&&W){T=R;break}w++}return T||h},pp=function(t){var r=fe(t)?[]:t.toString().split(dp);return[{words:r}]},Ak=function(t){var r=t.width,n=t.scaleToFit,a=t.children,i=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!pr.isSsr){var l,u,c=hp({breakAll:o,children:a,style:i});if(c){var f=c.wordsWithComputedWidth,d=c.spaceWidth;l=f,u=d}else return pp(a);return Sk({breakAll:o,children:a,maxLines:s,style:i},l,u,r,n)}return pp(a)},vp="#808080",so=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,u=l===void 0?"0.71em":l,c=t.scaleToFit,f=c===void 0?!1:c,d=t.textAnchor,h=d===void 0?"start":d,m=t.verticalAnchor,v=m===void 0?"end":m,y=t.fill,x=y===void 0?vp:y,O=up(t,yk),w=S.useMemo(function(){return Ak({breakAll:O.breakAll,children:O.children,maxLines:O.maxLines,scaleToFit:f,style:O.style,width:O.width})},[O.breakAll,O.children,O.maxLines,f,O.style,O.width]),T=O.dx,p=O.dy,g=O.angle,A=O.className,P=O.breakAll,_=up(O,mk);if(!Ve(n)||!Ve(i))return null;var R=n+(X(T)?T:0),M=i+(X(p)?p:0),C;switch(v){case"start":C=Xl("calc(".concat(u,")"));break;case"middle":C=Xl("calc(".concat((w.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:C=Xl("calc(".concat(w.length-1," * -").concat(s,")"));break}var W=[];if(f){var U=w[0].width,F=O.width;W.push("scale(".concat((X(F)?F/U:1)/U,")"))}return g&&W.push("rotate(".concat(g,", ").concat(R,", ").concat(M,")")),W.length&&(_.transform=W.join(" ")),S.createElement("text",Jl({},de(_,!0),{x:R,y:M,className:ve("recharts-text",A),textAnchor:h,fill:x.includes("url")?vp:x}),w.map(function(N,D){var L=N.words.join(P?"":" ");return S.createElement("tspan",{x:R,dy:D===0?C:s,key:"".concat(L,"-").concat(D)},L)}))};function vr(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Tk(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Zl(e){let t,r,n;e.length!==2?(t=vr,r=(s,l)=>vr(e(s),l),n=(s,l)=>e(s)-l):(t=e===vr||e===Tk?e:Pk,r=e,n=e);function a(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;r(s[f],l)<0?u=f+1:c=f}while(u<c)}return u}function i(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;r(s[f],l)<=0?u=f+1:c=f}while(u<c)}return u}function o(s,l,u=0,c=s.length){const f=a(s,l,u,c-1);return f>u&&n(s[f-1],l)>-n(s[f],l)?f-1:f}return{left:a,center:o,right:i}}function Pk(){return 0}function yp(e){return e===null?NaN:+e}function*_k(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const Sa=Zl(vr).right;Zl(yp).center;class mp extends Map{constructor(t,r=$k){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(gp(this,t))}has(t){return super.has(gp(this,t))}set(t,r){return super.set(jk(this,t),r)}delete(t){return super.delete(Ek(this,t))}}function gp({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function jk({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function Ek({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function $k(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Ck(e=vr){if(e===vr)return bp;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 bp(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Mk=Math.sqrt(50),kk=Math.sqrt(10),Nk=Math.sqrt(2);function lo(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),i=n/Math.pow(10,a),o=i>=Mk?10:i>=kk?5:i>=Nk?2:1;let s,l,u;return a<0?(u=Math.pow(10,-a)/o,s=Math.round(e*u),l=Math.round(t*u),s/u<e&&++s,l/u>t&&--l,u=-u):(u=Math.pow(10,a)*o,s=Math.round(e/u),l=Math.round(t/u),s*u<e&&++s,l*u>t&&--l),l<s&&.5<=r&&r<2?lo(e,t,r*2):[s,l,u]}function Ql(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,i,o]=n?lo(t,e,r):lo(e,t,r);if(!(i>=a))return[];const s=i-a+1,l=new Array(s);if(n)if(o<0)for(let u=0;u<s;++u)l[u]=(i-u)/-o;else for(let u=0;u<s;++u)l[u]=(i-u)*o;else if(o<0)for(let u=0;u<s;++u)l[u]=(a+u)/-o;else for(let u=0;u<s;++u)l[u]=(a+u)*o;return l}function eu(e,t,r){return t=+t,e=+e,r=+r,lo(e,t,r)[2]}function tu(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?eu(t,e,r):eu(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function xp(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function wp(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Op(e,t,r=0,n=1/0,a){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(a=a===void 0?bp:Ck(a);n>r;){if(n-r>600){const l=n-r+1,u=t-r+1,c=Math.log(l),f=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1),h=Math.max(r,Math.floor(t-u*f/l+d)),m=Math.min(n,Math.floor(t+(l-u)*f/l+d));Op(e,t,h,m,a)}const i=e[t];let o=r,s=n;for(Aa(e,r,t),a(e[n],i)>0&&Aa(e,r,n);o<s;){for(Aa(e,o,s),++o,--s;a(e[o],i)<0;)++o;for(;a(e[s],i)>0;)--s}a(e[r],i)===0?Aa(e,r,s):(++s,Aa(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function Aa(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function Dk(e,t,r){if(e=Float64Array.from(_k(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return wp(e);if(t>=1)return xp(e);var n,a=(n-1)*t,i=Math.floor(a),o=xp(Op(e,i).subarray(0,i+1)),s=wp(e.subarray(i+1));return o+(s-o)*(a-i)}}function Ik(e,t,r=yp){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,a=(n-1)*t,i=Math.floor(a),o=+r(e[i],i,e),s=+r(e[i+1],i+1,e);return o+(s-o)*(a-i)}}function Rk(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,i=new Array(a);++n<a;)i[n]=e+n*r;return i}function At(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function er(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 ru=Symbol("implicit");function nu(){var e=new mp,t=[],r=[],n=ru;function a(i){let o=e.get(i);if(o===void 0){if(n!==ru)return n;e.set(i,o=t.push(i)-1)}return r[o%r.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new mp;for(const o of i)e.has(o)||e.set(o,t.push(o)-1);return a},a.range=function(i){return arguments.length?(r=Array.from(i),a):r.slice()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return nu(t,r).unknown(n)},At.apply(a,arguments),a}function Ta(){var e=nu().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,i,o,s=!1,l=0,u=0,c=.5;delete e.unknown;function f(){var d=t().length,h=a<n,m=h?a:n,v=h?n:a;i=(v-m)/Math.max(1,d-l+u*2),s&&(i=Math.floor(i)),m+=(v-m-i*(d-l))*c,o=i*(1-l),s&&(m=Math.round(m),o=Math.round(o));var y=Rk(d).map(function(x){return m+i*x});return r(h?y.reverse():y)}return e.domain=function(d){return arguments.length?(t(d),f()):t()},e.range=function(d){return arguments.length?([n,a]=d,n=+n,a=+a,f()):[n,a]},e.rangeRound=function(d){return[n,a]=d,n=+n,a=+a,s=!0,f()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(d){return arguments.length?(s=!!d,f()):s},e.padding=function(d){return arguments.length?(l=Math.min(1,u=+d),f()):l},e.paddingInner=function(d){return arguments.length?(l=Math.min(1,d),f()):l},e.paddingOuter=function(d){return arguments.length?(u=+d,f()):u},e.align=function(d){return arguments.length?(c=Math.max(0,Math.min(1,d)),f()):c},e.copy=function(){return Ta(t(),[n,a]).round(s).paddingInner(l).paddingOuter(u).align(c)},At.apply(f(),arguments)}function Sp(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Sp(t())},e}function Pa(){return Sp(Ta.apply(null,arguments).paddingInner(1))}function au(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Ap(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function _a(){}var ja=.7,uo=1/ja,xn="\\s*([+-]?\\d+)\\s*",Ea="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Wt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Lk=/^#([0-9a-f]{3,8})$/,Bk=new RegExp(`^rgb\\(${xn},${xn},${xn}\\)$`),Fk=new RegExp(`^rgb\\(${Wt},${Wt},${Wt}\\)$`),Wk=new RegExp(`^rgba\\(${xn},${xn},${xn},${Ea}\\)$`),Uk=new RegExp(`^rgba\\(${Wt},${Wt},${Wt},${Ea}\\)$`),zk=new RegExp(`^hsl\\(${Ea},${Wt},${Wt}\\)$`),Kk=new RegExp(`^hsla\\(${Ea},${Wt},${Wt},${Ea}\\)$`),Tp={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};au(_a,$a,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Pp,formatHex:Pp,formatHex8:qk,formatHsl:Gk,formatRgb:_p,toString:_p});function Pp(){return this.rgb().formatHex()}function qk(){return this.rgb().formatHex8()}function Gk(){return Mp(this).formatHsl()}function _p(){return this.rgb().formatRgb()}function $a(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Lk.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?jp(t):r===3?new ct(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?co(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?co(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=Bk.exec(e))?new ct(t[1],t[2],t[3],1):(t=Fk.exec(e))?new ct(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Wk.exec(e))?co(t[1],t[2],t[3],t[4]):(t=Uk.exec(e))?co(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=zk.exec(e))?Cp(t[1],t[2]/100,t[3]/100,1):(t=Kk.exec(e))?Cp(t[1],t[2]/100,t[3]/100,t[4]):Tp.hasOwnProperty(e)?jp(Tp[e]):e==="transparent"?new ct(NaN,NaN,NaN,0):null}function jp(e){return new ct(e>>16&255,e>>8&255,e&255,1)}function co(e,t,r,n){return n<=0&&(e=t=r=NaN),new ct(e,t,r,n)}function Vk(e){return e instanceof _a||(e=$a(e)),e?(e=e.rgb(),new ct(e.r,e.g,e.b,e.opacity)):new ct}function iu(e,t,r,n){return arguments.length===1?Vk(e):new ct(e,t,r,n??1)}function ct(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}au(ct,iu,Ap(_a,{brighter(e){return e=e==null?uo:Math.pow(uo,e),new ct(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ja:Math.pow(ja,e),new ct(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ct(kr(this.r),kr(this.g),kr(this.b),fo(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:Ep,formatHex:Ep,formatHex8:Hk,formatRgb:$p,toString:$p}));function Ep(){return`#${Nr(this.r)}${Nr(this.g)}${Nr(this.b)}`}function Hk(){return`#${Nr(this.r)}${Nr(this.g)}${Nr(this.b)}${Nr((isNaN(this.opacity)?1:this.opacity)*255)}`}function $p(){const e=fo(this.opacity);return`${e===1?"rgb(":"rgba("}${kr(this.r)}, ${kr(this.g)}, ${kr(this.b)}${e===1?")":`, ${e})`}`}function fo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function kr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Nr(e){return e=kr(e),(e<16?"0":"")+e.toString(16)}function Cp(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Mt(e,t,r,n)}function Mp(e){if(e instanceof Mt)return new Mt(e.h,e.s,e.l,e.opacity);if(e instanceof _a||(e=$a(e)),!e)return new Mt;if(e instanceof Mt)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),i=Math.max(t,r,n),o=NaN,s=i-a,l=(i+a)/2;return s?(t===i?o=(r-n)/s+(r<n)*6:r===i?o=(n-t)/s+2:o=(t-r)/s+4,s/=l<.5?i+a:2-i-a,o*=60):s=l>0&&l<1?0:o,new Mt(o,s,l,e.opacity)}function Yk(e,t,r,n){return arguments.length===1?Mp(e):new Mt(e,t,r,n??1)}function Mt(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}au(Mt,Yk,Ap(_a,{brighter(e){return e=e==null?uo:Math.pow(uo,e),new Mt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ja:Math.pow(ja,e),new Mt(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,a=2*r-n;return new ct(ou(e>=240?e-240:e+120,a,n),ou(e,a,n),ou(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new Mt(kp(this.h),ho(this.s),ho(this.l),fo(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=fo(this.opacity);return`${e===1?"hsl(":"hsla("}${kp(this.h)}, ${ho(this.s)*100}%, ${ho(this.l)*100}%${e===1?")":`, ${e})`}`}}));function kp(e){return e=(e||0)%360,e<0?e+360:e}function ho(e){return Math.max(0,Math.min(1,e||0))}function ou(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 su=e=>()=>e;function Xk(e,t){return function(r){return e+r*t}}function Jk(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 Zk(e){return(e=+e)==1?Np:function(t,r){return r-t?Jk(t,r,e):su(isNaN(t)?r:t)}}function Np(e,t){var r=t-e;return r?Xk(e,r):su(isNaN(e)?t:e)}const Dp=function e(t){var r=Zk(t);function n(a,i){var o=r((a=iu(a)).r,(i=iu(i)).r),s=r(a.g,i.g),l=r(a.b,i.b),u=Np(a.opacity,i.opacity);return function(c){return a.r=o(c),a.g=s(c),a.b=l(c),a.opacity=u(c),a+""}}return n.gamma=e,n}(1);function Qk(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(i){for(a=0;a<r;++a)n[a]=e[a]*(1-i)+t[a]*i;return n}}function e2(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function t2(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),i=new Array(r),o;for(o=0;o<n;++o)a[o]=wn(e[o],t[o]);for(;o<r;++o)i[o]=t[o];return function(s){for(o=0;o<n;++o)i[o]=a[o](s);return i}}function r2(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function po(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function n2(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=wn(e[a],t[a]):n[a]=t[a];return function(i){for(a in r)n[a]=r[a](i);return n}}var lu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,uu=new RegExp(lu.source,"g");function a2(e){return function(){return e}}function i2(e){return function(t){return e(t)+""}}function o2(e,t){var r=lu.lastIndex=uu.lastIndex=0,n,a,i,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=lu.exec(e))&&(a=uu.exec(t));)(i=a.index)>r&&(i=t.slice(r,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(a=a[0])?s[o]?s[o]+=a:s[++o]=a:(s[++o]=null,l.push({i:o,x:po(n,a)})),r=uu.lastIndex;return r<t.length&&(i=t.slice(r),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?i2(l[0].x):a2(t):(t=l.length,function(u){for(var c=0,f;c<t;++c)s[(f=l[c]).i]=f.x(u);return s.join("")})}function wn(e,t){var r=typeof t,n;return t==null||r==="boolean"?su(t):(r==="number"?po:r==="string"?(n=$a(t))?(t=n,Dp):o2:t instanceof $a?Dp:t instanceof Date?r2:e2(t)?Qk:Array.isArray(t)?t2:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?n2:po)(e,t)}function cu(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function s2(e,t){t===void 0&&(t=e,e=wn);for(var r=0,n=t.length-1,a=t[0],i=new Array(n<0?0:n);r<n;)i[r]=e(a,a=t[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return i[s](o-s)}}function l2(e){return function(){return e}}function vo(e){return+e}var Ip=[0,1];function ot(e){return e}function fu(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:l2(isNaN(t)?NaN:.5)}function u2(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function c2(e,t,r){var n=e[0],a=e[1],i=t[0],o=t[1];return a<n?(n=fu(a,n),i=r(o,i)):(n=fu(n,a),i=r(i,o)),function(s){return i(n(s))}}function f2(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),i=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)a[o]=fu(e[o],e[o+1]),i[o]=r(t[o],t[o+1]);return function(s){var l=Sa(e,s,1,n)-1;return i[l](a[l](s))}}function Ca(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function yo(){var e=Ip,t=Ip,r=wn,n,a,i,o=ot,s,l,u;function c(){var d=Math.min(e.length,t.length);return o!==ot&&(o=u2(e[0],e[d-1])),s=d>2?f2:c2,l=u=null,f}function f(d){return d==null||isNaN(d=+d)?i:(l||(l=s(e.map(n),t,r)))(n(o(d)))}return f.invert=function(d){return o(a((u||(u=s(t,e.map(n),po)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,vo),c()):e.slice()},f.range=function(d){return arguments.length?(t=Array.from(d),c()):t.slice()},f.rangeRound=function(d){return t=Array.from(d),r=cu,c()},f.clamp=function(d){return arguments.length?(o=d?!0:ot,c()):o!==ot},f.interpolate=function(d){return arguments.length?(r=d,c()):r},f.unknown=function(d){return arguments.length?(i=d,f):i},function(d,h){return n=d,a=h,c()}}function du(){return yo()(ot,ot)}function d2(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function mo(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 On(e){return e=mo(Math.abs(e)),e?e[1]:NaN}function h2(e,t){return function(r,n){for(var a=r.length,i=[],o=0,s=e[0],l=0;a>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),i.push(r.substring(a-=s,a+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return i.reverse().join(t)}}function p2(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var v2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ma(e){if(!(t=v2.exec(e)))throw new Error("invalid format: "+e);var t;return new hu({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]})}Ma.prototype=hu.prototype;function hu(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+""}hu.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 y2(e){e:for(var t=e.length,r=1,n=-1,a;r<t;++r)switch(e[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var Rp;function m2(e,t){var r=mo(e,t);if(!r)return e+"";var n=r[0],a=r[1],i=a-(Rp=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=n.length;return i===o?n:i>o?n+new Array(i-o+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+mo(e,Math.max(0,t+i-1))[0]}function Lp(e,t){var r=mo(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const Bp={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:d2,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)=>Lp(e*100,t),r:Lp,s:m2,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Fp(e){return e}var Wp=Array.prototype.map,Up=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function g2(e){var t=e.grouping===void 0||e.thousands===void 0?Fp:h2(Wp.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?Fp:p2(Wp.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f){f=Ma(f);var d=f.fill,h=f.align,m=f.sign,v=f.symbol,y=f.zero,x=f.width,O=f.comma,w=f.precision,T=f.trim,p=f.type;p==="n"?(O=!0,p="g"):Bp[p]||(w===void 0&&(w=12),T=!0,p="g"),(y||d==="0"&&h==="=")&&(y=!0,d="0",h="=");var g=v==="$"?r:v==="#"&&/[boxX]/.test(p)?"0"+p.toLowerCase():"",A=v==="$"?n:/[%p]/.test(p)?o:"",P=Bp[p],_=/[defgprs%]/.test(p);w=w===void 0?6:/[gprs]/.test(p)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function R(M){var C=g,W=A,U,F,N;if(p==="c")W=P(M)+W,M="";else{M=+M;var D=M<0||1/M<0;if(M=isNaN(M)?l:P(Math.abs(M),w),T&&(M=y2(M)),D&&+M==0&&m!=="+"&&(D=!1),C=(D?m==="("?m:s:m==="-"||m==="("?"":m)+C,W=(p==="s"?Up[8+Rp/3]:"")+W+(D&&m==="("?")":""),_){for(U=-1,F=M.length;++U<F;)if(N=M.charCodeAt(U),48>N||N>57){W=(N===46?a+M.slice(U+1):M.slice(U))+W,M=M.slice(0,U);break}}}O&&!y&&(M=t(M,1/0));var L=C.length+M.length+W.length,E=L<x?new Array(x-L+1).join(d):"";switch(O&&y&&(M=t(E+M,E.length?x-W.length:1/0),E=""),h){case"<":M=C+M+W+E;break;case"=":M=C+E+M+W;break;case"^":M=E.slice(0,L=E.length>>1)+C+M+W+E.slice(L);break;default:M=E+C+M+W;break}return i(M)}return R.toString=function(){return f+""},R}function c(f,d){var h=u((f=Ma(f),f.type="f",f)),m=Math.max(-8,Math.min(8,Math.floor(On(d)/3)))*3,v=Math.pow(10,-m),y=Up[8+m/3];return function(x){return h(v*x)+y}}return{format:u,formatPrefix:c}}var go,pu,zp;b2({thousands:",",grouping:[3],currency:["$",""]});function b2(e){return go=g2(e),pu=go.format,zp=go.formatPrefix,go}function x2(e){return Math.max(0,-On(Math.abs(e)))}function w2(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(On(t)/3)))*3-On(Math.abs(e)))}function O2(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,On(t)-On(e))+1}function Kp(e,t,r,n){var a=tu(e,t,r),i;switch(n=Ma(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(i=w2(a,o))&&(n.precision=i),zp(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=O2(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=x2(a))&&(n.precision=i-(n.type==="%")*2);break}}return pu(n)}function yr(e){var t=e.domain;return e.ticks=function(r){var n=t();return Ql(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return Kp(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,i=n.length-1,o=n[a],s=n[i],l,u,c=10;for(s<o&&(u=o,o=s,s=u,u=a,a=i,i=u);c-- >0;){if(u=eu(o,s,r),u===l)return n[a]=o,n[i]=s,t(n);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function bo(){var e=du();return e.copy=function(){return Ca(e,bo())},At.apply(e,arguments),yr(e)}function qp(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,vo),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return qp(e).unknown(t)},e=arguments.length?Array.from(e,vo):[0,1],yr(r)}function Gp(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],i=e[n],o;return i<a&&(o=r,r=n,n=o,o=a,a=i,i=o),e[r]=t.floor(a),e[n]=t.ceil(i),e}function Vp(e){return Math.log(e)}function Hp(e){return Math.exp(e)}function S2(e){return-Math.log(-e)}function A2(e){return-Math.exp(-e)}function T2(e){return isFinite(e)?+("1e"+e):e<0?0:e}function P2(e){return e===10?T2:e===Math.E?Math.exp:t=>Math.pow(e,t)}function _2(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 Yp(e){return(t,r)=>-e(-t,r)}function vu(e){const t=e(Vp,Hp),r=t.domain;let n=10,a,i;function o(){return a=_2(n),i=P2(n),r()[0]<0?(a=Yp(a),i=Yp(i),e(S2,A2)):e(Vp,Hp),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const l=r();let u=l[0],c=l[l.length-1];const f=c<u;f&&([u,c]=[c,u]);let d=a(u),h=a(c),m,v;const y=s==null?10:+s;let x=[];if(!(n%1)&&h-d<y){if(d=Math.floor(d),h=Math.ceil(h),u>0){for(;d<=h;++d)for(m=1;m<n;++m)if(v=d<0?m/i(-d):m*i(d),!(v<u)){if(v>c)break;x.push(v)}}else for(;d<=h;++d)for(m=n-1;m>=1;--m)if(v=d>0?m/i(-d):m*i(d),!(v<u)){if(v>c)break;x.push(v)}x.length*2<y&&(x=Ql(u,c,y))}else x=Ql(d,h,Math.min(h-d,y)).map(i);return f?x.reverse():x},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Ma(l)).precision==null&&(l.trim=!0),l=pu(l)),s===1/0)return l;const u=Math.max(1,n*s/t.ticks().length);return c=>{let f=c/i(Math.round(a(c)));return f*n<n-.5&&(f*=n),f<=u?l(c):""}},t.nice=()=>r(Gp(r(),{floor:s=>i(Math.floor(a(s))),ceil:s=>i(Math.ceil(a(s)))})),t}function Xp(){const e=vu(yo()).domain([1,10]);return e.copy=()=>Ca(e,Xp()).base(e.base()),At.apply(e,arguments),e}function Jp(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Zp(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function yu(e){var t=1,r=e(Jp(t),Zp(t));return r.constant=function(n){return arguments.length?e(Jp(t=+n),Zp(t)):t},yr(r)}function Qp(){var e=yu(yo());return e.copy=function(){return Ca(e,Qp()).constant(e.constant())},At.apply(e,arguments)}function ev(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function j2(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function E2(e){return e<0?-e*e:e*e}function mu(e){var t=e(ot,ot),r=1;function n(){return r===1?e(ot,ot):r===.5?e(j2,E2):e(ev(r),ev(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},yr(t)}function gu(){var e=mu(yo());return e.copy=function(){return Ca(e,gu()).exponent(e.exponent())},At.apply(e,arguments),e}function $2(){return gu.apply(null,arguments).exponent(.5)}function tv(e){return Math.sign(e)*e*e}function C2(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function rv(){var e=du(),t=[0,1],r=!1,n;function a(i){var o=C2(e(i));return isNaN(o)?n:r?Math.round(o):o}return a.invert=function(i){return e.invert(tv(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,vo)).map(tv)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(r=!!i,a):r},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return rv(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},At.apply(a,arguments),yr(a)}function nv(){var e=[],t=[],r=[],n;function a(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o<s;)r[o-1]=Ik(e,o/s);return i}function i(o){return o==null||isNaN(o=+o)?n:t[Sa(r,o)]}return i.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},i.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(vr),a()},i.range=function(o){return arguments.length?(t=Array.from(o),a()):t.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.quantiles=function(){return r.slice()},i.copy=function(){return nv().domain(e).range(t).unknown(n)},At.apply(i,arguments)}function av(){var e=0,t=1,r=1,n=[.5],a=[0,1],i;function o(l){return l!=null&&l<=l?a[Sa(n,l,0,r)]:i}function s(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*t-(l-r)*e)/(r+1);return o}return o.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},o.range=function(l){return arguments.length?(r=(a=Array.from(l)).length-1,s()):a.slice()},o.invertExtent=function(l){var u=a.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,n[0]]:u>=r?[n[r-1],t]:[n[u-1],n[u]]},o.unknown=function(l){return arguments.length&&(i=l),o},o.thresholds=function(){return n.slice()},o.copy=function(){return av().domain([e,t]).range(a).unknown(i)},At.apply(yr(o),arguments)}function iv(){var e=[.5],t=[0,1],r,n=1;function a(i){return i!=null&&i<=i?t[Sa(e,i,0,n)]:r}return a.domain=function(i){return arguments.length?(e=Array.from(i),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var o=t.indexOf(i);return[e[o-1],e[o]]},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return iv().domain(e).range(t).unknown(r)},At.apply(a,arguments)}const bu=new Date,xu=new Date;function He(e,t,r,n){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const o=a(i),s=a.ceil(i);return i-o<s-i?o:s},a.offset=(i,o)=>(t(i=new Date(+i),o==null?1:Math.floor(o)),i),a.range=(i,o,s)=>{const l=[];if(i=a.ceil(i),s=s==null?1:Math.floor(s),!(i<o)||!(s>0))return l;let u;do l.push(u=new Date(+i)),t(i,s),e(i);while(u<i&&i<o);return l},a.filter=i=>He(o=>{if(o>=o)for(;e(o),!i(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!i(o););else for(;--s>=0;)for(;t(o,1),!i(o););}),r&&(a.count=(i,o)=>(bu.setTime(+i),xu.setTime(+o),e(bu),e(xu),Math.floor(r(bu,xu))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(n?o=>n(o)%i===0:o=>a.count(0,o)%i===0):a)),a}const xo=He(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);xo.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?He(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):xo),xo.range;const tr=1e3,Tt=tr*60,rr=Tt*60,nr=rr*24,wu=nr*7,ov=nr*30,Ou=nr*365,Dr=He(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*tr)},(e,t)=>(t-e)/tr,e=>e.getUTCSeconds());Dr.range;const Su=He(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*tr)},(e,t)=>{e.setTime(+e+t*Tt)},(e,t)=>(t-e)/Tt,e=>e.getMinutes());Su.range;const Au=He(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Tt)},(e,t)=>(t-e)/Tt,e=>e.getUTCMinutes());Au.range;const Tu=He(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*tr-e.getMinutes()*Tt)},(e,t)=>{e.setTime(+e+t*rr)},(e,t)=>(t-e)/rr,e=>e.getHours());Tu.range;const Pu=He(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*rr)},(e,t)=>(t-e)/rr,e=>e.getUTCHours());Pu.range;const ka=He(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Tt)/nr,e=>e.getDate()-1);ka.range;const wo=He(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/nr,e=>e.getUTCDate()-1);wo.range;const sv=He(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/nr,e=>Math.floor(e/nr));sv.range;function Ir(e){return He(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())*Tt)/wu)}const Oo=Ir(0),So=Ir(1),M2=Ir(2),k2=Ir(3),Sn=Ir(4),N2=Ir(5),D2=Ir(6);Oo.range,So.range,M2.range,k2.range,Sn.range,N2.range,D2.range;function Rr(e){return He(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)/wu)}const Ao=Rr(0),To=Rr(1),I2=Rr(2),R2=Rr(3),An=Rr(4),L2=Rr(5),B2=Rr(6);Ao.range,To.range,I2.range,R2.range,An.range,L2.range,B2.range;const _u=He(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());_u.range;const ju=He(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());ju.range;const ar=He(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());ar.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:He(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)}),ar.range;const ir=He(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());ir.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:He(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)}),ir.range;function lv(e,t,r,n,a,i){const o=[[Dr,1,tr],[Dr,5,5*tr],[Dr,15,15*tr],[Dr,30,30*tr],[i,1,Tt],[i,5,5*Tt],[i,15,15*Tt],[i,30,30*Tt],[a,1,rr],[a,3,3*rr],[a,6,6*rr],[a,12,12*rr],[n,1,nr],[n,2,2*nr],[r,1,wu],[t,1,ov],[t,3,3*ov],[e,1,Ou]];function s(u,c,f){const d=c<u;d&&([u,c]=[c,u]);const h=f&&typeof f.range=="function"?f:l(u,c,f),m=h?h.range(u,+c+1):[];return d?m.reverse():m}function l(u,c,f){const d=Math.abs(c-u)/f,h=Zl(([,,y])=>y).right(o,d);if(h===o.length)return e.every(tu(u/Ou,c/Ou,f));if(h===0)return xo.every(Math.max(tu(u,c,f),1));const[m,v]=o[d/o[h-1][2]<o[h][2]/d?h-1:h];return m.every(v)}return[s,l]}const[F2,W2]=lv(ir,ju,Ao,sv,Pu,Au),[U2,z2]=lv(ar,_u,Oo,ka,Tu,Su);function Eu(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 $u(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 Na(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function K2(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,i=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,u=Da(a),c=Ia(a),f=Da(i),d=Ia(i),h=Da(o),m=Ia(o),v=Da(s),y=Ia(s),x=Da(l),O=Ia(l),w={a:D,A:L,b:E,B:j,c:null,d:pv,e:pv,f:hN,g:SN,G:TN,H:cN,I:fN,j:dN,L:vv,m:pN,M:vN,p:I,q:B,Q:wv,s:Ov,S:yN,u:mN,U:gN,V:bN,w:xN,W:wN,x:null,X:null,y:ON,Y:AN,Z:PN,"%":xv},T={a:z,A:V,b:Z,B:Q,c:null,d:mv,e:mv,f:$N,g:FN,G:UN,H:_N,I:jN,j:EN,L:gv,m:CN,M:MN,p:ee,q:te,Q:wv,s:Ov,S:kN,u:NN,U:DN,V:IN,w:RN,W:LN,x:null,X:null,y:BN,Y:WN,Z:zN,"%":xv},p={a:R,A:M,b:C,B:W,c:U,d:dv,e:dv,f:oN,g:fv,G:cv,H:hv,I:hv,j:rN,L:iN,m:tN,M:nN,p:_,q:eN,Q:lN,s:uN,S:aN,u:Y2,U:X2,V:J2,w:H2,W:Z2,x:F,X:N,y:fv,Y:cv,Z:Q2,"%":sN};w.x=g(r,w),w.X=g(n,w),w.c=g(t,w),T.x=g(r,T),T.X=g(n,T),T.c=g(t,T);function g(q,Y){return function(J){var k=[],ie=-1,G=0,re=q.length,oe,Ce,Te;for(J instanceof Date||(J=new Date(+J));++ie<re;)q.charCodeAt(ie)===37&&(k.push(q.slice(G,ie)),(Ce=uv[oe=q.charAt(++ie)])!=null?oe=q.charAt(++ie):Ce=oe==="e"?" ":"0",(Te=Y[oe])&&(oe=Te(J,Ce)),k.push(oe),G=ie+1);return k.push(q.slice(G,ie)),k.join("")}}function A(q,Y){return function(J){var k=Na(1900,void 0,1),ie=P(k,q,J+="",0),G,re;if(ie!=J.length)return null;if("Q"in k)return new Date(k.Q);if("s"in k)return new Date(k.s*1e3+("L"in k?k.L:0));if(Y&&!("Z"in k)&&(k.Z=0),"p"in k&&(k.H=k.H%12+k.p*12),k.m===void 0&&(k.m="q"in k?k.q:0),"V"in k){if(k.V<1||k.V>53)return null;"w"in k||(k.w=1),"Z"in k?(G=$u(Na(k.y,0,1)),re=G.getUTCDay(),G=re>4||re===0?To.ceil(G):To(G),G=wo.offset(G,(k.V-1)*7),k.y=G.getUTCFullYear(),k.m=G.getUTCMonth(),k.d=G.getUTCDate()+(k.w+6)%7):(G=Eu(Na(k.y,0,1)),re=G.getDay(),G=re>4||re===0?So.ceil(G):So(G),G=ka.offset(G,(k.V-1)*7),k.y=G.getFullYear(),k.m=G.getMonth(),k.d=G.getDate()+(k.w+6)%7)}else("W"in k||"U"in k)&&("w"in k||(k.w="u"in k?k.u%7:"W"in k?1:0),re="Z"in k?$u(Na(k.y,0,1)).getUTCDay():Eu(Na(k.y,0,1)).getDay(),k.m=0,k.d="W"in k?(k.w+6)%7+k.W*7-(re+5)%7:k.w+k.U*7-(re+6)%7);return"Z"in k?(k.H+=k.Z/100|0,k.M+=k.Z%100,$u(k)):Eu(k)}}function P(q,Y,J,k){for(var ie=0,G=Y.length,re=J.length,oe,Ce;ie<G;){if(k>=re)return-1;if(oe=Y.charCodeAt(ie++),oe===37){if(oe=Y.charAt(ie++),Ce=p[oe in uv?Y.charAt(ie++):oe],!Ce||(k=Ce(q,J,k))<0)return-1}else if(oe!=J.charCodeAt(k++))return-1}return k}function _(q,Y,J){var k=u.exec(Y.slice(J));return k?(q.p=c.get(k[0].toLowerCase()),J+k[0].length):-1}function R(q,Y,J){var k=h.exec(Y.slice(J));return k?(q.w=m.get(k[0].toLowerCase()),J+k[0].length):-1}function M(q,Y,J){var k=f.exec(Y.slice(J));return k?(q.w=d.get(k[0].toLowerCase()),J+k[0].length):-1}function C(q,Y,J){var k=x.exec(Y.slice(J));return k?(q.m=O.get(k[0].toLowerCase()),J+k[0].length):-1}function W(q,Y,J){var k=v.exec(Y.slice(J));return k?(q.m=y.get(k[0].toLowerCase()),J+k[0].length):-1}function U(q,Y,J){return P(q,t,Y,J)}function F(q,Y,J){return P(q,r,Y,J)}function N(q,Y,J){return P(q,n,Y,J)}function D(q){return o[q.getDay()]}function L(q){return i[q.getDay()]}function E(q){return l[q.getMonth()]}function j(q){return s[q.getMonth()]}function I(q){return a[+(q.getHours()>=12)]}function B(q){return 1+~~(q.getMonth()/3)}function z(q){return o[q.getUTCDay()]}function V(q){return i[q.getUTCDay()]}function Z(q){return l[q.getUTCMonth()]}function Q(q){return s[q.getUTCMonth()]}function ee(q){return a[+(q.getUTCHours()>=12)]}function te(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var Y=g(q+="",w);return Y.toString=function(){return q},Y},parse:function(q){var Y=A(q+="",!1);return Y.toString=function(){return q},Y},utcFormat:function(q){var Y=g(q+="",T);return Y.toString=function(){return q},Y},utcParse:function(q){var Y=A(q+="",!0);return Y.toString=function(){return q},Y}}}var uv={"-":"",_:" ",0:"0"},Ze=/^\s*\d+/,q2=/^%/,G2=/[\\^$*+?|[\]().{}]/g;function ge(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i<r?new Array(r-i+1).join(t)+a:a)}function V2(e){return e.replace(G2,"\\$&")}function Da(e){return new RegExp("^(?:"+e.map(V2).join("|")+")","i")}function Ia(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function H2(e,t,r){var n=Ze.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Y2(e,t,r){var n=Ze.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function X2(e,t,r){var n=Ze.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function J2(e,t,r){var n=Ze.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function Z2(e,t,r){var n=Ze.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function cv(e,t,r){var n=Ze.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function fv(e,t,r){var n=Ze.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Q2(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 eN(e,t,r){var n=Ze.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function tN(e,t,r){var n=Ze.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function dv(e,t,r){var n=Ze.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function rN(e,t,r){var n=Ze.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function hv(e,t,r){var n=Ze.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function nN(e,t,r){var n=Ze.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function aN(e,t,r){var n=Ze.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function iN(e,t,r){var n=Ze.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function oN(e,t,r){var n=Ze.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function sN(e,t,r){var n=q2.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function lN(e,t,r){var n=Ze.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function uN(e,t,r){var n=Ze.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function pv(e,t){return ge(e.getDate(),t,2)}function cN(e,t){return ge(e.getHours(),t,2)}function fN(e,t){return ge(e.getHours()%12||12,t,2)}function dN(e,t){return ge(1+ka.count(ar(e),e),t,3)}function vv(e,t){return ge(e.getMilliseconds(),t,3)}function hN(e,t){return vv(e,t)+"000"}function pN(e,t){return ge(e.getMonth()+1,t,2)}function vN(e,t){return ge(e.getMinutes(),t,2)}function yN(e,t){return ge(e.getSeconds(),t,2)}function mN(e){var t=e.getDay();return t===0?7:t}function gN(e,t){return ge(Oo.count(ar(e)-1,e),t,2)}function yv(e){var t=e.getDay();return t>=4||t===0?Sn(e):Sn.ceil(e)}function bN(e,t){return e=yv(e),ge(Sn.count(ar(e),e)+(ar(e).getDay()===4),t,2)}function xN(e){return e.getDay()}function wN(e,t){return ge(So.count(ar(e)-1,e),t,2)}function ON(e,t){return ge(e.getFullYear()%100,t,2)}function SN(e,t){return e=yv(e),ge(e.getFullYear()%100,t,2)}function AN(e,t){return ge(e.getFullYear()%1e4,t,4)}function TN(e,t){var r=e.getDay();return e=r>=4||r===0?Sn(e):Sn.ceil(e),ge(e.getFullYear()%1e4,t,4)}function PN(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ge(t/60|0,"0",2)+ge(t%60,"0",2)}function mv(e,t){return ge(e.getUTCDate(),t,2)}function _N(e,t){return ge(e.getUTCHours(),t,2)}function jN(e,t){return ge(e.getUTCHours()%12||12,t,2)}function EN(e,t){return ge(1+wo.count(ir(e),e),t,3)}function gv(e,t){return ge(e.getUTCMilliseconds(),t,3)}function $N(e,t){return gv(e,t)+"000"}function CN(e,t){return ge(e.getUTCMonth()+1,t,2)}function MN(e,t){return ge(e.getUTCMinutes(),t,2)}function kN(e,t){return ge(e.getUTCSeconds(),t,2)}function NN(e){var t=e.getUTCDay();return t===0?7:t}function DN(e,t){return ge(Ao.count(ir(e)-1,e),t,2)}function bv(e){var t=e.getUTCDay();return t>=4||t===0?An(e):An.ceil(e)}function IN(e,t){return e=bv(e),ge(An.count(ir(e),e)+(ir(e).getUTCDay()===4),t,2)}function RN(e){return e.getUTCDay()}function LN(e,t){return ge(To.count(ir(e)-1,e),t,2)}function BN(e,t){return ge(e.getUTCFullYear()%100,t,2)}function FN(e,t){return e=bv(e),ge(e.getUTCFullYear()%100,t,2)}function WN(e,t){return ge(e.getUTCFullYear()%1e4,t,4)}function UN(e,t){var r=e.getUTCDay();return e=r>=4||r===0?An(e):An.ceil(e),ge(e.getUTCFullYear()%1e4,t,4)}function zN(){return"+0000"}function xv(){return"%"}function wv(e){return+e}function Ov(e){return Math.floor(+e/1e3)}var Tn,Sv,Av;KN({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 KN(e){return Tn=K2(e),Sv=Tn.format,Tn.parse,Av=Tn.utcFormat,Tn.utcParse,Tn}function qN(e){return new Date(e)}function GN(e){return e instanceof Date?+e:+new Date(+e)}function Cu(e,t,r,n,a,i,o,s,l,u){var c=du(),f=c.invert,d=c.domain,h=u(".%L"),m=u(":%S"),v=u("%I:%M"),y=u("%I %p"),x=u("%a %d"),O=u("%b %d"),w=u("%B"),T=u("%Y");function p(g){return(l(g)<g?h:s(g)<g?m:o(g)<g?v:i(g)<g?y:n(g)<g?a(g)<g?x:O:r(g)<g?w:T)(g)}return c.invert=function(g){return new Date(f(g))},c.domain=function(g){return arguments.length?d(Array.from(g,GN)):d().map(qN)},c.ticks=function(g){var A=d();return e(A[0],A[A.length-1],g??10)},c.tickFormat=function(g,A){return A==null?p:u(A)},c.nice=function(g){var A=d();return(!g||typeof g.range!="function")&&(g=t(A[0],A[A.length-1],g??10)),g?d(Gp(A,g)):c},c.copy=function(){return Ca(c,Cu(e,t,r,n,a,i,o,s,l,u))},c}function VN(){return At.apply(Cu(U2,z2,ar,_u,Oo,ka,Tu,Su,Dr,Sv).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function HN(){return At.apply(Cu(F2,W2,ir,ju,Ao,wo,Pu,Au,Dr,Av).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Po(){var e=0,t=1,r,n,a,i,o=ot,s=!1,l;function u(f){return f==null||isNaN(f=+f)?l:o(a===0?.5:(f=(i(f)-r)*a,s?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,r=i(e=+e),n=i(t=+t),a=r===n?0:1/(n-r),u):[e,t]},u.clamp=function(f){return arguments.length?(s=!!f,u):s},u.interpolator=function(f){return arguments.length?(o=f,u):o};function c(f){return function(d){var h,m;return arguments.length?([h,m]=d,o=f(h,m),u):[o(0),o(1)]}}return u.range=c(wn),u.rangeRound=c(cu),u.unknown=function(f){return arguments.length?(l=f,u):l},function(f){return i=f,r=f(e),n=f(t),a=r===n?0:1/(n-r),u}}function mr(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Tv(){var e=yr(Po()(ot));return e.copy=function(){return mr(e,Tv())},er.apply(e,arguments)}function Pv(){var e=vu(Po()).domain([1,10]);return e.copy=function(){return mr(e,Pv()).base(e.base())},er.apply(e,arguments)}function _v(){var e=yu(Po());return e.copy=function(){return mr(e,_v()).constant(e.constant())},er.apply(e,arguments)}function Mu(){var e=mu(Po());return e.copy=function(){return mr(e,Mu()).exponent(e.exponent())},er.apply(e,arguments)}function YN(){return Mu.apply(null,arguments).exponent(.5)}function jv(){var e=[],t=ot;function r(n){if(n!=null&&!isNaN(n=+n))return t((Sa(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let a of n)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(vr),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,a)=>t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,i)=>Dk(e,i/n))},r.copy=function(){return jv(t).domain(e)},er.apply(r,arguments)}function _o(){var e=0,t=.5,r=1,n=1,a,i,o,s,l,u=ot,c,f=!1,d;function h(v){return isNaN(v=+v)?d:(v=.5+((v=+c(v))-i)*(n*v<n*i?s:l),u(f?Math.max(0,Math.min(1,v)):v))}h.domain=function(v){return arguments.length?([e,t,r]=v,a=c(e=+e),i=c(t=+t),o=c(r=+r),s=a===i?0:.5/(i-a),l=i===o?0:.5/(o-i),n=i<a?-1:1,h):[e,t,r]},h.clamp=function(v){return arguments.length?(f=!!v,h):f},h.interpolator=function(v){return arguments.length?(u=v,h):u};function m(v){return function(y){var x,O,w;return arguments.length?([x,O,w]=y,u=s2(v,[x,O,w]),h):[u(0),u(.5),u(1)]}}return h.range=m(wn),h.rangeRound=m(cu),h.unknown=function(v){return arguments.length?(d=v,h):d},function(v){return c=v,a=v(e),i=v(t),o=v(r),s=a===i?0:.5/(i-a),l=i===o?0:.5/(o-i),n=i<a?-1:1,h}}function Ev(){var e=yr(_o()(ot));return e.copy=function(){return mr(e,Ev())},er.apply(e,arguments)}function $v(){var e=vu(_o()).domain([.1,1,10]);return e.copy=function(){return mr(e,$v()).base(e.base())},er.apply(e,arguments)}function Cv(){var e=yu(_o());return e.copy=function(){return mr(e,Cv()).constant(e.constant())},er.apply(e,arguments)}function ku(){var e=mu(_o());return e.copy=function(){return mr(e,ku()).exponent(e.exponent())},er.apply(e,arguments)}function XN(){return ku.apply(null,arguments).exponent(.5)}const Mv=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Ta,scaleDiverging:Ev,scaleDivergingLog:$v,scaleDivergingPow:ku,scaleDivergingSqrt:XN,scaleDivergingSymlog:Cv,scaleIdentity:qp,scaleImplicit:ru,scaleLinear:bo,scaleLog:Xp,scaleOrdinal:nu,scalePoint:Pa,scalePow:gu,scaleQuantile:nv,scaleQuantize:av,scaleRadial:rv,scaleSequential:Tv,scaleSequentialLog:Pv,scaleSequentialPow:Mu,scaleSequentialQuantile:jv,scaleSequentialSqrt:YN,scaleSequentialSymlog:_v,scaleSqrt:$2,scaleSymlog:Qp,scaleThreshold:iv,scaleTime:VN,scaleUtc:HN,tickFormat:Kp},Symbol.toStringTag,{value:"Module"}));var JN=tn;function ZN(e,t,r){for(var n=-1,a=e.length;++n<a;){var i=e[n],o=t(i);if(o!=null&&(s===void 0?o===o&&!JN(o):r(o,s)))var s=o,l=i}return l}var kv=ZN;function QN(e,t){return e>t}var eD=QN,tD=kv,rD=eD,nD=hn;function aD(e){return e&&e.length?tD(e,nD,rD):void 0}var iD=aD;const gr=ke(iD);function oD(e,t){return e<t}var sD=oD,lD=kv,uD=sD,cD=hn;function fD(e){return e&&e.length?lD(e,cD,uD):void 0}var dD=fD;const jo=ke(dD);var hD=Xs,pD=hr,vD=Eh,yD=lt;function mD(e,t){var r=yD(e)?hD:vD;return r(e,pD(t))}var gD=mD,bD=_h,xD=gD;function wD(e,t){return bD(xD(e,t),1)}var OD=wD;const SD=ke(OD);var AD=Dl;function TD(e,t){return AD(e,t)}var PD=TD;const Lr=ke(PD);var Pn=1e9,_D={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Iu,Be=!0,Pt="[DecimalError] ",Br=Pt+"Invalid argument: ",Nu=Pt+"Exponent out of range: ",_n=Math.floor,Fr=Math.pow,jD=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,vt,Qe=1e7,Le=7,Nv=9007199254740991,Eo=_n(Nv/Le),ae={};ae.absoluteValue=ae.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},ae.comparedTo=ae.cmp=function(e){var t,r,n,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(n=i.d.length,a=e.d.length,t=0,r=n<a?n:a;t<r;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return n===a?0:n>a^i.s<0?1:-1},ae.decimalPlaces=ae.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Le;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r},ae.dividedBy=ae.div=function(e){return or(this,new this.constructor(e))},ae.dividedToIntegerBy=ae.idiv=function(e){var t=this,r=t.constructor;return $e(or(t,new r(e),0,1),r.precision)},ae.equals=ae.eq=function(e){return!this.cmp(e)},ae.exponent=function(){return Ke(this)},ae.greaterThan=ae.gt=function(e){return this.cmp(e)>0},ae.greaterThanOrEqualTo=ae.gte=function(e){return this.cmp(e)>=0},ae.isInteger=ae.isint=function(){return this.e>this.d.length-2},ae.isNegative=ae.isneg=function(){return this.s<0},ae.isPositive=ae.ispos=function(){return this.s>0},ae.isZero=function(){return this.s===0},ae.lessThan=ae.lt=function(e){return this.cmp(e)<0},ae.lessThanOrEqualTo=ae.lte=function(e){return this.cmp(e)<1},ae.logarithm=ae.log=function(e){var t,r=this,n=r.constructor,a=n.precision,i=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(vt))throw Error(Pt+"NaN");if(r.s<1)throw Error(Pt+(r.s?"NaN":"-Infinity"));return r.eq(vt)?new n(0):(Be=!1,t=or(Ra(r,i),Ra(e,i),i),Be=!0,$e(t,a))},ae.minus=ae.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Lv(t,e):Dv(t,(e.s=-e.s,e))},ae.modulo=ae.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(Pt+"NaN");return r.s?(Be=!1,t=or(r,e,0,1).times(e),Be=!0,r.minus(t)):$e(new n(r),a)},ae.naturalExponential=ae.exp=function(){return Iv(this)},ae.naturalLogarithm=ae.ln=function(){return Ra(this)},ae.negated=ae.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},ae.plus=ae.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Dv(t,e):Lv(t,(e.s=-e.s,e))},ae.precision=ae.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Br+e);if(t=Ke(a)+1,n=a.d.length-1,r=n*Le+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r},ae.squareRoot=ae.sqrt=function(){var e,t,r,n,a,i,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Pt+"NaN")}for(e=Ke(s),Be=!1,a=Math.sqrt(+s),a==0||a==1/0?(t=zt(s.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=_n((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new l(t)):n=new l(a.toString()),r=l.precision,a=o=r+3;;)if(i=n,n=i.plus(or(s,i,o+2)).times(.5),zt(i.d).slice(0,o)===(t=zt(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),a==o&&t=="4999"){if($e(i,r+1,0),i.times(i).eq(s)){n=i;break}}else if(t!="9999")break;o+=4}return Be=!0,$e(n,r)},ae.times=ae.mul=function(e){var t,r,n,a,i,o,s,l,u,c=this,f=c.constructor,d=c.d,h=(e=new f(e)).d;if(!c.s||!e.s)return new f(0);for(e.s*=c.s,r=c.e+e.e,l=d.length,u=h.length,l<u&&(i=d,d=h,h=i,o=l,l=u,u=o),i=[],o=l+u,n=o;n--;)i.push(0);for(n=u;--n>=0;){for(t=0,a=l+n;a>n;)s=i[a]+h[n]*d[a-n-1]+t,i[a--]=s%Qe|0,t=s/Qe|0;i[a]=(i[a]+t)%Qe|0}for(;!i[--o];)i.pop();return t?++r:i.shift(),e.d=i,e.e=r,Be?$e(e,f.precision):e},ae.toDecimalPlaces=ae.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Ut(e,0,Pn),t===void 0?t=n.rounding:Ut(t,0,8),$e(r,e+Ke(r)+1,t))},ae.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=Wr(n,!0):(Ut(e,0,Pn),t===void 0?t=a.rounding:Ut(t,0,8),n=$e(new a(n),e+1,t),r=Wr(n,!0,e+1)),r},ae.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?Wr(a):(Ut(e,0,Pn),t===void 0?t=i.rounding:Ut(t,0,8),n=$e(new i(a),e+Ke(a)+1,t),r=Wr(n.abs(),!1,e+Ke(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)},ae.toInteger=ae.toint=function(){var e=this,t=e.constructor;return $e(new t(e),Ke(e)+1,t.rounding)},ae.toNumber=function(){return+this},ae.toPower=ae.pow=function(e){var t,r,n,a,i,o,s=this,l=s.constructor,u=12,c=+(e=new l(e));if(!e.s)return new l(vt);if(s=new l(s),!s.s){if(e.s<1)throw Error(Pt+"Infinity");return s}if(s.eq(vt))return s;if(n=l.precision,e.eq(vt))return $e(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,i=s.s,o){if((r=c<0?-c:c)<=Nv){for(a=new l(vt),t=Math.ceil(n/Le+4),Be=!1;r%2&&(a=a.times(s),Bv(a.d,t)),r=_n(r/2),r!==0;)s=s.times(s),Bv(s.d,t);return Be=!0,e.s<0?new l(vt).div(a):$e(a,n)}}else if(i<0)throw Error(Pt+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Be=!1,a=e.times(Ra(s,n+u)),Be=!0,a=Iv(a),a.s=i,a},ae.toPrecision=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?(r=Ke(a),n=Wr(a,r<=i.toExpNeg||r>=i.toExpPos)):(Ut(e,1,Pn),t===void 0?t=i.rounding:Ut(t,0,8),a=$e(new i(a),e,t),r=Ke(a),n=Wr(a,e<=r||r<=i.toExpNeg,e)),n},ae.toSignificantDigits=ae.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Ut(e,1,Pn),t===void 0?t=n.rounding:Ut(t,0,8)),$e(new n(r),e,t)},ae.toString=ae.valueOf=ae.val=ae.toJSON=ae[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Ke(e),r=e.constructor;return Wr(e,t<=r.toExpNeg||t>=r.toExpPos)};function Dv(e,t){var r,n,a,i,o,s,l,u,c=e.constructor,f=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),Be?$e(t,f):t;if(l=e.d,u=t.d,o=e.e,a=t.e,l=l.slice(),i=o-a,i){for(i<0?(n=l,i=-i,s=u.length):(n=u,a=o,s=l.length),o=Math.ceil(f/Le),s=o>s?o+1:s+1,i>s&&(i=s,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(s=l.length,i=u.length,s-i<0&&(i=s,n=u,u=l,l=n),r=0;i;)r=(l[--i]=l[i]+u[i]+r)/Qe|0,l[i]%=Qe;for(r&&(l.unshift(r),++a),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=a,Be?$e(t,f):t}function Ut(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Br+e)}function zt(e){var t,r,n,a=e.length-1,i="",o=e[0];if(a>0){for(i+=o,t=1;t<a;t++)n=e[t]+"",r=Le-n.length,r&&(i+=br(r)),i+=n;o=e[t],n=o+"",r=Le-n.length,r&&(i+=br(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}var or=function(){function e(n,a){var i,o=0,s=n.length;for(n=n.slice();s--;)i=n[s]*a+o,n[s]=i%Qe|0,o=i/Qe|0;return o&&n.unshift(o),n}function t(n,a,i,o){var s,l;if(i!=o)l=i>o?1:-1;else for(s=l=0;s<i;s++)if(n[s]!=a[s]){l=n[s]>a[s]?1:-1;break}return l}function r(n,a,i){for(var o=0;i--;)n[i]-=o,o=n[i]<a[i]?1:0,n[i]=o*Qe+n[i]-a[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,i,o){var s,l,u,c,f,d,h,m,v,y,x,O,w,T,p,g,A,P,_=n.constructor,R=n.s==a.s?1:-1,M=n.d,C=a.d;if(!n.s)return new _(n);if(!a.s)throw Error(Pt+"Division by zero");for(l=n.e-a.e,A=C.length,p=M.length,h=new _(R),m=h.d=[],u=0;C[u]==(M[u]||0);)++u;if(C[u]>(M[u]||0)&&--l,i==null?O=i=_.precision:o?O=i+(Ke(n)-Ke(a))+1:O=i,O<0)return new _(0);if(O=O/Le+2|0,u=0,A==1)for(c=0,C=C[0],O++;(u<p||c)&&O--;u++)w=c*Qe+(M[u]||0),m[u]=w/C|0,c=w%C|0;else{for(c=Qe/(C[0]+1)|0,c>1&&(C=e(C,c),M=e(M,c),A=C.length,p=M.length),T=A,v=M.slice(0,A),y=v.length;y<A;)v[y++]=0;P=C.slice(),P.unshift(0),g=C[0],C[1]>=Qe/2&&++g;do c=0,s=t(C,v,A,y),s<0?(x=v[0],A!=y&&(x=x*Qe+(v[1]||0)),c=x/g|0,c>1?(c>=Qe&&(c=Qe-1),f=e(C,c),d=f.length,y=v.length,s=t(f,v,d,y),s==1&&(c--,r(f,A<d?P:C,d))):(c==0&&(s=c=1),f=C.slice()),d=f.length,d<y&&f.unshift(0),r(v,f,y),s==-1&&(y=v.length,s=t(C,v,A,y),s<1&&(c++,r(v,A<y?P:C,y))),y=v.length):s===0&&(c++,v=[0]),m[u++]=c,s&&v[0]?v[y++]=M[T]||0:(v=[M[T]],y=1);while((T++<p||v[0]!==void 0)&&O--)}return m[0]||m.shift(),h.e=l,$e(h,o?i+Ke(h)+1:i)}}();function Iv(e,t){var r,n,a,i,o,s,l=0,u=0,c=e.constructor,f=c.precision;if(Ke(e)>16)throw Error(Nu+Ke(e));if(!e.s)return new c(vt);for(Be=!1,s=f,o=new c(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(Fr(2,u))/Math.LN10*2+5|0,s+=n,r=a=i=new c(vt),c.precision=s;;){if(a=$e(a.times(e),s),r=r.times(++l),o=i.plus(or(a,r,s)),zt(o.d).slice(0,s)===zt(i.d).slice(0,s)){for(;u--;)i=$e(i.times(i),s);return c.precision=f,t==null?(Be=!0,$e(i,f)):i}i=o}}function Ke(e){for(var t=e.e*Le,r=e.d[0];r>=10;r/=10)t++;return t}function Du(e,t,r){if(t>e.LN10.sd())throw Be=!0,r&&(e.precision=r),Error(Pt+"LN10 precision limit exceeded");return $e(new e(e.LN10),t)}function br(e){for(var t="";e--;)t+="0";return t}function Ra(e,t){var r,n,a,i,o,s,l,u,c,f=1,d=10,h=e,m=h.d,v=h.constructor,y=v.precision;if(h.s<1)throw Error(Pt+(h.s?"NaN":"-Infinity"));if(h.eq(vt))return new v(0);if(t==null?(Be=!1,u=y):u=t,h.eq(10))return t==null&&(Be=!0),Du(v,u);if(u+=d,v.precision=u,r=zt(m),n=r.charAt(0),i=Ke(h),Math.abs(i)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=zt(h.d),n=r.charAt(0),f++;i=Ke(h),n>1?(h=new v("0."+r),i++):h=new v(n+"."+r.slice(1))}else return l=Du(v,u+2,y).times(i+""),h=Ra(new v(n+"."+r.slice(1)),u-d).plus(l),v.precision=y,t==null?(Be=!0,$e(h,y)):h;for(s=o=h=or(h.minus(vt),h.plus(vt),u),c=$e(h.times(h),u),a=3;;){if(o=$e(o.times(c),u),l=s.plus(or(o,new v(a),u)),zt(l.d).slice(0,u)===zt(s.d).slice(0,u))return s=s.times(2),i!==0&&(s=s.plus(Du(v,u+2,y).times(i+""))),s=or(s,new v(f),u),v.precision=y,t==null?(Be=!0,$e(s,y)):s;s=l,a+=2}}function Rv(e,t){var r,n,a;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(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=_n(r/Le),e.d=[],n=(r+1)%Le,r<0&&(n+=Le),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=Le;n<a;)e.d.push(+t.slice(n,n+=Le));t=t.slice(n),n=Le-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),Be&&(e.e>Eo||e.e<-Eo))throw Error(Nu+r)}else e.s=0,e.e=0,e.d=[0];return e}function $e(e,t,r){var n,a,i,o,s,l,u,c,f=e.d;for(o=1,i=f[0];i>=10;i/=10)o++;if(n=t-o,n<0)n+=Le,a=t,u=f[c=0];else{if(c=Math.ceil((n+1)/Le),i=f.length,c>=i)return e;for(u=i=f[c],o=1;i>=10;i/=10)o++;n%=Le,a=n-Le+o}if(r!==void 0&&(i=Fr(10,o-a-1),s=u/i%10|0,l=t<0||f[c+1]!==void 0||u%i,l=r<4?(s||l)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||l||r==6&&(n>0?a>0?u/Fr(10,o-a):0:f[c-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(i=Ke(e),f.length=1,t=t-i-1,f[0]=Fr(10,(Le-t%Le)%Le),e.e=_n(-t/Le)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=c,i=1,c--):(f.length=c+1,i=Fr(10,Le-n),f[c]=a>0?(u/Fr(10,o-a)%Fr(10,a)|0)*i:0),l)for(;;)if(c==0){(f[0]+=i)==Qe&&(f[0]=1,++e.e);break}else{if(f[c]+=i,f[c]!=Qe)break;f[c--]=0,i=1}for(n=f.length;f[--n]===0;)f.pop();if(Be&&(e.e>Eo||e.e<-Eo))throw Error(Nu+Ke(e));return e}function Lv(e,t){var r,n,a,i,o,s,l,u,c,f,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),Be?$e(t,h):t;if(l=e.d,f=t.d,n=t.e,u=e.e,l=l.slice(),o=u-n,o){for(c=o<0,c?(r=l,o=-o,s=f.length):(r=f,n=u,s=l.length),a=Math.max(Math.ceil(h/Le),s)+2,o>a&&(o=a,r.length=1),r.reverse(),a=o;a--;)r.push(0);r.reverse()}else{for(a=l.length,s=f.length,c=a<s,c&&(s=a),a=0;a<s;a++)if(l[a]!=f[a]){c=l[a]<f[a];break}o=0}for(c&&(r=l,l=f,f=r,t.s=-t.s),s=l.length,a=f.length-s;a>0;--a)l[s++]=0;for(a=f.length;a>o;){if(l[--a]<f[a]){for(i=a;i&&l[--i]===0;)l[i]=Qe-1;--l[i],l[a]+=Qe}l[a]-=f[a]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(t.d=l,t.e=n,Be?$e(t,h):t):new d(0)}function Wr(e,t,r){var n,a=Ke(e),i=zt(e.d),o=i.length;return t?(r&&(n=r-o)>0?i=i.charAt(0)+"."+i.slice(1)+br(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+br(-a-1)+i,r&&(n=r-o)>0&&(i+=br(n))):a>=o?(i+=br(a+1-o),r&&(n=r-a-1)>0&&(i=i+"."+br(n))):((n=a+1)<o&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-o)>0&&(a+1===o&&(i+="."),i+=br(n))),e.s<0?"-"+i:i}function Bv(e,t){if(e.length>t)return e.length=t,!0}function Fv(e){var t,r,n;function a(i){var o=this;if(!(o instanceof a))return new a(i);if(o.constructor=a,i instanceof a){o.s=i.s,o.e=i.e,o.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(Br+i);if(i>0)o.s=1;else if(i<0)i=-i,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(i===~~i&&i<1e7){o.e=0,o.d=[i];return}return Rv(o,i.toString())}else if(typeof i!="string")throw Error(Br+i);if(i.charCodeAt(0)===45?(i=i.slice(1),o.s=-1):o.s=1,jD.test(i))Rv(o,i);else throw Error(Br+i)}if(a.prototype=ae,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=Fv,a.config=a.set=ED,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 a.config(e),a}function ED(e){if(!e||typeof e!="object")throw Error(Pt+"Object expected");var t,r,n,a=["precision",1,Pn,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((n=e[r=a[t]])!==void 0)if(_n(n)===n&&n>=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(Br+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Br+r+": "+n);return this}var Iu=Fv(_D);vt=new Iu(1);const Ee=Iu;function $D(e){return ND(e)||kD(e)||MD(e)||CD()}function CD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
133
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MD(e,t){if(e){if(typeof e=="string")return Ru(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 Ru(e,t)}}function kD(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function ND(e){if(Array.isArray(e))return Ru(e)}function Ru(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 DD=function(t){return t},Wv={},Uv=function(t){return t===Wv},zv=function(t){return function r(){return arguments.length===0||arguments.length===1&&Uv(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},ID=function e(t,r){return t===1?r:zv(function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];var o=a.filter(function(s){return s!==Wv}).length;return o>=t?r.apply(void 0,a):e(t-o,zv(function(){for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];var c=a.map(function(f){return Uv(f)?l.shift():f});return r.apply(void 0,$D(c).concat(l))}))})},$o=function(t){return ID(t.length,t)},Lu=function(t,r){for(var n=[],a=t;a<r;++a)n[a-t]=a;return n},RD=$o(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),LD=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return DD;var a=r.reverse(),i=a[0],o=a.slice(1);return function(){return o.reduce(function(s,l){return l(s)},i.apply(void 0,arguments))}},Bu=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},Kv=function(t){var r=null,n=null;return function(){for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return r&&i.every(function(s,l){return s===r[l]})||(r=i,n=t.apply(void 0,i)),n}};function BD(e){var t;return e===0?t=1:t=Math.floor(new Ee(e).abs().log(10).toNumber())+1,t}function FD(e,t,r){for(var n=new Ee(e),a=0,i=[];n.lt(t)&&a<1e5;)i.push(n.toNumber()),n=n.add(r),a++;return i}var WD=$o(function(e,t,r){var n=+e,a=+t;return n+r*(a-n)}),UD=$o(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),zD=$o(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const Co={rangeStep:FD,getDigitCount:BD,interpolateNumber:WD,uninterpolateNumber:UD,uninterpolateTruncation:zD};function Fu(e){return GD(e)||qD(e)||qv(e)||KD()}function KD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
134
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qD(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function GD(e){if(Array.isArray(e))return Wu(e)}function La(e,t){return YD(e)||HD(e,t)||qv(e,t)||VD()}function VD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
135
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qv(e,t){if(e){if(typeof e=="string")return Wu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wu(e,t)}}function Wu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function HD(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,i=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){a=!0,i=l}finally{try{!n&&o.return!=null&&o.return()}finally{if(a)throw i}}return r}}function YD(e){if(Array.isArray(e))return e}function Gv(e){var t=La(e,2),r=t[0],n=t[1],a=r,i=n;return r>n&&(a=n,i=r),[a,i]}function Vv(e,t,r){if(e.lte(0))return new Ee(0);var n=Co.getDigitCount(e.toNumber()),a=new Ee(10).pow(n),i=e.div(a),o=n!==1?.05:.1,s=new Ee(Math.ceil(i.div(o).toNumber())).add(r).mul(o),l=s.mul(a);return t?l:new Ee(Math.ceil(l))}function XD(e,t,r){var n=1,a=new Ee(e);if(!a.isint()&&r){var i=Math.abs(e);i<1?(n=new Ee(10).pow(Co.getDigitCount(e)-1),a=new Ee(Math.floor(a.div(n).toNumber())).mul(n)):i>1&&(a=new Ee(Math.floor(e)))}else e===0?a=new Ee(Math.floor((t-1)/2)):r||(a=new Ee(Math.floor(e)));var o=Math.floor((t-1)/2),s=LD(RD(function(l){return a.add(new Ee(l-o).mul(n)).toNumber()}),Lu);return s(0,t)}function Hv(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new Ee(0),tickMin:new Ee(0),tickMax:new Ee(0)};var i=Vv(new Ee(t).sub(e).div(r-1),n,a),o;e<=0&&t>=0?o=new Ee(0):(o=new Ee(e).add(t).div(2),o=o.sub(new Ee(o).mod(i)));var s=Math.ceil(o.sub(e).div(i).toNumber()),l=Math.ceil(new Ee(t).sub(o).div(i).toNumber()),u=s+l+1;return u>r?Hv(e,t,r,n,a+1):(u<r&&(l=t>0?l+(r-u):l,s=t>0?s:s+(r-u)),{step:i,tickMin:o.sub(new Ee(s).mul(i)),tickMax:o.add(new Ee(l).mul(i))})}function JD(e){var t=La(e,2),r=t[0],n=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(a,2),s=Gv([r,n]),l=La(s,2),u=l[0],c=l[1];if(u===-1/0||c===1/0){var f=c===1/0?[u].concat(Fu(Lu(0,a-1).map(function(){return 1/0}))):[].concat(Fu(Lu(0,a-1).map(function(){return-1/0})),[c]);return r>n?Bu(f):f}if(u===c)return XD(u,a,i);var d=Hv(u,c,o,i),h=d.step,m=d.tickMin,v=d.tickMax,y=Co.rangeStep(m,v.add(new Ee(.1).mul(h)),h);return r>n?Bu(y):y}function ZD(e,t){var r=La(e,2),n=r[0],a=r[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Gv([n,a]),s=La(o,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[n,a];if(l===u)return[l];var c=Math.max(t,2),f=Vv(new Ee(u).sub(l).div(c-1),i,0),d=[].concat(Fu(Co.rangeStep(new Ee(l),new Ee(u).sub(new Ee(.99).mul(f)),f)),[u]);return n>a?Bu(d):d}var QD=Kv(JD),eI=Kv(ZD),tI=process.env.NODE_ENV==="production",Uu="Invariant failed";function ft(e,t){if(tI)throw new Error(Uu);var r=typeof t=="function"?t():t,n=r?"".concat(Uu,": ").concat(r):Uu;throw new Error(n)}var rI=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];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 Mo(){return Mo=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},Mo.apply(this,arguments)}function nI(e,t){return sI(e)||oI(e,t)||iI(e,t)||aI()}function aI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
136
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iI(e,t){if(e){if(typeof e=="string")return Yv(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 Yv(e,t)}}function Yv(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 oI(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function sI(e){if(Array.isArray(e))return e}function lI(e,t){if(e==null)return{};var r=uI(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function uI(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 cI(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,Zv(n.key),n)}}function dI(e,t,r){return t&&fI(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function hI(e,t,r){return t=ko(t),pI(e,Xv()?Reflect.construct(t,r||[],ko(e).constructor):t.apply(e,r))}function pI(e,t){if(t&&(jn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vI(e)}function vI(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Xv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Xv=function(){return!!e})()}function ko(e){return ko=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ko(e)}function yI(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zu(e,t)}function zu(e,t){return zu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},zu(e,t)}function Jv(e,t,r){return t=Zv(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zv(e){var t=mI(e,"string");return jn(t)=="symbol"?t:t+""}function mI(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 String(e)}var En=function(e){function t(){return cI(this,t),hI(this,t,arguments)}return yI(t,e),dI(t,[{key:"render",value:function(){var n=this.props,a=n.offset,i=n.layout,o=n.width,s=n.dataKey,l=n.data,u=n.dataPointFormatter,c=n.xAxis,f=n.yAxis,d=lI(n,rI),h=de(d,!1);this.props.direction==="x"&&c.type!=="number"&&(process.env.NODE_ENV!=="production"?ft(!1,'ErrorBar requires Axis type property to be "number".'):ft());var m=l.map(function(v){var y=u(v,s),x=y.x,O=y.y,w=y.value,T=y.errorVal;if(!T)return null;var p=[],g,A;if(Array.isArray(T)){var P=nI(T,2);g=P[0],A=P[1]}else g=A=T;if(i==="vertical"){var _=c.scale,R=O+a,M=R+o,C=R-o,W=_(w-g),U=_(w+A);p.push({x1:U,y1:M,x2:U,y2:C}),p.push({x1:W,y1:R,x2:U,y2:R}),p.push({x1:W,y1:M,x2:W,y2:C})}else if(i==="horizontal"){var F=f.scale,N=x+a,D=N-o,L=N+o,E=F(w-g),j=F(w+A);p.push({x1:D,y1:j,x2:L,y2:j}),p.push({x1:N,y1:E,x2:N,y2:j}),p.push({x1:D,y1:E,x2:L,y2:E})}return S.createElement(be,Mo({className:"recharts-errorBar",key:"bar-".concat(p.map(function(I){return"".concat(I.x1,"-").concat(I.x2,"-").concat(I.y1,"-").concat(I.y2)}))},h),p.map(function(I){return S.createElement("line",Mo({},I,{key:"line-".concat(I.x1,"-").concat(I.x2,"-").concat(I.y1,"-").concat(I.y2)}))}))});return S.createElement(be,{className:"recharts-errorBars"},m)}}])}(S.Component);Jv(En,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"}),Jv(En,"displayName","ErrorBar");function Ba(e){"@babel/helpers - typeof";return Ba=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},Ba(e)}function Qv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ur(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qv(Object(r),!0).forEach(function(n){gI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gI(e,t,r){return t=bI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bI(e){var t=xI(e,"string");return Ba(t)=="symbol"?t:t+""}function xI(e,t){if(Ba(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ba(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ey=function(t){var r=t.children,n=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,o=pt(r,vn);if(!o)return null;var s=vn.defaultProps,l=s!==void 0?Ur(Ur({},s),o.props):{},u;return o.props&&o.props.payload?u=o.props&&o.props.payload:i==="children"?u=(n||[]).reduce(function(c,f){var d=f.item,h=f.props,m=h.sectors||h.data||[];return c.concat(m.map(function(v){return{type:o.props.iconType||d.props.legendType,value:v.name,color:v.fill,payload:v}}))},[]):u=(n||[]).map(function(c){var f=c.item,d=f.type.defaultProps,h=d!==void 0?Ur(Ur({},d),f.props):{},m=h.dataKey,v=h.name,y=h.legendType,x=h.hide;return{inactive:x,dataKey:m,type:l.iconType||y||"square",color:qu(f),value:v||m,payload:h}}),Ur(Ur(Ur({},l),vn.getWithHeight(o,a)),{},{payload:u,item:o})};function Fa(e){"@babel/helpers - typeof";return Fa=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},Fa(e)}function ty(e){return AI(e)||SI(e)||OI(e)||wI()}function wI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
137
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OI(e,t){if(e){if(typeof e=="string")return Ku(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 Ku(e,t)}}function SI(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function AI(e){if(Array.isArray(e))return Ku(e)}function Ku(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 ry(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Fe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ry(Object(r),!0).forEach(function(n){$n(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ry(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $n(e,t,r){return t=TI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TI(e){var t=PI(e,"string");return Fa(t)=="symbol"?t:t+""}function PI(e,t){if(Fa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Fa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ye(e,t,r){return fe(e)||fe(t)?r:Ve(t)?xt(e,t,r):he(t)?t(e):r}function Wa(e,t,r,n){var a=SD(e,function(s){return Ye(s,t)});if(r==="number"){var i=a.filter(function(s){return X(s)||parseFloat(s)});return i.length?[jo(i),gr(i)]:[1/0,-1/0]}var o=n?a.filter(function(s){return!fe(s)}):a;return o.map(function(s){return Ve(s)||s instanceof Date?s:""})}var _I=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=-1,s=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var l=i.range,u=0;u<s;u++){var c=u>0?a[u-1].coordinate:a[s-1].coordinate,f=a[u].coordinate,d=u>=s-1?a[0].coordinate:a[u+1].coordinate,h=void 0;if($t(f-c)!==$t(d-f)){var m=[];if($t(d-f)===$t(l[1]-l[0])){h=d;var v=f+l[1]-l[0];m[0]=Math.min(v,(v+c)/2),m[1]=Math.max(v,(v+c)/2)}else{h=c;var y=d+l[1]-l[0];m[0]=Math.min(f,(y+f)/2),m[1]=Math.max(f,(y+f)/2)}var x=[Math.min(f,(h+f)/2),Math.max(f,(h+f)/2)];if(t>x[0]&&t<=x[1]||t>=m[0]&&t<=m[1]){o=a[u].index;break}}else{var O=Math.min(c,d),w=Math.max(c,d);if(t>(O+f)/2&&t<=(w+f)/2){o=a[u].index;break}}}else for(var T=0;T<s;T++)if(T===0&&t<=(n[T].coordinate+n[T+1].coordinate)/2||T>0&&T<s-1&&t>(n[T].coordinate+n[T-1].coordinate)/2&&t<=(n[T].coordinate+n[T+1].coordinate)/2||T===s-1&&t>(n[T].coordinate+n[T-1].coordinate)/2){o=n[T].index;break}return o},qu=function(t){var r,n=t,a=n.type.displayName,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Fe(Fe({},t.type.defaultProps),t.props):t.props,o=i.stroke,s=i.fill,l;switch(a){case"Line":l=o;break;case"Area":case"Radar":l=o&&o!=="none"?o:s;break;default:l=s;break}return l},jI=function(t){var r=t.barSize,n=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var o={},s=Object.keys(i),l=0,u=s.length;l<u;l++)for(var c=i[s[l]].stackGroups,f=Object.keys(c),d=0,h=f.length;d<h;d++){var m=c[f[d]],v=m.items,y=m.cateAxisId,x=v.filter(function(A){return Jt(A.type).indexOf("Bar")>=0});if(x&&x.length){var O=x[0].type.defaultProps,w=O!==void 0?Fe(Fe({},O),x[0].props):x[0].props,T=w.barSize,p=w[y];o[p]||(o[p]=[]);var g=fe(T)?r:T;o[p].push({item:x[0],stackList:x.slice(1),barSize:fe(g)?void 0:$r(g,n,0)})}}return o},EI=function(t){var r=t.barGap,n=t.barCategoryGap,a=t.bandSize,i=t.sizeList,o=i===void 0?[]:i,s=t.maxBarSize,l=o.length;if(l<1)return null;var u=$r(r,a,0,!0),c,f=[];if(o[0].barSize===+o[0].barSize){var d=!1,h=a/l,m=o.reduce(function(T,p){return T+p.barSize||0},0);m+=(l-1)*u,m>=a&&(m-=(l-1)*u,u=0),m>=a&&h>0&&(d=!0,h*=.9,m=l*h);var v=(a-m)/2>>0,y={offset:v-u,size:0};c=o.reduce(function(T,p){var g={item:p.item,position:{offset:y.offset+y.size+u,size:d?h:p.barSize}},A=[].concat(ty(T),[g]);return y=A[A.length-1].position,p.stackList&&p.stackList.length&&p.stackList.forEach(function(P){A.push({item:P,position:y})}),A},f)}else{var x=$r(n,a,0,!0);a-2*x-(l-1)*u<=0&&(u=0);var O=(a-2*x-(l-1)*u)/l;O>1&&(O>>=0);var w=s===+s?Math.min(O,s):O;c=o.reduce(function(T,p,g){var A=[].concat(ty(T),[{item:p.item,position:{offset:x+(O+u)*g+(O-w)/2,size:w}}]);return p.stackList&&p.stackList.length&&p.stackList.forEach(function(P){A.push({item:P,position:A[A.length-1].position})}),A},f)}return c},$I=function(t,r,n,a){var i=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),u=ey({children:i,legendWidth:l});if(u){var c=a||{},f=c.width,d=c.height,h=u.align,m=u.verticalAlign,v=u.layout;if((v==="vertical"||v==="horizontal"&&m==="middle")&&h!=="center"&&X(t[h]))return Fe(Fe({},t),{},$n({},h,t[h]+(f||0)));if((v==="horizontal"||v==="vertical"&&h==="center")&&m!=="middle"&&X(t[m]))return Fe(Fe({},t),{},$n({},m,t[m]+(d||0)))}return t},CI=function(t,r,n){return fe(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},ny=function(t,r,n,a,i){var o=r.props.children,s=ut(o,En).filter(function(u){return CI(a,i,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,c){var f=Ye(c,n);if(fe(f))return u;var d=Array.isArray(f)?[jo(f),gr(f)]:[f,f],h=l.reduce(function(m,v){var y=Ye(c,v,0),x=d[0]-Math.abs(Array.isArray(y)?y[0]:y),O=d[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(x,m[0]),Math.max(O,m[1])]},[1/0,-1/0]);return[Math.min(h[0],u[0]),Math.max(h[1],u[1])]},[1/0,-1/0])}return null},MI=function(t,r,n,a,i){var o=r.map(function(s){return ny(t,s,n,i,a)}).filter(function(s){return!fe(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},ay=function(t,r,n,a,i){var o=r.map(function(l){var u=l.props.dataKey;return n==="number"&&u&&ny(t,l,u,a)||Wa(t,u,n,i)});if(n==="number")return o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,u){for(var c=0,f=u.length;c<f;c++)s[u[c]]||(s[u[c]]=!0,l.push(u[c]));return l},[])},iy=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},oy=function(t,r,n,a){if(a)return t.map(function(l){return l.coordinate});var i,o,s=t.map(function(l){return l.coordinate===r&&(i=!0),l.coordinate===n&&(o=!0),l.coordinate});return i||s.push(r),o||s.push(n),s},sr=function(t,r,n){if(!t)return null;var a=t.scale,i=t.duplicateDomain,o=t.type,s=t.range,l=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,u=(r||n)&&o==="category"&&a.bandwidth?a.bandwidth()/l:0;if(u=t.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?$t(s[0]-s[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(f){var d=i?i.indexOf(f):f;return{coordinate:a(d)+u,value:f,offset:u}});return c.filter(function(f){return!sn(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,d){return{coordinate:a(f)+u,value:f,index:d,offset:u}}):a.ticks&&!n?a.ticks(t.tickCount).map(function(f){return{coordinate:a(f)+u,value:f,offset:u}}):a.domain().map(function(f,d){return{coordinate:a(f)+u,value:i?i[f]:f,index:d,offset:u}})},Gu=new WeakMap,No=function(t,r){if(typeof r!="function")return t;Gu.has(t)||Gu.set(t,new WeakMap);var n=Gu.get(t);if(n.has(r))return n.get(r);var a=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,a),a},kI=function(t,r,n){var a=t.scale,i=t.type,o=t.layout,s=t.axisType;if(a==="auto")return o==="radial"&&s==="radiusAxis"?{scale:Ta(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:bo(),realScaleType:"linear"}:i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Pa(),realScaleType:"point"}:i==="category"?{scale:Ta(),realScaleType:"band"}:{scale:bo(),realScaleType:"linear"};if(_r(a)){var l="scale".concat(Di(a));return{scale:(Mv[l]||Pa)(),realScaleType:Mv[l]?l:"point"}}return he(a)?{scale:a}:{scale:Pa(),realScaleType:"point"}},sy=1e-4,NI=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,a=t.range(),i=Math.min(a[0],a[1])-sy,o=Math.max(a[0],a[1])+sy,s=t(r[0]),l=t(r[n-1]);(s<i||s>o||l<i||l>o)&&t.domain([r[0],r[n-1]])}},DI=function(t,r){if(!t)return null;for(var n=0,a=t.length;n<a;n++)if(t[n].item===r)return t[n].position;return null},II=function(t,r){if(!r||r.length!==2||!X(r[0])||!X(r[1]))return t;var n=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]),i=[t[0],t[1]];return(!X(t[0])||t[0]<n)&&(i[0]=n),(!X(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<n&&(i[1]=n),i},RI=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,o=0,s=0;s<r;++s){var l=sn(t[s][n][1])?t[s][n][0]:t[s][n][1];l>=0?(t[s][n][0]=i,t[s][n][1]=i+l,i=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+l,o=t[s][n][1])}},LI=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,o=0;o<r;++o){var s=sn(t[o][n][1])?t[o][n][0]:t[o][n][1];s>=0?(t[o][n][0]=i,t[o][n][1]=i+s,i=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},BI={sign:RI,expand:eA,none:un,silhouette:tA,wiggle:rA,positive:LI},FI=function(t,r,n){var a=r.map(function(s){return s.props.dataKey}),i=BI[n],o=QS().keys(a).value(function(s,l){return+Ye(s,l,0)}).order(bl).offset(i);return o(t)},WI=function(t,r,n,a,i,o){if(!t)return null;var s=o?r.reverse():r,l={},u=s.reduce(function(f,d){var h,m=(h=d.type)!==null&&h!==void 0&&h.defaultProps?Fe(Fe({},d.type.defaultProps),d.props):d.props,v=m.stackId,y=m.hide;if(y)return f;var x=m[n],O=f[x]||{hasStack:!1,stackGroups:{}};if(Ve(v)){var w=O.stackGroups[v]||{numericAxisId:n,cateAxisId:a,items:[]};w.items.push(d),O.hasStack=!0,O.stackGroups[v]=w}else O.stackGroups[Er("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[d]};return Fe(Fe({},f),{},$n({},x,O))},l),c={};return Object.keys(u).reduce(function(f,d){var h=u[d];if(h.hasStack){var m={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(v,y){var x=h.stackGroups[y];return Fe(Fe({},v),{},$n({},y,{numericAxisId:n,cateAxisId:a,items:x.items,stackedData:FI(t,x.items,i)}))},m)}return Fe(Fe({},f),{},$n({},d,h))},c)},UI=function(t,r){var n=r.realScaleType,a=r.type,i=r.tickCount,o=r.originalDomain,s=r.allowDecimals,l=n||r.scale;if(l!=="auto"&&l!=="linear")return null;if(i&&a==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var c=QD(u,i,s);return t.domain([jo(c),gr(c)]),{niceTicks:c}}if(i&&a==="number"){var f=t.domain(),d=eI(f,i,s);return{niceTicks:d}}return null};function Cn(e){var t=e.axis,r=e.ticks,n=e.bandSize,a=e.entry,i=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!fe(a[t.dataKey])){var s=ki(r,"value",a[t.dataKey]);if(s)return s.coordinate+n/2}return r[i]?r[i].coordinate+n/2:null}var l=Ye(a,fe(o)?t.dataKey:o);return fe(l)?null:t.scale(l)}var ly=function(t){var r=t.axis,n=t.ticks,a=t.offset,i=t.bandSize,o=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+a:null;var l=Ye(o,r.dataKey,r.domain[s]);return fe(l)?null:r.scale(l)-i/2+a},zI=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var a=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return a<=0&&i>=0?0:i<0?i:a}return n[0]},KI=function(t,r){var n,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Fe(Fe({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(Ve(i)){var o=r[i];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},qI=function(t){return t.reduce(function(r,n){return[jo(n.concat([r[0]]).filter(X)),gr(n.concat([r[1]]).filter(X))]},[1/0,-1/0])},uy=function(t,r,n){return Object.keys(t).reduce(function(a,i){var o=t[i],s=o.stackedData,l=s.reduce(function(u,c){var f=qI(c.slice(r,n+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],a[0]),Math.max(l[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},cy=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,fy=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Vu=function(t,r,n){if(he(t))return t(r,n);if(!Array.isArray(t))return r;var a=[];if(X(t[0]))a[0]=n?t[0]:Math.min(t[0],r[0]);else if(cy.test(t[0])){var i=+cy.exec(t[0])[1];a[0]=r[0]-i}else he(t[0])?a[0]=t[0](r[0]):a[0]=r[0];if(X(t[1]))a[1]=n?t[1]:Math.max(t[1],r[1]);else if(fy.test(t[1])){var o=+fy.exec(t[1])[1];a[1]=r[1]+o}else he(t[1])?a[1]=t[1](r[1]):a[1]=r[1];return a},Do=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!n||a>0)return a}if(t&&r&&r.length>=2){for(var i=Fl(r,function(f){return f.coordinate}),o=1/0,s=1,l=i.length;s<l;s++){var u=i[s],c=i[s-1];o=Math.min((u.coordinate||0)-(c.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},dy=function(t,r,n){return!t||!t.length||Lr(t,xt(n,"type.defaultProps.domain"))?r:t},hy=function(t,r){var n=t.type.defaultProps?Fe(Fe({},t.type.defaultProps),t.props):t.props,a=n.dataKey,i=n.name,o=n.unit,s=n.formatter,l=n.tooltipType,u=n.chartType,c=n.hide;return Fe(Fe({},de(t,!1)),{},{dataKey:a,unit:o,formatter:s,name:i||a,color:qu(t),value:Ye(r,a),type:l,payload:r,chartType:u,hide:c})};function Ua(e){"@babel/helpers - typeof";return Ua=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},Ua(e)}function py(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function vy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?py(Object(r),!0).forEach(function(n){GI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):py(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function GI(e,t,r){return t=VI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VI(e){var t=HI(e,"string");return Ua(t)=="symbol"?t:t+""}function HI(e,t){if(Ua(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ua(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Io=Math.PI/180,YI=function(t){return t*180/Math.PI},tt=function(t,r,n,a){return{x:t+Math.cos(-Io*a)*n,y:r+Math.sin(-Io*a)*n}},XI=function(t,r){var n=t.x,a=t.y,i=r.x,o=r.y;return Math.sqrt(Math.pow(n-i,2)+Math.pow(a-o,2))},JI=function(t,r){var n=t.x,a=t.y,i=r.cx,o=r.cy,s=XI({x:n,y:a},{x:i,y:o});if(s<=0)return{radius:s};var l=(n-i)/s,u=Math.acos(l);return a>o&&(u=2*Math.PI-u),{radius:s,angle:YI(u),angleInRadian:u}},ZI=function(t){var r=t.startAngle,n=t.endAngle,a=Math.floor(r/360),i=Math.floor(n/360),o=Math.min(a,i);return{startAngle:r-o*360,endAngle:n-o*360}},QI=function(t,r){var n=r.startAngle,a=r.endAngle,i=Math.floor(n/360),o=Math.floor(a/360),s=Math.min(i,o);return t+s*360},yy=function(t,r){var n=t.x,a=t.y,i=JI({x:n,y:a},r),o=i.radius,s=i.angle,l=r.innerRadius,u=r.outerRadius;if(o<l||o>u)return!1;if(o===0)return!0;var c=ZI(r),f=c.startAngle,d=c.endAngle,h=s,m;if(f<=d){for(;h>d;)h-=360;for(;h<f;)h+=360;m=h>=f&&h<=d}else{for(;h>f;)h-=360;for(;h<d;)h+=360;m=h>=d&&h<=f}return m?vy(vy({},r),{},{radius:o,angle:QI(h,r)}):null};function za(e){"@babel/helpers - typeof";return za=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},za(e)}var eR=["offset"];function tR(e){return iR(e)||aR(e)||nR(e)||rR()}function rR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
138
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nR(e,t){if(e){if(typeof e=="string")return Hu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hu(e,t)}}function aR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function iR(e){if(Array.isArray(e))return Hu(e)}function Hu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function oR(e,t){if(e==null)return{};var r=sR(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function sR(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function my(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Xe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?my(Object(r),!0).forEach(function(n){lR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):my(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lR(e,t,r){return t=uR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uR(e){var t=cR(e,"string");return za(t)=="symbol"?t:t+""}function cR(e,t){if(za(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(za(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(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)}var fR=function(t){var r=t.value,n=t.formatter,a=fe(t.children)?r:t.children;return he(n)?n(a):a},dR=function(t,r){var n=$t(r-t),a=Math.min(Math.abs(r-t),360);return n*a},hR=function(t,r,n){var a=t.position,i=t.viewBox,o=t.offset,s=t.className,l=i,u=l.cx,c=l.cy,f=l.innerRadius,d=l.outerRadius,h=l.startAngle,m=l.endAngle,v=l.clockWise,y=(f+d)/2,x=dR(h,m),O=x>=0?1:-1,w,T;a==="insideStart"?(w=h+O*o,T=v):a==="insideEnd"?(w=m-O*o,T=!v):a==="end"&&(w=m+O*o,T=v),T=x<=0?T:!T;var p=tt(u,c,y,w),g=tt(u,c,y,w+(T?1:-1)*359),A="M".concat(p.x,",").concat(p.y,`
|
|
139
|
-
A`).concat(y,",").concat(y,",0,1,").concat(T?0:1,`,
|
|
140
|
-
`).concat(g.x,",").concat(g.y),P=fe(t.id)?Er("recharts-radial-line-"):t.id;return S.createElement("text",Ka({},n,{dominantBaseline:"central",className:ve("recharts-radial-bar-label",s)}),S.createElement("defs",null,S.createElement("path",{id:P,d:A})),S.createElement("textPath",{xlinkHref:"#".concat(P)},r))},pR=function(t){var r=t.viewBox,n=t.offset,a=t.position,i=r,o=i.cx,s=i.cy,l=i.innerRadius,u=i.outerRadius,c=i.startAngle,f=i.endAngle,d=(c+f)/2;if(a==="outside"){var h=tt(o,s,u+n,d),m=h.x,v=h.y;return{x:m,y:v,textAnchor:m>=o?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var y=(l+u)/2,x=tt(o,s,y,d),O=x.x,w=x.y;return{x:O,y:w,textAnchor:"middle",verticalAnchor:"middle"}},vR=function(t){var r=t.viewBox,n=t.parentViewBox,a=t.offset,i=t.position,o=r,s=o.x,l=o.y,u=o.width,c=o.height,f=c>=0?1:-1,d=f*a,h=f>0?"end":"start",m=f>0?"start":"end",v=u>=0?1:-1,y=v*a,x=v>0?"end":"start",O=v>0?"start":"end";if(i==="top"){var w={x:s+u/2,y:l-f*a,textAnchor:"middle",verticalAnchor:h};return Xe(Xe({},w),n?{height:Math.max(l-n.y,0),width:u}:{})}if(i==="bottom"){var T={x:s+u/2,y:l+c+d,textAnchor:"middle",verticalAnchor:m};return Xe(Xe({},T),n?{height:Math.max(n.y+n.height-(l+c),0),width:u}:{})}if(i==="left"){var p={x:s-y,y:l+c/2,textAnchor:x,verticalAnchor:"middle"};return Xe(Xe({},p),n?{width:Math.max(p.x-n.x,0),height:c}:{})}if(i==="right"){var g={x:s+u+y,y:l+c/2,textAnchor:O,verticalAnchor:"middle"};return Xe(Xe({},g),n?{width:Math.max(n.x+n.width-g.x,0),height:c}:{})}var A=n?{width:u,height:c}:{};return i==="insideLeft"?Xe({x:s+y,y:l+c/2,textAnchor:O,verticalAnchor:"middle"},A):i==="insideRight"?Xe({x:s+u-y,y:l+c/2,textAnchor:x,verticalAnchor:"middle"},A):i==="insideTop"?Xe({x:s+u/2,y:l+d,textAnchor:"middle",verticalAnchor:m},A):i==="insideBottom"?Xe({x:s+u/2,y:l+c-d,textAnchor:"middle",verticalAnchor:h},A):i==="insideTopLeft"?Xe({x:s+y,y:l+d,textAnchor:O,verticalAnchor:m},A):i==="insideTopRight"?Xe({x:s+u-y,y:l+d,textAnchor:x,verticalAnchor:m},A):i==="insideBottomLeft"?Xe({x:s+y,y:l+c-d,textAnchor:O,verticalAnchor:h},A):i==="insideBottomRight"?Xe({x:s+u-y,y:l+c-d,textAnchor:x,verticalAnchor:h},A):rn(i)&&(X(i.x)||jr(i.x))&&(X(i.y)||jr(i.y))?Xe({x:s+$r(i.x,u),y:l+$r(i.y,c),textAnchor:"end",verticalAnchor:"end"},A):Xe({x:s+u/2,y:l+c/2,textAnchor:"middle",verticalAnchor:"middle"},A)},yR=function(t){return"cx"in t&&X(t.cx)};function nt(e){var t=e.offset,r=t===void 0?5:t,n=oR(e,eR),a=Xe({offset:r},n),i=a.viewBox,o=a.position,s=a.value,l=a.children,u=a.content,c=a.className,f=c===void 0?"":c,d=a.textBreakAll;if(!i||fe(s)&&fe(l)&&!S.isValidElement(u)&&!he(u))return null;if(S.isValidElement(u))return S.cloneElement(u,a);var h;if(he(u)){if(h=S.createElement(u,a),S.isValidElement(h))return h}else h=fR(a);var m=yR(i),v=de(a,!0);if(m&&(o==="insideStart"||o==="insideEnd"||o==="end"))return hR(a,h,v);var y=m?pR(a):vR(a);return S.createElement(so,Ka({className:ve("recharts-label",f)},v,y,{breakAll:d}),h)}nt.displayName="Label";var gy=function(t){var r=t.cx,n=t.cy,a=t.angle,i=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,c=t.outerRadius,f=t.x,d=t.y,h=t.top,m=t.left,v=t.width,y=t.height,x=t.clockWise,O=t.labelViewBox;if(O)return O;if(X(v)&&X(y)){if(X(f)&&X(d))return{x:f,y:d,width:v,height:y};if(X(h)&&X(m))return{x:h,y:m,width:v,height:y}}return X(f)&&X(d)?{x:f,y:d,width:0,height:0}:X(r)&&X(n)?{cx:r,cy:n,startAngle:i||a||0,endAngle:o||a||0,innerRadius:u||0,outerRadius:c||l||s||0,clockWise:x}:t.viewBox?t.viewBox:{}},mR=function(t,r){return t?t===!0?S.createElement(nt,{key:"label-implicit",viewBox:r}):Ve(t)?S.createElement(nt,{key:"label-implicit",viewBox:r,value:t}):S.isValidElement(t)?t.type===nt?S.cloneElement(t,{key:"label-implicit",viewBox:r}):S.createElement(nt,{key:"label-implicit",content:t,viewBox:r}):he(t)?S.createElement(nt,{key:"label-implicit",content:t,viewBox:r}):rn(t)?S.createElement(nt,Ka({viewBox:r},t,{key:"label-implicit"})):null:null},gR=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 a=t.children,i=gy(t),o=ut(a,nt).map(function(l,u){return S.cloneElement(l,{viewBox:r||i,key:"label-".concat(u)})});if(!n)return o;var s=mR(t.label,r||i);return[s].concat(tR(o))};nt.parseViewBox=gy,nt.renderCallByParent=gR;function bR(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var xR=bR;const wR=ke(xR);function qa(e){"@babel/helpers - typeof";return qa=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},qa(e)}var OR=["valueAccessor"],SR=["data","dataKey","clockWise","id","textBreakAll"];function AR(e){return jR(e)||_R(e)||PR(e)||TR()}function TR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
141
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PR(e,t){if(e){if(typeof e=="string")return Yu(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 Yu(e,t)}}function _R(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jR(e){if(Array.isArray(e))return Yu(e)}function Yu(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 Ro(){return Ro=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},Ro.apply(this,arguments)}function by(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function xy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?by(Object(r),!0).forEach(function(n){ER(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):by(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ER(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=CR(e,"string");return qa(t)=="symbol"?t:t+""}function CR(e,t){if(qa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wy(e,t){if(e==null)return{};var r=MR(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function MR(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 kR=function(t){return Array.isArray(t.value)?wR(t.value):t.value};function Kt(e){var t=e.valueAccessor,r=t===void 0?kR:t,n=wy(e,OR),a=n.data,i=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,u=wy(n,SR);return!a||!a.length?null:S.createElement(be,{className:"recharts-label-list"},a.map(function(c,f){var d=fe(i)?r(c,f):Ye(c&&c.payload,i),h=fe(s)?{}:{id:"".concat(s,"-").concat(f)};return S.createElement(nt,Ro({},de(c,!0),u,h,{parentViewBox:c.parentViewBox,value:d,textBreakAll:l,viewBox:nt.parseViewBox(fe(o)?c:xy(xy({},c),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}Kt.displayName="LabelList";function NR(e,t){return e?e===!0?S.createElement(Kt,{key:"labelList-implicit",data:t}):S.isValidElement(e)||he(e)?S.createElement(Kt,{key:"labelList-implicit",data:t,content:e}):rn(e)?S.createElement(Kt,Ro({data:t},e,{key:"labelList-implicit"})):null:null}function DR(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,a=ut(n,Kt).map(function(o,s){return S.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return a;var i=NR(e.label,t);return[i].concat(AR(a))}Kt.renderCallByParent=DR;function Ga(e){"@babel/helpers - typeof";return Ga=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},Ga(e)}function Xu(){return Xu=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},Xu.apply(this,arguments)}function Oy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Sy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Oy(Object(r),!0).forEach(function(n){IR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function IR(e,t,r){return t=RR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RR(e){var t=LR(e,"string");return Ga(t)=="symbol"?t:t+""}function LR(e,t){if(Ga(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ga(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var BR=function(t,r){var n=$t(r-t),a=Math.min(Math.abs(r-t),359.999);return n*a},Lo=function(t){var r=t.cx,n=t.cy,a=t.radius,i=t.angle,o=t.sign,s=t.isExternal,l=t.cornerRadius,u=t.cornerIsExternal,c=l*(s?1:-1)+a,f=Math.asin(l/c)/Io,d=u?i:i+o*f,h=tt(r,n,c,d),m=tt(r,n,a,d),v=u?i-o*f:i,y=tt(r,n,c*Math.cos(f*Io),v);return{center:h,circleTangency:m,lineTangency:y,theta:f}},Ay=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.startAngle,s=t.endAngle,l=BR(o,s),u=o+l,c=tt(r,n,i,o),f=tt(r,n,i,u),d="M ".concat(c.x,",").concat(c.y,`
|
|
142
|
-
A `).concat(i,",").concat(i,`,0,
|
|
143
|
-
`).concat(+(Math.abs(l)>180),",").concat(+(o>u),`,
|
|
144
|
-
`).concat(f.x,",").concat(f.y,`
|
|
145
|
-
`);if(a>0){var h=tt(r,n,a,o),m=tt(r,n,a,u);d+="L ".concat(m.x,",").concat(m.y,`
|
|
146
|
-
A `).concat(a,",").concat(a,`,0,
|
|
147
|
-
`).concat(+(Math.abs(l)>180),",").concat(+(o<=u),`,
|
|
148
|
-
`).concat(h.x,",").concat(h.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},FR=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,c=t.endAngle,f=$t(c-u),d=Lo({cx:r,cy:n,radius:i,angle:u,sign:f,cornerRadius:o,cornerIsExternal:l}),h=d.circleTangency,m=d.lineTangency,v=d.theta,y=Lo({cx:r,cy:n,radius:i,angle:c,sign:-f,cornerRadius:o,cornerIsExternal:l}),x=y.circleTangency,O=y.lineTangency,w=y.theta,T=l?Math.abs(u-c):Math.abs(u-c)-v-w;if(T<0)return s?"M ".concat(m.x,",").concat(m.y,`
|
|
149
|
-
a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
|
|
150
|
-
a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
|
|
151
|
-
`):Ay({cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:u,endAngle:c});var p="M ".concat(m.x,",").concat(m.y,`
|
|
152
|
-
A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(h.x,",").concat(h.y,`
|
|
153
|
-
A`).concat(i,",").concat(i,",0,").concat(+(T>180),",").concat(+(f<0),",").concat(x.x,",").concat(x.y,`
|
|
154
|
-
A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(O.x,",").concat(O.y,`
|
|
155
|
-
`);if(a>0){var g=Lo({cx:r,cy:n,radius:a,angle:u,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),A=g.circleTangency,P=g.lineTangency,_=g.theta,R=Lo({cx:r,cy:n,radius:a,angle:c,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),M=R.circleTangency,C=R.lineTangency,W=R.theta,U=l?Math.abs(u-c):Math.abs(u-c)-_-W;if(U<0&&o===0)return"".concat(p,"L").concat(r,",").concat(n,"Z");p+="L".concat(C.x,",").concat(C.y,`
|
|
156
|
-
A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(M.x,",").concat(M.y,`
|
|
157
|
-
A`).concat(a,",").concat(a,",0,").concat(+(U>180),",").concat(+(f>0),",").concat(A.x,",").concat(A.y,`
|
|
158
|
-
A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(P.x,",").concat(P.y,"Z")}else p+="L".concat(r,",").concat(n,"Z");return p},WR={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Ty=function(t){var r=Sy(Sy({},WR),t),n=r.cx,a=r.cy,i=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,l=r.forceCornerRadius,u=r.cornerIsExternal,c=r.startAngle,f=r.endAngle,d=r.className;if(o<i||c===f)return null;var h=ve("recharts-sector",d),m=o-i,v=$r(s,m,0,!0),y;return v>0&&Math.abs(c-f)<360?y=FR({cx:n,cy:a,innerRadius:i,outerRadius:o,cornerRadius:Math.min(v,m/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:c,endAngle:f}):y=Ay({cx:n,cy:a,innerRadius:i,outerRadius:o,startAngle:c,endAngle:f}),S.createElement("path",Xu({},de(r,!0),{className:h,d:y,role:"img"}))};function Va(e){"@babel/helpers - typeof";return Va=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},Va(e)}function Ju(){return Ju=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},Ju.apply(this,arguments)}function Py(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _y(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Py(Object(r),!0).forEach(function(n){UR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Py(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function UR(e,t,r){return t=zR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zR(e){var t=KR(e,"string");return Va(t)=="symbol"?t:t+""}function KR(e,t){if(Va(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Va(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jy={curveBasisClosed:US,curveBasisOpen:zS,curveBasis:WS,curveBumpX:_S,curveBumpY:jS,curveLinearClosed:KS,curveLinear:Bi,curveMonotoneX:qS,curveMonotoneY:GS,curveNatural:VS,curveStep:HS,curveStepAfter:XS,curveStepBefore:YS},Bo=function(t){return t.x===+t.x&&t.y===+t.y},Ha=function(t){return t.x},Ya=function(t){return t.y},qR=function(t,r){if(he(t))return t;var n="curve".concat(Di(t));return(n==="curveMonotone"||n==="curveBump")&&r?jy["".concat(n).concat(r==="vertical"?"Y":"X")]:jy[n]||Bi},GR=function(t){var r=t.type,n=r===void 0?"linear":r,a=t.points,i=a===void 0?[]:a,o=t.baseLine,s=t.layout,l=t.connectNulls,u=l===void 0?!1:l,c=qR(n,s),f=u?i.filter(function(v){return Bo(v)}):i,d;if(Array.isArray(o)){var h=u?o.filter(function(v){return Bo(v)}):o,m=f.map(function(v,y){return _y(_y({},v),{},{base:h[y]})});return s==="vertical"?d=Fi().y(Ya).x1(Ha).x0(function(v){return v.base.x}):d=Fi().x(Ha).y1(Ya).y0(function(v){return v.base.y}),d.defined(Bo).curve(c),d(m)}return s==="vertical"&&X(o)?d=Fi().y(Ya).x1(Ha).x0(o):X(o)?d=Fi().x(Ha).y1(Ya).y0(o):d=hd().x(Ha).y(Ya),d.defined(Bo).curve(c),d(f)},zr=function(t){var r=t.className,n=t.points,a=t.path,i=t.pathRef;if((!n||!n.length)&&!a)return null;var o=n&&n.length?GR(t):a;return bt.createElement("path",Ju({},de(t,!1),Ni(t),{className:ve("recharts-curve",r),d:o,ref:i}))},Zu={exports:{}},Fo={exports:{}},Oe={};/** @license React v16.13.1
|
|
159
|
-
* react-is.production.min.js
|
|
160
|
-
*
|
|
161
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
162
|
-
*
|
|
163
|
-
* This source code is licensed under the MIT license found in the
|
|
164
|
-
* LICENSE file in the root directory of this source tree.
|
|
165
|
-
*/var Ey;function VR(){if(Ey)return Oe;Ey=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function w(p){if(typeof p=="object"&&p!==null){var g=p.$$typeof;switch(g){case t:switch(p=p.type,p){case l:case u:case n:case i:case a:case f:return p;default:switch(p=p&&p.$$typeof,p){case s:case c:case m:case h:case o:return p;default:return g}}case r:return g}}}function T(p){return w(p)===u}return Oe.AsyncMode=l,Oe.ConcurrentMode=u,Oe.ContextConsumer=s,Oe.ContextProvider=o,Oe.Element=t,Oe.ForwardRef=c,Oe.Fragment=n,Oe.Lazy=m,Oe.Memo=h,Oe.Portal=r,Oe.Profiler=i,Oe.StrictMode=a,Oe.Suspense=f,Oe.isAsyncMode=function(p){return T(p)||w(p)===l},Oe.isConcurrentMode=T,Oe.isContextConsumer=function(p){return w(p)===s},Oe.isContextProvider=function(p){return w(p)===o},Oe.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===t},Oe.isForwardRef=function(p){return w(p)===c},Oe.isFragment=function(p){return w(p)===n},Oe.isLazy=function(p){return w(p)===m},Oe.isMemo=function(p){return w(p)===h},Oe.isPortal=function(p){return w(p)===r},Oe.isProfiler=function(p){return w(p)===i},Oe.isStrictMode=function(p){return w(p)===a},Oe.isSuspense=function(p){return w(p)===f},Oe.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===n||p===u||p===i||p===a||p===f||p===d||typeof p=="object"&&p!==null&&(p.$$typeof===m||p.$$typeof===h||p.$$typeof===o||p.$$typeof===s||p.$$typeof===c||p.$$typeof===y||p.$$typeof===x||p.$$typeof===O||p.$$typeof===v)},Oe.typeOf=w,Oe}var Se={};/** @license React v16.13.1
|
|
166
|
-
* react-is.development.js
|
|
167
|
-
*
|
|
168
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
169
|
-
*
|
|
170
|
-
* This source code is licensed under the MIT license found in the
|
|
171
|
-
* LICENSE file in the root directory of this source tree.
|
|
172
|
-
*/var $y;function HR(){return $y||($y=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function w(k){return typeof k=="string"||typeof k=="function"||k===n||k===u||k===i||k===a||k===f||k===d||typeof k=="object"&&k!==null&&(k.$$typeof===m||k.$$typeof===h||k.$$typeof===o||k.$$typeof===s||k.$$typeof===c||k.$$typeof===y||k.$$typeof===x||k.$$typeof===O||k.$$typeof===v)}function T(k){if(typeof k=="object"&&k!==null){var ie=k.$$typeof;switch(ie){case t:var G=k.type;switch(G){case l:case u:case n:case i:case a:case f:return G;default:var re=G&&G.$$typeof;switch(re){case s:case c:case m:case h:case o:return re;default:return ie}}case r:return ie}}}var p=l,g=u,A=s,P=o,_=t,R=c,M=n,C=m,W=h,U=r,F=i,N=a,D=f,L=!1;function E(k){return L||(L=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),j(k)||T(k)===l}function j(k){return T(k)===u}function I(k){return T(k)===s}function B(k){return T(k)===o}function z(k){return typeof k=="object"&&k!==null&&k.$$typeof===t}function V(k){return T(k)===c}function Z(k){return T(k)===n}function Q(k){return T(k)===m}function ee(k){return T(k)===h}function te(k){return T(k)===r}function q(k){return T(k)===i}function Y(k){return T(k)===a}function J(k){return T(k)===f}Se.AsyncMode=p,Se.ConcurrentMode=g,Se.ContextConsumer=A,Se.ContextProvider=P,Se.Element=_,Se.ForwardRef=R,Se.Fragment=M,Se.Lazy=C,Se.Memo=W,Se.Portal=U,Se.Profiler=F,Se.StrictMode=N,Se.Suspense=D,Se.isAsyncMode=E,Se.isConcurrentMode=j,Se.isContextConsumer=I,Se.isContextProvider=B,Se.isElement=z,Se.isForwardRef=V,Se.isFragment=Z,Se.isLazy=Q,Se.isMemo=ee,Se.isPortal=te,Se.isProfiler=q,Se.isStrictMode=Y,Se.isSuspense=J,Se.isValidElementType=w,Se.typeOf=T}()),Se}var Cy;function My(){return Cy||(Cy=1,process.env.NODE_ENV==="production"?Fo.exports=VR():Fo.exports=HR()),Fo.exports}/*
|
|
173
|
-
object-assign
|
|
174
|
-
(c) Sindre Sorhus
|
|
175
|
-
@license MIT
|
|
176
|
-
*/var Qu,ky;function YR(){if(ky)return Qu;ky=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function a(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(o).map(function(c){return o[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Qu=a()?Object.assign:function(i,o){for(var s,l=n(i),u,c=1;c<arguments.length;c++){s=Object(arguments[c]);for(var f in s)t.call(s,f)&&(l[f]=s[f]);if(e){u=e(s);for(var d=0;d<u.length;d++)r.call(s,u[d])&&(l[u[d]]=s[u[d]])}}return l},Qu}var ec,Ny;function tc(){if(Ny)return ec;Ny=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ec=e,ec}var rc,Dy;function Iy(){return Dy||(Dy=1,rc=Function.call.bind(Object.prototype.hasOwnProperty)),rc}var nc,Ry;function XR(){if(Ry)return nc;Ry=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=tc(),r={},n=Iy();e=function(i){var o="Warning: "+i;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function a(i,o,s,l,u){if(process.env.NODE_ENV!=="production"){for(var c in i)if(n(i,c)){var f;try{if(typeof i[c]!="function"){var d=Error((l||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=i[c](o,c,l,s,null,t)}catch(m){f=m}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in r)){r[f.message]=!0;var h=u?u():"";e("Failed "+s+" type: "+f.message+(h??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},nc=a,nc}var ac,Ly;function JR(){if(Ly)return ac;Ly=1;var e=My(),t=YR(),r=tc(),n=Iy(),a=XR(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return ac=function(s,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(j){var I=j&&(u&&j[u]||j[c]);if(typeof I=="function")return I}var d="<<anonymous>>",h={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:O(),arrayOf:w,element:T(),elementType:p(),instanceOf:g,node:R(),objectOf:P,oneOf:A,oneOfType:_,shape:C,exact:W};function m(j,I){return j===I?j!==0||1/j===1/I:j!==j&&I!==I}function v(j,I){this.message=j,this.data=I&&typeof I=="object"?I:{},this.stack=""}v.prototype=Error.prototype;function y(j){if(process.env.NODE_ENV!=="production")var I={},B=0;function z(Z,Q,ee,te,q,Y,J){if(te=te||d,Y=Y||ee,J!==r){if(l){var k=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 k.name="Invariant Violation",k}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ie=te+":"+ee;!I[ie]&&B<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+te+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),I[ie]=!0,B++)}}return Q[ee]==null?Z?Q[ee]===null?new v("The "+q+" `"+Y+"` is marked as required "+("in `"+te+"`, but its value is `null`.")):new v("The "+q+" `"+Y+"` is marked as required in "+("`"+te+"`, but its value is `undefined`.")):null:j(Q,ee,te,q,Y)}var V=z.bind(null,!1);return V.isRequired=z.bind(null,!0),V}function x(j){function I(B,z,V,Z,Q,ee){var te=B[z],q=N(te);if(q!==j){var Y=D(te);return new v("Invalid "+Z+" `"+Q+"` of type "+("`"+Y+"` supplied to `"+V+"`, expected ")+("`"+j+"`."),{expectedType:j})}return null}return y(I)}function O(){return y(o)}function w(j){function I(B,z,V,Z,Q){if(typeof j!="function")return new v("Property `"+Q+"` of component `"+V+"` has invalid PropType notation inside arrayOf.");var ee=B[z];if(!Array.isArray(ee)){var te=N(ee);return new v("Invalid "+Z+" `"+Q+"` of type "+("`"+te+"` supplied to `"+V+"`, expected an array."))}for(var q=0;q<ee.length;q++){var Y=j(ee,q,V,Z,Q+"["+q+"]",r);if(Y instanceof Error)return Y}return null}return y(I)}function T(){function j(I,B,z,V,Z){var Q=I[B];if(!s(Q)){var ee=N(Q);return new v("Invalid "+V+" `"+Z+"` of type "+("`"+ee+"` supplied to `"+z+"`, expected a single ReactElement."))}return null}return y(j)}function p(){function j(I,B,z,V,Z){var Q=I[B];if(!e.isValidElementType(Q)){var ee=N(Q);return new v("Invalid "+V+" `"+Z+"` of type "+("`"+ee+"` supplied to `"+z+"`, expected a single ReactElement type."))}return null}return y(j)}function g(j){function I(B,z,V,Z,Q){if(!(B[z]instanceof j)){var ee=j.name||d,te=E(B[z]);return new v("Invalid "+Z+" `"+Q+"` of type "+("`"+te+"` supplied to `"+V+"`, expected ")+("instance of `"+ee+"`."))}return null}return y(I)}function A(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),o;function I(B,z,V,Z,Q){for(var ee=B[z],te=0;te<j.length;te++)if(m(ee,j[te]))return null;var q=JSON.stringify(j,function(J,k){var ie=D(k);return ie==="symbol"?String(k):k});return new v("Invalid "+Z+" `"+Q+"` of value `"+String(ee)+"` "+("supplied to `"+V+"`, expected one of "+q+"."))}return y(I)}function P(j){function I(B,z,V,Z,Q){if(typeof j!="function")return new v("Property `"+Q+"` of component `"+V+"` has invalid PropType notation inside objectOf.");var ee=B[z],te=N(ee);if(te!=="object")return new v("Invalid "+Z+" `"+Q+"` of type "+("`"+te+"` supplied to `"+V+"`, expected an object."));for(var q in ee)if(n(ee,q)){var Y=j(ee,q,V,Z,Q+"."+q,r);if(Y instanceof Error)return Y}return null}return y(I)}function _(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var I=0;I<j.length;I++){var B=j[I];if(typeof B!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+L(B)+" at index "+I+"."),o}function z(V,Z,Q,ee,te){for(var q=[],Y=0;Y<j.length;Y++){var J=j[Y],k=J(V,Z,Q,ee,te,r);if(k==null)return null;k.data&&n(k.data,"expectedType")&&q.push(k.data.expectedType)}var ie=q.length>0?", expected one of type ["+q.join(", ")+"]":"";return new v("Invalid "+ee+" `"+te+"` supplied to "+("`"+Q+"`"+ie+"."))}return y(z)}function R(){function j(I,B,z,V,Z){return U(I[B])?null:new v("Invalid "+V+" `"+Z+"` supplied to "+("`"+z+"`, expected a ReactNode."))}return y(j)}function M(j,I,B,z,V){return new v((j||"React class")+": "+I+" type `"+B+"."+z+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+V+"`.")}function C(j){function I(B,z,V,Z,Q){var ee=B[z],te=N(ee);if(te!=="object")return new v("Invalid "+Z+" `"+Q+"` of type `"+te+"` "+("supplied to `"+V+"`, expected `object`."));for(var q in j){var Y=j[q];if(typeof Y!="function")return M(V,Z,Q,q,D(Y));var J=Y(ee,q,V,Z,Q+"."+q,r);if(J)return J}return null}return y(I)}function W(j){function I(B,z,V,Z,Q){var ee=B[z],te=N(ee);if(te!=="object")return new v("Invalid "+Z+" `"+Q+"` of type `"+te+"` "+("supplied to `"+V+"`, expected `object`."));var q=t({},B[z],j);for(var Y in q){var J=j[Y];if(n(j,Y)&&typeof J!="function")return M(V,Z,Q,Y,D(J));if(!J)return new v("Invalid "+Z+" `"+Q+"` key `"+Y+"` supplied to `"+V+"`.\nBad object: "+JSON.stringify(B[z],null," ")+`
|
|
177
|
-
Valid keys: `+JSON.stringify(Object.keys(j),null," "));var k=J(ee,Y,V,Z,Q+"."+Y,r);if(k)return k}return null}return y(I)}function U(j){switch(typeof j){case"number":case"string":case"undefined":return!0;case"boolean":return!j;case"object":if(Array.isArray(j))return j.every(U);if(j===null||s(j))return!0;var I=f(j);if(I){var B=I.call(j),z;if(I!==j.entries){for(;!(z=B.next()).done;)if(!U(z.value))return!1}else for(;!(z=B.next()).done;){var V=z.value;if(V&&!U(V[1]))return!1}}else return!1;return!0;default:return!1}}function F(j,I){return j==="symbol"?!0:I?I["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&I instanceof Symbol:!1}function N(j){var I=typeof j;return Array.isArray(j)?"array":j instanceof RegExp?"object":F(I,j)?"symbol":I}function D(j){if(typeof j>"u"||j===null)return""+j;var I=N(j);if(I==="object"){if(j instanceof Date)return"date";if(j instanceof RegExp)return"regexp"}return I}function L(j){var I=D(j);switch(I){case"array":case"object":return"an "+I;case"boolean":case"date":case"regexp":return"a "+I;default:return I}}function E(j){return!j.constructor||!j.constructor.name?d:j.constructor.name}return h.checkPropTypes=a,h.resetWarningCache=a.resetWarningCache,h.PropTypes=h,h},ac}var ic,By;function ZR(){if(By)return ic;By=1;var e=tc();function t(){}function r(){}return r.resetWarningCache=t,ic=function(){function n(o,s,l,u,c,f){if(f!==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 a(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i},ic}if(process.env.NODE_ENV!=="production"){var QR=My(),eL=!0;Zu.exports=JR()(QR.isElement,eL)}else Zu.exports=ZR()();var tL=Zu.exports;const Ae=ke(tL);var rL=Object.getOwnPropertyNames,nL=Object.getOwnPropertySymbols,aL=Object.prototype.hasOwnProperty;function Fy(e,t){return function(n,a,i){return e(n,a,i)&&t(n,a,i)}}function Wo(e){return function(r,n,a){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,a);var i=a.cache,o=i.get(r),s=i.get(n);if(o&&s)return o===n&&s===r;i.set(r,n),i.set(n,r);var l=e(r,n,a);return i.delete(r),i.delete(n),l}}function Wy(e){return rL(e).concat(nL(e))}var iL=Object.hasOwn||function(e,t){return aL.call(e,t)};function Kr(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var oL="__v",sL="__o",lL="_owner",Uy=Object.getOwnPropertyDescriptor,zy=Object.keys;function uL(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 cL(e,t){return Kr(e.getTime(),t.getTime())}function fL(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function dL(e,t){return e===t}function Ky(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var a=new Array(n),i=e.entries(),o,s,l=0;(o=i.next())&&!o.done;){for(var u=t.entries(),c=!1,f=0;(s=u.next())&&!s.done;){if(a[f]){f++;continue}var d=o.value,h=s.value;if(r.equals(d[0],h[0],l,f,e,t,r)&&r.equals(d[1],h[1],d[0],h[0],e,t,r)){c=a[f]=!0;break}f++}if(!c)return!1;l++}return!0}var hL=Kr;function pL(e,t,r){var n=zy(e),a=n.length;if(zy(t).length!==a)return!1;for(;a-- >0;)if(!Gy(e,t,r,n[a]))return!1;return!0}function Xa(e,t,r){var n=Wy(e),a=n.length;if(Wy(t).length!==a)return!1;for(var i,o,s;a-- >0;)if(i=n[a],!Gy(e,t,r,i)||(o=Uy(e,i),s=Uy(t,i),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function vL(e,t){return Kr(e.valueOf(),t.valueOf())}function yL(e,t){return e.source===t.source&&e.flags===t.flags}function qy(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var a=new Array(n),i=e.values(),o,s;(o=i.next())&&!o.done;){for(var l=t.values(),u=!1,c=0;(s=l.next())&&!s.done;){if(!a[c]&&r.equals(o.value,s.value,o.value,s.value,e,t,r)){u=a[c]=!0;break}c++}if(!u)return!1}return!0}function mL(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 gL(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 Gy(e,t,r,n){return(n===lL||n===sL||n===oL)&&(e.$$typeof||t.$$typeof)?!0:iL(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var bL="[object Arguments]",xL="[object Boolean]",wL="[object Date]",OL="[object Error]",SL="[object Map]",AL="[object Number]",TL="[object Object]",PL="[object RegExp]",_L="[object Set]",jL="[object String]",EL="[object URL]",$L=Array.isArray,Vy=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,Hy=Object.assign,CL=Object.prototype.toString.call.bind(Object.prototype.toString);function ML(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,a=e.areFunctionsEqual,i=e.areMapsEqual,o=e.areNumbersEqual,s=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,c=e.areSetsEqual,f=e.areTypedArraysEqual,d=e.areUrlsEqual;return function(m,v,y){if(m===v)return!0;if(m==null||v==null)return!1;var x=typeof m;if(x!==typeof v)return!1;if(x!=="object")return x==="number"?o(m,v,y):x==="function"?a(m,v,y):!1;var O=m.constructor;if(O!==v.constructor)return!1;if(O===Object)return s(m,v,y);if($L(m))return t(m,v,y);if(Vy!=null&&Vy(m))return f(m,v,y);if(O===Date)return r(m,v,y);if(O===RegExp)return u(m,v,y);if(O===Map)return i(m,v,y);if(O===Set)return c(m,v,y);var w=CL(m);return w===wL?r(m,v,y):w===PL?u(m,v,y):w===SL?i(m,v,y):w===_L?c(m,v,y):w===TL?typeof m.then!="function"&&typeof v.then!="function"&&s(m,v,y):w===EL?d(m,v,y):w===OL?n(m,v,y):w===bL?s(m,v,y):w===xL||w===AL||w===jL?l(m,v,y):!1}}function kL(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,a={areArraysEqual:n?Xa:uL,areDatesEqual:cL,areErrorsEqual:fL,areFunctionsEqual:dL,areMapsEqual:n?Fy(Ky,Xa):Ky,areNumbersEqual:hL,areObjectsEqual:n?Xa:pL,arePrimitiveWrappersEqual:vL,areRegExpsEqual:yL,areSetsEqual:n?Fy(qy,Xa):qy,areTypedArraysEqual:n?Xa:mL,areUrlsEqual:gL};if(r&&(a=Hy({},a,r(a))),t){var i=Wo(a.areArraysEqual),o=Wo(a.areMapsEqual),s=Wo(a.areObjectsEqual),l=Wo(a.areSetsEqual);a=Hy({},a,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:l})}return a}function NL(e){return function(t,r,n,a,i,o,s){return e(t,r,s)}}function DL(e){var t=e.circular,r=e.comparator,n=e.createState,a=e.equals,i=e.strict;if(n)return function(l,u){var c=n(),f=c.cache,d=f===void 0?t?new WeakMap:void 0:f,h=c.meta;return r(l,u,{cache:d,equals:a,meta:h,strict:i})};if(t)return function(l,u){return r(l,u,{cache:new WeakMap,equals:a,meta:void 0,strict:i})};var o={cache:void 0,equals:a,meta:void 0,strict:i};return function(l,u){return r(l,u,o)}}var IL=xr();xr({strict:!0}),xr({circular:!0}),xr({circular:!0,strict:!0}),xr({createInternalComparator:function(){return Kr}}),xr({strict:!0,createInternalComparator:function(){return Kr}}),xr({circular:!0,createInternalComparator:function(){return Kr}}),xr({circular:!0,createInternalComparator:function(){return Kr},strict:!0});function xr(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,a=e.createState,i=e.strict,o=i===void 0?!1:i,s=kL(e),l=ML(s),u=n?n(l):NL(l);return DL({circular:r,comparator:l,createState:a,equals:u,strict:o})}function RL(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function Yy(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function a(i){r<0&&(r=i),i-r>t?(e(i),r=-1):RL(a)};requestAnimationFrame(n)}function oc(e){"@babel/helpers - typeof";return oc=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},oc(e)}function LL(e){return UL(e)||WL(e)||FL(e)||BL()}function BL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
178
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FL(e,t){if(e){if(typeof e=="string")return Xy(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Xy(e,t)}}function Xy(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function WL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function UL(e){if(Array.isArray(e))return e}function zL(){var e={},t=function(){return null},r=!1,n=function a(i){if(!r){if(Array.isArray(i)){if(!i.length)return;var o=i,s=LL(o),l=s[0],u=s.slice(1);if(typeof l=="number"){Yy(a.bind(null,u),l);return}a(l),Yy(a.bind(null,u));return}oc(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){r=!0},start:function(i){r=!1,n(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function Ja(e){"@babel/helpers - typeof";return Ja=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},Ja(e)}function Jy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Zy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jy(Object(r),!0).forEach(function(n){Qy(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Qy(e,t,r){return t=KL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KL(e){var t=qL(e,"string");return Ja(t)==="symbol"?t:String(t)}function qL(e,t){if(Ja(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ja(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var GL=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,a){return n.filter(function(i){return a.includes(i)})})},VL=function(t){return t},HL=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},Za=function(t,r){return Object.keys(r).reduce(function(n,a){return Zy(Zy({},n),{},Qy({},a,t(a,r[a])))},{})},em=function(t,r,n){return t.map(function(a){return"".concat(HL(a)," ").concat(r,"ms ").concat(n)}).join(",")},YL=process.env.NODE_ENV!=="production",Uo=function(t,r,n,a,i,o,s,l){if(YL&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,a,i,o,s,l],c=0;console.warn(r.replace(/%s/g,function(){return u[c++]}))}};function XL(e,t){return QL(e)||ZL(e,t)||tm(e,t)||JL()}function JL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
179
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZL(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function QL(e){if(Array.isArray(e))return e}function e3(e){return n3(e)||r3(e)||tm(e)||t3()}function t3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
180
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tm(e,t){if(e){if(typeof e=="string")return sc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sc(e,t)}}function r3(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function n3(e){if(Array.isArray(e))return sc(e)}function sc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var zo=1e-4,rm=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},nm=function(t,r){return t.map(function(n,a){return n*Math.pow(r,a)}).reduce(function(n,a){return n+a})},am=function(t,r){return function(n){var a=rm(t,r);return nm(a,n)}},a3=function(t,r){return function(n){var a=rm(t,r),i=[].concat(e3(a.map(function(o,s){return o*s}).slice(1)),[0]);return nm(i,n)}},im=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0],i=r[1],o=r[2],s=r[3];if(r.length===1)switch(r[0]){case"linear":a=0,i=0,o=1,s=1;break;case"ease":a=.25,i=.1,o=.25,s=1;break;case"ease-in":a=.42,i=0,o=1,s=1;break;case"ease-out":a=.42,i=0,o=.58,s=1;break;case"ease-in-out":a=0,i=0,o=.58,s=1;break;default:{var l=r[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var u=l[1].split(")")[0].split(",").map(function(y){return parseFloat(y)}),c=XL(u,4);a=c[0],i=c[1],o=c[2],s=c[3]}else Uo(!1,"[configBezier]: arguments should be one of oneOf 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', instead received %s",r)}}Uo([a,o,i,s].every(function(y){return typeof y=="number"&&y>=0&&y<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",r);var f=am(a,o),d=am(i,s),h=a3(a,o),m=function(x){return x>1?1:x<0?0:x},v=function(x){for(var O=x>1?1:x,w=O,T=0;T<8;++T){var p=f(w)-O,g=h(w);if(Math.abs(p-O)<zo||g<zo)return d(w);w=m(w-p/g)}return d(w)};return v.isStepper=!1,v},i3=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,a=t.damping,i=a===void 0?8:a,o=t.dt,s=o===void 0?17:o,l=function(c,f,d){var h=-(c-f)*n,m=d*i,v=d+(h-m)*s/1e3,y=d*s/1e3+c;return Math.abs(y-f)<zo&&Math.abs(v)<zo?[f,0]:[y,v]};return l.isStepper=!0,l.dt=s,l},o3=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return im(a);case"spring":return i3();default:if(a.split("(")[0]==="cubic-bezier")return im(a);Uo(!1,"[configEasing]: first argument should be one of 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', 'linear' and 'spring', instead received %s",r)}return typeof a=="function"?a:(Uo(!1,"[configEasing]: first argument type should be function or string, instead received %s",r),null)};function Qa(e){"@babel/helpers - typeof";return Qa=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},Qa(e)}function om(e){return u3(e)||l3(e)||lm(e)||s3()}function s3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
181
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l3(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function u3(e){if(Array.isArray(e))return uc(e)}function sm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function rt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sm(Object(r),!0).forEach(function(n){lc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lc(e,t,r){return t=c3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c3(e){var t=f3(e,"string");return Qa(t)==="symbol"?t:String(t)}function f3(e,t){if(Qa(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qa(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function d3(e,t){return v3(e)||p3(e,t)||lm(e,t)||h3()}function h3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
182
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lm(e,t){if(e){if(typeof e=="string")return uc(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 uc(e,t)}}function uc(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 p3(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function v3(e){if(Array.isArray(e))return e}var Ko=function(t,r,n){return t+(r-t)*n},cc=function(t){var r=t.from,n=t.to;return r!==n},y3=function e(t,r,n){var a=Za(function(i,o){if(cc(o)){var s=t(o.from,o.to,o.velocity),l=d3(s,2),u=l[0],c=l[1];return rt(rt({},o),{},{from:u,velocity:c})}return o},r);return n<1?Za(function(i,o){return cc(o)?rt(rt({},o),{},{velocity:Ko(o.velocity,a[i].velocity,n),from:Ko(o.from,a[i].from,n)}):o},r):e(t,a,n-1)};const m3=function(e,t,r,n,a){var i=GL(e,t),o=i.reduce(function(y,x){return rt(rt({},y),{},lc({},x,[e[x],t[x]]))},{}),s=i.reduce(function(y,x){return rt(rt({},y),{},lc({},x,{from:e[x],velocity:0,to:t[x]}))},{}),l=-1,u,c,f=function(){return null},d=function(){return Za(function(x,O){return O.from},s)},h=function(){return!Object.values(s).filter(cc).length},m=function(x){u||(u=x);var O=x-u,w=O/r.dt;s=y3(r,s,w),a(rt(rt(rt({},e),t),d())),u=x,h()||(l=requestAnimationFrame(f))},v=function(x){c||(c=x);var O=(x-c)/n,w=Za(function(p,g){return Ko.apply(void 0,om(g).concat([r(O)]))},o);if(a(rt(rt(rt({},e),t),w)),O<1)l=requestAnimationFrame(f);else{var T=Za(function(p,g){return Ko.apply(void 0,om(g).concat([r(1)]))},o);a(rt(rt(rt({},e),t),T))}};return f=r.isStepper?m:v,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(l)}}};function Mn(e){"@babel/helpers - typeof";return Mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mn(e)}var g3=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function b3(e,t){if(e==null)return{};var r=x3(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function x3(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function fc(e){return A3(e)||S3(e)||O3(e)||w3()}function w3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
183
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function O3(e,t){if(e){if(typeof e=="string")return dc(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 dc(e,t)}}function S3(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function A3(e){if(Array.isArray(e))return dc(e)}function dc(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 um(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function kt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?um(Object(r),!0).forEach(function(n){ei(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):um(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ei(e,t,r){return t=cm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P3(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,cm(n.key),n)}}function _3(e,t,r){return t&&P3(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function cm(e){var t=j3(e,"string");return Mn(t)==="symbol"?t:String(t)}function j3(e,t){if(Mn(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Mn(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function E3(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hc(e,t)}function hc(e,t){return hc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},hc(e,t)}function $3(e){var t=C3();return function(){var n=qo(e),a;if(t){var i=qo(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return pc(this,a)}}function pc(e,t){if(t&&(Mn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vc(e)}function vc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function C3(){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 qo(e){return qo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qo(e)}var Nt=function(e){E3(r,e);var t=$3(r);function r(n,a){var i;T3(this,r),i=t.call(this,n,a);var o=i.props,s=o.isActive,l=o.attributeName,u=o.from,c=o.to,f=o.steps,d=o.children,h=o.duration;if(i.handleStyleChange=i.handleStyleChange.bind(vc(i)),i.changeStyle=i.changeStyle.bind(vc(i)),!s||h<=0)return i.state={style:{}},typeof d=="function"&&(i.state={style:c}),pc(i);if(f&&f.length)i.state={style:f[0].style};else if(u){if(typeof d=="function")return i.state={style:u},pc(i);i.state={style:l?ei({},l,u):u}}else i.state={style:{}};return i}return _3(r,[{key:"componentDidMount",value:function(){var a=this.props,i=a.isActive,o=a.canBegin;this.mounted=!0,!(!i||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var i=this.props,o=i.isActive,s=i.canBegin,l=i.attributeName,u=i.shouldReAnimate,c=i.to,f=i.from,d=this.state.style;if(s){if(!o){var h={style:l?ei({},l,c):c};this.state&&d&&(l&&d[l]!==c||!l&&d!==c)&&this.setState(h);return}if(!(IL(a.to,c)&&a.canBegin&&a.isActive)){var m=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=m||u?f:a.to;if(this.state&&d){var y={style:l?ei({},l,v):v};(l&&d[l]!==v||!l&&d!==v)&&this.setState(y)}this.runAnimation(kt(kt({},this.props),{},{from:v,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,o=a.from,s=a.to,l=a.duration,u=a.easing,c=a.begin,f=a.onAnimationEnd,d=a.onAnimationStart,h=m3(o,s,o3(u),l,this.changeStyle),m=function(){i.stopJSAnimation=h()};this.manager.start([d,c,m,l,f])}},{key:"runStepAnimation",value:function(a){var i=this,o=a.steps,s=a.begin,l=a.onAnimationStart,u=o[0],c=u.style,f=u.duration,d=f===void 0?0:f,h=function(v,y,x){if(x===0)return v;var O=y.duration,w=y.easing,T=w===void 0?"ease":w,p=y.style,g=y.properties,A=y.onAnimationEnd,P=x>0?o[x-1]:y,_=g||Object.keys(p);if(typeof T=="function"||T==="spring")return[].concat(fc(v),[i.runJSAnimation.bind(i,{from:P.style,to:p,duration:O,easing:T}),O]);var R=em(_,O,T),M=kt(kt(kt({},P.style),p),{},{transition:R});return[].concat(fc(v),[M,O,A]).filter(VL)};return this.manager.start([l].concat(fc(o.reduce(h,[c,Math.max(d,s)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=zL());var i=a.begin,o=a.duration,s=a.attributeName,l=a.to,u=a.easing,c=a.onAnimationStart,f=a.onAnimationEnd,d=a.steps,h=a.children,m=this.manager;if(this.unSubscribe=m.subscribe(this.handleStyleChange),typeof u=="function"||typeof h=="function"||u==="spring"){this.runJSAnimation(a);return}if(d.length>1){this.runStepAnimation(a);return}var v=s?ei({},s,l):l,y=em(Object.keys(v),o,u);m.start([c,i,kt(kt({},v),{},{transition:y}),o,f])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var o=a.duration;a.attributeName,a.easing;var s=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var l=b3(a,g3),u=S.Children.count(i),c=this.state.style;if(typeof i=="function")return i(c);if(!s||u===0||o<=0)return i;var f=function(h){var m=h.props,v=m.style,y=v===void 0?{}:v,x=m.className,O=S.cloneElement(h,kt(kt({},l),{},{style:kt(kt({},y),c),className:x}));return O};return u===1?f(S.Children.only(i)):S.createElement("div",null,S.Children.map(i,function(d){return f(d)}))}}]),r}(S.PureComponent);Nt.displayName="Animate",Nt.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},Nt.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 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 Go(){return Go=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},Go.apply(this,arguments)}function M3(e,t){return I3(e)||D3(e,t)||N3(e,t)||k3()}function k3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
184
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N3(e,t){if(e){if(typeof e=="string")return fm(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 fm(e,t)}}function fm(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 D3(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function I3(e){if(Array.isArray(e))return e}function dm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function hm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dm(Object(r),!0).forEach(function(n){R3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function R3(e,t,r){return t=L3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function L3(e){var t=B3(e,"string");return ti(t)=="symbol"?t:t+""}function B3(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 pm=function(t,r,n,a,i){var o=Math.min(Math.abs(n)/2,Math.abs(a)/2),s=a>=0?1:-1,l=n>=0?1:-1,u=a>=0&&n>=0||a<0&&n<0?1:0,c;if(o>0&&i instanceof Array){for(var f=[0,0,0,0],d=0,h=4;d<h;d++)f[d]=i[d]>o?o:i[d];c="M".concat(t,",").concat(r+s*f[0]),f[0]>0&&(c+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+l*f[0],",").concat(r)),c+="L ".concat(t+n-l*f[1],",").concat(r),f[1]>0&&(c+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`,
|
|
185
|
-
`).concat(t+n,",").concat(r+s*f[1])),c+="L ".concat(t+n,",").concat(r+a-s*f[2]),f[2]>0&&(c+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(u,`,
|
|
186
|
-
`).concat(t+n-l*f[2],",").concat(r+a)),c+="L ".concat(t+l*f[3],",").concat(r+a),f[3]>0&&(c+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(u,`,
|
|
187
|
-
`).concat(t,",").concat(r+a-s*f[3])),c+="Z"}else if(o>0&&i===+i&&i>0){var m=Math.min(o,i);c="M ".concat(t,",").concat(r+s*m,`
|
|
188
|
-
A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+l*m,",").concat(r,`
|
|
189
|
-
L `).concat(t+n-l*m,",").concat(r,`
|
|
190
|
-
A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*m,`
|
|
191
|
-
L `).concat(t+n,",").concat(r+a-s*m,`
|
|
192
|
-
A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+n-l*m,",").concat(r+a,`
|
|
193
|
-
L `).concat(t+l*m,",").concat(r+a,`
|
|
194
|
-
A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t,",").concat(r+a-s*m," Z")}else c="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(a," h ").concat(-n," Z");return c},F3=function(t,r){if(!t||!r)return!1;var n=t.x,a=t.y,i=r.x,o=r.y,s=r.width,l=r.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(i,i+s),c=Math.max(i,i+s),f=Math.min(o,o+l),d=Math.max(o,o+l);return n>=u&&n<=c&&a>=f&&a<=d}return!1},W3={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},yc=function(t){var r=hm(hm({},W3),t),n=S.useRef(),a=S.useState(-1),i=M3(a,2),o=i[0],s=i[1];S.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var T=n.current.getTotalLength();T&&s(T)}catch{}},[]);var l=r.x,u=r.y,c=r.width,f=r.height,d=r.radius,h=r.className,m=r.animationEasing,v=r.animationDuration,y=r.animationBegin,x=r.isAnimationActive,O=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||f!==+f||c===0||f===0)return null;var w=ve("recharts-rectangle",h);return O?S.createElement(Nt,{canBegin:o>0,from:{width:c,height:f,x:l,y:u},to:{width:c,height:f,x:l,y:u},duration:v,animationEasing:m,isActive:O},function(T){var p=T.width,g=T.height,A=T.x,P=T.y;return S.createElement(Nt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:v,isActive:x,easing:m},S.createElement("path",Go({},de(r,!0),{className:w,d:pm(A,P,p,g,d),ref:n})))}):S.createElement("path",Go({},de(r,!0),{className:w,d:pm(l,u,c,f,d)}))};function mc(){return mc=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},mc.apply(this,arguments)}var Vo=function(t){var r=t.cx,n=t.cy,a=t.r,i=t.className,o=ve("recharts-dot",i);return r===+r&&n===+n&&a===+a?bt.createElement("circle",mc({},de(t,!1),Ni(t),{className:o,cx:r,cy:n,r:a})):null};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)}var U3=["x","y","top","left","width","height","className"];function gc(){return gc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gc.apply(this,arguments)}function vm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function z3(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vm(Object(r),!0).forEach(function(n){K3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function K3(e,t,r){return t=q3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function q3(e){var t=G3(e,"string");return ri(t)=="symbol"?t:t+""}function G3(e,t){if(ri(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ri(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function V3(e,t){if(e==null)return{};var r=H3(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function H3(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 Y3=function(t,r,n,a,i,o){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(o,",").concat(r,"h").concat(n)},X3=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,o=t.top,s=o===void 0?0:o,l=t.left,u=l===void 0?0:l,c=t.width,f=c===void 0?0:c,d=t.height,h=d===void 0?0:d,m=t.className,v=V3(t,U3),y=z3({x:n,y:i,top:s,left:u,width:f,height:h},v);return!X(n)||!X(i)||!X(f)||!X(h)||!X(s)||!X(u)?null:S.createElement("path",gc({},de(y,!0),{className:ve("recharts-cross",m),d:Y3(n,i,f,h,s,u)}))},J3=Jd,Z3=J3(Object.getPrototypeOf,Object),Q3=Z3,e5=Yt,t5=Q3,r5=Xt,n5="[object Object]",a5=Function.prototype,i5=Object.prototype,ym=a5.toString,o5=i5.hasOwnProperty,s5=ym.call(Object);function l5(e){if(!r5(e)||e5(e)!=n5)return!1;var t=t5(e);if(t===null)return!0;var r=o5.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&ym.call(r)==s5}var u5=l5;const c5=ke(u5);var f5=Yt,d5=Xt,h5="[object Boolean]";function p5(e){return e===!0||e===!1||d5(e)&&f5(e)==h5}var v5=p5;const y5=ke(v5);function ni(e){"@babel/helpers - typeof";return ni=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ni(e)}function Ho(){return Ho=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},Ho.apply(this,arguments)}function m5(e,t){return w5(e)||x5(e,t)||b5(e,t)||g5()}function g5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
195
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b5(e,t){if(e){if(typeof e=="string")return mm(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 mm(e,t)}}function mm(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 x5(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function w5(e){if(Array.isArray(e))return e}function gm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function bm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gm(Object(r),!0).forEach(function(n){O5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function O5(e,t,r){return t=S5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S5(e){var t=A5(e,"string");return ni(t)=="symbol"?t:t+""}function A5(e,t){if(ni(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ni(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xm=function(t,r,n,a,i){var o=n-a,s;return s="M ".concat(t,",").concat(r),s+="L ".concat(t+n,",").concat(r),s+="L ".concat(t+n-o/2,",").concat(r+i),s+="L ".concat(t+n-o/2-a,",").concat(r+i),s+="L ".concat(t,",").concat(r," Z"),s},T5={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},P5=function(t){var r=bm(bm({},T5),t),n=S.useRef(),a=S.useState(-1),i=m5(a,2),o=i[0],s=i[1];S.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var w=n.current.getTotalLength();w&&s(w)}catch{}},[]);var l=r.x,u=r.y,c=r.upperWidth,f=r.lowerWidth,d=r.height,h=r.className,m=r.animationEasing,v=r.animationDuration,y=r.animationBegin,x=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||f!==+f||d!==+d||c===0&&f===0||d===0)return null;var O=ve("recharts-trapezoid",h);return x?S.createElement(Nt,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:d,x:l,y:u},to:{upperWidth:c,lowerWidth:f,height:d,x:l,y:u},duration:v,animationEasing:m,isActive:x},function(w){var T=w.upperWidth,p=w.lowerWidth,g=w.height,A=w.x,P=w.y;return S.createElement(Nt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:v,easing:m},S.createElement("path",Ho({},de(r,!0),{className:O,d:xm(A,P,T,p,g),ref:n})))}):S.createElement("g",null,S.createElement("path",Ho({},de(r,!0),{className:O,d:xm(l,u,c,f,d)})))},_5=["option","shapeType","propTransformer","activeClassName","isActive"];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 j5(e,t){if(e==null)return{};var r=E5(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function E5(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 wm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Yo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wm(Object(r),!0).forEach(function(n){$5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $5(e,t,r){return t=C5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function C5(e){var t=M5(e,"string");return ai(t)=="symbol"?t:t+""}function M5(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)}function k5(e,t){return Yo(Yo({},t),e)}function N5(e,t){return e==="symbols"}function Om(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return S.createElement(yc,r);case"trapezoid":return S.createElement(P5,r);case"sector":return S.createElement(Ty,r);case"symbols":if(N5(t))return S.createElement(qi,r);break;default:return null}}function D5(e){return S.isValidElement(e)?e.props:e}function bc(e){var t=e.option,r=e.shapeType,n=e.propTransformer,a=n===void 0?k5:n,i=e.activeClassName,o=i===void 0?"recharts-active-shape":i,s=e.isActive,l=j5(e,_5),u;if(S.isValidElement(t))u=S.cloneElement(t,Yo(Yo({},l),D5(t)));else if(he(t))u=t(l);else if(c5(t)&&!y5(t)){var c=a(t,l);u=S.createElement(Om,{shapeType:r,elementProps:c})}else{var f=l;u=S.createElement(Om,{shapeType:r,elementProps:f})}return s?S.createElement(be,{className:o},u):u}function Xo(e,t){return t!=null&&"trapezoids"in e.props}function Jo(e,t){return t!=null&&"sectors"in e.props}function ii(e,t){return t!=null&&"points"in e.props}function I5(e,t){var r,n,a=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,i=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return a&&i}function R5(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function L5(e,t){var r=e.x===t.x,n=e.y===t.y,a=e.z===t.z;return r&&n&&a}function B5(e,t){var r;return Xo(e,t)?r=I5:Jo(e,t)?r=R5:ii(e,t)&&(r=L5),r}function F5(e,t){var r;return Xo(e,t)?r="trapezoids":Jo(e,t)?r="sectors":ii(e,t)&&(r="points"),r}function W5(e,t){if(Xo(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(Jo(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return ii(e,t)?t.payload:{}}function U5(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,a=F5(r,t),i=W5(r,t),o=n.filter(function(l,u){var c=Lr(i,l),f=r.props[a].filter(function(m){var v=B5(r,t);return v(m,t)}),d=r.props[a].indexOf(f[f.length-1]),h=u===d;return c&&h}),s=n.indexOf(o[o.length-1]);return s}var z5=Math.ceil,K5=Math.max;function q5(e,t,r,n){for(var a=-1,i=K5(z5((t-e)/(r||1)),0),o=Array(i);i--;)o[n?i:++a]=e,e+=r;return o}var G5=q5,V5=Yh,Sm=1/0,H5=17976931348623157e292;function Y5(e){if(!e)return e===0?e:0;if(e=V5(e),e===Sm||e===-Sm){var t=e<0?-1:1;return t*H5}return e===e?e:0}var Am=Y5,X5=G5,J5=eo,xc=Am;function Z5(e){return function(t,r,n){return n&&typeof n!="number"&&J5(t,r,n)&&(r=n=void 0),t=xc(t),r===void 0?(r=t,t=0):r=xc(r),n=n===void 0?t<r?1:-1:xc(n),X5(t,r,n,e)}}var Q5=Z5,eB=Q5,tB=eB(),rB=tB;const Zo=ke(rB);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 Tm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Pm(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){_m(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 _m(e,t,r){return t=nB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nB(e){var t=aB(e,"string");return oi(t)=="symbol"?t:t+""}function aB(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 iB=["Webkit","Moz","O","ms"],oB=function(t,r){var n=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=iB.reduce(function(i,o){return Pm(Pm({},i),{},_m({},o+n,r))},{});return a[t]=r,a};function kn(e){"@babel/helpers - typeof";return kn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kn(e)}function Qo(){return Qo=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},Qo.apply(this,arguments)}function jm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function wc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jm(Object(r),!0).forEach(function(n){yt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Em(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,Cm(n.key),n)}}function lB(e,t,r){return t&&Em(e.prototype,t),r&&Em(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function uB(e,t,r){return t=es(t),cB(e,$m()?Reflect.construct(t,r||[],es(e).constructor):t.apply(e,r))}function cB(e,t){if(t&&(kn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fB(e)}function fB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($m=function(){return!!e})()}function es(e){return es=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},es(e)}function dB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oc(e,t)}function Oc(e,t){return Oc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Oc(e,t)}function yt(e,t,r){return t=Cm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cm(e){var t=hB(e,"string");return kn(t)=="symbol"?t:t+""}function hB(e,t){if(kn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(kn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var pB=function(t){var r=t.data,n=t.startIndex,a=t.endIndex,i=t.x,o=t.width,s=t.travellerWidth;if(!r||!r.length)return{};var l=r.length,u=Pa().domain(Zo(0,l)).range([i,i+o-s]),c=u.domain().map(function(f){return u(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(n),endX:u(a),scale:u,scaleValues:c}},Mm=function(t){return t.changedTouches&&!!t.changedTouches.length},Nn=function(e){function t(r){var n;return sB(this,t),n=uB(this,t,[r]),yt(n,"handleDrag",function(a){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(a):n.state.isSlideMoving&&n.handleSlideDrag(a)}),yt(n,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&n.handleDrag(a.changedTouches[0])}),yt(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=n.props,i=a.endIndex,o=a.onDragEnd,s=a.startIndex;o==null||o({endIndex:i,startIndex:s})}),n.detachDragEndListener()}),yt(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),yt(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),yt(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),yt(n,"handleSlideDragStart",function(a){var i=Mm(a)?a.changedTouches[0]:a;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return dB(t,e),lB(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var a=n.startX,i=n.endX,o=this.state.scaleValues,s=this.props,l=s.gap,u=s.data,c=u.length-1,f=Math.min(a,i),d=Math.max(a,i),h=t.getIndexInRange(o,f),m=t.getIndexInRange(o,d);return{startIndex:h-h%l,endIndex:m===c?c:m-m%l}}},{key:"getTextOfTick",value:function(n){var a=this.props,i=a.data,o=a.tickFormatter,s=a.dataKey,l=Ye(i[n],s,n);return he(o)?o(l,n):l}},{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 a=this.state,i=a.slideMoveStartX,o=a.startX,s=a.endX,l=this.props,u=l.x,c=l.width,f=l.travellerWidth,d=l.startIndex,h=l.endIndex,m=l.onChange,v=n.pageX-i;v>0?v=Math.min(v,u+c-f-s,u+c-f-o):v<0&&(v=Math.max(v,u-o,u-s));var y=this.getIndex({startX:o+v,endX:s+v});(y.startIndex!==d||y.endIndex!==h)&&m&&m(y),this.setState({startX:o+v,endX:s+v,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,a){var i=Mm(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var a=this.state,i=a.brushMoveStartX,o=a.movingTravellerId,s=a.endX,l=a.startX,u=this.state[o],c=this.props,f=c.x,d=c.width,h=c.travellerWidth,m=c.onChange,v=c.gap,y=c.data,x={startX:this.state.startX,endX:this.state.endX},O=n.pageX-i;O>0?O=Math.min(O,f+d-h-u):O<0&&(O=Math.max(O,f-u)),x[o]=u+O;var w=this.getIndex(x),T=w.startIndex,p=w.endIndex,g=function(){var P=y.length-1;return o==="startX"&&(s>l?T%v===0:p%v===0)||s<l&&p===P||o==="endX"&&(s>l?p%v===0:T%v===0)||s>l&&p===P};this.setState(yt(yt({},o,u+O),"brushMoveStartX",n.pageX),function(){m&&g()&&m(w)})}},{key:"handleTravellerMoveKeyboard",value:function(n,a){var i=this,o=this.state,s=o.scaleValues,l=o.startX,u=o.endX,c=this.state[a],f=s.indexOf(c);if(f!==-1){var d=f+n;if(!(d===-1||d>=s.length)){var h=s[d];a==="startX"&&h>=u||a==="endX"&&h<=l||this.setState(yt({},a,h),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,l=n.fill,u=n.stroke;return S.createElement("rect",{stroke:u,fill:l,x:a,y:i,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,l=n.data,u=n.children,c=n.padding,f=S.Children.only(u);return f?S.cloneElement(f,{x:a,y:i,width:o,height:s,margin:c,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,a){var i,o,s=this,l=this.props,u=l.y,c=l.travellerWidth,f=l.height,d=l.traveller,h=l.ariaLabel,m=l.data,v=l.startIndex,y=l.endIndex,x=Math.max(n,this.props.x),O=wc(wc({},de(this.props,!1)),{},{x,y:u,width:c,height:f}),w=h||"Min value: ".concat((i=m[v])===null||i===void 0?void 0:i.name,", Max value: ").concat((o=m[y])===null||o===void 0?void 0:o.name);return S.createElement(be,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(p){["ArrowLeft","ArrowRight"].includes(p.key)&&(p.preventDefault(),p.stopPropagation(),s.handleTravellerMoveKeyboard(p.key==="ArrowRight"?1:-1,a))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,O))}},{key:"renderSlide",value:function(n,a){var i=this.props,o=i.y,s=i.height,l=i.stroke,u=i.travellerWidth,c=Math.min(n,a)+u,f=Math.max(Math.abs(a-n)-u,0);return S.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:c,y:o,width:f,height:s})}},{key:"renderText",value:function(){var n=this.props,a=n.startIndex,i=n.endIndex,o=n.y,s=n.height,l=n.travellerWidth,u=n.stroke,c=this.state,f=c.startX,d=c.endX,h=5,m={pointerEvents:"none",fill:u};return S.createElement(be,{className:"recharts-brush-texts"},S.createElement(so,Qo({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,d)-h,y:o+s/2},m),this.getTextOfTick(a)),S.createElement(so,Qo({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,d)+l+h,y:o+s/2},m),this.getTextOfTick(i)))}},{key:"render",value:function(){var n=this.props,a=n.data,i=n.className,o=n.children,s=n.x,l=n.y,u=n.width,c=n.height,f=n.alwaysShowText,d=this.state,h=d.startX,m=d.endX,v=d.isTextActive,y=d.isSlideMoving,x=d.isTravellerMoving,O=d.isTravellerFocused;if(!a||!a.length||!X(s)||!X(l)||!X(u)||!X(c)||u<=0||c<=0)return null;var w=ve("recharts-brush",i),T=S.Children.count(o)===1,p=oB("userSelect","none");return S.createElement(be,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:p},this.renderBackground(),T&&this.renderPanorama(),this.renderSlide(h,m),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(m,"endX"),(v||y||x||O||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var a=n.x,i=n.y,o=n.width,s=n.height,l=n.stroke,u=Math.floor(i+s/2)-1;return S.createElement(S.Fragment,null,S.createElement("rect",{x:a,y:i,width:o,height:s,fill:l,stroke:"none"}),S.createElement("line",{x1:a+1,y1:u,x2:a+o-1,y2:u,fill:"none",stroke:"#fff"}),S.createElement("line",{x1:a+1,y1:u+2,x2:a+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,a){var i;return S.isValidElement(n)?i=S.cloneElement(n,a):he(n)?i=n(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(n,a){var i=n.data,o=n.width,s=n.x,l=n.travellerWidth,u=n.updateId,c=n.startIndex,f=n.endIndex;if(i!==a.prevData||u!==a.prevUpdateId)return wc({prevData:i,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o},i&&i.length?pB({data:i,width:o,x:s,travellerWidth:l,startIndex:c,endIndex:f}):{scale:null,scaleValues:null});if(a.scale&&(o!==a.prevWidth||s!==a.prevX||l!==a.prevTravellerWidth)){a.scale.range([s,s+o-l]);var d=a.scale.domain().map(function(h){return a.scale(h)});return{prevData:i,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o,startX:a.scale(n.startIndex),endX:a.scale(n.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(n,a){for(var i=n.length,o=0,s=i-1;s-o>1;){var l=Math.floor((o+s)/2);n[l]>a?s=l:o=l}return a>=n[s]?s:o}}])}(S.PureComponent);yt(Nn,"displayName","Brush"),yt(Nn,"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 vB=Ll;function yB(e,t){var r;return vB(e,function(n,a,i){return r=t(n,a,i),!r}),!!r}var mB=yB,gB=Id,bB=hr,xB=mB,wB=lt,OB=eo;function SB(e,t,r){var n=wB(e)?gB:xB;return r&&OB(e,t,r)&&(t=void 0),n(e,bB(t))}var AB=SB;const TB=ke(AB);var qt=function(t,r){var n=t.alwaysShow,a=t.ifOverflow;return n&&(a="extendDomain"),a===r},km=Mh;function PB(e,t,r){t=="__proto__"&&km?km(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var _B=PB,jB=_B,EB=jh,$B=hr;function CB(e,t){var r={};return t=$B(t),EB(e,function(n,a,i){jB(r,a,t(n,a,i))}),r}var MB=CB;const kB=ke(MB);function NB(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var DB=NB,IB=Ll;function RB(e,t){var r=!0;return IB(e,function(n,a,i){return r=!!t(n,a,i),r}),r}var LB=RB,BB=DB,FB=LB,WB=hr,UB=lt,zB=eo;function KB(e,t,r){var n=UB(e)?BB:FB;return r&&zB(e,t,r)&&(t=void 0),n(e,WB(t))}var qB=KB;const Nm=ke(qB);var GB=["x","y"];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 Sc(){return Sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sc.apply(this,arguments)}function Dm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function si(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Dm(Object(r),!0).forEach(function(n){VB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VB(e,t,r){return t=HB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HB(e){var t=YB(e,"string");return Dn(t)=="symbol"?t:t+""}function YB(e,t){if(Dn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Dn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function XB(e,t){if(e==null)return{};var r=JB(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function JB(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 ZB(e,t){var r=e.x,n=e.y,a=XB(e,GB),i="".concat(r),o=parseInt(i,10),s="".concat(n),l=parseInt(s,10),u="".concat(t.height||a.height),c=parseInt(u,10),f="".concat(t.width||a.width),d=parseInt(f,10);return si(si(si(si(si({},t),a),o?{x:o}:{}),l?{y:l}:{}),{},{height:c,width:d,name:t.name,radius:t.radius})}function Im(e){return S.createElement(bc,Sc({shapeType:"rectangle",propTransformer:ZB,activeClassName:"recharts-active-bar"},e))}var QB=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,a){if(typeof t=="number")return t;var i=X(n)||fO(n);return i?t(n,a):(i||(process.env.NODE_ENV!=="production"?ft(!1,"minPointSize callback function received a value with type of ".concat(Dn(n),". Currently only numbers or null/undefined are supported.")):ft()),r)}},e6=["value","background"],Rm;function In(e){"@babel/helpers - typeof";return In=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},In(e)}function t6(e,t){if(e==null)return{};var r=r6(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function r6(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 ts(){return ts=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},ts.apply(this,arguments)}function Lm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function qe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lm(Object(r),!0).forEach(function(n){wr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function n6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bm(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,Wm(n.key),n)}}function a6(e,t,r){return t&&Bm(e.prototype,t),r&&Bm(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function i6(e,t,r){return t=rs(t),o6(e,Fm()?Reflect.construct(t,r||[],rs(e).constructor):t.apply(e,r))}function o6(e,t){if(t&&(In(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return s6(e)}function s6(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Fm=function(){return!!e})()}function rs(e){return rs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},rs(e)}function l6(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ac(e,t)}function Ac(e,t){return Ac=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ac(e,t)}function wr(e,t,r){return t=Wm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wm(e){var t=u6(e,"string");return In(t)=="symbol"?t:t+""}function u6(e,t){if(In(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(In(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rn=function(e){function t(){var r;n6(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=i6(this,t,[].concat(a)),wr(r,"state",{isAnimationFinished:!1}),wr(r,"id",Er("recharts-bar-")),wr(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),wr(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return l6(t,e),a6(t,[{key:"renderRectanglesStatically",value:function(n){var a=this,i=this.props,o=i.shape,s=i.dataKey,l=i.activeIndex,u=i.activeBar,c=de(this.props,!1);return n&&n.map(function(f,d){var h=d===l,m=h?u:o,v=qe(qe(qe({},c),f),{},{isActive:h,option:m,index:d,dataKey:s,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return S.createElement(be,ts({className:"recharts-bar-rectangle"},da(a.props,f,d),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value,"-").concat(d)}),S.createElement(Im,v))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,a=this.props,i=a.data,o=a.layout,s=a.isAnimationActive,l=a.animationBegin,u=a.animationDuration,c=a.animationEasing,f=a.animationId,d=this.state.prevData;return S.createElement(Nt,{begin:l,duration:u,isActive:s,easing:c,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var m=h.t,v=i.map(function(y,x){var O=d&&d[x];if(O){var w=We(O.x,y.x),T=We(O.y,y.y),p=We(O.width,y.width),g=We(O.height,y.height);return qe(qe({},y),{},{x:w(m),y:T(m),width:p(m),height:g(m)})}if(o==="horizontal"){var A=We(0,y.height),P=A(m);return qe(qe({},y),{},{y:y.y+y.height-P,height:P})}var _=We(0,y.width),R=_(m);return qe(qe({},y),{},{width:R})});return S.createElement(be,null,n.renderRectanglesStatically(v))})}},{key:"renderRectangles",value:function(){var n=this.props,a=n.data,i=n.isAnimationActive,o=this.state.prevData;return i&&a&&a.length&&(!o||!Lr(o,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var n=this,a=this.props,i=a.data,o=a.dataKey,s=a.activeIndex,l=de(this.props.background,!1);return i.map(function(u,c){u.value;var f=u.background,d=t6(u,e6);if(!f)return null;var h=qe(qe(qe(qe(qe({},d),{},{fill:"#eee"},f),l),da(n.props,u,c)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:c,className:"recharts-bar-background-rectangle"});return S.createElement(Im,ts({key:"background-bar-".concat(c),option:n.props.background,isActive:c===s},h))})}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.data,s=i.xAxis,l=i.yAxis,u=i.layout,c=i.children,f=ut(c,En);if(!f)return null;var d=u==="vertical"?o[0].height/2:o[0].width/2,h=function(y,x){var O=Array.isArray(y.value)?y.value[1]:y.value;return{x:y.x,y:y.y,value:O,errorVal:Ye(y,x)}},m={clipPath:n?"url(#clipPath-".concat(a,")"):null};return S.createElement(be,m,f.map(function(v){return S.cloneElement(v,{key:"error-bar-".concat(a,"-").concat(v.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,offset:d,dataPointFormatter:h})}))}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.data,o=n.className,s=n.xAxis,l=n.yAxis,u=n.left,c=n.top,f=n.width,d=n.height,h=n.isAnimationActive,m=n.background,v=n.id;if(a||!i||!i.length)return null;var y=this.state.isAnimationFinished,x=ve("recharts-bar",o),O=s&&s.allowDataOverflow,w=l&&l.allowDataOverflow,T=O||w,p=fe(v)?this.id:v;return S.createElement(be,{className:x},O||w?S.createElement("defs",null,S.createElement("clipPath",{id:"clipPath-".concat(p)},S.createElement("rect",{x:O?u:u-f/2,y:w?c:c-d/2,width:O?f:f*2,height:w?d:d*2}))):null,S.createElement(be,{className:"recharts-bar-rectangles",clipPath:T?"url(#clipPath-".concat(p,")"):null},m?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(T,p),(!h||y)&&Kt.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:a.curData}:n.data!==a.curData?{curData:n.data}:null}}])}(S.PureComponent);Rm=Rn,wr(Rn,"displayName","Bar"),wr(Rn,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!pr.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),wr(Rn,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,a=e.bandSize,i=e.xAxis,o=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,u=e.stackedData,c=e.dataStartIndex,f=e.displayedData,d=e.offset,h=DI(n,r);if(!h)return null;var m=t.layout,v=r.type.defaultProps,y=v!==void 0?qe(qe({},v),r.props):r.props,x=y.dataKey,O=y.children,w=y.minPointSize,T=m==="horizontal"?o:i,p=u?T.scale.domain():null,g=zI({numericAxis:T}),A=ut(O,Hl),P=f.map(function(_,R){var M,C,W,U,F,N;u?M=II(u[c+R],p):(M=Ye(_,x),Array.isArray(M)||(M=[g,M]));var D=QB(w,Rm.defaultProps.minPointSize)(M[1],R);if(m==="horizontal"){var L,E=[o.scale(M[0]),o.scale(M[1])],j=E[0],I=E[1];C=ly({axis:i,ticks:s,bandSize:a,offset:h.offset,entry:_,index:R}),W=(L=I??j)!==null&&L!==void 0?L:void 0,U=h.size;var B=j-I;if(F=Number.isNaN(B)?0:B,N={x:C,y:o.y,width:U,height:o.height},Math.abs(D)>0&&Math.abs(F)<Math.abs(D)){var z=$t(F||D)*(Math.abs(D)-Math.abs(F));W-=z,F+=z}}else{var V=[i.scale(M[0]),i.scale(M[1])],Z=V[0],Q=V[1];if(C=Z,W=ly({axis:o,ticks:l,bandSize:a,offset:h.offset,entry:_,index:R}),U=Q-Z,F=h.size,N={x:i.x,y:W,width:i.width,height:F},Math.abs(D)>0&&Math.abs(U)<Math.abs(D)){var ee=$t(U||D)*(Math.abs(D)-Math.abs(U));U+=ee}}return qe(qe(qe({},_),{},{x:C,y:W,width:U,height:F,value:u?M:M[1],payload:_,background:N},A&&A[R]&&A[R].props),{},{tooltipPayload:[hy(r,_)],tooltipPosition:{x:C+U/2,y:W+F/2}})});return qe({data:P,layout:m},d)});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 c6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Um(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,Km(n.key),n)}}function f6(e,t,r){return t&&Um(e.prototype,t),r&&Um(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function zm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Dt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zm(Object(r),!0).forEach(function(n){ns(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ns(e,t,r){return t=Km(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Km(e){var t=d6(e,"string");return li(t)=="symbol"?t:t+""}function d6(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 h6=function(t,r,n,a,i){var o=t.width,s=t.height,l=t.layout,u=t.children,c=Object.keys(r),f={left:n.left,leftMirror:n.left,right:o-n.right,rightMirror:o-n.right,top:n.top,topMirror:n.top,bottom:s-n.bottom,bottomMirror:s-n.bottom},d=!!pt(u,Rn);return c.reduce(function(h,m){var v=r[m],y=v.orientation,x=v.domain,O=v.padding,w=O===void 0?{}:O,T=v.mirror,p=v.reversed,g="".concat(y).concat(T?"Mirror":""),A,P,_,R,M;if(v.type==="number"&&(v.padding==="gap"||v.padding==="no-gap")){var C=x[1]-x[0],W=1/0,U=v.categoricalDomain.sort(vO);if(U.forEach(function(V,Z){Z>0&&(W=Math.min((V||0)-(U[Z-1]||0),W))}),Number.isFinite(W)){var F=W/C,N=v.layout==="vertical"?n.height:n.width;if(v.padding==="gap"&&(A=F*N/2),v.padding==="no-gap"){var D=$r(t.barCategoryGap,F*N),L=F*N/2;A=L-D-(L-D)/N*D}}}a==="xAxis"?P=[n.left+(w.left||0)+(A||0),n.left+n.width-(w.right||0)-(A||0)]:a==="yAxis"?P=l==="horizontal"?[n.top+n.height-(w.bottom||0),n.top+(w.top||0)]:[n.top+(w.top||0)+(A||0),n.top+n.height-(w.bottom||0)-(A||0)]:P=v.range,p&&(P=[P[1],P[0]]);var E=kI(v,i,d),j=E.scale,I=E.realScaleType;j.domain(x).range(P),NI(j);var B=UI(j,Dt(Dt({},v),{},{realScaleType:I}));a==="xAxis"?(M=y==="top"&&!T||y==="bottom"&&T,_=n.left,R=f[g]-M*v.height):a==="yAxis"&&(M=y==="left"&&!T||y==="right"&&T,_=f[g]-M*v.width,R=n.top);var z=Dt(Dt(Dt({},v),B),{},{realScaleType:I,x:_,y:R,scale:j,width:a==="xAxis"?n.width:v.width,height:a==="yAxis"?n.height:v.height});return z.bandSize=Do(z,B),!v.hide&&a==="xAxis"?f[g]+=(M?-1:1)*z.height:v.hide||(f[g]+=(M?-1:1)*z.width),Dt(Dt({},h),{},ns({},m,z))},{})},qm=function(t,r){var n=t.x,a=t.y,i=r.x,o=r.y;return{x:Math.min(n,i),y:Math.min(a,o),width:Math.abs(i-n),height:Math.abs(o-a)}},p6=function(t){var r=t.x1,n=t.y1,a=t.x2,i=t.y2;return qm({x:r,y:n},{x:a,y:i})},Gm=function(){function e(t){c6(this,e),this.scale=t}return f6(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]:{},a=n.bandAware,i=n.position;if(r!==void 0){if(i)switch(i){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(a){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+l}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),a=n[0],i=n[n.length-1];return a<=i?r>=a&&r<=i:r>=i&&r<=a}}],[{key:"create",value:function(r){return new e(r)}}])}();ns(Gm,"EPS",1e-4);var Tc=function(t){var r=Object.keys(t).reduce(function(n,a){return Dt(Dt({},n),{},ns({},a,Gm.create(t[a])))},{});return Dt(Dt({},r),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.bandAware,s=i.position;return kB(a,function(l,u){return r[u].apply(l,{bandAware:o,position:s})})},isInRange:function(a){return Nm(a,function(i,o){return r[o].isInRange(i)})}})};function v6(e){return(e%180+180)%180}var y6=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=v6(a),o=i*Math.PI/180,s=Math.atan(n/r),l=o>s&&o<Math.PI-s?n/Math.sin(o):r/Math.cos(o);return Math.abs(l)},m6=hr,g6=va,b6=Xi;function x6(e){return function(t,r,n){var a=Object(t);if(!g6(t)){var i=m6(r);t=b6(t),r=function(s){return i(a[s],s,a)}}var o=e(t,r,n);return o>-1?a[i?t[o]:o]:void 0}}var w6=x6,O6=Am;function S6(e){var t=O6(e),r=t%1;return t===t?r?t-r:t:0}var A6=S6,T6=yh,P6=hr,_6=A6,j6=Math.max;function E6(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:_6(r);return a<0&&(a=j6(n+a,0)),T6(e,P6(t),a)}var $6=E6,C6=w6,M6=$6,k6=C6(M6),N6=k6;const D6=ke(N6);var I6=m1(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("")});function as(e){"@babel/helpers - typeof";return as=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},as(e)}var Pc=S.createContext(void 0),_c=S.createContext(void 0),Vm=S.createContext(void 0),Hm=S.createContext({}),Ym=S.createContext(void 0),Xm=S.createContext(0),Jm=S.createContext(0),Zm=function(t){var r=t.state,n=r.xAxisMap,a=r.yAxisMap,i=r.offset,o=t.clipPathId,s=t.children,l=t.width,u=t.height,c=I6(i);return S.createElement(Pc.Provider,{value:n},S.createElement(_c.Provider,{value:a},S.createElement(Hm.Provider,{value:i},S.createElement(Vm.Provider,{value:c},S.createElement(Ym.Provider,{value:o},S.createElement(Xm.Provider,{value:u},S.createElement(Jm.Provider,{value:l},s)))))))},R6=function(){return S.useContext(Ym)};function Qm(e){var t=Object.keys(e);return t.length===0?"There are no available ids.":"Available ids are: ".concat(t,".")}var eg=function(t){var r=S.useContext(Pc);r==null&&(process.env.NODE_ENV!=="production"?ft(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):ft());var n=r[t];return n==null&&(process.env.NODE_ENV!=="production"?ft(!1,'Could not find xAxis by id "'.concat(t,'" [').concat(as(t),"]. ").concat(Qm(r))):ft()),n},L6=function(){var t=S.useContext(Pc);return dr(t)},B6=function(){var t=S.useContext(_c),r=D6(t,function(n){return Nm(n.domain,Number.isFinite)});return r||dr(t)},tg=function(t){var r=S.useContext(_c);r==null&&(process.env.NODE_ENV!=="production"?ft(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):ft());var n=r[t];return n==null&&(process.env.NODE_ENV!=="production"?ft(!1,'Could not find yAxis by id "'.concat(t,'" [').concat(as(t),"]. ").concat(Qm(r))):ft()),n},F6=function(){var t=S.useContext(Vm);return t},W6=function(){return S.useContext(Hm)},jc=function(){return S.useContext(Jm)},Ec=function(){return S.useContext(Xm)};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 U6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z6(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,ig(n.key),n)}}function K6(e,t,r){return t&&z6(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function q6(e,t,r){return t=is(t),G6(e,rg()?Reflect.construct(t,r||[],is(e).constructor):t.apply(e,r))}function G6(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 V6(e)}function V6(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rg=function(){return!!e})()}function is(e){return is=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},is(e)}function H6(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&&$c(e,t)}function $c(e,t){return $c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},$c(e,t)}function ng(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ag(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ng(Object(r),!0).forEach(function(n){Cc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ng(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Cc(e,t,r){return t=ig(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ig(e){var t=Y6(e,"string");return Ln(t)=="symbol"?t:t+""}function Y6(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)}function X6(e,t){return eF(e)||Q6(e,t)||Z6(e,t)||J6()}function J6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
196
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Z6(e,t){if(e){if(typeof e=="string")return og(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 og(e,t)}}function og(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 Q6(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function eF(e){if(Array.isArray(e))return e}function Mc(){return Mc=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},Mc.apply(this,arguments)}var tF=function(t,r){var n;return S.isValidElement(t)?n=S.cloneElement(t,r):he(t)?n=t(r):n=S.createElement("line",Mc({},r,{className:"recharts-reference-line-line"})),n},rF=function(t,r,n,a,i,o,s,l,u){var c=i.x,f=i.y,d=i.width,h=i.height;if(n){var m=u.y,v=t.y.apply(m,{position:o});if(qt(u,"discard")&&!t.y.isInRange(v))return null;var y=[{x:c+d,y:v},{x:c,y:v}];return l==="left"?y.reverse():y}if(r){var x=u.x,O=t.x.apply(x,{position:o});if(qt(u,"discard")&&!t.x.isInRange(O))return null;var w=[{x:O,y:f+h},{x:O,y:f}];return s==="top"?w.reverse():w}if(a){var T=u.segment,p=T.map(function(g){return t.apply(g,{position:o})});return qt(u,"discard")&&TB(p,function(g){return!t.isInRange(g)})?null:p}return null};function nF(e){var t=e.x,r=e.y,n=e.segment,a=e.xAxisId,i=e.yAxisId,o=e.shape,s=e.className,l=e.alwaysShow,u=R6(),c=eg(a),f=tg(i),d=F6();if(!u||!d)return null;Zt(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=Tc({x:c.scale,y:f.scale}),m=Ve(t),v=Ve(r),y=n&&n.length===2,x=rF(h,m,v,y,d,e.position,c.orientation,f.orientation,e);if(!x)return null;var O=X6(x,2),w=O[0],T=w.x,p=w.y,g=O[1],A=g.x,P=g.y,_=qt(e,"hidden")?"url(#".concat(u,")"):void 0,R=ag(ag({clipPath:_},de(e,!0)),{},{x1:T,y1:p,x2:A,y2:P});return S.createElement(be,{className:ve("recharts-reference-line",s)},tF(o,R),nt.renderCallByParent(e,p6({x1:T,y1:p,x2:A,y2:P})))}var kc=function(e){function t(){return U6(this,t),q6(this,t,arguments)}return H6(t,e),K6(t,[{key:"render",value:function(){return S.createElement(nF,this.props)}}])}(S.Component);Cc(kc,"displayName","ReferenceLine"),Cc(kc,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Nc(){return Nc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Nc.apply(this,arguments)}function Bn(e){"@babel/helpers - typeof";return Bn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bn(e)}function sg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).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?sg(Object(r),!0).forEach(function(n){ss(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iF(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,cg(n.key),n)}}function oF(e,t,r){return t&&iF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function sF(e,t,r){return t=os(t),lF(e,ug()?Reflect.construct(t,r||[],os(e).constructor):t.apply(e,r))}function lF(e,t){if(t&&(Bn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uF(e)}function uF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ug(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ug=function(){return!!e})()}function os(e){return os=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},os(e)}function cF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dc(e,t)}function Dc(e,t){return Dc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Dc(e,t)}function ss(e,t,r){return t=cg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cg(e){var t=fF(e,"string");return Bn(t)=="symbol"?t:t+""}function fF(e,t){if(Bn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Bn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var dF=function(t){var r=t.x,n=t.y,a=t.xAxis,i=t.yAxis,o=Tc({x:a.scale,y:i.scale}),s=o.apply({x:r,y:n},{bandAware:!0});return qt(t,"discard")&&!o.isInRange(s)?null:s},ls=function(e){function t(){return aF(this,t),sF(this,t,arguments)}return cF(t,e),oF(t,[{key:"render",value:function(){var n=this.props,a=n.x,i=n.y,o=n.r,s=n.alwaysShow,l=n.clipPathId,u=Ve(a),c=Ve(i);if(Zt(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!c)return null;var f=dF(this.props);if(!f)return null;var d=f.x,h=f.y,m=this.props,v=m.shape,y=m.className,x=qt(this.props,"hidden")?"url(#".concat(l,")"):void 0,O=lg(lg({clipPath:x},de(this.props,!0)),{},{cx:d,cy:h});return S.createElement(be,{className:ve("recharts-reference-dot",y)},t.renderDot(v,O),nt.renderCallByParent(this.props,{x:d-o,y:h-o,width:2*o,height:2*o}))}}])}(S.Component);ss(ls,"displayName","ReferenceDot"),ss(ls,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1}),ss(ls,"renderDot",function(e,t){var r;return S.isValidElement(e)?r=S.cloneElement(e,t):he(e)?r=e(t):r=S.createElement(Vo,Nc({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function Ic(){return Ic=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ic.apply(this,arguments)}function 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 fg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function dg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fg(Object(r),!0).forEach(function(n){cs(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pF(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,pg(n.key),n)}}function vF(e,t,r){return t&&pF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function yF(e,t,r){return t=us(t),mF(e,hg()?Reflect.construct(t,r||[],us(e).constructor):t.apply(e,r))}function mF(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 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 hg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hg=function(){return!!e})()}function us(e){return us=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},us(e)}function bF(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&&Rc(e,t)}function Rc(e,t){return Rc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Rc(e,t)}function cs(e,t,r){return t=pg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pg(e){var t=xF(e,"string");return Fn(t)=="symbol"?t:t+""}function xF(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 wF=function(t,r,n,a,i){var o=i.x1,s=i.x2,l=i.y1,u=i.y2,c=i.xAxis,f=i.yAxis;if(!c||!f)return null;var d=Tc({x:c.scale,y:f.scale}),h={x:t?d.x.apply(o,{position:"start"}):d.x.rangeMin,y:n?d.y.apply(l,{position:"start"}):d.y.rangeMin},m={x:r?d.x.apply(s,{position:"end"}):d.x.rangeMax,y:a?d.y.apply(u,{position:"end"}):d.y.rangeMax};return qt(i,"discard")&&(!d.isInRange(h)||!d.isInRange(m))?null:qm(h,m)},fs=function(e){function t(){return hF(this,t),yF(this,t,arguments)}return bF(t,e),vF(t,[{key:"render",value:function(){var n=this.props,a=n.x1,i=n.x2,o=n.y1,s=n.y2,l=n.className,u=n.alwaysShow,c=n.clipPathId;Zt(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Ve(a),d=Ve(i),h=Ve(o),m=Ve(s),v=this.props.shape;if(!f&&!d&&!h&&!m&&!v)return null;var y=wF(f,d,h,m,this.props);if(!y&&!v)return null;var x=qt(this.props,"hidden")?"url(#".concat(c,")"):void 0;return S.createElement(be,{className:ve("recharts-reference-area",l)},t.renderRect(v,dg(dg({clipPath:x},de(this.props,!0)),y)),nt.renderCallByParent(this.props,y))}}])}(S.Component);cs(fs,"displayName","ReferenceArea"),cs(fs,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1}),cs(fs,"renderRect",function(e,t){var r;return S.isValidElement(e)?r=S.cloneElement(e,t):he(e)?r=e(t):r=S.createElement(yc,Ic({},t,{className:"recharts-reference-area-rect"})),r});function vg(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],a=0;a<e.length;a+=t)n.push(e[a]);return n}function OF(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return y6(n,r)}function SF(e,t,r){var n=r==="width",a=e.x,i=e.y,o=e.width,s=e.height;return t===1?{start:n?a:i,end:n?a+o:i+s}:{start:n?a+o:i+s,end:n?a:i}}function ds(e,t,r,n,a){if(e*t<e*n||e*t>e*a)return!1;var i=r();return e*(t-e*i/2-n)>=0&&e*(t+e*i/2-a)<=0}function AF(e,t){return vg(e,t+1)}function TF(e,t,r,n,a){for(var i=(n||[]).slice(),o=t.start,s=t.end,l=0,u=1,c=o,f=function(){var m=n==null?void 0:n[l];if(m===void 0)return{v:vg(n,u)};var v=l,y,x=function(){return y===void 0&&(y=r(m,v)),y},O=m.coordinate,w=l===0||ds(e,O,x,c,s);w||(l=0,c=o,u+=1),w&&(c=O+e*(x()/2+a),l+=u)},d;u<=i.length;)if(d=f(),d)return d.v;return[]}function ui(e){"@babel/helpers - typeof";return ui=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ui(e)}function yg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function at(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yg(Object(r),!0).forEach(function(n){PF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function PF(e,t,r){return t=_F(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _F(e){var t=jF(e,"string");return ui(t)=="symbol"?t:t+""}function jF(e,t){if(ui(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ui(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function EF(e,t,r,n,a){for(var i=(n||[]).slice(),o=i.length,s=t.start,l=t.end,u=function(d){var h=i[d],m,v=function(){return m===void 0&&(m=r(h,d)),m};if(d===o-1){var y=e*(h.coordinate+e*v()/2-l);i[d]=h=at(at({},h),{},{tickCoord:y>0?h.coordinate-y*e:h.coordinate})}else i[d]=h=at(at({},h),{},{tickCoord:h.coordinate});var x=ds(e,h.tickCoord,v,s,l);x&&(l=h.tickCoord-e*(v()/2+a),i[d]=at(at({},h),{},{isShow:!0}))},c=o-1;c>=0;c--)u(c);return i}function $F(e,t,r,n,a,i){var o=(n||[]).slice(),s=o.length,l=t.start,u=t.end;if(i){var c=n[s-1],f=r(c,s-1),d=e*(c.coordinate+e*f/2-u);o[s-1]=c=at(at({},c),{},{tickCoord:d>0?c.coordinate-d*e:c.coordinate});var h=ds(e,c.tickCoord,function(){return f},l,u);h&&(u=c.tickCoord-e*(f/2+a),o[s-1]=at(at({},c),{},{isShow:!0}))}for(var m=i?s-1:s,v=function(O){var w=o[O],T,p=function(){return T===void 0&&(T=r(w,O)),T};if(O===0){var g=e*(w.coordinate-e*p()/2-l);o[O]=w=at(at({},w),{},{tickCoord:g<0?w.coordinate-g*e:w.coordinate})}else o[O]=w=at(at({},w),{},{tickCoord:w.coordinate});var A=ds(e,w.tickCoord,p,l,u);A&&(l=w.tickCoord+e*(p()/2+a),o[O]=at(at({},w),{},{isShow:!0}))},y=0;y<m;y++)v(y);return o}function Lc(e,t,r){var n=e.tick,a=e.ticks,i=e.viewBox,o=e.minTickGap,s=e.orientation,l=e.interval,u=e.tickFormatter,c=e.unit,f=e.angle;if(!a||!a.length||!n)return[];if(X(l)||pr.isSsr)return AF(a,typeof l=="number"&&X(l)?l:0);var d=[],h=s==="top"||s==="bottom"?"width":"height",m=c&&h==="width"?wa(c,{fontSize:t,letterSpacing:r}):{width:0,height:0},v=function(w,T){var p=he(u)?u(w.value,T):w.value;return h==="width"?OF(wa(p,{fontSize:t,letterSpacing:r}),m,f):wa(p,{fontSize:t,letterSpacing:r})[h]},y=a.length>=2?$t(a[1].coordinate-a[0].coordinate):1,x=SF(i,y,h);return l==="equidistantPreserveStart"?TF(y,x,v,a,o):(l==="preserveStart"||l==="preserveStartEnd"?d=$F(y,x,v,a,o,l==="preserveStartEnd"):d=EF(y,x,v,a,o),d.filter(function(O){return O.isShow}))}var CF=["viewBox"],MF=["viewBox"],kF=["ticks"];function Wn(e){"@babel/helpers - typeof";return Wn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wn(e)}function Un(){return Un=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},Un.apply(this,arguments)}function mg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Je(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mg(Object(r),!0).forEach(function(n){Wc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bc(e,t){if(e==null)return{};var r=NF(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function NF(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 DF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gg(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,xg(n.key),n)}}function IF(e,t,r){return t&&gg(e.prototype,t),r&&gg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function RF(e,t,r){return t=hs(t),LF(e,bg()?Reflect.construct(t,r||[],hs(e).constructor):t.apply(e,r))}function LF(e,t){if(t&&(Wn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return BF(e)}function BF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bg=function(){return!!e})()}function hs(e){return hs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},hs(e)}function FF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fc(e,t)}function Fc(e,t){return Fc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Fc(e,t)}function Wc(e,t,r){return t=xg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xg(e){var t=WF(e,"string");return Wn(t)=="symbol"?t:t+""}function WF(e,t){if(Wn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var zn=function(e){function t(r){var n;return DF(this,t),n=RF(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return FF(t,e),IF(t,[{key:"shouldComponentUpdate",value:function(n,a){var i=n.viewBox,o=Bc(n,CF),s=this.props,l=s.viewBox,u=Bc(s,MF);return!ln(i,l)||!ln(o,u)||!ln(a,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var a=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var a=this.props,i=a.x,o=a.y,s=a.width,l=a.height,u=a.orientation,c=a.tickSize,f=a.mirror,d=a.tickMargin,h,m,v,y,x,O,w=f?-1:1,T=n.tickSize||c,p=X(n.tickCoord)?n.tickCoord:n.coordinate;switch(u){case"top":h=m=n.coordinate,y=o+ +!f*l,v=y-w*T,O=v-w*d,x=p;break;case"left":v=y=n.coordinate,m=i+ +!f*s,h=m-w*T,x=h-w*d,O=p;break;case"right":v=y=n.coordinate,m=i+ +f*s,h=m+w*T,x=h+w*d,O=p;break;default:h=m=n.coordinate,y=o+ +f*l,v=y+w*T,O=v+w*d,x=p;break}return{line:{x1:h,y1:v,x2:m,y2:y},tick:{x,y:O}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,o;switch(a){case"left":o=i?"start":"end";break;case"right":o=i?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,o="end";switch(a){case"left":case"right":o="middle";break;case"top":o=i?"start":"end";break;default:o=i?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,l=n.orientation,u=n.mirror,c=n.axisLine,f=Je(Je(Je({},de(this.props,!1)),de(c,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var d=+(l==="top"&&!u||l==="bottom"&&u);f=Je(Je({},f),{},{x1:a,y1:i+d*s,x2:a+o,y2:i+d*s})}else{var h=+(l==="left"&&!u||l==="right"&&u);f=Je(Je({},f),{},{x1:a+h*o,y1:i,x2:a+h*o,y2:i+s})}return S.createElement("line",Un({},f,{className:ve("recharts-cartesian-axis-line",xt(c,"className"))}))}},{key:"renderTicks",value:function(n,a,i){var o=this,s=this.props,l=s.tickLine,u=s.stroke,c=s.tick,f=s.tickFormatter,d=s.unit,h=Lc(Je(Je({},this.props),{},{ticks:n}),a,i),m=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),y=de(this.props,!1),x=de(c,!1),O=Je(Je({},y),{},{fill:"none"},de(l,!1)),w=h.map(function(T,p){var g=o.getTickLineCoord(T),A=g.line,P=g.tick,_=Je(Je(Je(Je({textAnchor:m,verticalAnchor:v},y),{},{stroke:"none",fill:u},x),P),{},{index:p,payload:T,visibleTicksCount:h.length,tickFormatter:f});return S.createElement(be,Un({className:"recharts-cartesian-axis-tick",key:"tick-".concat(T.value,"-").concat(T.coordinate,"-").concat(T.tickCoord)},da(o.props,T,p)),l&&S.createElement("line",Un({},O,A,{className:ve("recharts-cartesian-axis-tick-line",xt(l,"className"))})),c&&t.renderTickItem(c,_,"".concat(he(f)?f(T.value,p):T.value).concat(d||"")))});return S.createElement("g",{className:"recharts-cartesian-axis-ticks"},w)}},{key:"render",value:function(){var n=this,a=this.props,i=a.axisLine,o=a.width,s=a.height,l=a.ticksGenerator,u=a.className,c=a.hide;if(c)return null;var f=this.props,d=f.ticks,h=Bc(f,kF),m=d;return he(l)&&(m=d&&d.length>0?l(this.props):l(h)),o<=0||s<=0||!m||!m.length?null:S.createElement(be,{className:ve("recharts-cartesian-axis",u),ref:function(y){n.layerReference=y}},i&&this.renderAxisLine(),this.renderTicks(m,this.state.fontSize,this.state.letterSpacing),nt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,a,i){var o,s=ve(a.className,"recharts-cartesian-axis-tick-value");return S.isValidElement(n)?o=S.cloneElement(n,Je(Je({},a),{},{className:s})):he(n)?o=n(Je(Je({},a),{},{className:s})):o=S.createElement(so,Un({},a,{className:"recharts-cartesian-axis-tick-value"}),i),o}}])}(S.Component);Wc(zn,"displayName","CartesianAxis"),Wc(zn,"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 UF=["x1","y1","x2","y2","key"],zF=["offset"];function qr(e){"@babel/helpers - typeof";return qr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qr(e)}function wg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function it(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){KF(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 KF(e,t,r){return t=qF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qF(e){var t=GF(e,"string");return qr(t)=="symbol"?t:t+""}function GF(e,t){if(qr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gr(){return Gr=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},Gr.apply(this,arguments)}function Og(e,t){if(e==null)return{};var r=VF(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function VF(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 HF=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,a=t.x,i=t.y,o=t.width,s=t.height,l=t.ry;return S.createElement("rect",{x:a,y:i,ry:l,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function Sg(e,t){var r;if(S.isValidElement(e))r=S.cloneElement(e,t);else if(he(e))r=e(t);else{var n=t.x1,a=t.y1,i=t.x2,o=t.y2,s=t.key,l=Og(t,UF),u=de(l,!1);u.offset;var c=Og(u,zF);r=S.createElement("line",Gr({},c,{x1:n,y1:a,x2:i,y2:o,fill:"none",key:s}))}return r}function YF(e){var t=e.x,r=e.width,n=e.horizontal,a=n===void 0?!0:n,i=e.horizontalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(s,l){var u=it(it({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(l),index:l});return Sg(a,u)});return S.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function XF(e){var t=e.y,r=e.height,n=e.vertical,a=n===void 0?!0:n,i=e.verticalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(s,l){var u=it(it({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(l),index:l});return Sg(a,u)});return S.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function JF(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,i=e.width,o=e.height,s=e.horizontalPoints,l=e.horizontal,u=l===void 0?!0:l;if(!u||!t||!t.length)return null;var c=s.map(function(d){return Math.round(d+a-a)}).sort(function(d,h){return d-h});a!==c[0]&&c.unshift(0);var f=c.map(function(d,h){var m=!c[h+1],v=m?a+o-d:c[h+1]-d;if(v<=0)return null;var y=h%t.length;return S.createElement("rect",{key:"react-".concat(h),y:d,x:n,height:v,width:i,stroke:"none",fill:t[y],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return S.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function ZF(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,i=e.x,o=e.y,s=e.width,l=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var c=u.map(function(d){return Math.round(d+i-i)}).sort(function(d,h){return d-h});i!==c[0]&&c.unshift(0);var f=c.map(function(d,h){var m=!c[h+1],v=m?i+s-d:c[h+1]-d;if(v<=0)return null;var y=h%n.length;return S.createElement("rect",{key:"react-".concat(h),x:d,y:o,width:v,height:l,stroke:"none",fill:n[y],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return S.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var QF=function(t,r){var n=t.xAxis,a=t.width,i=t.height,o=t.offset;return oy(Lc(it(it(it({},zn.defaultProps),n),{},{ticks:sr(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.left,o.left+o.width,r)},e4=function(t,r){var n=t.yAxis,a=t.width,i=t.height,o=t.offset;return oy(Lc(it(it(it({},zn.defaultProps),n),{},{ticks:sr(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.top,o.top+o.height,r)},Kn={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Ag(e){var t,r,n,a,i,o,s=jc(),l=Ec(),u=W6(),c=it(it({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Kn.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Kn.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:Kn.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:Kn.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:Kn.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Kn.verticalFill,x:X(e.x)?e.x:u.left,y:X(e.y)?e.y:u.top,width:X(e.width)?e.width:u.width,height:X(e.height)?e.height:u.height}),f=c.x,d=c.y,h=c.width,m=c.height,v=c.syncWithTicks,y=c.horizontalValues,x=c.verticalValues,O=L6(),w=B6();if(!X(h)||h<=0||!X(m)||m<=0||!X(f)||f!==+f||!X(d)||d!==+d)return null;var T=c.verticalCoordinatesGenerator||QF,p=c.horizontalCoordinatesGenerator||e4,g=c.horizontalPoints,A=c.verticalPoints;if((!g||!g.length)&&he(p)){var P=y&&y.length,_=p({yAxis:w?it(it({},w),{},{ticks:P?y:w.ticks}):void 0,width:s,height:l,offset:u},P?!0:v);Zt(Array.isArray(_),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(qr(_),"]")),Array.isArray(_)&&(g=_)}if((!A||!A.length)&&he(T)){var R=x&&x.length,M=T({xAxis:O?it(it({},O),{},{ticks:R?x:O.ticks}):void 0,width:s,height:l,offset:u},R?!0:v);Zt(Array.isArray(M),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(qr(M),"]")),Array.isArray(M)&&(A=M)}return S.createElement("g",{className:"recharts-cartesian-grid"},S.createElement(HF,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),S.createElement(YF,Gr({},c,{offset:u,horizontalPoints:g,xAxis:O,yAxis:w})),S.createElement(XF,Gr({},c,{offset:u,verticalPoints:A,xAxis:O,yAxis:w})),S.createElement(JF,Gr({},c,{horizontalPoints:g})),S.createElement(ZF,Gr({},c,{verticalPoints:A})))}Ag.displayName="CartesianGrid";var t4=["type","layout","connectNulls","ref"],r4=["key"];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 Tg(e,t){if(e==null)return{};var r=n4(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function n4(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 ci(){return ci=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},ci.apply(this,arguments)}function Pg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function mt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Pg(Object(r),!0).forEach(function(n){It(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Gn(e){return s4(e)||o4(e)||i4(e)||a4()}function a4(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
197
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i4(e,t){if(e){if(typeof e=="string")return Uc(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 Uc(e,t)}}function o4(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function s4(e){if(Array.isArray(e))return Uc(e)}function Uc(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 l4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _g(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,Eg(n.key),n)}}function u4(e,t,r){return t&&_g(e.prototype,t),r&&_g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c4(e,t,r){return t=ps(t),f4(e,jg()?Reflect.construct(t,r||[],ps(e).constructor):t.apply(e,r))}function f4(e,t){if(t&&(qn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return d4(e)}function d4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jg=function(){return!!e})()}function ps(e){return ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ps(e)}function h4(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&&zc(e,t)}function zc(e,t){return zc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},zc(e,t)}function It(e,t,r){return t=Eg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Eg(e){var t=p4(e,"string");return qn(t)=="symbol"?t:t+""}function p4(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 String(e)}var fi=function(e){function t(){var r;l4(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=c4(this,t,[].concat(a)),It(r,"state",{isAnimationFinished:!0,totalLength:0}),It(r,"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),It(r,"getStrokeDasharray",function(o,s,l){var u=l.reduce(function(x,O){return x+O});if(!u)return r.generateSimpleStrokeDasharray(s,o);for(var c=Math.floor(o/u),f=o%u,d=s-o,h=[],m=0,v=0;m<l.length;v+=l[m],++m)if(v+l[m]>f){h=[].concat(Gn(l.slice(0,m)),[f-v]);break}var y=h.length%2===0?[0,d]:[d];return[].concat(Gn(t.repeat(l,c)),Gn(h),y).map(function(x){return"".concat(x,"px")}).join(", ")}),It(r,"id",Er("recharts-line-")),It(r,"pathRef",function(o){r.mainCurve=o}),It(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),It(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return h4(t,e),u4(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.points,s=i.xAxis,l=i.yAxis,u=i.layout,c=i.children,f=ut(c,En);if(!f)return null;var d=function(v,y){return{x:v.x,y:v.y,value:v.value,errorVal:Ye(v.payload,y)}},h={clipPath:n?"url(#clipPath-".concat(a,")"):null};return S.createElement(be,h,f.map(function(m){return S.cloneElement(m,{key:"bar-".concat(m.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,dataPointFormatter:d})}))}},{key:"renderDots",value:function(n,a,i){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,u=s.points,c=s.dataKey,f=de(this.props,!1),d=de(l,!0),h=u.map(function(v,y){var x=mt(mt(mt({key:"dot-".concat(y),r:3},f),d),{},{index:y,cx:v.x,cy:v.y,value:v.value,dataKey:c,payload:v.payload,points:u});return t.renderDotItem(l,x)}),m={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return S.createElement(be,ci({className:"recharts-line-dots",key:"dots"},m),h)}},{key:"renderCurveStatically",value:function(n,a,i,o){var s=this.props,l=s.type,u=s.layout,c=s.connectNulls;s.ref;var f=Tg(s,t4),d=mt(mt(mt({},de(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:a?"url(#clipPath-".concat(i,")"):null,points:n},o),{},{type:l,layout:u,connectNulls:c});return S.createElement(zr,ci({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,a){var i=this,o=this.props,s=o.points,l=o.strokeDasharray,u=o.isAnimationActive,c=o.animationBegin,f=o.animationDuration,d=o.animationEasing,h=o.animationId,m=o.animateNewValues,v=o.width,y=o.height,x=this.state,O=x.prevPoints,w=x.totalLength;return S.createElement(Nt,{begin:c,duration:f,isActive:u,easing:d,from:{t:0},to:{t:1},key:"line-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(T){var p=T.t;if(O){var g=O.length/s.length,A=s.map(function(C,W){var U=Math.floor(W*g);if(O[U]){var F=O[U],N=We(F.x,C.x),D=We(F.y,C.y);return mt(mt({},C),{},{x:N(p),y:D(p)})}if(m){var L=We(v*2,C.x),E=We(y/2,C.y);return mt(mt({},C),{},{x:L(p),y:E(p)})}return mt(mt({},C),{},{x:C.x,y:C.y})});return i.renderCurveStatically(A,n,a)}var P=We(0,w),_=P(p),R;if(l){var M="".concat(l).split(/[,\s]+/gim).map(function(C){return parseFloat(C)});R=i.getStrokeDasharray(_,w,M)}else R=i.generateSimpleStrokeDasharray(w,_);return i.renderCurveStatically(s,n,a,{strokeDasharray:R})})}},{key:"renderCurve",value:function(n,a){var i=this.props,o=i.points,s=i.isAnimationActive,l=this.state,u=l.prevPoints,c=l.totalLength;return s&&o&&o.length&&(!u&&c>0||!Lr(u,o))?this.renderCurveWithAnimation(n,a):this.renderCurveStatically(o,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,o=a.dot,s=a.points,l=a.className,u=a.xAxis,c=a.yAxis,f=a.top,d=a.left,h=a.width,m=a.height,v=a.isAnimationActive,y=a.id;if(i||!s||!s.length)return null;var x=this.state.isAnimationFinished,O=s.length===1,w=ve("recharts-line",l),T=u&&u.allowDataOverflow,p=c&&c.allowDataOverflow,g=T||p,A=fe(y)?this.id:y,P=(n=de(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},_=P.r,R=_===void 0?3:_,M=P.strokeWidth,C=M===void 0?2:M,W=Zf(o)?o:{},U=W.clipDot,F=U===void 0?!0:U,N=R*2+C;return S.createElement(be,{className:w},T||p?S.createElement("defs",null,S.createElement("clipPath",{id:"clipPath-".concat(A)},S.createElement("rect",{x:T?d:d-h/2,y:p?f:f-m/2,width:T?h:h*2,height:p?m:m*2})),!F&&S.createElement("clipPath",{id:"clipPath-dots-".concat(A)},S.createElement("rect",{x:d-N/2,y:f-N/2,width:h+N,height:m+N}))):null,!O&&this.renderCurve(g,A),this.renderErrorBar(g,A),(O||o)&&this.renderDots(g,F,A),(!v||x)&&Kt.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,a){for(var i=n.length%2!==0?[].concat(Gn(n),[0]):n,o=[],s=0;s<a;++s)o=[].concat(Gn(o),Gn(i));return o}},{key:"renderDotItem",value:function(n,a){var i;if(S.isValidElement(n))i=S.cloneElement(n,a);else if(he(n))i=n(a);else{var o=a.key,s=Tg(a,r4),l=ve("recharts-line-dot",typeof n!="boolean"?n.className:"");i=S.createElement(Vo,ci({key:o},s,{className:l}))}return i}}])}(S.PureComponent);It(fi,"displayName","Line"),It(fi,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!pr.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),It(fi,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,o=e.dataKey,s=e.bandSize,l=e.displayedData,u=e.offset,c=t.layout,f=l.map(function(d,h){var m=Ye(d,o);return c==="horizontal"?{x:Cn({axis:r,ticks:a,bandSize:s,entry:d,index:h}),y:fe(m)?null:n.scale(m),value:m,payload:d}:{x:fe(m)?null:r.scale(m),y:Cn({axis:n,ticks:i,bandSize:s,entry:d,index:h}),value:m,payload:d}});return mt({points:f,layout:c},u)});var v4=["layout","type","stroke","connectNulls","isRange","ref"],y4=["key"],$g;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 Cg(e,t){if(e==null)return{};var r=m4(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function m4(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 Vr(){return Vr=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},Vr.apply(this,arguments)}function Mg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Or(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mg(Object(r),!0).forEach(function(n){Gt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function g4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kg(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,Dg(n.key),n)}}function b4(e,t,r){return t&&kg(e.prototype,t),r&&kg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function x4(e,t,r){return t=vs(t),w4(e,Ng()?Reflect.construct(t,r||[],vs(e).constructor):t.apply(e,r))}function w4(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 O4(e)}function O4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ng(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ng=function(){return!!e})()}function vs(e){return vs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},vs(e)}function S4(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&&Kc(e,t)}function Kc(e,t){return Kc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Kc(e,t)}function Gt(e,t,r){return t=Dg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dg(e){var t=A4(e,"string");return Vn(t)=="symbol"?t:t+""}function A4(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 String(e)}var Sr=function(e){function t(){var r;g4(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=x4(this,t,[].concat(a)),Gt(r,"state",{isAnimationFinished:!0}),Gt(r,"id",Er("recharts-area-")),Gt(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),he(o)&&o()}),Gt(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),he(o)&&o()}),r}return S4(t,e),b4(t,[{key:"renderDots",value:function(n,a,i){var o=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(o&&!s)return null;var l=this.props,u=l.dot,c=l.points,f=l.dataKey,d=de(this.props,!1),h=de(u,!0),m=c.map(function(y,x){var O=Or(Or(Or({key:"dot-".concat(x),r:3},d),h),{},{index:x,cx:y.x,cy:y.y,dataKey:f,value:y.value,payload:y.payload,points:c});return t.renderDotItem(u,O)}),v={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return S.createElement(be,Vr({className:"recharts-area-dots"},v),m)}},{key:"renderHorizontalRect",value:function(n){var a=this.props,i=a.baseLine,o=a.points,s=a.strokeWidth,l=o[0].x,u=o[o.length-1].x,c=n*Math.abs(l-u),f=gr(o.map(function(d){return d.y||0}));return X(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(gr(i.map(function(d){return d.y||0})),f)),X(f)?S.createElement("rect",{x:l<u?l:l-c,y:0,width:c,height:Math.floor(f+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var a=this.props,i=a.baseLine,o=a.points,s=a.strokeWidth,l=o[0].y,u=o[o.length-1].y,c=n*Math.abs(l-u),f=gr(o.map(function(d){return d.x||0}));return X(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(gr(i.map(function(d){return d.x||0})),f)),X(f)?S.createElement("rect",{x:0,y:l<u?l:l-c,width:f+(s?parseInt("".concat(s),10):1),height:Math.floor(c)}):null}},{key:"renderClipRect",value:function(n){var a=this.props.layout;return a==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,a,i,o){var s=this.props,l=s.layout,u=s.type,c=s.stroke,f=s.connectNulls,d=s.isRange;s.ref;var h=Cg(s,v4);return S.createElement(be,{clipPath:i?"url(#clipPath-".concat(o,")"):null},S.createElement(zr,Vr({},de(h,!0),{points:n,connectNulls:f,type:u,baseLine:a,layout:l,stroke:"none",className:"recharts-area-area"})),c!=="none"&&S.createElement(zr,Vr({},de(this.props,!1),{className:"recharts-area-curve",layout:l,type:u,connectNulls:f,fill:"none",points:n})),c!=="none"&&d&&S.createElement(zr,Vr({},de(this.props,!1),{className:"recharts-area-curve",layout:l,type:u,connectNulls:f,fill:"none",points:a})))}},{key:"renderAreaWithAnimation",value:function(n,a){var i=this,o=this.props,s=o.points,l=o.baseLine,u=o.isAnimationActive,c=o.animationBegin,f=o.animationDuration,d=o.animationEasing,h=o.animationId,m=this.state,v=m.prevPoints,y=m.prevBaseLine;return S.createElement(Nt,{begin:c,duration:f,isActive:u,easing:d,from:{t:0},to:{t:1},key:"area-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(x){var O=x.t;if(v){var w=v.length/s.length,T=s.map(function(P,_){var R=Math.floor(_*w);if(v[R]){var M=v[R],C=We(M.x,P.x),W=We(M.y,P.y);return Or(Or({},P),{},{x:C(O),y:W(O)})}return P}),p;if(X(l)&&typeof l=="number"){var g=We(y,l);p=g(O)}else if(fe(l)||sn(l)){var A=We(y,0);p=A(O)}else p=l.map(function(P,_){var R=Math.floor(_*w);if(y[R]){var M=y[R],C=We(M.x,P.x),W=We(M.y,P.y);return Or(Or({},P),{},{x:C(O),y:W(O)})}return P});return i.renderAreaStatically(T,p,n,a)}return S.createElement(be,null,S.createElement("defs",null,S.createElement("clipPath",{id:"animationClipPath-".concat(a)},i.renderClipRect(O))),S.createElement(be,{clipPath:"url(#animationClipPath-".concat(a,")")},i.renderAreaStatically(s,l,n,a)))})}},{key:"renderArea",value:function(n,a){var i=this.props,o=i.points,s=i.baseLine,l=i.isAnimationActive,u=this.state,c=u.prevPoints,f=u.prevBaseLine,d=u.totalLength;return l&&o&&o.length&&(!c&&d>0||!Lr(c,o)||!Lr(f,s))?this.renderAreaWithAnimation(n,a):this.renderAreaStatically(o,s,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,o=a.dot,s=a.points,l=a.className,u=a.top,c=a.left,f=a.xAxis,d=a.yAxis,h=a.width,m=a.height,v=a.isAnimationActive,y=a.id;if(i||!s||!s.length)return null;var x=this.state.isAnimationFinished,O=s.length===1,w=ve("recharts-area",l),T=f&&f.allowDataOverflow,p=d&&d.allowDataOverflow,g=T||p,A=fe(y)?this.id:y,P=(n=de(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},_=P.r,R=_===void 0?3:_,M=P.strokeWidth,C=M===void 0?2:M,W=Zf(o)?o:{},U=W.clipDot,F=U===void 0?!0:U,N=R*2+C;return S.createElement(be,{className:w},T||p?S.createElement("defs",null,S.createElement("clipPath",{id:"clipPath-".concat(A)},S.createElement("rect",{x:T?c:c-h/2,y:p?u:u-m/2,width:T?h:h*2,height:p?m:m*2})),!F&&S.createElement("clipPath",{id:"clipPath-dots-".concat(A)},S.createElement("rect",{x:c-N/2,y:u-N/2,width:h+N,height:m+N}))):null,O?null:this.renderArea(g,A),(o||O)&&this.renderDots(g,F,A),(!v||x)&&Kt.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:a.curPoints,prevBaseLine:a.curBaseLine}:n.points!==a.curPoints||n.baseLine!==a.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])}(S.PureComponent);$g=Sr,Gt(Sr,"displayName","Area"),Gt(Sr,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!pr.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),Gt(Sr,"getBaseValue",function(e,t,r,n){var a=e.layout,i=e.baseValue,o=t.props.baseValue,s=o??i;if(X(s)&&typeof s=="number")return s;var l=a==="horizontal"?n:r,u=l.scale.domain();if(l.type==="number"){var c=Math.max(u[0],u[1]),f=Math.min(u[0],u[1]);return s==="dataMin"?f:s==="dataMax"||c<0?c:Math.max(Math.min(u[0],u[1]),0)}return s==="dataMin"?u[0]:s==="dataMax"?u[1]:u[0]}),Gt(Sr,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,a=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,l=e.dataKey,u=e.stackedData,c=e.dataStartIndex,f=e.displayedData,d=e.offset,h=t.layout,m=u&&u.length,v=$g.getBaseValue(t,r,n,a),y=h==="horizontal",x=!1,O=f.map(function(T,p){var g;m?g=u[c+p]:(g=Ye(T,l),Array.isArray(g)?x=!0:g=[v,g]);var A=g[1]==null||m&&Ye(T,l)==null;return y?{x:Cn({axis:n,ticks:i,bandSize:s,entry:T,index:p}),y:A?null:a.scale(g[1]),value:g,payload:T}:{x:A?null:n.scale(g[1]),y:Cn({axis:a,ticks:o,bandSize:s,entry:T,index:p}),value:g,payload:T}}),w;return m||x?w=O.map(function(T){var p=Array.isArray(T.value)?T.value[0]:null;return y?{x:T.x,y:p!=null&&T.y!=null?a.scale(p):null}:{x:p!=null?n.scale(p):null,y:T.y}}):w=y?a.scale(v):n.scale(v),Or({points:O,baseLine:w,layout:h,isRange:x},d)}),Gt(Sr,"renderDotItem",function(e,t){var r;if(S.isValidElement(e))r=S.cloneElement(e,t);else if(he(e))r=e(t);else{var n=ve("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=Cg(t,y4);r=S.createElement(Vo,Vr({},i,{key:a,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 T4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P4(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,Lg(n.key),n)}}function _4(e,t,r){return t&&P4(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function j4(e,t,r){return t=ys(t),E4(e,Ig()?Reflect.construct(t,r||[],ys(e).constructor):t.apply(e,r))}function E4(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 $4(e)}function $4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ig(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ig=function(){return!!e})()}function ys(e){return ys=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ys(e)}function C4(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&&qc(e,t)}function qc(e,t){return qc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},qc(e,t)}function Rg(e,t,r){return t=Lg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lg(e){var t=M4(e,"string");return Hn(t)=="symbol"?t:t+""}function M4(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(t==="string"?String:Number)(e)}var ms=function(e){function t(){return T4(this,t),j4(this,t,arguments)}return C4(t,e),_4(t,[{key:"render",value:function(){return null}}])}(bt.Component);Rg(ms,"displayName","ZAxis"),Rg(ms,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var k4=["option","isActive"];function di(){return di=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},di.apply(this,arguments)}function N4(e,t){if(e==null)return{};var r=D4(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function D4(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 I4(e){var t=e.option,r=e.isActive,n=N4(e,k4);return typeof t=="string"?bt.createElement(bc,di({option:bt.createElement(qi,di({type:t},n)),isActive:r,shapeType:"symbols"},n)):bt.createElement(bc,di({option:t,isActive:r,shapeType:"symbols"},n))}function Yn(e){"@babel/helpers - typeof";return Yn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yn(e)}function hi(){return hi=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},hi.apply(this,arguments)}function Bg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).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?Bg(Object(r),!0).forEach(function(n){Ar(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 R4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ug(n.key),n)}}function L4(e,t,r){return t&&Fg(e.prototype,t),r&&Fg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function B4(e,t,r){return t=gs(t),F4(e,Wg()?Reflect.construct(t,r||[],gs(e).constructor):t.apply(e,r))}function F4(e,t){if(t&&(Yn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return W4(e)}function W4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Wg=function(){return!!e})()}function gs(e){return gs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},gs(e)}function U4(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&&Gc(e,t)}function Gc(e,t){return Gc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Gc(e,t)}function Ar(e,t,r){return t=Ug(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ug(e){var t=z4(e,"string");return Yn(t)=="symbol"?t:t+""}function z4(e,t){if(Yn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Yn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bs=function(e){function t(){var r;R4(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=B4(this,t,[].concat(a)),Ar(r,"state",{isAnimationFinished:!1}),Ar(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0})}),Ar(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1})}),Ar(r,"id",Er("recharts-scatter-")),r}return U4(t,e),L4(t,[{key:"renderSymbolsStatically",value:function(n){var a=this,i=this.props,o=i.shape,s=i.activeShape,l=i.activeIndex,u=de(this.props,!1);return n.map(function(c,f){var d=l===f,h=d?s:o,m=_t(_t({},u),c);return S.createElement(be,hi({className:"recharts-scatter-symbol",key:"symbol-".concat(c==null?void 0:c.cx,"-").concat(c==null?void 0:c.cy,"-").concat(c==null?void 0:c.size,"-").concat(f)},da(a.props,c,f),{role:"img"}),S.createElement(I4,hi({option:h,isActive:d,key:"symbol-".concat(f)},m)))})}},{key:"renderSymbolsWithAnimation",value:function(){var n=this,a=this.props,i=a.points,o=a.isAnimationActive,s=a.animationBegin,l=a.animationDuration,u=a.animationEasing,c=a.animationId,f=this.state.prevPoints;return S.createElement(Nt,{begin:s,duration:l,isActive:o,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(c),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(d){var h=d.t,m=i.map(function(v,y){var x=f&&f[y];if(x){var O=We(x.cx,v.cx),w=We(x.cy,v.cy),T=We(x.size,v.size);return _t(_t({},v),{},{cx:O(h),cy:w(h),size:T(h)})}var p=We(0,v.size);return _t(_t({},v),{},{size:p(h)})});return S.createElement(be,null,n.renderSymbolsStatically(m))})}},{key:"renderSymbols",value:function(){var n=this.props,a=n.points,i=n.isAnimationActive,o=this.state.prevPoints;return i&&a&&a.length&&(!o||!Lr(o,a))?this.renderSymbolsWithAnimation():this.renderSymbolsStatically(a)}},{key:"renderErrorBar",value:function(){var n=this.props.isAnimationActive;if(n&&!this.state.isAnimationFinished)return null;var a=this.props,i=a.points,o=a.xAxis,s=a.yAxis,l=a.children,u=ut(l,En);return u?u.map(function(c,f){var d=c.props,h=d.direction,m=d.dataKey;return S.cloneElement(c,{key:"".concat(h,"-").concat(m,"-").concat(i[f]),data:i,xAxis:o,yAxis:s,layout:h==="x"?"vertical":"horizontal",dataPointFormatter:function(y,x){return{x:y.cx,y:y.cy,value:h==="x"?+y.node.x:+y.node.y,errorVal:Ye(y,x)}}})}):null}},{key:"renderLine",value:function(){var n=this.props,a=n.points,i=n.line,o=n.lineType,s=n.lineJointType,l=de(this.props,!1),u=de(i,!1),c,f;if(o==="joint")c=a.map(function(w){return{x:w.cx,y:w.cy}});else if(o==="fitting"){var d=pO(a),h=d.xmin,m=d.xmax,v=d.a,y=d.b,x=function(T){return v*T+y};c=[{x:h,y:x(h)},{x:m,y:x(m)}]}var O=_t(_t(_t({},l),{},{fill:"none",stroke:l&&l.fill},u),{},{points:c});return S.isValidElement(i)?f=S.cloneElement(i,O):he(i)?f=i(O):f=S.createElement(zr,hi({},O,{type:s})),S.createElement(be,{className:"recharts-scatter-line",key:"recharts-scatter-line"},f)}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.points,o=n.line,s=n.className,l=n.xAxis,u=n.yAxis,c=n.left,f=n.top,d=n.width,h=n.height,m=n.id,v=n.isAnimationActive;if(a||!i||!i.length)return null;var y=this.state.isAnimationFinished,x=ve("recharts-scatter",s),O=l&&l.allowDataOverflow,w=u&&u.allowDataOverflow,T=O||w,p=fe(m)?this.id:m;return S.createElement(be,{className:x,clipPath:T?"url(#clipPath-".concat(p,")"):null},O||w?S.createElement("defs",null,S.createElement("clipPath",{id:"clipPath-".concat(p)},S.createElement("rect",{x:O?c:c-d/2,y:w?f:f-h/2,width:O?d:d*2,height:w?h:h*2}))):null,o&&this.renderLine(),this.renderErrorBar(),S.createElement(be,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!v||y)&&Kt.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}}])}(S.PureComponent);Ar(bs,"displayName","Scatter"),Ar(bs,"defaultProps",{xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!pr.isSsr,animationBegin:0,animationDuration:400,animationEasing:"linear"}),Ar(bs,"getComposedData",function(e){var t=e.xAxis,r=e.yAxis,n=e.zAxis,a=e.item,i=e.displayedData,o=e.xAxisTicks,s=e.yAxisTicks,l=e.offset,u=a.props.tooltipType,c=ut(a.props.children,Hl),f=fe(t.dataKey)?a.props.dataKey:t.dataKey,d=fe(r.dataKey)?a.props.dataKey:r.dataKey,h=n&&n.dataKey,m=n?n.range:ms.defaultProps.range,v=m&&m[0],y=t.scale.bandwidth?t.scale.bandwidth():0,x=r.scale.bandwidth?r.scale.bandwidth():0,O=i.map(function(w,T){var p=Ye(w,f),g=Ye(w,d),A=!fe(h)&&Ye(w,h)||"-",P=[{name:fe(t.dataKey)?a.props.name:t.name||t.dataKey,unit:t.unit||"",value:p,payload:w,dataKey:f,type:u},{name:fe(r.dataKey)?a.props.name:r.name||r.dataKey,unit:r.unit||"",value:g,payload:w,dataKey:d,type:u}];A!=="-"&&P.push({name:n.name||n.dataKey,unit:n.unit||"",value:A,payload:w,dataKey:h,type:u});var _=Cn({axis:t,ticks:o,bandSize:y,entry:w,index:T,dataKey:f}),R=Cn({axis:r,ticks:s,bandSize:x,entry:w,index:T,dataKey:d}),M=A!=="-"?n.scale(A):v,C=Math.sqrt(Math.max(M,0)/Math.PI);return _t(_t({},w),{},{cx:_,cy:R,x:_-C,y:R-C,xAxis:t,yAxis:r,zAxis:n,width:2*C,height:2*C,size:M,node:{x:p,y:g,z:A},tooltipPayload:P,tooltipPosition:{x:_,y:R},payload:w},c&&c[T]&&c[T].props)});return _t({points:O},l)});function Xn(e){"@babel/helpers - typeof";return Xn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xn(e)}function K4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function q4(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,qg(n.key),n)}}function G4(e,t,r){return t&&q4(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function V4(e,t,r){return t=xs(t),H4(e,zg()?Reflect.construct(t,r||[],xs(e).constructor):t.apply(e,r))}function H4(e,t){if(t&&(Xn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Y4(e)}function Y4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zg=function(){return!!e})()}function xs(e){return xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xs(e)}function X4(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vc(e,t)}function Vc(e,t){return Vc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Vc(e,t)}function Kg(e,t,r){return t=qg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qg(e){var t=J4(e,"string");return Xn(t)=="symbol"?t:t+""}function J4(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 String(e)}function Hc(){return Hc=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},Hc.apply(this,arguments)}function Z4(e){var t=e.xAxisId,r=jc(),n=Ec(),a=eg(t);return a==null?null:bt.createElement(zn,Hc({},a,{className:ve("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return sr(o,!0)}}))}var ws=function(e){function t(){return K4(this,t),V4(this,t,arguments)}return X4(t,e),G4(t,[{key:"render",value:function(){return bt.createElement(Z4,this.props)}}])}(bt.Component);Kg(ws,"displayName","XAxis"),Kg(ws,"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 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 Q4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eW(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Hg(n.key),n)}}function tW(e,t,r){return t&&eW(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function rW(e,t,r){return t=Os(t),nW(e,Gg()?Reflect.construct(t,r||[],Os(e).constructor):t.apply(e,r))}function nW(e,t){if(t&&(Jn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return aW(e)}function aW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Gg=function(){return!!e})()}function Os(e){return Os=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Os(e)}function iW(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yc(e,t)}function Yc(e,t){return Yc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Yc(e,t)}function Vg(e,t,r){return t=Hg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hg(e){var t=oW(e,"string");return Jn(t)=="symbol"?t:t+""}function oW(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 String(e)}function Xc(){return Xc=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},Xc.apply(this,arguments)}var sW=function(t){var r=t.yAxisId,n=jc(),a=Ec(),i=tg(r);return i==null?null:bt.createElement(zn,Xc({},i,{className:ve("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:a},ticksGenerator:function(s){return sr(s,!0)}}))},Ss=function(e){function t(){return Q4(this,t),rW(this,t,arguments)}return iW(t,e),tW(t,[{key:"render",value:function(){return bt.createElement(sW,this.props)}}])}(bt.Component);Vg(Ss,"displayName","YAxis"),Vg(Ss,"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 Yg(e){return fW(e)||cW(e)||uW(e)||lW()}function lW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
198
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uW(e,t){if(e){if(typeof e=="string")return Jc(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 Jc(e,t)}}function cW(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function fW(e){if(Array.isArray(e))return Jc(e)}function Jc(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 Zc=function(t,r,n,a,i){var o=ut(t,kc),s=ut(t,ls),l=[].concat(Yg(o),Yg(s)),u=ut(t,fs),c="".concat(a,"Id"),f=a[0],d=r;if(l.length&&(d=l.reduce(function(v,y){if(y.props[c]===n&&qt(y.props,"extendDomain")&&X(y.props[f])){var x=y.props[f];return[Math.min(v[0],x),Math.max(v[1],x)]}return v},d)),u.length){var h="".concat(f,"1"),m="".concat(f,"2");d=u.reduce(function(v,y){if(y.props[c]===n&&qt(y.props,"extendDomain")&&X(y.props[h])&&X(y.props[m])){var x=y.props[h],O=y.props[m];return[Math.min(v[0],x,O),Math.max(v[1],x,O)]}return v},d)}return i&&i.length&&(d=i.reduce(function(v,y){return X(y)?[Math.min(v[0],y),Math.max(v[1],y)]:v},d)),d},Xg={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(l,u,c){this.fn=l,this.context=u,this.once=c||!1}function i(l,u,c,f,d){if(typeof c!="function")throw new TypeError("The listener must be a function");var h=new a(c,f||l,d),m=r?r+u:u;return l._events[m]?l._events[m].fn?l._events[m]=[l._events[m],h]:l._events[m].push(h):(l._events[m]=h,l._eventsCount++),l}function o(l,u){--l._eventsCount===0?l._events=new n:delete l._events[u]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var u=[],c,f;if(this._eventsCount===0)return u;for(f in c=this._events)t.call(c,f)&&u.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},s.prototype.listeners=function(u){var c=r?r+u:u,f=this._events[c];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,h=f.length,m=new Array(h);d<h;d++)m[d]=f[d].fn;return m},s.prototype.listenerCount=function(u){var c=r?r+u:u,f=this._events[c];return f?f.fn?1:f.length:0},s.prototype.emit=function(u,c,f,d,h,m){var v=r?r+u:u;if(!this._events[v])return!1;var y=this._events[v],x=arguments.length,O,w;if(y.fn){switch(y.once&&this.removeListener(u,y.fn,void 0,!0),x){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,c),!0;case 3:return y.fn.call(y.context,c,f),!0;case 4:return y.fn.call(y.context,c,f,d),!0;case 5:return y.fn.call(y.context,c,f,d,h),!0;case 6:return y.fn.call(y.context,c,f,d,h,m),!0}for(w=1,O=new Array(x-1);w<x;w++)O[w-1]=arguments[w];y.fn.apply(y.context,O)}else{var T=y.length,p;for(w=0;w<T;w++)switch(y[w].once&&this.removeListener(u,y[w].fn,void 0,!0),x){case 1:y[w].fn.call(y[w].context);break;case 2:y[w].fn.call(y[w].context,c);break;case 3:y[w].fn.call(y[w].context,c,f);break;case 4:y[w].fn.call(y[w].context,c,f,d);break;default:if(!O)for(p=1,O=new Array(x-1);p<x;p++)O[p-1]=arguments[p];y[w].fn.apply(y[w].context,O)}}return!0},s.prototype.on=function(u,c,f){return i(this,u,c,f,!1)},s.prototype.once=function(u,c,f){return i(this,u,c,f,!0)},s.prototype.removeListener=function(u,c,f,d){var h=r?r+u:u;if(!this._events[h])return this;if(!c)return o(this,h),this;var m=this._events[h];if(m.fn)m.fn===c&&(!d||m.once)&&(!f||m.context===f)&&o(this,h);else{for(var v=0,y=[],x=m.length;v<x;v++)(m[v].fn!==c||d&&!m[v].once||f&&m[v].context!==f)&&y.push(m[v]);y.length?this._events[h]=y.length===1?y[0]:y:o(this,h)}return this},s.prototype.removeAllListeners=function(u){var c;return u?(c=r?r+u:u,this._events[c]&&o(this,c)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s})(Xg);var dW=Xg.exports;const hW=ke(dW);var Qc=new hW,ef="recharts.syncMouseEvents";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 pW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vW(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,Jg(n.key),n)}}function yW(e,t,r){return t&&vW(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function tf(e,t,r){return t=Jg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jg(e){var t=mW(e,"string");return pi(t)=="symbol"?t:t+""}function mW(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 String(e)}var gW=function(){function e(){pW(this,e),tf(this,"activeIndex",0),tf(this,"coordinateList",[]),tf(this,"layout","horizontal")}return yW(e,[{key:"setDetails",value:function(r){var n,a=r.coordinateList,i=a===void 0?null:a,o=r.container,s=o===void 0?null:o,l=r.layout,u=l===void 0?null:l,c=r.offset,f=c===void 0?null:c,d=r.mouseHandlerCallback,h=d===void 0?null:d;this.coordinateList=(n=i??this.coordinateList)!==null&&n!==void 0?n:[],this.container=s??this.container,this.layout=u??this.layout,this.offset=f??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 a=this.container.getBoundingClientRect(),i=a.x,o=a.y,s=a.height,l=this.coordinateList[this.activeIndex].coordinate,u=((r=window)===null||r===void 0?void 0:r.scrollX)||0,c=((n=window)===null||n===void 0?void 0:n.scrollY)||0,f=i+l+u,d=o+this.offset.top+s/2+c;this.mouseHandlerCallback({pageX:f,pageY:d})}}}])}();function bW(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e==null?void 0:e[0],a=e==null?void 0:e[1];if(n&&a&&X(n)&&X(a))return!0}return!1}function xW(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function Zg(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,i=e.endAngle,o=tt(t,r,n,a),s=tt(t,r,n,i);return{points:[o,s],cx:t,cy:r,radius:n,startAngle:a,endAngle:i}}function wW(e,t,r){var n,a,i,o;if(e==="horizontal")n=t.x,i=n,a=r.top,o=r.top+r.height;else if(e==="vertical")a=t.y,o=a,n=r.left,i=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,l=t.cy,u=t.innerRadius,c=t.outerRadius,f=t.angle,d=tt(s,l,u,f),h=tt(s,l,c,f);n=d.x,a=d.y,i=h.x,o=h.y}else return Zg(t);return[{x:n,y:a},{x:i,y:o}]}function vi(e){"@babel/helpers - typeof";return vi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vi(e)}function Qg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function As(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){OW(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 OW(e,t,r){return t=SW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SW(e){var t=AW(e,"string");return vi(t)=="symbol"?t:t+""}function AW(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 TW(e){var t,r,n=e.element,a=e.tooltipEventType,i=e.isActive,o=e.activeCoordinate,s=e.activePayload,l=e.offset,u=e.activeTooltipIndex,c=e.tooltipAxisBandSize,f=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||!i||!o||d!=="ScatterChart"&&a!=="axis")return null;var m,v=zr;if(d==="ScatterChart")m=o,v=X3;else if(d==="BarChart")m=xW(f,o,l,c),v=yc;else if(f==="radial"){var y=Zg(o),x=y.cx,O=y.cy,w=y.radius,T=y.startAngle,p=y.endAngle;m={cx:x,cy:O,startAngle:T,endAngle:p,innerRadius:w,outerRadius:w},v=Ty}else m={points:wW(f,o,l)},v=zr;var g=As(As(As(As({stroke:"#ccc",pointerEvents:"none"},l),m),de(h,!1)),{},{payload:s,payloadIndex:u,className:ve("recharts-tooltip-cursor",h.className)});return S.isValidElement(h)?S.cloneElement(h,g):S.createElement(v,g)}var PW=["item"],_W=["children","className","width","height","style","compact","title","desc"];function Zn(e){"@babel/helpers - typeof";return Zn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zn(e)}function Qn(){return Qn=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},Qn.apply(this,arguments)}function eb(e,t){return $W(e)||EW(e,t)||nb(e,t)||jW()}function jW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
199
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EW(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function $W(e){if(Array.isArray(e))return e}function tb(e,t){if(e==null)return{};var r=CW(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function CW(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function MW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kW(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,ib(n.key),n)}}function NW(e,t,r){return t&&kW(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function DW(e,t,r){return t=Ts(t),IW(e,rb()?Reflect.construct(t,r||[],Ts(e).constructor):t.apply(e,r))}function IW(e,t){if(t&&(Zn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return RW(e)}function RW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rb=function(){return!!e})()}function Ts(e){return Ts=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ts(e)}function LW(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rf(e,t)}function rf(e,t){return rf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},rf(e,t)}function ea(e){return WW(e)||FW(e)||nb(e)||BW()}function BW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
200
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nb(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 FW(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function WW(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 ab(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function K(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ab(Object(r),!0).forEach(function(n){se(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ab(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function se(e,t,r){return t=ib(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ib(e){var t=UW(e,"string");return Zn(t)=="symbol"?t:t+""}function UW(e,t){if(Zn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var zW={xAxis:["bottom","top"],yAxis:["left","right"]},KW={width:"100%",height:"100%"},ob={x:0,y:0};function Ps(e){return e}var qW=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},GW=function(t,r,n,a){var i=r.find(function(c){return c&&c.index===n});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var o=i.coordinate,s=a.radius;return K(K(K({},a),tt(a.cx,a.cy,s,o)),{},{angle:o,radius:s})}var l=i.coordinate,u=a.angle;return K(K(K({},a),tt(a.cx,a.cy,l,u)),{},{angle:u,radius:l})}return ob},_s=function(t,r){var n=r.graphicalItems,a=r.dataStartIndex,i=r.dataEndIndex,o=(n??[]).reduce(function(s,l){var u=l.props.data;return u&&u.length?[].concat(ea(s),ea(u)):s},[]);return o.length>0?o:t&&t.length&&X(a)&&X(i)?t.slice(a,i+1):[]};function sb(e){return e==="number"?[0,"auto"]:void 0}var af=function(t,r,n,a){var i=t.graphicalItems,o=t.tooltipAxis,s=_s(r,t);return n<0||!i||!i.length||n>=s.length?null:i.reduce(function(l,u){var c,f=(c=u.props.data)!==null&&c!==void 0?c:r;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var h=f===void 0?s:f;d=ki(h,o.dataKey,a)}else d=f&&f[n]||s[n];return d?[].concat(ea(l),[hy(u,d)]):l},[])},lb=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},o=qW(i,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,c=_I(o,s,u,l);if(c>=0&&u){var f=u[c]&&u[c].value,d=af(t,r,c,f),h=GW(n,s,c,i);return{activeTooltipIndex:c,activeLabel:f,activePayload:d,activeCoordinate:h}}return null},VW=function(t,r){var n=r.axes,a=r.graphicalItems,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,d=t.stackOffset,h=iy(c,i);return n.reduce(function(m,v){var y,x=v.type.defaultProps!==void 0?K(K({},v.type.defaultProps),v.props):v.props,O=x.type,w=x.dataKey,T=x.allowDataOverflow,p=x.allowDuplicatedCategory,g=x.scale,A=x.ticks,P=x.includeHidden,_=x[o];if(m[_])return m;var R=_s(t.data,{graphicalItems:a.filter(function(B){var z,V=o in B.props?B.props[o]:(z=B.type.defaultProps)===null||z===void 0?void 0:z[o];return V===_}),dataStartIndex:l,dataEndIndex:u}),M=R.length,C,W,U;bW(x.domain,T,O)&&(C=Vu(x.domain,null,T),h&&(O==="number"||g!=="auto")&&(U=Wa(R,w,"category")));var F=sb(O);if(!C||C.length===0){var N,D=(N=x.domain)!==null&&N!==void 0?N:F;if(w){if(C=Wa(R,w,O),O==="category"&&h){var L=hO(C);p&&L?(W=C,C=Zo(0,M)):p||(C=dy(D,C,v).reduce(function(B,z){return B.indexOf(z)>=0?B:[].concat(ea(B),[z])},[]))}else if(O==="category")p?C=C.filter(function(B){return B!==""&&!fe(B)}):C=dy(D,C,v).reduce(function(B,z){return B.indexOf(z)>=0||z===""||fe(z)?B:[].concat(ea(B),[z])},[]);else if(O==="number"){var E=MI(R,a.filter(function(B){var z,V,Z=o in B.props?B.props[o]:(z=B.type.defaultProps)===null||z===void 0?void 0:z[o],Q="hide"in B.props?B.props.hide:(V=B.type.defaultProps)===null||V===void 0?void 0:V.hide;return Z===_&&(P||!Q)}),w,i,c);E&&(C=E)}h&&(O==="number"||g!=="auto")&&(U=Wa(R,w,"category"))}else h?C=Zo(0,M):s&&s[_]&&s[_].hasStack&&O==="number"?C=d==="expand"?[0,1]:uy(s[_].stackGroups,l,u):C=ay(R,a.filter(function(B){var z=o in B.props?B.props[o]:B.type.defaultProps[o],V="hide"in B.props?B.props.hide:B.type.defaultProps.hide;return z===_&&(P||!V)}),O,c,!0);if(O==="number")C=Zc(f,C,_,i,A),D&&(C=Vu(D,C,T));else if(O==="category"&&D){var j=D,I=C.every(function(B){return j.indexOf(B)>=0});I&&(C=j)}}return K(K({},m),{},se({},_,K(K({},x),{},{axisType:i,domain:C,categoricalDomain:U,duplicateDomain:W,originalDomain:(y=x.domain)!==null&&y!==void 0?y:F,isCategorical:h,layout:c})))},{})},HW=function(t,r){var n=r.graphicalItems,a=r.Axis,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,d=_s(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),h=d.length,m=iy(c,i),v=-1;return n.reduce(function(y,x){var O=x.type.defaultProps!==void 0?K(K({},x.type.defaultProps),x.props):x.props,w=O[o],T=sb("number");if(!y[w]){v++;var p;return m?p=Zo(0,h):s&&s[w]&&s[w].hasStack?(p=uy(s[w].stackGroups,l,u),p=Zc(f,p,w,i)):(p=Vu(T,ay(d,n.filter(function(g){var A,P,_=o in g.props?g.props[o]:(A=g.type.defaultProps)===null||A===void 0?void 0:A[o],R="hide"in g.props?g.props.hide:(P=g.type.defaultProps)===null||P===void 0?void 0:P.hide;return _===w&&!R}),"number",c),a.defaultProps.allowDataOverflow),p=Zc(f,p,w,i)),K(K({},y),{},se({},w,K(K({axisType:i},a.defaultProps),{},{hide:!0,orientation:xt(zW,"".concat(i,".").concat(v%2),null),domain:p,originalDomain:T,isCategorical:m,layout:c})))}return y},{})},YW=function(t,r){var n=r.axisType,a=n===void 0?"xAxis":n,i=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.children,f="".concat(a,"Id"),d=ut(c,i),h={};return d&&d.length?h=VW(t,{axes:d,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(h=HW(t,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),h},XW=function(t){var r=dr(t),n=sr(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Fl(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Do(r,n)}},ub=function(t){var r=t.children,n=t.defaultShowTooltip,a=pt(r,Nn),i=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(o=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},JW=function(t){return!t||!t.length?!1:t.some(function(r){var n=Jt(r&&r.type);return n&&n.indexOf("Bar")>=0})},cb=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"}},ZW=function(t,r){var n=t.props,a=t.graphicalItems,i=t.xAxisMap,o=i===void 0?{}:i,s=t.yAxisMap,l=s===void 0?{}:s,u=n.width,c=n.height,f=n.children,d=n.margin||{},h=pt(f,Nn),m=pt(f,vn),v=Object.keys(l).reduce(function(p,g){var A=l[g],P=A.orientation;return!A.mirror&&!A.hide?K(K({},p),{},se({},P,p[P]+A.width)):p},{left:d.left||0,right:d.right||0}),y=Object.keys(o).reduce(function(p,g){var A=o[g],P=A.orientation;return!A.mirror&&!A.hide?K(K({},p),{},se({},P,xt(p,"".concat(P))+A.height)):p},{top:d.top||0,bottom:d.bottom||0}),x=K(K({},y),v),O=x.bottom;h&&(x.bottom+=h.props.height||Nn.defaultProps.height),m&&r&&(x=$I(x,a,n,r));var w=u-x.left-x.right,T=c-x.top-x.bottom;return K(K({brushBottom:O},x),{},{width:Math.max(w,0),height:Math.max(T,0)})},QW=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},e8=function(t){var r=t.chartName,n=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,u=t.legendContent,c=t.formatAxisMap,f=t.defaultProps,d=function(x,O){var w=O.graphicalItems,T=O.stackGroups,p=O.offset,g=O.updateId,A=O.dataStartIndex,P=O.dataEndIndex,_=x.barSize,R=x.layout,M=x.barGap,C=x.barCategoryGap,W=x.maxBarSize,U=cb(R),F=U.numericAxisName,N=U.cateAxisName,D=JW(w),L=[];return w.forEach(function(E,j){var I=_s(x.data,{graphicalItems:[E],dataStartIndex:A,dataEndIndex:P}),B=E.type.defaultProps!==void 0?K(K({},E.type.defaultProps),E.props):E.props,z=B.dataKey,V=B.maxBarSize,Z=B["".concat(F,"Id")],Q=B["".concat(N,"Id")],ee={},te=l.reduce(function(Rt,gt){var Oi,Si,na=O["".concat(gt.axisType,"Map")],Ai=B["".concat(gt.axisType,"Id")];na&&na[Ai]||gt.axisType==="zAxis"||(process.env.NODE_ENV!=="production"?ft(!1,"Specifying a(n) ".concat(gt.axisType,"Id requires a corresponding ").concat(gt.axisType,"Id on the targeted graphical component ").concat((Oi=E==null||(Si=E.type)===null||Si===void 0?void 0:Si.displayName)!==null&&Oi!==void 0?Oi:"")):ft());var Ti=na[Ai];return K(K({},Rt),{},se(se({},gt.axisType,Ti),"".concat(gt.axisType,"Ticks"),sr(Ti)))},ee),q=te[N],Y=te["".concat(N,"Ticks")],J=T&&T[Z]&&T[Z].hasStack&&KI(E,T[Z].stackGroups),k=Jt(E.type).indexOf("Bar")>=0,ie=Do(q,Y),G=[],re=D&&jI({barSize:_,stackGroups:T,totalSize:QW(te,N)});if(k){var oe,Ce,Te=fe(V)?W:V,je=(oe=(Ce=Do(q,Y,!0))!==null&&Ce!==void 0?Ce:Te)!==null&&oe!==void 0?oe:0;G=EI({barGap:M,barCategoryGap:C,bandSize:je!==ie?je:ie,sizeList:re[Q],maxBarSize:Te}),je!==ie&&(G=G.map(function(Rt){return K(K({},Rt),{},{position:K(K({},Rt.position),{},{offset:Rt.position.offset-je/2})})}))}var et=E&&E.type&&E.type.getComposedData;et&&L.push({props:K(K({},et(K(K({},te),{},{displayedData:I,props:x,dataKey:z,item:E,bandSize:ie,barPosition:G,offset:p,stackedData:J,layout:R,dataStartIndex:A,dataEndIndex:P}))),{},se(se(se({key:E.key||"item-".concat(j)},F,te[F]),N,te[N]),"animationId",g)),childIndex:PO(E,x.children),item:E})}),L},h=function(x,O){var w=x.props,T=x.dataStartIndex,p=x.dataEndIndex,g=x.updateId;if(!Jf({props:w}))return null;var A=w.children,P=w.layout,_=w.stackOffset,R=w.data,M=w.reverseStackOrder,C=cb(P),W=C.numericAxisName,U=C.cateAxisName,F=ut(A,n),N=WI(R,F,"".concat(W,"Id"),"".concat(U,"Id"),_,M),D=l.reduce(function(B,z){var V="".concat(z.axisType,"Map");return K(K({},B),{},se({},V,YW(w,K(K({},z),{},{graphicalItems:F,stackGroups:z.axisType===W&&N,dataStartIndex:T,dataEndIndex:p}))))},{}),L=ZW(K(K({},D),{},{props:w,graphicalItems:F}),O==null?void 0:O.legendBBox);Object.keys(D).forEach(function(B){D[B]=c(w,D[B],L,B.replace("Map",""),r)});var E=D["".concat(U,"Map")],j=XW(E),I=d(w,K(K({},D),{},{dataStartIndex:T,dataEndIndex:p,updateId:g,graphicalItems:F,stackGroups:N,offset:L}));return K(K({formattedGraphicalItems:I,graphicalItems:F,offset:L,stackGroups:N},j),D)},m=function(y){function x(O){var w,T,p;return MW(this,x),p=DW(this,x,[O]),se(p,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),se(p,"accessibilityManager",new gW),se(p,"handleLegendBBoxUpdate",function(g){if(g){var A=p.state,P=A.dataStartIndex,_=A.dataEndIndex,R=A.updateId;p.setState(K({legendBBox:g},h({props:p.props,dataStartIndex:P,dataEndIndex:_,updateId:R},K(K({},p.state),{},{legendBBox:g}))))}}),se(p,"handleReceiveSyncEvent",function(g,A,P){if(p.props.syncId===g){if(P===p.eventEmitterSymbol&&typeof p.props.syncMethod!="function")return;p.applySyncEvent(A)}}),se(p,"handleBrushChange",function(g){var A=g.startIndex,P=g.endIndex;if(A!==p.state.dataStartIndex||P!==p.state.dataEndIndex){var _=p.state.updateId;p.setState(function(){return K({dataStartIndex:A,dataEndIndex:P},h({props:p.props,dataStartIndex:A,dataEndIndex:P,updateId:_},p.state))}),p.triggerSyncEvent({dataStartIndex:A,dataEndIndex:P})}}),se(p,"handleMouseEnter",function(g){var A=p.getMouseInfo(g);if(A){var P=K(K({},A),{},{isTooltipActive:!0});p.setState(P),p.triggerSyncEvent(P);var _=p.props.onMouseEnter;he(_)&&_(P,g)}}),se(p,"triggeredAfterMouseMove",function(g){var A=p.getMouseInfo(g),P=A?K(K({},A),{},{isTooltipActive:!0}):{isTooltipActive:!1};p.setState(P),p.triggerSyncEvent(P);var _=p.props.onMouseMove;he(_)&&_(P,g)}),se(p,"handleItemMouseEnter",function(g){p.setState(function(){return{isTooltipActive:!0,activeItem:g,activePayload:g.tooltipPayload,activeCoordinate:g.tooltipPosition||{x:g.cx,y:g.cy}}})}),se(p,"handleItemMouseLeave",function(){p.setState(function(){return{isTooltipActive:!1}})}),se(p,"handleMouseMove",function(g){g.persist(),p.throttleTriggeredAfterMouseMove(g)}),se(p,"handleMouseLeave",function(g){p.throttleTriggeredAfterMouseMove.cancel();var A={isTooltipActive:!1};p.setState(A),p.triggerSyncEvent(A);var P=p.props.onMouseLeave;he(P)&&P(A,g)}),se(p,"handleOuterEvent",function(g){var A=TO(g),P=xt(p.props,"".concat(A));if(A&&he(P)){var _,R;/.*touch.*/i.test(A)?R=p.getMouseInfo(g.changedTouches[0]):R=p.getMouseInfo(g),P((_=R)!==null&&_!==void 0?_:{},g)}}),se(p,"handleClick",function(g){var A=p.getMouseInfo(g);if(A){var P=K(K({},A),{},{isTooltipActive:!0});p.setState(P),p.triggerSyncEvent(P);var _=p.props.onClick;he(_)&&_(P,g)}}),se(p,"handleMouseDown",function(g){var A=p.props.onMouseDown;if(he(A)){var P=p.getMouseInfo(g);A(P,g)}}),se(p,"handleMouseUp",function(g){var A=p.props.onMouseUp;if(he(A)){var P=p.getMouseInfo(g);A(P,g)}}),se(p,"handleTouchMove",function(g){g.changedTouches!=null&&g.changedTouches.length>0&&p.throttleTriggeredAfterMouseMove(g.changedTouches[0])}),se(p,"handleTouchStart",function(g){g.changedTouches!=null&&g.changedTouches.length>0&&p.handleMouseDown(g.changedTouches[0])}),se(p,"handleTouchEnd",function(g){g.changedTouches!=null&&g.changedTouches.length>0&&p.handleMouseUp(g.changedTouches[0])}),se(p,"handleDoubleClick",function(g){var A=p.props.onDoubleClick;if(he(A)){var P=p.getMouseInfo(g);A(P,g)}}),se(p,"handleContextMenu",function(g){var A=p.props.onContextMenu;if(he(A)){var P=p.getMouseInfo(g);A(P,g)}}),se(p,"triggerSyncEvent",function(g){p.props.syncId!==void 0&&Qc.emit(ef,p.props.syncId,g,p.eventEmitterSymbol)}),se(p,"applySyncEvent",function(g){var A=p.props,P=A.layout,_=A.syncMethod,R=p.state.updateId,M=g.dataStartIndex,C=g.dataEndIndex;if(g.dataStartIndex!==void 0||g.dataEndIndex!==void 0)p.setState(K({dataStartIndex:M,dataEndIndex:C},h({props:p.props,dataStartIndex:M,dataEndIndex:C,updateId:R},p.state)));else if(g.activeTooltipIndex!==void 0){var W=g.chartX,U=g.chartY,F=g.activeTooltipIndex,N=p.state,D=N.offset,L=N.tooltipTicks;if(!D)return;if(typeof _=="function")F=_(L,g);else if(_==="value"){F=-1;for(var E=0;E<L.length;E++)if(L[E].value===g.activeLabel){F=E;break}}var j=K(K({},D),{},{x:D.left,y:D.top}),I=Math.min(W,j.x+j.width),B=Math.min(U,j.y+j.height),z=L[F]&&L[F].value,V=af(p.state,p.props.data,F),Z=L[F]?{x:P==="horizontal"?L[F].coordinate:I,y:P==="horizontal"?B:L[F].coordinate}:ob;p.setState(K(K({},g),{},{activeLabel:z,activeCoordinate:Z,activePayload:V,activeTooltipIndex:F}))}else p.setState(g)}),se(p,"renderCursor",function(g){var A,P=p.state,_=P.isTooltipActive,R=P.activeCoordinate,M=P.activePayload,C=P.offset,W=P.activeTooltipIndex,U=P.tooltipAxisBandSize,F=p.getTooltipEventType(),N=(A=g.props.active)!==null&&A!==void 0?A:_,D=p.props.layout,L=g.key||"_recharts-cursor";return S.createElement(TW,{key:L,activeCoordinate:R,activePayload:M,activeTooltipIndex:W,chartName:r,element:g,isActive:N,layout:D,offset:C,tooltipAxisBandSize:U,tooltipEventType:F})}),se(p,"renderPolarAxis",function(g,A,P){var _=xt(g,"type.axisType"),R=xt(p.state,"".concat(_,"Map")),M=g.type.defaultProps,C=M!==void 0?K(K({},M),g.props):g.props,W=R&&R[C["".concat(_,"Id")]];return S.cloneElement(g,K(K({},W),{},{className:ve(_,W.className),key:g.key||"".concat(A,"-").concat(P),ticks:sr(W,!0)}))}),se(p,"renderPolarGrid",function(g){var A=g.props,P=A.radialLines,_=A.polarAngles,R=A.polarRadius,M=p.state,C=M.radiusAxisMap,W=M.angleAxisMap,U=dr(C),F=dr(W),N=F.cx,D=F.cy,L=F.innerRadius,E=F.outerRadius;return S.cloneElement(g,{polarAngles:Array.isArray(_)?_:sr(F,!0).map(function(j){return j.coordinate}),polarRadius:Array.isArray(R)?R:sr(U,!0).map(function(j){return j.coordinate}),cx:N,cy:D,innerRadius:L,outerRadius:E,key:g.key||"polar-grid",radialLines:P})}),se(p,"renderLegend",function(){var g=p.state.formattedGraphicalItems,A=p.props,P=A.children,_=A.width,R=A.height,M=p.props.margin||{},C=_-(M.left||0)-(M.right||0),W=ey({children:P,formattedGraphicalItems:g,legendWidth:C,legendContent:u});if(!W)return null;var U=W.item,F=tb(W,PW);return S.cloneElement(U,K(K({},F),{},{chartWidth:_,chartHeight:R,margin:M,onBBoxUpdate:p.handleLegendBBoxUpdate}))}),se(p,"renderTooltip",function(){var g,A=p.props,P=A.children,_=A.accessibilityLayer,R=pt(P,Ft);if(!R)return null;var M=p.state,C=M.isTooltipActive,W=M.activeCoordinate,U=M.activePayload,F=M.activeLabel,N=M.offset,D=(g=R.props.active)!==null&&g!==void 0?g:C;return S.cloneElement(R,{viewBox:K(K({},N),{},{x:N.left,y:N.top}),active:D,label:F,payload:D?U:[],coordinate:W,accessibilityLayer:_})}),se(p,"renderBrush",function(g){var A=p.props,P=A.margin,_=A.data,R=p.state,M=R.offset,C=R.dataStartIndex,W=R.dataEndIndex,U=R.updateId;return S.cloneElement(g,{key:g.key||"_recharts-brush",onChange:No(p.handleBrushChange,g.props.onChange),data:_,x:X(g.props.x)?g.props.x:M.left,y:X(g.props.y)?g.props.y:M.top+M.height+M.brushBottom-(P.bottom||0),width:X(g.props.width)?g.props.width:M.width,startIndex:C,endIndex:W,updateId:"brush-".concat(U)})}),se(p,"renderReferenceElement",function(g,A,P){if(!g)return null;var _=p,R=_.clipPathId,M=p.state,C=M.xAxisMap,W=M.yAxisMap,U=M.offset,F=g.type.defaultProps||{},N=g.props,D=N.xAxisId,L=D===void 0?F.xAxisId:D,E=N.yAxisId,j=E===void 0?F.yAxisId:E;return S.cloneElement(g,{key:g.key||"".concat(A,"-").concat(P),xAxis:C[L],yAxis:W[j],viewBox:{x:U.left,y:U.top,width:U.width,height:U.height},clipPathId:R})}),se(p,"renderActivePoints",function(g){var A=g.item,P=g.activePoint,_=g.basePoint,R=g.childIndex,M=g.isRange,C=[],W=A.props.key,U=A.item.type.defaultProps!==void 0?K(K({},A.item.type.defaultProps),A.item.props):A.item.props,F=U.activeDot,N=U.dataKey,D=K(K({index:R,dataKey:N,cx:P.x,cy:P.y,r:4,fill:qu(A.item),strokeWidth:2,stroke:"#fff",payload:P.payload,value:P.value},de(F,!1)),Ni(F));return C.push(x.renderActiveDot(F,D,"".concat(W,"-activePoint-").concat(R))),_?C.push(x.renderActiveDot(F,K(K({},D),{},{cx:_.x,cy:_.y}),"".concat(W,"-basePoint-").concat(R))):M&&C.push(null),C}),se(p,"renderGraphicChild",function(g,A,P){var _=p.filterFormatItem(g,A,P);if(!_)return null;var R=p.getTooltipEventType(),M=p.state,C=M.isTooltipActive,W=M.tooltipAxis,U=M.activeTooltipIndex,F=M.activeLabel,N=p.props.children,D=pt(N,Ft),L=_.props,E=L.points,j=L.isRange,I=L.baseLine,B=_.item.type.defaultProps!==void 0?K(K({},_.item.type.defaultProps),_.item.props):_.item.props,z=B.activeDot,V=B.hide,Z=B.activeBar,Q=B.activeShape,ee=!!(!V&&C&&D&&(z||Z||Q)),te={};R!=="axis"&&D&&D.props.trigger==="click"?te={onClick:No(p.handleItemMouseEnter,g.props.onClick)}:R!=="axis"&&(te={onMouseLeave:No(p.handleItemMouseLeave,g.props.onMouseLeave),onMouseEnter:No(p.handleItemMouseEnter,g.props.onMouseEnter)});var q=S.cloneElement(g,K(K({},_.props),te));function Y(gt){return typeof W.dataKey=="function"?W.dataKey(gt.payload):null}if(ee)if(U>=0){var J,k;if(W.dataKey&&!W.allowDuplicatedCategory){var ie=typeof W.dataKey=="function"?Y:"payload.".concat(W.dataKey.toString());J=ki(E,ie,F),k=j&&I&&ki(I,ie,F)}else J=E==null?void 0:E[U],k=j&&I&&I[U];if(Q||Z){var G=g.props.activeIndex!==void 0?g.props.activeIndex:U;return[S.cloneElement(g,K(K(K({},_.props),te),{},{activeIndex:G})),null,null]}if(!fe(J))return[q].concat(ea(p.renderActivePoints({item:_,activePoint:J,basePoint:k,childIndex:U,isRange:j})))}else{var re,oe=(re=p.getItemByXY(p.state.activeCoordinate))!==null&&re!==void 0?re:{graphicalItem:q},Ce=oe.graphicalItem,Te=Ce.item,je=Te===void 0?g:Te,et=Ce.childIndex,Rt=K(K(K({},_.props),te),{},{activeIndex:et});return[S.cloneElement(je,Rt),null,null]}return j?[q,null,null]:[q,null]}),se(p,"renderCustomized",function(g,A,P){return S.cloneElement(g,K(K({key:"recharts-customized-".concat(P)},p.props),p.state))}),se(p,"renderMap",{CartesianGrid:{handler:Ps,once:!0},ReferenceArea:{handler:p.renderReferenceElement},ReferenceLine:{handler:Ps},ReferenceDot:{handler:p.renderReferenceElement},XAxis:{handler:Ps},YAxis:{handler:Ps},Brush:{handler:p.renderBrush,once:!0},Bar:{handler:p.renderGraphicChild},Line:{handler:p.renderGraphicChild},Area:{handler:p.renderGraphicChild},Radar:{handler:p.renderGraphicChild},RadialBar:{handler:p.renderGraphicChild},Scatter:{handler:p.renderGraphicChild},Pie:{handler:p.renderGraphicChild},Funnel:{handler:p.renderGraphicChild},Tooltip:{handler:p.renderCursor,once:!0},PolarGrid:{handler:p.renderPolarGrid,once:!0},PolarAngleAxis:{handler:p.renderPolarAxis},PolarRadiusAxis:{handler:p.renderPolarAxis},Customized:{handler:p.renderCustomized}}),p.clipPathId="".concat((w=O.id)!==null&&w!==void 0?w:Er("recharts"),"-clip"),p.throttleTriggeredAfterMouseMove=Jh(p.triggeredAfterMouseMove,(T=O.throttleDelay)!==null&&T!==void 0?T:1e3/60),p.state={},p}return LW(x,y),NW(x,[{key:"componentDidMount",value:function(){var w,T;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var w=this.props,T=w.children,p=w.data,g=w.height,A=w.layout,P=pt(T,Ft);if(P){var _=P.props.defaultIndex;if(!(typeof _!="number"||_<0||_>this.state.tooltipTicks.length-1)){var R=this.state.tooltipTicks[_]&&this.state.tooltipTicks[_].value,M=af(this.state,p,_,R),C=this.state.tooltipTicks[_].coordinate,W=(this.state.offset.top+g)/2,U=A==="horizontal",F=U?{x:C,y:W}:{y:C,x:W},N=this.state.formattedGraphicalItems.find(function(L){var E=L.item;return E.type.name==="Scatter"});N&&(F=K(K({},F),N.props.points[_].tooltipPosition),M=N.props.points[_].tooltipPayload);var D={activeTooltipIndex:_,isTooltipActive:!0,activeLabel:R,activePayload:M,activeCoordinate:F};this.setState(D),this.renderCursor(P),this.accessibilityManager.setIndex(_)}}}},{key:"getSnapshotBeforeUpdate",value:function(w,T){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==T.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 p,g;this.accessibilityManager.setDetails({offset:{left:(p=this.props.margin.left)!==null&&p!==void 0?p:0,top:(g=this.props.margin.top)!==null&&g!==void 0?g:0}})}return null}},{key:"componentDidUpdate",value:function(w){il([pt(w.children,Ft)],[pt(this.props.children,Ft)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var w=pt(this.props.children,Ft);if(w&&typeof w.props.shared=="boolean"){var T=w.props.shared?"axis":"item";return s.indexOf(T)>=0?T:i}return i}},{key:"getMouseInfo",value:function(w){if(!this.container)return null;var T=this.container,p=T.getBoundingClientRect(),g=ek(p),A={chartX:Math.round(w.pageX-g.left),chartY:Math.round(w.pageY-g.top)},P=p.width/T.offsetWidth||1,_=this.inRange(A.chartX,A.chartY,P);if(!_)return null;var R=this.state,M=R.xAxisMap,C=R.yAxisMap,W=this.getTooltipEventType(),U=lb(this.state,this.props.data,this.props.layout,_);if(W!=="axis"&&M&&C){var F=dr(M).scale,N=dr(C).scale,D=F&&F.invert?F.invert(A.chartX):null,L=N&&N.invert?N.invert(A.chartY):null;return K(K({},A),{},{xValue:D,yValue:L},U)}return U?K(K({},A),U):null}},{key:"inRange",value:function(w,T){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,g=this.props.layout,A=w/p,P=T/p;if(g==="horizontal"||g==="vertical"){var _=this.state.offset,R=A>=_.left&&A<=_.left+_.width&&P>=_.top&&P<=_.top+_.height;return R?{x:A,y:P}:null}var M=this.state,C=M.angleAxisMap,W=M.radiusAxisMap;if(C&&W){var U=dr(C);return yy({x:A,y:P},U)}return null}},{key:"parseEventsOfWrapper",value:function(){var w=this.props.children,T=this.getTooltipEventType(),p=pt(w,Ft),g={};p&&T==="axis"&&(p.props.trigger==="click"?g={onClick:this.handleClick}:g={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 A=Ni(this.props,this.handleOuterEvent);return K(K({},A),g)}},{key:"addListener",value:function(){Qc.on(ef,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Qc.removeListener(ef,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(w,T,p){for(var g=this.state.formattedGraphicalItems,A=0,P=g.length;A<P;A++){var _=g[A];if(_.item===w||_.props.key===w.key||T===Jt(_.item.type)&&p===_.childIndex)return _}return null}},{key:"renderClipPath",value:function(){var w=this.clipPathId,T=this.state.offset,p=T.left,g=T.top,A=T.height,P=T.width;return S.createElement("defs",null,S.createElement("clipPath",{id:w},S.createElement("rect",{x:p,y:g,height:A,width:P})))}},{key:"getXScales",value:function(){var w=this.state.xAxisMap;return w?Object.entries(w).reduce(function(T,p){var g=eb(p,2),A=g[0],P=g[1];return K(K({},T),{},se({},A,P.scale))},{}):null}},{key:"getYScales",value:function(){var w=this.state.yAxisMap;return w?Object.entries(w).reduce(function(T,p){var g=eb(p,2),A=g[0],P=g[1];return K(K({},T),{},se({},A,P.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(w){var T;return(T=this.state.xAxisMap)===null||T===void 0||(T=T[w])===null||T===void 0?void 0:T.scale}},{key:"getYScaleByAxisId",value:function(w){var T;return(T=this.state.yAxisMap)===null||T===void 0||(T=T[w])===null||T===void 0?void 0:T.scale}},{key:"getItemByXY",value:function(w){var T=this.state,p=T.formattedGraphicalItems,g=T.activeItem;if(p&&p.length)for(var A=0,P=p.length;A<P;A++){var _=p[A],R=_.props,M=_.item,C=M.type.defaultProps!==void 0?K(K({},M.type.defaultProps),M.props):M.props,W=Jt(M.type);if(W==="Bar"){var U=(R.data||[]).find(function(L){return F3(w,L)});if(U)return{graphicalItem:_,payload:U}}else if(W==="RadialBar"){var F=(R.data||[]).find(function(L){return yy(w,L)});if(F)return{graphicalItem:_,payload:F}}else if(Xo(_,g)||Jo(_,g)||ii(_,g)){var N=U5({graphicalItem:_,activeTooltipItem:g,itemData:C.data}),D=C.activeIndex===void 0?N:C.activeIndex;return{graphicalItem:K(K({},_),{},{childIndex:D}),payload:ii(_,g)?C.data[N]:_.props.data[N]}}}return null}},{key:"render",value:function(){var w=this;if(!Jf(this))return null;var T=this.props,p=T.children,g=T.className,A=T.width,P=T.height,_=T.style,R=T.compact,M=T.title,C=T.desc,W=tb(T,_W),U=de(W,!1);if(R)return S.createElement(Zm,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},S.createElement(sl,Qn({},U,{width:A,height:P,title:M,desc:C}),this.renderClipPath(),ed(p,this.renderMap)));if(this.props.accessibilityLayer){var F,N;U.tabIndex=(F=this.props.tabIndex)!==null&&F!==void 0?F:0,U.role=(N=this.props.role)!==null&&N!==void 0?N:"application",U.onKeyDown=function(L){w.accessibilityManager.keyboardEvent(L)},U.onFocus=function(){w.accessibilityManager.focus()}}var D=this.parseEventsOfWrapper();return S.createElement(Zm,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},S.createElement("div",Qn({className:ve("recharts-wrapper",g),style:K({position:"relative",cursor:"default",width:A,height:P},_)},D,{ref:function(E){w.container=E}}),S.createElement(sl,Qn({},U,{width:A,height:P,title:M,desc:C,style:KW}),this.renderClipPath(),ed(p,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(S.Component);se(m,"displayName",r),se(m,"defaultProps",K({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),se(m,"getDerivedStateFromProps",function(y,x){var O=y.dataKey,w=y.data,T=y.children,p=y.width,g=y.height,A=y.layout,P=y.stackOffset,_=y.margin,R=x.dataStartIndex,M=x.dataEndIndex;if(x.updateId===void 0){var C=ub(y);return K(K(K({},C),{},{updateId:0},h(K(K({props:y},C),{},{updateId:0}),x)),{},{prevDataKey:O,prevData:w,prevWidth:p,prevHeight:g,prevLayout:A,prevStackOffset:P,prevMargin:_,prevChildren:T})}if(O!==x.prevDataKey||w!==x.prevData||p!==x.prevWidth||g!==x.prevHeight||A!==x.prevLayout||P!==x.prevStackOffset||!ln(_,x.prevMargin)){var W=ub(y),U={chartX:x.chartX,chartY:x.chartY,isTooltipActive:x.isTooltipActive},F=K(K({},lb(x,w,A)),{},{updateId:x.updateId+1}),N=K(K(K({},W),U),F);return K(K(K({},N),h(K({props:y},N),x)),{},{prevDataKey:O,prevData:w,prevWidth:p,prevHeight:g,prevLayout:A,prevStackOffset:P,prevMargin:_,prevChildren:T})}if(!il(T,x.prevChildren)){var D,L,E,j,I=pt(T,Nn),B=I&&(D=(L=I.props)===null||L===void 0?void 0:L.startIndex)!==null&&D!==void 0?D:R,z=I&&(E=(j=I.props)===null||j===void 0?void 0:j.endIndex)!==null&&E!==void 0?E:M,V=B!==R||z!==M,Z=!fe(w),Q=Z&&!V?x.updateId:x.updateId+1;return K(K({updateId:Q},h(K(K({props:y},x),{},{updateId:Q,dataStartIndex:B,dataEndIndex:z}),x)),{},{prevChildren:T,dataStartIndex:B,dataEndIndex:z})}return null}),se(m,"renderActiveDot",function(y,x,O){var w;return S.isValidElement(y)?w=S.cloneElement(y,x):he(y)?w=y(x):w=S.createElement(Vo,x),S.createElement(be,{className:"recharts-active-dot",key:O},w)});var v=S.forwardRef(function(x,O){return S.createElement(m,Qn({},x,{ref:O}))});return v.displayName=m.displayName,v},t8=e8({chartName:"ComposedChart",GraphicalChild:[fi,Sr,Rn,bs],axisComponents:[{axisType:"xAxis",AxisComp:ws},{axisType:"yAxis",AxisComp:Ss},{axisType:"zAxis",AxisComp:ms}],formatAxisMap:h6});const ta=({className:e,width:t,height:r,rounded:n=!1})=>b.jsx("div",{className:ue("animate-pulse bg-gray-200",n?"rounded-full":"rounded",e),style:{width:typeof t=="number"?`${t}px`:t,height:typeof r=="number"?`${r}px`:r}}),yi=({className:e})=>b.jsxs("div",{className:ue("rounded-lg border border-gray-200 bg-white p-4",e),children:[b.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[b.jsx(ta,{className:"h-4 w-16"}),b.jsx(ta,{className:"h-4 w-4",rounded:!0})]}),b.jsxs("div",{className:"flex items-baseline gap-3",children:[b.jsx(ta,{className:"h-8 w-20"}),b.jsx(ta,{className:"h-6 w-12 rounded-md"})]})]}),fb=({className:e,chartType:t="line",height:r=300})=>{const n=o=>{if(o.length===0)return"";let s=`M ${o[0].x} ${o[0].y}`;for(let l=1;l<o.length;l++){const u=o[l];s+=` L ${u.x} ${u.y}`}return s},a=(o=7)=>Array.from({length:o},(c,f)=>({x:f/(o-1)*100,y:80-Math.random()*60})),i=()=>{switch(t){case"bar":return b.jsx("div",{className:"absolute inset-0 flex items-end justify-between px-4 pb-4",children:[...Array(7)].map((m,v)=>b.jsx(ta,{className:"w-8 bg-blue-100",height:`${Math.random()*60+20}%`},v))});case"line":const o=a(),s=a(7).map(m=>({x:m.x,y:m.y+5})),l=a(7).map(m=>({x:m.x,y:m.y-8}));return b.jsx("div",{className:"absolute inset-0 p-4",children:b.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[b.jsxs("defs",{children:[b.jsxs("linearGradient",{id:"skeleton-shimmer",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[b.jsx("stop",{offset:"0%",stopColor:"#f1f5f9",stopOpacity:"0.3"}),b.jsx("stop",{offset:"20%",stopColor:"#e2e8f0",stopOpacity:"0.8"}),b.jsx("stop",{offset:"40%",stopColor:"#cbd5e1",stopOpacity:"1"}),b.jsx("stop",{offset:"60%",stopColor:"#e2e8f0",stopOpacity:"0.8"}),b.jsx("stop",{offset:"100%",stopColor:"#f1f5f9",stopOpacity:"0.3"}),b.jsx("animateTransform",{attributeName:"gradientTransform",type:"translate",values:"-100 0;200 0;-100 0",dur:"2s",repeatCount:"indefinite"})]}),b.jsxs("linearGradient",{id:"skeleton-shimmer-2",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[b.jsx("stop",{offset:"0%",stopColor:"#f8fafc",stopOpacity:"0.2"}),b.jsx("stop",{offset:"20%",stopColor:"#f1f5f9",stopOpacity:"0.6"}),b.jsx("stop",{offset:"40%",stopColor:"#e2e8f0",stopOpacity:"0.8"}),b.jsx("stop",{offset:"60%",stopColor:"#f1f5f9",stopOpacity:"0.6"}),b.jsx("stop",{offset:"100%",stopColor:"#f8fafc",stopOpacity:"0.2"}),b.jsx("animateTransform",{attributeName:"gradientTransform",type:"translate",values:"-100 0;200 0;-100 0",dur:"2s",repeatCount:"indefinite",begin:"0.3s"})]}),b.jsxs("linearGradient",{id:"skeleton-shimmer-3",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[b.jsx("stop",{offset:"0%",stopColor:"#fefefe",stopOpacity:"0.1"}),b.jsx("stop",{offset:"20%",stopColor:"#f8fafc",stopOpacity:"0.4"}),b.jsx("stop",{offset:"40%",stopColor:"#f1f5f9",stopOpacity:"0.6"}),b.jsx("stop",{offset:"60%",stopColor:"#f8fafc",stopOpacity:"0.4"}),b.jsx("stop",{offset:"100%",stopColor:"#fefefe",stopOpacity:"0.1"}),b.jsx("animateTransform",{attributeName:"gradientTransform",type:"translate",values:"-100 0;200 0;-100 0",dur:"2s",repeatCount:"indefinite",begin:"0.6s"})]})]}),b.jsx("path",{d:n(o),stroke:"url(#skeleton-shimmer)",strokeWidth:"0.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),b.jsx("path",{d:n(s),stroke:"url(#skeleton-shimmer-2)",strokeWidth:"0.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),b.jsx("path",{d:n(l),stroke:"url(#skeleton-shimmer-3)",strokeWidth:"0.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]})});case"area":const u=a(),c=n(u),f=u[u.length-1],d=u[0],h=`${c} L ${f.x} 90 L ${d.x} 90 Z`;return b.jsx("div",{className:"absolute inset-0 p-4",children:b.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[b.jsxs("defs",{children:[b.jsxs("linearGradient",{id:"skeleton-area-gradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[b.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.2",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.2;0.4;0.2",dur:"2s",repeatCount:"indefinite"})}),b.jsx("stop",{offset:"100%",stopColor:"#3b82f6",stopOpacity:"0.05",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.05;0.1;0.05",dur:"2s",repeatCount:"indefinite"})})]}),b.jsxs("linearGradient",{id:"skeleton-area-line",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[b.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.4",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.4;0.8;0.4",dur:"2s",repeatCount:"indefinite"})}),b.jsx("stop",{offset:"50%",stopColor:"#3b82f6",stopOpacity:"0.8",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.8;0.4;0.8",dur:"2s",repeatCount:"indefinite"})}),b.jsx("stop",{offset:"100%",stopColor:"#3b82f6",stopOpacity:"0.4",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.4;0.8;0.4",dur:"2s",repeatCount:"indefinite"})})]})]}),b.jsx("path",{d:h,fill:"url(#skeleton-area-gradient)"}),b.jsx("path",{d:n(u),stroke:"url(#skeleton-area-line)",strokeWidth:"2.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]})});case"pie":return b.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-4",children:b.jsxs("svg",{className:"w-32 h-32",viewBox:"0 0 42 42",children:[b.jsxs("defs",{children:[b.jsx("linearGradient",{id:"skeleton-pie-gradient-1",children:b.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.3",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite"})})}),b.jsx("linearGradient",{id:"skeleton-pie-gradient-2",children:b.jsx("stop",{offset:"0%",stopColor:"#10b981",stopOpacity:"0.3",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"0.5s"})})}),b.jsx("linearGradient",{id:"skeleton-pie-gradient-3",children:b.jsx("stop",{offset:"0%",stopColor:"#f59e0b",stopOpacity:"0.3",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"1s"})})}),b.jsx("linearGradient",{id:"skeleton-pie-gradient-4",children:b.jsx("stop",{offset:"0%",stopColor:"#ef4444",stopOpacity:"0.3",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"1.5s"})})})]}),b.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"#e5e7eb",strokeWidth:"3"}),b.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-1)",strokeWidth:"3",strokeDasharray:"40 60",strokeDashoffset:"25"}),b.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-2)",strokeWidth:"3",strokeDasharray:"25 75",strokeDashoffset:"65"}),b.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-3)",strokeWidth:"3",strokeDasharray:"20 80",strokeDashoffset:"90"}),b.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-4)",strokeWidth:"3",strokeDasharray:"15 85",strokeDashoffset:"110"})]})});default:return b.jsx("div",{className:"absolute inset-0 p-4",children:b.jsxs("div",{className:"w-full h-full relative",children:[b.jsx("div",{className:"absolute inset-0 flex items-center",children:b.jsx("div",{className:"w-full h-0.5 bg-gradient-to-r from-transparent via-gray-300 to-transparent opacity-60",children:b.jsx("div",{className:"w-full h-full bg-gradient-to-r from-transparent via-blue-400 to-transparent animate-pulse"})})}),b.jsx("div",{className:"absolute inset-0 flex items-center justify-between px-2",children:[...Array(7)].map((m,v)=>b.jsx("div",{className:"w-2 h-2 bg-blue-300 rounded-full animate-pulse",style:{animationDelay:`${v*.2}s`}},v))})]})})}};return b.jsx("div",{className:ue("w-full",e),children:b.jsxs("div",{className:"relative bg-gray-50/30 py-6",children:[b.jsxs("div",{className:"relative mb-4",style:{height:`${r}px`},children:[b.jsxs("div",{className:"absolute left-0 top-0 h-full flex flex-col justify-between items-end pr-2",children:[b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-8"}),b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-8"}),b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-8"}),b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-8"}),b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-8"}),b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-8"})]}),b.jsxs("div",{className:"ml-12 h-full relative overflow-hidden px-0 py-2 flex flex-col justify-between",children:[t!=="pie"&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"absolute inset-0",children:b.jsx("div",{className:"w-0 h-full border-l border-gray-100"})})]}),i()]}),t!=="pie"&&b.jsxs("div",{className:"ml-12 flex justify-between items-center mt-2",children:[b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-3.5"}),b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-3.5"}),b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-3.5"}),b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-3.5"}),b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-3.5"}),b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-3.5"}),b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-3.5"})]})]}),b.jsxs("div",{className:"flex items-center justify-between px-0 py-1",children:[b.jsx("div",{className:"flex-1",children:b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-[253px]"})}),b.jsxs("div",{className:"flex items-center gap-2 w-[100px] justify-center",children:[b.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded flex-1"})]})]})]})})},r8=({active:e,payload:t,label:r,config:n})=>{var o;if(!e||!t||!t.length)return null;const a=t.filter(s=>s.name&&s.name!==""&&s.name!==s.dataKey);if(a.length===0)return null;const i=((o=n.tooltip)==null?void 0:o.style)==="dark";return b.jsxs("div",{className:ue("rounded-lg border px-3 py-2 text-sm shadow-lg",i?"bg-gray-900 border-gray-700 text-white":"bg-white border-gray-200 text-gray-900"),children:[b.jsx("div",{className:ue("font-medium mb-1",i?"text-gray-300":"text-gray-600"),children:new Date(r||"").toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}),b.jsx("div",{className:"space-y-1",children:a.map((s,l)=>b.jsxs("div",{className:"flex items-center justify-between gap-4",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:s.color}}),b.jsx("span",{className:ue("text-sm",i?"text-gray-300":"text-gray-600"),children:s.name})]}),b.jsx("span",{className:ue("font-medium",i?"text-white":"text-gray-900"),children:typeof s.value=="number"?s.value.toLocaleString():s.value})]},l))})]})},db=({config:e,className:t,isLoading:r})=>{const{data:n,dataKey:a,color:i="#3b82f6",lines:o,dateRange:s,yAxisLabel:l,height:u=300,tooltip:c={show:!0,style:"dark"}}=e,f=v=>{const y=new Date(v);return isNaN(y.getTime())?v:y.getDate().toString()},d=v=>v>=1e3?`${(v/1e3).toFixed(0)}k`:v.toString(),m=o&&o.length>0?o:[{dataKey:a||"value",color:i,label:e.title,strokeWidth:2}];return r?(console.log("AnalyticsChart: Loading state active"),b.jsx(fb,{className:t,chartType:e.type,height:u})):!n||n.length===0?(console.log("AnalyticsChart: No data provided",{data:n,config:e}),b.jsx("div",{className:ue("w-full",t),children:b.jsxs("div",{className:"relative bg-gray-50/30 py-6",children:[b.jsxs("div",{className:"relative h-[300px] mb-4",children:[b.jsxs("div",{className:"absolute left-0 top-0 h-full flex flex-col justify-between items-end pr-2",children:[b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-8"}),b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-8"}),b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-8"}),b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-8"}),b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-8"}),b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-8"})]}),b.jsxs("div",{className:"ml-12 h-full relative overflow-hidden px-0 py-2 flex flex-col justify-between",children:[b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"absolute inset-0",children:b.jsx("div",{className:"w-0 h-full border-l border-gray-100"})}),b.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-4",children:[b.jsx("div",{className:"bg-white border border-gray-300 rounded-[10px] w-12 h-12 flex items-center justify-center",children:b.jsx("svg",{className:"w-6 h-6 text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})}),b.jsxs("div",{className:"text-center max-w-[352px]",children:[b.jsx("h3",{className:"font-semibold text-gray-900 text-base mb-1",children:"There is no data to display for this period"}),b.jsx("p",{className:"font-normal text-gray-600 text-sm leading-5",children:"Try selecting a different date range or ensure your app is deployed and receiving traffic."})]})]})]}),b.jsxs("div",{className:"ml-12 flex justify-between items-center mt-2",children:[b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-3.5"}),b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-3.5"}),b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-3.5"}),b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-3.5"}),b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-3.5"}),b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-3.5"}),b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-3.5"})]})]}),b.jsxs("div",{className:"flex items-center justify-between px-0 py-1",children:[b.jsx("div",{className:"flex-1",children:b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded w-[253px]"})}),b.jsxs("div",{className:"flex items-center gap-2 w-[100px] justify-center",children:[b.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),b.jsx("div",{className:"bg-gray-100 h-[10.5px] rounded flex-1"})]})]})]})})):(console.log("=== ANALYTICS CHART DEBUG ==="),console.log("AnalyticsChart config:",e),console.log("AnalyticsChart data:",JSON.stringify(n,null,2)),console.log("AnalyticsChart dataKey:",a),console.log("Chart lines configuration:",m),console.log("Sample data point:",n[0]),console.log("Data point keys:",Object.keys(n[0]||{})),console.log("=== END ANALYTICS CHART DEBUG ==="),b.jsxs("div",{className:ue("w-full",t),children:[b.jsx("div",{className:"relative bg-gray-50/30 py-6",children:b.jsx(VM,{width:"100%",height:u,children:b.jsxs(t8,{data:n,margin:{top:20,right:30,left:20,bottom:20},children:[b.jsx("defs",{children:m.map((v,y)=>b.jsxs("linearGradient",{id:`gradient-${v.dataKey}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[b.jsx("stop",{offset:"5%",stopColor:v.color,stopOpacity:.08}),b.jsx("stop",{offset:"95%",stopColor:v.color,stopOpacity:.01})]},`gradient-${y}`))}),b.jsx(Ag,{strokeDasharray:"2 2",className:"opacity-30",stroke:"#d1d5db",horizontal:!0,vertical:!0}),b.jsx(ws,{dataKey:"date",tickFormatter:f,axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#6b7280"},tickMargin:10}),b.jsx(Ss,{axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#6b7280"},tickFormatter:d,tickMargin:10,label:l?{value:l,angle:-90,position:"insideLeft",style:{textAnchor:"middle",fontSize:12,fill:"#6b7280"}}:void 0}),c.show&&b.jsx(Ft,{content:v=>b.jsx(r8,{...v,config:e}),cursor:{stroke:"#d1d5db",strokeWidth:1,strokeDasharray:"4 4"},allowEscapeViewBox:{x:!1,y:!1}}),m.map(v=>b.jsx(Sr,{type:"monotone",dataKey:v.dataKey,stroke:"none",fill:`url(#gradient-${v.dataKey})`,fillOpacity:1,isAnimationActive:!1,name:""},`area-${v.dataKey}`)),m.map(v=>b.jsx(fi,{type:"monotone",dataKey:v.dataKey,stroke:v.color,strokeWidth:2.5,strokeDasharray:v.strokeDasharray,dot:!1,activeDot:{r:5,fill:v.color,stroke:v.color,strokeWidth:2},name:v.label},v.dataKey))]})})}),b.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[b.jsx("div",{children:s&&b.jsxs("p",{className:"text-sm text-muted-foreground",children:["Showing data from ",new Date(s.start).toLocaleDateString("en-US",{day:"numeric",month:"short",year:"numeric"})," - ",new Date(s.end).toLocaleDateString("en-US",{day:"numeric",month:"short",year:"numeric"})]})}),b.jsx("div",{className:"flex items-center gap-4",children:b.jsx("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:m.map(v=>b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:v.color}}),b.jsx("span",{children:v.label})]},v.dataKey))})})]})]}))},hb=({config:e,className:t})=>{const{title:r,data:n,columns:a,pagination:i={enabled:!0,pageSize:10},sorting:o={enabled:!0},filtering:s={enabled:!0,searchable:!0}}=e,[l,u]=S.useState(o.defaultSort||null),[c,f]=S.useState(""),[d,h]=S.useState(1),m=S.useMemo(()=>{let p=[...n];return s.searchable&&c&&(p=p.filter(g=>a.some(A=>{const P=g[A.key];return P==null?void 0:P.toString().toLowerCase().includes(c.toLowerCase())}))),l&&p.sort((g,A)=>{const P=g[l.key],_=A[l.key];if(typeof P=="number"&&typeof _=="number")return l.order==="asc"?P-_:_-P;const R=(P==null?void 0:P.toString())||"",M=(_==null?void 0:_.toString())||"",C=R.localeCompare(M);return l.order==="asc"?C:-C}),p},[n,a,c,l,s.searchable]),v=i.enabled?Math.ceil(m.length/i.pageSize):1,y=i.enabled?m.slice((d-1)*i.pageSize,d*i.pageSize):m,x=p=>{!o.enabled||!p.sortable||u(g=>(g==null?void 0:g.key)===p.key?g.order==="asc"?{key:p.key,order:"desc"}:null:{key:p.key,order:"asc"})},O=p=>{f(p),h(1)},w=(p,g,A)=>g.render?g.render(p,A):g.formatter?g.formatter(p,A):typeof p=="number"?p.toLocaleString():(p==null?void 0:p.toString())||"-",T=p=>!o.enabled||!p.sortable?null:(l==null?void 0:l.key)===p.key?l.order==="asc"?b.jsx(vf,{className:"w-4 h-4"}):b.jsx(_i,{className:"w-4 h-4"}):b.jsxs("div",{className:"flex flex-col",children:[b.jsx(vf,{className:"w-3 h-3 opacity-30"}),b.jsx(_i,{className:"w-3 h-3 opacity-30 -mt-1"})]});return b.jsxs("div",{className:ue("w-full",t),children:[b.jsxs("div",{className:"flex items-center justify-between mb-4",children:[b.jsx("h3",{className:"text-lg font-semibold",children:r}),s.enabled&&s.searchable&&b.jsxs("div",{className:"relative",children:[b.jsx(yf,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"}),b.jsx("input",{type:"text",placeholder:"Search...",value:c,onChange:p=>O(p.target.value),className:"pl-10 pr-4 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]})]}),b.jsx("div",{className:"overflow-x-auto border border-gray-200 rounded-lg",children:b.jsxs("table",{className:"w-full",children:[b.jsx("thead",{className:"bg-gray-50",children:b.jsx("tr",{children:a.map(p=>b.jsx("th",{className:ue("px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",p.sortable&&o.enabled&&"cursor-pointer hover:bg-gray-100",p.align==="center"&&"text-center",p.align==="right"&&"text-right"),style:{width:p.width},onClick:()=>x(p),children:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("span",{children:p.title}),T(p)]})},p.key))})}),b.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:y.map((p,g)=>b.jsx("tr",{className:"hover:bg-gray-50 transition-colors",children:a.map(A=>b.jsx("td",{className:ue("px-4 py-3 text-sm text-gray-900",A.align==="center"&&"text-center",A.align==="right"&&"text-right"),children:w(p[A.key],A,p)},A.key))},g))})]})}),i.enabled&&v>1&&b.jsxs("div",{className:"flex items-center justify-between mt-4",children:[b.jsxs("div",{className:"text-sm text-gray-500",children:["Showing ",(d-1)*i.pageSize+1," to"," ",Math.min(d*i.pageSize,m.length)," of"," ",m.length," results"]}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("button",{onClick:()=>h(p=>Math.max(1,p-1)),disabled:d===1,className:"px-3 py-1 text-sm border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),Array.from({length:Math.min(5,v)},(p,g)=>{const A=Math.max(1,Math.min(v-4,d-2))+g;return A>v?null:b.jsx("button",{onClick:()=>h(A),className:ue("px-3 py-1 text-sm border rounded",d===A?"bg-blue-500 text-white border-blue-500":"border-gray-200 hover:bg-gray-50"),children:A},A)}),b.jsx("button",{onClick:()=>h(p=>Math.min(v,p+1)),disabled:d===v,className:"px-3 py-1 text-sm border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),y.length===0&&b.jsx("div",{className:"text-center py-8 text-gray-500",children:c?"No results found for your search.":"No data available."})]})},pb=({data:e,className:t})=>{const[r,n]=S.useState(5),a=()=>{n(o=>Math.min(o+10,e.length))},i=o=>o>=1e3?`${Math.floor(o/1e3)}k`:o.toString();return b.jsxs("div",{className:ue("w-full",t),children:[b.jsxs("div",{className:"grid grid-cols-4 gap-4 px-4 py-3 bg-gray-50 border-b border-gray-200 text-sm font-medium text-gray-700",children:[b.jsx("div",{className:"text-left",children:"Name"}),b.jsx("div",{className:"text-right",children:"Runs"}),b.jsx("div",{className:"text-right",children:"Response Time"}),b.jsx("div",{className:"text-right",children:"Tokens"})]}),b.jsx("div",{className:"divide-y divide-gray-100",children:e.slice(0,r).map((o,s)=>b.jsxs("div",{className:"grid grid-cols-4 gap-4 px-4 py-4 hover:bg-gray-50 transition-colors duration-150",children:[b.jsxs("div",{className:"flex items-center space-x-3",children:[b.jsx("div",{className:"flex-shrink-0",children:b.jsx("img",{src:o.avatar||`https://api.dicebear.com/7.x/avataaars/svg?seed=${o.name}&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid`,alt:o.name,className:"w-8 h-8 rounded-full"})}),b.jsx("div",{className:"min-w-0 flex-1",children:b.jsx("div",{className:"text-sm font-medium text-gray-900 truncate",children:o.name})})]}),b.jsx("div",{className:"text-right text-sm text-gray-900",children:i(o.runs)}),b.jsx("div",{className:"text-right text-sm text-gray-900",children:o.responseTime}),b.jsx("div",{className:"text-right text-sm text-gray-900",children:i(o.tokens)})]},o.id||s))}),r<e.length&&b.jsx("div",{className:"flex justify-center py-6",children:b.jsx("button",{onClick:a,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors duration-150",children:"Load 10 more"})})]})},n8=e=>{switch(e.toLowerCase()){case"code tool":return"bg-orange-100 text-orange-800 border-orange-200";case"workflow tool":return"bg-blue-100 text-blue-800 border-blue-200";case"mcp tool":return"bg-green-100 text-green-800 border-green-200";case"knowledge":return"bg-purple-100 text-purple-800 border-purple-200";default:return"bg-gray-100 text-gray-800 border-gray-200"}},a8=e=>{const t={"calculate-creditscore":"🎯","calculate-risk":"⭐","calculate-mortgage":"🔵","analyse-expenses":"⚡","fetch-statement":"💜",default:"🔧"};return t[e]||t.default},vb=({data:e,className:t})=>{const[r,n]=S.useState(5),a=()=>{n(o=>Math.min(o+10,e.length))},i=o=>o>=1e3?`${Math.floor(o/1e3)}k`:o.toString();return b.jsxs("div",{className:ue("w-full",t),children:[b.jsxs("div",{className:"grid grid-cols-4 gap-4 px-4 py-3 bg-gray-50 border-b border-gray-200 text-sm font-medium text-gray-700",children:[b.jsx("div",{className:"text-left",children:"Name"}),b.jsx("div",{className:"text-left",children:"Type"}),b.jsx("div",{className:"text-right",children:"Runs"}),b.jsx("div",{className:"text-right",children:"Response Time"})]}),b.jsx("div",{className:"divide-y divide-gray-100",children:e.slice(0,r).map((o,s)=>b.jsxs("div",{className:"grid grid-cols-4 gap-4 px-4 py-4 hover:bg-gray-50 transition-colors duration-150",children:[b.jsxs("div",{className:"flex items-center space-x-3",children:[b.jsx("div",{className:"flex-shrink-0",children:b.jsx("div",{className:"w-8 h-8 rounded-full bg-gray-100 flex items-center justify-center text-lg",children:a8(o.name)})}),b.jsx("div",{className:"min-w-0 flex-1",children:b.jsx("div",{className:"text-sm font-medium text-gray-900 truncate",children:o.name})})]}),b.jsx("div",{className:"flex items-center",children:b.jsx("span",{className:ue("inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border",n8(o.type||"Default")),children:o.type||"Tool"})}),b.jsx("div",{className:"text-right text-sm text-gray-900",children:i(o.runs)}),b.jsx("div",{className:"text-right text-sm text-gray-900",children:o.responseTime})]},o.id||s))}),r<e.length&&b.jsx("div",{className:"flex justify-center py-6",children:b.jsx("button",{onClick:a,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors duration-150",children:"Load 10 more"})})]})},i8=e=>{const t=e.toLowerCase();return t.includes("gpt")||t.includes("openai")?b.jsx("div",{className:"w-6 h-6 rounded-full bg-gray-900 flex items-center justify-center",children:b.jsx("span",{className:"text-white text-xs font-bold",children:"⚡"})}):t.includes("claude")||t.includes("anthropic")?b.jsx("div",{className:"w-6 h-6 rounded-full bg-orange-500 flex items-center justify-center",children:b.jsx("span",{className:"text-white text-xs font-bold",children:"A"})}):t.includes("gemini")||t.includes("google")?b.jsx("div",{className:"w-6 h-6 rounded-full bg-blue-500 flex items-center justify-center",children:b.jsx("span",{className:"text-white text-xs font-bold",children:"G"})}):t.includes("llama")||t.includes("meta")?b.jsx("div",{className:"w-6 h-6 rounded-full bg-blue-600 flex items-center justify-center",children:b.jsx("span",{className:"text-white text-xs font-bold",children:"M"})}):b.jsx("div",{className:"w-6 h-6 rounded-full bg-gray-500 flex items-center justify-center",children:b.jsx("span",{className:"text-white text-xs font-bold",children:"🤖"})})},yb=({data:e,className:t})=>{const[r,n]=S.useState(5),a=()=>{n(o=>Math.min(o+10,e.length))},i=o=>o>=1e3?`${Math.floor(o/1e3)}k`:o.toString();return b.jsxs("div",{className:ue("w-full",t),children:[b.jsxs("div",{className:"grid grid-cols-4 gap-4 px-4 py-3 bg-gray-50 border-b border-gray-200 text-sm font-medium text-gray-700",children:[b.jsx("div",{className:"text-left",children:"Model Name"}),b.jsx("div",{className:"text-right",children:"Runs"}),b.jsx("div",{className:"text-right",children:"Tokens"}),b.jsx("div",{className:"text-right",children:"Response Time"})]}),b.jsx("div",{className:"divide-y divide-gray-100",children:e.slice(0,r).map((o,s)=>b.jsxs("div",{className:"grid grid-cols-4 gap-4 px-4 py-4 hover:bg-gray-50 transition-colors duration-150",children:[b.jsxs("div",{className:"flex items-center space-x-3",children:[b.jsx("div",{className:"flex-shrink-0",children:i8(o.name)}),b.jsx("div",{className:"min-w-0 flex-1",children:b.jsx("div",{className:"text-sm font-medium text-gray-900 truncate",children:o.name})})]}),b.jsx("div",{className:"text-right text-sm text-gray-900",children:i(o.runs)}),b.jsx("div",{className:"text-right text-sm text-gray-900",children:i(o.tokens)}),b.jsx("div",{className:"text-right text-sm text-gray-900",children:o.responseTime})]},o.id||s))}),r<e.length&&b.jsx("div",{className:"flex justify-center py-6",children:b.jsx("button",{onClick:a,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors duration-150",children:"Load 10 more"})})]})},mb=({config:e,className:t,isLoading:r,context:n})=>{const{type:a,chart:i,table:o,layout:s="vertical"}=e,l=()=>i?(console.log("ViewRenderer - Chart config:",i),console.log("ViewRenderer - Chart data:",i.data),console.log("ViewRenderer - Context:",n),b.jsx("div",{className:"flex-1",children:b.jsx(db,{config:i,isLoading:r})})):null,u=()=>o?(n==null?void 0:n.metricType)==="agentRuns"?b.jsx("div",{className:"flex-1",children:b.jsx(pb,{data:o.data})}):(n==null?void 0:n.metricType)==="toolRuns"?b.jsx("div",{className:"flex-1",children:b.jsx(vb,{data:o.data})}):(n==null?void 0:n.metricType)==="modelRuns"?b.jsx("div",{className:"flex-1",children:b.jsx(yb,{data:o.data})}):b.jsx("div",{className:"flex-1",children:b.jsx(hb,{config:o})}):null,c=()=>{switch(a){case"chart":return l();case"table":return u();case"mixed":return b.jsxs("div",{className:ue("flex gap-6",s==="horizontal"?"flex-row":"flex-col"),children:[l(),u()]});default:return b.jsxs("div",{className:"p-4 text-center text-gray-500",children:["Unsupported view type: ",a]})}};return b.jsx("div",{className:ue("w-full",t),children:c()})},js=({options:e,value:t,placeholder:r="Select an option",onChange:n,className:a,disabled:i=!1})=>{const[o,s]=S.useState(!1),[l,u]=S.useState(t||""),c=S.useRef(null),f=e.find(m=>m.value===l);S.useEffect(()=>{const m=v=>{c.current&&!c.current.contains(v.target)&&s(!1)};return o&&document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[o]);const d=m=>{i||(u(m),s(!1),n==null||n(m))},h=()=>{i||s(!o)};return b.jsxs("div",{ref:c,className:ue("relative min-w-[200px]",a),children:[b.jsxs("button",{type:"button",className:ue("flex h-10 w-full min-w-[200px] items-center justify-between rounded-md border border-gray-300 bg-white px-3 py-2 text-sm shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 disabled:cursor-not-allowed disabled:opacity-50 transition-colors",a),onClick:h,disabled:i,children:[b.jsx("span",{className:ue("truncate",!f&&"text-gray-500"),children:f?f.label:r}),b.jsx(_i,{className:ue("h-4 w-4 text-gray-400 transition-transform duration-200",o&&"rotate-180")})]}),o&&!i&&b.jsx("div",{className:"absolute top-full left-0 z-50 mt-1 min-w-[300px] w-max max-w-lg rounded-md border border-gray-200 bg-white shadow-lg max-h-60 overflow-y-auto",children:e.map(m=>{const v=l===m.value;return b.jsxs("div",{className:"relative group",children:[b.jsx("button",{className:ue("relative flex w-full cursor-pointer select-none items-center px-3 py-2 text-sm text-left outline-none transition-colors",m.disabled?"opacity-50 cursor-not-allowed text-gray-400":v?"bg-blue-50 text-blue-900 font-medium":"text-gray-900 hover:bg-gray-100"),onClick:()=>!m.disabled&&d(m.value),disabled:m.disabled,children:b.jsx("span",{className:"block whitespace-nowrap",children:m.label})}),m.label.length>25&&b.jsx("div",{className:"absolute left-full top-0 ml-2 z-[60] opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none",children:b.jsxs("div",{className:"bg-gray-900 text-white text-xs rounded-md px-3 py-2 whitespace-nowrap shadow-lg",children:[m.label,b.jsx("div",{className:"absolute left-0 top-1/2 transform -translate-x-full -translate-y-1/2 w-0 h-0 border-t-4 border-b-4 border-r-4 border-transparent border-r-gray-900"})]})})]},m.value)})})]})},o8=({options:e,value:t,defaultValue:r,placeholder:n="Select...",multiSelect:a=!1,searchable:i=!1,onChange:o,className:s})=>{const[l,u]=S.useState(!1),[c,f]=S.useState(""),[d,h]=S.useState(()=>{const p=t||r;return a?Array.isArray(p)?p:p?[p]:[]:p?[Array.isArray(p)?p[0]:p]:[]}),m=S.useRef(null);S.useEffect(()=>{const p=g=>{m.current&&!m.current.contains(g.target)&&u(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]);const v=i?e.filter(p=>p.label.toLowerCase().includes(c.toLowerCase())):e,y=p=>{let g;if(a){if(p==="all"){O();return}if(d.includes(p))g=d.filter(P=>P!==p),g=g.filter(P=>P!=="all");else{g=d.filter(R=>R!=="all"),g=[...g,p];const P=v.filter(R=>R.value!=="all").map(R=>R.value),_=g.filter(R=>R!=="all");_.length===P.length&&(g=["all",..._])}}else g=[p],u(!1);h(g);const A=a?g:g[0]||"";o==null||o(A)},x=()=>{if(!a)return{checked:!1,indeterminate:!1};const p=v.filter(A=>A.value!=="all").map(A=>A.value),g=d.filter(A=>A!=="all"&&p.includes(A));return d.includes("all")&&g.length===0?{checked:!1,indeterminate:!1}:g.length===0?{checked:!1,indeterminate:!1}:g.length===p.length?{checked:!0,indeterminate:!1}:{checked:!1,indeterminate:!0}},O=()=>{if(!a)return;const p=x(),g=v.filter(A=>A.value!=="all").map(A=>A.value);if(p.checked)h(["all"]),o==null||o(["all"]);else{const A=["all",...g];h(A),o==null||o(A)}},w=()=>{h(["all"]),o==null||o(a?["all"]:"all")},T=()=>{if(!a){if(d.length===0)return n;const P=e.find(_=>_.value===d[0]);return(P==null?void 0:P.label)||n}const p=d.filter(P=>P!=="all"),g=d.includes("all");if(p.length===0)return n;if(p.length===1){const P=e.find(_=>_.value===p[0]);return(P==null?void 0:P.label)||n}const A=e.filter(P=>P.value!=="all").length;return p.length===A?"All selected":`${p.length} selected`};return b.jsxs("div",{className:ue("relative",s),ref:m,children:[b.jsxs("button",{type:"button",onClick:()=>u(!l),className:ue("w-full flex items-center justify-between px-3 py-2 text-left text-sm","border border-gray-300 rounded-md bg-white hover:bg-gray-50","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500","transition-colors duration-150"),children:[b.jsx("span",{className:ue("truncate",d.length===0&&"text-gray-500"),children:T()}),b.jsx(_i,{className:ue("w-4 h-4 text-gray-400 transition-transform duration-150",l&&"transform rotate-180")})]}),l&&b.jsxs("div",{className:"absolute z-50 min-w-[300px] w-max max-w-lg mt-1 bg-white border border-gray-200 rounded-md shadow-lg max-h-80 overflow-hidden",children:[i&&b.jsx("div",{className:"p-3 border-b border-gray-100",children:b.jsxs("div",{className:"relative",children:[b.jsx(yf,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"}),b.jsx("input",{type:"text",placeholder:`Search ${n.toLowerCase()}...`,value:c,onChange:p=>f(p.target.value),className:"w-full pl-10 pr-4 py-2 text-sm border border-gray-200 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})]})}),a&&b.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-gray-100 bg-gray-50",children:[b.jsxs("button",{type:"button",onClick:O,className:"flex items-center text-sm font-medium text-gray-700 hover:text-gray-900",children:[b.jsx("div",{className:ue("flex items-center justify-center w-4 h-4 mr-2 border rounded transition-colors duration-150",(()=>{const p=x();return p.indeterminate||p.checked?"bg-blue-600 border-blue-600 text-white":"border-gray-300 bg-white"})()),children:(()=>{const p=x();return p.indeterminate?b.jsx("div",{className:"w-2 h-0.5 bg-white rounded"}):p.checked?b.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:b.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):null})()}),"Select all"]}),b.jsx("button",{type:"button",onClick:w,className:"text-sm font-medium text-blue-600 hover:text-blue-800",children:"Clear"})]}),b.jsx("div",{className:"max-h-60 overflow-y-auto",children:v.length===0?b.jsx("div",{className:"px-3 py-4 text-sm text-gray-500 text-center",children:"No options found"}):v.map(p=>{let g;return p.value==="all"?null:(g=d.includes(p.value),b.jsxs("div",{className:"relative group",children:[b.jsxs("div",{onClick:()=>y(p.value),className:ue("flex items-center px-3 py-2 cursor-pointer hover:bg-gray-50","transition-colors duration-150",g&&"bg-blue-50"),children:[a?b.jsx("div",{className:ue("flex items-center justify-center w-4 h-4 mr-3 border rounded","transition-colors duration-150",g?"bg-blue-600 border-blue-600 text-white":"border-gray-300 bg-white"),children:g&&b.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:b.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}):b.jsx("div",{className:ue("w-4 h-4 mr-3 rounded-full border-2 transition-colors duration-150",g?"border-blue-600 bg-blue-600":"border-gray-300"),children:g&&b.jsx("div",{className:"w-full h-full rounded-full bg-white scale-50"})}),p.avatar&&b.jsx("img",{src:p.avatar,alt:p.label,className:"w-6 h-6 rounded-full mr-3"}),p.icon&&!p.avatar&&b.jsx("div",{className:"w-6 h-6 mr-3 flex items-center justify-center text-sm",children:p.icon}),b.jsx("span",{className:ue("flex-1 text-sm whitespace-nowrap",g?"font-medium text-gray-900":"text-gray-700"),children:p.label})]}),p.label.length>25&&b.jsx("div",{className:"absolute left-full top-0 ml-2 z-[80] opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none",children:b.jsxs("div",{className:"bg-gray-900 text-white text-xs rounded-md px-3 py-2 whitespace-nowrap shadow-lg",children:[p.label,b.jsx("div",{className:"absolute left-0 top-1/2 transform -translate-x-full -translate-y-1/2 w-0 h-0 border-t-4 border-b-4 border-r-4 border-transparent border-r-gray-900"})]})})]},p.value))})})]})]})},gb=({config:e,className:t})=>{var i;const{dropdown:r,buttons:n,toggle:a}=e;return b.jsxs("div",{className:ue("flex items-center gap-3",t),children:[r&&b.jsx(b.Fragment,{children:r.multiSelect?b.jsx(o8,{options:r.options,value:r.defaultValue,placeholder:r.label,multiSelect:r.multiSelect,searchable:r.searchable,onChange:r.onChange,className:"w-48"}):b.jsx(js,{options:r.options,value:Array.isArray(r.defaultValue)?r.defaultValue[0]:r.defaultValue||((i=r.options[0])==null?void 0:i.value),placeholder:r.label,onChange:o=>{var s;return(s=r.onChange)==null?void 0:s.call(r,o)},className:"w-48"})}),n&&n.length>0&&b.jsx("div",{className:"flex items-center border border-gray-200 rounded-lg overflow-hidden",children:n.map((o,s)=>b.jsxs("button",{onClick:()=>{var l;return(l=o.onClick)==null?void 0:l.call(o,o.value)},className:ue("px-3 py-2 text-sm font-medium transition-colors","hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-inset",o.active?"bg-blue-50 text-blue-700 border-blue-200":"text-gray-700 bg-white",s>0&&"border-l border-gray-200"),children:[o.icon&&b.jsx("span",{className:"mr-2",children:o.icon}),o.label]},o.value))}),a&&b.jsxs("div",{className:"flex items-center border border-gray-200 rounded-lg overflow-hidden",children:[b.jsxs("button",{onClick:()=>{var o;return(o=a.onToggle)==null?void 0:o.call(a,"chart")},className:ue("px-3 py-2 text-sm font-medium transition-colors flex items-center gap-2","hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-inset",a.chartView?"bg-blue-50 text-blue-700 border-blue-200":"text-gray-700 bg-white"),children:[b.jsx(Yb,{className:"w-4 h-4"}),"Chart"]}),b.jsxs("button",{onClick:()=>{var o;return(o=a.onToggle)==null?void 0:o.call(a,"table")},className:ue("px-3 py-2 text-sm font-medium transition-colors flex items-center gap-2","hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-inset","border-l border-gray-200",a.tableView?"bg-blue-50 text-blue-700 border-blue-200":"text-gray-700 bg-white"),children:[b.jsx(t0,{className:"w-4 h-4"}),"Table"]})]})]})},bb=({section:e,className:t,isLoading:r,isChartLoading:n,onMetricClick:a})=>{const{id:i,title:o,description:s,metrics:l,view:u,controls:c,layout:f}=e,[d,h]=S.useState(u.type),[m,v]=S.useState("chart"),y=()=>i==="usage-analytics"?"users":i==="runs"?"agentRuns":"users",[x,O]=S.useState(y()),[w,T]=S.useState("all"),p=E=>{var I,B,z,V,Z;const j=P();(I=j==null?void 0:j.controls)!=null&&I.toggle?(v(E),(z=(B=j.controls.toggle).onToggle)==null||z.call(B,E)):(h(E),(Z=(V=c==null?void 0:c.toggle)==null?void 0:V.onToggle)==null||Z.call(V,E))},g=E=>{var B,z;const j=E.metricType||E.title.toLowerCase();O(j);const I=l.find(V=>(V.metricType||V.title.toLowerCase())===j);(z=(B=I==null?void 0:I.controls)==null?void 0:B.dropdown)!=null&&z.multiSelect?T(["all"]):T("all"),a==null||a(E)},A=E=>{var I,B,z;T(E);const j=l.find(V=>(V.metricType||V.title.toLowerCase())===x);(z=(B=(I=j==null?void 0:j.controls)==null?void 0:I.dropdown)==null?void 0:B.onChange)==null||z.call(B,E)},P=()=>l.find(E=>(E.metricType||E.title.toLowerCase())===x)||null,_=E=>Array.isArray(E)?E.filter(I=>I!=="all").length>0:E!=="all",R=E=>Array.isArray(E)?E.filter(j=>j!=="all"):E!=="all"?[E]:[],M=E=>{var z,V,Z,Q,ee,te,q,Y,J;const j=((V=(z=E.view)==null?void 0:z.chart)==null?void 0:V.data)||((Z=u.chart)==null?void 0:Z.data)||[];if(!_(w))return j;const I=E.metricType,B=R(w);if(B.length===1){const k=B[0],ie=P(),G=(te=(ee=(Q=ie==null?void 0:ie.controls)==null?void 0:Q.dropdown)==null?void 0:ee.options)==null?void 0:te.find(oe=>oe.value===k),re=G==null?void 0:G.label;return console.log("🔍 Filtering chart data:",{metricType:I,singleFilter:k,selectedLabel:re,baseDataSample:j[0]}),j.map(oe=>{let Ce=0;return oe.listView&&Array.isArray(oe.listView)&&(Ce=oe.listView.filter(et=>I==="agentRuns"&&et.agentName?et.agentName===re||et.agentName.toLowerCase()===(re==null?void 0:re.toLowerCase()):I==="toolRuns"&&et.toolName?et.toolName===re||et.toolName.toLowerCase()===(re==null?void 0:re.toLowerCase()):I==="modelRuns"&&et.modelName?et.modelName===re||et.modelName.toLowerCase()===(re==null?void 0:re.toLowerCase()):!1).reduce((et,Rt)=>et+(Rt.count||0),0)),console.log("📊 Filtered value for",re,":",Ce),{...oe,[I]:Ce}})}if(B.length>1){const k=P(),G=(((J=(Y=(q=k==null?void 0:k.controls)==null?void 0:q.dropdown)==null?void 0:Y.options)==null?void 0:J.filter(re=>B.includes(re.value)))||[]).map(re=>re.label);return j.map(re=>{let oe=0;return re.listView&&Array.isArray(re.listView)&&(oe=re.listView.filter(Te=>I==="agentRuns"&&Te.agentName?G.some(je=>Te.agentName===je||Te.agentName.toLowerCase()===(je==null?void 0:je.toLowerCase())):I==="toolRuns"&&Te.toolName?G.some(je=>Te.toolName===je||Te.toolName.toLowerCase()===(je==null?void 0:je.toLowerCase())):I==="modelRuns"&&Te.modelName?G.some(je=>Te.modelName===je||Te.modelName.toLowerCase()===(je==null?void 0:je.toLowerCase())):!1).reduce((Te,je)=>Te+(je.count||0),0)),{...re,[I]:oe}})}return j},C=E=>{var z;if(!((z=E.view)!=null&&z.chart))return null;const j=M(E),I=()=>{var Z,Q,ee,te,q,Y;if(!_(w)||!((Z=E.controls)!=null&&Z.dropdown))return((ee=(Q=E.view)==null?void 0:Q.chart)==null?void 0:ee.title)||E.title;const V=R(w);if(V.length===1){const J=(te=E.controls.dropdown.options)==null?void 0:te.find(k=>k.value===V[0]);return J?`${J.label}`:((Y=(q=E.view)==null?void 0:q.chart)==null?void 0:Y.title)||E.title}return`${V.length} selected`},B=R(w);return E.metricType==="toolRuns"&&B.length===1?{...E.view.chart,data:j,title:I(),lines:void 0,dataKey:"toolRuns",color:"#f97316",showLegend:!1}:E.metricType==="modelRuns"&&B.length===1?{...E.view.chart,data:j,title:I(),dataKey:"modelRuns",color:"#10b981",showLegend:!1}:{...E.view.chart,data:j,title:I()}},W=(E,j)=>{if(!_(w))return E;const I=R(w);if(I.length===1){const B=I[0];if(i==="runs"&&j==="agentRuns")return E.map(z=>({...z,agentRuns:z[B]||0}));if(i==="runs"&&j==="toolRuns")return E.map(z=>({...z,toolRuns:z[B.replace(/[-]/g,"")]||0}));if(i==="runs"&&j==="modelRuns")return E.map(z=>({...z,modelRuns:z[B.replace(/[-\.]/g,"")]||0}))}return E},U=E=>{var z;const j=((z=u.chart)==null?void 0:z.data)||[],I=W(j,E),B=V=>{var Q,ee;if(!_(w))return V;const Z=R(w);if(Z.length===1){const te=(ee=(Q=c==null?void 0:c.dropdown)==null?void 0:Q.options)==null?void 0:ee.find(q=>q.value===Z[0]);return te?`${te.label}`:V}return`${Z.length} selected`};switch(E){case"users":return{type:"line",title:"Total Users",data:j,dataKey:"users",color:"#8b5cf6",yAxisLabel:"Number of Users",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"sessions":return{type:"line",title:"Total Sessions",data:j,dataKey:"sessions",color:"#06b6d4",yAxisLabel:"Number of Sessions",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"messages":return{type:"line",title:"Total Messages",data:j,dataKey:"messages",color:"#ec4899",yAxisLabel:"Number of Messages",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"tokens":return{type:"line",title:"Token Usage Breakdown",data:j,yAxisLabel:"Number of Tokens",lines:[{dataKey:"totalTokens",color:"#f59e0b",label:"Total Tokens"},{dataKey:"inputTokens",color:"#3b82f6",label:"Input Tokens"},{dataKey:"outputTokens",color:"#ec4899",label:"Output Tokens"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"agentRuns":return{type:"line",title:B("Agent Runs"),data:I,dataKey:"agentRuns",color:"#06b6d4",yAxisLabel:"Number of Agent Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"toolRuns":return R(w).length===1?{type:"line",title:B("Tool Runs"),data:W(j,"toolRuns"),dataKey:"toolRuns",color:"#f97316",yAxisLabel:"Number of Tool Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}:{type:"line",title:"Tool Runs",data:I,yAxisLabel:"Number of Tool Runs",lines:[{dataKey:"toolRuns",color:"#06b6d4",label:"Tool Runs"},{dataKey:"codeTools",color:"#f97316",label:"Code Tools"},{dataKey:"workflowTools",color:"#10b981",label:"Workflow Tools"},{dataKey:"knowledgeTools",color:"#8b5cf6",label:"Knowledge"},{dataKey:"mcpTools",color:"#ef4444",label:"MCP Tools"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"modelRuns":return R(w).length===1?{type:"line",title:B("Model Runs"),data:W(j,"modelRuns"),dataKey:"modelRuns",color:"#10b981",yAxisLabel:"Number of Model Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}:{type:"line",title:B("Model Runs"),data:I,dataKey:"modelRuns",color:"#10b981",yAxisLabel:"Number of Model Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};default:return null}},F=(()=>{const E=P();return E!=null&&E.controls?{...E.controls,dropdown:E.controls.dropdown?{...E.controls.dropdown,onChange:A}:void 0,toggle:E.controls.toggle?{...E.controls.toggle,chartView:m==="chart",tableView:m==="table",onToggle:p}:void 0}:c?{...c,dropdown:c.dropdown?{...c.dropdown,onChange:A}:void 0,toggle:c.toggle?{...c.toggle,chartView:d==="chart",tableView:d==="table",onToggle:p}:void 0}:void 0})(),D=(()=>{var I,B,z,V,Z,Q,ee,te,q,Y;const E=P();if(E!=null&&E.view){if((I=E.controls)!=null&&I.toggle){if(m==="table"&&E.view.table){let k=E.view.table.data;if(E.metricType==="agentRuns"&&_(w)){const ie=R(w);if(ie.length>0){const G=((V=(z=(B=E.controls)==null?void 0:B.dropdown)==null?void 0:z.options)==null?void 0:V.filter(re=>ie.includes(re.value)))||[];G.length>0&&(k=k.filter(re=>G.some(oe=>re.name===oe.label||re.name.toLowerCase().includes(oe.label.toLowerCase()))))}}if(E.metricType==="toolRuns"&&_(w)){const ie=R(w);if(ie.length>0){const G=((ee=(Q=(Z=E.controls)==null?void 0:Z.dropdown)==null?void 0:Q.options)==null?void 0:ee.filter(re=>ie.includes(re.value)))||[];G.length>0&&(k=k.filter(re=>G.some(oe=>re.name===oe.label||re.name.toLowerCase().includes(oe.label.toLowerCase()))))}}if(E.metricType==="modelRuns"&&_(w)){const ie=R(w);if(ie.length>0){const G=((Y=(q=(te=E.controls)==null?void 0:te.dropdown)==null?void 0:q.options)==null?void 0:Y.filter(re=>ie.includes(re.value)))||[];G.length>0&&(k=k.filter(re=>G.some(oe=>re.name===oe.label||re.name.toLowerCase().includes(oe.label.toLowerCase()))))}}return{type:"table",table:{...E.view.table,data:k}}}else if(m==="chart"&&E.view.chart)return{type:"chart",chart:C(E)||E.view.chart}}const J=C(E);return J?{...E.view,chart:J}:E.view}const j=U(x);return j?{type:"chart",chart:j}:{...u,type:d}})(),L=()=>l.map(E=>{const j=E.metricType||E.title.toLowerCase();return{...E,highlighted:E.highlighted||j===x}});return b.jsxs("div",{className:ue("bg-white rounded-lg border border-gray-200 p-6",t),style:{gridColumn:f!=null&&f.span?`span ${f.span}`:void 0,order:f==null?void 0:f.order},children:[b.jsxs("div",{className:"mb-6",children:[b.jsxs("div",{className:"flex items-center justify-between mb-4",children:[b.jsxs("div",{children:[b.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:o}),s&&b.jsx("p",{className:"text-sm text-gray-600 mt-1",children:s})]}),F&&b.jsx(gb,{config:F})]}),b.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:r?b.jsxs(b.Fragment,{children:[b.jsx(yi,{}),b.jsx(yi,{}),b.jsx(yi,{}),b.jsx(yi,{})]}):L().map((E,j)=>b.jsx(Tf,{data:E,onClick:g},`${i}-metric-${j}`))})]}),b.jsx(mb,{config:D,className:"mt-6",isLoading:r||n,context:{sectionId:i,metricType:x}})]})},Es=S.forwardRef(({className:e,variant:t="default",size:r="md",children:n,...a},i)=>{const o="inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",s={default:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground"},l={sm:"h-9 px-3",md:"h-10 px-4 py-2",lg:"h-11 px-8"};return b.jsx("button",{className:ue(o,s[t],l[r],e),ref:i,...a,children:n})});Es.displayName="Button";function $s(e){"@babel/helpers - typeof";return $s=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},$s(e)}function jt(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function De(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Ue(e){De(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||$s(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function s8(e,t){De(2,arguments);var r=Ue(e),n=jt(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function of(e,t){De(2,arguments);var r=Ue(e),n=jt(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var a=r.getDate(),i=new Date(r.getTime());i.setMonth(r.getMonth()+n+1,0);var o=i.getDate();return a>=o?i:(r.setFullYear(i.getFullYear(),i.getMonth(),a),r)}function l8(e,t){De(2,arguments);var r=Ue(e).getTime(),n=jt(t);return new Date(r+n)}var u8={};function mi(){return u8}function c8(e,t){var r,n,a,i,o,s;De(1,arguments);var l=mi(),u=jt((r=(n=(a=(i=void 0)!==null&&i!==void 0?i:void 0)!==null&&a!==void 0?a:l.weekStartsOn)!==null&&n!==void 0?n:(o=l.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&r!==void 0?r:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var c=Ue(e),f=c.getDay(),d=(f<u?7:0)+f-u;return c.setDate(c.getDate()-d),c.setHours(0,0,0,0),c}function f8(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Hr(e){De(1,arguments);var t=Ue(e);return t.setHours(0,0,0,0),t}function gi(e,t){De(2,arguments);var r=Hr(e),n=Hr(t);return r.getTime()===n.getTime()}function d8(e){return De(1,arguments),e instanceof Date||$s(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function h8(e){if(De(1,arguments),!d8(e)&&typeof e!="number")return!1;var t=Ue(e);return!isNaN(Number(t))}function p8(e){De(1,arguments);var t=Ue(e);return t.setHours(23,59,59,999),t}function v8(e){De(1,arguments);var t=Ue(e);return t.setDate(1),t.setHours(0,0,0,0),t}function y8(e,t){De(2,arguments);var r=jt(t);return l8(e,-r)}var m8=864e5;function g8(e){De(1,arguments);var t=Ue(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),a=r-n;return Math.floor(a/m8)+1}function Cs(e){De(1,arguments);var t=1,r=Ue(e),n=r.getUTCDay(),a=(n<t?7:0)+n-t;return r.setUTCDate(r.getUTCDate()-a),r.setUTCHours(0,0,0,0),r}function xb(e){De(1,arguments);var t=Ue(e),r=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var a=Cs(n),i=new Date(0);i.setUTCFullYear(r,0,4),i.setUTCHours(0,0,0,0);var o=Cs(i);return t.getTime()>=a.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function b8(e){De(1,arguments);var t=xb(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=Cs(r);return n}var x8=6048e5;function w8(e){De(1,arguments);var t=Ue(e),r=Cs(t).getTime()-b8(t).getTime();return Math.round(r/x8)+1}function Ms(e,t){var r,n,a,i,o,s,l,u;De(1,arguments);var c=mi(),f=jt((r=(n=(a=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Ue(e),h=d.getUTCDay(),m=(h<f?7:0)+h-f;return d.setUTCDate(d.getUTCDate()-m),d.setUTCHours(0,0,0,0),d}function wb(e,t){var r,n,a,i,o,s,l,u;De(1,arguments);var c=Ue(e),f=c.getUTCFullYear(),d=mi(),h=jt((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:d.firstWeekContainsDate)!==null&&n!==void 0?n:(l=d.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(f+1,0,h),m.setUTCHours(0,0,0,0);var v=Ms(m,t),y=new Date(0);y.setUTCFullYear(f,0,h),y.setUTCHours(0,0,0,0);var x=Ms(y,t);return c.getTime()>=v.getTime()?f+1:c.getTime()>=x.getTime()?f:f-1}function O8(e,t){var r,n,a,i,o,s,l,u;De(1,arguments);var c=mi(),f=jt((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=wb(e,t),h=new Date(0);h.setUTCFullYear(d,0,f),h.setUTCHours(0,0,0,0);var m=Ms(h,t);return m}var S8=6048e5;function A8(e,t){De(1,arguments);var r=Ue(e),n=Ms(r,t).getTime()-O8(r,t).getTime();return Math.round(n/S8)+1}function _e(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return r+n}var Tr={y:function(t,r){var n=t.getUTCFullYear(),a=n>0?n:1-n;return _e(r==="yy"?a%100:a,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):_e(n+1,2)},d:function(t,r){return _e(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return _e(t.getUTCHours()%12||12,r.length)},H:function(t,r){return _e(t.getUTCHours(),r.length)},m:function(t,r){return _e(t.getUTCMinutes(),r.length)},s:function(t,r){return _e(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,a=t.getUTCMilliseconds(),i=Math.floor(a*Math.pow(10,n-3));return _e(i,r.length)}},ra={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},T8={G:function(t,r,n){var a=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var a=t.getUTCFullYear(),i=a>0?a:1-a;return n.ordinalNumber(i,{unit:"year"})}return Tr.y(t,r)},Y:function(t,r,n,a){var i=wb(t,a),o=i>0?i:1-i;if(r==="YY"){var s=o%100;return _e(s,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):_e(o,r.length)},R:function(t,r){var n=xb(t);return _e(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return _e(n,r.length)},Q:function(t,r,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(a);case"QQ":return _e(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(t,r,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(a);case"qq":return _e(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(t,r,n){var a=t.getUTCMonth();switch(r){case"M":case"MM":return Tr.M(t,r);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(t,r,n){var a=t.getUTCMonth();switch(r){case"L":return String(a+1);case"LL":return _e(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(t,r,n,a){var i=A8(t,a);return r==="wo"?n.ordinalNumber(i,{unit:"week"}):_e(i,r.length)},I:function(t,r,n){var a=w8(t);return r==="Io"?n.ordinalNumber(a,{unit:"week"}):_e(a,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):Tr.d(t,r)},D:function(t,r,n){var a=g8(t);return r==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):_e(a,r.length)},E:function(t,r,n){var a=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(t,r,n,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return _e(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,r,n,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return _e(o,r.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,r,n){var a=t.getUTCDay(),i=a===0?7:a;switch(r){case"i":return String(i);case"ii":return _e(i,r.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(t,r,n){var a=t.getUTCHours(),i=a/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,r,n){var a=t.getUTCHours(),i;switch(a===12?i=ra.noon:a===0?i=ra.midnight:i=a/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,r,n){var a=t.getUTCHours(),i;switch(a>=17?i=ra.evening:a>=12?i=ra.afternoon:a>=4?i=ra.morning:i=ra.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var a=t.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return Tr.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Tr.H(t,r)},K:function(t,r,n){var a=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(a,{unit:"hour"}):_e(a,r.length)},k:function(t,r,n){var a=t.getUTCHours();return a===0&&(a=24),r==="ko"?n.ordinalNumber(a,{unit:"hour"}):_e(a,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Tr.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Tr.s(t,r)},S:function(t,r){return Tr.S(t,r)},X:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return Sb(o);case"XXXX":case"XX":return Yr(o);case"XXXXX":case"XXX":default:return Yr(o,":")}},x:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"x":return Sb(o);case"xxxx":case"xx":return Yr(o);case"xxxxx":case"xxx":default:return Yr(o,":")}},O:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Ob(o,":");case"OOOO":default:return"GMT"+Yr(o,":")}},z:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Ob(o,":");case"zzzz":default:return"GMT"+Yr(o,":")}},t:function(t,r,n,a){var i=a._originalDate||t,o=Math.floor(i.getTime()/1e3);return _e(o,r.length)},T:function(t,r,n,a){var i=a._originalDate||t,o=i.getTime();return _e(o,r.length)}};function Ob(e,t){var r=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),i=n%60;if(i===0)return r+String(a);var o=t;return r+String(a)+o+_e(i,2)}function Sb(e,t){if(e%60===0){var r=e>0?"-":"+";return r+_e(Math.abs(e)/60,2)}return Yr(e,t)}function Yr(e,t){var r=t||"",n=e>0?"-":"+",a=Math.abs(e),i=_e(Math.floor(a/60),2),o=_e(a%60,2);return n+i+r+o}var Ab=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},Tb=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},P8=function(t,r){var n=t.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return Ab(t,r);var o;switch(a){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",Ab(a,r)).replace("{{time}}",Tb(i,r))},_8={p:Tb,P:P8},j8=["D","DD"],E8=["YY","YYYY"];function $8(e){return j8.indexOf(e)!==-1}function C8(e){return E8.indexOf(e)!==-1}function Pb(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var M8={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"}},k8=function(t,r,n){var a,i=M8[t];return typeof i=="string"?a=i:r===1?a=i.one:a=i.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function sf(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var N8={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},D8={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},I8={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},R8={date:sf({formats:N8,defaultWidth:"full"}),time:sf({formats:D8,defaultWidth:"full"}),dateTime:sf({formats:I8,defaultWidth:"full"})},L8={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},B8=function(t,r,n,a){return L8[t]};function bi(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",a;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):i;a=e.formattingValues[o]||e.formattingValues[i]}else{var s=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[l]||e.values[s]}var u=e.argumentCallback?e.argumentCallback(t):t;return a[u]}}var F8={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},W8={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},U8={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"]},z8={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"]},K8={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"}},q8={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"}},G8=function(t,r){var n=Number(t),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},V8={ordinalNumber:G8,era:bi({values:F8,defaultWidth:"wide"}),quarter:bi({values:W8,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:bi({values:U8,defaultWidth:"wide"}),day:bi({values:z8,defaultWidth:"wide"}),dayPeriod:bi({values:K8,defaultWidth:"wide",formattingValues:q8,defaultFormattingWidth:"wide"})};function xi(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;var o=i[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?Y8(s,function(f){return f.test(o)}):H8(s,function(f){return f.test(o)}),u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;var c=t.slice(o.length);return{value:u,rest:c}}}function H8(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function Y8(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function X8(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var a=n[0],i=t.match(e.parsePattern);if(!i)return null;var o=e.valueCallback?e.valueCallback(i[0]):i[0];o=r.valueCallback?r.valueCallback(o):o;var s=t.slice(a.length);return{value:o,rest:s}}}var J8=/^(\d+)(th|st|nd|rd)?/i,Z8=/\d+/i,Q8={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},eU={any:[/^b/i,/^(a|c)/i]},tU={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},rU={any:[/1/i,/2/i,/3/i,/4/i]},nU={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},aU={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]},iU={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},oU={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]},sU={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},lU={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}},uU={ordinalNumber:X8({matchPattern:J8,parsePattern:Z8,valueCallback:function(t){return parseInt(t,10)}}),era:xi({matchPatterns:Q8,defaultMatchWidth:"wide",parsePatterns:eU,defaultParseWidth:"any"}),quarter:xi({matchPatterns:tU,defaultMatchWidth:"wide",parsePatterns:rU,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:xi({matchPatterns:nU,defaultMatchWidth:"wide",parsePatterns:aU,defaultParseWidth:"any"}),day:xi({matchPatterns:iU,defaultMatchWidth:"wide",parsePatterns:oU,defaultParseWidth:"any"}),dayPeriod:xi({matchPatterns:sU,defaultMatchWidth:"any",parsePatterns:lU,defaultParseWidth:"any"})},cU={code:"en-US",formatDistance:k8,formatLong:R8,formatRelative:B8,localize:V8,match:uU,options:{weekStartsOn:0,firstWeekContainsDate:1}},fU=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,dU=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,hU=/^'([^]*?)'?$/,pU=/''/g,vU=/[a-zA-Z]/;function ks(e,t,r){var n,a,i,o,s,l,u,c,f,d,h,m,v,y;De(2,arguments);var x=String(t),O=mi(),w=(n=(a=void 0)!==null&&a!==void 0?a:O.locale)!==null&&n!==void 0?n:cU,T=jt((i=(o=(s=(l=void 0)!==null&&l!==void 0?l:void 0)!==null&&s!==void 0?s:O.firstWeekContainsDate)!==null&&o!==void 0?o:(u=O.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(T>=1&&T<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=jt((f=(d=(h=(m=void 0)!==null&&m!==void 0?m:void 0)!==null&&h!==void 0?h:O.weekStartsOn)!==null&&d!==void 0?d:(v=O.locale)===null||v===void 0||(y=v.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&f!==void 0?f:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!w.localize)throw new RangeError("locale must contain localize property");if(!w.formatLong)throw new RangeError("locale must contain formatLong property");var g=Ue(e);if(!h8(g))throw new RangeError("Invalid time value");var A=f8(g),P=y8(g,A),_={firstWeekContainsDate:T,weekStartsOn:p,locale:w,_originalDate:g},R=x.match(dU).map(function(M){var C=M[0];if(C==="p"||C==="P"){var W=_8[C];return W(M,w.formatLong)}return M}).join("").match(fU).map(function(M){if(M==="''")return"'";var C=M[0];if(C==="'")return yU(M);var W=T8[C];if(W)return C8(M)&&Pb(M,t,String(e)),$8(M)&&Pb(M,t,String(e)),W(P,M,w.localize,_);if(C.match(vU))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return M}).join("");return R}function yU(e){var t=e.match(hU);return t?t[1].replace(pU,"'"):e}function _b(e,t){De(2,arguments);var r=Ue(e),n=Ue(t);return r.getTime()<n.getTime()}function mU(e,t){De(2,arguments);var r=Ue(e).getTime(),n=Ue(t.start).getTime(),a=Ue(t.end).getTime();if(!(n<=a))throw new RangeError("Invalid interval");return r>=n&&r<=a}function Ns(e,t){De(2,arguments);var r=jt(t);return s8(e,-r)}function jb(e,t){De(2,arguments);var r=jt(t);return of(e,-r)}const Eb=({children:e})=>{const[t,r]=S.useState(!1);return S.useEffect(()=>(r(!0),()=>r(!1)),[]),t?Zr.createPortal(e,document.body):null};function $b({className:e,defaultValue:t,onDateRangeChange:r}){console.log("🗓️ DateRangePicker component rendered with props:",{className:e,defaultValue:t,hasCallback:!!r});const n=[{label:"Today",value:"today",dateRange:{from:Hr(new Date),to:new Date}},{label:"Yesterday",value:"yesterday",dateRange:{from:Hr(Ns(new Date,1)),to:p8(Ns(new Date,1))}},{label:"This week",value:"thisWeek",dateRange:{from:c8(new Date),to:new Date}},{label:"Last 7 days",value:"7d",dateRange:{from:Hr(Ns(new Date,6)),to:new Date}},{label:"This month",value:"thisMonth",dateRange:{from:v8(new Date),to:new Date}},{label:"Last 30 days",value:"30d",dateRange:{from:Hr(Ns(new Date,29)),to:new Date}},{label:"Last 3 months",value:"90d",dateRange:{from:Hr(jb(new Date,3)),to:new Date}}],a=t?n.find(N=>N.value===t):null;console.log("📅 DateRangePicker initialization:",{defaultValue:t,defaultPreset:a==null?void 0:a.label,hasDateRange:!!(a!=null&&a.dateRange),allPresetValues:n.map(N=>N.value),foundPreset:!!a});const[i,o]=S.useState(a==null?void 0:a.dateRange),[s,l]=S.useState(a==null?void 0:a.dateRange),[u,c]=S.useState(!1),[f,d]=S.useState((a==null?void 0:a.label)||null),[h,m]=S.useState((a==null?void 0:a.label)||null),[v,y]=S.useState(new Date),[x,O]=S.useState(null),[w,T]=S.useState({top:0,left:0}),p=S.useRef(null),g=S.useRef(null);S.useEffect(()=>{var N,D;console.log("📅 DateRangePicker useEffect running:",{hasDefaultPreset:!!a,hasOnDateRangeChange:!!r,currentDate:i,currentLabel:f,defaultValue:t,defaultPresetLabel:a==null?void 0:a.label,defaultPresetValue:a==null?void 0:a.value}),a!=null&&a.dateRange&&r?(console.log("📅 DateRangePicker: Setting initial default value:",{label:a.label,dateRange:a.dateRange,from:(N=a.dateRange.from)==null?void 0:N.toLocaleDateString(),to:(D=a.dateRange.to)==null?void 0:D.toLocaleDateString()}),r(a.dateRange)):console.log("📅 DateRangePicker: NOT setting initial value because:",{hasDefaultPreset:!!a,hasDateRange:!!(a!=null&&a.dateRange),hasCallback:!!r,presetLabelsAvailable:n.map(L=>`${L.value}:${L.label}`)})},[]),S.useEffect(()=>{t&&(a!=null&&a.dateRange)&&(console.log("📅 DateRangePicker: DefaultValue changed, updating state:",{defaultValue:t,label:a.label}),o(a.dateRange),d(a.label),l(a.dateRange),m(a.label))},[t]);const A=()=>{if(!g.current)return;const N=g.current.getBoundingClientRect(),D=window.scrollY,L=window.scrollX,E=window.innerWidth,j=window.innerHeight,I=720,B=450;let z=N.bottom+D+8,V=N.left+L;V+I>E&&(V=N.right+L-I),V+I>E&&(V=E-I-20),z+B>j&&(z=N.top+D-B-8),V<20&&(V=20),z<20&&(z=20),T({top:z,left:V})};S.useEffect(()=>{const N=()=>{u&&A()};return u&&(window.addEventListener("resize",N),window.addEventListener("scroll",N)),()=>{window.removeEventListener("resize",N),window.removeEventListener("scroll",N)}},[u]);const P=(N,D)=>{if(l(N),m(D),O(null),N.from){const L=new Date(N.from.getFullYear(),N.from.getMonth(),1);y(L)}},_=N=>{if(!x)O(N),l({from:N,to:N}),m(null);else{const D=_b(N,x)?N:x,L=_b(N,x)?x:N;l({from:D,to:L}),O(null),m(null)}},R=()=>{o(s),d(h),r==null||r(s),c(!1),O(null)},M=()=>{l(void 0),m(null),o(void 0),d(null),r==null||r(void 0),c(!1),O(null)},C=N=>{N?(l(i),m(f),O(null),setTimeout(A,0)):(l(i),m(f),O(null)),c(N)},W=(N,D)=>(console.log("📅 formatDateRange called with:",{presetLabel:D,hasDateRange:!!(N!=null&&N.from)}),D||(N!=null&&N.from?!N.to||gi(N.from,N.to)?ks(N.from,"MMM dd, yyyy"):`${ks(N.from,"MMM dd, yyyy")} - ${ks(N.to,"MMM dd, yyyy")}`:"Pick a date range")),U=(N=0)=>{const D=of(v,N),L=D.getFullYear(),E=D.getMonth(),j=new Date(L,E,1),B=new Date(L,E+1,0).getDate(),z=j.getDay(),V=["January","February","March","April","May","June","July","August","September","October","November","December"],Z=["Su","Mo","Tu","We","Th","Fr","Sa"],Q=[],te=new Date(L,E-1,0).getDate();for(let J=z-1;J>=0;J--){const k=te-J,ie=new Date(L,E-1,k);Q.push(b.jsx("button",{onClick:()=>_(ie),className:"h-8 w-8 text-xs text-gray-400 hover:bg-gray-100 rounded flex items-center justify-center",children:k},`prev-${k}`))}for(let J=1;J<=B;J++){const k=new Date(L,E,J),ie=gi(k,new Date),G=(s==null?void 0:s.from)&&(s==null?void 0:s.to)&&mU(k,{start:s.from,end:s.to}),re=(s==null?void 0:s.from)&&gi(k,s.from),oe=(s==null?void 0:s.to)&&gi(k,s.to),Ce=x&&gi(k,x);let Te="h-8 w-8 text-xs hover:bg-gray-100 rounded flex items-center justify-center transition-colors ";ie&&(Te+="font-semibold "),Ce||re||oe?Te+="bg-blue-500 text-white hover:bg-blue-600 ":G&&(Te+="bg-blue-100 text-blue-900 "),Q.push(b.jsx("button",{onClick:()=>_(k),className:Te,children:J},`current-${J}`))}const Y=Math.ceil((z+B)/7)*7-z-B;for(let J=1;J<=Y;J++){const k=new Date(L,E+1,J);Q.push(b.jsx("button",{onClick:()=>_(k),className:"h-8 w-8 text-xs text-gray-400 hover:bg-gray-100 rounded flex items-center justify-center",children:J},`next-${J}`))}return b.jsxs("div",{className:"p-3",children:[b.jsxs("div",{className:"flex items-center justify-between mb-3",children:[N===0&&b.jsx("button",{onClick:()=>y(jb(v,1)),className:"p-1 hover:bg-gray-100 rounded",children:b.jsx(Xb,{className:"h-4 w-4"})}),b.jsxs("div",{className:"font-medium text-sm",children:[V[E]," ",L]}),N===1&&b.jsx("button",{onClick:()=>y(of(v,1)),className:"p-1 hover:bg-gray-100 rounded",children:b.jsx(Jb,{className:"h-4 w-4"})})]}),b.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:Z.map(J=>b.jsx("div",{className:"h-8 flex items-center justify-center text-xs font-medium text-gray-500",children:J},J))}),b.jsx("div",{className:"grid grid-cols-7 gap-1",children:Q})]})},F=()=>"fixed bg-white border border-gray-200 rounded-lg shadow-xl z-[99999]";return b.jsxs("div",{className:`relative ${e}`,children:[b.jsxs("button",{ref:g,onClick:()=>C(!u),className:`min-w-[200px] px-3 py-2 text-left border border-gray-300 rounded-md shadow-sm bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 flex items-center ${i?"text-gray-900":"text-gray-500"}`,children:[b.jsx(pf,{className:"mr-2 h-4 w-4"}),(()=>{const N=W(i,f);return console.log("📅 Button display text:",{displayText:N,date:i,selectedPresetLabel:f}),N})()]}),u&&b.jsxs(Eb,{children:[b.jsx("div",{className:"fixed inset-0 z-[99998] bg-black bg-opacity-10",onClick:()=>C(!1)}),b.jsxs("div",{ref:p,className:F(),style:{top:w.top,left:w.left,width:"720px",minWidth:"720px",maxHeight:"90vh"},onClick:N=>N.stopPropagation(),children:[b.jsxs("div",{className:"flex",children:[b.jsxs("div",{className:"flex flex-col gap-1 p-3 border-r border-gray-200 w-[160px] flex-shrink-0",children:[b.jsx("div",{className:"text-sm font-medium text-gray-500 mb-2",children:"Presets"}),n.map(N=>b.jsx("button",{onClick:()=>P(N.dateRange,N.label),className:`text-left px-2 py-1.5 text-sm rounded hover:bg-gray-100 transition-colors ${h===N.label?"bg-gray-100":""}`,children:N.label},N.label))]}),b.jsxs("div",{className:"flex flex-1",children:[U(0),U(1)]})]}),b.jsxs("div",{className:"border-t border-gray-200 p-3 flex justify-end gap-2",children:[b.jsx("button",{onClick:M,className:"px-3 py-1.5 text-sm border border-gray-300 rounded hover:bg-gray-50 transition-colors",children:"Clear"}),b.jsx("button",{onClick:R,disabled:!(s!=null&&s.from),className:"px-3 py-1.5 text-sm bg-blue-600 text-white rounded hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:"Apply"})]})]})]})]})}class Cb{constructor(t=""){Lt(this,"API_PATH","/tracing/api/trpc/metrics.getMetrics");Lt(this,"baseUrl","");Lt(this,"endpoints",{});this.baseUrl=t,this.initializeEndpoints()}setBaseUrl(t){this.baseUrl=t,this.initializeEndpoints()}getEndpoint(t){return this.endpoints[t]||{endpoint:"",method:"GET"}}getBaseUrl(){return this.baseUrl}initializeEndpoints(){const t=`${this.baseUrl}${this.API_PATH}`;this.endpoints["usage-analytics.cards"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["usage-analytics.sessions.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["usage-analytics.messages.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["usage-analytics.users.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["usage-analytics.tokens.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["runs.cards"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["runs.agent-runs.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["runs.model-runs.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["runs.tool-runs.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH}}getAvailableEndpoints(){return Object.keys(this.endpoints)}hasEndpoint(t){return t in this.endpoints}}class Mb{constructor(t){Lt(this,"endpointsService");Lt(this,"defaultHeaders");Lt(this,"timeout");this.endpointsService=new Cb(t.baseUrl),this.defaultHeaders={"Content-Type":"application/json",...t.defaultHeaders},this.timeout=t.timeout||3e4}updateConfig(t){t.baseUrl&&this.endpointsService.setBaseUrl(t.baseUrl),t.defaultHeaders&&(this.defaultHeaders={...this.defaultHeaders,...t.defaultHeaders}),t.timeout&&(this.timeout=t.timeout)}async invoke(t,r,n,a){const i=this.endpointsService.getEndpoint(t);if(!i.endpoint)throw new Error(`Endpoint not found for service: ${t}`);const o=this.prepareRequest(i,r,n);try{const s=new AbortController,l=setTimeout(()=>s.abort(),(a==null?void 0:a.timeout)||this.timeout),u=await fetch(o.url,{method:o.method,headers:o.headers,body:o.body,signal:(a==null?void 0:a.signal)||s.signal});if(clearTimeout(l),!u.ok)throw new Error(`HTTP Error: ${u.status} ${u.statusText}`);return await u.json()}catch(s){throw s instanceof Error?s.name==="AbortError"?new Error("Request timeout"):s:new Error("Unknown error occurred during API call")}}prepareRequest(t,r,n){const a={...this.defaultHeaders,...n},i={};Object.entries(a).forEach(([l,u])=>{u!==void 0&&(i[l]=u)});let o=t.endpoint,s;if(t.method==="GET"&&r){const l=this.buildQueryParams(r);o+=`?${l}`}else r&&(s=JSON.stringify(r));return{url:o,method:t.method,headers:i,body:s}}buildQueryParams(t){const r={json:t},n=new URLSearchParams;return n.append("input",JSON.stringify(r)),n.append("rnd",Math.random().toString(36).substring(7)),n.toString()}getBaseUrl(){return this.endpointsService.getBaseUrl()}hasEndpoint(t){return this.endpointsService.hasEndpoint(t)}getAvailableEndpoints(){return this.endpointsService.getAvailableEndpoints()}}class lr{constructor(t){Lt(this,"apiInvoker");Lt(this,"projectId");Lt(this,"environment");Lt(this,"defaultTimeRange");const r={baseUrl:t.baseUrl,defaultHeaders:t.headers,timeout:3e4};this.apiInvoker=new Mb(r),this.projectId=t.projectId,this.environment=t.environment,this.defaultTimeRange=t.defaultTimeRange}updateConfig(t){(t.baseUrl||t.headers)&&this.apiInvoker.updateConfig({baseUrl:t.baseUrl,defaultHeaders:t.headers}),t.projectId&&(this.projectId=t.projectId),t.environment&&(this.environment=t.environment),t.defaultTimeRange&&(this.defaultTimeRange=t.defaultTimeRange,console.log("🔄 API Service: Updated defaultTimeRange:",this.defaultTimeRange))}getDefaultTimeRange(){return this.defaultTimeRange||lr.getDateRange(30)}async fetchEnvironments(){try{const r=`${this.apiInvoker.getBaseUrl()}/aaa/api/v1/apps/${this.projectId}/environments?rnd=${Math.random().toString(36).substring(2,8)}`;console.log("🌍 Fetching environments for project:",this.projectId),console.log("🔗 Environment API URL:",r);const n=await fetch(r,{method:"GET",headers:{"Content-Type":"application/json",...this.apiInvoker.defaultHeaders}});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const a=await n.json();return console.log("✅ Environments fetched successfully:",a.map(i=>({name:i.envName,enabled:i.isEnabled,status:i.status}))),a}catch(t){throw console.error("❌ Error fetching environments:",t),t}}async fetchUsageAnalyticsCards(t,r,n,a=[]){const i=n||lr.getTimeDimension(t,r);console.log("📊 Fetching usage analytics cards:",{dateRange:{fromTimestamp:t,toTimestamp:r},providedTimeDimension:n,resolvedTimeDimension:i});const o={projectId:this.projectId,type:"cards",category:"usage-analytics",envId:this.environment,fromTimestamp:t,toTimestamp:r,filter:a,includeTrends:!0,timeDimension:i};return(await this.apiInvoker.invoke("usage-analytics.cards",o)).result.data.json}async fetchRunsCards(t,r,n,a=[]){const i=n||lr.getTimeDimension(t,r);console.log("📊 Fetching runs cards:",{dateRange:{fromTimestamp:t,toTimestamp:r},providedTimeDimension:n,resolvedTimeDimension:i});const o={projectId:this.projectId,type:"cards",category:"runs",envId:this.environment,fromTimestamp:t,toTimestamp:r,filter:a,includeTrends:!0,timeDimension:i};return(await this.apiInvoker.invoke("runs.cards",o)).result.data.json}async fetchTimeSeriesData(t,r,n,a,i,o=[]){const s=i||lr.getTimeDimension(n,a);console.log("📊 Fetching time series data:",{metric:t,category:r,dateRange:{fromTimestamp:n,toTimestamp:a},providedTimeDimension:i,resolvedTimeDimension:s});const l=`${r}.${t}.timeseries`,u={projectId:this.projectId,type:"time-series",category:r,envId:this.environment,fromTimestamp:n,toTimestamp:a,filter:o,metric:t,timeDimension:s};return(await this.apiInvoker.invoke(l,u)).result.data.json}transformUsageAnalyticsCards(t){const r=t.data.trends;console.log("Transforming usage analytics cards with trends:",r);const n=a=>a>0?"increase":"decrease";return[{title:"Users",value:t.data.users,metricType:"users",icon:"users",highlighted:!0,change:r!=null&&r.users?{value:Math.abs(r.users.changePercent),type:n(r.users.changePercent)}:void 0},{title:"Sessions",value:t.data.sessions,metricType:"sessions",icon:"activity",highlighted:!1,change:r!=null&&r.sessions?{value:Math.abs(r.sessions.changePercent),type:n(r.sessions.changePercent)}:void 0},{title:"Messages",value:t.data.messages.total,metricType:"messages",icon:"message-circle",info:`Input: ${t.data.messages.input}, Output: ${t.data.messages.output}`,highlighted:!1,change:r!=null&&r.messages?{value:Math.abs(r.messages.changePercent.total),type:n(r.messages.changePercent.total)}:void 0},{title:"Tokens",value:t.data.tokens.total,metricType:"tokens",icon:"coins",info:`Input: ${t.data.tokens.input}, Output: ${t.data.tokens.output}`,highlighted:!1,change:r!=null&&r.tokens?{value:Math.abs(r.tokens.changePercent.total),type:n(r.tokens.changePercent.total)}:void 0}]}transformRunsCards(t){const r=t.data.trends;console.log("Transforming runs cards with trends:",r);const n=a=>a>0?"increase":"decrease";return[{title:"Agent Runs",value:t.data.agentRuns,metricType:"agentRuns",icon:"bot",highlighted:!0,change:r!=null&&r.agentRuns?{value:Math.abs(r.agentRuns.changePercent),type:n(r.agentRuns.changePercent)}:void 0},{title:"Tool Runs",value:t.data.toolRuns.total,metricType:"toolRuns",icon:"wrench",info:`Code: ${t.data.toolRuns.codeTools}, Library: ${t.data.toolRuns.libraryTools}, Knowledge: ${t.data.toolRuns.knowledgeTools}, MCP: ${t.data.toolRuns.mcpTools}`,highlighted:!1,change:r!=null&&r.toolRuns?{value:Math.abs(r.toolRuns.changePercent.total),type:n(r.toolRuns.changePercent.total)}:void 0},{title:"Model Runs",value:t.data.modelRuns,metricType:"modelRuns",icon:"cpu",highlighted:!1,change:r!=null&&r.modelRuns?{value:Math.abs(r.modelRuns.changePercent),type:n(r.modelRuns.changePercent)}:void 0}]}transformTimeSeriesDataForMetric(t,r){var a;if(console.log("=== METRIC-SPECIFIC TRANSFORM DEBUG ==="),console.log("Raw TimeSeriesResponse:",JSON.stringify(t,null,2)),console.log("Metric type:",r),!t||!t.data||!Array.isArray(t.data))return console.error("Invalid time series data structure:",t),[];const n=t.data.map((i,o)=>{console.log(`Processing point ${o}:`,i);const s=new Date(i.timestamp),l=s.toISOString().split("T")[0],u=s.toLocaleDateString("en-US",{month:"short",day:"numeric"}),c={date:l,timestamp:u,formattedDate:u,count:i.count||0,value:i.count||0,input_tokens:i.input_tokens||0,output_tokens:i.output_tokens||0,total_tokens:(i.input_tokens||0)+(i.output_tokens||0),inputTokens:i.input_tokens||0,outputTokens:i.output_tokens||0,totalTokens:(i.input_tokens||0)+(i.output_tokens||0),listView:i.listView||[],index:o};switch(r){case"users":c.users=i.count||0;break;case"sessions":c.sessions=i.count||0;break;case"messages":c.messages=i.count||0;break;case"tokens":c.tokens=i.count||0,i.input_tokens||i.output_tokens?c.totalTokens=(i.input_tokens||0)+(i.output_tokens||0):c.totalTokens=i.count||0;break;case"agentRuns":c.agentRuns=i.count||0;break;case"toolRuns":c.toolRuns=i.count||0;break;case"modelRuns":c.modelRuns=i.count||0;break;default:c.users=i.count||0,c.sessions=i.count||0,c.messages=i.count||0,c.tokens=i.count||0,c.agentRuns=i.count||0,c.toolRuns=i.count||0,c.modelRuns=i.count||0}return console.log(`Transformed point ${o} for metric ${r}:`,c),c});return console.log("Final transformed data array:",JSON.stringify(n,null,2)),console.log("Sample transformed point for chart:",n[0]),console.log("Populated metric property:",r,"=",(a=n[0])==null?void 0:a[r||"count"]),console.log("=== END METRIC-SPECIFIC TRANSFORM DEBUG ==="),n}transformTimeSeriesData(t){return this.transformTimeSeriesDataForMetric(t)}transformAgentsListViewToTable(t){return Array.isArray(t)?t.map((r,n)=>{var o,s;let a="",i=null;if(r.icon)try{if(i=typeof r.icon=="string"?JSON.parse(r.icon):r.icon,i.name){const l=((o=r.agentName)==null?void 0:o.replace(/\s+/g,""))||`agent${n}`,u=((s=i.color)==null?void 0:s.replace("#",""))||"b6e3f4";a=`https://api.dicebear.com/7.x/avataaars/svg?seed=${l}&backgroundColor=${u}&backgroundType=solid`}}catch{console.warn("Failed to parse icon data:",r.icon)}return{id:`agent-${n+1}`,name:r.agentName||`Agent ${n+1}`,runs:r.count||0,responseTime:r.avgResponseTime?`${Math.round(r.avgResponseTime)}s`:"0s",tokens:r.tokens||Math.floor((r.count||0)*150),successRate:r.successRate?`${Math.round(r.successRate)}%`:"95%",lastRun:r.lastRun||new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),avatar:a||`https://api.dicebear.com/7.x/avataaars/svg?seed=agent${n}&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid`}}):(console.warn("Invalid listView data for agents:",t),[])}transformToolsListViewToTable(t){if(!Array.isArray(t))return console.warn("Invalid listView data for tools:",t),[];const r=a=>{const i=a.toLowerCase();return i.includes("calculate")||i.includes("compute")?"Code Tool":i.includes("workflow")||i.includes("process")?"Workflow Tool":i.includes("mcp")||i.includes("protocol")?"MCP Tool":i.includes("knowledge")||i.includes("search")||i.includes("fetch")?"Knowledge":"Code Tool"},n=a=>{const i=a.toLowerCase(),o={calculate:"🎯",risk:"⭐",mortgage:"🔵",analyse:"⚡",fetch:"💜",workflow:"🔄",search:"🔍",compute:"⚙️"};for(const[s,l]of Object.entries(o))if(i.includes(s))return l;return"🔧"};return t.map((a,i)=>({id:`tool-${i+1}`,name:a.toolName||`Tool ${i+1}`,type:a.type||r(a.toolName||""),runs:a.count||0,responseTime:a.avgResponseTime?`${Math.round(a.avgResponseTime)}s`:"0s",tokens:a.tokens||Math.floor((a.count||0)*50),successRate:a.successRate?`${Math.round(a.successRate)}%`:"92%",lastRun:a.lastRun||new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),icon:n(a.toolName||"")}))}transformModelsListViewToTable(t){if(!Array.isArray(t))return console.warn("Invalid listView data for models:",t),[];const r=n=>{const a=n.toLowerCase();return a.includes("gpt")||a.includes("openai")?"⚡":a.includes("claude")||a.includes("anthropic")?"A":a.includes("gemini")||a.includes("google")?"G":a.includes("llama")||a.includes("meta")?"M":"🤖"};return t.map((n,a)=>({id:`model-${a+1}`,name:n.modelName||`Model ${a+1}`,runs:n.count||0,responseTime:n.avgResponseTime?`${Math.round(n.avgResponseTime)}s`:"0s",tokens:n.tokens||Math.floor((n.count||0)*300),successRate:n.successRate?`${Math.round(n.successRate)}%`:"98%",lastRun:n.lastRun||new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),icon:r(n.modelName||"")}))}extractAgentControlOptions(t){if(!Array.isArray(t))return[{label:"All Agents",value:"all"}];const r=[{label:"All Agents",value:"all"}];return t.forEach(n=>{var a;if(n.agentName){let i="";try{if(n.icon){const o=typeof n.icon=="string"?JSON.parse(n.icon):n.icon;if(o.name){const s=n.agentName.replace(/\s+/g,""),l=((a=o.color)==null?void 0:a.replace("#",""))||"b6e3f4";i=`https://api.dicebear.com/7.x/avataaars/svg?seed=${s}&backgroundColor=${l}&backgroundType=solid`}}}catch{console.warn("Failed to parse icon data for control:",n.icon)}r.push({label:n.agentName,value:n.agentName.replace(/\s+/g,"").toLowerCase(),avatar:i||`https://api.dicebear.com/7.x/avataaars/svg?seed=${n.agentName.replace(/\s+/g,"")}&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid`})}}),r}extractToolControlOptions(t){if(!Array.isArray(t))return[{label:"All Tools",value:"all"}];const r=[{label:"All Tools",value:"all"}],n=a=>{const i=a.toLowerCase(),o={calculate:"🎯",risk:"⭐",mortgage:"🔵",analyse:"⚡",fetch:"💜",workflow:"🔄",search:"🔍"};for(const[s,l]of Object.entries(o))if(i.includes(s))return l;return"🔧"};return t.forEach(a=>{a.toolName&&r.push({label:a.toolName,value:a.toolName.replace(/[-]/g,""),icon:n(a.toolName)})}),r}extractModelControlOptions(t){if(!Array.isArray(t))return[{label:"All Models",value:"all"}];const r=[{label:"All Models",value:"all"}],n=a=>{const i=a.toLowerCase();return i.includes("gpt")||i.includes("openai")?"⚡":i.includes("claude")||i.includes("anthropic")?"A":i.includes("gemini")||i.includes("google")?"G":i.includes("llama")||i.includes("meta")?"M":"🤖"};return t.forEach(a=>{a.modelName&&r.push({label:a.modelName,value:a.modelName.replace(/[-\.]/g,""),icon:n(a.modelName)})}),r}async fetchTimeSeriesDataWithTableData(t,r,n,a,i,o=[]){const s=await this.fetchTimeSeriesData(t,r,n,a,i,o);let l=[];s.data.forEach(d=>{d.listView&&Array.isArray(d.listView)&&(l=[...l,...d.listView])});const u=this.aggregateListViewItems(l);let c=[],f=[];return t==="agent-runs"?(c=this.transformAgentsListViewToTable(u),f=this.extractAgentControlOptions(u)):t==="tool-runs"?(c=this.transformToolsListViewToTable(u),f=this.extractToolControlOptions(u)):t==="model-runs"&&(c=this.transformModelsListViewToTable(u),f=this.extractModelControlOptions(u)),{chartData:this.transformTimeSeriesDataForMetric(s,t.replace("-","")),tableData:c,controlOptions:f}}aggregateListViewItems(t){const r=new Map;return t.forEach(n=>{const a=n.agentName||n.toolName||n.modelName||"unknown";if(r.has(a)){const i=r.get(a);i.count=(i.count||0)+(n.count||0),i.avgResponseTime=i.avgResponseTime&&n.avgResponseTime?(i.avgResponseTime+n.avgResponseTime)/2:i.avgResponseTime||n.avgResponseTime,i.tokens=(i.tokens||0)+(n.tokens||0)}else r.set(a,{...n})}),Array.from(r.values())}async fetchEnhancedMetricsData(t,r,n,a=[]){try{const[i,o,s]=await Promise.all([this.fetchTimeSeriesDataWithTableData("agent-runs","runs",t,r,n,a),this.fetchTimeSeriesDataWithTableData("tool-runs","runs",t,r,n,a),this.fetchTimeSeriesDataWithTableData("model-runs","runs",t,r,n,a)]);return{agents:i,tools:o,models:s}}catch(i){throw console.error("Error fetching enhanced metrics data:",i),i}}async transformRunsCardsWithEnhancedData(t,r,n,a,i=[]){const o=t.data.trends,s=h=>h>0?"increase":"decrease",[l,u,c,f]=await Promise.all([this.fetchTimeSeriesDataWithTableData("agent-runs","runs",r,n,a,i),this.fetchTimeSeriesDataWithTableData("tool-runs","runs",r,n,a,i),this.fetchTimeSeriesDataWithTableData("model-runs","runs",r,n,a,i),this.fetchTimeSeriesData("tool-runs","runs",r,n,a,i)]),d=this.transformTimeSeriesDataForToolRuns(f);return[{title:"Agent Runs",value:t.data.agentRuns,metricType:"agentRuns",icon:"bot",highlighted:!0,info:"Number of agent executions",change:o!=null&&o.agentRuns?{value:Math.abs(o.agentRuns.changePercent),type:s(o.agentRuns.changePercent)}:void 0,view:{type:"chart",chart:{type:"line",title:"Agent Runs",data:l.chartData,dataKey:"agentRuns",color:"#0BA5EC",yAxisLabel:"Number of Agent Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}},table:{title:"Agent Runs",data:l.tableData,columns:[{key:"name",title:"Name",width:200,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"},{key:"tokens",title:"Tokens",width:100,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`}]}},controls:{dropdown:{label:"All Agents",options:l.controlOptions,defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}},{title:"Tool Runs",value:t.data.toolRuns.total,metricType:"toolRuns",icon:"wrench",info:`Code: ${t.data.toolRuns.codeTools}, Library: ${t.data.toolRuns.libraryTools}, Knowledge: ${t.data.toolRuns.knowledgeTools}, MCP: ${t.data.toolRuns.mcpTools}`,highlighted:!1,change:o!=null&&o.toolRuns?{value:Math.abs(o.toolRuns.changePercent.total),type:s(o.toolRuns.changePercent.total)}:void 0,view:{type:"chart",chart:{type:"line",title:"Tool Runs",data:d,yAxisLabel:"Number of Tool Runs",lines:[{dataKey:"toolRuns",color:"#667085",label:"Tool Runs"},{dataKey:"codeTools",color:"#F38744",label:"Code Tools"},{dataKey:"workflowTools",color:"#2970FF",label:"Workflow Tools"},{dataKey:"knowledgeTools",color:"#7A5AF8",label:"Knowledge"},{dataKey:"mcpTools",color:"#47CD89",label:"MCP Tools"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}},table:{title:"Tool Runs",data:u.tableData,columns:[{key:"name",title:"Name",width:200,align:"left"},{key:"type",title:"Type",width:150,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"}]}},controls:{dropdown:{label:"All Tools",options:u.controlOptions,defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}},{title:"Model Runs",value:t.data.modelRuns,metricType:"modelRuns",icon:"cpu",highlighted:!1,info:"Number of model inferences",change:o!=null&&o.modelRuns?{value:Math.abs(o.modelRuns.changePercent),type:s(o.modelRuns.changePercent)}:void 0,view:{type:"chart",chart:{type:"line",title:"Model Runs",data:c.chartData,dataKey:"modelRuns",color:"#47CD89",yAxisLabel:"Number of Model Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}},table:{title:"Model Runs",data:c.tableData,columns:[{key:"name",title:"Model Name",width:200,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`},{key:"tokens",title:"Tokens",width:120,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"}]}},controls:{dropdown:{label:"All Models",options:c.controlOptions,defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}}]}async transformUsageAnalyticsCardsWithEnhancedData(t,r,n,a,i=[]){const o=t.data.trends,s=d=>d>0?"increase":"decrease",[l,u,c,f]=await Promise.all([this.fetchTimeSeriesData("users","usage-analytics",r,n,a,i),this.fetchTimeSeriesData("sessions","usage-analytics",r,n,a,i),this.fetchTimeSeriesData("messages","usage-analytics",r,n,a,i),this.fetchTimeSeriesData("tokens","usage-analytics",r,n,a,i)]);return[{title:"Users",value:t.data.users,metricType:"users",icon:"users",highlighted:!0,info:"Total number of unique users",change:o!=null&&o.users?{value:Math.abs(o.users.changePercent),type:s(o.users.changePercent)}:void 0,view:{type:"chart",chart:{type:"line",title:"Total Users",data:this.transformTimeSeriesDataForMetric(l,"users"),dataKey:"users",color:"#4E5BA6",yAxisLabel:"Number of Users",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}}}},{title:"Sessions",value:t.data.sessions,metricType:"sessions",icon:"activity",highlighted:!1,info:"Total number of user sessions",change:o!=null&&o.sessions?{value:Math.abs(o.sessions.changePercent),type:s(o.sessions.changePercent)}:void 0,view:{type:"chart",chart:{type:"line",title:"Total Sessions",data:this.transformTimeSeriesDataForMetric(u,"sessions"),dataKey:"sessions",color:"#0BA5EC",yAxisLabel:"Number of Sessions",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}}}},{title:"Messages",value:t.data.messages.total,metricType:"messages",icon:"message-circle",info:`Input: ${t.data.messages.input}, Output: ${t.data.messages.output}`,highlighted:!1,change:o!=null&&o.messages?{value:Math.abs(o.messages.changePercent.total),type:s(o.messages.changePercent.total)}:void 0,view:{type:"chart",chart:{type:"line",title:"Total Messages",data:this.transformTimeSeriesDataForMetric(c,"messages"),dataKey:"messages",color:"#E478FA",yAxisLabel:"Number of Messages",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}}}},{title:"Tokens",value:t.data.tokens.total,metricType:"tokens",icon:"coins",info:`Input: ${t.data.tokens.input}, Output: ${t.data.tokens.output}`,highlighted:!1,change:o!=null&&o.tokens?{value:Math.abs(o.tokens.changePercent.total),type:s(o.tokens.changePercent.total)}:void 0,view:{type:"chart",chart:{type:"line",title:"Token Usage Breakdown",data:this.transformTimeSeriesDataForMetric(f,"tokens"),yAxisLabel:"Number of Tokens",lines:[{dataKey:"totalTokens",color:"#FF692E",label:"Total Tokens"},{dataKey:"inputTokens",color:"#5925DC",label:"Input Tokens"},{dataKey:"outputTokens",color:"#E478FA",label:"Output Tokens"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}}}}]}transformTimeSeriesDataForToolRuns(t){if(console.log("=== TOOL RUNS SPECIFIC TRANSFORM DEBUG ==="),console.log("Raw TimeSeriesResponse for tool runs:",JSON.stringify(t,null,2)),!t||!t.data||!Array.isArray(t.data))return console.error("Invalid time series data structure:",t),[];const r=t.data.map((n,a)=>{console.log(`Processing point ${a}:`,n);const i=new Date(n.timestamp),o=i.toISOString().split("T")[0],s=i.toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=n.count||0;let u=0,c=0,f=0,d=0;if(n.listView&&Array.isArray(n.listView)){n.listView.forEach(v=>{const y=v.count||0,x=(v.toolType||"").toLowerCase(),O=(v.toolName||"").toLowerCase();console.log("Processing listView item:",{toolType:x,toolName:O,count:y}),x==="tool"||x==="code"||x==="codetool"?u+=y:x==="workflow"||x==="workflowtool"||O.includes("workflow")?c+=y:x==="knowledge"||x==="knowledgetool"||O.includes("knowledge")||O.includes("search")||O.includes("fetch")?f+=y:x==="mcp"||x==="mcptool"||O.includes("mcp")?d+=y:(console.log(`Unknown tool type '${x}' for tool '${O}', defaulting to code tools`),u+=y)}),console.log(`Calculated breakdown for point ${a}:`,{codeTools:u,workflowTools:c,knowledgeTools:f,mcpTools:d,total:u+c+f+d,expectedTotal:l});const m=u+c+f+d;if(Math.abs(m-l)>1){console.warn(`Breakdown total (${m}) doesn't match expected total (${l}) for point ${a}`);const v=l-m;u+=v,console.log(`Adjusted codeTools by ${v} to balance total`)}}else console.log(`No listView data for point ${a}, assigning all ${l} to codeTools`),u=l;const h={date:o,timestamp:s,formattedDate:s,toolRuns:l,value:l,count:l,codeTools:u,workflowTools:c,knowledgeTools:f,mcpTools:d,input_tokens:n.input_tokens||0,output_tokens:n.output_tokens||0,total_tokens:(n.input_tokens||0)+(n.output_tokens||0),inputTokens:n.input_tokens||0,outputTokens:n.output_tokens||0,totalTokens:(n.input_tokens||0)+(n.output_tokens||0),listView:n.listView||[],index:a};return console.log(`Transformed tool runs point ${a}:`,h),h});return console.log("Final tool runs transformed data:",JSON.stringify(r,null,2)),console.log("=== END TOOL RUNS SPECIFIC TRANSFORM DEBUG ==="),r}async fetchAllCardsData(t,r,n=[]){try{const[a,i]=await Promise.all([this.fetchUsageAnalyticsCards(t,r,void 0,n),this.fetchRunsCards(t,r,void 0,n)]);return{usageAnalytics:this.transformUsageAnalyticsCards(a),runs:this.transformRunsCards(i)}}catch(a){throw console.error("Error fetching cards data:",a),a}}async fetchAllCardsDataWithEnhancedViews(t,r,n,a=[]){try{const[i,o]=await Promise.all([this.fetchUsageAnalyticsCards(t,r,n,a),this.fetchRunsCards(t,r,n,a)]),[s,l]=await Promise.all([this.transformUsageAnalyticsCardsWithEnhancedData(i,t,r,n,a),this.transformRunsCardsWithEnhancedData(o,t,r,n,a)]);return{usageAnalytics:s,runs:l}}catch(i){throw console.error("Error fetching enhanced cards data:",i),i}}async fetchDefaultTimeSeriesData(t,r,n,a=[]){try{const[i,o]=await Promise.all([this.fetchTimeSeriesData("sessions","usage-analytics",t,r,n,a),this.fetchTimeSeriesData("agent-runs","runs",t,r,n,a)]);return{sessions:this.transformTimeSeriesData(i),agentRuns:this.transformTimeSeriesData(o)}}catch(i){throw console.error("Error fetching default time series data:",i),i}}static getDateRange(t=30){const r=new Date,n=new Date;return n.setDate(r.getDate()-t),{fromTimestamp:n.toISOString(),toTimestamp:r.toISOString()}}static getTimeDimension(t,r){const n=new Date(t),a=new Date(r),i=new Date(n.getFullYear(),n.getMonth(),n.getDate()),o=new Date(a.getFullYear(),a.getMonth(),a.getDate()),s=o.getTime()-i.getTime(),l=s/(1e3*60*60*24),u=i.toISOString().split("T")[0],c=o.toISOString().split("T")[0],f=u===c,d=new Date(n.getFullYear(),n.getMonth(),n.getDate()),h=f&&Math.abs(n.getTime()-d.getTime())<1e3,m=Math.abs(a.getTime()-n.getTime()),v=m<60*1e3;return console.log("🕐 TimeDimension calculation:",{fromTimestamp:t,toTimestamp:r,fromDateStr:u,toDateStr:c,diffInMs:s,diffInDays:l,isSameCalendarDay:f,isTodayPattern:h,timeDiffInMs:m,isVeryClose:v,fromStartOfDay:d.toISOString(),recommended:f||h||v||l<=1?"hour":l<=31?"day":l<=90?"week":"month"}),f||h||v||l<=1?"hour":"day"}getAvailableMetrics(){return{"usage-analytics":["sessions","messages","users","tokens"],runs:["agent-runs","model-runs","tool-runs"]}}}const gU=({config:e,appConfig:t,className:r,onExport:n,onDraftChange:a,onTimeRangeChange:i})=>{var N;const{title:o,subtitle:s,sections:l,globalControls:u,layout:c={columns:12,gap:24,responsive:!0}}=e,[f,d]=S.useState(!1),[h,m]=S.useState({}),[v,y]=S.useState(null),[x,O]=S.useState(l),[w,T]=S.useState([]),[p,g]=S.useState(!1),A=S.useRef(null);S.useEffect(()=>{if(t)try{A.current=new lr(t),P(),_()}catch(D){console.error("Failed to initialize API service:",D),y("Failed to initialize API service")}},[t]);const P=async()=>{if(!(!A.current||!t)){g(!0);try{const D=await A.current.fetchEnvironments();T(D),console.log("🌍 Environments loaded:",D.map(L=>L.envName))}catch(D){console.error("Error loading environments:",D)}finally{g(!1)}}},_=async()=>{if(!(!A.current||!t)){d(!0),y(null);try{const D=A.current.getDefaultTimeRange();console.log("📊 Loading dashboard data with date range:",{fromTimestamp:D.fromTimestamp,toTimestamp:D.toTimestamp,fromDate:new Date(D.fromTimestamp).toLocaleDateString(),toDate:new Date(D.toTimestamp).toLocaleDateString()});const L=await A.current.fetchAllCardsDataWithEnhancedViews(D.fromTimestamp,D.toTimestamp);console.log("✅ Enhanced cards data loaded successfully:",L),console.log("📈 Data covers period:",{from:new Date(D.fromTimestamp).toLocaleDateString(),to:new Date(D.toTimestamp).toLocaleDateString()});const E=l.map(j=>j.id==="usage-analytics"?(console.log("Updating usage-analytics section with enhanced data"),{...j,metrics:L.usageAnalytics}):j.id==="runs"?(console.log("Updating runs section with enhanced data including table and controls"),{...j,metrics:L.runs}):j);O(E)}catch(D){console.error("Error loading initial data:",D),y("Failed to load dashboard data"),O(l)}finally{d(!1)}}},R=async(D,L)=>{if(!(!A.current||!t||!L.metricType)){O(E=>E.map(j=>j.id===D?{...j,metrics:j.metrics.map(I=>({...I,highlighted:I.metricType===L.metricType}))}:j)),m(E=>({...E,[D]:!0}));try{const E=t.defaultTimeRange||lr.getDateRange(30);let j,I;if(["users","sessions","messages","tokens"].includes(L.metricType))j="usage-analytics",I=L.metricType;else if(["agentRuns","toolRuns","modelRuns"].includes(L.metricType))j="runs",I=L.metricType==="agentRuns"?"agent-runs":L.metricType==="toolRuns"?"tool-runs":"model-runs";else return;const B=await A.current.fetchTimeSeriesData(I,j,E.fromTimestamp,E.toTimestamp),z=A.current.transformTimeSeriesDataForMetric(B,L.metricType);console.log("Time series response for",L.title,":",B),console.log("Transformed data for",L.title,":",z),console.log("Metric type used for transformation:",L.metricType);const Z=(Q=>({users:"users",sessions:"sessions",messages:"messages",tokens:"totalTokens",agentRuns:"agentRuns",toolRuns:"toolRuns",modelRuns:"modelRuns"})[Q]||"count")(L.metricType||"count");console.log("Using dataKey for metric",L.metricType,":",Z),O(Q=>Q.map(ee=>{if(ee.id===D){const te={...ee,view:{...ee.view,chart:ee.view.chart?{...ee.view.chart,data:z,dataKey:Z,lines:[{dataKey:Z,color:ee.view.chart.color||"#3b82f6",label:L.title,strokeWidth:2}]}:{type:"line",data:z,dataKey:Z,lines:[{dataKey:Z,color:"#3b82f6",label:L.title,strokeWidth:2}],yAxisLabel:L.title}}};return console.log("Updated section for",D,":",te),console.log("Chart config set:",te.view.chart),te}return ee}))}catch(E){console.error("Error loading metric data:",E),y(`Failed to load ${L.title} data`)}finally{m(E=>({...E,[D]:!1}))}}},M=D=>{var L,E;if((E=(L=u==null?void 0:u.draft)==null?void 0:L.onChange)==null||E.call(L,D),a==null||a(D),t&&A.current){const j={...t,environment:D};A.current.updateConfig(j),_()}},C=D=>{var L,E;if(console.log("🗓️ Time range change requested:",D),typeof D=="string"&&((E=(L=u==null?void 0:u.timeRange)==null?void 0:L.onChange)==null||E.call(L,D)),i==null||i(D),t&&A.current){let j=null;if(typeof D=="object"&&D.from&&D.to)j={fromTimestamp:D.from.toISOString(),toTimestamp:D.to.toISOString()},console.log("📅 Converting DateRange to API format:",j);else if(typeof D=="string"){const B={"24h":1,"7d":7,"30d":30,"90d":90}[D];B&&(j=lr.getDateRange(B),console.log(`📅 Converting preset "${D}" (${B} days) to API format:`,j))}if(j){const I={...t,defaultTimeRange:j};console.log("🔄 Updating API configuration with new date range:",I.defaultTimeRange),A.current.updateConfig(I),console.log("🚀 Reloading dashboard data with new date range..."),_()}else console.warn("⚠️ Unable to convert time range value to API format:",D)}},W=(D="csv")=>{var L,E;(E=(L=u==null?void 0:u.export)==null?void 0:L.onExport)==null||E.call(L,D),n==null||n()},U=()=>{t&&A.current&&_()},F=Object.values(h).some(D=>D);return b.jsxs("div",{className:ue("mx-auto p-6",r),children:[b.jsx("div",{className:"mb-8",children:b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{children:[b.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:o}),s&&b.jsx("p",{className:"text-gray-600 mt-2",children:s}),v&&b.jsx("p",{className:"text-red-600 mt-2 text-sm",children:v})]}),b.jsxs("div",{className:"flex items-center gap-3",children:[t&&b.jsxs(Es,{variant:"outline",onClick:U,disabled:f||F,className:"gap-2",children:[b.jsx(e0,{className:ue("h-4 w-4",(f||F)&&"animate-spin")}),"Refresh"]}),u&&b.jsxs(b.Fragment,{children:[u.draft&&b.jsx(js,{options:w.length>0?w.map(D=>({label:D.envName.charAt(0).toUpperCase()+D.envName.slice(1),value:D.envName})):u.draft.options,value:u.draft.defaultValue,placeholder:p?"Loading environments...":u.draft.label,onChange:M,className:"min-w-[200px]",disabled:f||F||p}),u.timeRange&&(u.timeRange.useDatePicker?(console.log("🗓️ Dashboard: Rendering DateRangePicker with defaultValue:",u.timeRange.defaultValue),b.jsx($b,{defaultValue:u.timeRange.defaultValue,onDateRangeChange:D=>{console.log("🗓️ Dashboard: DateRangePicker callback received:",D),D&&C(D)}})):b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(pf,{className:"h-4 w-4 text-gray-500"}),b.jsx(js,{options:u.timeRange.options||[],value:u.timeRange.defaultValue,placeholder:u.timeRange.label,onChange:C,className:"min-w-[200px]",disabled:f||F})]})),((N=u.export)==null?void 0:N.enabled)&&b.jsxs(Es,{variant:"outline",onClick:()=>W(),className:"gap-2",disabled:f||F,children:[b.jsx(Zb,{className:"h-4 w-4"}),"Export"]})]})]})]})}),b.jsx("div",{className:ue("grid gap-6",c.responsive&&"grid-cols-1 lg:grid-cols-12"),style:{gridTemplateColumns:c.responsive?void 0:`repeat(${c.columns}, minmax(0, 1fr))`,gap:c.gap?`${c.gap}px`:void 0},children:x.map(D=>{var L,E,j,I;return b.jsx(bb,{section:D,isLoading:f,isChartLoading:h[D.id]||!1,onMetricClick:B=>R(D.id,B),className:ue(c.responsive&&((L=D.layout)==null?void 0:L.span)===12&&"lg:col-span-12",c.responsive&&((E=D.layout)==null?void 0:E.span)===6&&"lg:col-span-6",c.responsive&&((j=D.layout)==null?void 0:j.span)===4&&"lg:col-span-4",c.responsive&&((I=D.layout)==null?void 0:I.span)===3&&"lg:col-span-3")},D.id)})})]})},Ds=["Portfolio Analysis Expert","Mortgage Evaluator","Credit Risk Specialist","Asset Valuation Analyst","Liability Assessment Advisor"],Is=["calculate-creditScore","calculate-risk","calculate-mortgage","analyse-expenses","fetch-statement"],Rs=["gpt-4o","gpt-4o-mini","gpt-3.5-turbo","claude-3-5-sonnet","claude-3-5-haiku","claude-3-opus","gemini-1.5-pro","gemini-1.5-flash","llama-3.1-405b","llama-3.1-70b"],bU=(e=30)=>{const t=[],r=new Date;for(let n=e-1;n>=0;n--){const a=new Date(r);a.setDate(r.getDate()-n);const i=600+Math.sin(n*.1)*100,o=Math.floor(i+Math.random()*100),s=Math.floor(o*3.5+Math.random()*200),l=Math.floor(s*2.9+Math.random()*500),u=Math.floor(l*.9+Math.random()*300),c=Math.floor(u*.6),f=u-c,d=Math.floor(s*.8+Math.random()*100),h=Math.floor(d*12+Math.random()*500),m=Math.floor(d*8+Math.random()*300),v=Math.floor(h*.3+Math.random()*100),y=Math.floor(h*.25+Math.random()*80),x=Math.floor(h*.2+Math.random()*60),O=Math.floor(h*.15+Math.random()*50),w={};Ds.forEach(g=>{const A=g.replace(/\s+/g,"").toLowerCase(),P=Math.floor(d/Ds.length);w[A]=Math.floor(P+Math.random()*(P*.5))});const T={};Is.forEach(g=>{const A=g.replace(/[-]/g,""),P=Math.floor(h/Is.length);T[A]=Math.floor(P+Math.random()*(P*.8))});const p={};Rs.forEach(g=>{const A=g.replace(/[-\.]/g,""),P=Math.floor(m/Rs.length);p[A]=Math.floor(P+Math.random()*(P*.6))}),t.push({date:a.toISOString().split("T")[0],users:o,sessions:s,messages:l,totalTokens:u,inputTokens:c,outputTokens:f,agentRuns:d,toolRuns:h,modelRuns:m,codeTools:v,workflowTools:y,knowledgeTools:x,mcpTools:O,...w,...T,...p,value:o})}return t},xU=()=>{const e=[];return Ds.forEach((t,r)=>{e.push({id:`agent-${r+1}`,name:t,runs:Math.floor(Math.random()*8e3)+4e3,responseTime:`${Math.floor(Math.random()*120)+15}s`,tokens:Math.floor(Math.random()*4e5)+1e5,successRate:`${Math.floor(Math.random()*20)+80}%`,lastRun:new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),avatar:`https://api.dicebear.com/7.x/avataaars/svg?seed=${t.replace(/\s+/g,"")}&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid`})}),e},wU=()=>{const e=t=>t.includes("calculate-creditscore")?"Code Tool":t.includes("calculate-risk")?"Workflow Tool":t.includes("calculate-mortgage")?"MCP Tool":t.includes("analyse-expenses")?"Workflow Tool":t.includes("fetch-statement")?"Knowledge":"Code Tool";return Is.map((t,r)=>({id:`tool-${r+1}`,name:t,type:e(t),runs:Math.floor(Math.random()*8e3)+4e3,responseTime:`${Math.floor(Math.random()*90)+15}s`,tokens:Math.floor(Math.random()*2e4)+5e3,successRate:`${Math.floor(Math.random()*15)+85}%`,lastRun:new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString()}))},OU=()=>Rs.map((e,t)=>({id:`model-${t+1}`,name:e,runs:Math.floor(Math.random()*8e3)+4e3,responseTime:`${Math.floor(Math.random()*120)+15}s`,tokens:Math.floor(Math.random()*5e5)+1e5,successRate:`${Math.floor(Math.random()*15)+85}%`,lastRun:new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString()})),Xr=bU(),SU=xU(),AU=wU(),TU=OU(),PU={id:"main-dashboard",title:"Dashboard",subtitle:"Monitor and review the usage of your agentic app.",version:"1.0.0",globalControls:{draft:{label:"Draft",options:[{label:"Current Draft",value:"current"},{label:"Previous Draft",value:"previous"},{label:"All Drafts",value:"all"}],defaultValue:"current"},timeRange:{label:"Time Range",options:[{label:"This month",value:"month"},{label:"Last 7 days",value:"week"},{label:"Last 30 days",value:"30days"},{label:"Last 90 days",value:"90days"}],defaultValue:"month"},export:{enabled:!0,formats:["csv","json","pdf"]}},layout:{columns:12,gap:24,responsive:!0},sections:[{id:"sessions",title:"Sessions",description:"User engagement and session analytics",metrics:[{title:"Users",value:3384,change:{value:6,type:"increase"},info:"Total number of unique users",metricType:"users",view:{type:"chart",chart:{type:"line",title:"Total Users",data:Xr,dataKey:"users",color:"#8b5cf6",yAxisLabel:"Number of Users",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}}},{title:"Sessions",value:11847,change:{value:18,type:"increase"},info:"Total number of user sessions",metricType:"sessions",view:{type:"chart",chart:{type:"line",title:"Total Sessions",data:Xr,dataKey:"sessions",color:"#06b6d4",yAxisLabel:"Number of Sessions",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}}},{title:"Messages",value:34563,change:{value:5,type:"increase"},info:"Total messages exchanged",metricType:"messages",view:{type:"chart",chart:{type:"line",title:"Total Messages",data:Xr,dataKey:"messages",color:"#e879f9",yAxisLabel:"Number of Messages",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}}},{title:"Tokens",value:32044,change:{value:44,type:"increase"},info:"Total tokens processed",metricType:"tokens",view:{type:"chart",chart:{type:"line",title:"Token Usage Breakdown",data:Xr,yAxisLabel:"Number of Tokens",lines:[{dataKey:"totalTokens",color:"#f97316",label:"Total Tokens"},{dataKey:"inputTokens",color:"#3b82f6",label:"Input Tokens"},{dataKey:"outputTokens",color:"#e879f9",label:"Output Tokens"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}}}],view:{type:"chart"},layout:{span:12,order:1}},{id:"runs",title:"Runs",description:"Agent, tool, and model execution analytics",metrics:[{title:"Agent Runs",value:3384,change:{value:6,type:"increase"},info:"Number of agent executions",metricType:"agentRuns",view:{type:"chart",chart:{type:"line",title:"Agent Runs",data:Xr,dataKey:"agentRuns",color:"#06b6d4",yAxisLabel:"Number of Agent Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}},table:{title:"Agent Runs",data:SU,columns:[{key:"name",title:"Name",width:200,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"},{key:"tokens",title:"Tokens",width:100,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`}]}},controls:{dropdown:{label:"All Agents",options:[{label:"All Agents",value:"all"},...Ds.map(e=>({label:e,value:e.replace(/\s+/g,"").toLowerCase(),avatar:`https://api.dicebear.com/7.x/avataaars/svg?seed=${e.replace(/\s+/g,"")}&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid`}))],defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}},{title:"Tool Runs",value:34563,change:{value:5,type:"increase"},info:"Number of tool executions",metricType:"toolRuns",view:{type:"chart",chart:{type:"line",title:"Tool Runs",data:Xr,yAxisLabel:"Number of Tool Runs",lines:[{dataKey:"toolRuns",color:"#06b6d4",label:"Tool Runs"},{dataKey:"codeTools",color:"#f97316",label:"Code Tools"},{dataKey:"workflowTools",color:"#10b981",label:"Workflow Tools"},{dataKey:"knowledgeTools",color:"#8b5cf6",label:"Knowledge"},{dataKey:"mcpTools",color:"#ef4444",label:"MCP Tools"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}},table:{title:"Tool Runs",data:AU,columns:[{key:"name",title:"Name",width:200,align:"left"},{key:"type",title:"Type",width:150,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"}]}},controls:{dropdown:{label:"All Tools",options:[{label:"All Tools",value:"all"},...Is.map(e=>{const t=r=>({"calculate-creditscore":"🎯","calculate-risk":"⭐","calculate-mortgage":"🔵","analyse-expenses":"⚡","fetch-statement":"💜"})[r]||"🔧";return{label:e,value:e.replace(/[-]/g,""),icon:t(e)}})],defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}},{title:"Model Runs",value:32044,change:{value:44,type:"increase"},info:"Number of model inferences",metricType:"modelRuns",view:{type:"chart",chart:{type:"line",title:"Model Runs",data:Xr,dataKey:"modelRuns",color:"#10b981",yAxisLabel:"Number of Model Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}},table:{title:"Model Runs",data:TU,columns:[{key:"name",title:"Model Name",width:200,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`},{key:"tokens",title:"Tokens",width:120,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"}]}},controls:{dropdown:{label:"All Models",options:[{label:"All Models",value:"all"},...Rs.map(e=>{const t=r=>{const n=r.toLowerCase();return n.includes("gpt")||n.includes("openai")?"⚡":n.includes("claude")||n.includes("anthropic")?"A":n.includes("gemini")||n.includes("google")?"G":n.includes("llama")||n.includes("meta")?"M":"🤖"};return{label:e,value:e.replace(/[-\.]/g,""),icon:t(e)}})],defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}}],view:{type:"chart"},layout:{span:12,order:2}}]},Vt={primary:["#8b5cf6","#06b6d4","#f97316","#10b981","#ec4899","#f59e0b","#3b82f6","#ef4444"],secondary:["#a78bfa","#22d3ee","#fb923c","#34d399","#f472b6","#fbbf24","#60a5fa","#f87171"],accent:["#6366f1","#8b5cf6","#d946ef","#06b6d4","#84cc16","#eab308"],semantic:{success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#3b82f6"},gradients:{purple:["#8b5cf6","#a78bfa"],cyan:["#06b6d4","#22d3ee"],orange:["#f97316","#fb923c"],green:["#10b981","#34d399"],sunset:["#f97316","#ec4899"],ocean:["#06b6d4","#3b82f6"],forest:["#10b981","#84cc16"]}},_U={primary:["#7c3aed","#0891b2","#ea580c","#059669","#db2777","#d97706","#2563eb","#dc2626"],secondary:["#8b5cf6","#06b6d4","#f97316","#10b981","#ec4899","#f59e0b","#3b82f6","#ef4444"],accent:["#4f46e5","#7c3aed","#c026d3","#0891b2","#65a30d","#ca8a04"],semantic:{success:"#059669",warning:"#d97706",error:"#dc2626",info:"#2563eb"}},jU={primary:["#a78bfa","#22d3ee","#fb923c","#34d399","#f472b6","#fbbf24","#60a5fa","#f87171"],secondary:["#c4b5fd","#67e8f9","#fdba74","#6ee7b7","#f9a8d4","#fcd34d","#93c5fd","#fca5a5"],accent:["#818cf8","#a78bfa","#e879f9","#22d3ee","#a3e635","#facc15"],semantic:{success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#60a5fa"}},EU={primary:["#1f2937","#374151","#6b7280","#9ca3af","#3b82f6","#1d4ed8","#10b981","#f59e0b"],secondary:["#4b5563","#6b7280","#9ca3af","#d1d5db","#60a5fa","#3b82f6","#34d399","#fbbf24"],accent:["#2563eb","#1d4ed8","#059669","#0891b2","#d97706","#b45309"],semantic:{success:"#059669",warning:"#d97706",error:"#dc2626",info:"#1d4ed8"}},kb=(e,t)=>e.primary[t%e.primary.length],wi=(e,t)=>e.semantic[t],$U=(e,t)=>{var r;return((r=e.gradients)==null?void 0:r[t])||[e.primary[0],e.primary[1]]},Nb=(e,t=Vt)=>e.map((r,n)=>({...r,color:kb(t,n)})),Ls=((e=30)=>{const t=[],r=new Date;for(let n=e-1;n>=0;n--){const a=new Date(r);a.setDate(r.getDate()-n);const i=600+Math.sin(n*.1)*100,o=Math.floor(i+Math.random()*100),s=Math.floor(o*3.5+Math.random()*200),l=Math.floor(s*2.9+Math.random()*500),u=Math.floor(l*.9+Math.random()*300),c=Math.floor(u*.6),f=u-c,d=Math.floor(s*.8+Math.random()*100),h=Math.floor(d*12+Math.random()*500),m=Math.floor(d*8+Math.random()*300);t.push({date:a.toISOString().split("T")[0],users:o,sessions:s,messages:l,totalTokens:u,inputTokens:c,outputTokens:f,agentRuns:d,toolRuns:h,modelRuns:m,value:o})}return t})(),CU={id:"enhanced-dashboard",title:"Enhanced Color Configuration Dashboard",subtitle:"Demonstrating all color configuration options",version:"1.0.0",globalControls:{draft:{label:"Draft",options:[{label:"Current Draft",value:"current"},{label:"Previous Draft",value:"previous"}],defaultValue:"current"},timeRange:{label:"Time Range",options:[{label:"Last 7 days",value:"week"},{label:"Last 30 days",value:"30days"}],defaultValue:"30days"},export:{enabled:!0,formats:["csv","json"]}},layout:{columns:12,gap:24,responsive:!0},sections:[{id:"manual-colors",title:"Manual Color Assignment",description:"Each line has manually assigned colors",metrics:[{title:"Total Users",value:3384,change:{value:6,type:"increase"},info:"Manually colored chart"}],view:{type:"chart",chart:{type:"line",title:"Manual Color Configuration",data:Ls,lines:[{dataKey:"users",color:"#8b5cf6",label:"Users",strokeWidth:3},{dataKey:"sessions",color:"#06b6d4",label:"Sessions",strokeWidth:2},{dataKey:"messages",color:"#f97316",label:"Messages",strokeWidth:2,strokeDasharray:"5 5"}],dateRange:{start:"2025-05-06",end:"2025-06-05"},tooltip:{show:!0,style:"dark"},height:300,showLegend:!1}},layout:{span:6,order:1}},{id:"auto-colors",title:"Auto-Assigned Colors",description:"Colors automatically assigned from palette",metrics:[{title:"Agent Runs",value:3384,change:{value:6,type:"increase"},info:"Auto-colored from palette"}],view:{type:"chart",chart:{type:"line",title:"Auto Color Assignment",data:Ls,lines:Nb([{dataKey:"agentRuns",label:"Agent Runs"},{dataKey:"toolRuns",label:"Tool Runs"},{dataKey:"modelRuns",label:"Model Runs"},{dataKey:"totalTokens",label:"Total Tokens"}],Vt),dateRange:{start:"2025-05-06",end:"2025-06-05"},tooltip:{show:!0,style:"dark"},height:300,showLegend:!1}},layout:{span:6,order:2}},{id:"semantic-colors",title:"Semantic Colors",description:"Using semantic colors for different data types",metrics:[{title:"Success Rate",value:"94.2%",change:{value:2,type:"increase"},info:"Using semantic success color"},{title:"Error Rate",value:"5.8%",change:{value:1,type:"decrease"},info:"Using semantic error color"}],view:{type:"chart",chart:{type:"line",title:"Semantic Color Usage",data:Ls,lines:[{dataKey:"users",color:wi(Vt,"success"),label:"Successful Operations",strokeWidth:3},{dataKey:"sessions",color:wi(Vt,"warning"),label:"Warning Events",strokeWidth:2},{dataKey:"messages",color:wi(Vt,"error"),label:"Error Events",strokeWidth:2},{dataKey:"totalTokens",color:wi(Vt,"info"),label:"Info Events",strokeWidth:2}],dateRange:{start:"2025-05-06",end:"2025-06-05"},tooltip:{show:!0,style:"dark"},height:300,showLegend:!1}},layout:{span:12,order:3}},{id:"single-custom",title:"Single Line Custom Color",description:"Single line chart with custom color and styling",metrics:[{title:"Total Messages",value:34563,change:{value:5,type:"increase"},info:"Custom styled single line"}],view:{type:"chart",chart:{type:"line",title:"Custom Single Line",data:Ls,dataKey:"messages",color:"#ec4899",dateRange:{start:"2025-05-06",end:"2025-06-05"},tooltip:{show:!0,style:"dark"},height:250,showGrid:!0,curve:"monotone"}},layout:{span:12,order:4}}]},MU={manualColors:{line1:"#8b5cf6",line2:"#06b6d4",line3:"#f97316",line4:"#10b981"},paletteColors:Vt.primary,semanticColors:Vt.semantic,gradientColors:Vt.gradients},kU={baseUrl:window.location.protocol+"//"+window.location.hostname,dashboardType:"agenticDashboard",projectId:"aa-bdbfa4eb-c7c4-4350-be96-d778188c2c4b",environment:"draft",headers:{authorization:"Bearer 2amvsUbh87obVLVYjbNnXCbXnOr-plekM7-qjKt2EJIZnZuAV2KT9WSTG0L4U33X",accountId:"6290f982fb880154e99bbede","Content-Type":"application/json"},defaultTimeRange:{fromTimestamp:new Date(Date.now()-30*24*60*60*1e3).toISOString(),toTimestamp:new Date().toISOString()},refreshInterval:3e4},NU={id:"agentic-analytics-dashboard",title:"Dashboard",subtitle:"Monitor and review the usage of your agentic app.",sections:[{id:"usage-analytics",title:"Sessions",metrics:[{title:"Users",value:0,metricType:"users",highlighted:!0},{title:"Sessions",value:0,metricType:"sessions",highlighted:!1},{title:"Messages",value:0,metricType:"messages",highlighted:!1},{title:"Tokens",value:0,metricType:"tokens",highlighted:!1}],view:{type:"chart",chart:{type:"line",title:"Usage Over Time",data:[],lines:[{dataKey:"count",color:"#3B82F6",label:"Count",strokeWidth:2}],xAxisLabel:"Date",yAxisLabel:"Count",tooltip:{show:!0,formatter:(e,t)=>[`${e}`,t]}}},layout:{span:12}},{id:"runs",title:"Runs",metrics:[{title:"Agent Runs",value:0,metricType:"agentRuns",highlighted:!0},{title:"Tool Runs",value:0,metricType:"toolRuns",highlighted:!1},{title:"Model Runs",value:0,metricType:"modelRuns",highlighted:!1}],view:{type:"chart",chart:{type:"line",title:"Execution Runs Over Time",data:[],lines:[{dataKey:"count",color:"#10B981",label:"Runs",strokeWidth:2}],xAxisLabel:"Date",yAxisLabel:"Count",tooltip:{show:!0,formatter:(e,t)=>[`${e}`,t]}}},layout:{span:12}}],globalControls:{draft:{label:"Environment",options:[{label:"Draft",value:"draft"},{label:"Production",value:"production"},{label:"Staging",value:"staging"}],defaultValue:"draft"},timeRange:{label:"Time Range",useDatePicker:!0,options:[{label:"Last 7 days",value:"7d"},{label:"Last 30 days",value:"30d"},{label:"Last 90 days",value:"90d"}],defaultValue:"30d"},export:{enabled:!1,formats:["csv","json"],onExport:e=>{console.log(`Exporting in ${e} format`)}}},layout:{columns:12,gap:24,responsive:!0}},DU=`
|
|
201
|
-
// In your Angular component (usage-analytics.component.ts)
|
|
202
|
-
import { Dashboard, apiEnabledDashboardConfig, agenticAppConfig } from '@agentic/ui-libs';
|
|
203
|
-
|
|
204
|
-
@Component({
|
|
205
|
-
selector: 'app-analytics-dashboard',
|
|
206
|
-
template: '<div #dashboardContainer></div>',
|
|
207
|
-
standalone: true
|
|
208
|
-
})
|
|
209
|
-
export class AnalyticsDashboardComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
210
|
-
@ViewChild('dashboardContainer', { static: true })
|
|
211
|
-
dashboardContainer!: ElementRef;
|
|
212
|
-
|
|
213
|
-
private root: Root | null = null;
|
|
214
|
-
|
|
215
|
-
// Your actual app configuration
|
|
216
|
-
private appConfig = {
|
|
217
|
-
baseUrl: window.location.protocol + '//' + window.location.hostname,
|
|
218
|
-
dashboardType: 'agenticDashboard' as const,
|
|
219
|
-
projectId: 'your-project-id',
|
|
220
|
-
environment: 'draft',
|
|
221
|
-
headers: {
|
|
222
|
-
'authorization': 'Bearer your-token',
|
|
223
|
-
'accountId': 'your-account-id',
|
|
224
|
-
'Content-Type': 'application/json'
|
|
225
|
-
}
|
|
226
|
-
};
|
|
227
|
-
|
|
228
|
-
ngAfterViewInit(): void {
|
|
229
|
-
this.renderReactComponent();
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
private renderReactComponent(): void {
|
|
233
|
-
if (this.dashboardContainer) {
|
|
234
|
-
const element = React.createElement(Dashboard, {
|
|
235
|
-
config: apiEnabledDashboardConfig,
|
|
236
|
-
appConfig: this.appConfig,
|
|
237
|
-
onExport: () => console.log('Export clicked'),
|
|
238
|
-
onDraftChange: (value: string) => {
|
|
239
|
-
console.log('Environment changed:', value);
|
|
240
|
-
// Update your appConfig.environment and re-render if needed
|
|
241
|
-
},
|
|
242
|
-
onTimeRangeChange: (value: string) => {
|
|
243
|
-
console.log('Time range changed:', value);
|
|
244
|
-
// Update date range and re-render if needed
|
|
245
|
-
}
|
|
246
|
-
});
|
|
247
|
-
|
|
248
|
-
this.root = createRoot(this.dashboardContainer.nativeElement);
|
|
249
|
-
this.root.render(element);
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
ngOnDestroy(): void {
|
|
254
|
-
if (this.root) {
|
|
255
|
-
this.root.unmount();
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
`;le.AgentListView=pb,le.AnalyticsChart=db,le.AnalyticsTable=hb,le.ApiInvokerService=Mb,le.Button=Es,le.ChartSkeleton=fb,le.Dashboard=gU,le.DashboardApiService=lr,le.DashboardSection=bb,le.DateRangePicker=$b,le.EndpointsConfigService=Cb,le.MetricCard=Tf,le.MetricCardSkeleton=yi,le.ModelListView=yb,le.Portal=Eb,le.SectionControls=gb,le.Select=js,le.Skeleton=ta,le.ToolListView=vb,le.ViewRenderer=mb,le.agenticAppConfig=kU,le.angularIntegrationExample=DU,le.apiEnabledDashboardConfig=NU,le.autoAssignColors=Nb,le.businessPalette=EU,le.cn=ue,le.colorExamples=MU,le.darkPalette=_U,le.defaultPalette=Vt,le.enhancedDashboardConfig=CU,le.getColorFromPalette=kb,le.getGradientColors=$U,le.getSemanticColor=wi,le.lightPalette=jU,le.sampleDashboardConfig=PU,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});
|
|
200
|
+
*/const X8=mt("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]),cb=({config:e,className:t})=>{const{title:r,data:n,columns:a,pagination:i={enabled:!0,pageSize:10},sorting:o={enabled:!0},filtering:s={enabled:!0,searchable:!0}}=e,[l,u]=S.useState(o.defaultSort||null),[c,f]=S.useState(""),[d,h]=S.useState(1),y=S.useMemo(()=>{let m=[...n];return s.searchable&&c&&(m=m.filter(w=>a.some(T=>{const _=w[T.key];return _==null?void 0:_.toString().toLowerCase().includes(c.toLowerCase())}))),l&&m.sort((w,T)=>{const _=w[l.key],$=T[l.key];if(typeof _=="number"&&typeof $=="number")return l.order==="asc"?_-$:$-_;const R=(_==null?void 0:_.toString())||"",P=($==null?void 0:$.toString())||"",j=R.localeCompare(P);return l.order==="asc"?j:-j}),m},[n,a,c,l,s.searchable]),p=i.enabled?Math.ceil(y.length/i.pageSize):1,v=i.enabled?y.slice((d-1)*i.pageSize,d*i.pageSize):y,g=m=>{!o.enabled||!m.sortable||u(w=>(w==null?void 0:w.key)===m.key?w.order==="asc"?{key:m.key,order:"desc"}:null:{key:m.key,order:"asc"})},O=m=>{f(m),h(1)},x=(m,w,T)=>w.render?w.render(m,T):w.formatter?w.formatter(m,T):typeof m=="number"?m.toLocaleString():(m==null?void 0:m.toString())||"-",A=m=>!o.enabled||!m.sortable?null:(l==null?void 0:l.key)===m.key?l.order==="asc"?b.jsx(lb,{className:"w-4 h-4"}):b.jsx(js,{className:"w-4 h-4"}):b.jsxs("div",{className:"flex flex-col",children:[b.jsx(lb,{className:"w-3 h-3 opacity-30"}),b.jsx(js,{className:"w-3 h-3 opacity-30 -mt-1"})]});return b.jsxs("div",{className:ce("w-full",t),children:[b.jsxs("div",{className:"flex items-center justify-between mb-4",children:[b.jsx("h3",{className:"text-lg font-semibold",children:r}),s.enabled&&s.searchable&&b.jsxs("div",{className:"relative",children:[b.jsx(ub,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"}),b.jsx("input",{type:"text",placeholder:"Search...",value:c,onChange:m=>O(m.target.value),className:"pl-10 pr-4 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]})]}),b.jsx("div",{className:"overflow-x-auto border border-gray-200 rounded-lg",children:b.jsxs("table",{className:"w-full",children:[b.jsx("thead",{className:"bg-gray-50",children:b.jsx("tr",{children:a.map(m=>b.jsx("th",{className:ce("px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",m.sortable&&o.enabled&&"cursor-pointer hover:bg-gray-100",m.align==="center"&&"text-center",m.align==="right"&&"text-right"),style:{width:m.width},onClick:()=>g(m),children:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("span",{children:m.title}),A(m)]})},m.key))})}),b.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:v.map((m,w)=>b.jsx("tr",{className:"hover:bg-gray-50 transition-colors",children:a.map(T=>b.jsx("td",{className:ce("px-4 py-3 text-sm text-gray-900",T.align==="center"&&"text-center",T.align==="right"&&"text-right"),children:x(m[T.key],T,m)},T.key))},w))})]})}),i.enabled&&p>1&&b.jsxs("div",{className:"flex items-center justify-between mt-4",children:[b.jsxs("div",{className:"text-sm text-gray-500",children:["Showing ",(d-1)*i.pageSize+1," to"," ",Math.min(d*i.pageSize,y.length)," of"," ",y.length," results"]}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("button",{onClick:()=>h(m=>Math.max(1,m-1)),disabled:d===1,className:"px-3 py-1 text-sm border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),Array.from({length:Math.min(5,p)},(m,w)=>{const T=Math.max(1,Math.min(p-4,d-2))+w;return T>p?null:b.jsx("button",{onClick:()=>h(T),className:ce("px-3 py-1 text-sm border rounded",d===T?"bg-blue-500 text-white border-blue-500":"border-gray-200 hover:bg-gray-50"),children:T},T)}),b.jsx("button",{onClick:()=>h(m=>Math.min(p,m+1)),disabled:d===p,className:"px-3 py-1 text-sm border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),v.length===0&&b.jsx("div",{className:"text-center py-8 text-gray-500",children:c?"No results found for your search.":"No data available."})]})},J8=(e,t)=>{switch(e){case"human":return t==="agent"?"agent-avatars":"avatars";case"logo":return"profileLogos";case"icon":case"inlineTool":case"toolLibrary":case"KNOWLEDGE":case"MCP":return"profileIcons";default:return t==="agent"?"agent-avatars":"avatars"}},fb=e=>{if(!e)return null;if(typeof e=="string")try{return JSON.parse(e)}catch{return{name:e,type:"human"}}return e},db=(e,t)=>{const r=["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#EC4899","#06B6D4","#84CC16"],n=e.split("").reduce((a,i)=>a+i.charCodeAt(0),0)%r.length;if(t==="workflowtool"){const a=e.toLowerCase();let i="toolLibrary";return a.includes("code")||a.includes("inline")||a.includes("calculate")?i="inlineTool":a.includes("knowledge")||a.includes("document")||a.includes("fetch")?i="KNOWLEDGE":(a.includes("mcp")||a.includes("protocol"))&&(i="MCP"),{name:"fallback",type:i,color:r[n]}}return{name:"fallback",type:t==="agent"?"human":"icon",color:r[n]}},Z8=(e,t)=>{if(!(e!=null&&e.name))return"";if(t==="url")return e.name;const r=window.location.origin,n=J8(e.type||"human",t);return`${r}/agenticai/assets/${n}/${e.name}.svg`},Q8={xs:"w-6 h-6 text-xs",small:"w-8 h-8 text-sm",medium:"w-10 h-10 text-base",large:"w-12 h-12 text-lg"},Lt={inlineTool:`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_3533_7514)">
|
|
201
|
+
<path d="M8.5 8.5L11 6L8.5 3.5M3.5 3.5L1 6L3.5 8.5M7 1.5L5 10.5" stroke="#EF6820" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/></g>
|
|
202
|
+
<defs><clipPath id="clip0_3533_7514"><rect width="12" height="12" fill="white"/></clipPath></defs>
|
|
203
|
+
</svg>`,toolLibrary:`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
204
|
+
<path d="M6 2V7.6C6 8.44008 6 8.86012 6.16349 9.18099C6.3073 9.46323 6.53677 9.6927 6.81901 9.83651C7.13988 10 7.55992 10 8.4 10H8.5M8.5 10C8.5 10.5523 8.94772 11 9.5 11C10.0523 11 10.5 10.5523 10.5 10C10.5 9.44772 10.0523 9 9.5 9C8.94772 9 8.5 9.44772 8.5 10ZM3.5 2L8.5 2M3.5 2C3.5 2.55228 3.05228 3 2.5 3C1.94772 3 1.5 2.55228 1.5 2C1.5 1.44772 1.94772 1 2.5 1C3.05228 1 3.5 1.44772 3.5 2ZM8.5 2C8.5 2.55228 8.94772 3 9.5 3C10.0523 3 10.5 2.55228 10.5 2C10.5 1.44772 10.0523 1 9.5 1C8.94772 1 8.5 1.44771 8.5 2ZM6 6H8.5M8.5 6C8.5 6.55228 8.94772 7 9.5 7C10.0523 7 10.5 6.55228 10.5 6C10.5 5.44772 10.0523 5 9.5 5C8.94772 5 8.5 5.44772 8.5 6Z" stroke="#155EEF" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
|
205
|
+
</svg>`,KNOWLEDGE:`<svg width="10" height="12" viewBox="0 0 10 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
206
|
+
<path d="M6 5.5H3M4 7.5H3M7 3.5H3M9 3.4V8.6C9 9.44008 9 9.86012 8.83651 10.181C8.6927 10.4632 8.46323 10.6927 8.18099 10.8365C7.86012 11 7.44008 11 6.6 11H3.4C2.55992 11 2.13988 11 1.81901 10.8365C1.53677 10.6927 1.3073 10.4632 1.16349 10.181C1 9.86012 1 9.44008 1 8.6V3.4C1 2.55992 1 2.13988 1.16349 1.81901C1.3073 1.53677 1.53677 1.3073 1.81901 1.16349C2.13988 1 2.55992 1 3.4 1H6.6C7.44008 1 7.86012 1 8.18099 1.16349C8.46323 1.3073 8.6927 1.53677 8.83651 1.81901C9 2.13988 9 2.55992 9 3.4Z" stroke="#7A5AF8" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
|
207
|
+
</svg>`,MCP:`<svg width="14" height="14" viewBox="0 0 22 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
208
|
+
<path d="M1.8125 10.7455L10.647 1.91124C11.8411 0.717087 13.7773 0.717087 14.9714 1.91124C16.1655 3.10539 16.1655 5.0415 14.9714 6.23565M14.9714 6.23565L8.29911 12.9077M14.9714 6.23565C16.1655 5.0415 18.1018 5.0415 19.2958 6.23565C20.4899 7.4298 20.4899 9.36593 19.2958 10.56L11.7665 18.0893C11.3443 18.5115 11.3443 19.1961 11.7665 19.6182L13.164 21.0158M16.9479 8.58236L10.2756 15.2547C9.08153 16.4488 7.1453 16.4488 5.95123 15.2547C4.75716 14.0605 4.75716 12.1244 5.95123 10.9303L12.6234 4.25814" stroke="#101828" stroke-width="2.00016" stroke-linecap="round" stroke-linejoin="round"/>
|
|
209
|
+
</svg>`},eW=(e,t)=>{const r=e.toLowerCase();if(r.includes("code"))return Lt.inlineTool;if(r.includes("workflow")||r.includes("library"))return Lt.toolLibrary;if(r.includes("knowledge"))return Lt.KNOWLEDGE;if(r.includes("mcp"))return Lt.MCP;if(Lt[e])return Lt[e];const n=t.toLowerCase();return n.includes("code")||n.includes("inline")||n.includes("calculate")?Lt.inlineTool:n.includes("library")||n.includes("workflow")?Lt.toolLibrary:n.includes("knowledge")||n.includes("document")||n.includes("fetch")?Lt.KNOWLEDGE:n.includes("mcp")||n.includes("protocol")?Lt.MCP:Lt.toolLibrary},$s=({icon:e,iconSource:t="agent",size:r="small",className:n="",name:a="Unknown",toolType:i})=>{const[o,s]=S.useState(!1),[l,u]=S.useState(!1),c=fb(e),f=Q8[r];if(c!=null&&c.name&&c.name!=="fallback"&&!o){const y=Z8(c,t),p=()=>{s(!0)};return b.jsx("img",{src:y,alt:a,className:`${f} rounded-full object-cover ${n}`,onError:p})}if(o&&!l&&t==="agent"){const y=`${window.location.origin}/agenticai/assets/agent-avatars/agent1.svg`,p=()=>{u(!0)};return b.jsx("img",{src:y,alt:a,className:`${f} rounded-full object-cover ${n}`,onError:p})}const d=c||db(a,t);if(t==="workflowtool"){const y=i||d.type||"toolLibrary",p=eW(y,a);return b.jsx("div",{className:`${f} rounded-full flex items-center justify-center bg-gray-100 ${n}`,children:b.jsx("div",{dangerouslySetInnerHTML:{__html:p}})})}return b.jsx("img",{src:"https://api.dicebear.com/7.x/avataaars/svg?seed=default-agent&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid",alt:a,className:`${f} rounded-full object-cover ${n}`})},hb=({data:e,className:t})=>{const[r,n]=S.useState(5),a=()=>{n(o=>Math.min(o+10,e.length))},i=o=>o>=1e3?`${Math.floor(o/1e3)}k`:o.toString();return b.jsxs("div",{className:ce("w-full",t),children:[b.jsxs("div",{className:"grid grid-cols-4 gap-4 px-4 py-3 bg-gray-50 border-b border-gray-200 text-sm font-medium text-gray-700",children:[b.jsx("div",{className:"text-left",children:"Name"}),b.jsx("div",{className:"text-right",children:"Runs"}),b.jsx("div",{className:"text-right",children:"Response Time"}),b.jsx("div",{className:"text-right",children:"Tokens"})]}),b.jsx("div",{className:"divide-y divide-gray-100",children:e.slice(0,r).map((o,s)=>b.jsxs("div",{className:"grid grid-cols-4 gap-4 px-4 py-4 hover:bg-gray-50 transition-colors duration-150",children:[b.jsxs("div",{className:"flex items-center space-x-3",children:[b.jsx("div",{className:"flex-shrink-0",children:b.jsx($s,{icon:o.icon,iconSource:"agent",size:"small",name:o.name||"Unknown Agent"})}),b.jsx("div",{className:"min-w-0 flex-1",children:b.jsx("div",{className:"text-sm font-medium text-gray-900 truncate",children:o.name||"Unknown Agent"})})]}),b.jsx("div",{className:"text-right text-sm text-gray-900",children:o.runs?i(o.runs):"-"}),b.jsx("div",{className:"text-right text-sm text-gray-900",children:o.responseTime||"-"}),b.jsx("div",{className:"text-right text-sm text-gray-900",children:o.tokens?i(o.tokens):"-"})]},o.id||s))}),r<e.length&&b.jsx("div",{className:"flex justify-center py-6",children:b.jsx("button",{onClick:a,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors duration-150",children:"Load 10 more"})})]})},tW=e=>{switch(e.toLowerCase()){case"code tool":case"inlinetool":return"bg-orange-100 text-orange-800 border-orange-200";case"workflow tool":case"toollibrary":return"bg-blue-100 text-blue-800 border-blue-200";case"mcp tool":case"mcp":return"bg-green-100 text-green-800 border-green-200";case"knowledge":case"knowledge tool":return"bg-purple-100 text-purple-800 border-purple-200";default:return"bg-gray-100 text-gray-800 border-gray-200"}},pb=({data:e,className:t})=>{const[r,n]=S.useState(5),a=()=>{n(o=>Math.min(o+10,e.length))},i=o=>o>=1e3?`${Math.floor(o/1e3)}k`:o.toString();return b.jsxs("div",{className:ce("w-full",t),children:[b.jsxs("div",{className:"grid grid-cols-4 gap-4 px-4 py-3 bg-gray-50 border-b border-gray-200 text-sm font-medium text-gray-700",children:[b.jsx("div",{className:"text-left",children:"Name"}),b.jsx("div",{className:"text-left",children:"Type"}),b.jsx("div",{className:"text-right",children:"Runs"}),b.jsx("div",{className:"text-right",children:"Response Time"})]}),b.jsx("div",{className:"divide-y divide-gray-100",children:e.slice(0,r).map((o,s)=>b.jsxs("div",{className:"grid grid-cols-4 gap-4 px-4 py-4 hover:bg-gray-50 transition-colors duration-150",children:[b.jsxs("div",{className:"flex items-center space-x-3",children:[b.jsx("div",{className:"flex-shrink-0",children:b.jsx($s,{icon:o.icon,iconSource:"workflowtool",size:"small",name:o.name||"Unknown Tool",toolType:o.type})}),b.jsx("div",{className:"min-w-0 flex-1",children:b.jsx("div",{className:"text-sm font-medium text-gray-900 truncate",children:o.name||"Unknown Tool"})})]}),b.jsx("div",{className:"flex items-center",children:b.jsx("span",{className:ce("inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border",tW(o.type||"Default")),children:o.type||"Tool"})}),b.jsx("div",{className:"text-right text-sm text-gray-900",children:o.runs?i(o.runs):"-"}),b.jsx("div",{className:"text-right text-sm text-gray-900",children:o.responseTime||"-"})]},o.id||s))}),r<e.length&&b.jsx("div",{className:"flex justify-center py-6",children:b.jsx("button",{onClick:a,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors duration-150",children:"Load 10 more"})})]})},rW=e=>{const t=e.toLowerCase();return t.includes("gpt")||t.includes("openai")?b.jsx("div",{className:"w-6 h-6 rounded-full bg-gray-900 flex items-center justify-center",children:b.jsx("span",{className:"text-white text-xs font-bold",children:"⚡"})}):t.includes("claude")||t.includes("anthropic")?b.jsx("div",{className:"w-6 h-6 rounded-full bg-orange-500 flex items-center justify-center",children:b.jsx("span",{className:"text-white text-xs font-bold",children:"A"})}):t.includes("gemini")||t.includes("google")?b.jsx("div",{className:"w-6 h-6 rounded-full bg-blue-500 flex items-center justify-center",children:b.jsx("span",{className:"text-white text-xs font-bold",children:"G"})}):t.includes("llama")||t.includes("meta")?b.jsx("div",{className:"w-6 h-6 rounded-full bg-blue-600 flex items-center justify-center",children:b.jsx("span",{className:"text-white text-xs font-bold",children:"M"})}):b.jsx("div",{className:"w-6 h-6 rounded-full bg-gray-500 flex items-center justify-center",children:b.jsx("span",{className:"text-white text-xs font-bold",children:"🤖"})})},vb=({data:e,className:t})=>{const[r,n]=S.useState(5),a=()=>{n(o=>Math.min(o+10,e.length))},i=o=>o>=1e3?`${Math.floor(o/1e3)}k`:o.toString();return b.jsxs("div",{className:ce("w-full",t),children:[b.jsxs("div",{className:"grid grid-cols-4 gap-4 px-4 py-3 bg-gray-50 border-b border-gray-200 text-sm font-medium text-gray-700",children:[b.jsx("div",{className:"text-left",children:"Model Name"}),b.jsx("div",{className:"text-right",children:"Runs"}),b.jsx("div",{className:"text-right",children:"Tokens"}),b.jsx("div",{className:"text-right",children:"Response Time"})]}),b.jsx("div",{className:"divide-y divide-gray-100",children:e.slice(0,r).map((o,s)=>b.jsxs("div",{className:"grid grid-cols-4 gap-4 px-4 py-4 hover:bg-gray-50 transition-colors duration-150",children:[b.jsxs("div",{className:"flex items-center space-x-3",children:[b.jsx("div",{className:"flex-shrink-0",children:rW(o.name||"Unknown")}),b.jsx("div",{className:"min-w-0 flex-1",children:b.jsx("div",{className:"text-sm font-medium text-gray-900 truncate",children:o.name||"Unknown Model"})})]}),b.jsx("div",{className:"text-right text-sm text-gray-900",children:i(o.runs||0)}),b.jsx("div",{className:"text-right text-sm text-gray-900",children:i(o.tokens||0)}),b.jsx("div",{className:"text-right text-sm text-gray-900",children:o.responseTime})]},o.id||s))}),r<e.length&&b.jsx("div",{className:"flex justify-center py-6",children:b.jsx("button",{onClick:a,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors duration-150",children:"Load 10 more"})})]})},nW=({data:e,className:t,onClick:r})=>{const{title:n,value:a,change:i,info:o,highlighted:s}=e,l=f=>typeof f=="number"?f.toLocaleString():f.toString(),u=f=>`${f}%`,c=()=>{r&&r(e)};return b.jsxs("div",{className:ce("rounded-lg border p-4 transition-all duration-200 bg-white",!s&&"border-gray-200 shadow-sm",s&&["!border-[#84adff]"],r&&"cursor-pointer",t),onClick:c,children:[b.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[b.jsx("span",{className:"text-sm font-medium text-gray-600",children:n}),o&&b.jsxs("div",{className:"relative group",children:[b.jsx(K8,{className:"h-4 w-4 text-gray-400 cursor-help"}),b.jsxs("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-3 py-2 text-xs text-white bg-gray-900 rounded-md opacity-0 group-hover:!opacity-100 transition-opacity duration-200 whitespace-nowrap z-10 shadow-lg",children:[o,b.jsx("div",{className:"absolute top-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-l-4 border-r-4 border-t-4 border-transparent border-t-gray-900"})]})]})]}),b.jsxs("div",{className:"flex items-baseline gap-3",children:[b.jsx("span",{className:"text-2xl font-semibold text-gray-900",children:l(a)}),i&&b.jsxs("div",{className:ce("flex items-center gap-1 px-2 py-1 text-sm font-medium",(i.type==="increase","")),style:i.type==="increase"?{color:"rgb(21 128 61 / var(--tw-text-opacity, 1))",border:"1px solid #ABEFC6",borderRadius:"150px",background:"rgba(16, 185, 129, 0.10)"}:{color:"rgb(185 28 28 / var(--tw-text-opacity, 1))",border:"1px solid #FCA5A5",borderRadius:"150px",background:"rgba(239, 68, 68, 0.10)"},children:[i.type==="increase"?b.jsx(X8,{className:"h-3 w-3"}):b.jsx(Y8,{className:"h-3 w-3"}),b.jsx("span",{children:u(i.value)})]})]})]})},aW=({config:e,className:t,isLoading:r,context:n})=>{const{type:a,chart:i,table:o,layout:s="vertical"}=e,l=()=>i?(console.log("ViewRenderer - Chart config:",i),console.log("ViewRenderer - Chart data:",i.data),console.log("ViewRenderer - Context:",n),b.jsx("div",{className:"flex-1",children:b.jsx(ob,{config:i,isLoading:r})})):null,u=()=>o?(n==null?void 0:n.metricType)==="agentRuns"?b.jsx("div",{className:"flex-1 min-h-[380px]",children:b.jsx(hb,{data:o.data})}):(n==null?void 0:n.metricType)==="toolRuns"?b.jsx("div",{className:"flex-1 min-h-[380px]",children:b.jsx(pb,{data:o.data})}):(n==null?void 0:n.metricType)==="modelRuns"?b.jsx("div",{className:"flex-1 min-h-[380px]",children:b.jsx(vb,{data:o.data})}):b.jsx("div",{className:"flex-1 min-h-[380px]",children:b.jsx(cb,{config:o})}):null,c=()=>{switch(a){case"chart":return l();case"table":return u();case"mixed":return b.jsxs("div",{className:ce("flex gap-6",s==="horizontal"?"flex-row":"flex-col"),children:[l(),u()]});default:return b.jsxs("div",{className:"p-4 text-center text-gray-500",children:["Unsupported view type: ",a]})}};return b.jsx("div",{className:ce("w-full",t),children:c()})},nf=({options:e,value:t,placeholder:r="Select an option",onChange:n,className:a,disabled:i=!1})=>{const[o,s]=S.useState(!1),[l,u]=S.useState(t||""),c=S.useRef(null),f=e.find(y=>y.value===l);S.useEffect(()=>{const y=p=>{c.current&&!c.current.contains(p.target)&&s(!1)};return o&&document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y)}},[o]);const d=y=>{i||(u(y),s(!1),n==null||n(y))},h=()=>{i||s(!o)};return b.jsxs("div",{ref:c,className:ce("relative min-w-[200px]",a),children:[b.jsxs("button",{type:"button",className:ce("flex h-10 w-full min-w-[200px] items-center justify-between rounded-md border border-gray-300 bg-white px-3 py-2 text-sm shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 disabled:cursor-not-allowed disabled:opacity-50 transition-colors",a),onClick:h,disabled:i,children:[b.jsx("span",{className:ce("truncate",!f&&"text-gray-500"),children:f?f.label:r}),b.jsx(js,{className:ce("h-4 w-4 text-gray-400 transition-transform duration-200",o&&"rotate-180")})]}),o&&!i&&b.jsx("div",{className:"absolute top-full left-0 z-50 mt-1 min-w-[300px] w-max max-w-lg rounded-md border border-gray-200 bg-white shadow-lg max-h-60 overflow-y-auto",children:e.map(y=>{const p=l===y.value;return b.jsxs("div",{className:"relative group",children:[b.jsx("button",{className:ce("relative flex w-full cursor-pointer select-none items-center px-3 py-2 text-sm text-left outline-none transition-colors",y.disabled?"opacity-50 cursor-not-allowed text-gray-400":p?"bg-blue-50 text-blue-900 font-medium":"text-gray-900 hover:bg-gray-100"),onClick:()=>!y.disabled&&d(y.value),disabled:y.disabled,children:b.jsx("span",{className:"block whitespace-nowrap",children:y.label})}),y.label.length>25&&b.jsx("div",{className:"absolute left-full top-0 ml-2 z-[60] opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none",children:b.jsxs("div",{className:"bg-gray-900 text-white text-xs rounded-md px-3 py-2 whitespace-nowrap shadow-lg",children:[y.label,b.jsx("div",{className:"absolute left-0 top-1/2 transform -translate-x-full -translate-y-1/2 w-0 h-0 border-t-4 border-b-4 border-r-4 border-transparent border-r-gray-900"})]})})]},y.value)})})]})},yb=({options:e,value:t,defaultValue:r,placeholder:n="Select...",multiSelect:a=!1,searchable:i=!1,onChange:o,className:s,iconSource:l="app",maxItems:u=100,maxLabelLength:c=30})=>{const[f,d]=S.useState(!1),[h,y]=S.useState(""),[p,v]=S.useState(()=>{const P=t||r;return a?Array.isArray(P)?P:P?[P]:[]:P?[Array.isArray(P)?P[0]:P]:[]}),g=S.useRef(null);S.useEffect(()=>{const P=j=>{g.current&&!g.current.contains(j.target)&&d(!1)};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[]);const O=(P,j=c)=>P.length<=j?P:P.substring(0,j)+"...",x=i?e.filter(P=>P.label.toLowerCase().includes(h.toLowerCase())):e,A=x.slice(0,u),m=x.length>u,w=P=>{let j;if(a){if(P==="all"){_();return}if(p.includes(P))j=p.filter(B=>B!==P),j=j.filter(B=>B!=="all");else{j=p.filter(E=>E!=="all"),j=[...j,P];const B=x.filter(E=>E.value!=="all").map(E=>E.value),M=j.filter(E=>E!=="all");M.length===B.length&&(j=["all",...M])}}else j=[P],d(!1);v(j);const L=a?j:j[0]||"";o==null||o(L)},T=()=>{if(!a)return{checked:!1,indeterminate:!1};const P=x.filter(L=>L.value!=="all").map(L=>L.value),j=p.filter(L=>L!=="all"&&P.includes(L));return p.includes("all")&&j.length===0?{checked:!1,indeterminate:!1}:j.length===0?{checked:!1,indeterminate:!1}:j.length===P.length?{checked:!0,indeterminate:!1}:{checked:!1,indeterminate:!0}},_=()=>{if(!a)return;const P=T(),j=x.filter(L=>L.value!=="all").map(L=>L.value);if(P.checked)v(["all"]),o==null||o(["all"]);else{const L=["all",...j];v(L),o==null||o(L)}},$=()=>{v(["all"]),o==null||o(a?["all"]:"all")},R=()=>{if(!a){if(p.length===0)return n;const B=e.find(M=>M.value===p[0]);return(B==null?void 0:B.label)||n}const P=p.filter(B=>B!=="all"),j=p.includes("all");if(P.length===0)return n;if(P.length===1){const B=e.find(M=>M.value===P[0]);return(B==null?void 0:B.label)||n}const L=e.filter(B=>B.value!=="all").length;return P.length===L?"All selected":`${P.length} selected`};return b.jsxs("div",{className:ce("relative",s),ref:g,children:[b.jsxs("button",{type:"button",onClick:()=>d(!f),className:ce("w-full flex items-center justify-between px-3 py-2 text-left text-sm","border border-gray-300 rounded-md bg-white hover:bg-gray-50","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500","transition-colors duration-150"),children:[b.jsx("span",{className:ce("truncate",p.length===0&&"text-gray-500"),children:R()}),b.jsx(js,{className:ce("w-4 h-4 text-gray-400 transition-transform duration-150",f&&"transform rotate-180")})]}),f&&b.jsxs("div",{className:"absolute z-50 min-w-[300px] w-max max-w-lg mt-1 bg-white border border-gray-200 rounded-md shadow-lg max-h-80 overflow-hidden",children:[i&&b.jsx("div",{className:"p-3 border-b border-gray-100",children:b.jsxs("div",{className:"relative",children:[b.jsx(ub,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"}),b.jsx("input",{type:"text",placeholder:`Search ${n.toLowerCase()}...`,value:h,onChange:P=>y(P.target.value),className:"w-full pl-10 pr-4 py-2 text-sm border border-gray-200 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})]})}),a&&b.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-gray-100 bg-gray-50",children:[b.jsxs("button",{type:"button",onClick:_,className:"flex items-center text-sm font-medium text-gray-700 hover:text-gray-900",children:[b.jsx("div",{className:ce("flex items-center justify-center w-4 h-4 mr-2 border rounded transition-colors duration-150",(()=>{const P=T();return P.indeterminate||P.checked?"bg-blue-600 border-blue-600 text-white":"border-gray-300 bg-white"})()),children:(()=>{const P=T();return P.indeterminate?b.jsx("div",{className:"w-2 h-0.5 bg-white rounded"}):P.checked?b.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:b.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):null})()}),"Select all"]}),b.jsx("button",{type:"button",onClick:$,className:"text-sm font-medium text-blue-600 hover:text-blue-800",children:"Clear"})]}),b.jsxs("div",{className:"max-h-60 overflow-y-auto",children:[A.length===0?b.jsx("div",{className:"px-3 py-4 text-sm text-gray-500 text-center",children:"No options found"}):A.map(P=>{let j;return P.value==="all"?null:(j=p.includes(P.value),b.jsxs("div",{className:"relative group",children:[b.jsxs("div",{onClick:()=>w(P.value),className:ce("flex items-center px-3 py-2 cursor-pointer hover:bg-gray-50","transition-colors duration-150",j&&"bg-blue-50"),children:[a?b.jsx("div",{className:ce("flex items-center justify-center w-4 h-4 mr-3 border rounded","transition-colors duration-150",j?"bg-blue-600 border-blue-600 text-white":"border-gray-300 bg-white"),children:j&&b.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:b.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}):b.jsx("div",{className:ce("w-4 h-4 mr-3 rounded-full border-2 transition-colors duration-150",j?"border-blue-600 bg-blue-600":"border-gray-300"),children:j&&b.jsx("div",{className:"w-full h-full rounded-full bg-white scale-50"})}),(P.avatar||P.icon)&&b.jsx("div",{className:"mr-3",children:b.jsx($s,{icon:P.icon,iconSource:l,size:"xs",name:P.label,toolType:P.type})}),b.jsx("span",{className:ce("flex-1 text-sm whitespace-nowrap",j?"font-medium text-gray-900":"text-gray-700"),children:O(P.label)})]}),P.label.length>c&&b.jsx("div",{className:"absolute left-full top-1/2 transform -translate-y-1/2 ml-2 z-[80] opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none",children:b.jsxs("div",{className:"bg-gray-900 text-white text-xs rounded-md px-3 py-2 shadow-lg max-w-xs break-words whitespace-normal",children:[P.label,b.jsx("div",{className:"absolute left-0 top-1/2 transform -translate-x-full -translate-y-1/2 w-0 h-0 border-t-4 border-b-4 border-r-4 border-transparent border-r-gray-900"})]})})]},P.value))}),m&&b.jsxs("div",{className:"px-3 py-2 text-xs text-gray-500 bg-gray-50 border-t border-gray-100",children:[b.jsxs("div",{className:"text-center font-medium",children:["+",x.length-u," more items"]}),i&&b.jsx("div",{className:"text-center mt-1 text-gray-400",children:"Use search above to find specific items"})]})]})]})]})},iW=({config:e,className:t})=>{var s;const{dropdown:r,buttons:n,toggle:a}=e,i=l=>{const u=l.toLowerCase();return u.includes("agent")?"agent":u.includes("tool")?"workflowtool":"app"},o=l=>{const u=l.toLowerCase();return u.includes("agent")?{maxItems:50,maxLabelLength:25}:u.includes("tool")?{maxItems:30,maxLabelLength:20}:{maxItems:40,maxLabelLength:25}};return b.jsxs("div",{className:ce("flex items-center gap-3",t),children:[r&&b.jsx(b.Fragment,{children:r.multiSelect?b.jsx(yb,{options:r.options,value:r.defaultValue,placeholder:r.label,multiSelect:r.multiSelect,searchable:r.searchable,onChange:r.onChange,className:"w-48",iconSource:i(r.label),maxItems:o(r.label).maxItems,maxLabelLength:o(r.label).maxLabelLength}):b.jsx(nf,{options:r.options,value:Array.isArray(r.defaultValue)?r.defaultValue[0]:r.defaultValue||((s=r.options[0])==null?void 0:s.value),placeholder:r.label,onChange:l=>{var u;return(u=r.onChange)==null?void 0:u.call(r,l)},className:"w-48"})}),n&&n.length>0&&b.jsx("div",{className:"flex items-center border border-gray-200 rounded-lg overflow-hidden",children:n.map((l,u)=>b.jsxs("button",{onClick:()=>{var c;return(c=l.onClick)==null?void 0:c.call(l,l.value)},className:ce("px-3 py-2 text-sm font-medium transition-colors","hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-inset",l.active?"bg-blue-50 text-blue-700 border-blue-200":"text-gray-700 bg-white",u>0&&"border-l border-gray-200"),children:[l.icon&&b.jsx("span",{className:"mr-2",children:l.icon}),l.label]},l.value))}),a&&b.jsxs("div",{className:"flex items-center border border-gray-200 rounded-lg overflow-hidden",children:[b.jsxs("button",{onClick:()=>{var l;return(l=a.onToggle)==null?void 0:l.call(a,"chart")},className:ce("px-3 py-2 text-sm font-medium transition-colors flex items-center gap-2","hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-inset",a.chartView?"bg-blue-50 text-blue-700 border-blue-200":"text-gray-700 bg-white"),children:[b.jsx(U8,{className:"w-4 h-4"}),"Chart"]}),b.jsxs("button",{onClick:()=>{var l;return(l=a.onToggle)==null?void 0:l.call(a,"table")},className:ce("px-3 py-2 text-sm font-medium transition-colors flex items-center gap-2","hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-inset","border-l border-gray-200",a.tableView?"bg-blue-50 text-blue-700 border-blue-200":"text-gray-700 bg-white"),children:[b.jsx(H8,{className:"w-4 h-4"}),"Table"]})]})]})},mb=({section:e,className:t,isLoading:r,isChartLoading:n,onMetricClick:a})=>{const{id:i,title:o,description:s,metrics:l,view:u,controls:c,layout:f}=e,[d,h]=S.useState(u.type),[y,p]=S.useState("chart"),v=()=>i==="usage-analytics"?"users":i==="runs"?"agentRuns":"users",[g,O]=S.useState(v()),[x,A]=S.useState("all"),m=k=>{var I,W,z,V,Z;const N=_();(I=N==null?void 0:N.controls)!=null&&I.toggle?(p(k),(z=(W=N.controls.toggle).onToggle)==null||z.call(W,k)):(h(k),(Z=(V=c==null?void 0:c.toggle)==null?void 0:V.onToggle)==null||Z.call(V,k))},w=k=>{var W,z;const N=k.metricType||k.title.toLowerCase();O(N);const I=l.find(V=>(V.metricType||V.title.toLowerCase())===N);(z=(W=I==null?void 0:I.controls)==null?void 0:W.dropdown)!=null&&z.multiSelect?A(["all"]):A("all"),a==null||a(k)},T=k=>{var I,W,z;A(k);const N=l.find(V=>(V.metricType||V.title.toLowerCase())===g);(z=(W=(I=N==null?void 0:N.controls)==null?void 0:I.dropdown)==null?void 0:W.onChange)==null||z.call(W,k)},_=()=>l.find(k=>(k.metricType||k.title.toLowerCase())===g)||null,$=k=>Array.isArray(k)?k.filter(I=>I!=="all").length>0:k!=="all",R=k=>Array.isArray(k)?k.filter(N=>N!=="all"):k!=="all"?[k]:[],P=k=>{var z,V,Z,Q,ae,te,q,Y,J;const N=((V=(z=k.view)==null?void 0:z.chart)==null?void 0:V.data)||((Z=u.chart)==null?void 0:Z.data)||[];if(!$(x))return N;const I=k.metricType,W=R(x);if(W.length===1){const D=W[0],ie=_(),K=(te=(ae=(Q=ie==null?void 0:ie.controls)==null?void 0:Q.dropdown)==null?void 0:ae.options)==null?void 0:te.find(oe=>oe.value===D),ee=K==null?void 0:K.label;return console.log("🔍 Filtering chart data:",{metricType:I,singleFilter:D,selectedLabel:ee,baseDataSample:N[0]}),N.map(oe=>{let Ce=0;return oe.listView&&Array.isArray(oe.listView)&&(Ce=oe.listView.filter(et=>I==="agentRuns"&&et.agentName?et.agentName===ee||et.agentName.toLowerCase()===(ee==null?void 0:ee.toLowerCase()):I==="toolRuns"&&et.toolName?et.toolName===ee||et.toolName.toLowerCase()===(ee==null?void 0:ee.toLowerCase()):I==="modelRuns"&&et.modelName?et.modelName===ee||et.modelName.toLowerCase()===(ee==null?void 0:ee.toLowerCase()):!1).reduce((et,Rt)=>et+(Rt.count||0),0)),console.log("📊 Filtered value for",ee,":",Ce),{...oe,[I]:Ce}})}if(W.length>1){const D=_(),K=(((J=(Y=(q=D==null?void 0:D.controls)==null?void 0:q.dropdown)==null?void 0:Y.options)==null?void 0:J.filter(ee=>W.includes(ee.value)))||[]).map(ee=>ee.label);return N.map(ee=>{let oe=0;return ee.listView&&Array.isArray(ee.listView)&&(oe=ee.listView.filter(Te=>I==="agentRuns"&&Te.agentName?K.some(Ee=>Te.agentName===Ee||Te.agentName.toLowerCase()===(Ee==null?void 0:Ee.toLowerCase())):I==="toolRuns"&&Te.toolName?K.some(Ee=>Te.toolName===Ee||Te.toolName.toLowerCase()===(Ee==null?void 0:Ee.toLowerCase())):I==="modelRuns"&&Te.modelName?K.some(Ee=>Te.modelName===Ee||Te.modelName.toLowerCase()===(Ee==null?void 0:Ee.toLowerCase())):!1).reduce((Te,Ee)=>Te+(Ee.count||0),0)),{...ee,[I]:oe}})}return N},j=k=>{var z;if(!((z=k.view)!=null&&z.chart))return null;const N=P(k),I=()=>{var Z,Q,ae,te,q,Y;if(!$(x)||!((Z=k.controls)!=null&&Z.dropdown))return((ae=(Q=k.view)==null?void 0:Q.chart)==null?void 0:ae.title)||k.title;const V=R(x);if(V.length===1){const J=(te=k.controls.dropdown.options)==null?void 0:te.find(D=>D.value===V[0]);return J?`${J.label}`:((Y=(q=k.view)==null?void 0:q.chart)==null?void 0:Y.title)||k.title}return`${V.length} selected`},W=R(x);return k.metricType==="toolRuns"&&W.length===1?{...k.view.chart,data:N,title:I(),lines:void 0,dataKey:"toolRuns",color:"#f97316",showLegend:!1}:k.metricType==="modelRuns"&&W.length===1?{...k.view.chart,data:N,title:I(),dataKey:"modelRuns",color:"#10b981",showLegend:!1}:{...k.view.chart,data:N,title:I()}},L=(k,N)=>{if(!$(x))return k;const I=R(x);if(I.length===1){const W=I[0];if(i==="runs"&&N==="agentRuns")return k.map(z=>({...z,agentRuns:z[W]||0}));if(i==="runs"&&N==="toolRuns")return k.map(z=>({...z,toolRuns:z[W.replace(/[-]/g,"")]||0}));if(i==="runs"&&N==="modelRuns")return k.map(z=>({...z,modelRuns:z[W.replace(/[-\.]/g,"")]||0}))}return k},B=k=>{var z;const N=((z=u.chart)==null?void 0:z.data)||[],I=L(N,k),W=V=>{var Q,ae;if(!$(x))return V;const Z=R(x);if(Z.length===1){const te=(ae=(Q=c==null?void 0:c.dropdown)==null?void 0:Q.options)==null?void 0:ae.find(q=>q.value===Z[0]);return te?`${te.label}`:V}return`${Z.length} selected`};switch(k){case"users":return{type:"line",title:"Total Users",data:N,dataKey:"users",color:"#8b5cf6",yAxisLabel:"Number of Users",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"sessions":return{type:"line",title:"Total Sessions",data:N,dataKey:"sessions",color:"#06b6d4",yAxisLabel:"Number of Sessions",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"messages":return{type:"line",title:"Total Messages",data:N,dataKey:"messages",color:"#ec4899",yAxisLabel:"Number of Messages",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"tokens":return{type:"line",title:"Token Usage Breakdown",data:N,yAxisLabel:"Number of Tokens",lines:[{dataKey:"totalTokens",color:"#f59e0b",label:"Total Tokens"},{dataKey:"inputTokens",color:"#3b82f6",label:"Input Tokens"},{dataKey:"outputTokens",color:"#ec4899",label:"Output Tokens"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"agentRuns":return{type:"line",title:W("Agent Runs"),data:I,dataKey:"agentRuns",color:"#06b6d4",yAxisLabel:"Number of Agent Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"toolRuns":return R(x).length===1?{type:"line",title:W("Tool Runs"),data:L(N,"toolRuns"),dataKey:"toolRuns",color:"#f97316",yAxisLabel:"Number of Tool Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}:{type:"line",title:"Tool Runs",data:I,yAxisLabel:"Number of Tool Runs",lines:[{dataKey:"toolRuns",color:"#06b6d4",label:"Tool Runs"},{dataKey:"codeTools",color:"#f97316",label:"Code Tools"},{dataKey:"workflowTools",color:"#10b981",label:"Workflow Tools"},{dataKey:"knowledgeTools",color:"#8b5cf6",label:"Knowledge"},{dataKey:"mcpTools",color:"#ef4444",label:"MCP Tools"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"modelRuns":return R(x).length===1?{type:"line",title:W("Model Runs"),data:L(N,"modelRuns"),dataKey:"modelRuns",color:"#10b981",yAxisLabel:"Number of Model Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}:{type:"line",title:W("Model Runs"),data:I,dataKey:"modelRuns",color:"#10b981",yAxisLabel:"Number of Model Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};default:return null}},M=(()=>{const k=_();return k!=null&&k.controls?{...k.controls,dropdown:k.controls.dropdown?{...k.controls.dropdown,onChange:T}:void 0,toggle:k.controls.toggle?{...k.controls.toggle,chartView:y==="chart",tableView:y==="table",onToggle:m}:void 0}:c?{...c,dropdown:c.dropdown?{...c.dropdown,onChange:T}:void 0,toggle:c.toggle?{...c.toggle,chartView:d==="chart",tableView:d==="table",onToggle:m}:void 0}:void 0})(),F=(()=>{var I,W,z,V,Z,Q,ae,te,q,Y;const k=_();if(k!=null&&k.view){if((I=k.controls)!=null&&I.toggle){if(y==="table"&&k.view.table){let D=k.view.table.data;if(k.metricType==="agentRuns"&&$(x)){const ie=R(x);if(ie.length>0){const K=((V=(z=(W=k.controls)==null?void 0:W.dropdown)==null?void 0:z.options)==null?void 0:V.filter(ee=>ie.includes(ee.value)))||[];K.length>0&&(D=D.filter(ee=>K.some(oe=>ee.name===oe.label||ee.name&&ee.name.toLowerCase().includes(oe.label.toLowerCase()))))}}if(k.metricType==="toolRuns"&&$(x)){const ie=R(x);if(ie.length>0){const K=((ae=(Q=(Z=k.controls)==null?void 0:Z.dropdown)==null?void 0:Q.options)==null?void 0:ae.filter(ee=>ie.includes(ee.value)))||[];K.length>0&&(D=D.filter(ee=>K.some(oe=>ee.name===oe.label||ee.name&&ee.name.toLowerCase().includes(oe.label.toLowerCase()))))}}if(k.metricType==="modelRuns"&&$(x)){const ie=R(x);if(ie.length>0){const K=((Y=(q=(te=k.controls)==null?void 0:te.dropdown)==null?void 0:q.options)==null?void 0:Y.filter(ee=>ie.includes(ee.value)))||[];K.length>0&&(D=D.filter(ee=>K.some(oe=>ee.name===oe.label||ee.name&&ee.name.toLowerCase().includes(oe.label.toLowerCase()))))}}return{type:"table",table:{...k.view.table,data:D}}}else if(y==="chart"&&k.view.chart)return{type:"chart",chart:j(k)||k.view.chart}}const J=j(k);return J?{...k.view,chart:J}:k.view}const N=B(g);return N?{type:"chart",chart:N}:{...u,type:d}})(),U=()=>l.map(k=>{const N=k.metricType||k.title.toLowerCase();return{...k,highlighted:k.highlighted||N===g}});return b.jsxs("div",{className:ce("bg-white rounded-lg border border-gray-200 p-6",t),style:{gridColumn:f!=null&&f.span?`span ${f.span}`:void 0,order:f==null?void 0:f.order},children:[b.jsxs("div",{className:"mb-6",children:[b.jsxs("div",{className:"flex items-center justify-between mb-4",children:[b.jsxs("div",{children:[b.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:o}),s&&b.jsx("p",{className:"text-sm text-gray-600 mt-1",children:s})]}),M&&b.jsx(iW,{config:M})]}),b.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:r?b.jsxs(b.Fragment,{children:[b.jsx(Es,{}),b.jsx(Es,{}),b.jsx(Es,{}),b.jsx(Es,{})]}):U().map((k,N)=>b.jsx(nW,{data:k,onClick:w},`${i}-metric-${N}`))})]}),b.jsx(aW,{config:F,className:"mt-6",isLoading:r||n,context:{sectionId:i,metricType:g}})]})},Cs=S.forwardRef(({className:e,variant:t="default",size:r="md",children:n,...a},i)=>{const o="inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",s={default:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground"},l={sm:"h-9 px-3",md:"h-10 px-4 py-2",lg:"h-11 px-8"};return b.jsx("button",{className:ce(o,s[t],l[r],e),ref:i,...a,children:n})});Cs.displayName="Button";function Ms(e){"@babel/helpers - typeof";return Ms=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},Ms(e)}function Et(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function De(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Ue(e){De(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Ms(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function oW(e,t){De(2,arguments);var r=Ue(e),n=Et(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function af(e,t){De(2,arguments);var r=Ue(e),n=Et(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var a=r.getDate(),i=new Date(r.getTime());i.setMonth(r.getMonth()+n+1,0);var o=i.getDate();return a>=o?i:(r.setFullYear(i.getFullYear(),i.getMonth(),a),r)}function sW(e,t){De(2,arguments);var r=Ue(e).getTime(),n=Et(t);return new Date(r+n)}var lW={};function yi(){return lW}function uW(e,t){var r,n,a,i,o,s;De(1,arguments);var l=yi(),u=Et((r=(n=(a=(i=void 0)!==null&&i!==void 0?i:void 0)!==null&&a!==void 0?a:l.weekStartsOn)!==null&&n!==void 0?n:(o=l.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&r!==void 0?r:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var c=Ue(e),f=c.getDay(),d=(f<u?7:0)+f-u;return c.setDate(c.getDate()-d),c.setHours(0,0,0,0),c}function cW(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Hr(e){De(1,arguments);var t=Ue(e);return t.setHours(0,0,0,0),t}function mi(e,t){De(2,arguments);var r=Hr(e),n=Hr(t);return r.getTime()===n.getTime()}function fW(e){return De(1,arguments),e instanceof Date||Ms(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function dW(e){if(De(1,arguments),!fW(e)&&typeof e!="number")return!1;var t=Ue(e);return!isNaN(Number(t))}function hW(e){De(1,arguments);var t=Ue(e);return t.setHours(23,59,59,999),t}function pW(e){De(1,arguments);var t=Ue(e);return t.setDate(1),t.setHours(0,0,0,0),t}function vW(e,t){De(2,arguments);var r=Et(t);return sW(e,-r)}var yW=864e5;function mW(e){De(1,arguments);var t=Ue(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),a=r-n;return Math.floor(a/yW)+1}function ks(e){De(1,arguments);var t=1,r=Ue(e),n=r.getUTCDay(),a=(n<t?7:0)+n-t;return r.setUTCDate(r.getUTCDate()-a),r.setUTCHours(0,0,0,0),r}function gb(e){De(1,arguments);var t=Ue(e),r=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var a=ks(n),i=new Date(0);i.setUTCFullYear(r,0,4),i.setUTCHours(0,0,0,0);var o=ks(i);return t.getTime()>=a.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function gW(e){De(1,arguments);var t=gb(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=ks(r);return n}var bW=6048e5;function xW(e){De(1,arguments);var t=Ue(e),r=ks(t).getTime()-gW(t).getTime();return Math.round(r/bW)+1}function Ns(e,t){var r,n,a,i,o,s,l,u;De(1,arguments);var c=yi(),f=Et((r=(n=(a=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Ue(e),h=d.getUTCDay(),y=(h<f?7:0)+h-f;return d.setUTCDate(d.getUTCDate()-y),d.setUTCHours(0,0,0,0),d}function bb(e,t){var r,n,a,i,o,s,l,u;De(1,arguments);var c=Ue(e),f=c.getUTCFullYear(),d=yi(),h=Et((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:d.firstWeekContainsDate)!==null&&n!==void 0?n:(l=d.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(f+1,0,h),y.setUTCHours(0,0,0,0);var p=Ns(y,t),v=new Date(0);v.setUTCFullYear(f,0,h),v.setUTCHours(0,0,0,0);var g=Ns(v,t);return c.getTime()>=p.getTime()?f+1:c.getTime()>=g.getTime()?f:f-1}function wW(e,t){var r,n,a,i,o,s,l,u;De(1,arguments);var c=yi(),f=Et((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=bb(e,t),h=new Date(0);h.setUTCFullYear(d,0,f),h.setUTCHours(0,0,0,0);var y=Ns(h,t);return y}var OW=6048e5;function SW(e,t){De(1,arguments);var r=Ue(e),n=Ns(r,t).getTime()-wW(r,t).getTime();return Math.round(n/OW)+1}function _e(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return r+n}var Tr={y:function(t,r){var n=t.getUTCFullYear(),a=n>0?n:1-n;return _e(r==="yy"?a%100:a,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):_e(n+1,2)},d:function(t,r){return _e(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return _e(t.getUTCHours()%12||12,r.length)},H:function(t,r){return _e(t.getUTCHours(),r.length)},m:function(t,r){return _e(t.getUTCMinutes(),r.length)},s:function(t,r){return _e(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,a=t.getUTCMilliseconds(),i=Math.floor(a*Math.pow(10,n-3));return _e(i,r.length)}},ta={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},AW={G:function(t,r,n){var a=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var a=t.getUTCFullYear(),i=a>0?a:1-a;return n.ordinalNumber(i,{unit:"year"})}return Tr.y(t,r)},Y:function(t,r,n,a){var i=bb(t,a),o=i>0?i:1-i;if(r==="YY"){var s=o%100;return _e(s,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):_e(o,r.length)},R:function(t,r){var n=gb(t);return _e(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return _e(n,r.length)},Q:function(t,r,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(a);case"QQ":return _e(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(t,r,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(a);case"qq":return _e(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(t,r,n){var a=t.getUTCMonth();switch(r){case"M":case"MM":return Tr.M(t,r);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(t,r,n){var a=t.getUTCMonth();switch(r){case"L":return String(a+1);case"LL":return _e(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(t,r,n,a){var i=SW(t,a);return r==="wo"?n.ordinalNumber(i,{unit:"week"}):_e(i,r.length)},I:function(t,r,n){var a=xW(t);return r==="Io"?n.ordinalNumber(a,{unit:"week"}):_e(a,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):Tr.d(t,r)},D:function(t,r,n){var a=mW(t);return r==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):_e(a,r.length)},E:function(t,r,n){var a=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(t,r,n,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return _e(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,r,n,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return _e(o,r.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,r,n){var a=t.getUTCDay(),i=a===0?7:a;switch(r){case"i":return String(i);case"ii":return _e(i,r.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(t,r,n){var a=t.getUTCHours(),i=a/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,r,n){var a=t.getUTCHours(),i;switch(a===12?i=ta.noon:a===0?i=ta.midnight:i=a/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,r,n){var a=t.getUTCHours(),i;switch(a>=17?i=ta.evening:a>=12?i=ta.afternoon:a>=4?i=ta.morning:i=ta.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var a=t.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return Tr.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Tr.H(t,r)},K:function(t,r,n){var a=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(a,{unit:"hour"}):_e(a,r.length)},k:function(t,r,n){var a=t.getUTCHours();return a===0&&(a=24),r==="ko"?n.ordinalNumber(a,{unit:"hour"}):_e(a,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Tr.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Tr.s(t,r)},S:function(t,r){return Tr.S(t,r)},X:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return wb(o);case"XXXX":case"XX":return Yr(o);case"XXXXX":case"XXX":default:return Yr(o,":")}},x:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"x":return wb(o);case"xxxx":case"xx":return Yr(o);case"xxxxx":case"xxx":default:return Yr(o,":")}},O:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+xb(o,":");case"OOOO":default:return"GMT"+Yr(o,":")}},z:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+xb(o,":");case"zzzz":default:return"GMT"+Yr(o,":")}},t:function(t,r,n,a){var i=a._originalDate||t,o=Math.floor(i.getTime()/1e3);return _e(o,r.length)},T:function(t,r,n,a){var i=a._originalDate||t,o=i.getTime();return _e(o,r.length)}};function xb(e,t){var r=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),i=n%60;if(i===0)return r+String(a);var o=t;return r+String(a)+o+_e(i,2)}function wb(e,t){if(e%60===0){var r=e>0?"-":"+";return r+_e(Math.abs(e)/60,2)}return Yr(e,t)}function Yr(e,t){var r=t||"",n=e>0?"-":"+",a=Math.abs(e),i=_e(Math.floor(a/60),2),o=_e(a%60,2);return n+i+r+o}var Ob=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},Sb=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},TW=function(t,r){var n=t.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return Ob(t,r);var o;switch(a){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",Ob(a,r)).replace("{{time}}",Sb(i,r))},PW={p:Sb,P:TW},_W=["D","DD"],EW=["YY","YYYY"];function jW(e){return _W.indexOf(e)!==-1}function $W(e){return EW.indexOf(e)!==-1}function Ab(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var CW={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"}},MW=function(t,r,n){var a,i=CW[t];return typeof i=="string"?a=i:r===1?a=i.one:a=i.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function of(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var kW={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},NW={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},DW={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},IW={date:of({formats:kW,defaultWidth:"full"}),time:of({formats:NW,defaultWidth:"full"}),dateTime:of({formats:DW,defaultWidth:"full"})},LW={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},RW=function(t,r,n,a){return LW[t]};function gi(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",a;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):i;a=e.formattingValues[o]||e.formattingValues[i]}else{var s=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[l]||e.values[s]}var u=e.argumentCallback?e.argumentCallback(t):t;return a[u]}}var BW={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},FW={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},WW={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"]},UW={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"]},zW={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"}},GW={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"}},qW=function(t,r){var n=Number(t),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},KW={ordinalNumber:qW,era:gi({values:BW,defaultWidth:"wide"}),quarter:gi({values:FW,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:gi({values:WW,defaultWidth:"wide"}),day:gi({values:UW,defaultWidth:"wide"}),dayPeriod:gi({values:zW,defaultWidth:"wide",formattingValues:GW,defaultFormattingWidth:"wide"})};function bi(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;var o=i[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?HW(s,function(f){return f.test(o)}):VW(s,function(f){return f.test(o)}),u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;var c=t.slice(o.length);return{value:u,rest:c}}}function VW(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function HW(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function YW(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var a=n[0],i=t.match(e.parsePattern);if(!i)return null;var o=e.valueCallback?e.valueCallback(i[0]):i[0];o=r.valueCallback?r.valueCallback(o):o;var s=t.slice(a.length);return{value:o,rest:s}}}var XW=/^(\d+)(th|st|nd|rd)?/i,JW=/\d+/i,ZW={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},QW={any:[/^b/i,/^(a|c)/i]},eU={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},tU={any:[/1/i,/2/i,/3/i,/4/i]},rU={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},nU={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]},aU={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},iU={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]},oU={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},sU={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}},lU={ordinalNumber:YW({matchPattern:XW,parsePattern:JW,valueCallback:function(t){return parseInt(t,10)}}),era:bi({matchPatterns:ZW,defaultMatchWidth:"wide",parsePatterns:QW,defaultParseWidth:"any"}),quarter:bi({matchPatterns:eU,defaultMatchWidth:"wide",parsePatterns:tU,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:bi({matchPatterns:rU,defaultMatchWidth:"wide",parsePatterns:nU,defaultParseWidth:"any"}),day:bi({matchPatterns:aU,defaultMatchWidth:"wide",parsePatterns:iU,defaultParseWidth:"any"}),dayPeriod:bi({matchPatterns:oU,defaultMatchWidth:"any",parsePatterns:sU,defaultParseWidth:"any"})},uU={code:"en-US",formatDistance:MW,formatLong:IW,formatRelative:RW,localize:KW,match:lU,options:{weekStartsOn:0,firstWeekContainsDate:1}},cU=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,fU=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,dU=/^'([^]*?)'?$/,hU=/''/g,pU=/[a-zA-Z]/;function Ds(e,t,r){var n,a,i,o,s,l,u,c,f,d,h,y,p,v;De(2,arguments);var g=String(t),O=yi(),x=(n=(a=void 0)!==null&&a!==void 0?a:O.locale)!==null&&n!==void 0?n:uU,A=Et((i=(o=(s=(l=void 0)!==null&&l!==void 0?l:void 0)!==null&&s!==void 0?s:O.firstWeekContainsDate)!==null&&o!==void 0?o:(u=O.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=Et((f=(d=(h=(y=void 0)!==null&&y!==void 0?y:void 0)!==null&&h!==void 0?h:O.weekStartsOn)!==null&&d!==void 0?d:(p=O.locale)===null||p===void 0||(v=p.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&f!==void 0?f:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!x.localize)throw new RangeError("locale must contain localize property");if(!x.formatLong)throw new RangeError("locale must contain formatLong property");var w=Ue(e);if(!dW(w))throw new RangeError("Invalid time value");var T=cW(w),_=vW(w,T),$={firstWeekContainsDate:A,weekStartsOn:m,locale:x,_originalDate:w},R=g.match(fU).map(function(P){var j=P[0];if(j==="p"||j==="P"){var L=PW[j];return L(P,x.formatLong)}return P}).join("").match(cU).map(function(P){if(P==="''")return"'";var j=P[0];if(j==="'")return vU(P);var L=AW[j];if(L)return $W(P)&&Ab(P,t,String(e)),jW(P)&&Ab(P,t,String(e)),L(_,P,x.localize,$);if(j.match(pU))throw new RangeError("Format string contains an unescaped latin alphabet character `"+j+"`");return P}).join("");return R}function vU(e){var t=e.match(dU);return t?t[1].replace(hU,"'"):e}function Tb(e,t){De(2,arguments);var r=Ue(e),n=Ue(t);return r.getTime()<n.getTime()}function yU(e,t){De(2,arguments);var r=Ue(e).getTime(),n=Ue(t.start).getTime(),a=Ue(t.end).getTime();if(!(n<=a))throw new RangeError("Invalid interval");return r>=n&&r<=a}function Is(e,t){De(2,arguments);var r=Et(t);return oW(e,-r)}function Pb(e,t){De(2,arguments);var r=Et(t);return af(e,-r)}const mU=({children:e})=>{const[t,r]=S.useState(!1);return S.useEffect(()=>(r(!0),()=>r(!1)),[]),t?Zr.createPortal(e,document.body):null};function gU({className:e,defaultValue:t,onDateRangeChange:r}){console.log("🗓️ DateRangePicker component rendered with props:",{className:e,defaultValue:t,hasCallback:!!r});const n=[{label:"Today",value:"today",dateRange:{from:Hr(new Date),to:new Date}},{label:"Yesterday",value:"yesterday",dateRange:{from:Hr(Is(new Date,1)),to:hW(Is(new Date,1))}},{label:"This week",value:"thisWeek",dateRange:{from:uW(new Date),to:new Date}},{label:"Last 7 days",value:"7d",dateRange:{from:Hr(Is(new Date,6)),to:new Date}},{label:"This month",value:"thisMonth",dateRange:{from:pW(new Date),to:new Date}},{label:"Last 30 days",value:"30d",dateRange:{from:Hr(Is(new Date,29)),to:new Date}},{label:"Last 3 months",value:"90d",dateRange:{from:Hr(Pb(new Date,3)),to:new Date}}],a=t?n.find(E=>E.value===t):null;console.log("📅 DateRangePicker initialization:",{defaultValue:t,defaultPreset:a==null?void 0:a.label,hasDateRange:!!(a!=null&&a.dateRange),allPresetValues:n.map(E=>E.value),foundPreset:!!a});const[i,o]=S.useState(a==null?void 0:a.dateRange),[s,l]=S.useState(a==null?void 0:a.dateRange),[u,c]=S.useState(!1),[f,d]=S.useState((a==null?void 0:a.label)||null),[h,y]=S.useState((a==null?void 0:a.label)||null),[p,v]=S.useState(new Date),[g,O]=S.useState(null),[x,A]=S.useState({top:0,left:0}),m=S.useRef(null),w=S.useRef(null);S.useEffect(()=>{var E,F;console.log("📅 DateRangePicker useEffect running:",{hasDefaultPreset:!!a,hasOnDateRangeChange:!!r,currentDate:i,currentLabel:f,defaultValue:t,defaultPresetLabel:a==null?void 0:a.label,defaultPresetValue:a==null?void 0:a.value}),a!=null&&a.dateRange&&r?(console.log("📅 DateRangePicker: Setting initial default value:",{label:a.label,dateRange:a.dateRange,from:(E=a.dateRange.from)==null?void 0:E.toLocaleDateString(),to:(F=a.dateRange.to)==null?void 0:F.toLocaleDateString()}),r(a.dateRange)):console.log("📅 DateRangePicker: NOT setting initial value because:",{hasDefaultPreset:!!a,hasDateRange:!!(a!=null&&a.dateRange),hasCallback:!!r,presetLabelsAvailable:n.map(U=>`${U.value}:${U.label}`)})},[]),S.useEffect(()=>{t&&(a!=null&&a.dateRange)&&(console.log("📅 DateRangePicker: DefaultValue changed, updating state:",{defaultValue:t,label:a.label}),o(a.dateRange),d(a.label),l(a.dateRange),y(a.label))},[t]);const T=()=>{if(!w.current)return;const E=w.current.getBoundingClientRect(),F=window.scrollY,U=window.scrollX,k=window.innerWidth,N=window.innerHeight,I=720,W=450;let z=E.bottom+F+8,V=E.left+U;V+I>k&&(V=E.right+U-I),V+I>k&&(V=k-I-20),z+W>N&&(z=E.top+F-W-8),V<20&&(V=20),z<20&&(z=20),A({top:z,left:V})};S.useEffect(()=>{const E=()=>{u&&T()};return u&&(window.addEventListener("resize",E),window.addEventListener("scroll",E)),()=>{window.removeEventListener("resize",E),window.removeEventListener("scroll",E)}},[u]);const _=(E,F)=>{if(l(E),y(F),O(null),E.from){const U=new Date(E.from.getFullYear(),E.from.getMonth(),1);v(U)}},$=E=>{if(!g)O(E),l({from:E,to:E}),y(null);else{const F=Tb(E,g)?E:g,U=Tb(E,g)?g:E;l({from:F,to:U}),O(null),y(null)}},R=()=>{o(s),d(h),r==null||r(s),c(!1),O(null)},P=()=>{l(void 0),y(null),o(void 0),d(null),r==null||r(void 0),c(!1),O(null)},j=E=>{E?(l(i),y(f),O(null),setTimeout(T,0)):(l(i),y(f),O(null)),c(E)},L=(E,F)=>(console.log("📅 formatDateRange called with:",{presetLabel:F,hasDateRange:!!(E!=null&&E.from)}),F||(E!=null&&E.from?!E.to||mi(E.from,E.to)?Ds(E.from,"MMM dd, yyyy"):`${Ds(E.from,"MMM dd, yyyy")} - ${Ds(E.to,"MMM dd, yyyy")}`:"Pick a date range")),B=(E=0)=>{const F=af(p,E),U=F.getFullYear(),k=F.getMonth(),N=new Date(U,k,1),W=new Date(U,k+1,0).getDate(),z=N.getDay(),V=["January","February","March","April","May","June","July","August","September","October","November","December"],Z=["Su","Mo","Tu","We","Th","Fr","Sa"],Q=[],te=new Date(U,k-1,0).getDate();for(let J=z-1;J>=0;J--){const D=te-J,ie=new Date(U,k-1,D);Q.push(b.jsx("button",{onClick:()=>$(ie),className:"h-8 w-8 text-xs text-gray-400 hover:bg-gray-100 rounded flex items-center justify-center",children:D},`prev-${D}`))}for(let J=1;J<=W;J++){const D=new Date(U,k,J),ie=mi(D,new Date),K=(s==null?void 0:s.from)&&(s==null?void 0:s.to)&&yU(D,{start:s.from,end:s.to}),ee=(s==null?void 0:s.from)&&mi(D,s.from),oe=(s==null?void 0:s.to)&&mi(D,s.to),Ce=g&&mi(D,g);let Te="h-8 w-8 text-xs hover:bg-gray-100 rounded flex items-center justify-center transition-colors ";ie&&(Te+="font-semibold "),Ce||ee||oe?Te+="bg-blue-500 text-white hover:bg-blue-600 ":K&&(Te+="bg-blue-100 text-blue-900 "),Q.push(b.jsx("button",{onClick:()=>$(D),className:Te,children:J},`current-${J}`))}const Y=Math.ceil((z+W)/7)*7-z-W;for(let J=1;J<=Y;J++){const D=new Date(U,k+1,J);Q.push(b.jsx("button",{onClick:()=>$(D),className:"h-8 w-8 text-xs text-gray-400 hover:bg-gray-100 rounded flex items-center justify-center",children:J},`next-${J}`))}return b.jsxs("div",{className:"p-3",children:[b.jsxs("div",{className:"flex items-center justify-between mb-3",children:[E===0&&b.jsx("button",{onClick:()=>v(Pb(p,1)),className:"p-1 hover:bg-gray-100 rounded",children:b.jsx(z8,{className:"h-4 w-4"})}),b.jsxs("div",{className:"font-medium text-sm",children:[V[k]," ",U]}),E===1&&b.jsx("button",{onClick:()=>v(af(p,1)),className:"p-1 hover:bg-gray-100 rounded",children:b.jsx(G8,{className:"h-4 w-4"})})]}),b.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:Z.map(J=>b.jsx("div",{className:"h-8 flex items-center justify-center text-xs font-medium text-gray-500",children:J},J))}),b.jsx("div",{className:"grid grid-cols-7 gap-1",children:Q})]})},M=()=>"fixed bg-white border border-gray-200 rounded-lg shadow-xl z-[99999]";return b.jsxs("div",{className:`relative ${e}`,children:[b.jsxs("button",{ref:w,onClick:()=>j(!u),className:`min-w-[200px] px-3 py-2 text-left border border-gray-300 rounded-md shadow-sm bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 flex items-center ${i?"text-gray-900":"text-gray-500"}`,children:[b.jsx(sb,{className:"mr-2 h-4 w-4"}),(()=>{const E=L(i,f);return console.log("📅 Button display text:",{displayText:E,date:i,selectedPresetLabel:f}),E})()]}),u&&b.jsxs(mU,{children:[b.jsx("div",{className:"fixed inset-0 z-[99998] bg-black bg-opacity-10",onClick:()=>j(!1)}),b.jsxs("div",{ref:m,className:M(),style:{top:x.top,left:x.left,width:"720px",minWidth:"720px",maxHeight:"90vh"},onClick:E=>E.stopPropagation(),children:[b.jsxs("div",{className:"flex",children:[b.jsxs("div",{className:"flex flex-col gap-1 p-3 border-r border-gray-200 w-[160px] flex-shrink-0",children:[b.jsx("div",{className:"text-sm font-medium text-gray-500 mb-2",children:"Presets"}),n.map(E=>b.jsx("button",{onClick:()=>_(E.dateRange,E.label),className:`text-left px-2 py-1.5 text-sm rounded hover:bg-gray-100 transition-colors ${h===E.label?"bg-gray-100":""}`,children:E.label},E.label))]}),b.jsxs("div",{className:"flex flex-1",children:[B(0),B(1)]})]}),b.jsxs("div",{className:"border-t border-gray-200 p-3 flex justify-end gap-2",children:[b.jsx("button",{onClick:P,className:"px-3 py-1.5 text-sm border border-gray-300 rounded hover:bg-gray-50 transition-colors",children:"Clear"}),b.jsx("button",{onClick:R,disabled:!(s!=null&&s.from),className:"px-3 py-1.5 text-sm bg-blue-600 text-white rounded hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:"Apply"})]})]})]})]})}class bU{constructor(t=""){Bt(this,"API_PATH","/tracing/api/trpc/metrics.getMetrics");Bt(this,"baseUrl","");Bt(this,"endpoints",{});this.baseUrl=t,this.initializeEndpoints()}setBaseUrl(t){this.baseUrl=t,this.initializeEndpoints()}getEndpoint(t){return this.endpoints[t]||{endpoint:"",method:"GET"}}getBaseUrl(){return this.baseUrl}initializeEndpoints(){const t=`${this.baseUrl}${this.API_PATH}`;this.endpoints["usage-analytics.cards"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["usage-analytics.sessions.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["usage-analytics.messages.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["usage-analytics.users.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["usage-analytics.tokens.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["runs.cards"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["runs.agent-runs.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["runs.model-runs.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["runs.tool-runs.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH}}getAvailableEndpoints(){return Object.keys(this.endpoints)}hasEndpoint(t){return t in this.endpoints}}class _b{constructor(t){Bt(this,"endpointsService");Bt(this,"defaultHeaders");Bt(this,"timeout");this.endpointsService=new bU(t.baseUrl),this.defaultHeaders={"Content-Type":"application/json",...t.defaultHeaders},this.timeout=t.timeout||3e4}updateConfig(t){t.baseUrl&&this.endpointsService.setBaseUrl(t.baseUrl),t.defaultHeaders&&(this.defaultHeaders={...this.defaultHeaders,...t.defaultHeaders}),t.timeout&&(this.timeout=t.timeout)}async invoke(t,r,n,a){const i=this.endpointsService.getEndpoint(t);if(!i.endpoint)throw new Error(`Endpoint not found for service: ${t}`);const o=this.prepareRequest(i,r,n);try{const s=new AbortController,l=setTimeout(()=>s.abort(),(a==null?void 0:a.timeout)||this.timeout),u=await fetch(o.url,{method:o.method,headers:o.headers,body:o.body,signal:(a==null?void 0:a.signal)||s.signal});if(clearTimeout(l),!u.ok)throw new Error(`HTTP Error: ${u.status} ${u.statusText}`);return await u.json()}catch(s){throw s instanceof Error?s.name==="AbortError"?new Error("Request timeout"):s:new Error("Unknown error occurred during API call")}}prepareRequest(t,r,n){const a={...this.defaultHeaders,...n},i={};Object.entries(a).forEach(([l,u])=>{u!==void 0&&(i[l]=u)});let o=t.endpoint,s;if(t.method==="GET"&&r){const l=this.buildQueryParams(r);o+=`?${l}`}else r&&(s=JSON.stringify(r));return{url:o,method:t.method,headers:i,body:s}}buildQueryParams(t){const r={json:t},n=new URLSearchParams;return n.append("input",JSON.stringify(r)),n.append("rnd",Math.random().toString(36).substring(7)),n.toString()}getBaseUrl(){return this.endpointsService.getBaseUrl()}hasEndpoint(t){return this.endpointsService.hasEndpoint(t)}getAvailableEndpoints(){return this.endpointsService.getAvailableEndpoints()}}class lr{constructor(t){Bt(this,"apiInvoker");Bt(this,"projectId");Bt(this,"environment");Bt(this,"defaultTimeRange");const r={baseUrl:t.baseUrl,defaultHeaders:t.headers,timeout:3e4};this.apiInvoker=new _b(r),this.projectId=t.projectId,this.environment=t.environment,this.defaultTimeRange=t.defaultTimeRange}updateConfig(t){(t.baseUrl||t.headers)&&this.apiInvoker.updateConfig({baseUrl:t.baseUrl,defaultHeaders:t.headers}),t.projectId&&(this.projectId=t.projectId),t.environment&&(this.environment=t.environment),t.defaultTimeRange&&(this.defaultTimeRange=t.defaultTimeRange,console.log("🔄 API Service: Updated defaultTimeRange:",this.defaultTimeRange))}getDefaultTimeRange(){return this.defaultTimeRange||lr.getDateRange(30)}async fetchEnvironments(){try{const r=`${this.apiInvoker.getBaseUrl()}/aaa/api/v1/apps/${this.projectId}/environments?rnd=${Math.random().toString(36).substring(2,8)}`;console.log("🌍 Fetching environments for project:",this.projectId),console.log("🔗 Environment API URL:",r);const n=await fetch(r,{method:"GET",headers:{"Content-Type":"application/json",...this.apiInvoker.defaultHeaders}});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const a=await n.json();return console.log("✅ Environments fetched successfully:",a.map(i=>({name:i.envName,enabled:i.isEnabled,status:i.status}))),a}catch(t){throw console.error("❌ Error fetching environments:",t),t}}async fetchUsageAnalyticsCards(t,r,n,a=[]){const i=n||lr.getTimeDimension(t,r);console.log("📊 Fetching usage analytics cards:",{dateRange:{fromTimestamp:t,toTimestamp:r},providedTimeDimension:n,resolvedTimeDimension:i});const o={projectId:this.projectId,type:"cards",category:"usage-analytics",envId:this.environment,fromTimestamp:t,toTimestamp:r,filter:a,includeTrends:!0,timeDimension:i};return(await this.apiInvoker.invoke("usage-analytics.cards",o)).result.data.json}async fetchRunsCards(t,r,n,a=[]){const i=n||lr.getTimeDimension(t,r);console.log("📊 Fetching runs cards:",{dateRange:{fromTimestamp:t,toTimestamp:r},providedTimeDimension:n,resolvedTimeDimension:i});const o={projectId:this.projectId,type:"cards",category:"runs",envId:this.environment,fromTimestamp:t,toTimestamp:r,filter:a,includeTrends:!0,timeDimension:i};return(await this.apiInvoker.invoke("runs.cards",o)).result.data.json}async fetchTimeSeriesData(t,r,n,a,i,o=[]){const s=i||lr.getTimeDimension(n,a);console.log("📊 Fetching time series data:",{metric:t,category:r,dateRange:{fromTimestamp:n,toTimestamp:a},providedTimeDimension:i,resolvedTimeDimension:s});const l=`${r}.${t}.timeseries`,u={projectId:this.projectId,type:"time-series",category:r,envId:this.environment,fromTimestamp:n,toTimestamp:a,filter:o,metric:t,timeDimension:s};return(await this.apiInvoker.invoke(l,u)).result.data.json}transformUsageAnalyticsCards(t){const r=t.data.trends;console.log("Transforming usage analytics cards with trends:",r);const n=a=>a>0?"increase":"decrease";return[{title:"Users",value:t.data.users,metricType:"users",icon:"users",highlighted:!0,change:r!=null&&r.users?{value:Math.abs(r.users.changePercent),type:n(r.users.changePercent)}:void 0},{title:"Sessions",value:t.data.sessions,metricType:"sessions",icon:"activity",highlighted:!1,change:r!=null&&r.sessions?{value:Math.abs(r.sessions.changePercent),type:n(r.sessions.changePercent)}:void 0},{title:"Messages",value:t.data.messages.total,metricType:"messages",icon:"message-circle",info:`Input: ${t.data.messages.input}, Output: ${t.data.messages.output}`,highlighted:!1,change:r!=null&&r.messages?{value:Math.abs(r.messages.changePercent.total),type:n(r.messages.changePercent.total)}:void 0},{title:"Tokens",value:t.data.tokens.total,metricType:"tokens",icon:"coins",info:`Input: ${t.data.tokens.input}, Output: ${t.data.tokens.output}`,highlighted:!1,change:r!=null&&r.tokens?{value:Math.abs(r.tokens.changePercent.total),type:n(r.tokens.changePercent.total)}:void 0}]}transformRunsCards(t){const r=t.data.trends;console.log("Transforming runs cards with trends:",r);const n=a=>a>0?"increase":"decrease";return[{title:"Agent Runs",value:t.data.agentRuns,metricType:"agentRuns",icon:"bot",highlighted:!0,change:r!=null&&r.agentRuns?{value:Math.abs(r.agentRuns.changePercent),type:n(r.agentRuns.changePercent)}:void 0},{title:"Tool Runs",value:t.data.toolRuns.total,metricType:"toolRuns",icon:"wrench",info:`Code: ${t.data.toolRuns.codeTools}, Library: ${t.data.toolRuns.libraryTools}, Knowledge: ${t.data.toolRuns.knowledgeTools}, MCP: ${t.data.toolRuns.mcpTools}`,highlighted:!1,change:r!=null&&r.toolRuns?{value:Math.abs(r.toolRuns.changePercent.total),type:n(r.toolRuns.changePercent.total)}:void 0},{title:"Model Runs",value:t.data.modelRuns,metricType:"modelRuns",icon:"cpu",highlighted:!1,change:r!=null&&r.modelRuns?{value:Math.abs(r.modelRuns.changePercent),type:n(r.modelRuns.changePercent)}:void 0}]}transformTimeSeriesDataForMetric(t,r){var a;if(console.log("=== METRIC-SPECIFIC TRANSFORM DEBUG ==="),console.log("Raw TimeSeriesResponse:",JSON.stringify(t,null,2)),console.log("Metric type:",r),!t||!t.data||!Array.isArray(t.data))return console.error("Invalid time series data structure:",t),[];const n=t.data.map((i,o)=>{console.log(`Processing point ${o}:`,i);const s=new Date(i.timestamp),l=s.toISOString().split("T")[0],u=s.toLocaleDateString("en-US",{month:"short",day:"numeric"}),c={date:l,timestamp:u,formattedDate:u,count:i.count||0,value:i.count||0,input_tokens:i.input_tokens||0,output_tokens:i.output_tokens||0,total_tokens:(i.input_tokens||0)+(i.output_tokens||0),inputTokens:i.input_tokens||0,outputTokens:i.output_tokens||0,totalTokens:(i.input_tokens||0)+(i.output_tokens||0),listView:i.listView||[],index:o};switch(r){case"users":c.users=i.count||0;break;case"sessions":c.sessions=i.count||0;break;case"messages":c.messages=i.count||0;break;case"tokens":c.tokens=i.count||0,i.input_tokens||i.output_tokens?c.totalTokens=(i.input_tokens||0)+(i.output_tokens||0):c.totalTokens=i.count||0;break;case"agentRuns":c.agentRuns=i.count||0;break;case"toolRuns":c.toolRuns=i.count||0;break;case"modelRuns":c.modelRuns=i.count||0;break;default:c.users=i.count||0,c.sessions=i.count||0,c.messages=i.count||0,c.tokens=i.count||0,c.agentRuns=i.count||0,c.toolRuns=i.count||0,c.modelRuns=i.count||0}return console.log(`Transformed point ${o} for metric ${r}:`,c),c});return console.log("Final transformed data array:",JSON.stringify(n,null,2)),console.log("Sample transformed point for chart:",n[0]),console.log("Populated metric property:",r,"=",(a=n[0])==null?void 0:a[r||"count"]),console.log("=== END METRIC-SPECIFIC TRANSFORM DEBUG ==="),n}transformTimeSeriesData(t){return this.transformTimeSeriesDataForMetric(t)}transformAgentsListViewToTable(t){return Array.isArray(t)?t.map((r,n)=>{var o,s;let a="",i=null;if(r.icon)try{if(i=typeof r.icon=="string"?JSON.parse(r.icon):r.icon,i.name){const l=((o=r.agentName)==null?void 0:o.replace(/\s+/g,""))||`agent${n}`,u=((s=i.color)==null?void 0:s.replace("#",""))||"b6e3f4";a=`https://api.dicebear.com/7.x/avataaars/svg?seed=${l}&backgroundColor=${u}&backgroundType=solid`}}catch{console.warn("Failed to parse icon data:",r.icon)}return{id:`agent-${n+1}`,name:r.agentName||`Agent ${n+1}`,runs:r.count||0,responseTime:r.avgResponseTime?`${Math.round(r.avgResponseTime)}s`:"0s",tokens:r.tokens||Math.floor((r.count||0)*150),successRate:r.successRate?`${Math.round(r.successRate)}%`:"95%",lastRun:r.lastRun||new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),avatar:a||`https://api.dicebear.com/7.x/avataaars/svg?seed=agent${n}&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid`,icon:r.icon||void 0}}):(console.warn("Invalid listView data for agents:",t),[])}transformToolsListViewToTable(t){if(!Array.isArray(t))return console.warn("Invalid listView data for tools:",t),[];const r=n=>{const a=n.toLowerCase();return a.includes("calculate")||a.includes("compute")?"Code Tool":a.includes("workflow")||a.includes("process")?"Workflow Tool":a.includes("mcp")||a.includes("protocol")?"MCP Tool":a.includes("knowledge")||a.includes("search")||a.includes("fetch")?"Knowledge":"Code Tool"};return t.map((n,a)=>({id:`tool-${a+1}`,name:n.toolName||`Tool ${a+1}`,type:n.type||r(n.toolName||""),runs:n.count||0,responseTime:n.avgResponseTime?`${Math.round(n.avgResponseTime)}s`:"0s",tokens:n.tokens||Math.floor((n.count||0)*50),successRate:n.successRate?`${Math.round(n.successRate)}%`:"92%",lastRun:n.lastRun||new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),icon:n.icon||void 0}))}transformModelsListViewToTable(t){if(!Array.isArray(t))return console.warn("Invalid listView data for models:",t),[];const r=n=>{const a=n.toLowerCase();return a.includes("gpt")||a.includes("openai")?"⚡":a.includes("claude")||a.includes("anthropic")?"A":a.includes("gemini")||a.includes("google")?"G":a.includes("llama")||a.includes("meta")?"M":"🤖"};return t.map((n,a)=>({id:`model-${a+1}`,name:n.modelName||`Model ${a+1}`,runs:n.count||0,responseTime:n.avgResponseTime?`${Math.round(n.avgResponseTime)}s`:"0s",tokens:n.tokens||Math.floor((n.count||0)*300),successRate:n.successRate?`${Math.round(n.successRate)}%`:"98%",lastRun:n.lastRun||new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),icon:r(n.modelName||"")}))}extractAgentControlOptions(t){if(!Array.isArray(t))return[{label:"All Agents",value:"all"}];const r=[{label:"All Agents",value:"all"}];return t.forEach(n=>{var a;if(n.agentName){let i="";try{if(n.icon){const o=typeof n.icon=="string"?JSON.parse(n.icon):n.icon;if(o.name){const s=n.agentName.replace(/\s+/g,""),l=((a=o.color)==null?void 0:a.replace("#",""))||"b6e3f4";i=`https://api.dicebear.com/7.x/avataaars/svg?seed=${s}&backgroundColor=${l}&backgroundType=solid`}}}catch{console.warn("Failed to parse icon data for control:",n.icon)}r.push({label:n.agentName,value:n.agentName.replace(/\s+/g,"").toLowerCase(),avatar:i||`https://api.dicebear.com/7.x/avataaars/svg?seed=${n.agentName.replace(/\s+/g,"")}&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid`})}}),r}extractToolControlOptions(t){if(!Array.isArray(t))return[{label:"All Tools",value:"all"}];const r=[{label:"All Tools",value:"all"}];return t.forEach(n=>{if(n.toolName){const a=i=>{const o=i.toLowerCase();return o.includes("calculate")||o.includes("compute")?"Code Tool":o.includes("workflow")||o.includes("process")?"Workflow Tool":o.includes("mcp")||o.includes("protocol")?"MCP Tool":o.includes("knowledge")||o.includes("search")||o.includes("fetch")?"Knowledge":"Code Tool"};r.push({label:n.toolName,value:n.toolName.replace(/[-]/g,""),icon:n.icon||void 0,type:n.type||a(n.toolName)})}}),r}extractModelControlOptions(t){if(!Array.isArray(t))return[{label:"All Models",value:"all"}];const r=[{label:"All Models",value:"all"}],n=a=>{const i=a.toLowerCase();return i.includes("gpt")||i.includes("openai")?"⚡":i.includes("claude")||i.includes("anthropic")?"A":i.includes("gemini")||i.includes("google")?"G":i.includes("llama")||i.includes("meta")?"M":"🤖"};return t.forEach(a=>{a.modelName&&r.push({label:a.modelName,value:a.modelName.replace(/[-\.]/g,""),icon:n(a.modelName)})}),r}async fetchTimeSeriesDataWithTableData(t,r,n,a,i,o=[]){const s=await this.fetchTimeSeriesData(t,r,n,a,i,o);let l=[];s.data.forEach(d=>{d.listView&&Array.isArray(d.listView)&&(l=[...l,...d.listView])});const u=this.aggregateListViewItems(l);let c=[],f=[];return t==="agent-runs"?(c=this.transformAgentsListViewToTable(u),f=this.extractAgentControlOptions(u)):t==="tool-runs"?(c=this.transformToolsListViewToTable(u),f=this.extractToolControlOptions(u)):t==="model-runs"&&(c=this.transformModelsListViewToTable(u),f=this.extractModelControlOptions(u)),{chartData:this.transformTimeSeriesDataForMetric(s,t.replace("-","")),tableData:c,controlOptions:f}}aggregateListViewItems(t){const r=new Map;return t.forEach(n=>{const a=n.agentName||n.toolName||n.modelName||"unknown";if(r.has(a)){const i=r.get(a);i.count=(i.count||0)+(n.count||0),i.avgResponseTime=i.avgResponseTime&&n.avgResponseTime?(i.avgResponseTime+n.avgResponseTime)/2:i.avgResponseTime||n.avgResponseTime,i.tokens=(i.tokens||0)+(n.tokens||0)}else r.set(a,{...n})}),Array.from(r.values())}async fetchEnhancedMetricsData(t,r,n,a=[]){try{const[i,o,s]=await Promise.all([this.fetchTimeSeriesDataWithTableData("agent-runs","runs",t,r,n,a),this.fetchTimeSeriesDataWithTableData("tool-runs","runs",t,r,n,a),this.fetchTimeSeriesDataWithTableData("model-runs","runs",t,r,n,a)]);return{agents:i,tools:o,models:s}}catch(i){throw console.error("Error fetching enhanced metrics data:",i),i}}async transformRunsCardsWithEnhancedData(t,r,n,a,i=[]){const o=t.data.trends,s=h=>h>0?"increase":"decrease",[l,u,c,f]=await Promise.all([this.fetchTimeSeriesDataWithTableData("agent-runs","runs",r,n,a,i),this.fetchTimeSeriesDataWithTableData("tool-runs","runs",r,n,a,i),this.fetchTimeSeriesDataWithTableData("model-runs","runs",r,n,a,i),this.fetchTimeSeriesData("tool-runs","runs",r,n,a,i)]),d=this.transformTimeSeriesDataForToolRuns(f);return[{title:"Agent Runs",value:t.data.agentRuns,metricType:"agentRuns",icon:"bot",highlighted:!0,info:"Number of agent executions",change:o!=null&&o.agentRuns?{value:Math.abs(o.agentRuns.changePercent),type:s(o.agentRuns.changePercent)}:void 0,view:{type:"chart",chart:{type:"line",title:"Agent Runs",data:l.chartData,dataKey:"agentRuns",color:"#0BA5EC",yAxisLabel:"Number of Agent Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}},table:{title:"Agent Runs",data:l.tableData,columns:[{key:"name",title:"Name",width:200,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"},{key:"tokens",title:"Tokens",width:100,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`}]}},controls:{dropdown:{label:"All Agents",options:l.controlOptions,defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}},{title:"Tool Runs",value:t.data.toolRuns.total,metricType:"toolRuns",icon:"wrench",info:`Code: ${t.data.toolRuns.codeTools}, Library: ${t.data.toolRuns.libraryTools}, Knowledge: ${t.data.toolRuns.knowledgeTools}, MCP: ${t.data.toolRuns.mcpTools}`,highlighted:!1,change:o!=null&&o.toolRuns?{value:Math.abs(o.toolRuns.changePercent.total),type:s(o.toolRuns.changePercent.total)}:void 0,view:{type:"chart",chart:{type:"line",title:"Tool Runs",data:d,yAxisLabel:"Number of Tool Runs",lines:[{dataKey:"toolRuns",color:"#667085",label:"Tool Runs"},{dataKey:"codeTools",color:"#F38744",label:"Code Tools"},{dataKey:"workflowTools",color:"#2970FF",label:"Workflow Tools"},{dataKey:"knowledgeTools",color:"#7A5AF8",label:"Knowledge"},{dataKey:"mcpTools",color:"#47CD89",label:"MCP Tools"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}},table:{title:"Tool Runs",data:u.tableData,columns:[{key:"name",title:"Name",width:200,align:"left"},{key:"type",title:"Type",width:150,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"}]}},controls:{dropdown:{label:"All Tools",options:u.controlOptions,defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}},{title:"Model Runs",value:t.data.modelRuns,metricType:"modelRuns",icon:"cpu",highlighted:!1,info:"Number of model inferences",change:o!=null&&o.modelRuns?{value:Math.abs(o.modelRuns.changePercent),type:s(o.modelRuns.changePercent)}:void 0,view:{type:"chart",chart:{type:"line",title:"Model Runs",data:c.chartData,dataKey:"modelRuns",color:"#47CD89",yAxisLabel:"Number of Model Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}},table:{title:"Model Runs",data:c.tableData,columns:[{key:"name",title:"Model Name",width:200,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`},{key:"tokens",title:"Tokens",width:120,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"}]}},controls:{dropdown:{label:"All Models",options:c.controlOptions,defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}}]}async transformUsageAnalyticsCardsWithEnhancedData(t,r,n,a,i=[]){const o=t.data.trends,s=d=>d>0?"increase":"decrease",[l,u,c,f]=await Promise.all([this.fetchTimeSeriesData("users","usage-analytics",r,n,a,i),this.fetchTimeSeriesData("sessions","usage-analytics",r,n,a,i),this.fetchTimeSeriesData("messages","usage-analytics",r,n,a,i),this.fetchTimeSeriesData("tokens","usage-analytics",r,n,a,i)]);return[{title:"Users",value:t.data.users,metricType:"users",icon:"users",highlighted:!0,info:"Total number of unique users",change:o!=null&&o.users?{value:Math.abs(o.users.changePercent),type:s(o.users.changePercent)}:void 0,view:{type:"chart",chart:{type:"line",title:"Total Users",data:this.transformTimeSeriesDataForMetric(l,"users"),dataKey:"users",color:"#4E5BA6",yAxisLabel:"Number of Users",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}}}},{title:"Sessions",value:t.data.sessions,metricType:"sessions",icon:"activity",highlighted:!1,info:"Total number of user sessions",change:o!=null&&o.sessions?{value:Math.abs(o.sessions.changePercent),type:s(o.sessions.changePercent)}:void 0,view:{type:"chart",chart:{type:"line",title:"Total Sessions",data:this.transformTimeSeriesDataForMetric(u,"sessions"),dataKey:"sessions",color:"#0BA5EC",yAxisLabel:"Number of Sessions",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}}}},{title:"Messages",value:t.data.messages.total,metricType:"messages",icon:"message-circle",info:`Input: ${t.data.messages.input}, Output: ${t.data.messages.output}`,highlighted:!1,change:o!=null&&o.messages?{value:Math.abs(o.messages.changePercent.total),type:s(o.messages.changePercent.total)}:void 0,view:{type:"chart",chart:{type:"line",title:"Total Messages",data:this.transformTimeSeriesDataForMetric(c,"messages"),dataKey:"messages",color:"#E478FA",yAxisLabel:"Number of Messages",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}}}},{title:"Tokens",value:t.data.tokens.total,metricType:"tokens",icon:"coins",info:`Input: ${t.data.tokens.input}, Output: ${t.data.tokens.output}`,highlighted:!1,change:o!=null&&o.tokens?{value:Math.abs(o.tokens.changePercent.total),type:s(o.tokens.changePercent.total)}:void 0,view:{type:"chart",chart:{type:"line",title:"Token Usage Breakdown",data:this.transformTimeSeriesDataForMetric(f,"tokens"),yAxisLabel:"Number of Tokens",lines:[{dataKey:"totalTokens",color:"#FF692E",label:"Total Tokens"},{dataKey:"inputTokens",color:"#5925DC",label:"Input Tokens"},{dataKey:"outputTokens",color:"#E478FA",label:"Output Tokens"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}}}}]}transformTimeSeriesDataForToolRuns(t){if(console.log("=== TOOL RUNS SPECIFIC TRANSFORM DEBUG ==="),console.log("Raw TimeSeriesResponse for tool runs:",JSON.stringify(t,null,2)),!t||!t.data||!Array.isArray(t.data))return console.error("Invalid time series data structure:",t),[];const r=t.data.map((n,a)=>{console.log(`Processing point ${a}:`,n);const i=new Date(n.timestamp),o=i.toISOString().split("T")[0],s=i.toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=n.count||0;let u=0,c=0,f=0,d=0;if(n.listView&&Array.isArray(n.listView)){n.listView.forEach(p=>{const v=p.count||0,g=(p.toolType||"").toLowerCase(),O=(p.toolName||"").toLowerCase();console.log("Processing listView item:",{toolType:g,toolName:O,count:v}),g==="tool"||g==="code"||g==="codetool"?u+=v:g==="workflow"||g==="workflowtool"||O.includes("workflow")?c+=v:g==="knowledge"||g==="knowledgetool"||O.includes("knowledge")||O.includes("search")||O.includes("fetch")?f+=v:g==="mcp"||g==="mcptool"||O.includes("mcp")?d+=v:(console.log(`Unknown tool type '${g}' for tool '${O}', defaulting to code tools`),u+=v)}),console.log(`Calculated breakdown for point ${a}:`,{codeTools:u,workflowTools:c,knowledgeTools:f,mcpTools:d,total:u+c+f+d,expectedTotal:l});const y=u+c+f+d;if(Math.abs(y-l)>1){console.warn(`Breakdown total (${y}) doesn't match expected total (${l}) for point ${a}`);const p=l-y;u+=p,console.log(`Adjusted codeTools by ${p} to balance total`)}}else console.log(`No listView data for point ${a}, assigning all ${l} to codeTools`),u=l;const h={date:o,timestamp:s,formattedDate:s,toolRuns:l,value:l,count:l,codeTools:u,workflowTools:c,knowledgeTools:f,mcpTools:d,input_tokens:n.input_tokens||0,output_tokens:n.output_tokens||0,total_tokens:(n.input_tokens||0)+(n.output_tokens||0),inputTokens:n.input_tokens||0,outputTokens:n.output_tokens||0,totalTokens:(n.input_tokens||0)+(n.output_tokens||0),listView:n.listView||[],index:a};return console.log(`Transformed tool runs point ${a}:`,h),h});return console.log("Final tool runs transformed data:",JSON.stringify(r,null,2)),console.log("=== END TOOL RUNS SPECIFIC TRANSFORM DEBUG ==="),r}async fetchAllCardsData(t,r,n=[]){try{const[a,i]=await Promise.all([this.fetchUsageAnalyticsCards(t,r,void 0,n),this.fetchRunsCards(t,r,void 0,n)]);return{usageAnalytics:this.transformUsageAnalyticsCards(a),runs:this.transformRunsCards(i)}}catch(a){throw console.error("Error fetching cards data:",a),a}}async fetchAllCardsDataWithEnhancedViews(t,r,n,a=[]){try{const[i,o]=await Promise.all([this.fetchUsageAnalyticsCards(t,r,n,a),this.fetchRunsCards(t,r,n,a)]),[s,l]=await Promise.all([this.transformUsageAnalyticsCardsWithEnhancedData(i,t,r,n,a),this.transformRunsCardsWithEnhancedData(o,t,r,n,a)]);return{usageAnalytics:s,runs:l}}catch(i){throw console.error("Error fetching enhanced cards data:",i),i}}async fetchDefaultTimeSeriesData(t,r,n,a=[]){try{const[i,o]=await Promise.all([this.fetchTimeSeriesData("sessions","usage-analytics",t,r,n,a),this.fetchTimeSeriesData("agent-runs","runs",t,r,n,a)]);return{sessions:this.transformTimeSeriesData(i),agentRuns:this.transformTimeSeriesData(o)}}catch(i){throw console.error("Error fetching default time series data:",i),i}}static getDateRange(t=30){const r=new Date,n=new Date;return n.setDate(r.getDate()-t),{fromTimestamp:n.toISOString(),toTimestamp:r.toISOString()}}static getTimeDimension(t,r){const n=new Date(t),a=new Date(r),i=new Date(n.getFullYear(),n.getMonth(),n.getDate()),o=new Date(a.getFullYear(),a.getMonth(),a.getDate()),s=o.getTime()-i.getTime(),l=s/(1e3*60*60*24),u=i.toISOString().split("T")[0],c=o.toISOString().split("T")[0],f=u===c,d=new Date(n.getFullYear(),n.getMonth(),n.getDate()),h=f&&Math.abs(n.getTime()-d.getTime())<1e3,y=Math.abs(a.getTime()-n.getTime()),p=y<60*1e3;return console.log("🕐 TimeDimension calculation:",{fromTimestamp:t,toTimestamp:r,fromDateStr:u,toDateStr:c,diffInMs:s,diffInDays:l,isSameCalendarDay:f,isTodayPattern:h,timeDiffInMs:y,isVeryClose:p,fromStartOfDay:d.toISOString(),recommended:f||h||p||l<=1?"hour":l<=31?"day":l<=90?"week":"month"}),f||h||p||l<=1?"hour":"day"}getAvailableMetrics(){return{"usage-analytics":["sessions","messages","users","tokens"],runs:["agent-runs","model-runs","tool-runs"]}}}const xU=({config:e,appConfig:t,className:r,onExport:n,onDraftChange:a,onTimeRangeChange:i})=>{var B;const{title:o,subtitle:s,sections:l,globalControls:u,layout:c={columns:12,gap:24,responsive:!0}}=e,[f,d]=S.useState(!1),[h,y]=S.useState({}),[p,v]=S.useState(l),[g,O]=S.useState([]),[x,A]=S.useState(!1),m=S.useRef(null);S.useEffect(()=>{if(t)try{m.current=new lr(t),w(),T()}catch(M){console.error("Failed to initialize API service:",M)}},[t]);const w=async()=>{if(!(!m.current||!t)){A(!0);try{const M=await m.current.fetchEnvironments();O(M),console.log("🌍 Environments loaded:",M.map(E=>E.envName))}catch(M){console.error("Error loading environments:",M)}finally{A(!1)}}},T=async()=>{if(!(!m.current||!t)){d(!0);try{const M=m.current.getDefaultTimeRange();console.log("📊 Loading dashboard data with date range:",{fromTimestamp:M.fromTimestamp,toTimestamp:M.toTimestamp,fromDate:new Date(M.fromTimestamp).toLocaleDateString(),toDate:new Date(M.toTimestamp).toLocaleDateString()});const E=await m.current.fetchAllCardsDataWithEnhancedViews(M.fromTimestamp,M.toTimestamp);console.log("✅ Enhanced cards data loaded successfully:",E),console.log("📈 Data covers period:",{from:new Date(M.fromTimestamp).toLocaleDateString(),to:new Date(M.toTimestamp).toLocaleDateString()});const F=l.map(U=>U.id==="usage-analytics"?(console.log("Updating usage-analytics section with enhanced data"),{...U,metrics:E.usageAnalytics}):U.id==="runs"?(console.log("Updating runs section with enhanced data including table and controls"),{...U,metrics:E.runs}):U);v(F)}catch(M){console.error("Error loading initial data:",M),v(l)}finally{d(!1)}}},_=async(M,E)=>{if(!(!m.current||!t||!E.metricType)){v(F=>F.map(U=>U.id===M?{...U,metrics:U.metrics.map(k=>({...k,highlighted:k.metricType===E.metricType}))}:U)),y(F=>({...F,[M]:!0}));try{const F=t.defaultTimeRange||lr.getDateRange(30);let U,k;if(["users","sessions","messages","tokens"].includes(E.metricType))U="usage-analytics",k=E.metricType;else if(["agentRuns","toolRuns","modelRuns"].includes(E.metricType))U="runs",k=E.metricType==="agentRuns"?"agent-runs":E.metricType==="toolRuns"?"tool-runs":"model-runs";else return;const N=await m.current.fetchTimeSeriesData(k,U,F.fromTimestamp,F.toTimestamp),I=m.current.transformTimeSeriesDataForMetric(N,E.metricType);console.log("Time series response for",E.title,":",N),console.log("Transformed data for",E.title,":",I),console.log("Metric type used for transformation:",E.metricType);const z=(V=>({users:"users",sessions:"sessions",messages:"messages",tokens:"totalTokens",agentRuns:"agentRuns",toolRuns:"toolRuns",modelRuns:"modelRuns"})[V]||"count")(E.metricType||"count");console.log("Using dataKey for metric",E.metricType,":",z),v(V=>V.map(Z=>{if(Z.id===M){const Q={...Z,view:{...Z.view,chart:Z.view.chart?{...Z.view.chart,data:I,dataKey:z,lines:[{dataKey:z,color:Z.view.chart.color||"#3b82f6",label:E.title,strokeWidth:2}]}:{type:"line",data:I,dataKey:z,lines:[{dataKey:z,color:"#3b82f6",label:E.title,strokeWidth:2}],yAxisLabel:E.title}}};return console.log("Updated section for",M,":",Q),console.log("Chart config set:",Q.view.chart),Q}return Z}))}catch(F){console.error("Error loading metric data:",F)}finally{y(F=>({...F,[M]:!1}))}}},$=M=>{var E,F;if((F=(E=u==null?void 0:u.draft)==null?void 0:E.onChange)==null||F.call(E,M),a==null||a(M),t&&m.current){const U={...t,environment:M};m.current.updateConfig(U),T()}},R=M=>{var E,F;if(console.log("🗓️ Time range change requested:",M),typeof M=="string"&&((F=(E=u==null?void 0:u.timeRange)==null?void 0:E.onChange)==null||F.call(E,M)),i==null||i(M),t&&m.current){let U=null;if(typeof M=="object"&&M.from&&M.to)U={fromTimestamp:M.from.toISOString(),toTimestamp:M.to.toISOString()},console.log("📅 Converting DateRange to API format:",U);else if(typeof M=="string"){const N={"24h":1,"7d":7,"30d":30,"90d":90}[M];N&&(U=lr.getDateRange(N),console.log(`📅 Converting preset "${M}" (${N} days) to API format:`,U))}if(U){const k={...t,defaultTimeRange:U};console.log("🔄 Updating API configuration with new date range:",k.defaultTimeRange),m.current.updateConfig(k),console.log("🚀 Reloading dashboard data with new date range..."),T()}else console.warn("⚠️ Unable to convert time range value to API format:",M)}},P=(M="csv")=>{var E,F;(F=(E=u==null?void 0:u.export)==null?void 0:E.onExport)==null||F.call(E,M),n==null||n()},j=()=>{t&&m.current&&T()},L=Object.values(h).some(M=>M);return b.jsxs("div",{className:ce("mx-auto p-6",r),children:[b.jsx("div",{className:"mb-8",children:b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{children:[b.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:o}),s&&b.jsx("p",{className:"text-gray-600 mt-2",children:s})]}),b.jsxs("div",{className:"flex items-center gap-3",children:[t&&b.jsxs(Cs,{variant:"outline",onClick:j,disabled:f||L,className:"gap-2",children:[b.jsx(V8,{className:ce("h-4 w-4",(f||L)&&"animate-spin")}),"Refresh"]}),u&&b.jsxs(b.Fragment,{children:[u.draft&&b.jsx(nf,{options:g.length>0?g.map(M=>({label:M.envName.charAt(0).toUpperCase()+M.envName.slice(1),value:M.envName})):u.draft.options,value:u.draft.defaultValue,placeholder:x?"Loading environments...":u.draft.label,onChange:$,className:"min-w-[200px]",disabled:f||L||x}),u.timeRange&&(u.timeRange.useDatePicker?(console.log("🗓️ Dashboard: Rendering DateRangePicker with defaultValue:",u.timeRange.defaultValue),b.jsx(gU,{defaultValue:u.timeRange.defaultValue,onDateRangeChange:M=>{console.log("🗓️ Dashboard: DateRangePicker callback received:",M),M&&R(M)}})):b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(sb,{className:"h-4 w-4 text-gray-500"}),b.jsx(nf,{options:u.timeRange.options||[],value:u.timeRange.defaultValue,placeholder:u.timeRange.label,onChange:R,className:"min-w-[200px]",disabled:f||L})]})),((B=u.export)==null?void 0:B.enabled)&&b.jsxs(Cs,{variant:"outline",onClick:()=>P(),className:"gap-2",disabled:f||L,children:[b.jsx(q8,{className:"h-4 w-4"}),"Export"]})]})]})]})}),b.jsx("div",{className:ce("grid gap-6",c.responsive&&"grid-cols-1 lg:grid-cols-12"),style:{gridTemplateColumns:c.responsive?void 0:`repeat(${c.columns}, minmax(0, 1fr))`,gap:c.gap?`${c.gap}px`:void 0},children:p.map(M=>{var E,F,U,k;return b.jsx(mb,{section:M,isLoading:f,isChartLoading:h[M.id]||!1,onMetricClick:N=>_(M.id,N),className:ce(c.responsive&&((E=M.layout)==null?void 0:E.span)===12&&"lg:col-span-12",c.responsive&&((F=M.layout)==null?void 0:F.span)===6&&"lg:col-span-6",c.responsive&&((U=M.layout)==null?void 0:U.span)===4&&"lg:col-span-4",c.responsive&&((k=M.layout)==null?void 0:k.span)===3&&"lg:col-span-3")},M.id)})})]})};new Date(Date.now()-30*24*60*60*1e3).toISOString(),new Date().toISOString();const wU={id:"agentic-analytics-dashboard",title:"Dashboard",subtitle:"Monitor and review the usage of your agentic app.",sections:[{id:"usage-analytics",title:"Sessions",metrics:[{title:"Users",value:0,metricType:"users",highlighted:!0},{title:"Sessions",value:0,metricType:"sessions",highlighted:!1},{title:"Messages",value:0,metricType:"messages",highlighted:!1},{title:"Tokens",value:0,metricType:"tokens",highlighted:!1}],view:{type:"chart",chart:{type:"line",title:"Usage Over Time",data:[],lines:[{dataKey:"count",color:"#3B82F6",label:"Count",strokeWidth:2}],xAxisLabel:"Date",yAxisLabel:"Count",tooltip:{show:!0,formatter:(e,t)=>[`${e}`,t]}}},layout:{span:12}},{id:"runs",title:"Runs",metrics:[{title:"Agent Runs",value:0,metricType:"agentRuns",highlighted:!0},{title:"Tool Runs",value:0,metricType:"toolRuns",highlighted:!1},{title:"Model Runs",value:0,metricType:"modelRuns",highlighted:!1}],view:{type:"chart",chart:{type:"line",title:"Execution Runs Over Time",data:[],lines:[{dataKey:"count",color:"#10B981",label:"Runs",strokeWidth:2}],xAxisLabel:"Date",yAxisLabel:"Count",tooltip:{show:!0,formatter:(e,t)=>[`${e}`,t]}}},layout:{span:12}}],globalControls:{draft:{label:"Environment",options:[{label:"Draft",value:"draft"},{label:"Production",value:"production"},{label:"Staging",value:"staging"}],defaultValue:"draft"},timeRange:{label:"Time Range",useDatePicker:!0,options:[{label:"Last 7 days",value:"7d"},{label:"Last 30 days",value:"30d"},{label:"Last 90 days",value:"90d"}],defaultValue:"30d"},export:{enabled:!1,formats:["csv","json"],onExport:e=>{console.log(`Exporting in ${e} format`)}}},layout:{columns:12,gap:24,responsive:!0}},xi=["Portfolio Analysis Expert","Mortgage Evaluator","Credit Risk Specialist","Asset Valuation Analyst","Liability Assessment Advisor"],wi=["calculate-creditScore","calculate-risk","calculate-mortgage","analyse-expenses","fetch-statement"],Oi=["gpt-4o","gpt-4o-mini","gpt-3.5-turbo","claude-3-5-sonnet","claude-3-5-haiku","claude-3-opus","gemini-1.5-pro","gemini-1.5-flash","llama-3.1-405b","llama-3.1-70b"],OU=(e=30)=>{const t=[],r=new Date;for(let n=e-1;n>=0;n--){const a=new Date(r);a.setDate(r.getDate()-n);const i=600+Math.sin(n*.1)*100,o=Math.floor(i+Math.random()*100),s=Math.floor(o*3.5+Math.random()*200),l=Math.floor(s*2.9+Math.random()*500),u=Math.floor(l*.9+Math.random()*300),c=Math.floor(u*.6),f=u-c,d=Math.floor(s*.8+Math.random()*100),h=Math.floor(d*12+Math.random()*500),y=Math.floor(d*8+Math.random()*300),p=Math.floor(h*.3+Math.random()*100),v=Math.floor(h*.25+Math.random()*80),g=Math.floor(h*.2+Math.random()*60),O=Math.floor(h*.15+Math.random()*50),x={};xi.forEach(w=>{const T=w.replace(/\s+/g,"").toLowerCase(),_=Math.floor(d/xi.length);x[T]=Math.floor(_+Math.random()*(_*.5))});const A={};wi.forEach(w=>{const T=w.replace(/[-]/g,""),_=Math.floor(h/wi.length);A[T]=Math.floor(_+Math.random()*(_*.8))});const m={};Oi.forEach(w=>{const T=w.replace(/[-\.]/g,""),_=Math.floor(y/Oi.length);m[T]=Math.floor(_+Math.random()*(_*.6))}),t.push({date:a.toISOString().split("T")[0],users:o,sessions:s,messages:l,totalTokens:u,inputTokens:c,outputTokens:f,agentRuns:d,toolRuns:h,modelRuns:y,codeTools:p,workflowTools:v,knowledgeTools:g,mcpTools:O,...x,...A,...m,value:o})}return t},SU=()=>{const e=[],t=['{"name":"avatar14","color":"#F6D0FE","type":"human"}','{"name":"avatar2","color":"#3B82F6","type":"human"}','{"name":"avatar7","color":"#EF4444","type":"human"}','{"name":"avatar12","color":"#10B981","type":"human"}','{"name":"avatar8","color":"#F59E0B","type":"human"}'];return xi.forEach((r,n)=>{e.push({id:`agent-${n+1}`,name:r,runs:Math.floor(Math.random()*8e3)+4e3,responseTime:`${Math.floor(Math.random()*120)+15}s`,tokens:Math.floor(Math.random()*4e5)+1e5,successRate:`${Math.floor(Math.random()*20)+80}%`,lastRun:new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),avatar:`https://api.dicebear.com/7.x/avataaars/svg?seed=${r.replace(/\s+/g,"")}&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid`,icon:t[n]||t[0]})}),e},AU=()=>{const e=r=>r.includes("calculate-creditscore")?"Code Tool":r.includes("calculate-risk")?"Workflow Tool":r.includes("calculate-mortgage")?"MCP Tool":r.includes("analyse-expenses")?"Workflow Tool":r.includes("fetch-statement")?"Knowledge":"Code Tool",t=['{"name":"calculator","color":"#EF6820","type":"inlineTool"}','{"name":"workflow","color":"#155EEF","type":"toolLibrary"}','{"name":"mcptool","color":"#101828","type":"MCP"}','{"name":"expenses","color":"#155EEF","type":"toolLibrary"}','{"name":"knowledge","color":"#7A5AF8","type":"KNOWLEDGE"}'];return wi.map((r,n)=>({id:`tool-${n+1}`,name:r,type:e(r),runs:Math.floor(Math.random()*8e3)+4e3,responseTime:`${Math.floor(Math.random()*90)+15}s`,tokens:Math.floor(Math.random()*2e4)+5e3,successRate:`${Math.floor(Math.random()*15)+85}%`,lastRun:new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),icon:t[n]||t[0]}))},TU=()=>Oi.map((e,t)=>({id:`model-${t+1}`,name:e,runs:Math.floor(Math.random()*8e3)+4e3,responseTime:`${Math.floor(Math.random()*120)+15}s`,tokens:Math.floor(Math.random()*5e5)+1e5,successRate:`${Math.floor(Math.random()*15)+85}%`,lastRun:new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString()})),Xr=OU(),PU=SU(),_U=AU(),EU=TU(),jU={id:"main-dashboard",title:"Dashboard",subtitle:"Monitor and review the usage of your agentic app.",version:"1.0.0",globalControls:{draft:{label:"Draft",options:[{label:"Current Draft",value:"current"},{label:"Previous Draft",value:"previous"},{label:"All Drafts",value:"all"}],defaultValue:"current"},timeRange:{label:"Time Range",options:[{label:"This month",value:"month"},{label:"Last 7 days",value:"week"},{label:"Last 30 days",value:"30days"},{label:"Last 90 days",value:"90days"}],defaultValue:"month"},export:{enabled:!0,formats:["csv","json","pdf"]}},layout:{columns:12,gap:24,responsive:!0},sections:[{id:"sessions",title:"Sessions",description:"User engagement and session analytics",metrics:[{title:"Users",value:3384,change:{value:6,type:"increase"},info:"Total number of unique users",metricType:"users",view:{type:"chart",chart:{type:"line",title:"Total Users",data:Xr,dataKey:"users",color:"#8b5cf6",yAxisLabel:"Number of Users",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}}},{title:"Sessions",value:11847,change:{value:18,type:"increase"},info:"Total number of user sessions",metricType:"sessions",view:{type:"chart",chart:{type:"line",title:"Total Sessions",data:Xr,dataKey:"sessions",color:"#06b6d4",yAxisLabel:"Number of Sessions",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}}},{title:"Messages",value:34563,change:{value:5,type:"increase"},info:"Total messages exchanged",metricType:"messages",view:{type:"chart",chart:{type:"line",title:"Total Messages",data:Xr,dataKey:"messages",color:"#e879f9",yAxisLabel:"Number of Messages",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}}},{title:"Tokens",value:32044,change:{value:44,type:"increase"},info:"Total tokens processed",metricType:"tokens",view:{type:"chart",chart:{type:"line",title:"Token Usage Breakdown",data:Xr,yAxisLabel:"Number of Tokens",lines:[{dataKey:"totalTokens",color:"#f97316",label:"Total Tokens"},{dataKey:"inputTokens",color:"#3b82f6",label:"Input Tokens"},{dataKey:"outputTokens",color:"#e879f9",label:"Output Tokens"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}}}],view:{type:"chart"},layout:{span:12,order:1}},{id:"runs",title:"Runs",description:"Agent, tool, and model execution analytics",metrics:[{title:"Agent Runs",value:3384,change:{value:6,type:"increase"},info:"Number of agent executions",metricType:"agentRuns",view:{type:"chart",chart:{type:"line",title:"Agent Runs",data:Xr,dataKey:"agentRuns",color:"#06b6d4",yAxisLabel:"Number of Agent Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}},table:{title:"Agent Runs",data:PU,columns:[{key:"name",title:"Name",width:200,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"},{key:"tokens",title:"Tokens",width:100,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`}]}},controls:{dropdown:{label:"All Agents",options:[{label:"All Agents",value:"all"},...xi.map(e=>({label:e,value:e.replace(/\s+/g,"").toLowerCase(),avatar:`https://api.dicebear.com/7.x/avataaars/svg?seed=${e.replace(/\s+/g,"")}&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid`}))],defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}},{title:"Tool Runs",value:34563,change:{value:5,type:"increase"},info:"Number of tool executions",metricType:"toolRuns",view:{type:"chart",chart:{type:"line",title:"Tool Runs",data:Xr,yAxisLabel:"Number of Tool Runs",lines:[{dataKey:"toolRuns",color:"#06b6d4",label:"Tool Runs"},{dataKey:"codeTools",color:"#f97316",label:"Code Tools"},{dataKey:"workflowTools",color:"#10b981",label:"Workflow Tools"},{dataKey:"knowledgeTools",color:"#8b5cf6",label:"Knowledge"},{dataKey:"mcpTools",color:"#ef4444",label:"MCP Tools"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}},table:{title:"Tool Runs",data:_U,columns:[{key:"name",title:"Name",width:200,align:"left"},{key:"type",title:"Type",width:150,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"}]}},controls:{dropdown:{label:"All Tools",options:[{label:"All Tools",value:"all"},...wi.map((e,t)=>{const r=['{"name":"calculator","color":"#EF6820","type":"inlineTool"}','{"name":"workflow","color":"#155EEF","type":"toolLibrary"}','{"name":"mcptool","color":"#101828","type":"MCP"}','{"name":"expenses","color":"#155EEF","type":"toolLibrary"}','{"name":"knowledge","color":"#7A5AF8","type":"KNOWLEDGE"}'],n=a=>a.includes("calculate-creditscore")?"Code Tool":a.includes("calculate-risk")?"Workflow Tool":a.includes("calculate-mortgage")?"MCP Tool":a.includes("analyse-expenses")?"Workflow Tool":a.includes("fetch-statement")?"Knowledge":"Code Tool";return{label:e,value:e.replace(/[-]/g,""),icon:r[t]||r[0],type:n(e)}})],defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}},{title:"Model Runs",value:32044,change:{value:44,type:"increase"},info:"Number of model inferences",metricType:"modelRuns",view:{type:"chart",chart:{type:"line",title:"Model Runs",data:Xr,dataKey:"modelRuns",color:"#10b981",yAxisLabel:"Number of Model Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}},table:{title:"Model Runs",data:EU,columns:[{key:"name",title:"Model Name",width:200,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`},{key:"tokens",title:"Tokens",width:120,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"}]}},controls:{dropdown:{label:"All Models",options:[{label:"All Models",value:"all"},...Oi.map(e=>{const t=r=>{const n=r.toLowerCase();return n.includes("gpt")||n.includes("openai")?"⚡":n.includes("claude")||n.includes("anthropic")?"A":n.includes("gemini")||n.includes("google")?"G":n.includes("llama")||n.includes("meta")?"M":"🤖"};return{label:e,value:e.replace(/[-\.]/g,""),icon:t(e)}})],defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}}],view:{type:"chart"},layout:{span:12,order:2}}]};me.AGENTS_LIST=xi,me.AgentListView=hb,me.AnalyticsChart=ob,me.AnalyticsTable=cb,me.ApiInvokerService=_b,me.Button=Cs,me.Dashboard=xU,me.DashboardApiService=lr,me.DashboardSection=mb,me.IconPreview=$s,me.MODELS_LIST=Oi,me.ModelListView=vb,me.MultiSelect=yb,me.TOOLS_LIST=wi,me.ToolListView=pb,me.apiEnabledDashboardConfig=wU,me.createFallbackIcon=db,me.parseIconData=fb,me.sampleDashboardConfig=jU,Object.defineProperty(me,Symbol.toStringTag,{value:"Module"})});
|