"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1128],{91128:(e,t,r)=>{r.r(t),r.d(t,{ChartContainer:()=>h,ChartLegend:()=>v,ChartLegendContent:()=>p,ChartStyle:()=>m,ChartTooltip:()=>f,ChartTooltipContent:()=>g});var n=r(53891),l=r(73987),a=r(18468),o=r(25529),s=r(33021),c=r(61971);let d={light:"",dark:".dark"},i=l.createContext(null);function u(){let e=l.useContext(i);if(!e)throw Error("useChart must be used within a <ChartContainer />");return e}function h(e){let{id:t,className:r,children:o,config:s,...d}=e,u=l.useId(),h="chart-".concat(t||u.replace(/:/g,""));return(0,n.jsx)(i.Provider,{value:{config:s},children:(0,n.jsxs)("div",{"data-slot":"chart","data-chart":h,className:(0,c.cn)("[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-surface]:outline-hidden flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-sector[stroke='#fff']]:stroke-transparent",r),...d,children:[(0,n.jsx)(m,{id:h,config:s}),(0,n.jsx)(a.u,{children:o})]})})}let m=e=>{let{id:t,config:r}=e,l=Object.entries(r).filter(e=>{let[,t]=e;return t.theme||t.color});return l.length?(0,n.jsx)("style",{dangerouslySetInnerHTML:{__html:Object.entries(d).map(e=>{let[r,n]=e;return"\n".concat(n," [data-chart=").concat(t,"] {\n").concat(l.map(e=>{var t;let[n,l]=e,a=(null==(t=l.theme)?void 0:t[r])||l.color;return a?"  --color-".concat(n,": ").concat(a,";"):null}).join("\n"),"\n}\n")}).join("\n")}}):null},f=o.m;function g(e){let{active:t,payload:r,className:a,indicator:o="dot",hideLabel:s=!1,hideIndicator:d=!1,label:i,labelFormatter:h,labelClassName:m,formatter:f,color:g,nameKey:v,labelKey:p}=e,{config:b}=u(),j=l.useMemo(()=>{var e;if(s||!(null==r?void 0:r.length))return null;let[t]=r,l="".concat(p||(null==t?void 0:t.dataKey)||(null==t?void 0:t.name)||"value"),a=x(b,t,l),o=p||"string"!=typeof i?null==a?void 0:a.label:(null==(e=b[i])?void 0:e.label)||i;return h?(0,n.jsx)("div",{className:(0,c.cn)("font-medium",m),children:h(o,r)}):o?(0,n.jsx)("div",{className:(0,c.cn)("font-medium",m),children:o}):null},[i,h,r,s,m,b,p]);if(!t||!(null==r?void 0:r.length))return null;let y=1===r.length&&"dot"!==o;return(0,n.jsxs)("div",{className:(0,c.cn)("border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",a),children:[y?null:j,(0,n.jsx)("div",{className:"grid gap-1.5",children:r.map((e,t)=>{let r="".concat(v||e.name||e.dataKey||"value"),l=x(b,e,r),a=g||e.payload.fill||e.color;return(0,n.jsx)("div",{className:(0,c.cn)("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5","dot"===o&&"items-center"),children:f&&(null==e?void 0:e.value)!==void 0&&e.name?f(e.value,e.name,e,t,e.payload):(0,n.jsxs)(n.Fragment,{children:[(null==l?void 0:l.icon)?(0,n.jsx)(l.icon,{}):!d&&(0,n.jsx)("div",{className:(0,c.cn)("border-(--color-border) bg-(--color-bg) shrink-0 rounded-[2px]",{"h-2.5 w-2.5":"dot"===o,"w-1":"line"===o,"w-0 border-[1.5px] border-dashed bg-transparent":"dashed"===o,"my-0.5":y&&"dashed"===o}),style:{"--color-bg":a,"--color-border":a}}),(0,n.jsxs)("div",{className:(0,c.cn)("flex flex-1 justify-between leading-none",y?"items-end":"items-center"),children:[(0,n.jsxs)("div",{className:"grid gap-1.5",children:[y?j:null,(0,n.jsx)("span",{className:"text-muted-foreground",children:(null==l?void 0:l.label)||e.name})]}),e.value&&(0,n.jsx)("span",{className:"text-foreground font-mono font-medium tabular-nums",children:e.value.toLocaleString()})]})]})},e.dataKey)})})]})}let v=s.s;function p(e){let{className:t,hideIcon:r=!1,payload:l,verticalAlign:a="bottom",nameKey:o}=e,{config:s}=u();return(null==l?void 0:l.length)?(0,n.jsx)("div",{className:(0,c.cn)("flex items-center justify-center gap-4","top"===a?"pb-3":"pt-3",t),children:l.map(e=>{let t="".concat(o||e.dataKey||"value"),l=x(s,e,t);return(0,n.jsxs)("div",{className:(0,c.cn)("[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"),children:[(null==l?void 0:l.icon)&&!r?(0,n.jsx)(l.icon,{}):(0,n.jsx)("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:e.color}}),null==l?void 0:l.label]},e.value)})}):null}function x(e,t,r){if("object"!=typeof t||null===t)return;let n="payload"in t&&"object"==typeof t.payload&&null!==t.payload?t.payload:void 0,l=r;return r in t&&"string"==typeof t[r]?l=t[r]:n&&r in n&&"string"==typeof n[r]&&(l=n[r]),l in e?e[l]:e[r]}}}]);