@rafal.lemieszewski/tide-ui 0.25.2 → 0.25.3

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.cjs.js CHANGED
@@ -110,7 +110,7 @@ Take a look at the reducer(s) handling this action type: ${f.type}.
110
110
  *
111
111
  * This source code is licensed under the MIT license found in the
112
112
  * LICENSE file in the root directory of this source tree.
113
- */var VF;function Bke(){return VF||(VF=1,process.env.NODE_ENV!=="production"&&(function(){function e(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=M,r=typeof Object.is=="function"?Object.is:e,n=t.useSyncExternalStore,o=t.useRef,a=t.useEffect,i=t.useMemo,c=t.useDebugValue;Y$.useSyncExternalStoreWithSelector=function(s,l,d,u,p){var f=o(null);if(f.current===null){var m={hasValue:!1,value:null};f.current=m}else m=f.current;f=i(function(){function k(C){if(!b){if(b=!0,x=C,C=u(C),p!==void 0&&m.hasValue){var S=m.value;if(p(S,C))return w=S}return w=C}if(S=w,r(x,C))return S;var I=u(C);return p!==void 0&&p(S,I)?(x=C,S):(x=C,w=I)}var b=!1,x,w,_=d===void 0?null:d;return[function(){return k(l())},_===null?void 0:function(){return k(_())}]},[l,d,u,p]);var g=n(s,f[0],f[1]);return a(function(){m.hasValue=!0,m.value=g},[g]),c(g),g},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Y$}var HF;function Uke(){return HF||(HF=1,process.env.NODE_ENV==="production"?j0.exports=Fke():j0.exports=Bke()),j0.exports}Uke();function Gke(e){e()}function Wke(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Gke(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const o=t={callback:r,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!n||e===null||(n=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var FF={notify(){},get:()=>[]};function Kke(e,t){let r,n=FF,o=0,a=!1;function i(g){d();const k=n.subscribe(g);let b=!1;return()=>{b||(b=!0,k(),u())}}function c(){n.notify()}function s(){m.onStateChange&&m.onStateChange()}function l(){return a}function d(){o++,r||(r=e.subscribe(s),n=Wke())}function u(){o--,r&&o===0&&(r(),r=void 0,n.clear(),n=FF)}function p(){a||(a=!0,d())}function f(){a&&(a=!1,u())}const m={addNestedSub:i,notifyNestedSubs:c,handleChangeWrapper:s,isSubscribed:l,trySubscribe:p,tryUnsubscribe:f,getListeners:()=>n};return m}var Xke=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Zke=Xke(),Yke=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Jke=Yke(),Qke=()=>Zke||Jke?v.useLayoutEffect:v.useEffect,e4e=Qke(),t4e=Symbol.for("react-redux-context"),r4e=typeof globalThis<"u"?globalThis:{};function n4e(){if(!v.createContext)return{};const e=r4e[t4e]??=new Map;let t=e.get(v.createContext);return t||(t=v.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(v.createContext,t)),t}var o4e=n4e();function a4e(e){const{children:t,context:r,serverState:n,store:o}=e,a=v.useMemo(()=>{const s=Kke(o),l={store:o,subscription:s,getServerState:n?()=>n:void 0};if(process.env.NODE_ENV==="production")return l;{const{identityFunctionCheck:d="once",stabilityCheck:u="once"}=e;return Object.assign(l,{stabilityCheck:u,identityFunctionCheck:d})}},[o,n]),i=v.useMemo(()=>o.getState(),[o]);e4e(()=>{const{subscription:s}=a;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),i!==o.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[a,i]);const c=r||o4e;return v.createElement(c.Provider,{value:a},t)}var i4e=a4e,c4e=(e,t)=>t,JD=Z([c4e,Te,nK,Ct,QK,Qn,ope,jt],lpe),QD=e=>{var t=e.currentTarget.getBoundingClientRect(),r=t.width/e.currentTarget.offsetWidth,n=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/r),chartY:Math.round((e.clientY-t.top)/n)}},rZ=Er("mouseClick"),nZ=Au();nZ.startListening({actionCreator:rZ,effect:(e,t)=>{var r=e.payload,n=JD(t.getState(),QD(r));n?.activeIndex!=null&&t.dispatch(phe({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var $R=Er("mouseMove"),oZ=Au();oZ.startListening({actionCreator:$R,effect:(e,t)=>{var r=e.payload,n=t.getState(),o=LD(n,n.tooltip.settings.shared),a=JD(n,QD(r));o==="axis"&&(a?.activeIndex!=null?t.dispatch(GK({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate})):t.dispatch(UK()))}});function s4e(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":t}var BF={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},aZ=Cr({name:"rootProps",initialState:BF,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:BF.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className}}}),l4e=aZ.reducer,{updateOptions:d4e}=aZ.actions,iZ=Cr({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:xnt}=iZ.actions,u4e=iZ.reducer,cZ=Er("keyDown"),sZ=Er("focus"),eT=Au();eT.startListening({actionCreator:cZ,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:o}=r.tooltip,a=e.payload;if(!(a!=="ArrowRight"&&a!=="ArrowLeft"&&a!=="Enter")){var i=Number(ND(o,vd(r))),c=Qn(r);if(a==="Enter"){var s=zN(r,"axis","hover",String(o.index));t.dispatch(vR({active:!o.active,activeIndex:o.index,activeDataKey:o.dataKey,activeCoordinate:s}));return}var l=ohe(r),d=l==="left-to-right"?1:-1,u=a==="ArrowRight"?1:-1,p=i+u*d;if(!(c==null||p>=c.length||p<0)){var f=zN(r,"axis","hover",String(p));t.dispatch(vR({active:!0,activeIndex:p.toString(),activeDataKey:void 0,activeCoordinate:f}))}}}}});eT.startListening({actionCreator:sZ,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:o}=r.tooltip;if(!o.active&&o.index==null){var a="0",i=zN(r,"axis","hover",String(a));t.dispatch(vR({activeDataKey:void 0,active:!0,activeIndex:a,activeCoordinate:i}))}}}});var Nr=Er("externalEvent"),lZ=Au();lZ.startListening({actionCreator:Nr,effect:(e,t)=>{if(e.payload.handler!=null){var r=t.getState(),n={activeCoordinate:Xhe(r),activeDataKey:nX(r),activeIndex:$o(r),activeLabel:rX(r),activeTooltipIndex:$o(r),isTooltipActive:Zhe(r)};e.payload.handler(n,e.payload.reactEvent)}}});var h4e=Z([yd],e=>e.tooltipItemPayloads),p4e=Z([h4e,qu,(e,t,r)=>t,(e,t,r)=>r],(e,t,r,n)=>{var o=e.find(c=>c.settings.dataKey===n);if(o!=null){var{positions:a}=o;if(a!=null){var i=t(a,r);return i}}}),dZ=Er("touchMove"),uZ=Au();uZ.startListening({actionCreator:dZ,effect:(e,t)=>{var r=e.payload,n=t.getState(),o=LD(n,n.tooltip.settings.shared);if(o==="axis"){var a=JD(n,QD({clientX:r.touches[0].clientX,clientY:r.touches[0].clientY,currentTarget:r.currentTarget}));a?.activeIndex!=null&&t.dispatch(GK({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate}))}else if(o==="item"){var i,c=r.touches[0],s=document.elementFromPoint(c.clientX,c.clientY);if(!s||!s.getAttribute)return;var l=s.getAttribute(zG),d=(i=s.getAttribute(qG))!==null&&i!==void 0?i:void 0,u=p4e(t.getState(),l,d);t.dispatch(BK({activeDataKey:d,activeIndex:l,activeCoordinate:u}))}}});var f4e=cG({brush:Eve,cartesianAxis:Uge,chartData:Cpe,errorBars:Dye,graphicalItems:mye,layout:tle,legend:Ble,options:bpe,polarAxis:Gfe,polarOptions:u4e,referenceElements:Gve,rootProps:l4e,tooltip:fhe}),y4e=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return Sse({reducer:f4e,preloadedState:t,middleware:n=>n({serializableCheck:!1}).concat([nZ.middleware,oZ.middleware,eT.middleware,lZ.middleware,uZ.middleware]),devTools:{serialize:{replacer:s4e},name:"recharts-".concat(r)}})};function v4e(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,o=mt(),a=M.useRef(null);if(o)return r;a.current==null&&(a.current=y4e(t,n));var i=PO;return v.createElement(i4e,{context:i,store:a.current},r)}function m4e(e){var{layout:t,width:r,height:n,margin:o}=e,a=ct(),i=mt();return M.useEffect(()=>{i||(a(Jse(t)),a(Qse({width:r,height:n})),a(Yse(o)))},[a,i,t,r,n,o]),null}function g4e(e){var t=ct();return M.useEffect(()=>{t(d4e(e))},[t,e]),null}var k4e=["children"];function b4e(e,t){if(e==null)return{};var r,n,o=x4e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function x4e(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function WN(){return WN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},WN.apply(null,arguments)}var w4e={width:"100%",height:"100%"},M4e=M.forwardRef((e,t)=>{var r=zO(),n=qO(),o=BG();if(!wN(r)||!wN(n))return null;var{children:a,otherAttributes:i,title:c,desc:s}=e,l,d;return typeof i.tabIndex=="number"?l=i.tabIndex:l=o?0:void 0,typeof i.role=="string"?d=i.role:d=o?"application":void 0,v.createElement(kO,WN({},i,{title:c,desc:s,role:d,tabIndex:l,width:r,height:n,style:w4e,ref:t}),a)}),_4e=e=>{var{children:t}=e,r=he(NA);if(!r)return null;var{width:n,height:o,y:a,x:i}=r;return v.createElement(kO,{width:n,height:o,x:i,y:a},t)},UF=M.forwardRef((e,t)=>{var{children:r}=e,n=b4e(e,k4e),o=mt();return o?v.createElement(_4e,null,r):v.createElement(M4e,WN({ref:t},n),r)});function C4e(){var e=ct(),[t,r]=M.useState(null),n=he(Ale);return M.useEffect(()=>{if(t!=null){var o=t.getBoundingClientRect(),a=o.width/t.offsetWidth;qt(a)&&a!==n&&e(ele(a))}},[t,e,n]),r}function GF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function S4e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GF(Object(r),!0).forEach(function(n){I4e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function I4e(e,t,r){return(t=L4e(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function L4e(e){var t=N4e(e,"string");return typeof t=="symbol"?t:t+""}function N4e(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var A4e=M.forwardRef((e,t)=>{var{children:r,className:n,height:o,onClick:a,onContextMenu:i,onDoubleClick:c,onMouseDown:s,onMouseEnter:l,onMouseLeave:d,onMouseMove:u,onMouseUp:p,onTouchEnd:f,onTouchMove:m,onTouchStart:g,style:k,width:b}=e,x=ct(),[w,_]=M.useState(null),[C,S]=M.useState(null);Lpe();var I=C4e(),L=M.useCallback(E=>{I(E),typeof t=="function"&&t(E),_(E),S(E)},[I,t,_,S]),N=M.useCallback(E=>{x(rZ(E)),x(Nr({handler:a,reactEvent:E}))},[x,a]),R=M.useCallback(E=>{x($R(E)),x(Nr({handler:l,reactEvent:E}))},[x,l]),A=M.useCallback(E=>{x(UK()),x(Nr({handler:d,reactEvent:E}))},[x,d]),D=M.useCallback(E=>{x($R(E)),x(Nr({handler:u,reactEvent:E}))},[x,u]),P=M.useCallback(()=>{x(sZ())},[x]),G=M.useCallback(E=>{x(cZ(E.key))},[x]),ee=M.useCallback(E=>{x(Nr({handler:i,reactEvent:E}))},[x,i]),H=M.useCallback(E=>{x(Nr({handler:c,reactEvent:E}))},[x,c]),Y=M.useCallback(E=>{x(Nr({handler:s,reactEvent:E}))},[x,s]),q=M.useCallback(E=>{x(Nr({handler:p,reactEvent:E}))},[x,p]),T=M.useCallback(E=>{x(Nr({handler:g,reactEvent:E}))},[x,g]),re=M.useCallback(E=>{x(dZ(E)),x(Nr({handler:m,reactEvent:E}))},[x,m]),oe=M.useCallback(E=>{x(Nr({handler:f,reactEvent:E}))},[x,f]);return v.createElement(dX.Provider,{value:w},v.createElement(AU.Provider,{value:C},v.createElement("div",{className:Oe("recharts-wrapper",n),style:S4e({position:"relative",cursor:"default",width:b,height:o},k),onClick:N,onContextMenu:ee,onDoubleClick:H,onFocus:P,onKeyDown:G,onMouseDown:Y,onMouseEnter:R,onMouseLeave:A,onMouseMove:D,onMouseUp:q,onTouchEnd:oe,onTouchMove:re,onTouchStart:T,ref:L},r)))}),P4e=["children","className","width","height","style","compact","title","desc"];function j4e(e,t){if(e==null)return{};var r,n,o=$4e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function $4e(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var E4e=M.forwardRef((e,t)=>{var{children:r,className:n,width:o,height:a,style:i,compact:c,title:s,desc:l}=e,d=j4e(e,P4e),u=Qr(d);return c?v.createElement(UF,{otherAttributes:u,title:s,desc:l},r):v.createElement(A4e,{className:n,style:i,width:o,height:a,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},v.createElement(UF,{otherAttributes:u,title:s,desc:l,ref:t},v.createElement(Wve,null,r)))}),R4e=["width","height"];function ER(){return ER=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ER.apply(null,arguments)}function O4e(e,t){if(e==null)return{};var r,n,o=D4e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function D4e(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var T4e={top:5,right:5,bottom:5,left:5},z4e={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:T4e,reverseStackOrder:!1,syncMethod:"index"},iP=M.forwardRef(function(t,r){var n,o=sr(t.categoricalChartProps,z4e),{width:a,height:i}=o,c=O4e(o,R4e);if(!wN(a)||!wN(i))return null;var{chartName:s,defaultTooltipEventType:l,validateTooltipEventTypes:d,tooltipPayloadSearcher:u,categoricalChartProps:p}=t,f={chartName:s,defaultTooltipEventType:l,validateTooltipEventTypes:d,tooltipPayloadSearcher:u,eventEmitter:void 0};return v.createElement(v4e,{preloadedState:{options:f},reduxStoreName:(n=p.id)!==null&&n!==void 0?n:s},v.createElement($ve,{chartData:p.data}),v.createElement(m4e,{width:a,height:i,layout:o.layout,margin:o.margin}),v.createElement(g4e,{accessibilityLayer:o.accessibilityLayer,barCategoryGap:o.barCategoryGap,maxBarSize:o.maxBarSize,stackOffset:o.stackOffset,barGap:o.barGap,barSize:o.barSize,syncId:o.syncId,syncMethod:o.syncMethod,className:o.className}),v.createElement(E4e,ER({},c,{width:a,height:i,ref:r})))}),q4e=["axis"],V4e=M.forwardRef((e,t)=>v.createElement(iP,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:q4e,tooltipPayloadSearcher:XA,categoricalChartProps:e,ref:t})),H4e=["axis","item"],WF=M.forwardRef((e,t)=>v.createElement(iP,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:H4e,tooltipPayloadSearcher:XA,categoricalChartProps:e,ref:t})),F4e=["item"],B4e=M.forwardRef((e,t)=>v.createElement(iP,{chartName:"ScatterChart",defaultTooltipEventType:"item",validateTooltipEventTypes:F4e,tooltipPayloadSearcher:XA,categoricalChartProps:e,ref:t})),U4e=["axis"],G4e=M.forwardRef((e,t)=>v.createElement(iP,{chartName:"ComposedChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:U4e,tooltipPayloadSearcher:XA,categoricalChartProps:e,ref:t}));const Td=(e,t=0)=>{const n=e.toFixed(t).split("."),o=n[0].replace(/\B(?=(\d{3})+(?!\d))/g," ");return t>0&&n[1]?`${o}.${n[1]}`:o},KF=(e,t,r,n=20)=>{if(!e.length)return n;let o=0;e.forEach(c=>{t.forEach(s=>{const l=c[s];typeof l=="number"?o=Math.max(o,Math.abs(l)):Array.isArray(l)&&l.forEach(d=>{typeof d=="number"&&(o=Math.max(o,Math.abs(d)))})})});const i=(r?r(o,0):o.toString()).length;return Math.max(n,i*6+12)},lo={bar:["var(--color-chart-bar-1)","var(--color-chart-bar-2)","var(--color-chart-bar-3)","var(--color-chart-bar-4)","var(--color-chart-bar-5)","var(--color-chart-bar-6)"],line:["var(--color-chart-line-1)","var(--color-chart-line-2)","var(--color-chart-line-3)","var(--color-chart-line-4)","var(--color-chart-line-5)"],scatter:["var(--color-chart-scatter-1)","var(--color-chart-scatter-2)","var(--color-chart-scatter-3)","var(--color-chart-scatter-4)","var(--color-chart-scatter-5)","var(--color-chart-scatter-6)"],area:["var(--color-chart-area-1)","var(--color-chart-area-2)","var(--color-chart-area-3)","var(--color-chart-area-4)","var(--color-chart-area-5)","var(--color-chart-area-6)"],accessible:["#0066CC","#CC6600","#009966","#CC0066","#6600CC","#CC9900","#006666","#CC0000"]},Pl=e=>{switch(e){case"dashed":return"5 5";case"dotted":return"2 2";case"solid":default:return}},W4e=(e="circle")=>t=>{const{cx:r,cy:n,r:o,fill:a,stroke:i,strokeWidth:c}=t,s=o||4;switch(e){case"triangle":const l=s*1.5,d=s*1.3,u=`M ${r},${n-l} L ${r+d},${n+l/2} L ${r-d},${n+l/2} Z`;return y.jsx("path",{d:u,fill:a,stroke:i,strokeWidth:c||0});case"square":const p=s*1.4;return y.jsx("rect",{x:r-p,y:n-p,width:p*2,height:p*2,fill:a,stroke:i,strokeWidth:c||0});case"circle":default:return y.jsx("circle",{cx:r,cy:n,r:s,fill:a,stroke:i,strokeWidth:c||0})}},XF=e=>({verticalAlign:"bottom",align:"center"}),zd=({active:e,payload:t,label:r,config:n,tooltipMaxWidth:o="max-w-xs",chartType:a,referenceMarkers:i})=>{if(!e||!t||!t.length)return null;const c=i?.filter(s=>s.xValue===r)||[];return y.jsxs("div",{className:`rounded-sm border border-[var(--color-border-primary-bold)] bg-[var(--color-surface-primary)] p-[var(--space-md)] shadow-md min-w-[120px] ${o}`,role:"tooltip","aria-label":"Chart data tooltip",children:[y.jsx("p",{className:"text-label-sm mb-[var(--space-xsm)] text-[var(--color-text-primary)]",children:r}),t.map((s,l)=>{const d=n[s.dataKey];let u;if(d?.type==="range-area"&&s.payload){const f=s.payload[s.dataKey];Array.isArray(f)&&f.length===2?u=`${Td(f[0])} – ${Td(f[1])}`:u=typeof s.value=="number"?Td(s.value):s.value}else u=typeof s.value=="number"?Td(s.value):s.value;const p=()=>{switch(a){case"line":const f=n[s.dataKey]?.strokeStyle,m=Pl(f);return y.jsx("div",{className:"w-3 h-0.5 flex-shrink-0 relative","aria-hidden":"true",children:y.jsx("div",{className:"w-full h-full",style:{background:m?`linear-gradient(to right, ${s.color} 50%, transparent 50%)`:s.color,backgroundSize:m==="5 5"?"6px 100%":m==="2 2"?"2px 100%":"100% 100%"}})});case"scatter":return y.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:s.color},"aria-hidden":"true"});case"composed":switch(n[s.dataKey]?.type){case"line":const k=n[s.dataKey]?.strokeStyle,b=Pl(k);return y.jsx("div",{className:"w-3 h-0.5 flex-shrink-0 relative","aria-hidden":"true",children:y.jsx("div",{className:"w-full h-full",style:{background:b?`linear-gradient(to right, ${s.color} 50%, transparent 50%)`:s.color,backgroundSize:b==="5 5"?"6px 100%":b==="2 2"?"2px 100%":"100% 100%"}})});case"area":case"range-area":return y.jsx("div",{className:"w-2.5 h-2.5 flex-shrink-0",style:{backgroundColor:s.color},"aria-hidden":"true"});case"bar":default:return y.jsx("div",{className:"w-2 h-2 flex-shrink-0",style:{backgroundColor:s.color},"aria-hidden":"true"})}case"bar":case"horizontal-bar":case"area":default:return y.jsx("div",{className:"w-2 h-2 flex-shrink-0",style:{backgroundColor:s.color},"aria-hidden":"true"})}};return y.jsxs("div",{className:"flex items-center gap-[var(--space-xsm)]",children:[p(),y.jsxs("span",{className:"text-body-sm text-[var(--color-text-primary)] min-w-0 break-words",children:[d?.label||s.dataKey,":"]}),y.jsx("span",{className:"text-body-medium-sm text-[var(--color-text-primary)] ml-auto pl-[16px]",children:u})]},l)}),c.length>0&&y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"border-t border-[var(--color-border-primary-subtle)] my-[var(--space-xsm)]"}),c.map((s,l)=>y.jsxs(M.Fragment,{children:[s.tooltipLabel&&y.jsx("p",{className:"text-body-sm font-medium mb-[var(--space-xsm)] text-[var(--color-text-secondary)]",children:s.tooltipLabel}),!s.tooltipLabel&&l===0&&y.jsx("p",{className:"text-body-sm font-medium mb-[var(--space-xsm)] text-[var(--color-text-secondary)]",children:"Reference Markers:"}),s.dataPoints.map((d,u)=>{const p=()=>{switch(d.shape||"circle"){case"triangle":return y.jsx("svg",{width:8,height:8,className:"flex-shrink-0",viewBox:"0 0 10 10",children:y.jsx("path",{d:"M 5,2 L 8,8 L 2,8 Z",fill:d.fill||"var(--color-chart-line-1)",stroke:d.stroke||"transparent",strokeWidth:d.strokeWidth||0})});case"square":return y.jsx("svg",{width:8,height:8,className:"flex-shrink-0",viewBox:"0 0 10 10",children:y.jsx("rect",{x:"2",y:"2",width:"6",height:"6",fill:d.fill||"var(--color-chart-line-1)",stroke:d.stroke||"transparent",strokeWidth:d.strokeWidth||0})});case"circle":default:return y.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:d.fill||"var(--color-chart-line-1)",border:d.stroke?`${d.strokeWidth||1}px solid ${d.stroke}`:"none"}})}};return y.jsxs("div",{className:"flex items-center gap-[var(--space-xsm)] text-caption-sm",children:[p(),y.jsxs("span",{className:"text-[var(--color-text-secondary)] min-w-0 break-words",children:[d.label||`Marker ${u+1}`,":"]}),y.jsx("span",{className:"font-medium text-[var(--color-text-primary)] ml-auto",children:Td(d.yValue)})]},`marker-${l}-point-${u}`)})]},`marker-section-${l}`))]})]})};function hZ({type:e,data:t,config:r,className:n,height:o=300,width:a,minWidth:i=300,onDataPointClick:c,onDataPointHover:s,highlightedIndex:l,showGrid:d=!0,showLegend:u=!0,showTooltip:p=!0,colorScheme:f,responsive:m=!0,maintainAspectRatio:g=!1,legendHeight:k,margin:b,yAxisWidth:x,yAxisTickCount:w,xAxisTickFormatter:_,yAxisTickFormatter:C,showRightYAxis:S=!1,rightYAxisWidth:I,rightYAxisTickCount:L,rightYAxisDomain:N,rightYAxisTickFormatter:R,title:A,description:D,showDataTable:P=!1,tooltipMaxWidth:G="max-w-xs",legendOrder:ee,legendPosition:H="bottom",referenceMarkers:Y,yAxisDomain:q,...T}){const re=M.useMemo(()=>{if(f)return lo[f];switch(e){case"bar":case"horizontal-bar":return lo.bar;case"line":return lo.line;case"scatter":return lo.scatter;case"composed":return lo.bar;default:return lo.bar}},[e,f]),oe=Object.keys(r).filter(X=>X!=="name"),E=M.useMemo(()=>t.map(X=>{const fe={...X};return oe.forEach(ke=>{if(r[ke].type==="range-area"){const Ce=X[ke];Array.isArray(Ce)&&Ce.length===2&&(fe[ke]=Ce,fe[`${ke}_min`]=Ce[0],fe[`${ke}_max`]=Ce[1])}}),fe}),[t,r,oe]),$=M.useCallback(X=>{const fe=X?.activeTooltipIndex??0;s?.(X?.activePayload?.[0]?.payload,fe)},[s]),F=M.useCallback(()=>{s?.(null)},[s]),z=M.useCallback(X=>{const fe=X?.activeTooltipIndex??0;c?.(X?.activePayload?.[0]?.payload,fe)},[c]),Q=()=>{const X={top:0,right:0,left:0,bottom:0};return{top:b?.top??X.top,right:b?.right??X.right+J,left:b?.left??X.left,bottom:b?.bottom??X.bottom}},O=M.useMemo(()=>x||KF(E,oe,C,20),[x,E,oe,C]),J=M.useMemo(()=>{if(!S)return 0;if(I)return I;const X=oe.filter(fe=>r[fe].yAxisId==="right");return X.length===0?0:KF(E,X,R,20)},[S,I,E,oe,r,R]),B=M.useMemo(()=>oe.some(fe=>(r[fe].yAxisId||"left")==="left")?"left":"right",[oe,r]),K=k?{...XF(),wrapperStyle:{position:"absolute",bottom:0,left:0,right:0,height:k,paddingTop:8}}:XF(),U={data:E,margin:Q()},V={axisLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:2},tickLine:!1,tick:{fontSize:10,fill:"var(--color-text-tertiary)",fontFamily:"Inter, sans-serif"},tickFormatter:_},ce={axisLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:2},tickLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:1},tick:{fontSize:10,fill:"var(--color-text-tertiary)",fontFamily:"Inter, sans-serif"},width:O,tickFormatter:C,...w&&{tickCount:w},...q&&{domain:q}},te={stroke:"var(--color-border-primary-subtle)",horizontal:!0,vertical:!1},Ae=({payload:X})=>{if(!X||!X.length)return null;const fe=ee?[...X].sort((Re,Kt)=>{const Fe=ee.indexOf(Re.dataKey),Lt=ee.indexOf(Kt.dataKey);return Fe===-1?1:Lt===-1?-1:Fe-Lt}):X,Ce=Q().left+5;return y.jsx("div",{style:{paddingLeft:`${Ce}px`,paddingRight:"16px"},children:y.jsx("div",{className:"flex flex-wrap justify-start items-start gap-x-[var(--space-md)] gap-y-[var(--space-sm)]",children:fe.map((Re,Kt)=>{const Fe=()=>{switch(e){case"line":const Lt=r[Re.dataKey]?.strokeStyle,kt=Pl(Lt);return y.jsx("div",{className:"w-[12px] h-[2px] flex-shrink-0 relative","aria-hidden":"true",children:y.jsx("div",{className:"w-full h-full",style:{background:kt?`linear-gradient(to right, ${Re.color} 50%, transparent 50%)`:Re.color,backgroundSize:kt==="5 5"?"8px 100%":kt==="2 2"?"3px 100%":"100% 100%"}})});case"scatter":return y.jsx("div",{className:"w-[6px] h-[6px] rounded-full flex-shrink-0",style:{backgroundColor:Re.color},"aria-hidden":"true"});case"composed":switch(r[Re.dataKey]?.type){case"line":const Xt=r[Re.dataKey]?.strokeStyle,Ve=Pl(Xt);return y.jsx("div",{className:"w-[12px] h-[2px] flex-shrink-0 relative","aria-hidden":"true",children:y.jsx("div",{className:"w-full h-full",style:{background:Ve?`linear-gradient(to right, ${Re.color} 50%, transparent 50%)`:Re.color,backgroundSize:Ve==="5 5"?"8px 100%":Ve==="2 2"?"3px 100%":"100% 100%"}})});case"area":case"range-area":return y.jsx("div",{className:"w-[8px] h-[8px] flex-shrink-0",style:{backgroundColor:Re.color},"aria-hidden":"true"});case"bar":default:return y.jsx("div",{className:"w-[6px] h-[6px] flex-shrink-0",style:{backgroundColor:Re.color},"aria-hidden":"true"})}case"bar":case"horizontal-bar":default:return y.jsx("div",{className:"w-[6px] h-[6px] flex-shrink-0",style:{backgroundColor:Re.color},"aria-hidden":"true"})}};return y.jsxs("div",{className:"flex items-center justify-center gap-[var(--space-xsm)]",children:[Fe(),y.jsx("span",{className:"[&]:text-body-medium-xsm [&]:text-[var(--color-text-secondary)] leading-none whitespace-nowrap",children:Re.value})]},Kt)})})})},Pe=()=>{switch(e){case"bar":return y.jsxs(WF,{...U,onMouseMove:$,onMouseLeave:F,onClick:z,children:[d&&y.jsx(Cl,{...te}),y.jsx(qs,{dataKey:"name",...V}),y.jsx(Ln,{...ce}),p&&y.jsx(Od,{content:X=>y.jsx(zd,{...X,config:r,tooltipMaxWidth:G,chartType:e}),cursor:{stroke:"var(--color-border-primary)",strokeWidth:1,fill:"var(--color-background-neutral)",fillOpacity:1},position:{x:void 0,y:void 0},offset:10,animationDuration:0}),u&&y.jsx(wo,{content:y.jsx(Ae,{}),...K}),oe.map((X,fe)=>{const ke=r[X].color||re[fe%re.length];return y.jsx(Z0,{dataKey:X,name:r[X].label,fill:ke,radius:[0,0,0,0],className:"cursor-pointer transition-colors",isAnimationActive:!1,maxBarSize:60},X)})]});case"horizontal-bar":return y.jsxs(WF,{...U,layout:"vertical",onMouseMove:$,onMouseLeave:F,onClick:z,children:[d&&y.jsx(Cl,{...te,horizontal:!1,vertical:!0}),y.jsx(qs,{type:"number",...V}),y.jsx(Ln,{type:"category",dataKey:"name",...ce}),p&&y.jsx(Od,{content:X=>y.jsx(zd,{...X,config:r,tooltipMaxWidth:G,chartType:e}),cursor:{stroke:"var(--color-border-primary)",strokeWidth:1,fill:"var(--color-background-neutral)",fillOpacity:1},position:{x:void 0,y:void 0},offset:10,animationDuration:0}),u&&y.jsx(wo,{content:y.jsx(Ae,{}),...K}),oe.map((X,fe)=>{const ke=r[X].color||re[fe%re.length];return y.jsx(Z0,{dataKey:X,name:r[X].label,fill:ke,radius:[0,0,0,0],className:"cursor-pointer transition-colors",isAnimationActive:!1,maxBarSize:40},X)})]});case"line":return y.jsxs(V4e,{...U,onMouseMove:$,onMouseLeave:F,onClick:z,children:[d&&y.jsx(Cl,{...te,yAxisId:B}),y.jsx(qs,{dataKey:"name",...V}),y.jsx(Ln,{yAxisId:"left",...ce}),S&&y.jsx(Ln,{yAxisId:"right",orientation:"right",axisLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:2},tickLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:1},tick:{fontSize:10,fill:"var(--color-text-tertiary)",fontFamily:"Inter, sans-serif"},width:J,tickFormatter:R,...L&&{tickCount:L},...N&&{domain:N}}),Y?.map((X,fe)=>X.showLine!==!1&&y.jsx(UD,{x:X.xValue,stroke:X.lineStyle?.stroke||"#000000",strokeWidth:X.lineStyle?.strokeWidth||2,strokeDasharray:X.lineStyle?.strokeDasharray},`marker-line-${fe}`)),p&&y.jsx(Od,{content:X=>y.jsx(zd,{...X,config:r,tooltipMaxWidth:G,chartType:e,referenceMarkers:Y}),cursor:{stroke:"var(--color-border-primary)",strokeWidth:1,fill:"var(--color-background-neutral)",fillOpacity:1},position:{x:void 0,y:void 0},offset:10,animationDuration:0}),u&&y.jsx(wo,{content:y.jsx(Ae,{}),...K}),oe.map((X,fe)=>{const ke=r[X].color||re[fe%re.length];return y.jsx(IR,{type:"linear",dataKey:X,name:r[X].label,yAxisId:r[X].yAxisId||"left",stroke:ke,strokeWidth:2,strokeDasharray:Pl(r[X].strokeStyle),dot:r[X].showDots===!0?{fill:ke,strokeWidth:0,r:3}:!1,activeDot:{r:5,fill:ke},className:"cursor-pointer transition-colors",isAnimationActive:!1},X)}),Y?.map((X,fe)=>y.jsx(M.Fragment,{children:X.dataPoints.map((ke,Ce)=>y.jsx(WD,{x:X.xValue,y:ke.yValue,r:ke.size||4,fill:ke.fill||"var(--color-chart-line-1)",stroke:ke.stroke||"transparent",strokeWidth:ke.strokeWidth||0,shape:W4e(ke.shape||"circle")},`marker-${fe}-point-${Ce}`))},`marker-dots-${fe}`))]});case"scatter":return y.jsxs(B4e,{...U,onMouseMove:$,onMouseLeave:F,onClick:z,children:[d&&y.jsx(Cl,{...te}),y.jsx(qs,{dataKey:"x",type:"number",...V}),y.jsx(Ln,{dataKey:"y",type:"number",...ce}),p&&y.jsx(Od,{content:X=>y.jsx(zd,{...X,config:r,tooltipMaxWidth:G,chartType:e}),cursor:{stroke:"var(--color-border-primary)",strokeWidth:1,fill:"var(--color-background-neutral)",fillOpacity:1},position:{x:void 0,y:void 0},offset:10,animationDuration:0}),u&&y.jsx(wo,{content:y.jsx(Ae,{}),...K}),oe.filter(X=>X!=="x"&&X!=="y"&&X!=="name").map((X,fe)=>{const ke=r[X]?.color||re[fe%re.length];return y.jsx(JX,{name:r[X]?.label||X,data:t.map(Ce=>({x:Ce.x,y:Ce.y,[X]:Ce[X]})),fill:ke,className:"cursor-pointer transition-colors",isAnimationActive:!1},X)})]});case"composed":return y.jsxs(G4e,{...U,onMouseMove:$,onMouseLeave:F,onClick:z,children:[d&&y.jsx(Cl,{...te,yAxisId:B}),y.jsx(qs,{dataKey:"name",...V}),y.jsx(Ln,{yAxisId:"left",...ce,domain:[0,"dataMax"]}),S&&y.jsx(Ln,{yAxisId:"right",orientation:"right",axisLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:2},tickLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:1},tick:{fontSize:10,fill:"var(--color-text-tertiary)",fontFamily:"Inter, sans-serif"},width:J,tickFormatter:R,...L&&{tickCount:L},...N&&{domain:N}}),p&&y.jsx(Od,{content:X=>y.jsx(zd,{...X,config:r,tooltipMaxWidth:G,chartType:e}),cursor:{stroke:"var(--color-border-primary)",strokeWidth:1,fill:"var(--color-background-neutral)",fillOpacity:1},position:{x:void 0,y:void 0},offset:10,animationDuration:0}),u&&y.jsx(wo,{content:y.jsx(Ae,{}),...K}),oe.map((X,fe)=>{const ke=r[X].color||re[fe%re.length];return(r[X].type||"bar")==="bar"?y.jsx(Z0,{dataKey:X,name:r[X].label,yAxisId:r[X].yAxisId||"left",fill:ke,radius:[0,0,0,0],className:"cursor-pointer transition-colors",isAnimationActive:!1,maxBarSize:60},X):null}),oe.map((X,fe)=>{const ke=r[X].color||re[fe%re.length],Ce=r[X].type||"bar";return Ce==="area"?y.jsx(NR,{type:"linear",dataKey:X,name:r[X].label,yAxisId:r[X].yAxisId||"left",stroke:r[X].stroke??ke,fill:r[X].fill??ke,fillOpacity:.3,className:"cursor-pointer transition-colors",isAnimationActive:!1},X):Ce==="range-area"?y.jsx(NR,{type:"linear",dataKey:X,name:r[X].label,yAxisId:r[X].yAxisId||"left",stroke:r[X].stroke??"none",fill:r[X].fill??ke,fillOpacity:.3,className:"cursor-pointer transition-colors",isAnimationActive:!1},X):null}),oe.map((X,fe)=>{const ke=r[X].color||re[fe%re.length];return(r[X].type||"bar")==="line"?y.jsx(IR,{type:"linear",dataKey:X,name:r[X].label,yAxisId:r[X].yAxisId||"left",stroke:ke,strokeWidth:2,strokeDasharray:Pl(r[X].strokeStyle),dot:r[X].showDots===!0?{fill:ke,strokeWidth:0,r:3}:!1,activeDot:{r:5,fill:ke},className:"cursor-pointer transition-colors",isAnimationActive:!1},X):null})]});default:return y.jsx("div",{children:"Unsupported chart type"})}},ze=()=>P?y.jsx("div",{className:"sr-only",children:y.jsxs("table",{role:"table","aria-label":A?`Data for ${A}`:"Chart data",children:[y.jsxs("caption",{className:"sr-only",children:[A&&`${A}. `,D||`${e} chart showing ${oe.length} data series across ${t.length} categories.`]}),y.jsx("thead",{children:y.jsxs("tr",{children:[y.jsx("th",{scope:"col",children:"Category"}),oe.map(X=>y.jsx("th",{scope:"col",children:r[X]?.label||X},X))]})}),y.jsx("tbody",{children:t.map((X,fe)=>y.jsxs("tr",{children:[y.jsx("th",{scope:"row",children:X.name||`Item ${fe+1}`}),oe.map(ke=>y.jsx("td",{children:C?C(X[ke],fe):X[ke]},ke))]},fe))})]})}):null,qe=M.useRef(null);return M.useEffect(()=>{const X=qe.current;if(!X)return;const fe=setTimeout(()=>{X.querySelectorAll(".recharts-cartesian-axis-tick").forEach(Ce=>{const Re=Ce.querySelector("text"),Kt=Ce.querySelector(".recharts-cartesian-axis-tick-line");Re?.textContent?.trim()==="0"&&Kt&&Kt.setAttribute("stroke-width","2")})},100);return()=>clearTimeout(fe)},[t,e]),y.jsxs("div",{ref:qe,className:j("w-full",n),style:{minWidth:i},role:"img","aria-label":A||`${e} chart`,"aria-describedby":D?`${qe.current?.id||"chart"}-desc`:void 0,...T,children:[A&&y.jsx("h3",{className:"sr-only",id:`${qe.current?.id||"chart"}-title`,children:A}),D&&y.jsx("p",{className:"sr-only",id:`${qe.current?.id||"chart"}-desc`,children:D}),(()=>{const X=k?o-k:o,fe=m?y.jsx(Gpe,{width:a||"100%",height:X,children:Pe()||y.jsx("div",{children:"Chart error"})}):y.jsx("div",{style:{width:a||"100%",height:X,minWidth:i},children:Pe()||y.jsx("div",{children:"Chart error"})});return k?y.jsx("div",{style:{width:a||"100%"},children:fe}):fe})(),y.jsx(ze,{})]})}const K4e=(e,t="bar")=>{const r=lo[t];return Array.from({length:e},(n,o)=>r[o%r.length])},X4e=(e,t,r)=>Array.isArray(e)?e.reduce((o,a,i)=>(o[a]={label:t?.[i]||a,color:r?.[i]},o),{}):e;function Z4e(e,t){const r=v.createContext(t),n=a=>{const{children:i,...c}=a,s=v.useMemo(()=>c,Object.values(c));return y.jsx(r.Provider,{value:s,children:i})};n.displayName=e+"Provider";function o(a){const i=v.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function ht(e,t=[]){let r=[];function n(a,i){const c=v.createContext(i),s=r.length;r=[...r,i];const l=u=>{const{scope:p,children:f,...m}=u,g=p?.[e]?.[s]||c,k=v.useMemo(()=>m,Object.values(m));return y.jsx(g.Provider,{value:k,children:f})};l.displayName=a+"Provider";function d(u,p){const f=p?.[e]?.[s]||c,m=v.useContext(f);if(m)return m;if(i!==void 0)return i;throw new Error(`\`${u}\` must be used within \`${a}\``)}return[l,d]}const o=()=>{const a=r.map(i=>v.createContext(i));return function(c){const s=c?.[e]||a;return v.useMemo(()=>({[`__scope${e}`]:{...c,[e]:s}}),[c,s])}};return o.scopeName=e,[n,Y4e(o,...t)]}function Y4e(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=n.reduce((c,{useScope:s,scopeName:l})=>{const u=s(a)[`__scope${l}`];return{...c,...u}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function Pt(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...r)=>t.current?.(...r),[])}var ut=globalThis?.document?v.useLayoutEffect:()=>{};function ZF(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Un(...e){return t=>{let r=!1;const n=e.map(o=>{const a=ZF(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){const a=n[o];typeof a=="function"?a():ZF(e[o],null)}}}}function Ie(...e){return v.useCallback(Un(...e),e)}function Eo(e){const t=Q4e(e),r=v.forwardRef((n,o)=>{const{children:a,...i}=n,c=v.Children.toArray(a),s=c.find(e5e);if(s){const l=s.props.children,d=c.map(u=>u===s?v.Children.count(l)>1?v.Children.only(null):v.isValidElement(l)?l.props.children:null:u);return y.jsx(t,{...i,ref:o,children:v.isValidElement(l)?v.cloneElement(l,void 0,d):null})}return y.jsx(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}var J4e=Eo("Slot");function Q4e(e){const t=v.forwardRef((r,n)=>{const{children:o,...a}=r;if(v.isValidElement(o)){const i=r5e(o),c=t5e(a,o.props);return o.type!==v.Fragment&&(c.ref=n?Un(n,i):i),v.cloneElement(o,c)}return v.Children.count(o)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var pZ=Symbol("radix.slottable");function fZ(e){const t=({children:r})=>y.jsx(y.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=pZ,t}function e5e(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===pZ}function t5e(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...c)=>{const s=a(...c);return o(...c),s}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function r5e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var n5e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ie=n5e.reduce((e,t)=>{const r=Eo(`Primitive.${t}`),n=v.forwardRef((o,a)=>{const{asChild:i,...c}=o,s=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(s,{...c,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function yZ(e,t){e&&fA.flushSync(()=>e.dispatchEvent(t))}var o5e=AO();function a5e(){return o5e.useSyncExternalStore(i5e,()=>!0,()=>!1)}function i5e(){return()=>{}}var tT="Avatar",[c5e,wnt]=ht(tT),[s5e,vZ]=c5e(tT),mZ=v.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[o,a]=v.useState("idle");return y.jsx(s5e,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:y.jsx(ie.span,{...n,ref:t})})});mZ.displayName=tT;var gZ="AvatarImage",kZ=v.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:o=()=>{},...a}=e,i=vZ(gZ,r),c=l5e(n,a),s=Pt(l=>{o(l),i.onImageLoadingStatusChange(l)});return ut(()=>{c!=="idle"&&s(c)},[c,s]),c==="loaded"?y.jsx(ie.img,{...a,ref:t,src:n}):null});kZ.displayName=gZ;var bZ="AvatarFallback",xZ=v.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...o}=e,a=vZ(bZ,r),[i,c]=v.useState(n===void 0);return v.useEffect(()=>{if(n!==void 0){const s=window.setTimeout(()=>c(!0),n);return()=>window.clearTimeout(s)}},[n]),i&&a.imageLoadingStatus!=="loaded"?y.jsx(ie.span,{...o,ref:t}):null});xZ.displayName=bZ;function YF(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function l5e(e,{referrerPolicy:t,crossOrigin:r}){const n=a5e(),o=v.useRef(null),a=n?(o.current||(o.current=new window.Image),o.current):null,[i,c]=v.useState(()=>YF(a,e));return ut(()=>{c(YF(a,e))},[a,e]),ut(()=>{const s=u=>()=>{c(u)};if(!a)return;const l=s("loaded"),d=s("error");return a.addEventListener("load",l),a.addEventListener("error",d),t&&(a.referrerPolicy=t),typeof r=="string"&&(a.crossOrigin=r),()=>{a.removeEventListener("load",l),a.removeEventListener("error",d)}},[a,r,t]),i}var wZ=mZ,MZ=kZ,_Z=xZ;const CZ=De("relative flex shrink-0 overflow-hidden items-center justify-center",{variants:{size:{xxs:"h-4 w-4",xs:"h-[var(--size-sm)] w-[var(--size-sm)]",sm:"h-[var(--size-md)] w-[var(--size-md)]",md:"h-[var(--size-lg)] w-[var(--size-lg)]",lg:"h-[var(--size-xlg)] w-[var(--size-xlg)]",xl:"h-[var(--size-2xlg)] w-[var(--size-2xlg)]"},shape:{circle:"rounded-full",rounded:"rounded-md"}},defaultVariants:{size:"md",shape:"circle"}}),SZ=De("flex h-full w-full items-center justify-center font-medium [&]:text-[var(--color-text-inverse)]",{variants:{size:{xxs:"text-caption-xsm",xs:"text-caption-xsm",sm:"text-caption-sm",md:"text-label-sm",lg:"text-label-md",xl:"text-heading-sm"},shape:{circle:"rounded-full",rounded:"rounded-md"},variant:{information:"bg-[var(--color-background-information-bold)]",success:"bg-[var(--color-background-success-bold)]",error:"bg-[var(--color-background-error-bold)]",warning:"bg-[var(--color-background-warning-bold)]",violet:"bg-[var(--violet-500)]",magenta:"bg-[var(--magenta-500)]"}},defaultVariants:{size:"md",shape:"circle",variant:"information"}}),IZ=v.forwardRef(({className:e,size:t,shape:r,...n},o)=>y.jsx(wZ,{ref:o,className:j(CZ({size:t,shape:r}),e),...n}));IZ.displayName=wZ.displayName;const LZ=v.forwardRef(({className:e,...t},r)=>y.jsxs("div",{className:"relative h-full w-full rounded-[inherit]",children:[y.jsx(MZ,{ref:r,className:j("aspect-square h-full w-full object-cover rounded-[inherit]",e),...t}),y.jsx("div",{className:"absolute inset-0 rounded-[inherit] shadow-[inset_0_0_0_1px_rgba(85,95,109,0.1)] pointer-events-none"})]}));LZ.displayName=MZ.displayName;const NZ=v.forwardRef(({className:e,size:t,shape:r,variant:n,...o},a)=>y.jsx(_Z,{ref:a,className:j(SZ({size:t,shape:r,variant:n}),e),...o}));NZ.displayName=_Z.displayName;const d5e=De("inline-flex items-center rounded-sm px-[var(--space-sm)] py-[var(--space-xsm)] text-caption-medium-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring-color)] focus-visible:ring-offset-1 cursor-default",{variants:{variant:{default:"border-transparent bg-[var(--grey-100)] text-[var(--color-text-primary)]",secondary:"border-transparent bg-[var(--grey-100)] text-[var(--color-text-primary)]",destructive:"border-transparent bg-[var(--color-background-error-bold)] text-[var(--color-text-inverse)]",outline:"bg-transparent border border-[var(--color-border-primary-strong)] text-[var(--color-text-primary)]"},intent:{neutral:"",brand:"",success:"",warning:"",destructive:""},appearance:{solid:"border-transparent",subtle:"border-transparent",outline:"bg-transparent"},size:{sm:"px-[var(--space-xsm)] h-5 [&]:text-body-strong-xsm",md:"px-[var(--space-sm)] h-6 [&]:text-body-strong-sm",lg:"px-[var(--space-md)] h-7 [&]:text-body-strong-md"}},compoundVariants:[{intent:"neutral",appearance:"solid",class:"border-transparent bg-[var(--grey-600)] text-[var(--color-text-inverse)]"},{intent:"neutral",appearance:"subtle",class:"border-transparent bg-[var(--grey-100)] text-[var(--color-text-primary)]"},{intent:"neutral",appearance:"outline",class:"border border-[var(--color-border-primary-strong)] text-[var(--color-text-primary)]"},{intent:"brand",appearance:"solid",class:"border-transparent bg-[var(--color-background-brand)] text-[var(--color-text-inverse)]"},{intent:"brand",appearance:"subtle",class:"border-transparent bg-[var(--blue-50)] text-[var(--color-text-brand)]"},{intent:"brand",appearance:"outline",class:"border border-[var(--color-blue-300)] text-[var(--color-text-brand)]"},{intent:"success",appearance:"solid",class:"border-transparent bg-[var(--color-background-success-bold)] text-[var(--color-text-inverse)]"},{intent:"success",appearance:"subtle",class:"border-transparent bg-[var(--color-background-success)] text-[var(--color-text-success)]"},{intent:"success",appearance:"outline",class:"border border-[var(--color-border-success)] text-[var(--color-text-success)]"},{intent:"warning",appearance:"solid",class:"border-transparent bg-[var(--color-background-warning-bold)] text-[var(--color-text-inverse)]"},{intent:"warning",appearance:"subtle",class:"border-transparent bg-[var(--color-background-warning)] text-[var(--color-text-warning)]"},{intent:"warning",appearance:"outline",class:"border border-[var(--color-border-warning)] text-[var(--color-text-warning)]"},{intent:"destructive",appearance:"solid",class:"border-transparent bg-[var(--color-background-error-bold)] text-[var(--color-text-inverse)]"},{intent:"destructive",appearance:"subtle",class:"border-transparent bg-[var(--color-background-error)] text-[var(--color-text-error)]"},{intent:"destructive",appearance:"outline",class:"border border-[var(--color-border-error)] text-[var(--color-text-error)]"}],defaultVariants:{variant:"default",intent:"neutral",appearance:"subtle",size:"md"}}),nr=v.forwardRef(({className:e,variant:t,intent:r,appearance:n,size:o,...a},i)=>y.jsx("div",{ref:i,className:j(d5e({variant:t,intent:r,appearance:n,size:o}),e),...a}));nr.displayName="Badge";function ae(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}var u5e=v[" useInsertionEffect ".trim().toString()]||ut;function Vt({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,i]=h5e({defaultProp:t,onChange:r}),c=e!==void 0,s=c?e:o;{const d=v.useRef(e!==void 0);v.useEffect(()=>{const u=d.current;u!==c&&console.warn(`${n} is changing from ${u?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=c},[c,n])}const l=v.useCallback(d=>{if(c){const u=p5e(d)?d(e):d;u!==e&&i.current?.(u)}else a(d)},[c,e,a,i]);return[s,l]}function h5e({defaultProp:e,onChange:t}){const[r,n]=v.useState(e),o=v.useRef(r),a=v.useRef(t);return u5e(()=>{a.current=t},[t]),v.useEffect(()=>{o.current!==r&&(a.current?.(r),o.current=r)},[r,o]),[r,n,a]}function p5e(e){return typeof e=="function"}function f5e(e,t){return v.useReducer((r,n)=>t[r][n]??r,e)}var It=e=>{const{present:t,children:r}=e,n=y5e(t),o=typeof r=="function"?r({present:n.isPresent}):v.Children.only(r),a=Ie(n.ref,v5e(o));return typeof r=="function"||n.isPresent?v.cloneElement(o,{ref:a}):null};It.displayName="Presence";function y5e(e){const[t,r]=v.useState(),n=v.useRef(null),o=v.useRef(e),a=v.useRef("none"),i=e?"mounted":"unmounted",[c,s]=f5e(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const l=$0(n.current);a.current=c==="mounted"?l:"none"},[c]),ut(()=>{const l=n.current,d=o.current;if(d!==e){const p=a.current,f=$0(l);e?s("MOUNT"):f==="none"||l?.display==="none"?s("UNMOUNT"):s(d&&p!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,s]),ut(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,u=f=>{const g=$0(n.current).includes(CSS.escape(f.animationName));if(f.target===t&&g&&(s("ANIMATION_END"),!o.current)){const k=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=k)})}},p=f=>{f.target===t&&(a.current=$0(n.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else s("ANIMATION_END")},[t,s]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:v.useCallback(l=>{n.current=l?getComputedStyle(l):null,r(l)},[])}}function $0(e){return e?.animationName||"none"}function v5e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var m5e=v[" useId ".trim().toString()]||(()=>{}),g5e=0;function vt(e){const[t,r]=v.useState(m5e());return ut(()=>{r(n=>n??String(g5e++))},[e]),e||(t?`radix-${t}`:"")}var cP="Collapsible",[k5e,AZ]=ht(cP),[b5e,rT]=k5e(cP),PZ=v.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...c}=e,[s,l]=Vt({prop:n,defaultProp:o??!1,onChange:i,caller:cP});return y.jsx(b5e,{scope:r,disabled:a,contentId:vt(),open:s,onOpenToggle:v.useCallback(()=>l(d=>!d),[l]),children:y.jsx(ie.div,{"data-state":oT(s),"data-disabled":a?"":void 0,...c,ref:t})})});PZ.displayName=cP;var jZ="CollapsibleTrigger",yu=v.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=rT(jZ,r);return y.jsx(ie.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":oT(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:ae(e.onClick,o.onOpenToggle)})});yu.displayName=jZ;var nT="CollapsibleContent",sP=v.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=rT(nT,e.__scopeCollapsible);return y.jsx(It,{present:r||o.open,children:({present:a})=>y.jsx(x5e,{...n,ref:t,present:a})})});sP.displayName=nT;var x5e=v.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...a}=e,i=rT(nT,r),[c,s]=v.useState(n),l=v.useRef(null),d=Ie(t,l),u=v.useRef(0),p=u.current,f=v.useRef(0),m=f.current,g=i.open||c,k=v.useRef(g),b=v.useRef(void 0);return v.useEffect(()=>{const x=requestAnimationFrame(()=>k.current=!1);return()=>cancelAnimationFrame(x)},[]),ut(()=>{const x=l.current;if(x){b.current=b.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const w=x.getBoundingClientRect();u.current=w.height,f.current=w.width,k.current||(x.style.transitionDuration=b.current.transitionDuration,x.style.animationName=b.current.animationName),s(n)}},[i.open,n]),y.jsx(ie.div,{"data-state":oT(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...a,ref:d,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:g&&o})});function oT(e){return e?"open":"closed"}var $Z=PZ,w5e=yu,M5e=sP;/**
113
+ */var VF;function Bke(){return VF||(VF=1,process.env.NODE_ENV!=="production"&&(function(){function e(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=M,r=typeof Object.is=="function"?Object.is:e,n=t.useSyncExternalStore,o=t.useRef,a=t.useEffect,i=t.useMemo,c=t.useDebugValue;Y$.useSyncExternalStoreWithSelector=function(s,l,d,u,p){var f=o(null);if(f.current===null){var m={hasValue:!1,value:null};f.current=m}else m=f.current;f=i(function(){function k(C){if(!b){if(b=!0,x=C,C=u(C),p!==void 0&&m.hasValue){var S=m.value;if(p(S,C))return w=S}return w=C}if(S=w,r(x,C))return S;var I=u(C);return p!==void 0&&p(S,I)?(x=C,S):(x=C,w=I)}var b=!1,x,w,_=d===void 0?null:d;return[function(){return k(l())},_===null?void 0:function(){return k(_())}]},[l,d,u,p]);var g=n(s,f[0],f[1]);return a(function(){m.hasValue=!0,m.value=g},[g]),c(g),g},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Y$}var HF;function Uke(){return HF||(HF=1,process.env.NODE_ENV==="production"?j0.exports=Fke():j0.exports=Bke()),j0.exports}Uke();function Gke(e){e()}function Wke(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Gke(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const o=t={callback:r,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!n||e===null||(n=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var FF={notify(){},get:()=>[]};function Kke(e,t){let r,n=FF,o=0,a=!1;function i(g){d();const k=n.subscribe(g);let b=!1;return()=>{b||(b=!0,k(),u())}}function c(){n.notify()}function s(){m.onStateChange&&m.onStateChange()}function l(){return a}function d(){o++,r||(r=e.subscribe(s),n=Wke())}function u(){o--,r&&o===0&&(r(),r=void 0,n.clear(),n=FF)}function p(){a||(a=!0,d())}function f(){a&&(a=!1,u())}const m={addNestedSub:i,notifyNestedSubs:c,handleChangeWrapper:s,isSubscribed:l,trySubscribe:p,tryUnsubscribe:f,getListeners:()=>n};return m}var Xke=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Zke=Xke(),Yke=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Jke=Yke(),Qke=()=>Zke||Jke?v.useLayoutEffect:v.useEffect,e4e=Qke(),t4e=Symbol.for("react-redux-context"),r4e=typeof globalThis<"u"?globalThis:{};function n4e(){if(!v.createContext)return{};const e=r4e[t4e]??=new Map;let t=e.get(v.createContext);return t||(t=v.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(v.createContext,t)),t}var o4e=n4e();function a4e(e){const{children:t,context:r,serverState:n,store:o}=e,a=v.useMemo(()=>{const s=Kke(o),l={store:o,subscription:s,getServerState:n?()=>n:void 0};if(process.env.NODE_ENV==="production")return l;{const{identityFunctionCheck:d="once",stabilityCheck:u="once"}=e;return Object.assign(l,{stabilityCheck:u,identityFunctionCheck:d})}},[o,n]),i=v.useMemo(()=>o.getState(),[o]);e4e(()=>{const{subscription:s}=a;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),i!==o.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[a,i]);const c=r||o4e;return v.createElement(c.Provider,{value:a},t)}var i4e=a4e,c4e=(e,t)=>t,JD=Z([c4e,Te,nK,Ct,QK,Qn,ope,jt],lpe),QD=e=>{var t=e.currentTarget.getBoundingClientRect(),r=t.width/e.currentTarget.offsetWidth,n=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/r),chartY:Math.round((e.clientY-t.top)/n)}},rZ=Er("mouseClick"),nZ=Au();nZ.startListening({actionCreator:rZ,effect:(e,t)=>{var r=e.payload,n=JD(t.getState(),QD(r));n?.activeIndex!=null&&t.dispatch(phe({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var $R=Er("mouseMove"),oZ=Au();oZ.startListening({actionCreator:$R,effect:(e,t)=>{var r=e.payload,n=t.getState(),o=LD(n,n.tooltip.settings.shared),a=JD(n,QD(r));o==="axis"&&(a?.activeIndex!=null?t.dispatch(GK({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate})):t.dispatch(UK()))}});function s4e(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":t}var BF={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},aZ=Cr({name:"rootProps",initialState:BF,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:BF.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className}}}),l4e=aZ.reducer,{updateOptions:d4e}=aZ.actions,iZ=Cr({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:xnt}=iZ.actions,u4e=iZ.reducer,cZ=Er("keyDown"),sZ=Er("focus"),eT=Au();eT.startListening({actionCreator:cZ,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:o}=r.tooltip,a=e.payload;if(!(a!=="ArrowRight"&&a!=="ArrowLeft"&&a!=="Enter")){var i=Number(ND(o,vd(r))),c=Qn(r);if(a==="Enter"){var s=zN(r,"axis","hover",String(o.index));t.dispatch(vR({active:!o.active,activeIndex:o.index,activeDataKey:o.dataKey,activeCoordinate:s}));return}var l=ohe(r),d=l==="left-to-right"?1:-1,u=a==="ArrowRight"?1:-1,p=i+u*d;if(!(c==null||p>=c.length||p<0)){var f=zN(r,"axis","hover",String(p));t.dispatch(vR({active:!0,activeIndex:p.toString(),activeDataKey:void 0,activeCoordinate:f}))}}}}});eT.startListening({actionCreator:sZ,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:o}=r.tooltip;if(!o.active&&o.index==null){var a="0",i=zN(r,"axis","hover",String(a));t.dispatch(vR({activeDataKey:void 0,active:!0,activeIndex:a,activeCoordinate:i}))}}}});var Nr=Er("externalEvent"),lZ=Au();lZ.startListening({actionCreator:Nr,effect:(e,t)=>{if(e.payload.handler!=null){var r=t.getState(),n={activeCoordinate:Xhe(r),activeDataKey:nX(r),activeIndex:$o(r),activeLabel:rX(r),activeTooltipIndex:$o(r),isTooltipActive:Zhe(r)};e.payload.handler(n,e.payload.reactEvent)}}});var h4e=Z([yd],e=>e.tooltipItemPayloads),p4e=Z([h4e,qu,(e,t,r)=>t,(e,t,r)=>r],(e,t,r,n)=>{var o=e.find(c=>c.settings.dataKey===n);if(o!=null){var{positions:a}=o;if(a!=null){var i=t(a,r);return i}}}),dZ=Er("touchMove"),uZ=Au();uZ.startListening({actionCreator:dZ,effect:(e,t)=>{var r=e.payload,n=t.getState(),o=LD(n,n.tooltip.settings.shared);if(o==="axis"){var a=JD(n,QD({clientX:r.touches[0].clientX,clientY:r.touches[0].clientY,currentTarget:r.currentTarget}));a?.activeIndex!=null&&t.dispatch(GK({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate}))}else if(o==="item"){var i,c=r.touches[0],s=document.elementFromPoint(c.clientX,c.clientY);if(!s||!s.getAttribute)return;var l=s.getAttribute(zG),d=(i=s.getAttribute(qG))!==null&&i!==void 0?i:void 0,u=p4e(t.getState(),l,d);t.dispatch(BK({activeDataKey:d,activeIndex:l,activeCoordinate:u}))}}});var f4e=cG({brush:Eve,cartesianAxis:Uge,chartData:Cpe,errorBars:Dye,graphicalItems:mye,layout:tle,legend:Ble,options:bpe,polarAxis:Gfe,polarOptions:u4e,referenceElements:Gve,rootProps:l4e,tooltip:fhe}),y4e=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return Sse({reducer:f4e,preloadedState:t,middleware:n=>n({serializableCheck:!1}).concat([nZ.middleware,oZ.middleware,eT.middleware,lZ.middleware,uZ.middleware]),devTools:{serialize:{replacer:s4e},name:"recharts-".concat(r)}})};function v4e(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,o=mt(),a=M.useRef(null);if(o)return r;a.current==null&&(a.current=y4e(t,n));var i=PO;return v.createElement(i4e,{context:i,store:a.current},r)}function m4e(e){var{layout:t,width:r,height:n,margin:o}=e,a=ct(),i=mt();return M.useEffect(()=>{i||(a(Jse(t)),a(Qse({width:r,height:n})),a(Yse(o)))},[a,i,t,r,n,o]),null}function g4e(e){var t=ct();return M.useEffect(()=>{t(d4e(e))},[t,e]),null}var k4e=["children"];function b4e(e,t){if(e==null)return{};var r,n,o=x4e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function x4e(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function WN(){return WN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},WN.apply(null,arguments)}var w4e={width:"100%",height:"100%"},M4e=M.forwardRef((e,t)=>{var r=zO(),n=qO(),o=BG();if(!wN(r)||!wN(n))return null;var{children:a,otherAttributes:i,title:c,desc:s}=e,l,d;return typeof i.tabIndex=="number"?l=i.tabIndex:l=o?0:void 0,typeof i.role=="string"?d=i.role:d=o?"application":void 0,v.createElement(kO,WN({},i,{title:c,desc:s,role:d,tabIndex:l,width:r,height:n,style:w4e,ref:t}),a)}),_4e=e=>{var{children:t}=e,r=he(NA);if(!r)return null;var{width:n,height:o,y:a,x:i}=r;return v.createElement(kO,{width:n,height:o,x:i,y:a},t)},UF=M.forwardRef((e,t)=>{var{children:r}=e,n=b4e(e,k4e),o=mt();return o?v.createElement(_4e,null,r):v.createElement(M4e,WN({ref:t},n),r)});function C4e(){var e=ct(),[t,r]=M.useState(null),n=he(Ale);return M.useEffect(()=>{if(t!=null){var o=t.getBoundingClientRect(),a=o.width/t.offsetWidth;qt(a)&&a!==n&&e(ele(a))}},[t,e,n]),r}function GF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function S4e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GF(Object(r),!0).forEach(function(n){I4e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function I4e(e,t,r){return(t=L4e(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function L4e(e){var t=N4e(e,"string");return typeof t=="symbol"?t:t+""}function N4e(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var A4e=M.forwardRef((e,t)=>{var{children:r,className:n,height:o,onClick:a,onContextMenu:i,onDoubleClick:c,onMouseDown:s,onMouseEnter:l,onMouseLeave:d,onMouseMove:u,onMouseUp:p,onTouchEnd:f,onTouchMove:m,onTouchStart:g,style:k,width:b}=e,x=ct(),[w,_]=M.useState(null),[C,S]=M.useState(null);Lpe();var I=C4e(),L=M.useCallback(E=>{I(E),typeof t=="function"&&t(E),_(E),S(E)},[I,t,_,S]),N=M.useCallback(E=>{x(rZ(E)),x(Nr({handler:a,reactEvent:E}))},[x,a]),R=M.useCallback(E=>{x($R(E)),x(Nr({handler:l,reactEvent:E}))},[x,l]),A=M.useCallback(E=>{x(UK()),x(Nr({handler:d,reactEvent:E}))},[x,d]),D=M.useCallback(E=>{x($R(E)),x(Nr({handler:u,reactEvent:E}))},[x,u]),P=M.useCallback(()=>{x(sZ())},[x]),G=M.useCallback(E=>{x(cZ(E.key))},[x]),ee=M.useCallback(E=>{x(Nr({handler:i,reactEvent:E}))},[x,i]),H=M.useCallback(E=>{x(Nr({handler:c,reactEvent:E}))},[x,c]),Y=M.useCallback(E=>{x(Nr({handler:s,reactEvent:E}))},[x,s]),q=M.useCallback(E=>{x(Nr({handler:p,reactEvent:E}))},[x,p]),T=M.useCallback(E=>{x(Nr({handler:g,reactEvent:E}))},[x,g]),re=M.useCallback(E=>{x(dZ(E)),x(Nr({handler:m,reactEvent:E}))},[x,m]),oe=M.useCallback(E=>{x(Nr({handler:f,reactEvent:E}))},[x,f]);return v.createElement(dX.Provider,{value:w},v.createElement(AU.Provider,{value:C},v.createElement("div",{className:Oe("recharts-wrapper",n),style:S4e({position:"relative",cursor:"default",width:b,height:o},k),onClick:N,onContextMenu:ee,onDoubleClick:H,onFocus:P,onKeyDown:G,onMouseDown:Y,onMouseEnter:R,onMouseLeave:A,onMouseMove:D,onMouseUp:q,onTouchEnd:oe,onTouchMove:re,onTouchStart:T,ref:L},r)))}),P4e=["children","className","width","height","style","compact","title","desc"];function j4e(e,t){if(e==null)return{};var r,n,o=$4e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function $4e(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var E4e=M.forwardRef((e,t)=>{var{children:r,className:n,width:o,height:a,style:i,compact:c,title:s,desc:l}=e,d=j4e(e,P4e),u=Qr(d);return c?v.createElement(UF,{otherAttributes:u,title:s,desc:l},r):v.createElement(A4e,{className:n,style:i,width:o,height:a,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},v.createElement(UF,{otherAttributes:u,title:s,desc:l,ref:t},v.createElement(Wve,null,r)))}),R4e=["width","height"];function ER(){return ER=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ER.apply(null,arguments)}function O4e(e,t){if(e==null)return{};var r,n,o=D4e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function D4e(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var T4e={top:5,right:5,bottom:5,left:5},z4e={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:T4e,reverseStackOrder:!1,syncMethod:"index"},iP=M.forwardRef(function(t,r){var n,o=sr(t.categoricalChartProps,z4e),{width:a,height:i}=o,c=O4e(o,R4e);if(!wN(a)||!wN(i))return null;var{chartName:s,defaultTooltipEventType:l,validateTooltipEventTypes:d,tooltipPayloadSearcher:u,categoricalChartProps:p}=t,f={chartName:s,defaultTooltipEventType:l,validateTooltipEventTypes:d,tooltipPayloadSearcher:u,eventEmitter:void 0};return v.createElement(v4e,{preloadedState:{options:f},reduxStoreName:(n=p.id)!==null&&n!==void 0?n:s},v.createElement($ve,{chartData:p.data}),v.createElement(m4e,{width:a,height:i,layout:o.layout,margin:o.margin}),v.createElement(g4e,{accessibilityLayer:o.accessibilityLayer,barCategoryGap:o.barCategoryGap,maxBarSize:o.maxBarSize,stackOffset:o.stackOffset,barGap:o.barGap,barSize:o.barSize,syncId:o.syncId,syncMethod:o.syncMethod,className:o.className}),v.createElement(E4e,ER({},c,{width:a,height:i,ref:r})))}),q4e=["axis"],V4e=M.forwardRef((e,t)=>v.createElement(iP,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:q4e,tooltipPayloadSearcher:XA,categoricalChartProps:e,ref:t})),H4e=["axis","item"],WF=M.forwardRef((e,t)=>v.createElement(iP,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:H4e,tooltipPayloadSearcher:XA,categoricalChartProps:e,ref:t})),F4e=["item"],B4e=M.forwardRef((e,t)=>v.createElement(iP,{chartName:"ScatterChart",defaultTooltipEventType:"item",validateTooltipEventTypes:F4e,tooltipPayloadSearcher:XA,categoricalChartProps:e,ref:t})),U4e=["axis"],G4e=M.forwardRef((e,t)=>v.createElement(iP,{chartName:"ComposedChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:U4e,tooltipPayloadSearcher:XA,categoricalChartProps:e,ref:t}));const Td=(e,t=0)=>{const n=e.toFixed(t).split("."),o=n[0].replace(/\B(?=(\d{3})+(?!\d))/g," ");return t>0&&n[1]?`${o}.${n[1]}`:o},KF=(e,t,r,n=20)=>{if(!e.length)return n;let o=0;e.forEach(c=>{t.forEach(s=>{const l=c[s];typeof l=="number"?o=Math.max(o,Math.abs(l)):Array.isArray(l)&&l.forEach(d=>{typeof d=="number"&&(o=Math.max(o,Math.abs(d)))})})});const i=(r?r(o,0):o.toString()).length;return Math.max(n,i*6+12)},lo={bar:["var(--color-chart-bar-1)","var(--color-chart-bar-2)","var(--color-chart-bar-3)","var(--color-chart-bar-4)","var(--color-chart-bar-5)","var(--color-chart-bar-6)"],line:["var(--color-chart-line-1)","var(--color-chart-line-2)","var(--color-chart-line-3)","var(--color-chart-line-4)","var(--color-chart-line-5)"],scatter:["var(--color-chart-scatter-1)","var(--color-chart-scatter-2)","var(--color-chart-scatter-3)","var(--color-chart-scatter-4)","var(--color-chart-scatter-5)","var(--color-chart-scatter-6)"],area:["var(--color-chart-area-1)","var(--color-chart-area-2)","var(--color-chart-area-3)","var(--color-chart-area-4)","var(--color-chart-area-5)","var(--color-chart-area-6)"],accessible:["#0066CC","#CC6600","#009966","#CC0066","#6600CC","#CC9900","#006666","#CC0000"]},Pl=e=>{switch(e){case"dashed":return"5 5";case"dotted":return"2 2";case"solid":default:return}},W4e=(e="circle")=>t=>{const{cx:r,cy:n,r:o,fill:a,stroke:i,strokeWidth:c}=t,s=o||4;switch(e){case"triangle":const l=s*1.5,d=s*1.3,u=`M ${r},${n-l} L ${r+d},${n+l/2} L ${r-d},${n+l/2} Z`;return y.jsx("path",{d:u,fill:a,stroke:i,strokeWidth:c||0});case"square":const p=s*1.4;return y.jsx("rect",{x:r-p,y:n-p,width:p*2,height:p*2,fill:a,stroke:i,strokeWidth:c||0});case"circle":default:return y.jsx("circle",{cx:r,cy:n,r:s,fill:a,stroke:i,strokeWidth:c||0})}},XF=e=>({verticalAlign:"bottom",align:"center"}),zd=({active:e,payload:t,label:r,config:n,tooltipMaxWidth:o="max-w-xs",chartType:a,referenceMarkers:i})=>{if(!e||!t||!t.length)return null;const c=i?.filter(s=>s.xValue===r)||[];return y.jsxs("div",{className:`rounded-sm border border-[var(--color-border-primary-bold)] bg-[var(--color-surface-primary)] p-[var(--space-md)] shadow-md min-w-[120px] ${o} z-[9999]`,role:"tooltip","aria-label":"Chart data tooltip",children:[y.jsx("p",{className:"text-label-sm mb-[var(--space-xsm)] text-[var(--color-text-primary)]",children:r}),t.map((s,l)=>{const d=n[s.dataKey];let u;if(d?.type==="range-area"&&s.payload){const f=s.payload[s.dataKey];Array.isArray(f)&&f.length===2?u=`${Td(f[0])} – ${Td(f[1])}`:u=typeof s.value=="number"?Td(s.value):s.value}else u=typeof s.value=="number"?Td(s.value):s.value;const p=()=>{switch(a){case"line":const f=n[s.dataKey]?.strokeStyle,m=Pl(f);return y.jsx("div",{className:"w-3 h-0.5 flex-shrink-0 relative","aria-hidden":"true",children:y.jsx("div",{className:"w-full h-full",style:{background:m?`linear-gradient(to right, ${s.color} 50%, transparent 50%)`:s.color,backgroundSize:m==="5 5"?"6px 100%":m==="2 2"?"2px 100%":"100% 100%"}})});case"scatter":return y.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:s.color},"aria-hidden":"true"});case"composed":switch(n[s.dataKey]?.type){case"line":const k=n[s.dataKey]?.strokeStyle,b=Pl(k);return y.jsx("div",{className:"w-3 h-0.5 flex-shrink-0 relative","aria-hidden":"true",children:y.jsx("div",{className:"w-full h-full",style:{background:b?`linear-gradient(to right, ${s.color} 50%, transparent 50%)`:s.color,backgroundSize:b==="5 5"?"6px 100%":b==="2 2"?"2px 100%":"100% 100%"}})});case"area":case"range-area":return y.jsx("div",{className:"w-2.5 h-2.5 flex-shrink-0",style:{backgroundColor:s.color},"aria-hidden":"true"});case"bar":default:return y.jsx("div",{className:"w-2 h-2 flex-shrink-0",style:{backgroundColor:s.color},"aria-hidden":"true"})}case"bar":case"horizontal-bar":case"area":default:return y.jsx("div",{className:"w-2 h-2 flex-shrink-0",style:{backgroundColor:s.color},"aria-hidden":"true"})}};return y.jsxs("div",{className:"flex items-center gap-[var(--space-xsm)]",children:[p(),y.jsxs("span",{className:"text-body-sm text-[var(--color-text-primary)] min-w-0 break-words",children:[d?.label||s.dataKey,":"]}),y.jsx("span",{className:"text-body-medium-sm text-[var(--color-text-primary)] ml-auto pl-[16px]",children:u})]},l)}),c.length>0&&y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"border-t border-[var(--color-border-primary-subtle)] my-[var(--space-xsm)]"}),c.map((s,l)=>y.jsxs(M.Fragment,{children:[s.tooltipLabel&&y.jsx("p",{className:"text-body-sm font-medium mb-[var(--space-xsm)] text-[var(--color-text-secondary)]",children:s.tooltipLabel}),!s.tooltipLabel&&l===0&&y.jsx("p",{className:"text-body-sm font-medium mb-[var(--space-xsm)] text-[var(--color-text-secondary)]",children:"Reference Markers:"}),s.dataPoints.map((d,u)=>{const p=()=>{switch(d.shape||"circle"){case"triangle":return y.jsx("svg",{width:8,height:8,className:"flex-shrink-0",viewBox:"0 0 10 10",children:y.jsx("path",{d:"M 5,2 L 8,8 L 2,8 Z",fill:d.fill||"var(--color-chart-line-1)",stroke:d.stroke||"transparent",strokeWidth:d.strokeWidth||0})});case"square":return y.jsx("svg",{width:8,height:8,className:"flex-shrink-0",viewBox:"0 0 10 10",children:y.jsx("rect",{x:"2",y:"2",width:"6",height:"6",fill:d.fill||"var(--color-chart-line-1)",stroke:d.stroke||"transparent",strokeWidth:d.strokeWidth||0})});case"circle":default:return y.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:d.fill||"var(--color-chart-line-1)",border:d.stroke?`${d.strokeWidth||1}px solid ${d.stroke}`:"none"}})}};return y.jsxs("div",{className:"flex items-center gap-[var(--space-xsm)] text-caption-sm",children:[p(),y.jsxs("span",{className:"text-[var(--color-text-secondary)] min-w-0 break-words",children:[d.label||`Marker ${u+1}`,":"]}),y.jsx("span",{className:"font-medium text-[var(--color-text-primary)] ml-auto",children:Td(d.yValue)})]},`marker-${l}-point-${u}`)})]},`marker-section-${l}`))]})]})};function hZ({type:e,data:t,config:r,className:n,height:o=300,width:a,minWidth:i=300,onDataPointClick:c,onDataPointHover:s,highlightedIndex:l,showGrid:d=!0,showLegend:u=!0,showTooltip:p=!0,colorScheme:f,responsive:m=!0,maintainAspectRatio:g=!1,legendHeight:k,margin:b,yAxisWidth:x,yAxisTickCount:w,xAxisTickFormatter:_,yAxisTickFormatter:C,showRightYAxis:S=!1,rightYAxisWidth:I,rightYAxisTickCount:L,rightYAxisDomain:N,rightYAxisTickFormatter:R,title:A,description:D,showDataTable:P=!1,tooltipMaxWidth:G="max-w-xs",legendOrder:ee,legendPosition:H="bottom",referenceMarkers:Y,yAxisDomain:q,...T}){const re=M.useMemo(()=>{if(f)return lo[f];switch(e){case"bar":case"horizontal-bar":return lo.bar;case"line":return lo.line;case"scatter":return lo.scatter;case"composed":return lo.bar;default:return lo.bar}},[e,f]),oe=Object.keys(r).filter(X=>X!=="name"),E=M.useMemo(()=>t.map(X=>{const fe={...X};return oe.forEach(ke=>{if(r[ke].type==="range-area"){const Ce=X[ke];Array.isArray(Ce)&&Ce.length===2&&(fe[ke]=Ce,fe[`${ke}_min`]=Ce[0],fe[`${ke}_max`]=Ce[1])}}),fe}),[t,r,oe]),$=M.useCallback(X=>{const fe=X?.activeTooltipIndex??0;s?.(X?.activePayload?.[0]?.payload,fe)},[s]),F=M.useCallback(()=>{s?.(null)},[s]),z=M.useCallback(X=>{const fe=X?.activeTooltipIndex??0;c?.(X?.activePayload?.[0]?.payload,fe)},[c]),Q=()=>{const X={top:0,right:0,left:0,bottom:0};return{top:b?.top??X.top,right:b?.right??X.right+J,left:b?.left??X.left,bottom:b?.bottom??X.bottom}},O=M.useMemo(()=>x||KF(E,oe,C,20),[x,E,oe,C]),J=M.useMemo(()=>{if(!S)return 0;if(I)return I;const X=oe.filter(fe=>r[fe].yAxisId==="right");return X.length===0?0:KF(E,X,R,20)},[S,I,E,oe,r,R]),B=M.useMemo(()=>oe.some(fe=>(r[fe].yAxisId||"left")==="left")?"left":"right",[oe,r]),K=k?{...XF(),wrapperStyle:{position:"absolute",bottom:0,left:0,right:0,height:k,paddingTop:8}}:XF(),U={data:E,margin:Q()},V={axisLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:2},tickLine:!1,tick:{fontSize:10,fill:"var(--color-text-tertiary)",fontFamily:"Inter, sans-serif"},tickFormatter:_},ce={axisLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:2},tickLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:1},tick:{fontSize:10,fill:"var(--color-text-tertiary)",fontFamily:"Inter, sans-serif"},width:O,tickFormatter:C,...w&&{tickCount:w},...q&&{domain:q}},te={stroke:"var(--color-border-primary-subtle)",horizontal:!0,vertical:!1},Ae=({payload:X})=>{if(!X||!X.length)return null;const fe=ee?[...X].sort((Re,Kt)=>{const Fe=ee.indexOf(Re.dataKey),Lt=ee.indexOf(Kt.dataKey);return Fe===-1?1:Lt===-1?-1:Fe-Lt}):X,Ce=Q().left+5;return y.jsx("div",{style:{paddingLeft:`${Ce}px`,paddingRight:"16px"},children:y.jsx("div",{className:"flex flex-wrap justify-start items-start gap-x-[var(--space-md)] gap-y-[var(--space-sm)]",children:fe.map((Re,Kt)=>{const Fe=()=>{switch(e){case"line":const Lt=r[Re.dataKey]?.strokeStyle,kt=Pl(Lt);return y.jsx("div",{className:"w-[12px] h-[2px] flex-shrink-0 relative","aria-hidden":"true",children:y.jsx("div",{className:"w-full h-full",style:{background:kt?`linear-gradient(to right, ${Re.color} 50%, transparent 50%)`:Re.color,backgroundSize:kt==="5 5"?"8px 100%":kt==="2 2"?"3px 100%":"100% 100%"}})});case"scatter":return y.jsx("div",{className:"w-[6px] h-[6px] rounded-full flex-shrink-0",style:{backgroundColor:Re.color},"aria-hidden":"true"});case"composed":switch(r[Re.dataKey]?.type){case"line":const Xt=r[Re.dataKey]?.strokeStyle,Ve=Pl(Xt);return y.jsx("div",{className:"w-[12px] h-[2px] flex-shrink-0 relative","aria-hidden":"true",children:y.jsx("div",{className:"w-full h-full",style:{background:Ve?`linear-gradient(to right, ${Re.color} 50%, transparent 50%)`:Re.color,backgroundSize:Ve==="5 5"?"8px 100%":Ve==="2 2"?"3px 100%":"100% 100%"}})});case"area":case"range-area":return y.jsx("div",{className:"w-[8px] h-[8px] flex-shrink-0",style:{backgroundColor:Re.color},"aria-hidden":"true"});case"bar":default:return y.jsx("div",{className:"w-[6px] h-[6px] flex-shrink-0",style:{backgroundColor:Re.color},"aria-hidden":"true"})}case"bar":case"horizontal-bar":default:return y.jsx("div",{className:"w-[6px] h-[6px] flex-shrink-0",style:{backgroundColor:Re.color},"aria-hidden":"true"})}};return y.jsxs("div",{className:"flex items-center justify-center gap-[var(--space-xsm)]",children:[Fe(),y.jsx("span",{className:"[&]:text-body-medium-xsm [&]:text-[var(--color-text-secondary)] leading-none whitespace-nowrap",children:Re.value})]},Kt)})})})},Pe=()=>{switch(e){case"bar":return y.jsxs(WF,{...U,onMouseMove:$,onMouseLeave:F,onClick:z,children:[d&&y.jsx(Cl,{...te}),y.jsx(qs,{dataKey:"name",...V}),y.jsx(Ln,{...ce}),p&&y.jsx(Od,{content:X=>y.jsx(zd,{...X,config:r,tooltipMaxWidth:G,chartType:e}),cursor:{stroke:"var(--color-border-primary)",strokeWidth:1,fill:"var(--color-background-neutral)",fillOpacity:1},position:{x:void 0,y:void 0},offset:10,animationDuration:0}),u&&y.jsx(wo,{content:y.jsx(Ae,{}),...K}),oe.map((X,fe)=>{const ke=r[X].color||re[fe%re.length];return y.jsx(Z0,{dataKey:X,name:r[X].label,fill:ke,radius:[0,0,0,0],className:"cursor-pointer transition-colors",isAnimationActive:!1,maxBarSize:60},X)})]});case"horizontal-bar":return y.jsxs(WF,{...U,layout:"vertical",onMouseMove:$,onMouseLeave:F,onClick:z,children:[d&&y.jsx(Cl,{...te,horizontal:!1,vertical:!0}),y.jsx(qs,{type:"number",...V}),y.jsx(Ln,{type:"category",dataKey:"name",...ce}),p&&y.jsx(Od,{content:X=>y.jsx(zd,{...X,config:r,tooltipMaxWidth:G,chartType:e}),cursor:{stroke:"var(--color-border-primary)",strokeWidth:1,fill:"var(--color-background-neutral)",fillOpacity:1},position:{x:void 0,y:void 0},offset:10,animationDuration:0}),u&&y.jsx(wo,{content:y.jsx(Ae,{}),...K}),oe.map((X,fe)=>{const ke=r[X].color||re[fe%re.length];return y.jsx(Z0,{dataKey:X,name:r[X].label,fill:ke,radius:[0,0,0,0],className:"cursor-pointer transition-colors",isAnimationActive:!1,maxBarSize:40},X)})]});case"line":return y.jsxs(V4e,{...U,onMouseMove:$,onMouseLeave:F,onClick:z,children:[d&&y.jsx(Cl,{...te,yAxisId:B}),y.jsx(qs,{dataKey:"name",...V}),y.jsx(Ln,{yAxisId:"left",...ce}),S&&y.jsx(Ln,{yAxisId:"right",orientation:"right",axisLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:2},tickLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:1},tick:{fontSize:10,fill:"var(--color-text-tertiary)",fontFamily:"Inter, sans-serif"},width:J,tickFormatter:R,...L&&{tickCount:L},...N&&{domain:N}}),Y?.map((X,fe)=>X.showLine!==!1&&y.jsx(UD,{x:X.xValue,stroke:X.lineStyle?.stroke||"#000000",strokeWidth:X.lineStyle?.strokeWidth||2,strokeDasharray:X.lineStyle?.strokeDasharray},`marker-line-${fe}`)),p&&y.jsx(Od,{content:X=>y.jsx(zd,{...X,config:r,tooltipMaxWidth:G,chartType:e,referenceMarkers:Y}),cursor:{stroke:"var(--color-border-primary)",strokeWidth:1,fill:"var(--color-background-neutral)",fillOpacity:1},position:{x:void 0,y:void 0},offset:10,animationDuration:0}),u&&y.jsx(wo,{content:y.jsx(Ae,{}),...K}),oe.map((X,fe)=>{const ke=r[X].color||re[fe%re.length];return y.jsx(IR,{type:"linear",dataKey:X,name:r[X].label,yAxisId:r[X].yAxisId||"left",stroke:ke,strokeWidth:2,strokeDasharray:Pl(r[X].strokeStyle),dot:r[X].showDots===!0?{fill:ke,strokeWidth:0,r:3}:!1,activeDot:{r:5,fill:ke},className:"cursor-pointer transition-colors",isAnimationActive:!1},X)}),Y?.map((X,fe)=>y.jsx(M.Fragment,{children:X.dataPoints.map((ke,Ce)=>y.jsx(WD,{x:X.xValue,y:ke.yValue,r:ke.size||4,fill:ke.fill||"var(--color-chart-line-1)",stroke:ke.stroke||"transparent",strokeWidth:ke.strokeWidth||0,shape:W4e(ke.shape||"circle")},`marker-${fe}-point-${Ce}`))},`marker-dots-${fe}`))]});case"scatter":return y.jsxs(B4e,{...U,onMouseMove:$,onMouseLeave:F,onClick:z,children:[d&&y.jsx(Cl,{...te}),y.jsx(qs,{dataKey:"x",type:"number",...V}),y.jsx(Ln,{dataKey:"y",type:"number",...ce}),p&&y.jsx(Od,{content:X=>y.jsx(zd,{...X,config:r,tooltipMaxWidth:G,chartType:e}),cursor:{stroke:"var(--color-border-primary)",strokeWidth:1,fill:"var(--color-background-neutral)",fillOpacity:1},position:{x:void 0,y:void 0},offset:10,animationDuration:0}),u&&y.jsx(wo,{content:y.jsx(Ae,{}),...K}),oe.filter(X=>X!=="x"&&X!=="y"&&X!=="name").map((X,fe)=>{const ke=r[X]?.color||re[fe%re.length];return y.jsx(JX,{name:r[X]?.label||X,data:t.map(Ce=>({x:Ce.x,y:Ce.y,[X]:Ce[X]})),fill:ke,className:"cursor-pointer transition-colors",isAnimationActive:!1},X)})]});case"composed":return y.jsxs(G4e,{...U,onMouseMove:$,onMouseLeave:F,onClick:z,children:[d&&y.jsx(Cl,{...te,yAxisId:B}),y.jsx(qs,{dataKey:"name",...V}),y.jsx(Ln,{yAxisId:"left",...ce,domain:[0,"dataMax"]}),S&&y.jsx(Ln,{yAxisId:"right",orientation:"right",axisLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:2},tickLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:1},tick:{fontSize:10,fill:"var(--color-text-tertiary)",fontFamily:"Inter, sans-serif"},width:J,tickFormatter:R,...L&&{tickCount:L},...N&&{domain:N}}),p&&y.jsx(Od,{content:X=>y.jsx(zd,{...X,config:r,tooltipMaxWidth:G,chartType:e}),cursor:{stroke:"var(--color-border-primary)",strokeWidth:1,fill:"var(--color-background-neutral)",fillOpacity:1},position:{x:void 0,y:void 0},offset:10,animationDuration:0}),u&&y.jsx(wo,{content:y.jsx(Ae,{}),...K}),oe.map((X,fe)=>{const ke=r[X].color||re[fe%re.length];return(r[X].type||"bar")==="bar"?y.jsx(Z0,{dataKey:X,name:r[X].label,yAxisId:r[X].yAxisId||"left",fill:ke,radius:[0,0,0,0],className:"cursor-pointer transition-colors",isAnimationActive:!1,maxBarSize:60},X):null}),oe.map((X,fe)=>{const ke=r[X].color||re[fe%re.length],Ce=r[X].type||"bar";return Ce==="area"?y.jsx(NR,{type:"linear",dataKey:X,name:r[X].label,yAxisId:r[X].yAxisId||"left",stroke:r[X].stroke??ke,fill:r[X].fill??ke,fillOpacity:.3,className:"cursor-pointer transition-colors",isAnimationActive:!1},X):Ce==="range-area"?y.jsx(NR,{type:"linear",dataKey:X,name:r[X].label,yAxisId:r[X].yAxisId||"left",stroke:r[X].stroke??"none",fill:r[X].fill??ke,fillOpacity:.3,className:"cursor-pointer transition-colors",isAnimationActive:!1},X):null}),oe.map((X,fe)=>{const ke=r[X].color||re[fe%re.length];return(r[X].type||"bar")==="line"?y.jsx(IR,{type:"linear",dataKey:X,name:r[X].label,yAxisId:r[X].yAxisId||"left",stroke:ke,strokeWidth:2,strokeDasharray:Pl(r[X].strokeStyle),dot:r[X].showDots===!0?{fill:ke,strokeWidth:0,r:3}:!1,activeDot:{r:5,fill:ke},className:"cursor-pointer transition-colors",isAnimationActive:!1},X):null})]});default:return y.jsx("div",{children:"Unsupported chart type"})}},ze=()=>P?y.jsx("div",{className:"sr-only",children:y.jsxs("table",{role:"table","aria-label":A?`Data for ${A}`:"Chart data",children:[y.jsxs("caption",{className:"sr-only",children:[A&&`${A}. `,D||`${e} chart showing ${oe.length} data series across ${t.length} categories.`]}),y.jsx("thead",{children:y.jsxs("tr",{children:[y.jsx("th",{scope:"col",children:"Category"}),oe.map(X=>y.jsx("th",{scope:"col",children:r[X]?.label||X},X))]})}),y.jsx("tbody",{children:t.map((X,fe)=>y.jsxs("tr",{children:[y.jsx("th",{scope:"row",children:X.name||`Item ${fe+1}`}),oe.map(ke=>y.jsx("td",{children:C?C(X[ke],fe):X[ke]},ke))]},fe))})]})}):null,qe=M.useRef(null);return M.useEffect(()=>{const X=qe.current;if(!X)return;const fe=setTimeout(()=>{X.querySelectorAll(".recharts-cartesian-axis-tick").forEach(Ce=>{const Re=Ce.querySelector("text"),Kt=Ce.querySelector(".recharts-cartesian-axis-tick-line");Re?.textContent?.trim()==="0"&&Kt&&Kt.setAttribute("stroke-width","2")})},100);return()=>clearTimeout(fe)},[t,e]),y.jsxs("div",{ref:qe,className:j("w-full",n),style:{minWidth:i},role:"img","aria-label":A||`${e} chart`,"aria-describedby":D?`${qe.current?.id||"chart"}-desc`:void 0,...T,children:[A&&y.jsx("h3",{className:"sr-only",id:`${qe.current?.id||"chart"}-title`,children:A}),D&&y.jsx("p",{className:"sr-only",id:`${qe.current?.id||"chart"}-desc`,children:D}),(()=>{const X=k?o-k:o,fe=m?y.jsx(Gpe,{width:a||"100%",height:X,children:Pe()||y.jsx("div",{children:"Chart error"})}):y.jsx("div",{style:{width:a||"100%",height:X,minWidth:i},children:Pe()||y.jsx("div",{children:"Chart error"})});return k?y.jsx("div",{style:{width:a||"100%"},children:fe}):fe})(),y.jsx(ze,{})]})}const K4e=(e,t="bar")=>{const r=lo[t];return Array.from({length:e},(n,o)=>r[o%r.length])},X4e=(e,t,r)=>Array.isArray(e)?e.reduce((o,a,i)=>(o[a]={label:t?.[i]||a,color:r?.[i]},o),{}):e;function Z4e(e,t){const r=v.createContext(t),n=a=>{const{children:i,...c}=a,s=v.useMemo(()=>c,Object.values(c));return y.jsx(r.Provider,{value:s,children:i})};n.displayName=e+"Provider";function o(a){const i=v.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function ht(e,t=[]){let r=[];function n(a,i){const c=v.createContext(i),s=r.length;r=[...r,i];const l=u=>{const{scope:p,children:f,...m}=u,g=p?.[e]?.[s]||c,k=v.useMemo(()=>m,Object.values(m));return y.jsx(g.Provider,{value:k,children:f})};l.displayName=a+"Provider";function d(u,p){const f=p?.[e]?.[s]||c,m=v.useContext(f);if(m)return m;if(i!==void 0)return i;throw new Error(`\`${u}\` must be used within \`${a}\``)}return[l,d]}const o=()=>{const a=r.map(i=>v.createContext(i));return function(c){const s=c?.[e]||a;return v.useMemo(()=>({[`__scope${e}`]:{...c,[e]:s}}),[c,s])}};return o.scopeName=e,[n,Y4e(o,...t)]}function Y4e(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=n.reduce((c,{useScope:s,scopeName:l})=>{const u=s(a)[`__scope${l}`];return{...c,...u}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function Pt(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...r)=>t.current?.(...r),[])}var ut=globalThis?.document?v.useLayoutEffect:()=>{};function ZF(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Un(...e){return t=>{let r=!1;const n=e.map(o=>{const a=ZF(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){const a=n[o];typeof a=="function"?a():ZF(e[o],null)}}}}function Ie(...e){return v.useCallback(Un(...e),e)}function Eo(e){const t=Q4e(e),r=v.forwardRef((n,o)=>{const{children:a,...i}=n,c=v.Children.toArray(a),s=c.find(e5e);if(s){const l=s.props.children,d=c.map(u=>u===s?v.Children.count(l)>1?v.Children.only(null):v.isValidElement(l)?l.props.children:null:u);return y.jsx(t,{...i,ref:o,children:v.isValidElement(l)?v.cloneElement(l,void 0,d):null})}return y.jsx(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}var J4e=Eo("Slot");function Q4e(e){const t=v.forwardRef((r,n)=>{const{children:o,...a}=r;if(v.isValidElement(o)){const i=r5e(o),c=t5e(a,o.props);return o.type!==v.Fragment&&(c.ref=n?Un(n,i):i),v.cloneElement(o,c)}return v.Children.count(o)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var pZ=Symbol("radix.slottable");function fZ(e){const t=({children:r})=>y.jsx(y.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=pZ,t}function e5e(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===pZ}function t5e(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...c)=>{const s=a(...c);return o(...c),s}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function r5e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var n5e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ie=n5e.reduce((e,t)=>{const r=Eo(`Primitive.${t}`),n=v.forwardRef((o,a)=>{const{asChild:i,...c}=o,s=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(s,{...c,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function yZ(e,t){e&&fA.flushSync(()=>e.dispatchEvent(t))}var o5e=AO();function a5e(){return o5e.useSyncExternalStore(i5e,()=>!0,()=>!1)}function i5e(){return()=>{}}var tT="Avatar",[c5e,wnt]=ht(tT),[s5e,vZ]=c5e(tT),mZ=v.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[o,a]=v.useState("idle");return y.jsx(s5e,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:y.jsx(ie.span,{...n,ref:t})})});mZ.displayName=tT;var gZ="AvatarImage",kZ=v.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:o=()=>{},...a}=e,i=vZ(gZ,r),c=l5e(n,a),s=Pt(l=>{o(l),i.onImageLoadingStatusChange(l)});return ut(()=>{c!=="idle"&&s(c)},[c,s]),c==="loaded"?y.jsx(ie.img,{...a,ref:t,src:n}):null});kZ.displayName=gZ;var bZ="AvatarFallback",xZ=v.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...o}=e,a=vZ(bZ,r),[i,c]=v.useState(n===void 0);return v.useEffect(()=>{if(n!==void 0){const s=window.setTimeout(()=>c(!0),n);return()=>window.clearTimeout(s)}},[n]),i&&a.imageLoadingStatus!=="loaded"?y.jsx(ie.span,{...o,ref:t}):null});xZ.displayName=bZ;function YF(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function l5e(e,{referrerPolicy:t,crossOrigin:r}){const n=a5e(),o=v.useRef(null),a=n?(o.current||(o.current=new window.Image),o.current):null,[i,c]=v.useState(()=>YF(a,e));return ut(()=>{c(YF(a,e))},[a,e]),ut(()=>{const s=u=>()=>{c(u)};if(!a)return;const l=s("loaded"),d=s("error");return a.addEventListener("load",l),a.addEventListener("error",d),t&&(a.referrerPolicy=t),typeof r=="string"&&(a.crossOrigin=r),()=>{a.removeEventListener("load",l),a.removeEventListener("error",d)}},[a,r,t]),i}var wZ=mZ,MZ=kZ,_Z=xZ;const CZ=De("relative flex shrink-0 overflow-hidden items-center justify-center",{variants:{size:{xxs:"h-4 w-4",xs:"h-[var(--size-sm)] w-[var(--size-sm)]",sm:"h-[var(--size-md)] w-[var(--size-md)]",md:"h-[var(--size-lg)] w-[var(--size-lg)]",lg:"h-[var(--size-xlg)] w-[var(--size-xlg)]",xl:"h-[var(--size-2xlg)] w-[var(--size-2xlg)]"},shape:{circle:"rounded-full",rounded:"rounded-md"}},defaultVariants:{size:"md",shape:"circle"}}),SZ=De("flex h-full w-full items-center justify-center font-medium [&]:text-[var(--color-text-inverse)]",{variants:{size:{xxs:"text-caption-xsm",xs:"text-caption-xsm",sm:"text-caption-sm",md:"text-label-sm",lg:"text-label-md",xl:"text-heading-sm"},shape:{circle:"rounded-full",rounded:"rounded-md"},variant:{information:"bg-[var(--color-background-information-bold)]",success:"bg-[var(--color-background-success-bold)]",error:"bg-[var(--color-background-error-bold)]",warning:"bg-[var(--color-background-warning-bold)]",violet:"bg-[var(--violet-500)]",magenta:"bg-[var(--magenta-500)]"}},defaultVariants:{size:"md",shape:"circle",variant:"information"}}),IZ=v.forwardRef(({className:e,size:t,shape:r,...n},o)=>y.jsx(wZ,{ref:o,className:j(CZ({size:t,shape:r}),e),...n}));IZ.displayName=wZ.displayName;const LZ=v.forwardRef(({className:e,...t},r)=>y.jsxs("div",{className:"relative h-full w-full rounded-[inherit]",children:[y.jsx(MZ,{ref:r,className:j("aspect-square h-full w-full object-cover rounded-[inherit]",e),...t}),y.jsx("div",{className:"absolute inset-0 rounded-[inherit] shadow-[inset_0_0_0_1px_rgba(85,95,109,0.1)] pointer-events-none"})]}));LZ.displayName=MZ.displayName;const NZ=v.forwardRef(({className:e,size:t,shape:r,variant:n,...o},a)=>y.jsx(_Z,{ref:a,className:j(SZ({size:t,shape:r,variant:n}),e),...o}));NZ.displayName=_Z.displayName;const d5e=De("inline-flex items-center rounded-sm px-[var(--space-sm)] py-[var(--space-xsm)] text-caption-medium-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring-color)] focus-visible:ring-offset-1 cursor-default",{variants:{variant:{default:"border-transparent bg-[var(--grey-100)] text-[var(--color-text-primary)]",secondary:"border-transparent bg-[var(--grey-100)] text-[var(--color-text-primary)]",destructive:"border-transparent bg-[var(--color-background-error-bold)] text-[var(--color-text-inverse)]",outline:"bg-transparent border border-[var(--color-border-primary-strong)] text-[var(--color-text-primary)]"},intent:{neutral:"",brand:"",success:"",warning:"",destructive:""},appearance:{solid:"border-transparent",subtle:"border-transparent",outline:"bg-transparent"},size:{sm:"px-[var(--space-xsm)] h-5 [&]:text-body-strong-xsm",md:"px-[var(--space-sm)] h-6 [&]:text-body-strong-sm",lg:"px-[var(--space-md)] h-7 [&]:text-body-strong-md"}},compoundVariants:[{intent:"neutral",appearance:"solid",class:"border-transparent bg-[var(--grey-600)] text-[var(--color-text-inverse)]"},{intent:"neutral",appearance:"subtle",class:"border-transparent bg-[var(--grey-100)] text-[var(--color-text-primary)]"},{intent:"neutral",appearance:"outline",class:"border border-[var(--color-border-primary-strong)] text-[var(--color-text-primary)]"},{intent:"brand",appearance:"solid",class:"border-transparent bg-[var(--color-background-brand)] text-[var(--color-text-inverse)]"},{intent:"brand",appearance:"subtle",class:"border-transparent bg-[var(--blue-50)] text-[var(--color-text-brand)]"},{intent:"brand",appearance:"outline",class:"border border-[var(--color-blue-300)] text-[var(--color-text-brand)]"},{intent:"success",appearance:"solid",class:"border-transparent bg-[var(--color-background-success-bold)] text-[var(--color-text-inverse)]"},{intent:"success",appearance:"subtle",class:"border-transparent bg-[var(--color-background-success)] text-[var(--color-text-success)]"},{intent:"success",appearance:"outline",class:"border border-[var(--color-border-success)] text-[var(--color-text-success)]"},{intent:"warning",appearance:"solid",class:"border-transparent bg-[var(--color-background-warning-bold)] text-[var(--color-text-inverse)]"},{intent:"warning",appearance:"subtle",class:"border-transparent bg-[var(--color-background-warning)] text-[var(--color-text-warning)]"},{intent:"warning",appearance:"outline",class:"border border-[var(--color-border-warning)] text-[var(--color-text-warning)]"},{intent:"destructive",appearance:"solid",class:"border-transparent bg-[var(--color-background-error-bold)] text-[var(--color-text-inverse)]"},{intent:"destructive",appearance:"subtle",class:"border-transparent bg-[var(--color-background-error)] text-[var(--color-text-error)]"},{intent:"destructive",appearance:"outline",class:"border border-[var(--color-border-error)] text-[var(--color-text-error)]"}],defaultVariants:{variant:"default",intent:"neutral",appearance:"subtle",size:"md"}}),nr=v.forwardRef(({className:e,variant:t,intent:r,appearance:n,size:o,...a},i)=>y.jsx("div",{ref:i,className:j(d5e({variant:t,intent:r,appearance:n,size:o}),e),...a}));nr.displayName="Badge";function ae(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}var u5e=v[" useInsertionEffect ".trim().toString()]||ut;function Vt({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,i]=h5e({defaultProp:t,onChange:r}),c=e!==void 0,s=c?e:o;{const d=v.useRef(e!==void 0);v.useEffect(()=>{const u=d.current;u!==c&&console.warn(`${n} is changing from ${u?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=c},[c,n])}const l=v.useCallback(d=>{if(c){const u=p5e(d)?d(e):d;u!==e&&i.current?.(u)}else a(d)},[c,e,a,i]);return[s,l]}function h5e({defaultProp:e,onChange:t}){const[r,n]=v.useState(e),o=v.useRef(r),a=v.useRef(t);return u5e(()=>{a.current=t},[t]),v.useEffect(()=>{o.current!==r&&(a.current?.(r),o.current=r)},[r,o]),[r,n,a]}function p5e(e){return typeof e=="function"}function f5e(e,t){return v.useReducer((r,n)=>t[r][n]??r,e)}var It=e=>{const{present:t,children:r}=e,n=y5e(t),o=typeof r=="function"?r({present:n.isPresent}):v.Children.only(r),a=Ie(n.ref,v5e(o));return typeof r=="function"||n.isPresent?v.cloneElement(o,{ref:a}):null};It.displayName="Presence";function y5e(e){const[t,r]=v.useState(),n=v.useRef(null),o=v.useRef(e),a=v.useRef("none"),i=e?"mounted":"unmounted",[c,s]=f5e(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const l=$0(n.current);a.current=c==="mounted"?l:"none"},[c]),ut(()=>{const l=n.current,d=o.current;if(d!==e){const p=a.current,f=$0(l);e?s("MOUNT"):f==="none"||l?.display==="none"?s("UNMOUNT"):s(d&&p!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,s]),ut(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,u=f=>{const g=$0(n.current).includes(CSS.escape(f.animationName));if(f.target===t&&g&&(s("ANIMATION_END"),!o.current)){const k=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=k)})}},p=f=>{f.target===t&&(a.current=$0(n.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else s("ANIMATION_END")},[t,s]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:v.useCallback(l=>{n.current=l?getComputedStyle(l):null,r(l)},[])}}function $0(e){return e?.animationName||"none"}function v5e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var m5e=v[" useId ".trim().toString()]||(()=>{}),g5e=0;function vt(e){const[t,r]=v.useState(m5e());return ut(()=>{r(n=>n??String(g5e++))},[e]),e||(t?`radix-${t}`:"")}var cP="Collapsible",[k5e,AZ]=ht(cP),[b5e,rT]=k5e(cP),PZ=v.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...c}=e,[s,l]=Vt({prop:n,defaultProp:o??!1,onChange:i,caller:cP});return y.jsx(b5e,{scope:r,disabled:a,contentId:vt(),open:s,onOpenToggle:v.useCallback(()=>l(d=>!d),[l]),children:y.jsx(ie.div,{"data-state":oT(s),"data-disabled":a?"":void 0,...c,ref:t})})});PZ.displayName=cP;var jZ="CollapsibleTrigger",yu=v.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=rT(jZ,r);return y.jsx(ie.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":oT(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:ae(e.onClick,o.onOpenToggle)})});yu.displayName=jZ;var nT="CollapsibleContent",sP=v.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=rT(nT,e.__scopeCollapsible);return y.jsx(It,{present:r||o.open,children:({present:a})=>y.jsx(x5e,{...n,ref:t,present:a})})});sP.displayName=nT;var x5e=v.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...a}=e,i=rT(nT,r),[c,s]=v.useState(n),l=v.useRef(null),d=Ie(t,l),u=v.useRef(0),p=u.current,f=v.useRef(0),m=f.current,g=i.open||c,k=v.useRef(g),b=v.useRef(void 0);return v.useEffect(()=>{const x=requestAnimationFrame(()=>k.current=!1);return()=>cancelAnimationFrame(x)},[]),ut(()=>{const x=l.current;if(x){b.current=b.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const w=x.getBoundingClientRect();u.current=w.height,f.current=w.width,k.current||(x.style.transitionDuration=b.current.transitionDuration,x.style.animationName=b.current.animationName),s(n)}},[i.open,n]),y.jsx(ie.div,{"data-state":oT(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...a,ref:d,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:g&&o})});function oT(e){return e?"open":"closed"}var $Z=PZ,w5e=yu,M5e=sP;/**
114
114
  * @license lucide-react v0.534.0 - ISC
115
115
  *
116
116
  * This source code is licensed under the ISC license.