agentic-ui-libs 0.3.0-beta.3 → 0.3.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/ui-libs.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -21994,7 +21994,7 @@ const Fa = ({
|
|
|
21994
21994
|
] }),
|
|
21995
21995
|
h.length === 0 && /* @__PURE__ */ p.jsx("div", { className: "text-center py-[32px] text-gray-500", children: u ? "No results found for your search." : "No data available." })
|
|
21996
21996
|
] });
|
|
21997
|
-
}, xu = "
|
|
21997
|
+
}, xu = window.location.protocol + "//" + window.location.host, ZB = (e, t) => {
|
|
21998
21998
|
switch (e) {
|
|
21999
21999
|
case "human":
|
|
22000
22000
|
return t === "agent" ? "agent-avatars" : "avatars";
|
package/dist/ui-libs.umd.js
CHANGED
|
@@ -282,7 +282,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
282
282
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BL(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 FL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function UL(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 WL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gy(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,qy(n.key),n)}}function zL(e,t,r){return t&&Gy(e.prototype,t),r&&Gy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function VL(e,t,r){return t=bs(t),GL(e,Hy()?Reflect.construct(t,r||[],bs(e).constructor):t.apply(e,r))}function GL(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 HL(e)}function HL(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Hy=function(){return!!e})()}function bs(e){return bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bs(e)}function qL(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 Bt(e,t,r){return t=qy(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qy(e){var t=KL(e,"string");return Kn(t)=="symbol"?t:t+""}function KL(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 mi=function(e){function t(){var r;WL(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=VL(this,t,[].concat(a)),Bt(r,"state",{isAnimationFinished:!0,totalLength:0}),Bt(r,"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),Bt(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,m=[],v=0,g=0;v<l.length;g+=l[v],++v)if(g+l[v]>f){m=[].concat(Yn(l.slice(0,v)),[f-g]);break}var h=m.length%2===0?[0,d]:[d];return[].concat(Yn(t.repeat(l,c)),Yn(m),h).map(function(b){return"".concat(b,"px")}).join(", ")}),Bt(r,"id",kr("recharts-line-")),Bt(r,"pathRef",function(o){r.mainCurve=o}),Bt(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Bt(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return qL(t,e),zL(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,kn);if(!f)return null;var d=function(g,h){return{x:g.x,y:g.y,value:g.value,errorVal:Je(g.payload,h)}},m={clipPath:n?"url(#clipPath-".concat(a,")"):null};return O.createElement(we,m,f.map(function(v){return O.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=he(this.props,!1),d=he(l,!0),m=u.map(function(g,h){var b=bt(bt(bt({key:"dot-".concat(h),r:3},f),d),{},{index:h,cx:g.x,cy:g.y,value:g.value,dataKey:c,payload:g.payload,points:u});return t.renderDotItem(l,b)}),v={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return O.createElement(we,hi({className:"recharts-line-dots",key:"dots"},v),m)}},{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=zy(s,DL),d=bt(bt(bt({},he(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 O.createElement(Hr,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,m=o.animationId,v=o.animateNewValues,g=o.width,h=o.height,b=this.state,S=b.prevPoints,x=b.totalLength;return O.createElement(Lt,{begin:c,duration:f,isActive:u,easing:d,from:{t:0},to:{t:1},key:"line-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(T){var y=T.t;if(S){var w=S.length/s.length,A=s.map(function(E,F){var B=Math.floor(F*w);if(S[B]){var z=S[B],k=ze(z.x,E.x),M=ze(z.y,E.y);return bt(bt({},E),{},{x:k(y),y:M(y)})}if(v){var V=ze(g*2,E.x),K=ze(h/2,E.y);return bt(bt({},E),{},{x:V(y),y:K(y)})}return bt(bt({},E),{},{x:E.x,y:E.y})});return i.renderCurveStatically(A,n,a)}var P=ze(0,x),C=P(y),R;if(l){var j="".concat(l).split(/[,\s]+/gim).map(function(E){return parseFloat(E)});R=i.getStrokeDasharray(C,x,j)}else R=i.generateSimpleStrokeDasharray(x,C);return i.renderCurveStatically(s,n,a,{strokeDasharray:R})})}},{key:"renderCurve",value:function(n,a){var i=this.props,o=i.points,s=i.isAnimationActive,l=this.state,u=l.prevPoints,c=l.totalLength;return s&&o&&o.length&&(!u&&c>0||!Ur(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,m=a.width,v=a.height,g=a.isAnimationActive,h=a.id;if(i||!s||!s.length)return null;var b=this.state.isAnimationFinished,S=s.length===1,x=ve("recharts-line",l),T=u&&u.allowDataOverflow,y=c&&c.allowDataOverflow,w=T||y,A=pe(h)?this.id:h,P=(n=he(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},C=P.r,R=C===void 0?3:C,j=P.strokeWidth,E=j===void 0?2:j,F=gd(o)?o:{},B=F.clipDot,z=B===void 0?!0:B,k=R*2+E;return O.createElement(we,{className:x},T||y?O.createElement("defs",null,O.createElement("clipPath",{id:"clipPath-".concat(A)},O.createElement("rect",{x:T?d:d-m/2,y:y?f:f-v/2,width:T?m:m*2,height:y?v:v*2})),!z&&O.createElement("clipPath",{id:"clipPath-dots-".concat(A)},O.createElement("rect",{x:d-k/2,y:f-k/2,width:m+k,height:v+k}))):null,!S&&this.renderCurve(w,A),this.renderErrorBar(w,A),(S||o)&&this.renderDots(w,z,A),(!g||b)&&Ht.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(Yn(n),[0]):n,o=[],s=0;s<a;++s)o=[].concat(Yn(o),Yn(i));return o}},{key:"renderDotItem",value:function(n,a){var i;if(O.isValidElement(n))i=O.cloneElement(n,a);else if(me(n))i=n(a);else{var o=a.key,s=zy(a,IL),l=ve("recharts-line-dot",typeof n!="boolean"?n.className:"");i=O.createElement(Jo,hi({key:o},s,{className:l}))}return i}}])}(O.PureComponent);Bt(mi,"displayName","Line"),Bt(mi,"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}),Bt(mi,"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,m){var v=Je(d,o);return c==="horizontal"?{x:Mn({axis:r,ticks:a,bandSize:s,entry:d,index:m}),y:pe(v)?null:n.scale(v),value:v,payload:d}:{x:pe(v)?null:r.scale(v),y:Mn({axis:n,ticks:i,bandSize:s,entry:d,index:m}),value:v,payload:d}});return bt({points:f,layout:c},u)});var YL=["layout","type","stroke","connectNulls","isRange","ref"],XL=["key"],Ky;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 Yy(e,t){if(e==null)return{};var r=ZL(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 ZL(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 Xr(){return Xr=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},Xr.apply(this,arguments)}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 Tr(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){Kt(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 JL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zy(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,Qy(n.key),n)}}function QL(e,t,r){return t&&Zy(e.prototype,t),r&&Zy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function eR(e,t,r){return t=xs(t),tR(e,Jy()?Reflect.construct(t,r||[],xs(e).constructor):t.apply(e,r))}function tR(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 rR(e)}function rR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Jy=function(){return!!e})()}function xs(e){return xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xs(e)}function nR(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&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 Kt(e,t,r){return t=Qy(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qy(e){var t=aR(e,"string");return Xn(t)=="symbol"?t:t+""}function aR(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)}var jr=function(e){function t(){var r;JL(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=eR(this,t,[].concat(a)),Kt(r,"state",{isAnimationFinished:!0}),Kt(r,"id",kr("recharts-area-")),Kt(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),me(o)&&o()}),Kt(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),me(o)&&o()}),r}return nR(t,e),QL(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=he(this.props,!1),m=he(u,!0),v=c.map(function(h,b){var S=Tr(Tr(Tr({key:"dot-".concat(b),r:3},d),m),{},{index:b,cx:h.x,cy:h.y,dataKey:f,value:h.value,payload:h.payload,points:c});return t.renderDotItem(u,S)}),g={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return O.createElement(we,Xr({className:"recharts-area-dots"},g),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=wr(o.map(function(d){return d.y||0}));return re(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(wr(i.map(function(d){return d.y||0})),f)),re(f)?O.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=wr(o.map(function(d){return d.x||0}));return re(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(wr(i.map(function(d){return d.x||0})),f)),re(f)?O.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 m=Yy(s,YL);return O.createElement(we,{clipPath:i?"url(#clipPath-".concat(o,")"):null},O.createElement(Hr,Xr({},he(m,!0),{points:n,connectNulls:f,type:u,baseLine:a,layout:l,stroke:"none",className:"recharts-area-area"})),c!=="none"&&O.createElement(Hr,Xr({},he(this.props,!1),{className:"recharts-area-curve",layout:l,type:u,connectNulls:f,fill:"none",points:n})),c!=="none"&&d&&O.createElement(Hr,Xr({},he(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,m=o.animationId,v=this.state,g=v.prevPoints,h=v.prevBaseLine;return O.createElement(Lt,{begin:c,duration:f,isActive:u,easing:d,from:{t:0},to:{t:1},key:"area-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(b){var S=b.t;if(g){var x=g.length/s.length,T=s.map(function(P,C){var R=Math.floor(C*x);if(g[R]){var j=g[R],E=ze(j.x,P.x),F=ze(j.y,P.y);return Tr(Tr({},P),{},{x:E(S),y:F(S)})}return P}),y;if(re(l)&&typeof l=="number"){var w=ze(h,l);y=w(S)}else if(pe(l)||cn(l)){var A=ze(h,0);y=A(S)}else y=l.map(function(P,C){var R=Math.floor(C*x);if(h[R]){var j=h[R],E=ze(j.x,P.x),F=ze(j.y,P.y);return Tr(Tr({},P),{},{x:E(S),y:F(S)})}return P});return i.renderAreaStatically(T,y,n,a)}return O.createElement(we,null,O.createElement("defs",null,O.createElement("clipPath",{id:"animationClipPath-".concat(a)},i.renderClipRect(S))),O.createElement(we,{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||!Ur(c,o)||!Ur(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,m=a.width,v=a.height,g=a.isAnimationActive,h=a.id;if(i||!s||!s.length)return null;var b=this.state.isAnimationFinished,S=s.length===1,x=ve("recharts-area",l),T=f&&f.allowDataOverflow,y=d&&d.allowDataOverflow,w=T||y,A=pe(h)?this.id:h,P=(n=he(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},C=P.r,R=C===void 0?3:C,j=P.strokeWidth,E=j===void 0?2:j,F=gd(o)?o:{},B=F.clipDot,z=B===void 0?!0:B,k=R*2+E;return O.createElement(we,{className:x},T||y?O.createElement("defs",null,O.createElement("clipPath",{id:"clipPath-".concat(A)},O.createElement("rect",{x:T?c:c-m/2,y:y?u:u-v/2,width:T?m:m*2,height:y?v:v*2})),!z&&O.createElement("clipPath",{id:"clipPath-dots-".concat(A)},O.createElement("rect",{x:c-k/2,y:u-k/2,width:m+k,height:v+k}))):null,S?null:this.renderArea(w,A),(o||S)&&this.renderDots(w,z,A),(!g||b)&&Ht.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}}])}(O.PureComponent);Ky=jr,Kt(jr,"displayName","Area"),Kt(jr,"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"}),Kt(jr,"getBaseValue",function(e,t,r,n){var a=e.layout,i=e.baseValue,o=t.props.baseValue,s=o??i;if(re(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]}),Kt(jr,"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,m=t.layout,v=u&&u.length,g=Ky.getBaseValue(t,r,n,a),h=m==="horizontal",b=!1,S=f.map(function(T,y){var w;v?w=u[c+y]:(w=Je(T,l),Array.isArray(w)?b=!0:w=[g,w]);var A=w[1]==null||v&&Je(T,l)==null;return h?{x:Mn({axis:n,ticks:i,bandSize:s,entry:T,index:y}),y:A?null:a.scale(w[1]),value:w,payload:T}:{x:A?null:n.scale(w[1]),y:Mn({axis:a,ticks:o,bandSize:s,entry:T,index:y}),value:w,payload:T}}),x;return v||b?x=S.map(function(T){var y=Array.isArray(T.value)?T.value[0]:null;return h?{x:T.x,y:y!=null&&T.y!=null?a.scale(y):null}:{x:y!=null?n.scale(y):null,y:T.y}}):x=h?a.scale(g):n.scale(g),Tr({points:S,baseLine:x,layout:m,isRange:b},d)}),Kt(jr,"renderDotItem",function(e,t){var r;if(O.isValidElement(e))r=O.cloneElement(e,t);else if(me(e))r=e(t);else{var n=ve("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=Yy(t,XL);r=O.createElement(Jo,Xr({},i,{key:a,className:n}))}return r});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 iR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oR(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,r0(n.key),n)}}function sR(e,t,r){return t&&oR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function lR(e,t,r){return t=ws(t),uR(e,e0()?Reflect.construct(t,r||[],ws(e).constructor):t.apply(e,r))}function uR(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 cR(e)}function cR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function e0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(e0=function(){return!!e})()}function ws(e){return ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ws(e)}function fR(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&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 t0(e,t,r){return t=r0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r0(e){var t=dR(e,"string");return Zn(t)=="symbol"?t:t+""}function dR(e,t){if(Zn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Os=function(e){function t(){return iR(this,t),lR(this,t,arguments)}return fR(t,e),sR(t,[{key:"render",value:function(){return null}}])}(wt.Component);t0(Os,"displayName","ZAxis"),t0(Os,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var pR=["option","isActive"];function gi(){return gi=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},gi.apply(this,arguments)}function hR(e,t){if(e==null)return{};var r=mR(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function mR(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function gR(e){var t=e.option,r=e.isActive,n=hR(e,pR);return typeof t=="string"?wt.createElement(Tc,gi({option:wt.createElement(Xi,gi({type:t},n)),isActive:r,shapeType:"symbols"},n)):wt.createElement(Tc,gi({option:t,isActive:r,shapeType:"symbols"},n))}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 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 n0(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?n0(Object(r),!0).forEach(function(n){Pr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a0(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,o0(n.key),n)}}function yR(e,t,r){return t&&a0(e.prototype,t),r&&a0(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function bR(e,t,r){return t=Ss(t),xR(e,i0()?Reflect.construct(t,r||[],Ss(e).constructor):t.apply(e,r))}function xR(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 wR(e)}function wR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(i0=function(){return!!e})()}function Ss(e){return Ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ss(e)}function OR(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jc(e,t)}function Jc(e,t){return Jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Jc(e,t)}function Pr(e,t,r){return t=o0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o0(e){var t=SR(e,"string");return Jn(t)=="symbol"?t:t+""}function SR(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 As=function(e){function t(){var r;vR(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=bR(this,t,[].concat(a)),Pr(r,"state",{isAnimationFinished:!1}),Pr(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0})}),Pr(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1})}),Pr(r,"id",kr("recharts-scatter-")),r}return OR(t,e),yR(t,[{key:"renderSymbolsStatically",value:function(n){var a=this,i=this.props,o=i.shape,s=i.activeShape,l=i.activeIndex,u=he(this.props,!1);return n.map(function(c,f){var d=l===f,m=d?s:o,v=Et(Et({},u),c);return O.createElement(we,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)},ga(a.props,c,f),{role:"img"}),O.createElement(gR,vi({option:m,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 O.createElement(Lt,{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 m=d.t,v=i.map(function(g,h){var b=f&&f[h];if(b){var S=ze(b.cx,g.cx),x=ze(b.cy,g.cy),T=ze(b.size,g.size);return Et(Et({},g),{},{cx:S(m),cy:x(m),size:T(m)})}var y=ze(0,g.size);return Et(Et({},g),{},{size:y(m)})});return O.createElement(we,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||!Ur(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,kn);return u?u.map(function(c,f){var d=c.props,m=d.direction,v=d.dataKey;return O.cloneElement(c,{key:"".concat(m,"-").concat(v,"-").concat(i[f]),data:i,xAxis:o,yAxis:s,layout:m==="x"?"vertical":"horizontal",dataPointFormatter:function(h,b){return{x:h.cx,y:h.cy,value:m==="x"?+h.node.x:+h.node.y,errorVal:Je(h,b)}}})}):null}},{key:"renderLine",value:function(){var n=this.props,a=n.points,i=n.line,o=n.lineType,s=n.lineJointType,l=he(this.props,!1),u=he(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=K2(a),m=d.xmin,v=d.xmax,g=d.a,h=d.b,b=function(T){return g*T+h};c=[{x:m,y:b(m)},{x:v,y:b(v)}]}var S=Et(Et(Et({},l),{},{fill:"none",stroke:l&&l.fill},u),{},{points:c});return O.isValidElement(i)?f=O.cloneElement(i,S):me(i)?f=i(S):f=O.createElement(Hr,vi({},S,{type:s})),O.createElement(we,{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,m=n.height,v=n.id,g=n.isAnimationActive;if(a||!i||!i.length)return null;var h=this.state.isAnimationFinished,b=ve("recharts-scatter",s),S=l&&l.allowDataOverflow,x=u&&u.allowDataOverflow,T=S||x,y=pe(v)?this.id:v;return O.createElement(we,{className:b,clipPath:T?"url(#clipPath-".concat(y,")"):null},S||x?O.createElement("defs",null,O.createElement("clipPath",{id:"clipPath-".concat(y)},O.createElement("rect",{x:S?c:c-d/2,y:x?f:f-m/2,width:S?d:d*2,height:x?m:m*2}))):null,o&&this.renderLine(),this.renderErrorBar(),O.createElement(we,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!g||h)&&Ht.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}}])}(O.PureComponent);Pr(As,"displayName","Scatter"),Pr(As,"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"}),Pr(As,"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,eu),f=pe(t.dataKey)?a.props.dataKey:t.dataKey,d=pe(r.dataKey)?a.props.dataKey:r.dataKey,m=n&&n.dataKey,v=n?n.range:Os.defaultProps.range,g=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 y=Je(x,f),w=Je(x,d),A=!pe(m)&&Je(x,m)||"-",P=[{name:pe(t.dataKey)?a.props.name:t.name||t.dataKey,unit:t.unit||"",value:y,payload:x,dataKey:f,type:u},{name:pe(r.dataKey)?a.props.name:r.name||r.dataKey,unit:r.unit||"",value:w,payload:x,dataKey:d,type:u}];A!=="-"&&P.push({name:n.name||n.dataKey,unit:n.unit||"",value:A,payload:x,dataKey:m,type:u});var C=Mn({axis:t,ticks:o,bandSize:h,entry:x,index:T,dataKey:f}),R=Mn({axis:r,ticks:s,bandSize:b,entry:x,index:T,dataKey:d}),j=A!=="-"?n.scale(A):g,E=Math.sqrt(Math.max(j,0)/Math.PI);return Et(Et({},x),{},{cx:C,cy:R,x:C-E,y:R-E,xAxis:t,yAxis:r,zAxis:n,width:2*E,height:2*E,size:j,node:{x:y,y:w,z:A},tooltipPayload:P,tooltipPosition:{x:C,y:R},payload:x},c&&c[T]&&c[T].props)});return Et({points:S},l)});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 AR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TR(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,u0(n.key),n)}}function jR(e,t,r){return t&&TR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function PR(e,t,r){return t=Ts(t),_R(e,s0()?Reflect.construct(t,r||[],Ts(e).constructor):t.apply(e,r))}function _R(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 ER(e)}function ER(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(s0=function(){return!!e})()}function Ts(e){return Ts=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ts(e)}function CR(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&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 l0(e,t,r){return t=u0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u0(e){var t=$R(e,"string");return Qn(t)=="symbol"?t:t+""}function $R(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)}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)}function kR(e){var t=e.xAxisId,r=Mc(),n=Dc(),a=yy(t);return a==null?null:wt.createElement(Hn,ef({},a,{className:ve("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return cr(o,!0)}}))}var js=function(e){function t(){return AR(this,t),PR(this,t,arguments)}return CR(t,e),jR(t,[{key:"render",value:function(){return wt.createElement(kR,this.props)}}])}(wt.Component);l0(js,"displayName","XAxis"),l0(js,"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 ea(e){"@babel/helpers - typeof";return ea=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ea(e)}function NR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MR(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,d0(n.key),n)}}function DR(e,t,r){return t&&MR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function IR(e,t,r){return t=Ps(t),LR(e,c0()?Reflect.construct(t,r||[],Ps(e).constructor):t.apply(e,r))}function LR(e,t){if(t&&(ea(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return RR(e)}function RR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(c0=function(){return!!e})()}function Ps(e){return Ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ps(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&&tf(e,t)}function tf(e,t){return tf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},tf(e,t)}function f0(e,t,r){return t=d0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d0(e){var t=FR(e,"string");return ea(t)=="symbol"?t:t+""}function FR(e,t){if(ea(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ea(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function rf(){return rf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rf.apply(this,arguments)}var UR=function(t){var r=t.yAxisId,n=Mc(),a=Dc(),i=by(r);return i==null?null:wt.createElement(Hn,rf({},i,{className:ve("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:a},ticksGenerator:function(s){return cr(s,!0)}}))},_s=function(e){function t(){return NR(this,t),IR(this,t,arguments)}return BR(t,e),DR(t,[{key:"render",value:function(){return wt.createElement(UR,this.props)}}])}(wt.Component);f0(_s,"displayName","YAxis"),f0(_s,"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 p0(e){return GR(e)||VR(e)||zR(e)||WR()}function WR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
283
283
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zR(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 VR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function GR(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}var af=function(t,r,n,a,i){var o=dt(t,Bc),s=dt(t,ps),l=[].concat(p0(o),p0(s)),u=dt(t,gs),c="".concat(a,"Id"),f=a[0],d=r;if(l.length&&(d=l.reduce(function(g,h){if(h.props[c]===n&&qt(h.props,"extendDomain")&&re(h.props[f])){var b=h.props[f];return[Math.min(g[0],b),Math.max(g[1],b)]}return g},d)),u.length){var m="".concat(f,"1"),v="".concat(f,"2");d=u.reduce(function(g,h){if(h.props[c]===n&&qt(h.props,"extendDomain")&&re(h.props[m])&&re(h.props[v])){var b=h.props[m],S=h.props[v];return[Math.min(g[0],b,S),Math.max(g[1],b,S)]}return g},d)}return i&&i.length&&(d=i.reduce(function(g,h){return re(h)?[Math.min(g[0],h),Math.max(g[1],h)]:g},d)),d},h0={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 m=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],m]:l._events[v].push(m):(l._events[v]=m,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,m=f.length,v=new Array(m);d<m;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,m,v){var g=r?r+u:u;if(!this._events[g])return!1;var h=this._events[g],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,m),!0;case 6:return h.fn.call(h.context,c,f,d,m,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,y;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(y=1,S=new Array(b-1);y<b;y++)S[y-1]=arguments[y];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 m=r?r+u:u;if(!this._events[m])return this;if(!c)return o(this,m),this;var v=this._events[m];if(v.fn)v.fn===c&&(!d||v.once)&&(!f||v.context===f)&&o(this,m);else{for(var g=0,h=[],b=v.length;g<b;g++)(v[g].fn!==c||d&&!v[g].once||f&&v[g].context!==f)&&h.push(v[g]);h.length?this._events[m]=h.length===1?h[0]:h:o(this,m)}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})(h0);var HR=h0.exports;const qR=De(HR);var of=new qR,sf="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 KR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YR(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,m0(n.key),n)}}function XR(e,t,r){return t&&YR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function lf(e,t,r){return t=m0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m0(e){var t=ZR(e,"string");return yi(t)=="symbol"?t:t+""}function ZR(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 JR=function(){function e(){KR(this,e),lf(this,"activeIndex",0),lf(this,"coordinateList",[]),lf(this,"layout","horizontal")}return XR(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,m=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=m??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 QR(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&&re(n)&&re(a))return!0}return!1}function eB(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 g0(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 tB(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),m=nt(s,l,c,f);n=d.x,a=d.y,i=m.x,o=m.y}else return g0(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 v0(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 Es(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?v0(Object(r),!0).forEach(function(n){rB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rB(e,t,r){return t=nB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nB(e){var t=aB(e,"string");return bi(t)=="symbol"?t:t+""}function aB(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 iB(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,m=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!m||!i||!o||d!=="ScatterChart"&&a!=="axis")return null;var v,g=Hr;if(d==="ScatterChart")v=o,g=CD;else if(d==="BarChart")v=eB(f,o,l,c),g=Oc;else if(f==="radial"){var h=g0(o),b=h.cx,S=h.cy,x=h.radius,T=h.startAngle,y=h.endAngle;v={cx:b,cy:S,startAngle:T,endAngle:y,innerRadius:x,outerRadius:x},g=zg}else v={points:tB(f,o,l)},g=Hr;var w=Es(Es(Es(Es({stroke:"#ccc",pointerEvents:"none"},l),v),he(m,!1)),{},{payload:s,payloadIndex:u,className:ve("recharts-tooltip-cursor",m.className)});return O.isValidElement(m)?O.cloneElement(m,w):O.createElement(g,w)}var oB=["item"],sB=["children","className","width","height","style","compact","title","desc"];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 ra(){return ra=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},ra.apply(this,arguments)}function y0(e,t){return cB(e)||uB(e,t)||w0(e,t)||lB()}function lB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
284
284
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uB(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 cB(e){if(Array.isArray(e))return e}function b0(e,t){if(e==null)return{};var r=fB(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 fB(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function dB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pB(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,S0(n.key),n)}}function hB(e,t,r){return t&&pB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mB(e,t,r){return t=Cs(t),gB(e,x0()?Reflect.construct(t,r||[],Cs(e).constructor):t.apply(e,r))}function gB(e,t){if(t&&(ta(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vB(e)}function vB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(x0=function(){return!!e})()}function Cs(e){return Cs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Cs(e)}function yB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uf(e,t)}function uf(e,t){return uf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},uf(e,t)}function na(e){return wB(e)||xB(e)||w0(e)||bB()}function bB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
285
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w0(e,t){if(e){if(typeof e=="string")return cf(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 cf(e,t)}}function xB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wB(e){if(Array.isArray(e))return cf(e)}function cf(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 O0(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?O0(Object(r),!0).forEach(function(n){ce(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ce(e,t,r){return t=S0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S0(e){var t=OB(e,"string");return ta(t)=="symbol"?t:t+""}function OB(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 SB={xAxis:["bottom","top"],yAxis:["left","right"]},AB={width:"100%",height:"100%"},A0={x:0,y:0};function $s(e){return e}var TB=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},jB=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),nt(a.cx,a.cy,s,o)),{},{angle:o,radius:s})}var l=i.coordinate,u=a.angle;return Z(Z(Z({},a),nt(a.cx,a.cy,l,u)),{},{angle:u,radius:l})}return A0},ks=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(na(s),na(u)):s},[]);return o.length>0?o:t&&t.length&&re(a)&&re(i)?t.slice(a,i+1):[]};function T0(e){return e==="number"?[0,"auto"]:void 0}var ff=function(t,r,n,a){var i=t.graphicalItems,o=t.tooltipAxis,s=ks(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 m=f===void 0?s:f;d=Ri(m,o.dataKey,a)}else d=f&&f[n]||s[n];return d?[].concat(na(l),[$g(u,d)]):l},[])},j0=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},o=TB(i,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,c=s4(o,s,u,l);if(c>=0&&u){var f=u[c]&&u[c].value,d=ff(t,r,c,f),m=jB(n,s,c,i);return{activeTooltipIndex:c,activeLabel:f,activePayload:d,activeCoordinate:m}}return null},PB=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,m=Sg(c,i);return n.reduce(function(v,g){var h,b=g.type.defaultProps!==void 0?Z(Z({},g.type.defaultProps),g.props):g.props,S=b.type,x=b.dataKey,T=b.allowDataOverflow,y=b.allowDuplicatedCategory,w=b.scale,A=b.ticks,P=b.includeHidden,C=b[o];if(v[C])return v;var R=ks(t.data,{graphicalItems:a.filter(function(U){var H,L=o in U.props?U.props[o]:(H=U.type.defaultProps)===null||H===void 0?void 0:H[o];return L===C}),dataStartIndex:l,dataEndIndex:u}),j=R.length,E,F,B;QR(b.domain,T,S)&&(E=Qu(b.domain,null,T),m&&(S==="number"||w!=="auto")&&(B=Ga(R,x,"category")));var z=T0(S);if(!E||E.length===0){var k,M=(k=b.domain)!==null&&k!==void 0?k:z;if(x){if(E=Ga(R,x,S),S==="category"&&m){var V=q2(E);y&&V?(F=E,E=ns(0,j)):y||(E=Cg(M,E,g).reduce(function(U,H){return U.indexOf(H)>=0?U:[].concat(na(U),[H])},[]))}else if(S==="category")y?E=E.filter(function(U){return U!==""&&!pe(U)}):E=Cg(M,E,g).reduce(function(U,H){return U.indexOf(H)>=0||H===""||pe(H)?U:[].concat(na(U),[H])},[]);else if(S==="number"){var K=d4(R,a.filter(function(U){var H,L,G=o in U.props?U.props[o]:(H=U.type.defaultProps)===null||H===void 0?void 0:H[o],Y="hide"in U.props?U.props.hide:(L=U.type.defaultProps)===null||L===void 0?void 0:L.hide;return G===C&&(P||!Y)}),x,i,c);K&&(E=K)}m&&(S==="number"||w!=="auto")&&(B=Ga(R,x,"category"))}else m?E=ns(0,j):s&&s[C]&&s[C].hasStack&&S==="number"?E=d==="expand"?[0,1]:Pg(s[C].stackGroups,l,u):E=Og(R,a.filter(function(U){var H=o in U.props?U.props[o]:U.type.defaultProps[o],L="hide"in U.props?U.props.hide:U.type.defaultProps.hide;return H===C&&(P||!L)}),S,c,!0);if(S==="number")E=af(f,E,C,i,A),M&&(E=Qu(M,E,T));else if(S==="category"&&M){var _=M,I=E.every(function(U){return _.indexOf(U)>=0});I&&(E=_)}}return Z(Z({},v),{},ce({},C,Z(Z({},b),{},{axisType:i,domain:E,categoricalDomain:B,duplicateDomain:F,originalDomain:(h=b.domain)!==null&&h!==void 0?h:z,isCategorical:m,layout:c})))},{})},_B=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=ks(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),m=d.length,v=Sg(c,i),g=-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=T0("number");if(!h[x]){g++;var y;return v?y=ns(0,m):s&&s[x]&&s[x].hasStack?(y=Pg(s[x].stackGroups,l,u),y=af(f,y,x,i)):(y=Qu(T,Og(d,n.filter(function(w){var A,P,C=o in w.props?w.props[o]:(A=w.type.defaultProps)===null||A===void 0?void 0:A[o],R="hide"in w.props?w.props.hide:(P=w.type.defaultProps)===null||P===void 0?void 0:P.hide;return C===x&&!R}),"number",c),a.defaultProps.allowDataOverflow),y=af(f,y,x,i)),Z(Z({},h),{},ce({},x,Z(Z({axisType:i},a.defaultProps),{},{hide:!0,orientation:Ot(SB,"".concat(i,".").concat(g%2),null),domain:y,originalDomain:T,isCategorical:v,layout:c})))}return h},{})},EB=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),m={};return d&&d.length?m=PB(t,{axes:d,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(m=_B(t,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),m},CB=function(t){var r=mr(t),n=cr(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Hl(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Fo(r,n)}},P0=function(t){var r=t.children,n=t.defaultShowTooltip,a=gt(r,Ln),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}},$B=function(t){return!t||!t.length?!1:t.some(function(r){var n=er(r&&r.type);return n&&n.indexOf("Bar")>=0})},_0=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"}},kB=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||{},m=gt(f,Ln),v=gt(f,yn),g=Object.keys(l).reduce(function(y,w){var A=l[w],P=A.orientation;return!A.mirror&&!A.hide?Z(Z({},y),{},ce({},P,y[P]+A.width)):y},{left:d.left||0,right:d.right||0}),h=Object.keys(o).reduce(function(y,w){var A=o[w],P=A.orientation;return!A.mirror&&!A.hide?Z(Z({},y),{},ce({},P,Ot(y,"".concat(P))+A.height)):y},{top:d.top||0,bottom:d.bottom||0}),b=Z(Z({},h),g),S=b.bottom;m&&(b.bottom+=m.props.height||Ln.defaultProps.height),v&&r&&(b=c4(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)})},NB=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},MB=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,y=S.offset,w=S.updateId,A=S.dataStartIndex,P=S.dataEndIndex,C=b.barSize,R=b.layout,j=b.barGap,E=b.barCategoryGap,F=b.maxBarSize,B=_0(R),z=B.numericAxisName,k=B.cateAxisName,M=$B(x),V=[];return x.forEach(function(K,_){var I=ks(b.data,{graphicalItems:[K],dataStartIndex:A,dataEndIndex:P}),U=K.type.defaultProps!==void 0?Z(Z({},K.type.defaultProps),K.props):K.props,H=U.dataKey,L=U.maxBarSize,G=U["".concat(z,"Id")],Y=U["".concat(k,"Id")],te={},D=l.reduce(function(Ge,ut){var Pi,_i,sa=S["".concat(ut.axisType,"Map")],Ei=U["".concat(ut.axisType,"Id")];sa&&sa[Ei]||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=K==null||(_i=K.type)===null||_i===void 0?void 0:_i.displayName)!==null&&Pi!==void 0?Pi:"")):ht());var Ci=sa[Ei];return Z(Z({},Ge),{},ce(ce({},ut.axisType,Ci),"".concat(ut.axisType,"Ticks"),cr(Ci)))},te),W=D[k],q=D["".concat(k,"Ticks")],J=T&&T[G]&&T[G].hasStack&&A4(K,T[G].stackGroups),$=er(K.type).indexOf("Bar")>=0,Q=Fo(W,q),X=[],se=M&&l4({barSize:C,stackGroups:T,totalSize:NB(D,k)});if($){var ne,fe,ue=pe(L)?F:L,Ee=(ne=(fe=Fo(W,q,!0))!==null&&fe!==void 0?fe:ue)!==null&&ne!==void 0?ne:0;X=u4({barGap:j,barCategoryGap:E,bandSize:Ee!==Q?Ee:Q,sizeList:se[Y],maxBarSize:ue}),Ee!==Q&&(X=X.map(function(Ge){return Z(Z({},Ge),{},{position:Z(Z({},Ge.position),{},{offset:Ge.position.offset-Ee/2})})}))}var Oe=K&&K.type&&K.type.getComposedData;Oe&&V.push({props:Z(Z({},Oe(Z(Z({},D),{},{displayedData:I,props:b,dataKey:H,item:K,bandSize:Q,barPosition:X,offset:y,stackedData:J,layout:R,dataStartIndex:A,dataEndIndex:P}))),{},ce(ce(ce({key:K.key||"item-".concat(_)},z,D[z]),k,D[k]),"animationId",w)),childIndex:oO(K,b.children),item:K})}),V},m=function(b,S){var x=b.props,T=b.dataStartIndex,y=b.dataEndIndex,w=b.updateId;if(!md({props:x}))return null;var A=x.children,P=x.layout,C=x.stackOffset,R=x.data,j=x.reverseStackOrder,E=_0(P),F=E.numericAxisName,B=E.cateAxisName,z=dt(A,n),k=w4(R,z,"".concat(F,"Id"),"".concat(B,"Id"),C,j),M=l.reduce(function(U,H){var L="".concat(H.axisType,"Map");return Z(Z({},U),{},ce({},L,EB(x,Z(Z({},H),{},{graphicalItems:z,stackGroups:H.axisType===F&&k,dataStartIndex:T,dataEndIndex:y}))))},{}),V=kB(Z(Z({},M),{},{props:x,graphicalItems:z}),S==null?void 0:S.legendBBox);Object.keys(M).forEach(function(U){M[U]=c(x,M[U],V,U.replace("Map",""),r)});var K=M["".concat(B,"Map")],_=CB(K),I=d(x,Z(Z({},M),{},{dataStartIndex:T,dataEndIndex:y,updateId:w,graphicalItems:z,stackGroups:k,offset:V}));return Z(Z({formattedGraphicalItems:I,graphicalItems:z,offset:V,stackGroups:k},_),M)},v=function(h){function b(S){var x,T,y;return dB(this,b),y=mB(this,b,[S]),ce(y,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ce(y,"accessibilityManager",new JR),ce(y,"handleLegendBBoxUpdate",function(w){if(w){var A=y.state,P=A.dataStartIndex,C=A.dataEndIndex,R=A.updateId;y.setState(Z({legendBBox:w},m({props:y.props,dataStartIndex:P,dataEndIndex:C,updateId:R},Z(Z({},y.state),{},{legendBBox:w}))))}}),ce(y,"handleReceiveSyncEvent",function(w,A,P){if(y.props.syncId===w){if(P===y.eventEmitterSymbol&&typeof y.props.syncMethod!="function")return;y.applySyncEvent(A)}}),ce(y,"handleBrushChange",function(w){var A=w.startIndex,P=w.endIndex;if(A!==y.state.dataStartIndex||P!==y.state.dataEndIndex){var C=y.state.updateId;y.setState(function(){return Z({dataStartIndex:A,dataEndIndex:P},m({props:y.props,dataStartIndex:A,dataEndIndex:P,updateId:C},y.state))}),y.triggerSyncEvent({dataStartIndex:A,dataEndIndex:P})}}),ce(y,"handleMouseEnter",function(w){var A=y.getMouseInfo(w);if(A){var P=Z(Z({},A),{},{isTooltipActive:!0});y.setState(P),y.triggerSyncEvent(P);var C=y.props.onMouseEnter;me(C)&&C(P,w)}}),ce(y,"triggeredAfterMouseMove",function(w){var A=y.getMouseInfo(w),P=A?Z(Z({},A),{},{isTooltipActive:!0}):{isTooltipActive:!1};y.setState(P),y.triggerSyncEvent(P);var C=y.props.onMouseMove;me(C)&&C(P,w)}),ce(y,"handleItemMouseEnter",function(w){y.setState(function(){return{isTooltipActive:!0,activeItem:w,activePayload:w.tooltipPayload,activeCoordinate:w.tooltipPosition||{x:w.cx,y:w.cy}}})}),ce(y,"handleItemMouseLeave",function(){y.setState(function(){return{isTooltipActive:!1}})}),ce(y,"handleMouseMove",function(w){w.persist(),y.throttleTriggeredAfterMouseMove(w)}),ce(y,"handleMouseLeave",function(w){y.throttleTriggeredAfterMouseMove.cancel();var A={isTooltipActive:!1};y.setState(A),y.triggerSyncEvent(A);var P=y.props.onMouseLeave;me(P)&&P(A,w)}),ce(y,"handleOuterEvent",function(w){var A=iO(w),P=Ot(y.props,"".concat(A));if(A&&me(P)){var C,R;/.*touch.*/i.test(A)?R=y.getMouseInfo(w.changedTouches[0]):R=y.getMouseInfo(w),P((C=R)!==null&&C!==void 0?C:{},w)}}),ce(y,"handleClick",function(w){var A=y.getMouseInfo(w);if(A){var P=Z(Z({},A),{},{isTooltipActive:!0});y.setState(P),y.triggerSyncEvent(P);var C=y.props.onClick;me(C)&&C(P,w)}}),ce(y,"handleMouseDown",function(w){var A=y.props.onMouseDown;if(me(A)){var P=y.getMouseInfo(w);A(P,w)}}),ce(y,"handleMouseUp",function(w){var A=y.props.onMouseUp;if(me(A)){var P=y.getMouseInfo(w);A(P,w)}}),ce(y,"handleTouchMove",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&y.throttleTriggeredAfterMouseMove(w.changedTouches[0])}),ce(y,"handleTouchStart",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&y.handleMouseDown(w.changedTouches[0])}),ce(y,"handleTouchEnd",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&y.handleMouseUp(w.changedTouches[0])}),ce(y,"handleDoubleClick",function(w){var A=y.props.onDoubleClick;if(me(A)){var P=y.getMouseInfo(w);A(P,w)}}),ce(y,"handleContextMenu",function(w){var A=y.props.onContextMenu;if(me(A)){var P=y.getMouseInfo(w);A(P,w)}}),ce(y,"triggerSyncEvent",function(w){y.props.syncId!==void 0&&of.emit(sf,y.props.syncId,w,y.eventEmitterSymbol)}),ce(y,"applySyncEvent",function(w){var A=y.props,P=A.layout,C=A.syncMethod,R=y.state.updateId,j=w.dataStartIndex,E=w.dataEndIndex;if(w.dataStartIndex!==void 0||w.dataEndIndex!==void 0)y.setState(Z({dataStartIndex:j,dataEndIndex:E},m({props:y.props,dataStartIndex:j,dataEndIndex:E,updateId:R},y.state)));else if(w.activeTooltipIndex!==void 0){var F=w.chartX,B=w.chartY,z=w.activeTooltipIndex,k=y.state,M=k.offset,V=k.tooltipTicks;if(!M)return;if(typeof C=="function")z=C(V,w);else if(C==="value"){z=-1;for(var K=0;K<V.length;K++)if(V[K].value===w.activeLabel){z=K;break}}var _=Z(Z({},M),{},{x:M.left,y:M.top}),I=Math.min(F,_.x+_.width),U=Math.min(B,_.y+_.height),H=V[z]&&V[z].value,L=ff(y.state,y.props.data,z),G=V[z]?{x:P==="horizontal"?V[z].coordinate:I,y:P==="horizontal"?U:V[z].coordinate}:A0;y.setState(Z(Z({},w),{},{activeLabel:H,activeCoordinate:G,activePayload:L,activeTooltipIndex:z}))}else y.setState(w)}),ce(y,"renderCursor",function(w){var A,P=y.state,C=P.isTooltipActive,R=P.activeCoordinate,j=P.activePayload,E=P.offset,F=P.activeTooltipIndex,B=P.tooltipAxisBandSize,z=y.getTooltipEventType(),k=(A=w.props.active)!==null&&A!==void 0?A:C,M=y.props.layout,V=w.key||"_recharts-cursor";return O.createElement(iB,{key:V,activeCoordinate:R,activePayload:j,activeTooltipIndex:F,chartName:r,element:w,isActive:k,layout:M,offset:E,tooltipAxisBandSize:B,tooltipEventType:z})}),ce(y,"renderPolarAxis",function(w,A,P){var C=Ot(w,"type.axisType"),R=Ot(y.state,"".concat(C,"Map")),j=w.type.defaultProps,E=j!==void 0?Z(Z({},j),w.props):w.props,F=R&&R[E["".concat(C,"Id")]];return O.cloneElement(w,Z(Z({},F),{},{className:ve(C,F.className),key:w.key||"".concat(A,"-").concat(P),ticks:cr(F,!0)}))}),ce(y,"renderPolarGrid",function(w){var A=w.props,P=A.radialLines,C=A.polarAngles,R=A.polarRadius,j=y.state,E=j.radiusAxisMap,F=j.angleAxisMap,B=mr(E),z=mr(F),k=z.cx,M=z.cy,V=z.innerRadius,K=z.outerRadius;return O.cloneElement(w,{polarAngles:Array.isArray(C)?C:cr(z,!0).map(function(_){return _.coordinate}),polarRadius:Array.isArray(R)?R:cr(B,!0).map(function(_){return _.coordinate}),cx:k,cy:M,innerRadius:V,outerRadius:K,key:w.key||"polar-grid",radialLines:P})}),ce(y,"renderLegend",function(){var w=y.state.formattedGraphicalItems,A=y.props,P=A.children,C=A.width,R=A.height,j=y.props.margin||{},E=C-(j.left||0)-(j.right||0),F=yg({children:P,formattedGraphicalItems:w,legendWidth:E,legendContent:u});if(!F)return null;var B=F.item,z=b0(F,oB);return O.cloneElement(B,Z(Z({},z),{},{chartWidth:C,chartHeight:R,margin:j,onBBoxUpdate:y.handleLegendBBoxUpdate}))}),ce(y,"renderTooltip",function(){var w,A=y.props,P=A.children,C=A.accessibilityLayer,R=gt(P,Wt);if(!R)return null;var j=y.state,E=j.isTooltipActive,F=j.activeCoordinate,B=j.activePayload,z=j.activeLabel,k=j.offset,M=(w=R.props.active)!==null&&w!==void 0?w:E;return O.cloneElement(R,{viewBox:Z(Z({},k),{},{x:k.left,y:k.top}),active:M,label:z,payload:M?B:[],coordinate:F,accessibilityLayer:C})}),ce(y,"renderBrush",function(w){var A=y.props,P=A.margin,C=A.data,R=y.state,j=R.offset,E=R.dataStartIndex,F=R.dataEndIndex,B=R.updateId;return O.cloneElement(w,{key:w.key||"_recharts-brush",onChange:Bo(y.handleBrushChange,w.props.onChange),data:C,x:re(w.props.x)?w.props.x:j.left,y:re(w.props.y)?w.props.y:j.top+j.height+j.brushBottom-(P.bottom||0),width:re(w.props.width)?w.props.width:j.width,startIndex:E,endIndex:F,updateId:"brush-".concat(B)})}),ce(y,"renderReferenceElement",function(w,A,P){if(!w)return null;var C=y,R=C.clipPathId,j=y.state,E=j.xAxisMap,F=j.yAxisMap,B=j.offset,z=w.type.defaultProps||{},k=w.props,M=k.xAxisId,V=M===void 0?z.xAxisId:M,K=k.yAxisId,_=K===void 0?z.yAxisId:K;return O.cloneElement(w,{key:w.key||"".concat(A,"-").concat(P),xAxis:E[V],yAxis:F[_],viewBox:{x:B.left,y:B.top,width:B.width,height:B.height},clipPathId:R})}),ce(y,"renderActivePoints",function(w){var A=w.item,P=w.activePoint,C=w.basePoint,R=w.childIndex,j=w.isRange,E=[],F=A.props.key,B=A.item.type.defaultProps!==void 0?Z(Z({},A.item.type.defaultProps),A.item.props):A.item.props,z=B.activeDot,k=B.dataKey,M=Z(Z({index:R,dataKey:k,cx:P.x,cy:P.y,r:4,fill:Zu(A.item),strokeWidth:2,stroke:"#fff",payload:P.payload,value:P.value},he(z,!1)),Bi(z));return E.push(b.renderActiveDot(z,M,"".concat(F,"-activePoint-").concat(R))),C?E.push(b.renderActiveDot(z,Z(Z({},M),{},{cx:C.x,cy:C.y}),"".concat(F,"-basePoint-").concat(R))):j&&E.push(null),E}),ce(y,"renderGraphicChild",function(w,A,P){var C=y.filterFormatItem(w,A,P);if(!C)return null;var R=y.getTooltipEventType(),j=y.state,E=j.isTooltipActive,F=j.tooltipAxis,B=j.activeTooltipIndex,z=j.activeLabel,k=y.props.children,M=gt(k,Wt),V=C.props,K=V.points,_=V.isRange,I=V.baseLine,U=C.item.type.defaultProps!==void 0?Z(Z({},C.item.type.defaultProps),C.item.props):C.item.props,H=U.activeDot,L=U.hide,G=U.activeBar,Y=U.activeShape,te=!!(!L&&E&&M&&(H||G||Y)),D={};R!=="axis"&&M&&M.props.trigger==="click"?D={onClick:Bo(y.handleItemMouseEnter,w.props.onClick)}:R!=="axis"&&(D={onMouseLeave:Bo(y.handleItemMouseLeave,w.props.onMouseLeave),onMouseEnter:Bo(y.handleItemMouseEnter,w.props.onMouseEnter)});var W=O.cloneElement(w,Z(Z({},C.props),D));function q(ut){return typeof F.dataKey=="function"?F.dataKey(ut.payload):null}if(te)if(B>=0){var J,$;if(F.dataKey&&!F.allowDuplicatedCategory){var Q=typeof F.dataKey=="function"?q:"payload.".concat(F.dataKey.toString());J=Ri(K,Q,z),$=_&&I&&Ri(I,Q,z)}else J=K==null?void 0:K[B],$=_&&I&&I[B];if(Y||G){var X=w.props.activeIndex!==void 0?w.props.activeIndex:B;return[O.cloneElement(w,Z(Z(Z({},C.props),D),{},{activeIndex:X})),null,null]}if(!pe(J))return[W].concat(na(y.renderActivePoints({item:C,activePoint:J,basePoint:$,childIndex:B,isRange:_})))}else{var se,ne=(se=y.getItemByXY(y.state.activeCoordinate))!==null&&se!==void 0?se:{graphicalItem:W},fe=ne.graphicalItem,ue=fe.item,Ee=ue===void 0?w:ue,Oe=fe.childIndex,Ge=Z(Z(Z({},C.props),D),{},{activeIndex:Oe});return[O.cloneElement(Ee,Ge),null,null]}return _?[W,null,null]:[W,null]}),ce(y,"renderCustomized",function(w,A,P){return O.cloneElement(w,Z(Z({key:"recharts-customized-".concat(P)},y.props),y.state))}),ce(y,"renderMap",{CartesianGrid:{handler:$s,once:!0},ReferenceArea:{handler:y.renderReferenceElement},ReferenceLine:{handler:$s},ReferenceDot:{handler:y.renderReferenceElement},XAxis:{handler:$s},YAxis:{handler:$s},Brush:{handler:y.renderBrush,once:!0},Bar:{handler:y.renderGraphicChild},Line:{handler:y.renderGraphicChild},Area:{handler:y.renderGraphicChild},Radar:{handler:y.renderGraphicChild},RadialBar:{handler:y.renderGraphicChild},Scatter:{handler:y.renderGraphicChild},Pie:{handler:y.renderGraphicChild},Funnel:{handler:y.renderGraphicChild},Tooltip:{handler:y.renderCursor,once:!0},PolarGrid:{handler:y.renderPolarGrid,once:!0},PolarAngleAxis:{handler:y.renderPolarAxis},PolarRadiusAxis:{handler:y.renderPolarAxis},Customized:{handler:y.renderCustomized}}),y.clipPathId="".concat((x=S.id)!==null&&x!==void 0?x:kr("recharts"),"-clip"),y.throttleTriggeredAfterMouseMove=mh(y.triggeredAfterMouseMove,(T=S.throttleDelay)!==null&&T!==void 0?T:1e3/60),y.state={},y}return yB(b,h),hB(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,y=x.data,w=x.height,A=x.layout,P=gt(T,Wt);if(P){var C=P.props.defaultIndex;if(!(typeof C!="number"||C<0||C>this.state.tooltipTicks.length-1)){var R=this.state.tooltipTicks[C]&&this.state.tooltipTicks[C].value,j=ff(this.state,y,C,R),E=this.state.tooltipTicks[C].coordinate,F=(this.state.offset.top+w)/2,B=A==="horizontal",z=B?{x:E,y:F}:{y:E,x:F},k=this.state.formattedGraphicalItems.find(function(V){var K=V.item;return K.type.name==="Scatter"});k&&(z=Z(Z({},z),k.props.points[C].tooltipPosition),j=k.props.points[C].tooltipPayload);var M={activeTooltipIndex:C,isTooltipActive:!0,activeLabel:R,activePayload:j,activeCoordinate:z};this.setState(M),this.renderCursor(P),this.accessibilityManager.setIndex(C)}}}},{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 y,w;this.accessibilityManager.setDetails({offset:{left:(y=this.props.margin.left)!==null&&y!==void 0?y:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0}})}return null}},{key:"componentDidUpdate",value:function(x){fl([gt(x.children,Wt)],[gt(this.props.children,Wt)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=gt(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,y=T.getBoundingClientRect(),w=M3(y),A={chartX:Math.round(x.pageX-w.left),chartY:Math.round(x.pageY-w.top)},P=y.width/T.offsetWidth||1,C=this.inRange(A.chartX,A.chartY,P);if(!C)return null;var R=this.state,j=R.xAxisMap,E=R.yAxisMap,F=this.getTooltipEventType(),B=j0(this.state,this.props.data,this.props.layout,C);if(F!=="axis"&&j&&E){var z=mr(j).scale,k=mr(E).scale,M=z&&z.invert?z.invert(A.chartX):null,V=k&&k.invert?k.invert(A.chartY):null;return Z(Z({},A),{},{xValue:M,yValue:V},B)}return B?Z(Z({},A),B):null}},{key:"inRange",value:function(x,T){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,w=this.props.layout,A=x/y,P=T/y;if(w==="horizontal"||w==="vertical"){var C=this.state.offset,R=A>=C.left&&A<=C.left+C.width&&P>=C.top&&P<=C.top+C.height;return R?{x:A,y:P}:null}var j=this.state,E=j.angleAxisMap,F=j.radiusAxisMap;if(E&&F){var B=mr(E);return Mg({x:A,y:P},B)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,T=this.getTooltipEventType(),y=gt(x,Wt),w={};y&&T==="axis"&&(y.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 A=Bi(this.props,this.handleOuterEvent);return Z(Z({},A),w)}},{key:"addListener",value:function(){of.on(sf,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){of.removeListener(sf,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,T,y){for(var w=this.state.formattedGraphicalItems,A=0,P=w.length;A<P;A++){var C=w[A];if(C.item===x||C.props.key===x.key||T===er(C.item.type)&&y===C.childIndex)return C}return null}},{key:"renderClipPath",value:function(){var x=this.clipPathId,T=this.state.offset,y=T.left,w=T.top,A=T.height,P=T.width;return O.createElement("defs",null,O.createElement("clipPath",{id:x},O.createElement("rect",{x:y,y:w,height:A,width:P})))}},{key:"getXScales",value:function(){var x=this.state.xAxisMap;return x?Object.entries(x).reduce(function(T,y){var w=y0(y,2),A=w[0],P=w[1];return Z(Z({},T),{},ce({},A,P.scale))},{}):null}},{key:"getYScales",value:function(){var x=this.state.yAxisMap;return x?Object.entries(x).reduce(function(T,y){var w=y0(y,2),A=w[0],P=w[1];return Z(Z({},T),{},ce({},A,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,y=T.formattedGraphicalItems,w=T.activeItem;if(y&&y.length)for(var A=0,P=y.length;A<P;A++){var C=y[A],R=C.props,j=C.item,E=j.type.defaultProps!==void 0?Z(Z({},j.type.defaultProps),j.props):j.props,F=er(j.type);if(F==="Bar"){var B=(R.data||[]).find(function(V){return xD(x,V)});if(B)return{graphicalItem:C,payload:B}}else if(F==="RadialBar"){var z=(R.data||[]).find(function(V){return Mg(x,V)});if(z)return{graphicalItem:C,payload:z}}else if(ts(C,w)||rs(C,w)||ui(C,w)){var k=OI({graphicalItem:C,activeTooltipItem:w,itemData:E.data}),M=E.activeIndex===void 0?k:E.activeIndex;return{graphicalItem:Z(Z({},C),{},{childIndex:M}),payload:ui(C,w)?E.data[k]:C.props.data[k]}}}return null}},{key:"render",value:function(){var x=this;if(!md(this))return null;var T=this.props,y=T.children,w=T.className,A=T.width,P=T.height,C=T.style,R=T.compact,j=T.title,E=T.desc,F=b0(T,sB),B=he(F,!1);if(R)return O.createElement(gy,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},O.createElement(pl,ra({},B,{width:A,height:P,title:j,desc:E}),this.renderClipPath(),yd(y,this.renderMap)));if(this.props.accessibilityLayer){var z,k;B.tabIndex=(z=this.props.tabIndex)!==null&&z!==void 0?z:0,B.role=(k=this.props.role)!==null&&k!==void 0?k:"application",B.onKeyDown=function(V){x.accessibilityManager.keyboardEvent(V)},B.onFocus=function(){x.accessibilityManager.focus()}}var M=this.parseEventsOfWrapper();return O.createElement(gy,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},O.createElement("div",ra({className:ve("recharts-wrapper",w),style:Z({position:"relative",cursor:"default",width:A,height:P},C)},M,{ref:function(K){x.container=K}}),O.createElement(pl,ra({},B,{width:A,height:P,title:j,desc:E,style:AB}),this.renderClipPath(),yd(y,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(O.Component);ce(v,"displayName",r),ce(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)),ce(v,"getDerivedStateFromProps",function(h,b){var S=h.dataKey,x=h.data,T=h.children,y=h.width,w=h.height,A=h.layout,P=h.stackOffset,C=h.margin,R=b.dataStartIndex,j=b.dataEndIndex;if(b.updateId===void 0){var E=P0(h);return Z(Z(Z({},E),{},{updateId:0},m(Z(Z({props:h},E),{},{updateId:0}),b)),{},{prevDataKey:S,prevData:x,prevWidth:y,prevHeight:w,prevLayout:A,prevStackOffset:P,prevMargin:C,prevChildren:T})}if(S!==b.prevDataKey||x!==b.prevData||y!==b.prevWidth||w!==b.prevHeight||A!==b.prevLayout||P!==b.prevStackOffset||!fn(C,b.prevMargin)){var F=P0(h),B={chartX:b.chartX,chartY:b.chartY,isTooltipActive:b.isTooltipActive},z=Z(Z({},j0(b,x,A)),{},{updateId:b.updateId+1}),k=Z(Z(Z({},F),B),z);return Z(Z(Z({},k),m(Z({props:h},k),b)),{},{prevDataKey:S,prevData:x,prevWidth:y,prevHeight:w,prevLayout:A,prevStackOffset:P,prevMargin:C,prevChildren:T})}if(!fl(T,b.prevChildren)){var M,V,K,_,I=gt(T,Ln),U=I&&(M=(V=I.props)===null||V===void 0?void 0:V.startIndex)!==null&&M!==void 0?M:R,H=I&&(K=(_=I.props)===null||_===void 0?void 0:_.endIndex)!==null&&K!==void 0?K:j,L=U!==R||H!==j,G=!pe(x),Y=G&&!L?b.updateId:b.updateId+1;return Z(Z({updateId:Y},m(Z(Z({props:h},b),{},{updateId:Y,dataStartIndex:U,dataEndIndex:H}),b)),{},{prevChildren:T,dataStartIndex:U,dataEndIndex:H})}return null}),ce(v,"renderActiveDot",function(h,b,S){var x;return O.isValidElement(h)?x=O.cloneElement(h,b):me(h)?x=h(b):x=O.createElement(Jo,b),O.createElement(we,{className:"recharts-active-dot",key:S},x)});var g=O.forwardRef(function(b,S){return O.createElement(v,ra({},b,{ref:S}))});return g.displayName=v.displayName,g},DB=MB({chartName:"ComposedChart",GraphicalChild:[mi,jr,Fn,As],axisComponents:[{axisType:"xAxis",AxisComp:js},{axisType:"yAxis",AxisComp:_s},{axisType:"zAxis",AxisComp:Os}],formatAxisMap:q9});const aa=({className:e,width:t,height:r,rounded:n=!1})=>p.jsx("div",{className:le("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})=>p.jsxs("div",{className:le("rounded-lg border border-gray-200 bg-white p-[16px]",e),children:[p.jsxs("div",{className:"flex items-center gap-2 mb-[12px]",children:[p.jsx(aa,{className:"h-[16px] w-[64px]"}),p.jsx(aa,{className:"h-[16px] w-[16px]",rounded:!0})]}),p.jsxs("div",{className:"flex items-baseline gap-[12px]",children:[p.jsx(aa,{className:"h-[32px] w-[80px]"}),p.jsx(aa,{className:"h-[24px] w-[48px] rounded-md"})]})]}),E0=({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,m=u.x+(c.x-u.x)*.6,v=c.y;s+=` C ${f} ${d} ${m} ${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 p.jsx("div",{className:"absolute inset-0 flex items-end justify-between px-[16px] pb-[16px]",children:[...Array(7)].map((h,b)=>p.jsx(aa,{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 p.jsx("div",{className:"absolute inset-0 p-[16px]",children:p.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[p.jsxs("defs",{children:[p.jsxs("linearGradient",{id:"skeleton-area-fill",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[p.jsx("stop",{offset:"0%",stopColor:"#8b5cf6",stopOpacity:"0.1",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.1;0.15;0.1",dur:"3s",repeatCount:"indefinite"})}),p.jsx("stop",{offset:"100%",stopColor:"#8b5cf6",stopOpacity:"0.02",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.02;0.05;0.02",dur:"3s",repeatCount:"indefinite"})})]}),p.jsxs("linearGradient",{id:"skeleton-line-shimmer",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[p.jsx("stop",{offset:"0%",stopColor:"#e2e8f0",stopOpacity:"0.3",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2.5s",repeatCount:"indefinite"})}),p.jsx("stop",{offset:"50%",stopColor:"#cbd5e1",stopOpacity:"0.6",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.6;0.3;0.6",dur:"2.5s",repeatCount:"indefinite"})}),p.jsx("stop",{offset:"100%",stopColor:"#e2e8f0",stopOpacity:"0.3",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2.5s",repeatCount:"indefinite"})})]})]}),p.jsx("path",{d:c,fill:"url(#skeleton-area-fill)"}),p.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),m=f[f.length-1],v=f[0],g=`${d} L ${m.x} 90 L ${v.x} 90 Z`;return p.jsx("div",{className:"absolute inset-0 p-[16px]",children:p.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[p.jsxs("defs",{children:[p.jsxs("linearGradient",{id:"skeleton-area-gradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[p.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.2",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.2;0.4;0.2",dur:"2s",repeatCount:"indefinite"})}),p.jsx("stop",{offset:"100%",stopColor:"#3b82f6",stopOpacity:"0.05",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.05;0.1;0.05",dur:"2s",repeatCount:"indefinite"})})]}),p.jsxs("linearGradient",{id:"skeleton-area-line",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[p.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.4",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.4;0.8;0.4",dur:"2s",repeatCount:"indefinite"})}),p.jsx("stop",{offset:"50%",stopColor:"#3b82f6",stopOpacity:"0.8",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.8;0.4;0.8",dur:"2s",repeatCount:"indefinite"})}),p.jsx("stop",{offset:"100%",stopColor:"#3b82f6",stopOpacity:"0.4",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.4;0.8;0.4",dur:"2s",repeatCount:"indefinite"})})]})]}),p.jsx("path",{d:g,fill:"url(#skeleton-area-gradient)"}),p.jsx("path",{d:n(f),stroke:"url(#skeleton-area-line)",strokeWidth:"2.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]})});case"pie":return p.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-[16px]",children:p.jsxs("svg",{className:"w-32 h-32",viewBox:"0 0 42 42",children:[p.jsxs("defs",{children:[p.jsx("linearGradient",{id:"skeleton-pie-gradient-1",children:p.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.3",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite"})})}),p.jsx("linearGradient",{id:"skeleton-pie-gradient-2",children:p.jsx("stop",{offset:"0%",stopColor:"#10b981",stopOpacity:"0.3",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"0.5s"})})}),p.jsx("linearGradient",{id:"skeleton-pie-gradient-3",children:p.jsx("stop",{offset:"0%",stopColor:"#f59e0b",stopOpacity:"0.3",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"1s"})})}),p.jsx("linearGradient",{id:"skeleton-pie-gradient-4",children:p.jsx("stop",{offset:"0%",stopColor:"#ef4444",stopOpacity:"0.3",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"1.5s"})})})]}),p.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"#e5e7eb",strokeWidth:"3"}),p.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-1)",strokeWidth:"3",strokeDasharray:"40 60",strokeDashoffset:"25"}),p.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-2)",strokeWidth:"3",strokeDasharray:"25 75",strokeDashoffset:"65"}),p.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-3)",strokeWidth:"3",strokeDasharray:"20 80",strokeDashoffset:"90"}),p.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 p.jsx("div",{className:"absolute inset-0 p-[16px]",children:p.jsxs("div",{className:"w-full h-full relative",children:[p.jsx("div",{className:"absolute inset-0 flex items-center",children:p.jsx("div",{className:"w-full h-0.5 bg-gradient-to-r from-transparent via-gray-300 to-transparent opacity-60",children:p.jsx("div",{className:"w-full h-full bg-gradient-to-r from-transparent via-blue-400 to-transparent animate-pulse"})})}),p.jsx("div",{className:"absolute inset-0 flex items-center justify-between px-2",children:[...Array(7)].map((h,b)=>p.jsx("div",{className:"w-2 h-2 bg-blue-300 rounded-full animate-pulse",style:{animationDelay:`${b*.2}s`}},b))})]})})}};return p.jsx("div",{className:le("w-full",e),children:p.jsxs("div",{className:"relative bg-gray-50/30",children:[p.jsxs("div",{className:"relative",style:{height:`${r}px`},children:[p.jsxs("div",{className:"absolute left-0 top-0 h-full flex flex-col justify-between items-end pr-[12px]",children:[p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"})]}),p.jsxs("div",{className:"ml-14 h-full relative overflow-hidden px-0 py-2 flex flex-col justify-between",children:[t!=="pie"&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"})]}),i()]}),t!=="pie"&&p.jsxs("div",{className:"ml-[56px] flex justify-between items-center mt-[12px]",children:[p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"})]})]}),p.jsxs("div",{className:"flex items-center justify-between px-0 py-[12px] mt-[8px]",children:[p.jsx("div",{className:"flex-1",children:p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[256px]"})}),p.jsxs("div",{className:"flex items-center gap-2 w-24 justify-center",children:[p.jsx("div",{className:"w-[8px] h-[8px] bg-blue-500 rounded-full"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded flex-1"})]})]})]})})},IB=({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 p.jsxs("div",{className:le("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:[p.jsx("div",{className:le("font-medium mb-[8px]",i?"text-gray-300":"text-gray-600"),children:new Date(r||"").toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}),p.jsx("div",{className:"space-y-1",children:a.map((s,l)=>p.jsxs("div",{className:"flex items-center justify-between gap-4",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-[8px] h-[8px] rounded-full",style:{backgroundColor:s.color}}),p.jsx("span",{className:le("text-xs",i?"text-gray-300":"text-gray-600"),children:s.name})]}),p.jsx("span",{className:le("font-medium text-xs",i?"text-white":"text-gray-900"),children:typeof s.value=="number"?s.value.toLocaleString():s.value})]},l))})]})},C0=({config:e,className:t,isLoading:r,onDataPointClick:n})=>{var y,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,m=(A=>{if(!A||A.length===0)return[];const P=[...A].sort((B,z)=>{const k=new Date(B.date),M=new Date(z.date);return k.getTime()-M.getTime()});let C,R;l!=null&&l.start&&(l!=null&&l.end)?(C=new Date(l.start),R=new Date(l.end)):(C=new Date(P[0].date),R=new Date(P[P.length-1].date));const j=new Map;P.forEach(B=>{j.set(B.date,B)});const E=[],F=new Date(C);for(;F<=R;){const B=F.toISOString().split("T")[0];if(j.has(B))E.push(j.get(B));else{const z={date:B,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 k=P[0];Object.keys(k).forEach(M=>{typeof k[M]=="number"&&!(M in z)&&(z[M]=0)})}E.push(z)}F.setDate(F.getDate()+1)}return E})(a),v=A=>{const P=new Date(A);return isNaN(P.getTime())?A:P.toLocaleDateString("en-US",{month:"short",day:"numeric"})},g=()=>{if(!m||m.length===0)return 0;const A=m.length;return A<=20?0:A<=31?1:A<=61?2:Math.floor(A/7)-1},h=A=>b()&&!Number.isInteger(A)?"":A>=1e3?`${Math.floor(A/1e3)}k`:Math.floor(A).toString(),b=()=>{const A=["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&&A.some(P=>u.toLowerCase().includes(P.toLowerCase()))||i&&A.some(P=>i.toLowerCase().includes(P.toLowerCase()))||e.title&&A.some(P=>e.title.toLowerCase().includes(P.toLowerCase()))||s&&s.some(P=>P.label&&A.some(C=>P.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"),p.jsx(E0,{className:t,chartType:e.type,height:c});if(!a||a.length===0)return console.log("AnalyticsChart: No data provided",{data:a,config:e}),p.jsx("div",{className:le("w-full",t),children:p.jsxs("div",{className:"relative bg-gray-50/30",children:[p.jsxs("div",{className:"relative h-[300px] mb-6",children:[p.jsxs("div",{className:"absolute left-0 top-0 h-full flex flex-col justify-between items-end pr-3",children:[p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"})]}),p.jsxs("div",{className:"ml-14 h-full relative overflow-hidden px-0 py-2 flex flex-col justify-between",children:[p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-4",children:[p.jsx("div",{className:"bg-white border border-gray-300 rounded-[10px] w-12 h-12 flex items-center justify-center",children:p.jsx("svg",{className:"w-6 h-6 !h-6 text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:p.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"})})}),p.jsxs("div",{className:"text-center max-w-[352px]",children:[p.jsx("h3",{className:"font-semibold text-gray-900 text-base mb-1",children:"There is no data to display for this period"}),p.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."})]})]})]}),p.jsxs("div",{className:"ml-14 flex justify-between items-center mt-3",children:[p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"})]})]}),p.jsxs("div",{className:"flex items-center justify-between px-0 py-3 mt-2",children:[p.jsx("div",{className:"flex-1",children:p.jsx("div",{className:"bg-gray-100 h-3 rounded w-64"})}),p.jsxs("div",{className:"flex items-center gap-2 w-24 justify-center",children:[p.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded flex-1"})]})]})]})});const T=A=>{var C;if(!n||!A||!A.activePayload)return;const P=(C=A.activePayload[0])==null?void 0:C.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:",m.length),console.log("AnalyticsChart date range (config):",l),console.log("AnalyticsChart actual date range:",m.length>0?{first:(y=m[0])==null?void 0:y.date,last:(w=m[m.length-1])==null?void 0:w.date,totalDays:m.length}:"No data"),console.log("AnalyticsChart dataKey:",i),console.log("Chart lines configuration:",x),console.log("Sample filled data points:",m.slice(0,3)),console.log("=== END ANALYTICS CHART DEBUG ==="),p.jsxs("div",{className:le("w-full",t),children:[p.jsx("div",{className:"relative bg-gray-50/30",children:p.jsx(P3,{width:"100%",height:c,children:p.jsxs(DB,{data:m,onClick:T,margin:{top:20,right:30,left:20,bottom:20},children:[p.jsx("defs",{children:x.map((A,P)=>p.jsxs("linearGradient",{id:`gradient-${A.dataKey}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[p.jsx("stop",{offset:"5%",stopColor:A.color,stopOpacity:.08}),p.jsx("stop",{offset:"95%",stopColor:A.color,stopOpacity:.01})]},`gradient-${P}`))}),p.jsx(Wy,{strokeDasharray:"2 2",className:"opacity-30",stroke:"#d1d5db",horizontal:!0,vertical:!1}),p.jsx(js,{dataKey:"date",tickFormatter:v,axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#6b7280"},tickMargin:10,interval:g()}),p.jsx(_s,{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&&p.jsx(Wt,{content:A=>p.jsx(IB,{...A,config:e}),cursor:{stroke:"#d1d5db",strokeWidth:1,strokeDasharray:"4 4"},allowEscapeViewBox:{x:!1,y:!1}}),x.map(A=>p.jsx(jr,{type:"monotone",dataKey:A.dataKey,stroke:"none",fill:`url(#gradient-${A.dataKey})`,fillOpacity:1,isAnimationActive:!1,name:""},`area-${A.dataKey}`)),x.map(A=>p.jsx(mi,{type:"monotone",dataKey:A.dataKey,stroke:A.color,strokeWidth:2.5,strokeDasharray:A.strokeDasharray,dot:!1,activeDot:{r:5,fill:A.color,stroke:A.color,strokeWidth:2},name:A.label},A.dataKey))]})})}),p.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[p.jsx("div",{children:l&&p.jsxs("p",{className:"text-xs text-gray-500 flex items-center gap-[4px]",children:[p.jsx("span",{className:"text-gray-500",children:"Showing data from"}),p.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"})]})]})}),p.jsx("div",{className:"flex items-center gap-4",children:p.jsx("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:x.map(A=>p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-[8px] h-[8px] rounded-full",style:{backgroundColor:A.color}}),p.jsx("span",{className:"text-xs text-gray-600",children:A.label})]},A.dataKey))})})]})]})},$0=({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]=O.useState(o.defaultSort||null),[c,f]=O.useState(""),[d,m]=O.useState(1),v=O.useMemo(()=>{let y=[...n];return s.searchable&&c&&(y=y.filter(w=>a.some(A=>{const P=w[A.key];return P==null?void 0:P.toString().toLowerCase().includes(c.toLowerCase())}))),l&&y.sort((w,A)=>{const P=w[l.key],C=A[l.key];if(typeof P=="number"&&typeof C=="number")return l.order==="asc"?P-C:C-P;const R=(P==null?void 0:P.toString())||"",j=(C==null?void 0:C.toString())||"",E=R.localeCompare(j);return l.order==="asc"?E:-E}),y},[n,a,c,l,s.searchable]),g=i.enabled?Math.ceil(v.length/i.pageSize):1,h=i.enabled?v.slice((d-1)*i.pageSize,d*i.pageSize):v,b=y=>{!o.enabled||!y.sortable||u(w=>(w==null?void 0:w.key)===y.key?w.order==="asc"?{key:y.key,order:"desc"}:null:{key:y.key,order:"asc"})},S=y=>{f(y),m(1)},x=(y,w,A)=>w.render?w.render(y,A):w.formatter?w.formatter(y,A):typeof y=="number"?y.toLocaleString():(y==null?void 0:y.toString())||"-",T=y=>!o.enabled||!y.sortable?null:(l==null?void 0:l.key)===y.key?l.order==="asc"?p.jsx(jf,{className:"w-[16px] h-[16px]"}):p.jsx(fr,{className:"w-[16px] h-[16px]"}):p.jsxs("div",{className:"flex flex-col",children:[p.jsx(jf,{className:"w-[12px] h-[12px] opacity-30"}),p.jsx(fr,{className:"w-[12px] h-[12px] opacity-30 -mt-1"})]});return p.jsxs("div",{className:le("w-full",t),children:[p.jsxs("div",{className:"flex items-center justify-between mb-4",children:[p.jsx("h3",{className:"text-md font-medium text-gray-700",children:r}),s.enabled&&s.searchable&&p.jsxs("div",{className:"relative",children:[p.jsx(Nf,{className:"absolute left-[12px] top-1/2 transform -translate-y-1/2 w-[16px] h-[16px] text-gray-400"}),p.jsx("input",{type:"text",placeholder:"Search...",value:c,onChange:y=>S(y.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"})]})]}),p.jsx("div",{className:"overflow-x-auto border border-gray-200 rounded-lg",children:p.jsxs("table",{className:"w-full",children:[p.jsx("thead",{className:"bg-gray-50",children:p.jsx("tr",{children:a.map(y=>p.jsx("th",{className:le("px-[16px] py-[12px] text-left text-xs font-medium text-gray-500 uppercase tracking-wider",y.sortable&&o.enabled&&"cursor-pointer hover:bg-gray-100",y.align==="center"&&"text-center",y.align==="right"&&"text-right"),style:{width:y.width},onClick:()=>b(y),children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{children:y.title}),T(y)]})},y.key))})}),p.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:h.map((y,w)=>p.jsx("tr",{className:"hover:bg-gray-50 transition-colors",children:a.map(A=>p.jsx("td",{className:le("px-[16px] py-[12px] text-xs text-gray-900",A.align==="center"&&"text-center",A.align==="right"&&"text-right"),children:x(y[A.key],A,y)},A.key))},w))})]})}),i.enabled&&g>1&&p.jsxs("div",{className:"flex items-center justify-between mt-4",children:[p.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"]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{onClick:()=>m(y=>Math.max(1,y-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,g)},(y,w)=>{const A=Math.max(1,Math.min(g-4,d-2))+w;return A>g?null:p.jsx("button",{onClick:()=>m(A),className:le("px-[12px] py-[4px] text-xs border rounded",d===A?"bg-blue-500 text-white border-blue-500":"border-gray-200 hover:bg-gray-50"),children:A},A)}),p.jsx("button",{onClick:()=>m(y=>Math.min(g,y+1)),disabled:d===g,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&&p.jsx("div",{className:"text-center py-[32px] text-gray-500",children:c?"No results found for your search.":"No data available."})]})},df="https://staging-agent-platform.kore.ai",LB=(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"}},RB=e=>{if(!e)return null;if(typeof e=="string")try{return JSON.parse(e)}catch{return{name:e,type:"human"}}return e},BB=(e,t)=>{if(!(e!=null&&e.name))return"";if(t==="url")return e.name;if(t==="model")return"";const r=LB(e.type||"human",t);return`${df}/agenticai/assets/${r}/${e.name.replace("agent","avatar")}.svg`},k0=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"},FB={xs:"w-[24px] h-[24px] bg-gray-200 rounded-[8px] text-xs uppercase flex items-center justify-center",small:"w-[24px] h-[24px] bg-gray-200 rounded-[8px] text-xs uppercase flex items-center justify-center",medium:"w-[24px] h-[24px] bg-gray-200 rounded-[8px] text-xs uppercase flex items-center justify-center",large:"w-[24px] h-[24px] bg-gray-200 rounded-[8px] text-xs uppercase flex items-center justify-center"},Ft={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)">
|
|
285
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w0(e,t){if(e){if(typeof e=="string")return cf(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 cf(e,t)}}function xB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wB(e){if(Array.isArray(e))return cf(e)}function cf(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 O0(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?O0(Object(r),!0).forEach(function(n){ce(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ce(e,t,r){return t=S0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S0(e){var t=OB(e,"string");return ta(t)=="symbol"?t:t+""}function OB(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 SB={xAxis:["bottom","top"],yAxis:["left","right"]},AB={width:"100%",height:"100%"},A0={x:0,y:0};function $s(e){return e}var TB=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},jB=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),nt(a.cx,a.cy,s,o)),{},{angle:o,radius:s})}var l=i.coordinate,u=a.angle;return Z(Z(Z({},a),nt(a.cx,a.cy,l,u)),{},{angle:u,radius:l})}return A0},ks=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(na(s),na(u)):s},[]);return o.length>0?o:t&&t.length&&re(a)&&re(i)?t.slice(a,i+1):[]};function T0(e){return e==="number"?[0,"auto"]:void 0}var ff=function(t,r,n,a){var i=t.graphicalItems,o=t.tooltipAxis,s=ks(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 m=f===void 0?s:f;d=Ri(m,o.dataKey,a)}else d=f&&f[n]||s[n];return d?[].concat(na(l),[$g(u,d)]):l},[])},j0=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},o=TB(i,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,c=s4(o,s,u,l);if(c>=0&&u){var f=u[c]&&u[c].value,d=ff(t,r,c,f),m=jB(n,s,c,i);return{activeTooltipIndex:c,activeLabel:f,activePayload:d,activeCoordinate:m}}return null},PB=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,m=Sg(c,i);return n.reduce(function(v,g){var h,b=g.type.defaultProps!==void 0?Z(Z({},g.type.defaultProps),g.props):g.props,S=b.type,x=b.dataKey,T=b.allowDataOverflow,y=b.allowDuplicatedCategory,w=b.scale,A=b.ticks,P=b.includeHidden,C=b[o];if(v[C])return v;var R=ks(t.data,{graphicalItems:a.filter(function(U){var H,L=o in U.props?U.props[o]:(H=U.type.defaultProps)===null||H===void 0?void 0:H[o];return L===C}),dataStartIndex:l,dataEndIndex:u}),j=R.length,E,F,B;QR(b.domain,T,S)&&(E=Qu(b.domain,null,T),m&&(S==="number"||w!=="auto")&&(B=Ga(R,x,"category")));var z=T0(S);if(!E||E.length===0){var k,M=(k=b.domain)!==null&&k!==void 0?k:z;if(x){if(E=Ga(R,x,S),S==="category"&&m){var V=q2(E);y&&V?(F=E,E=ns(0,j)):y||(E=Cg(M,E,g).reduce(function(U,H){return U.indexOf(H)>=0?U:[].concat(na(U),[H])},[]))}else if(S==="category")y?E=E.filter(function(U){return U!==""&&!pe(U)}):E=Cg(M,E,g).reduce(function(U,H){return U.indexOf(H)>=0||H===""||pe(H)?U:[].concat(na(U),[H])},[]);else if(S==="number"){var K=d4(R,a.filter(function(U){var H,L,G=o in U.props?U.props[o]:(H=U.type.defaultProps)===null||H===void 0?void 0:H[o],Y="hide"in U.props?U.props.hide:(L=U.type.defaultProps)===null||L===void 0?void 0:L.hide;return G===C&&(P||!Y)}),x,i,c);K&&(E=K)}m&&(S==="number"||w!=="auto")&&(B=Ga(R,x,"category"))}else m?E=ns(0,j):s&&s[C]&&s[C].hasStack&&S==="number"?E=d==="expand"?[0,1]:Pg(s[C].stackGroups,l,u):E=Og(R,a.filter(function(U){var H=o in U.props?U.props[o]:U.type.defaultProps[o],L="hide"in U.props?U.props.hide:U.type.defaultProps.hide;return H===C&&(P||!L)}),S,c,!0);if(S==="number")E=af(f,E,C,i,A),M&&(E=Qu(M,E,T));else if(S==="category"&&M){var _=M,I=E.every(function(U){return _.indexOf(U)>=0});I&&(E=_)}}return Z(Z({},v),{},ce({},C,Z(Z({},b),{},{axisType:i,domain:E,categoricalDomain:B,duplicateDomain:F,originalDomain:(h=b.domain)!==null&&h!==void 0?h:z,isCategorical:m,layout:c})))},{})},_B=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=ks(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),m=d.length,v=Sg(c,i),g=-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=T0("number");if(!h[x]){g++;var y;return v?y=ns(0,m):s&&s[x]&&s[x].hasStack?(y=Pg(s[x].stackGroups,l,u),y=af(f,y,x,i)):(y=Qu(T,Og(d,n.filter(function(w){var A,P,C=o in w.props?w.props[o]:(A=w.type.defaultProps)===null||A===void 0?void 0:A[o],R="hide"in w.props?w.props.hide:(P=w.type.defaultProps)===null||P===void 0?void 0:P.hide;return C===x&&!R}),"number",c),a.defaultProps.allowDataOverflow),y=af(f,y,x,i)),Z(Z({},h),{},ce({},x,Z(Z({axisType:i},a.defaultProps),{},{hide:!0,orientation:Ot(SB,"".concat(i,".").concat(g%2),null),domain:y,originalDomain:T,isCategorical:v,layout:c})))}return h},{})},EB=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),m={};return d&&d.length?m=PB(t,{axes:d,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(m=_B(t,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),m},CB=function(t){var r=mr(t),n=cr(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Hl(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Fo(r,n)}},P0=function(t){var r=t.children,n=t.defaultShowTooltip,a=gt(r,Ln),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}},$B=function(t){return!t||!t.length?!1:t.some(function(r){var n=er(r&&r.type);return n&&n.indexOf("Bar")>=0})},_0=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"}},kB=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||{},m=gt(f,Ln),v=gt(f,yn),g=Object.keys(l).reduce(function(y,w){var A=l[w],P=A.orientation;return!A.mirror&&!A.hide?Z(Z({},y),{},ce({},P,y[P]+A.width)):y},{left:d.left||0,right:d.right||0}),h=Object.keys(o).reduce(function(y,w){var A=o[w],P=A.orientation;return!A.mirror&&!A.hide?Z(Z({},y),{},ce({},P,Ot(y,"".concat(P))+A.height)):y},{top:d.top||0,bottom:d.bottom||0}),b=Z(Z({},h),g),S=b.bottom;m&&(b.bottom+=m.props.height||Ln.defaultProps.height),v&&r&&(b=c4(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)})},NB=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},MB=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,y=S.offset,w=S.updateId,A=S.dataStartIndex,P=S.dataEndIndex,C=b.barSize,R=b.layout,j=b.barGap,E=b.barCategoryGap,F=b.maxBarSize,B=_0(R),z=B.numericAxisName,k=B.cateAxisName,M=$B(x),V=[];return x.forEach(function(K,_){var I=ks(b.data,{graphicalItems:[K],dataStartIndex:A,dataEndIndex:P}),U=K.type.defaultProps!==void 0?Z(Z({},K.type.defaultProps),K.props):K.props,H=U.dataKey,L=U.maxBarSize,G=U["".concat(z,"Id")],Y=U["".concat(k,"Id")],te={},D=l.reduce(function(Ge,ut){var Pi,_i,sa=S["".concat(ut.axisType,"Map")],Ei=U["".concat(ut.axisType,"Id")];sa&&sa[Ei]||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=K==null||(_i=K.type)===null||_i===void 0?void 0:_i.displayName)!==null&&Pi!==void 0?Pi:"")):ht());var Ci=sa[Ei];return Z(Z({},Ge),{},ce(ce({},ut.axisType,Ci),"".concat(ut.axisType,"Ticks"),cr(Ci)))},te),W=D[k],q=D["".concat(k,"Ticks")],J=T&&T[G]&&T[G].hasStack&&A4(K,T[G].stackGroups),$=er(K.type).indexOf("Bar")>=0,Q=Fo(W,q),X=[],se=M&&l4({barSize:C,stackGroups:T,totalSize:NB(D,k)});if($){var ne,fe,ue=pe(L)?F:L,Ee=(ne=(fe=Fo(W,q,!0))!==null&&fe!==void 0?fe:ue)!==null&&ne!==void 0?ne:0;X=u4({barGap:j,barCategoryGap:E,bandSize:Ee!==Q?Ee:Q,sizeList:se[Y],maxBarSize:ue}),Ee!==Q&&(X=X.map(function(Ge){return Z(Z({},Ge),{},{position:Z(Z({},Ge.position),{},{offset:Ge.position.offset-Ee/2})})}))}var Oe=K&&K.type&&K.type.getComposedData;Oe&&V.push({props:Z(Z({},Oe(Z(Z({},D),{},{displayedData:I,props:b,dataKey:H,item:K,bandSize:Q,barPosition:X,offset:y,stackedData:J,layout:R,dataStartIndex:A,dataEndIndex:P}))),{},ce(ce(ce({key:K.key||"item-".concat(_)},z,D[z]),k,D[k]),"animationId",w)),childIndex:oO(K,b.children),item:K})}),V},m=function(b,S){var x=b.props,T=b.dataStartIndex,y=b.dataEndIndex,w=b.updateId;if(!md({props:x}))return null;var A=x.children,P=x.layout,C=x.stackOffset,R=x.data,j=x.reverseStackOrder,E=_0(P),F=E.numericAxisName,B=E.cateAxisName,z=dt(A,n),k=w4(R,z,"".concat(F,"Id"),"".concat(B,"Id"),C,j),M=l.reduce(function(U,H){var L="".concat(H.axisType,"Map");return Z(Z({},U),{},ce({},L,EB(x,Z(Z({},H),{},{graphicalItems:z,stackGroups:H.axisType===F&&k,dataStartIndex:T,dataEndIndex:y}))))},{}),V=kB(Z(Z({},M),{},{props:x,graphicalItems:z}),S==null?void 0:S.legendBBox);Object.keys(M).forEach(function(U){M[U]=c(x,M[U],V,U.replace("Map",""),r)});var K=M["".concat(B,"Map")],_=CB(K),I=d(x,Z(Z({},M),{},{dataStartIndex:T,dataEndIndex:y,updateId:w,graphicalItems:z,stackGroups:k,offset:V}));return Z(Z({formattedGraphicalItems:I,graphicalItems:z,offset:V,stackGroups:k},_),M)},v=function(h){function b(S){var x,T,y;return dB(this,b),y=mB(this,b,[S]),ce(y,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ce(y,"accessibilityManager",new JR),ce(y,"handleLegendBBoxUpdate",function(w){if(w){var A=y.state,P=A.dataStartIndex,C=A.dataEndIndex,R=A.updateId;y.setState(Z({legendBBox:w},m({props:y.props,dataStartIndex:P,dataEndIndex:C,updateId:R},Z(Z({},y.state),{},{legendBBox:w}))))}}),ce(y,"handleReceiveSyncEvent",function(w,A,P){if(y.props.syncId===w){if(P===y.eventEmitterSymbol&&typeof y.props.syncMethod!="function")return;y.applySyncEvent(A)}}),ce(y,"handleBrushChange",function(w){var A=w.startIndex,P=w.endIndex;if(A!==y.state.dataStartIndex||P!==y.state.dataEndIndex){var C=y.state.updateId;y.setState(function(){return Z({dataStartIndex:A,dataEndIndex:P},m({props:y.props,dataStartIndex:A,dataEndIndex:P,updateId:C},y.state))}),y.triggerSyncEvent({dataStartIndex:A,dataEndIndex:P})}}),ce(y,"handleMouseEnter",function(w){var A=y.getMouseInfo(w);if(A){var P=Z(Z({},A),{},{isTooltipActive:!0});y.setState(P),y.triggerSyncEvent(P);var C=y.props.onMouseEnter;me(C)&&C(P,w)}}),ce(y,"triggeredAfterMouseMove",function(w){var A=y.getMouseInfo(w),P=A?Z(Z({},A),{},{isTooltipActive:!0}):{isTooltipActive:!1};y.setState(P),y.triggerSyncEvent(P);var C=y.props.onMouseMove;me(C)&&C(P,w)}),ce(y,"handleItemMouseEnter",function(w){y.setState(function(){return{isTooltipActive:!0,activeItem:w,activePayload:w.tooltipPayload,activeCoordinate:w.tooltipPosition||{x:w.cx,y:w.cy}}})}),ce(y,"handleItemMouseLeave",function(){y.setState(function(){return{isTooltipActive:!1}})}),ce(y,"handleMouseMove",function(w){w.persist(),y.throttleTriggeredAfterMouseMove(w)}),ce(y,"handleMouseLeave",function(w){y.throttleTriggeredAfterMouseMove.cancel();var A={isTooltipActive:!1};y.setState(A),y.triggerSyncEvent(A);var P=y.props.onMouseLeave;me(P)&&P(A,w)}),ce(y,"handleOuterEvent",function(w){var A=iO(w),P=Ot(y.props,"".concat(A));if(A&&me(P)){var C,R;/.*touch.*/i.test(A)?R=y.getMouseInfo(w.changedTouches[0]):R=y.getMouseInfo(w),P((C=R)!==null&&C!==void 0?C:{},w)}}),ce(y,"handleClick",function(w){var A=y.getMouseInfo(w);if(A){var P=Z(Z({},A),{},{isTooltipActive:!0});y.setState(P),y.triggerSyncEvent(P);var C=y.props.onClick;me(C)&&C(P,w)}}),ce(y,"handleMouseDown",function(w){var A=y.props.onMouseDown;if(me(A)){var P=y.getMouseInfo(w);A(P,w)}}),ce(y,"handleMouseUp",function(w){var A=y.props.onMouseUp;if(me(A)){var P=y.getMouseInfo(w);A(P,w)}}),ce(y,"handleTouchMove",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&y.throttleTriggeredAfterMouseMove(w.changedTouches[0])}),ce(y,"handleTouchStart",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&y.handleMouseDown(w.changedTouches[0])}),ce(y,"handleTouchEnd",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&y.handleMouseUp(w.changedTouches[0])}),ce(y,"handleDoubleClick",function(w){var A=y.props.onDoubleClick;if(me(A)){var P=y.getMouseInfo(w);A(P,w)}}),ce(y,"handleContextMenu",function(w){var A=y.props.onContextMenu;if(me(A)){var P=y.getMouseInfo(w);A(P,w)}}),ce(y,"triggerSyncEvent",function(w){y.props.syncId!==void 0&&of.emit(sf,y.props.syncId,w,y.eventEmitterSymbol)}),ce(y,"applySyncEvent",function(w){var A=y.props,P=A.layout,C=A.syncMethod,R=y.state.updateId,j=w.dataStartIndex,E=w.dataEndIndex;if(w.dataStartIndex!==void 0||w.dataEndIndex!==void 0)y.setState(Z({dataStartIndex:j,dataEndIndex:E},m({props:y.props,dataStartIndex:j,dataEndIndex:E,updateId:R},y.state)));else if(w.activeTooltipIndex!==void 0){var F=w.chartX,B=w.chartY,z=w.activeTooltipIndex,k=y.state,M=k.offset,V=k.tooltipTicks;if(!M)return;if(typeof C=="function")z=C(V,w);else if(C==="value"){z=-1;for(var K=0;K<V.length;K++)if(V[K].value===w.activeLabel){z=K;break}}var _=Z(Z({},M),{},{x:M.left,y:M.top}),I=Math.min(F,_.x+_.width),U=Math.min(B,_.y+_.height),H=V[z]&&V[z].value,L=ff(y.state,y.props.data,z),G=V[z]?{x:P==="horizontal"?V[z].coordinate:I,y:P==="horizontal"?U:V[z].coordinate}:A0;y.setState(Z(Z({},w),{},{activeLabel:H,activeCoordinate:G,activePayload:L,activeTooltipIndex:z}))}else y.setState(w)}),ce(y,"renderCursor",function(w){var A,P=y.state,C=P.isTooltipActive,R=P.activeCoordinate,j=P.activePayload,E=P.offset,F=P.activeTooltipIndex,B=P.tooltipAxisBandSize,z=y.getTooltipEventType(),k=(A=w.props.active)!==null&&A!==void 0?A:C,M=y.props.layout,V=w.key||"_recharts-cursor";return O.createElement(iB,{key:V,activeCoordinate:R,activePayload:j,activeTooltipIndex:F,chartName:r,element:w,isActive:k,layout:M,offset:E,tooltipAxisBandSize:B,tooltipEventType:z})}),ce(y,"renderPolarAxis",function(w,A,P){var C=Ot(w,"type.axisType"),R=Ot(y.state,"".concat(C,"Map")),j=w.type.defaultProps,E=j!==void 0?Z(Z({},j),w.props):w.props,F=R&&R[E["".concat(C,"Id")]];return O.cloneElement(w,Z(Z({},F),{},{className:ve(C,F.className),key:w.key||"".concat(A,"-").concat(P),ticks:cr(F,!0)}))}),ce(y,"renderPolarGrid",function(w){var A=w.props,P=A.radialLines,C=A.polarAngles,R=A.polarRadius,j=y.state,E=j.radiusAxisMap,F=j.angleAxisMap,B=mr(E),z=mr(F),k=z.cx,M=z.cy,V=z.innerRadius,K=z.outerRadius;return O.cloneElement(w,{polarAngles:Array.isArray(C)?C:cr(z,!0).map(function(_){return _.coordinate}),polarRadius:Array.isArray(R)?R:cr(B,!0).map(function(_){return _.coordinate}),cx:k,cy:M,innerRadius:V,outerRadius:K,key:w.key||"polar-grid",radialLines:P})}),ce(y,"renderLegend",function(){var w=y.state.formattedGraphicalItems,A=y.props,P=A.children,C=A.width,R=A.height,j=y.props.margin||{},E=C-(j.left||0)-(j.right||0),F=yg({children:P,formattedGraphicalItems:w,legendWidth:E,legendContent:u});if(!F)return null;var B=F.item,z=b0(F,oB);return O.cloneElement(B,Z(Z({},z),{},{chartWidth:C,chartHeight:R,margin:j,onBBoxUpdate:y.handleLegendBBoxUpdate}))}),ce(y,"renderTooltip",function(){var w,A=y.props,P=A.children,C=A.accessibilityLayer,R=gt(P,Wt);if(!R)return null;var j=y.state,E=j.isTooltipActive,F=j.activeCoordinate,B=j.activePayload,z=j.activeLabel,k=j.offset,M=(w=R.props.active)!==null&&w!==void 0?w:E;return O.cloneElement(R,{viewBox:Z(Z({},k),{},{x:k.left,y:k.top}),active:M,label:z,payload:M?B:[],coordinate:F,accessibilityLayer:C})}),ce(y,"renderBrush",function(w){var A=y.props,P=A.margin,C=A.data,R=y.state,j=R.offset,E=R.dataStartIndex,F=R.dataEndIndex,B=R.updateId;return O.cloneElement(w,{key:w.key||"_recharts-brush",onChange:Bo(y.handleBrushChange,w.props.onChange),data:C,x:re(w.props.x)?w.props.x:j.left,y:re(w.props.y)?w.props.y:j.top+j.height+j.brushBottom-(P.bottom||0),width:re(w.props.width)?w.props.width:j.width,startIndex:E,endIndex:F,updateId:"brush-".concat(B)})}),ce(y,"renderReferenceElement",function(w,A,P){if(!w)return null;var C=y,R=C.clipPathId,j=y.state,E=j.xAxisMap,F=j.yAxisMap,B=j.offset,z=w.type.defaultProps||{},k=w.props,M=k.xAxisId,V=M===void 0?z.xAxisId:M,K=k.yAxisId,_=K===void 0?z.yAxisId:K;return O.cloneElement(w,{key:w.key||"".concat(A,"-").concat(P),xAxis:E[V],yAxis:F[_],viewBox:{x:B.left,y:B.top,width:B.width,height:B.height},clipPathId:R})}),ce(y,"renderActivePoints",function(w){var A=w.item,P=w.activePoint,C=w.basePoint,R=w.childIndex,j=w.isRange,E=[],F=A.props.key,B=A.item.type.defaultProps!==void 0?Z(Z({},A.item.type.defaultProps),A.item.props):A.item.props,z=B.activeDot,k=B.dataKey,M=Z(Z({index:R,dataKey:k,cx:P.x,cy:P.y,r:4,fill:Zu(A.item),strokeWidth:2,stroke:"#fff",payload:P.payload,value:P.value},he(z,!1)),Bi(z));return E.push(b.renderActiveDot(z,M,"".concat(F,"-activePoint-").concat(R))),C?E.push(b.renderActiveDot(z,Z(Z({},M),{},{cx:C.x,cy:C.y}),"".concat(F,"-basePoint-").concat(R))):j&&E.push(null),E}),ce(y,"renderGraphicChild",function(w,A,P){var C=y.filterFormatItem(w,A,P);if(!C)return null;var R=y.getTooltipEventType(),j=y.state,E=j.isTooltipActive,F=j.tooltipAxis,B=j.activeTooltipIndex,z=j.activeLabel,k=y.props.children,M=gt(k,Wt),V=C.props,K=V.points,_=V.isRange,I=V.baseLine,U=C.item.type.defaultProps!==void 0?Z(Z({},C.item.type.defaultProps),C.item.props):C.item.props,H=U.activeDot,L=U.hide,G=U.activeBar,Y=U.activeShape,te=!!(!L&&E&&M&&(H||G||Y)),D={};R!=="axis"&&M&&M.props.trigger==="click"?D={onClick:Bo(y.handleItemMouseEnter,w.props.onClick)}:R!=="axis"&&(D={onMouseLeave:Bo(y.handleItemMouseLeave,w.props.onMouseLeave),onMouseEnter:Bo(y.handleItemMouseEnter,w.props.onMouseEnter)});var W=O.cloneElement(w,Z(Z({},C.props),D));function q(ut){return typeof F.dataKey=="function"?F.dataKey(ut.payload):null}if(te)if(B>=0){var J,$;if(F.dataKey&&!F.allowDuplicatedCategory){var Q=typeof F.dataKey=="function"?q:"payload.".concat(F.dataKey.toString());J=Ri(K,Q,z),$=_&&I&&Ri(I,Q,z)}else J=K==null?void 0:K[B],$=_&&I&&I[B];if(Y||G){var X=w.props.activeIndex!==void 0?w.props.activeIndex:B;return[O.cloneElement(w,Z(Z(Z({},C.props),D),{},{activeIndex:X})),null,null]}if(!pe(J))return[W].concat(na(y.renderActivePoints({item:C,activePoint:J,basePoint:$,childIndex:B,isRange:_})))}else{var se,ne=(se=y.getItemByXY(y.state.activeCoordinate))!==null&&se!==void 0?se:{graphicalItem:W},fe=ne.graphicalItem,ue=fe.item,Ee=ue===void 0?w:ue,Oe=fe.childIndex,Ge=Z(Z(Z({},C.props),D),{},{activeIndex:Oe});return[O.cloneElement(Ee,Ge),null,null]}return _?[W,null,null]:[W,null]}),ce(y,"renderCustomized",function(w,A,P){return O.cloneElement(w,Z(Z({key:"recharts-customized-".concat(P)},y.props),y.state))}),ce(y,"renderMap",{CartesianGrid:{handler:$s,once:!0},ReferenceArea:{handler:y.renderReferenceElement},ReferenceLine:{handler:$s},ReferenceDot:{handler:y.renderReferenceElement},XAxis:{handler:$s},YAxis:{handler:$s},Brush:{handler:y.renderBrush,once:!0},Bar:{handler:y.renderGraphicChild},Line:{handler:y.renderGraphicChild},Area:{handler:y.renderGraphicChild},Radar:{handler:y.renderGraphicChild},RadialBar:{handler:y.renderGraphicChild},Scatter:{handler:y.renderGraphicChild},Pie:{handler:y.renderGraphicChild},Funnel:{handler:y.renderGraphicChild},Tooltip:{handler:y.renderCursor,once:!0},PolarGrid:{handler:y.renderPolarGrid,once:!0},PolarAngleAxis:{handler:y.renderPolarAxis},PolarRadiusAxis:{handler:y.renderPolarAxis},Customized:{handler:y.renderCustomized}}),y.clipPathId="".concat((x=S.id)!==null&&x!==void 0?x:kr("recharts"),"-clip"),y.throttleTriggeredAfterMouseMove=mh(y.triggeredAfterMouseMove,(T=S.throttleDelay)!==null&&T!==void 0?T:1e3/60),y.state={},y}return yB(b,h),hB(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,y=x.data,w=x.height,A=x.layout,P=gt(T,Wt);if(P){var C=P.props.defaultIndex;if(!(typeof C!="number"||C<0||C>this.state.tooltipTicks.length-1)){var R=this.state.tooltipTicks[C]&&this.state.tooltipTicks[C].value,j=ff(this.state,y,C,R),E=this.state.tooltipTicks[C].coordinate,F=(this.state.offset.top+w)/2,B=A==="horizontal",z=B?{x:E,y:F}:{y:E,x:F},k=this.state.formattedGraphicalItems.find(function(V){var K=V.item;return K.type.name==="Scatter"});k&&(z=Z(Z({},z),k.props.points[C].tooltipPosition),j=k.props.points[C].tooltipPayload);var M={activeTooltipIndex:C,isTooltipActive:!0,activeLabel:R,activePayload:j,activeCoordinate:z};this.setState(M),this.renderCursor(P),this.accessibilityManager.setIndex(C)}}}},{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 y,w;this.accessibilityManager.setDetails({offset:{left:(y=this.props.margin.left)!==null&&y!==void 0?y:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0}})}return null}},{key:"componentDidUpdate",value:function(x){fl([gt(x.children,Wt)],[gt(this.props.children,Wt)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=gt(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,y=T.getBoundingClientRect(),w=M3(y),A={chartX:Math.round(x.pageX-w.left),chartY:Math.round(x.pageY-w.top)},P=y.width/T.offsetWidth||1,C=this.inRange(A.chartX,A.chartY,P);if(!C)return null;var R=this.state,j=R.xAxisMap,E=R.yAxisMap,F=this.getTooltipEventType(),B=j0(this.state,this.props.data,this.props.layout,C);if(F!=="axis"&&j&&E){var z=mr(j).scale,k=mr(E).scale,M=z&&z.invert?z.invert(A.chartX):null,V=k&&k.invert?k.invert(A.chartY):null;return Z(Z({},A),{},{xValue:M,yValue:V},B)}return B?Z(Z({},A),B):null}},{key:"inRange",value:function(x,T){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,w=this.props.layout,A=x/y,P=T/y;if(w==="horizontal"||w==="vertical"){var C=this.state.offset,R=A>=C.left&&A<=C.left+C.width&&P>=C.top&&P<=C.top+C.height;return R?{x:A,y:P}:null}var j=this.state,E=j.angleAxisMap,F=j.radiusAxisMap;if(E&&F){var B=mr(E);return Mg({x:A,y:P},B)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,T=this.getTooltipEventType(),y=gt(x,Wt),w={};y&&T==="axis"&&(y.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 A=Bi(this.props,this.handleOuterEvent);return Z(Z({},A),w)}},{key:"addListener",value:function(){of.on(sf,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){of.removeListener(sf,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,T,y){for(var w=this.state.formattedGraphicalItems,A=0,P=w.length;A<P;A++){var C=w[A];if(C.item===x||C.props.key===x.key||T===er(C.item.type)&&y===C.childIndex)return C}return null}},{key:"renderClipPath",value:function(){var x=this.clipPathId,T=this.state.offset,y=T.left,w=T.top,A=T.height,P=T.width;return O.createElement("defs",null,O.createElement("clipPath",{id:x},O.createElement("rect",{x:y,y:w,height:A,width:P})))}},{key:"getXScales",value:function(){var x=this.state.xAxisMap;return x?Object.entries(x).reduce(function(T,y){var w=y0(y,2),A=w[0],P=w[1];return Z(Z({},T),{},ce({},A,P.scale))},{}):null}},{key:"getYScales",value:function(){var x=this.state.yAxisMap;return x?Object.entries(x).reduce(function(T,y){var w=y0(y,2),A=w[0],P=w[1];return Z(Z({},T),{},ce({},A,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,y=T.formattedGraphicalItems,w=T.activeItem;if(y&&y.length)for(var A=0,P=y.length;A<P;A++){var C=y[A],R=C.props,j=C.item,E=j.type.defaultProps!==void 0?Z(Z({},j.type.defaultProps),j.props):j.props,F=er(j.type);if(F==="Bar"){var B=(R.data||[]).find(function(V){return xD(x,V)});if(B)return{graphicalItem:C,payload:B}}else if(F==="RadialBar"){var z=(R.data||[]).find(function(V){return Mg(x,V)});if(z)return{graphicalItem:C,payload:z}}else if(ts(C,w)||rs(C,w)||ui(C,w)){var k=OI({graphicalItem:C,activeTooltipItem:w,itemData:E.data}),M=E.activeIndex===void 0?k:E.activeIndex;return{graphicalItem:Z(Z({},C),{},{childIndex:M}),payload:ui(C,w)?E.data[k]:C.props.data[k]}}}return null}},{key:"render",value:function(){var x=this;if(!md(this))return null;var T=this.props,y=T.children,w=T.className,A=T.width,P=T.height,C=T.style,R=T.compact,j=T.title,E=T.desc,F=b0(T,sB),B=he(F,!1);if(R)return O.createElement(gy,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},O.createElement(pl,ra({},B,{width:A,height:P,title:j,desc:E}),this.renderClipPath(),yd(y,this.renderMap)));if(this.props.accessibilityLayer){var z,k;B.tabIndex=(z=this.props.tabIndex)!==null&&z!==void 0?z:0,B.role=(k=this.props.role)!==null&&k!==void 0?k:"application",B.onKeyDown=function(V){x.accessibilityManager.keyboardEvent(V)},B.onFocus=function(){x.accessibilityManager.focus()}}var M=this.parseEventsOfWrapper();return O.createElement(gy,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},O.createElement("div",ra({className:ve("recharts-wrapper",w),style:Z({position:"relative",cursor:"default",width:A,height:P},C)},M,{ref:function(K){x.container=K}}),O.createElement(pl,ra({},B,{width:A,height:P,title:j,desc:E,style:AB}),this.renderClipPath(),yd(y,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(O.Component);ce(v,"displayName",r),ce(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)),ce(v,"getDerivedStateFromProps",function(h,b){var S=h.dataKey,x=h.data,T=h.children,y=h.width,w=h.height,A=h.layout,P=h.stackOffset,C=h.margin,R=b.dataStartIndex,j=b.dataEndIndex;if(b.updateId===void 0){var E=P0(h);return Z(Z(Z({},E),{},{updateId:0},m(Z(Z({props:h},E),{},{updateId:0}),b)),{},{prevDataKey:S,prevData:x,prevWidth:y,prevHeight:w,prevLayout:A,prevStackOffset:P,prevMargin:C,prevChildren:T})}if(S!==b.prevDataKey||x!==b.prevData||y!==b.prevWidth||w!==b.prevHeight||A!==b.prevLayout||P!==b.prevStackOffset||!fn(C,b.prevMargin)){var F=P0(h),B={chartX:b.chartX,chartY:b.chartY,isTooltipActive:b.isTooltipActive},z=Z(Z({},j0(b,x,A)),{},{updateId:b.updateId+1}),k=Z(Z(Z({},F),B),z);return Z(Z(Z({},k),m(Z({props:h},k),b)),{},{prevDataKey:S,prevData:x,prevWidth:y,prevHeight:w,prevLayout:A,prevStackOffset:P,prevMargin:C,prevChildren:T})}if(!fl(T,b.prevChildren)){var M,V,K,_,I=gt(T,Ln),U=I&&(M=(V=I.props)===null||V===void 0?void 0:V.startIndex)!==null&&M!==void 0?M:R,H=I&&(K=(_=I.props)===null||_===void 0?void 0:_.endIndex)!==null&&K!==void 0?K:j,L=U!==R||H!==j,G=!pe(x),Y=G&&!L?b.updateId:b.updateId+1;return Z(Z({updateId:Y},m(Z(Z({props:h},b),{},{updateId:Y,dataStartIndex:U,dataEndIndex:H}),b)),{},{prevChildren:T,dataStartIndex:U,dataEndIndex:H})}return null}),ce(v,"renderActiveDot",function(h,b,S){var x;return O.isValidElement(h)?x=O.cloneElement(h,b):me(h)?x=h(b):x=O.createElement(Jo,b),O.createElement(we,{className:"recharts-active-dot",key:S},x)});var g=O.forwardRef(function(b,S){return O.createElement(v,ra({},b,{ref:S}))});return g.displayName=v.displayName,g},DB=MB({chartName:"ComposedChart",GraphicalChild:[mi,jr,Fn,As],axisComponents:[{axisType:"xAxis",AxisComp:js},{axisType:"yAxis",AxisComp:_s},{axisType:"zAxis",AxisComp:Os}],formatAxisMap:q9});const aa=({className:e,width:t,height:r,rounded:n=!1})=>p.jsx("div",{className:le("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})=>p.jsxs("div",{className:le("rounded-lg border border-gray-200 bg-white p-[16px]",e),children:[p.jsxs("div",{className:"flex items-center gap-2 mb-[12px]",children:[p.jsx(aa,{className:"h-[16px] w-[64px]"}),p.jsx(aa,{className:"h-[16px] w-[16px]",rounded:!0})]}),p.jsxs("div",{className:"flex items-baseline gap-[12px]",children:[p.jsx(aa,{className:"h-[32px] w-[80px]"}),p.jsx(aa,{className:"h-[24px] w-[48px] rounded-md"})]})]}),E0=({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,m=u.x+(c.x-u.x)*.6,v=c.y;s+=` C ${f} ${d} ${m} ${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 p.jsx("div",{className:"absolute inset-0 flex items-end justify-between px-[16px] pb-[16px]",children:[...Array(7)].map((h,b)=>p.jsx(aa,{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 p.jsx("div",{className:"absolute inset-0 p-[16px]",children:p.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[p.jsxs("defs",{children:[p.jsxs("linearGradient",{id:"skeleton-area-fill",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[p.jsx("stop",{offset:"0%",stopColor:"#8b5cf6",stopOpacity:"0.1",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.1;0.15;0.1",dur:"3s",repeatCount:"indefinite"})}),p.jsx("stop",{offset:"100%",stopColor:"#8b5cf6",stopOpacity:"0.02",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.02;0.05;0.02",dur:"3s",repeatCount:"indefinite"})})]}),p.jsxs("linearGradient",{id:"skeleton-line-shimmer",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[p.jsx("stop",{offset:"0%",stopColor:"#e2e8f0",stopOpacity:"0.3",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2.5s",repeatCount:"indefinite"})}),p.jsx("stop",{offset:"50%",stopColor:"#cbd5e1",stopOpacity:"0.6",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.6;0.3;0.6",dur:"2.5s",repeatCount:"indefinite"})}),p.jsx("stop",{offset:"100%",stopColor:"#e2e8f0",stopOpacity:"0.3",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2.5s",repeatCount:"indefinite"})})]})]}),p.jsx("path",{d:c,fill:"url(#skeleton-area-fill)"}),p.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),m=f[f.length-1],v=f[0],g=`${d} L ${m.x} 90 L ${v.x} 90 Z`;return p.jsx("div",{className:"absolute inset-0 p-[16px]",children:p.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[p.jsxs("defs",{children:[p.jsxs("linearGradient",{id:"skeleton-area-gradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[p.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.2",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.2;0.4;0.2",dur:"2s",repeatCount:"indefinite"})}),p.jsx("stop",{offset:"100%",stopColor:"#3b82f6",stopOpacity:"0.05",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.05;0.1;0.05",dur:"2s",repeatCount:"indefinite"})})]}),p.jsxs("linearGradient",{id:"skeleton-area-line",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[p.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.4",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.4;0.8;0.4",dur:"2s",repeatCount:"indefinite"})}),p.jsx("stop",{offset:"50%",stopColor:"#3b82f6",stopOpacity:"0.8",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.8;0.4;0.8",dur:"2s",repeatCount:"indefinite"})}),p.jsx("stop",{offset:"100%",stopColor:"#3b82f6",stopOpacity:"0.4",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.4;0.8;0.4",dur:"2s",repeatCount:"indefinite"})})]})]}),p.jsx("path",{d:g,fill:"url(#skeleton-area-gradient)"}),p.jsx("path",{d:n(f),stroke:"url(#skeleton-area-line)",strokeWidth:"2.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]})});case"pie":return p.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-[16px]",children:p.jsxs("svg",{className:"w-32 h-32",viewBox:"0 0 42 42",children:[p.jsxs("defs",{children:[p.jsx("linearGradient",{id:"skeleton-pie-gradient-1",children:p.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.3",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite"})})}),p.jsx("linearGradient",{id:"skeleton-pie-gradient-2",children:p.jsx("stop",{offset:"0%",stopColor:"#10b981",stopOpacity:"0.3",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"0.5s"})})}),p.jsx("linearGradient",{id:"skeleton-pie-gradient-3",children:p.jsx("stop",{offset:"0%",stopColor:"#f59e0b",stopOpacity:"0.3",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"1s"})})}),p.jsx("linearGradient",{id:"skeleton-pie-gradient-4",children:p.jsx("stop",{offset:"0%",stopColor:"#ef4444",stopOpacity:"0.3",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"1.5s"})})})]}),p.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"#e5e7eb",strokeWidth:"3"}),p.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-1)",strokeWidth:"3",strokeDasharray:"40 60",strokeDashoffset:"25"}),p.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-2)",strokeWidth:"3",strokeDasharray:"25 75",strokeDashoffset:"65"}),p.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-3)",strokeWidth:"3",strokeDasharray:"20 80",strokeDashoffset:"90"}),p.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 p.jsx("div",{className:"absolute inset-0 p-[16px]",children:p.jsxs("div",{className:"w-full h-full relative",children:[p.jsx("div",{className:"absolute inset-0 flex items-center",children:p.jsx("div",{className:"w-full h-0.5 bg-gradient-to-r from-transparent via-gray-300 to-transparent opacity-60",children:p.jsx("div",{className:"w-full h-full bg-gradient-to-r from-transparent via-blue-400 to-transparent animate-pulse"})})}),p.jsx("div",{className:"absolute inset-0 flex items-center justify-between px-2",children:[...Array(7)].map((h,b)=>p.jsx("div",{className:"w-2 h-2 bg-blue-300 rounded-full animate-pulse",style:{animationDelay:`${b*.2}s`}},b))})]})})}};return p.jsx("div",{className:le("w-full",e),children:p.jsxs("div",{className:"relative bg-gray-50/30",children:[p.jsxs("div",{className:"relative",style:{height:`${r}px`},children:[p.jsxs("div",{className:"absolute left-0 top-0 h-full flex flex-col justify-between items-end pr-[12px]",children:[p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"})]}),p.jsxs("div",{className:"ml-14 h-full relative overflow-hidden px-0 py-2 flex flex-col justify-between",children:[t!=="pie"&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"})]}),i()]}),t!=="pie"&&p.jsxs("div",{className:"ml-[56px] flex justify-between items-center mt-[12px]",children:[p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"})]})]}),p.jsxs("div",{className:"flex items-center justify-between px-0 py-[12px] mt-[8px]",children:[p.jsx("div",{className:"flex-1",children:p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[256px]"})}),p.jsxs("div",{className:"flex items-center gap-2 w-24 justify-center",children:[p.jsx("div",{className:"w-[8px] h-[8px] bg-blue-500 rounded-full"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded flex-1"})]})]})]})})},IB=({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 p.jsxs("div",{className:le("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:[p.jsx("div",{className:le("font-medium mb-[8px]",i?"text-gray-300":"text-gray-600"),children:new Date(r||"").toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}),p.jsx("div",{className:"space-y-1",children:a.map((s,l)=>p.jsxs("div",{className:"flex items-center justify-between gap-4",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-[8px] h-[8px] rounded-full",style:{backgroundColor:s.color}}),p.jsx("span",{className:le("text-xs",i?"text-gray-300":"text-gray-600"),children:s.name})]}),p.jsx("span",{className:le("font-medium text-xs",i?"text-white":"text-gray-900"),children:typeof s.value=="number"?s.value.toLocaleString():s.value})]},l))})]})},C0=({config:e,className:t,isLoading:r,onDataPointClick:n})=>{var y,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,m=(A=>{if(!A||A.length===0)return[];const P=[...A].sort((B,z)=>{const k=new Date(B.date),M=new Date(z.date);return k.getTime()-M.getTime()});let C,R;l!=null&&l.start&&(l!=null&&l.end)?(C=new Date(l.start),R=new Date(l.end)):(C=new Date(P[0].date),R=new Date(P[P.length-1].date));const j=new Map;P.forEach(B=>{j.set(B.date,B)});const E=[],F=new Date(C);for(;F<=R;){const B=F.toISOString().split("T")[0];if(j.has(B))E.push(j.get(B));else{const z={date:B,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 k=P[0];Object.keys(k).forEach(M=>{typeof k[M]=="number"&&!(M in z)&&(z[M]=0)})}E.push(z)}F.setDate(F.getDate()+1)}return E})(a),v=A=>{const P=new Date(A);return isNaN(P.getTime())?A:P.toLocaleDateString("en-US",{month:"short",day:"numeric"})},g=()=>{if(!m||m.length===0)return 0;const A=m.length;return A<=20?0:A<=31?1:A<=61?2:Math.floor(A/7)-1},h=A=>b()&&!Number.isInteger(A)?"":A>=1e3?`${Math.floor(A/1e3)}k`:Math.floor(A).toString(),b=()=>{const A=["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&&A.some(P=>u.toLowerCase().includes(P.toLowerCase()))||i&&A.some(P=>i.toLowerCase().includes(P.toLowerCase()))||e.title&&A.some(P=>e.title.toLowerCase().includes(P.toLowerCase()))||s&&s.some(P=>P.label&&A.some(C=>P.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"),p.jsx(E0,{className:t,chartType:e.type,height:c});if(!a||a.length===0)return console.log("AnalyticsChart: No data provided",{data:a,config:e}),p.jsx("div",{className:le("w-full",t),children:p.jsxs("div",{className:"relative bg-gray-50/30",children:[p.jsxs("div",{className:"relative h-[300px] mb-6",children:[p.jsxs("div",{className:"absolute left-0 top-0 h-full flex flex-col justify-between items-end pr-3",children:[p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"})]}),p.jsxs("div",{className:"ml-14 h-full relative overflow-hidden px-0 py-2 flex flex-col justify-between",children:[p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-4",children:[p.jsx("div",{className:"bg-white border border-gray-300 rounded-[10px] w-12 h-12 flex items-center justify-center",children:p.jsx("svg",{className:"w-6 h-6 !h-6 text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:p.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"})})}),p.jsxs("div",{className:"text-center max-w-[352px]",children:[p.jsx("h3",{className:"font-semibold text-gray-900 text-base mb-1",children:"There is no data to display for this period"}),p.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."})]})]})]}),p.jsxs("div",{className:"ml-14 flex justify-between items-center mt-3",children:[p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"})]})]}),p.jsxs("div",{className:"flex items-center justify-between px-0 py-3 mt-2",children:[p.jsx("div",{className:"flex-1",children:p.jsx("div",{className:"bg-gray-100 h-3 rounded w-64"})}),p.jsxs("div",{className:"flex items-center gap-2 w-24 justify-center",children:[p.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded flex-1"})]})]})]})});const T=A=>{var C;if(!n||!A||!A.activePayload)return;const P=(C=A.activePayload[0])==null?void 0:C.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:",m.length),console.log("AnalyticsChart date range (config):",l),console.log("AnalyticsChart actual date range:",m.length>0?{first:(y=m[0])==null?void 0:y.date,last:(w=m[m.length-1])==null?void 0:w.date,totalDays:m.length}:"No data"),console.log("AnalyticsChart dataKey:",i),console.log("Chart lines configuration:",x),console.log("Sample filled data points:",m.slice(0,3)),console.log("=== END ANALYTICS CHART DEBUG ==="),p.jsxs("div",{className:le("w-full",t),children:[p.jsx("div",{className:"relative bg-gray-50/30",children:p.jsx(P3,{width:"100%",height:c,children:p.jsxs(DB,{data:m,onClick:T,margin:{top:20,right:30,left:20,bottom:20},children:[p.jsx("defs",{children:x.map((A,P)=>p.jsxs("linearGradient",{id:`gradient-${A.dataKey}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[p.jsx("stop",{offset:"5%",stopColor:A.color,stopOpacity:.08}),p.jsx("stop",{offset:"95%",stopColor:A.color,stopOpacity:.01})]},`gradient-${P}`))}),p.jsx(Wy,{strokeDasharray:"2 2",className:"opacity-30",stroke:"#d1d5db",horizontal:!0,vertical:!1}),p.jsx(js,{dataKey:"date",tickFormatter:v,axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#6b7280"},tickMargin:10,interval:g()}),p.jsx(_s,{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&&p.jsx(Wt,{content:A=>p.jsx(IB,{...A,config:e}),cursor:{stroke:"#d1d5db",strokeWidth:1,strokeDasharray:"4 4"},allowEscapeViewBox:{x:!1,y:!1}}),x.map(A=>p.jsx(jr,{type:"monotone",dataKey:A.dataKey,stroke:"none",fill:`url(#gradient-${A.dataKey})`,fillOpacity:1,isAnimationActive:!1,name:""},`area-${A.dataKey}`)),x.map(A=>p.jsx(mi,{type:"monotone",dataKey:A.dataKey,stroke:A.color,strokeWidth:2.5,strokeDasharray:A.strokeDasharray,dot:!1,activeDot:{r:5,fill:A.color,stroke:A.color,strokeWidth:2},name:A.label},A.dataKey))]})})}),p.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[p.jsx("div",{children:l&&p.jsxs("p",{className:"text-xs text-gray-500 flex items-center gap-[4px]",children:[p.jsx("span",{className:"text-gray-500",children:"Showing data from"}),p.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"})]})]})}),p.jsx("div",{className:"flex items-center gap-4",children:p.jsx("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:x.map(A=>p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-[8px] h-[8px] rounded-full",style:{backgroundColor:A.color}}),p.jsx("span",{className:"text-xs text-gray-600",children:A.label})]},A.dataKey))})})]})]})},$0=({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]=O.useState(o.defaultSort||null),[c,f]=O.useState(""),[d,m]=O.useState(1),v=O.useMemo(()=>{let y=[...n];return s.searchable&&c&&(y=y.filter(w=>a.some(A=>{const P=w[A.key];return P==null?void 0:P.toString().toLowerCase().includes(c.toLowerCase())}))),l&&y.sort((w,A)=>{const P=w[l.key],C=A[l.key];if(typeof P=="number"&&typeof C=="number")return l.order==="asc"?P-C:C-P;const R=(P==null?void 0:P.toString())||"",j=(C==null?void 0:C.toString())||"",E=R.localeCompare(j);return l.order==="asc"?E:-E}),y},[n,a,c,l,s.searchable]),g=i.enabled?Math.ceil(v.length/i.pageSize):1,h=i.enabled?v.slice((d-1)*i.pageSize,d*i.pageSize):v,b=y=>{!o.enabled||!y.sortable||u(w=>(w==null?void 0:w.key)===y.key?w.order==="asc"?{key:y.key,order:"desc"}:null:{key:y.key,order:"asc"})},S=y=>{f(y),m(1)},x=(y,w,A)=>w.render?w.render(y,A):w.formatter?w.formatter(y,A):typeof y=="number"?y.toLocaleString():(y==null?void 0:y.toString())||"-",T=y=>!o.enabled||!y.sortable?null:(l==null?void 0:l.key)===y.key?l.order==="asc"?p.jsx(jf,{className:"w-[16px] h-[16px]"}):p.jsx(fr,{className:"w-[16px] h-[16px]"}):p.jsxs("div",{className:"flex flex-col",children:[p.jsx(jf,{className:"w-[12px] h-[12px] opacity-30"}),p.jsx(fr,{className:"w-[12px] h-[12px] opacity-30 -mt-1"})]});return p.jsxs("div",{className:le("w-full",t),children:[p.jsxs("div",{className:"flex items-center justify-between mb-4",children:[p.jsx("h3",{className:"text-md font-medium text-gray-700",children:r}),s.enabled&&s.searchable&&p.jsxs("div",{className:"relative",children:[p.jsx(Nf,{className:"absolute left-[12px] top-1/2 transform -translate-y-1/2 w-[16px] h-[16px] text-gray-400"}),p.jsx("input",{type:"text",placeholder:"Search...",value:c,onChange:y=>S(y.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"})]})]}),p.jsx("div",{className:"overflow-x-auto border border-gray-200 rounded-lg",children:p.jsxs("table",{className:"w-full",children:[p.jsx("thead",{className:"bg-gray-50",children:p.jsx("tr",{children:a.map(y=>p.jsx("th",{className:le("px-[16px] py-[12px] text-left text-xs font-medium text-gray-500 uppercase tracking-wider",y.sortable&&o.enabled&&"cursor-pointer hover:bg-gray-100",y.align==="center"&&"text-center",y.align==="right"&&"text-right"),style:{width:y.width},onClick:()=>b(y),children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{children:y.title}),T(y)]})},y.key))})}),p.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:h.map((y,w)=>p.jsx("tr",{className:"hover:bg-gray-50 transition-colors",children:a.map(A=>p.jsx("td",{className:le("px-[16px] py-[12px] text-xs text-gray-900",A.align==="center"&&"text-center",A.align==="right"&&"text-right"),children:x(y[A.key],A,y)},A.key))},w))})]})}),i.enabled&&g>1&&p.jsxs("div",{className:"flex items-center justify-between mt-4",children:[p.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"]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{onClick:()=>m(y=>Math.max(1,y-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,g)},(y,w)=>{const A=Math.max(1,Math.min(g-4,d-2))+w;return A>g?null:p.jsx("button",{onClick:()=>m(A),className:le("px-[12px] py-[4px] text-xs border rounded",d===A?"bg-blue-500 text-white border-blue-500":"border-gray-200 hover:bg-gray-50"),children:A},A)}),p.jsx("button",{onClick:()=>m(y=>Math.min(g,y+1)),disabled:d===g,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&&p.jsx("div",{className:"text-center py-[32px] text-gray-500",children:c?"No results found for your search.":"No data available."})]})},df=window.location.protocol+"//"+window.location.host,LB=(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"}},RB=e=>{if(!e)return null;if(typeof e=="string")try{return JSON.parse(e)}catch{return{name:e,type:"human"}}return e},BB=(e,t)=>{if(!(e!=null&&e.name))return"";if(t==="url")return e.name;if(t==="model")return"";const r=LB(e.type||"human",t);return`${df}/agenticai/assets/${r}/${e.name.replace("agent","avatar")}.svg`},k0=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"},FB={xs:"w-[24px] h-[24px] bg-gray-200 rounded-[8px] text-xs uppercase flex items-center justify-center",small:"w-[24px] h-[24px] bg-gray-200 rounded-[8px] text-xs uppercase flex items-center justify-center",medium:"w-[24px] h-[24px] bg-gray-200 rounded-[8px] text-xs uppercase flex items-center justify-center",large:"w-[24px] h-[24px] bg-gray-200 rounded-[8px] text-xs uppercase flex items-center justify-center"},Ft={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)">
|
|
286
286
|
<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>
|
|
287
287
|
<defs><clipPath id="clip0_3533_7514"><rect width="12" height="12" fill="white"/></clipPath></defs>
|
|
288
288
|
</svg>`,toolLibrary:`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|