agentic-ui-libs 0.1.8 → 0.2.0-beta.1

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.
Files changed (100) hide show
  1. package/dist/assets/style.css +1 -1
  2. package/dist/data/apiDashboardConfig.d.ts +1 -1
  3. package/dist/data/apiDashboardConfig.d.ts.map +1 -1
  4. package/dist/data/colorPalettes.d.ts +1 -1
  5. package/dist/data/colorPalettes.d.ts.map +1 -1
  6. package/dist/data/enhancedSampleData.d.ts +1 -1
  7. package/dist/data/enhancedSampleData.d.ts.map +1 -1
  8. package/dist/data/executionEventsSample.d.ts +632 -0
  9. package/dist/data/executionEventsSample.d.ts.map +1 -0
  10. package/dist/data/sampleData.d.ts +1 -1
  11. package/dist/data/sampleData.d.ts.map +1 -1
  12. package/dist/{components → features/dashboard}/AgentListView.d.ts +1 -1
  13. package/dist/features/dashboard/AgentListView.d.ts.map +1 -0
  14. package/dist/{components → features/dashboard}/AnalyticsChart.d.ts +1 -1
  15. package/dist/features/dashboard/AnalyticsChart.d.ts.map +1 -0
  16. package/dist/{components → features/dashboard}/AnalyticsTable.d.ts +1 -1
  17. package/dist/features/dashboard/AnalyticsTable.d.ts.map +1 -0
  18. package/dist/{components → features/dashboard}/Dashboard.d.ts +1 -1
  19. package/dist/features/dashboard/Dashboard.d.ts.map +1 -0
  20. package/dist/{components → features/dashboard}/DashboardSection.d.ts +1 -1
  21. package/dist/features/dashboard/DashboardSection.d.ts.map +1 -0
  22. package/dist/{components → features/dashboard}/MetricCard.d.ts +1 -1
  23. package/dist/features/dashboard/MetricCard.d.ts.map +1 -0
  24. package/dist/{components → features/dashboard}/ModelListView.d.ts +1 -1
  25. package/dist/features/dashboard/ModelListView.d.ts.map +1 -0
  26. package/dist/features/dashboard/RunsSlider.d.ts.map +1 -0
  27. package/dist/{components → features/dashboard}/SectionControls.d.ts +1 -1
  28. package/dist/features/dashboard/SectionControls.d.ts.map +1 -0
  29. package/dist/{components → features/dashboard}/ToolListView.d.ts +1 -1
  30. package/dist/features/dashboard/ToolListView.d.ts.map +1 -0
  31. package/dist/{components → features/dashboard}/ViewRenderer.d.ts +1 -1
  32. package/dist/features/dashboard/ViewRenderer.d.ts.map +1 -0
  33. package/dist/features/dashboard/index.d.ts +13 -0
  34. package/dist/features/dashboard/index.d.ts.map +1 -0
  35. package/dist/features/debug-logs/DebugPanel.d.ts +4 -0
  36. package/dist/features/debug-logs/DebugPanel.d.ts.map +1 -0
  37. package/dist/features/debug-logs/components/DebugCard.d.ts +11 -0
  38. package/dist/features/debug-logs/components/DebugCard.d.ts.map +1 -0
  39. package/dist/features/debug-logs/index.d.ts +4 -0
  40. package/dist/features/debug-logs/index.d.ts.map +1 -0
  41. package/dist/features/debug-logs/services/TreeBuilder.d.ts +63 -0
  42. package/dist/features/debug-logs/services/TreeBuilder.d.ts.map +1 -0
  43. package/dist/features/debug-logs/types.d.ts +96 -0
  44. package/dist/features/debug-logs/types.d.ts.map +1 -0
  45. package/dist/index.d.ts +18 -17
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.js +8888 -7964
  48. package/dist/lib/api-invoker.service.d.ts +1 -1
  49. package/dist/lib/api-invoker.service.d.ts.map +1 -1
  50. package/dist/lib/dashboard-api.service.d.ts +1 -1
  51. package/dist/lib/dashboard-api.service.d.ts.map +1 -1
  52. package/dist/shared/index.d.ts +3 -0
  53. package/dist/shared/index.d.ts.map +1 -0
  54. package/dist/shared/types/index.d.ts.map +1 -0
  55. package/dist/shared/ui/Avatar.d.ts +13 -0
  56. package/dist/shared/ui/Avatar.d.ts.map +1 -0
  57. package/dist/{components → shared}/ui/Button.d.ts +1 -1
  58. package/dist/shared/ui/Button.d.ts.map +1 -0
  59. package/dist/shared/ui/Card.d.ts.map +1 -0
  60. package/dist/shared/ui/CodeEditor.d.ts +25 -0
  61. package/dist/shared/ui/CodeEditor.d.ts.map +1 -0
  62. package/dist/{components → shared}/ui/IconPreview.d.ts +1 -1
  63. package/dist/shared/ui/IconPreview.d.ts.map +1 -0
  64. package/dist/{components → shared}/ui/MultiSelect.d.ts +1 -1
  65. package/dist/shared/ui/MultiSelect.d.ts.map +1 -0
  66. package/dist/shared/ui/Portal.d.ts.map +1 -0
  67. package/dist/{components → shared}/ui/Select.d.ts +1 -1
  68. package/dist/shared/ui/Select.d.ts.map +1 -0
  69. package/dist/shared/ui/Skeleton.d.ts.map +1 -0
  70. package/dist/shared/ui/daterangepicker.d.ts.map +1 -0
  71. package/dist/shared/ui/index.d.ts +11 -0
  72. package/dist/shared/ui/index.d.ts.map +1 -0
  73. package/dist/ui-libs.umd.js +142 -81
  74. package/package.json +24 -6
  75. package/dist/components/AgentListView.d.ts.map +0 -1
  76. package/dist/components/AnalyticsChart.d.ts.map +0 -1
  77. package/dist/components/AnalyticsTable.d.ts.map +0 -1
  78. package/dist/components/Dashboard.d.ts.map +0 -1
  79. package/dist/components/DashboardSection.d.ts.map +0 -1
  80. package/dist/components/MetricCard.d.ts.map +0 -1
  81. package/dist/components/ModelListView.d.ts.map +0 -1
  82. package/dist/components/RunsSlider.d.ts.map +0 -1
  83. package/dist/components/SectionControls.d.ts.map +0 -1
  84. package/dist/components/ToolListView.d.ts.map +0 -1
  85. package/dist/components/ViewRenderer.d.ts.map +0 -1
  86. package/dist/components/ui/Button.d.ts.map +0 -1
  87. package/dist/components/ui/Card.d.ts.map +0 -1
  88. package/dist/components/ui/IconPreview.d.ts.map +0 -1
  89. package/dist/components/ui/MultiSelect.d.ts.map +0 -1
  90. package/dist/components/ui/Portal.d.ts.map +0 -1
  91. package/dist/components/ui/Select.d.ts.map +0 -1
  92. package/dist/components/ui/Skeleton.d.ts.map +0 -1
  93. package/dist/components/ui/daterangepicker.d.ts.map +0 -1
  94. package/dist/types/index.d.ts.map +0 -1
  95. /package/dist/{components → features/dashboard}/RunsSlider.d.ts +0 -0
  96. /package/dist/{types → shared/types}/index.d.ts +0 -0
  97. /package/dist/{components → shared}/ui/Card.d.ts +0 -0
  98. /package/dist/{components → shared}/ui/Portal.d.ts +0 -0
  99. /package/dist/{components → shared}/ui/Skeleton.d.ts +0 -0
  100. /package/dist/{components → shared}/ui/daterangepicker.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- (function(le,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],A):(le=typeof globalThis<"u"?globalThis:le||self,A(le.AgenticUILibs={},le.React,le.ReactDOM))})(this,function(le,A,Jr){"use strict";var vz=Object.defineProperty;var yz=(le,A,Jr)=>A in le?vz(le,A,{enumerable:!0,configurable:!0,writable:!0,value:Jr}):le[A]=Jr;var Bt=(le,A,Jr)=>yz(le,typeof A!="symbol"?A+"":A,Jr);function qb(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 xt=qb(A);var Ei=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ce(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bs={exports:{}},sa={};/**
1
+ (function(oe,T){typeof exports=="object"&&typeof module<"u"?T(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],T):(oe=typeof globalThis<"u"?globalThis:oe||self,T(oe.AgenticUILibs={},oe.React,oe.ReactDOM))})(this,function(oe,T,Jr){"use strict";var RW=Object.defineProperty;var BW=(oe,T,Jr)=>T in oe?RW(oe,T,{enumerable:!0,configurable:!0,writable:!0,value:Jr}):oe[T]=Jr;var Bt=(oe,T,Jr)=>BW(oe,typeof T!="symbol"?T+"":T,Jr);function c0(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 xt=c0(T);var Ci=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zs={exports:{}},la={};/**
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 hf;function Hb(){if(hf)return sa;hf=1;var e=A,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,p=null;u!==void 0&&(d=""+u),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(p=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:p,props:f,_owner:a.current}}return sa.Fragment=r,sa.jsx=o,sa.jsxs=o,sa}var la={};/**
9
+ */var gf;function f0(){if(gf)return la;gf=1;var e=T,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,p=null;u!==void 0&&(d=""+u),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(p=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:p,props:f,_owner:a.current}}return la.Fragment=r,la.jsx=o,la.jsxs=o,la}var ua={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,100 +14,160 @@
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 vf;function Yb(){return vf||(vf=1,process.env.NODE_ENV!=="production"&&function(){var e=A,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"),p=Symbol.for("react.offscreen"),v=Symbol.iterator,y="@@iterator";function h(N){if(N===null||typeof N!="object")return null;var H=v&&N[v]||N[y];return typeof H=="function"?H:null}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(N){{for(var H=arguments.length,re=new Array(H>1?H-1:0),ce=1;ce<H;ce++)re[ce-1]=arguments[ce];x("error",N,re)}}function x(N,H,re){{var ce=b.ReactDebugCurrentFrame,Pe=ce.getStackAddendum();Pe!==""&&(H+="%s",re=re.concat([Pe]));var $e=re.map(function(ge){return String(ge)});$e.unshift("Warning: "+H),Function.prototype.apply.call(console[N],console,$e)}}var T=!1,m=!1,w=!1,O=!1,P=!1,j;j=Symbol.for("react.module.reference");function M(N){return!!(typeof N=="string"||typeof N=="function"||N===n||N===i||P||N===a||N===u||N===c||O||N===p||T||m||w||typeof N=="object"&&N!==null&&(N.$$typeof===d||N.$$typeof===f||N.$$typeof===o||N.$$typeof===s||N.$$typeof===l||N.$$typeof===j||N.getModuleId!==void 0))}function _(N,H,re){var ce=N.displayName;if(ce)return ce;var Pe=H.displayName||H.name||"";return Pe!==""?re+"("+Pe+")":re}function $(N){return N.displayName||"Context"}function R(N){if(N==null)return null;if(typeof N.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof N=="function")return N.displayName||N.name||null;if(typeof N=="string")return N;switch(N){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 N=="object")switch(N.$$typeof){case s:var H=N;return $(H)+".Consumer";case o:var re=N;return $(re._context)+".Provider";case l:return _(N,N.render,"ForwardRef");case f:var ce=N.displayName||null;return ce!==null?ce:R(N.type)||"Memo";case d:{var Pe=N,$e=Pe._payload,ge=Pe._init;try{return R(ge($e))}catch{return null}}}return null}var k=Object.assign,D=0,C,B,U,G,E,L,F;function W(){}W.__reactDisabledLog=!0;function K(){{if(D===0){C=console.log,B=console.info,U=console.warn,G=console.error,E=console.group,L=console.groupCollapsed,F=console.groupEnd;var N={configurable:!0,enumerable:!0,value:W,writable:!0};Object.defineProperties(console,{info:N,log:N,warn:N,error:N,group:N,groupCollapsed:N,groupEnd:N})}D++}}function X(){{if(D--,D===0){var N={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:k({},N,{value:C}),info:k({},N,{value:B}),warn:k({},N,{value:U}),error:k({},N,{value:G}),group:k({},N,{value:E}),groupCollapsed:k({},N,{value:L}),groupEnd:k({},N,{value:F})})}D<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Q=b.ReactCurrentDispatcher,ae;function te(N,H,re){{if(ae===void 0)try{throw Error()}catch(Pe){var ce=Pe.stack.trim().match(/\n( *(at )?)/);ae=ce&&ce[1]||""}return`
18
- `+ae+N}}var V=!1,Y;{var J=typeof WeakMap=="function"?WeakMap:Map;Y=new J}function I(N,H){if(!N||V)return"";{var re=Y.get(N);if(re!==void 0)return re}var ce;V=!0;var Pe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var $e;$e=Q.current,Q.current=null,K();try{if(H){var ge=function(){throw Error()};if(Object.defineProperty(ge.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ge,[])}catch(vt){ce=vt}Reflect.construct(N,[],ge)}else{try{ge.call()}catch(vt){ce=vt}N.call(ge.prototype)}}else{try{throw Error()}catch(vt){ce=vt}N()}}catch(vt){if(vt&&ce&&typeof vt.stack=="string"){for(var me=vt.stack.split(`
19
- `),ut=ce.stack.split(`
20
- `),Ke=me.length-1,He=ut.length-1;Ke>=1&&He>=0&&me[Ke]!==ut[He];)He--;for(;Ke>=1&&He>=0;Ke--,He--)if(me[Ke]!==ut[He]){if(Ke!==1||He!==1)do if(Ke--,He--,He<0||me[Ke]!==ut[He]){var $t=`
21
- `+me[Ke].replace(" at new "," at ");return N.displayName&&$t.includes("<anonymous>")&&($t=$t.replace("<anonymous>",N.displayName)),typeof N=="function"&&Y.set(N,$t),$t}while(Ke>=1&&He>=0);break}}}finally{V=!1,Q.current=$e,X(),Error.prepareStackTrace=Pe}var oa=N?N.displayName||N.name:"",Zr=oa?te(oa):"";return typeof N=="function"&&Y.set(N,Zr),Zr}function ie(N,H,re){return I(N,!1)}function q(N){var H=N.prototype;return!!(H&&H.isReactComponent)}function se(N,H,re){if(N==null)return"";if(typeof N=="function")return I(N,q(N));if(typeof N=="string")return te(N);switch(N){case u:return te("Suspense");case c:return te("SuspenseList")}if(typeof N=="object")switch(N.$$typeof){case l:return ie(N.render);case f:return se(N.type,H,re);case d:{var ce=N,Pe=ce._payload,$e=ce._init;try{return se($e(Pe),H,re)}catch{}}}return""}var ee=Object.prototype.hasOwnProperty,ve={},We=b.ReactDebugCurrentFrame;function Re(N){if(N){var H=N._owner,re=se(N.type,N._source,H?H.type:null);We.setExtraStackFrame(re)}else We.setExtraStackFrame(null)}function Be(N,H,re,ce,Pe){{var $e=Function.call.bind(ee);for(var ge in N)if($e(N,ge)){var me=void 0;try{if(typeof N[ge]!="function"){var ut=Error((ce||"React class")+": "+re+" type `"+ge+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof N[ge]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ut.name="Invariant Violation",ut}me=N[ge](H,ge,ce,re,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ke){me=Ke}me&&!(me instanceof Error)&&(Re(Pe),S("%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).",ce||"React class",re,ge,typeof me),Re(null)),me instanceof Error&&!(me.message in ve)&&(ve[me.message]=!0,Re(Pe),S("Failed %s type: %s",re,me.message),Re(null))}}}var Ge=Array.isArray;function lt(N){return Ge(N)}function Ai(N){{var H=typeof Symbol=="function"&&Symbol.toStringTag,re=H&&N[Symbol.toStringTag]||N.constructor.name||"Object";return re}}function Ti(N){try{return aa(N),!1}catch{return!0}}function aa(N){return""+N}function Pi(N){if(Ti(N))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ai(N)),aa(N)}var _i=b.ReactCurrentOwner,ZU={key:!0,ref:!0,__self:!0,__source:!0},Rb,Bb;function JU(N){if(ee.call(N,"ref")){var H=Object.getOwnPropertyDescriptor(N,"ref").get;if(H&&H.isReactWarning)return!1}return N.ref!==void 0}function QU(N){if(ee.call(N,"key")){var H=Object.getOwnPropertyDescriptor(N,"key").get;if(H&&H.isReactWarning)return!1}return N.key!==void 0}function ez(N,H){typeof N.ref=="string"&&_i.current}function tz(N,H){{var re=function(){Rb||(Rb=!0,S("%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(N,"key",{get:re,configurable:!0})}}function rz(N,H){{var re=function(){Bb||(Bb=!0,S("%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(N,"ref",{get:re,configurable:!0})}}var nz=function(N,H,re,ce,Pe,$e,ge){var me={$$typeof:t,type:N,key:H,ref:re,props:ge,_owner:$e};return me._store={},Object.defineProperty(me._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(me,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ce}),Object.defineProperty(me,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Pe}),Object.freeze&&(Object.freeze(me.props),Object.freeze(me)),me};function az(N,H,re,ce,Pe){{var $e,ge={},me=null,ut=null;re!==void 0&&(Pi(re),me=""+re),QU(H)&&(Pi(H.key),me=""+H.key),JU(H)&&(ut=H.ref,ez(H,Pe));for($e in H)ee.call(H,$e)&&!ZU.hasOwnProperty($e)&&(ge[$e]=H[$e]);if(N&&N.defaultProps){var Ke=N.defaultProps;for($e in Ke)ge[$e]===void 0&&(ge[$e]=Ke[$e])}if(me||ut){var He=typeof N=="function"?N.displayName||N.name||"Unknown":N;me&&tz(ge,He),ut&&rz(ge,He)}return nz(N,me,ut,Pe,ce,_i.current,ge)}}var cf=b.ReactCurrentOwner,Fb=b.ReactDebugCurrentFrame;function ia(N){if(N){var H=N._owner,re=se(N.type,N._source,H?H.type:null);Fb.setExtraStackFrame(re)}else Fb.setExtraStackFrame(null)}var ff;ff=!1;function df(N){return typeof N=="object"&&N!==null&&N.$$typeof===t}function Wb(){{if(cf.current){var N=R(cf.current.type);if(N)return`
17
+ */var bf;function d0(){return bf||(bf=1,process.env.NODE_ENV!=="production"&&function(){var e=T,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"),p=Symbol.for("react.offscreen"),m=Symbol.iterator,y="@@iterator";function v(N){if(N===null||typeof N!="object")return null;var H=m&&N[m]||N[y];return typeof H=="function"?H:null}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(N){{for(var H=arguments.length,re=new Array(H>1?H-1:0),ce=1;ce<H;ce++)re[ce-1]=arguments[ce];x("error",N,re)}}function x(N,H,re){{var ce=b.ReactDebugCurrentFrame,Pe=ce.getStackAddendum();Pe!==""&&(H+="%s",re=re.concat([Pe]));var Ce=re.map(function(ge){return String(ge)});Ce.unshift("Warning: "+H),Function.prototype.apply.call(console[N],console,Ce)}}var A=!1,g=!1,O=!1,S=!1,j=!1,C;C=Symbol.for("react.module.reference");function M(N){return!!(typeof N=="string"||typeof N=="function"||N===n||N===i||j||N===a||N===u||N===c||S||N===p||A||g||O||typeof N=="object"&&N!==null&&(N.$$typeof===d||N.$$typeof===f||N.$$typeof===o||N.$$typeof===s||N.$$typeof===l||N.$$typeof===C||N.getModuleId!==void 0))}function P(N,H,re){var ce=N.displayName;if(ce)return ce;var Pe=H.displayName||H.name||"";return Pe!==""?re+"("+Pe+")":re}function _(N){return N.displayName||"Context"}function I(N){if(N==null)return null;if(typeof N.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof N=="function")return N.displayName||N.name||null;if(typeof N=="string")return N;switch(N){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 N=="object")switch(N.$$typeof){case s:var H=N;return _(H)+".Consumer";case o:var re=N;return _(re._context)+".Provider";case l:return P(N,N.render,"ForwardRef");case f:var ce=N.displayName||null;return ce!==null?ce:I(N.type)||"Memo";case d:{var Pe=N,Ce=Pe._payload,ge=Pe._init;try{return I(ge(Ce))}catch{return null}}}return null}var $=Object.assign,D=0,k,B,z,G,E,R,F;function W(){}W.__reactDisabledLog=!0;function V(){{if(D===0){k=console.log,B=console.info,z=console.warn,G=console.error,E=console.group,R=console.groupCollapsed,F=console.groupEnd;var N={configurable:!0,enumerable:!0,value:W,writable:!0};Object.defineProperties(console,{info:N,log:N,warn:N,error:N,group:N,groupCollapsed:N,groupEnd:N})}D++}}function X(){{if(D--,D===0){var N={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},N,{value:k}),info:$({},N,{value:B}),warn:$({},N,{value:z}),error:$({},N,{value:G}),group:$({},N,{value:E}),groupCollapsed:$({},N,{value:R}),groupEnd:$({},N,{value:F})})}D<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Q=b.ReactCurrentDispatcher,ae;function te(N,H,re){{if(ae===void 0)try{throw Error()}catch(Pe){var ce=Pe.stack.trim().match(/\n( *(at )?)/);ae=ce&&ce[1]||""}return`
18
+ `+ae+N}}var K=!1,Y;{var J=typeof WeakMap=="function"?WeakMap:Map;Y=new J}function L(N,H){if(!N||K)return"";{var re=Y.get(N);if(re!==void 0)return re}var ce;K=!0;var Pe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ce;Ce=Q.current,Q.current=null,V();try{if(H){var ge=function(){throw Error()};if(Object.defineProperty(ge.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ge,[])}catch(vt){ce=vt}Reflect.construct(N,[],ge)}else{try{ge.call()}catch(vt){ce=vt}N.call(ge.prototype)}}else{try{throw Error()}catch(vt){ce=vt}N()}}catch(vt){if(vt&&ce&&typeof vt.stack=="string"){for(var ye=vt.stack.split(`
19
+ `),ct=ce.stack.split(`
20
+ `),Ke=ye.length-1,Ye=ct.length-1;Ke>=1&&Ye>=0&&ye[Ke]!==ct[Ye];)Ye--;for(;Ke>=1&&Ye>=0;Ke--,Ye--)if(ye[Ke]!==ct[Ye]){if(Ke!==1||Ye!==1)do if(Ke--,Ye--,Ye<0||ye[Ke]!==ct[Ye]){var Ct=`
21
+ `+ye[Ke].replace(" at new "," at ");return N.displayName&&Ct.includes("<anonymous>")&&(Ct=Ct.replace("<anonymous>",N.displayName)),typeof N=="function"&&Y.set(N,Ct),Ct}while(Ke>=1&&Ye>=0);break}}}finally{K=!1,Q.current=Ce,X(),Error.prepareStackTrace=Pe}var sa=N?N.displayName||N.name:"",Zr=sa?te(sa):"";return typeof N=="function"&&Y.set(N,Zr),Zr}function ie(N,H,re){return L(N,!1)}function q(N){var H=N.prototype;return!!(H&&H.isReactComponent)}function ue(N,H,re){if(N==null)return"";if(typeof N=="function")return L(N,q(N));if(typeof N=="string")return te(N);switch(N){case u:return te("Suspense");case c:return te("SuspenseList")}if(typeof N=="object")switch(N.$$typeof){case l:return ie(N.render);case f:return ue(N.type,H,re);case d:{var ce=N,Pe=ce._payload,Ce=ce._init;try{return ue(Ce(Pe),H,re)}catch{}}}return""}var ee=Object.prototype.hasOwnProperty,ve={},ze=b.ReactDebugCurrentFrame;function Be(N){if(N){var H=N._owner,re=ue(N.type,N._source,H?H.type:null);ze.setExtraStackFrame(re)}else ze.setExtraStackFrame(null)}function Fe(N,H,re,ce,Pe){{var Ce=Function.call.bind(ee);for(var ge in N)if(Ce(N,ge)){var ye=void 0;try{if(typeof N[ge]!="function"){var ct=Error((ce||"React class")+": "+re+" type `"+ge+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof N[ge]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ct.name="Invariant Violation",ct}ye=N[ge](H,ge,ce,re,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ke){ye=Ke}ye&&!(ye instanceof Error)&&(Be(Pe),w("%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).",ce||"React class",re,ge,typeof ye),Be(null)),ye instanceof Error&&!(ye.message in ve)&&(ve[ye.message]=!0,Be(Pe),w("Failed %s type: %s",re,ye.message),Be(null))}}}var Ve=Array.isArray;function ut(N){return Ve(N)}function Pi(N){{var H=typeof Symbol=="function"&&Symbol.toStringTag,re=H&&N[Symbol.toStringTag]||N.constructor.name||"Object";return re}}function ji(N){try{return ia(N),!1}catch{return!0}}function ia(N){return""+N}function _i(N){if(ji(N))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Pi(N)),ia(N)}var Ei=b.ReactCurrentOwner,xW={key:!0,ref:!0,__self:!0,__source:!0},t0,r0;function wW(N){if(ee.call(N,"ref")){var H=Object.getOwnPropertyDescriptor(N,"ref").get;if(H&&H.isReactWarning)return!1}return N.ref!==void 0}function OW(N){if(ee.call(N,"key")){var H=Object.getOwnPropertyDescriptor(N,"key").get;if(H&&H.isReactWarning)return!1}return N.key!==void 0}function SW(N,H){typeof N.ref=="string"&&Ei.current}function TW(N,H){{var re=function(){t0||(t0=!0,w("%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(N,"key",{get:re,configurable:!0})}}function AW(N,H){{var re=function(){r0||(r0=!0,w("%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(N,"ref",{get:re,configurable:!0})}}var PW=function(N,H,re,ce,Pe,Ce,ge){var ye={$$typeof:t,type:N,key:H,ref:re,props:ge,_owner:Ce};return ye._store={},Object.defineProperty(ye._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ye,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ce}),Object.defineProperty(ye,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Pe}),Object.freeze&&(Object.freeze(ye.props),Object.freeze(ye)),ye};function jW(N,H,re,ce,Pe){{var Ce,ge={},ye=null,ct=null;re!==void 0&&(_i(re),ye=""+re),OW(H)&&(_i(H.key),ye=""+H.key),wW(H)&&(ct=H.ref,SW(H,Pe));for(Ce in H)ee.call(H,Ce)&&!xW.hasOwnProperty(Ce)&&(ge[Ce]=H[Ce]);if(N&&N.defaultProps){var Ke=N.defaultProps;for(Ce in Ke)ge[Ce]===void 0&&(ge[Ce]=Ke[Ce])}if(ye||ct){var Ye=typeof N=="function"?N.displayName||N.name||"Unknown":N;ye&&TW(ge,Ye),ct&&AW(ge,Ye)}return PW(N,ye,ct,Pe,ce,Ei.current,ge)}}var hf=b.ReactCurrentOwner,n0=b.ReactDebugCurrentFrame;function oa(N){if(N){var H=N._owner,re=ue(N.type,N._source,H?H.type:null);n0.setExtraStackFrame(re)}else n0.setExtraStackFrame(null)}var vf;vf=!1;function mf(N){return typeof N=="object"&&N!==null&&N.$$typeof===t}function a0(){{if(hf.current){var N=I(hf.current.type);if(N)return`
22
22
 
23
- Check the render method of \``+N+"`."}return""}}function iz(N){return""}var Ub={};function oz(N){{var H=Wb();if(!H){var re=typeof N=="string"?N:N.displayName||N.name;re&&(H=`
23
+ Check the render method of \``+N+"`."}return""}}function _W(N){return""}var i0={};function EW(N){{var H=a0();if(!H){var re=typeof N=="string"?N:N.displayName||N.name;re&&(H=`
24
24
 
25
- Check the top-level render call using <`+re+">.")}return H}}function zb(N,H){{if(!N._store||N._store.validated||N.key!=null)return;N._store.validated=!0;var re=oz(H);if(Ub[re])return;Ub[re]=!0;var ce="";N&&N._owner&&N._owner!==cf.current&&(ce=" It was passed a child from "+R(N._owner.type)+"."),ia(N),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',re,ce),ia(null)}}function Gb(N,H){{if(typeof N!="object")return;if(lt(N))for(var re=0;re<N.length;re++){var ce=N[re];df(ce)&&zb(ce,H)}else if(df(N))N._store&&(N._store.validated=!0);else if(N){var Pe=h(N);if(typeof Pe=="function"&&Pe!==N.entries)for(var $e=Pe.call(N),ge;!(ge=$e.next()).done;)df(ge.value)&&zb(ge.value,H)}}}function sz(N){{var H=N.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 ce=R(H);Be(re,N.props,"prop",ce,N)}else if(H.PropTypes!==void 0&&!ff){ff=!0;var Pe=R(H);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Pe||"Unknown")}typeof H.getDefaultProps=="function"&&!H.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function lz(N){{for(var H=Object.keys(N.props),re=0;re<H.length;re++){var ce=H[re];if(ce!=="children"&&ce!=="key"){ia(N),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ce),ia(null);break}}N.ref!==null&&(ia(N),S("Invalid attribute `ref` supplied to `React.Fragment`."),ia(null))}}var Kb={};function Vb(N,H,re,ce,Pe,$e){{var ge=M(N);if(!ge){var me="";(N===void 0||typeof N=="object"&&N!==null&&Object.keys(N).length===0)&&(me+=" 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 ut=iz();ut?me+=ut:me+=Wb();var Ke;N===null?Ke="null":lt(N)?Ke="array":N!==void 0&&N.$$typeof===t?(Ke="<"+(R(N.type)||"Unknown")+" />",me=" Did you accidentally export a JSX literal instead of a component?"):Ke=typeof N,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ke,me)}var He=az(N,H,re,Pe,$e);if(He==null)return He;if(ge){var $t=H.children;if($t!==void 0)if(ce)if(lt($t)){for(var oa=0;oa<$t.length;oa++)Gb($t[oa],N);Object.freeze&&Object.freeze($t)}else S("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 Gb($t,N)}if(ee.call(H,"key")){var Zr=R(N),vt=Object.keys(H).filter(function(hz){return hz!=="key"}),pf=vt.length>0?"{key: someKey, "+vt.join(": ..., ")+": ...}":"{key: someKey}";if(!Kb[Zr+pf]){var pz=vt.length>0?"{"+vt.join(": ..., ")+": ...}":"{}";S(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+re+">.")}return H}}function o0(N,H){{if(!N._store||N._store.validated||N.key!=null)return;N._store.validated=!0;var re=EW(H);if(i0[re])return;i0[re]=!0;var ce="";N&&N._owner&&N._owner!==hf.current&&(ce=" It was passed a child from "+I(N._owner.type)+"."),oa(N),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',re,ce),oa(null)}}function s0(N,H){{if(typeof N!="object")return;if(ut(N))for(var re=0;re<N.length;re++){var ce=N[re];mf(ce)&&o0(ce,H)}else if(mf(N))N._store&&(N._store.validated=!0);else if(N){var Pe=v(N);if(typeof Pe=="function"&&Pe!==N.entries)for(var Ce=Pe.call(N),ge;!(ge=Ce.next()).done;)mf(ge.value)&&o0(ge.value,H)}}}function CW(N){{var H=N.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 ce=I(H);Fe(re,N.props,"prop",ce,N)}else if(H.PropTypes!==void 0&&!vf){vf=!0;var Pe=I(H);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Pe||"Unknown")}typeof H.getDefaultProps=="function"&&!H.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function $W(N){{for(var H=Object.keys(N.props),re=0;re<H.length;re++){var ce=H[re];if(ce!=="children"&&ce!=="key"){oa(N),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ce),oa(null);break}}N.ref!==null&&(oa(N),w("Invalid attribute `ref` supplied to `React.Fragment`."),oa(null))}}var l0={};function u0(N,H,re,ce,Pe,Ce){{var ge=M(N);if(!ge){var ye="";(N===void 0||typeof N=="object"&&N!==null&&Object.keys(N).length===0)&&(ye+=" 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 ct=_W();ct?ye+=ct:ye+=a0();var Ke;N===null?Ke="null":ut(N)?Ke="array":N!==void 0&&N.$$typeof===t?(Ke="<"+(I(N.type)||"Unknown")+" />",ye=" Did you accidentally export a JSX literal instead of a component?"):Ke=typeof N,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ke,ye)}var Ye=jW(N,H,re,Pe,Ce);if(Ye==null)return Ye;if(ge){var Ct=H.children;if(Ct!==void 0)if(ce)if(ut(Ct)){for(var sa=0;sa<Ct.length;sa++)s0(Ct[sa],N);Object.freeze&&Object.freeze(Ct)}else w("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 s0(Ct,N)}if(ee.call(H,"key")){var Zr=I(N),vt=Object.keys(H).filter(function(LW){return LW!=="key"}),yf=vt.length>0?"{key: someKey, "+vt.join(": ..., ")+": ...}":"{key: someKey}";if(!l0[Zr+yf]){var IW=vt.length>0?"{"+vt.join(": ..., ")+": ...}":"{}";w(`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} />`,pf,Zr,pz,Zr),Kb[Zr+pf]=!0}}return N===n?lz(He):sz(He),He}}function uz(N,H,re){return Vb(N,H,re,!0)}function cz(N,H,re){return Vb(N,H,re,!1)}var fz=cz,dz=uz;la.Fragment=n,la.jsx=fz,la.jsxs=dz}()),la}process.env.NODE_ENV==="production"?Bs.exports=Hb():Bs.exports=Yb();var g=Bs.exports;/**
30
+ <%s key={someKey} {...props} />`,yf,Zr,IW,Zr),l0[Zr+yf]=!0}}return N===n?$W(Ye):CW(Ye),Ye}}function kW(N,H,re){return u0(N,H,re,!0)}function MW(N,H,re){return u0(N,H,re,!1)}var NW=MW,DW=kW;ua.Fragment=n,ua.jsx=NW,ua.jsxs=DW}()),ua}process.env.NODE_ENV==="production"?zs.exports=f0():zs.exports=d0();var h=zs.exports;/**
31
31
  * @license lucide-react v0.294.0 - ISC
32
32
  *
33
33
  * This source code is licensed under the ISC license.
34
34
  * See the LICENSE file in the root directory of this source tree.
35
- */var Xb={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"};/**
35
+ */var p0={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
36
  * @license lucide-react v0.294.0 - ISC
37
37
  *
38
38
  * This source code is licensed under the ISC license.
39
39
  * See the LICENSE file in the root directory of this source tree.
40
- */const Zb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),ct=(e,t)=>{const r=A.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:s="",children:l,...u},c)=>A.createElement("svg",{ref:c,...Xb,width:a,height:a,stroke:n,strokeWidth:o?Number(i)*24/Number(a):i,className:["lucide",`lucide-${Zb(e)}`,s].join(" "),...u},[...t.map(([f,d])=>A.createElement(f,d)),...Array.isArray(l)?l:[l]]));return r.displayName=`${e}`,r};/**
40
+ */const h0=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),ke=(e,t)=>{const r=T.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:s="",children:l,...u},c)=>T.createElement("svg",{ref:c,...p0,width:a,height:a,stroke:n,strokeWidth:o?Number(i)*24/Number(a):i,className:["lucide",`lucide-${h0(e)}`,s].join(" "),...u},[...t.map(([f,d])=>T.createElement(f,d)),...Array.isArray(l)?l:[l]]));return r.displayName=`${e}`,r};/**
41
41
  * @license lucide-react v0.294.0 - ISC
42
42
  *
43
43
  * This source code is licensed under the ISC license.
44
44
  * See the LICENSE file in the root directory of this source tree.
45
- */const Jb=ct("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"}]]);/**
45
+ */const xf=ke("AlignLeft",[["line",{x1:"21",x2:"3",y1:"6",y2:"6",key:"1fp77t"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}],["line",{x1:"17",x2:"3",y1:"18",y2:"18",key:"1awlsn"}]]);/**
46
46
  * @license lucide-react v0.294.0 - ISC
47
47
  *
48
48
  * This source code is licensed under the ISC license.
49
49
  * See the LICENSE file in the root directory of this source tree.
50
- */const yf=ct("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"}]]);/**
50
+ */const v0=ke("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"}]]);/**
51
51
  * @license lucide-react v0.294.0 - ISC
52
52
  *
53
53
  * This source code is licensed under the ISC license.
54
54
  * See the LICENSE file in the root directory of this source tree.
55
- */const ua=ct("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
55
+ */const wf=ke("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
56
56
  * @license lucide-react v0.294.0 - ISC
57
57
  *
58
58
  * This source code is licensed under the ISC license.
59
59
  * See the LICENSE file in the root directory of this source tree.
60
- */const Qb=ct("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
60
+ */const Of=ke("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"}]]);/**
61
61
  * @license lucide-react v0.294.0 - ISC
62
62
  *
63
63
  * This source code is licensed under the ISC license.
64
64
  * See the LICENSE file in the root directory of this source tree.
65
- */const e0=ct("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
65
+ */const Qr=ke("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
66
66
  * @license lucide-react v0.294.0 - ISC
67
67
  *
68
68
  * This source code is licensed under the ISC license.
69
69
  * See the LICENSE file in the root directory of this source tree.
70
- */const mf=ct("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
70
+ */const m0=ke("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
71
71
  * @license lucide-react v0.294.0 - ISC
72
72
  *
73
73
  * This source code is licensed under the ISC license.
74
74
  * See the LICENSE file in the root directory of this source tree.
75
- */const t0=ct("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"}]]);/**
75
+ */const Sf=ke("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
76
76
  * @license lucide-react v0.294.0 - ISC
77
77
  *
78
78
  * This source code is licensed under the ISC license.
79
79
  * See the LICENSE file in the root directory of this source tree.
80
- */const r0=ct("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
80
+ */const Tf=ke("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
81
81
  * @license lucide-react v0.294.0 - ISC
82
82
  *
83
83
  * This source code is licensed under the ISC license.
84
84
  * See the LICENSE file in the root directory of this source tree.
85
- */const n0=ct("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"}]]);/**
85
+ */const Af=ke("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
86
86
  * @license lucide-react v0.294.0 - ISC
87
87
  *
88
88
  * This source code is licensed under the ISC license.
89
89
  * See the LICENSE file in the root directory of this source tree.
90
- */const gf=ct("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
90
+ */const y0=ke("Code2",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
91
91
  * @license lucide-react v0.294.0 - ISC
92
92
  *
93
93
  * This source code is licensed under the ISC license.
94
94
  * See the LICENSE file in the root directory of this source tree.
95
- */const a0=ct("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"}]]);/**
95
+ */const ca=ke("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
96
96
  * @license lucide-react v0.294.0 - ISC
97
97
  *
98
98
  * This source code is licensed under the ISC license.
99
99
  * See the LICENSE file in the root directory of this source tree.
100
- */const i0=ct("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"}]]);/**
100
+ */const g0=ke("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"}]]);/**
101
101
  * @license lucide-react v0.294.0 - ISC
102
102
  *
103
103
  * This source code is licensed under the ISC license.
104
104
  * See the LICENSE file in the root directory of this source tree.
105
- */const o0=ct("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"}]]);/**
105
+ */const Pf=ke("ExternalLink",[["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}],["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["line",{x1:"10",x2:"21",y1:"14",y2:"3",key:"18c3s4"}]]);/**
106
106
  * @license lucide-react v0.294.0 - ISC
107
107
  *
108
108
  * This source code is licensed under the ISC license.
109
109
  * See the LICENSE file in the root directory of this source tree.
110
- */const s0=ct("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function bf(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=bf(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ye(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=bf(e))&&(n&&(n+=" "),n+=t);return n}const Fs="-",l0=e=>{const t=c0(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const s=o.split(Fs);return s[0]===""&&s.length!==1&&s.shift(),xf(s,t)||u0(o)},getConflictingClassGroupIds:(o,s)=>{const l=r[o]||[];return s&&n[o]?[...l,...n[o]]:l}}},xf=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?xf(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},wf=/^\[(.+)\]$/,u0=e=>{if(wf.test(e)){const t=wf.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},c0=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return d0(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:Of(t,a);i.classGroupId=r;return}if(typeof a=="function"){if(f0(a)){Ws(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,o])=>{Ws(o,Of(t,i),r,n)})})},Of=(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},f0=e=>e.isThemeGetter,d0=(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,p0=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)}}},Sf="!",h0=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 h=0;h<s.length;h++){let b=s[h];if(u===0){if(b===a&&(n||s.slice(h,h+i)===t)){l.push(s.slice(c,h)),c=h+i;continue}if(b==="/"){f=h;continue}}b==="["?u++:b==="]"&&u--}const d=l.length===0?s:s.substring(c),p=d.startsWith(Sf),v=p?d.substring(1):d,y=f&&f>c?f-c:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:y}};return r?s=>r({className:s,parseClassName:o}):o},v0=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},y0=e=>({cache:p0(e.cacheSize),parseClassName:h0(e),...l0(e)}),m0=/\s+/,g0=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,i=[],o=e.trim().split(m0);let s="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:p}=r(u);let v=!!p,y=n(v?d.substring(0,p):d);if(!y){if(!v){s=u+(s.length>0?" "+s:s);continue}if(y=n(d),!y){s=u+(s.length>0?" "+s:s);continue}v=!1}const h=v0(c).join(":"),b=f?h+Sf:h,S=b+y;if(i.includes(S))continue;i.push(S);const x=a(y,v);for(let T=0;T<x.length;++T){const m=x[T];i.push(b+m)}s=u+(s.length>0?" "+s:s)}return s};function b0(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Af(t))&&(n&&(n+=" "),n+=r);return n}const Af=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Af(e[n]))&&(r&&(r+=" "),r+=t);return r};function x0(e,...t){let r,n,a,i=o;function o(l){const u=t.reduce((c,f)=>f(c),e());return r=y0(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=g0(l,r);return a(l,c),c}return function(){return i(b0.apply(null,arguments))}}const Ne=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Tf=/^\[(?:([a-z-]+):)?(.+)\]$/i,w0=/^\d+\/\d+$/,O0=new Set(["px","full","screen"]),S0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,A0=/\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$/,T0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,P0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xt=e=>Qr(e)||O0.has(e)||w0.test(e),cr=e=>en(e,"length",D0),Qr=e=>!!e&&!Number.isNaN(Number(e)),Us=e=>en(e,"number",Qr),ca=e=>!!e&&Number.isInteger(Number(e)),E0=e=>e.endsWith("%")&&Qr(e.slice(0,-1)),he=e=>Tf.test(e),fr=e=>S0.test(e),j0=new Set(["length","size","percentage"]),$0=e=>en(e,j0,Pf),C0=e=>en(e,"position",Pf),k0=new Set(["image","url"]),M0=e=>en(e,k0,L0),N0=e=>en(e,"",I0),fa=()=>!0,en=(e,t,r)=>{const n=Tf.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},D0=e=>A0.test(e)&&!T0.test(e),Pf=()=>!1,I0=e=>P0.test(e),L0=e=>_0.test(e),R0=x0(()=>{const e=Ne("colors"),t=Ne("spacing"),r=Ne("blur"),n=Ne("brightness"),a=Ne("borderColor"),i=Ne("borderRadius"),o=Ne("borderSpacing"),s=Ne("borderWidth"),l=Ne("contrast"),u=Ne("grayscale"),c=Ne("hueRotate"),f=Ne("invert"),d=Ne("gap"),p=Ne("gradientColorStops"),v=Ne("gradientColorStopPositions"),y=Ne("inset"),h=Ne("margin"),b=Ne("opacity"),S=Ne("padding"),x=Ne("saturate"),T=Ne("scale"),m=Ne("sepia"),w=Ne("skew"),O=Ne("space"),P=Ne("translate"),j=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto",he,t],$=()=>[he,t],R=()=>["",Xt,cr],k=()=>["auto",Qr,he],D=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],C=()=>["solid","dashed","dotted","double","none"],B=()=>["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"],G=()=>["","0",he],E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>[Qr,he];return{cacheSize:500,separator:":",theme:{colors:[fa],spacing:[Xt,cr],blur:["none","",fr,he],brightness:L(),borderColor:[e],borderRadius:["none","","full",fr,he],borderSpacing:$(),borderWidth:R(),contrast:L(),grayscale:G(),hueRotate:L(),invert:G(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[E0,cr],inset:_(),margin:_(),opacity:L(),padding:$(),saturate:L(),scale:L(),sepia:G(),skew:L(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",he]}],container:["container"],columns:[{columns:[fr]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"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:[...D(),he]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ca,he]}],basis:[{basis:_()}],"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:G()}],shrink:[{shrink:G()}],order:[{order:["first","last","none",ca,he]}],"grid-cols":[{"grid-cols":[fa]}],"col-start-end":[{col:["auto",{span:["full",ca,he]},he]}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":[fa]}],"row-start-end":[{row:["auto",{span:[ca,he]},he]}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"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:[S]}],px:[{px:[S]}],py:[{py:[S]}],ps:[{ps:[S]}],pe:[{pe:[S]}],pt:[{pt:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],m:[{m:[h]}],mx:[{mx:[h]}],my:[{my:[h]}],ms:[{ms:[h]}],me:[{me:[h]}],mt:[{mt:[h]}],mr:[{mr:[h]}],mb:[{mb:[h]}],ml:[{ml:[h]}],"space-x":[{"space-x":[O]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[O]}],"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:[fr]},fr]}],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",fr,cr]}],"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:[fa]}],"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",Qr,Us]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Xt,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":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...C(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Xt,cr]}],"underline-offset":[{"underline-offset":["auto",Xt,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:$()}],"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":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...D(),C0]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",$0]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},M0]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],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":[b]}],"border-style":[{border:[...C(),"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":[b]}],"divide-style":[{divide:C()}],"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:["",...C()]}],"outline-offset":[{"outline-offset":[Xt,he]}],"outline-w":[{outline:[Xt,cr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:R()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Xt,cr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",fr,N0]}],"shadow-color":[{shadow:[fa]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",fr,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":[b]}],"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:L()}],ease:[{ease:["linear","in","out","in-out",he]}],delay:[{delay:L()}],animate:[{animate:["none","spin","ping","pulse","bounce",he]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[ca,he]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"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":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"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:[Xt,cr,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 R0(ye(e))}const _f=({data:e,className:t,onClick:r,isFirst:n=!1})=>{const{title:a,value:i,change:o,info:s,highlighted:l}=e,u=d=>typeof d=="number"?d.toLocaleString():d.toString(),c=d=>`${d}%`,f=()=>{r&&r(e)};return g.jsxs("div",{className:ue("rounded-lg border py-[16px] px-[24px] transition-all duration-200 bg-white",!l&&"border-gray-200",l&&["!border-blue-600 shadow-[0 1px 4px 0 rgba(16, 24, 40, 0.08), 0 1px 2px 0 rgba(16, 24, 40, 0.08), 0 0 0 4px rgba(41, 112, 255, 0.24)]"],r&&"cursor-pointer",t),onClick:f,children:[g.jsxs("div",{className:"flex items-center gap-2 mb-[6px]",children:[g.jsx("span",{className:"text-sm font-medium text-gray-700",children:a}),s&&g.jsxs("div",{className:"relative group",children:[g.jsx(r0,{className:"h-[16px] w-[16px] text-gray-400 cursor-help"}),g.jsxs("div",{className:ue("absolute bottom-full w-[280px] text-xs text-center text-white font-medium mb-[12px] px-[12px] py-[8px] text-xs text-white bg-gray-900 rounded-md opacity-0 group-hover:!opacity-100 transition-opacity duration-200 z-10 shadow-lg",n?"left-0":"left-1/2 transform -translate-x-1/2"),children:[s,g.jsx("div",{className:ue("absolute top-full w-0 h-0 border-l-[4px] border-r-[4px] border-t-[4px] border-transparent border-t-gray-900",n?"left-4":"left-1/2 transform -translate-x-1/2")})]})]})]}),g.jsxs("div",{className:"flex items-baseline gap-3",children:[g.jsx("span",{className:"text-2xl font-semibold text-gray-900",children:u(i)}),o&&g.jsxs("div",{className:ue("flex items-center gap-[8px] px-[8px] py-[4px] text-xs font-medium",(o.type==="increase","")),style:o.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:[o.type==="increase"?g.jsx(o0,{className:"h-3 w-3"}):g.jsx(i0,{className:"h-3 w-3"}),g.jsx("span",{children:c(o.value)})]})]})]})};var B0=Array.isArray,ft=B0,F0=typeof Ei=="object"&&Ei&&Ei.Object===Object&&Ei,Ef=F0,W0=Ef,U0=typeof self=="object"&&self&&self.Object===Object&&self,z0=W0||U0||Function("return this")(),Ft=z0,G0=Ft,K0=G0.Symbol,da=K0,jf=da,$f=Object.prototype,V0=$f.hasOwnProperty,q0=$f.toString,pa=jf?jf.toStringTag:void 0;function H0(e){var t=V0.call(e,pa),r=e[pa];try{e[pa]=void 0;var n=!0}catch{}var a=q0.call(e);return n&&(t?e[pa]=r:delete e[pa]),a}var Y0=H0,X0=Object.prototype,Z0=X0.toString;function J0(e){return Z0.call(e)}var Q0=J0,Cf=da,ex=Y0,tx=Q0,rx="[object Null]",nx="[object Undefined]",kf=Cf?Cf.toStringTag:void 0;function ax(e){return e==null?e===void 0?nx:rx:kf&&kf in Object(e)?ex(e):tx(e)}var Zt=ax;function ix(e){return e!=null&&typeof e=="object"}var Jt=ix,ox=Zt,sx=Jt,lx="[object Symbol]";function ux(e){return typeof e=="symbol"||sx(e)&&ox(e)==lx}var tn=ux,cx=ft,fx=tn,dx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,px=/^\w*$/;function hx(e,t){if(cx(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||fx(e)?!0:px.test(e)||!dx.test(e)||t!=null&&e in Object(t)}var zs=hx;function vx(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var dr=vx;const rn=Ce(dr);var yx=Zt,mx=dr,gx="[object AsyncFunction]",bx="[object Function]",xx="[object GeneratorFunction]",wx="[object Proxy]";function Ox(e){if(!mx(e))return!1;var t=yx(e);return t==bx||t==xx||t==gx||t==wx}var Gs=Ox;const pe=Ce(Gs);var Sx=Ft,Ax=Sx["__core-js_shared__"],Tx=Ax,Ks=Tx,Mf=function(){var e=/[^.]+$/.exec(Ks&&Ks.keys&&Ks.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Px(e){return!!Mf&&Mf in e}var _x=Px,Ex=Function.prototype,jx=Ex.toString;function $x(e){if(e!=null){try{return jx.call(e)}catch{}try{return e+""}catch{}}return""}var Nf=$x,Cx=Gs,kx=_x,Mx=dr,Nx=Nf,Dx=/[\\^$.*+?()[\]{}|]/g,Ix=/^\[object .+?Constructor\]$/,Lx=Function.prototype,Rx=Object.prototype,Bx=Lx.toString,Fx=Rx.hasOwnProperty,Wx=RegExp("^"+Bx.call(Fx).replace(Dx,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ux(e){if(!Mx(e)||kx(e))return!1;var t=Cx(e)?Wx:Ix;return t.test(Nx(e))}var zx=Ux;function Gx(e,t){return e==null?void 0:e[t]}var Kx=Gx,Vx=zx,qx=Kx;function Hx(e,t){var r=qx(e,t);return Vx(r)?r:void 0}var _r=Hx,Yx=_r,Xx=Yx(Object,"create"),ji=Xx,Df=ji;function Zx(){this.__data__=Df?Df(null):{},this.size=0}var Jx=Zx;function Qx(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ew=Qx,tw=ji,rw="__lodash_hash_undefined__",nw=Object.prototype,aw=nw.hasOwnProperty;function iw(e){var t=this.__data__;if(tw){var r=t[e];return r===rw?void 0:r}return aw.call(t,e)?t[e]:void 0}var ow=iw,sw=ji,lw=Object.prototype,uw=lw.hasOwnProperty;function cw(e){var t=this.__data__;return sw?t[e]!==void 0:uw.call(t,e)}var fw=cw,dw=ji,pw="__lodash_hash_undefined__";function hw(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=dw&&t===void 0?pw:t,this}var vw=hw,yw=Jx,mw=ew,gw=ow,bw=fw,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 ww=nn;function Ow(){this.__data__=[],this.size=0}var Sw=Ow;function Aw(e,t){return e===t||e!==e&&t!==t}var Vs=Aw,Tw=Vs;function Pw(e,t){for(var r=e.length;r--;)if(Tw(e[r][0],t))return r;return-1}var $i=Pw,_w=$i,Ew=Array.prototype,jw=Ew.splice;function $w(e){var t=this.__data__,r=_w(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():jw.call(t,r,1),--this.size,!0}var Cw=$w,kw=$i;function Mw(e){var t=this.__data__,r=kw(t,e);return r<0?void 0:t[r][1]}var Nw=Mw,Dw=$i;function Iw(e){return Dw(this.__data__,e)>-1}var Lw=Iw,Rw=$i;function Bw(e,t){var r=this.__data__,n=Rw(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Fw=Bw,Ww=Sw,Uw=Cw,zw=Nw,Gw=Lw,Kw=Fw;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=Ww,an.prototype.delete=Uw,an.prototype.get=zw,an.prototype.has=Gw,an.prototype.set=Kw;var Ci=an,Vw=_r,qw=Ft,Hw=Vw(qw,"Map"),qs=Hw,If=ww,Yw=Ci,Xw=qs;function Zw(){this.size=0,this.__data__={hash:new If,map:new(Xw||Yw),string:new If}}var Jw=Zw;function Qw(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var e1=Qw,t1=e1;function r1(e,t){var r=e.__data__;return t1(t)?r[typeof t=="string"?"string":"hash"]:r.map}var ki=r1,n1=ki;function a1(e){var t=n1(this,e).delete(e);return this.size-=t?1:0,t}var i1=a1,o1=ki;function s1(e){return o1(this,e).get(e)}var l1=s1,u1=ki;function c1(e){return u1(this,e).has(e)}var f1=c1,d1=ki;function p1(e,t){var r=d1(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var h1=p1,v1=Jw,y1=i1,m1=l1,g1=f1,b1=h1;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=v1,on.prototype.delete=y1,on.prototype.get=m1,on.prototype.has=g1,on.prototype.set=b1;var Hs=on,Lf=Hs,x1="Expected a function";function Ys(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(x1);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||Lf),r}Ys.Cache=Lf;var Rf=Ys;const w1=Ce(Rf);var O1=Rf,S1=500;function A1(e){var t=O1(e,function(n){return r.size===S1&&r.clear(),n}),r=t.cache;return t}var T1=A1,P1=T1,_1=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,E1=/\\(\\)?/g,j1=P1(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(_1,function(r,n,a,i){t.push(a?i.replace(E1,"$1"):n||r)}),t}),$1=j1;function C1(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=C1,Bf=da,k1=Xs,M1=ft,N1=tn,Ff=Bf?Bf.prototype:void 0,Wf=Ff?Ff.toString:void 0;function Uf(e){if(typeof e=="string")return e;if(M1(e))return k1(e,Uf)+"";if(N1(e))return Wf?Wf.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var D1=Uf,I1=D1;function L1(e){return e==null?"":I1(e)}var zf=L1,R1=ft,B1=zs,F1=$1,W1=zf;function U1(e,t){return R1(e)?e:B1(e,t)?[e]:F1(W1(e))}var Gf=U1,z1=tn;function G1(e){if(typeof e=="string"||z1(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Mi=G1,K1=Gf,V1=Mi;function q1(e,t){t=K1(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[V1(t[r++])];return r&&r==n?e:void 0}var Zs=q1,H1=Zs;function Y1(e,t,r){var n=e==null?void 0:H1(e,t);return n===void 0?r:n}var Kf=Y1;const wt=Ce(Kf);function X1(e){return e==null}var Z1=X1;const fe=Ce(Z1);var J1=Zt,Q1=ft,eO=Jt,tO="[object String]";function rO(e){return typeof e=="string"||!Q1(e)&&eO(e)&&J1(e)==tO}var nO=rO;const Er=Ce(nO);var Js={exports:{}},we={};/**
110
+ */const fa=ke("FileCode",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"m10 13-2 2 2 2",key:"17smn8"}],["path",{d:"m14 17 2-2-2-2",key:"14mezr"}]]);/**
111
+ * @license lucide-react v0.294.0 - ISC
112
+ *
113
+ * This source code is licensed under the ISC license.
114
+ * See the LICENSE file in the root directory of this source tree.
115
+ */const b0=ke("FileText",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["line",{x1:"16",x2:"8",y1:"13",y2:"13",key:"14keom"}],["line",{x1:"16",x2:"8",y1:"17",y2:"17",key:"17nazh"}],["line",{x1:"10",x2:"8",y1:"9",y2:"9",key:"1a5vjj"}]]);/**
116
+ * @license lucide-react v0.294.0 - ISC
117
+ *
118
+ * This source code is licensed under the ISC license.
119
+ * See the LICENSE file in the root directory of this source tree.
120
+ */const x0=ke("File",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}]]);/**
121
+ * @license lucide-react v0.294.0 - ISC
122
+ *
123
+ * This source code is licensed under the ISC license.
124
+ * See the LICENSE file in the root directory of this source tree.
125
+ */const w0=ke("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
126
+ * @license lucide-react v0.294.0 - ISC
127
+ *
128
+ * This source code is licensed under the ISC license.
129
+ * See the LICENSE file in the root directory of this source tree.
130
+ */const Us=ke("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
131
+ * @license lucide-react v0.294.0 - ISC
132
+ *
133
+ * This source code is licensed under the ISC license.
134
+ * See the LICENSE file in the root directory of this source tree.
135
+ */const O0=ke("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
136
+ * @license lucide-react v0.294.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */const S0=ke("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"}]]);/**
141
+ * @license lucide-react v0.294.0 - ISC
142
+ *
143
+ * This source code is licensed under the ISC license.
144
+ * See the LICENSE file in the root directory of this source tree.
145
+ */const jf=ke("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
146
+ * @license lucide-react v0.294.0 - ISC
147
+ *
148
+ * This source code is licensed under the ISC license.
149
+ * See the LICENSE file in the root directory of this source tree.
150
+ */const T0=ke("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]);/**
151
+ * @license lucide-react v0.294.0 - ISC
152
+ *
153
+ * This source code is licensed under the ISC license.
154
+ * See the LICENSE file in the root directory of this source tree.
155
+ */const A0=ke("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"}]]);/**
156
+ * @license lucide-react v0.294.0 - ISC
157
+ *
158
+ * This source code is licensed under the ISC license.
159
+ * See the LICENSE file in the root directory of this source tree.
160
+ */const P0=ke("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"}]]);/**
161
+ * @license lucide-react v0.294.0 - ISC
162
+ *
163
+ * This source code is licensed under the ISC license.
164
+ * See the LICENSE file in the root directory of this source tree.
165
+ */const j0=ke("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"}]]);/**
166
+ * @license lucide-react v0.294.0 - ISC
167
+ *
168
+ * This source code is licensed under the ISC license.
169
+ * See the LICENSE file in the root directory of this source tree.
170
+ */const _0=ke("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function _f(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=_f(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function me(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=_f(e))&&(n&&(n+=" "),n+=t);return n}const Gs="-",E0=e=>{const t=$0(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const s=o.split(Gs);return s[0]===""&&s.length!==1&&s.shift(),Ef(s,t)||C0(o)},getConflictingClassGroupIds:(o,s)=>{const l=r[o]||[];return s&&n[o]?[...l,...n[o]]:l}}},Ef=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?Ef(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join(Gs);return(o=t.validators.find(({validator:s})=>s(i)))==null?void 0:o.classGroupId},Cf=/^\[(.+)\]$/,C0=e=>{if(Cf.test(e)){const t=Cf.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},$0=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return M0(Object.entries(e.classGroups),r).forEach(([i,o])=>{Vs(o,n,i,t)}),n},Vs=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const i=a===""?t:$f(t,a);i.classGroupId=r;return}if(typeof a=="function"){if(k0(a)){Vs(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,o])=>{Vs(o,$f(t,i),r,n)})})},$f=(e,t)=>{let r=e;return t.split(Gs).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},k0=e=>e.isThemeGetter,M0=(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,N0=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)}}},kf="!",D0=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 b=s[v];if(u===0){if(b===a&&(n||s.slice(v,v+i)===t)){l.push(s.slice(c,v)),c=v+i;continue}if(b==="/"){f=v;continue}}b==="["?u++:b==="]"&&u--}const d=l.length===0?s:s.substring(c),p=d.startsWith(kf),m=p?d.substring(1):d,y=f&&f>c?f-c:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:y}};return r?s=>r({className:s,parseClassName:o}):o},I0=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},L0=e=>({cache:N0(e.cacheSize),parseClassName:D0(e),...E0(e)}),R0=/\s+/,B0=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,i=[],o=e.trim().split(R0);let s="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:p}=r(u);let m=!!p,y=n(m?d.substring(0,p):d);if(!y){if(!m){s=u+(s.length>0?" "+s:s);continue}if(y=n(d),!y){s=u+(s.length>0?" "+s:s);continue}m=!1}const v=I0(c).join(":"),b=f?v+kf:v,w=b+y;if(i.includes(w))continue;i.push(w);const x=a(y,m);for(let A=0;A<x.length;++A){const g=x[A];i.push(b+g)}s=u+(s.length>0?" "+s:s)}return s};function F0(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Mf(t))&&(n&&(n+=" "),n+=r);return n}const Mf=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Mf(e[n]))&&(r&&(r+=" "),r+=t);return r};function W0(e,...t){let r,n,a,i=o;function o(l){const u=t.reduce((c,f)=>f(c),e());return r=L0(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=B0(l,r);return a(l,c),c}return function(){return i(F0.apply(null,arguments))}}const De=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Nf=/^\[(?:([a-z-]+):)?(.+)\]$/i,z0=/^\d+\/\d+$/,U0=new Set(["px","full","screen"]),G0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,V0=/\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$/,K0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,q0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,H0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xt=e=>en(e)||U0.has(e)||z0.test(e),cr=e=>tn(e,"length",rx),en=e=>!!e&&!Number.isNaN(Number(e)),Ks=e=>tn(e,"number",en),da=e=>!!e&&Number.isInteger(Number(e)),Y0=e=>e.endsWith("%")&&en(e.slice(0,-1)),he=e=>Nf.test(e),fr=e=>G0.test(e),X0=new Set(["length","size","percentage"]),Z0=e=>tn(e,X0,Df),J0=e=>tn(e,"position",Df),Q0=new Set(["image","url"]),ex=e=>tn(e,Q0,ax),tx=e=>tn(e,"",nx),pa=()=>!0,tn=(e,t,r)=>{const n=Nf.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},rx=e=>V0.test(e)&&!K0.test(e),Df=()=>!1,nx=e=>q0.test(e),ax=e=>H0.test(e),ix=W0(()=>{const e=De("colors"),t=De("spacing"),r=De("blur"),n=De("brightness"),a=De("borderColor"),i=De("borderRadius"),o=De("borderSpacing"),s=De("borderWidth"),l=De("contrast"),u=De("grayscale"),c=De("hueRotate"),f=De("invert"),d=De("gap"),p=De("gradientColorStops"),m=De("gradientColorStopPositions"),y=De("inset"),v=De("margin"),b=De("opacity"),w=De("padding"),x=De("saturate"),A=De("scale"),g=De("sepia"),O=De("skew"),S=De("space"),j=De("translate"),C=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto",he,t],_=()=>[he,t],I=()=>["",Xt,cr],$=()=>["auto",en,he],D=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],k=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],G=()=>["","0",he],E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[en,he];return{cacheSize:500,separator:":",theme:{colors:[pa],spacing:[Xt,cr],blur:["none","",fr,he],brightness:R(),borderColor:[e],borderRadius:["none","","full",fr,he],borderSpacing:_(),borderWidth:I(),contrast:R(),grayscale:G(),hueRotate:R(),invert:G(),gap:_(),gradientColorStops:[e],gradientColorStopPositions:[Y0,cr],inset:P(),margin:P(),opacity:R(),padding:_(),saturate:R(),scale:R(),sepia:G(),skew:R(),space:_(),translate:_()},classGroups:{aspect:[{aspect:["auto","square","video",he]}],container:["container"],columns:[{columns:[fr]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"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:[...D(),he]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",da,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:G()}],shrink:[{shrink:G()}],order:[{order:["first","last","none",da,he]}],"grid-cols":[{"grid-cols":[pa]}],"col-start-end":[{col:["auto",{span:["full",da,he]},he]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[pa]}],"row-start-end":[{row:["auto",{span:[da,he]},he]}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"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",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],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":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"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:[fr]},fr]}],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",fr,cr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ks]}],"font-family":[{font:[pa]}],"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",en,Ks]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Xt,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":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...k(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Xt,cr]}],"underline-offset":[{"underline-offset":["auto",Xt,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:_()}],"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":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...D(),J0]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Z0]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ex]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],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":[b]}],"border-style":[{border:[...k(),"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":[b]}],"divide-style":[{divide:k()}],"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:["",...k()]}],"outline-offset":[{"outline-offset":[Xt,he]}],"outline-w":[{outline:[Xt,cr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Xt,cr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",fr,tx]}],"shadow-color":[{shadow:[pa]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",fr,he]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[x]}],sepia:[{sepia:[g]}],"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":[b]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[g]}],"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:R()}],ease:[{ease:["linear","in","out","in-out",he]}],delay:[{delay:R()}],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:[da,he]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"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":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"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:[Xt,cr,Ks]}],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 se(...e){return ix(me(e))}const If=({data:e,className:t,onClick:r,isFirst:n=!1})=>{const{title:a,value:i,change:o,info:s,highlighted:l}=e,u=d=>typeof d=="number"?d.toLocaleString():d.toString(),c=d=>`${d}%`,f=()=>{r&&r(e)};return h.jsxs("div",{className:se("rounded-lg border py-[16px] px-[24px] transition-all duration-200 bg-white",!l&&"border-gray-200",l&&["!border-blue-600 shadow-[0 1px 4px 0 rgba(16, 24, 40, 0.08), 0 1px 2px 0 rgba(16, 24, 40, 0.08), 0 0 0 4px rgba(41, 112, 255, 0.24)]"],r&&"cursor-pointer",t),onClick:f,children:[h.jsxs("div",{className:"flex items-center gap-2 mb-[6px]",children:[h.jsx("span",{className:"text-sm font-medium text-gray-700",children:a}),s&&h.jsxs("div",{className:"relative group",children:[h.jsx(w0,{className:"h-[16px] w-[16px] text-gray-400 cursor-help"}),h.jsxs("div",{className:se("absolute bottom-full w-[280px] text-xs text-center text-white font-medium mb-[12px] px-[12px] py-[8px] text-xs text-white bg-gray-900 rounded-md opacity-0 group-hover:!opacity-100 transition-opacity duration-200 z-10 shadow-lg",n?"left-0":"left-1/2 transform -translate-x-1/2"),children:[s,h.jsx("div",{className:se("absolute top-full w-0 h-0 border-l-[4px] border-r-[4px] border-t-[4px] border-transparent border-t-gray-900",n?"left-4":"left-1/2 transform -translate-x-1/2")})]})]})]}),h.jsxs("div",{className:"flex items-baseline gap-3",children:[h.jsx("span",{className:"text-2xl font-semibold text-gray-900",children:u(i)}),o&&h.jsxs("div",{className:se("flex items-center gap-[8px] px-[8px] py-[4px] text-xs font-medium",(o.type==="increase","")),style:o.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:[o.type==="increase"?h.jsx(j0,{className:"h-3 w-3"}):h.jsx(P0,{className:"h-3 w-3"}),h.jsx("span",{children:c(o.value)})]})]})]})};var ox=Array.isArray,ft=ox,sx=typeof Ci=="object"&&Ci&&Ci.Object===Object&&Ci,Lf=sx,lx=Lf,ux=typeof self=="object"&&self&&self.Object===Object&&self,cx=lx||ux||Function("return this")(),Ft=cx,fx=Ft,dx=fx.Symbol,ha=dx,Rf=ha,Bf=Object.prototype,px=Bf.hasOwnProperty,hx=Bf.toString,va=Rf?Rf.toStringTag:void 0;function vx(e){var t=px.call(e,va),r=e[va];try{e[va]=void 0;var n=!0}catch{}var a=hx.call(e);return n&&(t?e[va]=r:delete e[va]),a}var mx=vx,yx=Object.prototype,gx=yx.toString;function bx(e){return gx.call(e)}var xx=bx,Ff=ha,wx=mx,Ox=xx,Sx="[object Null]",Tx="[object Undefined]",Wf=Ff?Ff.toStringTag:void 0;function Ax(e){return e==null?e===void 0?Tx:Sx:Wf&&Wf in Object(e)?wx(e):Ox(e)}var Zt=Ax;function Px(e){return e!=null&&typeof e=="object"}var Jt=Px,jx=Zt,_x=Jt,Ex="[object Symbol]";function Cx(e){return typeof e=="symbol"||_x(e)&&jx(e)==Ex}var rn=Cx,$x=ft,kx=rn,Mx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Nx=/^\w*$/;function Dx(e,t){if($x(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||kx(e)?!0:Nx.test(e)||!Mx.test(e)||t!=null&&e in Object(t)}var qs=Dx;function Ix(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var dr=Ix;const nn=$e(dr);var Lx=Zt,Rx=dr,Bx="[object AsyncFunction]",Fx="[object Function]",Wx="[object GeneratorFunction]",zx="[object Proxy]";function Ux(e){if(!Rx(e))return!1;var t=Lx(e);return t==Fx||t==Wx||t==Bx||t==zx}var Hs=Ux;const pe=$e(Hs);var Gx=Ft,Vx=Gx["__core-js_shared__"],Kx=Vx,Ys=Kx,zf=function(){var e=/[^.]+$/.exec(Ys&&Ys.keys&&Ys.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function qx(e){return!!zf&&zf in e}var Hx=qx,Yx=Function.prototype,Xx=Yx.toString;function Zx(e){if(e!=null){try{return Xx.call(e)}catch{}try{return e+""}catch{}}return""}var Uf=Zx,Jx=Hs,Qx=Hx,e1=dr,t1=Uf,r1=/[\\^$.*+?()[\]{}|]/g,n1=/^\[object .+?Constructor\]$/,a1=Function.prototype,i1=Object.prototype,o1=a1.toString,s1=i1.hasOwnProperty,l1=RegExp("^"+o1.call(s1).replace(r1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function u1(e){if(!e1(e)||Qx(e))return!1;var t=Jx(e)?l1:n1;return t.test(t1(e))}var c1=u1;function f1(e,t){return e==null?void 0:e[t]}var d1=f1,p1=c1,h1=d1;function v1(e,t){var r=h1(e,t);return p1(r)?r:void 0}var jr=v1,m1=jr,y1=m1(Object,"create"),$i=y1,Gf=$i;function g1(){this.__data__=Gf?Gf(null):{},this.size=0}var b1=g1;function x1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var w1=x1,O1=$i,S1="__lodash_hash_undefined__",T1=Object.prototype,A1=T1.hasOwnProperty;function P1(e){var t=this.__data__;if(O1){var r=t[e];return r===S1?void 0:r}return A1.call(t,e)?t[e]:void 0}var j1=P1,_1=$i,E1=Object.prototype,C1=E1.hasOwnProperty;function $1(e){var t=this.__data__;return _1?t[e]!==void 0:C1.call(t,e)}var k1=$1,M1=$i,N1="__lodash_hash_undefined__";function D1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=M1&&t===void 0?N1:t,this}var I1=D1,L1=b1,R1=w1,B1=j1,F1=k1,W1=I1;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=L1,an.prototype.delete=R1,an.prototype.get=B1,an.prototype.has=F1,an.prototype.set=W1;var z1=an;function U1(){this.__data__=[],this.size=0}var G1=U1;function V1(e,t){return e===t||e!==e&&t!==t}var Xs=V1,K1=Xs;function q1(e,t){for(var r=e.length;r--;)if(K1(e[r][0],t))return r;return-1}var ki=q1,H1=ki,Y1=Array.prototype,X1=Y1.splice;function Z1(e){var t=this.__data__,r=H1(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():X1.call(t,r,1),--this.size,!0}var J1=Z1,Q1=ki;function ew(e){var t=this.__data__,r=Q1(t,e);return r<0?void 0:t[r][1]}var tw=ew,rw=ki;function nw(e){return rw(this.__data__,e)>-1}var aw=nw,iw=ki;function ow(e,t){var r=this.__data__,n=iw(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var sw=ow,lw=G1,uw=J1,cw=tw,fw=aw,dw=sw;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=lw,on.prototype.delete=uw,on.prototype.get=cw,on.prototype.has=fw,on.prototype.set=dw;var Mi=on,pw=jr,hw=Ft,vw=pw(hw,"Map"),Zs=vw,Vf=z1,mw=Mi,yw=Zs;function gw(){this.size=0,this.__data__={hash:new Vf,map:new(yw||mw),string:new Vf}}var bw=gw;function xw(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var ww=xw,Ow=ww;function Sw(e,t){var r=e.__data__;return Ow(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Ni=Sw,Tw=Ni;function Aw(e){var t=Tw(this,e).delete(e);return this.size-=t?1:0,t}var Pw=Aw,jw=Ni;function _w(e){return jw(this,e).get(e)}var Ew=_w,Cw=Ni;function $w(e){return Cw(this,e).has(e)}var kw=$w,Mw=Ni;function Nw(e,t){var r=Mw(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Dw=Nw,Iw=bw,Lw=Pw,Rw=Ew,Bw=kw,Fw=Dw;function sn(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])}}sn.prototype.clear=Iw,sn.prototype.delete=Lw,sn.prototype.get=Rw,sn.prototype.has=Bw,sn.prototype.set=Fw;var Js=sn,Kf=Js,Ww="Expected a function";function Qs(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(Qs.Cache||Kf),r}Qs.Cache=Kf;var qf=Qs;const zw=$e(qf);var Uw=qf,Gw=500;function Vw(e){var t=Uw(e,function(n){return r.size===Gw&&r.clear(),n}),r=t.cache;return t}var Kw=Vw,qw=Kw,Hw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yw=/\\(\\)?/g,Xw=qw(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Hw,function(r,n,a,i){t.push(a?i.replace(Yw,"$1"):n||r)}),t}),Zw=Xw;function Jw(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 el=Jw,Hf=ha,Qw=el,eO=ft,tO=rn,Yf=Hf?Hf.prototype:void 0,Xf=Yf?Yf.toString:void 0;function Zf(e){if(typeof e=="string")return e;if(eO(e))return Qw(e,Zf)+"";if(tO(e))return Xf?Xf.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var rO=Zf,nO=rO;function aO(e){return e==null?"":nO(e)}var Jf=aO,iO=ft,oO=qs,sO=Zw,lO=Jf;function uO(e,t){return iO(e)?e:oO(e,t)?[e]:sO(lO(e))}var Qf=uO,cO=rn;function fO(e){if(typeof e=="string"||cO(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Di=fO,dO=Qf,pO=Di;function hO(e,t){t=dO(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[pO(t[r++])];return r&&r==n?e:void 0}var tl=hO,vO=tl;function mO(e,t,r){var n=e==null?void 0:vO(e,t);return n===void 0?r:n}var ed=mO;const wt=$e(ed);function yO(e){return e==null}var gO=yO;const fe=$e(gO);var bO=Zt,xO=ft,wO=Jt,OO="[object String]";function SO(e){return typeof e=="string"||!xO(e)&&wO(e)&&bO(e)==OO}var TO=SO;const _r=$e(TO);var rl={exports:{}},we={};/**
111
171
  * @license React
112
172
  * react-is.production.min.js
113
173
  *
@@ -115,7 +175,7 @@ React keys must be passed directly to JSX without using spread:
115
175
  *
116
176
  * This source code is licensed under the MIT license found in the
117
177
  * LICENSE file in the root directory of this source tree.
118
- */var Vf;function aO(){if(Vf)return we;Vf=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"),p=Symbol.for("react.offscreen"),v;v=Symbol.for("react.module.reference");function y(h){if(typeof h=="object"&&h!==null){var b=h.$$typeof;switch(b){case e:switch(h=h.type,h){case r:case a:case n:case u:case c:return h;default:switch(h=h&&h.$$typeof,h){case s:case o:case l:case d:case f:case i:return h;default:return b}}case t:return b}}}return we.ContextConsumer=o,we.ContextProvider=i,we.Element=e,we.ForwardRef=l,we.Fragment=r,we.Lazy=d,we.Memo=f,we.Portal=t,we.Profiler=a,we.StrictMode=n,we.Suspense=u,we.SuspenseList=c,we.isAsyncMode=function(){return!1},we.isConcurrentMode=function(){return!1},we.isContextConsumer=function(h){return y(h)===o},we.isContextProvider=function(h){return y(h)===i},we.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===e},we.isForwardRef=function(h){return y(h)===l},we.isFragment=function(h){return y(h)===r},we.isLazy=function(h){return y(h)===d},we.isMemo=function(h){return y(h)===f},we.isPortal=function(h){return y(h)===t},we.isProfiler=function(h){return y(h)===a},we.isStrictMode=function(h){return y(h)===n},we.isSuspense=function(h){return y(h)===u},we.isSuspenseList=function(h){return y(h)===c},we.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===r||h===a||h===n||h===u||h===c||h===p||typeof h=="object"&&h!==null&&(h.$$typeof===d||h.$$typeof===f||h.$$typeof===i||h.$$typeof===o||h.$$typeof===l||h.$$typeof===v||h.getModuleId!==void 0)},we.typeOf=y,we}var Oe={};/**
178
+ */var td;function AO(){if(td)return we;td=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"),p=Symbol.for("react.offscreen"),m;m=Symbol.for("react.module.reference");function y(v){if(typeof v=="object"&&v!==null){var b=v.$$typeof;switch(b){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 b}}case t:return b}}}return we.ContextConsumer=o,we.ContextProvider=i,we.Element=e,we.ForwardRef=l,we.Fragment=r,we.Lazy=d,we.Memo=f,we.Portal=t,we.Profiler=a,we.StrictMode=n,we.Suspense=u,we.SuspenseList=c,we.isAsyncMode=function(){return!1},we.isConcurrentMode=function(){return!1},we.isContextConsumer=function(v){return y(v)===o},we.isContextProvider=function(v){return y(v)===i},we.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===e},we.isForwardRef=function(v){return y(v)===l},we.isFragment=function(v){return y(v)===r},we.isLazy=function(v){return y(v)===d},we.isMemo=function(v){return y(v)===f},we.isPortal=function(v){return y(v)===t},we.isProfiler=function(v){return y(v)===a},we.isStrictMode=function(v){return y(v)===n},we.isSuspense=function(v){return y(v)===u},we.isSuspenseList=function(v){return y(v)===c},we.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===r||v===a||v===n||v===u||v===c||v===p||typeof v=="object"&&v!==null&&(v.$$typeof===d||v.$$typeof===f||v.$$typeof===i||v.$$typeof===o||v.$$typeof===l||v.$$typeof===m||v.getModuleId!==void 0)},we.typeOf=y,we}var Oe={};/**
119
179
  * @license React
120
180
  * react-is.development.js
121
181
  *
@@ -123,86 +183,86 @@ React keys must be passed directly to JSX without using spread:
123
183
  *
124
184
  * This source code is licensed under the MIT license found in the
125
185
  * LICENSE file in the root directory of this source tree.
126
- */var qf;function iO(){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"),p=Symbol.for("react.offscreen"),v=!1,y=!1,h=!1,b=!1,S=!1,x;x=Symbol.for("react.module.reference");function T(q){return!!(typeof q=="string"||typeof q=="function"||q===r||q===a||S||q===n||q===u||q===c||b||q===p||v||y||h||typeof q=="object"&&q!==null&&(q.$$typeof===d||q.$$typeof===f||q.$$typeof===i||q.$$typeof===o||q.$$typeof===l||q.$$typeof===x||q.getModuleId!==void 0))}function m(q){if(typeof q=="object"&&q!==null){var se=q.$$typeof;switch(se){case e:var ee=q.type;switch(ee){case r:case a:case n:case u:case c:return ee;default:var ve=ee&&ee.$$typeof;switch(ve){case s:case o:case l:case d:case f:case i:return ve;default:return se}}case t:return se}}}var w=o,O=i,P=e,j=l,M=r,_=d,$=f,R=t,k=a,D=n,C=u,B=c,U=!1,G=!1;function E(q){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function L(q){return G||(G=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function F(q){return m(q)===o}function W(q){return m(q)===i}function K(q){return typeof q=="object"&&q!==null&&q.$$typeof===e}function X(q){return m(q)===l}function Q(q){return m(q)===r}function ae(q){return m(q)===d}function te(q){return m(q)===f}function V(q){return m(q)===t}function Y(q){return m(q)===a}function J(q){return m(q)===n}function I(q){return m(q)===u}function ie(q){return m(q)===c}Oe.ContextConsumer=w,Oe.ContextProvider=O,Oe.Element=P,Oe.ForwardRef=j,Oe.Fragment=M,Oe.Lazy=_,Oe.Memo=$,Oe.Portal=R,Oe.Profiler=k,Oe.StrictMode=D,Oe.Suspense=C,Oe.SuspenseList=B,Oe.isAsyncMode=E,Oe.isConcurrentMode=L,Oe.isContextConsumer=F,Oe.isContextProvider=W,Oe.isElement=K,Oe.isForwardRef=X,Oe.isFragment=Q,Oe.isLazy=ae,Oe.isMemo=te,Oe.isPortal=V,Oe.isProfiler=Y,Oe.isStrictMode=J,Oe.isSuspense=I,Oe.isSuspenseList=ie,Oe.isValidElementType=T,Oe.typeOf=m}()),Oe}process.env.NODE_ENV==="production"?Js.exports=aO():Js.exports=iO();var oO=Js.exports,sO=Zt,lO=Jt,uO="[object Number]";function cO(e){return typeof e=="number"||lO(e)&&sO(e)==uO}var Hf=cO;const fO=Ce(Hf);var dO=Hf;function pO(e){return dO(e)&&e!=+e}var hO=pO;const sn=Ce(hO);var Ct=function(t){return t===0?0:t>0?1:-1},jr=function(t){return Er(t)&&t.indexOf("%")===t.length-1},Z=function(t){return fO(t)&&!sn(t)},vO=function(t){return fe(t)},Ye=function(t){return Z(t)||Er(t)},yO=0,$r=function(t){var r=++yO;return"".concat(t||"").concat(r)},Cr=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(!Z(t)&&!Er(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},pr=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},mO=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},Ue=function(t,r){return Z(t)&&Z(r)?function(n){return t+n*(r-t)}:function(){return r}};function Ni(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):wt(n,t))===r})}var gO=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}},bO=function(t,r){return Z(t)&&Z(r)?t-r:Er(t)&&Er(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 xO=["viewBox","children"],wO=["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"],Yf=["points","pathLength"],el={svg:xO,polygon:Yf,polyline:Yf},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"],Di=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(A.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},OO=function(t,r,n){return function(a){return t(r,n,a),null}},ha=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]=OO(o,r,n))}),a},SO=["children"],AO=["children"];function Xf(e,t){if(e==null)return{};var r=TO(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 TO(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 Zf={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"},Qt=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},Jf=null,nl=null,al=function e(t){if(t===Jf&&Array.isArray(nl))return nl;var r=[];return A.Children.forEach(t,function(n){fe(n)||(oO.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),nl=r,Jf=t,r};function dt(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(a){return Qt(a)}):n=[Qt(t)],al(e).forEach(function(a){var i=wt(a,"type.displayName")||wt(a,"type.name");n.indexOf(i)!==-1&&r.push(a)}),r}function yt(e,t){var r=dt(e,t);return r&&r[0]}var Qf=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,a=r.height;return!(!Z(n)||n<=0||!Z(a)||a<=0)},PO=["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"],_O=function(t){return t&&t.type&&Er(t.type)&&PO.indexOf(t.type)>=0},ed=function(t){return t&&rl(t)==="object"&&"clipDot"in t},EO=function(t,r,n,a){var i,o=(i=el==null?void 0:el[a])!==null&&i!==void 0?i:[];return r.startsWith("data-")||!pe(t)&&(a&&o.includes(r)||wO.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(A.isValidElement(t)&&(a=t.props),!rn(a))return null;var i={};return Object.keys(a).forEach(function(o){var s;EO((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=A.Children.count(t);if(n!==A.Children.count(r))return!1;if(n===0)return!0;if(n===1)return td(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(!td(i,o))return!1}return!0},td=function(t,r){if(fe(t)&&fe(r))return!0;if(!fe(t)&&!fe(r)){var n=t.props||{},a=n.children,i=Xf(n,SO),o=r.props||{},s=o.children,l=Xf(o,AO);return a&&s?ln(i,l)&&il(a,s):!a&&!s?ln(i,l):!1}return!1},rd=function(t,r){var n=[],a={};return al(t).forEach(function(i,o){if(_O(i))n.push(i);else if(i){var s=Qt(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},jO=function(t){var r=t&&t.type;return r&&Zf[r]?Zf[r]:null},$O=function(t,r){return al(r).indexOf(t)},CO=["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 kO(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}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=kO(e,CO),c=a||{width:r,height:n,x:0,y:0},f=ye("recharts-surface",i);return A.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)}),A.createElement("title",null,s),A.createElement("desc",null,l),t)}var NO=["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 DO(e,t){if(e==null)return{};var r=IO(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 IO(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 xe=A.forwardRef(function(e,t){var r=e.children,n=e.className,a=DO(e,NO),i=ye("recharts-layer",n);return A.createElement("g",ll({className:i},de(a,!0),{ref:t}),r)}),LO=process.env.NODE_ENV!=="production",er=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(LO&&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 RO(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 BO=RO,FO=BO;function WO(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:FO(e,t,r)}var UO=WO,zO="\\ud800-\\udfff",GO="\\u0300-\\u036f",KO="\\ufe20-\\ufe2f",VO="\\u20d0-\\u20ff",qO=GO+KO+VO,HO="\\ufe0e\\ufe0f",YO="\\u200d",XO=RegExp("["+YO+zO+qO+HO+"]");function ZO(e){return XO.test(e)}var nd=ZO;function JO(e){return e.split("")}var QO=JO,ad="\\ud800-\\udfff",eS="\\u0300-\\u036f",tS="\\ufe20-\\ufe2f",rS="\\u20d0-\\u20ff",nS=eS+tS+rS,aS="\\ufe0e\\ufe0f",iS="["+ad+"]",ul="["+nS+"]",cl="\\ud83c[\\udffb-\\udfff]",oS="(?:"+ul+"|"+cl+")",id="[^"+ad+"]",od="(?:\\ud83c[\\udde6-\\uddff]){2}",sd="[\\ud800-\\udbff][\\udc00-\\udfff]",sS="\\u200d",ld=oS+"?",ud="["+aS+"]?",lS="(?:"+sS+"(?:"+[id,od,sd].join("|")+")"+ud+ld+")*",uS=ud+ld+lS,cS="(?:"+[id+ul+"?",ul,od,sd,iS].join("|")+")",fS=RegExp(cl+"(?="+cl+")|"+cS+uS,"g");function dS(e){return e.match(fS)||[]}var pS=dS,hS=QO,vS=nd,yS=pS;function mS(e){return vS(e)?yS(e):hS(e)}var gS=mS,bS=UO,xS=nd,wS=gS,OS=zf;function SS(e){return function(t){t=OS(t);var r=xS(t)?wS(t):void 0,n=r?r[0]:t.charAt(0),a=r?bS(r,1).join(""):t.slice(1);return n[e]()+a}}var AS=SS,TS=AS,PS=TS("toUpperCase"),_S=PS;const Ii=Ce(_S);function ke(e){return function(){return e}}const cd=Math.cos,Li=Math.sin,kt=Math.sqrt,Ri=Math.PI,Bi=2*Ri,fl=Math.PI,dl=2*fl,kr=1e-6,ES=dl-kr;function fd(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function jS(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return fd;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 $S{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?fd:jS(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>kr)if(!(Math.abs(f*l-u*c)>kr)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-o,v=a-s,y=l*l+u*u,h=p*p+v*v,b=Math.sqrt(y),S=Math.sqrt(d),x=i*Math.tan((fl-Math.acos((y+d-h)/(2*b*S)))/2),T=x/S,m=x/b;Math.abs(T-1)>kr&&this._append`L${t+T*c},${r+T*f}`,this._append`A${i},${i},0,0,${+(f*p>c*v)},${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)>kr||Math.abs(this._y1-c)>kr)&&this._append`L${u},${c}`,n&&(d<0&&(d=d%dl+dl),d>ES?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>kr&&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 pl(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 $S(t)}function hl(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function dd(e){this._context=e}dd.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 Fi(e){return new dd(e)}function pd(e){return e[0]}function hd(e){return e[1]}function vd(e,t){var r=ke(!0),n=null,a=Fi,i=null,o=pl(s);e=typeof e=="function"?e:e===void 0?pd:ke(e),t=typeof t=="function"?t:t===void 0?hd:ke(t);function s(l){var u,c=(l=hl(l)).length,f,d=!1,p;for(n==null&&(i=a(p=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(p)return i=null,p+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:ke(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:ke(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:ke(!!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 Wi(e,t,r){var n=null,a=ke(!0),i=null,o=Fi,s=null,l=pl(u);e=typeof e=="function"?e:e===void 0?pd:ke(+e),t=typeof t=="function"?t:ke(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?hd:ke(+r);function u(f){var d,p,v,y=(f=hl(f)).length,h,b=!1,S,x=new Array(y),T=new Array(y);for(i==null&&(s=o(S=l())),d=0;d<=y;++d){if(!(d<y&&a(h=f[d],d,f))===b)if(b=!b)p=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),v=d-1;v>=p;--v)s.point(x[v],T[v]);s.lineEnd(),s.areaEnd()}b&&(x[d]=+e(h,d,f),T[d]=+t(h,d,f),s.point(n?+n(h,d,f):x[d],r?+r(h,d,f):T[d]))}if(S)return s=null,S+""||null}function c(){return vd().defined(a).curve(o).context(i)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:ke(+f),n=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:ke(+f),u):e},u.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:ke(+f),u):n},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:ke(+f),r=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:ke(+f),u):t},u.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:ke(+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:ke(!!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 yd{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 CS(e){return new yd(e,!0)}function kS(e){return new yd(e,!1)}const vl={draw(e,t){const r=kt(t/Ri);e.moveTo(r,0),e.arc(0,0,r,0,Bi)}},MS={draw(e,t){const r=kt(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()}},md=kt(1/3),NS=md*2,DS={draw(e,t){const r=kt(t/NS),n=r*md;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},IS={draw(e,t){const r=kt(t),n=-r/2;e.rect(n,n,r,r)}},LS=.8908130915292852,gd=Li(Ri/10)/Li(7*Ri/10),RS=Li(Bi/10)*gd,BS=-cd(Bi/10)*gd,FS={draw(e,t){const r=kt(t*LS),n=RS*r,a=BS*r;e.moveTo(0,-r),e.lineTo(n,a);for(let i=1;i<5;++i){const o=Bi*i/5,s=cd(o),l=Li(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*a,l*n+s*a)}e.closePath()}},yl=kt(3),WS={draw(e,t){const r=-kt(t/(yl*3));e.moveTo(0,r*2),e.lineTo(-yl*r,-r),e.lineTo(yl*r,-r),e.closePath()}},Ot=-.5,St=kt(3)/2,ml=1/kt(12),US=(ml/2+1)*3,zS={draw(e,t){const r=kt(t/US),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(Ot*n-St*a,St*n+Ot*a),e.lineTo(Ot*i-St*o,St*i+Ot*o),e.lineTo(Ot*s-St*l,St*s+Ot*l),e.lineTo(Ot*n+St*a,Ot*a-St*n),e.lineTo(Ot*i+St*o,Ot*o-St*i),e.lineTo(Ot*s+St*l,Ot*l-St*s),e.closePath()}};function GS(e,t){let r=null,n=pl(a);e=typeof e=="function"?e:ke(e||vl),t=typeof t=="function"?t:ke(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:ke(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:ke(+i),a):t},a.context=function(i){return arguments.length?(r=i??null,a):r},a}function Ui(){}function zi(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function 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(){switch(this._point){case 3:zi(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:zi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function KS(e){return new bd(e)}function xd(e){this._context=e}xd.prototype={areaStart:Ui,areaEnd:Ui,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:zi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function VS(e){return new xd(e)}function wd(e){this._context=e}wd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:zi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function qS(e){return new wd(e)}function Od(e){this._context=e}Od.prototype={areaStart:Ui,areaEnd:Ui,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 HS(e){return new Od(e)}function Sd(e){return e<0?-1:1}function Ad(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(Sd(i)+Sd(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(s))||0}function Td(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 Gi(e){this._context=e}Gi.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,Td(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,Td(this,r=Ad(this,e,t)),r);break;default:gl(this,this._t0,r=Ad(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Pd(e){this._context=new _d(e)}(Pd.prototype=Object.create(Gi.prototype)).point=function(e,t){Gi.prototype.point.call(this,t,e)};function _d(e){this._context=e}_d.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 YS(e){return new Gi(e)}function XS(e){return new Pd(e)}function Ed(e){this._context=e}Ed.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=jd(e),a=jd(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 jd(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 ZS(e){return new Ed(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 JS(e){return new Ki(e,.5)}function QS(e){return new Ki(e,0)}function eA(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 tA(e,t){return e[t]}function rA(e){const t=[];return t.key=e,t}function nA(){var e=ke([]),t=bl,r=un,n=tA;function a(i){var o=Array.from(e.apply(this,arguments),rA),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=hl(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:ke(Array.from(i)),a):e},a.value=function(i){return arguments.length?(n=typeof i=="function"?i:ke(+i),a):n},a.order=function(i){return arguments.length?(t=i==null?bl:typeof i=="function"?i:ke(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(r=i??un,a):r},a}function aA(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 iA(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 oA(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,p=(f-d)/2,v=0;v<s;++v){var y=e[t[v]],h=y[n][1]||0,b=y[n-1][1]||0;p+=h-b}l+=f,u+=p*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 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)}var sA=["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 $d(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 Cd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$d(Object(r),!0).forEach(function(n){lA(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$d(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lA(e,t,r){return t=uA(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uA(e){var t=cA(e,"string");return va(t)=="symbol"?t:t+""}function cA(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)}function fA(e,t){if(e==null)return{};var r=dA(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 dA(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 kd={symbolCircle:vl,symbolCross:MS,symbolDiamond:DS,symbolSquare:IS,symbolStar:FS,symbolTriangle:WS,symbolWye:zS},pA=Math.PI/180,hA=function(t){var r="symbol".concat(Ii(t));return kd[r]||vl},vA=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*pA;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}},yA=function(t,r){kd["symbol".concat(Ii(t))]=r},Vi=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=fA(t,sA),u=Cd(Cd({},l),{},{type:n,size:i,sizeType:s}),c=function(){var h=hA(n),b=GS().type(h).size(vA(i,s,n));return b()},f=u.className,d=u.cx,p=u.cy,v=de(u,!0);return d===+d&&p===+p&&i===+i?A.createElement("path",xl({},v,{className:ye("recharts-symbols",f),transform:"translate(".concat(d,", ").concat(p,")"),d:c()})):null};Vi.registerSymbol=yA;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 Md(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 mA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Md(Object(r),!0).forEach(function(n){ya(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Md(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bA(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,Dd(n.key),n)}}function xA(e,t,r){return t&&bA(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wA(e,t,r){return t=qi(t),OA(e,Nd()?Reflect.construct(t,r||[],qi(e).constructor):t.apply(e,r))}function OA(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 SA(e)}function SA(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Nd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Nd=function(){return!!e})()}function qi(e){return qi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qi(e)}function AA(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 ya(e,t,r){return t=Dd(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dd(e){var t=TA(e,"string");return cn(t)=="symbol"?t:t+""}function TA(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 At=32,Sl=function(e){function t(){return gA(this,t),wA(this,t,arguments)}return AA(t,e),xA(t,[{key:"renderIcon",value:function(n){var a=this.props.inactiveColor,i=At/2,o=At/6,s=At/3,l=n.inactive?a:n.color;if(n.type==="plainline")return A.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:i,x2:At,y2:i,className:"recharts-legend-icon"});if(n.type==="line")return A.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(i,"h").concat(s,`
186
+ */var rd;function PO(){return rd||(rd=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"),p=Symbol.for("react.offscreen"),m=!1,y=!1,v=!1,b=!1,w=!1,x;x=Symbol.for("react.module.reference");function A(q){return!!(typeof q=="string"||typeof q=="function"||q===r||q===a||w||q===n||q===u||q===c||b||q===p||m||y||v||typeof q=="object"&&q!==null&&(q.$$typeof===d||q.$$typeof===f||q.$$typeof===i||q.$$typeof===o||q.$$typeof===l||q.$$typeof===x||q.getModuleId!==void 0))}function g(q){if(typeof q=="object"&&q!==null){var ue=q.$$typeof;switch(ue){case e:var ee=q.type;switch(ee){case r:case a:case n:case u:case c:return ee;default:var ve=ee&&ee.$$typeof;switch(ve){case s:case o:case l:case d:case f:case i:return ve;default:return ue}}case t:return ue}}}var O=o,S=i,j=e,C=l,M=r,P=d,_=f,I=t,$=a,D=n,k=u,B=c,z=!1,G=!1;function E(q){return z||(z=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function R(q){return G||(G=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function F(q){return g(q)===o}function W(q){return g(q)===i}function V(q){return typeof q=="object"&&q!==null&&q.$$typeof===e}function X(q){return g(q)===l}function Q(q){return g(q)===r}function ae(q){return g(q)===d}function te(q){return g(q)===f}function K(q){return g(q)===t}function Y(q){return g(q)===a}function J(q){return g(q)===n}function L(q){return g(q)===u}function ie(q){return g(q)===c}Oe.ContextConsumer=O,Oe.ContextProvider=S,Oe.Element=j,Oe.ForwardRef=C,Oe.Fragment=M,Oe.Lazy=P,Oe.Memo=_,Oe.Portal=I,Oe.Profiler=$,Oe.StrictMode=D,Oe.Suspense=k,Oe.SuspenseList=B,Oe.isAsyncMode=E,Oe.isConcurrentMode=R,Oe.isContextConsumer=F,Oe.isContextProvider=W,Oe.isElement=V,Oe.isForwardRef=X,Oe.isFragment=Q,Oe.isLazy=ae,Oe.isMemo=te,Oe.isPortal=K,Oe.isProfiler=Y,Oe.isStrictMode=J,Oe.isSuspense=L,Oe.isSuspenseList=ie,Oe.isValidElementType=A,Oe.typeOf=g}()),Oe}process.env.NODE_ENV==="production"?rl.exports=AO():rl.exports=PO();var jO=rl.exports,_O=Zt,EO=Jt,CO="[object Number]";function $O(e){return typeof e=="number"||EO(e)&&_O(e)==CO}var nd=$O;const kO=$e(nd);var MO=nd;function NO(e){return MO(e)&&e!=+e}var DO=NO;const ln=$e(DO);var $t=function(t){return t===0?0:t>0?1:-1},Er=function(t){return _r(t)&&t.indexOf("%")===t.length-1},Z=function(t){return kO(t)&&!ln(t)},IO=function(t){return fe(t)},Xe=function(t){return Z(t)||_r(t)},LO=0,Cr=function(t){var r=++LO;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(!Z(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 ln(i)&&(i=n),a&&i>r&&(i=r),i},pr=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},RO=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},Ue=function(t,r){return Z(t)&&Z(r)?function(n){return t+n*(r-t)}:function(){return r}};function Ii(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):wt(n,t))===r})}var BO=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}},FO=function(t,r){return Z(t)&&Z(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 un(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 nl(e){"@babel/helpers - typeof";return nl=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},nl(e)}var WO=["viewBox","children"],zO=["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"],ad=["points","pathLength"],al={svg:WO,polygon:ad,polyline:ad},il=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],Li=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(T.isValidElement(t)&&(n=t.props),!nn(n))return null;var a={};return Object.keys(n).forEach(function(i){il.includes(i)&&(a[i]=r||function(o){return n[i](n,o)})}),a},UO=function(t,r,n){return function(a){return t(r,n,a),null}},ma=function(t,r,n){if(!nn(t)||nl(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var o=t[i];il.includes(i)&&typeof o=="function"&&(a||(a={}),a[i]=UO(o,r,n))}),a},GO=["children"],VO=["children"];function id(e,t){if(e==null)return{};var r=KO(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 KO(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function ol(e){"@babel/helpers - typeof";return ol=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},ol(e)}var od={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"},Qt=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},sd=null,sl=null,ll=function e(t){if(t===sd&&Array.isArray(sl))return sl;var r=[];return T.Children.forEach(t,function(n){fe(n)||(jO.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),sl=r,sd=t,r};function dt(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(a){return Qt(a)}):n=[Qt(t)],ll(e).forEach(function(a){var i=wt(a,"type.displayName")||wt(a,"type.name");n.indexOf(i)!==-1&&r.push(a)}),r}function mt(e,t){var r=dt(e,t);return r&&r[0]}var ld=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,a=r.height;return!(!Z(n)||n<=0||!Z(a)||a<=0)},qO=["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"],HO=function(t){return t&&t.type&&_r(t.type)&&qO.indexOf(t.type)>=0},ud=function(t){return t&&ol(t)==="object"&&"clipDot"in t},YO=function(t,r,n,a){var i,o=(i=al==null?void 0:al[a])!==null&&i!==void 0?i:[];return r.startsWith("data-")||!pe(t)&&(a&&o.includes(r)||zO.includes(r))||n&&il.includes(r)},de=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(T.isValidElement(t)&&(a=t.props),!nn(a))return null;var i={};return Object.keys(a).forEach(function(o){var s;YO((s=a)===null||s===void 0?void 0:s[o],o,r,n)&&(i[o]=a[o])}),i},ul=function e(t,r){if(t===r)return!0;var n=T.Children.count(t);if(n!==T.Children.count(r))return!1;if(n===0)return!0;if(n===1)return cd(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(!cd(i,o))return!1}return!0},cd=function(t,r){if(fe(t)&&fe(r))return!0;if(!fe(t)&&!fe(r)){var n=t.props||{},a=n.children,i=id(n,GO),o=r.props||{},s=o.children,l=id(o,VO);return a&&s?un(i,l)&&ul(a,s):!a&&!s?un(i,l):!1}return!1},fd=function(t,r){var n=[],a={};return ll(t).forEach(function(i,o){if(HO(i))n.push(i);else if(i){var s=Qt(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},XO=function(t){var r=t&&t.type;return r&&od[r]?od[r]:null},ZO=function(t,r){return ll(r).indexOf(t)},JO=["children","width","height","viewBox","className","style","title","desc"];function cl(){return cl=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},cl.apply(this,arguments)}function QO(e,t){if(e==null)return{};var r=eS(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 eS(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 fl(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=QO(e,JO),c=a||{width:r,height:n,x:0,y:0},f=me("recharts-surface",i);return T.createElement("svg",cl({},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)}),T.createElement("title",null,s),T.createElement("desc",null,l),t)}var tS=["children","className"];function dl(){return dl=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},dl.apply(this,arguments)}function rS(e,t){if(e==null)return{};var r=nS(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 nS(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 xe=T.forwardRef(function(e,t){var r=e.children,n=e.className,a=rS(e,tS),i=me("recharts-layer",n);return T.createElement("g",dl({className:i},de(a,!0),{ref:t}),r)}),aS=process.env.NODE_ENV!=="production",er=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(aS&&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 iS(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 oS=iS,sS=oS;function lS(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:sS(e,t,r)}var uS=lS,cS="\\ud800-\\udfff",fS="\\u0300-\\u036f",dS="\\ufe20-\\ufe2f",pS="\\u20d0-\\u20ff",hS=fS+dS+pS,vS="\\ufe0e\\ufe0f",mS="\\u200d",yS=RegExp("["+mS+cS+hS+vS+"]");function gS(e){return yS.test(e)}var dd=gS;function bS(e){return e.split("")}var xS=bS,pd="\\ud800-\\udfff",wS="\\u0300-\\u036f",OS="\\ufe20-\\ufe2f",SS="\\u20d0-\\u20ff",TS=wS+OS+SS,AS="\\ufe0e\\ufe0f",PS="["+pd+"]",pl="["+TS+"]",hl="\\ud83c[\\udffb-\\udfff]",jS="(?:"+pl+"|"+hl+")",hd="[^"+pd+"]",vd="(?:\\ud83c[\\udde6-\\uddff]){2}",md="[\\ud800-\\udbff][\\udc00-\\udfff]",_S="\\u200d",yd=jS+"?",gd="["+AS+"]?",ES="(?:"+_S+"(?:"+[hd,vd,md].join("|")+")"+gd+yd+")*",CS=gd+yd+ES,$S="(?:"+[hd+pl+"?",pl,vd,md,PS].join("|")+")",kS=RegExp(hl+"(?="+hl+")|"+$S+CS,"g");function MS(e){return e.match(kS)||[]}var NS=MS,DS=xS,IS=dd,LS=NS;function RS(e){return IS(e)?LS(e):DS(e)}var BS=RS,FS=uS,WS=dd,zS=BS,US=Jf;function GS(e){return function(t){t=US(t);var r=WS(t)?zS(t):void 0,n=r?r[0]:t.charAt(0),a=r?FS(r,1).join(""):t.slice(1);return n[e]()+a}}var VS=GS,KS=VS,qS=KS("toUpperCase"),HS=qS;const Ri=$e(HS);function Me(e){return function(){return e}}const bd=Math.cos,Bi=Math.sin,kt=Math.sqrt,Fi=Math.PI,Wi=2*Fi,vl=Math.PI,ml=2*vl,kr=1e-6,YS=ml-kr;function xd(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function XS(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return xd;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 ZS{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?xd:XS(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>kr)if(!(Math.abs(f*l-u*c)>kr)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-o,m=a-s,y=l*l+u*u,v=p*p+m*m,b=Math.sqrt(y),w=Math.sqrt(d),x=i*Math.tan((vl-Math.acos((y+d-v)/(2*b*w)))/2),A=x/w,g=x/b;Math.abs(A-1)>kr&&this._append`L${t+A*c},${r+A*f}`,this._append`A${i},${i},0,0,${+(f*p>c*m)},${this._x1=t+g*l},${this._y1=r+g*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)>kr||Math.abs(this._y1-c)>kr)&&this._append`L${u},${c}`,n&&(d<0&&(d=d%ml+ml),d>YS?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>kr&&this._append`A${n},${n},0,${+(d>=vl)},${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 yl(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 ZS(t)}function gl(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function wd(e){this._context=e}wd.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 zi(e){return new wd(e)}function Od(e){return e[0]}function Sd(e){return e[1]}function Td(e,t){var r=Me(!0),n=null,a=zi,i=null,o=yl(s);e=typeof e=="function"?e:e===void 0?Od:Me(e),t=typeof t=="function"?t:t===void 0?Sd:Me(t);function s(l){var u,c=(l=gl(l)).length,f,d=!1,p;for(n==null&&(i=a(p=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(p)return i=null,p+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:Me(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:Me(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Me(!!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 Ui(e,t,r){var n=null,a=Me(!0),i=null,o=zi,s=null,l=yl(u);e=typeof e=="function"?e:e===void 0?Od:Me(+e),t=typeof t=="function"?t:Me(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?Sd:Me(+r);function u(f){var d,p,m,y=(f=gl(f)).length,v,b=!1,w,x=new Array(y),A=new Array(y);for(i==null&&(s=o(w=l())),d=0;d<=y;++d){if(!(d<y&&a(v=f[d],d,f))===b)if(b=!b)p=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),m=d-1;m>=p;--m)s.point(x[m],A[m]);s.lineEnd(),s.areaEnd()}b&&(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(w)return s=null,w+""||null}function c(){return Td().defined(a).curve(o).context(i)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:Me(+f),n=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Me(+f),u):e},u.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Me(+f),u):n},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:Me(+f),r=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Me(+f),u):t},u.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Me(+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:Me(!!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 Ad{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 JS(e){return new Ad(e,!0)}function QS(e){return new Ad(e,!1)}const bl={draw(e,t){const r=kt(t/Fi);e.moveTo(r,0),e.arc(0,0,r,0,Wi)}},eT={draw(e,t){const r=kt(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()}},Pd=kt(1/3),tT=Pd*2,rT={draw(e,t){const r=kt(t/tT),n=r*Pd;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},nT={draw(e,t){const r=kt(t),n=-r/2;e.rect(n,n,r,r)}},aT=.8908130915292852,jd=Bi(Fi/10)/Bi(7*Fi/10),iT=Bi(Wi/10)*jd,oT=-bd(Wi/10)*jd,sT={draw(e,t){const r=kt(t*aT),n=iT*r,a=oT*r;e.moveTo(0,-r),e.lineTo(n,a);for(let i=1;i<5;++i){const o=Wi*i/5,s=bd(o),l=Bi(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*a,l*n+s*a)}e.closePath()}},xl=kt(3),lT={draw(e,t){const r=-kt(t/(xl*3));e.moveTo(0,r*2),e.lineTo(-xl*r,-r),e.lineTo(xl*r,-r),e.closePath()}},Ot=-.5,St=kt(3)/2,wl=1/kt(12),uT=(wl/2+1)*3,cT={draw(e,t){const r=kt(t/uT),n=r/2,a=r*wl,i=n,o=r*wl+r,s=-i,l=o;e.moveTo(n,a),e.lineTo(i,o),e.lineTo(s,l),e.lineTo(Ot*n-St*a,St*n+Ot*a),e.lineTo(Ot*i-St*o,St*i+Ot*o),e.lineTo(Ot*s-St*l,St*s+Ot*l),e.lineTo(Ot*n+St*a,Ot*a-St*n),e.lineTo(Ot*i+St*o,Ot*o-St*i),e.lineTo(Ot*s+St*l,Ot*l-St*s),e.closePath()}};function fT(e,t){let r=null,n=yl(a);e=typeof e=="function"?e:Me(e||bl),t=typeof t=="function"?t:Me(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:Me(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Me(+i),a):t},a.context=function(i){return arguments.length?(r=i??null,a):r},a}function Gi(){}function Vi(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 _d(e){this._context=e}_d.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:Vi(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:Vi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function dT(e){return new _d(e)}function Ed(e){this._context=e}Ed.prototype={areaStart:Gi,areaEnd:Gi,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:Vi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function pT(e){return new Ed(e)}function Cd(e){this._context=e}Cd.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:Vi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function hT(e){return new Cd(e)}function $d(e){this._context=e}$d.prototype={areaStart:Gi,areaEnd:Gi,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 vT(e){return new $d(e)}function kd(e){return e<0?-1:1}function Md(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(kd(i)+kd(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(s))||0}function Nd(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Ol(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 Ki(e){this._context=e}Ki.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:Ol(this,this._t0,Nd(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,Ol(this,Nd(this,r=Md(this,e,t)),r);break;default:Ol(this,this._t0,r=Md(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 Id(e)}(Dd.prototype=Object.create(Ki.prototype)).point=function(e,t){Ki.prototype.point.call(this,t,e)};function Id(e){this._context=e}Id.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 mT(e){return new Ki(e)}function yT(e){return new Dd(e)}function Ld(e){this._context=e}Ld.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=Rd(e),a=Rd(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 Rd(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 gT(e){return new Ld(e)}function qi(e,t){this._context=e,this._t=t}qi.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 bT(e){return new qi(e,.5)}function xT(e){return new qi(e,0)}function wT(e){return new qi(e,1)}function cn(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 Sl(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function OT(e,t){return e[t]}function ST(e){const t=[];return t.key=e,t}function TT(){var e=Me([]),t=Sl,r=cn,n=OT;function a(i){var o=Array.from(e.apply(this,arguments),ST),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=gl(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:Me(Array.from(i)),a):e},a.value=function(i){return arguments.length?(n=typeof i=="function"?i:Me(+i),a):n},a.order=function(i){return arguments.length?(t=i==null?Sl:typeof i=="function"?i:Me(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(r=i??cn,a):r},a}function AT(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}cn(e,t)}}function PT(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}cn(e,t)}}function jT(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,p=(f-d)/2,m=0;m<s;++m){var y=e[t[m]],v=y[n][1]||0,b=y[n-1][1]||0;p+=v-b}l+=f,u+=p*f}a[n-1][1]+=a[n-1][0]=r,l&&(r-=u/l)}a[n-1][1]+=a[n-1][0]=r,cn(e,t)}}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)}var _T=["type","size","sizeType"];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 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 Fd(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){ET(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 ET(e,t,r){return t=CT(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CT(e){var t=$T(e,"string");return ya(t)=="symbol"?t:t+""}function $T(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 kT(e,t){if(e==null)return{};var r=MT(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 MT(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 Wd={symbolCircle:bl,symbolCross:eT,symbolDiamond:rT,symbolSquare:nT,symbolStar:sT,symbolTriangle:lT,symbolWye:cT},NT=Math.PI/180,DT=function(t){var r="symbol".concat(Ri(t));return Wd[r]||bl},IT=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*NT;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}},LT=function(t,r){Wd["symbol".concat(Ri(t))]=r},Hi=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=kT(t,_T),u=Fd(Fd({},l),{},{type:n,size:i,sizeType:s}),c=function(){var v=DT(n),b=fT().type(v).size(IT(i,s,n));return b()},f=u.className,d=u.cx,p=u.cy,m=de(u,!0);return d===+d&&p===+p&&i===+i?T.createElement("path",Tl({},m,{className:me("recharts-symbols",f),transform:"translate(".concat(d,", ").concat(p,")"),d:c()})):null};Hi.registerSymbol=LT;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 Al(){return Al=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},Al.apply(this,arguments)}function zd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(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?zd(Object(r),!0).forEach(function(n){ga(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function BT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FT(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,Gd(n.key),n)}}function WT(e,t,r){return t&&FT(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function zT(e,t,r){return t=Yi(t),UT(e,Ud()?Reflect.construct(t,r||[],Yi(e).constructor):t.apply(e,r))}function UT(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 GT(e)}function GT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ud(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ud=function(){return!!e})()}function Yi(e){return Yi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Yi(e)}function VT(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&&Pl(e,t)}function Pl(e,t){return Pl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Pl(e,t)}function ga(e,t,r){return t=Gd(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gd(e){var t=KT(e,"string");return fn(t)=="symbol"?t:t+""}function KT(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 Tt=32,jl=function(e){function t(){return BT(this,t),zT(this,t,arguments)}return VT(t,e),WT(t,[{key:"renderIcon",value:function(n){var a=this.props.inactiveColor,i=Tt/2,o=Tt/6,s=Tt/3,l=n.inactive?a:n.color;if(n.type==="plainline")return T.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:i,x2:Tt,y2:i,className:"recharts-legend-icon"});if(n.type==="line")return T.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(i,"h").concat(s,`
127
187
  A`).concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(i,`
128
- H`).concat(At,"M").concat(2*s,",").concat(i,`
129
- A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(i),className:"recharts-legend-icon"});if(n.type==="rect")return A.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(At/8,"h").concat(At,"v").concat(At*3/4,"h").concat(-At,"z"),className:"recharts-legend-icon"});if(A.isValidElement(n.legendIcon)){var u=mA({},n);return delete u.legendIcon,A.cloneElement(n.legendIcon,u)}return A.createElement(Vi,{fill:l,cx:i,cy:i,size:At,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:At,height:At},f={display:s==="horizontal"?"inline-block":"block",marginRight:10},d={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(p,v){var y=p.formatter||l,h=ye(ya(ya({"recharts-legend-item":!0},"legend-item-".concat(v),!0),"inactive",p.inactive));if(p.type==="none")return null;var b=pe(p.value)?null:p.value;er(!pe(p.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 S=p.inactive?u:p.color;return A.createElement("li",wl({className:h,style:f,key:"legend-item-".concat(v)},ha(n.props,p,v)),A.createElement(sl,{width:o,height:o,viewBox:c,style:d},n.renderIcon(p)),A.createElement("span",{className:"recharts-legend-item-text",style:{color:S}},y?y(b,p,v):b))})}},{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 A.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(A.PureComponent);ya(Sl,"displayName","Legend"),ya(Sl,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var PA=Ci;function _A(){this.__data__=new PA,this.size=0}var EA=_A;function jA(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var $A=jA;function CA(e){return this.__data__.get(e)}var kA=CA;function MA(e){return this.__data__.has(e)}var NA=MA,DA=Ci,IA=qs,LA=Hs,RA=200;function BA(e,t){var r=this.__data__;if(r instanceof DA){var n=r.__data__;if(!IA||n.length<RA-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new LA(n)}return r.set(e,t),this.size=r.size,this}var FA=BA,WA=Ci,UA=EA,zA=$A,GA=kA,KA=NA,VA=FA;function fn(e){var t=this.__data__=new WA(e);this.size=t.size}fn.prototype.clear=UA,fn.prototype.delete=zA,fn.prototype.get=GA,fn.prototype.has=KA,fn.prototype.set=VA;var Id=fn,qA="__lodash_hash_undefined__";function HA(e){return this.__data__.set(e,qA),this}var YA=HA;function XA(e){return this.__data__.has(e)}var ZA=XA,JA=Hs,QA=YA,eT=ZA;function Hi(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new JA;++t<r;)this.add(e[t])}Hi.prototype.add=Hi.prototype.push=QA,Hi.prototype.has=eT;var Ld=Hi;function tT(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 Rd=tT;function rT(e,t){return e.has(t)}var Bd=rT,nT=Ld,aT=Rd,iT=Bd,oT=1,sT=2;function lT(e,t,r,n,a,i){var o=r&oT,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,p=r&sT?new nT:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var v=e[f],y=t[f];if(n)var h=o?n(y,v,f,t,e,i):n(v,y,f,e,t,i);if(h!==void 0){if(h)continue;d=!1;break}if(p){if(!aT(t,function(b,S){if(!iT(p,S)&&(v===b||a(v,b,r,n,i)))return p.push(S)})){d=!1;break}}else if(!(v===y||a(v,y,r,n,i))){d=!1;break}}return i.delete(e),i.delete(t),d}var Fd=lT,uT=Ft,cT=uT.Uint8Array,fT=cT;function dT(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var pT=dT;function hT(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Al=hT,Wd=da,Ud=fT,vT=Vs,yT=Fd,mT=pT,gT=Al,bT=1,xT=2,wT="[object Boolean]",OT="[object Date]",ST="[object Error]",AT="[object Map]",TT="[object Number]",PT="[object RegExp]",_T="[object Set]",ET="[object String]",jT="[object Symbol]",$T="[object ArrayBuffer]",CT="[object DataView]",zd=Wd?Wd.prototype:void 0,Tl=zd?zd.valueOf:void 0;function kT(e,t,r,n,a,i,o){switch(r){case CT:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case $T:return!(e.byteLength!=t.byteLength||!i(new Ud(e),new Ud(t)));case wT:case OT:case TT:return vT(+e,+t);case ST:return e.name==t.name&&e.message==t.message;case PT:case ET:return e==t+"";case AT:var s=mT;case _T:var l=n&bT;if(s||(s=gT),e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;n|=xT,o.set(e,t);var c=yT(s(e),s(t),n,a,i,o);return o.delete(e),c;case jT:if(Tl)return Tl.call(e)==Tl.call(t)}return!1}var MT=kT;function NT(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var Gd=NT,DT=Gd,IT=ft;function LT(e,t,r){var n=t(e);return IT(e)?n:DT(n,r(e))}var RT=LT;function BT(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 FT=BT;function WT(){return[]}var UT=WT,zT=FT,GT=UT,KT=Object.prototype,VT=KT.propertyIsEnumerable,Kd=Object.getOwnPropertySymbols,qT=Kd?function(e){return e==null?[]:(e=Object(e),zT(Kd(e),function(t){return VT.call(e,t)}))}:GT,HT=qT;function YT(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var XT=YT,ZT=Zt,JT=Jt,QT="[object Arguments]";function eP(e){return JT(e)&&ZT(e)==QT}var tP=eP,Vd=tP,rP=Jt,qd=Object.prototype,nP=qd.hasOwnProperty,aP=qd.propertyIsEnumerable,iP=Vd(function(){return arguments}())?Vd:function(e){return rP(e)&&nP.call(e,"callee")&&!aP.call(e,"callee")},Pl=iP,Yi={exports:{}};function oP(){return!1}var sP=oP;Yi.exports,function(e,t){var r=Ft,n=sP,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}(Yi,Yi.exports);var Hd=Yi.exports,lP=9007199254740991,uP=/^(?:0|[1-9]\d*)$/;function cP(e,t){var r=typeof e;return t=t??lP,!!t&&(r=="number"||r!="symbol"&&uP.test(e))&&e>-1&&e%1==0&&e<t}var _l=cP,fP=9007199254740991;function dP(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=fP}var El=dP,pP=Zt,hP=El,vP=Jt,yP="[object Arguments]",mP="[object Array]",gP="[object Boolean]",bP="[object Date]",xP="[object Error]",wP="[object Function]",OP="[object Map]",SP="[object Number]",AP="[object Object]",TP="[object RegExp]",PP="[object Set]",_P="[object String]",EP="[object WeakMap]",jP="[object ArrayBuffer]",$P="[object DataView]",CP="[object Float32Array]",kP="[object Float64Array]",MP="[object Int8Array]",NP="[object Int16Array]",DP="[object Int32Array]",IP="[object Uint8Array]",LP="[object Uint8ClampedArray]",RP="[object Uint16Array]",BP="[object Uint32Array]",De={};De[CP]=De[kP]=De[MP]=De[NP]=De[DP]=De[IP]=De[LP]=De[RP]=De[BP]=!0,De[yP]=De[mP]=De[jP]=De[gP]=De[$P]=De[bP]=De[xP]=De[wP]=De[OP]=De[SP]=De[AP]=De[TP]=De[PP]=De[_P]=De[EP]=!1;function FP(e){return vP(e)&&hP(e.length)&&!!De[pP(e)]}var WP=FP;function UP(e){return function(t){return e(t)}}var Yd=UP,Xi={exports:{}};Xi.exports,function(e,t){var r=Ef,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}(Xi,Xi.exports);var zP=Xi.exports,GP=WP,KP=Yd,Xd=zP,Zd=Xd&&Xd.isTypedArray,VP=Zd?KP(Zd):GP,Jd=VP,qP=XT,HP=Pl,YP=ft,XP=Hd,ZP=_l,JP=Jd,QP=Object.prototype,e_=QP.hasOwnProperty;function t_(e,t){var r=YP(e),n=!r&&HP(e),a=!r&&!n&&XP(e),i=!r&&!n&&!a&&JP(e),o=r||n||a||i,s=o?qP(e.length,String):[],l=s.length;for(var u in e)(t||e_.call(e,u))&&!(o&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||ZP(u,l)))&&s.push(u);return s}var r_=t_,n_=Object.prototype;function a_(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||n_;return e===r}var i_=a_;function o_(e,t){return function(r){return e(t(r))}}var Qd=o_,s_=Qd,l_=s_(Object.keys,Object),u_=l_,c_=i_,f_=u_,d_=Object.prototype,p_=d_.hasOwnProperty;function h_(e){if(!c_(e))return f_(e);var t=[];for(var r in Object(e))p_.call(e,r)&&r!="constructor"&&t.push(r);return t}var v_=h_,y_=Gs,m_=El;function g_(e){return e!=null&&m_(e.length)&&!y_(e)}var ma=g_,b_=r_,x_=v_,w_=ma;function O_(e){return w_(e)?b_(e):x_(e)}var Zi=O_,S_=RT,A_=HT,T_=Zi;function P_(e){return S_(e,T_,A_)}var __=P_,ep=__,E_=1,j_=Object.prototype,$_=j_.hasOwnProperty;function C_(e,t,r,n,a,i){var o=r&E_,s=ep(e),l=s.length,u=ep(t),c=u.length;if(l!=c&&!o)return!1;for(var f=l;f--;){var d=s[f];if(!(o?d in t:$_.call(t,d)))return!1}var p=i.get(e),v=i.get(t);if(p&&v)return p==t&&v==e;var y=!0;i.set(e,t),i.set(t,e);for(var h=o;++f<l;){d=s[f];var b=e[d],S=t[d];if(n)var x=o?n(S,b,d,t,e,i):n(b,S,d,e,t,i);if(!(x===void 0?b===S||a(b,S,r,n,i):x)){y=!1;break}h||(h=d=="constructor")}if(y&&!h){var T=e.constructor,m=t.constructor;T!=m&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof m=="function"&&m instanceof m)&&(y=!1)}return i.delete(e),i.delete(t),y}var k_=C_,M_=_r,N_=Ft,D_=M_(N_,"DataView"),I_=D_,L_=_r,R_=Ft,B_=L_(R_,"Promise"),F_=B_,W_=_r,U_=Ft,z_=W_(U_,"Set"),tp=z_,G_=_r,K_=Ft,V_=G_(K_,"WeakMap"),q_=V_,jl=I_,$l=qs,Cl=F_,kl=tp,Ml=q_,rp=Zt,dn=Nf,np="[object Map]",H_="[object Object]",ap="[object Promise]",ip="[object Set]",op="[object WeakMap]",sp="[object DataView]",Y_=dn(jl),X_=dn($l),Z_=dn(Cl),J_=dn(kl),Q_=dn(Ml),Mr=rp;(jl&&Mr(new jl(new ArrayBuffer(1)))!=sp||$l&&Mr(new $l)!=np||Cl&&Mr(Cl.resolve())!=ap||kl&&Mr(new kl)!=ip||Ml&&Mr(new Ml)!=op)&&(Mr=function(e){var t=rp(e),r=t==H_?e.constructor:void 0,n=r?dn(r):"";if(n)switch(n){case Y_:return sp;case X_:return np;case Z_:return ap;case J_:return ip;case Q_:return op}return t});var eE=Mr,Nl=Id,tE=Fd,rE=MT,nE=k_,lp=eE,up=ft,cp=Hd,aE=Jd,iE=1,fp="[object Arguments]",dp="[object Array]",Ji="[object Object]",oE=Object.prototype,pp=oE.hasOwnProperty;function sE(e,t,r,n,a,i){var o=up(e),s=up(t),l=o?dp:lp(e),u=s?dp:lp(t);l=l==fp?Ji:l,u=u==fp?Ji:u;var c=l==Ji,f=u==Ji,d=l==u;if(d&&cp(e)){if(!cp(t))return!1;o=!0,c=!1}if(d&&!c)return i||(i=new Nl),o||aE(e)?tE(e,t,r,n,a,i):rE(e,t,l,r,n,a,i);if(!(r&iE)){var p=c&&pp.call(e,"__wrapped__"),v=f&&pp.call(t,"__wrapped__");if(p||v){var y=p?e.value():e,h=v?t.value():t;return i||(i=new Nl),a(y,h,r,n,i)}}return d?(i||(i=new Nl),nE(e,t,r,n,a,i)):!1}var lE=sE,uE=lE,hp=Jt;function vp(e,t,r,n,a){return e===t?!0:e==null||t==null||!hp(e)&&!hp(t)?e!==e&&t!==t:uE(e,t,r,n,vp,a)}var Dl=vp,cE=Id,fE=Dl,dE=1,pE=2;function hE(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 cE;if(n)var d=n(u,c,l,e,t,f);if(!(d===void 0?fE(c,u,dE|pE,n,f):d))return!1}}return!0}var vE=hE,yE=dr;function mE(e){return e===e&&!yE(e)}var yp=mE,gE=yp,bE=Zi;function xE(e){for(var t=bE(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,gE(a)]}return t}var wE=xE;function OE(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var mp=OE,SE=vE,AE=wE,TE=mp;function PE(e){var t=AE(e);return t.length==1&&t[0][2]?TE(t[0][0],t[0][1]):function(r){return r===e||SE(r,e,t)}}var _E=PE;function EE(e,t){return e!=null&&t in Object(e)}var jE=EE,$E=Gf,CE=Pl,kE=ft,ME=_l,NE=El,DE=Mi;function IE(e,t,r){t=$E(t,e);for(var n=-1,a=t.length,i=!1;++n<a;){var o=DE(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&&NE(a)&&ME(o,a)&&(kE(e)||CE(e)))}var LE=IE,RE=jE,BE=LE;function FE(e,t){return e!=null&&BE(e,t,RE)}var WE=FE,UE=Dl,zE=Kf,GE=WE,KE=zs,VE=yp,qE=mp,HE=Mi,YE=1,XE=2;function ZE(e,t){return KE(e)&&VE(t)?qE(HE(e),t):function(r){var n=zE(r,e);return n===void 0&&n===t?GE(r,e):UE(t,n,YE|XE)}}var JE=ZE;function QE(e){return e}var pn=QE;function ej(e){return function(t){return t==null?void 0:t[e]}}var tj=ej,rj=Zs;function nj(e){return function(t){return rj(t,e)}}var aj=nj,ij=tj,oj=aj,sj=zs,lj=Mi;function uj(e){return sj(e)?ij(lj(e)):oj(e)}var cj=uj,fj=_E,dj=JE,pj=pn,hj=ft,vj=cj;function yj(e){return typeof e=="function"?e:e==null?pj:typeof e=="object"?hj(e)?dj(e[0],e[1]):fj(e):vj(e)}var hr=yj;function mj(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 gp=mj;function gj(e){return e!==e}var bj=gj;function xj(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}var wj=xj,Oj=gp,Sj=bj,Aj=wj;function Tj(e,t,r){return t===t?Aj(e,t,r):Oj(e,Sj,r)}var Pj=Tj,_j=Pj;function Ej(e,t){var r=e==null?0:e.length;return!!r&&_j(e,t,0)>-1}var jj=Ej;function $j(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 Cj=$j;function kj(){}var Mj=kj,Il=tp,Nj=Mj,Dj=Al,Ij=1/0,Lj=Il&&1/Dj(new Il([,-0]))[1]==Ij?function(e){return new Il(e)}:Nj,Rj=Lj,Bj=Ld,Fj=jj,Wj=Cj,Uj=Bd,zj=Rj,Gj=Al,Kj=200;function Vj(e,t,r){var n=-1,a=Fj,i=e.length,o=!0,s=[],l=s;if(r)o=!1,a=Wj;else if(i>=Kj){var u=t?null:zj(e);if(u)return Gj(u);o=!1,a=Uj,l=new Bj}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 qj=Vj,Hj=hr,Yj=qj;function Xj(e,t){return e&&e.length?Yj(e,Hj(t)):[]}var Zj=Xj;const bp=Ce(Zj);function xp(e,t,r){return t===!0?bp(e,r):pe(t)?bp(e,t):e}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)}var Jj=["ref"];function wp(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 tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wp(Object(r),!0).forEach(function(n){eo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Qj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Op(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,Ap(n.key),n)}}function e$(e,t,r){return t&&Op(e.prototype,t),r&&Op(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function t$(e,t,r){return t=Qi(t),r$(e,Sp()?Reflect.construct(t,r||[],Qi(e).constructor):t.apply(e,r))}function r$(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 n$(e)}function n$(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Sp=function(){return!!e})()}function Qi(e){return Qi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qi(e)}function a$(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&&Ll(e,t)}function Ll(e,t){return Ll=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ll(e,t)}function eo(e,t,r){return t=Ap(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ap(e){var t=i$(e,"string");return hn(t)=="symbol"?t:t+""}function i$(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 o$(e,t){if(e==null)return{};var r=s$(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 s$(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function l$(e){return e.value}function u$(e,t){if(A.isValidElement(e))return A.cloneElement(e,t);if(typeof e=="function")return A.createElement(e,t);t.ref;var r=o$(t,Jj);return A.createElement(Sl,r)}var Tp=1,vn=function(e){function t(){var r;Qj(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=t$(this,t,[].concat(a)),eo(r,"lastBoundingBox",{width:-1,height:-1}),r}return a$(t,e),e$(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)>Tp||Math.abs(a.height-this.lastBoundingBox.height)>Tp)&&(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?tr({},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 p=this.getBBoxSnapshot();f={left:((u||0)-p.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 v=this.getBBoxSnapshot();d={top:((c||0)-v.height)/2}}else d=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return tr(tr({},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=tr(tr({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return A.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){n.wrapperNode=p}},u$(i,tr(tr({},this.props),{},{payload:xp(c,u,l$)})))}}],[{key:"getWithHeight",value:function(n,a){var i=tr(tr({},this.defaultProps),n.props),o=i.layout;return o==="vertical"&&Z(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||a}:null}}])}(A.PureComponent);eo(vn,"displayName","Legend"),eo(vn,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Pp=da,c$=Pl,f$=ft,_p=Pp?Pp.isConcatSpreadable:void 0;function d$(e){return f$(e)||c$(e)||!!(_p&&e&&e[_p])}var p$=d$,h$=Gd,v$=p$;function Ep(e,t,r,n,a){var i=-1,o=e.length;for(r||(r=v$),a||(a=[]);++i<o;){var s=e[i];t>0&&r(s)?t>1?Ep(s,t-1,r,n,a):h$(a,s):n||(a[a.length]=s)}return a}var jp=Ep;function y$(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 m$=y$,g$=m$,b$=g$(),x$=b$,w$=x$,O$=Zi;function S$(e,t){return e&&w$(e,t,O$)}var $p=S$,A$=ma;function T$(e,t){return function(r,n){if(r==null)return r;if(!A$(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 P$=T$,_$=$p,E$=P$,j$=E$(_$),Rl=j$,$$=Rl,C$=ma;function k$(e,t){var r=-1,n=C$(e)?Array(e.length):[];return $$(e,function(a,i,o){n[++r]=t(a,i,o)}),n}var Cp=k$;function M$(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var N$=M$,kp=tn;function D$(e,t){if(e!==t){var r=e!==void 0,n=e===null,a=e===e,i=kp(e),o=t!==void 0,s=t===null,l=t===t,u=kp(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 I$=D$,L$=I$;function R$(e,t,r){for(var n=-1,a=e.criteria,i=t.criteria,o=a.length,s=r.length;++n<o;){var l=L$(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 B$=R$,Bl=Xs,F$=Zs,W$=hr,U$=Cp,z$=N$,G$=Yd,K$=B$,V$=pn,q$=ft;function H$(e,t,r){t.length?t=Bl(t,function(i){return q$(i)?function(o){return F$(o,i.length===1?i[0]:i)}:i}):t=[V$];var n=-1;t=Bl(t,G$(W$));var a=U$(e,function(i,o,s){var l=Bl(t,function(u){return u(i)});return{criteria:l,index:++n,value:i}});return z$(a,function(i,o){return K$(i,o,r)})}var Y$=H$;function X$(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 Z$=X$,J$=Z$,Mp=Math.max;function Q$(e,t,r){return t=Mp(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=Mp(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),J$(e,this,s)}}var eC=Q$;function tC(e){return function(){return e}}var rC=tC,nC=_r,aC=function(){try{var e=nC(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Np=aC,iC=rC,Dp=Np,oC=pn,sC=Dp?function(e,t){return Dp(e,"toString",{configurable:!0,enumerable:!1,value:iC(t),writable:!0})}:oC,lC=sC,uC=800,cC=16,fC=Date.now;function dC(e){var t=0,r=0;return function(){var n=fC(),a=cC-(n-r);if(r=n,a>0){if(++t>=uC)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var pC=dC,hC=lC,vC=pC,yC=vC(hC),mC=yC,gC=pn,bC=eC,xC=mC;function wC(e,t){return xC(bC(e,t,gC),e+"")}var OC=wC,SC=Vs,AC=ma,TC=_l,PC=dr;function _C(e,t,r){if(!PC(r))return!1;var n=typeof t;return(n=="number"?AC(r)&&TC(t,r.length):n=="string"&&t in r)?SC(r[t],e):!1}var to=_C,EC=jp,jC=Y$,$C=OC,Ip=to,CC=$C(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Ip(e,t[0],t[1])?t=[]:r>2&&Ip(t[0],t[1],t[2])&&(t=[t[0]]),jC(e,EC(t,1),[])}),kC=CC;const Fl=Ce(kC);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 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 MC(e,t){return LC(e)||IC(e,t)||DC(e,t)||NC()}function NC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
130
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DC(e,t){if(e){if(typeof e=="string")return Lp(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 Lp(e,t)}}function Lp(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 IC(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 LC(e){if(Array.isArray(e))return e}function Rp(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?Rp(Object(r),!0).forEach(function(n){RC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function RC(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 ga(t)=="symbol"?t:t+""}function FC(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)}function WC(e){return Array.isArray(e)&&Ye(e[0])&&Ye(e[1])?e.join(" ~ "):e}var UC=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,p=t.wrapperClassName,v=t.labelClassName,y=t.label,h=t.labelFormatter,b=t.accessibilityLayer,S=b===void 0?!1:b,x=function(){if(c&&c.length){var $={padding:0,margin:0},R=(d?Fl(c,d):c).map(function(k,D){if(k.type==="none")return null;var C=Ul({display:"block",paddingTop:4,paddingBottom:4,color:k.color||"#000"},s),B=k.formatter||f||WC,U=k.value,G=k.name,E=U,L=G;if(B&&E!=null&&L!=null){var F=B(U,G,k,D,c);if(Array.isArray(F)){var W=MC(F,2);E=W[0],L=W[1]}else E=F}return A.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(D),style:C},Ye(L)?A.createElement("span",{className:"recharts-tooltip-item-name"},L):null,Ye(L)?A.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,A.createElement("span",{className:"recharts-tooltip-item-value"},E),A.createElement("span",{className:"recharts-tooltip-item-unit"},k.unit||""))});return A.createElement("ul",{className:"recharts-tooltip-item-list",style:$},R)}return null},T=Ul({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),m=Ul({margin:0},u),w=!fe(y),O=w?y:"",P=ye("recharts-default-tooltip",p),j=ye("recharts-tooltip-label",v);w&&h&&c!==void 0&&c!==null&&(O=h(y,c));var M=S?{role:"status","aria-live":"assertive"}:{};return A.createElement("div",Wl({className:P,style:T},M),A.createElement("p",{className:j,style:m},A.isValidElement(O)?O:"".concat(O)),x())};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 ro(e,t,r){return t=zC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zC(e){var t=GC(e,"string");return ba(t)=="symbol"?t:t+""}function GC(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 xa="recharts-tooltip-wrapper",KC={visibility:"hidden"};function VC(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return ye(xa,ro(ro(ro(ro({},"".concat(xa,"-right"),Z(r)&&t&&Z(t.x)&&r>=t.x),"".concat(xa,"-left"),Z(r)&&t&&Z(t.x)&&r<t.x),"".concat(xa,"-bottom"),Z(n)&&t&&Z(t.y)&&n>=t.y),"".concat(xa,"-top"),Z(n)&&t&&Z(t.y)&&n<t.y))}function Bp(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&&Z(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,p=l[n];return d<p?Math.max(f,l[n]):Math.max(c,l[n])}var v=f+s,y=l[n]+u;return v>y?Math.max(c,l[n]):Math.max(f,l[n])}function qC(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 HC(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=Bp({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=Bp({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),u=qC({translateX:c,translateY:f,useTranslate3d:s})):u=KC,{cssProperties:u,cssClasses:VC({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 Fp(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 Wp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fp(Object(r),!0).forEach(function(n){Gl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function YC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XC(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,zp(n.key),n)}}function ZC(e,t,r){return t&&XC(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function JC(e,t,r){return t=no(t),QC(e,Up()?Reflect.construct(t,r||[],no(e).constructor):t.apply(e,r))}function QC(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 e2(e)}function e2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Up(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Up=function(){return!!e})()}function no(e){return no=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},no(e)}function t2(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 Gl(e,t,r){return t=zp(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zp(e){var t=r2(e,"string");return yn(t)=="symbol"?t:t+""}function r2(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 Gp=1,n2=function(e){function t(){var r;YC(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=JC(this,t,[].concat(a)),Gl(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Gl(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 t2(t,e),ZC(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>Gp||Math.abs(n.height-this.state.lastBoundingBox.height)>Gp)&&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,p=a.offset,v=a.position,y=a.reverseDirection,h=a.useTranslate3d,b=a.viewBox,S=a.wrapperStyle,x=HC({allowEscapeViewBox:o,coordinate:c,offsetTopLeft:p,position:v,reverseDirection:y,tooltipBox:this.state.lastBoundingBox,useTranslate3d:h,viewBox:b}),T=x.cssClasses,m=x.cssProperties,w=Wp(Wp({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},S);return A.createElement("div",{tabIndex:-1,className:T,style:w,ref:function(P){n.wrapperNode=P}},u)}}])}(A.PureComponent),a2=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},vr={isSsr:a2()};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 Kp(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 Vp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kp(Object(r),!0).forEach(function(n){Vl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function i2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o2(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,Hp(n.key),n)}}function s2(e,t,r){return t&&o2(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function l2(e,t,r){return t=ao(t),u2(e,qp()?Reflect.construct(t,r||[],ao(e).constructor):t.apply(e,r))}function u2(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 c2(e)}function c2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qp=function(){return!!e})()}function ao(e){return ao=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ao(e)}function f2(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kl(e,t)}function Kl(e,t){return Kl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Kl(e,t)}function Vl(e,t,r){return t=Hp(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hp(e){var t=d2(e,"string");return mn(t)=="symbol"?t:t+""}function d2(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 p2(e){return e.dataKey}function h2(e,t){return A.isValidElement(e)?A.cloneElement(e,t):typeof e=="function"?A.createElement(e,t):A.createElement(UC,t)}var Wt=function(e){function t(){return i2(this,t),l2(this,t,arguments)}return f2(t,e),s2(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,p=a.offset,v=a.payload,y=a.payloadUniqBy,h=a.position,b=a.reverseDirection,S=a.useTranslate3d,x=a.viewBox,T=a.wrapperStyle,m=v??[];f&&m.length&&(m=xp(v.filter(function(O){return O.value!=null&&(O.hide!==!0||n.props.includeHidden)}),y,p2));var w=m.length>0;return A.createElement(n2,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:d,active:i,coordinate:c,hasPayload:w,offset:p,position:h,reverseDirection:b,useTranslate3d:S,viewBox:x,wrapperStyle:T},h2(u,Vp(Vp({},this.props),{},{payload:m})))}}])}(A.PureComponent);Vl(Wt,"displayName","Tooltip"),Vl(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:!vr.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 v2=Ft,y2=function(){return v2.Date.now()},m2=y2,g2=/\s/;function b2(e){for(var t=e.length;t--&&g2.test(e.charAt(t)););return t}var x2=b2,w2=x2,O2=/^\s+/;function S2(e){return e&&e.slice(0,w2(e)+1).replace(O2,"")}var A2=S2,T2=A2,Yp=dr,P2=tn,Xp=NaN,_2=/^[-+]0x[0-9a-f]+$/i,E2=/^0b[01]+$/i,j2=/^0o[0-7]+$/i,$2=parseInt;function C2(e){if(typeof e=="number")return e;if(P2(e))return Xp;if(Yp(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Yp(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=T2(e);var r=E2.test(e);return r||j2.test(e)?$2(e.slice(2),r?2:8):_2.test(e)?Xp:+e}var Zp=C2,k2=dr,ql=m2,Jp=Zp,M2="Expected a function",N2=Math.max,D2=Math.min;function I2(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(M2);t=Jp(t)||0,k2(r)&&(c=!!r.leading,f="maxWait"in r,i=f?N2(Jp(r.maxWait)||0,t):i,d="trailing"in r?!!r.trailing:d);function p(w){var O=n,P=a;return n=a=void 0,u=w,o=e.apply(P,O),o}function v(w){return u=w,s=setTimeout(b,t),c?p(w):o}function y(w){var O=w-l,P=w-u,j=t-O;return f?D2(j,i-P):j}function h(w){var O=w-l,P=w-u;return l===void 0||O>=t||O<0||f&&P>=i}function b(){var w=ql();if(h(w))return S(w);s=setTimeout(b,y(w))}function S(w){return s=void 0,d&&n?p(w):(n=a=void 0,o)}function x(){s!==void 0&&clearTimeout(s),u=0,n=l=a=s=void 0}function T(){return s===void 0?o:S(ql())}function m(){var w=ql(),O=h(w);if(n=arguments,a=this,l=w,O){if(s===void 0)return v(l);if(f)return clearTimeout(s),s=setTimeout(b,t),p(l)}return s===void 0&&(s=setTimeout(b,t)),o}return m.cancel=x,m.flush=T,m}var L2=I2,R2=L2,B2=dr,F2="Expected a function";function W2(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(F2);return B2(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),R2(e,t,{leading:n,maxWait:t,trailing:a})}var U2=W2;const Qp=Ce(U2);function wa(e){"@babel/helpers - typeof";return wa=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},wa(e)}function eh(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 io(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eh(Object(r),!0).forEach(function(n){z2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function z2(e,t,r){return t=G2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function G2(e){var t=K2(e,"string");return wa(t)=="symbol"?t:t+""}function K2(e,t){if(wa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(wa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function V2(e,t){return X2(e)||Y2(e,t)||H2(e,t)||q2()}function q2(){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 H2(e,t){if(e){if(typeof e=="string")return th(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 th(e,t)}}function th(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 Y2(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 X2(e){if(Array.isArray(e))return e}var Z2=A.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,p=e.children,v=e.debounce,y=v===void 0?0:v,h=e.id,b=e.className,S=e.onResize,x=e.style,T=x===void 0?{}:x,m=A.useRef(null),w=A.useRef();w.current=S,A.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 O=A.useState({containerWidth:a.width,containerHeight:a.height}),P=V2(O,2),j=P[0],M=P[1],_=A.useCallback(function(R,k){M(function(D){var C=Math.round(R),B=Math.round(k);return D.containerWidth===C&&D.containerHeight===B?D:{containerWidth:C,containerHeight:B}})},[]);A.useEffect(function(){var R=function(G){var E,L=G[0].contentRect,F=L.width,W=L.height;_(F,W),(E=w.current)===null||E===void 0||E.call(w,F,W)};y>0&&(R=Qp(R,y,{trailing:!0,leading:!1}));var k=new ResizeObserver(R),D=m.current.getBoundingClientRect(),C=D.width,B=D.height;return _(C,B),k.observe(m.current),function(){k.disconnect()}},[_,y]);var $=A.useMemo(function(){var R=j.containerWidth,k=j.containerHeight;if(R<0||k<0)return null;er(jr(o)||jr(l),`The width(%s) and height(%s) are both fixed numbers,
132
- maybe you don't need to use a ResponsiveContainer.`,o,l),er(!r||r>0,"The aspect(%s) must be greater than zero.",r);var D=jr(o)?R:o,C=jr(l)?k:l;r&&r>0&&(D?C=D/r:C&&(D=C*r),d&&C>d&&(C=d)),er(D>0||C>0,`The width(%s) and height(%s) of chart should be greater than 0,
188
+ H`).concat(Tt,"M").concat(2*s,",").concat(i,`
189
+ A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(i),className:"recharts-legend-icon"});if(n.type==="rect")return T.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(Tt/8,"h").concat(Tt,"v").concat(Tt*3/4,"h").concat(-Tt,"z"),className:"recharts-legend-icon"});if(T.isValidElement(n.legendIcon)){var u=RT({},n);return delete u.legendIcon,T.cloneElement(n.legendIcon,u)}return T.createElement(Hi,{fill:l,cx:i,cy:i,size:Tt,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:Tt,height:Tt},f={display:s==="horizontal"?"inline-block":"block",marginRight:10},d={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(p,m){var y=p.formatter||l,v=me(ga(ga({"recharts-legend-item":!0},"legend-item-".concat(m),!0),"inactive",p.inactive));if(p.type==="none")return null;var b=pe(p.value)?null:p.value;er(!pe(p.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var w=p.inactive?u:p.color;return T.createElement("li",Al({className:v,style:f,key:"legend-item-".concat(m)},ma(n.props,p,m)),T.createElement(fl,{width:o,height:o,viewBox:c,style:d},n.renderIcon(p)),T.createElement("span",{className:"recharts-legend-item-text",style:{color:w}},y?y(b,p,m):b))})}},{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 T.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(T.PureComponent);ga(jl,"displayName","Legend"),ga(jl,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var qT=Mi;function HT(){this.__data__=new qT,this.size=0}var YT=HT;function XT(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var ZT=XT;function JT(e){return this.__data__.get(e)}var QT=JT;function eA(e){return this.__data__.has(e)}var tA=eA,rA=Mi,nA=Zs,aA=Js,iA=200;function oA(e,t){var r=this.__data__;if(r instanceof rA){var n=r.__data__;if(!nA||n.length<iA-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new aA(n)}return r.set(e,t),this.size=r.size,this}var sA=oA,lA=Mi,uA=YT,cA=ZT,fA=QT,dA=tA,pA=sA;function dn(e){var t=this.__data__=new lA(e);this.size=t.size}dn.prototype.clear=uA,dn.prototype.delete=cA,dn.prototype.get=fA,dn.prototype.has=dA,dn.prototype.set=pA;var Vd=dn,hA="__lodash_hash_undefined__";function vA(e){return this.__data__.set(e,hA),this}var mA=vA;function yA(e){return this.__data__.has(e)}var gA=yA,bA=Js,xA=mA,wA=gA;function Xi(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new bA;++t<r;)this.add(e[t])}Xi.prototype.add=Xi.prototype.push=xA,Xi.prototype.has=wA;var Kd=Xi;function OA(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 qd=OA;function SA(e,t){return e.has(t)}var Hd=SA,TA=Kd,AA=qd,PA=Hd,jA=1,_A=2;function EA(e,t,r,n,a,i){var o=r&jA,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,p=r&_A?new TA:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var m=e[f],y=t[f];if(n)var v=o?n(y,m,f,t,e,i):n(m,y,f,e,t,i);if(v!==void 0){if(v)continue;d=!1;break}if(p){if(!AA(t,function(b,w){if(!PA(p,w)&&(m===b||a(m,b,r,n,i)))return p.push(w)})){d=!1;break}}else if(!(m===y||a(m,y,r,n,i))){d=!1;break}}return i.delete(e),i.delete(t),d}var Yd=EA,CA=Ft,$A=CA.Uint8Array,kA=$A;function MA(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var NA=MA;function DA(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var _l=DA,Xd=ha,Zd=kA,IA=Xs,LA=Yd,RA=NA,BA=_l,FA=1,WA=2,zA="[object Boolean]",UA="[object Date]",GA="[object Error]",VA="[object Map]",KA="[object Number]",qA="[object RegExp]",HA="[object Set]",YA="[object String]",XA="[object Symbol]",ZA="[object ArrayBuffer]",JA="[object DataView]",Jd=Xd?Xd.prototype:void 0,El=Jd?Jd.valueOf:void 0;function QA(e,t,r,n,a,i,o){switch(r){case JA:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case ZA:return!(e.byteLength!=t.byteLength||!i(new Zd(e),new Zd(t)));case zA:case UA:case KA:return IA(+e,+t);case GA:return e.name==t.name&&e.message==t.message;case qA:case YA:return e==t+"";case VA:var s=RA;case HA:var l=n&FA;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=LA(s(e),s(t),n,a,i,o);return o.delete(e),c;case XA:if(El)return El.call(e)==El.call(t)}return!1}var e2=QA;function t2(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var Qd=t2,r2=Qd,n2=ft;function a2(e,t,r){var n=t(e);return n2(e)?n:r2(n,r(e))}var i2=a2;function o2(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 s2=o2;function l2(){return[]}var u2=l2,c2=s2,f2=u2,d2=Object.prototype,p2=d2.propertyIsEnumerable,ep=Object.getOwnPropertySymbols,h2=ep?function(e){return e==null?[]:(e=Object(e),c2(ep(e),function(t){return p2.call(e,t)}))}:f2,v2=h2;function m2(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var y2=m2,g2=Zt,b2=Jt,x2="[object Arguments]";function w2(e){return b2(e)&&g2(e)==x2}var O2=w2,tp=O2,S2=Jt,rp=Object.prototype,T2=rp.hasOwnProperty,A2=rp.propertyIsEnumerable,P2=tp(function(){return arguments}())?tp:function(e){return S2(e)&&T2.call(e,"callee")&&!A2.call(e,"callee")},Cl=P2,Zi={exports:{}};function j2(){return!1}var _2=j2;Zi.exports,function(e,t){var r=Ft,n=_2,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}(Zi,Zi.exports);var np=Zi.exports,E2=9007199254740991,C2=/^(?:0|[1-9]\d*)$/;function $2(e,t){var r=typeof e;return t=t??E2,!!t&&(r=="number"||r!="symbol"&&C2.test(e))&&e>-1&&e%1==0&&e<t}var $l=$2,k2=9007199254740991;function M2(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=k2}var kl=M2,N2=Zt,D2=kl,I2=Jt,L2="[object Arguments]",R2="[object Array]",B2="[object Boolean]",F2="[object Date]",W2="[object Error]",z2="[object Function]",U2="[object Map]",G2="[object Number]",V2="[object Object]",K2="[object RegExp]",q2="[object Set]",H2="[object String]",Y2="[object WeakMap]",X2="[object ArrayBuffer]",Z2="[object DataView]",J2="[object Float32Array]",Q2="[object Float64Array]",eP="[object Int8Array]",tP="[object Int16Array]",rP="[object Int32Array]",nP="[object Uint8Array]",aP="[object Uint8ClampedArray]",iP="[object Uint16Array]",oP="[object Uint32Array]",Ie={};Ie[J2]=Ie[Q2]=Ie[eP]=Ie[tP]=Ie[rP]=Ie[nP]=Ie[aP]=Ie[iP]=Ie[oP]=!0,Ie[L2]=Ie[R2]=Ie[X2]=Ie[B2]=Ie[Z2]=Ie[F2]=Ie[W2]=Ie[z2]=Ie[U2]=Ie[G2]=Ie[V2]=Ie[K2]=Ie[q2]=Ie[H2]=Ie[Y2]=!1;function sP(e){return I2(e)&&D2(e.length)&&!!Ie[N2(e)]}var lP=sP;function uP(e){return function(t){return e(t)}}var ap=uP,Ji={exports:{}};Ji.exports,function(e,t){var r=Lf,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}(Ji,Ji.exports);var cP=Ji.exports,fP=lP,dP=ap,ip=cP,op=ip&&ip.isTypedArray,pP=op?dP(op):fP,sp=pP,hP=y2,vP=Cl,mP=ft,yP=np,gP=$l,bP=sp,xP=Object.prototype,wP=xP.hasOwnProperty;function OP(e,t){var r=mP(e),n=!r&&vP(e),a=!r&&!n&&yP(e),i=!r&&!n&&!a&&bP(e),o=r||n||a||i,s=o?hP(e.length,String):[],l=s.length;for(var u in e)(t||wP.call(e,u))&&!(o&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||gP(u,l)))&&s.push(u);return s}var SP=OP,TP=Object.prototype;function AP(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||TP;return e===r}var PP=AP;function jP(e,t){return function(r){return e(t(r))}}var lp=jP,_P=lp,EP=_P(Object.keys,Object),CP=EP,$P=PP,kP=CP,MP=Object.prototype,NP=MP.hasOwnProperty;function DP(e){if(!$P(e))return kP(e);var t=[];for(var r in Object(e))NP.call(e,r)&&r!="constructor"&&t.push(r);return t}var IP=DP,LP=Hs,RP=kl;function BP(e){return e!=null&&RP(e.length)&&!LP(e)}var ba=BP,FP=SP,WP=IP,zP=ba;function UP(e){return zP(e)?FP(e):WP(e)}var Qi=UP,GP=i2,VP=v2,KP=Qi;function qP(e){return GP(e,KP,VP)}var HP=qP,up=HP,YP=1,XP=Object.prototype,ZP=XP.hasOwnProperty;function JP(e,t,r,n,a,i){var o=r&YP,s=up(e),l=s.length,u=up(t),c=u.length;if(l!=c&&!o)return!1;for(var f=l;f--;){var d=s[f];if(!(o?d in t:ZP.call(t,d)))return!1}var p=i.get(e),m=i.get(t);if(p&&m)return p==t&&m==e;var y=!0;i.set(e,t),i.set(t,e);for(var v=o;++f<l;){d=s[f];var b=e[d],w=t[d];if(n)var x=o?n(w,b,d,t,e,i):n(b,w,d,e,t,i);if(!(x===void 0?b===w||a(b,w,r,n,i):x)){y=!1;break}v||(v=d=="constructor")}if(y&&!v){var A=e.constructor,g=t.constructor;A!=g&&"constructor"in e&&"constructor"in t&&!(typeof A=="function"&&A instanceof A&&typeof g=="function"&&g instanceof g)&&(y=!1)}return i.delete(e),i.delete(t),y}var QP=JP,ej=jr,tj=Ft,rj=ej(tj,"DataView"),nj=rj,aj=jr,ij=Ft,oj=aj(ij,"Promise"),sj=oj,lj=jr,uj=Ft,cj=lj(uj,"Set"),cp=cj,fj=jr,dj=Ft,pj=fj(dj,"WeakMap"),hj=pj,Ml=nj,Nl=Zs,Dl=sj,Il=cp,Ll=hj,fp=Zt,pn=Uf,dp="[object Map]",vj="[object Object]",pp="[object Promise]",hp="[object Set]",vp="[object WeakMap]",mp="[object DataView]",mj=pn(Ml),yj=pn(Nl),gj=pn(Dl),bj=pn(Il),xj=pn(Ll),Mr=fp;(Ml&&Mr(new Ml(new ArrayBuffer(1)))!=mp||Nl&&Mr(new Nl)!=dp||Dl&&Mr(Dl.resolve())!=pp||Il&&Mr(new Il)!=hp||Ll&&Mr(new Ll)!=vp)&&(Mr=function(e){var t=fp(e),r=t==vj?e.constructor:void 0,n=r?pn(r):"";if(n)switch(n){case mj:return mp;case yj:return dp;case gj:return pp;case bj:return hp;case xj:return vp}return t});var wj=Mr,Rl=Vd,Oj=Yd,Sj=e2,Tj=QP,yp=wj,gp=ft,bp=np,Aj=sp,Pj=1,xp="[object Arguments]",wp="[object Array]",eo="[object Object]",jj=Object.prototype,Op=jj.hasOwnProperty;function _j(e,t,r,n,a,i){var o=gp(e),s=gp(t),l=o?wp:yp(e),u=s?wp:yp(t);l=l==xp?eo:l,u=u==xp?eo:u;var c=l==eo,f=u==eo,d=l==u;if(d&&bp(e)){if(!bp(t))return!1;o=!0,c=!1}if(d&&!c)return i||(i=new Rl),o||Aj(e)?Oj(e,t,r,n,a,i):Sj(e,t,l,r,n,a,i);if(!(r&Pj)){var p=c&&Op.call(e,"__wrapped__"),m=f&&Op.call(t,"__wrapped__");if(p||m){var y=p?e.value():e,v=m?t.value():t;return i||(i=new Rl),a(y,v,r,n,i)}}return d?(i||(i=new Rl),Tj(e,t,r,n,a,i)):!1}var Ej=_j,Cj=Ej,Sp=Jt;function Tp(e,t,r,n,a){return e===t?!0:e==null||t==null||!Sp(e)&&!Sp(t)?e!==e&&t!==t:Cj(e,t,r,n,Tp,a)}var Bl=Tp,$j=Vd,kj=Bl,Mj=1,Nj=2;function Dj(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 $j;if(n)var d=n(u,c,l,e,t,f);if(!(d===void 0?kj(c,u,Mj|Nj,n,f):d))return!1}}return!0}var Ij=Dj,Lj=dr;function Rj(e){return e===e&&!Lj(e)}var Ap=Rj,Bj=Ap,Fj=Qi;function Wj(e){for(var t=Fj(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,Bj(a)]}return t}var zj=Wj;function Uj(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var Pp=Uj,Gj=Ij,Vj=zj,Kj=Pp;function qj(e){var t=Vj(e);return t.length==1&&t[0][2]?Kj(t[0][0],t[0][1]):function(r){return r===e||Gj(r,e,t)}}var Hj=qj;function Yj(e,t){return e!=null&&t in Object(e)}var Xj=Yj,Zj=Qf,Jj=Cl,Qj=ft,e_=$l,t_=kl,r_=Di;function n_(e,t,r){t=Zj(t,e);for(var n=-1,a=t.length,i=!1;++n<a;){var o=r_(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&&t_(a)&&e_(o,a)&&(Qj(e)||Jj(e)))}var a_=n_,i_=Xj,o_=a_;function s_(e,t){return e!=null&&o_(e,t,i_)}var l_=s_,u_=Bl,c_=ed,f_=l_,d_=qs,p_=Ap,h_=Pp,v_=Di,m_=1,y_=2;function g_(e,t){return d_(e)&&p_(t)?h_(v_(e),t):function(r){var n=c_(r,e);return n===void 0&&n===t?f_(r,e):u_(t,n,m_|y_)}}var b_=g_;function x_(e){return e}var hn=x_;function w_(e){return function(t){return t==null?void 0:t[e]}}var O_=w_,S_=tl;function T_(e){return function(t){return S_(t,e)}}var A_=T_,P_=O_,j_=A_,__=qs,E_=Di;function C_(e){return __(e)?P_(E_(e)):j_(e)}var $_=C_,k_=Hj,M_=b_,N_=hn,D_=ft,I_=$_;function L_(e){return typeof e=="function"?e:e==null?N_:typeof e=="object"?D_(e)?M_(e[0],e[1]):k_(e):I_(e)}var hr=L_;function R_(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 jp=R_;function B_(e){return e!==e}var F_=B_;function W_(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}var z_=W_,U_=jp,G_=F_,V_=z_;function K_(e,t,r){return t===t?V_(e,t,r):U_(e,G_,r)}var q_=K_,H_=q_;function Y_(e,t){var r=e==null?0:e.length;return!!r&&H_(e,t,0)>-1}var X_=Y_;function Z_(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 J_=Z_;function Q_(){}var eE=Q_,Fl=cp,tE=eE,rE=_l,nE=1/0,aE=Fl&&1/rE(new Fl([,-0]))[1]==nE?function(e){return new Fl(e)}:tE,iE=aE,oE=Kd,sE=X_,lE=J_,uE=Hd,cE=iE,fE=_l,dE=200;function pE(e,t,r){var n=-1,a=sE,i=e.length,o=!0,s=[],l=s;if(r)o=!1,a=lE;else if(i>=dE){var u=t?null:cE(e);if(u)return fE(u);o=!1,a=uE,l=new oE}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=pE,vE=hr,mE=hE;function yE(e,t){return e&&e.length?mE(e,vE(t)):[]}var gE=yE;const _p=$e(gE);function Ep(e,t,r){return t===!0?_p(e,r):pe(t)?_p(e,t):e}function vn(e){"@babel/helpers - typeof";return vn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vn(e)}var bE=["ref"];function Cp(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 tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cp(Object(r),!0).forEach(function(n){ro(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $p(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,Mp(n.key),n)}}function wE(e,t,r){return t&&$p(e.prototype,t),r&&$p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function OE(e,t,r){return t=to(t),SE(e,kp()?Reflect.construct(t,r||[],to(e).constructor):t.apply(e,r))}function SE(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 TE(e)}function TE(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kp=function(){return!!e})()}function to(e){return to=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},to(e)}function AE(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&&Wl(e,t)}function Wl(e,t){return Wl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Wl(e,t)}function ro(e,t,r){return t=Mp(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mp(e){var t=PE(e,"string");return vn(t)=="symbol"?t:t+""}function PE(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 jE(e,t){if(e==null)return{};var r=_E(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 _E(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 EE(e){return e.value}function CE(e,t){if(T.isValidElement(e))return T.cloneElement(e,t);if(typeof e=="function")return T.createElement(e,t);t.ref;var r=jE(t,bE);return T.createElement(jl,r)}var Np=1,mn=function(e){function t(){var r;xE(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=OE(this,t,[].concat(a)),ro(r,"lastBoundingBox",{width:-1,height:-1}),r}return AE(t,e),wE(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)>Np||Math.abs(a.height-this.lastBoundingBox.height)>Np)&&(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?tr({},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 p=this.getBBoxSnapshot();f={left:((u||0)-p.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 tr(tr({},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=tr(tr({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return T.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){n.wrapperNode=p}},CE(i,tr(tr({},this.props),{},{payload:Ep(c,u,EE)})))}}],[{key:"getWithHeight",value:function(n,a){var i=tr(tr({},this.defaultProps),n.props),o=i.layout;return o==="vertical"&&Z(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||a}:null}}])}(T.PureComponent);ro(mn,"displayName","Legend"),ro(mn,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Dp=ha,$E=Cl,kE=ft,Ip=Dp?Dp.isConcatSpreadable:void 0;function ME(e){return kE(e)||$E(e)||!!(Ip&&e&&e[Ip])}var NE=ME,DE=Qd,IE=NE;function Lp(e,t,r,n,a){var i=-1,o=e.length;for(r||(r=IE),a||(a=[]);++i<o;){var s=e[i];t>0&&r(s)?t>1?Lp(s,t-1,r,n,a):DE(a,s):n||(a[a.length]=s)}return a}var Rp=Lp;function LE(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 RE=LE,BE=RE,FE=BE(),WE=FE,zE=WE,UE=Qi;function GE(e,t){return e&&zE(e,t,UE)}var Bp=GE,VE=ba;function KE(e,t){return function(r,n){if(r==null)return r;if(!VE(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 qE=KE,HE=Bp,YE=qE,XE=YE(HE),zl=XE,ZE=zl,JE=ba;function QE(e,t){var r=-1,n=JE(e)?Array(e.length):[];return ZE(e,function(a,i,o){n[++r]=t(a,i,o)}),n}var Fp=QE;function eC(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var tC=eC,Wp=rn;function rC(e,t){if(e!==t){var r=e!==void 0,n=e===null,a=e===e,i=Wp(e),o=t!==void 0,s=t===null,l=t===t,u=Wp(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 nC=rC,aC=nC;function iC(e,t,r){for(var n=-1,a=e.criteria,i=t.criteria,o=a.length,s=r.length;++n<o;){var l=aC(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 oC=iC,Ul=el,sC=tl,lC=hr,uC=Fp,cC=tC,fC=ap,dC=oC,pC=hn,hC=ft;function vC(e,t,r){t.length?t=Ul(t,function(i){return hC(i)?function(o){return sC(o,i.length===1?i[0]:i)}:i}):t=[pC];var n=-1;t=Ul(t,fC(lC));var a=uC(e,function(i,o,s){var l=Ul(t,function(u){return u(i)});return{criteria:l,index:++n,value:i}});return cC(a,function(i,o){return dC(i,o,r)})}var mC=vC;function yC(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 gC=yC,bC=gC,zp=Math.max;function xC(e,t,r){return t=zp(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=zp(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),bC(e,this,s)}}var wC=xC;function OC(e){return function(){return e}}var SC=OC,TC=jr,AC=function(){try{var e=TC(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Up=AC,PC=SC,Gp=Up,jC=hn,_C=Gp?function(e,t){return Gp(e,"toString",{configurable:!0,enumerable:!1,value:PC(t),writable:!0})}:jC,EC=_C,CC=800,$C=16,kC=Date.now;function MC(e){var t=0,r=0;return function(){var n=kC(),a=$C-(n-r);if(r=n,a>0){if(++t>=CC)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var NC=MC,DC=EC,IC=NC,LC=IC(DC),RC=LC,BC=hn,FC=wC,WC=RC;function zC(e,t){return WC(FC(e,t,BC),e+"")}var UC=zC,GC=Xs,VC=ba,KC=$l,qC=dr;function HC(e,t,r){if(!qC(r))return!1;var n=typeof t;return(n=="number"?VC(r)&&KC(t,r.length):n=="string"&&t in r)?GC(r[t],e):!1}var no=HC,YC=Rp,XC=mC,ZC=UC,Vp=no,JC=ZC(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Vp(e,t[0],t[1])?t=[]:r>2&&Vp(t[0],t[1],t[2])&&(t=[t[0]]),XC(e,YC(t,1),[])}),QC=JC;const Gl=$e(QC);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 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 e$(e,t){return a$(e)||n$(e,t)||r$(e,t)||t$()}function t$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
190
+ 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 Kp(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 Kp(e,t)}}function Kp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function n$(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,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 a$(e){if(Array.isArray(e))return e}function qp(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 Kl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qp(Object(r),!0).forEach(function(n){i$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function i$(e,t,r){return t=o$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o$(e){var t=s$(e,"string");return xa(t)=="symbol"?t:t+""}function s$(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)}function l$(e){return Array.isArray(e)&&Xe(e[0])&&Xe(e[1])?e.join(" ~ "):e}var u$=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,p=t.wrapperClassName,m=t.labelClassName,y=t.label,v=t.labelFormatter,b=t.accessibilityLayer,w=b===void 0?!1:b,x=function(){if(c&&c.length){var _={padding:0,margin:0},I=(d?Gl(c,d):c).map(function($,D){if($.type==="none")return null;var k=Kl({display:"block",paddingTop:4,paddingBottom:4,color:$.color||"#000"},s),B=$.formatter||f||l$,z=$.value,G=$.name,E=z,R=G;if(B&&E!=null&&R!=null){var F=B(z,G,$,D,c);if(Array.isArray(F)){var W=e$(F,2);E=W[0],R=W[1]}else E=F}return T.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(D),style:k},Xe(R)?T.createElement("span",{className:"recharts-tooltip-item-name"},R):null,Xe(R)?T.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,T.createElement("span",{className:"recharts-tooltip-item-value"},E),T.createElement("span",{className:"recharts-tooltip-item-unit"},$.unit||""))});return T.createElement("ul",{className:"recharts-tooltip-item-list",style:_},I)}return null},A=Kl({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),g=Kl({margin:0},u),O=!fe(y),S=O?y:"",j=me("recharts-default-tooltip",p),C=me("recharts-tooltip-label",m);O&&v&&c!==void 0&&c!==null&&(S=v(y,c));var M=w?{role:"status","aria-live":"assertive"}:{};return T.createElement("div",Vl({className:j,style:A},M),T.createElement("p",{className:C,style:g},T.isValidElement(S)?S:"".concat(S)),x())};function wa(e){"@babel/helpers - typeof";return wa=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},wa(e)}function ao(e,t,r){return t=c$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c$(e){var t=f$(e,"string");return wa(t)=="symbol"?t:t+""}function f$(e,t){if(wa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(wa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Oa="recharts-tooltip-wrapper",d$={visibility:"hidden"};function p$(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return me(Oa,ao(ao(ao(ao({},"".concat(Oa,"-right"),Z(r)&&t&&Z(t.x)&&r>=t.x),"".concat(Oa,"-left"),Z(r)&&t&&Z(t.x)&&r<t.x),"".concat(Oa,"-bottom"),Z(n)&&t&&Z(t.y)&&n>=t.y),"".concat(Oa,"-top"),Z(n)&&t&&Z(t.y)&&n<t.y))}function Hp(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&&Z(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,p=l[n];return d<p?Math.max(f,l[n]):Math.max(c,l[n])}var m=f+s,y=l[n]+u;return m>y?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 v$(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=Hp({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=Hp({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=d$,{cssProperties:u,cssClasses:p$({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 Yp(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 Xp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yp(Object(r),!0).forEach(function(n){Hl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function m$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Jp(n.key),n)}}function g$(e,t,r){return t&&y$(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function b$(e,t,r){return t=io(t),x$(e,Zp()?Reflect.construct(t,r||[],io(e).constructor):t.apply(e,r))}function x$(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 w$(e)}function w$(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Zp=function(){return!!e})()}function io(e){return io=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},io(e)}function O$(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 Hl(e,t,r){return t=Jp(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jp(e){var t=S$(e,"string");return yn(t)=="symbol"?t:t+""}function S$(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 Qp=1,T$=function(e){function t(){var r;m$(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=b$(this,t,[].concat(a)),Hl(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Hl(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 O$(t,e),g$(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>Qp||Math.abs(n.height-this.state.lastBoundingBox.height)>Qp)&&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,p=a.offset,m=a.position,y=a.reverseDirection,v=a.useTranslate3d,b=a.viewBox,w=a.wrapperStyle,x=v$({allowEscapeViewBox:o,coordinate:c,offsetTopLeft:p,position:m,reverseDirection:y,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:b}),A=x.cssClasses,g=x.cssProperties,O=Xp(Xp({transition:d&&i?"transform ".concat(s,"ms ").concat(l):void 0},g),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&f?"visible":"hidden",position:"absolute",top:0,left:0},w);return T.createElement("div",{tabIndex:-1,className:A,style:O,ref:function(j){n.wrapperNode=j}},u)}}])}(T.PureComponent),A$=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},vr={isSsr:A$()};function gn(e){"@babel/helpers - typeof";return gn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gn(e)}function eh(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 th(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eh(Object(r),!0).forEach(function(n){Xl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function P$(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,nh(n.key),n)}}function _$(e,t,r){return t&&j$(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function E$(e,t,r){return t=oo(t),C$(e,rh()?Reflect.construct(t,r||[],oo(e).constructor):t.apply(e,r))}function C$(e,t){if(t&&(gn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $$(e)}function $$(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rh=function(){return!!e})()}function oo(e){return oo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},oo(e)}function k$(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&&Yl(e,t)}function Yl(e,t){return Yl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Yl(e,t)}function Xl(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=M$(e,"string");return gn(t)=="symbol"?t:t+""}function M$(e,t){if(gn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(gn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function N$(e){return e.dataKey}function D$(e,t){return T.isValidElement(e)?T.cloneElement(e,t):typeof e=="function"?T.createElement(e,t):T.createElement(u$,t)}var Wt=function(e){function t(){return P$(this,t),E$(this,t,arguments)}return k$(t,e),_$(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,p=a.offset,m=a.payload,y=a.payloadUniqBy,v=a.position,b=a.reverseDirection,w=a.useTranslate3d,x=a.viewBox,A=a.wrapperStyle,g=m??[];f&&g.length&&(g=Ep(m.filter(function(S){return S.value!=null&&(S.hide!==!0||n.props.includeHidden)}),y,N$));var O=g.length>0;return T.createElement(T$,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:d,active:i,coordinate:c,hasPayload:O,offset:p,position:v,reverseDirection:b,useTranslate3d:w,viewBox:x,wrapperStyle:A},D$(u,th(th({},this.props),{},{payload:g})))}}])}(T.PureComponent);Xl(Wt,"displayName","Tooltip"),Xl(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:!vr.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 I$=Ft,L$=function(){return I$.Date.now()},R$=L$,B$=/\s/;function F$(e){for(var t=e.length;t--&&B$.test(e.charAt(t)););return t}var W$=F$,z$=W$,U$=/^\s+/;function G$(e){return e&&e.slice(0,z$(e)+1).replace(U$,"")}var V$=G$,K$=V$,ah=dr,q$=rn,ih=NaN,H$=/^[-+]0x[0-9a-f]+$/i,Y$=/^0b[01]+$/i,X$=/^0o[0-7]+$/i,Z$=parseInt;function J$(e){if(typeof e=="number")return e;if(q$(e))return ih;if(ah(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ah(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=K$(e);var r=Y$.test(e);return r||X$.test(e)?Z$(e.slice(2),r?2:8):H$.test(e)?ih:+e}var oh=J$,Q$=dr,Zl=R$,sh=oh,ek="Expected a function",tk=Math.max,rk=Math.min;function nk(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(ek);t=sh(t)||0,Q$(r)&&(c=!!r.leading,f="maxWait"in r,i=f?tk(sh(r.maxWait)||0,t):i,d="trailing"in r?!!r.trailing:d);function p(O){var S=n,j=a;return n=a=void 0,u=O,o=e.apply(j,S),o}function m(O){return u=O,s=setTimeout(b,t),c?p(O):o}function y(O){var S=O-l,j=O-u,C=t-S;return f?rk(C,i-j):C}function v(O){var S=O-l,j=O-u;return l===void 0||S>=t||S<0||f&&j>=i}function b(){var O=Zl();if(v(O))return w(O);s=setTimeout(b,y(O))}function w(O){return s=void 0,d&&n?p(O):(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:w(Zl())}function g(){var O=Zl(),S=v(O);if(n=arguments,a=this,l=O,S){if(s===void 0)return m(l);if(f)return clearTimeout(s),s=setTimeout(b,t),p(l)}return s===void 0&&(s=setTimeout(b,t)),o}return g.cancel=x,g.flush=A,g}var ak=nk,ik=ak,ok=dr,sk="Expected a function";function lk(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(sk);return ok(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),ik(e,t,{leading:n,maxWait:t,trailing:a})}var uk=lk;const lh=$e(uk);function Sa(e){"@babel/helpers - typeof";return Sa=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},Sa(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 so(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){ck(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 ck(e,t,r){return t=fk(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fk(e){var t=dk(e,"string");return Sa(t)=="symbol"?t:t+""}function dk(e,t){if(Sa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Sa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pk(e,t){return yk(e)||mk(e,t)||vk(e,t)||hk()}function hk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
191
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vk(e,t){if(e){if(typeof e=="string")return ch(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 ch(e,t)}}function ch(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 mk(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 yk(e){if(Array.isArray(e))return e}var gk=T.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,p=e.children,m=e.debounce,y=m===void 0?0:m,v=e.id,b=e.className,w=e.onResize,x=e.style,A=x===void 0?{}:x,g=T.useRef(null),O=T.useRef();O.current=w,T.useImperativeHandle(t,function(){return Object.defineProperty(g.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),g.current},configurable:!0})});var S=T.useState({containerWidth:a.width,containerHeight:a.height}),j=pk(S,2),C=j[0],M=j[1],P=T.useCallback(function(I,$){M(function(D){var k=Math.round(I),B=Math.round($);return D.containerWidth===k&&D.containerHeight===B?D:{containerWidth:k,containerHeight:B}})},[]);T.useEffect(function(){var I=function(G){var E,R=G[0].contentRect,F=R.width,W=R.height;P(F,W),(E=O.current)===null||E===void 0||E.call(O,F,W)};y>0&&(I=lh(I,y,{trailing:!0,leading:!1}));var $=new ResizeObserver(I),D=g.current.getBoundingClientRect(),k=D.width,B=D.height;return P(k,B),$.observe(g.current),function(){$.disconnect()}},[P,y]);var _=T.useMemo(function(){var I=C.containerWidth,$=C.containerHeight;if(I<0||$<0)return null;er(Er(o)||Er(l),`The width(%s) and height(%s) are both fixed numbers,
192
+ maybe you don't need to use a ResponsiveContainer.`,o,l),er(!r||r>0,"The aspect(%s) must be greater than zero.",r);var D=Er(o)?I:o,k=Er(l)?$:l;r&&r>0&&(D?k=D/r:k&&(D=k*r),d&&k>d&&(k=d)),er(D>0||k>0,`The width(%s) and height(%s) of chart should be greater than 0,
133
193
  please check the style of container, or the props width(%s) and height(%s),
134
194
  or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
135
- height and width.`,D,C,o,l,c,f,r);var B=!Array.isArray(p)&&Qt(p.type).endsWith("Chart");return A.Children.map(p,function(U){return A.isValidElement(U)?A.cloneElement(U,io({width:D,height:C},B?{style:io({height:"100%",width:"100%",maxHeight:C,maxWidth:D},U.props.style)}:{})):U})},[r,p,l,d,f,c,j,o]);return A.createElement("div",{id:h?"".concat(h):void 0,className:ye("recharts-responsive-container",b),style:io(io({},T),{},{width:o,height:l,minWidth:c,minHeight:f,maxHeight:d}),ref:m},$)}),Hl=function(t){return null};Hl.displayName="Cell";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 rh(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?rh(Object(r),!0).forEach(function(n){J2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function J2(e,t,r){return t=Q2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Q2(e){var t=ek(e,"string");return Oa(t)=="symbol"?t:t+""}function ek(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(t==="string"?String:Number)(e)}var gn={widthCache:{},cacheCount:0},tk=2e3,rk={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},nh="recharts_measurement_span";function nk(e){var t=Yl({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var Sa=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||vr.isSsr)return{width:0,height:0};var n=nk(r),a=JSON.stringify({text:t,copyStyle:n});if(gn.widthCache[a])return gn.widthCache[a];try{var i=document.getElementById(nh);i||(i=document.createElement("span"),i.setAttribute("id",nh),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=Yl(Yl({},rk),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>tk&&(gn.cacheCount=0,gn.widthCache={}),l}catch{return{width:0,height:0}}},ak=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Aa(e){"@babel/helpers - typeof";return Aa=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},Aa(e)}function oo(e,t){return lk(e)||sk(e,t)||ok(e,t)||ik()}function ik(){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 ok(e,t){if(e){if(typeof e=="string")return ah(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 ah(e,t)}}function ah(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 sk(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 lk(e){if(Array.isArray(e))return e}function uk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ih(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,fk(n.key),n)}}function ck(e,t,r){return t&&ih(e.prototype,t),r&&ih(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function fk(e){var t=dk(e,"string");return Aa(t)=="symbol"?t:t+""}function dk(e,t){if(Aa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Aa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var oh=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,sh=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,pk=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,hk=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,lh={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},vk=Object.keys(lh),bn="NaN";function yk(e,t){return e*lh[t]}var so=function(){function e(t,r){uk(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!pk.test(r)&&(this.num=NaN,this.unit=""),vk.includes(r)&&(this.num=yk(t,r),this.unit="px")}return ck(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=hk.exec(r))!==null&&n!==void 0?n:[],i=oo(a,3),o=i[1],s=i[2];return new e(parseFloat(o),s??"")}}])}();function uh(e){if(e.includes(bn))return bn;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=oh.exec(t))!==null&&r!==void 0?r:[],a=oo(n,4),i=a[1],o=a[2],s=a[3],l=so.parse(i??""),u=so.parse(s??""),c=o==="*"?l.multiply(u):l.divide(u);if(c.isNaN())return bn;t=t.replace(oh,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,d=(f=sh.exec(t))!==null&&f!==void 0?f:[],p=oo(d,4),v=p[1],y=p[2],h=p[3],b=so.parse(v??""),S=so.parse(h??""),x=y==="+"?b.add(S):b.subtract(S);if(x.isNaN())return bn;t=t.replace(sh,x.toString())}return t}var ch=/\(([^()]*)\)/;function mk(e){for(var t=e;t.includes("(");){var r=ch.exec(t),n=oo(r,2),a=n[1];t=t.replace(ch,uh(a))}return t}function gk(e){var t=e.replace(/\s+/g,"");return t=mk(t),t=uh(t),t}function bk(e){try{return gk(e)}catch{return bn}}function Xl(e){var t=bk(e.slice(5,-1));return t===bn?"":t}var xk=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],wk=["dx","dy","angle","className","breakAll"];function Zl(){return Zl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zl.apply(this,arguments)}function fh(e,t){if(e==null)return{};var r=Ok(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 Ok(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 dh(e,t){return Pk(e)||Tk(e,t)||Ak(e,t)||Sk()}function Sk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
137
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ak(e,t){if(e){if(typeof e=="string")return ph(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 ph(e,t)}}function ph(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 Tk(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 Pk(e){if(Array.isArray(e))return e}var hh=/[ \f\n\r\t\v\u2028\u2029]+/,vh=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(hh));var o=i.map(function(l){return{word:l,width:Sa(l,a).width}}),s=n?0:Sa(" ",a).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},_k=function(t,r,n,a,i){var o=t.maxLines,s=t.children,l=t.style,u=t.breakAll,c=Z(o),f=s,d=function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return D.reduce(function(C,B){var U=B.word,G=B.width,E=C[C.length-1];if(E&&(a==null||i||E.width+G+n<Number(a)))E.words.push(U),E.width+=G+n;else{var L={words:[U],width:G};C.push(L)}return C},[])},p=d(r),v=function(D){return D.reduce(function(C,B){return C.width>B.width?C:B})};if(!c)return p;for(var y="…",h=function(D){var C=f.slice(0,D),B=vh({breakAll:u,style:l,children:C+y}).wordsWithComputedWidth,U=d(B),G=U.length>o||v(U).width>Number(a);return[G,U]},b=0,S=f.length-1,x=0,T;b<=S&&x<=f.length-1;){var m=Math.floor((b+S)/2),w=m-1,O=h(w),P=dh(O,2),j=P[0],M=P[1],_=h(m),$=dh(_,1),R=$[0];if(!j&&!R&&(b=m+1),j&&R&&(S=m-1),!j&&R){T=M;break}x++}return T||p},yh=function(t){var r=fe(t)?[]:t.toString().split(hh);return[{words:r}]},Ek=function(t){var r=t.width,n=t.scaleToFit,a=t.children,i=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!vr.isSsr){var l,u,c=vh({breakAll:o,children:a,style:i});if(c){var f=c.wordsWithComputedWidth,d=c.spaceWidth;l=f,u=d}else return yh(a);return _k({breakAll:o,children:a,maxLines:s,style:i},l,u,r,n)}return yh(a)},mh="#808080",lo=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,p=d===void 0?"start":d,v=t.verticalAnchor,y=v===void 0?"end":v,h=t.fill,b=h===void 0?mh:h,S=fh(t,xk),x=A.useMemo(function(){return Ek({breakAll:S.breakAll,children:S.children,maxLines:S.maxLines,scaleToFit:f,style:S.style,width:S.width})},[S.breakAll,S.children,S.maxLines,f,S.style,S.width]),T=S.dx,m=S.dy,w=S.angle,O=S.className,P=S.breakAll,j=fh(S,wk);if(!Ye(n)||!Ye(i))return null;var M=n+(Z(T)?T:0),_=i+(Z(m)?m:0),$;switch(y){case"start":$=Xl("calc(".concat(u,")"));break;case"middle":$=Xl("calc(".concat((x.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:$=Xl("calc(".concat(x.length-1," * -").concat(s,")"));break}var R=[];if(f){var k=x[0].width,D=S.width;R.push("scale(".concat((Z(D)?D/k:1)/k,")"))}return w&&R.push("rotate(".concat(w,", ").concat(M,", ").concat(_,")")),R.length&&(j.transform=R.join(" ")),A.createElement("text",Zl({},de(j,!0),{x:M,y:_,className:ye("recharts-text",O),textAnchor:p,fill:b.includes("url")?mh:b}),x.map(function(C,B){var U=C.words.join(P?"":" ");return A.createElement("tspan",{x:M,dy:B===0?$:s,key:"".concat(U,"-").concat(B)},U)}))};function yr(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function jk(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Jl(e){let t,r,n;e.length!==2?(t=yr,r=(s,l)=>yr(e(s),l),n=(s,l)=>e(s)-l):(t=e===yr||e===jk?e:$k,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 $k(){return 0}function gh(e){return e===null?NaN:+e}function*Ck(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const Ta=Jl(yr).right;Jl(gh).center;class bh extends Map{constructor(t,r=Nk){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(xh(this,t))}has(t){return super.has(xh(this,t))}set(t,r){return super.set(kk(this,t),r)}delete(t){return super.delete(Mk(this,t))}}function xh({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function kk({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function Mk({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function Nk(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Dk(e=yr){if(e===yr)return wh;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 wh(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Ik=Math.sqrt(50),Lk=Math.sqrt(10),Rk=Math.sqrt(2);function uo(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>=Ik?10:i>=Lk?5:i>=Rk?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?uo(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?uo(t,e,r):uo(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,uo(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 Oh(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Sh(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Ah(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?wh:Dk(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),p=Math.max(r,Math.floor(t-u*f/l+d)),v=Math.min(n,Math.floor(t+(l-u)*f/l+d));Ah(e,t,p,v,a)}const i=e[t];let o=r,s=n;for(Pa(e,r,t),a(e[n],i)>0&&Pa(e,r,n);o<s;){for(Pa(e,o,s),++o,--s;a(e[o],i)<0;)++o;for(;a(e[s],i)>0;)--s}a(e[r],i)===0?Pa(e,r,s):(++s,Pa(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function Pa(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function Bk(e,t,r){if(e=Float64Array.from(Ck(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Sh(e);if(t>=1)return Oh(e);var n,a=(n-1)*t,i=Math.floor(a),o=Oh(Ah(e,i).subarray(0,i+1)),s=Sh(e.subarray(i+1));return o+(s-o)*(a-i)}}function Fk(e,t,r=gh){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 Wk(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 Tt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function rr(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 bh,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 bh;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)},Tt.apply(a,arguments),a}function _a(){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,p=a<n,v=p?a:n,y=p?n:a;i=(y-v)/Math.max(1,d-l+u*2),s&&(i=Math.floor(i)),v+=(y-v-i*(d-l))*c,o=i*(1-l),s&&(v=Math.round(v),o=Math.round(o));var h=Wk(d).map(function(b){return v+i*b});return r(p?h.reverse():h)}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 _a(t(),[n,a]).round(s).paddingInner(l).paddingOuter(u).align(c)},Tt.apply(f(),arguments)}function Th(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Th(t())},e}function Ea(){return Th(_a.apply(null,arguments).paddingInner(1))}function au(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Ph(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function ja(){}var $a=.7,co=1/$a,xn="\\s*([+-]?\\d+)\\s*",Ca="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ut="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Uk=/^#([0-9a-f]{3,8})$/,zk=new RegExp(`^rgb\\(${xn},${xn},${xn}\\)$`),Gk=new RegExp(`^rgb\\(${Ut},${Ut},${Ut}\\)$`),Kk=new RegExp(`^rgba\\(${xn},${xn},${xn},${Ca}\\)$`),Vk=new RegExp(`^rgba\\(${Ut},${Ut},${Ut},${Ca}\\)$`),qk=new RegExp(`^hsl\\(${Ca},${Ut},${Ut}\\)$`),Hk=new RegExp(`^hsla\\(${Ca},${Ut},${Ut},${Ca}\\)$`),_h={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(ja,ka,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Eh,formatHex:Eh,formatHex8:Yk,formatHsl:Xk,formatRgb:jh,toString:jh});function Eh(){return this.rgb().formatHex()}function Yk(){return this.rgb().formatHex8()}function Xk(){return Nh(this).formatHsl()}function jh(){return this.rgb().formatRgb()}function ka(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Uk.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?$h(t):r===3?new pt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?fo(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?fo(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=zk.exec(e))?new pt(t[1],t[2],t[3],1):(t=Gk.exec(e))?new pt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Kk.exec(e))?fo(t[1],t[2],t[3],t[4]):(t=Vk.exec(e))?fo(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=qk.exec(e))?Mh(t[1],t[2]/100,t[3]/100,1):(t=Hk.exec(e))?Mh(t[1],t[2]/100,t[3]/100,t[4]):_h.hasOwnProperty(e)?$h(_h[e]):e==="transparent"?new pt(NaN,NaN,NaN,0):null}function $h(e){return new pt(e>>16&255,e>>8&255,e&255,1)}function fo(e,t,r,n){return n<=0&&(e=t=r=NaN),new pt(e,t,r,n)}function Zk(e){return e instanceof ja||(e=ka(e)),e?(e=e.rgb(),new pt(e.r,e.g,e.b,e.opacity)):new pt}function iu(e,t,r,n){return arguments.length===1?Zk(e):new pt(e,t,r,n??1)}function pt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}au(pt,iu,Ph(ja,{brighter(e){return e=e==null?co:Math.pow(co,e),new pt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?$a:Math.pow($a,e),new pt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new pt(Nr(this.r),Nr(this.g),Nr(this.b),po(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:Ch,formatHex:Ch,formatHex8:Jk,formatRgb:kh,toString:kh}));function Ch(){return`#${Dr(this.r)}${Dr(this.g)}${Dr(this.b)}`}function Jk(){return`#${Dr(this.r)}${Dr(this.g)}${Dr(this.b)}${Dr((isNaN(this.opacity)?1:this.opacity)*255)}`}function kh(){const e=po(this.opacity);return`${e===1?"rgb(":"rgba("}${Nr(this.r)}, ${Nr(this.g)}, ${Nr(this.b)}${e===1?")":`, ${e})`}`}function po(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Nr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Dr(e){return e=Nr(e),(e<16?"0":"")+e.toString(16)}function Mh(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 Nh(e){if(e instanceof Mt)return new Mt(e.h,e.s,e.l,e.opacity);if(e instanceof ja||(e=ka(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 Qk(e,t,r,n){return arguments.length===1?Nh(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,Qk,Ph(ja,{brighter(e){return e=e==null?co:Math.pow(co,e),new Mt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?$a:Math.pow($a,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 pt(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(Dh(this.h),ho(this.s),ho(this.l),po(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=po(this.opacity);return`${e===1?"hsl(":"hsla("}${Dh(this.h)}, ${ho(this.s)*100}%, ${ho(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Dh(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 eM(e,t){return function(r){return e+r*t}}function tM(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 rM(e){return(e=+e)==1?Ih:function(t,r){return r-t?tM(t,r,e):su(isNaN(t)?r:t)}}function Ih(e,t){var r=t-e;return r?eM(e,r):su(isNaN(e)?t:e)}const Lh=function e(t){var r=rM(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=Ih(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 nM(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 aM(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function iM(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 oM(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function vo(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function sM(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 lM(e){return function(){return e}}function uM(e){return function(t){return e(t)+""}}function cM(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:vo(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]?uM(l[0].x):lM(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"?vo:r==="string"?(n=ka(t))?(t=n,Lh):cM:t instanceof ka?Lh:t instanceof Date?oM:aM(t)?nM:Array.isArray(t)?iM:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?sM:vo)(e,t)}function cu(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function fM(e,t){t===void 0&&(t=e,e=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 dM(e){return function(){return e}}function yo(e){return+e}var Rh=[0,1];function st(e){return e}function fu(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:dM(isNaN(t)?NaN:.5)}function pM(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function hM(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 vM(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=Ta(e,s,1,n)-1;return i[l](a[l](s))}}function Ma(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function mo(){var e=Rh,t=Rh,r=wn,n,a,i,o=st,s,l,u;function c(){var d=Math.min(e.length,t.length);return o!==st&&(o=pM(e[0],e[d-1])),s=d>2?vM:hM,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),vo)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,yo),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:st,c()):o!==st},f.interpolate=function(d){return arguments.length?(r=d,c()):r},f.unknown=function(d){return arguments.length?(i=d,f):i},function(d,p){return n=d,a=p,c()}}function du(){return mo()(st,st)}function yM(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function go(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=go(Math.abs(e)),e?e[1]:NaN}function mM(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 gM(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var bM=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Na(e){if(!(t=bM.exec(e)))throw new Error("invalid format: "+e);var t;return new pu({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]})}Na.prototype=pu.prototype;function pu(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+""}pu.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 xM(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 Bh;function wM(e,t){var r=go(e,t);if(!r)return e+"";var n=r[0],a=r[1],i=a-(Bh=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")+go(e,Math.max(0,t+i-1))[0]}function Fh(e,t){var r=go(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 Wh={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:yM,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)=>Fh(e*100,t),r:Fh,s:wM,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Uh(e){return e}var zh=Array.prototype.map,Gh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function OM(e){var t=e.grouping===void 0||e.thousands===void 0?Uh:mM(zh.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?Uh:gM(zh.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=Na(f);var d=f.fill,p=f.align,v=f.sign,y=f.symbol,h=f.zero,b=f.width,S=f.comma,x=f.precision,T=f.trim,m=f.type;m==="n"?(S=!0,m="g"):Wh[m]||(x===void 0&&(x=12),T=!0,m="g"),(h||d==="0"&&p==="=")&&(h=!0,d="0",p="=");var w=y==="$"?r:y==="#"&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",O=y==="$"?n:/[%p]/.test(m)?o:"",P=Wh[m],j=/[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 M(_){var $=w,R=O,k,D,C;if(m==="c")R=P(_)+R,_="";else{_=+_;var B=_<0||1/_<0;if(_=isNaN(_)?l:P(Math.abs(_),x),T&&(_=xM(_)),B&&+_==0&&v!=="+"&&(B=!1),$=(B?v==="("?v:s:v==="-"||v==="("?"":v)+$,R=(m==="s"?Gh[8+Bh/3]:"")+R+(B&&v==="("?")":""),j){for(k=-1,D=_.length;++k<D;)if(C=_.charCodeAt(k),48>C||C>57){R=(C===46?a+_.slice(k+1):_.slice(k))+R,_=_.slice(0,k);break}}}S&&!h&&(_=t(_,1/0));var U=$.length+_.length+R.length,G=U<b?new Array(b-U+1).join(d):"";switch(S&&h&&(_=t(G+_,G.length?b-R.length:1/0),G=""),p){case"<":_=$+_+R+G;break;case"=":_=$+G+_+R;break;case"^":_=G.slice(0,U=G.length>>1)+$+_+R+G.slice(U);break;default:_=G+$+_+R;break}return i(_)}return M.toString=function(){return f+""},M}function c(f,d){var p=u((f=Na(f),f.type="f",f)),v=Math.max(-8,Math.min(8,Math.floor(On(d)/3)))*3,y=Math.pow(10,-v),h=Gh[8+v/3];return function(b){return p(y*b)+h}}return{format:u,formatPrefix:c}}var bo,hu,Kh;SM({thousands:",",grouping:[3],currency:["$",""]});function SM(e){return bo=OM(e),hu=bo.format,Kh=bo.formatPrefix,bo}function AM(e){return Math.max(0,-On(Math.abs(e)))}function TM(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(On(t)/3)))*3-On(Math.abs(e)))}function PM(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,On(t)-On(e))+1}function Vh(e,t,r,n){var a=tu(e,t,r),i;switch(n=Na(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(i=TM(a,o))&&(n.precision=i),Kh(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=PM(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=AM(a))&&(n.precision=i-(n.type==="%")*2);break}}return hu(n)}function mr(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 Vh(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 xo(){var e=du();return e.copy=function(){return Ma(e,xo())},Tt.apply(e,arguments),mr(e)}function qh(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,yo),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return qh(e).unknown(t)},e=arguments.length?Array.from(e,yo):[0,1],mr(r)}function Hh(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 Yh(e){return Math.log(e)}function Xh(e){return Math.exp(e)}function _M(e){return-Math.log(-e)}function EM(e){return-Math.exp(-e)}function jM(e){return isFinite(e)?+("1e"+e):e<0?0:e}function $M(e){return e===10?jM:e===Math.E?Math.exp:t=>Math.pow(e,t)}function CM(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 Zh(e){return(t,r)=>-e(-t,r)}function vu(e){const t=e(Yh,Xh),r=t.domain;let n=10,a,i;function o(){return a=CM(n),i=$M(n),r()[0]<0?(a=Zh(a),i=Zh(i),e(_M,EM)):e(Yh,Xh),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),p=a(c),v,y;const h=s==null?10:+s;let b=[];if(!(n%1)&&p-d<h){if(d=Math.floor(d),p=Math.ceil(p),u>0){for(;d<=p;++d)for(v=1;v<n;++v)if(y=d<0?v/i(-d):v*i(d),!(y<u)){if(y>c)break;b.push(y)}}else for(;d<=p;++d)for(v=n-1;v>=1;--v)if(y=d>0?v/i(-d):v*i(d),!(y<u)){if(y>c)break;b.push(y)}b.length*2<h&&(b=Ql(u,c,h))}else b=Ql(d,p,Math.min(p-d,h)).map(i);return f?b.reverse():b},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Na(l)).precision==null&&(l.trim=!0),l=hu(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(Hh(r(),{floor:s=>i(Math.floor(a(s))),ceil:s=>i(Math.ceil(a(s)))})),t}function Jh(){const e=vu(mo()).domain([1,10]);return e.copy=()=>Ma(e,Jh()).base(e.base()),Tt.apply(e,arguments),e}function Qh(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function ev(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function yu(e){var t=1,r=e(Qh(t),ev(t));return r.constant=function(n){return arguments.length?e(Qh(t=+n),ev(t)):t},mr(r)}function tv(){var e=yu(mo());return e.copy=function(){return Ma(e,tv()).constant(e.constant())},Tt.apply(e,arguments)}function rv(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function kM(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function MM(e){return e<0?-e*e:e*e}function mu(e){var t=e(st,st),r=1;function n(){return r===1?e(st,st):r===.5?e(kM,MM):e(rv(r),rv(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},mr(t)}function gu(){var e=mu(mo());return e.copy=function(){return Ma(e,gu()).exponent(e.exponent())},Tt.apply(e,arguments),e}function NM(){return gu.apply(null,arguments).exponent(.5)}function nv(e){return Math.sign(e)*e*e}function DM(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function av(){var e=du(),t=[0,1],r=!1,n;function a(i){var o=DM(e(i));return isNaN(o)?n:r?Math.round(o):o}return a.invert=function(i){return e.invert(nv(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,yo)).map(nv)),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 av(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Tt.apply(a,arguments),mr(a)}function iv(){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]=Fk(e,o/s);return i}function i(o){return o==null||isNaN(o=+o)?n:t[Ta(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(yr),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 iv().domain(e).range(t).unknown(n)},Tt.apply(i,arguments)}function ov(){var e=0,t=1,r=1,n=[.5],a=[0,1],i;function o(l){return l!=null&&l<=l?a[Ta(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 ov().domain([e,t]).range(a).unknown(i)},Tt.apply(mr(o),arguments)}function sv(){var e=[.5],t=[0,1],r,n=1;function a(i){return i!=null&&i<=i?t[Ta(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 sv().domain(e).range(t).unknown(r)},Tt.apply(a,arguments)}const bu=new Date,xu=new Date;function Xe(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=>Xe(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 wo=Xe(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);wo.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Xe(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):wo),wo.range;const nr=1e3,Pt=nr*60,ar=Pt*60,ir=ar*24,wu=ir*7,lv=ir*30,Ou=ir*365,Ir=Xe(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*nr)},(e,t)=>(t-e)/nr,e=>e.getUTCSeconds());Ir.range;const Su=Xe(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr)},(e,t)=>{e.setTime(+e+t*Pt)},(e,t)=>(t-e)/Pt,e=>e.getMinutes());Su.range;const Au=Xe(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Pt)},(e,t)=>(t-e)/Pt,e=>e.getUTCMinutes());Au.range;const Tu=Xe(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr-e.getMinutes()*Pt)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getHours());Tu.range;const Pu=Xe(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getUTCHours());Pu.range;const Da=Xe(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Pt)/ir,e=>e.getDate()-1);Da.range;const Oo=Xe(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ir,e=>e.getUTCDate()-1);Oo.range;const uv=Xe(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ir,e=>Math.floor(e/ir));uv.range;function Lr(e){return Xe(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())*Pt)/wu)}const So=Lr(0),Ao=Lr(1),IM=Lr(2),LM=Lr(3),Sn=Lr(4),RM=Lr(5),BM=Lr(6);So.range,Ao.range,IM.range,LM.range,Sn.range,RM.range,BM.range;function Rr(e){return Xe(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 To=Rr(0),Po=Rr(1),FM=Rr(2),WM=Rr(3),An=Rr(4),UM=Rr(5),zM=Rr(6);To.range,Po.range,FM.range,WM.range,An.range,UM.range,zM.range;const _u=Xe(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 Eu=Xe(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());Eu.range;const or=Xe(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());or.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Xe(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)}),or.range;const sr=Xe(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());sr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Xe(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)}),sr.range;function cv(e,t,r,n,a,i){const o=[[Ir,1,nr],[Ir,5,5*nr],[Ir,15,15*nr],[Ir,30,30*nr],[i,1,Pt],[i,5,5*Pt],[i,15,15*Pt],[i,30,30*Pt],[a,1,ar],[a,3,3*ar],[a,6,6*ar],[a,12,12*ar],[n,1,ir],[n,2,2*ir],[r,1,wu],[t,1,lv],[t,3,3*lv],[e,1,Ou]];function s(u,c,f){const d=c<u;d&&([u,c]=[c,u]);const p=f&&typeof f.range=="function"?f:l(u,c,f),v=p?p.range(u,+c+1):[];return d?v.reverse():v}function l(u,c,f){const d=Math.abs(c-u)/f,p=Jl(([,,h])=>h).right(o,d);if(p===o.length)return e.every(tu(u/Ou,c/Ou,f));if(p===0)return wo.every(Math.max(tu(u,c,f),1));const[v,y]=o[d/o[p-1][2]<o[p][2]/d?p-1:p];return v.every(y)}return[s,l]}const[GM,KM]=cv(sr,Eu,To,uv,Pu,Au),[VM,qM]=cv(or,_u,So,Da,Tu,Su);function ju(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 Ia(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function HM(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=La(a),c=Ra(a),f=La(i),d=Ra(i),p=La(o),v=Ra(o),y=La(s),h=Ra(s),b=La(l),S=Ra(l),x={a:B,A:U,b:G,B:E,c:null,d:yv,e:yv,f:mN,g:_N,G:jN,H:hN,I:vN,j:yN,L:mv,m:gN,M:bN,p:L,q:F,Q:Sv,s:Av,S:xN,u:wN,U:ON,V:SN,w:AN,W:TN,x:null,X:null,y:PN,Y:EN,Z:$N,"%":Ov},T={a:W,A:K,b:X,B:Q,c:null,d:bv,e:bv,f:NN,g:GN,G:VN,H:CN,I:kN,j:MN,L:xv,m:DN,M:IN,p:ae,q:te,Q:Sv,s:Av,S:LN,u:RN,U:BN,V:FN,w:WN,W:UN,x:null,X:null,y:zN,Y:KN,Z:qN,"%":Ov},m={a:M,A:_,b:$,B:R,c:k,d:hv,e:hv,f:cN,g:pv,G:dv,H:vv,I:vv,j:oN,L:uN,m:iN,M:sN,p:j,q:aN,Q:dN,s:pN,S:lN,u:QM,U:eN,V:tN,w:JM,W:rN,x:D,X:C,y:pv,Y:dv,Z:nN,"%":fN};x.x=w(r,x),x.X=w(n,x),x.c=w(t,x),T.x=w(r,T),T.X=w(n,T),T.c=w(t,T);function w(V,Y){return function(J){var I=[],ie=-1,q=0,se=V.length,ee,ve,We;for(J instanceof Date||(J=new Date(+J));++ie<se;)V.charCodeAt(ie)===37&&(I.push(V.slice(q,ie)),(ve=fv[ee=V.charAt(++ie)])!=null?ee=V.charAt(++ie):ve=ee==="e"?" ":"0",(We=Y[ee])&&(ee=We(J,ve)),I.push(ee),q=ie+1);return I.push(V.slice(q,ie)),I.join("")}}function O(V,Y){return function(J){var I=Ia(1900,void 0,1),ie=P(I,V,J+="",0),q,se;if(ie!=J.length)return null;if("Q"in I)return new Date(I.Q);if("s"in I)return new Date(I.s*1e3+("L"in I?I.L:0));if(Y&&!("Z"in I)&&(I.Z=0),"p"in I&&(I.H=I.H%12+I.p*12),I.m===void 0&&(I.m="q"in I?I.q:0),"V"in I){if(I.V<1||I.V>53)return null;"w"in I||(I.w=1),"Z"in I?(q=$u(Ia(I.y,0,1)),se=q.getUTCDay(),q=se>4||se===0?Po.ceil(q):Po(q),q=Oo.offset(q,(I.V-1)*7),I.y=q.getUTCFullYear(),I.m=q.getUTCMonth(),I.d=q.getUTCDate()+(I.w+6)%7):(q=ju(Ia(I.y,0,1)),se=q.getDay(),q=se>4||se===0?Ao.ceil(q):Ao(q),q=Da.offset(q,(I.V-1)*7),I.y=q.getFullYear(),I.m=q.getMonth(),I.d=q.getDate()+(I.w+6)%7)}else("W"in I||"U"in I)&&("w"in I||(I.w="u"in I?I.u%7:"W"in I?1:0),se="Z"in I?$u(Ia(I.y,0,1)).getUTCDay():ju(Ia(I.y,0,1)).getDay(),I.m=0,I.d="W"in I?(I.w+6)%7+I.W*7-(se+5)%7:I.w+I.U*7-(se+6)%7);return"Z"in I?(I.H+=I.Z/100|0,I.M+=I.Z%100,$u(I)):ju(I)}}function P(V,Y,J,I){for(var ie=0,q=Y.length,se=J.length,ee,ve;ie<q;){if(I>=se)return-1;if(ee=Y.charCodeAt(ie++),ee===37){if(ee=Y.charAt(ie++),ve=m[ee in fv?Y.charAt(ie++):ee],!ve||(I=ve(V,J,I))<0)return-1}else if(ee!=J.charCodeAt(I++))return-1}return I}function j(V,Y,J){var I=u.exec(Y.slice(J));return I?(V.p=c.get(I[0].toLowerCase()),J+I[0].length):-1}function M(V,Y,J){var I=p.exec(Y.slice(J));return I?(V.w=v.get(I[0].toLowerCase()),J+I[0].length):-1}function _(V,Y,J){var I=f.exec(Y.slice(J));return I?(V.w=d.get(I[0].toLowerCase()),J+I[0].length):-1}function $(V,Y,J){var I=b.exec(Y.slice(J));return I?(V.m=S.get(I[0].toLowerCase()),J+I[0].length):-1}function R(V,Y,J){var I=y.exec(Y.slice(J));return I?(V.m=h.get(I[0].toLowerCase()),J+I[0].length):-1}function k(V,Y,J){return P(V,t,Y,J)}function D(V,Y,J){return P(V,r,Y,J)}function C(V,Y,J){return P(V,n,Y,J)}function B(V){return o[V.getDay()]}function U(V){return i[V.getDay()]}function G(V){return l[V.getMonth()]}function E(V){return s[V.getMonth()]}function L(V){return a[+(V.getHours()>=12)]}function F(V){return 1+~~(V.getMonth()/3)}function W(V){return o[V.getUTCDay()]}function K(V){return i[V.getUTCDay()]}function X(V){return l[V.getUTCMonth()]}function Q(V){return s[V.getUTCMonth()]}function ae(V){return a[+(V.getUTCHours()>=12)]}function te(V){return 1+~~(V.getUTCMonth()/3)}return{format:function(V){var Y=w(V+="",x);return Y.toString=function(){return V},Y},parse:function(V){var Y=O(V+="",!1);return Y.toString=function(){return V},Y},utcFormat:function(V){var Y=w(V+="",T);return Y.toString=function(){return V},Y},utcParse:function(V){var Y=O(V+="",!0);return Y.toString=function(){return V},Y}}}var fv={"-":"",_:" ",0:"0"},et=/^\s*\d+/,YM=/^%/,XM=/[\\^$*+?|[\]().{}]/g;function be(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 ZM(e){return e.replace(XM,"\\$&")}function La(e){return new RegExp("^(?:"+e.map(ZM).join("|")+")","i")}function Ra(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function JM(e,t,r){var n=et.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function QM(e,t,r){var n=et.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function eN(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function tN(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function rN(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function dv(e,t,r){var n=et.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function pv(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function nN(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 aN(e,t,r){var n=et.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function iN(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function hv(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function oN(e,t,r){var n=et.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function vv(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function sN(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function lN(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function uN(e,t,r){var n=et.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function cN(e,t,r){var n=et.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function fN(e,t,r){var n=YM.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function dN(e,t,r){var n=et.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function pN(e,t,r){var n=et.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function yv(e,t){return be(e.getDate(),t,2)}function hN(e,t){return be(e.getHours(),t,2)}function vN(e,t){return be(e.getHours()%12||12,t,2)}function yN(e,t){return be(1+Da.count(or(e),e),t,3)}function mv(e,t){return be(e.getMilliseconds(),t,3)}function mN(e,t){return mv(e,t)+"000"}function gN(e,t){return be(e.getMonth()+1,t,2)}function bN(e,t){return be(e.getMinutes(),t,2)}function xN(e,t){return be(e.getSeconds(),t,2)}function wN(e){var t=e.getDay();return t===0?7:t}function ON(e,t){return be(So.count(or(e)-1,e),t,2)}function gv(e){var t=e.getDay();return t>=4||t===0?Sn(e):Sn.ceil(e)}function SN(e,t){return e=gv(e),be(Sn.count(or(e),e)+(or(e).getDay()===4),t,2)}function AN(e){return e.getDay()}function TN(e,t){return be(Ao.count(or(e)-1,e),t,2)}function PN(e,t){return be(e.getFullYear()%100,t,2)}function _N(e,t){return e=gv(e),be(e.getFullYear()%100,t,2)}function EN(e,t){return be(e.getFullYear()%1e4,t,4)}function jN(e,t){var r=e.getDay();return e=r>=4||r===0?Sn(e):Sn.ceil(e),be(e.getFullYear()%1e4,t,4)}function $N(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+be(t/60|0,"0",2)+be(t%60,"0",2)}function bv(e,t){return be(e.getUTCDate(),t,2)}function CN(e,t){return be(e.getUTCHours(),t,2)}function kN(e,t){return be(e.getUTCHours()%12||12,t,2)}function MN(e,t){return be(1+Oo.count(sr(e),e),t,3)}function xv(e,t){return be(e.getUTCMilliseconds(),t,3)}function NN(e,t){return xv(e,t)+"000"}function DN(e,t){return be(e.getUTCMonth()+1,t,2)}function IN(e,t){return be(e.getUTCMinutes(),t,2)}function LN(e,t){return be(e.getUTCSeconds(),t,2)}function RN(e){var t=e.getUTCDay();return t===0?7:t}function BN(e,t){return be(To.count(sr(e)-1,e),t,2)}function wv(e){var t=e.getUTCDay();return t>=4||t===0?An(e):An.ceil(e)}function FN(e,t){return e=wv(e),be(An.count(sr(e),e)+(sr(e).getUTCDay()===4),t,2)}function WN(e){return e.getUTCDay()}function UN(e,t){return be(Po.count(sr(e)-1,e),t,2)}function zN(e,t){return be(e.getUTCFullYear()%100,t,2)}function GN(e,t){return e=wv(e),be(e.getUTCFullYear()%100,t,2)}function KN(e,t){return be(e.getUTCFullYear()%1e4,t,4)}function VN(e,t){var r=e.getUTCDay();return e=r>=4||r===0?An(e):An.ceil(e),be(e.getUTCFullYear()%1e4,t,4)}function qN(){return"+0000"}function Ov(){return"%"}function Sv(e){return+e}function Av(e){return Math.floor(+e/1e3)}var Tn,Tv,Pv;HN({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 HN(e){return Tn=HM(e),Tv=Tn.format,Tn.parse,Pv=Tn.utcFormat,Tn.utcParse,Tn}function YN(e){return new Date(e)}function XN(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,p=u(".%L"),v=u(":%S"),y=u("%I:%M"),h=u("%I %p"),b=u("%a %d"),S=u("%b %d"),x=u("%B"),T=u("%Y");function m(w){return(l(w)<w?p:s(w)<w?v:o(w)<w?y:i(w)<w?h:n(w)<w?a(w)<w?b:S:r(w)<w?x:T)(w)}return c.invert=function(w){return new Date(f(w))},c.domain=function(w){return arguments.length?d(Array.from(w,XN)):d().map(YN)},c.ticks=function(w){var O=d();return e(O[0],O[O.length-1],w??10)},c.tickFormat=function(w,O){return O==null?m:u(O)},c.nice=function(w){var O=d();return(!w||typeof w.range!="function")&&(w=t(O[0],O[O.length-1],w??10)),w?d(Hh(O,w)):c},c.copy=function(){return Ma(c,Cu(e,t,r,n,a,i,o,s,l,u))},c}function ZN(){return Tt.apply(Cu(VM,qM,or,_u,So,Da,Tu,Su,Ir,Tv).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function JN(){return Tt.apply(Cu(GM,KM,sr,Eu,To,Oo,Pu,Au,Ir,Pv).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function _o(){var e=0,t=1,r,n,a,i,o=st,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 p,v;return arguments.length?([p,v]=d,o=f(p,v),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 gr(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function _v(){var e=mr(_o()(st));return e.copy=function(){return gr(e,_v())},rr.apply(e,arguments)}function Ev(){var e=vu(_o()).domain([1,10]);return e.copy=function(){return gr(e,Ev()).base(e.base())},rr.apply(e,arguments)}function jv(){var e=yu(_o());return e.copy=function(){return gr(e,jv()).constant(e.constant())},rr.apply(e,arguments)}function ku(){var e=mu(_o());return e.copy=function(){return gr(e,ku()).exponent(e.exponent())},rr.apply(e,arguments)}function QN(){return ku.apply(null,arguments).exponent(.5)}function $v(){var e=[],t=st;function r(n){if(n!=null&&!isNaN(n=+n))return t((Ta(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(yr),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)=>Bk(e,i/n))},r.copy=function(){return $v(t).domain(e)},rr.apply(r,arguments)}function Eo(){var e=0,t=.5,r=1,n=1,a,i,o,s,l,u=st,c,f=!1,d;function p(y){return isNaN(y=+y)?d:(y=.5+((y=+c(y))-i)*(n*y<n*i?s:l),u(f?Math.max(0,Math.min(1,y)):y))}p.domain=function(y){return arguments.length?([e,t,r]=y,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,p):[e,t,r]},p.clamp=function(y){return arguments.length?(f=!!y,p):f},p.interpolator=function(y){return arguments.length?(u=y,p):u};function v(y){return function(h){var b,S,x;return arguments.length?([b,S,x]=h,u=fM(y,[b,S,x]),p):[u(0),u(.5),u(1)]}}return p.range=v(wn),p.rangeRound=v(cu),p.unknown=function(y){return arguments.length?(d=y,p):d},function(y){return c=y,a=y(e),i=y(t),o=y(r),s=a===i?0:.5/(i-a),l=i===o?0:.5/(o-i),n=i<a?-1:1,p}}function Cv(){var e=mr(Eo()(st));return e.copy=function(){return gr(e,Cv())},rr.apply(e,arguments)}function kv(){var e=vu(Eo()).domain([.1,1,10]);return e.copy=function(){return gr(e,kv()).base(e.base())},rr.apply(e,arguments)}function Mv(){var e=yu(Eo());return e.copy=function(){return gr(e,Mv()).constant(e.constant())},rr.apply(e,arguments)}function Mu(){var e=mu(Eo());return e.copy=function(){return gr(e,Mu()).exponent(e.exponent())},rr.apply(e,arguments)}function eD(){return Mu.apply(null,arguments).exponent(.5)}const Nv=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:_a,scaleDiverging:Cv,scaleDivergingLog:kv,scaleDivergingPow:Mu,scaleDivergingSqrt:eD,scaleDivergingSymlog:Mv,scaleIdentity:qh,scaleImplicit:ru,scaleLinear:xo,scaleLog:Jh,scaleOrdinal:nu,scalePoint:Ea,scalePow:gu,scaleQuantile:iv,scaleQuantize:ov,scaleRadial:av,scaleSequential:_v,scaleSequentialLog:Ev,scaleSequentialPow:ku,scaleSequentialQuantile:$v,scaleSequentialSqrt:QN,scaleSequentialSymlog:jv,scaleSqrt:NM,scaleSymlog:tv,scaleThreshold:sv,scaleTime:ZN,scaleUtc:JN,tickFormat:Vh},Symbol.toStringTag,{value:"Module"}));var tD=tn;function rD(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&&!tD(o):r(o,s)))var s=o,l=i}return l}var Dv=rD;function nD(e,t){return e>t}var aD=nD,iD=Dv,oD=aD,sD=pn;function lD(e){return e&&e.length?iD(e,sD,oD):void 0}var uD=lD;const br=Ce(uD);function cD(e,t){return e<t}var fD=cD,dD=Dv,pD=fD,hD=pn;function vD(e){return e&&e.length?dD(e,hD,pD):void 0}var yD=vD;const jo=Ce(yD);var mD=Xs,gD=hr,bD=Cp,xD=ft;function wD(e,t){var r=xD(e)?mD:bD;return r(e,gD(t))}var OD=wD,SD=jp,AD=OD;function TD(e,t){return SD(AD(e,t),1)}var PD=TD;const _D=Ce(PD);var ED=Dl;function jD(e,t){return ED(e,t)}var $D=jD;const Br=Ce($D);var Pn=1e9,CD={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Iu,Le=!0,_t="[DecimalError] ",Fr=_t+"Invalid argument: ",Nu=_t+"Exponent out of range: ",_n=Math.floor,Wr=Math.pow,kD=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,mt,tt=1e7,Ie=7,Iv=9007199254740991,$o=_n(Iv/Ie),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)*Ie;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 lr(this,new this.constructor(e))},ne.dividedToIntegerBy=ne.idiv=function(e){var t=this,r=t.constructor;return je(lr(t,new r(e),0,1),r.precision)},ne.equals=ne.eq=function(e){return!this.cmp(e)},ne.exponent=function(){return Ve(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(mt))throw Error(_t+"NaN");if(r.s<1)throw Error(_t+(r.s?"NaN":"-Infinity"));return r.eq(mt)?new n(0):(Le=!1,t=lr(Ba(r,i),Ba(e,i),i),Le=!0,je(t,a))},ne.minus=ne.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Fv(t,e):Lv(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(_t+"NaN");return r.s?(Le=!1,t=lr(r,e,0,1).times(e),Le=!0,r.minus(t)):je(new n(r),a)},ne.naturalExponential=ne.exp=function(){return Rv(this)},ne.naturalLogarithm=ne.ln=function(){return Ba(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?Lv(t,e):Fv(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(Fr+e);if(t=Ve(a)+1,n=a.d.length-1,r=n*Ie+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(_t+"NaN")}for(e=Ve(s),Le=!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=_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(lr(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(je(i,r+1,0),i.times(i).eq(s)){n=i;break}}else if(t!="9999")break;o+=4}return Le=!0,je(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,p=(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=p.length,l<u&&(i=d,d=p,p=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]+p[n]*d[a-n-1]+t,i[a--]=s%tt|0,t=s/tt|0;i[a]=(i[a]+t)%tt|0}for(;!i[--o];)i.pop();return t?++r:i.shift(),e.d=i,e.e=r,Le?je(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,Pn),t===void 0?t=n.rounding:zt(t,0,8),je(r,e+Ve(r)+1,t))},ne.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=Ur(n,!0):(zt(e,0,Pn),t===void 0?t=a.rounding:zt(t,0,8),n=je(new a(n),e+1,t),r=Ur(n,!0,e+1)),r},ne.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?Ur(a):(zt(e,0,Pn),t===void 0?t=i.rounding:zt(t,0,8),n=je(new i(a),e+Ve(a)+1,t),r=Ur(n.abs(),!1,e+Ve(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)},ne.toInteger=ne.toint=function(){var e=this,t=e.constructor;return je(new t(e),Ve(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(mt);if(s=new l(s),!s.s){if(e.s<1)throw Error(_t+"Infinity");return s}if(s.eq(mt))return s;if(n=l.precision,e.eq(mt))return je(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,i=s.s,o){if((r=c<0?-c:c)<=Iv){for(a=new l(mt),t=Math.ceil(n/Ie+4),Le=!1;r%2&&(a=a.times(s),Wv(a.d,t)),r=_n(r/2),r!==0;)s=s.times(s),Wv(s.d,t);return Le=!0,e.s<0?new l(mt).div(a):je(a,n)}}else if(i<0)throw Error(_t+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Le=!1,a=e.times(Ba(s,n+u)),Le=!0,a=Rv(a),a.s=i,a},ne.toPrecision=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?(r=Ve(a),n=Ur(a,r<=i.toExpNeg||r>=i.toExpPos)):(zt(e,1,Pn),t===void 0?t=i.rounding:zt(t,0,8),a=je(new i(a),e,t),r=Ve(a),n=Ur(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,Pn),t===void 0?t=n.rounding:zt(t,0,8)),je(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=Ve(e),r=e.constructor;return Ur(e,t<=r.toExpNeg||t>=r.toExpPos)};function Lv(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)),Le?je(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/Ie),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)/tt|0,l[i]%=tt;for(r&&(l.unshift(r),++a),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=a,Le?je(t,f):t}function zt(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Fr+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=Ie-n.length,r&&(i+=xr(r)),i+=n;o=e[t],n=o+"",r=Ie-n.length,r&&(i+=xr(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}var lr=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%tt|0,o=i/tt|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*tt+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,p,v,y,h,b,S,x,T,m,w,O,P,j=n.constructor,M=n.s==a.s?1:-1,_=n.d,$=a.d;if(!n.s)return new j(n);if(!a.s)throw Error(_t+"Division by zero");for(l=n.e-a.e,O=$.length,m=_.length,p=new j(M),v=p.d=[],u=0;$[u]==(_[u]||0);)++u;if($[u]>(_[u]||0)&&--l,i==null?S=i=j.precision:o?S=i+(Ve(n)-Ve(a))+1:S=i,S<0)return new j(0);if(S=S/Ie+2|0,u=0,O==1)for(c=0,$=$[0],S++;(u<m||c)&&S--;u++)x=c*tt+(_[u]||0),v[u]=x/$|0,c=x%$|0;else{for(c=tt/($[0]+1)|0,c>1&&($=e($,c),_=e(_,c),O=$.length,m=_.length),T=O,y=_.slice(0,O),h=y.length;h<O;)y[h++]=0;P=$.slice(),P.unshift(0),w=$[0],$[1]>=tt/2&&++w;do c=0,s=t($,y,O,h),s<0?(b=y[0],O!=h&&(b=b*tt+(y[1]||0)),c=b/w|0,c>1?(c>=tt&&(c=tt-1),f=e($,c),d=f.length,h=y.length,s=t(f,y,d,h),s==1&&(c--,r(f,O<d?P:$,d))):(c==0&&(s=c=1),f=$.slice()),d=f.length,d<h&&f.unshift(0),r(y,f,h),s==-1&&(h=y.length,s=t($,y,O,h),s<1&&(c++,r(y,O<h?P:$,h))),h=y.length):s===0&&(c++,y=[0]),v[u++]=c,s&&y[0]?y[h++]=_[T]||0:(y=[_[T]],h=1);while((T++<m||y[0]!==void 0)&&S--)}return v[0]||v.shift(),p.e=l,je(p,o?i+Ve(p)+1:i)}}();function Rv(e,t){var r,n,a,i,o,s,l=0,u=0,c=e.constructor,f=c.precision;if(Ve(e)>16)throw Error(Nu+Ve(e));if(!e.s)return new c(mt);for(Le=!1,s=f,o=new c(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(Wr(2,u))/Math.LN10*2+5|0,s+=n,r=a=i=new c(mt),c.precision=s;;){if(a=je(a.times(e),s),r=r.times(++l),o=i.plus(lr(a,r,s)),Gt(o.d).slice(0,s)===Gt(i.d).slice(0,s)){for(;u--;)i=je(i.times(i),s);return c.precision=f,t==null?(Le=!0,je(i,f)):i}i=o}}function Ve(e){for(var t=e.e*Ie,r=e.d[0];r>=10;r/=10)t++;return t}function Du(e,t,r){if(t>e.LN10.sd())throw Le=!0,r&&(e.precision=r),Error(_t+"LN10 precision limit exceeded");return je(new e(e.LN10),t)}function xr(e){for(var t="";e--;)t+="0";return t}function Ba(e,t){var r,n,a,i,o,s,l,u,c,f=1,d=10,p=e,v=p.d,y=p.constructor,h=y.precision;if(p.s<1)throw Error(_t+(p.s?"NaN":"-Infinity"));if(p.eq(mt))return new y(0);if(t==null?(Le=!1,u=h):u=t,p.eq(10))return t==null&&(Le=!0),Du(y,u);if(u+=d,y.precision=u,r=Gt(v),n=r.charAt(0),i=Ve(p),Math.abs(i)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=Gt(p.d),n=r.charAt(0),f++;i=Ve(p),n>1?(p=new y("0."+r),i++):p=new y(n+"."+r.slice(1))}else return l=Du(y,u+2,h).times(i+""),p=Ba(new y(n+"."+r.slice(1)),u-d).plus(l),y.precision=h,t==null?(Le=!0,je(p,h)):p;for(s=o=p=lr(p.minus(mt),p.plus(mt),u),c=je(p.times(p),u),a=3;;){if(o=je(o.times(c),u),l=s.plus(lr(o,new y(a),u)),Gt(l.d).slice(0,u)===Gt(s.d).slice(0,u))return s=s.times(2),i!==0&&(s=s.plus(Du(y,u+2,h).times(i+""))),s=lr(s,new y(f),u),y.precision=h,t==null?(Le=!0,je(s,h)):s;s=l,a+=2}}function Bv(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/Ie),e.d=[],n=(r+1)%Ie,r<0&&(n+=Ie),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=Ie;n<a;)e.d.push(+t.slice(n,n+=Ie));t=t.slice(n),n=Ie-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),Le&&(e.e>$o||e.e<-$o))throw Error(Nu+r)}else e.s=0,e.e=0,e.d=[0];return e}function je(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+=Ie,a=t,u=f[c=0];else{if(c=Math.ceil((n+1)/Ie),i=f.length,c>=i)return e;for(u=i=f[c],o=1;i>=10;i/=10)o++;n%=Ie,a=n-Ie+o}if(r!==void 0&&(i=Wr(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/Wr(10,o-a):0:f[c-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(i=Ve(e),f.length=1,t=t-i-1,f[0]=Wr(10,(Ie-t%Ie)%Ie),e.e=_n(-t/Ie)||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=Wr(10,Ie-n),f[c]=a>0?(u/Wr(10,o-a)%Wr(10,a)|0)*i:0),l)for(;;)if(c==0){(f[0]+=i)==tt&&(f[0]=1,++e.e);break}else{if(f[c]+=i,f[c]!=tt)break;f[c--]=0,i=1}for(n=f.length;f[--n]===0;)f.pop();if(Le&&(e.e>$o||e.e<-$o))throw Error(Nu+Ve(e));return e}function Fv(e,t){var r,n,a,i,o,s,l,u,c,f,d=e.constructor,p=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),Le?je(t,p):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(p/Ie),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]=tt-1;--l[i],l[a]+=tt}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,Le?je(t,p):t):new d(0)}function Ur(e,t,r){var n,a=Ve(e),i=Gt(e.d),o=i.length;return t?(r&&(n=r-o)>0?i=i.charAt(0)+"."+i.slice(1)+xr(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+xr(-a-1)+i,r&&(n=r-o)>0&&(i+=xr(n))):a>=o?(i+=xr(a+1-o),r&&(n=r-a-1)>0&&(i=i+"."+xr(n))):((n=a+1)<o&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-o)>0&&(a+1===o&&(i+="."),i+=xr(n))),e.s<0?"-"+i:i}function Wv(e,t){if(e.length>t)return e.length=t,!0}function Uv(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(Fr+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 Bv(o,i.toString())}else if(typeof i!="string")throw Error(Fr+i);if(i.charCodeAt(0)===45?(i=i.slice(1),o.s=-1):o.s=1,kD.test(i))Bv(o,i);else throw Error(Fr+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=Uv,a.config=a.set=MD,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 MD(e){if(!e||typeof e!="object")throw Error(_t+"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(Fr+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Fr+r+": "+n);return this}var Iu=Uv(CD);mt=new Iu(1);const Ee=Iu;function ND(e){return RD(e)||LD(e)||ID(e)||DD()}function DD(){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 ID(e,t){if(e){if(typeof e=="string")return Lu(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 Lu(e,t)}}function LD(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function RD(e){if(Array.isArray(e))return Lu(e)}function Lu(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 BD=function(t){return t},zv={},Gv=function(t){return t===zv},Kv=function(t){return function r(){return arguments.length===0||arguments.length===1&&Gv(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},FD=function e(t,r){return t===1?r:Kv(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!==zv}).length;return o>=t?r.apply(void 0,a):e(t-o,Kv(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 Gv(f)?l.shift():f});return r.apply(void 0,ND(c).concat(l))}))})},Co=function(t){return FD(t.length,t)},Ru=function(t,r){for(var n=[],a=t;a<r;++a)n[a-t]=a;return n},WD=Co(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),UD=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return BD;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("")},Vv=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 zD(e){var t;return e===0?t=1:t=Math.floor(new Ee(e).abs().log(10).toNumber())+1,t}function GD(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 KD=Co(function(e,t,r){var n=+e,a=+t;return n+r*(a-n)}),VD=Co(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),qD=Co(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const ko={rangeStep:GD,getDigitCount:zD,interpolateNumber:KD,uninterpolateNumber:VD,uninterpolateTruncation:qD};function Fu(e){return XD(e)||YD(e)||qv(e)||HD()}function HD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
139
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YD(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function XD(e){if(Array.isArray(e))return Wu(e)}function Fa(e,t){return QD(e)||JD(e,t)||qv(e,t)||ZD()}function ZD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
140
- 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 JD(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 QD(e){if(Array.isArray(e))return e}function Hv(e){var t=Fa(e,2),r=t[0],n=t[1],a=r,i=n;return r>n&&(a=n,i=r),[a,i]}function Yv(e,t,r){if(e.lte(0))return new Ee(0);var n=ko.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 eI(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(ko.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=UD(WD(function(l){return a.add(new Ee(l-o).mul(n)).toNumber()}),Ru);return s(0,t)}function Xv(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=Yv(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?Xv(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 tI(e){var t=Fa(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=Hv([r,n]),l=Fa(s,2),u=l[0],c=l[1];if(u===-1/0||c===1/0){var f=c===1/0?[u].concat(Fu(Ru(0,a-1).map(function(){return 1/0}))):[].concat(Fu(Ru(0,a-1).map(function(){return-1/0})),[c]);return r>n?Bu(f):f}if(u===c)return eI(u,a,i);var d=Xv(u,c,o,i),p=d.step,v=d.tickMin,y=d.tickMax,h=ko.rangeStep(v,y.add(new Ee(.1).mul(p)),p);return r>n?Bu(h):h}function rI(e,t){var r=Fa(e,2),n=r[0],a=r[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Hv([n,a]),s=Fa(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=Yv(new Ee(u).sub(l).div(c-1),i,0),d=[].concat(Fu(ko.rangeStep(new Ee(l),new Ee(u).sub(new Ee(.99).mul(f)),f)),[u]);return n>a?Bu(d):d}var nI=Vv(tI),aI=Vv(rI),iI=process.env.NODE_ENV==="production",Uu="Invariant failed";function ht(e,t){if(iI)throw new Error(Uu);var r=typeof t=="function"?t():t,n=r?"".concat(Uu,": ").concat(r):Uu;throw new Error(n)}var oI=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function En(e){"@babel/helpers - typeof";return En=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},En(e)}function 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 sI(e,t){return fI(e)||cI(e,t)||uI(e,t)||lI()}function lI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
141
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uI(e,t){if(e){if(typeof e=="string")return Zv(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 Zv(e,t)}}function Zv(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 cI(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 fI(e){if(Array.isArray(e))return e}function dI(e,t){if(e==null)return{};var r=pI(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 pI(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 hI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vI(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,ey(n.key),n)}}function yI(e,t,r){return t&&vI(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mI(e,t,r){return t=No(t),gI(e,Jv()?Reflect.construct(t,r||[],No(e).constructor):t.apply(e,r))}function gI(e,t){if(t&&(En(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bI(e)}function bI(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Jv=function(){return!!e})()}function No(e){return No=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},No(e)}function xI(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 Qv(e,t,r){return t=ey(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ey(e){var t=wI(e,"string");return En(t)=="symbol"?t:t+""}function wI(e,t){if(En(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(En(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var jn=function(e){function t(){return hI(this,t),mI(this,t,arguments)}return xI(t,e),yI(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=dI(n,oI),p=de(d,!1);this.props.direction==="x"&&c.type!=="number"&&(process.env.NODE_ENV!=="production"?ht(!1,'ErrorBar requires Axis type property to be "number".'):ht());var v=l.map(function(y){var h=u(y,s),b=h.x,S=h.y,x=h.value,T=h.errorVal;if(!T)return null;var m=[],w,O;if(Array.isArray(T)){var P=sI(T,2);w=P[0],O=P[1]}else w=O=T;if(i==="vertical"){var j=c.scale,M=S+a,_=M+o,$=M-o,R=j(x-w),k=j(x+O);m.push({x1:k,y1:_,x2:k,y2:$}),m.push({x1:R,y1:M,x2:k,y2:M}),m.push({x1:R,y1:_,x2:R,y2:$})}else if(i==="horizontal"){var D=f.scale,C=b+a,B=C-o,U=C+o,G=D(x-w),E=D(x+O);m.push({x1:B,y1:E,x2:U,y2:E}),m.push({x1:C,y1:G,x2:C,y2:E}),m.push({x1:B,y1:G,x2:U,y2:G})}return A.createElement(xe,Mo({className:"recharts-errorBar",key:"bar-".concat(m.map(function(L){return"".concat(L.x1,"-").concat(L.x2,"-").concat(L.y1,"-").concat(L.y2)}))},p),m.map(function(L){return A.createElement("line",Mo({},L,{key:"line-".concat(L.x1,"-").concat(L.x2,"-").concat(L.y1,"-").concat(L.y2)}))}))});return A.createElement(xe,{className:"recharts-errorBars"},v)}}])}(A.Component);Qv(jn,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"}),Qv(jn,"displayName","ErrorBar");function Wa(e){"@babel/helpers - typeof";return Wa=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},Wa(e)}function ty(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 zr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ty(Object(r),!0).forEach(function(n){OI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ty(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function OI(e,t,r){return t=SI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SI(e){var t=AI(e,"string");return Wa(t)=="symbol"?t:t+""}function AI(e,t){if(Wa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ry=function(t){var r=t.children,n=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,o=yt(r,vn);if(!o)return null;var s=vn.defaultProps,l=s!==void 0?zr(zr({},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,p=f.props,v=p.sectors||p.data||[];return c.concat(v.map(function(y){return{type:o.props.iconType||d.props.legendType,value:y.name,color:y.fill,payload:y}}))},[]):u=(n||[]).map(function(c){var f=c.item,d=f.type.defaultProps,p=d!==void 0?zr(zr({},d),f.props):{},v=p.dataKey,y=p.name,h=p.legendType,b=p.hide;return{inactive:b,dataKey:v,type:l.iconType||h||"square",color:Ku(f),value:y||v,payload:p}}),zr(zr(zr({},l),vn.getWithHeight(o,a)),{},{payload:u,item:o})};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 ny(e){return EI(e)||_I(e)||PI(e)||TI()}function TI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
142
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PI(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 _I(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function EI(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 ay(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?ay(Object(r),!0).forEach(function(n){$n(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ay(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $n(e,t,r){return t=jI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jI(e){var t=$I(e,"string");return Ua(t)=="symbol"?t:t+""}function $I(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 Ze(e,t,r){return fe(e)||fe(t)?r:Ye(t)?wt(e,t,r):pe(t)?t(e):r}function za(e,t,r,n){var a=_D(e,function(s){return Ze(s,t)});if(r==="number"){var i=a.filter(function(s){return Z(s)||parseFloat(s)});return i.length?[jo(i),br(i)]:[1/0,-1/0]}var o=n?a.filter(function(s){return!fe(s)}):a;return o.map(function(s){return Ye(s)||s instanceof Date?s:""})}var CI=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,p=void 0;if(Ct(f-c)!==Ct(d-f)){var v=[];if(Ct(d-f)===Ct(l[1]-l[0])){p=d;var y=f+l[1]-l[0];v[0]=Math.min(y,(y+c)/2),v[1]=Math.max(y,(y+c)/2)}else{p=c;var h=d+l[1]-l[0];v[0]=Math.min(f,(h+f)/2),v[1]=Math.max(f,(h+f)/2)}var b=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(t>b[0]&&t<=b[1]||t>=v[0]&&t<=v[1]){o=a[u].index;break}}else{var S=Math.min(c,d),x=Math.max(c,d);if(t>(S+f)/2&&t<=(x+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},Ku=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},kI=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,p=f.length;d<p;d++){var v=c[f[d]],y=v.items,h=v.cateAxisId,b=y.filter(function(O){return Qt(O.type).indexOf("Bar")>=0});if(b&&b.length){var S=b[0].type.defaultProps,x=S!==void 0?Fe(Fe({},S),b[0].props):b[0].props,T=x.barSize,m=x[h];o[m]||(o[m]=[]);var w=fe(T)?r:T;o[m].push({item:b[0],stackList:b.slice(1),barSize:fe(w)?void 0:Cr(w,n,0)})}}return o},MI=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=Cr(r,a,0,!0),c,f=[];if(o[0].barSize===+o[0].barSize){var d=!1,p=a/l,v=o.reduce(function(T,m){return T+m.barSize||0},0);v+=(l-1)*u,v>=a&&(v-=(l-1)*u,u=0),v>=a&&p>0&&(d=!0,p*=.9,v=l*p);var y=(a-v)/2>>0,h={offset:y-u,size:0};c=o.reduce(function(T,m){var w={item:m.item,position:{offset:h.offset+h.size+u,size:d?p:m.barSize}},O=[].concat(ny(T),[w]);return h=O[O.length-1].position,m.stackList&&m.stackList.length&&m.stackList.forEach(function(P){O.push({item:P,position:h})}),O},f)}else{var b=Cr(n,a,0,!0);a-2*b-(l-1)*u<=0&&(u=0);var S=(a-2*b-(l-1)*u)/l;S>1&&(S>>=0);var x=s===+s?Math.min(S,s):S;c=o.reduce(function(T,m,w){var O=[].concat(ny(T),[{item:m.item,position:{offset:b+(S+u)*w+(S-x)/2,size:x}}]);return m.stackList&&m.stackList.length&&m.stackList.forEach(function(P){O.push({item:P,position:O[O.length-1].position})}),O},f)}return c},NI=function(t,r,n,a){var i=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),u=ry({children:i,legendWidth:l});if(u){var c=a||{},f=c.width,d=c.height,p=u.align,v=u.verticalAlign,y=u.layout;if((y==="vertical"||y==="horizontal"&&v==="middle")&&p!=="center"&&Z(t[p]))return Fe(Fe({},t),{},$n({},p,t[p]+(f||0)));if((y==="horizontal"||y==="vertical"&&p==="center")&&v!=="middle"&&Z(t[v]))return Fe(Fe({},t),{},$n({},v,t[v]+(d||0)))}return t},DI=function(t,r,n){return fe(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},iy=function(t,r,n,a,i){var o=r.props.children,s=dt(o,jn).filter(function(u){return DI(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=Ze(c,n);if(fe(f))return u;var d=Array.isArray(f)?[jo(f),br(f)]:[f,f],p=l.reduce(function(v,y){var h=Ze(c,y,0),b=d[0]-Math.abs(Array.isArray(h)?h[0]:h),S=d[1]+Math.abs(Array.isArray(h)?h[1]:h);return[Math.min(b,v[0]),Math.max(S,v[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},II=function(t,r,n,a,i){var o=r.map(function(s){return iy(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},oy=function(t,r,n,a,i){var o=r.map(function(l){var u=l.props.dataKey;return n==="number"&&u&&iy(t,l,u,a)||za(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},[])},sy=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},ly=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},ur=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?Ct(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}})},Vu=new WeakMap,Do=function(t,r){if(typeof r!="function")return t;Vu.has(t)||Vu.set(t,new WeakMap);var n=Vu.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},LI=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:_a(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:xo(),realScaleType:"linear"}:i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Ea(),realScaleType:"point"}:i==="category"?{scale:_a(),realScaleType:"band"}:{scale:xo(),realScaleType:"linear"};if(Er(a)){var l="scale".concat(Ii(a));return{scale:(Nv[l]||Ea)(),realScaleType:Nv[l]?l:"point"}}return pe(a)?{scale:a}:{scale:Ea(),realScaleType:"point"}},uy=1e-4,RI=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])-uy,o=Math.max(a[0],a[1])+uy,s=t(r[0]),l=t(r[n-1]);(s<i||s>o||l<i||l>o)&&t.domain([r[0],r[n-1]])}},BI=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},FI=function(t,r){if(!r||r.length!==2||!Z(r[0])||!Z(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(!Z(t[0])||t[0]<n)&&(i[0]=n),(!Z(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<n&&(i[1]=n),i},WI=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])}},UI=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)}},zI={sign:WI,expand:aA,none:un,silhouette:iA,wiggle:oA,positive:UI},GI=function(t,r,n){var a=r.map(function(s){return s.props.dataKey}),i=zI[n],o=nA().keys(a).value(function(s,l){return+Ze(s,l,0)}).order(bl).offset(i);return o(t)},KI=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 p,v=(p=d.type)!==null&&p!==void 0&&p.defaultProps?Fe(Fe({},d.type.defaultProps),d.props):d.props,y=v.stackId,h=v.hide;if(h)return f;var b=v[n],S=f[b]||{hasStack:!1,stackGroups:{}};if(Ye(y)){var x=S.stackGroups[y]||{numericAxisId:n,cateAxisId:a,items:[]};x.items.push(d),S.hasStack=!0,S.stackGroups[y]=x}else S.stackGroups[$r("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[d]};return Fe(Fe({},f),{},$n({},b,S))},l),c={};return Object.keys(u).reduce(function(f,d){var p=u[d];if(p.hasStack){var v={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(y,h){var b=p.stackGroups[h];return Fe(Fe({},y),{},$n({},h,{numericAxisId:n,cateAxisId:a,items:b.items,stackedData:GI(t,b.items,i)}))},v)}return Fe(Fe({},f),{},$n({},d,p))},c)},VI=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=nI(u,i,s);return t.domain([jo(c),br(c)]),{niceTicks:c}}if(i&&a==="number"){var f=t.domain(),d=aI(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=Ni(r,"value",a[t.dataKey]);if(s)return s.coordinate+n/2}return r[i]?r[i].coordinate+n/2:null}var l=Ze(a,fe(o)?t.dataKey:o);return fe(l)?null:t.scale(l)}var cy=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=Ze(o,r.dataKey,r.domain[s]);return fe(l)?null:r.scale(l)-i/2+a},qI=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]},HI=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(Ye(i)){var o=r[i];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},YI=function(t){return t.reduce(function(r,n){return[jo(n.concat([r[0]]).filter(Z)),br(n.concat([r[1]]).filter(Z))]},[1/0,-1/0])},fy=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=YI(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})},dy=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,py=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,qu=function(t,r,n){if(pe(t))return t(r,n);if(!Array.isArray(t))return r;var a=[];if(Z(t[0]))a[0]=n?t[0]:Math.min(t[0],r[0]);else if(dy.test(t[0])){var i=+dy.exec(t[0])[1];a[0]=r[0]-i}else pe(t[0])?a[0]=t[0](r[0]):a[0]=r[0];if(Z(t[1]))a[1]=n?t[1]:Math.max(t[1],r[1]);else if(py.test(t[1])){var o=+py.exec(t[1])[1];a[1]=r[1]+o}else pe(t[1])?a[1]=t[1](r[1]):a[1]=r[1];return a},Io=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},hy=function(t,r,n){return!t||!t.length||Br(t,wt(n,"type.defaultProps.domain"))?r:t},vy=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:Ku(t),value:Ze(r,a),type:l,payload:r,chartType:u,hide:c})};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 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 my(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){XI(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 XI(e,t,r){return t=ZI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZI(e){var t=JI(e,"string");return Ga(t)=="symbol"?t:t+""}function JI(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 Lo=Math.PI/180,QI=function(t){return t*180/Math.PI},rt=function(t,r,n,a){return{x:t+Math.cos(-Lo*a)*n,y:r+Math.sin(-Lo*a)*n}},eL=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))},tL=function(t,r){var n=t.x,a=t.y,i=r.cx,o=r.cy,s=eL({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:QI(u),angleInRadian:u}},rL=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}},nL=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},gy=function(t,r){var n=t.x,a=t.y,i=tL({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=rL(r),f=c.startAngle,d=c.endAngle,p=s,v;if(f<=d){for(;p>d;)p-=360;for(;p<f;)p+=360;v=p>=f&&p<=d}else{for(;p>f;)p-=360;for(;p<d;)p+=360;v=p>=d&&p<=f}return v?my(my({},r),{},{radius:o,angle:nL(p,r)}):null};function Ka(e){"@babel/helpers - typeof";return Ka=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},Ka(e)}var aL=["offset"];function iL(e){return uL(e)||lL(e)||sL(e)||oL()}function oL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
143
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sL(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 lL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function uL(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 cL(e,t){if(e==null)return{};var r=fL(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 fL(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 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 Je(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){dL(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 dL(e,t,r){return t=pL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pL(e){var t=hL(e,"string");return Ka(t)=="symbol"?t:t+""}function hL(e,t){if(Ka(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ka(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Va(){return Va=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Va.apply(this,arguments)}var vL=function(t){var r=t.value,n=t.formatter,a=fe(t.children)?r:t.children;return pe(n)?n(a):a},yL=function(t,r){var n=Ct(r-t),a=Math.min(Math.abs(r-t),360);return n*a},mL=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,p=l.startAngle,v=l.endAngle,y=l.clockWise,h=(f+d)/2,b=yL(p,v),S=b>=0?1:-1,x,T;a==="insideStart"?(x=p+S*o,T=y):a==="insideEnd"?(x=v-S*o,T=!y):a==="end"&&(x=v+S*o,T=y),T=b<=0?T:!T;var m=rt(u,c,h,x),w=rt(u,c,h,x+(T?1:-1)*359),O="M".concat(m.x,",").concat(m.y,`
144
- A`).concat(h,",").concat(h,",0,1,").concat(T?0:1,`,
145
- `).concat(w.x,",").concat(w.y),P=fe(t.id)?$r("recharts-radial-line-"):t.id;return A.createElement("text",Va({},n,{dominantBaseline:"central",className:ye("recharts-radial-bar-label",s)}),A.createElement("defs",null,A.createElement("path",{id:P,d:O})),A.createElement("textPath",{xlinkHref:"#".concat(P)},r))},gL=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 p=rt(o,s,u+n,d),v=p.x,y=p.y;return{x:v,y,textAnchor:v>=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 h=(l+u)/2,b=rt(o,s,h,d),S=b.x,x=b.y;return{x:S,y:x,textAnchor:"middle",verticalAnchor:"middle"}},bL=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,p=f>0?"end":"start",v=f>0?"start":"end",y=u>=0?1:-1,h=y*a,b=y>0?"end":"start",S=y>0?"start":"end";if(i==="top"){var x={x:s+u/2,y:l-f*a,textAnchor:"middle",verticalAnchor:p};return Je(Je({},x),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:v};return Je(Je({},T),n?{height:Math.max(n.y+n.height-(l+c),0),width:u}:{})}if(i==="left"){var m={x:s-h,y:l+c/2,textAnchor:b,verticalAnchor:"middle"};return Je(Je({},m),n?{width:Math.max(m.x-n.x,0),height:c}:{})}if(i==="right"){var w={x:s+u+h,y:l+c/2,textAnchor:S,verticalAnchor:"middle"};return Je(Je({},w),n?{width:Math.max(n.x+n.width-w.x,0),height:c}:{})}var O=n?{width:u,height:c}:{};return i==="insideLeft"?Je({x:s+h,y:l+c/2,textAnchor:S,verticalAnchor:"middle"},O):i==="insideRight"?Je({x:s+u-h,y:l+c/2,textAnchor:b,verticalAnchor:"middle"},O):i==="insideTop"?Je({x:s+u/2,y:l+d,textAnchor:"middle",verticalAnchor:v},O):i==="insideBottom"?Je({x:s+u/2,y:l+c-d,textAnchor:"middle",verticalAnchor:p},O):i==="insideTopLeft"?Je({x:s+h,y:l+d,textAnchor:S,verticalAnchor:v},O):i==="insideTopRight"?Je({x:s+u-h,y:l+d,textAnchor:b,verticalAnchor:v},O):i==="insideBottomLeft"?Je({x:s+h,y:l+c-d,textAnchor:S,verticalAnchor:p},O):i==="insideBottomRight"?Je({x:s+u-h,y:l+c-d,textAnchor:b,verticalAnchor:p},O):rn(i)&&(Z(i.x)||jr(i.x))&&(Z(i.y)||jr(i.y))?Je({x:s+Cr(i.x,u),y:l+Cr(i.y,c),textAnchor:"end",verticalAnchor:"end"},O):Je({x:s+u/2,y:l+c/2,textAnchor:"middle",verticalAnchor:"middle"},O)},xL=function(t){return"cx"in t&&Z(t.cx)};function at(e){var t=e.offset,r=t===void 0?5:t,n=cL(e,aL),a=Je({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)&&!A.isValidElement(u)&&!pe(u))return null;if(A.isValidElement(u))return A.cloneElement(u,a);var p;if(pe(u)){if(p=A.createElement(u,a),A.isValidElement(p))return p}else p=vL(a);var v=xL(i),y=de(a,!0);if(v&&(o==="insideStart"||o==="insideEnd"||o==="end"))return mL(a,p,y);var h=v?gL(a):bL(a);return A.createElement(lo,Va({className:ye("recharts-label",f)},y,h,{breakAll:d}),p)}at.displayName="Label";var xy=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,p=t.top,v=t.left,y=t.width,h=t.height,b=t.clockWise,S=t.labelViewBox;if(S)return S;if(Z(y)&&Z(h)){if(Z(f)&&Z(d))return{x:f,y:d,width:y,height:h};if(Z(p)&&Z(v))return{x:p,y:v,width:y,height:h}}return Z(f)&&Z(d)?{x:f,y:d,width:0,height:0}:Z(r)&&Z(n)?{cx:r,cy:n,startAngle:i||a||0,endAngle:o||a||0,innerRadius:u||0,outerRadius:c||l||s||0,clockWise:b}:t.viewBox?t.viewBox:{}},wL=function(t,r){return t?t===!0?A.createElement(at,{key:"label-implicit",viewBox:r}):Ye(t)?A.createElement(at,{key:"label-implicit",viewBox:r,value:t}):A.isValidElement(t)?t.type===at?A.cloneElement(t,{key:"label-implicit",viewBox:r}):A.createElement(at,{key:"label-implicit",content:t,viewBox:r}):pe(t)?A.createElement(at,{key:"label-implicit",content:t,viewBox:r}):rn(t)?A.createElement(at,Va({viewBox:r},t,{key:"label-implicit"})):null:null},OL=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=xy(t),o=dt(a,at).map(function(l,u){return A.cloneElement(l,{viewBox:r||i,key:"label-".concat(u)})});if(!n)return o;var s=wL(t.label,r||i);return[s].concat(iL(o))};at.parseViewBox=xy,at.renderCallByParent=OL;function SL(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var AL=SL;const TL=Ce(AL);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 PL=["valueAccessor"],_L=["data","dataKey","clockWise","id","textBreakAll"];function EL(e){return kL(e)||CL(e)||$L(e)||jL()}function jL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
146
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $L(e,t){if(e){if(typeof e=="string")return 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 CL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kL(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 wy(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 Oy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wy(Object(r),!0).forEach(function(n){ML(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ML(e,t,r){return t=NL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NL(e){var t=DL(e,"string");return qa(t)=="symbol"?t:t+""}function DL(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 Sy(e,t){if(e==null)return{};var r=IL(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 IL(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 LL=function(t){return Array.isArray(t.value)?TL(t.value):t.value};function Kt(e){var t=e.valueAccessor,r=t===void 0?LL:t,n=Sy(e,PL),a=n.data,i=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,u=Sy(n,_L);return!a||!a.length?null:A.createElement(xe,{className:"recharts-label-list"},a.map(function(c,f){var d=fe(i)?r(c,f):Ze(c&&c.payload,i),p=fe(s)?{}:{id:"".concat(s,"-").concat(f)};return A.createElement(at,Ro({},de(c,!0),u,p,{parentViewBox:c.parentViewBox,value:d,textBreakAll:l,viewBox:at.parseViewBox(fe(o)?c:Oy(Oy({},c),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}Kt.displayName="LabelList";function RL(e,t){return e?e===!0?A.createElement(Kt,{key:"labelList-implicit",data:t}):A.isValidElement(e)||pe(e)?A.createElement(Kt,{key:"labelList-implicit",data:t,content:e}):rn(e)?A.createElement(Kt,Ro({data:t},e,{key:"labelList-implicit"})):null:null}function BL(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=dt(n,Kt).map(function(o,s){return A.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return a;var i=RL(e.label,t);return[i].concat(EL(a))}Kt.renderCallByParent=BL;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 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 Ay(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 Ty(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ay(Object(r),!0).forEach(function(n){FL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ay(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FL(e,t,r){return t=WL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WL(e){var t=UL(e,"string");return Ha(t)=="symbol"?t:t+""}function UL(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)}var zL=function(t,r){var n=Ct(r-t),a=Math.min(Math.abs(r-t),359.999);return n*a},Bo=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)/Lo,d=u?i:i+o*f,p=rt(r,n,c,d),v=rt(r,n,a,d),y=u?i-o*f:i,h=rt(r,n,c*Math.cos(f*Lo),y);return{center:p,circleTangency:v,lineTangency:h,theta:f}},Py=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.startAngle,s=t.endAngle,l=zL(o,s),u=o+l,c=rt(r,n,i,o),f=rt(r,n,i,u),d="M ".concat(c.x,",").concat(c.y,`
195
+ height and width.`,D,k,o,l,c,f,r);var B=!Array.isArray(p)&&Qt(p.type).endsWith("Chart");return T.Children.map(p,function(z){return T.isValidElement(z)?T.cloneElement(z,so({width:D,height:k},B?{style:so({height:"100%",width:"100%",maxHeight:k,maxWidth:D},z.props.style)}:{})):z})},[r,p,l,d,f,c,C,o]);return T.createElement("div",{id:v?"".concat(v):void 0,className:me("recharts-responsive-container",b),style:so(so({},A),{},{width:o,height:l,minWidth:c,minHeight:f,maxHeight:d}),ref:g},_)}),Jl=function(t){return null};Jl.displayName="Cell";function Ta(e){"@babel/helpers - typeof";return Ta=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},Ta(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 Ql(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){bk(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 bk(e,t,r){return t=xk(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xk(e){var t=wk(e,"string");return Ta(t)=="symbol"?t:t+""}function wk(e,t){if(Ta(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ta(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bn={widthCache:{},cacheCount:0},Ok=2e3,Sk={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},dh="recharts_measurement_span";function Tk(e){var t=Ql({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var Aa=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||vr.isSsr)return{width:0,height:0};var n=Tk(r),a=JSON.stringify({text:t,copyStyle:n});if(bn.widthCache[a])return bn.widthCache[a];try{var i=document.getElementById(dh);i||(i=document.createElement("span"),i.setAttribute("id",dh),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=Ql(Ql({},Sk),n);Object.assign(i.style,o),i.textContent="".concat(t);var s=i.getBoundingClientRect(),l={width:s.width,height:s.height};return bn.widthCache[a]=l,++bn.cacheCount>Ok&&(bn.cacheCount=0,bn.widthCache={}),l}catch{return{width:0,height:0}}},Ak=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};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 lo(e,t){return Ek(e)||_k(e,t)||jk(e,t)||Pk()}function Pk(){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 jk(e,t){if(e){if(typeof e=="string")return ph(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 ph(e,t)}}function ph(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 _k(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 Ek(e){if(Array.isArray(e))return e}function Ck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hh(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,kk(n.key),n)}}function $k(e,t,r){return t&&hh(e.prototype,t),r&&hh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function kk(e){var t=Mk(e,"string");return Pa(t)=="symbol"?t:t+""}function Mk(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 String(e)}var vh=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,mh=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Nk=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Dk=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,yh={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Ik=Object.keys(yh),xn="NaN";function Lk(e,t){return e*yh[t]}var uo=function(){function e(t,r){Ck(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!Nk.test(r)&&(this.num=NaN,this.unit=""),Ik.includes(r)&&(this.num=Lk(t,r),this.unit="px")}return $k(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=Dk.exec(r))!==null&&n!==void 0?n:[],i=lo(a,3),o=i[1],s=i[2];return new e(parseFloat(o),s??"")}}])}();function gh(e){if(e.includes(xn))return xn;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=vh.exec(t))!==null&&r!==void 0?r:[],a=lo(n,4),i=a[1],o=a[2],s=a[3],l=uo.parse(i??""),u=uo.parse(s??""),c=o==="*"?l.multiply(u):l.divide(u);if(c.isNaN())return xn;t=t.replace(vh,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,d=(f=mh.exec(t))!==null&&f!==void 0?f:[],p=lo(d,4),m=p[1],y=p[2],v=p[3],b=uo.parse(m??""),w=uo.parse(v??""),x=y==="+"?b.add(w):b.subtract(w);if(x.isNaN())return xn;t=t.replace(mh,x.toString())}return t}var bh=/\(([^()]*)\)/;function Rk(e){for(var t=e;t.includes("(");){var r=bh.exec(t),n=lo(r,2),a=n[1];t=t.replace(bh,gh(a))}return t}function Bk(e){var t=e.replace(/\s+/g,"");return t=Rk(t),t=gh(t),t}function Fk(e){try{return Bk(e)}catch{return xn}}function eu(e){var t=Fk(e.slice(5,-1));return t===xn?"":t}var Wk=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],zk=["dx","dy","angle","className","breakAll"];function tu(){return tu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tu.apply(this,arguments)}function xh(e,t){if(e==null)return{};var r=Uk(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 Uk(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 wh(e,t){return qk(e)||Kk(e,t)||Vk(e,t)||Gk()}function Gk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
197
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vk(e,t){if(e){if(typeof e=="string")return Oh(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 Oh(e,t)}}function Oh(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 Kk(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 qk(e){if(Array.isArray(e))return e}var Sh=/[ \f\n\r\t\v\u2028\u2029]+/,Th=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(Sh));var o=i.map(function(l){return{word:l,width:Aa(l,a).width}}),s=n?0:Aa(" ",a).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},Hk=function(t,r,n,a,i){var o=t.maxLines,s=t.children,l=t.style,u=t.breakAll,c=Z(o),f=s,d=function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return D.reduce(function(k,B){var z=B.word,G=B.width,E=k[k.length-1];if(E&&(a==null||i||E.width+G+n<Number(a)))E.words.push(z),E.width+=G+n;else{var R={words:[z],width:G};k.push(R)}return k},[])},p=d(r),m=function(D){return D.reduce(function(k,B){return k.width>B.width?k:B})};if(!c)return p;for(var y="…",v=function(D){var k=f.slice(0,D),B=Th({breakAll:u,style:l,children:k+y}).wordsWithComputedWidth,z=d(B),G=z.length>o||m(z).width>Number(a);return[G,z]},b=0,w=f.length-1,x=0,A;b<=w&&x<=f.length-1;){var g=Math.floor((b+w)/2),O=g-1,S=v(O),j=wh(S,2),C=j[0],M=j[1],P=v(g),_=wh(P,1),I=_[0];if(!C&&!I&&(b=g+1),C&&I&&(w=g-1),!C&&I){A=M;break}x++}return A||p},Ah=function(t){var r=fe(t)?[]:t.toString().split(Sh);return[{words:r}]},Yk=function(t){var r=t.width,n=t.scaleToFit,a=t.children,i=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!vr.isSsr){var l,u,c=Th({breakAll:o,children:a,style:i});if(c){var f=c.wordsWithComputedWidth,d=c.spaceWidth;l=f,u=d}else return Ah(a);return Hk({breakAll:o,children:a,maxLines:s,style:i},l,u,r,n)}return Ah(a)},Ph="#808080",co=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,p=d===void 0?"start":d,m=t.verticalAnchor,y=m===void 0?"end":m,v=t.fill,b=v===void 0?Ph:v,w=xh(t,Wk),x=T.useMemo(function(){return Yk({breakAll:w.breakAll,children:w.children,maxLines:w.maxLines,scaleToFit:f,style:w.style,width:w.width})},[w.breakAll,w.children,w.maxLines,f,w.style,w.width]),A=w.dx,g=w.dy,O=w.angle,S=w.className,j=w.breakAll,C=xh(w,zk);if(!Xe(n)||!Xe(i))return null;var M=n+(Z(A)?A:0),P=i+(Z(g)?g:0),_;switch(y){case"start":_=eu("calc(".concat(u,")"));break;case"middle":_=eu("calc(".concat((x.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:_=eu("calc(".concat(x.length-1," * -").concat(s,")"));break}var I=[];if(f){var $=x[0].width,D=w.width;I.push("scale(".concat((Z(D)?D/$:1)/$,")"))}return O&&I.push("rotate(".concat(O,", ").concat(M,", ").concat(P,")")),I.length&&(C.transform=I.join(" ")),T.createElement("text",tu({},de(C,!0),{x:M,y:P,className:me("recharts-text",S),textAnchor:p,fill:b.includes("url")?Ph:b}),x.map(function(k,B){var z=k.words.join(j?"":" ");return T.createElement("tspan",{x:M,dy:B===0?_:s,key:"".concat(z,"-").concat(B)},z)}))};function mr(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Xk(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ru(e){let t,r,n;e.length!==2?(t=mr,r=(s,l)=>mr(e(s),l),n=(s,l)=>e(s)-l):(t=e===mr||e===Xk?e:Zk,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 Zk(){return 0}function jh(e){return e===null?NaN:+e}function*Jk(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const ja=ru(mr).right;ru(jh).center;class _h extends Map{constructor(t,r=tM){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(Eh(this,t))}has(t){return super.has(Eh(this,t))}set(t,r){return super.set(Qk(this,t),r)}delete(t){return super.delete(eM(this,t))}}function Eh({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function Qk({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function eM({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function tM(e){return e!==null&&typeof e=="object"?e.valueOf():e}function rM(e=mr){if(e===mr)return Ch;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 Ch(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const nM=Math.sqrt(50),aM=Math.sqrt(10),iM=Math.sqrt(2);function fo(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>=nM?10:i>=aM?5:i>=iM?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?fo(e,t,r*2):[s,l,u]}function nu(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?fo(t,e,r):fo(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 au(e,t,r){return t=+t,e=+e,r=+r,fo(e,t,r)[2]}function iu(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?au(t,e,r):au(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function $h(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function kh(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Mh(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?Ch:rM(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),p=Math.max(r,Math.floor(t-u*f/l+d)),m=Math.min(n,Math.floor(t+(l-u)*f/l+d));Mh(e,t,p,m,a)}const i=e[t];let o=r,s=n;for(_a(e,r,t),a(e[n],i)>0&&_a(e,r,n);o<s;){for(_a(e,o,s),++o,--s;a(e[o],i)<0;)++o;for(;a(e[s],i)>0;)--s}a(e[r],i)===0?_a(e,r,s):(++s,_a(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function _a(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function oM(e,t,r){if(e=Float64Array.from(Jk(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return kh(e);if(t>=1)return $h(e);var n,a=(n-1)*t,i=Math.floor(a),o=$h(Mh(e,i).subarray(0,i+1)),s=kh(e.subarray(i+1));return o+(s-o)*(a-i)}}function sM(e,t,r=jh){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,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 lM(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 rr(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 ou=Symbol("implicit");function su(){var e=new _h,t=[],r=[],n=ou;function a(i){let o=e.get(i);if(o===void 0){if(n!==ou)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 _h;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 su(t,r).unknown(n)},At.apply(a,arguments),a}function Ea(){var e=su().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,p=a<n,m=p?a:n,y=p?n:a;i=(y-m)/Math.max(1,d-l+u*2),s&&(i=Math.floor(i)),m+=(y-m-i*(d-l))*c,o=i*(1-l),s&&(m=Math.round(m),o=Math.round(o));var v=lM(d).map(function(b){return m+i*b});return r(p?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 Ea(t(),[n,a]).round(s).paddingInner(l).paddingOuter(u).align(c)},At.apply(f(),arguments)}function Nh(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Nh(t())},e}function Ca(){return Nh(Ea.apply(null,arguments).paddingInner(1))}function lu(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Dh(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function $a(){}var ka=.7,po=1/ka,wn="\\s*([+-]?\\d+)\\s*",Ma="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",zt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",uM=/^#([0-9a-f]{3,8})$/,cM=new RegExp(`^rgb\\(${wn},${wn},${wn}\\)$`),fM=new RegExp(`^rgb\\(${zt},${zt},${zt}\\)$`),dM=new RegExp(`^rgba\\(${wn},${wn},${wn},${Ma}\\)$`),pM=new RegExp(`^rgba\\(${zt},${zt},${zt},${Ma}\\)$`),hM=new RegExp(`^hsl\\(${Ma},${zt},${zt}\\)$`),vM=new RegExp(`^hsla\\(${Ma},${zt},${zt},${Ma}\\)$`),Ih={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};lu($a,Na,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Lh,formatHex:Lh,formatHex8:mM,formatHsl:yM,formatRgb:Rh,toString:Rh});function Lh(){return this.rgb().formatHex()}function mM(){return this.rgb().formatHex8()}function yM(){return Uh(this).formatHsl()}function Rh(){return this.rgb().formatRgb()}function Na(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=uM.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Bh(t):r===3?new pt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?ho(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?ho(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=cM.exec(e))?new pt(t[1],t[2],t[3],1):(t=fM.exec(e))?new pt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=dM.exec(e))?ho(t[1],t[2],t[3],t[4]):(t=pM.exec(e))?ho(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=hM.exec(e))?zh(t[1],t[2]/100,t[3]/100,1):(t=vM.exec(e))?zh(t[1],t[2]/100,t[3]/100,t[4]):Ih.hasOwnProperty(e)?Bh(Ih[e]):e==="transparent"?new pt(NaN,NaN,NaN,0):null}function Bh(e){return new pt(e>>16&255,e>>8&255,e&255,1)}function ho(e,t,r,n){return n<=0&&(e=t=r=NaN),new pt(e,t,r,n)}function gM(e){return e instanceof $a||(e=Na(e)),e?(e=e.rgb(),new pt(e.r,e.g,e.b,e.opacity)):new pt}function uu(e,t,r,n){return arguments.length===1?gM(e):new pt(e,t,r,n??1)}function pt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}lu(pt,uu,Dh($a,{brighter(e){return e=e==null?po:Math.pow(po,e),new pt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ka:Math.pow(ka,e),new pt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new pt(Nr(this.r),Nr(this.g),Nr(this.b),vo(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:Fh,formatHex:Fh,formatHex8:bM,formatRgb:Wh,toString:Wh}));function Fh(){return`#${Dr(this.r)}${Dr(this.g)}${Dr(this.b)}`}function bM(){return`#${Dr(this.r)}${Dr(this.g)}${Dr(this.b)}${Dr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Wh(){const e=vo(this.opacity);return`${e===1?"rgb(":"rgba("}${Nr(this.r)}, ${Nr(this.g)}, ${Nr(this.b)}${e===1?")":`, ${e})`}`}function vo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Nr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Dr(e){return e=Nr(e),(e<16?"0":"")+e.toString(16)}function zh(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 Uh(e){if(e instanceof Mt)return new Mt(e.h,e.s,e.l,e.opacity);if(e instanceof $a||(e=Na(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 xM(e,t,r,n){return arguments.length===1?Uh(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}lu(Mt,xM,Dh($a,{brighter(e){return e=e==null?po:Math.pow(po,e),new Mt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ka:Math.pow(ka,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 pt(cu(e>=240?e-240:e+120,a,n),cu(e,a,n),cu(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new Mt(Gh(this.h),mo(this.s),mo(this.l),vo(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=vo(this.opacity);return`${e===1?"hsl(":"hsla("}${Gh(this.h)}, ${mo(this.s)*100}%, ${mo(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Gh(e){return e=(e||0)%360,e<0?e+360:e}function mo(e){return Math.max(0,Math.min(1,e||0))}function cu(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 fu=e=>()=>e;function wM(e,t){return function(r){return e+r*t}}function OM(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 SM(e){return(e=+e)==1?Vh:function(t,r){return r-t?OM(t,r,e):fu(isNaN(t)?r:t)}}function Vh(e,t){var r=t-e;return r?wM(e,r):fu(isNaN(e)?t:e)}const Kh=function e(t){var r=SM(t);function n(a,i){var o=r((a=uu(a)).r,(i=uu(i)).r),s=r(a.g,i.g),l=r(a.b,i.b),u=Vh(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 TM(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 AM(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function PM(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]=On(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 jM(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function yo(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function _M(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]=On(e[a],t[a]):n[a]=t[a];return function(i){for(a in r)n[a]=r[a](i);return n}}var du=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pu=new RegExp(du.source,"g");function EM(e){return function(){return e}}function CM(e){return function(t){return e(t)+""}}function $M(e,t){var r=du.lastIndex=pu.lastIndex=0,n,a,i,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=du.exec(e))&&(a=pu.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:yo(n,a)})),r=pu.lastIndex;return r<t.length&&(i=t.slice(r),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?CM(l[0].x):EM(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 On(e,t){var r=typeof t,n;return t==null||r==="boolean"?fu(t):(r==="number"?yo:r==="string"?(n=Na(t))?(t=n,Kh):$M:t instanceof Na?Kh:t instanceof Date?jM:AM(t)?TM:Array.isArray(t)?PM:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?_M:yo)(e,t)}function hu(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function kM(e,t){t===void 0&&(t=e,e=On);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 MM(e){return function(){return e}}function go(e){return+e}var qh=[0,1];function lt(e){return e}function vu(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:MM(isNaN(t)?NaN:.5)}function NM(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function DM(e,t,r){var n=e[0],a=e[1],i=t[0],o=t[1];return a<n?(n=vu(a,n),i=r(o,i)):(n=vu(n,a),i=r(i,o)),function(s){return i(n(s))}}function IM(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]=vu(e[o],e[o+1]),i[o]=r(t[o],t[o+1]);return function(s){var l=ja(e,s,1,n)-1;return i[l](a[l](s))}}function Da(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function bo(){var e=qh,t=qh,r=On,n,a,i,o=lt,s,l,u;function c(){var d=Math.min(e.length,t.length);return o!==lt&&(o=NM(e[0],e[d-1])),s=d>2?IM:DM,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),yo)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,go),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=hu,c()},f.clamp=function(d){return arguments.length?(o=d?!0:lt,c()):o!==lt},f.interpolate=function(d){return arguments.length?(r=d,c()):r},f.unknown=function(d){return arguments.length?(i=d,f):i},function(d,p){return n=d,a=p,c()}}function mu(){return bo()(lt,lt)}function LM(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function xo(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 Sn(e){return e=xo(Math.abs(e)),e?e[1]:NaN}function RM(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 BM(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var FM=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ia(e){if(!(t=FM.exec(e)))throw new Error("invalid format: "+e);var t;return new yu({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]})}Ia.prototype=yu.prototype;function yu(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+""}yu.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 WM(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 Hh;function zM(e,t){var r=xo(e,t);if(!r)return e+"";var n=r[0],a=r[1],i=a-(Hh=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")+xo(e,Math.max(0,t+i-1))[0]}function Yh(e,t){var r=xo(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 Xh={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:LM,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)=>Yh(e*100,t),r:Yh,s:zM,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Zh(e){return e}var Jh=Array.prototype.map,Qh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function UM(e){var t=e.grouping===void 0||e.thousands===void 0?Zh:RM(Jh.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?Zh:BM(Jh.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=Ia(f);var d=f.fill,p=f.align,m=f.sign,y=f.symbol,v=f.zero,b=f.width,w=f.comma,x=f.precision,A=f.trim,g=f.type;g==="n"?(w=!0,g="g"):Xh[g]||(x===void 0&&(x=12),A=!0,g="g"),(v||d==="0"&&p==="=")&&(v=!0,d="0",p="=");var O=y==="$"?r:y==="#"&&/[boxX]/.test(g)?"0"+g.toLowerCase():"",S=y==="$"?n:/[%p]/.test(g)?o:"",j=Xh[g],C=/[defgprs%]/.test(g);x=x===void 0?6:/[gprs]/.test(g)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function M(P){var _=O,I=S,$,D,k;if(g==="c")I=j(P)+I,P="";else{P=+P;var B=P<0||1/P<0;if(P=isNaN(P)?l:j(Math.abs(P),x),A&&(P=WM(P)),B&&+P==0&&m!=="+"&&(B=!1),_=(B?m==="("?m:s:m==="-"||m==="("?"":m)+_,I=(g==="s"?Qh[8+Hh/3]:"")+I+(B&&m==="("?")":""),C){for($=-1,D=P.length;++$<D;)if(k=P.charCodeAt($),48>k||k>57){I=(k===46?a+P.slice($+1):P.slice($))+I,P=P.slice(0,$);break}}}w&&!v&&(P=t(P,1/0));var z=_.length+P.length+I.length,G=z<b?new Array(b-z+1).join(d):"";switch(w&&v&&(P=t(G+P,G.length?b-I.length:1/0),G=""),p){case"<":P=_+P+I+G;break;case"=":P=_+G+P+I;break;case"^":P=G.slice(0,z=G.length>>1)+_+P+I+G.slice(z);break;default:P=G+_+P+I;break}return i(P)}return M.toString=function(){return f+""},M}function c(f,d){var p=u((f=Ia(f),f.type="f",f)),m=Math.max(-8,Math.min(8,Math.floor(Sn(d)/3)))*3,y=Math.pow(10,-m),v=Qh[8+m/3];return function(b){return p(y*b)+v}}return{format:u,formatPrefix:c}}var wo,gu,ev;GM({thousands:",",grouping:[3],currency:["$",""]});function GM(e){return wo=UM(e),gu=wo.format,ev=wo.formatPrefix,wo}function VM(e){return Math.max(0,-Sn(Math.abs(e)))}function KM(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Sn(t)/3)))*3-Sn(Math.abs(e)))}function qM(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Sn(t)-Sn(e))+1}function tv(e,t,r,n){var a=iu(e,t,r),i;switch(n=Ia(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(i=KM(a,o))&&(n.precision=i),ev(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=qM(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=VM(a))&&(n.precision=i-(n.type==="%")*2);break}}return gu(n)}function yr(e){var t=e.domain;return e.ticks=function(r){var n=t();return nu(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return tv(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=au(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 Oo(){var e=mu();return e.copy=function(){return Da(e,Oo())},At.apply(e,arguments),yr(e)}function rv(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,go),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return rv(e).unknown(t)},e=arguments.length?Array.from(e,go):[0,1],yr(r)}function nv(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 av(e){return Math.log(e)}function iv(e){return Math.exp(e)}function HM(e){return-Math.log(-e)}function YM(e){return-Math.exp(-e)}function XM(e){return isFinite(e)?+("1e"+e):e<0?0:e}function ZM(e){return e===10?XM:e===Math.E?Math.exp:t=>Math.pow(e,t)}function JM(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 ov(e){return(t,r)=>-e(-t,r)}function bu(e){const t=e(av,iv),r=t.domain;let n=10,a,i;function o(){return a=JM(n),i=ZM(n),r()[0]<0?(a=ov(a),i=ov(i),e(HM,YM)):e(av,iv),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),p=a(c),m,y;const v=s==null?10:+s;let b=[];if(!(n%1)&&p-d<v){if(d=Math.floor(d),p=Math.ceil(p),u>0){for(;d<=p;++d)for(m=1;m<n;++m)if(y=d<0?m/i(-d):m*i(d),!(y<u)){if(y>c)break;b.push(y)}}else for(;d<=p;++d)for(m=n-1;m>=1;--m)if(y=d>0?m/i(-d):m*i(d),!(y<u)){if(y>c)break;b.push(y)}b.length*2<v&&(b=nu(u,c,v))}else b=nu(d,p,Math.min(p-d,v)).map(i);return f?b.reverse():b},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Ia(l)).precision==null&&(l.trim=!0),l=gu(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(nv(r(),{floor:s=>i(Math.floor(a(s))),ceil:s=>i(Math.ceil(a(s)))})),t}function sv(){const e=bu(bo()).domain([1,10]);return e.copy=()=>Da(e,sv()).base(e.base()),At.apply(e,arguments),e}function lv(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function uv(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function xu(e){var t=1,r=e(lv(t),uv(t));return r.constant=function(n){return arguments.length?e(lv(t=+n),uv(t)):t},yr(r)}function cv(){var e=xu(bo());return e.copy=function(){return Da(e,cv()).constant(e.constant())},At.apply(e,arguments)}function fv(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function QM(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function eN(e){return e<0?-e*e:e*e}function wu(e){var t=e(lt,lt),r=1;function n(){return r===1?e(lt,lt):r===.5?e(QM,eN):e(fv(r),fv(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},yr(t)}function Ou(){var e=wu(bo());return e.copy=function(){return Da(e,Ou()).exponent(e.exponent())},At.apply(e,arguments),e}function tN(){return Ou.apply(null,arguments).exponent(.5)}function dv(e){return Math.sign(e)*e*e}function rN(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function pv(){var e=mu(),t=[0,1],r=!1,n;function a(i){var o=rN(e(i));return isNaN(o)?n:r?Math.round(o):o}return a.invert=function(i){return e.invert(dv(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,go)).map(dv)),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 pv(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},At.apply(a,arguments),yr(a)}function hv(){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]=sM(e,o/s);return i}function i(o){return o==null||isNaN(o=+o)?n:t[ja(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(mr),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 hv().domain(e).range(t).unknown(n)},At.apply(i,arguments)}function vv(){var e=0,t=1,r=1,n=[.5],a=[0,1],i;function o(l){return l!=null&&l<=l?a[ja(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 vv().domain([e,t]).range(a).unknown(i)},At.apply(yr(o),arguments)}function mv(){var e=[.5],t=[0,1],r,n=1;function a(i){return i!=null&&i<=i?t[ja(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 mv().domain(e).range(t).unknown(r)},At.apply(a,arguments)}const Su=new Date,Tu=new Date;function Ze(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=>Ze(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)=>(Su.setTime(+i),Tu.setTime(+o),e(Su),e(Tu),Math.floor(r(Su,Tu))),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 So=Ze(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);So.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ze(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):So),So.range;const nr=1e3,Pt=nr*60,ar=Pt*60,ir=ar*24,Au=ir*7,yv=ir*30,Pu=ir*365,Ir=Ze(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*nr)},(e,t)=>(t-e)/nr,e=>e.getUTCSeconds());Ir.range;const ju=Ze(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr)},(e,t)=>{e.setTime(+e+t*Pt)},(e,t)=>(t-e)/Pt,e=>e.getMinutes());ju.range;const _u=Ze(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Pt)},(e,t)=>(t-e)/Pt,e=>e.getUTCMinutes());_u.range;const Eu=Ze(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr-e.getMinutes()*Pt)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getHours());Eu.range;const Cu=Ze(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getUTCHours());Cu.range;const La=Ze(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Pt)/ir,e=>e.getDate()-1);La.range;const To=Ze(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ir,e=>e.getUTCDate()-1);To.range;const gv=Ze(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ir,e=>Math.floor(e/ir));gv.range;function Lr(e){return Ze(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())*Pt)/Au)}const Ao=Lr(0),Po=Lr(1),nN=Lr(2),aN=Lr(3),Tn=Lr(4),iN=Lr(5),oN=Lr(6);Ao.range,Po.range,nN.range,aN.range,Tn.range,iN.range,oN.range;function Rr(e){return Ze(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)/Au)}const jo=Rr(0),_o=Rr(1),sN=Rr(2),lN=Rr(3),An=Rr(4),uN=Rr(5),cN=Rr(6);jo.range,_o.range,sN.range,lN.range,An.range,uN.range,cN.range;const $u=Ze(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 ku=Ze(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());ku.range;const or=Ze(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());or.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ze(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)}),or.range;const sr=Ze(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());sr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ze(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)}),sr.range;function bv(e,t,r,n,a,i){const o=[[Ir,1,nr],[Ir,5,5*nr],[Ir,15,15*nr],[Ir,30,30*nr],[i,1,Pt],[i,5,5*Pt],[i,15,15*Pt],[i,30,30*Pt],[a,1,ar],[a,3,3*ar],[a,6,6*ar],[a,12,12*ar],[n,1,ir],[n,2,2*ir],[r,1,Au],[t,1,yv],[t,3,3*yv],[e,1,Pu]];function s(u,c,f){const d=c<u;d&&([u,c]=[c,u]);const p=f&&typeof f.range=="function"?f:l(u,c,f),m=p?p.range(u,+c+1):[];return d?m.reverse():m}function l(u,c,f){const d=Math.abs(c-u)/f,p=ru(([,,v])=>v).right(o,d);if(p===o.length)return e.every(iu(u/Pu,c/Pu,f));if(p===0)return So.every(Math.max(iu(u,c,f),1));const[m,y]=o[d/o[p-1][2]<o[p][2]/d?p-1:p];return m.every(y)}return[s,l]}const[fN,dN]=bv(sr,ku,jo,gv,Cu,_u),[pN,hN]=bv(or,$u,Ao,La,Eu,ju);function Mu(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 Nu(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 Ra(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function vN(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=Ba(a),c=Fa(a),f=Ba(i),d=Fa(i),p=Ba(o),m=Fa(o),y=Ba(s),v=Fa(s),b=Ba(l),w=Fa(l),x={a:B,A:z,b:G,B:E,c:null,d:Av,e:Av,f:RN,g:HN,G:XN,H:DN,I:IN,j:LN,L:Pv,m:BN,M:FN,p:R,q:F,Q:kv,s:Mv,S:WN,u:zN,U:UN,V:GN,w:VN,W:KN,x:null,X:null,y:qN,Y:YN,Z:ZN,"%":$v},A={a:W,A:V,b:X,B:Q,c:null,d:_v,e:_v,f:tD,g:fD,G:pD,H:JN,I:QN,j:eD,L:Ev,m:rD,M:nD,p:ae,q:te,Q:kv,s:Mv,S:aD,u:iD,U:oD,V:sD,w:lD,W:uD,x:null,X:null,y:cD,Y:dD,Z:hD,"%":$v},g={a:M,A:P,b:_,B:I,c:$,d:Sv,e:Sv,f:$N,g:Ov,G:wv,H:Tv,I:Tv,j:jN,L:CN,m:PN,M:_N,p:C,q:AN,Q:MN,s:NN,S:EN,u:xN,U:wN,V:ON,w:bN,W:SN,x:D,X:k,y:Ov,Y:wv,Z:TN,"%":kN};x.x=O(r,x),x.X=O(n,x),x.c=O(t,x),A.x=O(r,A),A.X=O(n,A),A.c=O(t,A);function O(K,Y){return function(J){var L=[],ie=-1,q=0,ue=K.length,ee,ve,ze;for(J instanceof Date||(J=new Date(+J));++ie<ue;)K.charCodeAt(ie)===37&&(L.push(K.slice(q,ie)),(ve=xv[ee=K.charAt(++ie)])!=null?ee=K.charAt(++ie):ve=ee==="e"?" ":"0",(ze=Y[ee])&&(ee=ze(J,ve)),L.push(ee),q=ie+1);return L.push(K.slice(q,ie)),L.join("")}}function S(K,Y){return function(J){var L=Ra(1900,void 0,1),ie=j(L,K,J+="",0),q,ue;if(ie!=J.length)return null;if("Q"in L)return new Date(L.Q);if("s"in L)return new Date(L.s*1e3+("L"in L?L.L:0));if(Y&&!("Z"in L)&&(L.Z=0),"p"in L&&(L.H=L.H%12+L.p*12),L.m===void 0&&(L.m="q"in L?L.q:0),"V"in L){if(L.V<1||L.V>53)return null;"w"in L||(L.w=1),"Z"in L?(q=Nu(Ra(L.y,0,1)),ue=q.getUTCDay(),q=ue>4||ue===0?_o.ceil(q):_o(q),q=To.offset(q,(L.V-1)*7),L.y=q.getUTCFullYear(),L.m=q.getUTCMonth(),L.d=q.getUTCDate()+(L.w+6)%7):(q=Mu(Ra(L.y,0,1)),ue=q.getDay(),q=ue>4||ue===0?Po.ceil(q):Po(q),q=La.offset(q,(L.V-1)*7),L.y=q.getFullYear(),L.m=q.getMonth(),L.d=q.getDate()+(L.w+6)%7)}else("W"in L||"U"in L)&&("w"in L||(L.w="u"in L?L.u%7:"W"in L?1:0),ue="Z"in L?Nu(Ra(L.y,0,1)).getUTCDay():Mu(Ra(L.y,0,1)).getDay(),L.m=0,L.d="W"in L?(L.w+6)%7+L.W*7-(ue+5)%7:L.w+L.U*7-(ue+6)%7);return"Z"in L?(L.H+=L.Z/100|0,L.M+=L.Z%100,Nu(L)):Mu(L)}}function j(K,Y,J,L){for(var ie=0,q=Y.length,ue=J.length,ee,ve;ie<q;){if(L>=ue)return-1;if(ee=Y.charCodeAt(ie++),ee===37){if(ee=Y.charAt(ie++),ve=g[ee in xv?Y.charAt(ie++):ee],!ve||(L=ve(K,J,L))<0)return-1}else if(ee!=J.charCodeAt(L++))return-1}return L}function C(K,Y,J){var L=u.exec(Y.slice(J));return L?(K.p=c.get(L[0].toLowerCase()),J+L[0].length):-1}function M(K,Y,J){var L=p.exec(Y.slice(J));return L?(K.w=m.get(L[0].toLowerCase()),J+L[0].length):-1}function P(K,Y,J){var L=f.exec(Y.slice(J));return L?(K.w=d.get(L[0].toLowerCase()),J+L[0].length):-1}function _(K,Y,J){var L=b.exec(Y.slice(J));return L?(K.m=w.get(L[0].toLowerCase()),J+L[0].length):-1}function I(K,Y,J){var L=y.exec(Y.slice(J));return L?(K.m=v.get(L[0].toLowerCase()),J+L[0].length):-1}function $(K,Y,J){return j(K,t,Y,J)}function D(K,Y,J){return j(K,r,Y,J)}function k(K,Y,J){return j(K,n,Y,J)}function B(K){return o[K.getDay()]}function z(K){return i[K.getDay()]}function G(K){return l[K.getMonth()]}function E(K){return s[K.getMonth()]}function R(K){return a[+(K.getHours()>=12)]}function F(K){return 1+~~(K.getMonth()/3)}function W(K){return o[K.getUTCDay()]}function V(K){return i[K.getUTCDay()]}function X(K){return l[K.getUTCMonth()]}function Q(K){return s[K.getUTCMonth()]}function ae(K){return a[+(K.getUTCHours()>=12)]}function te(K){return 1+~~(K.getUTCMonth()/3)}return{format:function(K){var Y=O(K+="",x);return Y.toString=function(){return K},Y},parse:function(K){var Y=S(K+="",!1);return Y.toString=function(){return K},Y},utcFormat:function(K){var Y=O(K+="",A);return Y.toString=function(){return K},Y},utcParse:function(K){var Y=S(K+="",!0);return Y.toString=function(){return K},Y}}}var xv={"-":"",_:" ",0:"0"},tt=/^\s*\d+/,mN=/^%/,yN=/[\\^$*+?|[\]().{}]/g;function be(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 gN(e){return e.replace(yN,"\\$&")}function Ba(e){return new RegExp("^(?:"+e.map(gN).join("|")+")","i")}function Fa(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function bN(e,t,r){var n=tt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function xN(e,t,r){var n=tt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function wN(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function ON(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function SN(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function wv(e,t,r){var n=tt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Ov(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function TN(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 AN(e,t,r){var n=tt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function PN(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Sv(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function jN(e,t,r){var n=tt.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=tt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function _N(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function EN(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function CN(e,t,r){var n=tt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function $N(e,t,r){var n=tt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function kN(e,t,r){var n=mN.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function MN(e,t,r){var n=tt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function NN(e,t,r){var n=tt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Av(e,t){return be(e.getDate(),t,2)}function DN(e,t){return be(e.getHours(),t,2)}function IN(e,t){return be(e.getHours()%12||12,t,2)}function LN(e,t){return be(1+La.count(or(e),e),t,3)}function Pv(e,t){return be(e.getMilliseconds(),t,3)}function RN(e,t){return Pv(e,t)+"000"}function BN(e,t){return be(e.getMonth()+1,t,2)}function FN(e,t){return be(e.getMinutes(),t,2)}function WN(e,t){return be(e.getSeconds(),t,2)}function zN(e){var t=e.getDay();return t===0?7:t}function UN(e,t){return be(Ao.count(or(e)-1,e),t,2)}function jv(e){var t=e.getDay();return t>=4||t===0?Tn(e):Tn.ceil(e)}function GN(e,t){return e=jv(e),be(Tn.count(or(e),e)+(or(e).getDay()===4),t,2)}function VN(e){return e.getDay()}function KN(e,t){return be(Po.count(or(e)-1,e),t,2)}function qN(e,t){return be(e.getFullYear()%100,t,2)}function HN(e,t){return e=jv(e),be(e.getFullYear()%100,t,2)}function YN(e,t){return be(e.getFullYear()%1e4,t,4)}function XN(e,t){var r=e.getDay();return e=r>=4||r===0?Tn(e):Tn.ceil(e),be(e.getFullYear()%1e4,t,4)}function ZN(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+be(t/60|0,"0",2)+be(t%60,"0",2)}function _v(e,t){return be(e.getUTCDate(),t,2)}function JN(e,t){return be(e.getUTCHours(),t,2)}function QN(e,t){return be(e.getUTCHours()%12||12,t,2)}function eD(e,t){return be(1+To.count(sr(e),e),t,3)}function Ev(e,t){return be(e.getUTCMilliseconds(),t,3)}function tD(e,t){return Ev(e,t)+"000"}function rD(e,t){return be(e.getUTCMonth()+1,t,2)}function nD(e,t){return be(e.getUTCMinutes(),t,2)}function aD(e,t){return be(e.getUTCSeconds(),t,2)}function iD(e){var t=e.getUTCDay();return t===0?7:t}function oD(e,t){return be(jo.count(sr(e)-1,e),t,2)}function Cv(e){var t=e.getUTCDay();return t>=4||t===0?An(e):An.ceil(e)}function sD(e,t){return e=Cv(e),be(An.count(sr(e),e)+(sr(e).getUTCDay()===4),t,2)}function lD(e){return e.getUTCDay()}function uD(e,t){return be(_o.count(sr(e)-1,e),t,2)}function cD(e,t){return be(e.getUTCFullYear()%100,t,2)}function fD(e,t){return e=Cv(e),be(e.getUTCFullYear()%100,t,2)}function dD(e,t){return be(e.getUTCFullYear()%1e4,t,4)}function pD(e,t){var r=e.getUTCDay();return e=r>=4||r===0?An(e):An.ceil(e),be(e.getUTCFullYear()%1e4,t,4)}function hD(){return"+0000"}function $v(){return"%"}function kv(e){return+e}function Mv(e){return Math.floor(+e/1e3)}var Pn,Nv,Dv;vD({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 vD(e){return Pn=vN(e),Nv=Pn.format,Pn.parse,Dv=Pn.utcFormat,Pn.utcParse,Pn}function mD(e){return new Date(e)}function yD(e){return e instanceof Date?+e:+new Date(+e)}function Du(e,t,r,n,a,i,o,s,l,u){var c=mu(),f=c.invert,d=c.domain,p=u(".%L"),m=u(":%S"),y=u("%I:%M"),v=u("%I %p"),b=u("%a %d"),w=u("%b %d"),x=u("%B"),A=u("%Y");function g(O){return(l(O)<O?p:s(O)<O?m:o(O)<O?y:i(O)<O?v:n(O)<O?a(O)<O?b:w:r(O)<O?x:A)(O)}return c.invert=function(O){return new Date(f(O))},c.domain=function(O){return arguments.length?d(Array.from(O,yD)):d().map(mD)},c.ticks=function(O){var S=d();return e(S[0],S[S.length-1],O??10)},c.tickFormat=function(O,S){return S==null?g:u(S)},c.nice=function(O){var S=d();return(!O||typeof O.range!="function")&&(O=t(S[0],S[S.length-1],O??10)),O?d(nv(S,O)):c},c.copy=function(){return Da(c,Du(e,t,r,n,a,i,o,s,l,u))},c}function gD(){return At.apply(Du(pN,hN,or,$u,Ao,La,Eu,ju,Ir,Nv).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function bD(){return At.apply(Du(fN,dN,sr,ku,jo,To,Cu,_u,Ir,Dv).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Eo(){var e=0,t=1,r,n,a,i,o=lt,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 p,m;return arguments.length?([p,m]=d,o=f(p,m),u):[o(0),o(1)]}}return u.range=c(On),u.rangeRound=c(hu),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 gr(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Iv(){var e=yr(Eo()(lt));return e.copy=function(){return gr(e,Iv())},rr.apply(e,arguments)}function Lv(){var e=bu(Eo()).domain([1,10]);return e.copy=function(){return gr(e,Lv()).base(e.base())},rr.apply(e,arguments)}function Rv(){var e=xu(Eo());return e.copy=function(){return gr(e,Rv()).constant(e.constant())},rr.apply(e,arguments)}function Iu(){var e=wu(Eo());return e.copy=function(){return gr(e,Iu()).exponent(e.exponent())},rr.apply(e,arguments)}function xD(){return Iu.apply(null,arguments).exponent(.5)}function Bv(){var e=[],t=lt;function r(n){if(n!=null&&!isNaN(n=+n))return t((ja(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(mr),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)=>oM(e,i/n))},r.copy=function(){return Bv(t).domain(e)},rr.apply(r,arguments)}function Co(){var e=0,t=.5,r=1,n=1,a,i,o,s,l,u=lt,c,f=!1,d;function p(y){return isNaN(y=+y)?d:(y=.5+((y=+c(y))-i)*(n*y<n*i?s:l),u(f?Math.max(0,Math.min(1,y)):y))}p.domain=function(y){return arguments.length?([e,t,r]=y,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,p):[e,t,r]},p.clamp=function(y){return arguments.length?(f=!!y,p):f},p.interpolator=function(y){return arguments.length?(u=y,p):u};function m(y){return function(v){var b,w,x;return arguments.length?([b,w,x]=v,u=kM(y,[b,w,x]),p):[u(0),u(.5),u(1)]}}return p.range=m(On),p.rangeRound=m(hu),p.unknown=function(y){return arguments.length?(d=y,p):d},function(y){return c=y,a=y(e),i=y(t),o=y(r),s=a===i?0:.5/(i-a),l=i===o?0:.5/(o-i),n=i<a?-1:1,p}}function Fv(){var e=yr(Co()(lt));return e.copy=function(){return gr(e,Fv())},rr.apply(e,arguments)}function Wv(){var e=bu(Co()).domain([.1,1,10]);return e.copy=function(){return gr(e,Wv()).base(e.base())},rr.apply(e,arguments)}function zv(){var e=xu(Co());return e.copy=function(){return gr(e,zv()).constant(e.constant())},rr.apply(e,arguments)}function Lu(){var e=wu(Co());return e.copy=function(){return gr(e,Lu()).exponent(e.exponent())},rr.apply(e,arguments)}function wD(){return Lu.apply(null,arguments).exponent(.5)}const Uv=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Ea,scaleDiverging:Fv,scaleDivergingLog:Wv,scaleDivergingPow:Lu,scaleDivergingSqrt:wD,scaleDivergingSymlog:zv,scaleIdentity:rv,scaleImplicit:ou,scaleLinear:Oo,scaleLog:sv,scaleOrdinal:su,scalePoint:Ca,scalePow:Ou,scaleQuantile:hv,scaleQuantize:vv,scaleRadial:pv,scaleSequential:Iv,scaleSequentialLog:Lv,scaleSequentialPow:Iu,scaleSequentialQuantile:Bv,scaleSequentialSqrt:xD,scaleSequentialSymlog:Rv,scaleSqrt:tN,scaleSymlog:cv,scaleThreshold:mv,scaleTime:gD,scaleUtc:bD,tickFormat:tv},Symbol.toStringTag,{value:"Module"}));var OD=rn;function SD(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&&!OD(o):r(o,s)))var s=o,l=i}return l}var Gv=SD;function TD(e,t){return e>t}var AD=TD,PD=Gv,jD=AD,_D=hn;function ED(e){return e&&e.length?PD(e,_D,jD):void 0}var CD=ED;const br=$e(CD);function $D(e,t){return e<t}var kD=$D,MD=Gv,ND=kD,DD=hn;function ID(e){return e&&e.length?MD(e,DD,ND):void 0}var LD=ID;const $o=$e(LD);var RD=el,BD=hr,FD=Fp,WD=ft;function zD(e,t){var r=WD(e)?RD:FD;return r(e,BD(t))}var UD=zD,GD=Rp,VD=UD;function KD(e,t){return GD(VD(e,t),1)}var qD=KD;const HD=$e(qD);var YD=Bl;function XD(e,t){return YD(e,t)}var ZD=XD;const Br=$e(ZD);var jn=1e9,JD={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Fu,Re=!0,jt="[DecimalError] ",Fr=jt+"Invalid argument: ",Ru=jt+"Exponent out of range: ",_n=Math.floor,Wr=Math.pow,QD=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,yt,rt=1e7,Le=7,Vv=9007199254740991,ko=_n(Vv/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 lr(this,new this.constructor(e))},ne.dividedToIntegerBy=ne.idiv=function(e){var t=this,r=t.constructor;return Ee(lr(t,new r(e),0,1),r.precision)},ne.equals=ne.eq=function(e){return!this.cmp(e)},ne.exponent=function(){return qe(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(yt))throw Error(jt+"NaN");if(r.s<1)throw Error(jt+(r.s?"NaN":"-Infinity"));return r.eq(yt)?new n(0):(Re=!1,t=lr(Wa(r,i),Wa(e,i),i),Re=!0,Ee(t,a))},ne.minus=ne.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Yv(t,e):Kv(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(jt+"NaN");return r.s?(Re=!1,t=lr(r,e,0,1).times(e),Re=!0,r.minus(t)):Ee(new n(r),a)},ne.naturalExponential=ne.exp=function(){return qv(this)},ne.naturalLogarithm=ne.ln=function(){return Wa(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?Kv(t,e):Yv(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(Fr+e);if(t=qe(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(jt+"NaN")}for(e=qe(s),Re=!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=_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(lr(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(Ee(i,r+1,0),i.times(i).eq(s)){n=i;break}}else if(t!="9999")break;o+=4}return Re=!0,Ee(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,p=(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=p.length,l<u&&(i=d,d=p,p=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]+p[n]*d[a-n-1]+t,i[a--]=s%rt|0,t=s/rt|0;i[a]=(i[a]+t)%rt|0}for(;!i[--o];)i.pop();return t?++r:i.shift(),e.d=i,e.e=r,Re?Ee(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:(Ut(e,0,jn),t===void 0?t=n.rounding:Ut(t,0,8),Ee(r,e+qe(r)+1,t))},ne.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=zr(n,!0):(Ut(e,0,jn),t===void 0?t=a.rounding:Ut(t,0,8),n=Ee(new a(n),e+1,t),r=zr(n,!0,e+1)),r},ne.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?zr(a):(Ut(e,0,jn),t===void 0?t=i.rounding:Ut(t,0,8),n=Ee(new i(a),e+qe(a)+1,t),r=zr(n.abs(),!1,e+qe(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)},ne.toInteger=ne.toint=function(){var e=this,t=e.constructor;return Ee(new t(e),qe(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(yt);if(s=new l(s),!s.s){if(e.s<1)throw Error(jt+"Infinity");return s}if(s.eq(yt))return s;if(n=l.precision,e.eq(yt))return Ee(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,i=s.s,o){if((r=c<0?-c:c)<=Vv){for(a=new l(yt),t=Math.ceil(n/Le+4),Re=!1;r%2&&(a=a.times(s),Xv(a.d,t)),r=_n(r/2),r!==0;)s=s.times(s),Xv(s.d,t);return Re=!0,e.s<0?new l(yt).div(a):Ee(a,n)}}else if(i<0)throw Error(jt+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Re=!1,a=e.times(Wa(s,n+u)),Re=!0,a=qv(a),a.s=i,a},ne.toPrecision=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?(r=qe(a),n=zr(a,r<=i.toExpNeg||r>=i.toExpPos)):(Ut(e,1,jn),t===void 0?t=i.rounding:Ut(t,0,8),a=Ee(new i(a),e,t),r=qe(a),n=zr(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):(Ut(e,1,jn),t===void 0?t=n.rounding:Ut(t,0,8)),Ee(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=qe(e),r=e.constructor;return zr(e,t<=r.toExpNeg||t>=r.toExpPos)};function Kv(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)),Re?Ee(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)/rt|0,l[i]%=rt;for(r&&(l.unshift(r),++a),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=a,Re?Ee(t,f):t}function Ut(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Fr+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+=xr(r)),i+=n;o=e[t],n=o+"",r=Le-n.length,r&&(i+=xr(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}var lr=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%rt|0,o=i/rt|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*rt+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,p,m,y,v,b,w,x,A,g,O,S,j,C=n.constructor,M=n.s==a.s?1:-1,P=n.d,_=a.d;if(!n.s)return new C(n);if(!a.s)throw Error(jt+"Division by zero");for(l=n.e-a.e,S=_.length,g=P.length,p=new C(M),m=p.d=[],u=0;_[u]==(P[u]||0);)++u;if(_[u]>(P[u]||0)&&--l,i==null?w=i=C.precision:o?w=i+(qe(n)-qe(a))+1:w=i,w<0)return new C(0);if(w=w/Le+2|0,u=0,S==1)for(c=0,_=_[0],w++;(u<g||c)&&w--;u++)x=c*rt+(P[u]||0),m[u]=x/_|0,c=x%_|0;else{for(c=rt/(_[0]+1)|0,c>1&&(_=e(_,c),P=e(P,c),S=_.length,g=P.length),A=S,y=P.slice(0,S),v=y.length;v<S;)y[v++]=0;j=_.slice(),j.unshift(0),O=_[0],_[1]>=rt/2&&++O;do c=0,s=t(_,y,S,v),s<0?(b=y[0],S!=v&&(b=b*rt+(y[1]||0)),c=b/O|0,c>1?(c>=rt&&(c=rt-1),f=e(_,c),d=f.length,v=y.length,s=t(f,y,d,v),s==1&&(c--,r(f,S<d?j:_,d))):(c==0&&(s=c=1),f=_.slice()),d=f.length,d<v&&f.unshift(0),r(y,f,v),s==-1&&(v=y.length,s=t(_,y,S,v),s<1&&(c++,r(y,S<v?j:_,v))),v=y.length):s===0&&(c++,y=[0]),m[u++]=c,s&&y[0]?y[v++]=P[A]||0:(y=[P[A]],v=1);while((A++<g||y[0]!==void 0)&&w--)}return m[0]||m.shift(),p.e=l,Ee(p,o?i+qe(p)+1:i)}}();function qv(e,t){var r,n,a,i,o,s,l=0,u=0,c=e.constructor,f=c.precision;if(qe(e)>16)throw Error(Ru+qe(e));if(!e.s)return new c(yt);for(Re=!1,s=f,o=new c(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(Wr(2,u))/Math.LN10*2+5|0,s+=n,r=a=i=new c(yt),c.precision=s;;){if(a=Ee(a.times(e),s),r=r.times(++l),o=i.plus(lr(a,r,s)),Gt(o.d).slice(0,s)===Gt(i.d).slice(0,s)){for(;u--;)i=Ee(i.times(i),s);return c.precision=f,t==null?(Re=!0,Ee(i,f)):i}i=o}}function qe(e){for(var t=e.e*Le,r=e.d[0];r>=10;r/=10)t++;return t}function Bu(e,t,r){if(t>e.LN10.sd())throw Re=!0,r&&(e.precision=r),Error(jt+"LN10 precision limit exceeded");return Ee(new e(e.LN10),t)}function xr(e){for(var t="";e--;)t+="0";return t}function Wa(e,t){var r,n,a,i,o,s,l,u,c,f=1,d=10,p=e,m=p.d,y=p.constructor,v=y.precision;if(p.s<1)throw Error(jt+(p.s?"NaN":"-Infinity"));if(p.eq(yt))return new y(0);if(t==null?(Re=!1,u=v):u=t,p.eq(10))return t==null&&(Re=!0),Bu(y,u);if(u+=d,y.precision=u,r=Gt(m),n=r.charAt(0),i=qe(p),Math.abs(i)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=Gt(p.d),n=r.charAt(0),f++;i=qe(p),n>1?(p=new y("0."+r),i++):p=new y(n+"."+r.slice(1))}else return l=Bu(y,u+2,v).times(i+""),p=Wa(new y(n+"."+r.slice(1)),u-d).plus(l),y.precision=v,t==null?(Re=!0,Ee(p,v)):p;for(s=o=p=lr(p.minus(yt),p.plus(yt),u),c=Ee(p.times(p),u),a=3;;){if(o=Ee(o.times(c),u),l=s.plus(lr(o,new y(a),u)),Gt(l.d).slice(0,u)===Gt(s.d).slice(0,u))return s=s.times(2),i!==0&&(s=s.plus(Bu(y,u+2,v).times(i+""))),s=lr(s,new y(f),u),y.precision=v,t==null?(Re=!0,Ee(s,v)):s;s=l,a+=2}}function Hv(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),Re&&(e.e>ko||e.e<-ko))throw Error(Ru+r)}else e.s=0,e.e=0,e.d=[0];return e}function Ee(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=Wr(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/Wr(10,o-a):0:f[c-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(i=qe(e),f.length=1,t=t-i-1,f[0]=Wr(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=Wr(10,Le-n),f[c]=a>0?(u/Wr(10,o-a)%Wr(10,a)|0)*i:0),l)for(;;)if(c==0){(f[0]+=i)==rt&&(f[0]=1,++e.e);break}else{if(f[c]+=i,f[c]!=rt)break;f[c--]=0,i=1}for(n=f.length;f[--n]===0;)f.pop();if(Re&&(e.e>ko||e.e<-ko))throw Error(Ru+qe(e));return e}function Yv(e,t){var r,n,a,i,o,s,l,u,c,f,d=e.constructor,p=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),Re?Ee(t,p):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(p/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]=rt-1;--l[i],l[a]+=rt}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,Re?Ee(t,p):t):new d(0)}function zr(e,t,r){var n,a=qe(e),i=Gt(e.d),o=i.length;return t?(r&&(n=r-o)>0?i=i.charAt(0)+"."+i.slice(1)+xr(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+xr(-a-1)+i,r&&(n=r-o)>0&&(i+=xr(n))):a>=o?(i+=xr(a+1-o),r&&(n=r-a-1)>0&&(i=i+"."+xr(n))):((n=a+1)<o&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-o)>0&&(a+1===o&&(i+="."),i+=xr(n))),e.s<0?"-"+i:i}function Xv(e,t){if(e.length>t)return e.length=t,!0}function Zv(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(Fr+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 Hv(o,i.toString())}else if(typeof i!="string")throw Error(Fr+i);if(i.charCodeAt(0)===45?(i=i.slice(1),o.s=-1):o.s=1,QD.test(i))Hv(o,i);else throw Error(Fr+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=Zv,a.config=a.set=e3,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 e3(e){if(!e||typeof e!="object")throw Error(jt+"Object expected");var t,r,n,a=["precision",1,jn,"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(Fr+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Fr+r+": "+n);return this}var Fu=Zv(JD);yt=new Fu(1);const _e=Fu;function t3(e){return i3(e)||a3(e)||n3(e)||r3()}function r3(){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 n3(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 a3(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function i3(e){if(Array.isArray(e))return Wu(e)}function Wu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var o3=function(t){return t},Jv={},Qv=function(t){return t===Jv},em=function(t){return function r(){return arguments.length===0||arguments.length===1&&Qv(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},s3=function e(t,r){return t===1?r:em(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,em(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 Qv(f)?l.shift():f});return r.apply(void 0,t3(c).concat(l))}))})},Mo=function(t){return s3(t.length,t)},zu=function(t,r){for(var n=[],a=t;a<r;++a)n[a-t]=a;return n},l3=Mo(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),u3=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return o3;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))}},Uu=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},tm=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 c3(e){var t;return e===0?t=1:t=Math.floor(new _e(e).abs().log(10).toNumber())+1,t}function f3(e,t,r){for(var n=new _e(e),a=0,i=[];n.lt(t)&&a<1e5;)i.push(n.toNumber()),n=n.add(r),a++;return i}var d3=Mo(function(e,t,r){var n=+e,a=+t;return n+r*(a-n)}),p3=Mo(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),h3=Mo(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const No={rangeStep:f3,getDigitCount:c3,interpolateNumber:d3,uninterpolateNumber:p3,uninterpolateTruncation:h3};function Gu(e){return y3(e)||m3(e)||rm(e)||v3()}function v3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
199
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m3(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function y3(e){if(Array.isArray(e))return Vu(e)}function za(e,t){return x3(e)||b3(e,t)||rm(e,t)||g3()}function g3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
200
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rm(e,t){if(e){if(typeof e=="string")return Vu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vu(e,t)}}function Vu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function b3(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 x3(e){if(Array.isArray(e))return e}function nm(e){var t=za(e,2),r=t[0],n=t[1],a=r,i=n;return r>n&&(a=n,i=r),[a,i]}function am(e,t,r){if(e.lte(0))return new _e(0);var n=No.getDigitCount(e.toNumber()),a=new _e(10).pow(n),i=e.div(a),o=n!==1?.05:.1,s=new _e(Math.ceil(i.div(o).toNumber())).add(r).mul(o),l=s.mul(a);return t?l:new _e(Math.ceil(l))}function w3(e,t,r){var n=1,a=new _e(e);if(!a.isint()&&r){var i=Math.abs(e);i<1?(n=new _e(10).pow(No.getDigitCount(e)-1),a=new _e(Math.floor(a.div(n).toNumber())).mul(n)):i>1&&(a=new _e(Math.floor(e)))}else e===0?a=new _e(Math.floor((t-1)/2)):r||(a=new _e(Math.floor(e)));var o=Math.floor((t-1)/2),s=u3(l3(function(l){return a.add(new _e(l-o).mul(n)).toNumber()}),zu);return s(0,t)}function im(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 _e(0),tickMin:new _e(0),tickMax:new _e(0)};var i=am(new _e(t).sub(e).div(r-1),n,a),o;e<=0&&t>=0?o=new _e(0):(o=new _e(e).add(t).div(2),o=o.sub(new _e(o).mod(i)));var s=Math.ceil(o.sub(e).div(i).toNumber()),l=Math.ceil(new _e(t).sub(o).div(i).toNumber()),u=s+l+1;return u>r?im(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 _e(s).mul(i)),tickMax:o.add(new _e(l).mul(i))})}function O3(e){var t=za(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=nm([r,n]),l=za(s,2),u=l[0],c=l[1];if(u===-1/0||c===1/0){var f=c===1/0?[u].concat(Gu(zu(0,a-1).map(function(){return 1/0}))):[].concat(Gu(zu(0,a-1).map(function(){return-1/0})),[c]);return r>n?Uu(f):f}if(u===c)return w3(u,a,i);var d=im(u,c,o,i),p=d.step,m=d.tickMin,y=d.tickMax,v=No.rangeStep(m,y.add(new _e(.1).mul(p)),p);return r>n?Uu(v):v}function S3(e,t){var r=za(e,2),n=r[0],a=r[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=nm([n,a]),s=za(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=am(new _e(u).sub(l).div(c-1),i,0),d=[].concat(Gu(No.rangeStep(new _e(l),new _e(u).sub(new _e(.99).mul(f)),f)),[u]);return n>a?Uu(d):d}var T3=tm(O3),A3=tm(S3),P3=process.env.NODE_ENV==="production",Ku="Invariant failed";function ht(e,t){if(P3)throw new Error(Ku);var r=typeof t=="function"?t():t,n=r?"".concat(Ku,": ").concat(r):Ku;throw new Error(n)}var j3=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function En(e){"@babel/helpers - typeof";return En=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},En(e)}function Do(){return Do=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},Do.apply(this,arguments)}function _3(e,t){return k3(e)||$3(e,t)||C3(e,t)||E3()}function E3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
201
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C3(e,t){if(e){if(typeof e=="string")return om(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 om(e,t)}}function om(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 $3(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 k3(e){if(Array.isArray(e))return e}function M3(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 D3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I3(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,um(n.key),n)}}function L3(e,t,r){return t&&I3(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function R3(e,t,r){return t=Io(t),B3(e,sm()?Reflect.construct(t,r||[],Io(e).constructor):t.apply(e,r))}function B3(e,t){if(t&&(En(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return F3(e)}function F3(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sm=function(){return!!e})()}function Io(e){return Io=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Io(e)}function W3(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&&qu(e,t)}function qu(e,t){return qu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},qu(e,t)}function lm(e,t,r){return t=um(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function um(e){var t=z3(e,"string");return En(t)=="symbol"?t:t+""}function z3(e,t){if(En(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(En(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Cn=function(e){function t(){return D3(this,t),R3(this,t,arguments)}return W3(t,e),L3(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=M3(n,j3),p=de(d,!1);this.props.direction==="x"&&c.type!=="number"&&(process.env.NODE_ENV!=="production"?ht(!1,'ErrorBar requires Axis type property to be "number".'):ht());var m=l.map(function(y){var v=u(y,s),b=v.x,w=v.y,x=v.value,A=v.errorVal;if(!A)return null;var g=[],O,S;if(Array.isArray(A)){var j=_3(A,2);O=j[0],S=j[1]}else O=S=A;if(i==="vertical"){var C=c.scale,M=w+a,P=M+o,_=M-o,I=C(x-O),$=C(x+S);g.push({x1:$,y1:P,x2:$,y2:_}),g.push({x1:I,y1:M,x2:$,y2:M}),g.push({x1:I,y1:P,x2:I,y2:_})}else if(i==="horizontal"){var D=f.scale,k=b+a,B=k-o,z=k+o,G=D(x-O),E=D(x+S);g.push({x1:B,y1:E,x2:z,y2:E}),g.push({x1:k,y1:G,x2:k,y2:E}),g.push({x1:B,y1:G,x2:z,y2:G})}return T.createElement(xe,Do({className:"recharts-errorBar",key:"bar-".concat(g.map(function(R){return"".concat(R.x1,"-").concat(R.x2,"-").concat(R.y1,"-").concat(R.y2)}))},p),g.map(function(R){return T.createElement("line",Do({},R,{key:"line-".concat(R.x1,"-").concat(R.x2,"-").concat(R.y1,"-").concat(R.y2)}))}))});return T.createElement(xe,{className:"recharts-errorBars"},m)}}])}(T.Component);lm(Cn,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"}),lm(Cn,"displayName","ErrorBar");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 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 Ur(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){U3(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 U3(e,t,r){return t=G3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function G3(e){var t=V3(e,"string");return Ua(t)=="symbol"?t:t+""}function V3(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 fm=function(t){var r=t.children,n=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,o=mt(r,mn);if(!o)return null;var s=mn.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,p=f.props,m=p.sectors||p.data||[];return c.concat(m.map(function(y){return{type:o.props.iconType||d.props.legendType,value:y.name,color:y.fill,payload:y}}))},[]):u=(n||[]).map(function(c){var f=c.item,d=f.type.defaultProps,p=d!==void 0?Ur(Ur({},d),f.props):{},m=p.dataKey,y=p.name,v=p.legendType,b=p.hide;return{inactive:b,dataKey:m,type:l.iconType||v||"square",color:Yu(f),value:y||m,payload:p}}),Ur(Ur(Ur({},l),mn.getWithHeight(o,a)),{},{payload:u,item:o})};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 dm(e){return Y3(e)||H3(e)||q3(e)||K3()}function K3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
202
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q3(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 H3(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Y3(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 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 We(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){$n(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 $n(e,t,r){return t=X3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X3(e){var t=Z3(e,"string");return Ga(t)=="symbol"?t:t+""}function Z3(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)}function Je(e,t,r){return fe(e)||fe(t)?r:Xe(t)?wt(e,t,r):pe(t)?t(e):r}function Va(e,t,r,n){var a=HD(e,function(s){return Je(s,t)});if(r==="number"){var i=a.filter(function(s){return Z(s)||parseFloat(s)});return i.length?[$o(i),br(i)]:[1/0,-1/0]}var o=n?a.filter(function(s){return!fe(s)}):a;return o.map(function(s){return Xe(s)||s instanceof Date?s:""})}var J3=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,p=void 0;if($t(f-c)!==$t(d-f)){var m=[];if($t(d-f)===$t(l[1]-l[0])){p=d;var y=f+l[1]-l[0];m[0]=Math.min(y,(y+c)/2),m[1]=Math.max(y,(y+c)/2)}else{p=c;var v=d+l[1]-l[0];m[0]=Math.min(f,(v+f)/2),m[1]=Math.max(f,(v+f)/2)}var b=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(t>b[0]&&t<=b[1]||t>=m[0]&&t<=m[1]){o=a[u].index;break}}else{var w=Math.min(c,d),x=Math.max(c,d);if(t>(w+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},Yu=function(t){var r,n=t,a=n.type.displayName,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?We(We({},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},Q3=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,p=f.length;d<p;d++){var m=c[f[d]],y=m.items,v=m.cateAxisId,b=y.filter(function(S){return Qt(S.type).indexOf("Bar")>=0});if(b&&b.length){var w=b[0].type.defaultProps,x=w!==void 0?We(We({},w),b[0].props):b[0].props,A=x.barSize,g=x[v];o[g]||(o[g]=[]);var O=fe(A)?r:A;o[g].push({item:b[0],stackList:b.slice(1),barSize:fe(O)?void 0:$r(O,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,p=a/l,m=o.reduce(function(A,g){return A+g.barSize||0},0);m+=(l-1)*u,m>=a&&(m-=(l-1)*u,u=0),m>=a&&p>0&&(d=!0,p*=.9,m=l*p);var y=(a-m)/2>>0,v={offset:y-u,size:0};c=o.reduce(function(A,g){var O={item:g.item,position:{offset:v.offset+v.size+u,size:d?p:g.barSize}},S=[].concat(dm(A),[O]);return v=S[S.length-1].position,g.stackList&&g.stackList.length&&g.stackList.forEach(function(j){S.push({item:j,position:v})}),S},f)}else{var b=$r(n,a,0,!0);a-2*b-(l-1)*u<=0&&(u=0);var w=(a-2*b-(l-1)*u)/l;w>1&&(w>>=0);var x=s===+s?Math.min(w,s):w;c=o.reduce(function(A,g,O){var S=[].concat(dm(A),[{item:g.item,position:{offset:b+(w+u)*O+(w-x)/2,size:x}}]);return g.stackList&&g.stackList.length&&g.stackList.forEach(function(j){S.push({item:j,position:S[S.length-1].position})}),S},f)}return c},tI=function(t,r,n,a){var i=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),u=fm({children:i,legendWidth:l});if(u){var c=a||{},f=c.width,d=c.height,p=u.align,m=u.verticalAlign,y=u.layout;if((y==="vertical"||y==="horizontal"&&m==="middle")&&p!=="center"&&Z(t[p]))return We(We({},t),{},$n({},p,t[p]+(f||0)));if((y==="horizontal"||y==="vertical"&&p==="center")&&m!=="middle"&&Z(t[m]))return We(We({},t),{},$n({},m,t[m]+(d||0)))}return t},rI=function(t,r,n){return fe(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},hm=function(t,r,n,a,i){var o=r.props.children,s=dt(o,Cn).filter(function(u){return rI(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=Je(c,n);if(fe(f))return u;var d=Array.isArray(f)?[$o(f),br(f)]:[f,f],p=l.reduce(function(m,y){var v=Je(c,y,0),b=d[0]-Math.abs(Array.isArray(v)?v[0]:v),w=d[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(b,m[0]),Math.max(w,m[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},nI=function(t,r,n,a,i){var o=r.map(function(s){return hm(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},vm=function(t,r,n,a,i){var o=r.map(function(l){var u=l.props.dataKey;return n==="number"&&u&&hm(t,l,u,a)||Va(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},[])},mm=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},ym=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},ur=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!ln(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}})},Xu=new WeakMap,Lo=function(t,r){if(typeof r!="function")return t;Xu.has(t)||Xu.set(t,new WeakMap);var n=Xu.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},aI=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:Ea(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:Oo(),realScaleType:"linear"}:i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Ca(),realScaleType:"point"}:i==="category"?{scale:Ea(),realScaleType:"band"}:{scale:Oo(),realScaleType:"linear"};if(_r(a)){var l="scale".concat(Ri(a));return{scale:(Uv[l]||Ca)(),realScaleType:Uv[l]?l:"point"}}return pe(a)?{scale:a}:{scale:Ca(),realScaleType:"point"}},gm=1e-4,iI=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])-gm,o=Math.max(a[0],a[1])+gm,s=t(r[0]),l=t(r[n-1]);(s<i||s>o||l<i||l>o)&&t.domain([r[0],r[n-1]])}},oI=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},sI=function(t,r){if(!r||r.length!==2||!Z(r[0])||!Z(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(!Z(t[0])||t[0]<n)&&(i[0]=n),(!Z(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<n&&(i[1]=n),i},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,s=0;s<r;++s){var l=ln(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])}},uI=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=ln(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)}},cI={sign:lI,expand:AT,none:cn,silhouette:PT,wiggle:jT,positive:uI},fI=function(t,r,n){var a=r.map(function(s){return s.props.dataKey}),i=cI[n],o=TT().keys(a).value(function(s,l){return+Je(s,l,0)}).order(Sl).offset(i);return o(t)},dI=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 p,m=(p=d.type)!==null&&p!==void 0&&p.defaultProps?We(We({},d.type.defaultProps),d.props):d.props,y=m.stackId,v=m.hide;if(v)return f;var b=m[n],w=f[b]||{hasStack:!1,stackGroups:{}};if(Xe(y)){var x=w.stackGroups[y]||{numericAxisId:n,cateAxisId:a,items:[]};x.items.push(d),w.hasStack=!0,w.stackGroups[y]=x}else w.stackGroups[Cr("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[d]};return We(We({},f),{},$n({},b,w))},l),c={};return Object.keys(u).reduce(function(f,d){var p=u[d];if(p.hasStack){var m={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(y,v){var b=p.stackGroups[v];return We(We({},y),{},$n({},v,{numericAxisId:n,cateAxisId:a,items:b.items,stackedData:fI(t,b.items,i)}))},m)}return We(We({},f),{},$n({},d,p))},c)},pI=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=T3(u,i,s);return t.domain([$o(c),br(c)]),{niceTicks:c}}if(i&&a==="number"){var f=t.domain(),d=A3(f,i,s);return{niceTicks:d}}return null};function kn(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=Ii(r,"value",a[t.dataKey]);if(s)return s.coordinate+n/2}return r[i]?r[i].coordinate+n/2:null}var l=Je(a,fe(o)?t.dataKey:o);return fe(l)?null:t.scale(l)}var bm=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=Je(o,r.dataKey,r.domain[s]);return fe(l)?null:r.scale(l)-i/2+a},hI=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]},vI=function(t,r){var n,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?We(We({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(Xe(i)){var o=r[i];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},mI=function(t){return t.reduce(function(r,n){return[$o(n.concat([r[0]]).filter(Z)),br(n.concat([r[1]]).filter(Z))]},[1/0,-1/0])},xm=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=mI(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})},wm=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Om=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Zu=function(t,r,n){if(pe(t))return t(r,n);if(!Array.isArray(t))return r;var a=[];if(Z(t[0]))a[0]=n?t[0]:Math.min(t[0],r[0]);else if(wm.test(t[0])){var i=+wm.exec(t[0])[1];a[0]=r[0]-i}else pe(t[0])?a[0]=t[0](r[0]):a[0]=r[0];if(Z(t[1]))a[1]=n?t[1]:Math.max(t[1],r[1]);else if(Om.test(t[1])){var o=+Om.exec(t[1])[1];a[1]=r[1]+o}else pe(t[1])?a[1]=t[1](r[1]):a[1]=r[1];return a},Ro=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=Gl(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},Sm=function(t,r,n){return!t||!t.length||Br(t,wt(n,"type.defaultProps.domain"))?r:t},Tm=function(t,r){var n=t.type.defaultProps?We(We({},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 We(We({},de(t,!1)),{},{dataKey:a,unit:o,formatter:s,name:i||a,color:Yu(t),value:Je(r,a),type:l,payload:r,chartType:u,hide:c})};function Ka(e){"@babel/helpers - typeof";return Ka=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},Ka(e)}function Am(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?Am(Object(r),!0).forEach(function(n){yI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Am(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yI(e,t,r){return t=gI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gI(e){var t=bI(e,"string");return Ka(t)=="symbol"?t:t+""}function bI(e,t){if(Ka(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ka(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bo=Math.PI/180,xI=function(t){return t*180/Math.PI},nt=function(t,r,n,a){return{x:t+Math.cos(-Bo*a)*n,y:r+Math.sin(-Bo*a)*n}},wI=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))},OI=function(t,r){var n=t.x,a=t.y,i=r.cx,o=r.cy,s=wI({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:xI(u),angleInRadian:u}},SI=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}},TI=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},jm=function(t,r){var n=t.x,a=t.y,i=OI({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=SI(r),f=c.startAngle,d=c.endAngle,p=s,m;if(f<=d){for(;p>d;)p-=360;for(;p<f;)p+=360;m=p>=f&&p<=d}else{for(;p>f;)p-=360;for(;p<d;)p+=360;m=p>=d&&p<=f}return m?Pm(Pm({},r),{},{radius:o,angle:TI(p,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)}var AI=["offset"];function PI(e){return CI(e)||EI(e)||_I(e)||jI()}function jI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
203
+ 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 Ju(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 Ju(e,t)}}function EI(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function CI(e){if(Array.isArray(e))return Ju(e)}function Ju(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 $I(e,t){if(e==null)return{};var r=kI(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 kI(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 _m(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?_m(Object(r),!0).forEach(function(n){MI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_m(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function MI(e,t,r){return t=NI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NI(e){var t=DI(e,"string");return qa(t)=="symbol"?t:t+""}function DI(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 Ha(){return Ha=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},Ha.apply(this,arguments)}var II=function(t){var r=t.value,n=t.formatter,a=fe(t.children)?r:t.children;return pe(n)?n(a):a},LI=function(t,r){var n=$t(r-t),a=Math.min(Math.abs(r-t),360);return n*a},RI=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,p=l.startAngle,m=l.endAngle,y=l.clockWise,v=(f+d)/2,b=LI(p,m),w=b>=0?1:-1,x,A;a==="insideStart"?(x=p+w*o,A=y):a==="insideEnd"?(x=m-w*o,A=!y):a==="end"&&(x=m+w*o,A=y),A=b<=0?A:!A;var g=nt(u,c,v,x),O=nt(u,c,v,x+(A?1:-1)*359),S="M".concat(g.x,",").concat(g.y,`
204
+ A`).concat(v,",").concat(v,",0,1,").concat(A?0:1,`,
205
+ `).concat(O.x,",").concat(O.y),j=fe(t.id)?Cr("recharts-radial-line-"):t.id;return T.createElement("text",Ha({},n,{dominantBaseline:"central",className:me("recharts-radial-bar-label",s)}),T.createElement("defs",null,T.createElement("path",{id:j,d:S})),T.createElement("textPath",{xlinkHref:"#".concat(j)},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 p=nt(o,s,u+n,d),m=p.x,y=p.y;return{x:m,y,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 v=(l+u)/2,b=nt(o,s,v,d),w=b.x,x=b.y;return{x:w,y:x,textAnchor:"middle",verticalAnchor:"middle"}},FI=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,p=f>0?"end":"start",m=f>0?"start":"end",y=u>=0?1:-1,v=y*a,b=y>0?"end":"start",w=y>0?"start":"end";if(i==="top"){var x={x:s+u/2,y:l-f*a,textAnchor:"middle",verticalAnchor:p};return Qe(Qe({},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:m};return Qe(Qe({},A),n?{height:Math.max(n.y+n.height-(l+c),0),width:u}:{})}if(i==="left"){var g={x:s-v,y:l+c/2,textAnchor:b,verticalAnchor:"middle"};return Qe(Qe({},g),n?{width:Math.max(g.x-n.x,0),height:c}:{})}if(i==="right"){var O={x:s+u+v,y:l+c/2,textAnchor:w,verticalAnchor:"middle"};return Qe(Qe({},O),n?{width:Math.max(n.x+n.width-O.x,0),height:c}:{})}var S=n?{width:u,height:c}:{};return i==="insideLeft"?Qe({x:s+v,y:l+c/2,textAnchor:w,verticalAnchor:"middle"},S):i==="insideRight"?Qe({x:s+u-v,y:l+c/2,textAnchor:b,verticalAnchor:"middle"},S):i==="insideTop"?Qe({x:s+u/2,y:l+d,textAnchor:"middle",verticalAnchor:m},S):i==="insideBottom"?Qe({x:s+u/2,y:l+c-d,textAnchor:"middle",verticalAnchor:p},S):i==="insideTopLeft"?Qe({x:s+v,y:l+d,textAnchor:w,verticalAnchor:m},S):i==="insideTopRight"?Qe({x:s+u-v,y:l+d,textAnchor:b,verticalAnchor:m},S):i==="insideBottomLeft"?Qe({x:s+v,y:l+c-d,textAnchor:w,verticalAnchor:p},S):i==="insideBottomRight"?Qe({x:s+u-v,y:l+c-d,textAnchor:b,verticalAnchor:p},S):nn(i)&&(Z(i.x)||Er(i.x))&&(Z(i.y)||Er(i.y))?Qe({x:s+$r(i.x,u),y:l+$r(i.y,c),textAnchor:"end",verticalAnchor:"end"},S):Qe({x:s+u/2,y:l+c/2,textAnchor:"middle",verticalAnchor:"middle"},S)},WI=function(t){return"cx"in t&&Z(t.cx)};function it(e){var t=e.offset,r=t===void 0?5:t,n=$I(e,AI),a=Qe({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)&&!T.isValidElement(u)&&!pe(u))return null;if(T.isValidElement(u))return T.cloneElement(u,a);var p;if(pe(u)){if(p=T.createElement(u,a),T.isValidElement(p))return p}else p=II(a);var m=WI(i),y=de(a,!0);if(m&&(o==="insideStart"||o==="insideEnd"||o==="end"))return RI(a,p,y);var v=m?BI(a):FI(a);return T.createElement(co,Ha({className:me("recharts-label",f)},y,v,{breakAll:d}),p)}it.displayName="Label";var Em=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,p=t.top,m=t.left,y=t.width,v=t.height,b=t.clockWise,w=t.labelViewBox;if(w)return w;if(Z(y)&&Z(v)){if(Z(f)&&Z(d))return{x:f,y:d,width:y,height:v};if(Z(p)&&Z(m))return{x:p,y:m,width:y,height:v}}return Z(f)&&Z(d)?{x:f,y:d,width:0,height:0}:Z(r)&&Z(n)?{cx:r,cy:n,startAngle:i||a||0,endAngle:o||a||0,innerRadius:u||0,outerRadius:c||l||s||0,clockWise:b}:t.viewBox?t.viewBox:{}},zI=function(t,r){return t?t===!0?T.createElement(it,{key:"label-implicit",viewBox:r}):Xe(t)?T.createElement(it,{key:"label-implicit",viewBox:r,value:t}):T.isValidElement(t)?t.type===it?T.cloneElement(t,{key:"label-implicit",viewBox:r}):T.createElement(it,{key:"label-implicit",content:t,viewBox:r}):pe(t)?T.createElement(it,{key:"label-implicit",content:t,viewBox:r}):nn(t)?T.createElement(it,Ha({viewBox:r},t,{key:"label-implicit"})):null:null},UI=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=Em(t),o=dt(a,it).map(function(l,u){return T.cloneElement(l,{viewBox:r||i,key:"label-".concat(u)})});if(!n)return o;var s=zI(t.label,r||i);return[s].concat(PI(o))};it.parseViewBox=Em,it.renderCallByParent=UI;function GI(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var VI=GI;const KI=$e(VI);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)}var qI=["valueAccessor"],HI=["data","dataKey","clockWise","id","textBreakAll"];function YI(e){return QI(e)||JI(e)||ZI(e)||XI()}function XI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
206
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZI(e,t){if(e){if(typeof e=="string")return Qu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qu(e,t)}}function JI(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function QI(e){if(Array.isArray(e))return Qu(e)}function Qu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Fo(){return Fo=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},Fo.apply(this,arguments)}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 $m(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){e6(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 e6(e,t,r){return t=t6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t6(e){var t=r6(e,"string");return Ya(t)=="symbol"?t:t+""}function r6(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 km(e,t){if(e==null)return{};var r=n6(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 n6(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 a6=function(t){return Array.isArray(t.value)?KI(t.value):t.value};function Vt(e){var t=e.valueAccessor,r=t===void 0?a6:t,n=km(e,qI),a=n.data,i=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,u=km(n,HI);return!a||!a.length?null:T.createElement(xe,{className:"recharts-label-list"},a.map(function(c,f){var d=fe(i)?r(c,f):Je(c&&c.payload,i),p=fe(s)?{}:{id:"".concat(s,"-").concat(f)};return T.createElement(it,Fo({},de(c,!0),u,p,{parentViewBox:c.parentViewBox,value:d,textBreakAll:l,viewBox:it.parseViewBox(fe(o)?c:$m($m({},c),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}Vt.displayName="LabelList";function i6(e,t){return e?e===!0?T.createElement(Vt,{key:"labelList-implicit",data:t}):T.isValidElement(e)||pe(e)?T.createElement(Vt,{key:"labelList-implicit",data:t,content:e}):nn(e)?T.createElement(Vt,Fo({data:t},e,{key:"labelList-implicit"})):null:null}function o6(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=dt(n,Vt).map(function(o,s){return T.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return a;var i=i6(e.label,t);return[i].concat(YI(a))}Vt.renderCallByParent=o6;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 ec(){return ec=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},ec.apply(this,arguments)}function Mm(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 Nm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mm(Object(r),!0).forEach(function(n){s6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function s6(e,t,r){return t=l6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l6(e){var t=u6(e,"string");return Xa(t)=="symbol"?t:t+""}function u6(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 c6=function(t,r){var n=$t(r-t),a=Math.min(Math.abs(r-t),359.999);return n*a},Wo=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)/Bo,d=u?i:i+o*f,p=nt(r,n,c,d),m=nt(r,n,a,d),y=u?i-o*f:i,v=nt(r,n,c*Math.cos(f*Bo),y);return{center:p,circleTangency:m,lineTangency:v,theta:f}},Dm=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.startAngle,s=t.endAngle,l=c6(o,s),u=o+l,c=nt(r,n,i,o),f=nt(r,n,i,u),d="M ".concat(c.x,",").concat(c.y,`
147
207
  A `).concat(i,",").concat(i,`,0,
148
208
  `).concat(+(Math.abs(l)>180),",").concat(+(o>u),`,
149
209
  `).concat(f.x,",").concat(f.y,`
150
- `);if(a>0){var p=rt(r,n,a,o),v=rt(r,n,a,u);d+="L ".concat(v.x,",").concat(v.y,`
210
+ `);if(a>0){var p=nt(r,n,a,o),m=nt(r,n,a,u);d+="L ".concat(m.x,",").concat(m.y,`
151
211
  A `).concat(a,",").concat(a,`,0,
152
212
  `).concat(+(Math.abs(l)>180),",").concat(+(o<=u),`,
153
- `).concat(p.x,",").concat(p.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},GL=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=Ct(c-u),d=Bo({cx:r,cy:n,radius:i,angle:u,sign:f,cornerRadius:o,cornerIsExternal:l}),p=d.circleTangency,v=d.lineTangency,y=d.theta,h=Bo({cx:r,cy:n,radius:i,angle:c,sign:-f,cornerRadius:o,cornerIsExternal:l}),b=h.circleTangency,S=h.lineTangency,x=h.theta,T=l?Math.abs(u-c):Math.abs(u-c)-y-x;if(T<0)return s?"M ".concat(v.x,",").concat(v.y,`
213
+ `).concat(p.x,",").concat(p.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},f6=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=Wo({cx:r,cy:n,radius:i,angle:u,sign:f,cornerRadius:o,cornerIsExternal:l}),p=d.circleTangency,m=d.lineTangency,y=d.theta,v=Wo({cx:r,cy:n,radius:i,angle:c,sign:-f,cornerRadius:o,cornerIsExternal:l}),b=v.circleTangency,w=v.lineTangency,x=v.theta,A=l?Math.abs(u-c):Math.abs(u-c)-y-x;if(A<0)return s?"M ".concat(m.x,",").concat(m.y,`
154
214
  a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
155
215
  a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
156
- `):Py({cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:u,endAngle:c});var m="M ".concat(v.x,",").concat(v.y,`
216
+ `):Dm({cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:u,endAngle:c});var g="M ".concat(m.x,",").concat(m.y,`
157
217
  A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(p.x,",").concat(p.y,`
158
- A`).concat(i,",").concat(i,",0,").concat(+(T>180),",").concat(+(f<0),",").concat(b.x,",").concat(b.y,`
159
- A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(S.x,",").concat(S.y,`
160
- `);if(a>0){var w=Bo({cx:r,cy:n,radius:a,angle:u,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),O=w.circleTangency,P=w.lineTangency,j=w.theta,M=Bo({cx:r,cy:n,radius:a,angle:c,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),_=M.circleTangency,$=M.lineTangency,R=M.theta,k=l?Math.abs(u-c):Math.abs(u-c)-j-R;if(k<0&&o===0)return"".concat(m,"L").concat(r,",").concat(n,"Z");m+="L".concat($.x,",").concat($.y,`
161
- A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(_.x,",").concat(_.y,`
162
- A`).concat(a,",").concat(a,",0,").concat(+(k>180),",").concat(+(f>0),",").concat(O.x,",").concat(O.y,`
163
- A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(P.x,",").concat(P.y,"Z")}else m+="L".concat(r,",").concat(n,"Z");return m},KL={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},_y=function(t){var r=Ty(Ty({},KL),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 p=ye("recharts-sector",d),v=o-i,y=Cr(s,v,0,!0),h;return y>0&&Math.abs(c-f)<360?h=GL({cx:n,cy:a,innerRadius:i,outerRadius:o,cornerRadius:Math.min(y,v/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:c,endAngle:f}):h=Py({cx:n,cy:a,innerRadius:i,outerRadius:o,startAngle:c,endAngle:f}),A.createElement("path",Xu({},de(r,!0),{className:p,d:h,role:"img"}))};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 Zu(){return Zu=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},Zu.apply(this,arguments)}function Ey(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 jy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ey(Object(r),!0).forEach(function(n){VL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ey(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VL(e,t,r){return t=qL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qL(e){var t=HL(e,"string");return Ya(t)=="symbol"?t:t+""}function HL(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)}var $y={curveBasisClosed:VS,curveBasisOpen:qS,curveBasis:KS,curveBumpX:CS,curveBumpY:kS,curveLinearClosed:HS,curveLinear:Fi,curveMonotoneX:YS,curveMonotoneY:XS,curveNatural:ZS,curveStep:JS,curveStepAfter:eA,curveStepBefore:QS},Fo=function(t){return t.x===+t.x&&t.y===+t.y},Xa=function(t){return t.x},Za=function(t){return t.y},YL=function(t,r){if(pe(t))return t;var n="curve".concat(Ii(t));return(n==="curveMonotone"||n==="curveBump")&&r?$y["".concat(n).concat(r==="vertical"?"Y":"X")]:$y[n]||Fi},XL=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=YL(n,s),f=u?i.filter(function(y){return Fo(y)}):i,d;if(Array.isArray(o)){var p=u?o.filter(function(y){return Fo(y)}):o,v=f.map(function(y,h){return jy(jy({},y),{},{base:p[h]})});return s==="vertical"?d=Wi().y(Za).x1(Xa).x0(function(y){return y.base.x}):d=Wi().x(Xa).y1(Za).y0(function(y){return y.base.y}),d.defined(Fo).curve(c),d(v)}return s==="vertical"&&Z(o)?d=Wi().y(Za).x1(Xa).x0(o):Z(o)?d=Wi().x(Xa).y1(Za).y0(o):d=vd().x(Xa).y(Za),d.defined(Fo).curve(c),d(f)},Gr=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?XL(t):a;return xt.createElement("path",Zu({},de(t,!1),Di(t),{className:ye("recharts-curve",r),d:o,ref:i}))},Ju={exports:{}},Wo={exports:{}},Se={};/** @license React v16.13.1
218
+ A`).concat(i,",").concat(i,",0,").concat(+(A>180),",").concat(+(f<0),",").concat(b.x,",").concat(b.y,`
219
+ A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(w.x,",").concat(w.y,`
220
+ `);if(a>0){var O=Wo({cx:r,cy:n,radius:a,angle:u,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),S=O.circleTangency,j=O.lineTangency,C=O.theta,M=Wo({cx:r,cy:n,radius:a,angle:c,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),P=M.circleTangency,_=M.lineTangency,I=M.theta,$=l?Math.abs(u-c):Math.abs(u-c)-C-I;if($<0&&o===0)return"".concat(g,"L").concat(r,",").concat(n,"Z");g+="L".concat(_.x,",").concat(_.y,`
221
+ A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(P.x,",").concat(P.y,`
222
+ A`).concat(a,",").concat(a,",0,").concat(+($>180),",").concat(+(f>0),",").concat(S.x,",").concat(S.y,`
223
+ A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(j.x,",").concat(j.y,"Z")}else g+="L".concat(r,",").concat(n,"Z");return g},d6={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Im=function(t){var r=Nm(Nm({},d6),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 p=me("recharts-sector",d),m=o-i,y=$r(s,m,0,!0),v;return y>0&&Math.abs(c-f)<360?v=f6({cx:n,cy:a,innerRadius:i,outerRadius:o,cornerRadius:Math.min(y,m/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:c,endAngle:f}):v=Dm({cx:n,cy:a,innerRadius:i,outerRadius:o,startAngle:c,endAngle:f}),T.createElement("path",ec({},de(r,!0),{className:p,d:v,role:"img"}))};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 tc(){return tc=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},tc.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 Rm(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){p6(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 p6(e,t,r){return t=h6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h6(e){var t=v6(e,"string");return Za(t)=="symbol"?t:t+""}function v6(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 Bm={curveBasisClosed:pT,curveBasisOpen:hT,curveBasis:dT,curveBumpX:JS,curveBumpY:QS,curveLinearClosed:vT,curveLinear:zi,curveMonotoneX:mT,curveMonotoneY:yT,curveNatural:gT,curveStep:bT,curveStepAfter:wT,curveStepBefore:xT},zo=function(t){return t.x===+t.x&&t.y===+t.y},Ja=function(t){return t.x},Qa=function(t){return t.y},m6=function(t,r){if(pe(t))return t;var n="curve".concat(Ri(t));return(n==="curveMonotone"||n==="curveBump")&&r?Bm["".concat(n).concat(r==="vertical"?"Y":"X")]:Bm[n]||zi},y6=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=m6(n,s),f=u?i.filter(function(y){return zo(y)}):i,d;if(Array.isArray(o)){var p=u?o.filter(function(y){return zo(y)}):o,m=f.map(function(y,v){return Rm(Rm({},y),{},{base:p[v]})});return s==="vertical"?d=Ui().y(Qa).x1(Ja).x0(function(y){return y.base.x}):d=Ui().x(Ja).y1(Qa).y0(function(y){return y.base.y}),d.defined(zo).curve(c),d(m)}return s==="vertical"&&Z(o)?d=Ui().y(Qa).x1(Ja).x0(o):Z(o)?d=Ui().x(Ja).y1(Qa).y0(o):d=Td().x(Ja).y(Qa),d.defined(zo).curve(c),d(f)},Gr=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?y6(t):a;return xt.createElement("path",tc({},de(t,!1),Li(t),{className:me("recharts-curve",r),d:o,ref:i}))},rc={exports:{}},Uo={exports:{}},Se={};/** @license React v16.13.1
164
224
  * react-is.production.min.js
165
225
  *
166
226
  * Copyright (c) Facebook, Inc. and its affiliates.
167
227
  *
168
228
  * This source code is licensed under the MIT license found in the
169
229
  * LICENSE file in the root directory of this source tree.
170
- */var Cy;function ZL(){if(Cy)return Se;Cy=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,p=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,S=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 v:case p:case o:return m;default:return w}}case r:return w}}}function T(m){return x(m)===u}return Se.AsyncMode=l,Se.ConcurrentMode=u,Se.ContextConsumer=s,Se.ContextProvider=o,Se.Element=t,Se.ForwardRef=c,Se.Fragment=n,Se.Lazy=v,Se.Memo=p,Se.Portal=r,Se.Profiler=i,Se.StrictMode=a,Se.Suspense=f,Se.isAsyncMode=function(m){return T(m)||x(m)===l},Se.isConcurrentMode=T,Se.isContextConsumer=function(m){return x(m)===s},Se.isContextProvider=function(m){return x(m)===o},Se.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},Se.isForwardRef=function(m){return x(m)===c},Se.isFragment=function(m){return x(m)===n},Se.isLazy=function(m){return x(m)===v},Se.isMemo=function(m){return x(m)===p},Se.isPortal=function(m){return x(m)===r},Se.isProfiler=function(m){return x(m)===i},Se.isStrictMode=function(m){return x(m)===a},Se.isSuspense=function(m){return x(m)===f},Se.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===v||m.$$typeof===p||m.$$typeof===o||m.$$typeof===s||m.$$typeof===c||m.$$typeof===h||m.$$typeof===b||m.$$typeof===S||m.$$typeof===y)},Se.typeOf=x,Se}var Ae={};/** @license React v16.13.1
230
+ */var Fm;function g6(){if(Fm)return Se;Fm=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,p=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function x(g){if(typeof g=="object"&&g!==null){var O=g.$$typeof;switch(O){case t:switch(g=g.type,g){case l:case u:case n:case i:case a:case f:return g;default:switch(g=g&&g.$$typeof,g){case s:case c:case m:case p:case o:return g;default:return O}}case r:return O}}}function A(g){return x(g)===u}return Se.AsyncMode=l,Se.ConcurrentMode=u,Se.ContextConsumer=s,Se.ContextProvider=o,Se.Element=t,Se.ForwardRef=c,Se.Fragment=n,Se.Lazy=m,Se.Memo=p,Se.Portal=r,Se.Profiler=i,Se.StrictMode=a,Se.Suspense=f,Se.isAsyncMode=function(g){return A(g)||x(g)===l},Se.isConcurrentMode=A,Se.isContextConsumer=function(g){return x(g)===s},Se.isContextProvider=function(g){return x(g)===o},Se.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===t},Se.isForwardRef=function(g){return x(g)===c},Se.isFragment=function(g){return x(g)===n},Se.isLazy=function(g){return x(g)===m},Se.isMemo=function(g){return x(g)===p},Se.isPortal=function(g){return x(g)===r},Se.isProfiler=function(g){return x(g)===i},Se.isStrictMode=function(g){return x(g)===a},Se.isSuspense=function(g){return x(g)===f},Se.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===n||g===u||g===i||g===a||g===f||g===d||typeof g=="object"&&g!==null&&(g.$$typeof===m||g.$$typeof===p||g.$$typeof===o||g.$$typeof===s||g.$$typeof===c||g.$$typeof===v||g.$$typeof===b||g.$$typeof===w||g.$$typeof===y)},Se.typeOf=x,Se}var Te={};/** @license React v16.13.1
171
231
  * react-is.development.js
172
232
  *
173
233
  * Copyright (c) Facebook, Inc. and its affiliates.
174
234
  *
175
235
  * This source code is licensed under the MIT license found in the
176
236
  * LICENSE file in the root directory of this source tree.
177
- */var ky;function JL(){return ky||(ky=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,p=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function x(I){return typeof I=="string"||typeof I=="function"||I===n||I===u||I===i||I===a||I===f||I===d||typeof I=="object"&&I!==null&&(I.$$typeof===v||I.$$typeof===p||I.$$typeof===o||I.$$typeof===s||I.$$typeof===c||I.$$typeof===h||I.$$typeof===b||I.$$typeof===S||I.$$typeof===y)}function T(I){if(typeof I=="object"&&I!==null){var ie=I.$$typeof;switch(ie){case t:var q=I.type;switch(q){case l:case u:case n:case i:case a:case f:return q;default:var se=q&&q.$$typeof;switch(se){case s:case c:case v:case p:case o:return se;default:return ie}}case r:return ie}}}var m=l,w=u,O=s,P=o,j=t,M=c,_=n,$=v,R=p,k=r,D=i,C=a,B=f,U=!1;function G(I){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.")),E(I)||T(I)===l}function E(I){return T(I)===u}function L(I){return T(I)===s}function F(I){return T(I)===o}function W(I){return typeof I=="object"&&I!==null&&I.$$typeof===t}function K(I){return T(I)===c}function X(I){return T(I)===n}function Q(I){return T(I)===v}function ae(I){return T(I)===p}function te(I){return T(I)===r}function V(I){return T(I)===i}function Y(I){return T(I)===a}function J(I){return T(I)===f}Ae.AsyncMode=m,Ae.ConcurrentMode=w,Ae.ContextConsumer=O,Ae.ContextProvider=P,Ae.Element=j,Ae.ForwardRef=M,Ae.Fragment=_,Ae.Lazy=$,Ae.Memo=R,Ae.Portal=k,Ae.Profiler=D,Ae.StrictMode=C,Ae.Suspense=B,Ae.isAsyncMode=G,Ae.isConcurrentMode=E,Ae.isContextConsumer=L,Ae.isContextProvider=F,Ae.isElement=W,Ae.isForwardRef=K,Ae.isFragment=X,Ae.isLazy=Q,Ae.isMemo=ae,Ae.isPortal=te,Ae.isProfiler=V,Ae.isStrictMode=Y,Ae.isSuspense=J,Ae.isValidElementType=x,Ae.typeOf=T}()),Ae}var My;function Ny(){return My||(My=1,process.env.NODE_ENV==="production"?Wo.exports=ZL():Wo.exports=JL()),Wo.exports}/*
237
+ */var Wm;function b6(){return Wm||(Wm=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,p=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function x(L){return typeof L=="string"||typeof L=="function"||L===n||L===u||L===i||L===a||L===f||L===d||typeof L=="object"&&L!==null&&(L.$$typeof===m||L.$$typeof===p||L.$$typeof===o||L.$$typeof===s||L.$$typeof===c||L.$$typeof===v||L.$$typeof===b||L.$$typeof===w||L.$$typeof===y)}function A(L){if(typeof L=="object"&&L!==null){var ie=L.$$typeof;switch(ie){case t:var q=L.type;switch(q){case l:case u:case n:case i:case a:case f:return q;default:var ue=q&&q.$$typeof;switch(ue){case s:case c:case m:case p:case o:return ue;default:return ie}}case r:return ie}}}var g=l,O=u,S=s,j=o,C=t,M=c,P=n,_=m,I=p,$=r,D=i,k=a,B=f,z=!1;function G(L){return z||(z=!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.")),E(L)||A(L)===l}function E(L){return A(L)===u}function R(L){return A(L)===s}function F(L){return A(L)===o}function W(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function V(L){return A(L)===c}function X(L){return A(L)===n}function Q(L){return A(L)===m}function ae(L){return A(L)===p}function te(L){return A(L)===r}function K(L){return A(L)===i}function Y(L){return A(L)===a}function J(L){return A(L)===f}Te.AsyncMode=g,Te.ConcurrentMode=O,Te.ContextConsumer=S,Te.ContextProvider=j,Te.Element=C,Te.ForwardRef=M,Te.Fragment=P,Te.Lazy=_,Te.Memo=I,Te.Portal=$,Te.Profiler=D,Te.StrictMode=k,Te.Suspense=B,Te.isAsyncMode=G,Te.isConcurrentMode=E,Te.isContextConsumer=R,Te.isContextProvider=F,Te.isElement=W,Te.isForwardRef=V,Te.isFragment=X,Te.isLazy=Q,Te.isMemo=ae,Te.isPortal=te,Te.isProfiler=K,Te.isStrictMode=Y,Te.isSuspense=J,Te.isValidElementType=x,Te.typeOf=A}()),Te}var zm;function Um(){return zm||(zm=1,process.env.NODE_ENV==="production"?Uo.exports=g6():Uo.exports=b6()),Uo.exports}/*
178
238
  object-assign
179
239
  (c) Sindre Sorhus
180
240
  @license MIT
181
- */var Qu,Dy;function QL(){if(Dy)return Qu;Dy=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,Iy;function tc(){if(Iy)return ec;Iy=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ec=e,ec}var rc,Ly;function Ry(){return Ly||(Ly=1,rc=Function.call.bind(Object.prototype.hasOwnProperty)),rc}var nc,By;function eR(){if(By)return nc;By=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=tc(),r={},n=Ry();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(v){f=v}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 p=u?u():"";e("Failed "+s+" type: "+f.message+(p??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},nc=a,nc}var ac,Fy;function tR(){if(Fy)return ac;Fy=1;var e=Ny(),t=QL(),r=tc(),n=Ry(),a=eR(),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(E){var L=E&&(u&&E[u]||E[c]);if(typeof L=="function")return L}var d="<<anonymous>>",p={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:S(),arrayOf:x,element:T(),elementType:m(),instanceOf:w,node:M(),objectOf:P,oneOf:O,oneOfType:j,shape:$,exact:R};function v(E,L){return E===L?E!==0||1/E===1/L:E!==E&&L!==L}function y(E,L){this.message=E,this.data=L&&typeof L=="object"?L:{},this.stack=""}y.prototype=Error.prototype;function h(E){if(process.env.NODE_ENV!=="production")var L={},F=0;function W(X,Q,ae,te,V,Y,J){if(te=te||d,Y=Y||ae,J!==r){if(l){var I=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 I.name="Invariant Violation",I}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ie=te+":"+ae;!L[ie]&&F<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."),L[ie]=!0,F++)}}return Q[ae]==null?X?Q[ae]===null?new y("The "+V+" `"+Y+"` is marked as required "+("in `"+te+"`, but its value is `null`.")):new y("The "+V+" `"+Y+"` is marked as required in "+("`"+te+"`, but its value is `undefined`.")):null:E(Q,ae,te,V,Y)}var K=W.bind(null,!1);return K.isRequired=W.bind(null,!0),K}function b(E){function L(F,W,K,X,Q,ae){var te=F[W],V=C(te);if(V!==E){var Y=B(te);return new y("Invalid "+X+" `"+Q+"` of type "+("`"+Y+"` supplied to `"+K+"`, expected ")+("`"+E+"`."),{expectedType:E})}return null}return h(L)}function S(){return h(o)}function x(E){function L(F,W,K,X,Q){if(typeof E!="function")return new y("Property `"+Q+"` of component `"+K+"` has invalid PropType notation inside arrayOf.");var ae=F[W];if(!Array.isArray(ae)){var te=C(ae);return new y("Invalid "+X+" `"+Q+"` of type "+("`"+te+"` supplied to `"+K+"`, expected an array."))}for(var V=0;V<ae.length;V++){var Y=E(ae,V,K,X,Q+"["+V+"]",r);if(Y instanceof Error)return Y}return null}return h(L)}function T(){function E(L,F,W,K,X){var Q=L[F];if(!s(Q)){var ae=C(Q);return new y("Invalid "+K+" `"+X+"` of type "+("`"+ae+"` supplied to `"+W+"`, expected a single ReactElement."))}return null}return h(E)}function m(){function E(L,F,W,K,X){var Q=L[F];if(!e.isValidElementType(Q)){var ae=C(Q);return new y("Invalid "+K+" `"+X+"` of type "+("`"+ae+"` supplied to `"+W+"`, expected a single ReactElement type."))}return null}return h(E)}function w(E){function L(F,W,K,X,Q){if(!(F[W]instanceof E)){var ae=E.name||d,te=G(F[W]);return new y("Invalid "+X+" `"+Q+"` of type "+("`"+te+"` supplied to `"+K+"`, expected ")+("instance of `"+ae+"`."))}return null}return h(L)}function O(E){if(!Array.isArray(E))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 L(F,W,K,X,Q){for(var ae=F[W],te=0;te<E.length;te++)if(v(ae,E[te]))return null;var V=JSON.stringify(E,function(J,I){var ie=B(I);return ie==="symbol"?String(I):I});return new y("Invalid "+X+" `"+Q+"` of value `"+String(ae)+"` "+("supplied to `"+K+"`, expected one of "+V+"."))}return h(L)}function P(E){function L(F,W,K,X,Q){if(typeof E!="function")return new y("Property `"+Q+"` of component `"+K+"` has invalid PropType notation inside objectOf.");var ae=F[W],te=C(ae);if(te!=="object")return new y("Invalid "+X+" `"+Q+"` of type "+("`"+te+"` supplied to `"+K+"`, expected an object."));for(var V in ae)if(n(ae,V)){var Y=E(ae,V,K,X,Q+"."+V,r);if(Y instanceof Error)return Y}return null}return h(L)}function j(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var L=0;L<E.length;L++){var F=E[L];if(typeof F!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(F)+" at index "+L+"."),o}function W(K,X,Q,ae,te){for(var V=[],Y=0;Y<E.length;Y++){var J=E[Y],I=J(K,X,Q,ae,te,r);if(I==null)return null;I.data&&n(I.data,"expectedType")&&V.push(I.data.expectedType)}var ie=V.length>0?", expected one of type ["+V.join(", ")+"]":"";return new y("Invalid "+ae+" `"+te+"` supplied to "+("`"+Q+"`"+ie+"."))}return h(W)}function M(){function E(L,F,W,K,X){return k(L[F])?null:new y("Invalid "+K+" `"+X+"` supplied to "+("`"+W+"`, expected a ReactNode."))}return h(E)}function _(E,L,F,W,K){return new y((E||"React class")+": "+L+" type `"+F+"."+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+K+"`.")}function $(E){function L(F,W,K,X,Q){var ae=F[W],te=C(ae);if(te!=="object")return new y("Invalid "+X+" `"+Q+"` of type `"+te+"` "+("supplied to `"+K+"`, expected `object`."));for(var V in E){var Y=E[V];if(typeof Y!="function")return _(K,X,Q,V,B(Y));var J=Y(ae,V,K,X,Q+"."+V,r);if(J)return J}return null}return h(L)}function R(E){function L(F,W,K,X,Q){var ae=F[W],te=C(ae);if(te!=="object")return new y("Invalid "+X+" `"+Q+"` of type `"+te+"` "+("supplied to `"+K+"`, expected `object`."));var V=t({},F[W],E);for(var Y in V){var J=E[Y];if(n(E,Y)&&typeof J!="function")return _(K,X,Q,Y,B(J));if(!J)return new y("Invalid "+X+" `"+Q+"` key `"+Y+"` supplied to `"+K+"`.\nBad object: "+JSON.stringify(F[W],null," ")+`
182
- Valid keys: `+JSON.stringify(Object.keys(E),null," "));var I=J(ae,Y,K,X,Q+"."+Y,r);if(I)return I}return null}return h(L)}function k(E){switch(typeof E){case"number":case"string":case"undefined":return!0;case"boolean":return!E;case"object":if(Array.isArray(E))return E.every(k);if(E===null||s(E))return!0;var L=f(E);if(L){var F=L.call(E),W;if(L!==E.entries){for(;!(W=F.next()).done;)if(!k(W.value))return!1}else for(;!(W=F.next()).done;){var K=W.value;if(K&&!k(K[1]))return!1}}else return!1;return!0;default:return!1}}function D(E,L){return E==="symbol"?!0:L?L["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&L instanceof Symbol:!1}function C(E){var L=typeof E;return Array.isArray(E)?"array":E instanceof RegExp?"object":D(L,E)?"symbol":L}function B(E){if(typeof E>"u"||E===null)return""+E;var L=C(E);if(L==="object"){if(E instanceof Date)return"date";if(E instanceof RegExp)return"regexp"}return L}function U(E){var L=B(E);switch(L){case"array":case"object":return"an "+L;case"boolean":case"date":case"regexp":return"a "+L;default:return L}}function G(E){return!E.constructor||!E.constructor.name?d:E.constructor.name}return p.checkPropTypes=a,p.resetWarningCache=a.resetWarningCache,p.PropTypes=p,p},ac}var ic,Wy;function rR(){if(Wy)return ic;Wy=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 nR=Ny(),aR=!0;Ju.exports=tR()(nR.isElement,aR)}else Ju.exports=rR()();var iR=Ju.exports;const Te=Ce(iR);var oR=Object.getOwnPropertyNames,sR=Object.getOwnPropertySymbols,lR=Object.prototype.hasOwnProperty;function Uy(e,t){return function(n,a,i){return e(n,a,i)&&t(n,a,i)}}function Uo(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 zy(e){return oR(e).concat(sR(e))}var uR=Object.hasOwn||function(e,t){return lR.call(e,t)};function Kr(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var cR="__v",fR="__o",dR="_owner",Gy=Object.getOwnPropertyDescriptor,Ky=Object.keys;function pR(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 hR(e,t){return Kr(e.getTime(),t.getTime())}function vR(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function yR(e,t){return e===t}function Vy(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,p=s.value;if(r.equals(d[0],p[0],l,f,e,t,r)&&r.equals(d[1],p[1],d[0],p[0],e,t,r)){c=a[f]=!0;break}f++}if(!c)return!1;l++}return!0}var mR=Kr;function gR(e,t,r){var n=Ky(e),a=n.length;if(Ky(t).length!==a)return!1;for(;a-- >0;)if(!Hy(e,t,r,n[a]))return!1;return!0}function Ja(e,t,r){var n=zy(e),a=n.length;if(zy(t).length!==a)return!1;for(var i,o,s;a-- >0;)if(i=n[a],!Hy(e,t,r,i)||(o=Gy(e,i),s=Gy(t,i),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function bR(e,t){return Kr(e.valueOf(),t.valueOf())}function xR(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 wR(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 OR(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 Hy(e,t,r,n){return(n===dR||n===fR||n===cR)&&(e.$$typeof||t.$$typeof)?!0:uR(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var SR="[object Arguments]",AR="[object Boolean]",TR="[object Date]",PR="[object Error]",_R="[object Map]",ER="[object Number]",jR="[object Object]",$R="[object RegExp]",CR="[object Set]",kR="[object String]",MR="[object URL]",NR=Array.isArray,Yy=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,Xy=Object.assign,DR=Object.prototype.toString.call.bind(Object.prototype.toString);function IR(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(v,y,h){if(v===y)return!0;if(v==null||y==null)return!1;var b=typeof v;if(b!==typeof y)return!1;if(b!=="object")return b==="number"?o(v,y,h):b==="function"?a(v,y,h):!1;var S=v.constructor;if(S!==y.constructor)return!1;if(S===Object)return s(v,y,h);if(NR(v))return t(v,y,h);if(Yy!=null&&Yy(v))return f(v,y,h);if(S===Date)return r(v,y,h);if(S===RegExp)return u(v,y,h);if(S===Map)return i(v,y,h);if(S===Set)return c(v,y,h);var x=DR(v);return x===TR?r(v,y,h):x===$R?u(v,y,h):x===_R?i(v,y,h):x===CR?c(v,y,h):x===jR?typeof v.then!="function"&&typeof y.then!="function"&&s(v,y,h):x===MR?d(v,y,h):x===PR?n(v,y,h):x===SR?s(v,y,h):x===AR||x===ER||x===kR?l(v,y,h):!1}}function LR(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,a={areArraysEqual:n?Ja:pR,areDatesEqual:hR,areErrorsEqual:vR,areFunctionsEqual:yR,areMapsEqual:n?Uy(Vy,Ja):Vy,areNumbersEqual:mR,areObjectsEqual:n?Ja:gR,arePrimitiveWrappersEqual:bR,areRegExpsEqual:xR,areSetsEqual:n?Uy(qy,Ja):qy,areTypedArraysEqual:n?Ja:wR,areUrlsEqual:OR};if(r&&(a=Xy({},a,r(a))),t){var i=Uo(a.areArraysEqual),o=Uo(a.areMapsEqual),s=Uo(a.areObjectsEqual),l=Uo(a.areSetsEqual);a=Xy({},a,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:l})}return a}function RR(e){return function(t,r,n,a,i,o,s){return e(t,r,s)}}function BR(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,p=c.meta;return r(l,u,{cache:d,equals:a,meta:p,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 FR=wr();wr({strict:!0}),wr({circular:!0}),wr({circular:!0,strict:!0}),wr({createInternalComparator:function(){return Kr}}),wr({strict:!0,createInternalComparator:function(){return Kr}}),wr({circular:!0,createInternalComparator:function(){return Kr}}),wr({circular:!0,createInternalComparator:function(){return Kr},strict:!0});function wr(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=LR(e),l=IR(s),u=n?n(l):RR(l);return BR({circular:r,comparator:l,createState:a,equals:u,strict:o})}function WR(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function Zy(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):WR(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 UR(e){return VR(e)||KR(e)||GR(e)||zR()}function zR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
183
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GR(e,t){if(e){if(typeof e=="string")return Jy(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jy(e,t)}}function Jy(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function KR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function VR(e){if(Array.isArray(e))return e}function qR(){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=UR(o),l=s[0],u=s.slice(1);if(typeof l=="number"){Zy(a.bind(null,u),l);return}a(l),Zy(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 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 Qy(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 em(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qy(Object(r),!0).forEach(function(n){tm(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tm(e,t,r){return t=HR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HR(e){var t=YR(e,"string");return Qa(t)==="symbol"?t:String(t)}function YR(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)}var XR=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,a){return n.filter(function(i){return a.includes(i)})})},ZR=function(t){return t},JR=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},ei=function(t,r){return Object.keys(r).reduce(function(n,a){return em(em({},n),{},tm({},a,t(a,r[a])))},{})},rm=function(t,r,n){return t.map(function(a){return"".concat(JR(a)," ").concat(r,"ms ").concat(n)}).join(",")},QR=process.env.NODE_ENV!=="production",zo=function(t,r,n,a,i,o,s,l){if(QR&&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 e3(e,t){return n3(e)||r3(e,t)||nm(e,t)||t3()}function t3(){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 r3(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 n3(e){if(Array.isArray(e))return e}function a3(e){return s3(e)||o3(e)||nm(e)||i3()}function i3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
185
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nm(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 o3(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function s3(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 Go=1e-4,am=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},im=function(t,r){return t.map(function(n,a){return n*Math.pow(r,a)}).reduce(function(n,a){return n+a})},om=function(t,r){return function(n){var a=am(t,r);return im(a,n)}},l3=function(t,r){return function(n){var a=am(t,r),i=[].concat(a3(a.map(function(o,s){return o*s}).slice(1)),[0]);return im(i,n)}},sm=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(h){return parseFloat(h)}),c=e3(u,4);a=c[0],i=c[1],o=c[2],s=c[3]}else zo(!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)}}zo([a,o,i,s].every(function(h){return typeof h=="number"&&h>=0&&h<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",r);var f=om(a,o),d=om(i,s),p=l3(a,o),v=function(b){return b>1?1:b<0?0:b},y=function(b){for(var S=b>1?1:b,x=S,T=0;T<8;++T){var m=f(x)-S,w=p(x);if(Math.abs(m-S)<Go||w<Go)return d(x);x=v(x-m/w)}return d(x)};return y.isStepper=!1,y},u3=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 p=-(c-f)*n,v=d*i,y=d+(p-v)*s/1e3,h=d*s/1e3+c;return Math.abs(h-f)<Go&&Math.abs(y)<Go?[f,0]:[h,y]};return l.isStepper=!0,l.dt=s,l},c3=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 sm(a);case"spring":return u3();default:if(a.split("(")[0]==="cubic-bezier")return sm(a);zo(!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:(zo(!1,"[configEasing]: first argument type should be function or string, instead received %s",r),null)};function ti(e){"@babel/helpers - typeof";return ti=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ti(e)}function lm(e){return p3(e)||d3(e)||cm(e)||f3()}function f3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
186
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d3(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function p3(e){if(Array.isArray(e))return uc(e)}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 nt(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){lc(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 lc(e,t,r){return t=h3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h3(e){var t=v3(e,"string");return ti(t)==="symbol"?t:String(t)}function v3(e,t){if(ti(e)!=="object"||e===null)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 y3(e,t){return b3(e)||g3(e,t)||cm(e,t)||m3()}function m3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
187
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cm(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 g3(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 b3(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},x3=function e(t,r,n){var a=ei(function(i,o){if(cc(o)){var s=t(o.from,o.to,o.velocity),l=y3(s,2),u=l[0],c=l[1];return nt(nt({},o),{},{from:u,velocity:c})}return o},r);return n<1?ei(function(i,o){return cc(o)?nt(nt({},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 w3=function(e,t,r,n,a){var i=XR(e,t),o=i.reduce(function(h,b){return nt(nt({},h),{},lc({},b,[e[b],t[b]]))},{}),s=i.reduce(function(h,b){return nt(nt({},h),{},lc({},b,{from:e[b],velocity:0,to:t[b]}))},{}),l=-1,u,c,f=function(){return null},d=function(){return ei(function(b,S){return S.from},s)},p=function(){return!Object.values(s).filter(cc).length},v=function(b){u||(u=b);var S=b-u,x=S/r.dt;s=x3(r,s,x),a(nt(nt(nt({},e),t),d())),u=b,p()||(l=requestAnimationFrame(f))},y=function(b){c||(c=b);var S=(b-c)/n,x=ei(function(m,w){return Ko.apply(void 0,lm(w).concat([r(S)]))},o);if(a(nt(nt(nt({},e),t),x)),S<1)l=requestAnimationFrame(f);else{var T=ei(function(m,w){return Ko.apply(void 0,lm(w).concat([r(1)]))},o);a(nt(nt(nt({},e),t),T))}};return f=r.isStepper?v:y,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(l)}}};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)}var O3=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function S3(e,t){if(e==null)return{};var r=A3(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 A3(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 E3(e)||_3(e)||P3(e)||T3()}function T3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
188
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P3(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 _3(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function E3(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 fm(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 Nt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fm(Object(r),!0).forEach(function(n){ri(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ri(e,t,r){return t=dm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $3(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 C3(e,t,r){return t&&$3(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function dm(e){var t=k3(e,"string");return kn(t)==="symbol"?t:String(t)}function k3(e,t){if(kn(e)!=="object"||e===null)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 M3(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pc(e,t)}function pc(e,t){return pc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},pc(e,t)}function N3(e){var t=D3();return function(){var n=Vo(e),a;if(t){var i=Vo(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return hc(this,a)}}function hc(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 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 D3(){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 Vo(e){return Vo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Vo(e)}var Dt=function(e){M3(r,e);var t=N3(r);function r(n,a){var i;j3(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,p=o.duration;if(i.handleStyleChange=i.handleStyleChange.bind(vc(i)),i.changeStyle=i.changeStyle.bind(vc(i)),!s||p<=0)return i.state={style:{}},typeof d=="function"&&(i.state={style:c}),hc(i);if(f&&f.length)i.state={style:f[0].style};else if(u){if(typeof d=="function")return i.state={style:u},hc(i);i.state={style:l?ri({},l,u):u}}else i.state={style:{}};return i}return C3(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 p={style:l?ri({},l,c):c};this.state&&d&&(l&&d[l]!==c||!l&&d!==c)&&this.setState(p);return}if(!(FR(a.to,c)&&a.canBegin&&a.isActive)){var v=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var y=v||u?f:a.to;if(this.state&&d){var h={style:l?ri({},l,y):y};(l&&d[l]!==y||!l&&d!==y)&&this.setState(h)}this.runAnimation(Nt(Nt({},this.props),{},{from:y,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,p=w3(o,s,c3(u),l,this.changeStyle),v=function(){i.stopJSAnimation=p()};this.manager.start([d,c,v,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,p=function(y,h,b){if(b===0)return y;var S=h.duration,x=h.easing,T=x===void 0?"ease":x,m=h.style,w=h.properties,O=h.onAnimationEnd,P=b>0?o[b-1]:h,j=w||Object.keys(m);if(typeof T=="function"||T==="spring")return[].concat(fc(y),[i.runJSAnimation.bind(i,{from:P.style,to:m,duration:S,easing:T}),S]);var M=rm(j,S,T),_=Nt(Nt(Nt({},P.style),m),{},{transition:M});return[].concat(fc(y),[_,S,O]).filter(ZR)};return this.manager.start([l].concat(fc(o.reduce(p,[c,Math.max(d,s)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=qR());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,p=a.children,v=this.manager;if(this.unSubscribe=v.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(a);return}if(d.length>1){this.runStepAnimation(a);return}var y=s?ri({},s,l):l,h=rm(Object.keys(y),o,u);v.start([c,i,Nt(Nt({},y),{},{transition:h}),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=S3(a,O3),u=A.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(p){var v=p.props,y=v.style,h=y===void 0?{}:y,b=v.className,S=A.cloneElement(p,Nt(Nt({},l),{},{style:Nt(Nt({},h),c),className:b}));return S};return u===1?f(A.Children.only(i)):A.createElement("div",null,A.Children.map(i,function(d){return f(d)}))}}]),r}(A.PureComponent);Dt.displayName="Animate",Dt.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},Dt.propTypes={from:Te.oneOfType([Te.object,Te.string]),to:Te.oneOfType([Te.object,Te.string]),attributeName:Te.string,duration:Te.number,begin:Te.number,easing:Te.oneOfType([Te.string,Te.func]),steps:Te.arrayOf(Te.shape({duration:Te.number.isRequired,style:Te.object.isRequired,easing:Te.oneOfType([Te.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Te.func]),properties:Te.arrayOf("string"),onAnimationEnd:Te.func})),children:Te.oneOfType([Te.node,Te.func]),isActive:Te.bool,canBegin:Te.bool,onAnimationEnd:Te.func,shouldReAnimate:Te.bool,onAnimationStart:Te.func,onAnimationReStart:Te.func};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 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 I3(e,t){return F3(e)||B3(e,t)||R3(e,t)||L3()}function L3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
189
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function R3(e,t){if(e){if(typeof e=="string")return pm(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 pm(e,t)}}function pm(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 B3(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 F3(e){if(Array.isArray(e))return 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 vm(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){W3(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 W3(e,t,r){return t=U3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function U3(e){var t=z3(e,"string");return ni(t)=="symbol"?t:t+""}function z3(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 ym=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,p=4;d<p;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,`,
241
+ */var nc,Gm;function x6(){if(Gm)return nc;Gm=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 nc=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},nc}var ac,Vm;function ic(){if(Vm)return ac;Vm=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ac=e,ac}var oc,Km;function qm(){return Km||(Km=1,oc=Function.call.bind(Object.prototype.hasOwnProperty)),oc}var sc,Hm;function w6(){if(Hm)return sc;Hm=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ic(),r={},n=qm();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 p=u?u():"";e("Failed "+s+" type: "+f.message+(p??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},sc=a,sc}var lc,Ym;function O6(){if(Ym)return lc;Ym=1;var e=Um(),t=x6(),r=ic(),n=qm(),a=w6(),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 lc=function(s,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(E){var R=E&&(u&&E[u]||E[c]);if(typeof R=="function")return R}var d="<<anonymous>>",p={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:w(),arrayOf:x,element:A(),elementType:g(),instanceOf:O,node:M(),objectOf:j,oneOf:S,oneOfType:C,shape:_,exact:I};function m(E,R){return E===R?E!==0||1/E===1/R:E!==E&&R!==R}function y(E,R){this.message=E,this.data=R&&typeof R=="object"?R:{},this.stack=""}y.prototype=Error.prototype;function v(E){if(process.env.NODE_ENV!=="production")var R={},F=0;function W(X,Q,ae,te,K,Y,J){if(te=te||d,Y=Y||ae,J!==r){if(l){var L=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 L.name="Invariant Violation",L}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ie=te+":"+ae;!R[ie]&&F<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."),R[ie]=!0,F++)}}return Q[ae]==null?X?Q[ae]===null?new y("The "+K+" `"+Y+"` is marked as required "+("in `"+te+"`, but its value is `null`.")):new y("The "+K+" `"+Y+"` is marked as required in "+("`"+te+"`, but its value is `undefined`.")):null:E(Q,ae,te,K,Y)}var V=W.bind(null,!1);return V.isRequired=W.bind(null,!0),V}function b(E){function R(F,W,V,X,Q,ae){var te=F[W],K=k(te);if(K!==E){var Y=B(te);return new y("Invalid "+X+" `"+Q+"` of type "+("`"+Y+"` supplied to `"+V+"`, expected ")+("`"+E+"`."),{expectedType:E})}return null}return v(R)}function w(){return v(o)}function x(E){function R(F,W,V,X,Q){if(typeof E!="function")return new y("Property `"+Q+"` of component `"+V+"` has invalid PropType notation inside arrayOf.");var ae=F[W];if(!Array.isArray(ae)){var te=k(ae);return new y("Invalid "+X+" `"+Q+"` of type "+("`"+te+"` supplied to `"+V+"`, expected an array."))}for(var K=0;K<ae.length;K++){var Y=E(ae,K,V,X,Q+"["+K+"]",r);if(Y instanceof Error)return Y}return null}return v(R)}function A(){function E(R,F,W,V,X){var Q=R[F];if(!s(Q)){var ae=k(Q);return new y("Invalid "+V+" `"+X+"` of type "+("`"+ae+"` supplied to `"+W+"`, expected a single ReactElement."))}return null}return v(E)}function g(){function E(R,F,W,V,X){var Q=R[F];if(!e.isValidElementType(Q)){var ae=k(Q);return new y("Invalid "+V+" `"+X+"` of type "+("`"+ae+"` supplied to `"+W+"`, expected a single ReactElement type."))}return null}return v(E)}function O(E){function R(F,W,V,X,Q){if(!(F[W]instanceof E)){var ae=E.name||d,te=G(F[W]);return new y("Invalid "+X+" `"+Q+"` of type "+("`"+te+"` supplied to `"+V+"`, expected ")+("instance of `"+ae+"`."))}return null}return v(R)}function S(E){if(!Array.isArray(E))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 R(F,W,V,X,Q){for(var ae=F[W],te=0;te<E.length;te++)if(m(ae,E[te]))return null;var K=JSON.stringify(E,function(J,L){var ie=B(L);return ie==="symbol"?String(L):L});return new y("Invalid "+X+" `"+Q+"` of value `"+String(ae)+"` "+("supplied to `"+V+"`, expected one of "+K+"."))}return v(R)}function j(E){function R(F,W,V,X,Q){if(typeof E!="function")return new y("Property `"+Q+"` of component `"+V+"` has invalid PropType notation inside objectOf.");var ae=F[W],te=k(ae);if(te!=="object")return new y("Invalid "+X+" `"+Q+"` of type "+("`"+te+"` supplied to `"+V+"`, expected an object."));for(var K in ae)if(n(ae,K)){var Y=E(ae,K,V,X,Q+"."+K,r);if(Y instanceof Error)return Y}return null}return v(R)}function C(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var R=0;R<E.length;R++){var F=E[R];if(typeof F!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+z(F)+" at index "+R+"."),o}function W(V,X,Q,ae,te){for(var K=[],Y=0;Y<E.length;Y++){var J=E[Y],L=J(V,X,Q,ae,te,r);if(L==null)return null;L.data&&n(L.data,"expectedType")&&K.push(L.data.expectedType)}var ie=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new y("Invalid "+ae+" `"+te+"` supplied to "+("`"+Q+"`"+ie+"."))}return v(W)}function M(){function E(R,F,W,V,X){return $(R[F])?null:new y("Invalid "+V+" `"+X+"` supplied to "+("`"+W+"`, expected a ReactNode."))}return v(E)}function P(E,R,F,W,V){return new y((E||"React class")+": "+R+" type `"+F+"."+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+V+"`.")}function _(E){function R(F,W,V,X,Q){var ae=F[W],te=k(ae);if(te!=="object")return new y("Invalid "+X+" `"+Q+"` of type `"+te+"` "+("supplied to `"+V+"`, expected `object`."));for(var K in E){var Y=E[K];if(typeof Y!="function")return P(V,X,Q,K,B(Y));var J=Y(ae,K,V,X,Q+"."+K,r);if(J)return J}return null}return v(R)}function I(E){function R(F,W,V,X,Q){var ae=F[W],te=k(ae);if(te!=="object")return new y("Invalid "+X+" `"+Q+"` of type `"+te+"` "+("supplied to `"+V+"`, expected `object`."));var K=t({},F[W],E);for(var Y in K){var J=E[Y];if(n(E,Y)&&typeof J!="function")return P(V,X,Q,Y,B(J));if(!J)return new y("Invalid "+X+" `"+Q+"` key `"+Y+"` supplied to `"+V+"`.\nBad object: "+JSON.stringify(F[W],null," ")+`
242
+ Valid keys: `+JSON.stringify(Object.keys(E),null," "));var L=J(ae,Y,V,X,Q+"."+Y,r);if(L)return L}return null}return v(R)}function $(E){switch(typeof E){case"number":case"string":case"undefined":return!0;case"boolean":return!E;case"object":if(Array.isArray(E))return E.every($);if(E===null||s(E))return!0;var R=f(E);if(R){var F=R.call(E),W;if(R!==E.entries){for(;!(W=F.next()).done;)if(!$(W.value))return!1}else for(;!(W=F.next()).done;){var V=W.value;if(V&&!$(V[1]))return!1}}else return!1;return!0;default:return!1}}function D(E,R){return E==="symbol"?!0:R?R["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&R instanceof Symbol:!1}function k(E){var R=typeof E;return Array.isArray(E)?"array":E instanceof RegExp?"object":D(R,E)?"symbol":R}function B(E){if(typeof E>"u"||E===null)return""+E;var R=k(E);if(R==="object"){if(E instanceof Date)return"date";if(E instanceof RegExp)return"regexp"}return R}function z(E){var R=B(E);switch(R){case"array":case"object":return"an "+R;case"boolean":case"date":case"regexp":return"a "+R;default:return R}}function G(E){return!E.constructor||!E.constructor.name?d:E.constructor.name}return p.checkPropTypes=a,p.resetWarningCache=a.resetWarningCache,p.PropTypes=p,p},lc}var uc,Xm;function S6(){if(Xm)return uc;Xm=1;var e=ic();function t(){}function r(){}return r.resetWarningCache=t,uc=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},uc}if(process.env.NODE_ENV!=="production"){var T6=Um(),A6=!0;rc.exports=O6()(T6.isElement,A6)}else rc.exports=S6()();var P6=rc.exports;const Ae=$e(P6);var j6=Object.getOwnPropertyNames,_6=Object.getOwnPropertySymbols,E6=Object.prototype.hasOwnProperty;function Zm(e,t){return function(n,a,i){return e(n,a,i)&&t(n,a,i)}}function Go(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 Jm(e){return j6(e).concat(_6(e))}var C6=Object.hasOwn||function(e,t){return E6.call(e,t)};function Vr(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var $6="__v",k6="__o",M6="_owner",Qm=Object.getOwnPropertyDescriptor,ey=Object.keys;function N6(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 D6(e,t){return Vr(e.getTime(),t.getTime())}function I6(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function L6(e,t){return e===t}function ty(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,p=s.value;if(r.equals(d[0],p[0],l,f,e,t,r)&&r.equals(d[1],p[1],d[0],p[0],e,t,r)){c=a[f]=!0;break}f++}if(!c)return!1;l++}return!0}var R6=Vr;function B6(e,t,r){var n=ey(e),a=n.length;if(ey(t).length!==a)return!1;for(;a-- >0;)if(!ny(e,t,r,n[a]))return!1;return!0}function ei(e,t,r){var n=Jm(e),a=n.length;if(Jm(t).length!==a)return!1;for(var i,o,s;a-- >0;)if(i=n[a],!ny(e,t,r,i)||(o=Qm(e,i),s=Qm(t,i),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function F6(e,t){return Vr(e.valueOf(),t.valueOf())}function W6(e,t){return e.source===t.source&&e.flags===t.flags}function ry(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 z6(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 U6(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===M6||n===k6||n===$6)&&(e.$$typeof||t.$$typeof)?!0:C6(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var G6="[object Arguments]",V6="[object Boolean]",K6="[object Date]",q6="[object Error]",H6="[object Map]",Y6="[object Number]",X6="[object Object]",Z6="[object RegExp]",J6="[object Set]",Q6="[object String]",e5="[object URL]",t5=Array.isArray,ay=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,iy=Object.assign,r5=Object.prototype.toString.call.bind(Object.prototype.toString);function n5(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,y,v){if(m===y)return!0;if(m==null||y==null)return!1;var b=typeof m;if(b!==typeof y)return!1;if(b!=="object")return b==="number"?o(m,y,v):b==="function"?a(m,y,v):!1;var w=m.constructor;if(w!==y.constructor)return!1;if(w===Object)return s(m,y,v);if(t5(m))return t(m,y,v);if(ay!=null&&ay(m))return f(m,y,v);if(w===Date)return r(m,y,v);if(w===RegExp)return u(m,y,v);if(w===Map)return i(m,y,v);if(w===Set)return c(m,y,v);var x=r5(m);return x===K6?r(m,y,v):x===Z6?u(m,y,v):x===H6?i(m,y,v):x===J6?c(m,y,v):x===X6?typeof m.then!="function"&&typeof y.then!="function"&&s(m,y,v):x===e5?d(m,y,v):x===q6?n(m,y,v):x===G6?s(m,y,v):x===V6||x===Y6||x===Q6?l(m,y,v):!1}}function a5(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,a={areArraysEqual:n?ei:N6,areDatesEqual:D6,areErrorsEqual:I6,areFunctionsEqual:L6,areMapsEqual:n?Zm(ty,ei):ty,areNumbersEqual:R6,areObjectsEqual:n?ei:B6,arePrimitiveWrappersEqual:F6,areRegExpsEqual:W6,areSetsEqual:n?Zm(ry,ei):ry,areTypedArraysEqual:n?ei:z6,areUrlsEqual:U6};if(r&&(a=iy({},a,r(a))),t){var i=Go(a.areArraysEqual),o=Go(a.areMapsEqual),s=Go(a.areObjectsEqual),l=Go(a.areSetsEqual);a=iy({},a,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:l})}return a}function i5(e){return function(t,r,n,a,i,o,s){return e(t,r,s)}}function o5(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,p=c.meta;return r(l,u,{cache:d,equals:a,meta:p,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 s5=wr();wr({strict:!0}),wr({circular:!0}),wr({circular:!0,strict:!0}),wr({createInternalComparator:function(){return Vr}}),wr({strict:!0,createInternalComparator:function(){return Vr}}),wr({circular:!0,createInternalComparator:function(){return Vr}}),wr({circular:!0,createInternalComparator:function(){return Vr},strict:!0});function wr(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=a5(e),l=n5(s),u=n?n(l):i5(l);return o5({circular:r,comparator:l,createState:a,equals:u,strict:o})}function l5(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function oy(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):l5(a)};requestAnimationFrame(n)}function cc(e){"@babel/helpers - typeof";return cc=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},cc(e)}function u5(e){return p5(e)||d5(e)||f5(e)||c5()}function c5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
243
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f5(e,t){if(e){if(typeof e=="string")return sy(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 sy(e,t)}}function sy(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 d5(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function p5(e){if(Array.isArray(e))return e}function h5(){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=u5(o),l=s[0],u=s.slice(1);if(typeof l=="number"){oy(a.bind(null,u),l);return}a(l),oy(a.bind(null,u));return}cc(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 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 ly(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 uy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ly(Object(r),!0).forEach(function(n){cy(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ly(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cy(e,t,r){return t=v5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v5(e){var t=m5(e,"string");return ti(t)==="symbol"?t:String(t)}function m5(e,t){if(ti(e)!=="object"||e===null)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 y5=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,a){return n.filter(function(i){return a.includes(i)})})},g5=function(t){return t},b5=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},ri=function(t,r){return Object.keys(r).reduce(function(n,a){return uy(uy({},n),{},cy({},a,t(a,r[a])))},{})},fy=function(t,r,n){return t.map(function(a){return"".concat(b5(a)," ").concat(r,"ms ").concat(n)}).join(",")},x5=process.env.NODE_ENV!=="production",Vo=function(t,r,n,a,i,o,s,l){if(x5&&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 w5(e,t){return T5(e)||S5(e,t)||dy(e,t)||O5()}function O5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
244
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S5(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 T5(e){if(Array.isArray(e))return e}function A5(e){return _5(e)||j5(e)||dy(e)||P5()}function P5(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
245
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dy(e,t){if(e){if(typeof e=="string")return fc(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 fc(e,t)}}function j5(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _5(e){if(Array.isArray(e))return fc(e)}function fc(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 Ko=1e-4,py=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},hy=function(t,r){return t.map(function(n,a){return n*Math.pow(r,a)}).reduce(function(n,a){return n+a})},vy=function(t,r){return function(n){var a=py(t,r);return hy(a,n)}},E5=function(t,r){return function(n){var a=py(t,r),i=[].concat(A5(a.map(function(o,s){return o*s}).slice(1)),[0]);return hy(i,n)}},my=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=w5(u,4);a=c[0],i=c[1],o=c[2],s=c[3]}else Vo(!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)}}Vo([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=vy(a,o),d=vy(i,s),p=E5(a,o),m=function(b){return b>1?1:b<0?0:b},y=function(b){for(var w=b>1?1:b,x=w,A=0;A<8;++A){var g=f(x)-w,O=p(x);if(Math.abs(g-w)<Ko||O<Ko)return d(x);x=m(x-g/O)}return d(x)};return y.isStepper=!1,y},C5=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 p=-(c-f)*n,m=d*i,y=d+(p-m)*s/1e3,v=d*s/1e3+c;return Math.abs(v-f)<Ko&&Math.abs(y)<Ko?[f,0]:[v,y]};return l.isStepper=!0,l.dt=s,l},$5=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 my(a);case"spring":return C5();default:if(a.split("(")[0]==="cubic-bezier")return my(a);Vo(!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:(Vo(!1,"[configEasing]: first argument type should be function or string, instead received %s",r),null)};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 yy(e){return N5(e)||M5(e)||by(e)||k5()}function k5(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
246
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M5(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function N5(e){if(Array.isArray(e))return pc(e)}function gy(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?gy(Object(r),!0).forEach(function(n){dc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dc(e,t,r){return t=D5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function D5(e){var t=I5(e,"string");return ni(t)==="symbol"?t:String(t)}function I5(e,t){if(ni(e)!=="object"||e===null)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)}function L5(e,t){return F5(e)||B5(e,t)||by(e,t)||R5()}function R5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
247
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function by(e,t){if(e){if(typeof e=="string")return pc(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 pc(e,t)}}function pc(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 B5(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 F5(e){if(Array.isArray(e))return e}var qo=function(t,r,n){return t+(r-t)*n},hc=function(t){var r=t.from,n=t.to;return r!==n},W5=function e(t,r,n){var a=ri(function(i,o){if(hc(o)){var s=t(o.from,o.to,o.velocity),l=L5(s,2),u=l[0],c=l[1];return at(at({},o),{},{from:u,velocity:c})}return o},r);return n<1?ri(function(i,o){return hc(o)?at(at({},o),{},{velocity:qo(o.velocity,a[i].velocity,n),from:qo(o.from,a[i].from,n)}):o},r):e(t,a,n-1)};const z5=function(e,t,r,n,a){var i=y5(e,t),o=i.reduce(function(v,b){return at(at({},v),{},dc({},b,[e[b],t[b]]))},{}),s=i.reduce(function(v,b){return at(at({},v),{},dc({},b,{from:e[b],velocity:0,to:t[b]}))},{}),l=-1,u,c,f=function(){return null},d=function(){return ri(function(b,w){return w.from},s)},p=function(){return!Object.values(s).filter(hc).length},m=function(b){u||(u=b);var w=b-u,x=w/r.dt;s=W5(r,s,x),a(at(at(at({},e),t),d())),u=b,p()||(l=requestAnimationFrame(f))},y=function(b){c||(c=b);var w=(b-c)/n,x=ri(function(g,O){return qo.apply(void 0,yy(O).concat([r(w)]))},o);if(a(at(at(at({},e),t),x)),w<1)l=requestAnimationFrame(f);else{var A=ri(function(g,O){return qo.apply(void 0,yy(O).concat([r(1)]))},o);a(at(at(at({},e),t),A))}};return f=r.isStepper?m:y,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 U5=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function G5(e,t){if(e==null)return{};var r=V5(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 V5(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 vc(e){return Y5(e)||H5(e)||q5(e)||K5()}function K5(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
248
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q5(e,t){if(e){if(typeof e=="string")return mc(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 mc(e,t)}}function H5(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Y5(e){if(Array.isArray(e))return mc(e)}function mc(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 xy(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 Nt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xy(Object(r),!0).forEach(function(n){ai(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ai(e,t,r){return t=wy(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Z5(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,wy(n.key),n)}}function J5(e,t,r){return t&&Z5(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wy(e){var t=Q5(e,"string");return Mn(t)==="symbol"?t:String(t)}function Q5(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 e4(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 t4(e){var t=r4();return function(){var n=Ho(e),a;if(t){var i=Ho(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return gc(this,a)}}function gc(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 bc(e)}function bc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function r4(){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 Ho(e){return Ho=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ho(e)}var Dt=function(e){e4(r,e);var t=t4(r);function r(n,a){var i;X5(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,p=o.duration;if(i.handleStyleChange=i.handleStyleChange.bind(bc(i)),i.changeStyle=i.changeStyle.bind(bc(i)),!s||p<=0)return i.state={style:{}},typeof d=="function"&&(i.state={style:c}),gc(i);if(f&&f.length)i.state={style:f[0].style};else if(u){if(typeof d=="function")return i.state={style:u},gc(i);i.state={style:l?ai({},l,u):u}}else i.state={style:{}};return i}return J5(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 p={style:l?ai({},l,c):c};this.state&&d&&(l&&d[l]!==c||!l&&d!==c)&&this.setState(p);return}if(!(s5(a.to,c)&&a.canBegin&&a.isActive)){var m=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var y=m||u?f:a.to;if(this.state&&d){var v={style:l?ai({},l,y):y};(l&&d[l]!==y||!l&&d!==y)&&this.setState(v)}this.runAnimation(Nt(Nt({},this.props),{},{from:y,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,p=z5(o,s,$5(u),l,this.changeStyle),m=function(){i.stopJSAnimation=p()};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,p=function(y,v,b){if(b===0)return y;var w=v.duration,x=v.easing,A=x===void 0?"ease":x,g=v.style,O=v.properties,S=v.onAnimationEnd,j=b>0?o[b-1]:v,C=O||Object.keys(g);if(typeof A=="function"||A==="spring")return[].concat(vc(y),[i.runJSAnimation.bind(i,{from:j.style,to:g,duration:w,easing:A}),w]);var M=fy(C,w,A),P=Nt(Nt(Nt({},j.style),g),{},{transition:M});return[].concat(vc(y),[P,w,S]).filter(g5)};return this.manager.start([l].concat(vc(o.reduce(p,[c,Math.max(d,s)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=h5());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,p=a.children,m=this.manager;if(this.unSubscribe=m.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(a);return}if(d.length>1){this.runStepAnimation(a);return}var y=s?ai({},s,l):l,v=fy(Object.keys(y),o,u);m.start([c,i,Nt(Nt({},y),{},{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=G5(a,U5),u=T.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(p){var m=p.props,y=m.style,v=y===void 0?{}:y,b=m.className,w=T.cloneElement(p,Nt(Nt({},l),{},{style:Nt(Nt({},v),c),className:b}));return w};return u===1?f(T.Children.only(i)):T.createElement("div",null,T.Children.map(i,function(d){return f(d)}))}}]),r}(T.PureComponent);Dt.displayName="Animate",Dt.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},Dt.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 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 Yo(){return Yo=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},Yo.apply(this,arguments)}function n4(e,t){return s4(e)||o4(e,t)||i4(e,t)||a4()}function a4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
249
+ 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 Oy(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 Oy(e,t)}}function Oy(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 o4(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 s4(e){if(Array.isArray(e))return e}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 Ty(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){l4(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 l4(e,t,r){return t=u4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u4(e){var t=c4(e,"string");return ii(t)=="symbol"?t:t+""}function c4(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 Ay=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,p=4;d<p;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,`,
190
250
  `).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,`,
191
251
  `).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,`,
192
- `).concat(t,",").concat(r+a-s*f[3])),c+="Z"}else if(o>0&&i===+i&&i>0){var v=Math.min(o,i);c="M ".concat(t,",").concat(r+s*v,`
193
- A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+l*v,",").concat(r,`
194
- L `).concat(t+n-l*v,",").concat(r,`
195
- A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*v,`
196
- L `).concat(t+n,",").concat(r+a-s*v,`
197
- A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+n-l*v,",").concat(r+a,`
198
- L `).concat(t+l*v,",").concat(r+a,`
199
- A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t,",").concat(r+a-s*v," Z")}else c="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(a," h ").concat(-n," Z");return c},G3=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},K3={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=vm(vm({},K3),t),n=A.useRef(),a=A.useState(-1),i=I3(a,2),o=i[0],s=i[1];A.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,p=r.className,v=r.animationEasing,y=r.animationDuration,h=r.animationBegin,b=r.isAnimationActive,S=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||f!==+f||c===0||f===0)return null;var x=ye("recharts-rectangle",p);return S?A.createElement(Dt,{canBegin:o>0,from:{width:c,height:f,x:l,y:u},to:{width:c,height:f,x:l,y:u},duration:y,animationEasing:v,isActive:S},function(T){var m=T.width,w=T.height,O=T.x,P=T.y;return A.createElement(Dt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:h,duration:y,isActive:b,easing:v},A.createElement("path",qo({},de(r,!0),{className:x,d:ym(O,P,m,w,d),ref:n})))}):A.createElement("path",qo({},de(r,!0),{className:x,d:ym(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 Ho=function(t){var r=t.cx,n=t.cy,a=t.r,i=t.className,o=ye("recharts-dot",i);return r===+r&&n===+n&&a===+a?xt.createElement("circle",mc({},de(t,!1),Di(t),{className:o,cx:r,cy:n,r:a})):null};function ai(e){"@babel/helpers - typeof";return ai=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ai(e)}var V3=["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 mm(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 q3(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mm(Object(r),!0).forEach(function(n){H3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function H3(e,t,r){return t=Y3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Y3(e){var t=X3(e,"string");return ai(t)=="symbol"?t:t+""}function X3(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 Z3(e,t){if(e==null)return{};var r=J3(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 J3(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 Q3=function(t,r,n,a,i,o){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(o,",").concat(r,"h").concat(n)},e5=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,p=d===void 0?0:d,v=t.className,y=Z3(t,V3),h=q3({x:n,y:i,top:s,left:u,width:f,height:p},y);return!Z(n)||!Z(i)||!Z(f)||!Z(p)||!Z(s)||!Z(u)?null:A.createElement("path",gc({},de(h,!0),{className:ye("recharts-cross",v),d:Q3(n,i,f,p,s,u)}))},t5=Qd,r5=t5(Object.getPrototypeOf,Object),n5=r5,a5=Zt,i5=n5,o5=Jt,s5="[object Object]",l5=Function.prototype,u5=Object.prototype,gm=l5.toString,c5=u5.hasOwnProperty,f5=gm.call(Object);function d5(e){if(!o5(e)||a5(e)!=s5)return!1;var t=i5(e);if(t===null)return!0;var r=c5.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&gm.call(r)==f5}var p5=d5;const h5=Ce(p5);var v5=Zt,y5=Jt,m5="[object Boolean]";function g5(e){return e===!0||e===!1||y5(e)&&v5(e)==m5}var b5=g5;const x5=Ce(b5);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 Yo(){return Yo=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},Yo.apply(this,arguments)}function w5(e,t){return T5(e)||A5(e,t)||S5(e,t)||O5()}function O5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
200
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S5(e,t){if(e){if(typeof e=="string")return bm(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 bm(e,t)}}function bm(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 A5(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 T5(e){if(Array.isArray(e))return e}function xm(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 wm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xm(Object(r),!0).forEach(function(n){P5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function P5(e,t,r){return t=_5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _5(e){var t=E5(e,"string");return ii(t)=="symbol"?t:t+""}function E5(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 Om=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},j5={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},$5=function(t){var r=wm(wm({},j5),t),n=A.useRef(),a=A.useState(-1),i=w5(a,2),o=i[0],s=i[1];A.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,p=r.className,v=r.animationEasing,y=r.animationDuration,h=r.animationBegin,b=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||f!==+f||d!==+d||c===0&&f===0||d===0)return null;var S=ye("recharts-trapezoid",p);return b?A.createElement(Dt,{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:y,animationEasing:v,isActive:b},function(x){var T=x.upperWidth,m=x.lowerWidth,w=x.height,O=x.x,P=x.y;return A.createElement(Dt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:h,duration:y,easing:v},A.createElement("path",Yo({},de(r,!0),{className:S,d:Om(O,P,T,m,w),ref:n})))}):A.createElement("g",null,A.createElement("path",Yo({},de(r,!0),{className:S,d:Om(l,u,c,f,d)})))},C5=["option","shapeType","propTransformer","activeClassName","isActive"];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 k5(e,t){if(e==null)return{};var r=M5(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 M5(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 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 Xo(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){N5(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 N5(e,t,r){return t=D5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function D5(e){var t=I5(e,"string");return oi(t)=="symbol"?t:t+""}function I5(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 L5(e,t){return Xo(Xo({},t),e)}function R5(e,t){return e==="symbols"}function Am(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return A.createElement(yc,r);case"trapezoid":return A.createElement($5,r);case"sector":return A.createElement(_y,r);case"symbols":if(R5(t))return A.createElement(Vi,r);break;default:return null}}function B5(e){return A.isValidElement(e)?e.props:e}function bc(e){var t=e.option,r=e.shapeType,n=e.propTransformer,a=n===void 0?L5:n,i=e.activeClassName,o=i===void 0?"recharts-active-shape":i,s=e.isActive,l=k5(e,C5),u;if(A.isValidElement(t))u=A.cloneElement(t,Xo(Xo({},l),B5(t)));else if(pe(t))u=t(l);else if(h5(t)&&!x5(t)){var c=a(t,l);u=A.createElement(Am,{shapeType:r,elementProps:c})}else{var f=l;u=A.createElement(Am,{shapeType:r,elementProps:f})}return s?A.createElement(xe,{className:o},u):u}function Zo(e,t){return t!=null&&"trapezoids"in e.props}function Jo(e,t){return t!=null&&"sectors"in e.props}function si(e,t){return t!=null&&"points"in e.props}function F5(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 W5(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function U5(e,t){var r=e.x===t.x,n=e.y===t.y,a=e.z===t.z;return r&&n&&a}function z5(e,t){var r;return Zo(e,t)?r=F5:Jo(e,t)?r=W5:si(e,t)&&(r=U5),r}function G5(e,t){var r;return Zo(e,t)?r="trapezoids":Jo(e,t)?r="sectors":si(e,t)&&(r="points"),r}function K5(e,t){if(Zo(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 si(e,t)?t.payload:{}}function V5(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,a=G5(r,t),i=K5(r,t),o=n.filter(function(l,u){var c=Br(i,l),f=r.props[a].filter(function(v){var y=z5(r,t);return y(v,t)}),d=r.props[a].indexOf(f[f.length-1]),p=u===d;return c&&p}),s=n.indexOf(o[o.length-1]);return s}var q5=Math.ceil,H5=Math.max;function Y5(e,t,r,n){for(var a=-1,i=H5(q5((t-e)/(r||1)),0),o=Array(i);i--;)o[n?i:++a]=e,e+=r;return o}var X5=Y5,Z5=Zp,Tm=1/0,J5=17976931348623157e292;function Q5(e){if(!e)return e===0?e:0;if(e=Z5(e),e===Tm||e===-Tm){var t=e<0?-1:1;return t*J5}return e===e?e:0}var Pm=Q5,e6=X5,t6=to,xc=Pm;function r6(e){return function(t,r,n){return n&&typeof n!="number"&&t6(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),e6(t,r,n,e)}}var n6=r6,a6=n6,i6=a6(),o6=i6;const Qo=Ce(o6);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 _m(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 Em(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_m(Object(r),!0).forEach(function(n){jm(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_m(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jm(e,t,r){return t=s6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s6(e){var t=l6(e,"string");return li(t)=="symbol"?t:t+""}function l6(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 u6=["Webkit","Moz","O","ms"],c6=function(t,r){var n=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=u6.reduce(function(i,o){return Em(Em({},i),{},jm({},o+n,r))},{});return a[t]=r,a};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 es(){return es=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},es.apply(this,arguments)}function $m(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?$m(Object(r),!0).forEach(function(n){gt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$m(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function f6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cm(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 d6(e,t,r){return t&&Cm(e.prototype,t),r&&Cm(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p6(e,t,r){return t=ts(t),h6(e,km()?Reflect.construct(t,r||[],ts(e).constructor):t.apply(e,r))}function h6(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 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 km(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(km=function(){return!!e})()}function ts(e){return ts=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ts(e)}function y6(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 gt(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=m6(e,"string");return Mn(t)=="symbol"?t:t+""}function m6(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)}var g6=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=Ea().domain(Qo(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}},Nm=function(t){return t.changedTouches&&!!t.changedTouches.length},Nn=function(e){function t(r){var n;return f6(this,t),n=p6(this,t,[r]),gt(n,"handleDrag",function(a){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(a):n.state.isSlideMoving&&n.handleSlideDrag(a)}),gt(n,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&n.handleDrag(a.changedTouches[0])}),gt(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()}),gt(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),gt(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),gt(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),gt(n,"handleSlideDragStart",function(a){var i=Nm(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 y6(t,e),d6(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),p=t.getIndexInRange(o,f),v=t.getIndexInRange(o,d);return{startIndex:p-p%l,endIndex:v===c?c:v-v%l}}},{key:"getTextOfTick",value:function(n){var a=this.props,i=a.data,o=a.tickFormatter,s=a.dataKey,l=Ze(i[n],s,n);return pe(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,p=l.endIndex,v=l.onChange,y=n.pageX-i;y>0?y=Math.min(y,u+c-f-s,u+c-f-o):y<0&&(y=Math.max(y,u-o,u-s));var h=this.getIndex({startX:o+y,endX:s+y});(h.startIndex!==d||h.endIndex!==p)&&v&&v(h),this.setState({startX:o+y,endX:s+y,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,a){var i=Nm(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,p=c.travellerWidth,v=c.onChange,y=c.gap,h=c.data,b={startX:this.state.startX,endX:this.state.endX},S=n.pageX-i;S>0?S=Math.min(S,f+d-p-u):S<0&&(S=Math.max(S,f-u)),b[o]=u+S;var x=this.getIndex(b),T=x.startIndex,m=x.endIndex,w=function(){var P=h.length-1;return o==="startX"&&(s>l?T%y===0:m%y===0)||s<l&&m===P||o==="endX"&&(s>l?m%y===0:T%y===0)||s>l&&m===P};this.setState(gt(gt({},o,u+S),"brushMoveStartX",n.pageX),function(){v&&w()&&v(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 p=s[d];a==="startX"&&p>=u||a==="endX"&&p<=l||this.setState(gt({},a,p),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 A.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=A.Children.only(u);return f?A.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,p=l.ariaLabel,v=l.data,y=l.startIndex,h=l.endIndex,b=Math.max(n,this.props.x),S=wc(wc({},de(this.props,!1)),{},{x:b,y:u,width:c,height:f}),x=p||"Min value: ".concat((i=v[y])===null||i===void 0?void 0:i.name,", Max value: ").concat((o=v[h])===null||o===void 0?void 0:o.name);return A.createElement(xe,{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,S))}},{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 A.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill: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,p=5,v={pointerEvents:"none",fill:u};return A.createElement(xe,{className:"recharts-brush-texts"},A.createElement(lo,es({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,d)-p,y:o+s/2},v),this.getTextOfTick(a)),A.createElement(lo,es({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,d)+l+p,y:o+s/2},v),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,p=d.startX,v=d.endX,y=d.isTextActive,h=d.isSlideMoving,b=d.isTravellerMoving,S=d.isTravellerFocused;if(!a||!a.length||!Z(s)||!Z(l)||!Z(u)||!Z(c)||u<=0||c<=0)return null;var x=ye("recharts-brush",i),T=A.Children.count(o)===1,m=c6("userSelect","none");return A.createElement(xe,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:m},this.renderBackground(),T&&this.renderPanorama(),this.renderSlide(p,v),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(v,"endX"),(y||h||b||S||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 A.createElement(A.Fragment,null,A.createElement("rect",{x:a,y:i,width:o,height:s,fill:l,stroke:"none"}),A.createElement("line",{x1:a+1,y1:u,x2:a+o-1,y2:u,fill:"none",stroke:"#fff"}),A.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 A.isValidElement(n)?i=A.cloneElement(n,a):pe(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?g6({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(p){return a.scale(p)});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}}])}(A.PureComponent);gt(Nn,"displayName","Brush"),gt(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 b6=Rl;function x6(e,t){var r;return b6(e,function(n,a,i){return r=t(n,a,i),!r}),!!r}var w6=x6,O6=Rd,S6=hr,A6=w6,T6=ft,P6=to;function _6(e,t,r){var n=T6(e)?O6:A6;return r&&P6(e,t,r)&&(t=void 0),n(e,S6(t))}var E6=_6;const j6=Ce(E6);var Vt=function(t,r){var n=t.alwaysShow,a=t.ifOverflow;return n&&(a="extendDomain"),a===r},Dm=Np;function $6(e,t,r){t=="__proto__"&&Dm?Dm(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var C6=$6,k6=C6,M6=$p,N6=hr;function D6(e,t){var r={};return t=N6(t),M6(e,function(n,a,i){k6(r,a,t(n,a,i))}),r}var I6=D6;const L6=Ce(I6);function R6(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 B6=R6,F6=Rl;function W6(e,t){var r=!0;return F6(e,function(n,a,i){return r=!!t(n,a,i),r}),r}var U6=W6,z6=B6,G6=U6,K6=hr,V6=ft,q6=to;function H6(e,t,r){var n=V6(e)?z6:G6;return r&&q6(e,t,r)&&(t=void 0),n(e,K6(t))}var Y6=H6;const Im=Ce(Y6);var X6=["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 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 ui(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){Z6(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 Z6(e,t,r){return t=J6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function J6(e){var t=Q6(e,"string");return Dn(t)=="symbol"?t:t+""}function Q6(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 e4(e,t){if(e==null)return{};var r=t4(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 t4(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 r4(e,t){var r=e.x,n=e.y,a=e4(e,X6),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 ui(ui(ui(ui(ui({},t),a),o?{x:o}:{}),l?{y:l}:{}),{},{height:c,width:d,name:t.name,radius:t.radius})}function Rm(e){return A.createElement(bc,Sc({shapeType:"rectangle",propTransformer:r4,activeClassName:"recharts-active-bar"},e))}var n4=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=Z(n)||vO(n);return i?t(n,a):(i||(process.env.NODE_ENV!=="production"?ht(!1,"minPointSize callback function received a value with type of ".concat(Dn(n),". Currently only numbers or null/undefined are supported.")):ht()),r)}},a4=["value","background"],Bm;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 i4(e,t){if(e==null)return{};var r=o4(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 o4(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 rs(){return rs=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},rs.apply(this,arguments)}function Fm(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?Fm(Object(r),!0).forEach(function(n){Or(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function s4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wm(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 l4(e,t,r){return t&&Wm(e.prototype,t),r&&Wm(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u4(e,t,r){return t=ns(t),c4(e,Um()?Reflect.construct(t,r||[],ns(e).constructor):t.apply(e,r))}function c4(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 f4(e)}function f4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Um(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Um=function(){return!!e})()}function ns(e){return ns=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ns(e)}function d4(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 Or(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=p4(e,"string");return In(t)=="symbol"?t:t+""}function p4(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 Ln=function(e){function t(){var r;s4(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=u4(this,t,[].concat(a)),Or(r,"state",{isAnimationFinished:!1}),Or(r,"id",$r("recharts-bar-")),Or(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Or(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return d4(t,e),l4(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 p=d===l,v=p?u:o,y=qe(qe(qe({},c),f),{},{isActive:p,option:v,index:d,dataKey:s,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return A.createElement(xe,rs({className:"recharts-bar-rectangle"},ha(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)}),A.createElement(Rm,y))})}},{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 A.createElement(Dt,{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(p){var v=p.t,y=i.map(function(h,b){var S=d&&d[b];if(S){var x=Ue(S.x,h.x),T=Ue(S.y,h.y),m=Ue(S.width,h.width),w=Ue(S.height,h.height);return qe(qe({},h),{},{x:x(v),y:T(v),width:m(v),height:w(v)})}if(o==="horizontal"){var O=Ue(0,h.height),P=O(v);return qe(qe({},h),{},{y:h.y+h.height-P,height:P})}var j=Ue(0,h.width),M=j(v);return qe(qe({},h),{},{width:M})});return A.createElement(xe,null,n.renderRectanglesStatically(y))})}},{key:"renderRectangles",value:function(){var n=this.props,a=n.data,i=n.isAnimationActive,o=this.state.prevData;return i&&a&&a.length&&(!o||!Br(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=i4(u,a4);if(!f)return null;var p=qe(qe(qe(qe(qe({},d),{},{fill:"#eee"},f),l),ha(n.props,u,c)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:c,className:"recharts-bar-background-rectangle"});return A.createElement(Rm,rs({key:"background-bar-".concat(c),option:n.props.background,isActive:c===s},p))})}},{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=dt(c,jn);if(!f)return null;var d=u==="vertical"?o[0].height/2:o[0].width/2,p=function(h,b){var S=Array.isArray(h.value)?h.value[1]:h.value;return{x:h.x,y:h.y,value:S,errorVal:Ze(h,b)}},v={clipPath:n?"url(#clipPath-".concat(a,")"):null};return A.createElement(xe,v,f.map(function(y){return A.cloneElement(y,{key:"error-bar-".concat(a,"-").concat(y.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,offset:d,dataPointFormatter:p})}))}},{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,p=n.isAnimationActive,v=n.background,y=n.id;if(a||!i||!i.length)return null;var h=this.state.isAnimationFinished,b=ye("recharts-bar",o),S=s&&s.allowDataOverflow,x=l&&l.allowDataOverflow,T=S||x,m=fe(y)?this.id:y;return A.createElement(xe,{className:b},S||x?A.createElement("defs",null,A.createElement("clipPath",{id:"clipPath-".concat(m)},A.createElement("rect",{x:S?u:u-f/2,y:x?c:c-d/2,width:S?f:f*2,height:x?d:d*2}))):null,A.createElement(xe,{className:"recharts-bar-rectangles",clipPath:T?"url(#clipPath-".concat(m,")"):null},v?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(T,m),(!p||h)&&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}}])}(A.PureComponent);Bm=Ln,Or(Ln,"displayName","Bar"),Or(Ln,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!vr.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),Or(Ln,"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,p=BI(n,r);if(!p)return null;var v=t.layout,y=r.type.defaultProps,h=y!==void 0?qe(qe({},y),r.props):r.props,b=h.dataKey,S=h.children,x=h.minPointSize,T=v==="horizontal"?o:i,m=u?T.scale.domain():null,w=qI({numericAxis:T}),O=dt(S,Hl),P=f.map(function(j,M){var _,$,R,k,D,C;u?_=FI(u[c+M],m):(_=Ze(j,b),Array.isArray(_)||(_=[w,_]));var B=n4(x,Bm.defaultProps.minPointSize)(_[1],M);if(v==="horizontal"){var U,G=[o.scale(_[0]),o.scale(_[1])],E=G[0],L=G[1];$=cy({axis:i,ticks:s,bandSize:a,offset:p.offset,entry:j,index:M}),R=(U=L??E)!==null&&U!==void 0?U:void 0,k=p.size;var F=E-L;if(D=Number.isNaN(F)?0:F,C={x:$,y:o.y,width:k,height:o.height},Math.abs(B)>0&&Math.abs(D)<Math.abs(B)){var W=Ct(D||B)*(Math.abs(B)-Math.abs(D));R-=W,D+=W}}else{var K=[i.scale(_[0]),i.scale(_[1])],X=K[0],Q=K[1];if($=X,R=cy({axis:o,ticks:l,bandSize:a,offset:p.offset,entry:j,index:M}),k=Q-X,D=p.size,C={x:i.x,y:R,width:i.width,height:D},Math.abs(B)>0&&Math.abs(k)<Math.abs(B)){var ae=Ct(k||B)*(Math.abs(B)-Math.abs(k));k+=ae}}return qe(qe(qe({},j),{},{x:$,y:R,width:k,height:D,value:u?_:_[1],payload:j,background:C},O&&O[M]&&O[M].props),{},{tooltipPayload:[vy(r,j)],tooltipPosition:{x:$+k/2,y:R+D/2}})});return qe({data:P,layout:v},d)});function ci(e){"@babel/helpers - typeof";return ci=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ci(e)}function h4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gm(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 v4(e,t,r){return t&&Gm(e.prototype,t),r&&Gm(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Km(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?Km(Object(r),!0).forEach(function(n){as(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Km(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function as(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=y4(e,"string");return ci(t)=="symbol"?t:t+""}function y4(e,t){if(ci(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ci(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var m4=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=!!yt(u,Ln);return c.reduce(function(p,v){var y=r[v],h=y.orientation,b=y.domain,S=y.padding,x=S===void 0?{}:S,T=y.mirror,m=y.reversed,w="".concat(h).concat(T?"Mirror":""),O,P,j,M,_;if(y.type==="number"&&(y.padding==="gap"||y.padding==="no-gap")){var $=b[1]-b[0],R=1/0,k=y.categoricalDomain.sort(bO);if(k.forEach(function(K,X){X>0&&(R=Math.min((K||0)-(k[X-1]||0),R))}),Number.isFinite(R)){var D=R/$,C=y.layout==="vertical"?n.height:n.width;if(y.padding==="gap"&&(O=D*C/2),y.padding==="no-gap"){var B=Cr(t.barCategoryGap,D*C),U=D*C/2;O=U-B-(U-B)/C*B}}}a==="xAxis"?P=[n.left+(x.left||0)+(O||0),n.left+n.width-(x.right||0)-(O||0)]:a==="yAxis"?P=l==="horizontal"?[n.top+n.height-(x.bottom||0),n.top+(x.top||0)]:[n.top+(x.top||0)+(O||0),n.top+n.height-(x.bottom||0)-(O||0)]:P=y.range,m&&(P=[P[1],P[0]]);var G=LI(y,i,d),E=G.scale,L=G.realScaleType;E.domain(b).range(P),RI(E);var F=VI(E,It(It({},y),{},{realScaleType:L}));a==="xAxis"?(_=h==="top"&&!T||h==="bottom"&&T,j=n.left,M=f[w]-_*y.height):a==="yAxis"&&(_=h==="left"&&!T||h==="right"&&T,j=f[w]-_*y.width,M=n.top);var W=It(It(It({},y),F),{},{realScaleType:L,x:j,y:M,scale:E,width:a==="xAxis"?n.width:y.width,height:a==="yAxis"?n.height:y.height});return W.bandSize=Io(W,F),!y.hide&&a==="xAxis"?f[w]+=(_?-1:1)*W.height:y.hide||(f[w]+=(_?-1:1)*W.width),It(It({},p),{},as({},v,W))},{})},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)}},g4=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})},Hm=function(){function e(t){h4(this,e),this.scale=t}return v4(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)}}])}();as(Hm,"EPS",1e-4);var Tc=function(t){var r=Object.keys(t).reduce(function(n,a){return It(It({},n),{},as({},a,Hm.create(t[a])))},{});return It(It({},r),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.bandAware,s=i.position;return L6(a,function(l,u){return r[u].apply(l,{bandAware:o,position:s})})},isInRange:function(a){return Im(a,function(i,o){return r[o].isInRange(i)})}})};function b4(e){return(e%180+180)%180}var x4=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=b4(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)},w4=hr,O4=ma,S4=Zi;function A4(e){return function(t,r,n){var a=Object(t);if(!O4(t)){var i=w4(r);t=S4(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 T4=A4,P4=Pm;function _4(e){var t=P4(e),r=t%1;return t===t?r?t-r:t:0}var E4=_4,j4=gp,$4=hr,C4=E4,k4=Math.max;function M4(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:C4(r);return a<0&&(a=k4(n+a,0)),j4(e,$4(t),a)}var N4=M4,D4=T4,I4=N4,L4=D4(I4),R4=L4;const B4=Ce(R4);var F4=w1(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 is(e){"@babel/helpers - typeof";return is=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},is(e)}var Pc=A.createContext(void 0),_c=A.createContext(void 0),Ym=A.createContext(void 0),Xm=A.createContext({}),Zm=A.createContext(void 0),Jm=A.createContext(0),Qm=A.createContext(0),eg=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=F4(i);return A.createElement(Pc.Provider,{value:n},A.createElement(_c.Provider,{value:a},A.createElement(Xm.Provider,{value:i},A.createElement(Ym.Provider,{value:c},A.createElement(Zm.Provider,{value:o},A.createElement(Jm.Provider,{value:u},A.createElement(Qm.Provider,{value:l},s)))))))},W4=function(){return A.useContext(Zm)};function tg(e){var t=Object.keys(e);return t.length===0?"There are no available ids.":"Available ids are: ".concat(t,".")}var rg=function(t){var r=A.useContext(Pc);r==null&&(process.env.NODE_ENV!=="production"?ht(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):ht());var n=r[t];return n==null&&(process.env.NODE_ENV!=="production"?ht(!1,'Could not find xAxis by id "'.concat(t,'" [').concat(is(t),"]. ").concat(tg(r))):ht()),n},U4=function(){var t=A.useContext(Pc);return pr(t)},z4=function(){var t=A.useContext(_c),r=B4(t,function(n){return Im(n.domain,Number.isFinite)});return r||pr(t)},ng=function(t){var r=A.useContext(_c);r==null&&(process.env.NODE_ENV!=="production"?ht(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):ht());var n=r[t];return n==null&&(process.env.NODE_ENV!=="production"?ht(!1,'Could not find yAxis by id "'.concat(t,'" [').concat(is(t),"]. ").concat(tg(r))):ht()),n},G4=function(){var t=A.useContext(Ym);return t},K4=function(){return A.useContext(Xm)},Ec=function(){return A.useContext(Qm)},jc=function(){return A.useContext(Jm)};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 V4(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,sg(n.key),n)}}function H4(e,t,r){return t&&q4(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Y4(e,t,r){return t=os(t),X4(e,ag()?Reflect.construct(t,r||[],os(e).constructor):t.apply(e,r))}function X4(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 Z4(e)}function Z4(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 os(e){return os=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},os(e)}function J4(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 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 og(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){Cc(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 Cc(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=Q4(e,"string");return Rn(t)=="symbol"?t:t+""}function Q4(e,t){if(Rn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Rn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function eB(e,t){return aB(e)||nB(e,t)||rB(e,t)||tB()}function tB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
201
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rB(e,t){if(e){if(typeof e=="string")return lg(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 lg(e,t)}}function lg(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 nB(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 aB(e){if(Array.isArray(e))return e}function kc(){return kc=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},kc.apply(this,arguments)}var iB=function(t,r){var n;return A.isValidElement(t)?n=A.cloneElement(t,r):pe(t)?n=t(r):n=A.createElement("line",kc({},r,{className:"recharts-reference-line-line"})),n},oB=function(t,r,n,a,i,o,s,l,u){var c=i.x,f=i.y,d=i.width,p=i.height;if(n){var v=u.y,y=t.y.apply(v,{position:o});if(Vt(u,"discard")&&!t.y.isInRange(y))return null;var h=[{x:c+d,y},{x:c,y}];return l==="left"?h.reverse():h}if(r){var b=u.x,S=t.x.apply(b,{position:o});if(Vt(u,"discard")&&!t.x.isInRange(S))return null;var x=[{x:S,y:f+p},{x:S,y:f}];return s==="top"?x.reverse():x}if(a){var T=u.segment,m=T.map(function(w){return t.apply(w,{position:o})});return Vt(u,"discard")&&j6(m,function(w){return!t.isInRange(w)})?null:m}return null};function sB(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=W4(),c=rg(a),f=ng(i),d=G4();if(!u||!d)return null;er(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=Tc({x:c.scale,y:f.scale}),v=Ye(t),y=Ye(r),h=n&&n.length===2,b=oB(p,v,y,h,d,e.position,c.orientation,f.orientation,e);if(!b)return null;var S=eB(b,2),x=S[0],T=x.x,m=x.y,w=S[1],O=w.x,P=w.y,j=Vt(e,"hidden")?"url(#".concat(u,")"):void 0,M=og(og({clipPath:j},de(e,!0)),{},{x1:T,y1:m,x2:O,y2:P});return A.createElement(xe,{className:ye("recharts-reference-line",s)},iB(o,M),at.renderCallByParent(e,g4({x1:T,y1:m,x2:O,y2:P})))}var Mc=function(e){function t(){return V4(this,t),Y4(this,t,arguments)}return J4(t,e),H4(t,[{key:"render",value:function(){return A.createElement(sB,this.props)}}])}(A.Component);Cc(Mc,"displayName","ReferenceLine"),Cc(Mc,"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 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 cg(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){ls(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 lB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,dg(n.key),n)}}function cB(e,t,r){return t&&uB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function fB(e,t,r){return t=ss(t),dB(e,fg()?Reflect.construct(t,r||[],ss(e).constructor):t.apply(e,r))}function dB(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 pB(e)}function pB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fg=function(){return!!e})()}function ss(e){return ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ss(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&&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 ls(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=vB(e,"string");return Bn(t)=="symbol"?t:t+""}function vB(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 yB=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 Vt(t,"discard")&&!o.isInRange(s)?null:s},us=function(e){function t(){return lB(this,t),fB(this,t,arguments)}return hB(t,e),cB(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=Ye(a),c=Ye(i);if(er(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!c)return null;var f=yB(this.props);if(!f)return null;var d=f.x,p=f.y,v=this.props,y=v.shape,h=v.className,b=Vt(this.props,"hidden")?"url(#".concat(l,")"):void 0,S=cg(cg({clipPath:b},de(this.props,!0)),{},{cx:d,cy:p});return A.createElement(xe,{className:ye("recharts-reference-dot",h)},t.renderDot(y,S),at.renderCallByParent(this.props,{x:d-o,y:p-o,width:2*o,height:2*o}))}}])}(A.Component);ls(us,"displayName","ReferenceDot"),ls(us,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1}),ls(us,"renderDot",function(e,t){var r;return A.isValidElement(e)?r=A.cloneElement(e,t):pe(e)?r=e(t):r=A.createElement(Ho,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 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 hg(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){fs(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 mB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gB(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,yg(n.key),n)}}function bB(e,t,r){return t&&gB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xB(e,t,r){return t=cs(t),wB(e,vg()?Reflect.construct(t,r||[],cs(e).constructor):t.apply(e,r))}function wB(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 OB(e)}function OB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vg=function(){return!!e})()}function cs(e){return cs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},cs(e)}function SB(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 fs(e,t,r){return t=yg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yg(e){var t=AB(e,"string");return Fn(t)=="symbol"?t:t+""}function AB(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 TB=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}),p={x:t?d.x.apply(o,{position:"start"}):d.x.rangeMin,y:n?d.y.apply(l,{position:"start"}):d.y.rangeMin},v={x:r?d.x.apply(s,{position:"end"}):d.x.rangeMax,y:a?d.y.apply(u,{position:"end"}):d.y.rangeMax};return Vt(i,"discard")&&(!d.isInRange(p)||!d.isInRange(v))?null:qm(p,v)},ds=function(e){function t(){return mB(this,t),xB(this,t,arguments)}return SB(t,e),bB(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;er(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Ye(a),d=Ye(i),p=Ye(o),v=Ye(s),y=this.props.shape;if(!f&&!d&&!p&&!v&&!y)return null;var h=TB(f,d,p,v,this.props);if(!h&&!y)return null;var b=Vt(this.props,"hidden")?"url(#".concat(c,")"):void 0;return A.createElement(xe,{className:ye("recharts-reference-area",l)},t.renderRect(y,hg(hg({clipPath:b},de(this.props,!0)),h)),at.renderCallByParent(this.props,h))}}])}(A.Component);fs(ds,"displayName","ReferenceArea"),fs(ds,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1}),fs(ds,"renderRect",function(e,t){var r;return A.isValidElement(e)?r=A.cloneElement(e,t):pe(e)?r=e(t):r=A.createElement(yc,Ic({},t,{className:"recharts-reference-area-rect"})),r});function mg(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 PB(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return x4(n,r)}function _B(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 ps(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 EB(e,t){return mg(e,t+1)}function jB(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 v=n==null?void 0:n[l];if(v===void 0)return{v:mg(n,u)};var y=l,h,b=function(){return h===void 0&&(h=r(v,y)),h},S=v.coordinate,x=l===0||ps(e,S,b,c,s);x||(l=0,c=o,u+=1),x&&(c=S+e*(b()/2+a),l+=u)},d;u<=i.length;)if(d=f(),d)return d.v;return[]}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 gg(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?gg(Object(r),!0).forEach(function(n){$B(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $B(e,t,r){return t=CB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CB(e){var t=kB(e,"string");return fi(t)=="symbol"?t:t+""}function kB(e,t){if(fi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(fi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function MB(e,t,r,n,a){for(var i=(n||[]).slice(),o=i.length,s=t.start,l=t.end,u=function(d){var p=i[d],v,y=function(){return v===void 0&&(v=r(p,d)),v};if(d===o-1){var h=e*(p.coordinate+e*y()/2-l);i[d]=p=it(it({},p),{},{tickCoord:h>0?p.coordinate-h*e:p.coordinate})}else i[d]=p=it(it({},p),{},{tickCoord:p.coordinate});var b=ps(e,p.tickCoord,y,s,l);b&&(l=p.tickCoord-e*(y()/2+a),i[d]=it(it({},p),{},{isShow:!0}))},c=o-1;c>=0;c--)u(c);return i}function NB(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=it(it({},c),{},{tickCoord:d>0?c.coordinate-d*e:c.coordinate});var p=ps(e,c.tickCoord,function(){return f},l,u);p&&(u=c.tickCoord-e*(f/2+a),o[s-1]=it(it({},c),{},{isShow:!0}))}for(var v=i?s-1:s,y=function(S){var x=o[S],T,m=function(){return T===void 0&&(T=r(x,S)),T};if(S===0){var w=e*(x.coordinate-e*m()/2-l);o[S]=x=it(it({},x),{},{tickCoord:w<0?x.coordinate-w*e:x.coordinate})}else o[S]=x=it(it({},x),{},{tickCoord:x.coordinate});var O=ps(e,x.tickCoord,m,l,u);O&&(l=x.tickCoord+e*(m()/2+a),o[S]=it(it({},x),{},{isShow:!0}))},h=0;h<v;h++)y(h);return o}function Rc(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(Z(l)||vr.isSsr)return EB(a,typeof l=="number"&&Z(l)?l:0);var d=[],p=s==="top"||s==="bottom"?"width":"height",v=c&&p==="width"?Sa(c,{fontSize:t,letterSpacing:r}):{width:0,height:0},y=function(x,T){var m=pe(u)?u(x.value,T):x.value;return p==="width"?PB(Sa(m,{fontSize:t,letterSpacing:r}),v,f):Sa(m,{fontSize:t,letterSpacing:r})[p]},h=a.length>=2?Ct(a[1].coordinate-a[0].coordinate):1,b=_B(i,h,p);return l==="equidistantPreserveStart"?jB(h,b,y,a,o):(l==="preserveStart"||l==="preserveStartEnd"?d=NB(h,b,y,a,o,l==="preserveStartEnd"):d=MB(h,b,y,a,o),d.filter(function(S){return S.isShow}))}var DB=["viewBox"],IB=["viewBox"],LB=["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 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 Qe(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){Wc(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 Bc(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 BB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xg(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,Og(n.key),n)}}function FB(e,t,r){return t&&xg(e.prototype,t),r&&xg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function WB(e,t,r){return t=hs(t),UB(e,wg()?Reflect.construct(t,r||[],hs(e).constructor):t.apply(e,r))}function UB(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 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 wg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wg=function(){return!!e})()}function hs(e){return hs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},hs(e)}function GB(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=Og(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Og(e){var t=KB(e,"string");return Wn(t)=="symbol"?t:t+""}function KB(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 BB(this,t),n=WB(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return GB(t,e),FB(t,[{key:"shouldComponentUpdate",value:function(n,a){var i=n.viewBox,o=Bc(n,DB),s=this.props,l=s.viewBox,u=Bc(s,IB);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,p,v,y,h,b,S,x=f?-1:1,T=n.tickSize||c,m=Z(n.tickCoord)?n.tickCoord:n.coordinate;switch(u){case"top":p=v=n.coordinate,h=o+ +!f*l,y=h-x*T,S=y-x*d,b=m;break;case"left":y=h=n.coordinate,v=i+ +!f*s,p=v-x*T,b=p-x*d,S=m;break;case"right":y=h=n.coordinate,v=i+ +f*s,p=v+x*T,b=p+x*d,S=m;break;default:p=v=n.coordinate,h=o+ +f*l,y=h+x*T,S=y+x*d,b=m;break}return{line:{x1:p,y1:y,x2:v,y2:h},tick:{x:b,y:S}}}},{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=Qe(Qe(Qe({},de(this.props,!1)),de(c,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var d=+(l==="top"&&!u||l==="bottom"&&u);f=Qe(Qe({},f),{},{x1:a,y1:i+d*s,x2:a+o,y2:i+d*s})}else{var p=+(l==="left"&&!u||l==="right"&&u);f=Qe(Qe({},f),{},{x1:a+p*o,y1:i,x2:a+p*o,y2:i+s})}return A.createElement("line",Un({},f,{className:ye("recharts-cartesian-axis-line",wt(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,p=Rc(Qe(Qe({},this.props),{},{ticks:n}),a,i),v=this.getTickTextAnchor(),y=this.getTickVerticalAnchor(),h=de(this.props,!1),b=de(c,!1),S=Qe(Qe({},h),{},{fill:"none"},de(l,!1)),x=p.map(function(T,m){var w=o.getTickLineCoord(T),O=w.line,P=w.tick,j=Qe(Qe(Qe(Qe({textAnchor:v,verticalAnchor:y},h),{},{stroke:"none",fill:u},b),P),{},{index:m,payload:T,visibleTicksCount:p.length,tickFormatter:f});return A.createElement(xe,Un({className:"recharts-cartesian-axis-tick",key:"tick-".concat(T.value,"-").concat(T.coordinate,"-").concat(T.tickCoord)},ha(o.props,T,m)),l&&A.createElement("line",Un({},S,O,{className:ye("recharts-cartesian-axis-tick-line",wt(l,"className"))})),c&&t.renderTickItem(c,j,"".concat(pe(f)?f(T.value,m):T.value).concat(d||"")))});return A.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,p=Bc(f,LB),v=d;return pe(l)&&(v=d&&d.length>0?l(this.props):l(p)),o<=0||s<=0||!v||!v.length?null:A.createElement(xe,{className:ye("recharts-cartesian-axis",u),ref:function(h){n.layerReference=h}},i&&this.renderAxisLine(),this.renderTicks(v,this.state.fontSize,this.state.letterSpacing),at.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,a,i){var o,s=ye(a.className,"recharts-cartesian-axis-tick-value");return A.isValidElement(n)?o=A.cloneElement(n,Qe(Qe({},a),{},{className:s})):pe(n)?o=n(Qe(Qe({},a),{},{className:s})):o=A.createElement(lo,Un({},a,{className:"recharts-cartesian-axis-tick-value"}),i),o}}])}(A.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 VB=["x1","y1","x2","y2","key"],qB=["offset"];function Vr(e){"@babel/helpers - typeof";return Vr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vr(e)}function 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 ot(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){HB(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 HB(e,t,r){return t=YB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YB(e){var t=XB(e,"string");return Vr(t)=="symbol"?t:t+""}function XB(e,t){if(Vr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Vr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qr(){return qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qr.apply(this,arguments)}function Ag(e,t){if(e==null)return{};var r=ZB(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 ZB(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var JB=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 A.createElement("rect",{x:a,y:i,ry:l,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function Tg(e,t){var r;if(A.isValidElement(e))r=A.cloneElement(e,t);else if(pe(e))r=e(t);else{var n=t.x1,a=t.y1,i=t.x2,o=t.y2,s=t.key,l=Ag(t,VB),u=de(l,!1);u.offset;var c=Ag(u,qB);r=A.createElement("line",qr({},c,{x1:n,y1:a,x2:i,y2:o,fill:"none",key:s}))}return r}function QB(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=ot(ot({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(l),index:l});return Tg(a,u)});return A.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function e8(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=ot(ot({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(l),index:l});return Tg(a,u)});return A.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function t8(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,p){return d-p});a!==c[0]&&c.unshift(0);var f=c.map(function(d,p){var v=!c[p+1],y=v?a+o-d:c[p+1]-d;if(y<=0)return null;var h=p%t.length;return A.createElement("rect",{key:"react-".concat(p),y:d,x:n,height:y,width:i,stroke:"none",fill:t[h],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return A.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function r8(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,p){return d-p});i!==c[0]&&c.unshift(0);var f=c.map(function(d,p){var v=!c[p+1],y=v?i+s-d:c[p+1]-d;if(y<=0)return null;var h=p%n.length;return A.createElement("rect",{key:"react-".concat(p),x:d,y:o,width:y,height:l,stroke:"none",fill:n[h],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return A.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var n8=function(t,r){var n=t.xAxis,a=t.width,i=t.height,o=t.offset;return ly(Rc(ot(ot(ot({},zn.defaultProps),n),{},{ticks:ur(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.left,o.left+o.width,r)},a8=function(t,r){var n=t.yAxis,a=t.width,i=t.height,o=t.offset;return ly(Rc(ot(ot(ot({},zn.defaultProps),n),{},{ticks:ur(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.top,o.top+o.height,r)},Gn={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Pg(e){var t,r,n,a,i,o,s=Ec(),l=jc(),u=K4(),c=ot(ot({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Gn.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Gn.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:Gn.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:Gn.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:Gn.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Gn.verticalFill,x:Z(e.x)?e.x:u.left,y:Z(e.y)?e.y:u.top,width:Z(e.width)?e.width:u.width,height:Z(e.height)?e.height:u.height}),f=c.x,d=c.y,p=c.width,v=c.height,y=c.syncWithTicks,h=c.horizontalValues,b=c.verticalValues,S=U4(),x=z4();if(!Z(p)||p<=0||!Z(v)||v<=0||!Z(f)||f!==+f||!Z(d)||d!==+d)return null;var T=c.verticalCoordinatesGenerator||n8,m=c.horizontalCoordinatesGenerator||a8,w=c.horizontalPoints,O=c.verticalPoints;if((!w||!w.length)&&pe(m)){var P=h&&h.length,j=m({yAxis:x?ot(ot({},x),{},{ticks:P?h:x.ticks}):void 0,width:s,height:l,offset:u},P?!0:y);er(Array.isArray(j),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Vr(j),"]")),Array.isArray(j)&&(w=j)}if((!O||!O.length)&&pe(T)){var M=b&&b.length,_=T({xAxis:S?ot(ot({},S),{},{ticks:M?b:S.ticks}):void 0,width:s,height:l,offset:u},M?!0:y);er(Array.isArray(_),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Vr(_),"]")),Array.isArray(_)&&(O=_)}return A.createElement("g",{className:"recharts-cartesian-grid"},A.createElement(JB,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),A.createElement(QB,qr({},c,{offset:u,horizontalPoints:w,xAxis:S,yAxis:x})),A.createElement(e8,qr({},c,{offset:u,verticalPoints:O,xAxis:S,yAxis:x})),A.createElement(t8,qr({},c,{horizontalPoints:w})),A.createElement(r8,qr({},c,{verticalPoints:O})))}Pg.displayName="CartesianGrid";var i8=["type","layout","connectNulls","ref"],o8=["key"];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 _g(e,t){if(e==null)return{};var r=s8(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 s8(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 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 Eg(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 bt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Eg(Object(r),!0).forEach(function(n){Lt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Eg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Vn(e){return f8(e)||c8(e)||u8(e)||l8()}function l8(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
202
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u8(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 c8(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function f8(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 d8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jg(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 p8(e,t,r){return t&&jg(e.prototype,t),r&&jg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h8(e,t,r){return t=vs(t),v8(e,$g()?Reflect.construct(t,r||[],vs(e).constructor):t.apply(e,r))}function v8(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 y8(e)}function y8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($g=function(){return!!e})()}function vs(e){return vs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},vs(e)}function m8(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 Lt(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=g8(e,"string");return Kn(t)=="symbol"?t:t+""}function g8(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 pi=function(e){function t(){var r;d8(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=h8(this,t,[].concat(a)),Lt(r,"state",{isAnimationFinished:!0,totalLength:0}),Lt(r,"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),Lt(r,"getStrokeDasharray",function(o,s,l){var u=l.reduce(function(b,S){return b+S});if(!u)return r.generateSimpleStrokeDasharray(s,o);for(var c=Math.floor(o/u),f=o%u,d=s-o,p=[],v=0,y=0;v<l.length;y+=l[v],++v)if(y+l[v]>f){p=[].concat(Vn(l.slice(0,v)),[f-y]);break}var h=p.length%2===0?[0,d]:[d];return[].concat(Vn(t.repeat(l,c)),Vn(p),h).map(function(b){return"".concat(b,"px")}).join(", ")}),Lt(r,"id",$r("recharts-line-")),Lt(r,"pathRef",function(o){r.mainCurve=o}),Lt(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Lt(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return m8(t,e),p8(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=dt(c,jn);if(!f)return null;var d=function(y,h){return{x:y.x,y:y.y,value:y.value,errorVal:Ze(y.payload,h)}},p={clipPath:n?"url(#clipPath-".concat(a,")"):null};return A.createElement(xe,p,f.map(function(v){return A.cloneElement(v,{key:"bar-".concat(v.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),p=u.map(function(y,h){var b=bt(bt(bt({key:"dot-".concat(h),r:3},f),d),{},{index:h,cx:y.x,cy:y.y,value:y.value,dataKey:c,payload:y.payload,points:u});return t.renderDotItem(l,b)}),v={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return A.createElement(xe,di({className:"recharts-line-dots",key:"dots"},v),p)}},{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=_g(s,i8),d=bt(bt(bt({},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 A.createElement(Gr,di({},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,p=o.animationId,v=o.animateNewValues,y=o.width,h=o.height,b=this.state,S=b.prevPoints,x=b.totalLength;return A.createElement(Dt,{begin:c,duration:f,isActive:u,easing:d,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(T){var m=T.t;if(S){var w=S.length/s.length,O=s.map(function($,R){var k=Math.floor(R*w);if(S[k]){var D=S[k],C=Ue(D.x,$.x),B=Ue(D.y,$.y);return bt(bt({},$),{},{x:C(m),y:B(m)})}if(v){var U=Ue(y*2,$.x),G=Ue(h/2,$.y);return bt(bt({},$),{},{x:U(m),y:G(m)})}return bt(bt({},$),{},{x:$.x,y:$.y})});return i.renderCurveStatically(O,n,a)}var P=Ue(0,x),j=P(m),M;if(l){var _="".concat(l).split(/[,\s]+/gim).map(function($){return parseFloat($)});M=i.getStrokeDasharray(j,x,_)}else M=i.generateSimpleStrokeDasharray(x,j);return i.renderCurveStatically(s,n,a,{strokeDasharray:M})})}},{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||!Br(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,p=a.width,v=a.height,y=a.isAnimationActive,h=a.id;if(i||!s||!s.length)return null;var b=this.state.isAnimationFinished,S=s.length===1,x=ye("recharts-line",l),T=u&&u.allowDataOverflow,m=c&&c.allowDataOverflow,w=T||m,O=fe(h)?this.id:h,P=(n=de(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},j=P.r,M=j===void 0?3:j,_=P.strokeWidth,$=_===void 0?2:_,R=ed(o)?o:{},k=R.clipDot,D=k===void 0?!0:k,C=M*2+$;return A.createElement(xe,{className:x},T||m?A.createElement("defs",null,A.createElement("clipPath",{id:"clipPath-".concat(O)},A.createElement("rect",{x:T?d:d-p/2,y:m?f:f-v/2,width:T?p:p*2,height:m?v:v*2})),!D&&A.createElement("clipPath",{id:"clipPath-dots-".concat(O)},A.createElement("rect",{x:d-C/2,y:f-C/2,width:p+C,height:v+C}))):null,!S&&this.renderCurve(w,O),this.renderErrorBar(w,O),(S||o)&&this.renderDots(w,D,O),(!y||b)&&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(Vn(n),[0]):n,o=[],s=0;s<a;++s)o=[].concat(Vn(o),Vn(i));return o}},{key:"renderDotItem",value:function(n,a){var i;if(A.isValidElement(n))i=A.cloneElement(n,a);else if(pe(n))i=n(a);else{var o=a.key,s=_g(a,o8),l=ye("recharts-line-dot",typeof n!="boolean"?n.className:"");i=A.createElement(Ho,di({key:o},s,{className:l}))}return i}}])}(A.PureComponent);Lt(pi,"displayName","Line"),Lt(pi,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!vr.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),Lt(pi,"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,p){var v=Ze(d,o);return c==="horizontal"?{x:Cn({axis:r,ticks:a,bandSize:s,entry:d,index:p}),y:fe(v)?null:n.scale(v),value:v,payload:d}:{x:fe(v)?null:r.scale(v),y:Cn({axis:n,ticks:i,bandSize:s,entry:d,index:p}),value:v,payload:d}});return bt({points:f,layout:c},u)});var b8=["layout","type","stroke","connectNulls","isRange","ref"],x8=["key"],kg;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 Mg(e,t){if(e==null)return{};var r=w8(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 w8(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Hr(){return Hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hr.apply(this,arguments)}function 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 Sr(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){qt(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 O8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dg(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 S8(e,t,r){return t&&Dg(e.prototype,t),r&&Dg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function A8(e,t,r){return t=ys(t),T8(e,Ig()?Reflect.construct(t,r||[],ys(e).constructor):t.apply(e,r))}function T8(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 P8(e)}function P8(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 _8(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 qt(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=E8(e,"string");return qn(t)=="symbol"?t:t+""}function E8(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 Ar=function(e){function t(){var r;O8(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=A8(this,t,[].concat(a)),qt(r,"state",{isAnimationFinished:!0}),qt(r,"id",$r("recharts-area-")),qt(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),pe(o)&&o()}),qt(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),pe(o)&&o()}),r}return _8(t,e),S8(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),p=de(u,!0),v=c.map(function(h,b){var S=Sr(Sr(Sr({key:"dot-".concat(b),r:3},d),p),{},{index:b,cx:h.x,cy:h.y,dataKey:f,value:h.value,payload:h.payload,points:c});return t.renderDotItem(u,S)}),y={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return A.createElement(xe,Hr({className:"recharts-area-dots"},y),v)}},{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=br(o.map(function(d){return d.y||0}));return Z(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(br(i.map(function(d){return d.y||0})),f)),Z(f)?A.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=br(o.map(function(d){return d.x||0}));return Z(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(br(i.map(function(d){return d.x||0})),f)),Z(f)?A.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 p=Mg(s,b8);return A.createElement(xe,{clipPath:i?"url(#clipPath-".concat(o,")"):null},A.createElement(Gr,Hr({},de(p,!0),{points:n,connectNulls:f,type:u,baseLine:a,layout:l,stroke:"none",className:"recharts-area-area"})),c!=="none"&&A.createElement(Gr,Hr({},de(this.props,!1),{className:"recharts-area-curve",layout:l,type:u,connectNulls:f,fill:"none",points:n})),c!=="none"&&d&&A.createElement(Gr,Hr({},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,p=o.animationId,v=this.state,y=v.prevPoints,h=v.prevBaseLine;return A.createElement(Dt,{begin:c,duration:f,isActive:u,easing:d,from:{t:0},to:{t:1},key:"area-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(b){var S=b.t;if(y){var x=y.length/s.length,T=s.map(function(P,j){var M=Math.floor(j*x);if(y[M]){var _=y[M],$=Ue(_.x,P.x),R=Ue(_.y,P.y);return Sr(Sr({},P),{},{x:$(S),y:R(S)})}return P}),m;if(Z(l)&&typeof l=="number"){var w=Ue(h,l);m=w(S)}else if(fe(l)||sn(l)){var O=Ue(h,0);m=O(S)}else m=l.map(function(P,j){var M=Math.floor(j*x);if(h[M]){var _=h[M],$=Ue(_.x,P.x),R=Ue(_.y,P.y);return Sr(Sr({},P),{},{x:$(S),y:R(S)})}return P});return i.renderAreaStatically(T,m,n,a)}return A.createElement(xe,null,A.createElement("defs",null,A.createElement("clipPath",{id:"animationClipPath-".concat(a)},i.renderClipRect(S))),A.createElement(xe,{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||!Br(c,o)||!Br(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,p=a.width,v=a.height,y=a.isAnimationActive,h=a.id;if(i||!s||!s.length)return null;var b=this.state.isAnimationFinished,S=s.length===1,x=ye("recharts-area",l),T=f&&f.allowDataOverflow,m=d&&d.allowDataOverflow,w=T||m,O=fe(h)?this.id:h,P=(n=de(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},j=P.r,M=j===void 0?3:j,_=P.strokeWidth,$=_===void 0?2:_,R=ed(o)?o:{},k=R.clipDot,D=k===void 0?!0:k,C=M*2+$;return A.createElement(xe,{className:x},T||m?A.createElement("defs",null,A.createElement("clipPath",{id:"clipPath-".concat(O)},A.createElement("rect",{x:T?c:c-p/2,y:m?u:u-v/2,width:T?p:p*2,height:m?v:v*2})),!D&&A.createElement("clipPath",{id:"clipPath-dots-".concat(O)},A.createElement("rect",{x:c-C/2,y:u-C/2,width:p+C,height:v+C}))):null,S?null:this.renderArea(w,O),(o||S)&&this.renderDots(w,D,O),(!y||b)&&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}}])}(A.PureComponent);kg=Ar,qt(Ar,"displayName","Area"),qt(Ar,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!vr.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),qt(Ar,"getBaseValue",function(e,t,r,n){var a=e.layout,i=e.baseValue,o=t.props.baseValue,s=o??i;if(Z(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]}),qt(Ar,"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,p=t.layout,v=u&&u.length,y=kg.getBaseValue(t,r,n,a),h=p==="horizontal",b=!1,S=f.map(function(T,m){var w;v?w=u[c+m]:(w=Ze(T,l),Array.isArray(w)?b=!0:w=[y,w]);var O=w[1]==null||v&&Ze(T,l)==null;return h?{x:Cn({axis:n,ticks:i,bandSize:s,entry:T,index:m}),y:O?null:a.scale(w[1]),value:w,payload:T}:{x:O?null:n.scale(w[1]),y:Cn({axis:a,ticks:o,bandSize:s,entry:T,index:m}),value:w,payload:T}}),x;return v||b?x=S.map(function(T){var m=Array.isArray(T.value)?T.value[0]:null;return h?{x:T.x,y:m!=null&&T.y!=null?a.scale(m):null}:{x:m!=null?n.scale(m):null,y:T.y}}):x=h?a.scale(y):n.scale(y),Sr({points:S,baseLine:x,layout:p,isRange:b},d)}),qt(Ar,"renderDotItem",function(e,t){var r;if(A.isValidElement(e))r=A.cloneElement(e,t);else if(pe(e))r=e(t);else{var n=ye("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=Mg(t,x8);r=A.createElement(Ho,Hr({},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 j8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $8(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,Fg(n.key),n)}}function C8(e,t,r){return t&&$8(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function k8(e,t,r){return t=ms(t),M8(e,Rg()?Reflect.construct(t,r||[],ms(e).constructor):t.apply(e,r))}function M8(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 N8(e)}function N8(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 ms(e){return ms=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ms(e)}function D8(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 Bg(e,t,r){return t=Fg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fg(e){var t=I8(e,"string");return Hn(t)=="symbol"?t:t+""}function I8(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 gs=function(e){function t(){return j8(this,t),k8(this,t,arguments)}return D8(t,e),C8(t,[{key:"render",value:function(){return null}}])}(xt.Component);Bg(gs,"displayName","ZAxis"),Bg(gs,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var L8=["option","isActive"];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 R8(e,t){if(e==null)return{};var r=B8(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 B8(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 F8(e){var t=e.option,r=e.isActive,n=R8(e,L8);return typeof t=="string"?xt.createElement(bc,hi({option:xt.createElement(Vi,hi({type:t},n)),isActive:r,shapeType:"symbols"},n)):xt.createElement(bc,hi({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 vi(){return vi=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},vi.apply(this,arguments)}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 Et(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){Tr(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 W8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ug(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,Gg(n.key),n)}}function U8(e,t,r){return t&&Ug(e.prototype,t),r&&Ug(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function z8(e,t,r){return t=bs(t),G8(e,zg()?Reflect.construct(t,r||[],bs(e).constructor):t.apply(e,r))}function G8(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 K8(e)}function K8(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 bs(e){return bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bs(e)}function V8(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 Tr(e,t,r){return t=Gg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gg(e){var t=q8(e,"string");return Yn(t)=="symbol"?t:t+""}function q8(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 xs=function(e){function t(){var r;W8(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=z8(this,t,[].concat(a)),Tr(r,"state",{isAnimationFinished:!1}),Tr(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0})}),Tr(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1})}),Tr(r,"id",$r("recharts-scatter-")),r}return V8(t,e),U8(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,p=d?s:o,v=Et(Et({},u),c);return A.createElement(xe,vi({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)},ha(a.props,c,f),{role:"img"}),A.createElement(F8,vi({option:p,isActive:d,key:"symbol-".concat(f)},v)))})}},{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 A.createElement(Dt,{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 p=d.t,v=i.map(function(y,h){var b=f&&f[h];if(b){var S=Ue(b.cx,y.cx),x=Ue(b.cy,y.cy),T=Ue(b.size,y.size);return Et(Et({},y),{},{cx:S(p),cy:x(p),size:T(p)})}var m=Ue(0,y.size);return Et(Et({},y),{},{size:m(p)})});return A.createElement(xe,null,n.renderSymbolsStatically(v))})}},{key:"renderSymbols",value:function(){var n=this.props,a=n.points,i=n.isAnimationActive,o=this.state.prevPoints;return i&&a&&a.length&&(!o||!Br(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=dt(l,jn);return u?u.map(function(c,f){var d=c.props,p=d.direction,v=d.dataKey;return A.cloneElement(c,{key:"".concat(p,"-").concat(v,"-").concat(i[f]),data:i,xAxis:o,yAxis:s,layout:p==="x"?"vertical":"horizontal",dataPointFormatter:function(h,b){return{x:h.cx,y:h.cy,value:p==="x"?+h.node.x:+h.node.y,errorVal:Ze(h,b)}}})}):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(x){return{x:x.cx,y:x.cy}});else if(o==="fitting"){var d=gO(a),p=d.xmin,v=d.xmax,y=d.a,h=d.b,b=function(T){return y*T+h};c=[{x:p,y:b(p)},{x:v,y:b(v)}]}var S=Et(Et(Et({},l),{},{fill:"none",stroke:l&&l.fill},u),{},{points:c});return A.isValidElement(i)?f=A.cloneElement(i,S):pe(i)?f=i(S):f=A.createElement(Gr,vi({},S,{type:s})),A.createElement(xe,{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,p=n.height,v=n.id,y=n.isAnimationActive;if(a||!i||!i.length)return null;var h=this.state.isAnimationFinished,b=ye("recharts-scatter",s),S=l&&l.allowDataOverflow,x=u&&u.allowDataOverflow,T=S||x,m=fe(v)?this.id:v;return A.createElement(xe,{className:b,clipPath:T?"url(#clipPath-".concat(m,")"):null},S||x?A.createElement("defs",null,A.createElement("clipPath",{id:"clipPath-".concat(m)},A.createElement("rect",{x:S?c:c-d/2,y:x?f:f-p/2,width:S?d:d*2,height:x?p:p*2}))):null,o&&this.renderLine(),this.renderErrorBar(),A.createElement(xe,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!y||h)&&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}}])}(A.PureComponent);Tr(xs,"displayName","Scatter"),Tr(xs,"defaultProps",{xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!vr.isSsr,animationBegin:0,animationDuration:400,animationEasing:"linear"}),Tr(xs,"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=dt(a.props.children,Hl),f=fe(t.dataKey)?a.props.dataKey:t.dataKey,d=fe(r.dataKey)?a.props.dataKey:r.dataKey,p=n&&n.dataKey,v=n?n.range:gs.defaultProps.range,y=v&&v[0],h=t.scale.bandwidth?t.scale.bandwidth():0,b=r.scale.bandwidth?r.scale.bandwidth():0,S=i.map(function(x,T){var m=Ze(x,f),w=Ze(x,d),O=!fe(p)&&Ze(x,p)||"-",P=[{name:fe(t.dataKey)?a.props.name:t.name||t.dataKey,unit:t.unit||"",value:m,payload:x,dataKey:f,type:u},{name:fe(r.dataKey)?a.props.name:r.name||r.dataKey,unit:r.unit||"",value:w,payload:x,dataKey:d,type:u}];O!=="-"&&P.push({name:n.name||n.dataKey,unit:n.unit||"",value:O,payload:x,dataKey:p,type:u});var j=Cn({axis:t,ticks:o,bandSize:h,entry:x,index:T,dataKey:f}),M=Cn({axis:r,ticks:s,bandSize:b,entry:x,index:T,dataKey:d}),_=O!=="-"?n.scale(O):y,$=Math.sqrt(Math.max(_,0)/Math.PI);return Et(Et({},x),{},{cx:j,cy:M,x:j-$,y:M-$,xAxis:t,yAxis:r,zAxis:n,width:2*$,height:2*$,size:_,node:{x:m,y:w,z:O},tooltipPayload:P,tooltipPosition:{x:j,y:M},payload:x},c&&c[T]&&c[T].props)});return Et({points:S},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 H8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y8(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 X8(e,t,r){return t&&Y8(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Z8(e,t,r){return t=ws(t),J8(e,Kg()?Reflect.construct(t,r||[],ws(e).constructor):t.apply(e,r))}function J8(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 Q8(e)}function Q8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Kg=function(){return!!e})()}function ws(e){return ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ws(e)}function eF(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 Vg(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=tF(e,"string");return Xn(t)=="symbol"?t:t+""}function tF(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 rF(e){var t=e.xAxisId,r=Ec(),n=jc(),a=rg(t);return a==null?null:xt.createElement(zn,Hc({},a,{className:ye("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return ur(o,!0)}}))}var Os=function(e){function t(){return H8(this,t),Z8(this,t,arguments)}return eF(t,e),X8(t,[{key:"render",value:function(){return xt.createElement(rF,this.props)}}])}(xt.Component);Vg(Os,"displayName","XAxis"),Vg(Os,"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 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 nF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aF(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&&aF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oF(e,t,r){return t=Ss(t),sF(e,Hg()?Reflect.construct(t,r||[],Ss(e).constructor):t.apply(e,r))}function sF(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 lF(e)}function lF(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 Ss(e){return Ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ss(e)}function uF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&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 Yg(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=cF(e,"string");return Zn(t)=="symbol"?t:t+""}function cF(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)}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 fF=function(t){var r=t.yAxisId,n=Ec(),a=jc(),i=ng(r);return i==null?null:xt.createElement(zn,Xc({},i,{className:ye("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:a},ticksGenerator:function(s){return ur(s,!0)}}))},As=function(e){function t(){return nF(this,t),oF(this,t,arguments)}return uF(t,e),iF(t,[{key:"render",value:function(){return xt.createElement(fF,this.props)}}])}(xt.Component);Yg(As,"displayName","YAxis"),Yg(As,"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 Zg(e){return vF(e)||hF(e)||pF(e)||dF()}function dF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
203
- 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 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 hF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vF(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}var Jc=function(t,r,n,a,i){var o=dt(t,Mc),s=dt(t,us),l=[].concat(Zg(o),Zg(s)),u=dt(t,ds),c="".concat(a,"Id"),f=a[0],d=r;if(l.length&&(d=l.reduce(function(y,h){if(h.props[c]===n&&Vt(h.props,"extendDomain")&&Z(h.props[f])){var b=h.props[f];return[Math.min(y[0],b),Math.max(y[1],b)]}return y},d)),u.length){var p="".concat(f,"1"),v="".concat(f,"2");d=u.reduce(function(y,h){if(h.props[c]===n&&Vt(h.props,"extendDomain")&&Z(h.props[p])&&Z(h.props[v])){var b=h.props[p],S=h.props[v];return[Math.min(y[0],b,S),Math.max(y[1],b,S)]}return y},d)}return i&&i.length&&(d=i.reduce(function(y,h){return Z(h)?[Math.min(y[0],h),Math.max(y[1],h)]:y},d)),d},Jg={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 p=new a(c,f||l,d),v=r?r+u:u;return l._events[v]?l._events[v].fn?l._events[v]=[l._events[v],p]:l._events[v].push(p):(l._events[v]=p,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,p=f.length,v=new Array(p);d<p;d++)v[d]=f[d].fn;return v},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,p,v){var y=r?r+u:u;if(!this._events[y])return!1;var h=this._events[y],b=arguments.length,S,x;if(h.fn){switch(h.once&&this.removeListener(u,h.fn,void 0,!0),b){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,c),!0;case 3:return h.fn.call(h.context,c,f),!0;case 4:return h.fn.call(h.context,c,f,d),!0;case 5:return h.fn.call(h.context,c,f,d,p),!0;case 6:return h.fn.call(h.context,c,f,d,p,v),!0}for(x=1,S=new Array(b-1);x<b;x++)S[x-1]=arguments[x];h.fn.apply(h.context,S)}else{var T=h.length,m;for(x=0;x<T;x++)switch(h[x].once&&this.removeListener(u,h[x].fn,void 0,!0),b){case 1:h[x].fn.call(h[x].context);break;case 2:h[x].fn.call(h[x].context,c);break;case 3:h[x].fn.call(h[x].context,c,f);break;case 4:h[x].fn.call(h[x].context,c,f,d);break;default:if(!S)for(m=1,S=new Array(b-1);m<b;m++)S[m-1]=arguments[m];h[x].fn.apply(h[x].context,S)}}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 p=r?r+u:u;if(!this._events[p])return this;if(!c)return o(this,p),this;var v=this._events[p];if(v.fn)v.fn===c&&(!d||v.once)&&(!f||v.context===f)&&o(this,p);else{for(var y=0,h=[],b=v.length;y<b;y++)(v[y].fn!==c||d&&!v[y].once||f&&v[y].context!==f)&&h.push(v[y]);h.length?this._events[p]=h.length===1?h[0]:h:o(this,p)}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})(Jg);var yF=Jg.exports;const mF=Ce(yF);var Qc=new mF,ef="recharts.syncMouseEvents";function yi(e){"@babel/helpers - typeof";return yi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yi(e)}function gF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bF(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 xF(e,t,r){return t&&bF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function tf(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=wF(e,"string");return yi(t)=="symbol"?t:t+""}function wF(e,t){if(yi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var OF=function(){function e(){gF(this,e),tf(this,"activeIndex",0),tf(this,"coordinateList",[]),tf(this,"layout","horizontal")}return xF(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,p=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=p??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 SF(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&&Z(n)&&Z(a))return!0}return!1}function AF(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 eb(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,i=e.endAngle,o=rt(t,r,n,a),s=rt(t,r,n,i);return{points:[o,s],cx:t,cy:r,radius:n,startAngle:a,endAngle:i}}function TF(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=rt(s,l,u,f),p=rt(s,l,c,f);n=d.x,a=d.y,i=p.x,o=p.y}else return eb(t);return[{x:n,y:a},{x:i,y:o}]}function mi(e){"@babel/helpers - typeof";return mi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mi(e)}function tb(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 Ts(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tb(Object(r),!0).forEach(function(n){PF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function 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=EF(e,"string");return mi(t)=="symbol"?t:t+""}function EF(e,t){if(mi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(mi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jF(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,p=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!p||!i||!o||d!=="ScatterChart"&&a!=="axis")return null;var v,y=Gr;if(d==="ScatterChart")v=o,y=e5;else if(d==="BarChart")v=AF(f,o,l,c),y=yc;else if(f==="radial"){var h=eb(o),b=h.cx,S=h.cy,x=h.radius,T=h.startAngle,m=h.endAngle;v={cx:b,cy:S,startAngle:T,endAngle:m,innerRadius:x,outerRadius:x},y=_y}else v={points:TF(f,o,l)},y=Gr;var w=Ts(Ts(Ts(Ts({stroke:"#ccc",pointerEvents:"none"},l),v),de(p,!1)),{},{payload:s,payloadIndex:u,className:ye("recharts-tooltip-cursor",p.className)});return A.isValidElement(p)?A.cloneElement(p,w):A.createElement(y,w)}var $F=["item"],CF=["children","className","width","height","style","compact","title","desc"];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 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 rb(e,t){return NF(e)||MF(e,t)||ib(e,t)||kF()}function kF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
204
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MF(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 NF(e){if(Array.isArray(e))return e}function nb(e,t){if(e==null)return{};var r=DF(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 DF(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 IF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LF(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,sb(n.key),n)}}function RF(e,t,r){return t&&LF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function BF(e,t,r){return t=Ps(t),FF(e,ab()?Reflect.construct(t,r||[],Ps(e).constructor):t.apply(e,r))}function FF(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 WF(e)}function WF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ab(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ab=function(){return!!e})()}function Ps(e){return Ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ps(e)}function UF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&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 KF(e)||GF(e)||ib(e)||zF()}function zF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
205
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ib(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 GF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function KF(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 ob(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 z(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ob(Object(r),!0).forEach(function(n){oe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ob(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oe(e,t,r){return t=sb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sb(e){var t=VF(e,"string");return Jn(t)=="symbol"?t:t+""}function VF(e,t){if(Jn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Jn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qF={xAxis:["bottom","top"],yAxis:["left","right"]},HF={width:"100%",height:"100%"},lb={x:0,y:0};function _s(e){return e}var YF=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},XF=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 z(z(z({},a),rt(a.cx,a.cy,s,o)),{},{angle:o,radius:s})}var l=i.coordinate,u=a.angle;return z(z(z({},a),rt(a.cx,a.cy,l,u)),{},{angle:u,radius:l})}return lb},Es=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&&Z(a)&&Z(i)?t.slice(a,i+1):[]};function ub(e){return e==="number"?[0,"auto"]:void 0}var af=function(t,r,n,a){var i=t.graphicalItems,o=t.tooltipAxis,s=Es(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 p=f===void 0?s:f;d=Ni(p,o.dataKey,a)}else d=f&&f[n]||s[n];return d?[].concat(ea(l),[vy(u,d)]):l},[])},cb=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},o=YF(i,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,c=CI(o,s,u,l);if(c>=0&&u){var f=u[c]&&u[c].value,d=af(t,r,c,f),p=XF(n,s,c,i);return{activeTooltipIndex:c,activeLabel:f,activePayload:d,activeCoordinate:p}}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,p=sy(c,i);return n.reduce(function(v,y){var h,b=y.type.defaultProps!==void 0?z(z({},y.type.defaultProps),y.props):y.props,S=b.type,x=b.dataKey,T=b.allowDataOverflow,m=b.allowDuplicatedCategory,w=b.scale,O=b.ticks,P=b.includeHidden,j=b[o];if(v[j])return v;var M=Es(t.data,{graphicalItems:a.filter(function(F){var W,K=o in F.props?F.props[o]:(W=F.type.defaultProps)===null||W===void 0?void 0:W[o];return K===j}),dataStartIndex:l,dataEndIndex:u}),_=M.length,$,R,k;SF(b.domain,T,S)&&($=qu(b.domain,null,T),p&&(S==="number"||w!=="auto")&&(k=za(M,x,"category")));var D=ub(S);if(!$||$.length===0){var C,B=(C=b.domain)!==null&&C!==void 0?C:D;if(x){if($=za(M,x,S),S==="category"&&p){var U=mO($);m&&U?(R=$,$=Qo(0,_)):m||($=hy(B,$,y).reduce(function(F,W){return F.indexOf(W)>=0?F:[].concat(ea(F),[W])},[]))}else if(S==="category")m?$=$.filter(function(F){return F!==""&&!fe(F)}):$=hy(B,$,y).reduce(function(F,W){return F.indexOf(W)>=0||W===""||fe(W)?F:[].concat(ea(F),[W])},[]);else if(S==="number"){var G=II(M,a.filter(function(F){var W,K,X=o in F.props?F.props[o]:(W=F.type.defaultProps)===null||W===void 0?void 0:W[o],Q="hide"in F.props?F.props.hide:(K=F.type.defaultProps)===null||K===void 0?void 0:K.hide;return X===j&&(P||!Q)}),x,i,c);G&&($=G)}p&&(S==="number"||w!=="auto")&&(k=za(M,x,"category"))}else p?$=Qo(0,_):s&&s[j]&&s[j].hasStack&&S==="number"?$=d==="expand"?[0,1]:fy(s[j].stackGroups,l,u):$=oy(M,a.filter(function(F){var W=o in F.props?F.props[o]:F.type.defaultProps[o],K="hide"in F.props?F.props.hide:F.type.defaultProps.hide;return W===j&&(P||!K)}),S,c,!0);if(S==="number")$=Jc(f,$,j,i,O),B&&($=qu(B,$,T));else if(S==="category"&&B){var E=B,L=$.every(function(F){return E.indexOf(F)>=0});L&&($=E)}}return z(z({},v),{},oe({},j,z(z({},b),{},{axisType:i,domain:$,categoricalDomain:k,duplicateDomain:R,originalDomain:(h=b.domain)!==null&&h!==void 0?h:D,isCategorical:p,layout:c})))},{})},JF=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=Es(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),p=d.length,v=sy(c,i),y=-1;return n.reduce(function(h,b){var S=b.type.defaultProps!==void 0?z(z({},b.type.defaultProps),b.props):b.props,x=S[o],T=ub("number");if(!h[x]){y++;var m;return v?m=Qo(0,p):s&&s[x]&&s[x].hasStack?(m=fy(s[x].stackGroups,l,u),m=Jc(f,m,x,i)):(m=qu(T,oy(d,n.filter(function(w){var O,P,j=o in w.props?w.props[o]:(O=w.type.defaultProps)===null||O===void 0?void 0:O[o],M="hide"in w.props?w.props.hide:(P=w.type.defaultProps)===null||P===void 0?void 0:P.hide;return j===x&&!M}),"number",c),a.defaultProps.allowDataOverflow),m=Jc(f,m,x,i)),z(z({},h),{},oe({},x,z(z({axisType:i},a.defaultProps),{},{hide:!0,orientation:wt(qF,"".concat(i,".").concat(y%2),null),domain:m,originalDomain:T,isCategorical:v,layout:c})))}return h},{})},QF=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=dt(c,i),p={};return d&&d.length?p=ZF(t,{axes:d,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(p=JF(t,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),p},eW=function(t){var r=pr(t),n=ur(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Fl(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Io(r,n)}},fb=function(t){var r=t.children,n=t.defaultShowTooltip,a=yt(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}},tW=function(t){return!t||!t.length?!1:t.some(function(r){var n=Qt(r&&r.type);return n&&n.indexOf("Bar")>=0})},db=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"}},rW=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||{},p=yt(f,Nn),v=yt(f,vn),y=Object.keys(l).reduce(function(m,w){var O=l[w],P=O.orientation;return!O.mirror&&!O.hide?z(z({},m),{},oe({},P,m[P]+O.width)):m},{left:d.left||0,right:d.right||0}),h=Object.keys(o).reduce(function(m,w){var O=o[w],P=O.orientation;return!O.mirror&&!O.hide?z(z({},m),{},oe({},P,wt(m,"".concat(P))+O.height)):m},{top:d.top||0,bottom:d.bottom||0}),b=z(z({},h),y),S=b.bottom;p&&(b.bottom+=p.props.height||Nn.defaultProps.height),v&&r&&(b=NI(b,a,n,r));var x=u-b.left-b.right,T=c-b.top-b.bottom;return z(z({brushBottom:S},b),{},{width:Math.max(x,0),height:Math.max(T,0)})},nW=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},aW=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(b,S){var x=S.graphicalItems,T=S.stackGroups,m=S.offset,w=S.updateId,O=S.dataStartIndex,P=S.dataEndIndex,j=b.barSize,M=b.layout,_=b.barGap,$=b.barCategoryGap,R=b.maxBarSize,k=db(M),D=k.numericAxisName,C=k.cateAxisName,B=tW(x),U=[];return x.forEach(function(G,E){var L=Es(b.data,{graphicalItems:[G],dataStartIndex:O,dataEndIndex:P}),F=G.type.defaultProps!==void 0?z(z({},G.type.defaultProps),G.props):G.props,W=F.dataKey,K=F.maxBarSize,X=F["".concat(D,"Id")],Q=F["".concat(C,"Id")],ae={},te=l.reduce(function(Ge,lt){var Ai,Ti,aa=S["".concat(lt.axisType,"Map")],Pi=F["".concat(lt.axisType,"Id")];aa&&aa[Pi]||lt.axisType==="zAxis"||(process.env.NODE_ENV!=="production"?ht(!1,"Specifying a(n) ".concat(lt.axisType,"Id requires a corresponding ").concat(lt.axisType,"Id on the targeted graphical component ").concat((Ai=G==null||(Ti=G.type)===null||Ti===void 0?void 0:Ti.displayName)!==null&&Ai!==void 0?Ai:"")):ht());var _i=aa[Pi];return z(z({},Ge),{},oe(oe({},lt.axisType,_i),"".concat(lt.axisType,"Ticks"),ur(_i)))},ae),V=te[C],Y=te["".concat(C,"Ticks")],J=T&&T[X]&&T[X].hasStack&&HI(G,T[X].stackGroups),I=Qt(G.type).indexOf("Bar")>=0,ie=Io(V,Y),q=[],se=B&&kI({barSize:j,stackGroups:T,totalSize:nW(te,C)});if(I){var ee,ve,We=fe(K)?R:K,Re=(ee=(ve=Io(V,Y,!0))!==null&&ve!==void 0?ve:We)!==null&&ee!==void 0?ee:0;q=MI({barGap:_,barCategoryGap:$,bandSize:Re!==ie?Re:ie,sizeList:se[Q],maxBarSize:We}),Re!==ie&&(q=q.map(function(Ge){return z(z({},Ge),{},{position:z(z({},Ge.position),{},{offset:Ge.position.offset-Re/2})})}))}var Be=G&&G.type&&G.type.getComposedData;Be&&U.push({props:z(z({},Be(z(z({},te),{},{displayedData:L,props:b,dataKey:W,item:G,bandSize:ie,barPosition:q,offset:m,stackedData:J,layout:M,dataStartIndex:O,dataEndIndex:P}))),{},oe(oe(oe({key:G.key||"item-".concat(E)},D,te[D]),C,te[C]),"animationId",w)),childIndex:$O(G,b.children),item:G})}),U},p=function(b,S){var x=b.props,T=b.dataStartIndex,m=b.dataEndIndex,w=b.updateId;if(!Qf({props:x}))return null;var O=x.children,P=x.layout,j=x.stackOffset,M=x.data,_=x.reverseStackOrder,$=db(P),R=$.numericAxisName,k=$.cateAxisName,D=dt(O,n),C=KI(M,D,"".concat(R,"Id"),"".concat(k,"Id"),j,_),B=l.reduce(function(F,W){var K="".concat(W.axisType,"Map");return z(z({},F),{},oe({},K,QF(x,z(z({},W),{},{graphicalItems:D,stackGroups:W.axisType===R&&C,dataStartIndex:T,dataEndIndex:m}))))},{}),U=rW(z(z({},B),{},{props:x,graphicalItems:D}),S==null?void 0:S.legendBBox);Object.keys(B).forEach(function(F){B[F]=c(x,B[F],U,F.replace("Map",""),r)});var G=B["".concat(k,"Map")],E=eW(G),L=d(x,z(z({},B),{},{dataStartIndex:T,dataEndIndex:m,updateId:w,graphicalItems:D,stackGroups:C,offset:U}));return z(z({formattedGraphicalItems:L,graphicalItems:D,offset:U,stackGroups:C},E),B)},v=function(h){function b(S){var x,T,m;return IF(this,b),m=BF(this,b,[S]),oe(m,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),oe(m,"accessibilityManager",new OF),oe(m,"handleLegendBBoxUpdate",function(w){if(w){var O=m.state,P=O.dataStartIndex,j=O.dataEndIndex,M=O.updateId;m.setState(z({legendBBox:w},p({props:m.props,dataStartIndex:P,dataEndIndex:j,updateId:M},z(z({},m.state),{},{legendBBox:w}))))}}),oe(m,"handleReceiveSyncEvent",function(w,O,P){if(m.props.syncId===w){if(P===m.eventEmitterSymbol&&typeof m.props.syncMethod!="function")return;m.applySyncEvent(O)}}),oe(m,"handleBrushChange",function(w){var O=w.startIndex,P=w.endIndex;if(O!==m.state.dataStartIndex||P!==m.state.dataEndIndex){var j=m.state.updateId;m.setState(function(){return z({dataStartIndex:O,dataEndIndex:P},p({props:m.props,dataStartIndex:O,dataEndIndex:P,updateId:j},m.state))}),m.triggerSyncEvent({dataStartIndex:O,dataEndIndex:P})}}),oe(m,"handleMouseEnter",function(w){var O=m.getMouseInfo(w);if(O){var P=z(z({},O),{},{isTooltipActive:!0});m.setState(P),m.triggerSyncEvent(P);var j=m.props.onMouseEnter;pe(j)&&j(P,w)}}),oe(m,"triggeredAfterMouseMove",function(w){var O=m.getMouseInfo(w),P=O?z(z({},O),{},{isTooltipActive:!0}):{isTooltipActive:!1};m.setState(P),m.triggerSyncEvent(P);var j=m.props.onMouseMove;pe(j)&&j(P,w)}),oe(m,"handleItemMouseEnter",function(w){m.setState(function(){return{isTooltipActive:!0,activeItem:w,activePayload:w.tooltipPayload,activeCoordinate:w.tooltipPosition||{x:w.cx,y:w.cy}}})}),oe(m,"handleItemMouseLeave",function(){m.setState(function(){return{isTooltipActive:!1}})}),oe(m,"handleMouseMove",function(w){w.persist(),m.throttleTriggeredAfterMouseMove(w)}),oe(m,"handleMouseLeave",function(w){m.throttleTriggeredAfterMouseMove.cancel();var O={isTooltipActive:!1};m.setState(O),m.triggerSyncEvent(O);var P=m.props.onMouseLeave;pe(P)&&P(O,w)}),oe(m,"handleOuterEvent",function(w){var O=jO(w),P=wt(m.props,"".concat(O));if(O&&pe(P)){var j,M;/.*touch.*/i.test(O)?M=m.getMouseInfo(w.changedTouches[0]):M=m.getMouseInfo(w),P((j=M)!==null&&j!==void 0?j:{},w)}}),oe(m,"handleClick",function(w){var O=m.getMouseInfo(w);if(O){var P=z(z({},O),{},{isTooltipActive:!0});m.setState(P),m.triggerSyncEvent(P);var j=m.props.onClick;pe(j)&&j(P,w)}}),oe(m,"handleMouseDown",function(w){var O=m.props.onMouseDown;if(pe(O)){var P=m.getMouseInfo(w);O(P,w)}}),oe(m,"handleMouseUp",function(w){var O=m.props.onMouseUp;if(pe(O)){var P=m.getMouseInfo(w);O(P,w)}}),oe(m,"handleTouchMove",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&m.throttleTriggeredAfterMouseMove(w.changedTouches[0])}),oe(m,"handleTouchStart",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&m.handleMouseDown(w.changedTouches[0])}),oe(m,"handleTouchEnd",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&m.handleMouseUp(w.changedTouches[0])}),oe(m,"handleDoubleClick",function(w){var O=m.props.onDoubleClick;if(pe(O)){var P=m.getMouseInfo(w);O(P,w)}}),oe(m,"handleContextMenu",function(w){var O=m.props.onContextMenu;if(pe(O)){var P=m.getMouseInfo(w);O(P,w)}}),oe(m,"triggerSyncEvent",function(w){m.props.syncId!==void 0&&Qc.emit(ef,m.props.syncId,w,m.eventEmitterSymbol)}),oe(m,"applySyncEvent",function(w){var O=m.props,P=O.layout,j=O.syncMethod,M=m.state.updateId,_=w.dataStartIndex,$=w.dataEndIndex;if(w.dataStartIndex!==void 0||w.dataEndIndex!==void 0)m.setState(z({dataStartIndex:_,dataEndIndex:$},p({props:m.props,dataStartIndex:_,dataEndIndex:$,updateId:M},m.state)));else if(w.activeTooltipIndex!==void 0){var R=w.chartX,k=w.chartY,D=w.activeTooltipIndex,C=m.state,B=C.offset,U=C.tooltipTicks;if(!B)return;if(typeof j=="function")D=j(U,w);else if(j==="value"){D=-1;for(var G=0;G<U.length;G++)if(U[G].value===w.activeLabel){D=G;break}}var E=z(z({},B),{},{x:B.left,y:B.top}),L=Math.min(R,E.x+E.width),F=Math.min(k,E.y+E.height),W=U[D]&&U[D].value,K=af(m.state,m.props.data,D),X=U[D]?{x:P==="horizontal"?U[D].coordinate:L,y:P==="horizontal"?F:U[D].coordinate}:lb;m.setState(z(z({},w),{},{activeLabel:W,activeCoordinate:X,activePayload:K,activeTooltipIndex:D}))}else m.setState(w)}),oe(m,"renderCursor",function(w){var O,P=m.state,j=P.isTooltipActive,M=P.activeCoordinate,_=P.activePayload,$=P.offset,R=P.activeTooltipIndex,k=P.tooltipAxisBandSize,D=m.getTooltipEventType(),C=(O=w.props.active)!==null&&O!==void 0?O:j,B=m.props.layout,U=w.key||"_recharts-cursor";return A.createElement(jF,{key:U,activeCoordinate:M,activePayload:_,activeTooltipIndex:R,chartName:r,element:w,isActive:C,layout:B,offset:$,tooltipAxisBandSize:k,tooltipEventType:D})}),oe(m,"renderPolarAxis",function(w,O,P){var j=wt(w,"type.axisType"),M=wt(m.state,"".concat(j,"Map")),_=w.type.defaultProps,$=_!==void 0?z(z({},_),w.props):w.props,R=M&&M[$["".concat(j,"Id")]];return A.cloneElement(w,z(z({},R),{},{className:ye(j,R.className),key:w.key||"".concat(O,"-").concat(P),ticks:ur(R,!0)}))}),oe(m,"renderPolarGrid",function(w){var O=w.props,P=O.radialLines,j=O.polarAngles,M=O.polarRadius,_=m.state,$=_.radiusAxisMap,R=_.angleAxisMap,k=pr($),D=pr(R),C=D.cx,B=D.cy,U=D.innerRadius,G=D.outerRadius;return A.cloneElement(w,{polarAngles:Array.isArray(j)?j:ur(D,!0).map(function(E){return E.coordinate}),polarRadius:Array.isArray(M)?M:ur(k,!0).map(function(E){return E.coordinate}),cx:C,cy:B,innerRadius:U,outerRadius:G,key:w.key||"polar-grid",radialLines:P})}),oe(m,"renderLegend",function(){var w=m.state.formattedGraphicalItems,O=m.props,P=O.children,j=O.width,M=O.height,_=m.props.margin||{},$=j-(_.left||0)-(_.right||0),R=ry({children:P,formattedGraphicalItems:w,legendWidth:$,legendContent:u});if(!R)return null;var k=R.item,D=nb(R,$F);return A.cloneElement(k,z(z({},D),{},{chartWidth:j,chartHeight:M,margin:_,onBBoxUpdate:m.handleLegendBBoxUpdate}))}),oe(m,"renderTooltip",function(){var w,O=m.props,P=O.children,j=O.accessibilityLayer,M=yt(P,Wt);if(!M)return null;var _=m.state,$=_.isTooltipActive,R=_.activeCoordinate,k=_.activePayload,D=_.activeLabel,C=_.offset,B=(w=M.props.active)!==null&&w!==void 0?w:$;return A.cloneElement(M,{viewBox:z(z({},C),{},{x:C.left,y:C.top}),active:B,label:D,payload:B?k:[],coordinate:R,accessibilityLayer:j})}),oe(m,"renderBrush",function(w){var O=m.props,P=O.margin,j=O.data,M=m.state,_=M.offset,$=M.dataStartIndex,R=M.dataEndIndex,k=M.updateId;return A.cloneElement(w,{key:w.key||"_recharts-brush",onChange:Do(m.handleBrushChange,w.props.onChange),data:j,x:Z(w.props.x)?w.props.x:_.left,y:Z(w.props.y)?w.props.y:_.top+_.height+_.brushBottom-(P.bottom||0),width:Z(w.props.width)?w.props.width:_.width,startIndex:$,endIndex:R,updateId:"brush-".concat(k)})}),oe(m,"renderReferenceElement",function(w,O,P){if(!w)return null;var j=m,M=j.clipPathId,_=m.state,$=_.xAxisMap,R=_.yAxisMap,k=_.offset,D=w.type.defaultProps||{},C=w.props,B=C.xAxisId,U=B===void 0?D.xAxisId:B,G=C.yAxisId,E=G===void 0?D.yAxisId:G;return A.cloneElement(w,{key:w.key||"".concat(O,"-").concat(P),xAxis:$[U],yAxis:R[E],viewBox:{x:k.left,y:k.top,width:k.width,height:k.height},clipPathId:M})}),oe(m,"renderActivePoints",function(w){var O=w.item,P=w.activePoint,j=w.basePoint,M=w.childIndex,_=w.isRange,$=[],R=O.props.key,k=O.item.type.defaultProps!==void 0?z(z({},O.item.type.defaultProps),O.item.props):O.item.props,D=k.activeDot,C=k.dataKey,B=z(z({index:M,dataKey:C,cx:P.x,cy:P.y,r:4,fill:Ku(O.item),strokeWidth:2,stroke:"#fff",payload:P.payload,value:P.value},de(D,!1)),Di(D));return $.push(b.renderActiveDot(D,B,"".concat(R,"-activePoint-").concat(M))),j?$.push(b.renderActiveDot(D,z(z({},B),{},{cx:j.x,cy:j.y}),"".concat(R,"-basePoint-").concat(M))):_&&$.push(null),$}),oe(m,"renderGraphicChild",function(w,O,P){var j=m.filterFormatItem(w,O,P);if(!j)return null;var M=m.getTooltipEventType(),_=m.state,$=_.isTooltipActive,R=_.tooltipAxis,k=_.activeTooltipIndex,D=_.activeLabel,C=m.props.children,B=yt(C,Wt),U=j.props,G=U.points,E=U.isRange,L=U.baseLine,F=j.item.type.defaultProps!==void 0?z(z({},j.item.type.defaultProps),j.item.props):j.item.props,W=F.activeDot,K=F.hide,X=F.activeBar,Q=F.activeShape,ae=!!(!K&&$&&B&&(W||X||Q)),te={};M!=="axis"&&B&&B.props.trigger==="click"?te={onClick:Do(m.handleItemMouseEnter,w.props.onClick)}:M!=="axis"&&(te={onMouseLeave:Do(m.handleItemMouseLeave,w.props.onMouseLeave),onMouseEnter:Do(m.handleItemMouseEnter,w.props.onMouseEnter)});var V=A.cloneElement(w,z(z({},j.props),te));function Y(lt){return typeof R.dataKey=="function"?R.dataKey(lt.payload):null}if(ae)if(k>=0){var J,I;if(R.dataKey&&!R.allowDuplicatedCategory){var ie=typeof R.dataKey=="function"?Y:"payload.".concat(R.dataKey.toString());J=Ni(G,ie,D),I=E&&L&&Ni(L,ie,D)}else J=G==null?void 0:G[k],I=E&&L&&L[k];if(Q||X){var q=w.props.activeIndex!==void 0?w.props.activeIndex:k;return[A.cloneElement(w,z(z(z({},j.props),te),{},{activeIndex:q})),null,null]}if(!fe(J))return[V].concat(ea(m.renderActivePoints({item:j,activePoint:J,basePoint:I,childIndex:k,isRange:E})))}else{var se,ee=(se=m.getItemByXY(m.state.activeCoordinate))!==null&&se!==void 0?se:{graphicalItem:V},ve=ee.graphicalItem,We=ve.item,Re=We===void 0?w:We,Be=ve.childIndex,Ge=z(z(z({},j.props),te),{},{activeIndex:Be});return[A.cloneElement(Re,Ge),null,null]}return E?[V,null,null]:[V,null]}),oe(m,"renderCustomized",function(w,O,P){return A.cloneElement(w,z(z({key:"recharts-customized-".concat(P)},m.props),m.state))}),oe(m,"renderMap",{CartesianGrid:{handler:_s,once:!0},ReferenceArea:{handler:m.renderReferenceElement},ReferenceLine:{handler:_s},ReferenceDot:{handler:m.renderReferenceElement},XAxis:{handler:_s},YAxis:{handler:_s},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=S.id)!==null&&x!==void 0?x:$r("recharts"),"-clip"),m.throttleTriggeredAfterMouseMove=Qp(m.triggeredAfterMouseMove,(T=S.throttleDelay)!==null&&T!==void 0?T:1e3/60),m.state={},m}return UF(b,h),RF(b,[{key:"componentDidMount",value:function(){var x,T;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x: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 x=this.props,T=x.children,m=x.data,w=x.height,O=x.layout,P=yt(T,Wt);if(P){var j=P.props.defaultIndex;if(!(typeof j!="number"||j<0||j>this.state.tooltipTicks.length-1)){var M=this.state.tooltipTicks[j]&&this.state.tooltipTicks[j].value,_=af(this.state,m,j,M),$=this.state.tooltipTicks[j].coordinate,R=(this.state.offset.top+w)/2,k=O==="horizontal",D=k?{x:$,y:R}:{y:$,x:R},C=this.state.formattedGraphicalItems.find(function(U){var G=U.item;return G.type.name==="Scatter"});C&&(D=z(z({},D),C.props.points[j].tooltipPosition),_=C.props.points[j].tooltipPayload);var B={activeTooltipIndex:j,isTooltipActive:!0,activeLabel:M,activePayload:_,activeCoordinate:D};this.setState(B),this.renderCursor(P),this.accessibilityManager.setIndex(j)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,T){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==T.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){il([yt(x.children,Wt)],[yt(this.props.children,Wt)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=yt(this.props.children,Wt);if(x&&typeof x.props.shared=="boolean"){var T=x.props.shared?"axis":"item";return s.indexOf(T)>=0?T:i}return i}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var T=this.container,m=T.getBoundingClientRect(),w=ak(m),O={chartX:Math.round(x.pageX-w.left),chartY:Math.round(x.pageY-w.top)},P=m.width/T.offsetWidth||1,j=this.inRange(O.chartX,O.chartY,P);if(!j)return null;var M=this.state,_=M.xAxisMap,$=M.yAxisMap,R=this.getTooltipEventType(),k=cb(this.state,this.props.data,this.props.layout,j);if(R!=="axis"&&_&&$){var D=pr(_).scale,C=pr($).scale,B=D&&D.invert?D.invert(O.chartX):null,U=C&&C.invert?C.invert(O.chartY):null;return z(z({},O),{},{xValue:B,yValue:U},k)}return k?z(z({},O),k):null}},{key:"inRange",value:function(x,T){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,w=this.props.layout,O=x/m,P=T/m;if(w==="horizontal"||w==="vertical"){var j=this.state.offset,M=O>=j.left&&O<=j.left+j.width&&P>=j.top&&P<=j.top+j.height;return M?{x:O,y:P}:null}var _=this.state,$=_.angleAxisMap,R=_.radiusAxisMap;if($&&R){var k=pr($);return gy({x:O,y:P},k)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,T=this.getTooltipEventType(),m=yt(x,Wt),w={};m&&T==="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 O=Di(this.props,this.handleOuterEvent);return z(z({},O),w)}},{key:"addListener",value:function(){Qc.on(ef,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Qc.removeListener(ef,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,T,m){for(var w=this.state.formattedGraphicalItems,O=0,P=w.length;O<P;O++){var j=w[O];if(j.item===x||j.props.key===x.key||T===Qt(j.item.type)&&m===j.childIndex)return j}return null}},{key:"renderClipPath",value:function(){var x=this.clipPathId,T=this.state.offset,m=T.left,w=T.top,O=T.height,P=T.width;return A.createElement("defs",null,A.createElement("clipPath",{id:x},A.createElement("rect",{x:m,y:w,height:O,width:P})))}},{key:"getXScales",value:function(){var x=this.state.xAxisMap;return x?Object.entries(x).reduce(function(T,m){var w=rb(m,2),O=w[0],P=w[1];return z(z({},T),{},oe({},O,P.scale))},{}):null}},{key:"getYScales",value:function(){var x=this.state.yAxisMap;return x?Object.entries(x).reduce(function(T,m){var w=rb(m,2),O=w[0],P=w[1];return z(z({},T),{},oe({},O,P.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(x){var T;return(T=this.state.xAxisMap)===null||T===void 0||(T=T[x])===null||T===void 0?void 0:T.scale}},{key:"getYScaleByAxisId",value:function(x){var T;return(T=this.state.yAxisMap)===null||T===void 0||(T=T[x])===null||T===void 0?void 0:T.scale}},{key:"getItemByXY",value:function(x){var T=this.state,m=T.formattedGraphicalItems,w=T.activeItem;if(m&&m.length)for(var O=0,P=m.length;O<P;O++){var j=m[O],M=j.props,_=j.item,$=_.type.defaultProps!==void 0?z(z({},_.type.defaultProps),_.props):_.props,R=Qt(_.type);if(R==="Bar"){var k=(M.data||[]).find(function(U){return G3(x,U)});if(k)return{graphicalItem:j,payload:k}}else if(R==="RadialBar"){var D=(M.data||[]).find(function(U){return gy(x,U)});if(D)return{graphicalItem:j,payload:D}}else if(Zo(j,w)||Jo(j,w)||si(j,w)){var C=V5({graphicalItem:j,activeTooltipItem:w,itemData:$.data}),B=$.activeIndex===void 0?C:$.activeIndex;return{graphicalItem:z(z({},j),{},{childIndex:B}),payload:si(j,w)?$.data[C]:j.props.data[C]}}}return null}},{key:"render",value:function(){var x=this;if(!Qf(this))return null;var T=this.props,m=T.children,w=T.className,O=T.width,P=T.height,j=T.style,M=T.compact,_=T.title,$=T.desc,R=nb(T,CF),k=de(R,!1);if(M)return A.createElement(eg,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},A.createElement(sl,Qn({},k,{width:O,height:P,title:_,desc:$}),this.renderClipPath(),rd(m,this.renderMap)));if(this.props.accessibilityLayer){var D,C;k.tabIndex=(D=this.props.tabIndex)!==null&&D!==void 0?D:0,k.role=(C=this.props.role)!==null&&C!==void 0?C:"application",k.onKeyDown=function(U){x.accessibilityManager.keyboardEvent(U)},k.onFocus=function(){x.accessibilityManager.focus()}}var B=this.parseEventsOfWrapper();return A.createElement(eg,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},A.createElement("div",Qn({className:ye("recharts-wrapper",w),style:z({position:"relative",cursor:"default",width:O,height:P},j)},B,{ref:function(G){x.container=G}}),A.createElement(sl,Qn({},k,{width:O,height:P,title:_,desc:$,style:HF}),this.renderClipPath(),rd(m,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(A.Component);oe(v,"displayName",r),oe(v,"defaultProps",z({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),oe(v,"getDerivedStateFromProps",function(h,b){var S=h.dataKey,x=h.data,T=h.children,m=h.width,w=h.height,O=h.layout,P=h.stackOffset,j=h.margin,M=b.dataStartIndex,_=b.dataEndIndex;if(b.updateId===void 0){var $=fb(h);return z(z(z({},$),{},{updateId:0},p(z(z({props:h},$),{},{updateId:0}),b)),{},{prevDataKey:S,prevData:x,prevWidth:m,prevHeight:w,prevLayout:O,prevStackOffset:P,prevMargin:j,prevChildren:T})}if(S!==b.prevDataKey||x!==b.prevData||m!==b.prevWidth||w!==b.prevHeight||O!==b.prevLayout||P!==b.prevStackOffset||!ln(j,b.prevMargin)){var R=fb(h),k={chartX:b.chartX,chartY:b.chartY,isTooltipActive:b.isTooltipActive},D=z(z({},cb(b,x,O)),{},{updateId:b.updateId+1}),C=z(z(z({},R),k),D);return z(z(z({},C),p(z({props:h},C),b)),{},{prevDataKey:S,prevData:x,prevWidth:m,prevHeight:w,prevLayout:O,prevStackOffset:P,prevMargin:j,prevChildren:T})}if(!il(T,b.prevChildren)){var B,U,G,E,L=yt(T,Nn),F=L&&(B=(U=L.props)===null||U===void 0?void 0:U.startIndex)!==null&&B!==void 0?B:M,W=L&&(G=(E=L.props)===null||E===void 0?void 0:E.endIndex)!==null&&G!==void 0?G:_,K=F!==M||W!==_,X=!fe(x),Q=X&&!K?b.updateId:b.updateId+1;return z(z({updateId:Q},p(z(z({props:h},b),{},{updateId:Q,dataStartIndex:F,dataEndIndex:W}),b)),{},{prevChildren:T,dataStartIndex:F,dataEndIndex:W})}return null}),oe(v,"renderActiveDot",function(h,b,S){var x;return A.isValidElement(h)?x=A.cloneElement(h,b):pe(h)?x=h(b):x=A.createElement(Ho,b),A.createElement(xe,{className:"recharts-active-dot",key:S},x)});var y=A.forwardRef(function(b,S){return A.createElement(v,Qn({},b,{ref:S}))});return y.displayName=v.displayName,y},iW=aW({chartName:"ComposedChart",GraphicalChild:[pi,Ar,Ln,xs],axisComponents:[{axisType:"xAxis",AxisComp:Os},{axisType:"yAxis",AxisComp:As},{axisType:"zAxis",AxisComp:gs}],formatAxisMap:m4});const ta=({className:e,width:t,height:r,rounded:n=!1})=>g.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}}),gi=({className:e})=>g.jsxs("div",{className:ue("rounded-lg border border-gray-200 bg-white p-[16px]",e),children:[g.jsxs("div",{className:"flex items-center gap-2 mb-[12px]",children:[g.jsx(ta,{className:"h-[16px] w-[64px]"}),g.jsx(ta,{className:"h-[16px] w-[16px]",rounded:!0})]}),g.jsxs("div",{className:"flex items-baseline gap-[12px]",children:[g.jsx(ta,{className:"h-[32px] w-[80px]"}),g.jsx(ta,{className:"h-[24px] w-[48px] rounded-md"})]})]}),pb=({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,p=u.x+(c.x-u.x)*.6,v=c.y;s+=` C ${f} ${d} ${p} ${v} ${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 g.jsx("div",{className:"absolute inset-0 flex items-end justify-between px-[16px] pb-[16px]",children:[...Array(7)].map((h,b)=>g.jsx(ta,{className:"w-[32px] bg-blue-100",height:`${Math.random()*60+20}%`},b))});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 g.jsx("div",{className:"absolute inset-0 p-[16px]",children:g.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[g.jsxs("defs",{children:[g.jsxs("linearGradient",{id:"skeleton-area-fill",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[g.jsx("stop",{offset:"0%",stopColor:"#8b5cf6",stopOpacity:"0.1",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.1;0.15;0.1",dur:"3s",repeatCount:"indefinite"})}),g.jsx("stop",{offset:"100%",stopColor:"#8b5cf6",stopOpacity:"0.02",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.02;0.05;0.02",dur:"3s",repeatCount:"indefinite"})})]}),g.jsxs("linearGradient",{id:"skeleton-line-shimmer",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[g.jsx("stop",{offset:"0%",stopColor:"#e2e8f0",stopOpacity:"0.3",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2.5s",repeatCount:"indefinite"})}),g.jsx("stop",{offset:"50%",stopColor:"#cbd5e1",stopOpacity:"0.6",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.6;0.3;0.6",dur:"2.5s",repeatCount:"indefinite"})}),g.jsx("stop",{offset:"100%",stopColor:"#e2e8f0",stopOpacity:"0.3",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2.5s",repeatCount:"indefinite"})})]})]}),g.jsx("path",{d:c,fill:"url(#skeleton-area-fill)"}),g.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),p=f[f.length-1],v=f[0],y=`${d} L ${p.x} 90 L ${v.x} 90 Z`;return g.jsx("div",{className:"absolute inset-0 p-[16px]",children:g.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[g.jsxs("defs",{children:[g.jsxs("linearGradient",{id:"skeleton-area-gradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[g.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.2",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.2;0.4;0.2",dur:"2s",repeatCount:"indefinite"})}),g.jsx("stop",{offset:"100%",stopColor:"#3b82f6",stopOpacity:"0.05",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.05;0.1;0.05",dur:"2s",repeatCount:"indefinite"})})]}),g.jsxs("linearGradient",{id:"skeleton-area-line",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[g.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.4",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.4;0.8;0.4",dur:"2s",repeatCount:"indefinite"})}),g.jsx("stop",{offset:"50%",stopColor:"#3b82f6",stopOpacity:"0.8",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.8;0.4;0.8",dur:"2s",repeatCount:"indefinite"})}),g.jsx("stop",{offset:"100%",stopColor:"#3b82f6",stopOpacity:"0.4",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.4;0.8;0.4",dur:"2s",repeatCount:"indefinite"})})]})]}),g.jsx("path",{d:y,fill:"url(#skeleton-area-gradient)"}),g.jsx("path",{d:n(f),stroke:"url(#skeleton-area-line)",strokeWidth:"2.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]})});case"pie":return g.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-[16px]",children:g.jsxs("svg",{className:"w-32 h-32",viewBox:"0 0 42 42",children:[g.jsxs("defs",{children:[g.jsx("linearGradient",{id:"skeleton-pie-gradient-1",children:g.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.3",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite"})})}),g.jsx("linearGradient",{id:"skeleton-pie-gradient-2",children:g.jsx("stop",{offset:"0%",stopColor:"#10b981",stopOpacity:"0.3",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"0.5s"})})}),g.jsx("linearGradient",{id:"skeleton-pie-gradient-3",children:g.jsx("stop",{offset:"0%",stopColor:"#f59e0b",stopOpacity:"0.3",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"1s"})})}),g.jsx("linearGradient",{id:"skeleton-pie-gradient-4",children:g.jsx("stop",{offset:"0%",stopColor:"#ef4444",stopOpacity:"0.3",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"1.5s"})})})]}),g.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"#e5e7eb",strokeWidth:"3"}),g.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-1)",strokeWidth:"3",strokeDasharray:"40 60",strokeDashoffset:"25"}),g.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-2)",strokeWidth:"3",strokeDasharray:"25 75",strokeDashoffset:"65"}),g.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-3)",strokeWidth:"3",strokeDasharray:"20 80",strokeDashoffset:"90"}),g.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 g.jsx("div",{className:"absolute inset-0 p-[16px]",children:g.jsxs("div",{className:"w-full h-full relative",children:[g.jsx("div",{className:"absolute inset-0 flex items-center",children:g.jsx("div",{className:"w-full h-0.5 bg-gradient-to-r from-transparent via-gray-300 to-transparent opacity-60",children:g.jsx("div",{className:"w-full h-full bg-gradient-to-r from-transparent via-blue-400 to-transparent animate-pulse"})})}),g.jsx("div",{className:"absolute inset-0 flex items-center justify-between px-2",children:[...Array(7)].map((h,b)=>g.jsx("div",{className:"w-2 h-2 bg-blue-300 rounded-full animate-pulse",style:{animationDelay:`${b*.2}s`}},b))})]})})}};return g.jsx("div",{className:ue("w-full",e),children:g.jsxs("div",{className:"relative bg-gray-50/30",children:[g.jsxs("div",{className:"relative",style:{height:`${r}px`},children:[g.jsxs("div",{className:"absolute left-0 top-0 h-full flex flex-col justify-between items-end pr-[12px]",children:[g.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"})]}),g.jsxs("div",{className:"ml-14 h-full relative overflow-hidden px-0 py-2 flex flex-col justify-between",children:[t!=="pie"&&g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),g.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),g.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),g.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),g.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),g.jsx("div",{className:"h-0 w-full border-t border-gray-100"})]}),i()]}),t!=="pie"&&g.jsxs("div",{className:"ml-[56px] flex justify-between items-center mt-[12px]",children:[g.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),g.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),g.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),g.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),g.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px"}),g.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),g.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),g.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"})]})]}),g.jsxs("div",{className:"flex items-center justify-between px-0 py-[12px] mt-[8px]",children:[g.jsx("div",{className:"flex-1",children:g.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[256px]"})}),g.jsxs("div",{className:"flex items-center gap-2 w-24 justify-center",children:[g.jsx("div",{className:"w-[8px] h-[8px] bg-blue-500 rounded-full"}),g.jsx("div",{className:"bg-gray-100 h-[16px] rounded flex-1"})]})]})]})})},oW=({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 g.jsxs("div",{className:ue("rounded-lg border px-[12px] py-[8px] text-xs shadow-lg",i?"bg-gray-900 border-gray-700 text-white":"bg-white border-gray-200 text-gray-900"),children:[g.jsx("div",{className:ue("font-medium mb-[8px]",i?"text-gray-300":"text-gray-600"),children:new Date(r||"").toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}),g.jsx("div",{className:"space-y-1",children:a.map((s,l)=>g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"w-[8px] h-[8px] rounded-full",style:{backgroundColor:s.color}}),g.jsx("span",{className:ue("text-xs",i?"text-gray-300":"text-gray-600"),children:s.name})]}),g.jsx("span",{className:ue("font-medium text-xs",i?"text-white":"text-gray-900"),children:typeof s.value=="number"?s.value.toLocaleString():s.value})]},l))})]})},hb=({config:e,className:t,isLoading:r,onDataPointClick:n})=>{var m,w;const{data:a,dataKey:i,color:o="#3b82f6",lines:s,dateRange:l,yAxisLabel:u,height:c=300,tooltip:f={show:!0,style:"dark"}}=e,p=(O=>{if(!O||O.length===0)return[];const P=[...O].sort((k,D)=>{const C=new Date(k.date),B=new Date(D.date);return C.getTime()-B.getTime()});let j,M;l!=null&&l.start&&(l!=null&&l.end)?(j=new Date(l.start),M=new Date(l.end)):(j=new Date(P[0].date),M=new Date(P[P.length-1].date));const _=new Map;P.forEach(k=>{_.set(k.date,k)});const $=[],R=new Date(j);for(;R<=M;){const k=R.toISOString().split("T")[0];if(_.has(k))$.push(_.get(k));else{const D={date:k,users:0,sessions:0,messages:0,totalTokens:0,inputTokens:0,outputTokens:0,agentRuns:0,toolRuns:0,modelRuns:0,codeTools:0,workflowTools:0,knowledgeTools:0,mcpTools:0,value:0,count:0};if(P.length>0){const C=P[0];Object.keys(C).forEach(B=>{typeof C[B]=="number"&&!(B in D)&&(D[B]=0)})}$.push(D)}R.setDate(R.getDate()+1)}return $})(a),v=O=>{const P=new Date(O);return isNaN(P.getTime())?O:P.toLocaleDateString("en-US",{month:"short",day:"numeric"})},y=()=>{if(!p||p.length===0)return 0;const O=p.length;return O<=20?0:O<=31?1:O<=61?2:Math.floor(O/7)-1},h=O=>b()&&!Number.isInteger(O)?"":O>=1e3?`${Math.floor(O/1e3)}k`:Math.floor(O).toString(),b=()=>{const O=["users","sessions","messages","runs","agents","tools","models","Number of Users","Number of Sessions","Number of Messages","Number of Agent Runs","Number of Tool Runs","Number of Model Runs","agentRuns","toolRuns","modelRuns"];return!!(u&&O.some(P=>u.toLowerCase().includes(P.toLowerCase()))||i&&O.some(P=>i.toLowerCase().includes(P.toLowerCase()))||e.title&&O.some(P=>e.title.toLowerCase().includes(P.toLowerCase()))||s&&s.some(P=>P.label&&O.some(j=>P.label.toLowerCase().includes(j.toLowerCase()))))},x=s&&s.length>0?s:[{dataKey:i||"value",color:o,label:e.title,strokeWidth:2}];if(r)return console.log("AnalyticsChart: Loading state active"),g.jsx(pb,{className:t,chartType:e.type,height:c});if(!a||a.length===0)return console.log("AnalyticsChart: No data provided",{data:a,config:e}),g.jsx("div",{className:ue("w-full",t),children:g.jsxs("div",{className:"relative bg-gray-50/30",children:[g.jsxs("div",{className:"relative h-[300px] mb-6",children:[g.jsxs("div",{className:"absolute left-0 top-0 h-full flex flex-col justify-between items-end pr-3",children:[g.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"})]}),g.jsxs("div",{className:"ml-14 h-full relative overflow-hidden px-0 py-2 flex flex-col justify-between",children:[g.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),g.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),g.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),g.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),g.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),g.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),g.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-4",children:[g.jsx("div",{className:"bg-white border border-gray-300 rounded-[10px] w-12 h-12 flex items-center justify-center",children:g.jsx("svg",{className:"w-6 h-6 !h-6 text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.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"})})}),g.jsxs("div",{className:"text-center max-w-[352px]",children:[g.jsx("h3",{className:"font-semibold text-gray-900 text-base mb-1",children:"There is no data to display for this period"}),g.jsx("p",{className:"font-normal text-center text-gray-600 text-sm leading-5",children:"Try selecting a different date range or ensure your app is deployed and receiving traffic."})]})]})]}),g.jsxs("div",{className:"ml-14 flex justify-between items-center mt-3",children:[g.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"})]})]}),g.jsxs("div",{className:"flex items-center justify-between px-0 py-3 mt-2",children:[g.jsx("div",{className:"flex-1",children:g.jsx("div",{className:"bg-gray-100 h-3 rounded w-64"})}),g.jsxs("div",{className:"flex items-center gap-2 w-24 justify-center",children:[g.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded flex-1"})]})]})]})});const T=O=>{var j;if(!n||!O||!O.activePayload)return;const P=(j=O.activePayload[0])==null?void 0:j.payload;P&&P.date&&(console.log("Chart data point clicked:",{date:P.date,data:P}),n(P,P.date))};return console.log("=== ANALYTICS CHART DEBUG ==="),console.log("AnalyticsChart config:",e),console.log("AnalyticsChart original data length:",a==null?void 0:a.length),console.log("AnalyticsChart filled data length:",p.length),console.log("AnalyticsChart date range (config):",l),console.log("AnalyticsChart actual date range:",p.length>0?{first:(m=p[0])==null?void 0:m.date,last:(w=p[p.length-1])==null?void 0:w.date,totalDays:p.length}:"No data"),console.log("AnalyticsChart dataKey:",i),console.log("Chart lines configuration:",x),console.log("Sample filled data points:",p.slice(0,3)),console.log("=== END ANALYTICS CHART DEBUG ==="),g.jsxs("div",{className:ue("w-full",t),children:[g.jsx("div",{className:"relative bg-gray-50/30",children:g.jsx(Z2,{width:"100%",height:c,children:g.jsxs(iW,{data:p,onClick:T,margin:{top:20,right:30,left:20,bottom:20},children:[g.jsx("defs",{children:x.map((O,P)=>g.jsxs("linearGradient",{id:`gradient-${O.dataKey}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[g.jsx("stop",{offset:"5%",stopColor:O.color,stopOpacity:.08}),g.jsx("stop",{offset:"95%",stopColor:O.color,stopOpacity:.01})]},`gradient-${P}`))}),g.jsx(Pg,{strokeDasharray:"2 2",className:"opacity-30",stroke:"#d1d5db",horizontal:!0,vertical:!1}),g.jsx(Os,{dataKey:"date",tickFormatter:v,axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#6b7280"},tickMargin:10,interval:y()}),g.jsx(As,{axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#6b7280"},tickFormatter:h,tickMargin:10,allowDecimals:!b(),domain:b()?["dataMin","dataMax"]:void 0,label:u?{value:u,angle:-90,position:"insideLeft",style:{textAnchor:"middle",fontSize:12,fill:"#6b7280"}}:void 0}),f.show&&g.jsx(Wt,{content:O=>g.jsx(oW,{...O,config:e}),cursor:{stroke:"#d1d5db",strokeWidth:1,strokeDasharray:"4 4"},allowEscapeViewBox:{x:!1,y:!1}}),x.map(O=>g.jsx(Ar,{type:"monotone",dataKey:O.dataKey,stroke:"none",fill:`url(#gradient-${O.dataKey})`,fillOpacity:1,isAnimationActive:!1,name:""},`area-${O.dataKey}`)),x.map(O=>g.jsx(pi,{type:"monotone",dataKey:O.dataKey,stroke:O.color,strokeWidth:2.5,strokeDasharray:O.strokeDasharray,dot:!1,activeDot:{r:5,fill:O.color,stroke:O.color,strokeWidth:2},name:O.label},O.dataKey))]})})}),g.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[g.jsx("div",{children:l&&g.jsxs("p",{className:"text-xs text-gray-500 flex items-center gap-[4px]",children:[g.jsx("span",{className:"text-gray-500",children:"Showing data from"}),g.jsxs("span",{className:"font-medium text-gray-700",children:[new Date(l.start).toLocaleDateString("en-US",{day:"numeric",month:"short",year:"numeric"})," - ",new Date(l.end).toLocaleDateString("en-US",{day:"numeric",month:"short",year:"numeric"})]})]})}),g.jsx("div",{className:"flex items-center gap-4",children:g.jsx("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:x.map(O=>g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"w-[8px] h-[8px] rounded-full",style:{backgroundColor:O.color}}),g.jsx("span",{className:"text-xs text-gray-600",children:O.label})]},O.dataKey))})})]})]})},vb=({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]=A.useState(o.defaultSort||null),[c,f]=A.useState(""),[d,p]=A.useState(1),v=A.useMemo(()=>{let m=[...n];return s.searchable&&c&&(m=m.filter(w=>a.some(O=>{const P=w[O.key];return P==null?void 0:P.toString().toLowerCase().includes(c.toLowerCase())}))),l&&m.sort((w,O)=>{const P=w[l.key],j=O[l.key];if(typeof P=="number"&&typeof j=="number")return l.order==="asc"?P-j:j-P;const M=(P==null?void 0:P.toString())||"",_=(j==null?void 0:j.toString())||"",$=M.localeCompare(_);return l.order==="asc"?$:-$}),m},[n,a,c,l,s.searchable]),y=i.enabled?Math.ceil(v.length/i.pageSize):1,h=i.enabled?v.slice((d-1)*i.pageSize,d*i.pageSize):v,b=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"})},S=m=>{f(m),p(1)},x=(m,w,O)=>w.render?w.render(m,O):w.formatter?w.formatter(m,O):typeof m=="number"?m.toLocaleString():(m==null?void 0:m.toString())||"-",T=m=>!o.enabled||!m.sortable?null:(l==null?void 0:l.key)===m.key?l.order==="asc"?g.jsx(mf,{className:"w-[16px] h-[16px]"}):g.jsx(ua,{className:"w-[16px] h-[16px]"}):g.jsxs("div",{className:"flex flex-col",children:[g.jsx(mf,{className:"w-[12px] h-[12px] opacity-30"}),g.jsx(ua,{className:"w-[12px] h-[12px] opacity-30 -mt-1"})]});return g.jsxs("div",{className:ue("w-full",t),children:[g.jsxs("div",{className:"flex items-center justify-between mb-4",children:[g.jsx("h3",{className:"text-md font-medium text-gray-700",children:r}),s.enabled&&s.searchable&&g.jsxs("div",{className:"relative",children:[g.jsx(gf,{className:"absolute left-[12px] top-1/2 transform -translate-y-1/2 w-[16px] h-[16px] text-gray-400"}),g.jsx("input",{type:"text",placeholder:"Search...",value:c,onChange:m=>S(m.target.value),className:"pl-[36px] pr-[12px] py-[8px] border border-gray-200 rounded-lg text-xs focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]})]}),g.jsx("div",{className:"overflow-x-auto border border-gray-200 rounded-lg",children:g.jsxs("table",{className:"w-full",children:[g.jsx("thead",{className:"bg-gray-50",children:g.jsx("tr",{children:a.map(m=>g.jsx("th",{className:ue("px-[16px] py-[12px] 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:()=>b(m),children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{children:m.title}),T(m)]})},m.key))})}),g.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:h.map((m,w)=>g.jsx("tr",{className:"hover:bg-gray-50 transition-colors",children:a.map(O=>g.jsx("td",{className:ue("px-[16px] py-[12px] text-xs text-gray-900",O.align==="center"&&"text-center",O.align==="right"&&"text-right"),children:x(m[O.key],O,m)},O.key))},w))})]})}),i.enabled&&y>1&&g.jsxs("div",{className:"flex items-center justify-between mt-4",children:[g.jsxs("div",{className:"text-xs text-gray-500",children:["Showing ",(d-1)*i.pageSize+1," to"," ",Math.min(d*i.pageSize,v.length)," of"," ",v.length," results"]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("button",{onClick:()=>p(m=>Math.max(1,m-1)),disabled:d===1,className:"px-[12px] py-[4px] text-xs border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),Array.from({length:Math.min(5,y)},(m,w)=>{const O=Math.max(1,Math.min(y-4,d-2))+w;return O>y?null:g.jsx("button",{onClick:()=>p(O),className:ue("px-[12px] py-[4px] text-xs border rounded",d===O?"bg-blue-500 text-white border-blue-500":"border-gray-200 hover:bg-gray-50"),children:O},O)}),g.jsx("button",{onClick:()=>p(m=>Math.min(y,m+1)),disabled:d===y,className:"px-[12px] py-[4px] text-xs border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),h.length===0&&g.jsx("div",{className:"text-center py-[32px] text-gray-500",children:c?"No results found for your search.":"No data available."})]})},sW=(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"}},lW=e=>{if(!e)return null;if(typeof e=="string")try{return JSON.parse(e)}catch{return{name:e,type:"human"}}return e},uW=(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 t==="model"?{name:"fallback",type:"icon",color:r[n]}:{name:"fallback",type:t==="agent"?"human":"icon",color:r[n]}},cW=(e,t)=>{if(!(e!=null&&e.name))return"";if(t==="url")return e.name;if(t==="model")return"";const r=window.location.origin,n=sW(e.type||"human",t);return`${r}/agenticai/assets/${n}/${e.name}.svg`},yb=e=>{if(!e)return"assets/icons/models/custom-api.svg";const t=e.toLowerCase(),r={openai:"Open AI.svg","open ai":"Open AI.svg",chatopenai:"Open AI.svg",gpt:"Open AI.svg",anthropic:"Anthropic.svg",claude:"Anthropic.svg",google:"Google.svg",gemini:"Google.svg",chatgooglegenerativeai:"Google.svg",googlegenerativeai:"Google.svg",palm:"Google.svg",azurechatopenai:"Azure Open AI.svg","azure open ai":"Azure Open AI.svg",azureopenai:"Azure Open AI.svg","azure openai":"Azure Open AI.svg",azure:"Azure Open AI.svg",aws:"AWS Bedrock.svg",bedrock:"AWS Bedrock.svg","aws bedrock":"AWS Bedrock.svg",awsbedrock:"AWS Bedrock.svg",amazon:"AWS Bedrock.svg",cohere:"Cohere.svg",api:"API.svg",custom:"custom-api.svg","custom-api":"custom-api.svg",customapi:"custom-api.svg"};if(r[t])return`assets/icons/models/${r[t]}`;for(const[n,a]of Object.entries(r))if(t.includes(n)||n.includes(t))return`assets/icons/models/${a}`;return"assets/icons/models/custom-api.svg"},fW={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"},Rt={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)">
252
+ `).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,`
253
+ A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+l*m,",").concat(r,`
254
+ L `).concat(t+n-l*m,",").concat(r,`
255
+ A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*m,`
256
+ L `).concat(t+n,",").concat(r+a-s*m,`
257
+ A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+n-l*m,",").concat(r+a,`
258
+ L `).concat(t+l*m,",").concat(r+a,`
259
+ 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},f4=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},d4={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},xc=function(t){var r=Ty(Ty({},d4),t),n=T.useRef(),a=T.useState(-1),i=n4(a,2),o=i[0],s=i[1];T.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,p=r.className,m=r.animationEasing,y=r.animationDuration,v=r.animationBegin,b=r.isAnimationActive,w=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||f!==+f||c===0||f===0)return null;var x=me("recharts-rectangle",p);return w?T.createElement(Dt,{canBegin:o>0,from:{width:c,height:f,x:l,y:u},to:{width:c,height:f,x:l,y:u},duration:y,animationEasing:m,isActive:w},function(A){var g=A.width,O=A.height,S=A.x,j=A.y;return T.createElement(Dt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:y,isActive:b,easing:m},T.createElement("path",Yo({},de(r,!0),{className:x,d:Ay(S,j,g,O,d),ref:n})))}):T.createElement("path",Yo({},de(r,!0),{className:x,d:Ay(l,u,c,f,d)}))};function wc(){return wc=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},wc.apply(this,arguments)}var Xo=function(t){var r=t.cx,n=t.cy,a=t.r,i=t.className,o=me("recharts-dot",i);return r===+r&&n===+n&&a===+a?xt.createElement("circle",wc({},de(t,!1),Li(t),{className:o,cx:r,cy:n,r:a})):null};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)}var p4=["x","y","top","left","width","height","className"];function Oc(){return Oc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Oc.apply(this,arguments)}function 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 h4(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){v4(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 v4(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=y4(e,"string");return oi(t)=="symbol"?t:t+""}function y4(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 g4(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}var x4=function(t,r,n,a,i,o){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(o,",").concat(r,"h").concat(n)},w4=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,p=d===void 0?0:d,m=t.className,y=g4(t,p4),v=h4({x:n,y:i,top:s,left:u,width:f,height:p},y);return!Z(n)||!Z(i)||!Z(f)||!Z(p)||!Z(s)||!Z(u)?null:T.createElement("path",Oc({},de(v,!0),{className:me("recharts-cross",m),d:x4(n,i,f,p,s,u)}))},O4=lp,S4=O4(Object.getPrototypeOf,Object),T4=S4,A4=Zt,P4=T4,j4=Jt,_4="[object Object]",E4=Function.prototype,C4=Object.prototype,jy=E4.toString,$4=C4.hasOwnProperty,k4=jy.call(Object);function M4(e){if(!j4(e)||A4(e)!=_4)return!1;var t=P4(e);if(t===null)return!0;var r=$4.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&jy.call(r)==k4}var N4=M4;const D4=$e(N4);var I4=Zt,L4=Jt,R4="[object Boolean]";function B4(e){return e===!0||e===!1||L4(e)&&I4(e)==R4}var F4=B4;const W4=$e(F4);function si(e){"@babel/helpers - typeof";return si=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},si(e)}function Zo(){return Zo=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},Zo.apply(this,arguments)}function z4(e,t){return K4(e)||V4(e,t)||G4(e,t)||U4()}function U4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
260
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G4(e,t){if(e){if(typeof e=="string")return _y(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 _y(e,t)}}function _y(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 V4(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 K4(e){if(Array.isArray(e))return e}function Ey(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 Cy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ey(Object(r),!0).forEach(function(n){q4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ey(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function q4(e,t,r){return t=H4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function H4(e){var t=Y4(e,"string");return si(t)=="symbol"?t:t+""}function Y4(e,t){if(si(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(si(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $y=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},X4={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Z4=function(t){var r=Cy(Cy({},X4),t),n=T.useRef(),a=T.useState(-1),i=z4(a,2),o=i[0],s=i[1];T.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,p=r.className,m=r.animationEasing,y=r.animationDuration,v=r.animationBegin,b=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||f!==+f||d!==+d||c===0&&f===0||d===0)return null;var w=me("recharts-trapezoid",p);return b?T.createElement(Dt,{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:y,animationEasing:m,isActive:b},function(x){var A=x.upperWidth,g=x.lowerWidth,O=x.height,S=x.x,j=x.y;return T.createElement(Dt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:y,easing:m},T.createElement("path",Zo({},de(r,!0),{className:w,d:$y(S,j,A,g,O),ref:n})))}):T.createElement("g",null,T.createElement("path",Zo({},de(r,!0),{className:w,d:$y(l,u,c,f,d)})))},J4=["option","shapeType","propTransformer","activeClassName","isActive"];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 Q4(e,t){if(e==null)return{};var r=e8(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 e8(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 ky(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 Jo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ky(Object(r),!0).forEach(function(n){t8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ky(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function t8(e,t,r){return t=r8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r8(e){var t=n8(e,"string");return li(t)=="symbol"?t:t+""}function n8(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)}function a8(e,t){return Jo(Jo({},t),e)}function i8(e,t){return e==="symbols"}function My(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return T.createElement(xc,r);case"trapezoid":return T.createElement(Z4,r);case"sector":return T.createElement(Im,r);case"symbols":if(i8(t))return T.createElement(Hi,r);break;default:return null}}function o8(e){return T.isValidElement(e)?e.props:e}function Sc(e){var t=e.option,r=e.shapeType,n=e.propTransformer,a=n===void 0?a8:n,i=e.activeClassName,o=i===void 0?"recharts-active-shape":i,s=e.isActive,l=Q4(e,J4),u;if(T.isValidElement(t))u=T.cloneElement(t,Jo(Jo({},l),o8(t)));else if(pe(t))u=t(l);else if(D4(t)&&!W4(t)){var c=a(t,l);u=T.createElement(My,{shapeType:r,elementProps:c})}else{var f=l;u=T.createElement(My,{shapeType:r,elementProps:f})}return s?T.createElement(xe,{className:o},u):u}function Qo(e,t){return t!=null&&"trapezoids"in e.props}function es(e,t){return t!=null&&"sectors"in e.props}function ui(e,t){return t!=null&&"points"in e.props}function s8(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 l8(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function u8(e,t){var r=e.x===t.x,n=e.y===t.y,a=e.z===t.z;return r&&n&&a}function c8(e,t){var r;return Qo(e,t)?r=s8:es(e,t)?r=l8:ui(e,t)&&(r=u8),r}function f8(e,t){var r;return Qo(e,t)?r="trapezoids":es(e,t)?r="sectors":ui(e,t)&&(r="points"),r}function d8(e,t){if(Qo(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(es(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 ui(e,t)?t.payload:{}}function p8(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,a=f8(r,t),i=d8(r,t),o=n.filter(function(l,u){var c=Br(i,l),f=r.props[a].filter(function(m){var y=c8(r,t);return y(m,t)}),d=r.props[a].indexOf(f[f.length-1]),p=u===d;return c&&p}),s=n.indexOf(o[o.length-1]);return s}var h8=Math.ceil,v8=Math.max;function m8(e,t,r,n){for(var a=-1,i=v8(h8((t-e)/(r||1)),0),o=Array(i);i--;)o[n?i:++a]=e,e+=r;return o}var y8=m8,g8=oh,Ny=1/0,b8=17976931348623157e292;function x8(e){if(!e)return e===0?e:0;if(e=g8(e),e===Ny||e===-Ny){var t=e<0?-1:1;return t*b8}return e===e?e:0}var Dy=x8,w8=y8,O8=no,Tc=Dy;function S8(e){return function(t,r,n){return n&&typeof n!="number"&&O8(t,r,n)&&(r=n=void 0),t=Tc(t),r===void 0?(r=t,t=0):r=Tc(r),n=n===void 0?t<r?1:-1:Tc(n),w8(t,r,n,e)}}var T8=S8,A8=T8,P8=A8(),j8=P8;const ts=$e(j8);function ci(e){"@babel/helpers - typeof";return ci=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ci(e)}function 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 Ly(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){Ry(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 Ry(e,t,r){return t=_8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _8(e){var t=E8(e,"string");return ci(t)=="symbol"?t:t+""}function E8(e,t){if(ci(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ci(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var C8=["Webkit","Moz","O","ms"],$8=function(t,r){var n=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=C8.reduce(function(i,o){return Ly(Ly({},i),{},Ry({},o+n,r))},{});return a[t]=r,a};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 rs(){return rs=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},rs.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 Ac(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){gt(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 k8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fy(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 M8(e,t,r){return t&&Fy(e.prototype,t),r&&Fy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function N8(e,t,r){return t=ns(t),D8(e,Wy()?Reflect.construct(t,r||[],ns(e).constructor):t.apply(e,r))}function D8(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 I8(e)}function I8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Wy=function(){return!!e})()}function ns(e){return ns=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ns(e)}function L8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pc(e,t)}function Pc(e,t){return Pc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Pc(e,t)}function gt(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 zy(e){var t=R8(e,"string");return Nn(t)=="symbol"?t:t+""}function R8(e,t){if(Nn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Nn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var B8=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=Ca().domain(ts(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}},Uy=function(t){return t.changedTouches&&!!t.changedTouches.length},Dn=function(e){function t(r){var n;return k8(this,t),n=N8(this,t,[r]),gt(n,"handleDrag",function(a){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(a):n.state.isSlideMoving&&n.handleSlideDrag(a)}),gt(n,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&n.handleDrag(a.changedTouches[0])}),gt(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()}),gt(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),gt(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),gt(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),gt(n,"handleSlideDragStart",function(a){var i=Uy(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 L8(t,e),M8(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),p=t.getIndexInRange(o,f),m=t.getIndexInRange(o,d);return{startIndex:p-p%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=Je(i[n],s,n);return pe(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,p=l.endIndex,m=l.onChange,y=n.pageX-i;y>0?y=Math.min(y,u+c-f-s,u+c-f-o):y<0&&(y=Math.max(y,u-o,u-s));var v=this.getIndex({startX:o+y,endX:s+y});(v.startIndex!==d||v.endIndex!==p)&&m&&m(v),this.setState({startX:o+y,endX:s+y,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,a){var i=Uy(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,p=c.travellerWidth,m=c.onChange,y=c.gap,v=c.data,b={startX:this.state.startX,endX:this.state.endX},w=n.pageX-i;w>0?w=Math.min(w,f+d-p-u):w<0&&(w=Math.max(w,f-u)),b[o]=u+w;var x=this.getIndex(b),A=x.startIndex,g=x.endIndex,O=function(){var j=v.length-1;return o==="startX"&&(s>l?A%y===0:g%y===0)||s<l&&g===j||o==="endX"&&(s>l?g%y===0:A%y===0)||s>l&&g===j};this.setState(gt(gt({},o,u+w),"brushMoveStartX",n.pageX),function(){m&&O()&&m(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 p=s[d];a==="startX"&&p>=u||a==="endX"&&p<=l||this.setState(gt({},a,p),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 T.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=T.Children.only(u);return f?T.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,p=l.ariaLabel,m=l.data,y=l.startIndex,v=l.endIndex,b=Math.max(n,this.props.x),w=Ac(Ac({},de(this.props,!1)),{},{x:b,y:u,width:c,height:f}),x=p||"Min value: ".concat((i=m[y])===null||i===void 0?void 0:i.name,", Max value: ").concat((o=m[v])===null||o===void 0?void 0:o.name);return T.createElement(xe,{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(g){["ArrowLeft","ArrowRight"].includes(g.key)&&(g.preventDefault(),g.stopPropagation(),s.handleTravellerMoveKeyboard(g.key==="ArrowRight"?1:-1,a))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,w))}},{key:"renderSlide",value:function(n,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 T.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,p=5,m={pointerEvents:"none",fill:u};return T.createElement(xe,{className:"recharts-brush-texts"},T.createElement(co,rs({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,d)-p,y:o+s/2},m),this.getTextOfTick(a)),T.createElement(co,rs({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,d)+l+p,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,p=d.startX,m=d.endX,y=d.isTextActive,v=d.isSlideMoving,b=d.isTravellerMoving,w=d.isTravellerFocused;if(!a||!a.length||!Z(s)||!Z(l)||!Z(u)||!Z(c)||u<=0||c<=0)return null;var x=me("recharts-brush",i),A=T.Children.count(o)===1,g=$8("userSelect","none");return T.createElement(xe,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:g},this.renderBackground(),A&&this.renderPanorama(),this.renderSlide(p,m),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(m,"endX"),(y||v||b||w||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 T.createElement(T.Fragment,null,T.createElement("rect",{x:a,y:i,width:o,height:s,fill:l,stroke:"none"}),T.createElement("line",{x1:a+1,y1:u,x2:a+o-1,y2:u,fill:"none",stroke:"#fff"}),T.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 T.isValidElement(n)?i=T.cloneElement(n,a):pe(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 Ac({prevData:i,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o},i&&i.length?B8({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(p){return a.scale(p)});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}}])}(T.PureComponent);gt(Dn,"displayName","Brush"),gt(Dn,"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 F8=zl;function W8(e,t){var r;return F8(e,function(n,a,i){return r=t(n,a,i),!r}),!!r}var z8=W8,U8=qd,G8=hr,V8=z8,K8=ft,q8=no;function H8(e,t,r){var n=K8(e)?U8:V8;return r&&q8(e,t,r)&&(t=void 0),n(e,G8(t))}var Y8=H8;const X8=$e(Y8);var Kt=function(t,r){var n=t.alwaysShow,a=t.ifOverflow;return n&&(a="extendDomain"),a===r},Gy=Up;function Z8(e,t,r){t=="__proto__"&&Gy?Gy(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var J8=Z8,Q8=J8,eL=Bp,tL=hr;function rL(e,t){var r={};return t=tL(t),eL(e,function(n,a,i){Q8(r,a,t(n,a,i))}),r}var nL=rL;const aL=$e(nL);function iL(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 oL=iL,sL=zl;function lL(e,t){var r=!0;return sL(e,function(n,a,i){return r=!!t(n,a,i),r}),r}var uL=lL,cL=oL,fL=uL,dL=hr,pL=ft,hL=no;function vL(e,t,r){var n=pL(e)?cL:fL;return r&&hL(e,t,r)&&(t=void 0),n(e,dL(t))}var mL=vL;const Vy=$e(mL);var yL=["x","y"];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 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 Ky(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 fi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ky(Object(r),!0).forEach(function(n){gL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ky(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gL(e,t,r){return t=bL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bL(e){var t=xL(e,"string");return In(t)=="symbol"?t:t+""}function xL(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)}function wL(e,t){if(e==null)return{};var r=OL(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 OL(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function SL(e,t){var r=e.x,n=e.y,a=wL(e,yL),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 fi(fi(fi(fi(fi({},t),a),o?{x:o}:{}),l?{y:l}:{}),{},{height:c,width:d,name:t.name,radius:t.radius})}function qy(e){return T.createElement(Sc,jc({shapeType:"rectangle",propTransformer:SL,activeClassName:"recharts-active-bar"},e))}var TL=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=Z(n)||IO(n);return i?t(n,a):(i||(process.env.NODE_ENV!=="production"?ht(!1,"minPointSize callback function received a value with type of ".concat(In(n),". Currently only numbers or null/undefined are supported.")):ht()),r)}},AL=["value","background"],Hy;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 PL(e,t){if(e==null)return{};var r=jL(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 jL(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 as(){return as=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},as.apply(this,arguments)}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 He(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){Or(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 _L(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Jy(n.key),n)}}function EL(e,t,r){return t&&Xy(e.prototype,t),r&&Xy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function CL(e,t,r){return t=is(t),$L(e,Zy()?Reflect.construct(t,r||[],is(e).constructor):t.apply(e,r))}function $L(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 kL(e)}function kL(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Zy=function(){return!!e})()}function is(e){return is=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},is(e)}function ML(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 Or(e,t,r){return t=Jy(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jy(e){var t=NL(e,"string");return Ln(t)=="symbol"?t:t+""}function NL(e,t){if(Ln(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ln(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rn=function(e){function t(){var r;_L(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=CL(this,t,[].concat(a)),Or(r,"state",{isAnimationFinished:!1}),Or(r,"id",Cr("recharts-bar-")),Or(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Or(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return ML(t,e),EL(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 p=d===l,m=p?u:o,y=He(He(He({},c),f),{},{isActive:p,option:m,index:d,dataKey:s,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return T.createElement(xe,as({className:"recharts-bar-rectangle"},ma(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)}),T.createElement(qy,y))})}},{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 T.createElement(Dt,{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(p){var m=p.t,y=i.map(function(v,b){var w=d&&d[b];if(w){var x=Ue(w.x,v.x),A=Ue(w.y,v.y),g=Ue(w.width,v.width),O=Ue(w.height,v.height);return He(He({},v),{},{x:x(m),y:A(m),width:g(m),height:O(m)})}if(o==="horizontal"){var S=Ue(0,v.height),j=S(m);return He(He({},v),{},{y:v.y+v.height-j,height:j})}var C=Ue(0,v.width),M=C(m);return He(He({},v),{},{width:M})});return T.createElement(xe,null,n.renderRectanglesStatically(y))})}},{key:"renderRectangles",value:function(){var n=this.props,a=n.data,i=n.isAnimationActive,o=this.state.prevData;return i&&a&&a.length&&(!o||!Br(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=PL(u,AL);if(!f)return null;var p=He(He(He(He(He({},d),{},{fill:"#eee"},f),l),ma(n.props,u,c)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:c,className:"recharts-bar-background-rectangle"});return T.createElement(qy,as({key:"background-bar-".concat(c),option:n.props.background,isActive:c===s},p))})}},{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=dt(c,Cn);if(!f)return null;var d=u==="vertical"?o[0].height/2:o[0].width/2,p=function(v,b){var w=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:w,errorVal:Je(v,b)}},m={clipPath:n?"url(#clipPath-".concat(a,")"):null};return T.createElement(xe,m,f.map(function(y){return T.cloneElement(y,{key:"error-bar-".concat(a,"-").concat(y.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,offset:d,dataPointFormatter:p})}))}},{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,p=n.isAnimationActive,m=n.background,y=n.id;if(a||!i||!i.length)return null;var v=this.state.isAnimationFinished,b=me("recharts-bar",o),w=s&&s.allowDataOverflow,x=l&&l.allowDataOverflow,A=w||x,g=fe(y)?this.id:y;return T.createElement(xe,{className:b},w||x?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(g)},T.createElement("rect",{x:w?u:u-f/2,y:x?c:c-d/2,width:w?f:f*2,height:x?d:d*2}))):null,T.createElement(xe,{className:"recharts-bar-rectangles",clipPath:A?"url(#clipPath-".concat(g,")"):null},m?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(A,g),(!p||v)&&Vt.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}}])}(T.PureComponent);Hy=Rn,Or(Rn,"displayName","Bar"),Or(Rn,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!vr.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),Or(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,p=oI(n,r);if(!p)return null;var m=t.layout,y=r.type.defaultProps,v=y!==void 0?He(He({},y),r.props):r.props,b=v.dataKey,w=v.children,x=v.minPointSize,A=m==="horizontal"?o:i,g=u?A.scale.domain():null,O=hI({numericAxis:A}),S=dt(w,Jl),j=f.map(function(C,M){var P,_,I,$,D,k;u?P=sI(u[c+M],g):(P=Je(C,b),Array.isArray(P)||(P=[O,P]));var B=TL(x,Hy.defaultProps.minPointSize)(P[1],M);if(m==="horizontal"){var z,G=[o.scale(P[0]),o.scale(P[1])],E=G[0],R=G[1];_=bm({axis:i,ticks:s,bandSize:a,offset:p.offset,entry:C,index:M}),I=(z=R??E)!==null&&z!==void 0?z:void 0,$=p.size;var F=E-R;if(D=Number.isNaN(F)?0:F,k={x:_,y:o.y,width:$,height:o.height},Math.abs(B)>0&&Math.abs(D)<Math.abs(B)){var W=$t(D||B)*(Math.abs(B)-Math.abs(D));I-=W,D+=W}}else{var V=[i.scale(P[0]),i.scale(P[1])],X=V[0],Q=V[1];if(_=X,I=bm({axis:o,ticks:l,bandSize:a,offset:p.offset,entry:C,index:M}),$=Q-X,D=p.size,k={x:i.x,y:I,width:i.width,height:D},Math.abs(B)>0&&Math.abs($)<Math.abs(B)){var ae=$t($||B)*(Math.abs(B)-Math.abs($));$+=ae}}return He(He(He({},C),{},{x:_,y:I,width:$,height:D,value:u?P:P[1],payload:C,background:k},S&&S[M]&&S[M].props),{},{tooltipPayload:[Tm(r,C)],tooltipPosition:{x:_+$/2,y:I+D/2}})});return He({data:j,layout:m},d)});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 DL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,tg(n.key),n)}}function IL(e,t,r){return t&&Qy(e.prototype,t),r&&Qy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function eg(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?eg(Object(r),!0).forEach(function(n){os(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function os(e,t,r){return t=tg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tg(e){var t=LL(e,"string");return di(t)=="symbol"?t:t+""}function LL(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)}var RL=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=!!mt(u,Rn);return c.reduce(function(p,m){var y=r[m],v=y.orientation,b=y.domain,w=y.padding,x=w===void 0?{}:w,A=y.mirror,g=y.reversed,O="".concat(v).concat(A?"Mirror":""),S,j,C,M,P;if(y.type==="number"&&(y.padding==="gap"||y.padding==="no-gap")){var _=b[1]-b[0],I=1/0,$=y.categoricalDomain.sort(FO);if($.forEach(function(V,X){X>0&&(I=Math.min((V||0)-($[X-1]||0),I))}),Number.isFinite(I)){var D=I/_,k=y.layout==="vertical"?n.height:n.width;if(y.padding==="gap"&&(S=D*k/2),y.padding==="no-gap"){var B=$r(t.barCategoryGap,D*k),z=D*k/2;S=z-B-(z-B)/k*B}}}a==="xAxis"?j=[n.left+(x.left||0)+(S||0),n.left+n.width-(x.right||0)-(S||0)]:a==="yAxis"?j=l==="horizontal"?[n.top+n.height-(x.bottom||0),n.top+(x.top||0)]:[n.top+(x.top||0)+(S||0),n.top+n.height-(x.bottom||0)-(S||0)]:j=y.range,g&&(j=[j[1],j[0]]);var G=aI(y,i,d),E=G.scale,R=G.realScaleType;E.domain(b).range(j),iI(E);var F=pI(E,It(It({},y),{},{realScaleType:R}));a==="xAxis"?(P=v==="top"&&!A||v==="bottom"&&A,C=n.left,M=f[O]-P*y.height):a==="yAxis"&&(P=v==="left"&&!A||v==="right"&&A,C=f[O]-P*y.width,M=n.top);var W=It(It(It({},y),F),{},{realScaleType:R,x:C,y:M,scale:E,width:a==="xAxis"?n.width:y.width,height:a==="yAxis"?n.height:y.height});return W.bandSize=Ro(W,F),!y.hide&&a==="xAxis"?f[O]+=(P?-1:1)*W.height:y.hide||(f[O]+=(P?-1:1)*W.width),It(It({},p),{},os({},m,W))},{})},rg=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)}},BL=function(t){var r=t.x1,n=t.y1,a=t.x2,i=t.y2;return rg({x:r,y:n},{x:a,y:i})},ng=function(){function e(t){DL(this,e),this.scale=t}return IL(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)}}])}();os(ng,"EPS",1e-4);var Ec=function(t){var r=Object.keys(t).reduce(function(n,a){return It(It({},n),{},os({},a,ng.create(t[a])))},{});return It(It({},r),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.bandAware,s=i.position;return aL(a,function(l,u){return r[u].apply(l,{bandAware:o,position:s})})},isInRange:function(a){return Vy(a,function(i,o){return r[o].isInRange(i)})}})};function FL(e){return(e%180+180)%180}var WL=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=FL(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)},zL=hr,UL=ba,GL=Qi;function VL(e){return function(t,r,n){var a=Object(t);if(!UL(t)){var i=zL(r);t=GL(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 KL=VL,qL=Dy;function HL(e){var t=qL(e),r=t%1;return t===t?r?t-r:t:0}var YL=HL,XL=jp,ZL=hr,JL=YL,QL=Math.max;function eR(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:JL(r);return a<0&&(a=QL(n+a,0)),XL(e,ZL(t),a)}var tR=eR,rR=KL,nR=tR,aR=rR(nR),iR=aR;const oR=$e(iR);var sR=zw(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 ss(e){"@babel/helpers - typeof";return ss=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},ss(e)}var Cc=T.createContext(void 0),$c=T.createContext(void 0),ag=T.createContext(void 0),ig=T.createContext({}),og=T.createContext(void 0),sg=T.createContext(0),lg=T.createContext(0),ug=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=sR(i);return T.createElement(Cc.Provider,{value:n},T.createElement($c.Provider,{value:a},T.createElement(ig.Provider,{value:i},T.createElement(ag.Provider,{value:c},T.createElement(og.Provider,{value:o},T.createElement(sg.Provider,{value:u},T.createElement(lg.Provider,{value:l},s)))))))},lR=function(){return T.useContext(og)};function cg(e){var t=Object.keys(e);return t.length===0?"There are no available ids.":"Available ids are: ".concat(t,".")}var fg=function(t){var r=T.useContext(Cc);r==null&&(process.env.NODE_ENV!=="production"?ht(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):ht());var n=r[t];return n==null&&(process.env.NODE_ENV!=="production"?ht(!1,'Could not find xAxis by id "'.concat(t,'" [').concat(ss(t),"]. ").concat(cg(r))):ht()),n},uR=function(){var t=T.useContext(Cc);return pr(t)},cR=function(){var t=T.useContext($c),r=oR(t,function(n){return Vy(n.domain,Number.isFinite)});return r||pr(t)},dg=function(t){var r=T.useContext($c);r==null&&(process.env.NODE_ENV!=="production"?ht(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):ht());var n=r[t];return n==null&&(process.env.NODE_ENV!=="production"?ht(!1,'Could not find yAxis by id "'.concat(t,'" [').concat(ss(t),"]. ").concat(cg(r))):ht()),n},fR=function(){var t=T.useContext(ag);return t},dR=function(){return T.useContext(ig)},kc=function(){return T.useContext(lg)},Mc=function(){return T.useContext(sg)};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 pR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hR(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 vR(e,t,r){return t&&hR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mR(e,t,r){return t=ls(t),yR(e,pg()?Reflect.construct(t,r||[],ls(e).constructor):t.apply(e,r))}function yR(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 gR(e)}function gR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pg=function(){return!!e})()}function ls(e){return ls=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ls(e)}function bR(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&&Nc(e,t)}function Nc(e,t){return Nc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Nc(e,t)}function hg(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 vg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hg(Object(r),!0).forEach(function(n){Dc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Dc(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=xR(e,"string");return Bn(t)=="symbol"?t:t+""}function xR(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)}function wR(e,t){return AR(e)||TR(e,t)||SR(e,t)||OR()}function OR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
261
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SR(e,t){if(e){if(typeof e=="string")return yg(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 yg(e,t)}}function yg(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 TR(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 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)}var PR=function(t,r){var n;return T.isValidElement(t)?n=T.cloneElement(t,r):pe(t)?n=t(r):n=T.createElement("line",Ic({},r,{className:"recharts-reference-line-line"})),n},jR=function(t,r,n,a,i,o,s,l,u){var c=i.x,f=i.y,d=i.width,p=i.height;if(n){var m=u.y,y=t.y.apply(m,{position:o});if(Kt(u,"discard")&&!t.y.isInRange(y))return null;var v=[{x:c+d,y},{x:c,y}];return l==="left"?v.reverse():v}if(r){var b=u.x,w=t.x.apply(b,{position:o});if(Kt(u,"discard")&&!t.x.isInRange(w))return null;var x=[{x:w,y:f+p},{x:w,y:f}];return s==="top"?x.reverse():x}if(a){var A=u.segment,g=A.map(function(O){return t.apply(O,{position:o})});return Kt(u,"discard")&&X8(g,function(O){return!t.isInRange(O)})?null:g}return null};function _R(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=lR(),c=fg(a),f=dg(i),d=fR();if(!u||!d)return null;er(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=Ec({x:c.scale,y:f.scale}),m=Xe(t),y=Xe(r),v=n&&n.length===2,b=jR(p,m,y,v,d,e.position,c.orientation,f.orientation,e);if(!b)return null;var w=wR(b,2),x=w[0],A=x.x,g=x.y,O=w[1],S=O.x,j=O.y,C=Kt(e,"hidden")?"url(#".concat(u,")"):void 0,M=vg(vg({clipPath:C},de(e,!0)),{},{x1:A,y1:g,x2:S,y2:j});return T.createElement(xe,{className:me("recharts-reference-line",s)},PR(o,M),it.renderCallByParent(e,BL({x1:A,y1:g,x2:S,y2:j})))}var Lc=function(e){function t(){return pR(this,t),mR(this,t,arguments)}return bR(t,e),vR(t,[{key:"render",value:function(){return T.createElement(_R,this.props)}}])}(T.Component);Dc(Lc,"displayName","ReferenceLine"),Dc(Lc,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Rc(){return Rc=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},Rc.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 gg(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 bg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gg(Object(r),!0).forEach(function(n){cs(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ER(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,wg(n.key),n)}}function $R(e,t,r){return t&&CR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function kR(e,t,r){return t=us(t),MR(e,xg()?Reflect.construct(t,r||[],us(e).constructor):t.apply(e,r))}function MR(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 NR(e)}function NR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xg=function(){return!!e})()}function us(e){return us=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},us(e)}function DR(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 cs(e,t,r){return t=wg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wg(e){var t=IR(e,"string");return Fn(t)=="symbol"?t:t+""}function IR(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 LR=function(t){var r=t.x,n=t.y,a=t.xAxis,i=t.yAxis,o=Ec({x:a.scale,y:i.scale}),s=o.apply({x:r,y:n},{bandAware:!0});return Kt(t,"discard")&&!o.isInRange(s)?null:s},fs=function(e){function t(){return ER(this,t),kR(this,t,arguments)}return DR(t,e),$R(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=Xe(a),c=Xe(i);if(er(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!c)return null;var f=LR(this.props);if(!f)return null;var d=f.x,p=f.y,m=this.props,y=m.shape,v=m.className,b=Kt(this.props,"hidden")?"url(#".concat(l,")"):void 0,w=bg(bg({clipPath:b},de(this.props,!0)),{},{cx:d,cy:p});return T.createElement(xe,{className:me("recharts-reference-dot",v)},t.renderDot(y,w),it.renderCallByParent(this.props,{x:d-o,y:p-o,width:2*o,height:2*o}))}}])}(T.Component);cs(fs,"displayName","ReferenceDot"),cs(fs,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1}),cs(fs,"renderDot",function(e,t){var r;return T.isValidElement(e)?r=T.cloneElement(e,t):pe(e)?r=e(t):r=T.createElement(Xo,Rc({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function Fc(){return Fc=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},Fc.apply(this,arguments)}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 Og(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 Sg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Og(Object(r),!0).forEach(function(n){ps(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Og(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function RR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BR(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,Ag(n.key),n)}}function FR(e,t,r){return t&&BR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function WR(e,t,r){return t=ds(t),zR(e,Tg()?Reflect.construct(t,r||[],ds(e).constructor):t.apply(e,r))}function zR(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 UR(e)}function UR(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 ds(e){return ds=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ds(e)}function GR(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 ps(e,t,r){return t=Ag(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ag(e){var t=VR(e,"string");return Wn(t)=="symbol"?t:t+""}function VR(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 KR=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=Ec({x:c.scale,y:f.scale}),p={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 Kt(i,"discard")&&(!d.isInRange(p)||!d.isInRange(m))?null:rg(p,m)},hs=function(e){function t(){return RR(this,t),WR(this,t,arguments)}return GR(t,e),FR(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;er(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Xe(a),d=Xe(i),p=Xe(o),m=Xe(s),y=this.props.shape;if(!f&&!d&&!p&&!m&&!y)return null;var v=KR(f,d,p,m,this.props);if(!v&&!y)return null;var b=Kt(this.props,"hidden")?"url(#".concat(c,")"):void 0;return T.createElement(xe,{className:me("recharts-reference-area",l)},t.renderRect(y,Sg(Sg({clipPath:b},de(this.props,!0)),v)),it.renderCallByParent(this.props,v))}}])}(T.Component);ps(hs,"displayName","ReferenceArea"),ps(hs,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1}),ps(hs,"renderRect",function(e,t){var r;return T.isValidElement(e)?r=T.cloneElement(e,t):pe(e)?r=e(t):r=T.createElement(xc,Fc({},t,{className:"recharts-reference-area-rect"})),r});function Pg(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 qR(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return WL(n,r)}function HR(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 vs(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 YR(e,t){return Pg(e,t+1)}function XR(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:Pg(n,u)};var y=l,v,b=function(){return v===void 0&&(v=r(m,y)),v},w=m.coordinate,x=l===0||vs(e,w,b,c,s);x||(l=0,c=o,u+=1),x&&(c=w+e*(b()/2+a),l+=u)},d;u<=i.length;)if(d=f(),d)return d.v;return[]}function pi(e){"@babel/helpers - typeof";return pi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pi(e)}function jg(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 ot(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jg(Object(r),!0).forEach(function(n){ZR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ZR(e,t,r){return t=JR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JR(e){var t=QR(e,"string");return pi(t)=="symbol"?t:t+""}function QR(e,t){if(pi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function e7(e,t,r,n,a){for(var i=(n||[]).slice(),o=i.length,s=t.start,l=t.end,u=function(d){var p=i[d],m,y=function(){return m===void 0&&(m=r(p,d)),m};if(d===o-1){var v=e*(p.coordinate+e*y()/2-l);i[d]=p=ot(ot({},p),{},{tickCoord:v>0?p.coordinate-v*e:p.coordinate})}else i[d]=p=ot(ot({},p),{},{tickCoord:p.coordinate});var b=vs(e,p.tickCoord,y,s,l);b&&(l=p.tickCoord-e*(y()/2+a),i[d]=ot(ot({},p),{},{isShow:!0}))},c=o-1;c>=0;c--)u(c);return i}function t7(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=ot(ot({},c),{},{tickCoord:d>0?c.coordinate-d*e:c.coordinate});var p=vs(e,c.tickCoord,function(){return f},l,u);p&&(u=c.tickCoord-e*(f/2+a),o[s-1]=ot(ot({},c),{},{isShow:!0}))}for(var m=i?s-1:s,y=function(w){var x=o[w],A,g=function(){return A===void 0&&(A=r(x,w)),A};if(w===0){var O=e*(x.coordinate-e*g()/2-l);o[w]=x=ot(ot({},x),{},{tickCoord:O<0?x.coordinate-O*e:x.coordinate})}else o[w]=x=ot(ot({},x),{},{tickCoord:x.coordinate});var S=vs(e,x.tickCoord,g,l,u);S&&(l=x.tickCoord+e*(g()/2+a),o[w]=ot(ot({},x),{},{isShow:!0}))},v=0;v<m;v++)y(v);return o}function zc(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(Z(l)||vr.isSsr)return YR(a,typeof l=="number"&&Z(l)?l:0);var d=[],p=s==="top"||s==="bottom"?"width":"height",m=c&&p==="width"?Aa(c,{fontSize:t,letterSpacing:r}):{width:0,height:0},y=function(x,A){var g=pe(u)?u(x.value,A):x.value;return p==="width"?qR(Aa(g,{fontSize:t,letterSpacing:r}),m,f):Aa(g,{fontSize:t,letterSpacing:r})[p]},v=a.length>=2?$t(a[1].coordinate-a[0].coordinate):1,b=HR(i,v,p);return l==="equidistantPreserveStart"?XR(v,b,y,a,o):(l==="preserveStart"||l==="preserveStartEnd"?d=t7(v,b,y,a,o,l==="preserveStartEnd"):d=e7(v,b,y,a,o),d.filter(function(w){return w.isShow}))}var r7=["viewBox"],n7=["viewBox"],a7=["ticks"];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 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 _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 et(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){Vc(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 Uc(e,t){if(e==null)return{};var r=i7(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 i7(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 o7(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 s7(e,t,r){return t&&Eg(e.prototype,t),r&&Eg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l7(e,t,r){return t=ms(t),u7(e,Cg()?Reflect.construct(t,r||[],ms(e).constructor):t.apply(e,r))}function u7(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 c7(e)}function c7(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 ms(e){return ms=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ms(e)}function f7(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 Vc(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=d7(e,"string");return zn(t)=="symbol"?t:t+""}function d7(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 Gn=function(e){function t(r){var n;return o7(this,t),n=l7(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return f7(t,e),s7(t,[{key:"shouldComponentUpdate",value:function(n,a){var i=n.viewBox,o=Uc(n,r7),s=this.props,l=s.viewBox,u=Uc(s,n7);return!un(i,l)||!un(o,u)||!un(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,p,m,y,v,b,w,x=f?-1:1,A=n.tickSize||c,g=Z(n.tickCoord)?n.tickCoord:n.coordinate;switch(u){case"top":p=m=n.coordinate,v=o+ +!f*l,y=v-x*A,w=y-x*d,b=g;break;case"left":y=v=n.coordinate,m=i+ +!f*s,p=m-x*A,b=p-x*d,w=g;break;case"right":y=v=n.coordinate,m=i+ +f*s,p=m+x*A,b=p+x*d,w=g;break;default:p=m=n.coordinate,v=o+ +f*l,y=v+x*A,w=y+x*d,b=g;break}return{line:{x1:p,y1:y,x2:m,y2:v},tick:{x:b,y:w}}}},{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=et(et(et({},de(this.props,!1)),de(c,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var d=+(l==="top"&&!u||l==="bottom"&&u);f=et(et({},f),{},{x1:a,y1:i+d*s,x2:a+o,y2:i+d*s})}else{var p=+(l==="left"&&!u||l==="right"&&u);f=et(et({},f),{},{x1:a+p*o,y1:i,x2:a+p*o,y2:i+s})}return T.createElement("line",Un({},f,{className:me("recharts-cartesian-axis-line",wt(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,p=zc(et(et({},this.props),{},{ticks:n}),a,i),m=this.getTickTextAnchor(),y=this.getTickVerticalAnchor(),v=de(this.props,!1),b=de(c,!1),w=et(et({},v),{},{fill:"none"},de(l,!1)),x=p.map(function(A,g){var O=o.getTickLineCoord(A),S=O.line,j=O.tick,C=et(et(et(et({textAnchor:m,verticalAnchor:y},v),{},{stroke:"none",fill:u},b),j),{},{index:g,payload:A,visibleTicksCount:p.length,tickFormatter:f});return T.createElement(xe,Un({className:"recharts-cartesian-axis-tick",key:"tick-".concat(A.value,"-").concat(A.coordinate,"-").concat(A.tickCoord)},ma(o.props,A,g)),l&&T.createElement("line",Un({},w,S,{className:me("recharts-cartesian-axis-tick-line",wt(l,"className"))})),c&&t.renderTickItem(c,C,"".concat(pe(f)?f(A.value,g):A.value).concat(d||"")))});return T.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,p=Uc(f,a7),m=d;return pe(l)&&(m=d&&d.length>0?l(this.props):l(p)),o<=0||s<=0||!m||!m.length?null:T.createElement(xe,{className:me("recharts-cartesian-axis",u),ref:function(v){n.layerReference=v}},i&&this.renderAxisLine(),this.renderTicks(m,this.state.fontSize,this.state.letterSpacing),it.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,a,i){var o,s=me(a.className,"recharts-cartesian-axis-tick-value");return T.isValidElement(n)?o=T.cloneElement(n,et(et({},a),{},{className:s})):pe(n)?o=n(et(et({},a),{},{className:s})):o=T.createElement(co,Un({},a,{className:"recharts-cartesian-axis-tick-value"}),i),o}}])}(T.Component);Vc(Gn,"displayName","CartesianAxis"),Vc(Gn,"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 p7=["x1","y1","x2","y2","key"],h7=["offset"];function Kr(e){"@babel/helpers - typeof";return Kr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kr(e)}function 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 st(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){v7(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 v7(e,t,r){return t=m7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m7(e){var t=y7(e,"string");return Kr(t)=="symbol"?t:t+""}function y7(e,t){if(Kr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Kr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qr(){return qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qr.apply(this,arguments)}function Mg(e,t){if(e==null)return{};var r=g7(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 g7(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 b7=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 T.createElement("rect",{x:a,y:i,ry:l,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function Ng(e,t){var r;if(T.isValidElement(e))r=T.cloneElement(e,t);else if(pe(e))r=e(t);else{var n=t.x1,a=t.y1,i=t.x2,o=t.y2,s=t.key,l=Mg(t,p7),u=de(l,!1);u.offset;var c=Mg(u,h7);r=T.createElement("line",qr({},c,{x1:n,y1:a,x2:i,y2:o,fill:"none",key:s}))}return r}function x7(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=st(st({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(l),index:l});return Ng(a,u)});return T.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function w7(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=st(st({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(l),index:l});return Ng(a,u)});return T.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function O7(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,p){return d-p});a!==c[0]&&c.unshift(0);var f=c.map(function(d,p){var m=!c[p+1],y=m?a+o-d:c[p+1]-d;if(y<=0)return null;var v=p%t.length;return T.createElement("rect",{key:"react-".concat(p),y:d,x:n,height:y,width:i,stroke:"none",fill:t[v],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return T.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function S7(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,p){return d-p});i!==c[0]&&c.unshift(0);var f=c.map(function(d,p){var m=!c[p+1],y=m?i+s-d:c[p+1]-d;if(y<=0)return null;var v=p%n.length;return T.createElement("rect",{key:"react-".concat(p),x:d,y:o,width:y,height:l,stroke:"none",fill:n[v],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return T.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var T7=function(t,r){var n=t.xAxis,a=t.width,i=t.height,o=t.offset;return ym(zc(st(st(st({},Gn.defaultProps),n),{},{ticks:ur(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.left,o.left+o.width,r)},A7=function(t,r){var n=t.yAxis,a=t.width,i=t.height,o=t.offset;return ym(zc(st(st(st({},Gn.defaultProps),n),{},{ticks:ur(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.top,o.top+o.height,r)},Vn={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Dg(e){var t,r,n,a,i,o,s=kc(),l=Mc(),u=dR(),c=st(st({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Vn.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Vn.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:Vn.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:Vn.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:Vn.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Vn.verticalFill,x:Z(e.x)?e.x:u.left,y:Z(e.y)?e.y:u.top,width:Z(e.width)?e.width:u.width,height:Z(e.height)?e.height:u.height}),f=c.x,d=c.y,p=c.width,m=c.height,y=c.syncWithTicks,v=c.horizontalValues,b=c.verticalValues,w=uR(),x=cR();if(!Z(p)||p<=0||!Z(m)||m<=0||!Z(f)||f!==+f||!Z(d)||d!==+d)return null;var A=c.verticalCoordinatesGenerator||T7,g=c.horizontalCoordinatesGenerator||A7,O=c.horizontalPoints,S=c.verticalPoints;if((!O||!O.length)&&pe(g)){var j=v&&v.length,C=g({yAxis:x?st(st({},x),{},{ticks:j?v:x.ticks}):void 0,width:s,height:l,offset:u},j?!0:y);er(Array.isArray(C),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Kr(C),"]")),Array.isArray(C)&&(O=C)}if((!S||!S.length)&&pe(A)){var M=b&&b.length,P=A({xAxis:w?st(st({},w),{},{ticks:M?b:w.ticks}):void 0,width:s,height:l,offset:u},M?!0:y);er(Array.isArray(P),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Kr(P),"]")),Array.isArray(P)&&(S=P)}return T.createElement("g",{className:"recharts-cartesian-grid"},T.createElement(b7,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),T.createElement(x7,qr({},c,{offset:u,horizontalPoints:O,xAxis:w,yAxis:x})),T.createElement(w7,qr({},c,{offset:u,verticalPoints:S,xAxis:w,yAxis:x})),T.createElement(O7,qr({},c,{horizontalPoints:O})),T.createElement(S7,qr({},c,{verticalPoints:S})))}Dg.displayName="CartesianGrid";var P7=["type","layout","connectNulls","ref"],j7=["key"];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 Ig(e,t){if(e==null)return{};var r=_7(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 _7(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 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 Lg(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 bt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lg(Object(r),!0).forEach(function(n){Lt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qn(e){return k7(e)||$7(e)||C7(e)||E7()}function E7(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
262
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C7(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 $7(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function k7(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}function M7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rg(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,Fg(n.key),n)}}function N7(e,t,r){return t&&Rg(e.prototype,t),r&&Rg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function D7(e,t,r){return t=ys(t),I7(e,Bg()?Reflect.construct(t,r||[],ys(e).constructor):t.apply(e,r))}function I7(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 L7(e)}function L7(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 ys(e){return ys=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ys(e)}function R7(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 Lt(e,t,r){return t=Fg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fg(e){var t=B7(e,"string");return Kn(t)=="symbol"?t:t+""}function B7(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 vi=function(e){function t(){var r;M7(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=D7(this,t,[].concat(a)),Lt(r,"state",{isAnimationFinished:!0,totalLength:0}),Lt(r,"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),Lt(r,"getStrokeDasharray",function(o,s,l){var u=l.reduce(function(b,w){return b+w});if(!u)return r.generateSimpleStrokeDasharray(s,o);for(var c=Math.floor(o/u),f=o%u,d=s-o,p=[],m=0,y=0;m<l.length;y+=l[m],++m)if(y+l[m]>f){p=[].concat(qn(l.slice(0,m)),[f-y]);break}var v=p.length%2===0?[0,d]:[d];return[].concat(qn(t.repeat(l,c)),qn(p),v).map(function(b){return"".concat(b,"px")}).join(", ")}),Lt(r,"id",Cr("recharts-line-")),Lt(r,"pathRef",function(o){r.mainCurve=o}),Lt(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Lt(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return R7(t,e),N7(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=dt(c,Cn);if(!f)return null;var d=function(y,v){return{x:y.x,y:y.y,value:y.value,errorVal:Je(y.payload,v)}},p={clipPath:n?"url(#clipPath-".concat(a,")"):null};return T.createElement(xe,p,f.map(function(m){return T.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),p=u.map(function(y,v){var b=bt(bt(bt({key:"dot-".concat(v),r:3},f),d),{},{index:v,cx:y.x,cy:y.y,value:y.value,dataKey:c,payload:y.payload,points:u});return t.renderDotItem(l,b)}),m={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return T.createElement(xe,hi({className:"recharts-line-dots",key:"dots"},m),p)}},{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=Ig(s,P7),d=bt(bt(bt({},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 T.createElement(Gr,hi({},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,p=o.animationId,m=o.animateNewValues,y=o.width,v=o.height,b=this.state,w=b.prevPoints,x=b.totalLength;return T.createElement(Dt,{begin:c,duration:f,isActive:u,easing:d,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(A){var g=A.t;if(w){var O=w.length/s.length,S=s.map(function(_,I){var $=Math.floor(I*O);if(w[$]){var D=w[$],k=Ue(D.x,_.x),B=Ue(D.y,_.y);return bt(bt({},_),{},{x:k(g),y:B(g)})}if(m){var z=Ue(y*2,_.x),G=Ue(v/2,_.y);return bt(bt({},_),{},{x:z(g),y:G(g)})}return bt(bt({},_),{},{x:_.x,y:_.y})});return i.renderCurveStatically(S,n,a)}var j=Ue(0,x),C=j(g),M;if(l){var P="".concat(l).split(/[,\s]+/gim).map(function(_){return parseFloat(_)});M=i.getStrokeDasharray(C,x,P)}else M=i.generateSimpleStrokeDasharray(x,C);return i.renderCurveStatically(s,n,a,{strokeDasharray:M})})}},{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||!Br(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,p=a.width,m=a.height,y=a.isAnimationActive,v=a.id;if(i||!s||!s.length)return null;var b=this.state.isAnimationFinished,w=s.length===1,x=me("recharts-line",l),A=u&&u.allowDataOverflow,g=c&&c.allowDataOverflow,O=A||g,S=fe(v)?this.id:v,j=(n=de(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},C=j.r,M=C===void 0?3:C,P=j.strokeWidth,_=P===void 0?2:P,I=ud(o)?o:{},$=I.clipDot,D=$===void 0?!0:$,k=M*2+_;return T.createElement(xe,{className:x},A||g?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(S)},T.createElement("rect",{x:A?d:d-p/2,y:g?f:f-m/2,width:A?p:p*2,height:g?m:m*2})),!D&&T.createElement("clipPath",{id:"clipPath-dots-".concat(S)},T.createElement("rect",{x:d-k/2,y:f-k/2,width:p+k,height:m+k}))):null,!w&&this.renderCurve(O,S),this.renderErrorBar(O,S),(w||o)&&this.renderDots(O,D,S),(!y||b)&&Vt.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(qn(n),[0]):n,o=[],s=0;s<a;++s)o=[].concat(qn(o),qn(i));return o}},{key:"renderDotItem",value:function(n,a){var i;if(T.isValidElement(n))i=T.cloneElement(n,a);else if(pe(n))i=n(a);else{var o=a.key,s=Ig(a,j7),l=me("recharts-line-dot",typeof n!="boolean"?n.className:"");i=T.createElement(Xo,hi({key:o},s,{className:l}))}return i}}])}(T.PureComponent);Lt(vi,"displayName","Line"),Lt(vi,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!vr.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),Lt(vi,"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,p){var m=Je(d,o);return c==="horizontal"?{x:kn({axis:r,ticks:a,bandSize:s,entry:d,index:p}),y:fe(m)?null:n.scale(m),value:m,payload:d}:{x:fe(m)?null:r.scale(m),y:kn({axis:n,ticks:i,bandSize:s,entry:d,index:p}),value:m,payload:d}});return bt({points:f,layout:c},u)});var F7=["layout","type","stroke","connectNulls","isRange","ref"],W7=["key"],Wg;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 zg(e,t){if(e==null)return{};var r=z7(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 z7(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Hr(){return Hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hr.apply(this,arguments)}function 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 Sr(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){qt(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 U7(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,Kg(n.key),n)}}function G7(e,t,r){return t&&Gg(e.prototype,t),r&&Gg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function V7(e,t,r){return t=gs(t),K7(e,Vg()?Reflect.construct(t,r||[],gs(e).constructor):t.apply(e,r))}function K7(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 q7(e)}function q7(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Vg=function(){return!!e})()}function gs(e){return gs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},gs(e)}function H7(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 qt(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=Y7(e,"string");return Hn(t)=="symbol"?t:t+""}function Y7(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)}var Tr=function(e){function t(){var r;U7(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=V7(this,t,[].concat(a)),qt(r,"state",{isAnimationFinished:!0}),qt(r,"id",Cr("recharts-area-")),qt(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),pe(o)&&o()}),qt(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),pe(o)&&o()}),r}return H7(t,e),G7(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),p=de(u,!0),m=c.map(function(v,b){var w=Sr(Sr(Sr({key:"dot-".concat(b),r:3},d),p),{},{index:b,cx:v.x,cy:v.y,dataKey:f,value:v.value,payload:v.payload,points:c});return t.renderDotItem(u,w)}),y={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return T.createElement(xe,Hr({className:"recharts-area-dots"},y),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=br(o.map(function(d){return d.y||0}));return Z(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(br(i.map(function(d){return d.y||0})),f)),Z(f)?T.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=br(o.map(function(d){return d.x||0}));return Z(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(br(i.map(function(d){return d.x||0})),f)),Z(f)?T.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 p=zg(s,F7);return T.createElement(xe,{clipPath:i?"url(#clipPath-".concat(o,")"):null},T.createElement(Gr,Hr({},de(p,!0),{points:n,connectNulls:f,type:u,baseLine:a,layout:l,stroke:"none",className:"recharts-area-area"})),c!=="none"&&T.createElement(Gr,Hr({},de(this.props,!1),{className:"recharts-area-curve",layout:l,type:u,connectNulls:f,fill:"none",points:n})),c!=="none"&&d&&T.createElement(Gr,Hr({},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,p=o.animationId,m=this.state,y=m.prevPoints,v=m.prevBaseLine;return T.createElement(Dt,{begin:c,duration:f,isActive:u,easing:d,from:{t:0},to:{t:1},key:"area-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(b){var w=b.t;if(y){var x=y.length/s.length,A=s.map(function(j,C){var M=Math.floor(C*x);if(y[M]){var P=y[M],_=Ue(P.x,j.x),I=Ue(P.y,j.y);return Sr(Sr({},j),{},{x:_(w),y:I(w)})}return j}),g;if(Z(l)&&typeof l=="number"){var O=Ue(v,l);g=O(w)}else if(fe(l)||ln(l)){var S=Ue(v,0);g=S(w)}else g=l.map(function(j,C){var M=Math.floor(C*x);if(v[M]){var P=v[M],_=Ue(P.x,j.x),I=Ue(P.y,j.y);return Sr(Sr({},j),{},{x:_(w),y:I(w)})}return j});return i.renderAreaStatically(A,g,n,a)}return T.createElement(xe,null,T.createElement("defs",null,T.createElement("clipPath",{id:"animationClipPath-".concat(a)},i.renderClipRect(w))),T.createElement(xe,{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||!Br(c,o)||!Br(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,p=a.width,m=a.height,y=a.isAnimationActive,v=a.id;if(i||!s||!s.length)return null;var b=this.state.isAnimationFinished,w=s.length===1,x=me("recharts-area",l),A=f&&f.allowDataOverflow,g=d&&d.allowDataOverflow,O=A||g,S=fe(v)?this.id:v,j=(n=de(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},C=j.r,M=C===void 0?3:C,P=j.strokeWidth,_=P===void 0?2:P,I=ud(o)?o:{},$=I.clipDot,D=$===void 0?!0:$,k=M*2+_;return T.createElement(xe,{className:x},A||g?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(S)},T.createElement("rect",{x:A?c:c-p/2,y:g?u:u-m/2,width:A?p:p*2,height:g?m:m*2})),!D&&T.createElement("clipPath",{id:"clipPath-dots-".concat(S)},T.createElement("rect",{x:c-k/2,y:u-k/2,width:p+k,height:m+k}))):null,w?null:this.renderArea(O,S),(o||w)&&this.renderDots(O,D,S),(!y||b)&&Vt.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}}])}(T.PureComponent);Wg=Tr,qt(Tr,"displayName","Area"),qt(Tr,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!vr.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),qt(Tr,"getBaseValue",function(e,t,r,n){var a=e.layout,i=e.baseValue,o=t.props.baseValue,s=o??i;if(Z(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]}),qt(Tr,"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,p=t.layout,m=u&&u.length,y=Wg.getBaseValue(t,r,n,a),v=p==="horizontal",b=!1,w=f.map(function(A,g){var O;m?O=u[c+g]:(O=Je(A,l),Array.isArray(O)?b=!0:O=[y,O]);var S=O[1]==null||m&&Je(A,l)==null;return v?{x:kn({axis:n,ticks:i,bandSize:s,entry:A,index:g}),y:S?null:a.scale(O[1]),value:O,payload:A}:{x:S?null:n.scale(O[1]),y:kn({axis:a,ticks:o,bandSize:s,entry:A,index:g}),value:O,payload:A}}),x;return m||b?x=w.map(function(A){var g=Array.isArray(A.value)?A.value[0]:null;return v?{x:A.x,y:g!=null&&A.y!=null?a.scale(g):null}:{x:g!=null?n.scale(g):null,y:A.y}}):x=v?a.scale(y):n.scale(y),Sr({points:w,baseLine:x,layout:p,isRange:b},d)}),qt(Tr,"renderDotItem",function(e,t){var r;if(T.isValidElement(e))r=T.cloneElement(e,t);else if(pe(e))r=e(t);else{var n=me("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=zg(t,W7);r=T.createElement(Xo,Hr({},i,{key:a,className:n}))}return 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 X7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Z7(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,Yg(n.key),n)}}function J7(e,t,r){return t&&Z7(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Q7(e,t,r){return t=bs(t),e9(e,qg()?Reflect.construct(t,r||[],bs(e).constructor):t.apply(e,r))}function e9(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 t9(e)}function t9(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qg=function(){return!!e})()}function bs(e){return bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bs(e)}function r9(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 Hg(e,t,r){return t=Yg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yg(e){var t=n9(e,"string");return Yn(t)=="symbol"?t:t+""}function n9(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 xs=function(e){function t(){return X7(this,t),Q7(this,t,arguments)}return r9(t,e),J7(t,[{key:"render",value:function(){return null}}])}(xt.Component);Hg(xs,"displayName","ZAxis"),Hg(xs,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var a9=["option","isActive"];function mi(){return mi=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},mi.apply(this,arguments)}function i9(e,t){if(e==null)return{};var r=o9(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 o9(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 s9(e){var t=e.option,r=e.isActive,n=i9(e,a9);return typeof t=="string"?xt.createElement(Sc,mi({option:xt.createElement(Hi,mi({type:t},n)),isActive:r,shapeType:"symbols"},n)):xt.createElement(Sc,mi({option:t,isActive:r,shapeType:"symbols"},n))}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 yi(){return yi=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},yi.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 _t(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){Ar(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 l9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zg(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 u9(e,t,r){return t&&Zg(e.prototype,t),r&&Zg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c9(e,t,r){return t=ws(t),f9(e,Jg()?Reflect.construct(t,r||[],ws(e).constructor):t.apply(e,r))}function f9(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 d9(e)}function d9(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 ws(e){return ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ws(e)}function p9(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&&Xc(e,t)}function Xc(e,t){return Xc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Xc(e,t)}function Ar(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=h9(e,"string");return Xn(t)=="symbol"?t:t+""}function h9(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 Os=function(e){function t(){var r;l9(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=c9(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",Cr("recharts-scatter-")),r}return p9(t,e),u9(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,p=d?s:o,m=_t(_t({},u),c);return T.createElement(xe,yi({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)},ma(a.props,c,f),{role:"img"}),T.createElement(s9,yi({option:p,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 T.createElement(Dt,{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 p=d.t,m=i.map(function(y,v){var b=f&&f[v];if(b){var w=Ue(b.cx,y.cx),x=Ue(b.cy,y.cy),A=Ue(b.size,y.size);return _t(_t({},y),{},{cx:w(p),cy:x(p),size:A(p)})}var g=Ue(0,y.size);return _t(_t({},y),{},{size:g(p)})});return T.createElement(xe,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||!Br(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=dt(l,Cn);return u?u.map(function(c,f){var d=c.props,p=d.direction,m=d.dataKey;return T.cloneElement(c,{key:"".concat(p,"-").concat(m,"-").concat(i[f]),data:i,xAxis:o,yAxis:s,layout:p==="x"?"vertical":"horizontal",dataPointFormatter:function(v,b){return{x:v.cx,y:v.cy,value:p==="x"?+v.node.x:+v.node.y,errorVal:Je(v,b)}}})}):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(x){return{x:x.cx,y:x.cy}});else if(o==="fitting"){var d=BO(a),p=d.xmin,m=d.xmax,y=d.a,v=d.b,b=function(A){return y*A+v};c=[{x:p,y:b(p)},{x:m,y:b(m)}]}var w=_t(_t(_t({},l),{},{fill:"none",stroke:l&&l.fill},u),{},{points:c});return T.isValidElement(i)?f=T.cloneElement(i,w):pe(i)?f=i(w):f=T.createElement(Gr,yi({},w,{type:s})),T.createElement(xe,{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,p=n.height,m=n.id,y=n.isAnimationActive;if(a||!i||!i.length)return null;var v=this.state.isAnimationFinished,b=me("recharts-scatter",s),w=l&&l.allowDataOverflow,x=u&&u.allowDataOverflow,A=w||x,g=fe(m)?this.id:m;return T.createElement(xe,{className:b,clipPath:A?"url(#clipPath-".concat(g,")"):null},w||x?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(g)},T.createElement("rect",{x:w?c:c-d/2,y:x?f:f-p/2,width:w?d:d*2,height:x?p:p*2}))):null,o&&this.renderLine(),this.renderErrorBar(),T.createElement(xe,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!y||v)&&Vt.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}}])}(T.PureComponent);Ar(Os,"displayName","Scatter"),Ar(Os,"defaultProps",{xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!vr.isSsr,animationBegin:0,animationDuration:400,animationEasing:"linear"}),Ar(Os,"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=dt(a.props.children,Jl),f=fe(t.dataKey)?a.props.dataKey:t.dataKey,d=fe(r.dataKey)?a.props.dataKey:r.dataKey,p=n&&n.dataKey,m=n?n.range:xs.defaultProps.range,y=m&&m[0],v=t.scale.bandwidth?t.scale.bandwidth():0,b=r.scale.bandwidth?r.scale.bandwidth():0,w=i.map(function(x,A){var g=Je(x,f),O=Je(x,d),S=!fe(p)&&Je(x,p)||"-",j=[{name:fe(t.dataKey)?a.props.name:t.name||t.dataKey,unit:t.unit||"",value:g,payload:x,dataKey:f,type:u},{name:fe(r.dataKey)?a.props.name:r.name||r.dataKey,unit:r.unit||"",value:O,payload:x,dataKey:d,type:u}];S!=="-"&&j.push({name:n.name||n.dataKey,unit:n.unit||"",value:S,payload:x,dataKey:p,type:u});var C=kn({axis:t,ticks:o,bandSize:v,entry:x,index:A,dataKey:f}),M=kn({axis:r,ticks:s,bandSize:b,entry:x,index:A,dataKey:d}),P=S!=="-"?n.scale(S):y,_=Math.sqrt(Math.max(P,0)/Math.PI);return _t(_t({},x),{},{cx:C,cy:M,x:C-_,y:M-_,xAxis:t,yAxis:r,zAxis:n,width:2*_,height:2*_,size:P,node:{x:g,y:O,z:S},tooltipPayload:j,tooltipPosition:{x:C,y:M},payload:x},c&&c[A]&&c[A].props)});return _t({points:w},l)});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 v9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m9(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,rb(n.key),n)}}function y9(e,t,r){return t&&m9(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function g9(e,t,r){return t=Ss(t),b9(e,eb()?Reflect.construct(t,r||[],Ss(e).constructor):t.apply(e,r))}function b9(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 x9(e)}function x9(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(eb=function(){return!!e})()}function Ss(e){return Ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ss(e)}function w9(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 tb(e,t,r){return t=rb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rb(e){var t=O9(e,"string");return Zn(t)=="symbol"?t:t+""}function O9(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)}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 S9(e){var t=e.xAxisId,r=kc(),n=Mc(),a=fg(t);return a==null?null:xt.createElement(Gn,Jc({},a,{className:me("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return ur(o,!0)}}))}var Ts=function(e){function t(){return v9(this,t),g9(this,t,arguments)}return w9(t,e),y9(t,[{key:"render",value:function(){return xt.createElement(S9,this.props)}}])}(xt.Component);tb(Ts,"displayName","XAxis"),tb(Ts,"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 T9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A9(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 P9(e,t,r){return t&&A9(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function j9(e,t,r){return t=As(t),_9(e,nb()?Reflect.construct(t,r||[],As(e).constructor):t.apply(e,r))}function _9(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 E9(e)}function E9(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nb=function(){return!!e})()}function As(e){return As=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},As(e)}function C9(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 ab(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=$9(e,"string");return Jn(t)=="symbol"?t:t+""}function $9(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 ef(){return ef=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},ef.apply(this,arguments)}var k9=function(t){var r=t.yAxisId,n=kc(),a=Mc(),i=dg(r);return i==null?null:xt.createElement(Gn,ef({},i,{className:me("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:a},ticksGenerator:function(s){return ur(s,!0)}}))},Ps=function(e){function t(){return T9(this,t),j9(this,t,arguments)}return C9(t,e),P9(t,[{key:"render",value:function(){return xt.createElement(k9,this.props)}}])}(xt.Component);ab(Ps,"displayName","YAxis"),ab(Ps,"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 ob(e){return I9(e)||D9(e)||N9(e)||M9()}function M9(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
263
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N9(e,t){if(e){if(typeof e=="string")return tf(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 tf(e,t)}}function D9(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function I9(e){if(Array.isArray(e))return tf(e)}function tf(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 rf=function(t,r,n,a,i){var o=dt(t,Lc),s=dt(t,fs),l=[].concat(ob(o),ob(s)),u=dt(t,hs),c="".concat(a,"Id"),f=a[0],d=r;if(l.length&&(d=l.reduce(function(y,v){if(v.props[c]===n&&Kt(v.props,"extendDomain")&&Z(v.props[f])){var b=v.props[f];return[Math.min(y[0],b),Math.max(y[1],b)]}return y},d)),u.length){var p="".concat(f,"1"),m="".concat(f,"2");d=u.reduce(function(y,v){if(v.props[c]===n&&Kt(v.props,"extendDomain")&&Z(v.props[p])&&Z(v.props[m])){var b=v.props[p],w=v.props[m];return[Math.min(y[0],b,w),Math.max(y[1],b,w)]}return y},d)}return i&&i.length&&(d=i.reduce(function(y,v){return Z(v)?[Math.min(y[0],v),Math.max(y[1],v)]:y},d)),d},sb={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 p=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],p]:l._events[m].push(p):(l._events[m]=p,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,p=f.length,m=new Array(p);d<p;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,p,m){var y=r?r+u:u;if(!this._events[y])return!1;var v=this._events[y],b=arguments.length,w,x;if(v.fn){switch(v.once&&this.removeListener(u,v.fn,void 0,!0),b){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,p),!0;case 6:return v.fn.call(v.context,c,f,d,p,m),!0}for(x=1,w=new Array(b-1);x<b;x++)w[x-1]=arguments[x];v.fn.apply(v.context,w)}else{var A=v.length,g;for(x=0;x<A;x++)switch(v[x].once&&this.removeListener(u,v[x].fn,void 0,!0),b){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(!w)for(g=1,w=new Array(b-1);g<b;g++)w[g-1]=arguments[g];v[x].fn.apply(v[x].context,w)}}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 p=r?r+u:u;if(!this._events[p])return this;if(!c)return o(this,p),this;var m=this._events[p];if(m.fn)m.fn===c&&(!d||m.once)&&(!f||m.context===f)&&o(this,p);else{for(var y=0,v=[],b=m.length;y<b;y++)(m[y].fn!==c||d&&!m[y].once||f&&m[y].context!==f)&&v.push(m[y]);v.length?this._events[p]=v.length===1?v[0]:v:o(this,p)}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})(sb);var L9=sb.exports;const R9=$e(L9);var nf=new R9,af="recharts.syncMouseEvents";function gi(e){"@babel/helpers - typeof";return gi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gi(e)}function B9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F9(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,lb(n.key),n)}}function W9(e,t,r){return t&&F9(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function of(e,t,r){return t=lb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lb(e){var t=z9(e,"string");return gi(t)=="symbol"?t:t+""}function z9(e,t){if(gi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(gi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var U9=function(){function e(){B9(this,e),of(this,"activeIndex",0),of(this,"coordinateList",[]),of(this,"layout","horizontal")}return W9(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,p=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=p??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 G9(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&&Z(n)&&Z(a))return!0}return!1}function V9(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 ub(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,i=e.endAngle,o=nt(t,r,n,a),s=nt(t,r,n,i);return{points:[o,s],cx:t,cy:r,radius:n,startAngle:a,endAngle:i}}function K9(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=nt(s,l,u,f),p=nt(s,l,c,f);n=d.x,a=d.y,i=p.x,o=p.y}else return ub(t);return[{x:n,y:a},{x:i,y:o}]}function bi(e){"@babel/helpers - typeof";return bi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bi(e)}function cb(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 js(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cb(Object(r),!0).forEach(function(n){q9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function q9(e,t,r){return t=H9(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function H9(e){var t=Y9(e,"string");return bi(t)=="symbol"?t:t+""}function Y9(e,t){if(bi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(bi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function X9(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,p=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!p||!i||!o||d!=="ScatterChart"&&a!=="axis")return null;var m,y=Gr;if(d==="ScatterChart")m=o,y=w4;else if(d==="BarChart")m=V9(f,o,l,c),y=xc;else if(f==="radial"){var v=ub(o),b=v.cx,w=v.cy,x=v.radius,A=v.startAngle,g=v.endAngle;m={cx:b,cy:w,startAngle:A,endAngle:g,innerRadius:x,outerRadius:x},y=Im}else m={points:K9(f,o,l)},y=Gr;var O=js(js(js(js({stroke:"#ccc",pointerEvents:"none"},l),m),de(p,!1)),{},{payload:s,payloadIndex:u,className:me("recharts-tooltip-cursor",p.className)});return T.isValidElement(p)?T.cloneElement(p,O):T.createElement(y,O)}var Z9=["item"],J9=["children","className","width","height","style","compact","title","desc"];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 ea(){return ea=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},ea.apply(this,arguments)}function fb(e,t){return tB(e)||eB(e,t)||hb(e,t)||Q9()}function Q9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
264
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eB(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,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 tB(e){if(Array.isArray(e))return e}function db(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){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aB(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,mb(n.key),n)}}function iB(e,t,r){return t&&aB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oB(e,t,r){return t=_s(t),sB(e,pb()?Reflect.construct(t,r||[],_s(e).constructor):t.apply(e,r))}function sB(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 lB(e)}function lB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pb=function(){return!!e})()}function _s(e){return _s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},_s(e)}function uB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sf(e,t)}function sf(e,t){return sf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},sf(e,t)}function ta(e){return dB(e)||fB(e)||hb(e)||cB()}function cB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
265
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hb(e,t){if(e){if(typeof e=="string")return lf(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lf(e,t)}}function fB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dB(e){if(Array.isArray(e))return lf(e)}function lf(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function vb(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 U(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vb(Object(r),!0).forEach(function(n){le(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function le(e,t,r){return t=mb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mb(e){var t=pB(e,"string");return Qn(t)=="symbol"?t:t+""}function pB(e,t){if(Qn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hB={xAxis:["bottom","top"],yAxis:["left","right"]},vB={width:"100%",height:"100%"},yb={x:0,y:0};function Es(e){return e}var mB=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},yB=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 U(U(U({},a),nt(a.cx,a.cy,s,o)),{},{angle:o,radius:s})}var l=i.coordinate,u=a.angle;return U(U(U({},a),nt(a.cx,a.cy,l,u)),{},{angle:u,radius:l})}return yb},Cs=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(ta(s),ta(u)):s},[]);return o.length>0?o:t&&t.length&&Z(a)&&Z(i)?t.slice(a,i+1):[]};function gb(e){return e==="number"?[0,"auto"]:void 0}var uf=function(t,r,n,a){var i=t.graphicalItems,o=t.tooltipAxis,s=Cs(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 p=f===void 0?s:f;d=Ii(p,o.dataKey,a)}else d=f&&f[n]||s[n];return d?[].concat(ta(l),[Tm(u,d)]):l},[])},bb=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},o=mB(i,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,c=J3(o,s,u,l);if(c>=0&&u){var f=u[c]&&u[c].value,d=uf(t,r,c,f),p=yB(n,s,c,i);return{activeTooltipIndex:c,activeLabel:f,activePayload:d,activeCoordinate:p}}return null},gB=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,p=mm(c,i);return n.reduce(function(m,y){var v,b=y.type.defaultProps!==void 0?U(U({},y.type.defaultProps),y.props):y.props,w=b.type,x=b.dataKey,A=b.allowDataOverflow,g=b.allowDuplicatedCategory,O=b.scale,S=b.ticks,j=b.includeHidden,C=b[o];if(m[C])return m;var M=Cs(t.data,{graphicalItems:a.filter(function(F){var W,V=o in F.props?F.props[o]:(W=F.type.defaultProps)===null||W===void 0?void 0:W[o];return V===C}),dataStartIndex:l,dataEndIndex:u}),P=M.length,_,I,$;G9(b.domain,A,w)&&(_=Zu(b.domain,null,A),p&&(w==="number"||O!=="auto")&&($=Va(M,x,"category")));var D=gb(w);if(!_||_.length===0){var k,B=(k=b.domain)!==null&&k!==void 0?k:D;if(x){if(_=Va(M,x,w),w==="category"&&p){var z=RO(_);g&&z?(I=_,_=ts(0,P)):g||(_=Sm(B,_,y).reduce(function(F,W){return F.indexOf(W)>=0?F:[].concat(ta(F),[W])},[]))}else if(w==="category")g?_=_.filter(function(F){return F!==""&&!fe(F)}):_=Sm(B,_,y).reduce(function(F,W){return F.indexOf(W)>=0||W===""||fe(W)?F:[].concat(ta(F),[W])},[]);else if(w==="number"){var G=nI(M,a.filter(function(F){var W,V,X=o in F.props?F.props[o]:(W=F.type.defaultProps)===null||W===void 0?void 0:W[o],Q="hide"in F.props?F.props.hide:(V=F.type.defaultProps)===null||V===void 0?void 0:V.hide;return X===C&&(j||!Q)}),x,i,c);G&&(_=G)}p&&(w==="number"||O!=="auto")&&($=Va(M,x,"category"))}else p?_=ts(0,P):s&&s[C]&&s[C].hasStack&&w==="number"?_=d==="expand"?[0,1]:xm(s[C].stackGroups,l,u):_=vm(M,a.filter(function(F){var W=o in F.props?F.props[o]:F.type.defaultProps[o],V="hide"in F.props?F.props.hide:F.type.defaultProps.hide;return W===C&&(j||!V)}),w,c,!0);if(w==="number")_=rf(f,_,C,i,S),B&&(_=Zu(B,_,A));else if(w==="category"&&B){var E=B,R=_.every(function(F){return E.indexOf(F)>=0});R&&(_=E)}}return U(U({},m),{},le({},C,U(U({},b),{},{axisType:i,domain:_,categoricalDomain:$,duplicateDomain:I,originalDomain:(v=b.domain)!==null&&v!==void 0?v:D,isCategorical:p,layout:c})))},{})},bB=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=Cs(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),p=d.length,m=mm(c,i),y=-1;return n.reduce(function(v,b){var w=b.type.defaultProps!==void 0?U(U({},b.type.defaultProps),b.props):b.props,x=w[o],A=gb("number");if(!v[x]){y++;var g;return m?g=ts(0,p):s&&s[x]&&s[x].hasStack?(g=xm(s[x].stackGroups,l,u),g=rf(f,g,x,i)):(g=Zu(A,vm(d,n.filter(function(O){var S,j,C=o in O.props?O.props[o]:(S=O.type.defaultProps)===null||S===void 0?void 0:S[o],M="hide"in O.props?O.props.hide:(j=O.type.defaultProps)===null||j===void 0?void 0:j.hide;return C===x&&!M}),"number",c),a.defaultProps.allowDataOverflow),g=rf(f,g,x,i)),U(U({},v),{},le({},x,U(U({axisType:i},a.defaultProps),{},{hide:!0,orientation:wt(hB,"".concat(i,".").concat(y%2),null),domain:g,originalDomain:A,isCategorical:m,layout:c})))}return v},{})},xB=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=dt(c,i),p={};return d&&d.length?p=gB(t,{axes:d,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(p=bB(t,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),p},wB=function(t){var r=pr(t),n=ur(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Gl(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Ro(r,n)}},xb=function(t){var r=t.children,n=t.defaultShowTooltip,a=mt(r,Dn),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}},OB=function(t){return!t||!t.length?!1:t.some(function(r){var n=Qt(r&&r.type);return n&&n.indexOf("Bar")>=0})},wb=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"}},SB=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||{},p=mt(f,Dn),m=mt(f,mn),y=Object.keys(l).reduce(function(g,O){var S=l[O],j=S.orientation;return!S.mirror&&!S.hide?U(U({},g),{},le({},j,g[j]+S.width)):g},{left:d.left||0,right:d.right||0}),v=Object.keys(o).reduce(function(g,O){var S=o[O],j=S.orientation;return!S.mirror&&!S.hide?U(U({},g),{},le({},j,wt(g,"".concat(j))+S.height)):g},{top:d.top||0,bottom:d.bottom||0}),b=U(U({},v),y),w=b.bottom;p&&(b.bottom+=p.props.height||Dn.defaultProps.height),m&&r&&(b=tI(b,a,n,r));var x=u-b.left-b.right,A=c-b.top-b.bottom;return U(U({brushBottom:w},b),{},{width:Math.max(x,0),height:Math.max(A,0)})},TB=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},AB=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(b,w){var x=w.graphicalItems,A=w.stackGroups,g=w.offset,O=w.updateId,S=w.dataStartIndex,j=w.dataEndIndex,C=b.barSize,M=b.layout,P=b.barGap,_=b.barCategoryGap,I=b.maxBarSize,$=wb(M),D=$.numericAxisName,k=$.cateAxisName,B=OB(x),z=[];return x.forEach(function(G,E){var R=Cs(b.data,{graphicalItems:[G],dataStartIndex:S,dataEndIndex:j}),F=G.type.defaultProps!==void 0?U(U({},G.type.defaultProps),G.props):G.props,W=F.dataKey,V=F.maxBarSize,X=F["".concat(D,"Id")],Q=F["".concat(k,"Id")],ae={},te=l.reduce(function(Ve,ut){var Pi,ji,ia=w["".concat(ut.axisType,"Map")],_i=F["".concat(ut.axisType,"Id")];ia&&ia[_i]||ut.axisType==="zAxis"||(process.env.NODE_ENV!=="production"?ht(!1,"Specifying a(n) ".concat(ut.axisType,"Id requires a corresponding ").concat(ut.axisType,"Id on the targeted graphical component ").concat((Pi=G==null||(ji=G.type)===null||ji===void 0?void 0:ji.displayName)!==null&&Pi!==void 0?Pi:"")):ht());var Ei=ia[_i];return U(U({},Ve),{},le(le({},ut.axisType,Ei),"".concat(ut.axisType,"Ticks"),ur(Ei)))},ae),K=te[k],Y=te["".concat(k,"Ticks")],J=A&&A[X]&&A[X].hasStack&&vI(G,A[X].stackGroups),L=Qt(G.type).indexOf("Bar")>=0,ie=Ro(K,Y),q=[],ue=B&&Q3({barSize:C,stackGroups:A,totalSize:TB(te,k)});if(L){var ee,ve,ze=fe(V)?I:V,Be=(ee=(ve=Ro(K,Y,!0))!==null&&ve!==void 0?ve:ze)!==null&&ee!==void 0?ee:0;q=eI({barGap:P,barCategoryGap:_,bandSize:Be!==ie?Be:ie,sizeList:ue[Q],maxBarSize:ze}),Be!==ie&&(q=q.map(function(Ve){return U(U({},Ve),{},{position:U(U({},Ve.position),{},{offset:Ve.position.offset-Be/2})})}))}var Fe=G&&G.type&&G.type.getComposedData;Fe&&z.push({props:U(U({},Fe(U(U({},te),{},{displayedData:R,props:b,dataKey:W,item:G,bandSize:ie,barPosition:q,offset:g,stackedData:J,layout:M,dataStartIndex:S,dataEndIndex:j}))),{},le(le(le({key:G.key||"item-".concat(E)},D,te[D]),k,te[k]),"animationId",O)),childIndex:ZO(G,b.children),item:G})}),z},p=function(b,w){var x=b.props,A=b.dataStartIndex,g=b.dataEndIndex,O=b.updateId;if(!ld({props:x}))return null;var S=x.children,j=x.layout,C=x.stackOffset,M=x.data,P=x.reverseStackOrder,_=wb(j),I=_.numericAxisName,$=_.cateAxisName,D=dt(S,n),k=dI(M,D,"".concat(I,"Id"),"".concat($,"Id"),C,P),B=l.reduce(function(F,W){var V="".concat(W.axisType,"Map");return U(U({},F),{},le({},V,xB(x,U(U({},W),{},{graphicalItems:D,stackGroups:W.axisType===I&&k,dataStartIndex:A,dataEndIndex:g}))))},{}),z=SB(U(U({},B),{},{props:x,graphicalItems:D}),w==null?void 0:w.legendBBox);Object.keys(B).forEach(function(F){B[F]=c(x,B[F],z,F.replace("Map",""),r)});var G=B["".concat($,"Map")],E=wB(G),R=d(x,U(U({},B),{},{dataStartIndex:A,dataEndIndex:g,updateId:O,graphicalItems:D,stackGroups:k,offset:z}));return U(U({formattedGraphicalItems:R,graphicalItems:D,offset:z,stackGroups:k},E),B)},m=function(v){function b(w){var x,A,g;return nB(this,b),g=oB(this,b,[w]),le(g,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),le(g,"accessibilityManager",new U9),le(g,"handleLegendBBoxUpdate",function(O){if(O){var S=g.state,j=S.dataStartIndex,C=S.dataEndIndex,M=S.updateId;g.setState(U({legendBBox:O},p({props:g.props,dataStartIndex:j,dataEndIndex:C,updateId:M},U(U({},g.state),{},{legendBBox:O}))))}}),le(g,"handleReceiveSyncEvent",function(O,S,j){if(g.props.syncId===O){if(j===g.eventEmitterSymbol&&typeof g.props.syncMethod!="function")return;g.applySyncEvent(S)}}),le(g,"handleBrushChange",function(O){var S=O.startIndex,j=O.endIndex;if(S!==g.state.dataStartIndex||j!==g.state.dataEndIndex){var C=g.state.updateId;g.setState(function(){return U({dataStartIndex:S,dataEndIndex:j},p({props:g.props,dataStartIndex:S,dataEndIndex:j,updateId:C},g.state))}),g.triggerSyncEvent({dataStartIndex:S,dataEndIndex:j})}}),le(g,"handleMouseEnter",function(O){var S=g.getMouseInfo(O);if(S){var j=U(U({},S),{},{isTooltipActive:!0});g.setState(j),g.triggerSyncEvent(j);var C=g.props.onMouseEnter;pe(C)&&C(j,O)}}),le(g,"triggeredAfterMouseMove",function(O){var S=g.getMouseInfo(O),j=S?U(U({},S),{},{isTooltipActive:!0}):{isTooltipActive:!1};g.setState(j),g.triggerSyncEvent(j);var C=g.props.onMouseMove;pe(C)&&C(j,O)}),le(g,"handleItemMouseEnter",function(O){g.setState(function(){return{isTooltipActive:!0,activeItem:O,activePayload:O.tooltipPayload,activeCoordinate:O.tooltipPosition||{x:O.cx,y:O.cy}}})}),le(g,"handleItemMouseLeave",function(){g.setState(function(){return{isTooltipActive:!1}})}),le(g,"handleMouseMove",function(O){O.persist(),g.throttleTriggeredAfterMouseMove(O)}),le(g,"handleMouseLeave",function(O){g.throttleTriggeredAfterMouseMove.cancel();var S={isTooltipActive:!1};g.setState(S),g.triggerSyncEvent(S);var j=g.props.onMouseLeave;pe(j)&&j(S,O)}),le(g,"handleOuterEvent",function(O){var S=XO(O),j=wt(g.props,"".concat(S));if(S&&pe(j)){var C,M;/.*touch.*/i.test(S)?M=g.getMouseInfo(O.changedTouches[0]):M=g.getMouseInfo(O),j((C=M)!==null&&C!==void 0?C:{},O)}}),le(g,"handleClick",function(O){var S=g.getMouseInfo(O);if(S){var j=U(U({},S),{},{isTooltipActive:!0});g.setState(j),g.triggerSyncEvent(j);var C=g.props.onClick;pe(C)&&C(j,O)}}),le(g,"handleMouseDown",function(O){var S=g.props.onMouseDown;if(pe(S)){var j=g.getMouseInfo(O);S(j,O)}}),le(g,"handleMouseUp",function(O){var S=g.props.onMouseUp;if(pe(S)){var j=g.getMouseInfo(O);S(j,O)}}),le(g,"handleTouchMove",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&g.throttleTriggeredAfterMouseMove(O.changedTouches[0])}),le(g,"handleTouchStart",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&g.handleMouseDown(O.changedTouches[0])}),le(g,"handleTouchEnd",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&g.handleMouseUp(O.changedTouches[0])}),le(g,"handleDoubleClick",function(O){var S=g.props.onDoubleClick;if(pe(S)){var j=g.getMouseInfo(O);S(j,O)}}),le(g,"handleContextMenu",function(O){var S=g.props.onContextMenu;if(pe(S)){var j=g.getMouseInfo(O);S(j,O)}}),le(g,"triggerSyncEvent",function(O){g.props.syncId!==void 0&&nf.emit(af,g.props.syncId,O,g.eventEmitterSymbol)}),le(g,"applySyncEvent",function(O){var S=g.props,j=S.layout,C=S.syncMethod,M=g.state.updateId,P=O.dataStartIndex,_=O.dataEndIndex;if(O.dataStartIndex!==void 0||O.dataEndIndex!==void 0)g.setState(U({dataStartIndex:P,dataEndIndex:_},p({props:g.props,dataStartIndex:P,dataEndIndex:_,updateId:M},g.state)));else if(O.activeTooltipIndex!==void 0){var I=O.chartX,$=O.chartY,D=O.activeTooltipIndex,k=g.state,B=k.offset,z=k.tooltipTicks;if(!B)return;if(typeof C=="function")D=C(z,O);else if(C==="value"){D=-1;for(var G=0;G<z.length;G++)if(z[G].value===O.activeLabel){D=G;break}}var E=U(U({},B),{},{x:B.left,y:B.top}),R=Math.min(I,E.x+E.width),F=Math.min($,E.y+E.height),W=z[D]&&z[D].value,V=uf(g.state,g.props.data,D),X=z[D]?{x:j==="horizontal"?z[D].coordinate:R,y:j==="horizontal"?F:z[D].coordinate}:yb;g.setState(U(U({},O),{},{activeLabel:W,activeCoordinate:X,activePayload:V,activeTooltipIndex:D}))}else g.setState(O)}),le(g,"renderCursor",function(O){var S,j=g.state,C=j.isTooltipActive,M=j.activeCoordinate,P=j.activePayload,_=j.offset,I=j.activeTooltipIndex,$=j.tooltipAxisBandSize,D=g.getTooltipEventType(),k=(S=O.props.active)!==null&&S!==void 0?S:C,B=g.props.layout,z=O.key||"_recharts-cursor";return T.createElement(X9,{key:z,activeCoordinate:M,activePayload:P,activeTooltipIndex:I,chartName:r,element:O,isActive:k,layout:B,offset:_,tooltipAxisBandSize:$,tooltipEventType:D})}),le(g,"renderPolarAxis",function(O,S,j){var C=wt(O,"type.axisType"),M=wt(g.state,"".concat(C,"Map")),P=O.type.defaultProps,_=P!==void 0?U(U({},P),O.props):O.props,I=M&&M[_["".concat(C,"Id")]];return T.cloneElement(O,U(U({},I),{},{className:me(C,I.className),key:O.key||"".concat(S,"-").concat(j),ticks:ur(I,!0)}))}),le(g,"renderPolarGrid",function(O){var S=O.props,j=S.radialLines,C=S.polarAngles,M=S.polarRadius,P=g.state,_=P.radiusAxisMap,I=P.angleAxisMap,$=pr(_),D=pr(I),k=D.cx,B=D.cy,z=D.innerRadius,G=D.outerRadius;return T.cloneElement(O,{polarAngles:Array.isArray(C)?C:ur(D,!0).map(function(E){return E.coordinate}),polarRadius:Array.isArray(M)?M:ur($,!0).map(function(E){return E.coordinate}),cx:k,cy:B,innerRadius:z,outerRadius:G,key:O.key||"polar-grid",radialLines:j})}),le(g,"renderLegend",function(){var O=g.state.formattedGraphicalItems,S=g.props,j=S.children,C=S.width,M=S.height,P=g.props.margin||{},_=C-(P.left||0)-(P.right||0),I=fm({children:j,formattedGraphicalItems:O,legendWidth:_,legendContent:u});if(!I)return null;var $=I.item,D=db(I,Z9);return T.cloneElement($,U(U({},D),{},{chartWidth:C,chartHeight:M,margin:P,onBBoxUpdate:g.handleLegendBBoxUpdate}))}),le(g,"renderTooltip",function(){var O,S=g.props,j=S.children,C=S.accessibilityLayer,M=mt(j,Wt);if(!M)return null;var P=g.state,_=P.isTooltipActive,I=P.activeCoordinate,$=P.activePayload,D=P.activeLabel,k=P.offset,B=(O=M.props.active)!==null&&O!==void 0?O:_;return T.cloneElement(M,{viewBox:U(U({},k),{},{x:k.left,y:k.top}),active:B,label:D,payload:B?$:[],coordinate:I,accessibilityLayer:C})}),le(g,"renderBrush",function(O){var S=g.props,j=S.margin,C=S.data,M=g.state,P=M.offset,_=M.dataStartIndex,I=M.dataEndIndex,$=M.updateId;return T.cloneElement(O,{key:O.key||"_recharts-brush",onChange:Lo(g.handleBrushChange,O.props.onChange),data:C,x:Z(O.props.x)?O.props.x:P.left,y:Z(O.props.y)?O.props.y:P.top+P.height+P.brushBottom-(j.bottom||0),width:Z(O.props.width)?O.props.width:P.width,startIndex:_,endIndex:I,updateId:"brush-".concat($)})}),le(g,"renderReferenceElement",function(O,S,j){if(!O)return null;var C=g,M=C.clipPathId,P=g.state,_=P.xAxisMap,I=P.yAxisMap,$=P.offset,D=O.type.defaultProps||{},k=O.props,B=k.xAxisId,z=B===void 0?D.xAxisId:B,G=k.yAxisId,E=G===void 0?D.yAxisId:G;return T.cloneElement(O,{key:O.key||"".concat(S,"-").concat(j),xAxis:_[z],yAxis:I[E],viewBox:{x:$.left,y:$.top,width:$.width,height:$.height},clipPathId:M})}),le(g,"renderActivePoints",function(O){var S=O.item,j=O.activePoint,C=O.basePoint,M=O.childIndex,P=O.isRange,_=[],I=S.props.key,$=S.item.type.defaultProps!==void 0?U(U({},S.item.type.defaultProps),S.item.props):S.item.props,D=$.activeDot,k=$.dataKey,B=U(U({index:M,dataKey:k,cx:j.x,cy:j.y,r:4,fill:Yu(S.item),strokeWidth:2,stroke:"#fff",payload:j.payload,value:j.value},de(D,!1)),Li(D));return _.push(b.renderActiveDot(D,B,"".concat(I,"-activePoint-").concat(M))),C?_.push(b.renderActiveDot(D,U(U({},B),{},{cx:C.x,cy:C.y}),"".concat(I,"-basePoint-").concat(M))):P&&_.push(null),_}),le(g,"renderGraphicChild",function(O,S,j){var C=g.filterFormatItem(O,S,j);if(!C)return null;var M=g.getTooltipEventType(),P=g.state,_=P.isTooltipActive,I=P.tooltipAxis,$=P.activeTooltipIndex,D=P.activeLabel,k=g.props.children,B=mt(k,Wt),z=C.props,G=z.points,E=z.isRange,R=z.baseLine,F=C.item.type.defaultProps!==void 0?U(U({},C.item.type.defaultProps),C.item.props):C.item.props,W=F.activeDot,V=F.hide,X=F.activeBar,Q=F.activeShape,ae=!!(!V&&_&&B&&(W||X||Q)),te={};M!=="axis"&&B&&B.props.trigger==="click"?te={onClick:Lo(g.handleItemMouseEnter,O.props.onClick)}:M!=="axis"&&(te={onMouseLeave:Lo(g.handleItemMouseLeave,O.props.onMouseLeave),onMouseEnter:Lo(g.handleItemMouseEnter,O.props.onMouseEnter)});var K=T.cloneElement(O,U(U({},C.props),te));function Y(ut){return typeof I.dataKey=="function"?I.dataKey(ut.payload):null}if(ae)if($>=0){var J,L;if(I.dataKey&&!I.allowDuplicatedCategory){var ie=typeof I.dataKey=="function"?Y:"payload.".concat(I.dataKey.toString());J=Ii(G,ie,D),L=E&&R&&Ii(R,ie,D)}else J=G==null?void 0:G[$],L=E&&R&&R[$];if(Q||X){var q=O.props.activeIndex!==void 0?O.props.activeIndex:$;return[T.cloneElement(O,U(U(U({},C.props),te),{},{activeIndex:q})),null,null]}if(!fe(J))return[K].concat(ta(g.renderActivePoints({item:C,activePoint:J,basePoint:L,childIndex:$,isRange:E})))}else{var ue,ee=(ue=g.getItemByXY(g.state.activeCoordinate))!==null&&ue!==void 0?ue:{graphicalItem:K},ve=ee.graphicalItem,ze=ve.item,Be=ze===void 0?O:ze,Fe=ve.childIndex,Ve=U(U(U({},C.props),te),{},{activeIndex:Fe});return[T.cloneElement(Be,Ve),null,null]}return E?[K,null,null]:[K,null]}),le(g,"renderCustomized",function(O,S,j){return T.cloneElement(O,U(U({key:"recharts-customized-".concat(j)},g.props),g.state))}),le(g,"renderMap",{CartesianGrid:{handler:Es,once:!0},ReferenceArea:{handler:g.renderReferenceElement},ReferenceLine:{handler:Es},ReferenceDot:{handler:g.renderReferenceElement},XAxis:{handler:Es},YAxis:{handler:Es},Brush:{handler:g.renderBrush,once:!0},Bar:{handler:g.renderGraphicChild},Line:{handler:g.renderGraphicChild},Area:{handler:g.renderGraphicChild},Radar:{handler:g.renderGraphicChild},RadialBar:{handler:g.renderGraphicChild},Scatter:{handler:g.renderGraphicChild},Pie:{handler:g.renderGraphicChild},Funnel:{handler:g.renderGraphicChild},Tooltip:{handler:g.renderCursor,once:!0},PolarGrid:{handler:g.renderPolarGrid,once:!0},PolarAngleAxis:{handler:g.renderPolarAxis},PolarRadiusAxis:{handler:g.renderPolarAxis},Customized:{handler:g.renderCustomized}}),g.clipPathId="".concat((x=w.id)!==null&&x!==void 0?x:Cr("recharts"),"-clip"),g.throttleTriggeredAfterMouseMove=lh(g.triggeredAfterMouseMove,(A=w.throttleDelay)!==null&&A!==void 0?A:1e3/60),g.state={},g}return uB(b,v),iB(b,[{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,g=x.data,O=x.height,S=x.layout,j=mt(A,Wt);if(j){var C=j.props.defaultIndex;if(!(typeof C!="number"||C<0||C>this.state.tooltipTicks.length-1)){var M=this.state.tooltipTicks[C]&&this.state.tooltipTicks[C].value,P=uf(this.state,g,C,M),_=this.state.tooltipTicks[C].coordinate,I=(this.state.offset.top+O)/2,$=S==="horizontal",D=$?{x:_,y:I}:{y:_,x:I},k=this.state.formattedGraphicalItems.find(function(z){var G=z.item;return G.type.name==="Scatter"});k&&(D=U(U({},D),k.props.points[C].tooltipPosition),P=k.props.points[C].tooltipPayload);var B={activeTooltipIndex:C,isTooltipActive:!0,activeLabel:M,activePayload:P,activeCoordinate:D};this.setState(B),this.renderCursor(j),this.accessibilityManager.setIndex(C)}}}},{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 g,O;this.accessibilityManager.setDetails({offset:{left:(g=this.props.margin.left)!==null&&g!==void 0?g:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0}})}return null}},{key:"componentDidUpdate",value:function(x){ul([mt(x.children,Wt)],[mt(this.props.children,Wt)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=mt(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,g=A.getBoundingClientRect(),O=Ak(g),S={chartX:Math.round(x.pageX-O.left),chartY:Math.round(x.pageY-O.top)},j=g.width/A.offsetWidth||1,C=this.inRange(S.chartX,S.chartY,j);if(!C)return null;var M=this.state,P=M.xAxisMap,_=M.yAxisMap,I=this.getTooltipEventType(),$=bb(this.state,this.props.data,this.props.layout,C);if(I!=="axis"&&P&&_){var D=pr(P).scale,k=pr(_).scale,B=D&&D.invert?D.invert(S.chartX):null,z=k&&k.invert?k.invert(S.chartY):null;return U(U({},S),{},{xValue:B,yValue:z},$)}return $?U(U({},S),$):null}},{key:"inRange",value:function(x,A){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=this.props.layout,S=x/g,j=A/g;if(O==="horizontal"||O==="vertical"){var C=this.state.offset,M=S>=C.left&&S<=C.left+C.width&&j>=C.top&&j<=C.top+C.height;return M?{x:S,y:j}:null}var P=this.state,_=P.angleAxisMap,I=P.radiusAxisMap;if(_&&I){var $=pr(_);return jm({x:S,y:j},$)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,A=this.getTooltipEventType(),g=mt(x,Wt),O={};g&&A==="axis"&&(g.props.trigger==="click"?O={onClick:this.handleClick}:O={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var S=Li(this.props,this.handleOuterEvent);return U(U({},S),O)}},{key:"addListener",value:function(){nf.on(af,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){nf.removeListener(af,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,A,g){for(var O=this.state.formattedGraphicalItems,S=0,j=O.length;S<j;S++){var C=O[S];if(C.item===x||C.props.key===x.key||A===Qt(C.item.type)&&g===C.childIndex)return C}return null}},{key:"renderClipPath",value:function(){var x=this.clipPathId,A=this.state.offset,g=A.left,O=A.top,S=A.height,j=A.width;return T.createElement("defs",null,T.createElement("clipPath",{id:x},T.createElement("rect",{x:g,y:O,height:S,width:j})))}},{key:"getXScales",value:function(){var x=this.state.xAxisMap;return x?Object.entries(x).reduce(function(A,g){var O=fb(g,2),S=O[0],j=O[1];return U(U({},A),{},le({},S,j.scale))},{}):null}},{key:"getYScales",value:function(){var x=this.state.yAxisMap;return x?Object.entries(x).reduce(function(A,g){var O=fb(g,2),S=O[0],j=O[1];return U(U({},A),{},le({},S,j.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,g=A.formattedGraphicalItems,O=A.activeItem;if(g&&g.length)for(var S=0,j=g.length;S<j;S++){var C=g[S],M=C.props,P=C.item,_=P.type.defaultProps!==void 0?U(U({},P.type.defaultProps),P.props):P.props,I=Qt(P.type);if(I==="Bar"){var $=(M.data||[]).find(function(z){return f4(x,z)});if($)return{graphicalItem:C,payload:$}}else if(I==="RadialBar"){var D=(M.data||[]).find(function(z){return jm(x,z)});if(D)return{graphicalItem:C,payload:D}}else if(Qo(C,O)||es(C,O)||ui(C,O)){var k=p8({graphicalItem:C,activeTooltipItem:O,itemData:_.data}),B=_.activeIndex===void 0?k:_.activeIndex;return{graphicalItem:U(U({},C),{},{childIndex:B}),payload:ui(C,O)?_.data[k]:C.props.data[k]}}}return null}},{key:"render",value:function(){var x=this;if(!ld(this))return null;var A=this.props,g=A.children,O=A.className,S=A.width,j=A.height,C=A.style,M=A.compact,P=A.title,_=A.desc,I=db(A,J9),$=de(I,!1);if(M)return T.createElement(ug,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},T.createElement(fl,ea({},$,{width:S,height:j,title:P,desc:_}),this.renderClipPath(),fd(g,this.renderMap)));if(this.props.accessibilityLayer){var D,k;$.tabIndex=(D=this.props.tabIndex)!==null&&D!==void 0?D:0,$.role=(k=this.props.role)!==null&&k!==void 0?k:"application",$.onKeyDown=function(z){x.accessibilityManager.keyboardEvent(z)},$.onFocus=function(){x.accessibilityManager.focus()}}var B=this.parseEventsOfWrapper();return T.createElement(ug,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},T.createElement("div",ea({className:me("recharts-wrapper",O),style:U({position:"relative",cursor:"default",width:S,height:j},C)},B,{ref:function(G){x.container=G}}),T.createElement(fl,ea({},$,{width:S,height:j,title:P,desc:_,style:vB}),this.renderClipPath(),fd(g,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(T.Component);le(m,"displayName",r),le(m,"defaultProps",U({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),le(m,"getDerivedStateFromProps",function(v,b){var w=v.dataKey,x=v.data,A=v.children,g=v.width,O=v.height,S=v.layout,j=v.stackOffset,C=v.margin,M=b.dataStartIndex,P=b.dataEndIndex;if(b.updateId===void 0){var _=xb(v);return U(U(U({},_),{},{updateId:0},p(U(U({props:v},_),{},{updateId:0}),b)),{},{prevDataKey:w,prevData:x,prevWidth:g,prevHeight:O,prevLayout:S,prevStackOffset:j,prevMargin:C,prevChildren:A})}if(w!==b.prevDataKey||x!==b.prevData||g!==b.prevWidth||O!==b.prevHeight||S!==b.prevLayout||j!==b.prevStackOffset||!un(C,b.prevMargin)){var I=xb(v),$={chartX:b.chartX,chartY:b.chartY,isTooltipActive:b.isTooltipActive},D=U(U({},bb(b,x,S)),{},{updateId:b.updateId+1}),k=U(U(U({},I),$),D);return U(U(U({},k),p(U({props:v},k),b)),{},{prevDataKey:w,prevData:x,prevWidth:g,prevHeight:O,prevLayout:S,prevStackOffset:j,prevMargin:C,prevChildren:A})}if(!ul(A,b.prevChildren)){var B,z,G,E,R=mt(A,Dn),F=R&&(B=(z=R.props)===null||z===void 0?void 0:z.startIndex)!==null&&B!==void 0?B:M,W=R&&(G=(E=R.props)===null||E===void 0?void 0:E.endIndex)!==null&&G!==void 0?G:P,V=F!==M||W!==P,X=!fe(x),Q=X&&!V?b.updateId:b.updateId+1;return U(U({updateId:Q},p(U(U({props:v},b),{},{updateId:Q,dataStartIndex:F,dataEndIndex:W}),b)),{},{prevChildren:A,dataStartIndex:F,dataEndIndex:W})}return null}),le(m,"renderActiveDot",function(v,b,w){var x;return T.isValidElement(v)?x=T.cloneElement(v,b):pe(v)?x=v(b):x=T.createElement(Xo,b),T.createElement(xe,{className:"recharts-active-dot",key:w},x)});var y=T.forwardRef(function(b,w){return T.createElement(m,ea({},b,{ref:w}))});return y.displayName=m.displayName,y},PB=AB({chartName:"ComposedChart",GraphicalChild:[vi,Tr,Rn,Os],axisComponents:[{axisType:"xAxis",AxisComp:Ts},{axisType:"yAxis",AxisComp:Ps},{axisType:"zAxis",AxisComp:xs}],formatAxisMap:RL});const ra=({className:e,width:t,height:r,rounded:n=!1})=>h.jsx("div",{className:se("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}}),xi=({className:e})=>h.jsxs("div",{className:se("rounded-lg border border-gray-200 bg-white p-[16px]",e),children:[h.jsxs("div",{className:"flex items-center gap-2 mb-[12px]",children:[h.jsx(ra,{className:"h-[16px] w-[64px]"}),h.jsx(ra,{className:"h-[16px] w-[16px]",rounded:!0})]}),h.jsxs("div",{className:"flex items-baseline gap-[12px]",children:[h.jsx(ra,{className:"h-[32px] w-[80px]"}),h.jsx(ra,{className:"h-[24px] w-[48px] rounded-md"})]})]}),Ob=({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,p=u.x+(c.x-u.x)*.6,m=c.y;s+=` C ${f} ${d} ${p} ${m} ${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 h.jsx("div",{className:"absolute inset-0 flex items-end justify-between px-[16px] pb-[16px]",children:[...Array(7)].map((v,b)=>h.jsx(ra,{className:"w-[32px] bg-blue-100",height:`${Math.random()*60+20}%`},b))});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 h.jsx("div",{className:"absolute inset-0 p-[16px]",children:h.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[h.jsxs("defs",{children:[h.jsxs("linearGradient",{id:"skeleton-area-fill",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[h.jsx("stop",{offset:"0%",stopColor:"#8b5cf6",stopOpacity:"0.1",children:h.jsx("animate",{attributeName:"stop-opacity",values:"0.1;0.15;0.1",dur:"3s",repeatCount:"indefinite"})}),h.jsx("stop",{offset:"100%",stopColor:"#8b5cf6",stopOpacity:"0.02",children:h.jsx("animate",{attributeName:"stop-opacity",values:"0.02;0.05;0.02",dur:"3s",repeatCount:"indefinite"})})]}),h.jsxs("linearGradient",{id:"skeleton-line-shimmer",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[h.jsx("stop",{offset:"0%",stopColor:"#e2e8f0",stopOpacity:"0.3",children:h.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2.5s",repeatCount:"indefinite"})}),h.jsx("stop",{offset:"50%",stopColor:"#cbd5e1",stopOpacity:"0.6",children:h.jsx("animate",{attributeName:"stop-opacity",values:"0.6;0.3;0.6",dur:"2.5s",repeatCount:"indefinite"})}),h.jsx("stop",{offset:"100%",stopColor:"#e2e8f0",stopOpacity:"0.3",children:h.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2.5s",repeatCount:"indefinite"})})]})]}),h.jsx("path",{d:c,fill:"url(#skeleton-area-fill)"}),h.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),p=f[f.length-1],m=f[0],y=`${d} L ${p.x} 90 L ${m.x} 90 Z`;return h.jsx("div",{className:"absolute inset-0 p-[16px]",children:h.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[h.jsxs("defs",{children:[h.jsxs("linearGradient",{id:"skeleton-area-gradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[h.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.2",children:h.jsx("animate",{attributeName:"stop-opacity",values:"0.2;0.4;0.2",dur:"2s",repeatCount:"indefinite"})}),h.jsx("stop",{offset:"100%",stopColor:"#3b82f6",stopOpacity:"0.05",children:h.jsx("animate",{attributeName:"stop-opacity",values:"0.05;0.1;0.05",dur:"2s",repeatCount:"indefinite"})})]}),h.jsxs("linearGradient",{id:"skeleton-area-line",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[h.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.4",children:h.jsx("animate",{attributeName:"stop-opacity",values:"0.4;0.8;0.4",dur:"2s",repeatCount:"indefinite"})}),h.jsx("stop",{offset:"50%",stopColor:"#3b82f6",stopOpacity:"0.8",children:h.jsx("animate",{attributeName:"stop-opacity",values:"0.8;0.4;0.8",dur:"2s",repeatCount:"indefinite"})}),h.jsx("stop",{offset:"100%",stopColor:"#3b82f6",stopOpacity:"0.4",children:h.jsx("animate",{attributeName:"stop-opacity",values:"0.4;0.8;0.4",dur:"2s",repeatCount:"indefinite"})})]})]}),h.jsx("path",{d:y,fill:"url(#skeleton-area-gradient)"}),h.jsx("path",{d:n(f),stroke:"url(#skeleton-area-line)",strokeWidth:"2.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]})});case"pie":return h.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-[16px]",children:h.jsxs("svg",{className:"w-32 h-32",viewBox:"0 0 42 42",children:[h.jsxs("defs",{children:[h.jsx("linearGradient",{id:"skeleton-pie-gradient-1",children:h.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.3",children:h.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite"})})}),h.jsx("linearGradient",{id:"skeleton-pie-gradient-2",children:h.jsx("stop",{offset:"0%",stopColor:"#10b981",stopOpacity:"0.3",children:h.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"0.5s"})})}),h.jsx("linearGradient",{id:"skeleton-pie-gradient-3",children:h.jsx("stop",{offset:"0%",stopColor:"#f59e0b",stopOpacity:"0.3",children:h.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"1s"})})}),h.jsx("linearGradient",{id:"skeleton-pie-gradient-4",children:h.jsx("stop",{offset:"0%",stopColor:"#ef4444",stopOpacity:"0.3",children:h.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"1.5s"})})})]}),h.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"#e5e7eb",strokeWidth:"3"}),h.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-1)",strokeWidth:"3",strokeDasharray:"40 60",strokeDashoffset:"25"}),h.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-2)",strokeWidth:"3",strokeDasharray:"25 75",strokeDashoffset:"65"}),h.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-3)",strokeWidth:"3",strokeDasharray:"20 80",strokeDashoffset:"90"}),h.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 h.jsx("div",{className:"absolute inset-0 p-[16px]",children:h.jsxs("div",{className:"w-full h-full relative",children:[h.jsx("div",{className:"absolute inset-0 flex items-center",children:h.jsx("div",{className:"w-full h-0.5 bg-gradient-to-r from-transparent via-gray-300 to-transparent opacity-60",children:h.jsx("div",{className:"w-full h-full bg-gradient-to-r from-transparent via-blue-400 to-transparent animate-pulse"})})}),h.jsx("div",{className:"absolute inset-0 flex items-center justify-between px-2",children:[...Array(7)].map((v,b)=>h.jsx("div",{className:"w-2 h-2 bg-blue-300 rounded-full animate-pulse",style:{animationDelay:`${b*.2}s`}},b))})]})})}};return h.jsx("div",{className:se("w-full",e),children:h.jsxs("div",{className:"relative bg-gray-50/30",children:[h.jsxs("div",{className:"relative",style:{height:`${r}px`},children:[h.jsxs("div",{className:"absolute left-0 top-0 h-full flex flex-col justify-between items-end pr-[12px]",children:[h.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),h.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),h.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),h.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),h.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),h.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"})]}),h.jsxs("div",{className:"ml-14 h-full relative overflow-hidden px-0 py-2 flex flex-col justify-between",children:[t!=="pie"&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),h.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),h.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),h.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),h.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),h.jsx("div",{className:"h-0 w-full border-t border-gray-100"})]}),i()]}),t!=="pie"&&h.jsxs("div",{className:"ml-[56px] flex justify-between items-center mt-[12px]",children:[h.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),h.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),h.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),h.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),h.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px"}),h.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),h.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),h.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"})]})]}),h.jsxs("div",{className:"flex items-center justify-between px-0 py-[12px] mt-[8px]",children:[h.jsx("div",{className:"flex-1",children:h.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[256px]"})}),h.jsxs("div",{className:"flex items-center gap-2 w-24 justify-center",children:[h.jsx("div",{className:"w-[8px] h-[8px] bg-blue-500 rounded-full"}),h.jsx("div",{className:"bg-gray-100 h-[16px] rounded flex-1"})]})]})]})})},jB=({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 h.jsxs("div",{className:se("rounded-lg border px-[12px] py-[8px] text-xs shadow-lg",i?"bg-gray-900 border-gray-700 text-white":"bg-white border-gray-200 text-gray-900"),children:[h.jsx("div",{className:se("font-medium mb-[8px]",i?"text-gray-300":"text-gray-600"),children:new Date(r||"").toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}),h.jsx("div",{className:"space-y-1",children:a.map((s,l)=>h.jsxs("div",{className:"flex items-center justify-between gap-4",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-[8px] h-[8px] rounded-full",style:{backgroundColor:s.color}}),h.jsx("span",{className:se("text-xs",i?"text-gray-300":"text-gray-600"),children:s.name})]}),h.jsx("span",{className:se("font-medium text-xs",i?"text-white":"text-gray-900"),children:typeof s.value=="number"?s.value.toLocaleString():s.value})]},l))})]})},Sb=({config:e,className:t,isLoading:r,onDataPointClick:n})=>{var g,O;const{data:a,dataKey:i,color:o="#3b82f6",lines:s,dateRange:l,yAxisLabel:u,height:c=300,tooltip:f={show:!0,style:"dark"}}=e,p=(S=>{if(!S||S.length===0)return[];const j=[...S].sort(($,D)=>{const k=new Date($.date),B=new Date(D.date);return k.getTime()-B.getTime()});let C,M;l!=null&&l.start&&(l!=null&&l.end)?(C=new Date(l.start),M=new Date(l.end)):(C=new Date(j[0].date),M=new Date(j[j.length-1].date));const P=new Map;j.forEach($=>{P.set($.date,$)});const _=[],I=new Date(C);for(;I<=M;){const $=I.toISOString().split("T")[0];if(P.has($))_.push(P.get($));else{const D={date:$,users:0,sessions:0,messages:0,totalTokens:0,inputTokens:0,outputTokens:0,agentRuns:0,toolRuns:0,modelRuns:0,codeTools:0,workflowTools:0,knowledgeTools:0,mcpTools:0,value:0,count:0};if(j.length>0){const k=j[0];Object.keys(k).forEach(B=>{typeof k[B]=="number"&&!(B in D)&&(D[B]=0)})}_.push(D)}I.setDate(I.getDate()+1)}return _})(a),m=S=>{const j=new Date(S);return isNaN(j.getTime())?S:j.toLocaleDateString("en-US",{month:"short",day:"numeric"})},y=()=>{if(!p||p.length===0)return 0;const S=p.length;return S<=20?0:S<=31?1:S<=61?2:Math.floor(S/7)-1},v=S=>b()&&!Number.isInteger(S)?"":S>=1e3?`${Math.floor(S/1e3)}k`:Math.floor(S).toString(),b=()=>{const S=["users","sessions","messages","runs","agents","tools","models","Number of Users","Number of Sessions","Number of Messages","Number of Agent Runs","Number of Tool Runs","Number of Model Runs","agentRuns","toolRuns","modelRuns"];return!!(u&&S.some(j=>u.toLowerCase().includes(j.toLowerCase()))||i&&S.some(j=>i.toLowerCase().includes(j.toLowerCase()))||e.title&&S.some(j=>e.title.toLowerCase().includes(j.toLowerCase()))||s&&s.some(j=>j.label&&S.some(C=>j.label.toLowerCase().includes(C.toLowerCase()))))},x=s&&s.length>0?s:[{dataKey:i||"value",color:o,label:e.title,strokeWidth:2}];if(r)return console.log("AnalyticsChart: Loading state active"),h.jsx(Ob,{className:t,chartType:e.type,height:c});if(!a||a.length===0)return console.log("AnalyticsChart: No data provided",{data:a,config:e}),h.jsx("div",{className:se("w-full",t),children:h.jsxs("div",{className:"relative bg-gray-50/30",children:[h.jsxs("div",{className:"relative h-[300px] mb-6",children:[h.jsxs("div",{className:"absolute left-0 top-0 h-full flex flex-col justify-between items-end pr-3",children:[h.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),h.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),h.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),h.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),h.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),h.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"})]}),h.jsxs("div",{className:"ml-14 h-full relative overflow-hidden px-0 py-2 flex flex-col justify-between",children:[h.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),h.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),h.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),h.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),h.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),h.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),h.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-4",children:[h.jsx("div",{className:"bg-white border border-gray-300 rounded-[10px] w-12 h-12 flex items-center justify-center",children:h.jsx("svg",{className:"w-6 h-6 !h-6 text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.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"})})}),h.jsxs("div",{className:"text-center max-w-[352px]",children:[h.jsx("h3",{className:"font-semibold text-gray-900 text-base mb-1",children:"There is no data to display for this period"}),h.jsx("p",{className:"font-normal text-center text-gray-600 text-sm leading-5",children:"Try selecting a different date range or ensure your app is deployed and receiving traffic."})]})]})]}),h.jsxs("div",{className:"ml-14 flex justify-between items-center mt-3",children:[h.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),h.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),h.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),h.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),h.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),h.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),h.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"})]})]}),h.jsxs("div",{className:"flex items-center justify-between px-0 py-3 mt-2",children:[h.jsx("div",{className:"flex-1",children:h.jsx("div",{className:"bg-gray-100 h-3 rounded w-64"})}),h.jsxs("div",{className:"flex items-center gap-2 w-24 justify-center",children:[h.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),h.jsx("div",{className:"bg-gray-100 h-3 rounded flex-1"})]})]})]})});const A=S=>{var C;if(!n||!S||!S.activePayload)return;const j=(C=S.activePayload[0])==null?void 0:C.payload;j&&j.date&&(console.log("Chart data point clicked:",{date:j.date,data:j}),n(j,j.date))};return console.log("=== ANALYTICS CHART DEBUG ==="),console.log("AnalyticsChart config:",e),console.log("AnalyticsChart original data length:",a==null?void 0:a.length),console.log("AnalyticsChart filled data length:",p.length),console.log("AnalyticsChart date range (config):",l),console.log("AnalyticsChart actual date range:",p.length>0?{first:(g=p[0])==null?void 0:g.date,last:(O=p[p.length-1])==null?void 0:O.date,totalDays:p.length}:"No data"),console.log("AnalyticsChart dataKey:",i),console.log("Chart lines configuration:",x),console.log("Sample filled data points:",p.slice(0,3)),console.log("=== END ANALYTICS CHART DEBUG ==="),h.jsxs("div",{className:se("w-full",t),children:[h.jsx("div",{className:"relative bg-gray-50/30",children:h.jsx(gk,{width:"100%",height:c,children:h.jsxs(PB,{data:p,onClick:A,margin:{top:20,right:30,left:20,bottom:20},children:[h.jsx("defs",{children:x.map((S,j)=>h.jsxs("linearGradient",{id:`gradient-${S.dataKey}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[h.jsx("stop",{offset:"5%",stopColor:S.color,stopOpacity:.08}),h.jsx("stop",{offset:"95%",stopColor:S.color,stopOpacity:.01})]},`gradient-${j}`))}),h.jsx(Dg,{strokeDasharray:"2 2",className:"opacity-30",stroke:"#d1d5db",horizontal:!0,vertical:!1}),h.jsx(Ts,{dataKey:"date",tickFormatter:m,axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#6b7280"},tickMargin:10,interval:y()}),h.jsx(Ps,{axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#6b7280"},tickFormatter:v,tickMargin:10,allowDecimals:!b(),domain:b()?["dataMin","dataMax"]:void 0,label:u?{value:u,angle:-90,position:"insideLeft",style:{textAnchor:"middle",fontSize:12,fill:"#6b7280"}}:void 0}),f.show&&h.jsx(Wt,{content:S=>h.jsx(jB,{...S,config:e}),cursor:{stroke:"#d1d5db",strokeWidth:1,strokeDasharray:"4 4"},allowEscapeViewBox:{x:!1,y:!1}}),x.map(S=>h.jsx(Tr,{type:"monotone",dataKey:S.dataKey,stroke:"none",fill:`url(#gradient-${S.dataKey})`,fillOpacity:1,isAnimationActive:!1,name:""},`area-${S.dataKey}`)),x.map(S=>h.jsx(vi,{type:"monotone",dataKey:S.dataKey,stroke:S.color,strokeWidth:2.5,strokeDasharray:S.strokeDasharray,dot:!1,activeDot:{r:5,fill:S.color,stroke:S.color,strokeWidth:2},name:S.label},S.dataKey))]})})}),h.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[h.jsx("div",{children:l&&h.jsxs("p",{className:"text-xs text-gray-500 flex items-center gap-[4px]",children:[h.jsx("span",{className:"text-gray-500",children:"Showing data from"}),h.jsxs("span",{className:"font-medium text-gray-700",children:[new Date(l.start).toLocaleDateString("en-US",{day:"numeric",month:"short",year:"numeric"})," - ",new Date(l.end).toLocaleDateString("en-US",{day:"numeric",month:"short",year:"numeric"})]})]})}),h.jsx("div",{className:"flex items-center gap-4",children:h.jsx("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:x.map(S=>h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-[8px] h-[8px] rounded-full",style:{backgroundColor:S.color}}),h.jsx("span",{className:"text-xs text-gray-600",children:S.label})]},S.dataKey))})})]})]})},Tb=({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]=T.useState(o.defaultSort||null),[c,f]=T.useState(""),[d,p]=T.useState(1),m=T.useMemo(()=>{let g=[...n];return s.searchable&&c&&(g=g.filter(O=>a.some(S=>{const j=O[S.key];return j==null?void 0:j.toString().toLowerCase().includes(c.toLowerCase())}))),l&&g.sort((O,S)=>{const j=O[l.key],C=S[l.key];if(typeof j=="number"&&typeof C=="number")return l.order==="asc"?j-C:C-j;const M=(j==null?void 0:j.toString())||"",P=(C==null?void 0:C.toString())||"",_=M.localeCompare(P);return l.order==="asc"?_:-_}),g},[n,a,c,l,s.searchable]),y=i.enabled?Math.ceil(m.length/i.pageSize):1,v=i.enabled?m.slice((d-1)*i.pageSize,d*i.pageSize):m,b=g=>{!o.enabled||!g.sortable||u(O=>(O==null?void 0:O.key)===g.key?O.order==="asc"?{key:g.key,order:"desc"}:null:{key:g.key,order:"asc"})},w=g=>{f(g),p(1)},x=(g,O,S)=>O.render?O.render(g,S):O.formatter?O.formatter(g,S):typeof g=="number"?g.toLocaleString():(g==null?void 0:g.toString())||"-",A=g=>!o.enabled||!g.sortable?null:(l==null?void 0:l.key)===g.key?l.order==="asc"?h.jsx(Tf,{className:"w-[16px] h-[16px]"}):h.jsx(Qr,{className:"w-[16px] h-[16px]"}):h.jsxs("div",{className:"flex flex-col",children:[h.jsx(Tf,{className:"w-[12px] h-[12px] opacity-30"}),h.jsx(Qr,{className:"w-[12px] h-[12px] opacity-30 -mt-1"})]});return h.jsxs("div",{className:se("w-full",t),children:[h.jsxs("div",{className:"flex items-center justify-between mb-4",children:[h.jsx("h3",{className:"text-md font-medium text-gray-700",children:r}),s.enabled&&s.searchable&&h.jsxs("div",{className:"relative",children:[h.jsx(jf,{className:"absolute left-[12px] top-1/2 transform -translate-y-1/2 w-[16px] h-[16px] text-gray-400"}),h.jsx("input",{type:"text",placeholder:"Search...",value:c,onChange:g=>w(g.target.value),className:"pl-[36px] pr-[12px] py-[8px] border border-gray-200 rounded-lg text-xs focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]})]}),h.jsx("div",{className:"overflow-x-auto border border-gray-200 rounded-lg",children:h.jsxs("table",{className:"w-full",children:[h.jsx("thead",{className:"bg-gray-50",children:h.jsx("tr",{children:a.map(g=>h.jsx("th",{className:se("px-[16px] py-[12px] text-left text-xs font-medium text-gray-500 uppercase tracking-wider",g.sortable&&o.enabled&&"cursor-pointer hover:bg-gray-100",g.align==="center"&&"text-center",g.align==="right"&&"text-right"),style:{width:g.width},onClick:()=>b(g),children:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{children:g.title}),A(g)]})},g.key))})}),h.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:v.map((g,O)=>h.jsx("tr",{className:"hover:bg-gray-50 transition-colors",children:a.map(S=>h.jsx("td",{className:se("px-[16px] py-[12px] text-xs text-gray-900",S.align==="center"&&"text-center",S.align==="right"&&"text-right"),children:x(g[S.key],S,g)},S.key))},O))})]})}),i.enabled&&y>1&&h.jsxs("div",{className:"flex items-center justify-between mt-4",children:[h.jsxs("div",{className:"text-xs text-gray-500",children:["Showing ",(d-1)*i.pageSize+1," to"," ",Math.min(d*i.pageSize,m.length)," of"," ",m.length," results"]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("button",{onClick:()=>p(g=>Math.max(1,g-1)),disabled:d===1,className:"px-[12px] py-[4px] text-xs border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),Array.from({length:Math.min(5,y)},(g,O)=>{const S=Math.max(1,Math.min(y-4,d-2))+O;return S>y?null:h.jsx("button",{onClick:()=>p(S),className:se("px-[12px] py-[4px] text-xs border rounded",d===S?"bg-blue-500 text-white border-blue-500":"border-gray-200 hover:bg-gray-50"),children:S},S)}),h.jsx("button",{onClick:()=>p(g=>Math.min(y,g+1)),disabled:d===y,className:"px-[12px] py-[4px] text-xs border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),v.length===0&&h.jsx("div",{className:"text-center py-[32px] text-gray-500",children:c?"No results found for your search.":"No data available."})]})},_B=(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"}},EB=e=>{if(!e)return null;if(typeof e=="string")try{return JSON.parse(e)}catch{return{name:e,type:"human"}}return e},CB=(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 t==="model"?{name:"fallback",type:"icon",color:r[n]}:{name:"fallback",type:t==="agent"?"human":"icon",color:r[n]}},$B=(e,t)=>{if(!(e!=null&&e.name))return"";if(t==="url")return e.name;if(t==="model")return"";const r=window.location.origin,n=_B(e.type||"human",t);return`${r}/agenticai/assets/${n}/${e.name}.svg`},Ab=e=>{if(!e)return"assets/icons/models/custom-api.svg";const t=e.toLowerCase(),r={openai:"Open AI.svg","open ai":"Open AI.svg",chatopenai:"Open AI.svg",gpt:"Open AI.svg",anthropic:"Anthropic.svg",claude:"Anthropic.svg",google:"Google.svg",gemini:"Google.svg",chatgooglegenerativeai:"Google.svg",googlegenerativeai:"Google.svg",palm:"Google.svg",azurechatopenai:"Azure Open AI.svg","azure open ai":"Azure Open AI.svg",azureopenai:"Azure Open AI.svg","azure openai":"Azure Open AI.svg",azure:"Azure Open AI.svg",aws:"AWS Bedrock.svg",bedrock:"AWS Bedrock.svg","aws bedrock":"AWS Bedrock.svg",awsbedrock:"AWS Bedrock.svg",amazon:"AWS Bedrock.svg",cohere:"Cohere.svg",api:"API.svg",custom:"custom-api.svg","custom-api":"custom-api.svg",customapi:"custom-api.svg"};if(r[t])return`assets/icons/models/${r[t]}`;for(const[n,a]of Object.entries(r))if(t.includes(n)||n.includes(t))return`assets/icons/models/${a}`;return"assets/icons/models/custom-api.svg"},kB={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"},Rt={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)">
206
266
  <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>
207
267
  <defs><clipPath id="clip0_3533_7514"><rect width="12" height="12" fill="white"/></clipPath></defs>
208
268
  </svg>`,toolLibrary:`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -211,7 +271,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
211
271
  <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"/>
212
272
  </svg>`,MCP:`<svg width="14" height="14" viewBox="0 0 22 23" fill="none" xmlns="http://www.w3.org/2000/svg">
213
273
  <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"/>
214
- </svg>`},dW=(e,t)=>{const r=e.toLowerCase();if(r.includes("code"))return Rt.inlineTool;if(r.includes("workflow")||r.includes("library"))return Rt.toolLibrary;if(r.includes("knowledge"))return Rt.KNOWLEDGE;if(r.includes("mcp"))return Rt.MCP;if(Rt[e])return Rt[e];const n=t.toLowerCase();return n.includes("code")||n.includes("inline")||n.includes("calculate")?Rt.inlineTool:n.includes("library")||n.includes("workflow")?Rt.toolLibrary:n.includes("knowledge")||n.includes("document")||n.includes("fetch")?Rt.KNOWLEDGE:n.includes("mcp")||n.includes("protocol")?Rt.MCP:Rt.toolLibrary},of=({icon:e,iconSource:t="agent",size:r="small",className:n="",name:a="Unknown",toolType:i,provider:o,modelName:s})=>{const[l,u]=A.useState(!1),[c,f]=A.useState(!1),[d,p]=A.useState(!1),v=lW(e),y=fW[r];if(t==="model"){const S=yb(o),x=()=>{p(!0)};if(d){const T=o?o.charAt(0).toUpperCase():"🤖";return g.jsx("div",{className:`${y} rounded-full bg-gray-500 flex items-center justify-center ${n}`,children:g.jsx("span",{className:"text-white text-xs font-bold",children:T})})}return g.jsx("img",{src:S,alt:s||a,className:`${y} rounded ${n}`,onError:x})}if(v!=null&&v.name&&v.name!=="fallback"&&!l){const S=cW(v,t),x=()=>{u(!0)};return g.jsx("img",{src:S,alt:a,className:`${y} rounded-full object-cover ${n}`,onError:x})}if(l&&!c&&t==="agent"){const S=`${window.location.origin}/agenticai/assets/agent-avatars/agent1.svg`,x=()=>{f(!0)};return g.jsx("img",{src:S,alt:a,className:`${y} rounded-full object-cover ${n}`,onError:x})}if(t==="model"){const S=yb(o),x=()=>{p(!0)};if(d){const T=o?o.charAt(0).toUpperCase():"🤖";return g.jsx("div",{className:`${y} rounded-full bg-gray-500 flex items-center justify-center ${n}`,children:g.jsx("span",{className:"text-white text-xs font-bold",children:T})})}return g.jsx("img",{src:S,alt:s||a,className:`${y} rounded ${n}`,onError:x})}const h=v||uW(a,t);if(t==="workflowtool"){const S=i||h.type||"toolLibrary",x=dW(S,a);return g.jsx("div",{className:`${y} rounded-full flex items-center justify-center bg-gray-100 ${n}`,children:g.jsx("div",{dangerouslySetInnerHTML:{__html:x}})})}const b=`${window.location.origin}/agenticai/assets/agent-avatars/agent1.svg`;return g.jsx("img",{src:b,alt:a,className:`${y} rounded-full object-cover ${n}`})},mb=({data:e,className:t})=>{const[r,n]=A.useState(5),a=()=>{n(o=>Math.min(o+10,e.length))},i=o=>o>=1e3?`${Math.floor(o/1e3)}k`:o.toString();return g.jsxs("div",{className:ue("w-full",t),children:[g.jsxs("div",{className:"grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] bg-gray-50 border-b border-gray-200 text-xs font-medium text-gray-600",children:[g.jsx("div",{className:"text-left",children:"Name"}),g.jsx("div",{className:"text-center",children:"Runs"}),g.jsx("div",{className:"text-center",children:"Response Time"}),g.jsx("div",{className:"text-center",children:"Tokens"})]}),g.jsx("div",{className:"divide-y divide-gray-100",children:e.slice(0,r).map((o,s)=>g.jsxs("div",{className:"grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] cursor-pointer transition-colors duration-150 border-b border-gray-200",children:[g.jsxs("div",{className:"flex items-center gap-[8px]",children:[g.jsx("div",{className:"flex-shrink-0",children:g.jsx(of,{icon:o.icon,iconSource:"agent",size:"small",name:o.name||"Unknown Agent"})}),g.jsx("div",{className:"min-w-0 flex-1 w-full",children:g.jsx("div",{className:"text-xs font-medium text-gray-700 truncate",children:o.name||"Unknown Agent"})})]}),g.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:o.runs?i(o.runs):"-"}),g.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:o.responseTime||"-"}),g.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:o.tokens?i(o.tokens):"-"})]},o.id||s))}),r<e.length&&g.jsx("div",{className:"flex justify-center",children:g.jsx("button",{onClick:a,className:"px-[16px] py-[8px] text-xs font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 transition-colors duration-150",children:"Load 10 more"})})]})};function pW(e){const t=(e==null?void 0:e.toLowerCase())||"";return["inlinetool","inlineTool","code tool","code","tool","event","EVENT"].includes(e)||["inlinetool","inlineTool","code tool","code","tool","event"].includes(t)?"bg-orange-100 text-orange-800 border-orange-200":["toollibrary","toolLibrary","workflow tool"].includes(e)||["toollibrary","toollibrary","workflow tool"].includes(t)?"bg-blue-100 text-blue-800 border-blue-200":["mcp","MCP","mcpTool","mcpTool"].includes(e)||["mcp","mcptool"].includes(t)?"bg-green-100 text-green-800 border-green-200":["knowledge","KNOWLEDGE","knowledge tool"].includes(e)||["knowledge","knowledge tool"].includes(t)?"bg-purple-100 text-purple-800 border-purple-200":"bg-gray-100 text-gray-800 border-gray-200"}function hW(e){const t=(e==null?void 0:e.toLowerCase())||"";return["inlinetool","code tool","code","tool","event","inlineTool"].includes(t)?"Code Tool":["toollibrary","workflow tool"].includes(t)?"Workflow Tool":["mcp","mcptool"].includes(t)?"MCP Tool":["knowledge","knowledge tool","knowledge"].includes(t)||e==="KNOWLEDGE"?"Knowledge":e==="inlineTool"?"Code Tool":e==="toolLibrary"?"Workflow Tool":e==="KNOWLEDGE"?"Knowledge":e==="MCP"||e==="mcpTool"?"MCP Tool":"Code Tool"}const gb=({data:e,className:t})=>{const[r,n]=A.useState(5),a=()=>{n(o=>Math.min(o+10,e.length))},i=o=>o>=1e3?`${Math.floor(o/1e3)}k`:o.toString();return g.jsxs("div",{className:ue("w-full",t),children:[g.jsxs("div",{className:"grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] bg-gray-50 border-b border-gray-200 text-xs font-medium text-gray-600",children:[g.jsx("div",{className:"text-left",children:"Name"}),g.jsx("div",{className:"text-center",children:"Type"}),g.jsx("div",{className:"text-center",children:"Runs"}),g.jsx("div",{className:"text-center",children:"Response Time"})]}),g.jsx("div",{className:"divide-y divide-gray-100",children:e.slice(0,r).map((o,s)=>g.jsxs("div",{className:"grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] cursor-pointer transition-colors duration-150 border-b border-gray-200",children:[g.jsxs("div",{className:"flex items-center gap-[8px]",children:[g.jsx("div",{className:"flex-shrink-0",children:g.jsx(of,{icon:o.icon,iconSource:"workflowtool",size:"small",name:o.name||"Unknown Tool",toolType:o.toolType||o.type})}),g.jsx("div",{className:"min-w-0 flex-1 w-full",children:g.jsx("div",{className:"text-xs font-medium text-gray-700 truncate",children:o.name||"Unknown Tool"})})]}),g.jsx("div",{className:"flex items-center justify-center",children:g.jsx("span",{className:ue("inline-flex items-center px-[10px] py-[4px] rounded-full text-xs font-medium border",pW(o.toolType||o.type||"Default")),children:hW(o.toolType||o.type||"Default")})}),g.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:o.runs?i(o.runs):"-"}),g.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:o.responseTime||"-"})]},o.id||s))}),r<e.length&&g.jsx("div",{className:"flex justify-center",children:g.jsx("button",{onClick:a,className:"px-[16px] py-[8px] text-xs font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 transition-colors duration-150",children:"Load 10 more"})})]})},vW=e=>{if(!e)return"/assets/icons/models/custom-api.svg";const t=e.toLowerCase(),r={openai:"Open AI.svg","open ai":"Open AI.svg",chatopenai:"Open AI.svg",gpt:"Open AI.svg",anthropic:"Anthropic.svg",claude:"Anthropic.svg",google:"Google.svg",gemini:"Google.svg",chatgooglegenerativeai:"Google.svg",googlegenerativeai:"Google.svg",palm:"Google.svg",azurechatopenai:"Azure Open AI.svg","azure open ai":"Azure Open AI.svg",azureopenai:"Azure Open AI.svg","azure openai":"Azure Open AI.svg",azure:"Azure Open AI.svg",aws:"AWS Bedrock.svg",bedrock:"AWS Bedrock.svg","aws bedrock":"AWS Bedrock.svg",awsbedrock:"AWS Bedrock.svg",amazon:"AWS Bedrock.svg",cohere:"Cohere.svg",api:"API.svg",custom:"custom-api.svg","custom-api":"custom-api.svg",customapi:"custom-api.svg"};if(r[t])return`assets/icons/models/${r[t]}`;for(const[n,a]of Object.entries(r))if(t.includes(n)||n.includes(t))return`assets/icons/models/${a}`;return"assets/icons/models/custom-api.svg"},yW=e=>{if(!e)return"";const t=e.toLowerCase(),r={openai:"OpenAI","open ai":"OpenAI",chatopenai:"OpenAI",gpt:"OpenAI",anthropic:"Anthropic",claude:"Anthropic",google:"Google",gemini:"Google Gemini",chatgooglegenerativeai:"Google Gemini",googlegenerativeai:"Google Gemini",palm:"Google PaLM",azurechatopenai:"Azure OpenAI","azure open ai":"Azure OpenAI",azureopenai:"Azure OpenAI","azure openai":"Azure OpenAI",azure:"Azure OpenAI",aws:"AWS Bedrock",bedrock:"AWS Bedrock","aws bedrock":"AWS Bedrock",awsbedrock:"AWS Bedrock",amazon:"AWS Bedrock",cohere:"Cohere",meta:"Meta",llama:"Meta LLaMA",mistral:"Mistral",huggingface:"Hugging Face",together:"Together AI",replicate:"Replicate"};if(r[t])return r[t];for(const[n,a]of Object.entries(r))if(t.includes(n)||n.includes(t))return a;return e.charAt(0).toUpperCase()+e.slice(1)},mW=({provider:e})=>{const[t,r]=A.useState(!1),n=vW(e),a=()=>{r(!0)};if(t){const i=e?e.charAt(0).toUpperCase():"🤖";return g.jsx("div",{className:"w-6 h-6 rounded-full bg-gray-500 flex items-center justify-center",children:g.jsx("span",{className:"text-white text-xs font-bold",children:i})})}return g.jsx("img",{src:n,alt:e||"Model",className:"w-6 h-6 rounded",onError:a})},bb=({data:e,className:t})=>{const[r,n]=A.useState(5),a=()=>{n(o=>Math.min(o+10,e.length))},i=o=>o>=1e3?`${Math.floor(o/1e3)}k`:o.toString();return g.jsxs("div",{className:ue("w-full",t),children:[g.jsxs("div",{className:"grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] bg-gray-50 border-b border-gray-200 text-xs font-medium text-gray-600",children:[g.jsx("div",{className:"text-left",children:"Model Name"}),g.jsx("div",{className:"text-center",children:"Runs"}),g.jsx("div",{className:"text-center",children:"Tokens"}),g.jsx("div",{className:"text-center",children:"Response Time"})]}),g.jsx("div",{className:"divide-y divide-gray-100",children:e.slice(0,r).map((o,s)=>g.jsxs("div",{className:"grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] cursor-pointer transition-colors duration-150 border-b border-gray-200",children:[g.jsxs("div",{className:"flex items-center gap-[8px]",children:[g.jsx("div",{className:"flex-shrink-0",children:g.jsx(mW,{provider:o.provider})}),g.jsxs("div",{className:"min-w-0 flex-1 w-full",children:[g.jsx("div",{className:"text-xs font-medium text-gray-700 truncate",children:o.name||o.modelName||"Unknown Model"}),o.provider&&g.jsx("div",{className:"text-xs text-gray-500 truncate",children:yW(o.provider)})]})]}),g.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:i(o.runs||0)}),g.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:i(o.tokens||o.totalTokens||0)}),g.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:o.responseTime||(o.avgResponseTime?`${o.avgResponseTime}ms`:"N/A")})]},o.id||s))}),r<e.length&&g.jsx("div",{className:"flex justify-center",children:g.jsx("button",{onClick:a,className:"px-[16px] py-[8px] text-xs font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 transition-colors duration-150",children:"Load 10 more"})})]})},gW=e=>{switch(e){case"agentRuns":return{title:"Agent Runs",entityName:"Agents"};case"toolRuns":return{title:"Tool Runs",entityName:"Tools"};case"modelRuns":return{title:"Model Runs",entityName:"Models"};default:return{title:"Runs",entityName:"Items"}}},bW=e=>e>=1e3?`${Math.floor(e/1e3)}k`:e.toString(),xb=({isOpen:e,onClose:t,date:r,metricType:n,data:a,totalRuns:i,className:o})=>{var w;const s=gW(n),[l,u]=A.useState(10),[c,f]=A.useState("all"),[d,p]=A.useState(!1),v=[{label:`All ${s.entityName}`,value:"all"},...a.map(O=>({label:O.name,value:O.id}))],y=c==="all"?a:a.filter(O=>O.id===c),h=()=>{f("all"),p(!1),u(10),t()};A.useEffect(()=>{const O=j=>{j.key==="Escape"&&h()},P=j=>{d&&(j.target.closest(".filter-dropdown")||p(!1))};return e&&(document.addEventListener("keydown",O),document.addEventListener("mousedown",P),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",O),document.removeEventListener("mousedown",P),document.body.style.overflow="unset"}},[e,d,h]),A.useEffect(()=>{e&&(f("all"),p(!1),u(10))},[e]);const b=O=>new Date(O).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),S=()=>{u(O=>Math.min(O+10,y.length))},x=O=>{f(O),p(!1),u(10)};if(!e)return null;const T=y.slice(0,l),m=((w=v.find(O=>O.value===c))==null?void 0:w.label)||`All ${s.entityName}`;return g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-40 transition-opacity duration-300",onClick:h}),g.jsxs("div",{className:ue("fixed right-0 top-0 h-full w-[600px] bg-white shadow-[0px_20px_24px_-4px_rgba(16,24,40,0.08),0px_8px_8px_-4px_rgba(16,24,40,0.03)] z-50 transform transition-transform duration-300 ease-in-out",e?"translate-x-0":"translate-x-full",o),children:[g.jsxs("div",{className:"flex items-center justify-between px-6 py-3 border-b border-[#d0d5dd]",children:[g.jsx("h2",{className:"text-lg font-semibold text-[#101828]",children:s.title}),g.jsx("button",{onClick:h,className:"p-2 hover:bg-gray-100 rounded-lg transition-colors",children:g.jsx(s0,{className:"h-5 w-5 text-[#101828]"})})]}),g.jsxs("div",{className:"flex flex-col h-[calc(100%-64px)] p-6 gap-6",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{className:"text-sm font-medium text-[#344054]",children:[s.title," (",b(r),")"]}),g.jsxs("div",{className:"w-[210px] relative filter-dropdown",children:[g.jsxs("button",{onClick:()=>p(!d),className:"w-full bg-white border border-[#d0d5dd] rounded-lg px-3.5 py-2.5 flex items-center justify-between text-sm text-[#101828] hover:bg-gray-50 transition-colors",children:[g.jsx("span",{children:m}),g.jsx(ua,{className:"h-4 w-4 text-[#101828]"})]}),d&&g.jsx("div",{className:"absolute top-full left-0 right-0 mt-1 bg-white border border-[#d0d5dd] rounded-lg shadow-lg z-10 max-h-60 overflow-y-auto",children:v.map(O=>g.jsx("button",{onClick:()=>x(O.value),className:ue("w-full px-3.5 py-2.5 text-left text-sm hover:bg-gray-50 transition-colors",c===O.value?"bg-blue-50 text-blue-700":"text-[#101828]"),children:O.label},O.value))})]})]}),g.jsxs("div",{className:"flex-1 overflow-hidden",children:[g.jsx("div",{className:"bg-[#f9fafb] border-b border-[#eaecf0] px-2 py-2",children:g.jsxs("div",{className:"grid grid-cols-4 gap-3 items-center",children:[g.jsx("div",{className:"col-span-2 px-0 py-2",children:g.jsx("div",{className:"text-xs font-medium text-[#475467]",children:"Name"})}),g.jsx("div",{className:"flex justify-center px-0 py-2",children:g.jsx("div",{className:"text-xs font-medium text-[#475467]",children:"Runs"})}),g.jsx("div",{className:"flex justify-center px-0 py-2",children:g.jsx("div",{className:"text-xs font-medium text-[#475467]",children:"Response Time"})})]})}),g.jsx("div",{className:"overflow-y-auto max-h-[calc(100%-40px)]",children:T.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center h-64 text-center",children:[g.jsxs("h3",{className:"text-md font-medium text-gray-900 mb-[8px]",children:["No ",s.title.toLowerCase()," for this date"]}),g.jsxs("p",{className:"text-xs text-gray-500",children:["There were no ",s.title.toLowerCase()," recorded on ",b(r),"."]})]}):g.jsxs(g.Fragment,{children:[T.map((O,P)=>g.jsxs("div",{className:"grid grid-cols-4 gap-3 items-center px-2 py-3 border-b border-[#eaecf0] hover:bg-gray-50 transition-colors",children:[g.jsxs("div",{className:"col-span-2 flex items-center gap-2",children:[g.jsx("div",{className:"flex-shrink-0",children:g.jsx(of,{icon:O.icon,iconSource:n==="agentRuns"?"agent":n==="toolRuns"?"workflowtool":"model",size:"small",name:O.name,toolType:O.toolType||O.type,provider:O.provider,modelName:O.modelName})}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("div",{className:"text-sm font-medium text-[#101828] truncate",children:O.name}),n==="modelRuns"&&O.provider&&g.jsx("div",{className:"text-xs text-[#475467] truncate",children:O.provider})]})]}),g.jsx("div",{className:"flex justify-center",children:g.jsx("div",{className:"text-xs font-medium text-[#475467]",children:bW(O.runs)})}),g.jsx("div",{className:"flex justify-center",children:g.jsx("div",{className:"text-xs font-medium text-[#475467]",children:O.responseTime})})]},O.id||P)),l<y.length&&g.jsx("div",{className:"flex justify-center",children:g.jsx("button",{onClick:S,className:"bg-white border border-[#d0d5dd] rounded px-3 py-1 text-xs font-medium text-[#344054] hover:bg-gray-50 transition-colors",children:"Load 10 more"})})]})})]})]})]})]})};class wb{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 Ob{constructor(t){Bt(this,"endpointsService");Bt(this,"defaultHeaders");Bt(this,"timeout");this.endpointsService=new wb(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 Ht{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 Ob(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||Ht.getDateRange(7)}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||Ht.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||Ht.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||Ht.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",info:"Number of unique users who interacted with the app",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",info:"Number of conversations initiated with the app",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:"Total messages exchanged between users and the app",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:"Total input and output tokens processed by the app for all interactions",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",info:"Number of times the AI agents were executed to handle user requests",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:"Number of times various tools were triggered by the AI agents to complete tasks",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",info:"Number of times the AI agents called various language models to generate responses",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?r.avgResponseTime<1e3?`${Math.round(r.avgResponseTime)}ms`:`${(r.avgResponseTime/1e3).toFixed(2)}s`:"0ms",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){return Array.isArray(t)?t.map((r,n)=>({id:`tool-${n+1}`,name:r.toolName||r.tool_name||`Tool ${n+1}`,type:r.type||r.toolType||r.tool_type||"Code Tool",runs:r.count||0,responseTime:r.avgResponseTime?r.avgResponseTime<1e3?`${Math.round(r.avgResponseTime)}ms`:`${(r.avgResponseTime/1e3).toFixed(2)}s`:"0ms",tokens:r.tokens||Math.floor((r.count||0)*50),successRate:r.successRate?`${Math.round(r.successRate)}%`:"92%",lastRun:r.lastRun||new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),icon:r.icon||r.tool_icon||void 0})):(console.warn("Invalid listView data for tools:",t),[])}transformModelsListViewToTable(t){return Array.isArray(t)?t.map((r,n)=>({id:`model-${n+1}`,name:r.modelName||`Model ${n+1}`,modelName:r.modelName,provider:r.provider,runs:r.count||0,responseTime:r.avgResponseTime?r.avgResponseTime<1e3?`${Math.round(r.avgResponseTime)}ms`:`${(r.avgResponseTime/1e3).toFixed(2)}s`:"0ms",avgResponseTime:r.avgResponseTime,tokens:r.tokens||r.totalTokens||Math.floor((r.count||0)*300),totalTokens:r.totalTokens||r.tokens,successRate:r.successRate?`${Math.round(r.successRate)}%`:"98%",lastRun:r.lastRun||new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),icon:r.icon})):(console.warn("Invalid listView data for models:",t),[])}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=>{const a=n.toolName||n.tool_name;if(a){let i=function(o){if(!o)return"Code Tool";const s=o.toLowerCase();return["inlinetool","code tool","code","event"].includes(s)?"Code Tool":["toollibrary","workflow tool"].includes(s)?"Workflow Tool":["mcp","mcptool"].includes(s)?"MCP Tool":["knowledge","knowledge tool"].includes(s)||o==="KNOWLEDGE"?"Knowledge":o==="inlineTool"?"Code Tool":o==="toolLibrary"?"Workflow Tool":o==="MCP"||o==="mcpTool"?"MCP Tool":"Code Tool"};r.push({label:a,value:a.replace(/[-]/g,""),icon:n.icon||n.tool_icon||void 0,type:n.type||i(n.toolType||n.tool_type)})}}),r}extractModelControlOptions(t){if(!Array.isArray(t))return[{label:"All Models",value:"all"}];const r=[{label:"All Models",value:"all"}];return t.forEach(n=>{n.modelName&&r.push({label:n.modelName,value:n.modelName.replace(/[-\.]/g,""),icon:n.icon,type:n.provider})}),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=p=>p>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 times the AI agents were executed to handle user requests",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:p=>`${Math.floor(p/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"},{key:"tokens",title:"Tokens",width:100,align:"right",formatter:p=>`${Math.floor(p/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:"Number of times various tools were triggered by the AI agents to complete tasks",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:p=>`${Math.floor(p/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 times the AI agents called various language models to generate responses",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:p=>`${Math.floor(p/1e3)}k`},{key:"tokens",title:"Tokens",width:120,align:"right",formatter:p=>`${Math.floor(p/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:"Number of unique users who interacted with the app",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:"Number of conversations initiated with the app",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:"Total messages exchanged between users and the app",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:"Total input and output tokens processed by the app for all interactions",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(y=>{const h=y.count||0,b=(y.toolType||y.tool_type||"").toLowerCase(),S=(y.toolName||y.tool_name||"").toLowerCase();console.log("Processing listView item:",{toolType:b,toolName:S,count:h});const x=b.toLowerCase();["inlinetool","inlineTool","tool","code","codetool","event","EVENT"].includes(b)||["inlinetool","tool","code","codetool","event"].includes(x)?u+=h:["toollibrary","toolLibrary","workflow","workflowtool"].includes(b)||["toollibrary","workflow","workflowtool"].includes(x)?c+=h:["knowledge","KNOWLEDGE","knowledgetool"].includes(b)||["knowledge","knowledgetool"].includes(x)?f+=h:["mcp","MCP","mcptool","mcpTool"].includes(b)||["mcp","mcptool"].includes(x)?d+=h:(console.log(`Unknown tool type '${b}' for tool '${S}', defaulting to code tools`),u+=h)}),console.log(`Calculated breakdown for point ${a}:`,{codeTools:u,workflowTools:c,knowledgeTools:f,mcpTools:d,total:u+c+f+d,expectedTotal:l});const v=u+c+f+d;if(Math.abs(v-l)>1){console.warn(`Breakdown total (${v}) doesn't match expected total (${l}) for point ${a}`);const y=l-v;u+=y,console.log(`Adjusted codeTools by ${y} to balance total`)}}else console.log(`No listView data for point ${a}, assigning all ${l} to codeTools`),u=l;const p={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}:`,p),p});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}}transformListViewForSlider(t,r){return Array.isArray(t)?t.map((n,a)=>{const i={id:`${r}-${a+1}`,runs:n.count||0,responseTime:n.avgResponseTime?n.avgResponseTime<1e3?`${Math.round(n.avgResponseTime)}ms`:`${(n.avgResponseTime/1e3).toFixed(2)}s`:"0ms",successRate:n.successRate?`${Math.round(n.successRate)}%`:void 0,tokens:n.totalTokens||n.tokens||0,icon:n.icon||n.tool_icon||void 0,aiModel:"gpt-4o"};switch(r){case"agentRuns":return{...i,name:n.agentName||`Agent ${a+1}`,type:"Agent",aiModel:this.extractAIModel(n)||"gpt-4o"};case"toolRuns":return{...i,name:n.toolName||n.tool_name||`Tool ${a+1}`,type:n.type||n.toolType||n.tool_type||"Code Tool",toolType:n.toolType||n.tool_type,aiModel:this.extractAIModel(n)||"gpt-4o"};case"modelRuns":return{...i,name:n.modelName||`Model ${a+1}`,modelName:n.modelName,provider:n.provider,type:n.provider||"Model",aiModel:n.modelName||n.model||"gpt-4o"};default:return{...i,name:`Item ${a+1}`,type:"Unknown",aiModel:"gpt-4o"}}}):(console.warn("Invalid listView data for slider:",t),[])}extractAIModel(t){if(t.modelName)return t.modelName;if(t.model)return t.model;if(t.llmModel)return t.llmModel;if(t.aiModel)return t.aiModel;const r=["gpt-4o","gpt-4o-mini","claude-3-5-haiku"];return r[Math.floor(Math.random()*r.length)]}static getDateRange(t=7){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()),p=f&&Math.abs(n.getTime()-d.getTime())<1e3,v=Math.abs(a.getTime()-n.getTime()),y=v<60*1e3;return console.log("🕐 TimeDimension calculation:",{fromTimestamp:t,toTimestamp:r,fromDateStr:u,toDateStr:c,diffInMs:s,diffInDays:l,isSameCalendarDay:f,isTodayPattern:p,timeDiffInMs:v,isVeryClose:y,fromStartOfDay:d.toISOString(),recommended:f||p||y||l<=1?"hour":l<=31?"day":l<=90?"week":"month"}),f||p||y||l<=1?"hour":"day"}getAvailableMetrics(){return{"usage-analytics":["sessions","messages","users","tokens"],runs:["agent-runs","model-runs","tool-runs"]}}}const Sb=({config:e,className:t,isLoading:r,context:n})=>{const{type:a,chart:i,table:o,layout:s="vertical"}=e,[l,u]=A.useState({isOpen:!1,date:"",metricType:"agentRuns",data:[],totalRuns:0}),c=(y,h)=>{console.log("Chart data point clicked in ViewRenderer:",{chartData:y,date:h,context:n});const b=n==null?void 0:n.metricType;if(!b||!["agentRuns","toolRuns","modelRuns"].includes(b)){console.log("Slider not applicable for metric type:",b);return}const S=y.listView||[];console.log("ListView data for clicked date:",S);const T=new Ht({baseUrl:"",projectId:"",environment:""}).transformListViewForSlider(S,b),m=y[b]||y.count||0;console.log("Opening slider with data:",{date:h,metricType:b,sliderData:T,totalRuns:m}),u({isOpen:!0,date:h,metricType:b,data:T,totalRuns:m})},f=()=>{u(y=>({...y,isOpen:!1}))},d=()=>i?(console.log("ViewRenderer - Chart config:",i),console.log("ViewRenderer - Chart data:",i.data),console.log("ViewRenderer - Context:",n),g.jsx("div",{className:"flex-1",children:g.jsx(hb,{config:i,isLoading:r,onDataPointClick:c})})):null,p=()=>o?(n==null?void 0:n.metricType)==="agentRuns"?g.jsx("div",{className:"flex-1 min-h-[380px]",children:g.jsx(mb,{data:o.data})}):(n==null?void 0:n.metricType)==="toolRuns"?g.jsx("div",{className:"flex-1 min-h-[380px]",children:g.jsx(gb,{data:o.data})}):(n==null?void 0:n.metricType)==="modelRuns"?g.jsx("div",{className:"flex-1 min-h-[380px]",children:g.jsx(bb,{data:o.data})}):g.jsx("div",{className:"flex-1 min-h-[380px]",children:g.jsx(vb,{config:o})}):null,v=()=>{switch(a){case"chart":return d();case"table":return p();case"mixed":return g.jsxs("div",{className:ue("flex gap-6",s==="horizontal"?"flex-row":"flex-col"),children:[d(),p()]});default:return g.jsxs("div",{className:"p-4 text-center text-gray-500",children:["Unsupported view type: ",a]})}};return g.jsxs(g.Fragment,{children:[g.jsx("div",{className:ue("w-full",t),children:v()}),g.jsx(xb,{isOpen:l.isOpen,onClose:f,date:l.date,metricType:l.metricType,data:l.data,totalRuns:l.totalRuns})]})},js=({options:e,value:t,placeholder:r="Select an option",onChange:n,className:a,disabled:i=!1})=>{const[o,s]=A.useState(!1),[l,u]=A.useState(t||""),c=A.useRef(null),f=e.find(v=>v.value===l);A.useEffect(()=>{const v=y=>{c.current&&!c.current.contains(y.target)&&s(!1)};return o&&document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[o]);const d=v=>{i||(u(v),s(!1),n==null||n(v))},p=()=>{i||s(!o)};return g.jsxs("div",{ref:c,className:ue("relative",a),children:[g.jsxs("button",{type:"button",className:ue("flex h-[40px] text-left w-full items-center rounded-lg border border-gray-300 bg-white px-[14px] py-[10px] medium shadow-none outline-none focus-visible:border-ring focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-gray-25 transition-colors",a),onClick:p,disabled:i,children:[g.jsxs("div",{className:"flex items-center gap-[8px] w-full",children:[g.jsx("span",{className:"text-xs font-medium text-gray-400 uppercase",children:"ENV"}),g.jsx("span",{className:ue("truncate w-full",!f&&"text-gray-700 font-medium text-sm"),children:f?f.label:r})]}),g.jsx(ua,{className:ue("h-[16px] w-[16px] text-gray-400 transition-transform duration-200",o&&"rotate-180")})]}),o&&!i&&g.jsx("div",{className:"absolute p-[4px] w-full top-full left-0 z-50 mt-1 bg-popover max-h-[300px] overflow-y-auto text-popover-foreground overflow-x-hidden overflow-y-auto rounded-md border shadow-md",children:e.map(v=>{const y=l===v.value;return g.jsxs("div",{role:"option",className:"relative group",children:[g.jsx("button",{className:ue("focus:bg-gray-50 rounded-[4px] hover:bg-gray-50 focus:text-accent-foreground relative flex w-full cursor-pointer select-none items-center px-[14px] py-[10px] text-sm text-left outline-none transition-colors",v.disabled?"opacity-50 cursor-not-allowed text-gray-400":y?"bg-blue-50 text-blue-900 font-medium":"text-gray-900 hover:bg-gray-50"),onClick:()=>!v.disabled&&d(v.value),disabled:v.disabled,children:g.jsx("span",{className:"block whitespace-nowrap w-full",children:v.label})}),v.label.length>25&&g.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:g.jsxs("div",{className:"bg-gray-900 text-white text-xs rounded-md px-3 py-2 whitespace-nowrap shadow-lg",children:[v.label,g.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"})]})})]},v.value)})})]})},xW=({options:e,value:t,defaultValue:r,placeholder:n="Select...",multiSelect:a=!1,searchable:i=!1,onChange:o,className:s,maxItems:l=100,maxLabelLength:u=30})=>{const[c,f]=A.useState(!1),[d,p]=A.useState(""),[v,y]=A.useState(()=>{const M=t||r;return a?Array.isArray(M)?M:M?[M]:[]:M?[Array.isArray(M)?M[0]:M]:[]}),h=A.useRef(null);A.useEffect(()=>{const M=_=>{h.current&&!h.current.contains(_.target)&&f(!1)};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[]);const b=(M,_=u)=>M.length<=_?M:M.substring(0,_)+"...",S=i?e.filter(M=>M.label.toLowerCase().includes(d.toLowerCase())):e,x=S.slice(0,l),T=S.length>l,m=M=>{let _;if(a){if(M==="all"){O();return}if(v.includes(M))_=v.filter(R=>R!==M),_=_.filter(R=>R!=="all");else{_=v.filter(D=>D!=="all"),_=[..._,M];const R=S.filter(D=>D.value!=="all").map(D=>D.value),k=_.filter(D=>D!=="all");k.length===R.length&&(_=["all",...k])}}else _=[M],f(!1);y(_);const $=a?_:_[0]||"";o==null||o($)},w=()=>{if(!a)return{checked:!1,indeterminate:!1};const M=S.filter($=>$.value!=="all").map($=>$.value),_=v.filter($=>$!=="all"&&M.includes($));return v.includes("all")&&_.length===0?{checked:!1,indeterminate:!1}:_.length===0?{checked:!1,indeterminate:!1}:_.length===M.length?{checked:!0,indeterminate:!1}:{checked:!1,indeterminate:!0}},O=()=>{if(!a)return;const M=w(),_=S.filter($=>$.value!=="all").map($=>$.value);if(M.checked)y(["all"]),o==null||o(["all"]);else{const $=["all",..._];y($),o==null||o($)}},P=()=>{y(["all"]),o==null||o(a?["all"]:"all")},j=()=>{if(!a){if(v.length===0)return n;const R=e.find(k=>k.value===v[0]);return(R==null?void 0:R.label)||n}const M=v.filter(R=>R!=="all"),_=v.includes("all");if(M.length===0)return n;if(M.length===1){const R=e.find(k=>k.value===M[0]);return(R==null?void 0:R.label)||n}const $=e.filter(R=>R.value!=="all").length;return M.length===$?"All selected":`${M.length} selected`};return g.jsxs("div",{className:ue("relative",s),ref:h,children:[g.jsxs("button",{type:"button",onClick:()=>f(!c),className:ue("w-full flex items-center justify-between px-[12px] py-[8px] text-left text-xs","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:[g.jsx("span",{className:ue("truncate",v.length===0&&"text-gray-500"),children:j()}),g.jsx(ua,{className:ue("w-[16px] h-[16px] text-gray-400 transition-transform duration-150",c&&"transform rotate-180")})]}),c&&g.jsxs("div",{className:"absolute z-50 min-w-[300px] w-max max-w-lg mt-[4px] bg-white border border-gray-200 rounded-md shadow-lg max-h-80 overflow-hidden",children:[i&&g.jsx("div",{className:"p-[12px] border-b border-gray-100",children:g.jsxs("div",{className:"relative",children:[g.jsx(gf,{className:"absolute left-[12px] top-1/2 transform -translate-y-1/2 w-[16px] h-[16px] text-gray-400"}),g.jsx("input",{type:"text",placeholder:`Search ${n.toLowerCase()}...`,value:d,onChange:M=>p(M.target.value),className:"w-full pl-[36px] pr-[12px] py-[8px] text-xs border border-gray-200 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})]})}),a&&g.jsxs("div",{className:"flex items-center justify-between px-[12px] py-[8px] border-b border-gray-100 bg-gray-50",children:[g.jsxs("button",{type:"button",onClick:O,className:"flex items-center text-xs font-medium text-gray-700 hover:text-gray-900",children:[g.jsx("div",{className:ue("flex items-center justify-center w-[16px] h-[16px] mr-[8px] border rounded transition-colors duration-150",(()=>{const M=w();return M.indeterminate||M.checked?"bg-blue-600 border-blue-600 text-white":"border-gray-300 bg-white"})()),children:(()=>{const M=w();return M.indeterminate?g.jsx("div",{className:"w-[8px] h-[4px] bg-white rounded"}):M.checked?g.jsx("svg",{className:"w-[12px] h-[12px]",fill:"currentColor",viewBox:"0 0 20 20",children:g.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"]}),g.jsx("button",{type:"button",onClick:P,className:"text-sm font-medium text-blue-600 hover:text-blue-800",children:"Clear"})]}),g.jsxs("div",{className:"max-h-60 overflow-y-auto",children:[x.length===0?g.jsx("div",{className:"px-[12px] py-[16px] text-sm text-gray-500 text-center",children:"No options found"}):x.map(M=>{let _;return M.value==="all"?null:(_=v.includes(M.value),g.jsxs("div",{className:"relative group",children:[g.jsxs("div",{onClick:()=>m(M.value),className:ue("flex items-center px-[12px] py-[8px] cursor-pointer hover:bg-gray-50","transition-colors duration-150",_&&"bg-gray-50"),children:[a?g.jsx("div",{className:ue("flex items-center justify-center w-[16px] h-[16px] mr-[12px] border rounded","transition-colors duration-150",_?"bg-blue-600 border-blue-600 text-white":"border-gray-300 bg-white"),children:_&&g.jsx("svg",{className:"w-[12px] h-[12px]",fill:"currentColor",viewBox:"0 0 20 20",children:g.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"})})}):g.jsx("div",{className:ue("w-[16px] h-[16px] mr-[12px] rounded-full border-2 transition-colors duration-150",_?"border-blue-600 bg-blue-600":"border-gray-300"),children:_&&g.jsx("div",{className:"w-full h-full rounded-full bg-white scale-50"})}),g.jsx("span",{className:ue("flex-1 text-xs whitespace-nowrap truncate",_?"font-medium text-gray-700":"text-gray-500"),children:b(M.label)})]}),M.label.length>u&&g.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:g.jsxs("div",{className:"bg-gray-900 text-white text-xs rounded-md px-[12px] py-[8px] shadow-lg max-w-xs break-words whitespace-normal",children:[M.label,g.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))}),T&&g.jsxs("div",{className:"px-[12px] py-[8px] text-xs text-gray-500 bg-gray-50 border-t border-gray-100",children:[g.jsxs("div",{className:"text-center font-medium",children:["+",S.length-l," more items"]}),i&&g.jsx("div",{className:"text-center mt-1 text-gray-400",children:"Use search above to find specific items"})]})]})]})]})},Ab=({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 g.jsxs("div",{className:ue("flex items-center gap-3",t),children:[r&&g.jsx(g.Fragment,{children:r.multiSelect?g.jsx(xW,{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}):g.jsx(js,{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&&g.jsx("div",{className:"flex items-center border border-gray-200 rounded-lg overflow-hidden",children:n.map((l,u)=>g.jsx("button",{onClick:()=>{var c;return(c=l.onClick)==null?void 0:c.call(l,l.value)},className:ue("px-[12px] py-[8px] text-xs font-medium transition-colors","hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-inset",l.active?"bg-white text-gray-900 shadow-[0 1px 3px 0 rgba(16, 24, 40, 0.08), 0 1px 2px 0 rgba(16, 24, 40, 0.08)]":"text-gray-500 bg-white",u>0&&"border-l border-gray-200"),children:l.icon&&g.jsx("span",{className:"mr-[8px]",children:l.icon})},l.value))}),a&&g.jsxs("div",{className:"flex items-center gap-[4px] border border-gray-200 bg-gray-50 overflow-hidden p-[2px] rounded-[6px]",children:[g.jsx("button",{onClick:()=>{var l;return(l=a.onToggle)==null?void 0:l.call(a,"chart")},className:ue("px-[12px] py-[8px] rounded-[4px] text-xs font-medium transition-colors flex items-center gap-2","hover:bg-white ",a.chartView?"bg-white text-gray-900 shadow-md":"text-gray-500 bg-white"),children:g.jsx(Jb,{className:"w-[16px] h-[16px]"})}),g.jsx("button",{onClick:()=>{var l;return(l=a.onToggle)==null?void 0:l.call(a,"table")},className:ue("px-[12px] rounded-[4px] py-[8px] text-xs font-medium transition-colors flex items-center gap-2","hover:bg-white ",a.tableView?"bg-white text-gray-900 shadow-md":"text-gray-500 bg-white"),children:g.jsx(a0,{className:"w-[16px] h-[16px]"})})]})]})},Tb=({section:e,className:t,isLoading:r,isChartLoading:n,onMetricClick:a})=>{var G;const{id:i,title:o,description:s,metrics:l,view:u,controls:c,layout:f}=e,[d,p]=A.useState(u.type),[v,y]=A.useState("chart"),h=()=>i==="usage-analytics"?"users":i==="runs"?"agentRuns":"users",[b,S]=A.useState(h()),[x,T]=A.useState("all"),m=E=>{var F,W,K,X,Q;const L=P();(F=L==null?void 0:L.controls)!=null&&F.toggle?(y(E),(K=(W=L.controls.toggle).onToggle)==null||K.call(W,E)):(p(E),(Q=(X=c==null?void 0:c.toggle)==null?void 0:X.onToggle)==null||Q.call(X,E))},w=E=>{var W,K;const L=E.metricType||E.title.toLowerCase();S(L);const F=l.find(X=>(X.metricType||X.title.toLowerCase())===L);(K=(W=F==null?void 0:F.controls)==null?void 0:W.dropdown)!=null&&K.multiSelect?T(["all"]):T("all"),a==null||a(E)},O=E=>{var F,W,K;T(E);const L=l.find(X=>(X.metricType||X.title.toLowerCase())===b);(K=(W=(F=L==null?void 0:L.controls)==null?void 0:F.dropdown)==null?void 0:W.onChange)==null||K.call(W,E)},P=()=>l.find(E=>(E.metricType||E.title.toLowerCase())===b)||null,j=E=>Array.isArray(E)?E.filter(F=>F!=="all").length>0:E!=="all",M=E=>Array.isArray(E)?E.filter(L=>L!=="all"):E!=="all"?[E]:[],_=E=>{var K,X,Q,ae,te,V,Y,J,I;const L=((X=(K=E.view)==null?void 0:K.chart)==null?void 0:X.data)||((Q=u.chart)==null?void 0:Q.data)||[];if(!j(x))return L;const F=E.metricType,W=M(x);if(W.length===1){const ie=W[0],q=P(),se=(V=(te=(ae=q==null?void 0:q.controls)==null?void 0:ae.dropdown)==null?void 0:te.options)==null?void 0:V.find(ve=>ve.value===ie),ee=se==null?void 0:se.label;return console.log("🔍 Filtering chart data:",{metricType:F,singleFilter:ie,selectedLabel:ee,baseDataSample:L[0]}),L.map(ve=>{let We=0;return ve.listView&&Array.isArray(ve.listView)&&(We=ve.listView.filter(Ge=>F==="agentRuns"&&Ge.agentName?Ge.agentName===ee||Ge.agentName.toLowerCase()===(ee==null?void 0:ee.toLowerCase()):F==="toolRuns"&&Ge.toolName?Ge.toolName===ee||Ge.toolName.toLowerCase()===(ee==null?void 0:ee.toLowerCase()):F==="modelRuns"&&Ge.modelName?Ge.modelName===ee||Ge.modelName.toLowerCase()===(ee==null?void 0:ee.toLowerCase()):!1).reduce((Ge,lt)=>Ge+(lt.count||0),0)),console.log("📊 Filtered value for",ee,":",We),{...ve,[F]:We}})}if(W.length>1){const ie=P(),se=(((I=(J=(Y=ie==null?void 0:ie.controls)==null?void 0:Y.dropdown)==null?void 0:J.options)==null?void 0:I.filter(ee=>W.includes(ee.value)))||[]).map(ee=>ee.label);return L.map(ee=>{let ve=0;return ee.listView&&Array.isArray(ee.listView)&&(ve=ee.listView.filter(Re=>F==="agentRuns"&&Re.agentName?se.some(Be=>Re.agentName===Be||Re.agentName.toLowerCase()===(Be==null?void 0:Be.toLowerCase())):F==="toolRuns"&&Re.toolName?se.some(Be=>Re.toolName===Be||Re.toolName.toLowerCase()===(Be==null?void 0:Be.toLowerCase())):F==="modelRuns"&&Re.modelName?se.some(Be=>Re.modelName===Be||Re.modelName.toLowerCase()===(Be==null?void 0:Be.toLowerCase())):!1).reduce((Re,Be)=>Re+(Be.count||0),0)),{...ee,[F]:ve}})}return L},$=E=>{var K;if(!((K=E.view)!=null&&K.chart))return null;const L=_(E),F=()=>{var Q,ae,te,V,Y,J;if(!j(x)||!((Q=E.controls)!=null&&Q.dropdown))return((te=(ae=E.view)==null?void 0:ae.chart)==null?void 0:te.title)||E.title;const X=M(x);if(X.length===1){const I=(V=E.controls.dropdown.options)==null?void 0:V.find(ie=>ie.value===X[0]);return I?`${I.label}`:((J=(Y=E.view)==null?void 0:Y.chart)==null?void 0:J.title)||E.title}return`${X.length} selected`},W=M(x);return E.metricType==="toolRuns"&&W.length===1?{...E.view.chart,data:L,title:F(),lines:void 0,dataKey:"toolRuns",color:"#f97316",showLegend:!1}:E.metricType==="modelRuns"&&W.length===1?{...E.view.chart,data:L,title:F(),dataKey:"modelRuns",color:"#10b981",showLegend:!1}:{...E.view.chart,data:L,title:F()}},R=(E,L)=>{if(!j(x))return E;const F=M(x);if(F.length===1){const W=F[0];if(i==="runs"&&L==="agentRuns")return E.map(K=>({...K,agentRuns:K[W]||0}));if(i==="runs"&&L==="toolRuns")return E.map(K=>({...K,toolRuns:K[W.replace(/[-]/g,"")]||0}));if(i==="runs"&&L==="modelRuns")return E.map(K=>({...K,modelRuns:K[W.replace(/[-\.]/g,"")]||0}))}return E},k=E=>{var K;const L=((K=u.chart)==null?void 0:K.data)||[],F=R(L,E),W=X=>{var ae,te;if(!j(x))return X;const Q=M(x);if(Q.length===1){const V=(te=(ae=c==null?void 0:c.dropdown)==null?void 0:ae.options)==null?void 0:te.find(Y=>Y.value===Q[0]);return V?`${V.label}`:X}return`${Q.length} selected`};switch(E){case"users":return{type:"line",title:"Total Users",data:L,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:L,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:L,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:L,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:F,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 M(x).length===1?{type:"line",title:W("Tool Runs"),data:R(L,"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:F,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 M(x).length===1?{type:"line",title:W("Model Runs"),data:R(L,"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:F,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}},D=(()=>{const E=P();return E!=null&&E.controls?{...E.controls,dropdown:E.controls.dropdown?{...E.controls.dropdown,onChange:O}:void 0,toggle:E.controls.toggle?{...E.controls.toggle,chartView:v==="chart",tableView:v==="table",onToggle:m}:void 0}:c?{...c,dropdown:c.dropdown?{...c.dropdown,onChange:O}:void 0,toggle:c.toggle?{...c.toggle,chartView:d==="chart",tableView:d==="table",onToggle:m}:void 0}:void 0})(),B=(()=>{var F,W,K,X,Q,ae,te,V,Y,J;const E=P();if(E!=null&&E.view){if((F=E.controls)!=null&&F.toggle){if(v==="table"&&E.view.table){let ie=E.view.table.data;if(E.metricType==="agentRuns"&&j(x)){const q=M(x);if(q.length>0){const se=((X=(K=(W=E.controls)==null?void 0:W.dropdown)==null?void 0:K.options)==null?void 0:X.filter(ee=>q.includes(ee.value)))||[];se.length>0&&(ie=ie.filter(ee=>se.some(ve=>ee.name===ve.label||ee.name&&ee.name.toLowerCase().includes(ve.label.toLowerCase()))))}}if(E.metricType==="toolRuns"&&j(x)){const q=M(x);if(q.length>0){const se=((te=(ae=(Q=E.controls)==null?void 0:Q.dropdown)==null?void 0:ae.options)==null?void 0:te.filter(ee=>q.includes(ee.value)))||[];se.length>0&&(ie=ie.filter(ee=>se.some(ve=>ee.name===ve.label||ee.name&&ee.name.toLowerCase().includes(ve.label.toLowerCase()))))}}if(E.metricType==="modelRuns"&&j(x)){const q=M(x);if(q.length>0){const se=((J=(Y=(V=E.controls)==null?void 0:V.dropdown)==null?void 0:Y.options)==null?void 0:J.filter(ee=>q.includes(ee.value)))||[];se.length>0&&(ie=ie.filter(ee=>se.some(ve=>ee.name===ve.label||ee.name&&ee.name.toLowerCase().includes(ve.label.toLowerCase()))))}}return{type:"table",table:{...E.view.table,data:ie}}}else if(v==="chart"&&E.view.chart)return{type:"chart",chart:$(E)||E.view.chart}}const I=$(E);return I?{...E.view,chart:I}:E.view}const L=k(b);return L?{type:"chart",chart:L}:{...u,type:d}})(),U=()=>l.map(E=>{const L=E.metricType||E.title.toLowerCase();return{...E,highlighted:E.highlighted||L===b}});return g.jsxs("div",{className:ue("bg-white flex flex-col gap-[16px] rounded-lg border border-gray-200 py-[16px] px-[24px]",t),style:{gridColumn:f!=null&&f.span?`span ${f.span}`:void 0,order:f==null?void 0:f.order},children:[o&&g.jsxs("div",{className:"w-full",children:[g.jsx("h1",{className:"text-md font-medium text-gray-700",children:o}),s&&g.jsx("p",{className:"text-xs text-gray-500",children:s})]}),g.jsx("div",{className:"flex flex-col sm:flex-row gap-[16px]",children:r?g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"flex-1",children:g.jsx(gi,{})}),g.jsx("div",{className:"flex-1",children:g.jsx(gi,{})}),g.jsx("div",{className:"flex-1",children:g.jsx(gi,{})}),g.jsx("div",{className:"flex-1",children:g.jsx(gi,{})})]}):U().map((E,L)=>g.jsx("div",{className:"flex-1",children:g.jsx(_f,{data:E,onClick:w,isFirst:L===0})},`${i}-metric-${L}`))}),g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("div",{children:P()&&g.jsx("h3",{className:"text-md font-medium text-gray-700",children:(G=P())==null?void 0:G.title})}),D&&g.jsx(Ab,{config:D})]}),g.jsx(Sb,{config:B,isLoading:r||n,context:{sectionId:i,metricType:b}})]})},sf=A.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-blue-600 hover:bg-blue-700 focus:bg-blue-700 focus:shadow-sm text-white py-2 px-3",outline:"border-gray-300 border bg-white text-gray-700 hover:text-gray-800 hover:bg-gray-50 focus:bg-gray-50 focus:shadow-sm",ghost:"border border-error-600 bg-error-500 text-white hover:border-error-600 hover:bg-error-600"},l={sm:"h-[32px] rounded-md gap-1.5 px-[14px] py-[10px]",md:"h-[40px] rounded-md px-[14px] py-[10px]",lg:"h-[48px] rounded-md px-[16px] py-[12px]"};return g.jsx("button",{className:ue(o,s[t],l[r],e),ref:i,...a,children:n})});sf.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 Me(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function ze(e){Me(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 wW(e,t){Me(2,arguments);var r=ze(e),n=jt(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function lf(e,t){Me(2,arguments);var r=ze(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 OW(e,t){Me(2,arguments);var r=ze(e).getTime(),n=jt(t);return new Date(r+n)}var SW={};function bi(){return SW}function AW(e,t){var r,n,a,i,o,s;Me(1,arguments);var l=bi(),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=ze(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 TW(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 ra(e){Me(1,arguments);var t=ze(e);return t.setHours(0,0,0,0),t}function xi(e,t){Me(2,arguments);var r=ra(e),n=ra(t);return r.getTime()===n.getTime()}function PW(e){return Me(1,arguments),e instanceof Date||$s(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function _W(e){if(Me(1,arguments),!PW(e)&&typeof e!="number")return!1;var t=ze(e);return!isNaN(Number(t))}function EW(e){Me(1,arguments);var t=ze(e);return t.setHours(23,59,59,999),t}function jW(e){Me(1,arguments);var t=ze(e);return t.setDate(1),t.setHours(0,0,0,0),t}function $W(e,t){Me(2,arguments);var r=jt(t);return OW(e,-r)}var CW=864e5;function kW(e){Me(1,arguments);var t=ze(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/CW)+1}function Cs(e){Me(1,arguments);var t=1,r=ze(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 Pb(e){Me(1,arguments);var t=ze(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 MW(e){Me(1,arguments);var t=Pb(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=Cs(r);return n}var NW=6048e5;function DW(e){Me(1,arguments);var t=ze(e),r=Cs(t).getTime()-MW(t).getTime();return Math.round(r/NW)+1}function ks(e,t){var r,n,a,i,o,s,l,u;Me(1,arguments);var c=bi(),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=ze(e),p=d.getUTCDay(),v=(p<f?7:0)+p-f;return d.setUTCDate(d.getUTCDate()-v),d.setUTCHours(0,0,0,0),d}function _b(e,t){var r,n,a,i,o,s,l,u;Me(1,arguments);var c=ze(e),f=c.getUTCFullYear(),d=bi(),p=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(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(f+1,0,p),v.setUTCHours(0,0,0,0);var y=ks(v,t),h=new Date(0);h.setUTCFullYear(f,0,p),h.setUTCHours(0,0,0,0);var b=ks(h,t);return c.getTime()>=y.getTime()?f+1:c.getTime()>=b.getTime()?f:f-1}function IW(e,t){var r,n,a,i,o,s,l,u;Me(1,arguments);var c=bi(),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=_b(e,t),p=new Date(0);p.setUTCFullYear(d,0,f),p.setUTCHours(0,0,0,0);var v=ks(p,t);return v}var LW=6048e5;function RW(e,t){Me(1,arguments);var r=ze(e),n=ks(r,t).getTime()-IW(r,t).getTime();return Math.round(n/LW)+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 Pr={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)}},na={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},BW={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 Pr.y(t,r)},Y:function(t,r,n,a){var i=_b(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=Pb(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 Pr.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=RW(t,a);return r==="wo"?n.ordinalNumber(i,{unit:"week"}):_e(i,r.length)},I:function(t,r,n){var a=DW(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"}):Pr.d(t,r)},D:function(t,r,n){var a=kW(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=na.noon:a===0?i=na.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=na.evening:a>=12?i=na.afternoon:a>=4?i=na.morning:i=na.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 Pr.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Pr.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"}):Pr.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Pr.s(t,r)},S:function(t,r){return Pr.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 jb(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 jb(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"+Eb(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"+Eb(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 Eb(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 jb(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 $b=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"})}},Cb=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"})}},FW=function(t,r){var n=t.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return $b(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}}",$b(a,r)).replace("{{time}}",Cb(i,r))},WW={p:Cb,P:FW},UW=["D","DD"],zW=["YY","YYYY"];function GW(e){return UW.indexOf(e)!==-1}function KW(e){return zW.indexOf(e)!==-1}function kb(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 VW={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"}},qW=function(t,r,n){var a,i=VW[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 uf(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 HW={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},YW={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},XW={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ZW={date:uf({formats:HW,defaultWidth:"full"}),time:uf({formats:YW,defaultWidth:"full"}),dateTime:uf({formats:XW,defaultWidth:"full"})},JW={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},QW=function(t,r,n,a){return JW[t]};function wi(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 eU={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},tU={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},rU={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"]},nU={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"]},aU={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"}},iU={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"}},oU=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"},sU={ordinalNumber:oU,era:wi({values:eU,defaultWidth:"wide"}),quarter:wi({values:tU,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:wi({values:rU,defaultWidth:"wide"}),day:wi({values:nU,defaultWidth:"wide"}),dayPeriod:wi({values:aU,defaultWidth:"wide",formattingValues:iU,defaultFormattingWidth:"wide"})};function Oi(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)?uU(s,function(f){return f.test(o)}):lU(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 lU(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function uU(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function cU(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 fU=/^(\d+)(th|st|nd|rd)?/i,dU=/\d+/i,pU={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},hU={any:[/^b/i,/^(a|c)/i]},vU={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},yU={any:[/1/i,/2/i,/3/i,/4/i]},mU={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},gU={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]},bU={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},xU={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]},wU={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},OU={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}},SU={ordinalNumber:cU({matchPattern:fU,parsePattern:dU,valueCallback:function(t){return parseInt(t,10)}}),era:Oi({matchPatterns:pU,defaultMatchWidth:"wide",parsePatterns:hU,defaultParseWidth:"any"}),quarter:Oi({matchPatterns:vU,defaultMatchWidth:"wide",parsePatterns:yU,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Oi({matchPatterns:mU,defaultMatchWidth:"wide",parsePatterns:gU,defaultParseWidth:"any"}),day:Oi({matchPatterns:bU,defaultMatchWidth:"wide",parsePatterns:xU,defaultParseWidth:"any"}),dayPeriod:Oi({matchPatterns:wU,defaultMatchWidth:"any",parsePatterns:OU,defaultParseWidth:"any"})},AU={code:"en-US",formatDistance:qW,formatLong:ZW,formatRelative:QW,localize:sU,match:SU,options:{weekStartsOn:0,firstWeekContainsDate:1}},TU=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,PU=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_U=/^'([^]*?)'?$/,EU=/''/g,jU=/[a-zA-Z]/;function Ms(e,t,r){var n,a,i,o,s,l,u,c,f,d,p,v,y,h;Me(2,arguments);var b=String(t),S=bi(),x=(n=(a=void 0)!==null&&a!==void 0?a:S.locale)!==null&&n!==void 0?n:AU,T=jt((i=(o=(s=(l=void 0)!==null&&l!==void 0?l:void 0)!==null&&s!==void 0?s:S.firstWeekContainsDate)!==null&&o!==void 0?o:(u=S.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 m=jt((f=(d=(p=(v=void 0)!==null&&v!==void 0?v:void 0)!==null&&p!==void 0?p:S.weekStartsOn)!==null&&d!==void 0?d:(y=S.locale)===null||y===void 0||(h=y.options)===null||h===void 0?void 0:h.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=ze(e);if(!_W(w))throw new RangeError("Invalid time value");var O=TW(w),P=$W(w,O),j={firstWeekContainsDate:T,weekStartsOn:m,locale:x,_originalDate:w},M=b.match(PU).map(function(_){var $=_[0];if($==="p"||$==="P"){var R=WW[$];return R(_,x.formatLong)}return _}).join("").match(TU).map(function(_){if(_==="''")return"'";var $=_[0];if($==="'")return $U(_);var R=BW[$];if(R)return KW(_)&&kb(_,t,String(e)),GW(_)&&kb(_,t,String(e)),R(P,_,x.localize,j);if($.match(jU))throw new RangeError("Format string contains an unescaped latin alphabet character `"+$+"`");return _}).join("");return M}function $U(e){var t=e.match(_U);return t?t[1].replace(EU,"'"):e}function Mb(e,t){Me(2,arguments);var r=ze(e),n=ze(t);return r.getTime()<n.getTime()}function CU(e,t){Me(2,arguments);var r=ze(e).getTime(),n=ze(t.start).getTime(),a=ze(t.end).getTime();if(!(n<=a))throw new RangeError("Invalid interval");return r>=n&&r<=a}function Ns(e,t){Me(2,arguments);var r=jt(t);return wW(e,-r)}function kU(e,t){Me(2,arguments);var r=jt(t);return lf(e,-r)}const Nb=({children:e})=>{const[t,r]=A.useState(!1);return A.useEffect(()=>(r(!0),()=>r(!1)),[]),t?Jr.createPortal(e,document.body):null};function Db({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:ra(new Date),to:new Date}},{label:"Yesterday",value:"yesterday",dateRange:{from:ra(Ns(new Date,1)),to:EW(Ns(new Date,1))}},{label:"This week",value:"thisWeek",dateRange:{from:AW(new Date),to:new Date}},{label:"Last 7 days",value:"7d",dateRange:{from:ra(Ns(new Date,6)),to:new Date}},{label:"This month",value:"thisMonth",dateRange:{from:jW(new Date),to:new Date}},{label:"Last 30 days",value:"30d",dateRange:{from:ra(Ns(new Date,29)),to:new Date}}],a=t?n.find(C=>C.value===t):null;console.log("📅 DateRangePicker initialization:",{defaultValue:t,defaultPreset:a==null?void 0:a.label,hasDateRange:!!(a!=null&&a.dateRange),allPresetValues:n.map(C=>C.value),foundPreset:!!a});const[i,o]=A.useState(a==null?void 0:a.dateRange),[s,l]=A.useState(a==null?void 0:a.dateRange),[u,c]=A.useState(!1),[f,d]=A.useState((a==null?void 0:a.label)||null),[p,v]=A.useState((a==null?void 0:a.label)||null),[y,h]=A.useState(new Date),[b,S]=A.useState(null),[x,T]=A.useState({top:0,left:0}),m=A.useRef(null),w=A.useRef(null);A.useEffect(()=>{var C,B;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:(C=a.dateRange.from)==null?void 0:C.toLocaleDateString(),to:(B=a.dateRange.to)==null?void 0:B.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}`)})},[]),A.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),v(a.label))},[t]);const O=()=>{if(!w.current)return;const C=w.current.getBoundingClientRect(),B=window.scrollY,U=window.scrollX,G=window.innerWidth,E=window.innerHeight,L=720,F=450;let W=C.bottom+B+8,K=C.left+U;K+L>G&&(K=C.right+U-L),K+L>G&&(K=G-L-20),W+F>E&&(W=C.top+B-F-8),K<20&&(K=20),W<20&&(W=20),T({top:W,left:K})};A.useEffect(()=>{const C=()=>{u&&O()};return u&&(window.addEventListener("resize",C),window.addEventListener("scroll",C)),()=>{window.removeEventListener("resize",C),window.removeEventListener("scroll",C)}},[u]);const P=(C,B)=>{if(l(C),v(B),S(null),C.from){const U=new Date(C.from.getFullYear(),C.from.getMonth(),1);h(U)}},j=C=>{if(!b)S(C),l({from:C,to:C}),v(null);else{const B=Mb(C,b)?C:b,U=Mb(C,b)?b:C;l({from:B,to:U}),S(null),v(null)}},M=()=>{o(s),d(p),r==null||r(s),c(!1),S(null)},_=()=>{l(void 0),v(null),o(void 0),d(null),r==null||r(void 0),c(!1),S(null)},$=C=>{C?(l(i),v(f),S(null),setTimeout(O,0)):(l(i),v(f),S(null)),c(C)},R=(C,B)=>(console.log("📅 formatDateRange called with:",{presetLabel:B,hasDateRange:!!(C!=null&&C.from)}),B||(C!=null&&C.from?!C.to||xi(C.from,C.to)?Ms(C.from,"MMM dd, yyyy"):`${Ms(C.from,"MMM dd, yyyy")} - ${Ms(C.to,"MMM dd, yyyy")}`:"Pick a date range")),k=(C=0)=>{const B=lf(y,C),U=B.getFullYear(),G=B.getMonth(),E=new Date(U,G,1),F=new Date(U,G+1,0).getDate(),W=E.getDay(),K=["January","February","March","April","May","June","July","August","September","October","November","December"],X=["Su","Mo","Tu","We","Th","Fr","Sa"],Q=[],te=new Date(U,G-1,0).getDate();for(let J=W-1;J>=0;J--){const I=te-J,ie=new Date(U,G-1,I);Q.push(g.jsx("button",{onClick:()=>j(ie),className:"h-[32px] w-[32px] text-xs text-gray-400 hover:bg-gray-100 rounded-full flex items-center justify-center",children:I},`prev-${I}`))}for(let J=1;J<=F;J++){const I=new Date(U,G,J),ie=xi(I,new Date),q=(s==null?void 0:s.from)&&(s==null?void 0:s.to)&&CU(I,{start:s.from,end:s.to}),se=(s==null?void 0:s.from)&&xi(I,s.from),ee=(s==null?void 0:s.to)&&xi(I,s.to),ve=b&&xi(I,b);let We="h-[32px] w-[32px] text-xs hover:bg-gray-100 hover:text-gray-900 hover:font-medium rounded-full flex items-center justify-center transition-colors text-gray-700 ";ie&&(We+="font-semibold "),ve||se||ee?We+="!bg-blue-500 !text-white !hover:bg-blue-500 !hover:text-white font-semibold":q&&(We+="bg-blue-100 text-blue-900 hover:bg-blue-100 hover:text-blue-900 font-semibold"),Q.push(g.jsx("button",{onClick:()=>j(I),className:We,children:J},`current-${J}`))}const Y=Math.ceil((W+F)/7)*7-W-F;for(let J=1;J<=Y;J++){const I=new Date(U,G+1,J);Q.push(g.jsx("button",{onClick:()=>j(I),className:"h-[32px] w-[32px] text-sm text-gray-500 hover:bg-gray-100 rounded-full flex items-center justify-center",children:J},`next-${J}`))}return g.jsxs("div",{className:"p-[12px]",children:[g.jsxs("div",{className:"flex items-center justify-between mb-3",children:[C===0&&g.jsx("button",{onClick:()=>h(kU(y,1)),className:"p-[4px] hover:bg-gray-100 rounded",children:g.jsx(Qb,{className:"h-[16px] w-[16px]"})}),g.jsxs("div",{className:"font-semibold text-sm text-gray-700",children:[K[G]," ",U]}),C===1&&g.jsx("button",{onClick:()=>h(lf(y,1)),className:"p-[4px] hover:bg-gray-100 rounded",children:g.jsx(e0,{className:"h-[16px] w-[16px]"})})]}),g.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:X.map(J=>g.jsx("div",{className:"h-[32px] flex items-center justify-center text-xs font-medium text-gray-700 w-full text-center",children:J},J))}),g.jsx("div",{className:"grid grid-cols-7 gap-1",children:Q})]})},D=()=>"fixed bg-white border border-gray-200 rounded-lg shadow-xl z-[99999]";return g.jsxs("div",{className:`relative ${e}`,children:[g.jsxs("button",{ref:w,onClick:()=>$(!u),className:`min-w-[200px] px-[12px] py-[8px] 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:[g.jsx(yf,{className:"mr-2 h-[16px] w-[16px]"}),(()=>{const C=R(i,f);return console.log("📅 Button display text:",{displayText:C,date:i,selectedPresetLabel:f}),C})()]}),u&&g.jsxs(Nb,{children:[g.jsx("div",{className:"fixed inset-0 z-[99998] bg-black bg-opacity-10",onClick:()=>$(!1)}),g.jsxs("div",{ref:m,className:D(),style:{top:x.top,left:x.left,width:"720px",minWidth:"720px",maxHeight:"90vh"},onClick:C=>C.stopPropagation(),children:[g.jsxs("div",{className:"flex",children:[g.jsxs("div",{className:"flex flex-col gap-1 p-[12px] border-r border-gray-200 w-[160px] flex-shrink-0",children:[g.jsx("div",{className:"text-sm font-medium text-gray-500 mb-2",children:"Quick Filters"}),n.map(C=>g.jsx("button",{onClick:()=>P(C.dateRange,C.label),className:`text-left px-[12px] py-[8px] text-sm text-gray-900 rounded hover:bg-gray-100 transition-colors ${p===C.label?"bg-gray-100 medium":""}`,children:C.label},C.label))]}),g.jsxs("div",{className:"flex flex-1",children:[k(0),k(1)]})]}),g.jsxs("div",{className:"border-t border-gray-200 bg-gray-50 p-[12px] flex justify-end gap-2",children:[g.jsx("button",{onClick:_,className:"px-[12px] py-[8px] text-sm border border-gray-300 rounded hover:bg-gray-50 transition-colors",children:"Clear"}),g.jsx("button",{onClick:M,disabled:!(s!=null&&s.from),className:"px-[12px] py-[8px] text-sm bg-blue-600 text-white rounded hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:"Apply"})]})]})]})]})}const MU=({config:e,appConfig:t,className:r,onExport:n,onDraftChange:a,onTimeRangeChange:i})=>{var R;const{title:o,subtitle:s,sections:l,globalControls:u,layout:c={columns:12,gap:24,responsive:!0}}=e,[f,d]=A.useState(!1),[p,v]=A.useState({}),[y,h]=A.useState(l),[b,S]=A.useState([]),[x,T]=A.useState(!1),m=A.useRef(null);A.useEffect(()=>{if(t)try{m.current=new Ht(t),w(),O()}catch(k){console.error("Failed to initialize API service:",k)}},[t]);const w=async()=>{if(!(!m.current||!t)){T(!0);try{const k=await m.current.fetchEnvironments();S(k),console.log("🌍 Environments loaded:",k.map(D=>D.envName))}catch(k){console.error("Error loading environments:",k)}finally{T(!1)}}},O=async()=>{if(!(!m.current||!t)){d(!0);try{const k=m.current.getDefaultTimeRange();console.log("📊 Loading dashboard data with date range:",{fromTimestamp:k.fromTimestamp,toTimestamp:k.toTimestamp,fromDate:new Date(k.fromTimestamp).toLocaleDateString(),toDate:new Date(k.toTimestamp).toLocaleDateString()});const D=await m.current.fetchAllCardsDataWithEnhancedViews(k.fromTimestamp,k.toTimestamp);console.log("✅ Enhanced cards data loaded successfully:",D),console.log("📈 Data covers period:",{from:new Date(k.fromTimestamp).toLocaleDateString(),to:new Date(k.toTimestamp).toLocaleDateString()});const C=l.map(B=>B.id==="usage-analytics"?(console.log("Updating usage-analytics section with enhanced data"),{...B,metrics:D.usageAnalytics}):B.id==="runs"?(console.log("Updating runs section with enhanced data including table and controls"),{...B,metrics:D.runs}):B);h(C)}catch(k){console.error("Error loading initial data:",k),h(l)}finally{d(!1)}}},P=async(k,D)=>{if(!(!m.current||!t||!D.metricType)){h(C=>C.map(B=>B.id===k?{...B,metrics:B.metrics.map(U=>({...U,highlighted:U.metricType===D.metricType}))}:B)),v(C=>({...C,[k]:!0}));try{const C=t.defaultTimeRange||Ht.getDateRange(7);let B,U;if(["users","sessions","messages","tokens"].includes(D.metricType))B="usage-analytics",U=D.metricType;else if(["agentRuns","toolRuns","modelRuns"].includes(D.metricType))B="runs",U=D.metricType==="agentRuns"?"agent-runs":D.metricType==="toolRuns"?"tool-runs":"model-runs";else return;const G=await m.current.fetchTimeSeriesData(U,B,C.fromTimestamp,C.toTimestamp),E=m.current.transformTimeSeriesDataForMetric(G,D.metricType);console.log("Time series response for",D.title,":",G),console.log("Transformed data for",D.title,":",E),console.log("Metric type used for transformation:",D.metricType);const F=(W=>({users:"users",sessions:"sessions",messages:"messages",tokens:"totalTokens",agentRuns:"agentRuns",toolRuns:"toolRuns",modelRuns:"modelRuns"})[W]||"count")(D.metricType||"count");console.log("Using dataKey for metric",D.metricType,":",F),h(W=>W.map(K=>{if(K.id===k){const X={...K,view:{...K.view,chart:K.view.chart?{...K.view.chart,data:E,dataKey:F,lines:[{dataKey:F,color:K.view.chart.color||"#3b82f6",label:D.title,strokeWidth:2}]}:{type:"line",data:E,dataKey:F,lines:[{dataKey:F,color:"#3b82f6",label:D.title,strokeWidth:2}],yAxisLabel:D.title}}};return console.log("Updated section for",k,":",X),console.log("Chart config set:",X.view.chart),X}return K}))}catch(C){console.error("Error loading metric data:",C)}finally{v(C=>({...C,[k]:!1}))}}},j=k=>{var D,C;if((C=(D=u==null?void 0:u.draft)==null?void 0:D.onChange)==null||C.call(D,k),a==null||a(k),t&&m.current){const B={...t,environment:k};m.current.updateConfig(B),O()}},M=k=>{var D,C;if(console.log("🗓️ Time range change requested:",k),typeof k=="string"&&((C=(D=u==null?void 0:u.timeRange)==null?void 0:D.onChange)==null||C.call(D,k)),i==null||i(k),t&&m.current){let B=null;if(typeof k=="object"&&k.from&&k.to)B={fromTimestamp:k.from.toISOString(),toTimestamp:k.to.toISOString()},console.log("📅 Converting DateRange to API format:",B);else if(typeof k=="string"){const G={"24h":1,"7d":7,"30d":30,"90d":90}[k];G&&(B=Ht.getDateRange(G),console.log(`📅 Converting preset "${k}" (${G} days) to API format:`,B))}if(B){const U={...t,defaultTimeRange:B};console.log("🔄 Updating API configuration with new date range:",U.defaultTimeRange),m.current.updateConfig(U),console.log("🚀 Reloading dashboard data with new date range..."),O()}else console.warn("⚠️ Unable to convert time range value to API format:",k)}},_=(k="csv")=>{var D,C;(C=(D=u==null?void 0:u.export)==null?void 0:D.onExport)==null||C.call(D,k),n==null||n()},$=Object.values(p).some(k=>k);return g.jsxs("div",{className:ue("w-full h-full flex flex-col overflow-hidden",r),children:[g.jsxs("div",{className:"flex flex-col gap-2 w-full p-[24px] pb-[12px]",children:[g.jsx("h1",{className:"text-lg font-bold text-gray-900 w-full",children:o}),g.jsxs("div",{className:"flex items-center gap-2 w-full",children:[s&&g.jsx("p",{className:"text-gray-500 text-xs w-full",children:s}),g.jsxs("div",{className:"flex items-center gap-2 justify-end flex-shrink-0",children:[(f||$)&&g.jsxs("div",{className:"flex items-center gap-2 text-sm medium text-gray-500",children:[g.jsx(n0,{className:"h-[16px] w-[16px] animate-spin"}),"Loading..."]}),u&&g.jsxs(g.Fragment,{children:[u.draft&&g.jsx(js,{options:b.length>0?b.map(k=>({label:k.envName.charAt(0).toUpperCase()+k.envName.slice(1),value:k.envName})):u.draft.options,value:u.draft.defaultValue,placeholder:x?"Loading environments...":u.draft.label,onChange:j,className:"min-w-[200px]",disabled:f||$||x}),u.timeRange&&(u.timeRange.useDatePicker?(console.log("🗓️ Dashboard: Rendering DateRangePicker with defaultValue:",u.timeRange.defaultValue),g.jsx(Db,{defaultValue:u.timeRange.defaultValue,onDateRangeChange:k=>{console.log("🗓️ Dashboard: DateRangePicker callback received:",k),k&&M(k)}})):g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(yf,{className:"h-4 w-4 text-gray-500"}),g.jsx(js,{options:u.timeRange.options||[],value:u.timeRange.defaultValue,placeholder:u.timeRange.label,onChange:M,className:"min-w-[200px]",disabled:f||$})]})),((R=u.export)==null?void 0:R.enabled)&&g.jsxs(sf,{variant:"outline",onClick:()=>_(),className:"gap-2",disabled:f||$,children:[g.jsx(t0,{className:"h-4 w-4"}),"Export"]})]})]})]})]}),g.jsx("div",{className:ue("grid gap-6 p-[24px] pt-[8px] overflow-y-auto",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:y.map(k=>{var D,C,B,U;return g.jsx(Tb,{section:k,isLoading:f,isChartLoading:p[k.id]||!1,onMetricClick:G=>P(k.id,G),className:ue(c.responsive&&((D=k.layout)==null?void 0:D.span)===12&&"lg:col-span-12",c.responsive&&((C=k.layout)==null?void 0:C.span)===6&&"lg:col-span-6",c.responsive&&((B=k.layout)==null?void 0:B.span)===4&&"lg:col-span-4",c.responsive&&((U=k.layout)==null?void 0:U.span)===3&&"lg:col-span-3")},k.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"],Ls=["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"],NU=(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),p=Math.floor(d*12+Math.random()*500),v=Math.floor(d*8+Math.random()*300),y=Math.floor(p*.3+Math.random()*100),h=Math.floor(p*.25+Math.random()*80),b=Math.floor(p*.2+Math.random()*60),S=Math.floor(p*.15+Math.random()*50),x={};Ds.forEach(w=>{const O=w.replace(/\s+/g,"").toLowerCase(),P=Math.floor(d/Ds.length);x[O]=Math.floor(P+Math.random()*(P*.5))});const T={};Is.forEach(w=>{const O=w.replace(/[-]/g,""),P=Math.floor(p/Is.length);T[O]=Math.floor(P+Math.random()*(P*.8))});const m={};Ls.forEach(w=>{const O=w.replace(/[-\.]/g,""),P=Math.floor(v/Ls.length);m[O]=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:p,modelRuns:v,codeTools:y,workflowTools:h,knowledgeTools:b,mcpTools:S,...x,...T,...m,value:o})}return t},DU=()=>{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 Ds.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},IU=()=>{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 Is.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]}))},LU=()=>Ls.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=NU(),RU=DU(),BU=IU(),FU=LU(),WU={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:RU,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:BU,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,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:FU,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"},...Ls.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}}]},Yt={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"]}},UU={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"}},zU={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"}},GU={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"}},Ib=(e,t)=>e.primary[t%e.primary.length],Si=(e,t)=>e.semantic[t],KU=(e,t)=>{var r;return((r=e.gradients)==null?void 0:r[t])||[e.primary[0],e.primary[1]]},Lb=(e,t=Yt)=>e.map((r,n)=>({...r,color:Ib(t,n)})),Rs=((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),p=Math.floor(d*12+Math.random()*500),v=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:p,modelRuns:v,value:o})}return t})(),VU={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:Rs,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:Rs,lines:Lb([{dataKey:"agentRuns",label:"Agent Runs"},{dataKey:"toolRuns",label:"Tool Runs"},{dataKey:"modelRuns",label:"Model Runs"},{dataKey:"totalTokens",label:"Total Tokens"}],Yt),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:Rs,lines:[{dataKey:"users",color:Si(Yt,"success"),label:"Successful Operations",strokeWidth:3},{dataKey:"sessions",color:Si(Yt,"warning"),label:"Warning Events",strokeWidth:2},{dataKey:"messages",color:Si(Yt,"error"),label:"Error Events",strokeWidth:2},{dataKey:"totalTokens",color:Si(Yt,"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:Rs,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}}]},qU={manualColors:{line1:"#8b5cf6",line2:"#06b6d4",line3:"#f97316",line4:"#10b981"},paletteColors:Yt.primary,semanticColors:Yt.semantic,gradientColors:Yt.gradients},HU={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()-7*24*60*60*1e3).toISOString(),toTimestamp:new Date().toISOString()},refreshInterval:3e4},YU={id:"agentic-analytics-dashboard",title:"Dashboard",subtitle:"Monitor and review the usage of your agentic app",sections:[{id:"usage-analytics",title:"Session Analytics",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:"Execution Analytics",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"}],defaultValue:"7d"},export:{enabled:!1,formats:["csv","json"],onExport:e=>{console.log(`Exporting in ${e} format`)}}},layout:{columns:12,gap:24,responsive:!0}},XU=`
274
+ </svg>`},MB=(e,t)=>{const r=e.toLowerCase();if(r.includes("code"))return Rt.inlineTool;if(r.includes("workflow")||r.includes("library"))return Rt.toolLibrary;if(r.includes("knowledge"))return Rt.KNOWLEDGE;if(r.includes("mcp"))return Rt.MCP;if(Rt[e])return Rt[e];const n=t.toLowerCase();return n.includes("code")||n.includes("inline")||n.includes("calculate")?Rt.inlineTool:n.includes("library")||n.includes("workflow")?Rt.toolLibrary:n.includes("knowledge")||n.includes("document")||n.includes("fetch")?Rt.KNOWLEDGE:n.includes("mcp")||n.includes("protocol")?Rt.MCP:Rt.toolLibrary},$s=({icon:e,iconSource:t="agent",size:r="small",className:n="",name:a="Unknown",toolType:i,provider:o,modelName:s})=>{const[l,u]=T.useState(!1),[c,f]=T.useState(!1),[d,p]=T.useState(!1),m=EB(e),y=kB[r];if(t==="model"){const w=Ab(o),x=()=>{p(!0)};if(d){const A=o?o.charAt(0).toUpperCase():"🤖";return h.jsx("div",{className:`${y} rounded-full bg-gray-500 flex items-center justify-center ${n}`,children:h.jsx("span",{className:"text-white text-xs font-bold",children:A})})}return h.jsx("img",{src:w,alt:s||a,className:`${y} rounded ${n}`,onError:x})}if(m!=null&&m.name&&m.name!=="fallback"&&!l){const w=$B(m,t),x=()=>{u(!0)};return h.jsx("img",{src:w,alt:a,className:`${y} rounded-full object-cover ${n}`,onError:x})}if(l&&!c&&t==="agent"){const w=`${window.location.origin}/agenticai/assets/agent-avatars/agent1.svg`,x=()=>{f(!0)};return h.jsx("img",{src:w,alt:a,className:`${y} rounded-full object-cover ${n}`,onError:x})}if(t==="model"){const w=Ab(o),x=()=>{p(!0)};if(d){const A=o?o.charAt(0).toUpperCase():"🤖";return h.jsx("div",{className:`${y} rounded-full bg-gray-500 flex items-center justify-center ${n}`,children:h.jsx("span",{className:"text-white text-xs font-bold",children:A})})}return h.jsx("img",{src:w,alt:s||a,className:`${y} rounded ${n}`,onError:x})}const v=m||CB(a,t);if(t==="workflowtool"){const w=i||v.type||"toolLibrary",x=MB(w,a);return h.jsx("div",{className:`${y} rounded-full flex items-center justify-center bg-gray-100 ${n}`,children:h.jsx("div",{dangerouslySetInnerHTML:{__html:x}})})}const b=`${window.location.origin}/agenticai/assets/agent-avatars/agent1.svg`;return h.jsx("img",{src:b,alt:a,className:`${y} rounded-full object-cover ${n}`})},Pb=({data:e,className:t})=>{const[r,n]=T.useState(5),a=()=>{n(o=>Math.min(o+10,e.length))},i=o=>o>=1e3?`${Math.floor(o/1e3)}k`:o.toString();return h.jsxs("div",{className:se("w-full",t),children:[h.jsxs("div",{className:"grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] bg-gray-50 border-b border-gray-200 text-xs font-medium text-gray-600",children:[h.jsx("div",{className:"text-left",children:"Name"}),h.jsx("div",{className:"text-center",children:"Runs"}),h.jsx("div",{className:"text-center",children:"Response Time"}),h.jsx("div",{className:"text-center",children:"Tokens"})]}),h.jsx("div",{className:"divide-y divide-gray-100",children:e.slice(0,r).map((o,s)=>h.jsxs("div",{className:"grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] cursor-pointer transition-colors duration-150 border-b border-gray-200",children:[h.jsxs("div",{className:"flex items-center gap-[8px]",children:[h.jsx("div",{className:"flex-shrink-0",children:h.jsx($s,{icon:o.icon,iconSource:"agent",size:"small",name:o.name||"Unknown Agent"})}),h.jsx("div",{className:"min-w-0 flex-1 w-full",children:h.jsx("div",{className:"text-xs font-medium text-gray-700 truncate",children:o.name||"Unknown Agent"})})]}),h.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:o.runs?i(o.runs):"-"}),h.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:o.responseTime||"-"}),h.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:o.tokens?i(o.tokens):"-"})]},o.id||s))}),r<e.length&&h.jsx("div",{className:"flex justify-center",children:h.jsx("button",{onClick:a,className:"px-[16px] py-[8px] text-xs font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 transition-colors duration-150",children:"Load 10 more"})})]})};function NB(e){const t=(e==null?void 0:e.toLowerCase())||"";return["inlinetool","inlineTool","code tool","code","tool","event","EVENT"].includes(e)||["inlinetool","inlineTool","code tool","code","tool","event"].includes(t)?"bg-orange-100 text-orange-800 border-orange-200":["toollibrary","toolLibrary","workflow tool"].includes(e)||["toollibrary","toollibrary","workflow tool"].includes(t)?"bg-blue-100 text-blue-800 border-blue-200":["mcp","MCP","mcpTool","mcpTool"].includes(e)||["mcp","mcptool"].includes(t)?"bg-green-100 text-green-800 border-green-200":["knowledge","KNOWLEDGE","knowledge tool"].includes(e)||["knowledge","knowledge tool"].includes(t)?"bg-purple-100 text-purple-800 border-purple-200":"bg-gray-100 text-gray-800 border-gray-200"}function DB(e){const t=(e==null?void 0:e.toLowerCase())||"";return["inlinetool","code tool","code","tool","event","inlineTool"].includes(t)?"Code Tool":["toollibrary","workflow tool"].includes(t)?"Workflow Tool":["mcp","mcptool"].includes(t)?"MCP Tool":["knowledge","knowledge tool","knowledge"].includes(t)||e==="KNOWLEDGE"?"Knowledge":e==="inlineTool"?"Code Tool":e==="toolLibrary"?"Workflow Tool":e==="KNOWLEDGE"?"Knowledge":e==="MCP"||e==="mcpTool"?"MCP Tool":"Code Tool"}const jb=({data:e,className:t})=>{const[r,n]=T.useState(5),a=()=>{n(o=>Math.min(o+10,e.length))},i=o=>o>=1e3?`${Math.floor(o/1e3)}k`:o.toString();return h.jsxs("div",{className:se("w-full",t),children:[h.jsxs("div",{className:"grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] bg-gray-50 border-b border-gray-200 text-xs font-medium text-gray-600",children:[h.jsx("div",{className:"text-left",children:"Name"}),h.jsx("div",{className:"text-center",children:"Type"}),h.jsx("div",{className:"text-center",children:"Runs"}),h.jsx("div",{className:"text-center",children:"Response Time"})]}),h.jsx("div",{className:"divide-y divide-gray-100",children:e.slice(0,r).map((o,s)=>h.jsxs("div",{className:"grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] cursor-pointer transition-colors duration-150 border-b border-gray-200",children:[h.jsxs("div",{className:"flex items-center gap-[8px]",children:[h.jsx("div",{className:"flex-shrink-0",children:h.jsx($s,{icon:o.icon,iconSource:"workflowtool",size:"small",name:o.name||"Unknown Tool",toolType:o.toolType||o.type})}),h.jsx("div",{className:"min-w-0 flex-1 w-full",children:h.jsx("div",{className:"text-xs font-medium text-gray-700 truncate",children:o.name||"Unknown Tool"})})]}),h.jsx("div",{className:"flex items-center justify-center",children:h.jsx("span",{className:se("inline-flex items-center px-[10px] py-[4px] rounded-full text-xs font-medium border",NB(o.toolType||o.type||"Default")),children:DB(o.toolType||o.type||"Default")})}),h.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:o.runs?i(o.runs):"-"}),h.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:o.responseTime||"-"})]},o.id||s))}),r<e.length&&h.jsx("div",{className:"flex justify-center",children:h.jsx("button",{onClick:a,className:"px-[16px] py-[8px] text-xs font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 transition-colors duration-150",children:"Load 10 more"})})]})},IB=e=>{if(!e)return"/assets/icons/models/custom-api.svg";const t=e.toLowerCase(),r={openai:"Open AI.svg","open ai":"Open AI.svg",chatopenai:"Open AI.svg",gpt:"Open AI.svg",anthropic:"Anthropic.svg",claude:"Anthropic.svg",google:"Google.svg",gemini:"Google.svg",chatgooglegenerativeai:"Google.svg",googlegenerativeai:"Google.svg",palm:"Google.svg",azurechatopenai:"Azure Open AI.svg","azure open ai":"Azure Open AI.svg",azureopenai:"Azure Open AI.svg","azure openai":"Azure Open AI.svg",azure:"Azure Open AI.svg",aws:"AWS Bedrock.svg",bedrock:"AWS Bedrock.svg","aws bedrock":"AWS Bedrock.svg",awsbedrock:"AWS Bedrock.svg",amazon:"AWS Bedrock.svg",cohere:"Cohere.svg",api:"API.svg",custom:"custom-api.svg","custom-api":"custom-api.svg",customapi:"custom-api.svg"};if(r[t])return`assets/icons/models/${r[t]}`;for(const[n,a]of Object.entries(r))if(t.includes(n)||n.includes(t))return`assets/icons/models/${a}`;return"assets/icons/models/custom-api.svg"},LB=e=>{if(!e)return"";const t=e.toLowerCase(),r={openai:"OpenAI","open ai":"OpenAI",chatopenai:"OpenAI",gpt:"OpenAI",anthropic:"Anthropic",claude:"Anthropic",google:"Google",gemini:"Google Gemini",chatgooglegenerativeai:"Google Gemini",googlegenerativeai:"Google Gemini",palm:"Google PaLM",azurechatopenai:"Azure OpenAI","azure open ai":"Azure OpenAI",azureopenai:"Azure OpenAI","azure openai":"Azure OpenAI",azure:"Azure OpenAI",aws:"AWS Bedrock",bedrock:"AWS Bedrock","aws bedrock":"AWS Bedrock",awsbedrock:"AWS Bedrock",amazon:"AWS Bedrock",cohere:"Cohere",meta:"Meta",llama:"Meta LLaMA",mistral:"Mistral",huggingface:"Hugging Face",together:"Together AI",replicate:"Replicate"};if(r[t])return r[t];for(const[n,a]of Object.entries(r))if(t.includes(n)||n.includes(t))return a;return e.charAt(0).toUpperCase()+e.slice(1)},RB=({provider:e})=>{const[t,r]=T.useState(!1),n=IB(e),a=()=>{r(!0)};if(t){const i=e?e.charAt(0).toUpperCase():"🤖";return h.jsx("div",{className:"w-6 h-6 rounded-full bg-gray-500 flex items-center justify-center",children:h.jsx("span",{className:"text-white text-xs font-bold",children:i})})}return h.jsx("img",{src:n,alt:e||"Model",className:"w-6 h-6 rounded",onError:a})},_b=({data:e,className:t})=>{const[r,n]=T.useState(5),a=()=>{n(o=>Math.min(o+10,e.length))},i=o=>o>=1e3?`${Math.floor(o/1e3)}k`:o.toString();return h.jsxs("div",{className:se("w-full",t),children:[h.jsxs("div",{className:"grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] bg-gray-50 border-b border-gray-200 text-xs font-medium text-gray-600",children:[h.jsx("div",{className:"text-left",children:"Model Name"}),h.jsx("div",{className:"text-center",children:"Runs"}),h.jsx("div",{className:"text-center",children:"Tokens"}),h.jsx("div",{className:"text-center",children:"Response Time"})]}),h.jsx("div",{className:"divide-y divide-gray-100",children:e.slice(0,r).map((o,s)=>h.jsxs("div",{className:"grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] cursor-pointer transition-colors duration-150 border-b border-gray-200",children:[h.jsxs("div",{className:"flex items-center gap-[8px]",children:[h.jsx("div",{className:"flex-shrink-0",children:h.jsx(RB,{provider:o.provider})}),h.jsxs("div",{className:"min-w-0 flex-1 w-full",children:[h.jsx("div",{className:"text-xs font-medium text-gray-700 truncate",children:o.name||o.modelName||"Unknown Model"}),o.provider&&h.jsx("div",{className:"text-xs text-gray-500 truncate",children:LB(o.provider)})]})]}),h.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:i(o.runs||0)}),h.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:i(o.tokens||o.totalTokens||0)}),h.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:o.responseTime||(o.avgResponseTime?`${o.avgResponseTime}ms`:"N/A")})]},o.id||s))}),r<e.length&&h.jsx("div",{className:"flex justify-center",children:h.jsx("button",{onClick:a,className:"px-[16px] py-[8px] text-xs font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 transition-colors duration-150",children:"Load 10 more"})})]})},BB=e=>{switch(e){case"agentRuns":return{title:"Agent Runs",entityName:"Agents"};case"toolRuns":return{title:"Tool Runs",entityName:"Tools"};case"modelRuns":return{title:"Model Runs",entityName:"Models"};default:return{title:"Runs",entityName:"Items"}}},FB=e=>e>=1e3?`${Math.floor(e/1e3)}k`:e.toString(),Eb=({isOpen:e,onClose:t,date:r,metricType:n,data:a,totalRuns:i,className:o})=>{var O;const s=BB(n),[l,u]=T.useState(10),[c,f]=T.useState("all"),[d,p]=T.useState(!1),m=[{label:`All ${s.entityName}`,value:"all"},...a.map(S=>({label:S.name,value:S.id}))],y=c==="all"?a:a.filter(S=>S.id===c),v=()=>{f("all"),p(!1),u(10),t()};T.useEffect(()=>{const S=C=>{C.key==="Escape"&&v()},j=C=>{d&&(C.target.closest(".filter-dropdown")||p(!1))};return e&&(document.addEventListener("keydown",S),document.addEventListener("mousedown",j),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",S),document.removeEventListener("mousedown",j),document.body.style.overflow="unset"}},[e,d,v]),T.useEffect(()=>{e&&(f("all"),p(!1),u(10))},[e]);const b=S=>new Date(S).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),w=()=>{u(S=>Math.min(S+10,y.length))},x=S=>{f(S),p(!1),u(10)};if(!e)return null;const A=y.slice(0,l),g=((O=m.find(S=>S.value===c))==null?void 0:O.label)||`All ${s.entityName}`;return h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-40 transition-opacity duration-300",onClick:v}),h.jsxs("div",{className:se("fixed right-0 top-0 h-full w-[600px] bg-white shadow-[0px_20px_24px_-4px_rgba(16,24,40,0.08),0px_8px_8px_-4px_rgba(16,24,40,0.03)] z-50 transform transition-transform duration-300 ease-in-out",e?"translate-x-0":"translate-x-full",o),children:[h.jsxs("div",{className:"flex items-center justify-between px-6 py-3 border-b border-[#d0d5dd]",children:[h.jsx("h2",{className:"text-lg font-semibold text-[#101828]",children:s.title}),h.jsx("button",{onClick:v,className:"p-2 hover:bg-gray-100 rounded-lg transition-colors",children:h.jsx(_0,{className:"h-5 w-5 text-[#101828]"})})]}),h.jsxs("div",{className:"flex flex-col h-[calc(100%-64px)] p-6 gap-6",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"text-sm font-medium text-[#344054]",children:[s.title," (",b(r),")"]}),h.jsxs("div",{className:"w-[210px] relative filter-dropdown",children:[h.jsxs("button",{onClick:()=>p(!d),className:"w-full bg-white border border-[#d0d5dd] rounded-lg px-3.5 py-2.5 flex items-center justify-between text-sm text-[#101828] hover:bg-gray-50 transition-colors",children:[h.jsx("span",{children:g}),h.jsx(Qr,{className:"h-4 w-4 text-[#101828]"})]}),d&&h.jsx("div",{className:"absolute top-full left-0 right-0 mt-1 bg-white border border-[#d0d5dd] rounded-lg shadow-lg z-10 max-h-60 overflow-y-auto",children:m.map(S=>h.jsx("button",{onClick:()=>x(S.value),className:se("w-full px-3.5 py-2.5 text-left text-sm hover:bg-gray-50 transition-colors",c===S.value?"bg-blue-50 text-blue-700":"text-[#101828]"),children:S.label},S.value))})]})]}),h.jsxs("div",{className:"flex-1 overflow-hidden",children:[h.jsx("div",{className:"bg-[#f9fafb] border-b border-[#eaecf0] px-2 py-2",children:h.jsxs("div",{className:"grid grid-cols-4 gap-3 items-center",children:[h.jsx("div",{className:"col-span-2 px-0 py-2",children:h.jsx("div",{className:"text-xs font-medium text-[#475467]",children:"Name"})}),h.jsx("div",{className:"flex justify-center px-0 py-2",children:h.jsx("div",{className:"text-xs font-medium text-[#475467]",children:"Runs"})}),h.jsx("div",{className:"flex justify-center px-0 py-2",children:h.jsx("div",{className:"text-xs font-medium text-[#475467]",children:"Response Time"})})]})}),h.jsx("div",{className:"overflow-y-auto max-h-[calc(100%-40px)]",children:A.length===0?h.jsxs("div",{className:"flex flex-col items-center justify-center h-64 text-center",children:[h.jsxs("h3",{className:"text-md font-medium text-gray-900 mb-[8px]",children:["No ",s.title.toLowerCase()," for this date"]}),h.jsxs("p",{className:"text-xs text-gray-500",children:["There were no ",s.title.toLowerCase()," recorded on ",b(r),"."]})]}):h.jsxs(h.Fragment,{children:[A.map((S,j)=>h.jsxs("div",{className:"grid grid-cols-4 gap-3 items-center px-2 py-3 border-b border-[#eaecf0] hover:bg-gray-50 transition-colors",children:[h.jsxs("div",{className:"col-span-2 flex items-center gap-2",children:[h.jsx("div",{className:"flex-shrink-0",children:h.jsx($s,{icon:S.icon,iconSource:n==="agentRuns"?"agent":n==="toolRuns"?"workflowtool":"model",size:"small",name:S.name,toolType:S.toolType||S.type,provider:S.provider,modelName:S.modelName})}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("div",{className:"text-sm font-medium text-[#101828] truncate",children:S.name}),n==="modelRuns"&&S.provider&&h.jsx("div",{className:"text-xs text-[#475467] truncate",children:S.provider})]})]}),h.jsx("div",{className:"flex justify-center",children:h.jsx("div",{className:"text-xs font-medium text-[#475467]",children:FB(S.runs)})}),h.jsx("div",{className:"flex justify-center",children:h.jsx("div",{className:"text-xs font-medium text-[#475467]",children:S.responseTime})})]},S.id||j)),l<y.length&&h.jsx("div",{className:"flex justify-center",children:h.jsx("button",{onClick:w,className:"bg-white border border-[#d0d5dd] rounded px-3 py-1 text-xs font-medium text-[#344054] hover:bg-gray-50 transition-colors",children:"Load 10 more"})})]})})]})]})]})]})};class Cb{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 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 Ht{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||Ht.getDateRange(7)}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||Ht.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||Ht.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||Ht.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",info:"Number of unique users who interacted with the app",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",info:"Number of conversations initiated with the app",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:"Total messages exchanged between users and the app",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:"Total input and output tokens processed by the app for all interactions",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",info:"Number of times the AI agents were executed to handle user requests",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:"Number of times various tools were triggered by the AI agents to complete tasks",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",info:"Number of times the AI agents called various language models to generate responses",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?r.avgResponseTime<1e3?`${Math.round(r.avgResponseTime)}ms`:`${(r.avgResponseTime/1e3).toFixed(2)}s`:"0ms",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){return Array.isArray(t)?t.map((r,n)=>({id:`tool-${n+1}`,name:r.toolName||r.tool_name||`Tool ${n+1}`,type:r.type||r.toolType||r.tool_type||"Code Tool",runs:r.count||0,responseTime:r.avgResponseTime?r.avgResponseTime<1e3?`${Math.round(r.avgResponseTime)}ms`:`${(r.avgResponseTime/1e3).toFixed(2)}s`:"0ms",tokens:r.tokens||Math.floor((r.count||0)*50),successRate:r.successRate?`${Math.round(r.successRate)}%`:"92%",lastRun:r.lastRun||new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),icon:r.icon||r.tool_icon||void 0})):(console.warn("Invalid listView data for tools:",t),[])}transformModelsListViewToTable(t){return Array.isArray(t)?t.map((r,n)=>({id:`model-${n+1}`,name:r.modelName||`Model ${n+1}`,modelName:r.modelName,provider:r.provider,runs:r.count||0,responseTime:r.avgResponseTime?r.avgResponseTime<1e3?`${Math.round(r.avgResponseTime)}ms`:`${(r.avgResponseTime/1e3).toFixed(2)}s`:"0ms",avgResponseTime:r.avgResponseTime,tokens:r.tokens||r.totalTokens||Math.floor((r.count||0)*300),totalTokens:r.totalTokens||r.tokens,successRate:r.successRate?`${Math.round(r.successRate)}%`:"98%",lastRun:r.lastRun||new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),icon:r.icon})):(console.warn("Invalid listView data for models:",t),[])}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=>{const a=n.toolName||n.tool_name;if(a){let i=function(o){if(!o)return"Code Tool";const s=o.toLowerCase();return["inlinetool","code tool","code","event"].includes(s)?"Code Tool":["toollibrary","workflow tool"].includes(s)?"Workflow Tool":["mcp","mcptool"].includes(s)?"MCP Tool":["knowledge","knowledge tool"].includes(s)||o==="KNOWLEDGE"?"Knowledge":o==="inlineTool"?"Code Tool":o==="toolLibrary"?"Workflow Tool":o==="MCP"||o==="mcpTool"?"MCP Tool":"Code Tool"};r.push({label:a,value:a.replace(/[-]/g,""),icon:n.icon||n.tool_icon||void 0,type:n.type||i(n.toolType||n.tool_type)})}}),r}extractModelControlOptions(t){if(!Array.isArray(t))return[{label:"All Models",value:"all"}];const r=[{label:"All Models",value:"all"}];return t.forEach(n=>{n.modelName&&r.push({label:n.modelName,value:n.modelName.replace(/[-\.]/g,""),icon:n.icon,type:n.provider})}),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=p=>p>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 times the AI agents were executed to handle user requests",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:p=>`${Math.floor(p/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"},{key:"tokens",title:"Tokens",width:100,align:"right",formatter:p=>`${Math.floor(p/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:"Number of times various tools were triggered by the AI agents to complete tasks",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:p=>`${Math.floor(p/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 times the AI agents called various language models to generate responses",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:p=>`${Math.floor(p/1e3)}k`},{key:"tokens",title:"Tokens",width:120,align:"right",formatter:p=>`${Math.floor(p/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:"Number of unique users who interacted with the app",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:"Number of conversations initiated with the app",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:"Total messages exchanged between users and the app",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:"Total input and output tokens processed by the app for all interactions",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(y=>{const v=y.count||0,b=(y.toolType||y.tool_type||"").toLowerCase(),w=(y.toolName||y.tool_name||"").toLowerCase();console.log("Processing listView item:",{toolType:b,toolName:w,count:v});const x=b.toLowerCase();["inlinetool","inlineTool","tool","code","codetool","event","EVENT"].includes(b)||["inlinetool","tool","code","codetool","event"].includes(x)?u+=v:["toollibrary","toolLibrary","workflow","workflowtool"].includes(b)||["toollibrary","workflow","workflowtool"].includes(x)?c+=v:["knowledge","KNOWLEDGE","knowledgetool"].includes(b)||["knowledge","knowledgetool"].includes(x)?f+=v:["mcp","MCP","mcptool","mcpTool"].includes(b)||["mcp","mcptool"].includes(x)?d+=v:(console.log(`Unknown tool type '${b}' for tool '${w}', 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 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 y=l-m;u+=y,console.log(`Adjusted codeTools by ${y} to balance total`)}}else console.log(`No listView data for point ${a}, assigning all ${l} to codeTools`),u=l;const p={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}:`,p),p});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}}transformListViewForSlider(t,r){return Array.isArray(t)?t.map((n,a)=>{const i={id:`${r}-${a+1}`,runs:n.count||0,responseTime:n.avgResponseTime?n.avgResponseTime<1e3?`${Math.round(n.avgResponseTime)}ms`:`${(n.avgResponseTime/1e3).toFixed(2)}s`:"0ms",successRate:n.successRate?`${Math.round(n.successRate)}%`:void 0,tokens:n.totalTokens||n.tokens||0,icon:n.icon||n.tool_icon||void 0,aiModel:"gpt-4o"};switch(r){case"agentRuns":return{...i,name:n.agentName||`Agent ${a+1}`,type:"Agent",aiModel:this.extractAIModel(n)||"gpt-4o"};case"toolRuns":return{...i,name:n.toolName||n.tool_name||`Tool ${a+1}`,type:n.type||n.toolType||n.tool_type||"Code Tool",toolType:n.toolType||n.tool_type,aiModel:this.extractAIModel(n)||"gpt-4o"};case"modelRuns":return{...i,name:n.modelName||`Model ${a+1}`,modelName:n.modelName,provider:n.provider,type:n.provider||"Model",aiModel:n.modelName||n.model||"gpt-4o"};default:return{...i,name:`Item ${a+1}`,type:"Unknown",aiModel:"gpt-4o"}}}):(console.warn("Invalid listView data for slider:",t),[])}extractAIModel(t){if(t.modelName)return t.modelName;if(t.model)return t.model;if(t.llmModel)return t.llmModel;if(t.aiModel)return t.aiModel;const r=["gpt-4o","gpt-4o-mini","claude-3-5-haiku"];return r[Math.floor(Math.random()*r.length)]}static getDateRange(t=7){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()),p=f&&Math.abs(n.getTime()-d.getTime())<1e3,m=Math.abs(a.getTime()-n.getTime()),y=m<60*1e3;return console.log("🕐 TimeDimension calculation:",{fromTimestamp:t,toTimestamp:r,fromDateStr:u,toDateStr:c,diffInMs:s,diffInDays:l,isSameCalendarDay:f,isTodayPattern:p,timeDiffInMs:m,isVeryClose:y,fromStartOfDay:d.toISOString(),recommended:f||p||y||l<=1?"hour":l<=31?"day":l<=90?"week":"month"}),f||p||y||l<=1?"hour":"day"}getAvailableMetrics(){return{"usage-analytics":["sessions","messages","users","tokens"],runs:["agent-runs","model-runs","tool-runs"]}}}const kb=({config:e,className:t,isLoading:r,context:n})=>{const{type:a,chart:i,table:o,layout:s="vertical"}=e,[l,u]=T.useState({isOpen:!1,date:"",metricType:"agentRuns",data:[],totalRuns:0}),c=(y,v)=>{console.log("Chart data point clicked in ViewRenderer:",{chartData:y,date:v,context:n});const b=n==null?void 0:n.metricType;if(!b||!["agentRuns","toolRuns","modelRuns"].includes(b)){console.log("Slider not applicable for metric type:",b);return}const w=y.listView||[];console.log("ListView data for clicked date:",w);const A=new Ht({baseUrl:"",projectId:"",environment:""}).transformListViewForSlider(w,b),g=y[b]||y.count||0;console.log("Opening slider with data:",{date:v,metricType:b,sliderData:A,totalRuns:g}),u({isOpen:!0,date:v,metricType:b,data:A,totalRuns:g})},f=()=>{u(y=>({...y,isOpen:!1}))},d=()=>i?(console.log("ViewRenderer - Chart config:",i),console.log("ViewRenderer - Chart data:",i.data),console.log("ViewRenderer - Context:",n),h.jsx("div",{className:"flex-1",children:h.jsx(Sb,{config:i,isLoading:r,onDataPointClick:c})})):null,p=()=>o?(n==null?void 0:n.metricType)==="agentRuns"?h.jsx("div",{className:"flex-1 min-h-[380px]",children:h.jsx(Pb,{data:o.data})}):(n==null?void 0:n.metricType)==="toolRuns"?h.jsx("div",{className:"flex-1 min-h-[380px]",children:h.jsx(jb,{data:o.data})}):(n==null?void 0:n.metricType)==="modelRuns"?h.jsx("div",{className:"flex-1 min-h-[380px]",children:h.jsx(_b,{data:o.data})}):h.jsx("div",{className:"flex-1 min-h-[380px]",children:h.jsx(Tb,{config:o})}):null,m=()=>{switch(a){case"chart":return d();case"table":return p();case"mixed":return h.jsxs("div",{className:se("flex gap-6",s==="horizontal"?"flex-row":"flex-col"),children:[d(),p()]});default:return h.jsxs("div",{className:"p-4 text-center text-gray-500",children:["Unsupported view type: ",a]})}};return h.jsxs(h.Fragment,{children:[h.jsx("div",{className:se("w-full",t),children:m()}),h.jsx(Eb,{isOpen:l.isOpen,onClose:f,date:l.date,metricType:l.metricType,data:l.data,totalRuns:l.totalRuns})]})},ks=({options:e,value:t,placeholder:r="Select an option",onChange:n,className:a,disabled:i=!1})=>{const[o,s]=T.useState(!1),[l,u]=T.useState(t||""),c=T.useRef(null),f=e.find(m=>m.value===l);T.useEffect(()=>{const m=y=>{c.current&&!c.current.contains(y.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))},p=()=>{i||s(!o)};return h.jsxs("div",{ref:c,className:se("relative",a),children:[h.jsxs("button",{type:"button",className:se("flex h-[40px] text-left w-full items-center rounded-lg border border-gray-300 bg-white px-[14px] py-[10px] medium shadow-none outline-none focus-visible:border-ring focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-gray-25 transition-colors",a),onClick:p,disabled:i,children:[h.jsxs("div",{className:"flex items-center gap-[8px] w-full",children:[h.jsx("span",{className:"text-xs font-medium text-gray-400 uppercase",children:"ENV"}),h.jsx("span",{className:se("truncate w-full",!f&&"text-gray-700 font-medium text-sm"),children:f?f.label:r})]}),h.jsx(Qr,{className:se("h-[16px] w-[16px] text-gray-400 transition-transform duration-200",o&&"rotate-180")})]}),o&&!i&&h.jsx("div",{className:"absolute p-[4px] w-full top-full left-0 z-50 mt-1 bg-popover max-h-[300px] overflow-y-auto text-popover-foreground overflow-x-hidden overflow-y-auto rounded-md border shadow-md",children:e.map(m=>{const y=l===m.value;return h.jsxs("div",{role:"option",className:"relative group",children:[h.jsx("button",{className:se("focus:bg-gray-50 rounded-[4px] hover:bg-gray-50 focus:text-accent-foreground relative flex w-full cursor-pointer select-none items-center px-[14px] py-[10px] text-sm text-left outline-none transition-colors",m.disabled?"opacity-50 cursor-not-allowed text-gray-400":y?"bg-blue-50 text-blue-900 font-medium":"text-gray-900 hover:bg-gray-50"),onClick:()=>!m.disabled&&d(m.value),disabled:m.disabled,children:h.jsx("span",{className:"block whitespace-nowrap w-full",children:m.label})}),m.label.length>25&&h.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:h.jsxs("div",{className:"bg-gray-900 text-white text-xs rounded-md px-3 py-2 whitespace-nowrap shadow-lg",children:[m.label,h.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)})})]})},Mb=({options:e,value:t,defaultValue:r,placeholder:n="Select...",multiSelect:a=!1,searchable:i=!1,onChange:o,className:s,maxItems:l=100,maxLabelLength:u=30})=>{const[c,f]=T.useState(!1),[d,p]=T.useState(""),[m,y]=T.useState(()=>{const M=t||r;return a?Array.isArray(M)?M:M?[M]:[]:M?[Array.isArray(M)?M[0]:M]:[]}),v=T.useRef(null);T.useEffect(()=>{const M=P=>{v.current&&!v.current.contains(P.target)&&f(!1)};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[]);const b=(M,P=u)=>M.length<=P?M:M.substring(0,P)+"...",w=i?e.filter(M=>M.label.toLowerCase().includes(d.toLowerCase())):e,x=w.slice(0,l),A=w.length>l,g=M=>{let P;if(a){if(M==="all"){S();return}if(m.includes(M))P=m.filter(I=>I!==M),P=P.filter(I=>I!=="all");else{P=m.filter(D=>D!=="all"),P=[...P,M];const I=w.filter(D=>D.value!=="all").map(D=>D.value),$=P.filter(D=>D!=="all");$.length===I.length&&(P=["all",...$])}}else P=[M],f(!1);y(P);const _=a?P:P[0]||"";o==null||o(_)},O=()=>{if(!a)return{checked:!1,indeterminate:!1};const M=w.filter(_=>_.value!=="all").map(_=>_.value),P=m.filter(_=>_!=="all"&&M.includes(_));return m.includes("all")&&P.length===0?{checked:!1,indeterminate:!1}:P.length===0?{checked:!1,indeterminate:!1}:P.length===M.length?{checked:!0,indeterminate:!1}:{checked:!1,indeterminate:!0}},S=()=>{if(!a)return;const M=O(),P=w.filter(_=>_.value!=="all").map(_=>_.value);if(M.checked)y(["all"]),o==null||o(["all"]);else{const _=["all",...P];y(_),o==null||o(_)}},j=()=>{y(["all"]),o==null||o(a?["all"]:"all")},C=()=>{if(!a){if(m.length===0)return n;const I=e.find($=>$.value===m[0]);return(I==null?void 0:I.label)||n}const M=m.filter(I=>I!=="all"),P=m.includes("all");if(M.length===0)return n;if(M.length===1){const I=e.find($=>$.value===M[0]);return(I==null?void 0:I.label)||n}const _=e.filter(I=>I.value!=="all").length;return M.length===_?"All selected":`${M.length} selected`};return h.jsxs("div",{className:se("relative",s),ref:v,children:[h.jsxs("button",{type:"button",onClick:()=>f(!c),className:se("w-full flex items-center justify-between px-[12px] py-[8px] text-left text-xs","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:[h.jsx("span",{className:se("truncate",m.length===0&&"text-gray-500"),children:C()}),h.jsx(Qr,{className:se("w-[16px] h-[16px] text-gray-400 transition-transform duration-150",c&&"transform rotate-180")})]}),c&&h.jsxs("div",{className:"absolute z-50 min-w-[300px] w-max max-w-lg mt-[4px] bg-white border border-gray-200 rounded-md shadow-lg max-h-80 overflow-hidden",children:[i&&h.jsx("div",{className:"p-[12px] border-b border-gray-100",children:h.jsxs("div",{className:"relative",children:[h.jsx(jf,{className:"absolute left-[12px] top-1/2 transform -translate-y-1/2 w-[16px] h-[16px] text-gray-400"}),h.jsx("input",{type:"text",placeholder:`Search ${n.toLowerCase()}...`,value:d,onChange:M=>p(M.target.value),className:"w-full pl-[36px] pr-[12px] py-[8px] text-xs border border-gray-200 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})]})}),a&&h.jsxs("div",{className:"flex items-center justify-between px-[12px] py-[8px] border-b border-gray-100 bg-gray-50",children:[h.jsxs("button",{type:"button",onClick:S,className:"flex items-center text-xs font-medium text-gray-700 hover:text-gray-900",children:[h.jsx("div",{className:se("flex items-center justify-center w-[16px] h-[16px] mr-[8px] border transition-colors duration-150",(()=>{const M=O();return M.indeterminate||M.checked?"bg-blue-600 border-blue-600 text-white":"border-gray-300 bg-white"})()),children:(()=>{const M=O();return M.indeterminate?h.jsx("div",{className:"w-[8px] h-[4px] bg-white rounded"}):M.checked?h.jsx("svg",{className:"w-[12px] h-[12px]",fill:"currentColor",viewBox:"0 0 20 20",children:h.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"]}),h.jsx("button",{type:"button",onClick:j,className:"text-sm font-medium text-blue-600 hover:text-blue-800",children:"Clear"})]}),h.jsxs("div",{className:"max-h-60 overflow-y-auto",children:[x.length===0?h.jsx("div",{className:"px-[12px] py-[16px] text-sm text-gray-500 text-center",children:"No options found"}):x.map(M=>{let P;return M.value==="all"?null:(P=m.includes(M.value),h.jsxs("div",{className:"relative group",children:[h.jsxs("div",{onClick:()=>g(M.value),className:se("flex items-center px-[12px] py-[8px] cursor-pointer hover:bg-gray-50","transition-colors duration-150",P&&"bg-gray-50"),children:[a?h.jsx("div",{className:se("flex items-center justify-center w-[16px] h-[16px] mr-[12px] border","transition-colors duration-150",P?"bg-blue-600 border-blue-600 text-white":"border-gray-300 bg-white"),children:P&&h.jsx("svg",{className:"w-[12px] h-[12px]",fill:"currentColor",viewBox:"0 0 20 20",children:h.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"})})}):h.jsx("div",{className:se("w-[16px] h-[16px] mr-[12px] rounded-full border-2 transition-colors duration-150",P?"border-blue-600 bg-blue-600":"border-gray-300"),children:P&&h.jsx("div",{className:"w-full h-full rounded-full bg-white scale-50"})}),h.jsx("span",{className:se("flex-1 text-xs whitespace-nowrap truncate",P?"font-medium text-gray-700":"text-gray-500"),children:b(M.label)})]}),M.label.length>u&&h.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:h.jsxs("div",{className:"bg-gray-900 text-white text-xs rounded-md px-[12px] py-[8px] shadow-lg max-w-xs break-words whitespace-normal",children:[M.label,h.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))}),A&&h.jsxs("div",{className:"px-[12px] py-[8px] text-xs text-gray-500 bg-gray-50 border-t border-gray-100",children:[h.jsxs("div",{className:"text-center font-medium",children:["+",w.length-l," more items"]}),i&&h.jsx("div",{className:"text-center mt-1 text-gray-400",children:"Use search above to find specific items"})]})]})]})]})},Nb=({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 h.jsxs("div",{className:se("flex items-center gap-3",t),children:[r&&h.jsx(h.Fragment,{children:r.multiSelect?h.jsx(Mb,{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}):h.jsx(ks,{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&&h.jsx("div",{className:"flex items-center border border-gray-200 rounded-lg overflow-hidden",children:n.map((l,u)=>h.jsx("button",{onClick:()=>{var c;return(c=l.onClick)==null?void 0:c.call(l,l.value)},className:se("px-[12px] py-[8px] text-xs font-medium transition-colors","hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-inset",l.active?"bg-white text-gray-900 shadow-[0 1px 3px 0 rgba(16, 24, 40, 0.08), 0 1px 2px 0 rgba(16, 24, 40, 0.08)]":"text-gray-500 bg-white",u>0&&"border-l border-gray-200"),children:l.icon&&h.jsx("span",{className:"mr-[8px]",children:l.icon})},l.value))}),a&&h.jsxs("div",{className:"flex items-center gap-[4px] border border-gray-200 bg-gray-50 overflow-hidden p-[2px] rounded-[6px]",children:[h.jsx("button",{onClick:()=>{var l;return(l=a.onToggle)==null?void 0:l.call(a,"chart")},className:se("px-[12px] py-[8px] rounded-[4px] text-xs font-medium transition-colors flex items-center gap-2","hover:bg-white ",a.chartView?"bg-white text-gray-900 shadow-md":"text-gray-500 bg-white"),children:h.jsx(v0,{className:"w-[16px] h-[16px]"})}),h.jsx("button",{onClick:()=>{var l;return(l=a.onToggle)==null?void 0:l.call(a,"table")},className:se("px-[12px] rounded-[4px] py-[8px] text-xs font-medium transition-colors flex items-center gap-2","hover:bg-white ",a.tableView?"bg-white text-gray-900 shadow-md":"text-gray-500 bg-white"),children:h.jsx(A0,{className:"w-[16px] h-[16px]"})})]})]})},Db=({section:e,className:t,isLoading:r,isChartLoading:n,onMetricClick:a})=>{var G;const{id:i,title:o,description:s,metrics:l,view:u,controls:c,layout:f}=e,[d,p]=T.useState(u.type),[m,y]=T.useState("chart"),v=()=>i==="usage-analytics"?"users":i==="runs"?"agentRuns":"users",[b,w]=T.useState(v()),[x,A]=T.useState("all"),g=E=>{var F,W,V,X,Q;const R=j();(F=R==null?void 0:R.controls)!=null&&F.toggle?(y(E),(V=(W=R.controls.toggle).onToggle)==null||V.call(W,E)):(p(E),(Q=(X=c==null?void 0:c.toggle)==null?void 0:X.onToggle)==null||Q.call(X,E))},O=E=>{var W,V;const R=E.metricType||E.title.toLowerCase();w(R);const F=l.find(X=>(X.metricType||X.title.toLowerCase())===R);(V=(W=F==null?void 0:F.controls)==null?void 0:W.dropdown)!=null&&V.multiSelect?A(["all"]):A("all"),a==null||a(E)},S=E=>{var F,W,V;A(E);const R=l.find(X=>(X.metricType||X.title.toLowerCase())===b);(V=(W=(F=R==null?void 0:R.controls)==null?void 0:F.dropdown)==null?void 0:W.onChange)==null||V.call(W,E)},j=()=>l.find(E=>(E.metricType||E.title.toLowerCase())===b)||null,C=E=>Array.isArray(E)?E.filter(F=>F!=="all").length>0:E!=="all",M=E=>Array.isArray(E)?E.filter(R=>R!=="all"):E!=="all"?[E]:[],P=E=>{var V,X,Q,ae,te,K,Y,J,L;const R=((X=(V=E.view)==null?void 0:V.chart)==null?void 0:X.data)||((Q=u.chart)==null?void 0:Q.data)||[];if(!C(x))return R;const F=E.metricType,W=M(x);if(W.length===1){const ie=W[0],q=j(),ue=(K=(te=(ae=q==null?void 0:q.controls)==null?void 0:ae.dropdown)==null?void 0:te.options)==null?void 0:K.find(ve=>ve.value===ie),ee=ue==null?void 0:ue.label;return console.log("🔍 Filtering chart data:",{metricType:F,singleFilter:ie,selectedLabel:ee,baseDataSample:R[0]}),R.map(ve=>{let ze=0;return ve.listView&&Array.isArray(ve.listView)&&(ze=ve.listView.filter(Ve=>F==="agentRuns"&&Ve.agentName?Ve.agentName===ee||Ve.agentName.toLowerCase()===(ee==null?void 0:ee.toLowerCase()):F==="toolRuns"&&Ve.toolName?Ve.toolName===ee||Ve.toolName.toLowerCase()===(ee==null?void 0:ee.toLowerCase()):F==="modelRuns"&&Ve.modelName?Ve.modelName===ee||Ve.modelName.toLowerCase()===(ee==null?void 0:ee.toLowerCase()):!1).reduce((Ve,ut)=>Ve+(ut.count||0),0)),console.log("📊 Filtered value for",ee,":",ze),{...ve,[F]:ze}})}if(W.length>1){const ie=j(),ue=(((L=(J=(Y=ie==null?void 0:ie.controls)==null?void 0:Y.dropdown)==null?void 0:J.options)==null?void 0:L.filter(ee=>W.includes(ee.value)))||[]).map(ee=>ee.label);return R.map(ee=>{let ve=0;return ee.listView&&Array.isArray(ee.listView)&&(ve=ee.listView.filter(Be=>F==="agentRuns"&&Be.agentName?ue.some(Fe=>Be.agentName===Fe||Be.agentName.toLowerCase()===(Fe==null?void 0:Fe.toLowerCase())):F==="toolRuns"&&Be.toolName?ue.some(Fe=>Be.toolName===Fe||Be.toolName.toLowerCase()===(Fe==null?void 0:Fe.toLowerCase())):F==="modelRuns"&&Be.modelName?ue.some(Fe=>Be.modelName===Fe||Be.modelName.toLowerCase()===(Fe==null?void 0:Fe.toLowerCase())):!1).reduce((Be,Fe)=>Be+(Fe.count||0),0)),{...ee,[F]:ve}})}return R},_=E=>{var V;if(!((V=E.view)!=null&&V.chart))return null;const R=P(E),F=()=>{var Q,ae,te,K,Y,J;if(!C(x)||!((Q=E.controls)!=null&&Q.dropdown))return((te=(ae=E.view)==null?void 0:ae.chart)==null?void 0:te.title)||E.title;const X=M(x);if(X.length===1){const L=(K=E.controls.dropdown.options)==null?void 0:K.find(ie=>ie.value===X[0]);return L?`${L.label}`:((J=(Y=E.view)==null?void 0:Y.chart)==null?void 0:J.title)||E.title}return`${X.length} selected`},W=M(x);return E.metricType==="toolRuns"&&W.length===1?{...E.view.chart,data:R,title:F(),lines:void 0,dataKey:"toolRuns",color:"#f97316",showLegend:!1}:E.metricType==="modelRuns"&&W.length===1?{...E.view.chart,data:R,title:F(),dataKey:"modelRuns",color:"#10b981",showLegend:!1}:{...E.view.chart,data:R,title:F()}},I=(E,R)=>{if(!C(x))return E;const F=M(x);if(F.length===1){const W=F[0];if(i==="runs"&&R==="agentRuns")return E.map(V=>({...V,agentRuns:V[W]||0}));if(i==="runs"&&R==="toolRuns")return E.map(V=>({...V,toolRuns:V[W.replace(/[-]/g,"")]||0}));if(i==="runs"&&R==="modelRuns")return E.map(V=>({...V,modelRuns:V[W.replace(/[-\.]/g,"")]||0}))}return E},$=E=>{var V;const R=((V=u.chart)==null?void 0:V.data)||[],F=I(R,E),W=X=>{var ae,te;if(!C(x))return X;const Q=M(x);if(Q.length===1){const K=(te=(ae=c==null?void 0:c.dropdown)==null?void 0:ae.options)==null?void 0:te.find(Y=>Y.value===Q[0]);return K?`${K.label}`:X}return`${Q.length} selected`};switch(E){case"users":return{type:"line",title:"Total Users",data:R,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:R,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:R,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:R,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:F,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 M(x).length===1?{type:"line",title:W("Tool Runs"),data:I(R,"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:F,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 M(x).length===1?{type:"line",title:W("Model Runs"),data:I(R,"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:F,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}},D=(()=>{const E=j();return E!=null&&E.controls?{...E.controls,dropdown:E.controls.dropdown?{...E.controls.dropdown,onChange:S}:void 0,toggle:E.controls.toggle?{...E.controls.toggle,chartView:m==="chart",tableView:m==="table",onToggle:g}:void 0}:c?{...c,dropdown:c.dropdown?{...c.dropdown,onChange:S}:void 0,toggle:c.toggle?{...c.toggle,chartView:d==="chart",tableView:d==="table",onToggle:g}:void 0}:void 0})(),B=(()=>{var F,W,V,X,Q,ae,te,K,Y,J;const E=j();if(E!=null&&E.view){if((F=E.controls)!=null&&F.toggle){if(m==="table"&&E.view.table){let ie=E.view.table.data;if(E.metricType==="agentRuns"&&C(x)){const q=M(x);if(q.length>0){const ue=((X=(V=(W=E.controls)==null?void 0:W.dropdown)==null?void 0:V.options)==null?void 0:X.filter(ee=>q.includes(ee.value)))||[];ue.length>0&&(ie=ie.filter(ee=>ue.some(ve=>ee.name===ve.label||ee.name&&ee.name.toLowerCase().includes(ve.label.toLowerCase()))))}}if(E.metricType==="toolRuns"&&C(x)){const q=M(x);if(q.length>0){const ue=((te=(ae=(Q=E.controls)==null?void 0:Q.dropdown)==null?void 0:ae.options)==null?void 0:te.filter(ee=>q.includes(ee.value)))||[];ue.length>0&&(ie=ie.filter(ee=>ue.some(ve=>ee.name===ve.label||ee.name&&ee.name.toLowerCase().includes(ve.label.toLowerCase()))))}}if(E.metricType==="modelRuns"&&C(x)){const q=M(x);if(q.length>0){const ue=((J=(Y=(K=E.controls)==null?void 0:K.dropdown)==null?void 0:Y.options)==null?void 0:J.filter(ee=>q.includes(ee.value)))||[];ue.length>0&&(ie=ie.filter(ee=>ue.some(ve=>ee.name===ve.label||ee.name&&ee.name.toLowerCase().includes(ve.label.toLowerCase()))))}}return{type:"table",table:{...E.view.table,data:ie}}}else if(m==="chart"&&E.view.chart)return{type:"chart",chart:_(E)||E.view.chart}}const L=_(E);return L?{...E.view,chart:L}:E.view}const R=$(b);return R?{type:"chart",chart:R}:{...u,type:d}})(),z=()=>l.map(E=>{const R=E.metricType||E.title.toLowerCase();return{...E,highlighted:E.highlighted||R===b}});return h.jsxs("div",{className:se("bg-white flex flex-col gap-[16px] rounded-lg border border-gray-200 py-[16px] px-[24px]",t),style:{gridColumn:f!=null&&f.span?`span ${f.span}`:void 0,order:f==null?void 0:f.order},children:[o&&h.jsxs("div",{className:"w-full",children:[h.jsx("h1",{className:"text-md font-medium text-gray-700",children:o}),s&&h.jsx("p",{className:"text-xs text-gray-500",children:s})]}),h.jsx("div",{className:"flex flex-col sm:flex-row gap-[16px]",children:r?h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"flex-1",children:h.jsx(xi,{})}),h.jsx("div",{className:"flex-1",children:h.jsx(xi,{})}),h.jsx("div",{className:"flex-1",children:h.jsx(xi,{})}),h.jsx("div",{className:"flex-1",children:h.jsx(xi,{})})]}):z().map((E,R)=>h.jsx("div",{className:"flex-1",children:h.jsx(If,{data:E,onClick:O,isFirst:R===0})},`${i}-metric-${R}`))}),h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("div",{children:j()&&h.jsx("h3",{className:"text-md font-medium text-gray-700",children:(G=j())==null?void 0:G.title})}),D&&h.jsx(Nb,{config:D})]}),h.jsx(kb,{config:B,isLoading:r||n,context:{sectionId:i,metricType:b}})]})},cf=T.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-blue-600 hover:bg-blue-700 focus:bg-blue-700 focus:shadow-sm text-white py-2 px-3",outline:"border-gray-300 border bg-white text-gray-700 hover:text-gray-800 hover:bg-gray-50 focus:bg-gray-50 focus:shadow-sm",ghost:"border border-error-600 bg-error-500 text-white hover:border-error-600 hover:bg-error-600"},l={sm:"h-[32px] rounded-md gap-1.5 px-[14px] py-[10px]",md:"h-[40px] rounded-md px-[14px] py-[10px]",lg:"h-[48px] rounded-md px-[16px] py-[12px]"};return h.jsx("button",{className:se(o,s[t],l[r],e),ref:i,...a,children:n})});cf.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 Ne(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Ge(e){Ne(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 WB(e,t){Ne(2,arguments);var r=Ge(e),n=Et(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function ff(e,t){Ne(2,arguments);var r=Ge(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 zB(e,t){Ne(2,arguments);var r=Ge(e).getTime(),n=Et(t);return new Date(r+n)}var UB={};function wi(){return UB}function GB(e,t){var r,n,a,i,o,s;Ne(1,arguments);var l=wi(),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=Ge(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 VB(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 na(e){Ne(1,arguments);var t=Ge(e);return t.setHours(0,0,0,0),t}function Oi(e,t){Ne(2,arguments);var r=na(e),n=na(t);return r.getTime()===n.getTime()}function KB(e){return Ne(1,arguments),e instanceof Date||Ms(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function qB(e){if(Ne(1,arguments),!KB(e)&&typeof e!="number")return!1;var t=Ge(e);return!isNaN(Number(t))}function HB(e){Ne(1,arguments);var t=Ge(e);return t.setHours(23,59,59,999),t}function YB(e){Ne(1,arguments);var t=Ge(e);return t.setDate(1),t.setHours(0,0,0,0),t}function XB(e,t){Ne(2,arguments);var r=Et(t);return zB(e,-r)}var ZB=864e5;function JB(e){Ne(1,arguments);var t=Ge(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/ZB)+1}function Ns(e){Ne(1,arguments);var t=1,r=Ge(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 Ib(e){Ne(1,arguments);var t=Ge(e),r=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var a=Ns(n),i=new Date(0);i.setUTCFullYear(r,0,4),i.setUTCHours(0,0,0,0);var o=Ns(i);return t.getTime()>=a.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function QB(e){Ne(1,arguments);var t=Ib(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=Ns(r);return n}var eF=6048e5;function tF(e){Ne(1,arguments);var t=Ge(e),r=Ns(t).getTime()-QB(t).getTime();return Math.round(r/eF)+1}function Ds(e,t){var r,n,a,i,o,s,l,u;Ne(1,arguments);var c=wi(),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=Ge(e),p=d.getUTCDay(),m=(p<f?7:0)+p-f;return d.setUTCDate(d.getUTCDate()-m),d.setUTCHours(0,0,0,0),d}function Lb(e,t){var r,n,a,i,o,s,l,u;Ne(1,arguments);var c=Ge(e),f=c.getUTCFullYear(),d=wi(),p=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(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(f+1,0,p),m.setUTCHours(0,0,0,0);var y=Ds(m,t),v=new Date(0);v.setUTCFullYear(f,0,p),v.setUTCHours(0,0,0,0);var b=Ds(v,t);return c.getTime()>=y.getTime()?f+1:c.getTime()>=b.getTime()?f:f-1}function rF(e,t){var r,n,a,i,o,s,l,u;Ne(1,arguments);var c=wi(),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=Lb(e,t),p=new Date(0);p.setUTCFullYear(d,0,f),p.setUTCHours(0,0,0,0);var m=Ds(p,t);return m}var nF=6048e5;function aF(e,t){Ne(1,arguments);var r=Ge(e),n=Ds(r,t).getTime()-rF(r,t).getTime();return Math.round(n/nF)+1}function je(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return r+n}var Pr={y:function(t,r){var n=t.getUTCFullYear(),a=n>0?n:1-n;return je(r==="yy"?a%100:a,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):je(n+1,2)},d:function(t,r){return je(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 je(t.getUTCHours()%12||12,r.length)},H:function(t,r){return je(t.getUTCHours(),r.length)},m:function(t,r){return je(t.getUTCMinutes(),r.length)},s:function(t,r){return je(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 je(i,r.length)}},aa={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},iF={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 Pr.y(t,r)},Y:function(t,r,n,a){var i=Lb(t,a),o=i>0?i:1-i;if(r==="YY"){var s=o%100;return je(s,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):je(o,r.length)},R:function(t,r){var n=Ib(t);return je(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return je(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 je(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 je(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 Pr.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 je(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=aF(t,a);return r==="wo"?n.ordinalNumber(i,{unit:"week"}):je(i,r.length)},I:function(t,r,n){var a=tF(t);return r==="Io"?n.ordinalNumber(a,{unit:"week"}):je(a,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):Pr.d(t,r)},D:function(t,r,n){var a=JB(t);return r==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):je(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 je(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 je(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 je(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=aa.noon:a===0?i=aa.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=aa.evening:a>=12?i=aa.afternoon:a>=4?i=aa.morning:i=aa.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 Pr.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Pr.H(t,r)},K:function(t,r,n){var a=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(a,{unit:"hour"}):je(a,r.length)},k:function(t,r,n){var a=t.getUTCHours();return a===0&&(a=24),r==="ko"?n.ordinalNumber(a,{unit:"hour"}):je(a,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Pr.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Pr.s(t,r)},S:function(t,r){return Pr.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 Bb(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 Bb(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"+Rb(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"+Rb(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 je(o,r.length)},T:function(t,r,n,a){var i=a._originalDate||t,o=i.getTime();return je(o,r.length)}};function Rb(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+je(i,2)}function Bb(e,t){if(e%60===0){var r=e>0?"-":"+";return r+je(Math.abs(e)/60,2)}return Yr(e,t)}function Yr(e,t){var r=t||"",n=e>0?"-":"+",a=Math.abs(e),i=je(Math.floor(a/60),2),o=je(a%60,2);return n+i+r+o}var Fb=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"})}},Wb=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"})}},oF=function(t,r){var n=t.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return Fb(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}}",Fb(a,r)).replace("{{time}}",Wb(i,r))},sF={p:Wb,P:oF},lF=["D","DD"],uF=["YY","YYYY"];function cF(e){return lF.indexOf(e)!==-1}function fF(e){return uF.indexOf(e)!==-1}function zb(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 dF={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"}},pF=function(t,r,n){var a,i=dF[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 df(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 hF={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},vF={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},mF={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yF={date:df({formats:hF,defaultWidth:"full"}),time:df({formats:vF,defaultWidth:"full"}),dateTime:df({formats:mF,defaultWidth:"full"})},gF={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},bF=function(t,r,n,a){return gF[t]};function Si(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 xF={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},wF={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},OF={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"]},SF={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"]},TF={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"}},AF={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"}},PF=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"},jF={ordinalNumber:PF,era:Si({values:xF,defaultWidth:"wide"}),quarter:Si({values:wF,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Si({values:OF,defaultWidth:"wide"}),day:Si({values:SF,defaultWidth:"wide"}),dayPeriod:Si({values:TF,defaultWidth:"wide",formattingValues:AF,defaultFormattingWidth:"wide"})};function Ti(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)?EF(s,function(f){return f.test(o)}):_F(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 _F(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function EF(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function CF(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 $F=/^(\d+)(th|st|nd|rd)?/i,kF=/\d+/i,MF={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},NF={any:[/^b/i,/^(a|c)/i]},DF={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},IF={any:[/1/i,/2/i,/3/i,/4/i]},LF={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},RF={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]},BF={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},FF={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]},WF={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},zF={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}},UF={ordinalNumber:CF({matchPattern:$F,parsePattern:kF,valueCallback:function(t){return parseInt(t,10)}}),era:Ti({matchPatterns:MF,defaultMatchWidth:"wide",parsePatterns:NF,defaultParseWidth:"any"}),quarter:Ti({matchPatterns:DF,defaultMatchWidth:"wide",parsePatterns:IF,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Ti({matchPatterns:LF,defaultMatchWidth:"wide",parsePatterns:RF,defaultParseWidth:"any"}),day:Ti({matchPatterns:BF,defaultMatchWidth:"wide",parsePatterns:FF,defaultParseWidth:"any"}),dayPeriod:Ti({matchPatterns:WF,defaultMatchWidth:"any",parsePatterns:zF,defaultParseWidth:"any"})},GF={code:"en-US",formatDistance:pF,formatLong:yF,formatRelative:bF,localize:jF,match:UF,options:{weekStartsOn:0,firstWeekContainsDate:1}},VF=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,KF=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,qF=/^'([^]*?)'?$/,HF=/''/g,YF=/[a-zA-Z]/;function Is(e,t,r){var n,a,i,o,s,l,u,c,f,d,p,m,y,v;Ne(2,arguments);var b=String(t),w=wi(),x=(n=(a=void 0)!==null&&a!==void 0?a:w.locale)!==null&&n!==void 0?n:GF,A=Et((i=(o=(s=(l=void 0)!==null&&l!==void 0?l:void 0)!==null&&s!==void 0?s:w.firstWeekContainsDate)!==null&&o!==void 0?o:(u=w.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 g=Et((f=(d=(p=(m=void 0)!==null&&m!==void 0?m:void 0)!==null&&p!==void 0?p:w.weekStartsOn)!==null&&d!==void 0?d:(y=w.locale)===null||y===void 0||(v=y.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&f!==void 0?f:0);if(!(g>=0&&g<=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 O=Ge(e);if(!qB(O))throw new RangeError("Invalid time value");var S=VB(O),j=XB(O,S),C={firstWeekContainsDate:A,weekStartsOn:g,locale:x,_originalDate:O},M=b.match(KF).map(function(P){var _=P[0];if(_==="p"||_==="P"){var I=sF[_];return I(P,x.formatLong)}return P}).join("").match(VF).map(function(P){if(P==="''")return"'";var _=P[0];if(_==="'")return XF(P);var I=iF[_];if(I)return fF(P)&&zb(P,t,String(e)),cF(P)&&zb(P,t,String(e)),I(j,P,x.localize,C);if(_.match(YF))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_+"`");return P}).join("");return M}function XF(e){var t=e.match(qF);return t?t[1].replace(HF,"'"):e}function Ub(e,t){Ne(2,arguments);var r=Ge(e),n=Ge(t);return r.getTime()<n.getTime()}function ZF(e,t){Ne(2,arguments);var r=Ge(e).getTime(),n=Ge(t.start).getTime(),a=Ge(t.end).getTime();if(!(n<=a))throw new RangeError("Invalid interval");return r>=n&&r<=a}function Ls(e,t){Ne(2,arguments);var r=Et(t);return WB(e,-r)}function JF(e,t){Ne(2,arguments);var r=Et(t);return ff(e,-r)}const pf=({children:e})=>{const[t,r]=T.useState(!1);return T.useEffect(()=>(r(!0),()=>r(!1)),[]),t?Jr.createPortal(e,document.body):null};function Gb({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:na(new Date),to:new Date}},{label:"Yesterday",value:"yesterday",dateRange:{from:na(Ls(new Date,1)),to:HB(Ls(new Date,1))}},{label:"This week",value:"thisWeek",dateRange:{from:GB(new Date),to:new Date}},{label:"Last 7 days",value:"7d",dateRange:{from:na(Ls(new Date,6)),to:new Date}},{label:"This month",value:"thisMonth",dateRange:{from:YB(new Date),to:new Date}},{label:"Last 30 days",value:"30d",dateRange:{from:na(Ls(new Date,29)),to:new Date}}],a=t?n.find(k=>k.value===t):null;console.log("📅 DateRangePicker initialization:",{defaultValue:t,defaultPreset:a==null?void 0:a.label,hasDateRange:!!(a!=null&&a.dateRange),allPresetValues:n.map(k=>k.value),foundPreset:!!a});const[i,o]=T.useState(a==null?void 0:a.dateRange),[s,l]=T.useState(a==null?void 0:a.dateRange),[u,c]=T.useState(!1),[f,d]=T.useState((a==null?void 0:a.label)||null),[p,m]=T.useState((a==null?void 0:a.label)||null),[y,v]=T.useState(new Date),[b,w]=T.useState(null),[x,A]=T.useState({top:0,left:0}),g=T.useRef(null),O=T.useRef(null);T.useEffect(()=>{var k,B;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:(k=a.dateRange.from)==null?void 0:k.toLocaleDateString(),to:(B=a.dateRange.to)==null?void 0:B.toLocaleDateString()}),r(a.dateRange)):console.log("📅 DateRangePicker: NOT setting initial value because:",{hasDefaultPreset:!!a,hasDateRange:!!(a!=null&&a.dateRange),hasCallback:!!r,presetLabelsAvailable:n.map(z=>`${z.value}:${z.label}`)})},[]),T.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 S=()=>{if(!O.current)return;const k=O.current.getBoundingClientRect(),B=window.scrollY,z=window.scrollX,G=window.innerWidth,E=window.innerHeight,R=720,F=450;let W=k.bottom+B+8,V=k.left+z;V+R>G&&(V=k.right+z-R),V+R>G&&(V=G-R-20),W+F>E&&(W=k.top+B-F-8),V<20&&(V=20),W<20&&(W=20),A({top:W,left:V})};T.useEffect(()=>{const k=()=>{u&&S()};return u&&(window.addEventListener("resize",k),window.addEventListener("scroll",k)),()=>{window.removeEventListener("resize",k),window.removeEventListener("scroll",k)}},[u]);const j=(k,B)=>{if(l(k),m(B),w(null),k.from){const z=new Date(k.from.getFullYear(),k.from.getMonth(),1);v(z)}},C=k=>{if(!b)w(k),l({from:k,to:k}),m(null);else{const B=Ub(k,b)?k:b,z=Ub(k,b)?b:k;l({from:B,to:z}),w(null),m(null)}},M=()=>{o(s),d(p),r==null||r(s),c(!1),w(null)},P=()=>{l(void 0),m(null),o(void 0),d(null),r==null||r(void 0),c(!1),w(null)},_=k=>{k?(l(i),m(f),w(null),setTimeout(S,0)):(l(i),m(f),w(null)),c(k)},I=(k,B)=>(console.log("📅 formatDateRange called with:",{presetLabel:B,hasDateRange:!!(k!=null&&k.from)}),B||(k!=null&&k.from?!k.to||Oi(k.from,k.to)?Is(k.from,"MMM dd, yyyy"):`${Is(k.from,"MMM dd, yyyy")} - ${Is(k.to,"MMM dd, yyyy")}`:"Pick a date range")),$=(k=0)=>{const B=ff(y,k),z=B.getFullYear(),G=B.getMonth(),E=new Date(z,G,1),F=new Date(z,G+1,0).getDate(),W=E.getDay(),V=["January","February","March","April","May","June","July","August","September","October","November","December"],X=["Su","Mo","Tu","We","Th","Fr","Sa"],Q=[],te=new Date(z,G-1,0).getDate();for(let J=W-1;J>=0;J--){const L=te-J,ie=new Date(z,G-1,L);Q.push(h.jsx("button",{onClick:()=>C(ie),className:"h-[32px] w-[32px] text-xs text-gray-400 hover:bg-gray-100 rounded-full flex items-center justify-center",children:L},`prev-${L}`))}for(let J=1;J<=F;J++){const L=new Date(z,G,J),ie=Oi(L,new Date),q=(s==null?void 0:s.from)&&(s==null?void 0:s.to)&&ZF(L,{start:s.from,end:s.to}),ue=(s==null?void 0:s.from)&&Oi(L,s.from),ee=(s==null?void 0:s.to)&&Oi(L,s.to),ve=b&&Oi(L,b);let ze="h-[32px] w-[32px] text-xs hover:bg-gray-100 hover:text-gray-900 hover:font-medium rounded-full flex items-center justify-center transition-colors text-gray-700 ";ie&&(ze+="font-semibold "),ve||ue||ee?ze+="!bg-blue-500 !text-white !hover:bg-blue-500 !hover:text-white font-semibold":q&&(ze+="bg-blue-100 text-blue-900 hover:bg-blue-100 hover:text-blue-900 font-semibold"),Q.push(h.jsx("button",{onClick:()=>C(L),className:ze,children:J},`current-${J}`))}const Y=Math.ceil((W+F)/7)*7-W-F;for(let J=1;J<=Y;J++){const L=new Date(z,G+1,J);Q.push(h.jsx("button",{onClick:()=>C(L),className:"h-[32px] w-[32px] text-sm text-gray-500 hover:bg-gray-100 rounded-full flex items-center justify-center",children:J},`next-${J}`))}return h.jsxs("div",{className:"p-[12px]",children:[h.jsxs("div",{className:"flex items-center justify-between mb-3",children:[k===0&&h.jsx("button",{onClick:()=>v(JF(y,1)),className:"p-[4px] hover:bg-gray-100 rounded",children:h.jsx(m0,{className:"h-[16px] w-[16px]"})}),h.jsxs("div",{className:"font-semibold text-sm text-gray-700",children:[V[G]," ",z]}),k===1&&h.jsx("button",{onClick:()=>v(ff(y,1)),className:"p-[4px] hover:bg-gray-100 rounded",children:h.jsx(Sf,{className:"h-[16px] w-[16px]"})})]}),h.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:X.map(J=>h.jsx("div",{className:"h-[32px] flex items-center justify-center text-xs font-medium text-gray-700 w-full text-center",children:J},J))}),h.jsx("div",{className:"grid grid-cols-7 gap-1",children:Q})]})},D=()=>"fixed bg-white border border-gray-200 rounded-lg shadow-xl z-[99999]";return h.jsxs("div",{className:`relative ${e}`,children:[h.jsxs("button",{ref:O,onClick:()=>_(!u),className:`min-w-[200px] px-[12px] py-[8px] 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:[h.jsx(Of,{className:"mr-2 h-[16px] w-[16px]"}),(()=>{const k=I(i,f);return console.log("📅 Button display text:",{displayText:k,date:i,selectedPresetLabel:f}),k})()]}),u&&h.jsxs(pf,{children:[h.jsx("div",{className:"fixed inset-0 z-[99998] bg-black bg-opacity-10",onClick:()=>_(!1)}),h.jsxs("div",{ref:g,className:D(),style:{top:x.top,left:x.left,width:"720px",minWidth:"720px",maxHeight:"90vh"},onClick:k=>k.stopPropagation(),children:[h.jsxs("div",{className:"flex",children:[h.jsxs("div",{className:"flex flex-col gap-1 p-[12px] border-r border-gray-200 w-[160px] flex-shrink-0",children:[h.jsx("div",{className:"text-sm font-medium text-gray-500 mb-2",children:"Quick Filters"}),n.map(k=>h.jsx("button",{onClick:()=>j(k.dateRange,k.label),className:`text-left px-[12px] py-[8px] text-sm text-gray-900 rounded hover:bg-gray-100 transition-colors ${p===k.label?"bg-gray-100 medium":""}`,children:k.label},k.label))]}),h.jsxs("div",{className:"flex flex-1",children:[$(0),$(1)]})]}),h.jsxs("div",{className:"border-t border-gray-200 bg-gray-50 p-[12px] flex justify-end gap-2",children:[h.jsx("button",{onClick:P,className:"px-[12px] py-[8px] text-sm border border-gray-300 rounded hover:bg-gray-50 transition-colors",children:"Clear"}),h.jsx("button",{onClick:M,disabled:!(s!=null&&s.from),className:"px-[12px] py-[8px] text-sm bg-blue-600 text-white rounded hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:"Apply"})]})]})]})]})}const QF=({config:e,appConfig:t,className:r,onExport:n,onDraftChange:a,onTimeRangeChange:i})=>{var I;const{title:o,subtitle:s,sections:l,globalControls:u,layout:c={columns:12,gap:24,responsive:!0}}=e,[f,d]=T.useState(!1),[p,m]=T.useState({}),[y,v]=T.useState(l),[b,w]=T.useState([]),[x,A]=T.useState(!1),g=T.useRef(null);T.useEffect(()=>{if(t)try{g.current=new Ht(t),O(),S()}catch($){console.error("Failed to initialize API service:",$)}},[t]);const O=async()=>{if(!(!g.current||!t)){A(!0);try{const $=await g.current.fetchEnvironments();w($),console.log("🌍 Environments loaded:",$.map(D=>D.envName))}catch($){console.error("Error loading environments:",$)}finally{A(!1)}}},S=async()=>{if(!(!g.current||!t)){d(!0);try{const $=g.current.getDefaultTimeRange();console.log("📊 Loading dashboard data with date range:",{fromTimestamp:$.fromTimestamp,toTimestamp:$.toTimestamp,fromDate:new Date($.fromTimestamp).toLocaleDateString(),toDate:new Date($.toTimestamp).toLocaleDateString()});const D=await g.current.fetchAllCardsDataWithEnhancedViews($.fromTimestamp,$.toTimestamp);console.log("✅ Enhanced cards data loaded successfully:",D),console.log("📈 Data covers period:",{from:new Date($.fromTimestamp).toLocaleDateString(),to:new Date($.toTimestamp).toLocaleDateString()});const k=l.map(B=>B.id==="usage-analytics"?(console.log("Updating usage-analytics section with enhanced data"),{...B,metrics:D.usageAnalytics}):B.id==="runs"?(console.log("Updating runs section with enhanced data including table and controls"),{...B,metrics:D.runs}):B);v(k)}catch($){console.error("Error loading initial data:",$),v(l)}finally{d(!1)}}},j=async($,D)=>{if(!(!g.current||!t||!D.metricType)){v(k=>k.map(B=>B.id===$?{...B,metrics:B.metrics.map(z=>({...z,highlighted:z.metricType===D.metricType}))}:B)),m(k=>({...k,[$]:!0}));try{const k=t.defaultTimeRange||Ht.getDateRange(7);let B,z;if(["users","sessions","messages","tokens"].includes(D.metricType))B="usage-analytics",z=D.metricType;else if(["agentRuns","toolRuns","modelRuns"].includes(D.metricType))B="runs",z=D.metricType==="agentRuns"?"agent-runs":D.metricType==="toolRuns"?"tool-runs":"model-runs";else return;const G=await g.current.fetchTimeSeriesData(z,B,k.fromTimestamp,k.toTimestamp),E=g.current.transformTimeSeriesDataForMetric(G,D.metricType);console.log("Time series response for",D.title,":",G),console.log("Transformed data for",D.title,":",E),console.log("Metric type used for transformation:",D.metricType);const F=(W=>({users:"users",sessions:"sessions",messages:"messages",tokens:"totalTokens",agentRuns:"agentRuns",toolRuns:"toolRuns",modelRuns:"modelRuns"})[W]||"count")(D.metricType||"count");console.log("Using dataKey for metric",D.metricType,":",F),v(W=>W.map(V=>{if(V.id===$){const X={...V,view:{...V.view,chart:V.view.chart?{...V.view.chart,data:E,dataKey:F,lines:[{dataKey:F,color:V.view.chart.color||"#3b82f6",label:D.title,strokeWidth:2}]}:{type:"line",data:E,dataKey:F,lines:[{dataKey:F,color:"#3b82f6",label:D.title,strokeWidth:2}],yAxisLabel:D.title}}};return console.log("Updated section for",$,":",X),console.log("Chart config set:",X.view.chart),X}return V}))}catch(k){console.error("Error loading metric data:",k)}finally{m(k=>({...k,[$]:!1}))}}},C=$=>{var D,k;if((k=(D=u==null?void 0:u.draft)==null?void 0:D.onChange)==null||k.call(D,$),a==null||a($),t&&g.current){const B={...t,environment:$};g.current.updateConfig(B),S()}},M=$=>{var D,k;if(console.log("🗓️ Time range change requested:",$),typeof $=="string"&&((k=(D=u==null?void 0:u.timeRange)==null?void 0:D.onChange)==null||k.call(D,$)),i==null||i($),t&&g.current){let B=null;if(typeof $=="object"&&$.from&&$.to)B={fromTimestamp:$.from.toISOString(),toTimestamp:$.to.toISOString()},console.log("📅 Converting DateRange to API format:",B);else if(typeof $=="string"){const G={"24h":1,"7d":7,"30d":30,"90d":90}[$];G&&(B=Ht.getDateRange(G),console.log(`📅 Converting preset "${$}" (${G} days) to API format:`,B))}if(B){const z={...t,defaultTimeRange:B};console.log("🔄 Updating API configuration with new date range:",z.defaultTimeRange),g.current.updateConfig(z),console.log("🚀 Reloading dashboard data with new date range..."),S()}else console.warn("⚠️ Unable to convert time range value to API format:",$)}},P=($="csv")=>{var D,k;(k=(D=u==null?void 0:u.export)==null?void 0:D.onExport)==null||k.call(D,$),n==null||n()},_=Object.values(p).some($=>$);return h.jsxs("div",{className:se("w-full h-full flex flex-col overflow-hidden",r),children:[h.jsxs("div",{className:"flex flex-col gap-2 w-full p-[24px] pb-[12px]",children:[h.jsx("h1",{className:"text-lg font-bold text-gray-900 w-full",children:o}),h.jsxs("div",{className:"flex items-center gap-2 w-full",children:[s&&h.jsx("p",{className:"text-gray-500 text-xs w-full",children:s}),h.jsxs("div",{className:"flex items-center gap-2 justify-end flex-shrink-0",children:[(f||_)&&h.jsxs("div",{className:"flex items-center gap-2 text-sm medium text-gray-500",children:[h.jsx(S0,{className:"h-[16px] w-[16px] animate-spin"}),"Loading..."]}),u&&h.jsxs(h.Fragment,{children:[u.draft&&h.jsx(ks,{options:b.length>0?b.map($=>({label:$.envName.charAt(0).toUpperCase()+$.envName.slice(1),value:$.envName})):u.draft.options,value:u.draft.defaultValue,placeholder:x?"Loading environments...":u.draft.label,onChange:C,className:"min-w-[200px]",disabled:f||_||x}),u.timeRange&&(u.timeRange.useDatePicker?(console.log("🗓️ Dashboard: Rendering DateRangePicker with defaultValue:",u.timeRange.defaultValue),h.jsx(Gb,{defaultValue:u.timeRange.defaultValue,onDateRangeChange:$=>{console.log("🗓️ Dashboard: DateRangePicker callback received:",$),$&&M($)}})):h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Of,{className:"h-4 w-4 text-gray-500"}),h.jsx(ks,{options:u.timeRange.options||[],value:u.timeRange.defaultValue,placeholder:u.timeRange.label,onChange:M,className:"min-w-[200px]",disabled:f||_})]})),((I=u.export)==null?void 0:I.enabled)&&h.jsxs(cf,{variant:"outline",onClick:()=>P(),className:"gap-2",disabled:f||_,children:[h.jsx(g0,{className:"h-4 w-4"}),"Export"]})]})]})]})]}),h.jsx("div",{className:se("grid gap-6 p-[24px] pt-[8px] overflow-y-auto",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:y.map($=>{var D,k,B,z;return h.jsx(Db,{section:$,isLoading:f,isChartLoading:p[$.id]||!1,onMetricClick:G=>j($.id,G),className:se(c.responsive&&((D=$.layout)==null?void 0:D.span)===12&&"lg:col-span-12",c.responsive&&((k=$.layout)==null?void 0:k.span)===6&&"lg:col-span-6",c.responsive&&((B=$.layout)==null?void 0:B.span)===4&&"lg:col-span-4",c.responsive&&((z=$.layout)==null?void 0:z.span)===3&&"lg:col-span-3")},$.id)})})]})};class Vb{static buildSessionTree(t,r){const n=this.groupEventsByRun(t),a=[];for(const[i,o]of n.entries()){const s=this.buildRunTree(i,o);a.push(s)}return a.sort((i,o)=>new Date(i.startTime).getTime()-new Date(o.startTime).getTime()),{sessionId:r||"unknown",runs:a}}static groupEventsByRun(t){const r=new Map;return t.forEach(n=>{const a=n.data.runId;r.has(a)||r.set(a,[]),r.get(a).push(n)}),r}static buildRunTree(t,r){const n=new Map,a=new Map;r.forEach(v=>{const b=v.data.invocationId,w=n.get(b);(!w||v.timestamp>w.timestamp||v.data.status==="completed"&&w.data.status!=="completed")&&n.set(b,v),v.data.toolCalls&&v.data.toolCalls.length>0&&v.data.toolCalls.forEach(x=>{const A=a.get(x.invocationId);(!A||x.endTime&&!A.endTime||x.status==="completed"&&A.status!=="completed")&&a.set(x.invocationId,x)})});const i=Array.from(n.values()).map(v=>this.createTreeNode(v)),o=Array.from(a.values()).map(v=>this.createToolTreeNode(v,t)),s=[...i,...o],l=this.buildTreesWithSupervisorRule(s),u=Math.min(...r.map(v=>new Date(v.data.startTime).getTime())),c=r.filter(v=>v.data.endTime),f=c.length>0?Math.max(...c.map(v=>new Date(v.data.endTime).getTime())):void 0,d=this.calculateRunStatus(r),p=this.extractUserInput(r),m=this.extractFinalOutput(r),y=this.extractAttachments(r);return{runId:t,startTime:new Date(u).toISOString(),endTime:f?new Date(f).toISOString():void 0,status:d,rootNodes:l,userInput:p,finalOutput:m,attachments:y}}static createTreeNode(t){var n;const r=t.data.endTime&&t.data.startTime?new Date(t.data.endTime).getTime()-new Date(t.data.startTime).getTime():void 0;return{id:t.data.invocationId,parentId:t.data.parentId,runId:t.data.runId,agentName:t.data.agentName,nodeType:this.mapNodeType(t.data.nodeType,t.data.agentName),status:t.data.status,startTime:t.data.startTime,endTime:t.data.endTime,duration:r,llm:t.data.llm,tokens:(n=t.data.responseMetadata)==null?void 0:n.totalTokens,userInput:t.data.userInput,agentInput:t.data.agentInput,agentOutput:t.data.agentOutput,toolCalls:t.data.toolCalls,children:[],level:0,isExpanded:!1,attachments:t.data.attachments}}static createToolTreeNode(t,r){const n=t.endTime&&t.startTime?new Date(t.endTime).getTime()-new Date(t.startTime).getTime():void 0;return{id:t.invocationId,parentId:t.agentInvocationId,runId:r,agentName:t.toolName,nodeType:"tool",status:t.status,startTime:t.startTime,endTime:t.endTime,duration:n,llm:void 0,tokens:void 0,userInput:void 0,agentInput:t.toolArguments,agentOutput:t.toolOutput,toolCalls:[],children:[],level:0,isExpanded:!1,toolName:t.toolName,toolInput:t.toolArguments,toolOutput:t.toolOutput}}static mapNodeType(t,r){return r==="Supervisor"||t==="supervisor"?"supervisor":t==="worker"?"agent":"tool"}static buildTreesWithSupervisorRule(t){t.forEach(a=>{(a.agentName==="Supervisor"||a.nodeType==="supervisor")&&(a.parentId=null)});const r=new Map;t.forEach(a=>r.set(a.id,a));const n=[];return t.forEach(a=>{if(a.parentId&&r.has(a.parentId)){const i=r.get(a.parentId);i.children.push(a),a.level=i.level+1}else n.push(a),a.level=0}),n.sort((a,i)=>new Date(a.startTime).getTime()-new Date(i.startTime).getTime()),n.forEach(a=>this.sortChildren(a)),n}static sortChildren(t){t&&(t.children.sort((r,n)=>new Date(r.startTime).getTime()-new Date(n.startTime).getTime()),t.children.forEach(r=>this.sortChildren(r)))}static calculateRunStatus(t){const r=t.some(a=>a.data.status==="running"),n=t.some(a=>a.data.status==="failed");return r?"running":n?"failed":"completed"}static extractUserInput(t){const r=t.find(n=>n.data.agentName==="Supervisor"&&n.data.userInput);return(r==null?void 0:r.data.userInput)||""}static extractFinalOutput(t){const r=t.filter(i=>i.data.status==="completed"&&i.data.agentOutput);if(r.length===0)return"";const a=r.reduce((i,o)=>new Date(o.data.endTime||o.timestamp)>new Date(i.data.endTime||i.timestamp)?o:i).data.agentOutput;return typeof a=="string"?a:typeof a=="object"&&a.message?a.message:JSON.stringify(a)}static updateTree(t,r,n){return this.buildSessionTree(n,t.sessionId)}static mergeEvents(t,r){const n=new Map;return t.forEach(a=>{const i=a.data.invocationId,o=n.get(i);(!o||new Date(a.timestamp)>new Date(o.timestamp))&&n.set(i,a)}),r.forEach(a=>{const i=a.data.invocationId,o=n.get(i);(!o||new Date(a.timestamp)>new Date(o.timestamp))&&n.set(i,a)}),Array.from(n.values()).sort((a,i)=>new Date(a.timestamp).getTime()-new Date(i.timestamp).getTime())}static extractAttachments(t){const r=new Map;t.forEach(a=>{a.data.attachments&&a.data.attachments.length>0&&a.data.attachments.forEach(i=>{r.set(i.fileName,i)})});const n=Array.from(r.values());return n.length>0?n:void 0}}function Kb({node:e,onToggle:t,isExpanded:r=!1,onNodeClick:n,selectedNodeIds:a}){const[i,o]=T.useState("summary"),s=a?a.has(e.id):!1,l=e.children&&e.children.length>0,u=b=>{b.stopPropagation(),t&&t(e.id)},c=()=>{n&&n(e)},f=()=>{switch(e.status){case"completed":return h.jsx("svg",{className:"flex-shrink-0",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:h.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 0.5C2.96243 0.5 0.5 2.96243 0.5 6C0.5 9.03757 2.96243 11.5 6 11.5C9.03757 11.5 11.5 9.03757 11.5 6C11.5 2.96243 9.03757 0.5 6 0.5ZM8.60355 4.85355C8.79882 4.65829 8.79882 4.34171 8.60355 4.14645C8.40829 3.95118 8.09171 3.95118 7.89645 4.14645L5.25 6.79289L4.10355 5.64645C3.90829 5.45118 3.59171 5.45118 3.39645 5.64645C3.20118 5.84171 3.20118 6.15829 3.39645 6.35355L4.89645 7.85355C5.09171 8.04882 5.40829 8.04882 5.60355 7.85355L8.60355 4.85355Z",fill:"#17B26A"})});case"failed":return h.jsx("div",{className:"w-[12px] h-[12px] rounded-full bg-red-500"});case"running":return h.jsx("div",{className:"w-[12px] h-[12px] rounded-full bg-yellow-500 animate-pulse"});default:return h.jsx("div",{className:"w-[12px] h-[12px] rounded-full bg-gray-400"})}},d=()=>{var b;switch(e.nodeType){case"supervisor":return h.jsx("div",{className:"w-6 h-6 rounded-lg bg-purple-100 flex items-center justify-center",children:h.jsx("div",{className:"w-4 h-4 text-purple-600",children:h.jsx("svg",{viewBox:"0 0 16 16",fill:"currentColor",children:h.jsx("path",{d:"M8 1L2 5v6l6 4 6-4V5L8 1z"})})})});case"agent":return h.jsx("div",{className:"w-[24px] h-[24px] rounded-lg bg-blue-100 flex items-center justify-center",children:h.jsx(wf,{className:"w-[14px] h-[14px] text-blue-600"})});case"tool":const w=(b=e.agentName)==null?void 0:b.toLowerCase().includes("make_transfer");return h.jsx("div",{className:`w-[24px] h-[24px] rounded-lg ${w?"bg-orange-100":"bg-blue-100"} flex items-center justify-center`,children:w?h.jsx(y0,{className:"w-[14px] h-[14px] text-orange-600"}):h.jsx(fa,{className:"w-[14px] h-[14px] text-blue-600"})});default:return h.jsx("div",{className:"w-[24px] h-[24px] rounded-lg bg-gray-100 flex items-center justify-center",children:h.jsx(b0,{className:"w-[14px] h-[14px] text-gray-600"})})}},p=b=>b?b<1e3?`${b}ms`:`${(b/1e3).toFixed(2)}s`:"",m=()=>e.nodeType==="tool"?["request","response","logs"]:["summary","request","response","guardrails"],y=()=>{var x;const b=e.toolCalls&&e.toolCalls.length>0||e.children&&e.children.length>0,w=e.agentOutput&&(typeof e.agentOutput=="string"||e.agentOutput.message||e.agentOutput.reason);return b?h.jsxs("div",{className:"space-y-2",children:[h.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[h.jsx("span",{className:"text-xs text-gray-600",children:"Invoked"}),e.toolCalls&&e.toolCalls.length>0&&e.toolCalls.map((A,g)=>h.jsxs("div",{className:"flex items-center gap-[4px] px-[8px] py-[2px] border border-gray-300 rounded-[4px] text-xs",children:[h.jsx(fa,{className:"w-[12px] h-[12px] text-blue-500 flex-shrink-0"}),h.jsx("span",{className:"text-gray-600 truncate",children:A.toolName||"Tool"})]},A.invocationId||g)),(!e.toolCalls||e.toolCalls.length===0)&&e.children&&e.children.length>0&&e.children.map((A,g)=>h.jsxs("div",{className:"flex items-center gap-[4px] px-[8px] py-[2px] border border-gray-300 rounded-[4px] text-xs",children:[A.nodeType==="tool"?h.jsx(fa,{className:"w-[12px] h-[12px] text-green-500 flex-shrink-0"}):h.jsx(wf,{className:"w-[12px] h-[12px] text-blue-500 flex-shrink-0"}),h.jsx("span",{className:"text-gray-600 truncate",children:A.agentName||A.toolName||"Unknown"})]},A.id||g))]}),((x=e.agentOutput)==null?void 0:x.reason)&&h.jsxs("div",{children:[h.jsx("div",{className:"text-xs font-medium text-gray-400 mb-[4px]",children:"Reason"}),h.jsx("div",{className:"text-xs text-gray-600",children:e.agentOutput.reason})]})]}):w&&!b?h.jsxs("div",{className:"space-y-2",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:"text-xs text-gray-600",children:"Generated"}),h.jsxs("div",{className:"flex items-center gap-[4px] px-[8px] py-[4px] border border-gray-200 rounded text-xs",children:[h.jsx(T0,{className:"w-[12px] h-[12px] text-purple-500"}),h.jsx("span",{className:"text-gray-600",children:"Response"})]})]}),e.agentOutput.reason&&h.jsxs("div",{children:[h.jsx("div",{className:"text-xs font-medium text-gray-400 mb-[4px]",children:"Reason"}),h.jsx("div",{className:"text-xs text-gray-600",children:e.agentOutput.reason})]})]}):h.jsx("div",{className:"text-xs text-gray-500 italic",children:"No actions taken"})},v=()=>{switch(i){case"summary":return h.jsxs("div",{className:"space-y-2",children:[h.jsxs("div",{className:"border-b border-gray-100 pb-[8px]",children:[h.jsx("div",{className:"text-xs font-medium text-gray-400 mb-[8px]",children:"Input"}),h.jsx("div",{className:"text-xs text-gray-900",children:typeof e.userInput=="string"?e.userInput:typeof e.agentInput=="string"?e.agentInput:e.agentInput?h.jsx("pre",{className:"font-mono text-xs",children:JSON.stringify(e.agentInput,null,2)}):"No input available"})]}),h.jsxs("div",{className:"border-b border-gray-100 pb-2",children:[h.jsx("div",{className:"text-xs font-medium text-gray-400 mb-[4px]",children:"Action"}),y()]}),e.agentOutput&&h.jsxs("div",{children:[h.jsx("div",{className:"text-xs font-medium text-gray-400 mb-[4px]",children:"Output"}),h.jsx("div",{className:"max-h-[250px] overflow-y-auto pr-[8px] relative",children:h.jsx("div",{className:"text-xs text-gray-900 whitespace-pre-wrap",children:typeof e.agentOutput=="string"?e.agentOutput:e.agentOutput.message||JSON.stringify(e.agentOutput,null,2)})})]})]});case"request":return h.jsxs("div",{className:"relative",children:[h.jsxs("div",{className:"bg-gray-50 border-t border-gray-200 px-[16px] py-[8px] flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center gap-[8px]",children:[h.jsx(fa,{className:"w-[16px] h-[16px] text-gray-400"}),h.jsx(xf,{className:"w-[16px] h-[16px] text-gray-400"})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Us,{className:"w-[16px] h-[16px] text-gray-400 cursor-pointer hover:text-gray-600"}),h.jsx(ca,{className:"w-[16px] h-[16px] text-gray-400 cursor-pointer hover:text-gray-600"})]})]}),h.jsx("div",{className:"bg-gray-50 p-[12px] font-mono text-xs overflow-x-auto",children:h.jsx("pre",{className:"text-gray-700",children:JSON.stringify(e.agentInput||e.userInput||e.toolInput||{},null,2)})})]});case"response":return h.jsxs("div",{className:"relative",children:[h.jsxs("div",{className:"bg-gray-50 border-t border-gray-200 px-[16px] py-[8px] flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center gap-[8px]",children:[h.jsx(fa,{className:"w-[16px] h-[16px] text-gray-400"}),h.jsx(xf,{className:"w-[16px] h-[16px] text-gray-400"})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Us,{className:"w-[16px] h-[16px] text-gray-400 cursor-pointer hover:text-gray-600"}),h.jsx(ca,{className:"w-[16px] h-[16px] text-gray-400 cursor-pointer hover:text-gray-600"})]})]}),h.jsx("div",{className:"bg-gray-50 p-[12px] font-mono text-xs overflow-x-auto",children:h.jsx("pre",{className:"text-gray-700",children:JSON.stringify(e.agentOutput||e.toolOutput||{},null,2)})})]});case"guardrails":return h.jsx("div",{className:"p-[12px] text-xs text-gray-600",children:"No guardrail violations detected."});case"logs":return h.jsxs("div",{className:"p-[12px] font-mono text-xs text-gray-700 space-y-1",children:[e.startTime&&h.jsxs("div",{children:[new Date(e.startTime).toISOString()," - ",e.nodeType==="tool"?"Tool":"Agent"," execution started"]}),e.nodeType==="tool"&&e.toolName&&h.jsxs("div",{children:[new Date(e.startTime).toISOString()," - Executing ",e.toolName]}),e.status==="completed"&&h.jsxs("div",{children:[new Date(e.endTime||e.startTime).toISOString()," - Response received"]}),e.endTime&&h.jsxs("div",{children:[new Date(e.endTime).toISOString()," - ",e.nodeType==="tool"?"Tool":"Agent"," execution completed"]})]});default:return null}};return h.jsxs("div",{className:"bg-white w-full border-t border-gray-200",children:[h.jsx("div",{className:`flex items-center py-[8px] px-[8px] relative transition-colors cursor-pointer w-full
275
+ `,onClick:c,children:h.jsxs("div",{className:"flex items-center gap-[6px] w-full",children:[h.jsx("div",{className:"p-[2px] rounded hover:bg-gray-200 cursor-pointer flex-shrink-0 bg-white z-[2]",onClick:b=>{b.stopPropagation(),l?u(b):n&&n(e)},title:l?r?"Collapse":"Expand":"Show details",children:h.jsx(Sf,{className:`w-[12px] h-[12px] text-gray-600 transition-transform ${l&&r?"rotate-90":""}`})}),h.jsx("div",{className:"flex-shrink-0",children:d()}),h.jsx("span",{className:"font-semibold text-gray-900 text-xs truncate w-full",children:e.agentName}),h.jsxs("div",{className:"flex items-center gap-[12px] text-[10px] text-gray-500",children:[e.llm&&h.jsx("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:e.llm}),e.duration&&h.jsxs("div",{className:"flex items-center gap-[4px]",children:[h.jsx(Af,{className:"w-[12px] h-[12px]"}),h.jsx("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:p(e.duration)})]}),e.tokens&&h.jsxs("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:[e.tokens," Tokens"]})]}),h.jsx("div",{className:"flex-shrink-0",children:f()})]})}),s&&h.jsxs("div",{className:"w-full pl-[32px] relative",children:[h.jsx("div",{className:"absolute top-[-40px] left-[16px] w-[1px] border-l border-dashed border-gray-200 h-[calc(100%+40px)] z-[1]"}),h.jsxs("div",{className:"px-[4px] py-[8px] w-full border-t border-gray-200",children:[h.jsx("div",{className:"bg-gray-50 rounded-[4px] p-[4px] inline-flex gap-[4px] mb-[8px] border border-gray-200",children:m().map(b=>h.jsx("button",{onClick:()=>o(b),className:`px-[8px] py-[4px] text-xs font-medium rounded-[4px] text-gray-500 hover:text-gray-700 hover:shadow-tab hover:bg-white transition-colors ${i===b?"bg-white text-gray-900 shadow-tab":"text-gray-500 hover:text-gray-700 hover:bg-white"}`,children:b.charAt(0).toUpperCase()+b.slice(1)},b))}),h.jsx("div",{className:"px-[4px]",children:v()})]})]}),r&&l&&h.jsxs("div",{className:"w-full pl-[32px] relative",children:[h.jsx("div",{className:"absolute top-[-40px] left-[16px] w-[1px] border-l border-dashed border-gray-200 h-[calc(100%+40px)] z-[1]"}),e.children.map(b=>h.jsx(Kb,{node:b,onToggle:t,isExpanded:b.isExpanded,onNodeClick:n,selectedNodeIds:a},b.id))]})]})}const qb=T.forwardRef(({executionEvents:e,sessionId:t,onNodeExpand:r,onNodeCollapse:n,className:a=""},i)=>{const[o,s]=T.useState(new Set),[l,u]=T.useState(new Set),[c,f]=T.useState(new Set),[d,p]=T.useState(e),m=T.useRef(0),y=T.useRef(null),v=T.useRef(!1);T.useImperativeHandle(i,()=>({addEvent:P=>{p(_=>[..._,P]),v.current=!0},addEvents:P=>{p(_=>[..._,...P]),v.current=!0},clearEvents:()=>{p([]),s(new Set),u(new Set),f(new Set),v.current=!1}}),[]);const b=T.useMemo(()=>{const P=Vb.buildSessionTree(d,t);return y.current=P,P},[d,t]),w=T.useRef(null);T.useEffect(()=>{d.length>m.current&&w.current&&setTimeout(()=>{w.current&&w.current.scrollTo({top:w.current.scrollHeight,behavior:"smooth"})},100),m.current=d.length},[d.length]),T.useEffect(()=>{if(d.length>0&&b.runs.length>0){if(v.current){const _=M(b);s(new Set(_)),v.current=!1}f(_=>{const I=new Set(_);return b.runs.forEach($=>{I.has($.runId)||I.add($.runId)}),I});const P=b.runs[b.runs.length-1];if(P.rootNodes.length>0){const _=P.rootNodes[P.rootNodes.length-1],I=C(_);I&&u($=>{const D=new Set($);return D.add(I.id),D})}}},[b]);const x=T.useCallback(P=>{s(_=>{const I=new Set(_);return I.has(P)?(I.delete(P),n==null||n(P)):(I.add(P),r==null||r(P)),I})},[r,n]),A=T.useCallback(P=>{u(_=>{const I=new Set(_);return I.has(P.id)?I.delete(P.id):I.add(P.id),I})},[]),g=T.useCallback(P=>{f(_=>{const I=new Set(_);return I.has(P)?I.delete(P):I.add(P),I})},[]),O=T.useCallback(P=>({...P,isExpanded:o.has(P.id),children:P.children.map(I=>O(I))}),[o]),S=P=>new Date(P).toLocaleTimeString(),j=P=>{navigator.clipboard.writeText(P)},C=P=>P.children.length===0?P:C(P.children[P.children.length-1]),M=P=>{const _=[],I=$=>{_.push($.id),$.children.forEach(D=>I(D))};return P.runs.forEach($=>{$.rootNodes.forEach(D=>I(D))}),_};return b.runs.length?h.jsx("div",{className:`flex flex-col h-full bg-white ${a}`,children:h.jsxs("div",{className:"flex flex-col gap-[16px] p-[24px] overflow-y-auto overflow-x-hidden",ref:w,children:[h.jsxs("div",{className:"flex items-center w-full gap-[16px]",children:[h.jsx("div",{className:"text-xs text-gray-400 whitespace-nowrap flex-shrink-0",children:"Session initiated"}),h.jsx("div",{className:"flex-1 h-[1px] border-t border-dashed border-gray-300 w-full"}),h.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-400 flex-shrink-0",children:[h.jsx("span",{children:t||"unknown"}),h.jsx("button",{className:"p-[4px] hover:bg-gray-100 rounded transition-colors",onClick:()=>j(t||"unknown"),title:"Copy session ID",children:h.jsx(ca,{className:"w-[12px] h-[12px]"})}),h.jsx("button",{className:"p-[4px] hover:bg-gray-100 rounded transition-colors",title:"Open in external viewer",children:h.jsx(Pf,{className:"w-[12px] h-[12px]"})})]})]}),b.runs.map(P=>h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsxs("div",{className:"rounded-[8px] border border-gray-300 bg-white overflow-hidden",children:[P.userInput&&h.jsxs("div",{className:"flex flex-col w-full",children:[h.jsxs("div",{className:"flex items-center gap-2 p-[8px] bg-gray-50 cursor-pointer select-none",onClick:()=>g(P.runId),title:c.has(P.runId)?"Collapse run":"Expand run",children:[h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"flex-shrink-0",children:h.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.8277 1.33398C11.3643 1.33398 11.8072 1.33396 12.168 1.36343C12.5428 1.39405 12.8872 1.45978 13.2108 1.62463C13.7125 1.8803 14.1205 2.28825 14.3762 2.79001C14.541 3.11356 14.6067 3.45803 14.6374 3.83276C14.6668 4.19356 14.6668 4.63646 14.6668 5.1731V9.0235C14.6668 9.47003 14.6668 9.83861 14.6462 10.1404C14.6249 10.4532 14.5792 10.7426 14.4638 11.0211C14.1932 11.6746 13.674 12.1937 13.0206 12.4643C12.7421 12.5797 12.4527 12.6254 12.1399 12.6467C11.8381 12.6673 11.4695 12.6673 11.023 12.6673H11.0002C10.6424 12.6673 10.5714 12.6715 10.5136 12.6852C10.4129 12.7089 10.3191 12.7558 10.2397 12.8221C10.1941 12.8602 10.1481 12.9145 9.9335 13.2007L8.94888 14.5135C8.88665 14.5965 8.81628 14.6904 8.74857 14.7657C8.6739 14.8487 8.54979 14.971 8.36264 15.0438C8.1295 15.1344 7.87083 15.1344 7.6377 15.0438C7.45054 14.971 7.32641 14.8487 7.25174 14.7657C7.18403 14.6904 7.11368 14.5965 7.05145 14.5135L6.06683 13.2007C5.85221 12.9145 5.80624 12.8602 5.76065 12.8221C5.68119 12.7558 5.58739 12.7089 5.48666 12.6852C5.42887 12.6715 5.35786 12.6673 5.00015 12.6673H4.9773C4.53078 12.6673 4.16221 12.6673 3.86047 12.6467C3.54762 12.6254 3.25822 12.5797 2.97968 12.4643C2.32627 12.1937 1.80712 11.6746 1.53647 11.0211C1.42109 10.7426 1.37541 10.4532 1.35407 10.1404C1.33348 9.83861 1.33349 9.47003 1.3335 9.0235V5.17313C1.33349 4.63648 1.33347 4.19356 1.36295 3.83276C1.39356 3.45803 1.45929 3.11356 1.62415 2.79001C1.87981 2.28825 2.28776 1.8803 2.78952 1.62463C3.11308 1.45978 3.45755 1.39405 3.83228 1.36343C4.19307 1.33396 4.63599 1.33398 5.17264 1.33398H10.8277ZM10.4715 4.52924C10.2112 4.2689 9.78906 4.26889 9.52872 4.52924L6.66681 7.39114V5.6673C6.6668 5.29912 6.36834 5.00064 6.00015 5.00064C5.63197 5.00064 5.33351 5.29912 5.3335 5.6673V9.00064C5.3335 9.17745 5.40373 9.34702 5.52875 9.47205C5.65377 9.59707 5.82334 9.6673 6.00015 9.6673H9.3335L9.35068 9.66708C9.71092 9.65796 10.0002 9.36308 10.0002 9.00064C10.0001 8.63821 9.71092 8.34332 9.35068 8.3342L9.3335 8.33398H7.60962L10.4715 5.47205C10.7319 5.2117 10.7319 4.78958 10.4715 4.52924Z",fill:"#079455"})}),h.jsx("span",{className:"flex-1 text-xs text-gray-900 truncate",children:P.userInput}),h.jsx(Qr,{className:`w-[16px] h-[16px] text-gray-400 flex-shrink-0 transition-transform ${c.has(P.runId)?"rotate-180":""}`})]}),c.has(P.runId)&&P.attachments&&P.attachments.length>0&&h.jsx("div",{className:"flex flex-wrap overflow-hidden gap-[12px] p-[8px] border-t border-gray-200",children:P.attachments.map((_,I)=>h.jsxs("div",{className:"flex items-center gap-[4px] text-xs font-medium text-gray-600 overflow-hidden",children:[h.jsx(x0,{className:"w-[16px] h-[16px] text-gray-400 flex-shrink-0"}),h.jsx("span",{className:"truncate overflow-hidden",title:_.fileName,children:_.fileName})]},I))})]}),c.has(P.runId)&&h.jsx("div",{className:"bg-white w-full flex flex-col",children:P.rootNodes&&P.rootNodes.map(_=>h.jsx("div",{className:"w-full",children:h.jsx(Kb,{node:O(_),onToggle:x,isExpanded:o.has(_.id),onNodeClick:A,selectedNodeIds:l})},_.id))}),c.has(P.runId)&&P.finalOutput&&h.jsxs("div",{className:"p-[8px] bg-gray-50 flex items-center gap-[8px] w-full border-t border-gray-200",children:[h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"flex-shrink-0",children:h.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.8277 1.33398C11.3643 1.33398 11.8072 1.33396 12.168 1.36343C12.5428 1.39405 12.8872 1.45978 13.2108 1.62463C13.7125 1.8803 14.1205 2.28825 14.3762 2.79001C14.541 3.11356 14.6067 3.45803 14.6374 3.83276C14.6668 4.19356 14.6668 4.63646 14.6668 5.1731V9.0235C14.6668 9.47003 14.6668 9.83861 14.6462 10.1404C14.6249 10.4532 14.5792 10.7426 14.4638 11.0211C14.1932 11.6746 13.674 12.1937 13.0206 12.4643C12.7421 12.5797 12.4527 12.6254 12.1399 12.6467C11.8381 12.6673 11.4695 12.6673 11.023 12.6673H11.0002C10.6424 12.6673 10.5714 12.6715 10.5136 12.6852C10.4129 12.7089 10.3191 12.7558 10.2397 12.8221C10.1941 12.8602 10.1481 12.9145 9.9335 13.2007L8.94888 14.5135C8.88665 14.5965 8.81628 14.6904 8.74857 14.7657C8.6739 14.8487 8.54979 14.971 8.36264 15.0438C8.1295 15.1344 7.87083 15.1344 7.6377 15.0438C7.45054 14.971 7.32641 14.8487 7.25174 14.7657C7.18403 14.6904 7.11368 14.5965 7.05145 14.5135L6.06683 13.2007C5.85221 12.9145 5.80624 12.8602 5.76065 12.8221C5.68119 12.7558 5.58739 12.7089 5.48666 12.6852C5.42887 12.6715 5.35786 12.6673 5.00015 12.6673H4.9773C4.53078 12.6673 4.16221 12.6673 3.86047 12.6467C3.54762 12.6254 3.25822 12.5797 2.97968 12.4643C2.32627 12.1937 1.80712 11.6746 1.53647 11.0211C1.42109 10.7426 1.37541 10.4532 1.35407 10.1404C1.33348 9.83861 1.33349 9.47003 1.3335 9.0235V5.17313C1.33349 4.63648 1.33347 4.19356 1.36295 3.83276C1.39356 3.45803 1.45929 3.11356 1.62415 2.79001C1.87981 2.28825 2.28776 1.8803 2.78952 1.62463C3.11308 1.45978 3.45755 1.39405 3.83228 1.36343C4.19307 1.33396 4.63599 1.33398 5.17264 1.33398H10.8277ZM6.66653 4.33398C6.29835 4.334 5.99988 4.63246 5.99988 5.00064C5.99988 5.36882 6.29835 5.66729 6.66653 5.6673H8.39041L5.52847 8.52924C5.26813 8.78958 5.26813 9.2117 5.52847 9.47205C5.78882 9.73239 6.21093 9.73239 6.47128 9.47205L9.33322 6.61011V8.33398C9.33323 8.70217 9.6317 9.00064 9.99988 9.00064C10.3681 9.00064 10.6665 8.70217 10.6665 8.33398V5.00064C10.6665 4.63821 10.3773 4.34333 10.0171 4.3342L9.99988 4.33398H6.66653Z",fill:"#155EEF"})}),h.jsx("span",{className:"flex-1 text-xs text-gray-900 truncate",title:P.finalOutput,children:P.finalOutput}),h.jsx(Af,{className:"w-[12px] h-[12px] flex-shrink-0 text-gray-400"}),h.jsx("span",{className:"truncate text-[10px] text-gray-500 overflow-hidden flex-shrink-0",children:P.endTime?S(P.endTime):"In progress"})]})]}),h.jsxs("div",{className:"flex items-center justify-end gap-2 py-1",children:[h.jsx("span",{className:"text-xs text-gray-400",children:P.runId}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("button",{className:"p-1 hover:bg-gray-100 rounded transition-colors",onClick:()=>j(P.runId),title:"Copy run ID",children:h.jsx(ca,{className:"w-3 h-3 text-gray-400"})}),h.jsx("button",{className:"p-1 hover:bg-gray-100 rounded transition-colors",title:"Open run in external viewer",children:h.jsx(Pf,{className:"w-3 h-3 text-gray-400"})})]})]})]},P.runId))]})}):h.jsx("div",{className:`flex flex-col h-full ${a}`,children:h.jsx("div",{className:"flex items-center justify-center h-full",children:h.jsx("p",{className:"text-gray-500 text-sm",children:"No execution events to display"})})})});qb.displayName="DebugPanel";const Hb=({value:e,onChange:t,language:r="text",readOnly:n=!1,placeholder:a="",className:i,autoFocus:o=!1})=>{const[s,l]=T.useState(e),[u,c]=T.useState(!1),[f,d]=T.useState(!1),p=T.useRef(null);T.useEffect(()=>{l(e)},[e]);function m(){navigator.clipboard.writeText(s).then(()=>{d(!0),setTimeout(()=>d(!1),1500)})}function y(x){const A=x.target.value;l(A),t==null||t(A)}const v=()=>h.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b bg-gray-100",children:[h.jsx("span",{className:"text-xs font-mono uppercase text-gray-500",children:r}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("button",{type:"button",className:"p-1 rounded hover:bg-gray-200",onClick:m,title:f?"Copied!":"Copy",children:h.jsx(ca,{size:16,className:f?"text-green-500":""})}),h.jsx("button",{type:"button",className:"p-1 rounded hover:bg-gray-200",onClick:()=>c(!u),title:u?"Minimize":"Maximize",children:u?h.jsx(O0,{size:16}):h.jsx(Us,{size:16})})]})]}),b=()=>h.jsx("textarea",{ref:p,spellCheck:!1,readOnly:n,placeholder:a,autoFocus:o,className:"flex-1 w-full h-full resize-none p-3 font-mono text-sm outline-none bg-transparent",value:s,onChange:y}),w=h.jsxs("div",{className:se("flex flex-col h-full w-full border rounded-md bg-background",i),style:{minHeight:"200px"},children:[h.jsx(v,{}),h.jsx(b,{})]});return u?h.jsx(pf,{children:h.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4",children:h.jsx("div",{className:"w-full h-full max-h-[calc(100vh-2rem)]",children:w})})}):w};Hb.displayName="CodeEditor";const Yb=T.forwardRef(({className:e,...t},r)=>h.jsx("span",{ref:r,className:se("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Yb.displayName="Avatar";const Xb=T.forwardRef(({className:e,...t},r)=>h.jsx("img",{ref:r,className:se("aspect-square h-full w-full",e),...t}));Xb.displayName="AvatarImage";const Zb=T.forwardRef(({className:e,...t},r)=>h.jsx("span",{ref:r,className:se("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Zb.displayName="AvatarFallback";const Jb=T.forwardRef(({className:e,children:t,...r},n)=>h.jsx("div",{ref:n,className:se("rounded-lg border bg-card text-card-foreground shadow-sm",e),...r,children:t}));Jb.displayName="Card";const eW=T.forwardRef(({className:e,children:t,...r},n)=>h.jsx("div",{ref:n,className:se("flex flex-col space-y-1.5 p-6",e),...r,children:t}));eW.displayName="CardHeader";const tW=T.forwardRef(({className:e,children:t,...r},n)=>h.jsx("h3",{ref:n,className:se("text-2xl font-semibold leading-none tracking-tight",e),...r,children:t}));tW.displayName="CardTitle";const rW=T.forwardRef(({className:e,children:t,...r},n)=>h.jsx("div",{ref:n,className:se("p-6 pt-0",e),...r,children:t}));rW.displayName="CardContent";const Rs=["Portfolio Analysis Expert","Mortgage Evaluator","Credit Risk Specialist","Asset Valuation Analyst","Liability Assessment Advisor"],Bs=["calculate-creditScore","calculate-risk","calculate-mortgage","analyse-expenses","fetch-statement"],Fs=["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"],nW=(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),p=Math.floor(d*12+Math.random()*500),m=Math.floor(d*8+Math.random()*300),y=Math.floor(p*.3+Math.random()*100),v=Math.floor(p*.25+Math.random()*80),b=Math.floor(p*.2+Math.random()*60),w=Math.floor(p*.15+Math.random()*50),x={};Rs.forEach(O=>{const S=O.replace(/\s+/g,"").toLowerCase(),j=Math.floor(d/Rs.length);x[S]=Math.floor(j+Math.random()*(j*.5))});const A={};Bs.forEach(O=>{const S=O.replace(/[-]/g,""),j=Math.floor(p/Bs.length);A[S]=Math.floor(j+Math.random()*(j*.8))});const g={};Fs.forEach(O=>{const S=O.replace(/[-\.]/g,""),j=Math.floor(m/Fs.length);g[S]=Math.floor(j+Math.random()*(j*.6))}),t.push({date:a.toISOString().split("T")[0],users:o,sessions:s,messages:l,totalTokens:u,inputTokens:c,outputTokens:f,agentRuns:d,toolRuns:p,modelRuns:m,codeTools:y,workflowTools:v,knowledgeTools:b,mcpTools:w,...x,...A,...g,value:o})}return t},aW=()=>{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 Rs.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},iW=()=>{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 Bs.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]}))},oW=()=>Fs.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=nW(),sW=aW(),lW=iW(),uW=oW(),cW={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:sW,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"},...Rs.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:lW,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"},...Bs.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:uW,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"},...Fs.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}}]},Yt={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"]}},fW={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"}},dW={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"}},pW={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"}},Qb=(e,t)=>e.primary[t%e.primary.length],Ai=(e,t)=>e.semantic[t],hW=(e,t)=>{var r;return((r=e.gradients)==null?void 0:r[t])||[e.primary[0],e.primary[1]]},e0=(e,t=Yt)=>e.map((r,n)=>({...r,color:Qb(t,n)})),Ws=((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),p=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:p,modelRuns:m,value:o})}return t})(),vW={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:Ws,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:Ws,lines:e0([{dataKey:"agentRuns",label:"Agent Runs"},{dataKey:"toolRuns",label:"Tool Runs"},{dataKey:"modelRuns",label:"Model Runs"},{dataKey:"totalTokens",label:"Total Tokens"}],Yt),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:Ws,lines:[{dataKey:"users",color:Ai(Yt,"success"),label:"Successful Operations",strokeWidth:3},{dataKey:"sessions",color:Ai(Yt,"warning"),label:"Warning Events",strokeWidth:2},{dataKey:"messages",color:Ai(Yt,"error"),label:"Error Events",strokeWidth:2},{dataKey:"totalTokens",color:Ai(Yt,"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:Ws,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}}]},mW={manualColors:{line1:"#8b5cf6",line2:"#06b6d4",line3:"#f97316",line4:"#10b981"},paletteColors:Yt.primary,semanticColors:Yt.semantic,gradientColors:Yt.gradients},yW={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()-7*24*60*60*1e3).toISOString(),toTimestamp:new Date().toISOString()},refreshInterval:3e4},gW={id:"agentic-analytics-dashboard",title:"Dashboard",subtitle:"Monitor and review the usage of your agentic app",sections:[{id:"usage-analytics",title:"Session Analytics",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:"Execution Analytics",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"}],defaultValue:"7d"},export:{enabled:!1,formats:["csv","json"],onExport:e=>{console.log(`Exporting in ${e} format`)}}},layout:{columns:12,gap:24,responsive:!0}},bW=`
215
276
  // In your Angular component (usage-analytics.component.ts)
216
277
  import { Dashboard, apiEnabledDashboardConfig, agenticAppConfig } from '@agentic/ui-libs';
217
278
 
@@ -270,4 +331,4 @@ export class AnalyticsDashboardComponent implements OnInit, AfterViewInit, OnDes
270
331
  }
271
332
  }
272
333
  }
273
- `;le.AgentListView=mb,le.AnalyticsChart=hb,le.AnalyticsTable=vb,le.ApiInvokerService=Ob,le.Button=sf,le.ChartSkeleton=pb,le.Dashboard=MU,le.DashboardApiService=Ht,le.DashboardSection=Tb,le.DateRangePicker=Db,le.EndpointsConfigService=wb,le.MetricCard=_f,le.MetricCardSkeleton=gi,le.ModelListView=bb,le.Portal=Nb,le.RunsSlider=xb,le.SectionControls=Ab,le.Select=js,le.Skeleton=ta,le.ToolListView=gb,le.ViewRenderer=Sb,le.agenticAppConfig=HU,le.angularIntegrationExample=XU,le.apiEnabledDashboardConfig=YU,le.autoAssignColors=Lb,le.businessPalette=GU,le.cn=ue,le.colorExamples=qU,le.darkPalette=UU,le.defaultPalette=Yt,le.enhancedDashboardConfig=VU,le.getColorFromPalette=Ib,le.getGradientColors=KU,le.getSemanticColor=Si,le.lightPalette=zU,le.sampleDashboardConfig=WU,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});
334
+ `;oe.AgentListView=Pb,oe.AnalyticsChart=Sb,oe.AnalyticsTable=Tb,oe.ApiInvokerService=$b,oe.Avatar=Yb,oe.AvatarFallback=Zb,oe.AvatarImage=Xb,oe.Button=cf,oe.Card=Jb,oe.ChartSkeleton=Ob,oe.CodeEditor=Hb,oe.Dashboard=QF,oe.DashboardApiService=Ht,oe.DashboardSection=Db,oe.DateRangePicker=Gb,oe.DebugPanel=qb,oe.EndpointsConfigService=Cb,oe.IconPreview=$s,oe.MetricCard=If,oe.MetricCardSkeleton=xi,oe.ModelListView=_b,oe.MultiSelect=Mb,oe.Portal=pf,oe.RunsSlider=Eb,oe.SectionControls=Nb,oe.Select=ks,oe.Skeleton=ra,oe.ToolListView=jb,oe.TreeBuilder=Vb,oe.ViewRenderer=kb,oe.agenticAppConfig=yW,oe.angularIntegrationExample=bW,oe.apiEnabledDashboardConfig=gW,oe.autoAssignColors=e0,oe.businessPalette=pW,oe.cn=se,oe.colorExamples=mW,oe.darkPalette=fW,oe.defaultPalette=Yt,oe.enhancedDashboardConfig=vW,oe.getColorFromPalette=Qb,oe.getGradientColors=hW,oe.getSemanticColor=Ai,oe.lightPalette=dW,oe.sampleDashboardConfig=cW,Object.defineProperty(oe,Symbol.toStringTag,{value:"Module"})});