@patterninc/pattern-ui 0.0.0-main.202611040411.1b68a5b4b2b3 → 0.0.0-main.202611040732.bb44d67d2992

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.
@@ -1 +1 @@
1
- import{a as e}from"../../../_chunks/rolldown-runtime-BWaJ3C7D.js";import{t}from"../../../_chunks/react-CUaU2Z9V.js";import{S as n,_ as r,a as i,b as a,c as o,d as s,f as c,g as l,i as u,m as d,n as f,o as p,p as m,r as h,s as g,t as _,u as v,x as y}from"../../../_chunks/series-tag-BaecVmtO.js";import{t as b}from"../../../_chunks/compiler-runtime-B3BlmaWz.js";import{t as x}from"../../../_chunks/jsx-runtime-Dgn0yPdi.js";import{t as S}from"../../../_chunks/dist-BNSTMZct.js";import{n as C,r as w,t as T}from"../../../_chunks/animation-D8IqP_32.js";import{f as E,t as D}from"../../../_chunks/time-series-chart-shell-CUug7kYf.js";import{t as O}from"../../../_chunks/grid-DmEGskok.js";import{i as k,t as A}from"../../../_chunks/y-axis-scales-Di1QS_P5.js";import{a as j,i as M,n as N,o as P,r as F,s as I,t as L}from"../../../_chunks/chart-context-DEIvTsqh.js";import{n as R,t as z}from"../../../_chunks/projection-line-end-marker-QD35F55G.js";import{i as ee,n as B,r as V,t as H}from"../../../_chunks/chart-config-context-BpwYTVdv.js";import{n as U,t as W}from"../../../_chunks/chart-legend-hover-BJijcIfO.js";import{i as G,n as K,t as te}from"../../../_chunks/series-markers-PiCafGdw.js";import{a as ne,i as q,n as re,o as ie,r as J,t as ae}from"../../../_chunks/chart-density-B2pG6con.js";import{a as Y,i as oe,n as se,o as ce,r as le,s as ue,t as de}from"../../../_chunks/chart-phase-BaIoHaYw.js";import{t as fe}from"../../../_chunks/chart-child-passthrough-CU3_U3Y7.js";import{a as pe,c as me,d as he,f as ge,i as _e,l as ve,n as ye,o as be,p as xe,r as Se,s as Ce,t as we,u as Te}from"../../../_chunks/projection-config-BrjUSVSl.js";import{c as Ee,f as De,i as Oe,l as ke,r as Ae,s as je}from"../../../_chunks/y-domain-utils-DBuIZ5LP.js";import{a as Me,n as Ne,t as Pe}from"../../../_chunks/x-axis-zEBQ8DnV.js";import{a as Fe,c as Ie,i as Le,l as Re,n as ze,o as Be,r as Ve,s as He,t as Ue}from"../../../_chunks/pattern-preset-CyGrTxZq.js";import{t as We}from"../../../_chunks/background-BL4j0Aup.js";import{a as Ge,i as Ke,o as qe,r as Je,s as Ye,t as Xe}from"../../../_chunks/chart-tooltip-BN_Xx-ha.js";import{t as Ze}from"../../../_chunks/reference-area-C1I15Ptt.js";import{t as Qe}from"../../../_chunks/tooltip-box-DTNmTvby.js";import{t as $e}from"../../../_chunks/tooltip-content-CEeyDbtg.js";import{a as et,i as tt,n as nt,r as rt,t as it}from"../../../_chunks/y-axis-R9BDlIer.js";import{t as X}from"../../../_chunks/area-series-BOjnVxlm.js";import{t as at}from"../../../_chunks/ParentSize-8O4qY4pg.js";var Z=b(),Q=/* @__PURE__ */ e(t(),1),$=/* @__PURE__ */ e(x(),1);const ot=/* @__PURE__ */ new Set([`LineSeriesTerminalMarker`,`SeriesPoint`,`SeriesTag`]);function st(e){let t=[];return Q.Children.forEach(e,e=>{if(!(0,Q.isValidElement)(e))return;let n=e.type,i=typeof e.type==`function`&&(n.displayName||n.name)||``,a=e.props,o=i===`PatternArea`||e.type===r,s=ot.has(i);(i===`Area`||e.type===X||a&&typeof a.dataKey==`string`&&a.dataKey.length>0&&!o&&!s)&&a?.dataKey&&t.push({dataKey:a.dataKey,stroke:a.stroke||a.fill||`var(--chart-line-primary)`,strokeWidth:a.strokeWidth||2,yAxisId:a.yAxisId})}),t}function ct(e){let t=(0,Z.c)(25),{width:n,height:r,data:i,xDataKey:a,margin:o,density:s,animationDuration:c,animationEasing:l,enterTransition:u,revealSignature:d,chartStatus:f,loadingLabel:p,yDomainTweenDuration:m,yDomainTween:h,xDomain:g,xDomainSlotCount:_,tweenYDomainOnXDomainChange:v,children:y,containerRef:b,onPhaseChange:x,clipPathId:S}=e,C;t[0]===y?C=t[1]:(C=st(y),t[0]=y,t[1]=C);let w=C,T;return t[2]!==c||t[3]!==l||t[4]!==f||t[5]!==y||t[6]!==S||t[7]!==b||t[8]!==i||t[9]!==s||t[10]!==u||t[11]!==r||t[12]!==w||t[13]!==p||t[14]!==o||t[15]!==x||t[16]!==d||t[17]!==v||t[18]!==n||t[19]!==a||t[20]!==g||t[21]!==_||t[22]!==h||t[23]!==m?(T=/* @__PURE__ */ (0,$.jsx)(D,{animationDuration:c,animationEasing:l,chartStatus:f,clipPathId:S,containerRef:b,data:i,enterTransition:u,height:r,lines:w,loadingLabel:p,density:s,margin:o,onPhaseChange:x,revealSignature:d,tweenYDomainOnXDomainChange:v,width:n,xDataKey:a,xDomain:g,xDomainSlotCount:_,yDomainTween:h,yDomainTweenDuration:m,children:y}),t[2]=c,t[3]=l,t[4]=f,t[5]=y,t[6]=S,t[7]=b,t[8]=i,t[9]=s,t[10]=u,t[11]=r,t[12]=w,t[13]=p,t[14]=o,t[15]=x,t[16]=d,t[17]=v,t[18]=n,t[19]=a,t[20]=g,t[21]=_,t[22]=h,t[23]=m,t[24]=T):T=t[24],T}function lt(e){let t=(0,Z.c)(44),{data:n,xDataKey:r,density:i,margin:a,animationDuration:o,animationEasing:s,enterTransition:c,revealSignature:l,aspectRatio:u,className:d,status:f,loadingLabel:p,yDomainTweenDuration:m,yDomainTween:h,xDomain:g,xDomainSlotCount:_,tweenYDomainOnXDomainChange:v,style:y,onPhaseChange:b,children:x}=e,C=r===void 0?`date`:r,w=i===void 0?J:i,T=o===void 0?1100:o,E=u===void 0?`2 / 1`:u,D=d===void 0?``:d,O=f===void 0?se:f,k=m===void 0?500:m,A=h===void 0||h,j=v!==void 0&&v,M=(0,Q.useId)(),N;if(t[0]!==M){let e;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=/:/g,t[2]=e):e=t[2],N=M.replace(e,``),t[0]=M,t[1]=N}else N=t[1];let P=`chart-area-grow-clip-${N}`,F=(0,Q.useRef)(null),I;t[3]!==w||t[4]!==a?(I=q(w,a),t[3]=w,t[4]=a,t[5]=I):I=t[5];let L=I,R;t[6]===O?R=t[7]:(R=()=>Y(O),t[6]=O,t[7]=R);let[z,ee]=(0,Q.useState)(R),B;t[8]!==z||t[9]!==p?(B=p?.trim()&&(z===`loading`||z===`exiting`||z===`gridTweenReady`||z===`revealingLoading`),t[8]=z,t[9]=p,t[10]=B):B=t[10];let V=!!B,H;t[11]===D?H=t[12]:(H=S(`relative w-full`,D),t[11]=D,t[12]=H);let U;t[13]!==E||t[14]!==y?(U={aspectRatio:E,touchAction:`none`,...y},t[13]=E,t[14]=y,t[15]=U):U=t[15];let W;t[16]!==T||t[17]!==s||t[18]!==x||t[19]!==P||t[20]!==n||t[21]!==w||t[22]!==c||t[23]!==p||t[24]!==L||t[25]!==b||t[26]!==l||t[27]!==O||t[28]!==j||t[29]!==C||t[30]!==g||t[31]!==_||t[32]!==A||t[33]!==k?(W=/* @__PURE__ */ (0,$.jsx)(at,{debounceTime:10,children:e=>{let{width:t,height:r}=e;return/* @__PURE__ */ (0,$.jsx)(ct,{animationDuration:T,animationEasing:s,chartStatus:O,containerRef:F,data:n,enterTransition:c,height:r,loadingLabel:p,density:w,margin:L,onPhaseChange:e=>{ee(e),b?.(e)},revealSignature:l,tweenYDomainOnXDomainChange:j,width:t,xDataKey:C,xDomain:g,xDomainSlotCount:_,yDomainTween:A,yDomainTweenDuration:k,clipPathId:P,children:x})}}),t[16]=T,t[17]=s,t[18]=x,t[19]=P,t[20]=n,t[21]=w,t[22]=c,t[23]=p,t[24]=L,t[25]=b,t[26]=l,t[27]=O,t[28]=j,t[29]=C,t[30]=g,t[31]=_,t[32]=A,t[33]=k,t[34]=W):W=t[34];let G;t[35]!==z||t[36]!==p||t[37]!==V?(G=V?/* @__PURE__ */ (0,$.jsx)(ce,{exiting:z!==`loading`,text:p}):null,t[35]=z,t[36]=p,t[37]=V,t[38]=G):G=t[38];let K;return t[39]!==H||t[40]!==U||t[41]!==W||t[42]!==G?(K=/* @__PURE__ */ (0,$.jsxs)(`div`,{className:H,ref:F,style:U,children:[W,G]}),t[39]=H,t[40]=U,t[41]=W,t[42]=G,t[43]=K):K=t[43],K}const ut=m;function dt(e){let t=(0,Z.c)(19),{margin:n,stroke:r,strokeOpacity:i,gridStroke:a,gridShimmerStroke:o,gridShimmer:s,gridShimmerLength:c,gridShimmerSpeed:l,gridShimmerSync:u,loadingStyle:f,label:p,aspectRatio:h,className:g}=e,_=r===void 0?`var(--chart-foreground)`:r,v=i===void 0?.5:i,y=a===void 0?`color-mix(in oklch, var(--chart-grid) 50%, transparent)`:a,b=o===void 0?`color-mix(in oklch, var(--chart-foreground) 68%, transparent)`:o,x=s===void 0||s,S=u!==void 0&&u,C=f===void 0?`pulse`:f,w=p===void 0?`Loading`:p,T=h===void 0?`2 / 1`:h,D=g===void 0?``:g,k;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(k=d({dataKey:m,pointCount:7}),t[0]=k):k=t[0];let A=k,j=C!==`sweep`&&x,M;t[1]!==c||t[2]!==l||t[3]!==b||t[4]!==S||t[5]!==y||t[6]!==j?(M=/* @__PURE__ */ (0,$.jsx)(O,{horizontal:!0,shimmer:j,shimmerLength:c,shimmerSpeed:l,shimmerStroke:b,shimmerSync:S,stroke:y}),t[1]=c,t[2]=l,t[3]=b,t[4]=S,t[5]=y,t[6]=j,t[7]=M):M=t[7];let N;t[8]!==C||t[9]!==_||t[10]!==v?(N=/* @__PURE__ */ (0,$.jsx)(X,{curve:E,dataKey:ut,fadeEdges:!1,fill:`transparent`,fillOpacity:0,loading:!0,loadingStroke:_,loadingStrokeOpacity:v,loadingStyle:C,showHighlight:!1,showLine:!0,stroke:`transparent`,strokeWidth:2}),t[8]=C,t[9]=_,t[10]=v,t[11]=N):N=t[11];let P;return t[12]!==T||t[13]!==D||t[14]!==w||t[15]!==n||t[16]!==M||t[17]!==N?(P=/* @__PURE__ */ (0,$.jsxs)(lt,{animationDuration:0,aspectRatio:T,className:D,data:A,loadingLabel:w,margin:n,status:`loading`,children:[M,N]}),t[12]=T,t[13]=D,t[14]=w,t[15]=n,t[16]=M,t[17]=N,t[18]=P):P=t[18],P}export{X as Area,lt as AreaChart,dt as AreaChartLoading,We as Background,a as BarLoadingSkeleton,fe as CHART_CLIP_PASSTHROUGH,ae as CHART_DENSITY,re as CHART_DENSITY_IDS,H as ChartConfigProvider,W as ChartLegendHoverProvider,ce as ChartLoadingLabel,u as ChartMarkers,L as ChartProvider,l as ChartRevealClip,Xe as ChartTooltip,T as DEFAULT_ANIMATION_DURATION_MS,C as DEFAULT_ANIMATION_EASING,B as DEFAULT_CHART_CONFIG,J as DEFAULT_CHART_DENSITY,w as DEFAULT_CHART_ENTER_TRANSITION,de as DEFAULT_CHART_LIFECYCLE,se as DEFAULT_CHART_STATUS,A as DEFAULT_Y_AXIS_ID,le as DEFAULT_Y_DOMAIN_TWEEN_MS,Ge as DateTicker,O as Grid,y as LineLoadingSweep,g as MarkerGroup,i as MarkerTooltipContent,Ue as PATTERN_PRESET_IDS,r as PatternArea,Be as PatternCircles,He as PatternHexagons,Ie as PatternLines,Re as PatternWaves,R as ProjectionLine,z as ProjectionLineEndMarker,Ze as ReferenceArea,te as SeriesMarkers,f as SeriesPoint,K as SeriesPointMarker,_ as SeriesTag,ue as ShimmeringText,s as StaticChartPreviewProvider,Qe as TooltipBox,$e as TooltipContent,Ke as TooltipDot,Je as TooltipIndicator,Pe as XAxis,it as YAxis,nt as Y_AXIS_DEFAULT_TICK_COUNT,rt as Y_AXIS_MAX_TICK_COUNT,tt as Y_AXIS_MIN_TICK_COUNT,ve as buildHorizontalTangentBezierPath,Te as buildProjectionPath,N as chartCssVars,we as clampHoverIndexToMaxTime,ye as clampPixelXToProjectionHoverMax,he as computeProjectionAnchorTangentSlope,Ae as computeYDomainsByAxis,F as defaultScatterColors,Se as extractProjectionLineConfigs,d as generateChartSkeletonData,k as getPrimaryYScale,G as getSeriesMarkerVisualExtent,n as getSkeletonHeights,qe as indicatorFadeGradientStops,oe as isChartInteractionPhase,ze as isCirclePattern,Ve as isCirclesPattern,Oe as isLoadingChromePhase,je as isYDomainTweenPhase,Ne as measureMaxLabelWidthPx,_e as mergeProjectionXDomainMax,pe as mergeProjectionYDomain,Ee as mergeYDomainRecords,ke as niceYDomain,Le as patternPresetTileSize,ge as projectionDateExtents,be as projectionHoverMaxBySeries,Ce as projectionHoverMaxTime,me as projectionPinnedOverlayX,xe as projectionValueExtents,Fe as renderPatternPreset,q as resolveChartMargin,ne as resolveDensityMaxLabels,ie as resolveDensityTickCount,Y as resolveRestingChartPhase,V as resolveTooltipBoxMotion,Ye as resolveVerticalFadeSides,Me as resolveYAxisMarginPx,et as resolveYAxisTickCount,De as shouldTweenYDomain,p as useActiveMarkers,v as useAnimatedYDomains,M as useChart,ee as useChartConfig,j as useChartHover,o as useChartInteraction,U as useChartLegendHover,P as useChartStable,h as useSeriesPoint,c as useStaticChartPreview,I as useYScale};
1
+ import{a as e}from"../../../_chunks/rolldown-runtime-BWaJ3C7D.js";import{t}from"../../../_chunks/react-CUaU2Z9V.js";import{S as n,_ as r,a as i,b as a,c as o,d as s,f as c,g as l,i as u,m as d,n as f,o as p,p as m,r as h,s as g,t as _,u as v,x as y}from"../../../_chunks/series-tag-BaecVmtO.js";import{t as b}from"../../../_chunks/compiler-runtime-B3BlmaWz.js";import{t as x}from"../../../_chunks/jsx-runtime-Dgn0yPdi.js";import{t as S}from"../../../_chunks/dist-BNSTMZct.js";import{n as C,r as w,t as T}from"../../../_chunks/animation-D8IqP_32.js";import{f as E,t as D}from"../../../_chunks/time-series-chart-shell-C7ciyZuR.js";import{t as O}from"../../../_chunks/grid-DmEGskok.js";import{i as k,t as A}from"../../../_chunks/y-axis-scales-Di1QS_P5.js";import{a as j,i as M,n as N,o as P,r as F,s as I,t as L}from"../../../_chunks/chart-context-DEIvTsqh.js";import{n as R,t as z}from"../../../_chunks/projection-line-end-marker-QD35F55G.js";import{i as ee,n as B,r as V,t as H}from"../../../_chunks/chart-config-context-BpwYTVdv.js";import{n as U,t as W}from"../../../_chunks/chart-legend-hover-BJijcIfO.js";import{i as G,n as K,t as te}from"../../../_chunks/series-markers-PiCafGdw.js";import{a as ne,i as q,n as re,o as ie,r as J,t as ae}from"../../../_chunks/chart-density-B2pG6con.js";import{a as Y,i as oe,n as se,o as ce,r as le,s as ue,t as de}from"../../../_chunks/chart-phase-BaIoHaYw.js";import{t as fe}from"../../../_chunks/chart-child-passthrough-CU3_U3Y7.js";import{a as pe,c as me,d as he,f as ge,i as _e,l as ve,n as ye,o as be,p as xe,r as Se,s as Ce,t as we,u as Te}from"../../../_chunks/projection-config-BrjUSVSl.js";import{c as Ee,f as De,i as Oe,l as ke,r as Ae,s as je}from"../../../_chunks/y-domain-utils-DBuIZ5LP.js";import{a as Me,n as Ne,t as Pe}from"../../../_chunks/x-axis-zEBQ8DnV.js";import{a as Fe,c as Ie,i as Le,l as Re,n as ze,o as Be,r as Ve,s as He,t as Ue}from"../../../_chunks/pattern-preset-CyGrTxZq.js";import{t as We}from"../../../_chunks/background-BL4j0Aup.js";import{a as Ge,i as Ke,o as qe,r as Je,s as Ye,t as Xe}from"../../../_chunks/chart-tooltip-BN_Xx-ha.js";import{t as Ze}from"../../../_chunks/reference-area-C1I15Ptt.js";import{t as Qe}from"../../../_chunks/tooltip-box-DTNmTvby.js";import{t as $e}from"../../../_chunks/tooltip-content-CEeyDbtg.js";import{a as et,i as tt,n as nt,r as rt,t as it}from"../../../_chunks/y-axis-R9BDlIer.js";import{t as X}from"../../../_chunks/area-series-BFKny0vR.js";import{t as at}from"../../../_chunks/ParentSize-8O4qY4pg.js";var Z=b(),Q=/* @__PURE__ */ e(t(),1),$=/* @__PURE__ */ e(x(),1);const ot=/* @__PURE__ */ new Set([`LineSeriesTerminalMarker`,`SeriesPoint`,`SeriesTag`]);function st(e){let t=[];return Q.Children.forEach(e,e=>{if(!(0,Q.isValidElement)(e))return;let n=e.type,i=typeof e.type==`function`&&(n.displayName||n.name)||``,a=e.props,o=i===`PatternArea`||e.type===r,s=ot.has(i);(i===`Area`||e.type===X||a&&typeof a.dataKey==`string`&&a.dataKey.length>0&&!o&&!s)&&a?.dataKey&&t.push({dataKey:a.dataKey,stroke:a.stroke||a.fill||`var(--chart-line-primary)`,strokeWidth:a.strokeWidth||2,yAxisId:a.yAxisId})}),t}function ct(e){let t=(0,Z.c)(25),{width:n,height:r,data:i,xDataKey:a,margin:o,density:s,animationDuration:c,animationEasing:l,enterTransition:u,revealSignature:d,chartStatus:f,loadingLabel:p,yDomainTweenDuration:m,yDomainTween:h,xDomain:g,xDomainSlotCount:_,tweenYDomainOnXDomainChange:v,children:y,containerRef:b,onPhaseChange:x,clipPathId:S}=e,C;t[0]===y?C=t[1]:(C=st(y),t[0]=y,t[1]=C);let w=C,T;return t[2]!==c||t[3]!==l||t[4]!==f||t[5]!==y||t[6]!==S||t[7]!==b||t[8]!==i||t[9]!==s||t[10]!==u||t[11]!==r||t[12]!==w||t[13]!==p||t[14]!==o||t[15]!==x||t[16]!==d||t[17]!==v||t[18]!==n||t[19]!==a||t[20]!==g||t[21]!==_||t[22]!==h||t[23]!==m?(T=/* @__PURE__ */ (0,$.jsx)(D,{animationDuration:c,animationEasing:l,chartStatus:f,clipPathId:S,containerRef:b,data:i,enterTransition:u,height:r,lines:w,loadingLabel:p,density:s,margin:o,onPhaseChange:x,revealSignature:d,tweenYDomainOnXDomainChange:v,width:n,xDataKey:a,xDomain:g,xDomainSlotCount:_,yDomainTween:h,yDomainTweenDuration:m,children:y}),t[2]=c,t[3]=l,t[4]=f,t[5]=y,t[6]=S,t[7]=b,t[8]=i,t[9]=s,t[10]=u,t[11]=r,t[12]=w,t[13]=p,t[14]=o,t[15]=x,t[16]=d,t[17]=v,t[18]=n,t[19]=a,t[20]=g,t[21]=_,t[22]=h,t[23]=m,t[24]=T):T=t[24],T}function lt(e){let t=(0,Z.c)(44),{data:n,xDataKey:r,density:i,margin:a,animationDuration:o,animationEasing:s,enterTransition:c,revealSignature:l,aspectRatio:u,className:d,status:f,loadingLabel:p,yDomainTweenDuration:m,yDomainTween:h,xDomain:g,xDomainSlotCount:_,tweenYDomainOnXDomainChange:v,style:y,onPhaseChange:b,children:x}=e,C=r===void 0?`date`:r,w=i===void 0?J:i,T=o===void 0?1100:o,E=u===void 0?`2 / 1`:u,D=d===void 0?``:d,O=f===void 0?se:f,k=m===void 0?500:m,A=h===void 0||h,j=v!==void 0&&v,M=(0,Q.useId)(),N;if(t[0]!==M){let e;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=/:/g,t[2]=e):e=t[2],N=M.replace(e,``),t[0]=M,t[1]=N}else N=t[1];let P=`chart-area-grow-clip-${N}`,F=(0,Q.useRef)(null),I;t[3]!==w||t[4]!==a?(I=q(w,a),t[3]=w,t[4]=a,t[5]=I):I=t[5];let L=I,R;t[6]===O?R=t[7]:(R=()=>Y(O),t[6]=O,t[7]=R);let[z,ee]=(0,Q.useState)(R),B;t[8]!==z||t[9]!==p?(B=p?.trim()&&(z===`loading`||z===`exiting`||z===`gridTweenReady`||z===`revealingLoading`),t[8]=z,t[9]=p,t[10]=B):B=t[10];let V=!!B,H;t[11]===D?H=t[12]:(H=S(`relative w-full`,D),t[11]=D,t[12]=H);let U;t[13]!==E||t[14]!==y?(U={aspectRatio:E,touchAction:`none`,...y},t[13]=E,t[14]=y,t[15]=U):U=t[15];let W;t[16]!==T||t[17]!==s||t[18]!==x||t[19]!==P||t[20]!==n||t[21]!==w||t[22]!==c||t[23]!==p||t[24]!==L||t[25]!==b||t[26]!==l||t[27]!==O||t[28]!==j||t[29]!==C||t[30]!==g||t[31]!==_||t[32]!==A||t[33]!==k?(W=/* @__PURE__ */ (0,$.jsx)(at,{debounceTime:10,children:e=>{let{width:t,height:r}=e;return/* @__PURE__ */ (0,$.jsx)(ct,{animationDuration:T,animationEasing:s,chartStatus:O,containerRef:F,data:n,enterTransition:c,height:r,loadingLabel:p,density:w,margin:L,onPhaseChange:e=>{ee(e),b?.(e)},revealSignature:l,tweenYDomainOnXDomainChange:j,width:t,xDataKey:C,xDomain:g,xDomainSlotCount:_,yDomainTween:A,yDomainTweenDuration:k,clipPathId:P,children:x})}}),t[16]=T,t[17]=s,t[18]=x,t[19]=P,t[20]=n,t[21]=w,t[22]=c,t[23]=p,t[24]=L,t[25]=b,t[26]=l,t[27]=O,t[28]=j,t[29]=C,t[30]=g,t[31]=_,t[32]=A,t[33]=k,t[34]=W):W=t[34];let G;t[35]!==z||t[36]!==p||t[37]!==V?(G=V?/* @__PURE__ */ (0,$.jsx)(ce,{exiting:z!==`loading`,text:p}):null,t[35]=z,t[36]=p,t[37]=V,t[38]=G):G=t[38];let K;return t[39]!==H||t[40]!==U||t[41]!==W||t[42]!==G?(K=/* @__PURE__ */ (0,$.jsxs)(`div`,{className:H,ref:F,style:U,children:[W,G]}),t[39]=H,t[40]=U,t[41]=W,t[42]=G,t[43]=K):K=t[43],K}const ut=m;function dt(e){let t=(0,Z.c)(19),{margin:n,stroke:r,strokeOpacity:i,gridStroke:a,gridShimmerStroke:o,gridShimmer:s,gridShimmerLength:c,gridShimmerSpeed:l,gridShimmerSync:u,loadingStyle:f,label:p,aspectRatio:h,className:g}=e,_=r===void 0?`var(--chart-foreground)`:r,v=i===void 0?.5:i,y=a===void 0?`color-mix(in oklch, var(--chart-grid) 50%, transparent)`:a,b=o===void 0?`color-mix(in oklch, var(--chart-foreground) 68%, transparent)`:o,x=s===void 0||s,S=u!==void 0&&u,C=f===void 0?`pulse`:f,w=p===void 0?`Loading`:p,T=h===void 0?`2 / 1`:h,D=g===void 0?``:g,k;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(k=d({dataKey:m,pointCount:7}),t[0]=k):k=t[0];let A=k,j=C!==`sweep`&&x,M;t[1]!==c||t[2]!==l||t[3]!==b||t[4]!==S||t[5]!==y||t[6]!==j?(M=/* @__PURE__ */ (0,$.jsx)(O,{horizontal:!0,shimmer:j,shimmerLength:c,shimmerSpeed:l,shimmerStroke:b,shimmerSync:S,stroke:y}),t[1]=c,t[2]=l,t[3]=b,t[4]=S,t[5]=y,t[6]=j,t[7]=M):M=t[7];let N;t[8]!==C||t[9]!==_||t[10]!==v?(N=/* @__PURE__ */ (0,$.jsx)(X,{curve:E,dataKey:ut,fadeEdges:!1,fill:`transparent`,fillOpacity:0,loading:!0,loadingStroke:_,loadingStrokeOpacity:v,loadingStyle:C,showHighlight:!1,showLine:!0,stroke:`transparent`,strokeWidth:2}),t[8]=C,t[9]=_,t[10]=v,t[11]=N):N=t[11];let P;return t[12]!==T||t[13]!==D||t[14]!==w||t[15]!==n||t[16]!==M||t[17]!==N?(P=/* @__PURE__ */ (0,$.jsxs)(lt,{animationDuration:0,aspectRatio:T,className:D,data:A,loadingLabel:w,margin:n,status:`loading`,children:[M,N]}),t[12]=T,t[13]=D,t[14]=w,t[15]=n,t[16]=M,t[17]=N,t[18]=P):P=t[18],P}export{X as Area,lt as AreaChart,dt as AreaChartLoading,We as Background,a as BarLoadingSkeleton,fe as CHART_CLIP_PASSTHROUGH,ae as CHART_DENSITY,re as CHART_DENSITY_IDS,H as ChartConfigProvider,W as ChartLegendHoverProvider,ce as ChartLoadingLabel,u as ChartMarkers,L as ChartProvider,l as ChartRevealClip,Xe as ChartTooltip,T as DEFAULT_ANIMATION_DURATION_MS,C as DEFAULT_ANIMATION_EASING,B as DEFAULT_CHART_CONFIG,J as DEFAULT_CHART_DENSITY,w as DEFAULT_CHART_ENTER_TRANSITION,de as DEFAULT_CHART_LIFECYCLE,se as DEFAULT_CHART_STATUS,A as DEFAULT_Y_AXIS_ID,le as DEFAULT_Y_DOMAIN_TWEEN_MS,Ge as DateTicker,O as Grid,y as LineLoadingSweep,g as MarkerGroup,i as MarkerTooltipContent,Ue as PATTERN_PRESET_IDS,r as PatternArea,Be as PatternCircles,He as PatternHexagons,Ie as PatternLines,Re as PatternWaves,R as ProjectionLine,z as ProjectionLineEndMarker,Ze as ReferenceArea,te as SeriesMarkers,f as SeriesPoint,K as SeriesPointMarker,_ as SeriesTag,ue as ShimmeringText,s as StaticChartPreviewProvider,Qe as TooltipBox,$e as TooltipContent,Ke as TooltipDot,Je as TooltipIndicator,Pe as XAxis,it as YAxis,nt as Y_AXIS_DEFAULT_TICK_COUNT,rt as Y_AXIS_MAX_TICK_COUNT,tt as Y_AXIS_MIN_TICK_COUNT,ve as buildHorizontalTangentBezierPath,Te as buildProjectionPath,N as chartCssVars,we as clampHoverIndexToMaxTime,ye as clampPixelXToProjectionHoverMax,he as computeProjectionAnchorTangentSlope,Ae as computeYDomainsByAxis,F as defaultScatterColors,Se as extractProjectionLineConfigs,d as generateChartSkeletonData,k as getPrimaryYScale,G as getSeriesMarkerVisualExtent,n as getSkeletonHeights,qe as indicatorFadeGradientStops,oe as isChartInteractionPhase,ze as isCirclePattern,Ve as isCirclesPattern,Oe as isLoadingChromePhase,je as isYDomainTweenPhase,Ne as measureMaxLabelWidthPx,_e as mergeProjectionXDomainMax,pe as mergeProjectionYDomain,Ee as mergeYDomainRecords,ke as niceYDomain,Le as patternPresetTileSize,ge as projectionDateExtents,be as projectionHoverMaxBySeries,Ce as projectionHoverMaxTime,me as projectionPinnedOverlayX,xe as projectionValueExtents,Fe as renderPatternPreset,q as resolveChartMargin,ne as resolveDensityMaxLabels,ie as resolveDensityTickCount,Y as resolveRestingChartPhase,V as resolveTooltipBoxMotion,Ye as resolveVerticalFadeSides,Me as resolveYAxisMarginPx,et as resolveYAxisTickCount,De as shouldTweenYDomain,p as useActiveMarkers,v as useAnimatedYDomains,M as useChart,ee as useChartConfig,j as useChartHover,o as useChartInteraction,U as useChartLegendHover,P as useChartStable,h as useSeriesPoint,c as useStaticChartPreview,I as useYScale};
@@ -1 +1 @@
1
- import{a as e}from"../../../_chunks/rolldown-runtime-BWaJ3C7D.js";import{t}from"../../../_chunks/react-CUaU2Z9V.js";import{S as n,_ as r,a as i,b as a,c as o,d as s,f as c,g as l,i as u,m as d,n as f,o as p,r as m,s as h,t as g,u as _,x as v}from"../../../_chunks/series-tag-BaecVmtO.js";import{t as y}from"../../../_chunks/compiler-runtime-B3BlmaWz.js";import{t as b}from"../../../_chunks/jsx-runtime-Dgn0yPdi.js";import{t as x}from"../../../_chunks/dist-BNSTMZct.js";import{n as S}from"../../../_chunks/react-B3hSlcN2.js";import{n as C,r as w,t as T}from"../../../_chunks/animation-D8IqP_32.js";import{n as E,t as D}from"../../../_chunks/time-series-chart-shell-CUug7kYf.js";import{t as O}from"../../../_chunks/grid-DmEGskok.js";import{i as k,t as A}from"../../../_chunks/y-axis-scales-Di1QS_P5.js";import{a as j,i as M,n as N,o as P,r as F,s as I,t as L}from"../../../_chunks/chart-context-DEIvTsqh.js";import{n as R,t as z}from"../../../_chunks/projection-line-end-marker-QD35F55G.js";import{i as B,n as V,r as ee,t as H}from"../../../_chunks/chart-config-context-BpwYTVdv.js";import{n as te,t as ne}from"../../../_chunks/chart-legend-hover-BJijcIfO.js";import{i as U,n as re,t as ie}from"../../../_chunks/series-markers-PiCafGdw.js";import{a as W,i as G,n as K,o as q,r as J,t as ae}from"../../../_chunks/chart-density-B2pG6con.js";import{a as oe,i as se,n as ce,o as le,r as ue,s as de,t as fe}from"../../../_chunks/chart-phase-BaIoHaYw.js";import{t as pe}from"../../../_chunks/chart-child-passthrough-CU3_U3Y7.js";import{a as me,c as he,d as ge,f as _e,i as ve,l as ye,n as be,o as xe,p as Se,r as Ce,s as we,t as Te,u as Ee}from"../../../_chunks/projection-config-BrjUSVSl.js";import{c as De,f as Oe,i as ke,l as Ae,r as je,s as Me}from"../../../_chunks/y-domain-utils-DBuIZ5LP.js";import{a as Ne,n as Pe,t as Fe}from"../../../_chunks/x-axis-zEBQ8DnV.js";import{a as Ie,c as Le,i as Re,l as ze,n as Be,o as Ve,r as He,s as Ue,t as We}from"../../../_chunks/pattern-preset-CyGrTxZq.js";import{t as Ge}from"../../../_chunks/background-BL4j0Aup.js";import{a as Ke,i as qe,o as Je,r as Ye,s as Xe,t as Ze}from"../../../_chunks/chart-tooltip-BN_Xx-ha.js";import{t as Qe}from"../../../_chunks/reference-area-C1I15Ptt.js";import{t as $e}from"../../../_chunks/tooltip-box-DTNmTvby.js";import{t as et}from"../../../_chunks/tooltip-content-CEeyDbtg.js";import{a as tt,i as nt,n as rt,r as it,t as at}from"../../../_chunks/y-axis-R9BDlIer.js";import{t as ot}from"../../../_chunks/area-series-BOjnVxlm.js";import{t as st}from"../../../_chunks/ParentSize-8O4qY4pg.js";import{t as ct}from"../../../_chunks/motion-utils-FSUhZgF9.js";import{n as lt,t as ut}from"../../../_chunks/line-series-terminal-marker-CVY3yNDL.js";var Y=y(),X=/* @__PURE__ */ e(b(),1);function dt(e){let{stacked:t,composedStackOffsets:n,rowIndex:r,dataKey:i,value:a,yScale:o,innerHeight:s,xCenter:c,barWidth:l,seriesCount:u,gap:d,seriesIndex:f,stackGap:p,isLastSeries:m,radius:h}=e;if(t&&n){let e=n.get(r)?.get(i)??0,t=s-(o(a)??0),u=o(e)??s,d=f*p,g=u-t-d;return!m&&p>0&&(t=Math.max(0,t-p)),{barLeft:c-l/2,barHeight:t,effectiveRadius:p>0||m?h:0,valueY:g}}let g=u*l+(u>1?(u-1)*d:0),_=o(a)??s;return{barLeft:c-g/2+f*(l+d),barHeight:s-_,effectiveRadius:h,valueY:_}}function Z(e){let t=(0,Y.c)(8),{dataKey:n,fill:r,radius:i,animate:a,fadedOpacity:o}=e,s=r===void 0?N.linePrimary:r,c=i===void 0?0:i,l=a===void 0||a,u=o===void 0?.3:o,{data:d,xScale:f,yScale:p,xAccessor:m,innerHeight:h,innerWidth:g,columnWidth:_,isLoaded:v,animationDuration:y,enterTransition:b,revealEpoch:x,barScale:C,composedBarDataKeys:w,composedBarSize:T,composedMaxBarSize:D,composedBarGap:O,composedStacked:k,composedStackOffsets:A,composedStackGap:j,tooltipData:P}=M(),F=x===void 0?0:x,I;t[0]!==w||t[1]!==n?(I=w&&w.length>0?w:[n],t[0]=w,t[1]=n,t[2]=I):I=t[2];let L=I,R;t[3]!==L||t[4]!==n?(R=L.indexOf(n),t[3]=L,t[4]=n,t[5]=R):R=t[5];let z=Math.max(0,R),B=L.length,V=O??4,ee=j??0,H=!!k&&A!=null&&w!=null&&w.length>0,ne=z===B-1,U=E({innerWidth:g,dataLength:d.length,columnWidth:_,seriesCount:B,composedBarSize:T,composedMaxBarSize:D,composedBarGap:V,stacked:H}),re=(y||1100)*.4,ie=d.length>1?re/1e3/d.length:0,{hoveredIndex:W}=te(),G=W!==null&&W!==z,K=P?.index??null;if(C)return console.warn(`SeriesBar is for time-based ComposedChart / LineChart context. Use Bar inside BarChart for categorical x.`),null;let q=d.map((e,t)=>{let r=e[n];if(typeof r!=`number`)return null;let i=f(m(e))??0,{barLeft:a,valueY:o,barHeight:d,effectiveRadius:g}=dt({stacked:H,composedStackOffsets:A,rowIndex:t,dataKey:n,value:r,yScale:p,innerHeight:h,xCenter:i,barWidth:U,seriesCount:B,gap:V,seriesIndex:z,stackGap:ee,isLastSeries:ne,radius:c}),_=String(m(e).getTime()),y=K!==null&&K!==t||G;return l&&!v?/* @__PURE__ */ (0,X.jsx)(ft,{barHeight:d,barWidth:U,calculatedStaggerDelay:ie,enterTransition:b,fadedOpacity:u,fill:s,index:t,innerHeight:h,isFaded:y,radius:g,revealEpoch:F,x:a,y:o},`${n}-${_}-${F}`):/* @__PURE__ */ (0,X.jsx)(S.rect,{animate:{opacity:y?u:1},fill:s,height:d,rx:g,ry:g,transition:{opacity:{duration:.12}},width:U,x:a,y:o},`${n}-${_}`)}),J;return t[6]===q?J=t[7]:(J=/* @__PURE__ */ (0,X.jsx)(`g`,{className:`series-bar`,children:q}),t[6]=q,t[7]=J),J}Z.displayName=`SeriesBar`;function ft(e){let t=(0,Y.c)(18),{x:n,y:r,barWidth:i,barHeight:a,fill:o,radius:s,index:c,innerHeight:l,calculatedStaggerDelay:u,enterTransition:d,revealEpoch:f,isFaded:p,fadedOpacity:m}=e,h=c*u,g;t[0]!==d||t[1]!==h?(g=ct(d,h),t[0]=d,t[1]=h,t[2]=g):g=t[2];let _=g,v=p?m:1,y;t[3]!==a||t[4]!==v||t[5]!==r?(y={height:a,y:r,opacity:v},t[3]=a,t[4]=v,t[5]=r,t[6]=y):y=t[6];let b;t[7]===l?b=t[8]:(b={height:0,y:l,opacity:1},t[7]=l,t[8]=b);let x=`series-bar-${c}-${f}`,C;return t[9]!==i||t[10]!==_||t[11]!==o||t[12]!==s||t[13]!==y||t[14]!==b||t[15]!==x||t[16]!==n?(C=/* @__PURE__ */ (0,X.jsx)(S.rect,{animate:y,fill:o,initial:b,rx:s,ry:s,transition:_,width:i,x:n},x),t[9]=i,t[10]=_,t[11]=o,t[12]=s,t[13]=y,t[14]=b,t[15]=x,t[16]=n,t[17]=C):C=t[17],C}var Q=/* @__PURE__ */ e(t(),1);function $(e){let t=e.type;return typeof e.type==`function`&&(t.displayName||t.name)||``}function pt(e,t){let n=e.findIndex(e=>e.dataKey===t.dataKey);n===-1?e.push(t):e[n]=t}function mt(e,t,n){let r=$(e);if(e.type!==Z&&r!==`SeriesBar`)return!1;let i=e.props;return i.dataKey&&(n.push(i.dataKey),pt(t,{dataKey:i.dataKey,stroke:i.stroke||i.fill||`var(--chart-line-primary)`,strokeWidth:0})),!0}function ht(e,t){let n=$(e);if(e.type!==lt&&n!==`Line`)return!1;let r=e.props;return r.dataKey&&pt(t,{dataKey:r.dataKey,stroke:r.stroke||`var(--chart-line-primary)`,strokeWidth:r.strokeWidth??2.5,yAxisId:r.yAxisId}),!0}function gt(e,t){let n=$(e);if(e.type!==ot&&n!==`Area`)return!1;let r=e.props;return r.dataKey&&pt(t,{dataKey:r.dataKey,stroke:r.stroke||r.fill||`var(--chart-line-primary)`,strokeWidth:r.strokeWidth??2,yAxisId:r.yAxisId}),!0}function _t(e){let t=[],n=[];return Q.Children.forEach(e,e=>{(0,Q.isValidElement)(e)&&(mt(e,t,n)||ht(e,t)||gt(e,t))}),{lines:t,barDataKeys:n}}function vt(e,t,n){let r=new Set(n),i=0;for(let a of e){let e=0;for(let t of n){let n=a[t];typeof n==`number`&&(e+=n)}let o=0;for(let e of t){if(r.has(e.dataKey))continue;let t=a[e.dataKey];typeof t==`number`&&(o=Math.max(o,t))}i=Math.max(i,e,o)}return i>0?i:void 0}function yt(e){let t=(0,Y.c)(33),{width:n,height:r,data:i,xDataKey:a,xScaleType:o,xTickFormat:s,margin:c,density:l,animationDuration:u,animationEasing:d,enterTransition:f,revealSignature:p,children:m,containerRef:h,barSize:g,maxBarSize:_,barGap:v,stacked:y,stackGap:b,onPhaseChange:x,clipPathId:S}=e,C=y!==void 0&&y,w=b===void 0?0:b,T,E,O,k;if(t[0]!==m||t[1]!==i||t[2]!==C){({lines:O,barDataKeys:T}=_t(m));let e;bb0:{if(!(C&&T.length>0)){e=void 0;break bb0}let t=/* @__PURE__ */ new Map;for(let e=0;e<i.length;e++){let n=i[e];if(!n)continue;let r=/* @__PURE__ */ new Map,a=0;for(let e of T){r.set(e,a);let t=n[e];typeof t==`number`&&(a+=t)}t.set(e,r)}e=t}E=e,k=C&&T.length>0?vt(i,O,T):void 0,t[0]=m,t[1]=i,t[2]=C,t[3]=T,t[4]=E,t[5]=O,t[6]=k}else T=t[3],E=t[4],O=t[5],k=t[6];let A=k,j=T.length>0?T:void 0,M;return t[7]!==u||t[8]!==d||t[9]!==v||t[10]!==g||t[11]!==m||t[12]!==S||t[13]!==E||t[14]!==h||t[15]!==i||t[16]!==l||t[17]!==f||t[18]!==r||t[19]!==O||t[20]!==c||t[21]!==_||t[22]!==x||t[23]!==p||t[24]!==w||t[25]!==C||t[26]!==j||t[27]!==n||t[28]!==a||t[29]!==o||t[30]!==s||t[31]!==A?(M=/* @__PURE__ */ (0,X.jsx)(D,{animationDuration:u,animationEasing:d,clipPathId:S,composedBarDataKeys:j,composedBarGap:v,composedBarSize:g,composedMaxBarSize:_,composedStacked:C,composedStackGap:w,composedStackOffsets:E,containerRef:h,data:i,enterTransition:f,height:r,lines:O,density:l,margin:c,onPhaseChange:x,revealSignature:p,width:n,xDataKey:a,xScaleType:o,xTickFormat:s,yScaleDomainMax:A,children:m}),t[7]=u,t[8]=d,t[9]=v,t[10]=g,t[11]=m,t[12]=S,t[13]=E,t[14]=h,t[15]=i,t[16]=l,t[17]=f,t[18]=r,t[19]=O,t[20]=c,t[21]=_,t[22]=x,t[23]=p,t[24]=w,t[25]=C,t[26]=j,t[27]=n,t[28]=a,t[29]=o,t[30]=s,t[31]=A,t[32]=M):M=t[32],M}function bt(e){let t=(0,Y.c)(34),{data:n,xDataKey:r,xScaleType:i,xTickFormat:a,density:o,margin:s,animationDuration:c,animationEasing:l,enterTransition:u,revealSignature:d,aspectRatio:f,height:p,className:m,children:h,barSize:g,maxBarSize:_,barGap:v,stacked:y,stackGap:b,onPhaseChange:S}=e,C=r===void 0?`date`:r,w=o===void 0?J:o,T=c===void 0?1100:c,E=f===void 0?`2 / 1`:f,D=m===void 0?``:m,O=v===void 0?4:v,k=y!==void 0&&y,A=b===void 0?0:b,j=(0,Q.useId)(),M;if(t[0]!==j){let e;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=/:/g,t[2]=e):e=t[2],M=j.replace(e,``),t[0]=j,t[1]=M}else M=t[1];let N=`composed-chart-grow-clip-${M}`,P=(0,Q.useRef)(null),F;t[3]!==w||t[4]!==s?(F=G(w,s),t[3]=w,t[4]=s,t[5]=F):F=t[5];let I=F,L;t[6]===D?L=t[7]:(L=x(`relative w-full`,D),t[6]=D,t[7]=L);let R;t[8]!==E||t[9]!==p?(R={touchAction:`none`,...p===void 0?{aspectRatio:E}:{height:p}},t[8]=E,t[9]=p,t[10]=R):R=t[10];let z;t[11]!==T||t[12]!==l||t[13]!==O||t[14]!==g||t[15]!==h||t[16]!==N||t[17]!==n||t[18]!==w||t[19]!==u||t[20]!==I||t[21]!==_||t[22]!==S||t[23]!==d||t[24]!==A||t[25]!==k||t[26]!==C||t[27]!==i||t[28]!==a?(z=/* @__PURE__ */ (0,X.jsx)(st,{debounceTime:10,children:e=>{let{width:t,height:r}=e;return/* @__PURE__ */ (0,X.jsx)(yt,{animationDuration:T,animationEasing:l,barGap:O,barSize:g,containerRef:P,data:n,enterTransition:u,height:r,density:w,margin:I,maxBarSize:_,onPhaseChange:S,revealSignature:d,stacked:k,stackGap:A,width:t,xDataKey:C,xScaleType:i,xTickFormat:a,clipPathId:N,children:h})}}),t[11]=T,t[12]=l,t[13]=O,t[14]=g,t[15]=h,t[16]=N,t[17]=n,t[18]=w,t[19]=u,t[20]=I,t[21]=_,t[22]=S,t[23]=d,t[24]=A,t[25]=k,t[26]=C,t[27]=i,t[28]=a,t[29]=z):z=t[29];let B;return t[30]!==L||t[31]!==R||t[32]!==z?(B=/* @__PURE__ */ (0,X.jsx)(`div`,{className:L,ref:P,style:R,children:z}),t[30]=L,t[31]=R,t[32]=z,t[33]=B):B=t[33],B}export{ot as Area,Ge as Background,a as BarLoadingSkeleton,pe as CHART_CLIP_PASSTHROUGH,ae as CHART_DENSITY,K as CHART_DENSITY_IDS,H as ChartConfigProvider,ne as ChartLegendHoverProvider,le as ChartLoadingLabel,u as ChartMarkers,L as ChartProvider,l as ChartRevealClip,Ze as ChartTooltip,bt as ComposedChart,T as DEFAULT_ANIMATION_DURATION_MS,C as DEFAULT_ANIMATION_EASING,V as DEFAULT_CHART_CONFIG,J as DEFAULT_CHART_DENSITY,w as DEFAULT_CHART_ENTER_TRANSITION,fe as DEFAULT_CHART_LIFECYCLE,ce as DEFAULT_CHART_STATUS,A as DEFAULT_Y_AXIS_ID,ue as DEFAULT_Y_DOMAIN_TWEEN_MS,Ke as DateTicker,O as Grid,lt as Line,v as LineLoadingSweep,ut as LineSeriesTerminalMarker,h as MarkerGroup,i as MarkerTooltipContent,We as PATTERN_PRESET_IDS,r as PatternArea,Ve as PatternCircles,Ue as PatternHexagons,Le as PatternLines,ze as PatternWaves,R as ProjectionLine,z as ProjectionLineEndMarker,Qe as ReferenceArea,Z as SeriesBar,ie as SeriesMarkers,f as SeriesPoint,re as SeriesPointMarker,g as SeriesTag,de as ShimmeringText,s as StaticChartPreviewProvider,$e as TooltipBox,et as TooltipContent,qe as TooltipDot,Ye as TooltipIndicator,Fe as XAxis,at as YAxis,rt as Y_AXIS_DEFAULT_TICK_COUNT,it as Y_AXIS_MAX_TICK_COUNT,nt as Y_AXIS_MIN_TICK_COUNT,ye as buildHorizontalTangentBezierPath,Ee as buildProjectionPath,N as chartCssVars,Te as clampHoverIndexToMaxTime,be as clampPixelXToProjectionHoverMax,ge as computeProjectionAnchorTangentSlope,je as computeYDomainsByAxis,F as defaultScatterColors,Ce as extractProjectionLineConfigs,d as generateChartSkeletonData,k as getPrimaryYScale,U as getSeriesMarkerVisualExtent,n as getSkeletonHeights,Je as indicatorFadeGradientStops,se as isChartInteractionPhase,Be as isCirclePattern,He as isCirclesPattern,ke as isLoadingChromePhase,Me as isYDomainTweenPhase,Pe as measureMaxLabelWidthPx,ve as mergeProjectionXDomainMax,me as mergeProjectionYDomain,De as mergeYDomainRecords,Ae as niceYDomain,Re as patternPresetTileSize,_e as projectionDateExtents,xe as projectionHoverMaxBySeries,we as projectionHoverMaxTime,he as projectionPinnedOverlayX,Se as projectionValueExtents,Ie as renderPatternPreset,G as resolveChartMargin,W as resolveDensityMaxLabels,q as resolveDensityTickCount,oe as resolveRestingChartPhase,ee as resolveTooltipBoxMotion,Xe as resolveVerticalFadeSides,Ne as resolveYAxisMarginPx,tt as resolveYAxisTickCount,Oe as shouldTweenYDomain,p as useActiveMarkers,_ as useAnimatedYDomains,M as useChart,B as useChartConfig,j as useChartHover,o as useChartInteraction,te as useChartLegendHover,P as useChartStable,m as useSeriesPoint,c as useStaticChartPreview,I as useYScale};
1
+ import{a as e}from"../../../_chunks/rolldown-runtime-BWaJ3C7D.js";import{t}from"../../../_chunks/react-CUaU2Z9V.js";import{S as n,_ as r,a as i,b as a,c as o,d as s,f as c,g as l,i as u,m as d,n as f,o as p,r as m,s as h,t as g,u as _,x as v}from"../../../_chunks/series-tag-BaecVmtO.js";import{t as y}from"../../../_chunks/compiler-runtime-B3BlmaWz.js";import{t as b}from"../../../_chunks/jsx-runtime-Dgn0yPdi.js";import{t as x}from"../../../_chunks/dist-BNSTMZct.js";import{n as S}from"../../../_chunks/react-B3hSlcN2.js";import{n as C,r as w,t as T}from"../../../_chunks/animation-D8IqP_32.js";import{n as E,t as D}from"../../../_chunks/time-series-chart-shell-C7ciyZuR.js";import{t as O}from"../../../_chunks/grid-DmEGskok.js";import{i as k,t as A}from"../../../_chunks/y-axis-scales-Di1QS_P5.js";import{a as j,i as M,n as N,o as P,r as F,s as I,t as L}from"../../../_chunks/chart-context-DEIvTsqh.js";import{n as R,t as z}from"../../../_chunks/projection-line-end-marker-QD35F55G.js";import{i as B,n as V,r as ee,t as H}from"../../../_chunks/chart-config-context-BpwYTVdv.js";import{n as te,t as ne}from"../../../_chunks/chart-legend-hover-BJijcIfO.js";import{i as U,n as re,t as ie}from"../../../_chunks/series-markers-PiCafGdw.js";import{a as W,i as G,n as K,o as q,r as J,t as ae}from"../../../_chunks/chart-density-B2pG6con.js";import{a as oe,i as se,n as ce,o as le,r as ue,s as de,t as fe}from"../../../_chunks/chart-phase-BaIoHaYw.js";import{t as pe}from"../../../_chunks/chart-child-passthrough-CU3_U3Y7.js";import{a as me,c as he,d as ge,f as _e,i as ve,l as ye,n as be,o as xe,p as Se,r as Ce,s as we,t as Te,u as Ee}from"../../../_chunks/projection-config-BrjUSVSl.js";import{c as De,f as Oe,i as ke,l as Ae,r as je,s as Me}from"../../../_chunks/y-domain-utils-DBuIZ5LP.js";import{a as Ne,n as Pe,t as Fe}from"../../../_chunks/x-axis-zEBQ8DnV.js";import{a as Ie,c as Le,i as Re,l as ze,n as Be,o as Ve,r as He,s as Ue,t as We}from"../../../_chunks/pattern-preset-CyGrTxZq.js";import{t as Ge}from"../../../_chunks/background-BL4j0Aup.js";import{a as Ke,i as qe,o as Je,r as Ye,s as Xe,t as Ze}from"../../../_chunks/chart-tooltip-BN_Xx-ha.js";import{t as Qe}from"../../../_chunks/reference-area-C1I15Ptt.js";import{t as $e}from"../../../_chunks/tooltip-box-DTNmTvby.js";import{t as et}from"../../../_chunks/tooltip-content-CEeyDbtg.js";import{a as tt,i as nt,n as rt,r as it,t as at}from"../../../_chunks/y-axis-R9BDlIer.js";import{t as ot}from"../../../_chunks/area-series-BFKny0vR.js";import{t as st}from"../../../_chunks/ParentSize-8O4qY4pg.js";import{t as ct}from"../../../_chunks/motion-utils-FSUhZgF9.js";import{n as lt,t as ut}from"../../../_chunks/line-series-terminal-marker-DTRYvJBq.js";var Y=y(),X=/* @__PURE__ */ e(b(),1);function dt(e){let{stacked:t,composedStackOffsets:n,rowIndex:r,dataKey:i,value:a,yScale:o,innerHeight:s,xCenter:c,barWidth:l,seriesCount:u,gap:d,seriesIndex:f,stackGap:p,isLastSeries:m,radius:h}=e;if(t&&n){let e=n.get(r)?.get(i)??0,t=s-(o(a)??0),u=o(e)??s,d=f*p,g=u-t-d;return!m&&p>0&&(t=Math.max(0,t-p)),{barLeft:c-l/2,barHeight:t,effectiveRadius:p>0||m?h:0,valueY:g}}let g=u*l+(u>1?(u-1)*d:0),_=o(a)??s;return{barLeft:c-g/2+f*(l+d),barHeight:s-_,effectiveRadius:h,valueY:_}}function Z(e){let t=(0,Y.c)(8),{dataKey:n,fill:r,radius:i,animate:a,fadedOpacity:o}=e,s=r===void 0?N.linePrimary:r,c=i===void 0?0:i,l=a===void 0||a,u=o===void 0?.3:o,{data:d,xScale:f,yScale:p,xAccessor:m,innerHeight:h,innerWidth:g,columnWidth:_,isLoaded:v,animationDuration:y,enterTransition:b,revealEpoch:x,barScale:C,composedBarDataKeys:w,composedBarSize:T,composedMaxBarSize:D,composedBarGap:O,composedStacked:k,composedStackOffsets:A,composedStackGap:j,tooltipData:P}=M(),F=x===void 0?0:x,I;t[0]!==w||t[1]!==n?(I=w&&w.length>0?w:[n],t[0]=w,t[1]=n,t[2]=I):I=t[2];let L=I,R;t[3]!==L||t[4]!==n?(R=L.indexOf(n),t[3]=L,t[4]=n,t[5]=R):R=t[5];let z=Math.max(0,R),B=L.length,V=O??4,ee=j??0,H=!!k&&A!=null&&w!=null&&w.length>0,ne=z===B-1,U=E({innerWidth:g,dataLength:d.length,columnWidth:_,seriesCount:B,composedBarSize:T,composedMaxBarSize:D,composedBarGap:V,stacked:H}),re=(y||1100)*.4,ie=d.length>1?re/1e3/d.length:0,{hoveredIndex:W}=te(),G=W!==null&&W!==z,K=P?.index??null;if(C)return console.warn(`SeriesBar is for time-based ComposedChart / LineChart context. Use Bar inside BarChart for categorical x.`),null;let q=d.map((e,t)=>{let r=e[n];if(typeof r!=`number`)return null;let i=f(m(e))??0,{barLeft:a,valueY:o,barHeight:d,effectiveRadius:g}=dt({stacked:H,composedStackOffsets:A,rowIndex:t,dataKey:n,value:r,yScale:p,innerHeight:h,xCenter:i,barWidth:U,seriesCount:B,gap:V,seriesIndex:z,stackGap:ee,isLastSeries:ne,radius:c}),_=String(m(e).getTime()),y=K!==null&&K!==t||G;return l&&!v?/* @__PURE__ */ (0,X.jsx)(ft,{barHeight:d,barWidth:U,calculatedStaggerDelay:ie,enterTransition:b,fadedOpacity:u,fill:s,index:t,innerHeight:h,isFaded:y,radius:g,revealEpoch:F,x:a,y:o},`${n}-${_}-${F}`):/* @__PURE__ */ (0,X.jsx)(S.rect,{animate:{opacity:y?u:1},fill:s,height:d,rx:g,ry:g,transition:{opacity:{duration:.12}},width:U,x:a,y:o},`${n}-${_}`)}),J;return t[6]===q?J=t[7]:(J=/* @__PURE__ */ (0,X.jsx)(`g`,{className:`series-bar`,children:q}),t[6]=q,t[7]=J),J}Z.displayName=`SeriesBar`;function ft(e){let t=(0,Y.c)(18),{x:n,y:r,barWidth:i,barHeight:a,fill:o,radius:s,index:c,innerHeight:l,calculatedStaggerDelay:u,enterTransition:d,revealEpoch:f,isFaded:p,fadedOpacity:m}=e,h=c*u,g;t[0]!==d||t[1]!==h?(g=ct(d,h),t[0]=d,t[1]=h,t[2]=g):g=t[2];let _=g,v=p?m:1,y;t[3]!==a||t[4]!==v||t[5]!==r?(y={height:a,y:r,opacity:v},t[3]=a,t[4]=v,t[5]=r,t[6]=y):y=t[6];let b;t[7]===l?b=t[8]:(b={height:0,y:l,opacity:1},t[7]=l,t[8]=b);let x=`series-bar-${c}-${f}`,C;return t[9]!==i||t[10]!==_||t[11]!==o||t[12]!==s||t[13]!==y||t[14]!==b||t[15]!==x||t[16]!==n?(C=/* @__PURE__ */ (0,X.jsx)(S.rect,{animate:y,fill:o,initial:b,rx:s,ry:s,transition:_,width:i,x:n},x),t[9]=i,t[10]=_,t[11]=o,t[12]=s,t[13]=y,t[14]=b,t[15]=x,t[16]=n,t[17]=C):C=t[17],C}var Q=/* @__PURE__ */ e(t(),1);function $(e){let t=e.type;return typeof e.type==`function`&&(t.displayName||t.name)||``}function pt(e,t){let n=e.findIndex(e=>e.dataKey===t.dataKey);n===-1?e.push(t):e[n]=t}function mt(e,t,n){let r=$(e);if(e.type!==Z&&r!==`SeriesBar`)return!1;let i=e.props;return i.dataKey&&(n.push(i.dataKey),pt(t,{dataKey:i.dataKey,stroke:i.stroke||i.fill||`var(--chart-line-primary)`,strokeWidth:0})),!0}function ht(e,t){let n=$(e);if(e.type!==lt&&n!==`Line`)return!1;let r=e.props;return r.dataKey&&pt(t,{dataKey:r.dataKey,stroke:r.stroke||`var(--chart-line-primary)`,strokeWidth:r.strokeWidth??2.5,yAxisId:r.yAxisId}),!0}function gt(e,t){let n=$(e);if(e.type!==ot&&n!==`Area`)return!1;let r=e.props;return r.dataKey&&pt(t,{dataKey:r.dataKey,stroke:r.stroke||r.fill||`var(--chart-line-primary)`,strokeWidth:r.strokeWidth??2,yAxisId:r.yAxisId}),!0}function _t(e){let t=[],n=[];return Q.Children.forEach(e,e=>{(0,Q.isValidElement)(e)&&(mt(e,t,n)||ht(e,t)||gt(e,t))}),{lines:t,barDataKeys:n}}function vt(e,t,n){let r=new Set(n),i=0;for(let a of e){let e=0;for(let t of n){let n=a[t];typeof n==`number`&&(e+=n)}let o=0;for(let e of t){if(r.has(e.dataKey))continue;let t=a[e.dataKey];typeof t==`number`&&(o=Math.max(o,t))}i=Math.max(i,e,o)}return i>0?i:void 0}function yt(e){let t=(0,Y.c)(33),{width:n,height:r,data:i,xDataKey:a,xScaleType:o,xTickFormat:s,margin:c,density:l,animationDuration:u,animationEasing:d,enterTransition:f,revealSignature:p,children:m,containerRef:h,barSize:g,maxBarSize:_,barGap:v,stacked:y,stackGap:b,onPhaseChange:x,clipPathId:S}=e,C=y!==void 0&&y,w=b===void 0?0:b,T,E,O,k;if(t[0]!==m||t[1]!==i||t[2]!==C){({lines:O,barDataKeys:T}=_t(m));let e;bb0:{if(!(C&&T.length>0)){e=void 0;break bb0}let t=/* @__PURE__ */ new Map;for(let e=0;e<i.length;e++){let n=i[e];if(!n)continue;let r=/* @__PURE__ */ new Map,a=0;for(let e of T){r.set(e,a);let t=n[e];typeof t==`number`&&(a+=t)}t.set(e,r)}e=t}E=e,k=C&&T.length>0?vt(i,O,T):void 0,t[0]=m,t[1]=i,t[2]=C,t[3]=T,t[4]=E,t[5]=O,t[6]=k}else T=t[3],E=t[4],O=t[5],k=t[6];let A=k,j=T.length>0?T:void 0,M;return t[7]!==u||t[8]!==d||t[9]!==v||t[10]!==g||t[11]!==m||t[12]!==S||t[13]!==E||t[14]!==h||t[15]!==i||t[16]!==l||t[17]!==f||t[18]!==r||t[19]!==O||t[20]!==c||t[21]!==_||t[22]!==x||t[23]!==p||t[24]!==w||t[25]!==C||t[26]!==j||t[27]!==n||t[28]!==a||t[29]!==o||t[30]!==s||t[31]!==A?(M=/* @__PURE__ */ (0,X.jsx)(D,{animationDuration:u,animationEasing:d,clipPathId:S,composedBarDataKeys:j,composedBarGap:v,composedBarSize:g,composedMaxBarSize:_,composedStacked:C,composedStackGap:w,composedStackOffsets:E,containerRef:h,data:i,enterTransition:f,height:r,lines:O,density:l,margin:c,onPhaseChange:x,revealSignature:p,width:n,xDataKey:a,xScaleType:o,xTickFormat:s,yScaleDomainMax:A,children:m}),t[7]=u,t[8]=d,t[9]=v,t[10]=g,t[11]=m,t[12]=S,t[13]=E,t[14]=h,t[15]=i,t[16]=l,t[17]=f,t[18]=r,t[19]=O,t[20]=c,t[21]=_,t[22]=x,t[23]=p,t[24]=w,t[25]=C,t[26]=j,t[27]=n,t[28]=a,t[29]=o,t[30]=s,t[31]=A,t[32]=M):M=t[32],M}function bt(e){let t=(0,Y.c)(34),{data:n,xDataKey:r,xScaleType:i,xTickFormat:a,density:o,margin:s,animationDuration:c,animationEasing:l,enterTransition:u,revealSignature:d,aspectRatio:f,height:p,className:m,children:h,barSize:g,maxBarSize:_,barGap:v,stacked:y,stackGap:b,onPhaseChange:S}=e,C=r===void 0?`date`:r,w=o===void 0?J:o,T=c===void 0?1100:c,E=f===void 0?`2 / 1`:f,D=m===void 0?``:m,O=v===void 0?4:v,k=y!==void 0&&y,A=b===void 0?0:b,j=(0,Q.useId)(),M;if(t[0]!==j){let e;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=/:/g,t[2]=e):e=t[2],M=j.replace(e,``),t[0]=j,t[1]=M}else M=t[1];let N=`composed-chart-grow-clip-${M}`,P=(0,Q.useRef)(null),F;t[3]!==w||t[4]!==s?(F=G(w,s),t[3]=w,t[4]=s,t[5]=F):F=t[5];let I=F,L;t[6]===D?L=t[7]:(L=x(`relative w-full`,D),t[6]=D,t[7]=L);let R;t[8]!==E||t[9]!==p?(R={touchAction:`none`,...p===void 0?{aspectRatio:E}:{height:p}},t[8]=E,t[9]=p,t[10]=R):R=t[10];let z;t[11]!==T||t[12]!==l||t[13]!==O||t[14]!==g||t[15]!==h||t[16]!==N||t[17]!==n||t[18]!==w||t[19]!==u||t[20]!==I||t[21]!==_||t[22]!==S||t[23]!==d||t[24]!==A||t[25]!==k||t[26]!==C||t[27]!==i||t[28]!==a?(z=/* @__PURE__ */ (0,X.jsx)(st,{debounceTime:10,children:e=>{let{width:t,height:r}=e;return/* @__PURE__ */ (0,X.jsx)(yt,{animationDuration:T,animationEasing:l,barGap:O,barSize:g,containerRef:P,data:n,enterTransition:u,height:r,density:w,margin:I,maxBarSize:_,onPhaseChange:S,revealSignature:d,stacked:k,stackGap:A,width:t,xDataKey:C,xScaleType:i,xTickFormat:a,clipPathId:N,children:h})}}),t[11]=T,t[12]=l,t[13]=O,t[14]=g,t[15]=h,t[16]=N,t[17]=n,t[18]=w,t[19]=u,t[20]=I,t[21]=_,t[22]=S,t[23]=d,t[24]=A,t[25]=k,t[26]=C,t[27]=i,t[28]=a,t[29]=z):z=t[29];let B;return t[30]!==L||t[31]!==R||t[32]!==z?(B=/* @__PURE__ */ (0,X.jsx)(`div`,{className:L,ref:P,style:R,children:z}),t[30]=L,t[31]=R,t[32]=z,t[33]=B):B=t[33],B}export{ot as Area,Ge as Background,a as BarLoadingSkeleton,pe as CHART_CLIP_PASSTHROUGH,ae as CHART_DENSITY,K as CHART_DENSITY_IDS,H as ChartConfigProvider,ne as ChartLegendHoverProvider,le as ChartLoadingLabel,u as ChartMarkers,L as ChartProvider,l as ChartRevealClip,Ze as ChartTooltip,bt as ComposedChart,T as DEFAULT_ANIMATION_DURATION_MS,C as DEFAULT_ANIMATION_EASING,V as DEFAULT_CHART_CONFIG,J as DEFAULT_CHART_DENSITY,w as DEFAULT_CHART_ENTER_TRANSITION,fe as DEFAULT_CHART_LIFECYCLE,ce as DEFAULT_CHART_STATUS,A as DEFAULT_Y_AXIS_ID,ue as DEFAULT_Y_DOMAIN_TWEEN_MS,Ke as DateTicker,O as Grid,lt as Line,v as LineLoadingSweep,ut as LineSeriesTerminalMarker,h as MarkerGroup,i as MarkerTooltipContent,We as PATTERN_PRESET_IDS,r as PatternArea,Ve as PatternCircles,Ue as PatternHexagons,Le as PatternLines,ze as PatternWaves,R as ProjectionLine,z as ProjectionLineEndMarker,Qe as ReferenceArea,Z as SeriesBar,ie as SeriesMarkers,f as SeriesPoint,re as SeriesPointMarker,g as SeriesTag,de as ShimmeringText,s as StaticChartPreviewProvider,$e as TooltipBox,et as TooltipContent,qe as TooltipDot,Ye as TooltipIndicator,Fe as XAxis,at as YAxis,rt as Y_AXIS_DEFAULT_TICK_COUNT,it as Y_AXIS_MAX_TICK_COUNT,nt as Y_AXIS_MIN_TICK_COUNT,ye as buildHorizontalTangentBezierPath,Ee as buildProjectionPath,N as chartCssVars,Te as clampHoverIndexToMaxTime,be as clampPixelXToProjectionHoverMax,ge as computeProjectionAnchorTangentSlope,je as computeYDomainsByAxis,F as defaultScatterColors,Ce as extractProjectionLineConfigs,d as generateChartSkeletonData,k as getPrimaryYScale,U as getSeriesMarkerVisualExtent,n as getSkeletonHeights,Je as indicatorFadeGradientStops,se as isChartInteractionPhase,Be as isCirclePattern,He as isCirclesPattern,ke as isLoadingChromePhase,Me as isYDomainTweenPhase,Pe as measureMaxLabelWidthPx,ve as mergeProjectionXDomainMax,me as mergeProjectionYDomain,De as mergeYDomainRecords,Ae as niceYDomain,Re as patternPresetTileSize,_e as projectionDateExtents,xe as projectionHoverMaxBySeries,we as projectionHoverMaxTime,he as projectionPinnedOverlayX,Se as projectionValueExtents,Ie as renderPatternPreset,G as resolveChartMargin,W as resolveDensityMaxLabels,q as resolveDensityTickCount,oe as resolveRestingChartPhase,ee as resolveTooltipBoxMotion,Xe as resolveVerticalFadeSides,Ne as resolveYAxisMarginPx,tt as resolveYAxisTickCount,Oe as shouldTweenYDomain,p as useActiveMarkers,_ as useAnimatedYDomains,M as useChart,B as useChartConfig,j as useChartHover,o as useChartInteraction,te as useChartLegendHover,P as useChartStable,m as useSeriesPoint,c as useStaticChartPreview,I as useYScale};
@@ -1 +1 @@
1
- import{a as e}from"../../../_chunks/rolldown-runtime-BWaJ3C7D.js";import{t}from"../../../_chunks/react-CUaU2Z9V.js";import{S as n,_ as r,a as i,b as a,c as o,d as s,f as c,g as l,i as u,m as d,n as f,o as p,p as m,r as h,s as g,t as _,u as v,x as y}from"../../../_chunks/series-tag-BaecVmtO.js";import{t as b}from"../../../_chunks/compiler-runtime-B3BlmaWz.js";import{t as x}from"../../../_chunks/jsx-runtime-Dgn0yPdi.js";import{t as S}from"../../../_chunks/dist-BNSTMZct.js";import{n as C,r as w,t as T}from"../../../_chunks/animation-D8IqP_32.js";import{c as E,f as D,s as O,t as k}from"../../../_chunks/time-series-chart-shell-CUug7kYf.js";import{t as A}from"../../../_chunks/grid-DmEGskok.js";import{i as j,t as M}from"../../../_chunks/y-axis-scales-Di1QS_P5.js";import{a as N,i as P,n as ee,o as F,r as I,s as L,t as te}from"../../../_chunks/chart-context-DEIvTsqh.js";import{n as R,t as z}from"../../../_chunks/projection-line-end-marker-QD35F55G.js";import{i as B,n as V,r as ne,t as H}from"../../../_chunks/chart-config-context-BpwYTVdv.js";import{n as U,t as W}from"../../../_chunks/chart-legend-hover-BJijcIfO.js";import{i as G,n as K,t as q}from"../../../_chunks/series-markers-PiCafGdw.js";import{a as J,i as re,n as Y,o as X,r as ie,t as Z}from"../../../_chunks/chart-density-B2pG6con.js";import{a as ae,i as oe,n as se,o as ce,r as le,s as ue,t as de}from"../../../_chunks/chart-phase-BaIoHaYw.js";import{t as fe}from"../../../_chunks/chart-child-passthrough-CU3_U3Y7.js";import{a as pe,c as me,d as he,f as ge,i as _e,l as ve,n as ye,o as be,p as xe,r as Se,s as Ce,t as we,u as Te}from"../../../_chunks/projection-config-BrjUSVSl.js";import{c as Ee,f as De,i as Oe,l as ke,r as Ae,s as je}from"../../../_chunks/y-domain-utils-DBuIZ5LP.js";import{a as Me,n as Ne,t as Pe}from"../../../_chunks/x-axis-zEBQ8DnV.js";import{a as Fe,c as Ie,i as Le,l as Re,n as ze,o as Be,r as Ve,s as He,t as Ue}from"../../../_chunks/pattern-preset-CyGrTxZq.js";import{t as We}from"../../../_chunks/background-BL4j0Aup.js";import{a as Ge,i as Ke,o as qe,r as Je,s as Ye,t as Xe}from"../../../_chunks/chart-tooltip-BN_Xx-ha.js";import{t as Ze}from"../../../_chunks/reference-area-C1I15Ptt.js";import{t as Qe}from"../../../_chunks/tooltip-box-DTNmTvby.js";import{t as $e}from"../../../_chunks/tooltip-content-CEeyDbtg.js";import{a as et,i as tt,n as nt,r as rt,t as it}from"../../../_chunks/y-axis-R9BDlIer.js";import{t as at}from"../../../_chunks/ParentSize-8O4qY4pg.js";import{n as ot,t as st}from"../../../_chunks/line-series-terminal-marker-CVY3yNDL.js";var ct=b(),Q=/* @__PURE__ */ e(t(),1),$=/* @__PURE__ */ e(x(),1);const lt=/* @__PURE__ */ new Set([`ProfitLossLine`,`LineSeriesTerminalMarker`,`SeriesPoint`,`SeriesTag`,`Area`,`SeriesBar`,`Scatter`,`Candlestick`,`Bar`,`PatternArea`]);function ut(e){let t=e.type;return typeof e.type==`function`&&(t.displayName||t.name)||``}function dt(e,t){if(!t?.dataKey)return!1;let n=ut(e);return n===`Line`||e.type===ot||!lt.has(n)&&typeof t.dataKey==`string`&&t.dataKey.length>0}function ft(e){let t=[],n=e=>{Q.Children.forEach(e,e=>{if(!(0,Q.isValidElement)(e))return;let r=e.props;if(dt(e,r)&&r?.dataKey){t.push({dataKey:r.dataKey,stroke:r.stroke||`var(--chart-line-primary)`,strokeWidth:r.strokeWidth||2.5,yAxisId:r.yAxisId});return}let i=e.props;i?.children&&n(i.children)})};return n(e),t}function pt(e){let t=(0,ct.c)(28),{width:n,height:r,data:i,xDataKey:a,xScaleType:o,xTickFormat:s,margin:c,density:l,animationDuration:u,animationEasing:d,enterTransition:f,revealSignature:p,chartStatus:m,loadingLabel:h,yDomainTweenDuration:g,yDomainTween:_,xDomain:v,xDomainSlotCount:y,tweenYDomainOnXDomainChange:b,children:x,containerRef:S,onPhaseChange:C,clipPathId:w,startFromZero:T}=e,E;t[0]===x?E=t[1]:(E=ft(x),t[0]=x,t[1]=E);let D=E,O;return t[2]!==u||t[3]!==d||t[4]!==m||t[5]!==x||t[6]!==w||t[7]!==S||t[8]!==i||t[9]!==l||t[10]!==f||t[11]!==r||t[12]!==D||t[13]!==h||t[14]!==c||t[15]!==C||t[16]!==p||t[17]!==T||t[18]!==b||t[19]!==n||t[20]!==a||t[21]!==v||t[22]!==y||t[23]!==o||t[24]!==s||t[25]!==_||t[26]!==g?(O=/* @__PURE__ */ (0,$.jsx)(k,{animationDuration:u,animationEasing:d,chartStatus:m,clipPathId:w,containerRef:S,data:i,enterTransition:f,height:r,lines:D,loadingLabel:h,density:l,margin:c,onPhaseChange:C,revealSignature:p,tweenYDomainOnXDomainChange:b,width:n,xDataKey:a,xDomain:v,xDomainSlotCount:y,xScaleType:o,xTickFormat:s,startFromZero:T,yDomainTween:_,yDomainTweenDuration:g,children:x}),t[2]=u,t[3]=d,t[4]=m,t[5]=x,t[6]=w,t[7]=S,t[8]=i,t[9]=l,t[10]=f,t[11]=r,t[12]=D,t[13]=h,t[14]=c,t[15]=C,t[16]=p,t[17]=T,t[18]=b,t[19]=n,t[20]=a,t[21]=v,t[22]=y,t[23]=o,t[24]=s,t[25]=_,t[26]=g,t[27]=O):O=t[27],O}function mt(e){let t=(0,ct.c)(54),{data:n,xDataKey:r,xScaleType:i,xTickFormat:a,density:o,margin:s,animationDuration:c,animationEasing:l,enterTransition:u,revealSignature:d,aspectRatio:f,className:p,status:m,loadingLabel:h,yDomainTweenDuration:g,yDomainTween:_,xDomain:v,xDomainSlotCount:y,tweenYDomainOnXDomainChange:b,startFromZero:x,style:C,onPhaseChange:w,children:T}=e,E=r===void 0?`date`:r,D=o===void 0?ie:o,O=c===void 0?1100:c,k=f===void 0?`2 / 1`:f,A=p===void 0?``:p,j=m===void 0?se:m,M=g===void 0?500:g,N=_===void 0||_,P=b!==void 0&&b,ee=x===void 0||x,F=(0,Q.useId)(),I;if(t[0]!==F){let e;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=/:/g,t[2]=e):e=t[2],I=F.replace(e,``),t[0]=F,t[1]=I}else I=t[1];let L=`chart-grow-clip-${I}`,te=(0,Q.useRef)(null),R;t[3]!==D||t[4]!==s?(R=re(D,s),t[3]=D,t[4]=s,t[5]=R):R=t[5];let z=R,B;t[6]===j?B=t[7]:(B=()=>ae(j),t[6]=j,t[7]=B);let[V,ne]=(0,Q.useState)(B),H;t[8]!==V||t[9]!==h?(H=h?.trim()&&(V===`loading`||V===`exiting`||V===`gridTweenReady`||V===`revealingLoading`),t[8]=V,t[9]=h,t[10]=H):H=t[10];let U=!!H,W;t[11]===A?W=t[12]:(W=S(`relative w-full overflow-visible`,A),t[11]=A,t[12]=W);let G;t[13]===k?G=t[14]:(G=k?{aspectRatio:k}:void 0,t[13]=k,t[14]=G);let K;t[15]!==C||t[16]!==G?(K={...G,touchAction:`none`,...C},t[15]=C,t[16]=G,t[17]=K):K=t[17];let q;t[18]===k?q=t[19]:(q=k?{width:`100%`,height:`100%`}:{position:`absolute`,inset:0,width:`100%`,height:`100%`},t[18]=k,t[19]=q);let J;t[20]!==O||t[21]!==l||t[22]!==T||t[23]!==L||t[24]!==n||t[25]!==D||t[26]!==u||t[27]!==h||t[28]!==z||t[29]!==w||t[30]!==d||t[31]!==ee||t[32]!==j||t[33]!==P||t[34]!==E||t[35]!==v||t[36]!==y||t[37]!==i||t[38]!==a||t[39]!==N||t[40]!==M?(J=e=>{let{width:t,height:r}=e;return/* @__PURE__ */ (0,$.jsx)(pt,{animationDuration:O,animationEasing:l,chartStatus:j,containerRef:te,data:n,enterTransition:u,height:r,loadingLabel:h,density:D,margin:z,onPhaseChange:e=>{ne(e),w?.(e)},revealSignature:d,tweenYDomainOnXDomainChange:P,width:t,xDataKey:E,xDomain:v,xDomainSlotCount:y,xScaleType:i,xTickFormat:a,yDomainTween:N,yDomainTweenDuration:M,clipPathId:L,startFromZero:ee,children:T})},t[20]=O,t[21]=l,t[22]=T,t[23]=L,t[24]=n,t[25]=D,t[26]=u,t[27]=h,t[28]=z,t[29]=w,t[30]=d,t[31]=ee,t[32]=j,t[33]=P,t[34]=E,t[35]=v,t[36]=y,t[37]=i,t[38]=a,t[39]=N,t[40]=M,t[41]=J):J=t[41];let Y;t[42]!==q||t[43]!==J?(Y=/* @__PURE__ */ (0,$.jsx)(at,{debounceTime:10,parentSizeStyles:q,children:J}),t[42]=q,t[43]=J,t[44]=Y):Y=t[44];let X;t[45]!==V||t[46]!==h||t[47]!==U?(X=U?/* @__PURE__ */ (0,$.jsx)(ce,{exiting:V!==`loading`,text:h}):null,t[45]=V,t[46]=h,t[47]=U,t[48]=X):X=t[48];let Z;return t[49]!==W||t[50]!==K||t[51]!==Y||t[52]!==X?(Z=/* @__PURE__ */ (0,$.jsxs)(`div`,{className:W,ref:te,style:K,children:[Y,X]}),t[49]=W,t[50]=K,t[51]=Y,t[52]=X,t[53]=Z):Z=t[53],Z}const ht=m;function gt(e){let t=(0,ct.c)(19),{margin:n,stroke:r,strokeOpacity:i,gridStroke:a,gridShimmerStroke:o,gridShimmer:s,gridShimmerLength:c,gridShimmerSpeed:l,gridShimmerSync:u,loadingStyle:f,label:p,aspectRatio:h,className:g}=e,_=r===void 0?`var(--chart-foreground)`:r,v=i===void 0?.5:i,y=a===void 0?`color-mix(in oklch, var(--chart-grid) 50%, transparent)`:a,b=o===void 0?`color-mix(in oklch, var(--chart-foreground) 68%, transparent)`:o,x=s===void 0||s,S=u!==void 0&&u,C=f===void 0?`pulse`:f,w=p===void 0?`Loading`:p,T=h===void 0?`2 / 1`:h,E=g===void 0?``:g,O;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(O=d({dataKey:m,pointCount:7}),t[0]=O):O=t[0];let k=O,j=C!==`sweep`&&x,M;t[1]!==c||t[2]!==l||t[3]!==b||t[4]!==S||t[5]!==y||t[6]!==j?(M=/* @__PURE__ */ (0,$.jsx)(A,{horizontal:!0,shimmer:j,shimmerLength:c,shimmerSpeed:l,shimmerStroke:b,shimmerSync:S,stroke:y}),t[1]=c,t[2]=l,t[3]=b,t[4]=S,t[5]=y,t[6]=j,t[7]=M):M=t[7];let N;t[8]!==C||t[9]!==_||t[10]!==v?(N=/* @__PURE__ */ (0,$.jsx)(ot,{curve:D,dataKey:ht,fadeEdges:!1,loadingStroke:_,loadingStrokeOpacity:v,loadingStyle:C,showHighlight:!1,stroke:`transparent`,strokeWidth:2.5}),t[8]=C,t[9]=_,t[10]=v,t[11]=N):N=t[11];let P;return t[12]!==T||t[13]!==E||t[14]!==w||t[15]!==n||t[16]!==M||t[17]!==N?(P=/* @__PURE__ */ (0,$.jsxs)(mt,{animationDuration:0,aspectRatio:T,className:E,data:k,loadingLabel:w,margin:n,status:`loading`,children:[M,N]}),t[12]=T,t[13]=E,t[14]=w,t[15]=n,t[16]=M,t[17]=N,t[18]=P):P=t[18],P}export{We as Background,a as BarLoadingSkeleton,fe as CHART_CLIP_PASSTHROUGH,Z as CHART_DENSITY,Y as CHART_DENSITY_IDS,H as ChartConfigProvider,W as ChartLegendHoverProvider,ce as ChartLoadingLabel,u as ChartMarkers,te as ChartProvider,l as ChartRevealClip,Xe as ChartTooltip,T as DEFAULT_ANIMATION_DURATION_MS,C as DEFAULT_ANIMATION_EASING,V as DEFAULT_CHART_CONFIG,ie as DEFAULT_CHART_DENSITY,w as DEFAULT_CHART_ENTER_TRANSITION,de as DEFAULT_CHART_LIFECYCLE,se as DEFAULT_CHART_STATUS,M as DEFAULT_Y_AXIS_ID,le as DEFAULT_Y_DOMAIN_TWEEN_MS,Ge as DateTicker,A as Grid,ot as Line,mt as LineChart,gt as LineChartLoading,O as LineLoadingPulseStroke,y as LineLoadingSweep,st as LineSeriesTerminalMarker,g as MarkerGroup,i as MarkerTooltipContent,Ue as PATTERN_PRESET_IDS,r as PatternArea,Be as PatternCircles,He as PatternHexagons,Ie as PatternLines,Re as PatternWaves,R as ProjectionLine,z as ProjectionLineEndMarker,Ze as ReferenceArea,q as SeriesMarkers,f as SeriesPoint,K as SeriesPointMarker,_ as SeriesTag,ue as ShimmeringText,s as StaticChartPreviewProvider,Qe as TooltipBox,$e as TooltipContent,Ke as TooltipDot,Je as TooltipIndicator,Pe as XAxis,it as YAxis,nt as Y_AXIS_DEFAULT_TICK_COUNT,rt as Y_AXIS_MAX_TICK_COUNT,tt as Y_AXIS_MIN_TICK_COUNT,ve as buildHorizontalTangentBezierPath,Te as buildProjectionPath,ee as chartCssVars,we as clampHoverIndexToMaxTime,ye as clampPixelXToProjectionHoverMax,he as computeProjectionAnchorTangentSlope,Ae as computeYDomainsByAxis,I as defaultScatterColors,Se as extractProjectionLineConfigs,d as generateChartSkeletonData,j as getPrimaryYScale,G as getSeriesMarkerVisualExtent,n as getSkeletonHeights,qe as indicatorFadeGradientStops,oe as isChartInteractionPhase,ze as isCirclePattern,Ve as isCirclesPattern,Oe as isLoadingChromePhase,je as isYDomainTweenPhase,Ne as measureMaxLabelWidthPx,_e as mergeProjectionXDomainMax,pe as mergeProjectionYDomain,Ee as mergeYDomainRecords,ke as niceYDomain,Le as patternPresetTileSize,ge as projectionDateExtents,be as projectionHoverMaxBySeries,Ce as projectionHoverMaxTime,me as projectionPinnedOverlayX,xe as projectionValueExtents,Fe as renderPatternPreset,re as resolveChartMargin,J as resolveDensityMaxLabels,X as resolveDensityTickCount,E as resolveLineLoadingPulseMode,ae as resolveRestingChartPhase,ne as resolveTooltipBoxMotion,Ye as resolveVerticalFadeSides,Me as resolveYAxisMarginPx,et as resolveYAxisTickCount,De as shouldTweenYDomain,p as useActiveMarkers,v as useAnimatedYDomains,P as useChart,B as useChartConfig,N as useChartHover,o as useChartInteraction,U as useChartLegendHover,F as useChartStable,h as useSeriesPoint,c as useStaticChartPreview,L as useYScale};
1
+ import{a as e}from"../../../_chunks/rolldown-runtime-BWaJ3C7D.js";import{t}from"../../../_chunks/react-CUaU2Z9V.js";import{S as n,_ as r,a as i,b as a,c as o,d as s,f as c,g as l,i as u,m as d,n as f,o as p,p as m,r as h,s as g,t as _,u as v,x as y}from"../../../_chunks/series-tag-BaecVmtO.js";import{t as b}from"../../../_chunks/compiler-runtime-B3BlmaWz.js";import{t as x}from"../../../_chunks/jsx-runtime-Dgn0yPdi.js";import{t as S}from"../../../_chunks/dist-BNSTMZct.js";import{n as C,r as w,t as T}from"../../../_chunks/animation-D8IqP_32.js";import{c as E,f as D,s as O,t as k}from"../../../_chunks/time-series-chart-shell-C7ciyZuR.js";import{t as A}from"../../../_chunks/grid-DmEGskok.js";import{i as j,t as M}from"../../../_chunks/y-axis-scales-Di1QS_P5.js";import{a as N,i as P,n as ee,o as F,r as I,s as L,t as te}from"../../../_chunks/chart-context-DEIvTsqh.js";import{n as R,t as z}from"../../../_chunks/projection-line-end-marker-QD35F55G.js";import{i as B,n as V,r as ne,t as H}from"../../../_chunks/chart-config-context-BpwYTVdv.js";import{n as U,t as W}from"../../../_chunks/chart-legend-hover-BJijcIfO.js";import{i as G,n as K,t as q}from"../../../_chunks/series-markers-PiCafGdw.js";import{a as J,i as re,n as Y,o as X,r as ie,t as Z}from"../../../_chunks/chart-density-B2pG6con.js";import{a as ae,i as oe,n as se,o as ce,r as le,s as ue,t as de}from"../../../_chunks/chart-phase-BaIoHaYw.js";import{t as fe}from"../../../_chunks/chart-child-passthrough-CU3_U3Y7.js";import{a as pe,c as me,d as he,f as ge,i as _e,l as ve,n as ye,o as be,p as xe,r as Se,s as Ce,t as we,u as Te}from"../../../_chunks/projection-config-BrjUSVSl.js";import{c as Ee,f as De,i as Oe,l as ke,r as Ae,s as je}from"../../../_chunks/y-domain-utils-DBuIZ5LP.js";import{a as Me,n as Ne,t as Pe}from"../../../_chunks/x-axis-zEBQ8DnV.js";import{a as Fe,c as Ie,i as Le,l as Re,n as ze,o as Be,r as Ve,s as He,t as Ue}from"../../../_chunks/pattern-preset-CyGrTxZq.js";import{t as We}from"../../../_chunks/background-BL4j0Aup.js";import{a as Ge,i as Ke,o as qe,r as Je,s as Ye,t as Xe}from"../../../_chunks/chart-tooltip-BN_Xx-ha.js";import{t as Ze}from"../../../_chunks/reference-area-C1I15Ptt.js";import{t as Qe}from"../../../_chunks/tooltip-box-DTNmTvby.js";import{t as $e}from"../../../_chunks/tooltip-content-CEeyDbtg.js";import{a as et,i as tt,n as nt,r as rt,t as it}from"../../../_chunks/y-axis-R9BDlIer.js";import{t as at}from"../../../_chunks/ParentSize-8O4qY4pg.js";import{n as ot,t as st}from"../../../_chunks/line-series-terminal-marker-DTRYvJBq.js";var ct=b(),Q=/* @__PURE__ */ e(t(),1),$=/* @__PURE__ */ e(x(),1);const lt=/* @__PURE__ */ new Set([`ProfitLossLine`,`LineSeriesTerminalMarker`,`SeriesPoint`,`SeriesTag`,`Area`,`SeriesBar`,`Scatter`,`Candlestick`,`Bar`,`PatternArea`]);function ut(e){let t=e.type;return typeof e.type==`function`&&(t.displayName||t.name)||``}function dt(e,t){if(!t?.dataKey)return!1;let n=ut(e);return n===`Line`||e.type===ot||!lt.has(n)&&typeof t.dataKey==`string`&&t.dataKey.length>0}function ft(e){let t=[],n=e=>{Q.Children.forEach(e,e=>{if(!(0,Q.isValidElement)(e))return;let r=e.props;if(dt(e,r)&&r?.dataKey){t.push({dataKey:r.dataKey,stroke:r.stroke||`var(--chart-line-primary)`,strokeWidth:r.strokeWidth||2.5,yAxisId:r.yAxisId});return}let i=e.props;i?.children&&n(i.children)})};return n(e),t}function pt(e){let t=(0,ct.c)(28),{width:n,height:r,data:i,xDataKey:a,xScaleType:o,xTickFormat:s,margin:c,density:l,animationDuration:u,animationEasing:d,enterTransition:f,revealSignature:p,chartStatus:m,loadingLabel:h,yDomainTweenDuration:g,yDomainTween:_,xDomain:v,xDomainSlotCount:y,tweenYDomainOnXDomainChange:b,children:x,containerRef:S,onPhaseChange:C,clipPathId:w,startFromZero:T}=e,E;t[0]===x?E=t[1]:(E=ft(x),t[0]=x,t[1]=E);let D=E,O;return t[2]!==u||t[3]!==d||t[4]!==m||t[5]!==x||t[6]!==w||t[7]!==S||t[8]!==i||t[9]!==l||t[10]!==f||t[11]!==r||t[12]!==D||t[13]!==h||t[14]!==c||t[15]!==C||t[16]!==p||t[17]!==T||t[18]!==b||t[19]!==n||t[20]!==a||t[21]!==v||t[22]!==y||t[23]!==o||t[24]!==s||t[25]!==_||t[26]!==g?(O=/* @__PURE__ */ (0,$.jsx)(k,{animationDuration:u,animationEasing:d,chartStatus:m,clipPathId:w,containerRef:S,data:i,enterTransition:f,height:r,lines:D,loadingLabel:h,density:l,margin:c,onPhaseChange:C,revealSignature:p,tweenYDomainOnXDomainChange:b,width:n,xDataKey:a,xDomain:v,xDomainSlotCount:y,xScaleType:o,xTickFormat:s,startFromZero:T,yDomainTween:_,yDomainTweenDuration:g,children:x}),t[2]=u,t[3]=d,t[4]=m,t[5]=x,t[6]=w,t[7]=S,t[8]=i,t[9]=l,t[10]=f,t[11]=r,t[12]=D,t[13]=h,t[14]=c,t[15]=C,t[16]=p,t[17]=T,t[18]=b,t[19]=n,t[20]=a,t[21]=v,t[22]=y,t[23]=o,t[24]=s,t[25]=_,t[26]=g,t[27]=O):O=t[27],O}function mt(e){let t=(0,ct.c)(54),{data:n,xDataKey:r,xScaleType:i,xTickFormat:a,density:o,margin:s,animationDuration:c,animationEasing:l,enterTransition:u,revealSignature:d,aspectRatio:f,className:p,status:m,loadingLabel:h,yDomainTweenDuration:g,yDomainTween:_,xDomain:v,xDomainSlotCount:y,tweenYDomainOnXDomainChange:b,startFromZero:x,style:C,onPhaseChange:w,children:T}=e,E=r===void 0?`date`:r,D=o===void 0?ie:o,O=c===void 0?1100:c,k=f===void 0?`2 / 1`:f,A=p===void 0?``:p,j=m===void 0?se:m,M=g===void 0?500:g,N=_===void 0||_,P=b!==void 0&&b,ee=x===void 0||x,F=(0,Q.useId)(),I;if(t[0]!==F){let e;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=/:/g,t[2]=e):e=t[2],I=F.replace(e,``),t[0]=F,t[1]=I}else I=t[1];let L=`chart-grow-clip-${I}`,te=(0,Q.useRef)(null),R;t[3]!==D||t[4]!==s?(R=re(D,s),t[3]=D,t[4]=s,t[5]=R):R=t[5];let z=R,B;t[6]===j?B=t[7]:(B=()=>ae(j),t[6]=j,t[7]=B);let[V,ne]=(0,Q.useState)(B),H;t[8]!==V||t[9]!==h?(H=h?.trim()&&(V===`loading`||V===`exiting`||V===`gridTweenReady`||V===`revealingLoading`),t[8]=V,t[9]=h,t[10]=H):H=t[10];let U=!!H,W;t[11]===A?W=t[12]:(W=S(`relative w-full overflow-visible`,A),t[11]=A,t[12]=W);let G;t[13]===k?G=t[14]:(G=k?{aspectRatio:k}:void 0,t[13]=k,t[14]=G);let K;t[15]!==C||t[16]!==G?(K={...G,touchAction:`none`,...C},t[15]=C,t[16]=G,t[17]=K):K=t[17];let q;t[18]===k?q=t[19]:(q=k?{width:`100%`,height:`100%`}:{position:`absolute`,inset:0,width:`100%`,height:`100%`},t[18]=k,t[19]=q);let J;t[20]!==O||t[21]!==l||t[22]!==T||t[23]!==L||t[24]!==n||t[25]!==D||t[26]!==u||t[27]!==h||t[28]!==z||t[29]!==w||t[30]!==d||t[31]!==ee||t[32]!==j||t[33]!==P||t[34]!==E||t[35]!==v||t[36]!==y||t[37]!==i||t[38]!==a||t[39]!==N||t[40]!==M?(J=e=>{let{width:t,height:r}=e;return/* @__PURE__ */ (0,$.jsx)(pt,{animationDuration:O,animationEasing:l,chartStatus:j,containerRef:te,data:n,enterTransition:u,height:r,loadingLabel:h,density:D,margin:z,onPhaseChange:e=>{ne(e),w?.(e)},revealSignature:d,tweenYDomainOnXDomainChange:P,width:t,xDataKey:E,xDomain:v,xDomainSlotCount:y,xScaleType:i,xTickFormat:a,yDomainTween:N,yDomainTweenDuration:M,clipPathId:L,startFromZero:ee,children:T})},t[20]=O,t[21]=l,t[22]=T,t[23]=L,t[24]=n,t[25]=D,t[26]=u,t[27]=h,t[28]=z,t[29]=w,t[30]=d,t[31]=ee,t[32]=j,t[33]=P,t[34]=E,t[35]=v,t[36]=y,t[37]=i,t[38]=a,t[39]=N,t[40]=M,t[41]=J):J=t[41];let Y;t[42]!==q||t[43]!==J?(Y=/* @__PURE__ */ (0,$.jsx)(at,{debounceTime:10,parentSizeStyles:q,children:J}),t[42]=q,t[43]=J,t[44]=Y):Y=t[44];let X;t[45]!==V||t[46]!==h||t[47]!==U?(X=U?/* @__PURE__ */ (0,$.jsx)(ce,{exiting:V!==`loading`,text:h}):null,t[45]=V,t[46]=h,t[47]=U,t[48]=X):X=t[48];let Z;return t[49]!==W||t[50]!==K||t[51]!==Y||t[52]!==X?(Z=/* @__PURE__ */ (0,$.jsxs)(`div`,{className:W,ref:te,style:K,children:[Y,X]}),t[49]=W,t[50]=K,t[51]=Y,t[52]=X,t[53]=Z):Z=t[53],Z}const ht=m;function gt(e){let t=(0,ct.c)(19),{margin:n,stroke:r,strokeOpacity:i,gridStroke:a,gridShimmerStroke:o,gridShimmer:s,gridShimmerLength:c,gridShimmerSpeed:l,gridShimmerSync:u,loadingStyle:f,label:p,aspectRatio:h,className:g}=e,_=r===void 0?`var(--chart-foreground)`:r,v=i===void 0?.5:i,y=a===void 0?`color-mix(in oklch, var(--chart-grid) 50%, transparent)`:a,b=o===void 0?`color-mix(in oklch, var(--chart-foreground) 68%, transparent)`:o,x=s===void 0||s,S=u!==void 0&&u,C=f===void 0?`pulse`:f,w=p===void 0?`Loading`:p,T=h===void 0?`2 / 1`:h,E=g===void 0?``:g,O;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(O=d({dataKey:m,pointCount:7}),t[0]=O):O=t[0];let k=O,j=C!==`sweep`&&x,M;t[1]!==c||t[2]!==l||t[3]!==b||t[4]!==S||t[5]!==y||t[6]!==j?(M=/* @__PURE__ */ (0,$.jsx)(A,{horizontal:!0,shimmer:j,shimmerLength:c,shimmerSpeed:l,shimmerStroke:b,shimmerSync:S,stroke:y}),t[1]=c,t[2]=l,t[3]=b,t[4]=S,t[5]=y,t[6]=j,t[7]=M):M=t[7];let N;t[8]!==C||t[9]!==_||t[10]!==v?(N=/* @__PURE__ */ (0,$.jsx)(ot,{curve:D,dataKey:ht,fadeEdges:!1,loadingStroke:_,loadingStrokeOpacity:v,loadingStyle:C,showHighlight:!1,stroke:`transparent`,strokeWidth:2.5}),t[8]=C,t[9]=_,t[10]=v,t[11]=N):N=t[11];let P;return t[12]!==T||t[13]!==E||t[14]!==w||t[15]!==n||t[16]!==M||t[17]!==N?(P=/* @__PURE__ */ (0,$.jsxs)(mt,{animationDuration:0,aspectRatio:T,className:E,data:k,loadingLabel:w,margin:n,status:`loading`,children:[M,N]}),t[12]=T,t[13]=E,t[14]=w,t[15]=n,t[16]=M,t[17]=N,t[18]=P):P=t[18],P}export{We as Background,a as BarLoadingSkeleton,fe as CHART_CLIP_PASSTHROUGH,Z as CHART_DENSITY,Y as CHART_DENSITY_IDS,H as ChartConfigProvider,W as ChartLegendHoverProvider,ce as ChartLoadingLabel,u as ChartMarkers,te as ChartProvider,l as ChartRevealClip,Xe as ChartTooltip,T as DEFAULT_ANIMATION_DURATION_MS,C as DEFAULT_ANIMATION_EASING,V as DEFAULT_CHART_CONFIG,ie as DEFAULT_CHART_DENSITY,w as DEFAULT_CHART_ENTER_TRANSITION,de as DEFAULT_CHART_LIFECYCLE,se as DEFAULT_CHART_STATUS,M as DEFAULT_Y_AXIS_ID,le as DEFAULT_Y_DOMAIN_TWEEN_MS,Ge as DateTicker,A as Grid,ot as Line,mt as LineChart,gt as LineChartLoading,O as LineLoadingPulseStroke,y as LineLoadingSweep,st as LineSeriesTerminalMarker,g as MarkerGroup,i as MarkerTooltipContent,Ue as PATTERN_PRESET_IDS,r as PatternArea,Be as PatternCircles,He as PatternHexagons,Ie as PatternLines,Re as PatternWaves,R as ProjectionLine,z as ProjectionLineEndMarker,Ze as ReferenceArea,q as SeriesMarkers,f as SeriesPoint,K as SeriesPointMarker,_ as SeriesTag,ue as ShimmeringText,s as StaticChartPreviewProvider,Qe as TooltipBox,$e as TooltipContent,Ke as TooltipDot,Je as TooltipIndicator,Pe as XAxis,it as YAxis,nt as Y_AXIS_DEFAULT_TICK_COUNT,rt as Y_AXIS_MAX_TICK_COUNT,tt as Y_AXIS_MIN_TICK_COUNT,ve as buildHorizontalTangentBezierPath,Te as buildProjectionPath,ee as chartCssVars,we as clampHoverIndexToMaxTime,ye as clampPixelXToProjectionHoverMax,he as computeProjectionAnchorTangentSlope,Ae as computeYDomainsByAxis,I as defaultScatterColors,Se as extractProjectionLineConfigs,d as generateChartSkeletonData,j as getPrimaryYScale,G as getSeriesMarkerVisualExtent,n as getSkeletonHeights,qe as indicatorFadeGradientStops,oe as isChartInteractionPhase,ze as isCirclePattern,Ve as isCirclesPattern,Oe as isLoadingChromePhase,je as isYDomainTweenPhase,Ne as measureMaxLabelWidthPx,_e as mergeProjectionXDomainMax,pe as mergeProjectionYDomain,Ee as mergeYDomainRecords,ke as niceYDomain,Le as patternPresetTileSize,ge as projectionDateExtents,be as projectionHoverMaxBySeries,Ce as projectionHoverMaxTime,me as projectionPinnedOverlayX,xe as projectionValueExtents,Fe as renderPatternPreset,re as resolveChartMargin,J as resolveDensityMaxLabels,X as resolveDensityTickCount,E as resolveLineLoadingPulseMode,ae as resolveRestingChartPhase,ne as resolveTooltipBoxMotion,Ye as resolveVerticalFadeSides,Me as resolveYAxisMarginPx,et as resolveYAxisTickCount,De as shouldTweenYDomain,p as useActiveMarkers,v as useAnimatedYDomains,P as useChart,B as useChartConfig,N as useChartHover,o as useChartInteraction,U as useChartLegendHover,F as useChartStable,h as useSeriesPoint,c as useStaticChartPreview,L as useYScale};
@@ -1 +1 @@
1
- import{a as e}from"../../_chunks/rolldown-runtime-BWaJ3C7D.js";import{t}from"../../_chunks/react-CUaU2Z9V.js";import{t as n}from"../../_chunks/ArrowRightIcon-OEjQROCT.js";import{t as r}from"../../_chunks/compiler-runtime-B3BlmaWz.js";import{t as i}from"../../_chunks/jsx-runtime-Dgn0yPdi.js";import{t as a}from"../../_chunks/dist-BNSTMZct.js";import{a as o,n as s,r as c}from"../../_chunks/Tooltip-CZ9gmT5S.js";import{n as l}from"../../_chunks/react-B3hSlcN2.js";import{t as u}from"../../_chunks/AnimatePresence-B0AmNCpD.js";import{t as d}from"../../_chunks/use-reduced-motion-CNBdBisf.js";import{t as f}from"../../_chunks/use-animation-Dx5JiH_u.js";import{t as p}from"../../_chunks/Button-Dpj5VLQ7.js";import{i as m}from"../../_chunks/dist-BRMXKypj.js";import{n as h,s as g}from"../../_chunks/dist-CPlSvWC_.js";import{t as _}from"../../_chunks/ScrollGradientWrapper-h6yq23DQ.js";import{t as v}from"../../_chunks/TextareaControl-CIEYB2jp.js";import{t as y}from"../../_chunks/StopFillIcon-BHTuKSSq.js";import{t as b}from"../../_chunks/useToggle-CfFQsrI9.js";import{t as x}from"../../_chunks/PaperclipIcon-B8vj2DdY.js";import{t as S}from"../../_chunks/MicrophoneIcon-BuLtN1VU.js";import{n as C,t as w}from"../../_chunks/PromptHint-whUPjpVy.js";import{t as T}from"../../_chunks/LogoPI-DZ2zSwSS.js";import{t as E}from"../../_chunks/ArrowUpRightIcon-BQhMqKWo.js";var ee=r(),D=/* @__PURE__ */ e(i(),1);function O(e){let t=(0,ee.c)(10),{suggestions:n,onSuggestionClick:r,qaTestId:i}=e,o=i===void 0?`prompt-suggestions`:i;if(n.length===0)return null;let s;if(t[0]!==r||t[1]!==n){let e;t[3]===r?e=t[4]:(e=(e,t)=>/* @__PURE__ */ (0,D.jsx)(p,{variant:`weak`,prefix:{icon:E,color:`icon-soft`,animationDirection:`up-right`,className:`text-text-soft`},animateIcon:!0,motionProps:{whileTap:{scale:.95,boxShadow:`none`}},onClick:()=>{r?.(e),e.onClick?.()},className:a(`inline-flex shrink-0 items-center justify-start gap-0.5 rounded-xl bg-base-weak p-2.5 text-left`,`outline-1 -outline-offset-1 outline-depth-black-4 outline-solid`,`hover:bg-depth-black-4 hover:text-text-sub`),children:/* @__PURE__ */ (0,D.jsx)(`span`,{className:`pui-text-mono-small text-text-soft`,children:e.display})},t),t[3]=r,t[4]=e),s=n.map(e),t[0]=r,t[1]=n,t[2]=s}else s=t[2];let c;t[5]===s?c=t[6]:(c=/* @__PURE__ */ (0,D.jsx)(_,{className:`w-full`,scrollClassName:`gap-2`,children:s}),t[5]=s,t[6]=c);let l;return t[7]!==o||t[8]!==c?(l=/* @__PURE__ */ (0,D.jsx)(`div`,{className:`flex w-full flex-col items-start`,"qa-test-id":o,children:c}),t[7]=o,t[8]=c,t[9]=l):l=t[9],l}function te(e){let t=(0,ee.c)(25),{onAttach:r,onMicrophone:i,onStop:o,isStreaming:s,isSubmitLoading:c,isSubmitDisabled:l,className:u,qaTestId:d}=e,f=s!==void 0&&s,h=c!==void 0&&c,g=l===void 0||l,_=d===void 0?`toolbar`:d,{_:v}=m(),b;t[0]===u?b=t[1]:(b=a(`relative flex w-full shrink-0 items-center gap-3`,u),t[0]=u,t[1]=b);let C;t[2]!==v||t[3]!==r?(C=r&&/* @__PURE__ */ (0,D.jsx)(p,{type:`button`,onClick:r,"aria-label":v({id:`x9ecE4`}),variant:`weak`,size:`medium`,prefix:{icon:x}}),t[2]=v,t[3]=r,t[4]=C):C=t[4];let w;t[5]===C?w=t[6]:(w=/* @__PURE__ */ (0,D.jsx)(`div`,{className:`relative flex min-h-px min-w-px flex-1 shrink-0 items-center gap-2 rounded-xl lowercase`,children:C}),t[5]=C,t[6]=w);let T;t[7]!==v||t[8]!==f||t[9]!==i?(T=i&&!f&&/* @__PURE__ */ (0,D.jsx)(p,{type:`button`,onClick:i,"aria-label":v({id:`gPuz_0`}),variant:`weak`,size:`medium`,prefix:{icon:S}}),t[7]=v,t[8]=f,t[9]=i,t[10]=T):T=t[10];let E;t[11]!==v||t[12]!==f||t[13]!==g||t[14]!==h||t[15]!==o?(E=f&&o?/* @__PURE__ */ (0,D.jsx)(p,{type:`button`,onClick:e=>{e.preventDefault(),e.stopPropagation(),o()},"aria-label":v({id:`ygCKqB`}),variant:`strong`,size:`medium`,prefix:{icon:y}}):/* @__PURE__ */ (0,D.jsx)(p,{type:`submit`,"aria-label":v({id:`JlFcis`}),variant:`strong`,size:`medium`,suffix:{icon:n},disabled:g||h,isLoading:h}),t[11]=v,t[12]=f,t[13]=g,t[14]=h,t[15]=o,t[16]=E):E=t[16];let O;t[17]!==T||t[18]!==E?(O=/* @__PURE__ */ (0,D.jsxs)(`div`,{className:`relative flex shrink-0 items-center gap-2 rounded-xl`,children:[T,E]}),t[17]=T,t[18]=E,t[19]=O):O=t[19];let te;return t[20]!==_||t[21]!==O||t[22]!==b||t[23]!==w?(te=/* @__PURE__ */ (0,D.jsxs)(`div`,{className:b,"qa-test-id":_,children:[w,O]}),t[20]=_,t[21]=O,t[22]=b,t[23]=w,t[24]=te):te=t[24],te}function k(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}const A={"text/plain":`TXT`,"text/markdown":`MD`,"text/html":`HTML`,"text/css":`CSS`,"text/csv":`CSV`,"text/xml":`XML`,"application/xml":`XML`,"application/pdf":`PDF`,"application/json":`JSON`,"application/zip":`ZIP`,"application/msword":`DOC`,"application/vnd.openxmlformats-officedocument.wordprocessingml.document":`DOCX`,"application/vnd.ms-excel":`XLS`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":`XLSX`,"application/vnd.ms-powerpoint":`PPT`,"application/vnd.openxmlformats-officedocument.presentationml.presentation":`PPTX`};function j(e,t){let n=e.lastIndexOf(`.`);return(n===-1?``:e.slice(n+1).toUpperCase())||A[t]||t.split(`/`).pop()?.toUpperCase()||`FILE`}function M(e,t){let n=e instanceof File,r=n?e.name:e.filename,i=n?e.type:e.mediaType,a=n?URL.createObjectURL(e):e.url,o=n?e:void 0,s=n?e.size:void 0,c=n?`${r}-${s}-${Date.now()}-${Math.random().toString(36).slice(2)}`:t===void 0?`url-${r}-${Date.now()}`:`backend-${t}-${r}`;if(i.startsWith(`image/`))return{id:c,type:`image`,imageSrc:a,file:o};let l=j(r,i);return{id:c,type:`file`,fileName:r,fileMetadata:s===void 0?l:`${l} • ${k(s)}`,file:o}}function ne(e,t){let n=e.getData(`text/plain`);return!n.trim()||!t.every(e=>e.type.startsWith(`image/`))?!1:n.includes(` `)}function N(e){e.type===`image`&&URL.revokeObjectURL(e.imageSrc)}var P=/* @__PURE__ */ e(t(),1);function F(e=[]){let[t,n]=(0,P.useState)(e);return{attachments:t,setAttachments:n,handleFilesSelected:e=>{let t=[];for(let n of e){let e=M(n);e&&t.push(e)}n(e=>[...e,...t])},handleRemoveAttachment:e=>{n(t=>{let n=t.find(t=>t.id===e);return n&&N(n),t.filter(t=>t.id!==e)})},clearAttachments:()=>{n(e=>(e.forEach(N),[]))}}}function re(e){let t=(0,ee.c)(24),{attachments:n,types:r,onRemove:i,layout:a}=e,o;t[0]===r?o=t[1]:(o=Array.isArray(r)?r:[r],t[0]=r,t[1]=o);let s=o,c,l,d,f,p,m;if(t[2]!==n||t[3]!==a||t[4]!==i||t[5]!==s){m=Symbol.for(`react.early_return_sentinel`);bb0:{let e;t[12]===s?e=t[13]:(e=e=>s.includes(e.type),t[12]=s,t[13]=e);let r=n.filter(e);if(r.length===0){m=null;break bb0}let o=r.toSorted(I);if(a===`vertical`){m=/* @__PURE__ */ (0,D.jsx)(`div`,{className:`flex w-full flex-col gap-2`,children:/* @__PURE__ */ (0,D.jsx)(u,{mode:`popLayout`,children:o.map(e=>/* @__PURE__ */ (0,D.jsx)(C,{...e,isSingleItem:o.length===1,onRemove:i?()=>i(e.id):void 0},e.id))})});break bb0}p=`w-full [scrollbar-width:none] overflow-x-auto [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden`,f=`inline-flex gap-2`,c=u,l=`popLayout`,d=o.map(e=>/* @__PURE__ */ (0,D.jsx)(C,{...e,isSingleItem:o.length===1,onRemove:i?()=>i(e.id):void 0},e.id))}t[2]=n,t[3]=a,t[4]=i,t[5]=s,t[6]=c,t[7]=l,t[8]=d,t[9]=f,t[10]=p,t[11]=m}else c=t[6],l=t[7],d=t[8],f=t[9],p=t[10],m=t[11];if(m!==Symbol.for(`react.early_return_sentinel`))return m;let h;t[14]!==c||t[15]!==l||t[16]!==d?(h=/* @__PURE__ */ (0,D.jsx)(c,{mode:l,children:d}),t[14]=c,t[15]=l,t[16]=d,t[17]=h):h=t[17];let g;t[18]!==f||t[19]!==h?(g=/* @__PURE__ */ (0,D.jsx)(`div`,{className:f,children:h}),t[18]=f,t[19]=h,t[20]=g):g=t[20];let _;return t[21]!==p||t[22]!==g?(_=/* @__PURE__ */ (0,D.jsx)(`div`,{className:p,children:g}),t[21]=p,t[22]=g,t[23]=_):_=t[23],_}function I(e,t){return(e.status===`error`||e.status===`unsupported`?0:1)-(t.status===`error`||t.status===`unsupported`?0:1)}function L(e){let t=(0,ee.c)(206),n,r,i,u,p,_,y,x,S,C,E,k,A,j,M,N,F,I,L,ce,R,le,ue,de,fe,pe,me,he,ge,_e,ve,z;t[0]===e?(n=t[1],r=t[2],i=t[3],u=t[4],p=t[5],_=t[6],y=t[7],x=t[8],S=t[9],C=t[10],E=t[11],k=t[12],A=t[13],j=t[14],M=t[15],N=t[16],F=t[17],I=t[18],L=t[19],ce=t[20],R=t[21],le=t[22],ue=t[23],de=t[24],fe=t[25],pe=t[26],me=t[27],he=t[28],ge=t[29],_e=t[30],ve=t[31],z=t[32]):({className:r,attachments:I,placeholder:N,onFilesSelected:x,accept:n,onSubmit:M,blockSubmit:de,shakeOnBlock:fe,onBlockedSubmit:y,onMicrophone:E,onRemoveAttachment:k,onStop:j,onSteer:A,isStreaming:pe,isSubmitLoading:me,allowEmptySubmit:he,autoFocus:ge,defaultValue:i,showScrollShadow:_e,showLogo:ve,hasShadow:L,showSuggestions:ce,suggestions:R,hint:p,onInputChange:S,onKeyDown:C,inputOverlay:_,textareaClassName:z,insertPastedTextDirectly:le,ref:u,qaTestId:ue,...F}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=u,t[5]=p,t[6]=_,t[7]=y,t[8]=x,t[9]=S,t[10]=C,t[11]=E,t[12]=k,t[13]=A,t[14]=j,t[15]=M,t[16]=N,t[17]=F,t[18]=I,t[19]=L,t[20]=ce,t[21]=R,t[22]=le,t[23]=ue,t[24]=de,t[25]=fe,t[26]=pe,t[27]=me,t[28]=he,t[29]=ge,t[30]=_e,t[31]=ve,t[32]=z);let ye;t[33]===I?ye=t[34]:(ye=I===void 0?[]:I,t[33]=I,t[34]=ye);let B=ye,be=de!==void 0&&de,xe=fe===void 0||fe,V=pe!==void 0&&pe,H=me!==void 0&&me,Se=he!==void 0&&he,Ce=ge===void 0||ge,we=_e!==void 0&&_e,Te=ve===void 0||ve,Ee=L!==void 0&&L,De=ce!==void 0&&ce,Oe;t[35]===R?Oe=t[36]:(Oe=R===void 0?[]:R,t[35]=R,t[36]=Oe);let ke=Oe,Ae=le!==void 0&&le,je=ue===void 0?`prompt`:ue,{_:U}=m(),[W,Me]=(0,P.useState)(i??``),[Ne,Pe]=(0,P.useState)(!1),[Fe,Ie]=(0,P.useState)(!1),[Le,Re]=(0,P.useState)(!1),[ze,Be]=(0,P.useState)(!1),Ve=(0,P.useRef)(null),He=(0,P.useRef)(null),Ue=(0,P.useRef)(null),We=(0,P.useRef)(null),G=f(),Ge=d(),Ke;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(Ke={defaultValue:!1,initializeWithValue:!1},t[37]=Ke):Ke=t[37];let qe=g(`(pointer: coarse)`,Ke),Je=b(`prefer_text_over_image_on_paste`),Ye;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(Ye=()=>{let e=He.current;if(e?.isConnected)return e;let t=Ve.current?.querySelector(`textarea`)??null;return He.current=t,t},t[38]=Ye):Ye=t[38];let Xe=Ye,Ze;t[39]===S?Ze=t[40]:(Ze=(e,t)=>{Me(e),S?.(e,t)},t[39]=S,t[40]=Ze);let K=Ze,Qe;t[41]!==G||t[42]!==Ge?(Qe=()=>{Ge?G.set({x:0}):G.start({x:[0,-8,8,-6,6,-4,4,0],transition:{duration:.35,ease:[.32,.72,0,1]}})},t[41]=G,t[42]=Ge,t[43]=Qe):Qe=t[43];let q=Qe,$e;t[44]!==q||t[45]!==K?($e=()=>({focus:()=>Xe()?.focus(),setInputValue:e=>{K(e)},setSelectionRange:(e,t)=>{let n=t===void 0?e:t,r=Xe();r&&(r.focus({preventScroll:!0}),r.setSelectionRange(e,n))},shake:q}),t[44]=q,t[45]=K,t[46]=$e):$e=t[46],(0,P.useImperativeHandle)(u,$e);let et,tt;t[47]===Ce?(et=t[48],tt=t[49]):(et=()=>{Ce&&Xe()?.focus({preventScroll:!0})},tt=[Ce],t[47]=Ce,t[48]=et,t[49]=tt),(0,P.useEffect)(et,tt);let nt;t[50]===_?nt=t[51]:(nt=()=>{let e=Ue.current;if(!_||!e)return;let t=Xe();t&&(e.style.transform=`translate(${-t.scrollLeft}px, ${-t.scrollTop}px)`)},t[50]=_,t[51]=nt);let rt;t[52]!==_||t[53]!==W?(rt=[_,W],t[52]=_,t[53]=W,t[54]=rt):rt=t[54],(0,P.useEffect)(nt,rt);let it,at;t[55]===_?(it=t[56],at=t[57]):(it=()=>{if(!_){let e=Ue.current;e&&(e.style.transform=``)}},at=[_],t[55]=_,t[56]=it,t[57]=at),(0,P.useEffect)(it,at);let ot;t[58]===_?ot=t[59]:(ot=e=>{if(!_)return;let t=Ue.current,n=He.current;t&&n&&e.target===n&&(t.style.transform=`translate(${-n.scrollLeft}px, ${-n.scrollTop}px)`)},t[58]=_,t[59]=ot);let st;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(st={passive:!0,capture:!0},t[60]=st):st=t[60],h(`scroll`,ot,Ve,st);let ct;t[61]!==B.length||t[62]!==W?(ct=W.trim().length>0||B.length>0,t[61]=B.length,t[62]=W,t[63]=ct):ct=t[63];let lt=ct,ut=B.length>0,dt;t[64]===B?dt=t[65]:(dt=B.some(se),t[64]=B,t[65]=dt);let J=!Se&&!lt||dt,ft,pt;t[66]===J?(ft=t[67],pt=t[68]):(ft=()=>{J||Be(!1)},pt=[J],t[66]=J,t[67]=ft,t[68]=pt),(0,P.useEffect)(ft,pt);let Y;bb0:{if(!lt){let e;t[69]===U?e=t[70]:(e=U({id:`E-2Of8`}),t[69]=U,t[70]=e),Y=e;break bb0}if(B.some(oe)){let e;t[71]===U?e=t[72]:(e=U({id:`_D6eRO`}),t[71]=U,t[72]=e),Y=e;break bb0}if(B.some(ae)){let e;t[73]===U?e=t[74]:(e=U({id:`CJndez`}),t[73]=U,t[74]=e),Y=e;break bb0}if(B.some(ie)){let e;t[75]===U?e=t[76]:(e=U({id:`MH3bVF`}),t[75]=U,t[76]=e),Y=e;break bb0}let e;t[77]===U?e=t[78]:(e=U({id:`E-2Of8`}),t[77]=U,t[78]=e),Y=e}let mt=Y,X=p!==void 0&&p!==!1&&!Le&&(typeof p==`boolean`?p:p.text),Z=typeof p==`object`?p:void 0,ht;t[79]!==be||t[80]!==W||t[81]!==V||t[82]!==J||t[83]!==H||t[84]!==y||t[85]!==A||t[86]!==M||t[87]!==q||t[88]!==K||t[89]!==xe?(ht=()=>{if(!H){if(be)xe&&q(),y?.();else if(V){if(!A)return;let e=W.trim();if(!e)return;A(e),K(``)}else J?(q(),Be(!0)):M?.(W)}},t[79]=be,t[80]=W,t[81]=V,t[82]=J,t[83]=H,t[84]=y,t[85]=A,t[86]=M,t[87]=q,t[88]=K,t[89]=xe,t[90]=ht):ht=t[90];let gt=ht,_t;t[91]===Symbol.for(`react.memo_cache_sentinel`)?(_t=()=>{We.current?.click()},t[91]=_t):_t=t[91];let vt=_t,yt;t[92]===x?yt=t[93]:(yt=e=>{let t=e.target.files;t&&t.length>0&&x?.(Array.from(t)),e.target.value=``},t[92]=x,t[93]=yt);let bt=yt,xt;t[94]===x?xt=t[95]:(xt=e=>{e.preventDefault(),e.stopPropagation(),x&&Ie(!0)},t[94]=x,t[95]=xt);let St=xt,Ct;t[96]===Symbol.for(`react.memo_cache_sentinel`)?(Ct=e=>{e.preventDefault(),e.stopPropagation(),!(e.relatedTarget&&e.currentTarget.contains(e.relatedTarget))&&Ie(!1)},t[96]=Ct):Ct=t[96];let wt=Ct,Tt;t[97]===x?Tt=t[98]:(Tt=e=>{if(e.preventDefault(),e.stopPropagation(),Ie(!1),!x)return;let t=Array.from(e.dataTransfer.files);t.length>0&&x(t)},t[97]=x,t[98]=Tt);let Et=Tt,Dt;t[99]!==Ae||t[100]!==x||t[101]!==Je||t[102]!==K?(Dt=e=>{if(!x&&!Ae)return;let t=Array.from(e.clipboardData.files);if(x&&t.length>0){if(Je&&ne(e.clipboardData,t))return;e.preventDefault(),x(t);return}let n=e.clipboardData.getData(`text/plain`);if(x&&n.length>4095){e.preventDefault();let t=new File([n],`Pasted Text`,{type:`text/plain`});x([t]);return}if(!Ae)return;let r=Xe();n&&r&&e.target===r&&(e.preventDefault(),document.execCommand(`insertText`,!1,n)||(r.setRangeText(n,r.selectionStart,r.selectionEnd,`end`),K(r.value,r.selectionStart)))},t[99]=Ae,t[100]=x,t[101]=Je,t[102]=K,t[103]=Dt):Dt=t[103];let Ot=Dt,kt;t[104]===Z?kt=t[105]:(kt=()=>{Re(!0),Z?.onDismiss?.()},t[104]=Z,t[105]=kt);let At=kt,jt=Ne||lt||V||Fe||we,Mt=Ee&&`var(--shadow-floating-composer)`,Nt=jt&&!Fe?`inset 0 0 0 1px var(--color-depth-black-4)`:`inset 0 0 0 1px transparent`,Pt;t[106]!==Mt||t[107]!==Nt?(Pt=[Mt,Nt].filter(Boolean),t[106]=Mt,t[107]=Nt,t[108]=Pt):Pt=t[108];let Ft=Pt.join(`, `),It;t[109]===r?It=t[110]:(It=a(`flex w-full max-w-240 flex-col items-start justify-end gap-2`,r),t[109]=r,t[110]=It);let Lt;t[111]!==K||t[112]!==X||t[113]!==De||t[114]!==ke?(Lt=De&&!X?/* @__PURE__ */ (0,D.jsx)(O,{suggestions:ke,onSuggestionClick:e=>K(e.value)}):null,t[111]=K,t[112]=X,t[113]=De,t[114]=ke,t[115]=Lt):Lt=t[115];let Rt;t[116]!==At||t[117]!==Z?.text||t[118]!==X?(Rt=X?/* @__PURE__ */ (0,D.jsx)(w,{text:Z?.text,onDismiss:At}):null,t[116]=At,t[117]=Z?.text,t[118]=X,t[119]=Rt):Rt=t[119];let zt;t[120]===Symbol.for(`react.memo_cache_sentinel`)?(zt={x:0},t[120]=zt):zt=t[120];let Bt;t[121]===Symbol.for(`react.memo_cache_sentinel`)?(Bt={willChange:`transform`},t[121]=Bt):Bt=t[121];let Vt=Fe&&`border border-dashed border-primary-base`,Ht;t[122]===Vt?Ht=t[123]:(Ht=a(`relative w-full overflow-hidden rounded-[20px] bg-base-weak`,Vt),t[122]=Vt,t[123]=Ht);let Ut;t[124]===Ft?Ut=t[125]:(Ut={boxShadow:Ft,transition:`box-shadow 0.2s ease`},t[124]=Ft,t[125]=Ut);let Wt,Gt;t[126]===Symbol.for(`react.memo_cache_sentinel`)?(Wt=()=>Pe(!0),Gt=()=>{Pe(!1),Be(!1)},t[126]=Wt,t[127]=Gt):(Wt=t[126],Gt=t[127]);let Kt;t[128]!==n||t[129]!==bt?(Kt=/* @__PURE__ */ (0,D.jsx)(`input`,{ref:We,type:`file`,accept:n,multiple:!0,onChange:bt,className:`hidden`}),t[128]=n,t[129]=bt,t[130]=Kt):Kt=t[130];let qt;t[131]===gt?qt=t[132]:(qt=e=>{e.preventDefault(),gt()},t[131]=gt,t[132]=qt);let Jt;t[133]!==B||t[134]!==ut||t[135]!==k?(Jt=ut?/* @__PURE__ */ (0,D.jsxs)(`div`,{className:`relative flex w-full shrink-0 flex-col items-start gap-2`,children:[/* @__PURE__ */ (0,D.jsx)(re,{attachments:B,types:`thread`,onRemove:k,layout:`vertical`}),/* @__PURE__ */ (0,D.jsx)(re,{attachments:B,types:[`image`,`file`],onRemove:k,layout:`horizontal`})]}):null,t[133]=B,t[134]=ut,t[135]=k,t[136]=Jt):Jt=t[136];let Q;t[137]===Te?Q=t[138]:(Q=Te?/* @__PURE__ */ (0,D.jsx)(`div`,{className:`flex h-9 w-9 shrink-0 items-center justify-center`,children:/* @__PURE__ */ (0,D.jsx)(T,{variant:`color`,size:24})}):null,t[137]=Te,t[138]=Q);let Yt;t[139]===K?Yt=t[140]:(Yt=e=>K(e.target.value,e.target.selectionStart),t[139]=K,t[140]=Yt);let Xt;t[141]!==gt||t[142]!==W||t[143]!==qe||t[144]!==C||t[145]!==K?(Xt=e=>{if(C?.(e)===!0)e.preventDefault();else if(!qe&&!(e.nativeEvent.isComposing||e.keyCode===229)){if(e.key===`Enter`&&e.altKey){e.preventDefault();let t=e.currentTarget,n=t.selectionStart??W.length,r=t.selectionEnd??W.length,i=`${W.slice(0,n)}\n${W.slice(r)}`;K(i,n+1),requestAnimationFrame(()=>{t.setSelectionRange(n+1,n+1)})}else e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),gt())}},t[141]=gt,t[142]=W,t[143]=qe,t[144]=C,t[145]=K,t[146]=Xt):Xt=t[146];let Zt;t[147]!==U||t[148]!==N?(Zt=N??U({id:`3ZxGc_`}),t[147]=U,t[148]=N,t[149]=Zt):Zt=t[149];let Qt=_&&`[scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden`,$t;t[150]!==Qt||t[151]!==z?($t=a(`p-0`,Qt,z),t[150]=Qt,t[151]=z,t[152]=$t):$t=t[152];let en;t[153]===_?en=t[154]:(en=_?{color:`transparent`,WebkitTextFillColor:`transparent`,caretColor:`var(--color-text-strong)`}:void 0,t[153]=_,t[154]=en);let tn;t[155]===Symbol.for(`react.memo_cache_sentinel`)?(tn=a(`min-h-0 flex-1 resize-none rounded-none border-none bg-transparent`,`focus-within:bg-transparent hover:bg-transparent`),t[155]=tn):tn=t[155];let nn;t[156]!==W||t[157]!==Yt||t[158]!==Xt||t[159]!==Zt||t[160]!==$t||t[161]!==en?(nn=/* @__PURE__ */ (0,D.jsx)(v,{rows:1,value:W,onChange:Yt,onKeyDown:Xt,placeholder:Zt,variant:`inverse`,maxHeight:200,textareaClassName:$t,style:en,className:tn}),t[156]=W,t[157]=Yt,t[158]=Xt,t[159]=Zt,t[160]=$t,t[161]=en,t[162]=nn):nn=t[162];let rn;t[163]===_?rn=t[164]:(rn=_?/* @__PURE__ */ (0,D.jsx)(`div`,{className:`pointer-events-none absolute inset-0 z-10 overflow-hidden`,children:/* @__PURE__ */ (0,D.jsx)(`div`,{ref:Ue,children:_})}):null,t[163]=_,t[164]=rn);let an;t[165]!==nn||t[166]!==rn?(an=/* @__PURE__ */ (0,D.jsxs)(`div`,{ref:Ve,className:`pui-no-ios-zoom-container relative flex min-h-0 min-w-0 flex-1 flex-col`,children:[nn,rn]}),t[165]=nn,t[166]=rn,t[167]=an):an=t[167];let on=x?vt:void 0,sn;t[168]!==V||t[169]!==H||t[170]!==E||t[171]!==j||t[172]!==on?(sn=/* @__PURE__ */ (0,D.jsx)(`div`,{className:`flex shrink-0 items-center gap-2 rounded-xl`,children:/* @__PURE__ */ (0,D.jsx)(te,{onAttach:on,onMicrophone:E,onStop:j,isStreaming:V,isSubmitLoading:H,isSubmitDisabled:!1,className:`gap-2`})}),t[168]=V,t[169]=H,t[170]=E,t[171]=j,t[172]=on,t[173]=sn):sn=t[173];let cn;t[174]!==Q||t[175]!==an||t[176]!==sn?(cn=/* @__PURE__ */ (0,D.jsxs)(`div`,{className:`flex min-h-10 w-full items-center gap-2 px-1 py-0.5`,children:[Q,an,sn]}),t[174]=Q,t[175]=an,t[176]=sn,t[177]=cn):cn=t[177];let ln;t[178]!==qt||t[179]!==Jt||t[180]!==cn?(ln=/* @__PURE__ */ (0,D.jsxs)(`form`,{onSubmit:qt,className:`flex flex-col items-start justify-center gap-3 p-3`,children:[Jt,cn]}),t[178]=qt,t[179]=Jt,t[180]=cn,t[181]=ln):ln=t[181];let un;t[182]!==St||t[183]!==Et||t[184]!==Ot||t[185]!==Ht||t[186]!==Ut||t[187]!==Kt||t[188]!==ln?(un=/* @__PURE__ */ (0,D.jsxs)(`div`,{"data-slot":`prompt-card`,className:Ht,style:Ut,onMouseEnter:Wt,onMouseLeave:Gt,onDragOver:St,onDragLeave:wt,onDrop:Et,onPaste:Ot,children:[Kt,ln]}),t[182]=St,t[183]=Et,t[184]=Ot,t[185]=Ht,t[186]=Ut,t[187]=Kt,t[188]=ln,t[189]=un):un=t[189];let dn;t[190]!==G||t[191]!==un?(dn=/* @__PURE__ */ (0,D.jsx)(o,{asChild:!0,children:/* @__PURE__ */ (0,D.jsx)(l.div,{className:`w-full`,initial:zt,animate:G,style:Bt,children:un})}),t[190]=G,t[191]=un,t[192]=dn):dn=t[192];let fn;t[193]===mt?fn=t[194]:(fn=/* @__PURE__ */ (0,D.jsx)(c,{side:`top`,sideOffset:8,className:`z-100`,children:mt}),t[193]=mt,t[194]=fn);let $;t[195]!==ze||t[196]!==dn||t[197]!==fn?($=/* @__PURE__ */ (0,D.jsxs)(s,{open:ze,children:[dn,fn]}),t[195]=ze,t[196]=dn,t[197]=fn,t[198]=$):$=t[198];let pn;return t[199]!==F||t[200]!==je||t[201]!==It||t[202]!==Lt||t[203]!==Rt||t[204]!==$?(pn=/* @__PURE__ */ (0,D.jsxs)(`div`,{className:It,"qa-test-id":je,...F,children:[Lt,Rt,$]}),t[199]=F,t[200]=je,t[201]=It,t[202]=Lt,t[203]=Rt,t[204]=$,t[205]=pn):pn=t[205],pn}function ie(e){return e.status===`loading`}function ae(e){return e.status===`error`}function oe(e){return e.status===`unsupported`}function se(e){return e.status===`loading`||e.status===`error`||e.status===`unsupported`}export{C as Attachment,L as Prompt,j as extensionFromFilename,k as formatFileSize,N as revokeAttachmentUrl,ne as shouldPreferTextOverFiles,M as toAttachment,F as useAttachments};
1
+ import{a as e}from"../../_chunks/rolldown-runtime-BWaJ3C7D.js";import{t}from"../../_chunks/react-CUaU2Z9V.js";import{t as n}from"../../_chunks/ArrowRightIcon-OEjQROCT.js";import{t as r}from"../../_chunks/compiler-runtime-B3BlmaWz.js";import{t as i}from"../../_chunks/jsx-runtime-Dgn0yPdi.js";import{t as a}from"../../_chunks/dist-BNSTMZct.js";import{a as o,n as s,r as c}from"../../_chunks/Tooltip-CZ9gmT5S.js";import{n as l}from"../../_chunks/react-B3hSlcN2.js";import{t as u}from"../../_chunks/AnimatePresence-B0AmNCpD.js";import{t as d}from"../../_chunks/use-reduced-motion-CNBdBisf.js";import{t as f}from"../../_chunks/use-animation-Dx5JiH_u.js";import{t as p}from"../../_chunks/Button-Dpj5VLQ7.js";import{i as m}from"../../_chunks/dist-BRMXKypj.js";import{n as h,s as g}from"../../_chunks/dist-CPlSvWC_.js";import{t as _}from"../../_chunks/ScrollGradientWrapper-h6yq23DQ.js";import{t as v}from"../../_chunks/TextareaControl-CIEYB2jp.js";import{t as y}from"../../_chunks/StopFillIcon-BHTuKSSq.js";import{t as b}from"../../_chunks/useToggle-CfFQsrI9.js";import{t as x}from"../../_chunks/PaperclipIcon-B8vj2DdY.js";import{t as S}from"../../_chunks/MicrophoneIcon-BuLtN1VU.js";import{n as C,t as w}from"../../_chunks/PromptHint-whUPjpVy.js";import{t as T}from"../../_chunks/LogoPI-DZ2zSwSS.js";import{t as E}from"../../_chunks/ArrowUpRightIcon-BQhMqKWo.js";var ee=r(),D=/* @__PURE__ */ e(i(),1);function O(e){let t=(0,ee.c)(10),{suggestions:n,onSuggestionClick:r,qaTestId:i}=e,o=i===void 0?`prompt-suggestions`:i;if(n.length===0)return null;let s;if(t[0]!==r||t[1]!==n){let e;t[3]===r?e=t[4]:(e=(e,t)=>/* @__PURE__ */ (0,D.jsx)(p,{variant:`weak`,prefix:{icon:E,color:`icon-soft`,animationDirection:`up-right`,className:`text-text-soft`},animateIcon:!0,motionProps:{whileTap:{scale:.95,boxShadow:`none`}},onClick:()=>{r?.(e),e.onClick?.()},className:a(`inline-flex shrink-0 items-center justify-start gap-0.5 rounded-xl bg-base-weak p-2.5 text-left`,`outline-1 -outline-offset-1 outline-depth-black-4 outline-solid`,`hover:bg-depth-black-4 hover:text-text-sub`),children:/* @__PURE__ */ (0,D.jsx)(`span`,{className:`pui-text-mono-small text-text-soft`,children:e.display})},t),t[3]=r,t[4]=e),s=n.map(e),t[0]=r,t[1]=n,t[2]=s}else s=t[2];let c;t[5]===s?c=t[6]:(c=/* @__PURE__ */ (0,D.jsx)(_,{className:`w-full`,scrollClassName:`gap-2`,children:s}),t[5]=s,t[6]=c);let l;return t[7]!==o||t[8]!==c?(l=/* @__PURE__ */ (0,D.jsx)(`div`,{className:`flex w-full flex-col items-start`,"qa-test-id":o,children:c}),t[7]=o,t[8]=c,t[9]=l):l=t[9],l}function te(e){let t=(0,ee.c)(25),{onAttach:r,onMicrophone:i,onStop:o,isStreaming:s,isSubmitLoading:c,isSubmitDisabled:l,className:u,qaTestId:d}=e,f=s!==void 0&&s,h=c!==void 0&&c,g=l===void 0||l,_=d===void 0?`toolbar`:d,{_:v}=m(),b;t[0]===u?b=t[1]:(b=a(`relative flex w-full shrink-0 items-center gap-3`,u),t[0]=u,t[1]=b);let C;t[2]!==v||t[3]!==r?(C=r&&/* @__PURE__ */ (0,D.jsx)(p,{type:`button`,onClick:r,"aria-label":v({id:`x9ecE4`}),variant:`weak`,size:`medium`,prefix:{icon:x}}),t[2]=v,t[3]=r,t[4]=C):C=t[4];let w;t[5]===C?w=t[6]:(w=/* @__PURE__ */ (0,D.jsx)(`div`,{className:`relative flex min-h-px min-w-px flex-1 shrink-0 items-center gap-2 rounded-xl lowercase`,children:C}),t[5]=C,t[6]=w);let T;t[7]!==v||t[8]!==f||t[9]!==i?(T=i&&!f&&/* @__PURE__ */ (0,D.jsx)(p,{type:`button`,onClick:i,"aria-label":v({id:`gPuz_0`}),variant:`weak`,size:`medium`,prefix:{icon:S}}),t[7]=v,t[8]=f,t[9]=i,t[10]=T):T=t[10];let E;t[11]!==v||t[12]!==f||t[13]!==g||t[14]!==h||t[15]!==o?(E=f&&o?/* @__PURE__ */ (0,D.jsx)(p,{type:`button`,onClick:e=>{e.preventDefault(),e.stopPropagation(),o()},"aria-label":v({id:`ygCKqB`}),variant:`strong`,size:`medium`,prefix:{icon:y}}):/* @__PURE__ */ (0,D.jsx)(p,{type:`submit`,"aria-label":v({id:`JlFcis`}),variant:`strong`,size:`medium`,suffix:{icon:n},disabled:g||h,isLoading:h}),t[11]=v,t[12]=f,t[13]=g,t[14]=h,t[15]=o,t[16]=E):E=t[16];let O;t[17]!==T||t[18]!==E?(O=/* @__PURE__ */ (0,D.jsxs)(`div`,{className:`relative flex shrink-0 items-center gap-2 rounded-xl`,children:[T,E]}),t[17]=T,t[18]=E,t[19]=O):O=t[19];let te;return t[20]!==_||t[21]!==O||t[22]!==b||t[23]!==w?(te=/* @__PURE__ */ (0,D.jsxs)(`div`,{className:b,"qa-test-id":_,children:[w,O]}),t[20]=_,t[21]=O,t[22]=b,t[23]=w,t[24]=te):te=t[24],te}function k(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}const A={"text/plain":`TXT`,"text/markdown":`MD`,"text/html":`HTML`,"text/css":`CSS`,"text/csv":`CSV`,"text/xml":`XML`,"application/xml":`XML`,"application/pdf":`PDF`,"application/json":`JSON`,"application/zip":`ZIP`,"application/msword":`DOC`,"application/vnd.openxmlformats-officedocument.wordprocessingml.document":`DOCX`,"application/vnd.ms-excel":`XLS`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":`XLSX`,"application/vnd.ms-powerpoint":`PPT`,"application/vnd.openxmlformats-officedocument.presentationml.presentation":`PPTX`};function j(e,t){let n=e.lastIndexOf(`.`);return(n===-1?``:e.slice(n+1).toUpperCase())||A[t]||t.split(`/`).pop()?.toUpperCase()||`FILE`}function M(e,t){let n=e instanceof File,r=n?e.name:e.filename,i=n?e.type:e.mediaType,a=n?URL.createObjectURL(e):e.url,o=n?e:void 0,s=n?e.size:void 0,c=n?`${r}-${s}-${Date.now()}-${Math.random().toString(36).slice(2)}`:t===void 0?`url-${r}-${Date.now()}`:`backend-${t}-${r}`;if(i.startsWith(`image/`))return{id:c,type:`image`,imageSrc:a,file:o};let l=j(r,i);return{id:c,type:`file`,fileName:r,fileMetadata:s===void 0?l:`${l} • ${k(s)}`,file:o}}function ne(e,t){let n=e.getData(`text/plain`);return!n.trim()||!t.every(e=>e.type.startsWith(`image/`))?!1:n.includes(` `)}function N(e){e.type===`image`&&URL.revokeObjectURL(e.imageSrc)}var P=/* @__PURE__ */ e(t(),1);function F(e=[]){let[t,n]=(0,P.useState)(e);return{attachments:t,setAttachments:n,handleFilesSelected:e=>{let t=[];for(let n of e){let e=M(n);e&&t.push(e)}n(e=>[...e,...t])},handleRemoveAttachment:e=>{n(t=>{let n=t.find(t=>t.id===e);return n&&N(n),t.filter(t=>t.id!==e)})},clearAttachments:()=>{n(e=>(e.forEach(N),[]))}}}function re(e){let t=(0,ee.c)(24),{attachments:n,types:r,onRemove:i,layout:a}=e,o;t[0]===r?o=t[1]:(o=Array.isArray(r)?r:[r],t[0]=r,t[1]=o);let s=o,c,l,d,f,p,m;if(t[2]!==n||t[3]!==a||t[4]!==i||t[5]!==s){m=Symbol.for(`react.early_return_sentinel`);bb0:{let e;t[12]===s?e=t[13]:(e=e=>s.includes(e.type),t[12]=s,t[13]=e);let r=n.filter(e);if(r.length===0){m=null;break bb0}let o=r.toSorted(I);if(a===`vertical`){m=/* @__PURE__ */ (0,D.jsx)(`div`,{className:`flex w-full flex-col gap-2`,children:/* @__PURE__ */ (0,D.jsx)(u,{mode:`popLayout`,children:o.map(e=>/* @__PURE__ */ (0,D.jsx)(C,{...e,isSingleItem:o.length===1,onRemove:i?()=>i(e.id):void 0},e.id))})});break bb0}p=`w-full [scrollbar-width:none] overflow-x-auto [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden`,f=`inline-flex gap-2`,c=u,l=`popLayout`,d=o.map(e=>/* @__PURE__ */ (0,D.jsx)(C,{...e,isSingleItem:o.length===1,onRemove:i?()=>i(e.id):void 0},e.id))}t[2]=n,t[3]=a,t[4]=i,t[5]=s,t[6]=c,t[7]=l,t[8]=d,t[9]=f,t[10]=p,t[11]=m}else c=t[6],l=t[7],d=t[8],f=t[9],p=t[10],m=t[11];if(m!==Symbol.for(`react.early_return_sentinel`))return m;let h;t[14]!==c||t[15]!==l||t[16]!==d?(h=/* @__PURE__ */ (0,D.jsx)(c,{mode:l,children:d}),t[14]=c,t[15]=l,t[16]=d,t[17]=h):h=t[17];let g;t[18]!==f||t[19]!==h?(g=/* @__PURE__ */ (0,D.jsx)(`div`,{className:f,children:h}),t[18]=f,t[19]=h,t[20]=g):g=t[20];let _;return t[21]!==p||t[22]!==g?(_=/* @__PURE__ */ (0,D.jsx)(`div`,{className:p,children:g}),t[21]=p,t[22]=g,t[23]=_):_=t[23],_}function I(e,t){return(e.status===`error`||e.status===`unsupported`?0:1)-(t.status===`error`||t.status===`unsupported`?0:1)}function L(e){let t=(0,ee.c)(210),n,r,i,u,p,_,y,x,S,C,E,k,A,j,M,N,F,I,L,ce,le,R,ue,de,fe,pe,me,he,ge,_e,ve,ye,z;t[0]===e?(n=t[1],r=t[2],i=t[3],u=t[4],p=t[5],_=t[6],y=t[7],x=t[8],S=t[9],C=t[10],E=t[11],k=t[12],A=t[13],j=t[14],M=t[15],N=t[16],F=t[17],I=t[18],L=t[19],ce=t[20],le=t[21],R=t[22],ue=t[23],de=t[24],fe=t[25],pe=t[26],me=t[27],he=t[28],ge=t[29],_e=t[30],ve=t[31],ye=t[32],z=t[33]):({className:r,attachments:L,placeholder:F,onFilesSelected:S,accept:n,onSubmit:N,blockSubmit:fe,shakeOnBlock:pe,onBlockedSubmit:x,onMicrophone:k,onRemoveAttachment:A,onStop:M,onSteer:j,isStreaming:me,isSubmitLoading:he,allowEmptySubmit:ge,autoFocus:_e,defaultValue:i,showScrollShadow:ve,showLogo:ye,hasShadow:ce,showSuggestions:le,suggestions:R,hint:p,onInputChange:C,onKeyDown:E,inputOverlay:y,inputFooter:_,textareaClassName:z,insertPastedTextDirectly:ue,ref:u,qaTestId:de,...I}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=u,t[5]=p,t[6]=_,t[7]=y,t[8]=x,t[9]=S,t[10]=C,t[11]=E,t[12]=k,t[13]=A,t[14]=j,t[15]=M,t[16]=N,t[17]=F,t[18]=I,t[19]=L,t[20]=ce,t[21]=le,t[22]=R,t[23]=ue,t[24]=de,t[25]=fe,t[26]=pe,t[27]=me,t[28]=he,t[29]=ge,t[30]=_e,t[31]=ve,t[32]=ye,t[33]=z);let be;t[34]===L?be=t[35]:(be=L===void 0?[]:L,t[34]=L,t[35]=be);let B=be,xe=fe!==void 0&&fe,Se=pe===void 0||pe,V=me!==void 0&&me,H=he!==void 0&&he,Ce=ge!==void 0&&ge,we=_e===void 0||_e,Te=ve!==void 0&&ve,Ee=ye===void 0||ye,De=ce!==void 0&&ce,Oe=le!==void 0&&le,ke;t[36]===R?ke=t[37]:(ke=R===void 0?[]:R,t[36]=R,t[37]=ke);let Ae=ke,je=ue!==void 0&&ue,Me=de===void 0?`prompt`:de,{_:U}=m(),[W,Ne]=(0,P.useState)(i??``),[Pe,Fe]=(0,P.useState)(!1),[Ie,Le]=(0,P.useState)(!1),[Re,ze]=(0,P.useState)(!1),[Be,Ve]=(0,P.useState)(!1),He=(0,P.useRef)(null),Ue=(0,P.useRef)(null),We=(0,P.useRef)(null),Ge=(0,P.useRef)(null),G=f(),Ke=d(),qe;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(qe={defaultValue:!1,initializeWithValue:!1},t[38]=qe):qe=t[38];let Je=g(`(pointer: coarse)`,qe),Ye=b(`prefer_text_over_image_on_paste`),Xe;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(Xe=()=>{let e=Ue.current;if(e?.isConnected)return e;let t=He.current?.querySelector(`textarea`)??null;return Ue.current=t,t},t[39]=Xe):Xe=t[39];let Ze=Xe,Qe;t[40]===C?Qe=t[41]:(Qe=(e,t)=>{Ne(e),C?.(e,t)},t[40]=C,t[41]=Qe);let K=Qe,$e;t[42]!==G||t[43]!==Ke?($e=()=>{Ke?G.set({x:0}):G.start({x:[0,-8,8,-6,6,-4,4,0],transition:{duration:.35,ease:[.32,.72,0,1]}})},t[42]=G,t[43]=Ke,t[44]=$e):$e=t[44];let q=$e,et;t[45]!==q||t[46]!==K?(et=()=>({focus:()=>Ze()?.focus(),setInputValue:e=>{K(e)},setSelectionRange:(e,t)=>{let n=t===void 0?e:t,r=Ze();r&&(r.focus({preventScroll:!0}),r.setSelectionRange(e,n))},shake:q}),t[45]=q,t[46]=K,t[47]=et):et=t[47],(0,P.useImperativeHandle)(u,et);let tt,nt;t[48]===we?(tt=t[49],nt=t[50]):(tt=()=>{we&&Ze()?.focus({preventScroll:!0})},nt=[we],t[48]=we,t[49]=tt,t[50]=nt),(0,P.useEffect)(tt,nt);let rt;t[51]===y?rt=t[52]:(rt=()=>{let e=We.current;if(!y||!e)return;let t=Ze();t&&(e.style.transform=`translate(${-t.scrollLeft}px, ${-t.scrollTop}px)`)},t[51]=y,t[52]=rt);let it;t[53]!==y||t[54]!==W?(it=[y,W],t[53]=y,t[54]=W,t[55]=it):it=t[55],(0,P.useEffect)(rt,it);let at,ot;t[56]===y?(at=t[57],ot=t[58]):(at=()=>{if(!y){let e=We.current;e&&(e.style.transform=``)}},ot=[y],t[56]=y,t[57]=at,t[58]=ot),(0,P.useEffect)(at,ot);let st;t[59]===y?st=t[60]:(st=e=>{if(!y)return;let t=We.current,n=Ue.current;t&&n&&e.target===n&&(t.style.transform=`translate(${-n.scrollLeft}px, ${-n.scrollTop}px)`)},t[59]=y,t[60]=st);let ct;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(ct={passive:!0,capture:!0},t[61]=ct):ct=t[61],h(`scroll`,st,He,ct);let lt;t[62]!==B.length||t[63]!==W?(lt=W.trim().length>0||B.length>0,t[62]=B.length,t[63]=W,t[64]=lt):lt=t[64];let ut=lt,dt=B.length>0,ft;t[65]===B?ft=t[66]:(ft=B.some(se),t[65]=B,t[66]=ft);let J=!Ce&&!ut||ft,pt,mt;t[67]===J?(pt=t[68],mt=t[69]):(pt=()=>{J||Ve(!1)},mt=[J],t[67]=J,t[68]=pt,t[69]=mt),(0,P.useEffect)(pt,mt);let Y;bb0:{if(!ut){let e;t[70]===U?e=t[71]:(e=U({id:`E-2Of8`}),t[70]=U,t[71]=e),Y=e;break bb0}if(B.some(oe)){let e;t[72]===U?e=t[73]:(e=U({id:`_D6eRO`}),t[72]=U,t[73]=e),Y=e;break bb0}if(B.some(ae)){let e;t[74]===U?e=t[75]:(e=U({id:`CJndez`}),t[74]=U,t[75]=e),Y=e;break bb0}if(B.some(ie)){let e;t[76]===U?e=t[77]:(e=U({id:`MH3bVF`}),t[76]=U,t[77]=e),Y=e;break bb0}let e;t[78]===U?e=t[79]:(e=U({id:`E-2Of8`}),t[78]=U,t[79]=e),Y=e}let ht=Y,X=p!==void 0&&p!==!1&&!Re&&(typeof p==`boolean`?p:p.text),Z=typeof p==`object`?p:void 0,gt;t[80]!==xe||t[81]!==W||t[82]!==V||t[83]!==J||t[84]!==H||t[85]!==x||t[86]!==j||t[87]!==N||t[88]!==q||t[89]!==K||t[90]!==Se?(gt=()=>{if(!H){if(xe)Se&&q(),x?.();else if(V){if(!j)return;let e=W.trim();if(!e)return;j(e),K(``)}else J?(q(),Ve(!0)):N?.(W)}},t[80]=xe,t[81]=W,t[82]=V,t[83]=J,t[84]=H,t[85]=x,t[86]=j,t[87]=N,t[88]=q,t[89]=K,t[90]=Se,t[91]=gt):gt=t[91];let _t=gt,vt;t[92]===Symbol.for(`react.memo_cache_sentinel`)?(vt=()=>{Ge.current?.click()},t[92]=vt):vt=t[92];let yt=vt,bt;t[93]===S?bt=t[94]:(bt=e=>{let t=e.target.files;t&&t.length>0&&S?.(Array.from(t)),e.target.value=``},t[93]=S,t[94]=bt);let xt=bt,St;t[95]===S?St=t[96]:(St=e=>{e.preventDefault(),e.stopPropagation(),S&&Le(!0)},t[95]=S,t[96]=St);let Ct=St,wt;t[97]===Symbol.for(`react.memo_cache_sentinel`)?(wt=e=>{e.preventDefault(),e.stopPropagation(),!(e.relatedTarget&&e.currentTarget.contains(e.relatedTarget))&&Le(!1)},t[97]=wt):wt=t[97];let Tt=wt,Et;t[98]===S?Et=t[99]:(Et=e=>{if(e.preventDefault(),e.stopPropagation(),Le(!1),!S)return;let t=Array.from(e.dataTransfer.files);t.length>0&&S(t)},t[98]=S,t[99]=Et);let Dt=Et,Ot;t[100]!==je||t[101]!==S||t[102]!==Ye||t[103]!==K?(Ot=e=>{if(!S&&!je)return;let t=Array.from(e.clipboardData.files);if(S&&t.length>0){if(Ye&&ne(e.clipboardData,t))return;e.preventDefault(),S(t);return}let n=e.clipboardData.getData(`text/plain`);if(S&&n.length>4095){e.preventDefault();let t=new File([n],`Pasted Text`,{type:`text/plain`});S([t]);return}if(!je)return;let r=Ze();n&&r&&e.target===r&&(e.preventDefault(),document.execCommand(`insertText`,!1,n)||(r.setRangeText(n,r.selectionStart,r.selectionEnd,`end`),K(r.value,r.selectionStart)))},t[100]=je,t[101]=S,t[102]=Ye,t[103]=K,t[104]=Ot):Ot=t[104];let kt=Ot,At;t[105]===Z?At=t[106]:(At=()=>{ze(!0),Z?.onDismiss?.()},t[105]=Z,t[106]=At);let jt=At,Mt=Pe||ut||V||Ie||Te,Nt=De&&`var(--shadow-floating-composer)`,Pt=Mt&&!Ie?`inset 0 0 0 1px var(--color-depth-black-4)`:`inset 0 0 0 1px transparent`,Ft;t[107]!==Nt||t[108]!==Pt?(Ft=[Nt,Pt].filter(Boolean),t[107]=Nt,t[108]=Pt,t[109]=Ft):Ft=t[109];let It=Ft.join(`, `),Lt;t[110]===r?Lt=t[111]:(Lt=a(`flex w-full max-w-240 flex-col items-start justify-end gap-2`,r),t[110]=r,t[111]=Lt);let Rt;t[112]!==K||t[113]!==X||t[114]!==Oe||t[115]!==Ae?(Rt=Oe&&!X?/* @__PURE__ */ (0,D.jsx)(O,{suggestions:Ae,onSuggestionClick:e=>K(e.value)}):null,t[112]=K,t[113]=X,t[114]=Oe,t[115]=Ae,t[116]=Rt):Rt=t[116];let zt;t[117]!==jt||t[118]!==Z?.text||t[119]!==X?(zt=X?/* @__PURE__ */ (0,D.jsx)(w,{text:Z?.text,onDismiss:jt}):null,t[117]=jt,t[118]=Z?.text,t[119]=X,t[120]=zt):zt=t[120];let Bt;t[121]===Symbol.for(`react.memo_cache_sentinel`)?(Bt={x:0},t[121]=Bt):Bt=t[121];let Vt;t[122]===Symbol.for(`react.memo_cache_sentinel`)?(Vt={willChange:`transform`},t[122]=Vt):Vt=t[122];let Ht=Ie&&`border border-dashed border-primary-base`,Ut;t[123]===Ht?Ut=t[124]:(Ut=a(`relative w-full overflow-hidden rounded-[20px] bg-base-weak`,Ht),t[123]=Ht,t[124]=Ut);let Wt;t[125]===It?Wt=t[126]:(Wt={boxShadow:It,transition:`box-shadow 0.2s ease`},t[125]=It,t[126]=Wt);let Gt,Kt;t[127]===Symbol.for(`react.memo_cache_sentinel`)?(Gt=()=>Fe(!0),Kt=()=>{Fe(!1),Ve(!1)},t[127]=Gt,t[128]=Kt):(Gt=t[127],Kt=t[128]);let qt;t[129]!==n||t[130]!==xt?(qt=/* @__PURE__ */ (0,D.jsx)(`input`,{ref:Ge,type:`file`,accept:n,multiple:!0,onChange:xt,className:`hidden`}),t[129]=n,t[130]=xt,t[131]=qt):qt=t[131];let Jt;t[132]===_t?Jt=t[133]:(Jt=e=>{e.preventDefault(),_t()},t[132]=_t,t[133]=Jt);let Yt;t[134]!==B||t[135]!==dt||t[136]!==A?(Yt=dt?/* @__PURE__ */ (0,D.jsxs)(`div`,{className:`relative flex w-full shrink-0 flex-col items-start gap-2`,children:[/* @__PURE__ */ (0,D.jsx)(re,{attachments:B,types:`thread`,onRemove:A,layout:`vertical`}),/* @__PURE__ */ (0,D.jsx)(re,{attachments:B,types:[`image`,`file`],onRemove:A,layout:`horizontal`})]}):null,t[134]=B,t[135]=dt,t[136]=A,t[137]=Yt):Yt=t[137];let Xt;t[138]===Ee?Xt=t[139]:(Xt=Ee?/* @__PURE__ */ (0,D.jsx)(`div`,{className:`flex h-9 w-9 shrink-0 items-center justify-center`,children:/* @__PURE__ */ (0,D.jsx)(T,{variant:`color`,size:24})}):null,t[138]=Ee,t[139]=Xt);let Zt;t[140]===K?Zt=t[141]:(Zt=e=>K(e.target.value,e.target.selectionStart),t[140]=K,t[141]=Zt);let Qt;t[142]!==_t||t[143]!==W||t[144]!==Je||t[145]!==E||t[146]!==K?(Qt=e=>{if(E?.(e)===!0)e.preventDefault();else if(!Je&&!(e.nativeEvent.isComposing||e.keyCode===229)){if(e.key===`Enter`&&e.altKey){e.preventDefault();let t=e.currentTarget,n=t.selectionStart??W.length,r=t.selectionEnd??W.length,i=`${W.slice(0,n)}\n${W.slice(r)}`;K(i,n+1),requestAnimationFrame(()=>{t.setSelectionRange(n+1,n+1)})}else e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),_t())}},t[142]=_t,t[143]=W,t[144]=Je,t[145]=E,t[146]=K,t[147]=Qt):Qt=t[147];let $t;t[148]!==U||t[149]!==F?($t=F??U({id:`3ZxGc_`}),t[148]=U,t[149]=F,t[150]=$t):$t=t[150];let en=y&&`[scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden`,tn;t[151]!==en||t[152]!==z?(tn=a(`p-0`,en,z),t[151]=en,t[152]=z,t[153]=tn):tn=t[153];let Q;t[154]===y?Q=t[155]:(Q=y?{color:`transparent`,WebkitTextFillColor:`transparent`,caretColor:`var(--color-text-strong)`}:void 0,t[154]=y,t[155]=Q);let nn;t[156]===Symbol.for(`react.memo_cache_sentinel`)?(nn=a(`min-h-0 flex-1 resize-none rounded-none border-none bg-transparent`,`focus-within:bg-transparent hover:bg-transparent`),t[156]=nn):nn=t[156];let rn;t[157]!==W||t[158]!==Zt||t[159]!==Qt||t[160]!==$t||t[161]!==tn||t[162]!==Q?(rn=/* @__PURE__ */ (0,D.jsx)(v,{rows:1,value:W,onChange:Zt,onKeyDown:Qt,placeholder:$t,variant:`inverse`,maxHeight:200,textareaClassName:tn,style:Q,className:nn}),t[157]=W,t[158]=Zt,t[159]=Qt,t[160]=$t,t[161]=tn,t[162]=Q,t[163]=rn):rn=t[163];let an;t[164]===y?an=t[165]:(an=y?/* @__PURE__ */ (0,D.jsx)(`div`,{className:`pointer-events-none absolute inset-0 z-10 overflow-hidden`,children:/* @__PURE__ */ (0,D.jsx)(`div`,{ref:We,children:y})}):null,t[164]=y,t[165]=an);let on;t[166]!==rn||t[167]!==an?(on=/* @__PURE__ */ (0,D.jsxs)(`div`,{ref:He,className:`pui-no-ios-zoom-container relative flex min-h-0 min-w-0 flex-1 flex-col`,children:[rn,an]}),t[166]=rn,t[167]=an,t[168]=on):on=t[168];let sn=S?yt:void 0,cn;t[169]!==V||t[170]!==H||t[171]!==k||t[172]!==M||t[173]!==sn?(cn=/* @__PURE__ */ (0,D.jsx)(`div`,{className:`flex shrink-0 items-center gap-2 rounded-xl`,children:/* @__PURE__ */ (0,D.jsx)(te,{onAttach:sn,onMicrophone:k,onStop:M,isStreaming:V,isSubmitLoading:H,isSubmitDisabled:!1,className:`gap-2`})}),t[169]=V,t[170]=H,t[171]=k,t[172]=M,t[173]=sn,t[174]=cn):cn=t[174];let ln;t[175]!==Xt||t[176]!==on||t[177]!==cn?(ln=/* @__PURE__ */ (0,D.jsxs)(`div`,{className:`flex min-h-10 w-full items-center gap-2 px-1 py-0.5`,children:[Xt,on,cn]}),t[175]=Xt,t[176]=on,t[177]=cn,t[178]=ln):ln=t[178];let un;t[179]===_?un=t[180]:(un=_?/* @__PURE__ */ (0,D.jsx)(`div`,{className:`flex w-full min-w-0 flex-wrap items-center gap-2 px-1`,children:_}):null,t[179]=_,t[180]=un);let dn;t[181]!==Jt||t[182]!==Yt||t[183]!==ln||t[184]!==un?(dn=/* @__PURE__ */ (0,D.jsxs)(`form`,{onSubmit:Jt,className:`flex flex-col items-start justify-center gap-3 p-3`,children:[Yt,ln,un]}),t[181]=Jt,t[182]=Yt,t[183]=ln,t[184]=un,t[185]=dn):dn=t[185];let fn;t[186]!==Ct||t[187]!==Dt||t[188]!==kt||t[189]!==Ut||t[190]!==Wt||t[191]!==qt||t[192]!==dn?(fn=/* @__PURE__ */ (0,D.jsxs)(`div`,{"data-slot":`prompt-card`,className:Ut,style:Wt,onMouseEnter:Gt,onMouseLeave:Kt,onDragOver:Ct,onDragLeave:Tt,onDrop:Dt,onPaste:kt,children:[qt,dn]}),t[186]=Ct,t[187]=Dt,t[188]=kt,t[189]=Ut,t[190]=Wt,t[191]=qt,t[192]=dn,t[193]=fn):fn=t[193];let pn;t[194]!==G||t[195]!==fn?(pn=/* @__PURE__ */ (0,D.jsx)(o,{asChild:!0,children:/* @__PURE__ */ (0,D.jsx)(l.div,{className:`w-full`,initial:Bt,animate:G,style:Vt,children:fn})}),t[194]=G,t[195]=fn,t[196]=pn):pn=t[196];let mn;t[197]===ht?mn=t[198]:(mn=/* @__PURE__ */ (0,D.jsx)(c,{side:`top`,sideOffset:8,className:`z-100`,children:ht}),t[197]=ht,t[198]=mn);let $;t[199]!==Be||t[200]!==pn||t[201]!==mn?($=/* @__PURE__ */ (0,D.jsxs)(s,{open:Be,children:[pn,mn]}),t[199]=Be,t[200]=pn,t[201]=mn,t[202]=$):$=t[202];let hn;return t[203]!==I||t[204]!==Me||t[205]!==Lt||t[206]!==Rt||t[207]!==zt||t[208]!==$?(hn=/* @__PURE__ */ (0,D.jsxs)(`div`,{className:Lt,"qa-test-id":Me,...I,children:[Rt,zt,$]}),t[203]=I,t[204]=Me,t[205]=Lt,t[206]=Rt,t[207]=zt,t[208]=$,t[209]=hn):hn=t[209],hn}function ie(e){return e.status===`loading`}function ae(e){return e.status===`error`}function oe(e){return e.status===`unsupported`}function se(e){return e.status===`loading`||e.status===`error`||e.status===`unsupported`}export{C as Attachment,L as Prompt,j as extensionFromFilename,k as formatFileSize,N as revokeAttachmentUrl,ne as shouldPreferTextOverFiles,M as toAttachment,F as useAttachments};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-BWaJ3C7D.js";import{t}from"./react-CUaU2Z9V.js";import{C as n,x as r}from"./series-tag-BaecVmtO.js";import{t as i}from"./compiler-runtime-B3BlmaWz.js";import{t as a}from"./jsx-runtime-Dgn0yPdi.js";import{a as o,c as s,d as c,l,o as u,r as d,s as f,u as ee}from"./time-series-chart-shell-CUug7kYf.js";import{n as p,o as te,s as m}from"./chart-context-DEIvTsqh.js";import{t as ne}from"./monotone-Dpjx4H_I.js";import{a as re,i as h,r as g}from"./projection-line-end-marker-QD35F55G.js";import{t as _}from"./series-markers-PiCafGdw.js";import{t as v}from"./chart-formatters-C23Gt1wa.js";var y=i(),b=/* @__PURE__ */ e(a(),1);function ie(e){let t=(0,y.c)(28),{gradientId:n,strokeGradientId:r,edgeMaskId:i,edgeGradientId:a,fill:o,fillOpacity:s,gradientToOpacity:u,gradientSpan:d,resolvedStroke:f,isPatternFill:p,fadeEdges:te,innerWidth:m,innerHeight:ne}=e,re=d===void 0?1:d,h,g,_;if(t[0]!==a||t[1]!==i||t[2]!==te||t[3]!==o||t[4]!==s||t[5]!==n||t[6]!==re||t[7]!==u||t[8]!==ne||t[9]!==m||t[10]!==p||t[11]!==f||t[12]!==r){let e=ee(te),d=e.any?l(e):null,v=e.any&&!p?l(e):null,y=Math.min(1,Math.max(.01,re)),ie=`${y*100}%`;t[16]!==o||t[17]!==s||t[18]!==n||t[19]!==u||t[20]!==p||t[21]!==ie||t[22]!==y?(h=p?null:/* @__PURE__ */ (0,b.jsxs)(`linearGradient`,{id:n,x1:`0%`,x2:`0%`,y1:`0%`,y2:`100%`,children:[/* @__PURE__ */ (0,b.jsx)(`stop`,{offset:`0%`,style:{stopColor:o,stopOpacity:s}}),/* @__PURE__ */ (0,b.jsx)(`stop`,{offset:ie,style:{stopColor:o,stopOpacity:u}}),y<1?/* @__PURE__ */ (0,b.jsx)(`stop`,{offset:`100%`,style:{stopColor:o,stopOpacity:u}}):null]}),t[16]=o,t[17]=s,t[18]=n,t[19]=u,t[20]=p,t[21]=ie,t[22]=y,t[23]=h):h=t[23],g=d?/* @__PURE__ */ (0,b.jsx)(`linearGradient`,{id:r,...c(m),children:d.map(e=>/* @__PURE__ */ (0,b.jsx)(`stop`,{offset:e.offset,style:{stopColor:f,stopOpacity:e.opacity}},e.offset))}):null,_=v?/* @__PURE__ */ (0,b.jsxs)(b.Fragment,{children:[/* @__PURE__ */ (0,b.jsx)(`linearGradient`,{id:a,...c(m),children:v.map(ae)}),/* @__PURE__ */ (0,b.jsx)(`mask`,{id:i,children:/* @__PURE__ */ (0,b.jsx)(`rect`,{fill:`url(#${a})`,height:ne,width:m,x:`0`,y:`0`})})]}):null,t[0]=a,t[1]=i,t[2]=te,t[3]=o,t[4]=s,t[5]=n,t[6]=re,t[7]=u,t[8]=ne,t[9]=m,t[10]=p,t[11]=f,t[12]=r,t[13]=h,t[14]=g,t[15]=_}else h=t[13],g=t[14],_=t[15];let v;return t[24]!==h||t[25]!==g||t[26]!==_?(v=/* @__PURE__ */ (0,b.jsxs)(`defs`,{children:[h,g,_]}),t[24]=h,t[25]=g,t[26]=_,t[27]=v):v=t[27],v}function ae(e){return/* @__PURE__ */ (0,b.jsx)(`stop`,{offset:e.offset,style:{stopColor:`white`,stopOpacity:e.opacity}},e.offset)}var oe=/* @__PURE__ */ e(t(),1);function se(e,t,n,r){let i=(0,y.c)(11),a;i[0]===e?a=i[1]:(a=s(e),i[0]=e,i[1]=a);let o=t===!1?null:n??(t===!0?`loop`:a),c=o!=null,l=e===`revealing`||e===`ready`||e===`exitingReady`,[u,d]=(0,oe.useState)(0),f;i[2]!==r||i[3]!==o?(f=()=>{o===`loop`?window.setTimeout(()=>{d(ce)},280):r?.()},i[2]=r,i[3]=o,i[4]=f):f=i[4];let ee=f,p;return i[5]!==ee||i[6]!==u||i[7]!==o||i[8]!==c||i[9]!==l?(p={handleLoadingPulseComplete:ee,pulseMode:o,pulseEpoch:u,showLoadingPulse:c,showSeriesContent:l},i[5]=ee,i[6]=u,i[7]=o,i[8]=c,i[9]=l,i[10]=p):p=i[10],p}function ce(e){return e+1}function le(e){let t=(0,y.c)(114),{dataKey:i,yAxisId:a,fill:s,fillOpacity:c,stroke:l,strokeWidth:ae,curve:ce,animate:le,showLine:ue,showHighlight:de,gradientToOpacity:fe,gradientSpan:pe,fadeEdges:me,showMarkers:he,markers:x,dashFromIndex:S,dashArray:ge,loading:_e,loadingStroke:ve,loadingStrokeOpacity:ye,loadingPulseMode:be,loadingStyle:xe}=e,C=s===void 0?p.linePrimary:s,Se=c===void 0?.4:c,w=ae===void 0?2:ae,T=ce===void 0?ne:ce,Ce=le===void 0||le,E=ue===void 0||ue,we=de===void 0||de,Te=fe===void 0?0:fe,Ee=pe===void 0?1:pe,D=me!==void 0&&me,De=he!==void 0&&he,Oe=ge===void 0?`6,4`:ge,O=ve===void 0?p.foreground:ve,k=ye===void 0?.5:ye,ke=xe===void 0?`pulse`:xe,{data:Ae,renderData:A,xScale:j,innerHeight:M,innerWidth:N,xAccessor:P,lines:je,chartPhase:Me,notifyLoadingPulseComplete:Ne}=te(),F=m(a),{handleLoadingPulseComplete:I,pulseMode:L,pulseEpoch:Pe,showLoadingPulse:R,showSeriesContent:z}=se(Me,_e,be,Ne),Fe;if(t[0]!==i||t[1]!==je){let e;t[3]===i?e=t[4]:(e=e=>e.dataKey===i,t[3]=i,t[4]=e),Fe=je.findIndex(e),t[0]=i,t[1]=je,t[2]=Fe}else Fe=t[2];let Ie=Math.max(0,Fe),Le=(0,oe.useRef)(null),Re;t[5]!==S||t[6]!==N||t[7]!==A||t[8]!==E||t[9]!==R||t[10]!==z?(Re=[A,N,S,E,z,R],t[5]=S,t[6]=N,t[7]=A,t[8]=E,t[9]=R,t[10]=z,t[11]=Re):Re=t[11];let{pathLength:ze,pathD:B}=u(Le,Re),Be=(0,oe.useId)(),Ve;if(t[12]!==Be){let e;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(e=/:/g,t[14]=e):e=t[14],Ve=Be.replace(e,``),t[12]=Be,t[13]=Ve}else Ve=t[13];let He=Ve,Ue;if(t[15]!==i){let e;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(e=/[^A-Za-z0-9_-]+/g,t[17]=e):e=t[17],Ue=i.replace(e,`_`),t[15]=i,t[16]=Ue}else Ue=t[16];let We=Ue,Ge=`area-gradient-${We}-${He}`,Ke=`area-stroke-gradient-${We}-${He}`,V=`area-edge-mask-${We}-${He}`,qe=`${V}-gradient`,Je;t[18]===C?Je=t[19]:(Je=C.startsWith(`url(`),t[18]=C,t[19]=Je);let H=Je,Ye=H||Se>0,Xe=H?C:`url(#${Ge})`,U=l||(H?p.linePrimary:C),Ze;t[20]!==i||t[21]!==F?(Ze=e=>{let t=v(e[i]),n=F.range()[0]??0;return t==null?n:F(t)??n},t[20]=i,t[21]=F,t[22]=Ze):Ze=t[22];let W=Ze,Qe=o(S,Ae.length),$e;t[23]===D?$e=t[24]:($e=ee(D),t[23]=D,t[24]=$e);let et=$e,tt=et.any&&!H,nt=U;!tt&&et.any&&(nt=`url(#${Ke})`);let rt=we&&E&&!R&&z,it=z&&E,at=`transparent`;it&&!Qe&&(at=nt);let ot=E&&(z||R),G;t[25]!==Xe||t[26]!==T||t[27]!==W||t[28]!==A||t[29]!==Ye||t[30]!==z||t[31]!==P||t[32]!==j||t[33]!==F?(G=z&&Ye?/* @__PURE__ */ (0,b.jsx)(n,{curve:T,data:A,fill:Xe,x:e=>j(P(e))??0,y:W,yScale:F}):null,t[25]=Xe,t[26]=T,t[27]=W,t[28]=A,t[29]=Ye,t[30]=z,t[31]=P,t[32]=j,t[33]=F,t[34]=G):G=t[34];let K;t[35]!==T||t[36]!==Oe||t[37]!==S||t[38]!==Ae||t[39]!==W||t[40]!==M||t[41]!==N||t[42]!==B||t[43]!==ze||t[44]!==A||t[45]!==ot||t[46]!==it||t[47]!==nt||t[48]!==w||t[49]!==at||t[50]!==P||t[51]!==j?(K=ot?/* @__PURE__ */ (0,b.jsxs)(b.Fragment,{children:[/* @__PURE__ */ (0,b.jsx)(re,{curve:T,data:A,innerRef:Le,stroke:at,strokeLinecap:`round`,strokeWidth:w,x:e=>j(P(e))??0,y:W}),it?/* @__PURE__ */ (0,b.jsx)(d,{dashArray:Oe,dashFromIndex:S,data:Ae,innerHeight:M,innerWidth:N,pathD:B,pathLength:ze,stroke:nt,strokeWidth:w,xAccessor:P,xScale:j}):null]}):null,t[35]=T,t[36]=Oe,t[37]=S,t[38]=Ae,t[39]=W,t[40]=M,t[41]=N,t[42]=B,t[43]=ze,t[44]=A,t[45]=ot,t[46]=it,t[47]=nt,t[48]=w,t[49]=at,t[50]=P,t[51]=j,t[52]=K):K=t[52];let st;t[53]!==G||t[54]!==K?(st=/* @__PURE__ */ (0,b.jsxs)(b.Fragment,{children:[G,K]}),t[53]=G,t[54]=K,t[55]=st):st=t[55];let ct=st,lt=R&&N>0&&ke===`sweep`,ut=R&&N>0&&!lt,q;t[56]!==qe||t[57]!==V||t[58]!==D||t[59]!==C||t[60]!==Se||t[61]!==Ge||t[62]!==Ee||t[63]!==Te||t[64]!==M||t[65]!==N||t[66]!==H||t[67]!==U||t[68]!==Ke?(q=/* @__PURE__ */ (0,b.jsx)(ie,{edgeGradientId:qe,edgeMaskId:V,fadeEdges:D,fill:C,fillOpacity:Se,gradientId:Ge,gradientSpan:Ee,gradientToOpacity:Te,innerHeight:M,innerWidth:N,isPatternFill:H,resolvedStroke:U,strokeGradientId:Ke}),t[56]=qe,t[57]=V,t[58]=D,t[59]=C,t[60]=Se,t[61]=Ge,t[62]=Ee,t[63]=Te,t[64]=M,t[65]=N,t[66]=H,t[67]=U,t[68]=Ke,t[69]=q):q=t[69];let J;t[70]!==V||t[71]!==ct||t[72]!==tt?(J=tt?/* @__PURE__ */ (0,b.jsx)(`g`,{mask:`url(#${V})`,children:ct}):ct,t[70]=V,t[71]=ct,t[72]=tt,t[73]=J):J=t[73];let Y;t[74]!==Ie||t[75]!==we||t[76]!==J?(Y=/* @__PURE__ */ (0,b.jsx)(g,{dimOpacity:.6,enabled:we,seriesIndex:Ie,children:J}),t[74]=Ie,t[75]=we,t[76]=J,t[77]=Y):Y=t[77];let X;t[78]!==rt||t[79]!==M||t[80]!==U||t[81]!==w?(X=/* @__PURE__ */ (0,b.jsx)(h,{enabled:rt,height:M,pathRef:Le,stroke:U,strokeWidth:w}),t[78]=rt,t[79]=M,t[80]=U,t[81]=w,t[82]=X):X=t[82];let Z;t[83]!==Ce||t[84]!==i||t[85]!==x||t[86]!==U||t[87]!==De||t[88]!==z?(Z=De&&z?/* @__PURE__ */ (0,b.jsx)(_,{animate:Ce,dataKey:i,...x,fill:x?.fill??U,stroke:x?.stroke??x?.fill??U}):null,t[83]=Ce,t[84]=i,t[85]=x,t[86]=U,t[87]=De,t[88]=z,t[89]=Z):Z=t[89];let Q;t[90]!==T||t[91]!==I||t[92]!==O||t[93]!==k||t[94]!==L||t[95]!==w||t[96]!==lt?(Q=lt?/* @__PURE__ */ (0,b.jsx)(r,{curve:T,mode:L??`loop`,onTransitionComplete:I,stroke:O,strokeOpacity:k,strokeWidth:w,withArea:!0},`loading-sweep`):null,t[90]=T,t[91]=I,t[92]=O,t[93]=k,t[94]=L,t[95]=w,t[96]=lt,t[97]=Q):Q=t[97];let $;t[98]!==I||t[99]!==O||t[100]!==k||t[101]!==B||t[102]!==Pe||t[103]!==ut||t[104]!==L||t[105]!==w?($=ut&&B?/* @__PURE__ */ (0,b.jsx)(f,{loopEpoch:Pe,mode:L??void 0,onCycleComplete:I,pathD:B,stroke:O,strokeOpacity:k,strokeWidth:w},`loading-pulse`):null,t[98]=I,t[99]=O,t[100]=k,t[101]=B,t[102]=Pe,t[103]=ut,t[104]=L,t[105]=w,t[106]=$):$=t[106];let dt;return t[107]!==q||t[108]!==Y||t[109]!==X||t[110]!==Z||t[111]!==Q||t[112]!==$?(dt=/* @__PURE__ */ (0,b.jsxs)(b.Fragment,{children:[q,Y,X,Z,Q,$]}),t[107]=q,t[108]=Y,t[109]=X,t[110]=Z,t[111]=Q,t[112]=$,t[113]=dt):dt=t[113],dt}le.displayName=`Area`;export{le as t};
1
+ import{a as e}from"./rolldown-runtime-BWaJ3C7D.js";import{t}from"./react-CUaU2Z9V.js";import{C as n,x as r}from"./series-tag-BaecVmtO.js";import{t as i}from"./compiler-runtime-B3BlmaWz.js";import{t as a}from"./jsx-runtime-Dgn0yPdi.js";import{a as o,c as s,d as c,l,o as u,r as d,s as f,u as ee}from"./time-series-chart-shell-C7ciyZuR.js";import{n as p,o as te,s as m}from"./chart-context-DEIvTsqh.js";import{t as ne}from"./monotone-Dpjx4H_I.js";import{a as re,i as h,r as g}from"./projection-line-end-marker-QD35F55G.js";import{t as _}from"./series-markers-PiCafGdw.js";import{t as v}from"./chart-formatters-C23Gt1wa.js";var y=i(),b=/* @__PURE__ */ e(a(),1);function ie(e){let t=(0,y.c)(28),{gradientId:n,strokeGradientId:r,edgeMaskId:i,edgeGradientId:a,fill:o,fillOpacity:s,gradientToOpacity:u,gradientSpan:d,resolvedStroke:f,isPatternFill:p,fadeEdges:te,innerWidth:m,innerHeight:ne}=e,re=d===void 0?1:d,h,g,_;if(t[0]!==a||t[1]!==i||t[2]!==te||t[3]!==o||t[4]!==s||t[5]!==n||t[6]!==re||t[7]!==u||t[8]!==ne||t[9]!==m||t[10]!==p||t[11]!==f||t[12]!==r){let e=ee(te),d=e.any?l(e):null,v=e.any&&!p?l(e):null,y=Math.min(1,Math.max(.01,re)),ie=`${y*100}%`;t[16]!==o||t[17]!==s||t[18]!==n||t[19]!==u||t[20]!==p||t[21]!==ie||t[22]!==y?(h=p?null:/* @__PURE__ */ (0,b.jsxs)(`linearGradient`,{id:n,x1:`0%`,x2:`0%`,y1:`0%`,y2:`100%`,children:[/* @__PURE__ */ (0,b.jsx)(`stop`,{offset:`0%`,style:{stopColor:o,stopOpacity:s}}),/* @__PURE__ */ (0,b.jsx)(`stop`,{offset:ie,style:{stopColor:o,stopOpacity:u}}),y<1?/* @__PURE__ */ (0,b.jsx)(`stop`,{offset:`100%`,style:{stopColor:o,stopOpacity:u}}):null]}),t[16]=o,t[17]=s,t[18]=n,t[19]=u,t[20]=p,t[21]=ie,t[22]=y,t[23]=h):h=t[23],g=d?/* @__PURE__ */ (0,b.jsx)(`linearGradient`,{id:r,...c(m),children:d.map(e=>/* @__PURE__ */ (0,b.jsx)(`stop`,{offset:e.offset,style:{stopColor:f,stopOpacity:e.opacity}},e.offset))}):null,_=v?/* @__PURE__ */ (0,b.jsxs)(b.Fragment,{children:[/* @__PURE__ */ (0,b.jsx)(`linearGradient`,{id:a,...c(m),children:v.map(ae)}),/* @__PURE__ */ (0,b.jsx)(`mask`,{id:i,children:/* @__PURE__ */ (0,b.jsx)(`rect`,{fill:`url(#${a})`,height:ne,width:m,x:`0`,y:`0`})})]}):null,t[0]=a,t[1]=i,t[2]=te,t[3]=o,t[4]=s,t[5]=n,t[6]=re,t[7]=u,t[8]=ne,t[9]=m,t[10]=p,t[11]=f,t[12]=r,t[13]=h,t[14]=g,t[15]=_}else h=t[13],g=t[14],_=t[15];let v;return t[24]!==h||t[25]!==g||t[26]!==_?(v=/* @__PURE__ */ (0,b.jsxs)(`defs`,{children:[h,g,_]}),t[24]=h,t[25]=g,t[26]=_,t[27]=v):v=t[27],v}function ae(e){return/* @__PURE__ */ (0,b.jsx)(`stop`,{offset:e.offset,style:{stopColor:`white`,stopOpacity:e.opacity}},e.offset)}var oe=/* @__PURE__ */ e(t(),1);function se(e,t,n,r){let i=(0,y.c)(11),a;i[0]===e?a=i[1]:(a=s(e),i[0]=e,i[1]=a);let o=t===!1?null:n??(t===!0?`loop`:a),c=o!=null,l=e===`revealing`||e===`ready`||e===`exitingReady`,[u,d]=(0,oe.useState)(0),f;i[2]!==r||i[3]!==o?(f=()=>{o===`loop`?window.setTimeout(()=>{d(ce)},280):r?.()},i[2]=r,i[3]=o,i[4]=f):f=i[4];let ee=f,p;return i[5]!==ee||i[6]!==u||i[7]!==o||i[8]!==c||i[9]!==l?(p={handleLoadingPulseComplete:ee,pulseMode:o,pulseEpoch:u,showLoadingPulse:c,showSeriesContent:l},i[5]=ee,i[6]=u,i[7]=o,i[8]=c,i[9]=l,i[10]=p):p=i[10],p}function ce(e){return e+1}function le(e){let t=(0,y.c)(114),{dataKey:i,yAxisId:a,fill:s,fillOpacity:c,stroke:l,strokeWidth:ae,curve:ce,animate:le,showLine:ue,showHighlight:de,gradientToOpacity:fe,gradientSpan:pe,fadeEdges:me,showMarkers:he,markers:x,dashFromIndex:S,dashArray:ge,loading:_e,loadingStroke:ve,loadingStrokeOpacity:ye,loadingPulseMode:be,loadingStyle:xe}=e,C=s===void 0?p.linePrimary:s,Se=c===void 0?.4:c,w=ae===void 0?2:ae,T=ce===void 0?ne:ce,Ce=le===void 0||le,E=ue===void 0||ue,we=de===void 0||de,Te=fe===void 0?0:fe,Ee=pe===void 0?1:pe,D=me!==void 0&&me,De=he!==void 0&&he,Oe=ge===void 0?`6,4`:ge,O=ve===void 0?p.foreground:ve,k=ye===void 0?.5:ye,ke=xe===void 0?`pulse`:xe,{data:Ae,renderData:A,xScale:j,innerHeight:M,innerWidth:N,xAccessor:P,lines:je,chartPhase:Me,notifyLoadingPulseComplete:Ne}=te(),F=m(a),{handleLoadingPulseComplete:I,pulseMode:L,pulseEpoch:Pe,showLoadingPulse:R,showSeriesContent:z}=se(Me,_e,be,Ne),Fe;if(t[0]!==i||t[1]!==je){let e;t[3]===i?e=t[4]:(e=e=>e.dataKey===i,t[3]=i,t[4]=e),Fe=je.findIndex(e),t[0]=i,t[1]=je,t[2]=Fe}else Fe=t[2];let Ie=Math.max(0,Fe),Le=(0,oe.useRef)(null),Re;t[5]!==S||t[6]!==N||t[7]!==A||t[8]!==E||t[9]!==R||t[10]!==z?(Re=[A,N,S,E,z,R],t[5]=S,t[6]=N,t[7]=A,t[8]=E,t[9]=R,t[10]=z,t[11]=Re):Re=t[11];let{pathLength:ze,pathD:B}=u(Le,Re),Be=(0,oe.useId)(),Ve;if(t[12]!==Be){let e;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(e=/:/g,t[14]=e):e=t[14],Ve=Be.replace(e,``),t[12]=Be,t[13]=Ve}else Ve=t[13];let He=Ve,Ue;if(t[15]!==i){let e;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(e=/[^A-Za-z0-9_-]+/g,t[17]=e):e=t[17],Ue=i.replace(e,`_`),t[15]=i,t[16]=Ue}else Ue=t[16];let We=Ue,Ge=`area-gradient-${We}-${He}`,Ke=`area-stroke-gradient-${We}-${He}`,V=`area-edge-mask-${We}-${He}`,qe=`${V}-gradient`,Je;t[18]===C?Je=t[19]:(Je=C.startsWith(`url(`),t[18]=C,t[19]=Je);let H=Je,Ye=H||Se>0,Xe=H?C:`url(#${Ge})`,U=l||(H?p.linePrimary:C),Ze;t[20]!==i||t[21]!==F?(Ze=e=>{let t=v(e[i]),n=F.range()[0]??0;return t==null?n:F(t)??n},t[20]=i,t[21]=F,t[22]=Ze):Ze=t[22];let W=Ze,Qe=o(S,Ae.length),$e;t[23]===D?$e=t[24]:($e=ee(D),t[23]=D,t[24]=$e);let et=$e,tt=et.any&&!H,nt=U;!tt&&et.any&&(nt=`url(#${Ke})`);let rt=we&&E&&!R&&z,it=z&&E,at=`transparent`;it&&!Qe&&(at=nt);let ot=E&&(z||R),G;t[25]!==Xe||t[26]!==T||t[27]!==W||t[28]!==A||t[29]!==Ye||t[30]!==z||t[31]!==P||t[32]!==j||t[33]!==F?(G=z&&Ye?/* @__PURE__ */ (0,b.jsx)(n,{curve:T,data:A,fill:Xe,x:e=>j(P(e))??0,y:W,yScale:F}):null,t[25]=Xe,t[26]=T,t[27]=W,t[28]=A,t[29]=Ye,t[30]=z,t[31]=P,t[32]=j,t[33]=F,t[34]=G):G=t[34];let K;t[35]!==T||t[36]!==Oe||t[37]!==S||t[38]!==Ae||t[39]!==W||t[40]!==M||t[41]!==N||t[42]!==B||t[43]!==ze||t[44]!==A||t[45]!==ot||t[46]!==it||t[47]!==nt||t[48]!==w||t[49]!==at||t[50]!==P||t[51]!==j?(K=ot?/* @__PURE__ */ (0,b.jsxs)(b.Fragment,{children:[/* @__PURE__ */ (0,b.jsx)(re,{curve:T,data:A,innerRef:Le,stroke:at,strokeLinecap:`round`,strokeWidth:w,x:e=>j(P(e))??0,y:W}),it?/* @__PURE__ */ (0,b.jsx)(d,{dashArray:Oe,dashFromIndex:S,data:Ae,innerHeight:M,innerWidth:N,pathD:B,pathLength:ze,stroke:nt,strokeWidth:w,xAccessor:P,xScale:j}):null]}):null,t[35]=T,t[36]=Oe,t[37]=S,t[38]=Ae,t[39]=W,t[40]=M,t[41]=N,t[42]=B,t[43]=ze,t[44]=A,t[45]=ot,t[46]=it,t[47]=nt,t[48]=w,t[49]=at,t[50]=P,t[51]=j,t[52]=K):K=t[52];let st;t[53]!==G||t[54]!==K?(st=/* @__PURE__ */ (0,b.jsxs)(b.Fragment,{children:[G,K]}),t[53]=G,t[54]=K,t[55]=st):st=t[55];let ct=st,lt=R&&N>0&&ke===`sweep`,ut=R&&N>0&&!lt,q;t[56]!==qe||t[57]!==V||t[58]!==D||t[59]!==C||t[60]!==Se||t[61]!==Ge||t[62]!==Ee||t[63]!==Te||t[64]!==M||t[65]!==N||t[66]!==H||t[67]!==U||t[68]!==Ke?(q=/* @__PURE__ */ (0,b.jsx)(ie,{edgeGradientId:qe,edgeMaskId:V,fadeEdges:D,fill:C,fillOpacity:Se,gradientId:Ge,gradientSpan:Ee,gradientToOpacity:Te,innerHeight:M,innerWidth:N,isPatternFill:H,resolvedStroke:U,strokeGradientId:Ke}),t[56]=qe,t[57]=V,t[58]=D,t[59]=C,t[60]=Se,t[61]=Ge,t[62]=Ee,t[63]=Te,t[64]=M,t[65]=N,t[66]=H,t[67]=U,t[68]=Ke,t[69]=q):q=t[69];let J;t[70]!==V||t[71]!==ct||t[72]!==tt?(J=tt?/* @__PURE__ */ (0,b.jsx)(`g`,{mask:`url(#${V})`,children:ct}):ct,t[70]=V,t[71]=ct,t[72]=tt,t[73]=J):J=t[73];let Y;t[74]!==Ie||t[75]!==we||t[76]!==J?(Y=/* @__PURE__ */ (0,b.jsx)(g,{dimOpacity:.6,enabled:we,seriesIndex:Ie,children:J}),t[74]=Ie,t[75]=we,t[76]=J,t[77]=Y):Y=t[77];let X;t[78]!==rt||t[79]!==M||t[80]!==U||t[81]!==w?(X=/* @__PURE__ */ (0,b.jsx)(h,{enabled:rt,height:M,pathRef:Le,stroke:U,strokeWidth:w}),t[78]=rt,t[79]=M,t[80]=U,t[81]=w,t[82]=X):X=t[82];let Z;t[83]!==Ce||t[84]!==i||t[85]!==x||t[86]!==U||t[87]!==De||t[88]!==z?(Z=De&&z?/* @__PURE__ */ (0,b.jsx)(_,{animate:Ce,dataKey:i,...x,fill:x?.fill??U,stroke:x?.stroke??x?.fill??U}):null,t[83]=Ce,t[84]=i,t[85]=x,t[86]=U,t[87]=De,t[88]=z,t[89]=Z):Z=t[89];let Q;t[90]!==T||t[91]!==I||t[92]!==O||t[93]!==k||t[94]!==L||t[95]!==w||t[96]!==lt?(Q=lt?/* @__PURE__ */ (0,b.jsx)(r,{curve:T,mode:L??`loop`,onTransitionComplete:I,stroke:O,strokeOpacity:k,strokeWidth:w,withArea:!0},`loading-sweep`):null,t[90]=T,t[91]=I,t[92]=O,t[93]=k,t[94]=L,t[95]=w,t[96]=lt,t[97]=Q):Q=t[97];let $;t[98]!==I||t[99]!==O||t[100]!==k||t[101]!==B||t[102]!==Pe||t[103]!==ut||t[104]!==L||t[105]!==w?($=ut&&B?/* @__PURE__ */ (0,b.jsx)(f,{loopEpoch:Pe,mode:L??void 0,onCycleComplete:I,pathD:B,stroke:O,strokeOpacity:k,strokeWidth:w},`loading-pulse`):null,t[98]=I,t[99]=O,t[100]=k,t[101]=B,t[102]=Pe,t[103]=ut,t[104]=L,t[105]=w,t[106]=$):$=t[106];let dt;return t[107]!==q||t[108]!==Y||t[109]!==X||t[110]!==Z||t[111]!==Q||t[112]!==$?(dt=/* @__PURE__ */ (0,b.jsxs)(b.Fragment,{children:[q,Y,X,Z,Q,$]}),t[107]=q,t[108]=Y,t[109]=X,t[110]=Z,t[111]=Q,t[112]=$,t[113]=dt):dt=t[113],dt}le.displayName=`Area`;export{le as t};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-BWaJ3C7D.js";import{t}from"./react-CUaU2Z9V.js";import{r as n,x as r}from"./series-tag-BaecVmtO.js";import{t as i}from"./compiler-runtime-B3BlmaWz.js";import{t as a}from"./jsx-runtime-Dgn0yPdi.js";import{n as o}from"./react-B3hSlcN2.js";import{t as s}from"./animate-CDZpAV4V.js";import{t as c}from"./use-reduced-motion-CNBdBisf.js";import{a as l,c as u,d,f,i as p,l as m,o as h,r as g,s as _,u as v}from"./time-series-chart-shell-CUug7kYf.js";import{n as y,o as b,s as x}from"./chart-context-DEIvTsqh.js";import{n as S}from"./line-loading-timing-CPzkfImv.js";import{n as ee}from"./area-CyDNcvCa.js";import{a as C,i as te,r as ne}from"./projection-line-end-marker-QD35F55G.js";import{r as w,t as re}from"./series-markers-PiCafGdw.js";import{t as T}from"./chart-formatters-C23Gt1wa.js";function E(e,t,n,r,i,a=!1){let o=[];for(let s=0;s<e.length;s++){let c=e[s];if(!c)continue;let l=c[i],u=typeof l==`number`&&Number.isFinite(l)?l:null,d=u!==null;if(a&&!d)continue;let f=t(c);o.push({x:n(f)??0,y:u===null?0:r(u)??0,key:String(f.getTime?.()??s),defined:d})}return o}function D(e,t,n){if(n>=1)return t;if(n<=0)return e.length>0?e:t;let r=new Map(e.map(e=>[e.key,e]));return t.map((i,a)=>{let o=r.get(i.key);if(o)return{key:i.key,x:o.x+(i.x-o.x)*n,y:o.y+(i.y-o.y)*n,defined:i.defined};let s=a>0?t[a-1]:void 0,c=s?r.get(s.key):void 0,l=a<t.length-1?t[a+1]:void 0,u=l?r.get(l.key):void 0,d=c??u??e[0]??i;return{key:i.key,x:d.x+(i.x-d.x)*n,y:d.y+(i.y-d.y)*n,defined:i.defined}})}function O(e,t){return e.length===0?``:ee().x(e=>e.x).y(e=>e.y).defined(e=>e.defined!==!1).curve(t)(e)??``}function k({renderData:e,xAccessor:t,dataKey:n,innerWidth:r,xDomainMin:i,xDomainMax:a}){return`${r}|${i}|${a}|${e.map(e=>{let r=t(e),i=e[n];return`${r.getTime()}:${typeof i==`number`?i:``}`}).join(`,`)}`}var A=/* @__PURE__ */ e(t(),1);function ie({renderData:e,xAccessor:t,xScale:n,yScale:r,dataKey:i,curve:a,chartPhase:o,durationMs:l,innerWidth:u,enabled:d,connectNulls:f=!1}){let p=c(),[m,h]=(0,A.useState)(null),g=(0,A.useRef)(null),_=(0,A.useRef)(!1),v=n.domain?.()??[/* @__PURE__ */ new Date(0),/* @__PURE__ */ new Date(0)],y=k({renderData:e,xAccessor:t,dataKey:i,innerWidth:u,xDomainMin:v[0]?.getTime?.()??0,xDomainMax:v[1]?.getTime?.()??0}),b=(0,A.useMemo)(()=>E(e,t,n,r,i,f),[e,t,n,r,i,f]),x=(0,A.useRef)(y);return(0,A.useEffect)(()=>{_.current||(g.current=b)},[b]),(0,A.useEffect)(()=>{if(!(d&&!p&&o===`ready`&&l>0&&e.length>0)){_.current=!1,h(null),g.current=b,x.current=y;return}if(x.current===y)return;x.current=y;let a=g.current??b;if(a.length===0){g.current=b;return}_.current=!0;let c=a,u=s(0,1,{duration:l/1e3,ease:[...S],onUpdate:a=>{let o=E(e,t,n,r,i,f),s=D(c,o,a);g.current=s,h(s)},onComplete:()=>{_.current=!1,g.current=b,h(null)}});return()=>{u.stop(),_.current=!1,g.current=b,h(null)}},[y,o,l,d,p,e,t,n,r,i,f,b]),{pathD:O(m??b,a),isPathAnimating:m!=null}}var ae=i(),j=/* @__PURE__ */ e(a(),1);function oe(e){let t=(0,ae.c)(23),{animatedPathD:n,connectNulls:r,curve:i,dataKey:a,getY:o,pathRef:s,renderData:c,strokeWidth:l,useDataTransitionPath:u,visibleStroke:d,xAccessor:f,xScale:p}=e;if(u&&n){let e;return t[0]!==n||t[1]!==s||t[2]!==l||t[3]!==d?(e=/* @__PURE__ */ (0,j.jsx)(`path`,{d:n,fill:`none`,ref:s,stroke:d,strokeLinecap:`round`,strokeWidth:l}),t[0]=n,t[1]=s,t[2]=l,t[3]=d,t[4]=e):e=t[4],e}let m;t[5]===a?m=t[6]:(m=e=>T(e[a])!=null,t[5]=a,t[6]=m);let h=m,g;t[7]!==r||t[8]!==h||t[9]!==c?(g=r?c.filter(h):c,t[7]=r,t[8]=h,t[9]=c,t[10]=g):g=t[10];let _=g,v=r?void 0:h,y;t[11]!==f||t[12]!==p?(y=e=>p(f(e))??0,t[11]=f,t[12]=p,t[13]=y):y=t[13];let b;return t[14]!==i||t[15]!==o||t[16]!==s||t[17]!==_||t[18]!==l||t[19]!==v||t[20]!==y||t[21]!==d?(b=/* @__PURE__ */ (0,j.jsx)(C,{curve:i,data:_,defined:v,innerRef:s,stroke:d,strokeLinecap:`round`,strokeWidth:l,x:y,y:o}),t[14]=i,t[15]=o,t[16]=s,t[17]=_,t[18]=l,t[19]=v,t[20]=y,t[21]=d,t[22]=b):b=t[22],b}function se(e){let t=(0,ae.c)(20),{curve:n,handleLoadingPulseComplete:i,innerWidth:a,loadingStroke:o,loadingStrokeOpacity:s,loadingStyle:c,pathD:l,pulseEpoch:u,pulseMode:d,showLoadingPulse:f,strokeWidth:p}=e,m=f&&a>0&&c===`sweep`,h=f&&a>0&&!m,g;t[0]!==n||t[1]!==i||t[2]!==o||t[3]!==s||t[4]!==d||t[5]!==p||t[6]!==m?(g=m?/* @__PURE__ */ (0,j.jsx)(r,{curve:n,mode:d??`loop`,onTransitionComplete:i,stroke:o,strokeOpacity:s,strokeWidth:p},`loading-sweep`):null,t[0]=n,t[1]=i,t[2]=o,t[3]=s,t[4]=d,t[5]=p,t[6]=m,t[7]=g):g=t[7];let v;t[8]!==i||t[9]!==o||t[10]!==s||t[11]!==l||t[12]!==u||t[13]!==h||t[14]!==d||t[15]!==p?(v=h&&l?/* @__PURE__ */ (0,j.jsx)(_,{loopEpoch:u,mode:d??void 0,onCycleComplete:i,pathD:l,stroke:o,strokeOpacity:s,strokeWidth:p},`loading-pulse`):null,t[8]=i,t[9]=o,t[10]=s,t[11]=l,t[12]=u,t[13]=h,t[14]=d,t[15]=p,t[16]=v):v=t[16];let y;return t[17]!==g||t[18]!==v?(y=/* @__PURE__ */ (0,j.jsxs)(j.Fragment,{children:[g,v]}),t[17]=g,t[18]=v,t[19]=y):y=t[19],y}function ce(e){let t=(0,ae.c)(112),{dataKey:n,yAxisId:r,stroke:i,strokeWidth:a,connectNulls:o,curve:s,animate:c,fadeEdges:_,showHighlight:S,showMarkers:ee,markers:C,dashFromIndex:w,dashUntilIndex:E,dashArray:D,loading:O,loadingStroke:k,loadingStrokeOpacity:ce,loadingPulseMode:ue,onLoadingPulseCycleComplete:M,loadingStyle:de}=e,N=i===void 0?y.linePrimary:i,P=a===void 0?2.5:a,fe=o!==void 0&&o,F=s===void 0?f:s,I=c===void 0||c,pe=_===void 0||_,me=S===void 0||S,he=ee!==void 0&&ee,ge=D===void 0?`6,4`:D,_e=k===void 0?y.foreground:k,ve=ce===void 0?.5:ce,ye=de===void 0?`pulse`:de,{data:L,renderData:R,xScale:z,innerHeight:B,innerWidth:V,xAccessor:H,lines:be,chartPhase:U,notifyLoadingPulseComplete:xe,yDomainTweenDuration:Se}=b(),W=x(r),G=I&&U===`ready`,Ce;t[0]!==U||t[1]!==fe||t[2]!==F||t[3]!==n||t[4]!==V||t[5]!==R||t[6]!==G||t[7]!==H||t[8]!==z||t[9]!==Se||t[10]!==W?(Ce={chartPhase:U,curve:F,dataKey:n,durationMs:Se,enabled:G,innerWidth:V,renderData:R,xAccessor:H,xScale:z,yScale:W,connectNulls:fe},t[0]=U,t[1]=fe,t[2]=F,t[3]=n,t[4]=V,t[5]=R,t[6]=G,t[7]=H,t[8]=z,t[9]=Se,t[10]=W,t[11]=Ce):Ce=t[11];let{pathD:we}=ie(Ce),Te;t[12]===U?Te=t[13]:(Te=u(U),t[12]=U,t[13]=Te);let K=O===!1?null:ue??(O===!0?`loop`:Te),Ee=K!=null,[De,Oe]=(0,A.useState)(0),q=me&&!Ee,ke;t[14]!==xe||t[15]!==M||t[16]!==K?(ke=()=>{M?.(),K===`loop`?window.setTimeout(()=>{Oe(le)},280):xe?.()},t[14]=xe,t[15]=M,t[16]=K,t[17]=ke):ke=t[17];let Ae=ke,je;if(t[18]!==n||t[19]!==be){let e;t[21]===n?e=t[22]:(e=e=>e.dataKey===n,t[21]=n,t[22]=e),je=be.findIndex(e),t[18]=n,t[19]=be,t[20]=je}else je=t[20];let Me=Math.max(0,je),Ne=(0,A.useRef)(null),Pe=G?we:null,Fe;t[23]!==I||t[24]!==w||t[25]!==E||t[26]!==V||t[27]!==R||t[28]!==Pe?(Fe=[R,V,w,E,I,Pe],t[23]=I,t[24]=w,t[25]=E,t[26]=V,t[27]=R,t[28]=Pe,t[29]=Fe):Fe=t[29];let{pathLength:Ie,pathD:J}=h(Ne,Fe),Le=(0,A.useId)(),Re;if(t[30]!==Le){let e;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(e=/:/g,t[32]=e):e=t[32],Re=Le.replace(e,``),t[30]=Le,t[31]=Re}else Re=t[31];let ze=Re,Be;if(t[33]!==n){let e;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(e=/[^A-Za-z0-9_-]+/g,t[35]=e):e=t[35],Be=n.replace(e,`_`),t[33]=n,t[34]=Be}else Be=t[34];let Ve=`line-gradient-${Be}-${ze}`,He;t[36]!==n||t[37]!==W?(He=e=>{let t=T(e[n]),r=W.range()[0]??0;return t==null?r:W(t)??r},t[36]=n,t[37]=W,t[38]=He):He=t[38];let Ue=He,We;t[39]!==w||t[40]!==E||t[41]!==L.length?(We=l(w,L.length)||p(E,L.length),t[39]=w,t[40]=E,t[41]=L.length,t[42]=We):We=t[42];let Ge=We,Y,X,Z;if(t[43]!==U||t[44]!==pe||t[45]!==Ve||t[46]!==Ge||t[47]!==V||t[48]!==N){let e=v(pe);Y=e.any?`url(#${Ve})`:N;let n=e.any?m(e):null,r=U===`revealing`||U===`ready`||U===`exitingReady`;Z=`transparent`,r&&!Ge&&(Z=Y),X=n?/* @__PURE__ */ (0,j.jsx)(`defs`,{children:/* @__PURE__ */ (0,j.jsx)(`linearGradient`,{id:Ve,...d(V),children:n.map(e=>/* @__PURE__ */ (0,j.jsx)(`stop`,{offset:e.offset,style:{stopColor:N,stopOpacity:e.opacity}},e.offset))})}):null,t[43]=U,t[44]=pe,t[45]=Ve,t[46]=Ge,t[47]=V,t[48]=N,t[49]=Y,t[50]=X,t[51]=Z}else Y=t[49],X=t[50],Z=t[51];let Q;t[52]!==we||t[53]!==fe||t[54]!==F||t[55]!==n||t[56]!==Ue||t[57]!==R||t[58]!==P||t[59]!==G||t[60]!==Z||t[61]!==H||t[62]!==z?(Q=/* @__PURE__ */ (0,j.jsx)(oe,{animatedPathD:we,connectNulls:fe,curve:F,dataKey:n,getY:Ue,pathRef:Ne,renderData:R,strokeWidth:P,useDataTransitionPath:G,visibleStroke:Z,xAccessor:H,xScale:z}),t[52]=we,t[53]=fe,t[54]=F,t[55]=n,t[56]=Ue,t[57]=R,t[58]=P,t[59]=G,t[60]=Z,t[61]=H,t[62]=z,t[63]=Q):Q=t[63];let Ke;t[64]!==ge||t[65]!==w||t[66]!==E||t[67]!==L||t[68]!==B||t[69]!==V||t[70]!==Y||t[71]!==J||t[72]!==Ie||t[73]!==P||t[74]!==H||t[75]!==z?(Ke=/* @__PURE__ */ (0,j.jsx)(g,{dashArray:ge,dashFromIndex:w,dashUntilIndex:E,data:L,innerHeight:B,innerWidth:V,pathD:J,pathLength:Ie,stroke:Y,strokeWidth:P,xAccessor:H,xScale:z}),t[64]=ge,t[65]=w,t[66]=E,t[67]=L,t[68]=B,t[69]=V,t[70]=Y,t[71]=J,t[72]=Ie,t[73]=P,t[74]=H,t[75]=z,t[76]=Ke):Ke=t[76];let qe;t[77]!==q||t[78]!==Me||t[79]!==Q||t[80]!==Ke?(qe=/* @__PURE__ */ (0,j.jsxs)(ne,{dimOpacity:.3,enabled:q,seriesIndex:Me,children:[Q,Ke]}),t[77]=q,t[78]=Me,t[79]=Q,t[80]=Ke,t[81]=qe):qe=t[81];let Je;t[82]!==I||t[83]!==n||t[84]!==C||t[85]!==he||t[86]!==N?(Je=he?/* @__PURE__ */ (0,j.jsx)(re,{animate:I,dataKey:n,...C,fill:C?.fill??N,stroke:C?.stroke??C?.fill??N}):null,t[82]=I,t[83]=n,t[84]=C,t[85]=he,t[86]=N,t[87]=Je):Je=t[87];let Ye=J??we,Xe;t[88]!==q||t[89]!==B||t[90]!==N||t[91]!==P||t[92]!==Ye?(Xe=/* @__PURE__ */ (0,j.jsx)(te,{enabled:q,height:B,pathD:Ye,pathRef:Ne,stroke:N,strokeWidth:P}),t[88]=q,t[89]=B,t[90]=N,t[91]=P,t[92]=Ye,t[93]=Xe):Xe=t[93];let $;t[94]!==F||t[95]!==Ae||t[96]!==V||t[97]!==_e||t[98]!==ve||t[99]!==ye||t[100]!==J||t[101]!==De||t[102]!==K||t[103]!==Ee||t[104]!==P?($=/* @__PURE__ */ (0,j.jsx)(se,{curve:F,handleLoadingPulseComplete:Ae,innerWidth:V,loadingStroke:_e,loadingStrokeOpacity:ve,loadingStyle:ye,pathD:J,pulseEpoch:De,pulseMode:K,showLoadingPulse:Ee,strokeWidth:P}),t[94]=F,t[95]=Ae,t[96]=V,t[97]=_e,t[98]=ve,t[99]=ye,t[100]=J,t[101]=De,t[102]=K,t[103]=Ee,t[104]=P,t[105]=$):$=t[105];let Ze;return t[106]!==X||t[107]!==qe||t[108]!==Je||t[109]!==Xe||t[110]!==$?(Ze=/* @__PURE__ */ (0,j.jsxs)(j.Fragment,{children:[X,qe,Je,Xe,$]}),t[106]=X,t[107]=qe,t[108]=Je,t[109]=Xe,t[110]=$,t[111]=Ze):Ze=t[111],Ze}function le(e){return e+1}ce.displayName=`Line`;function ue(e){return e===`ready`||e===`exitingReady`}function M(e){let t=(0,ae.c)(21),{dataKey:r,yAxisId:i,shape:a,fill:s,stroke:c,radius:l,ringGap:u,strokeWidth:d}=e,f=a===void 0?`circle`:a,p=s===void 0?`transparent`:s,m=c===void 0?`var(--chart-1)`:c,h=l===void 0?5:l,g=u===void 0?0:u,_=d===void 0?1.5:d,{chartPhase:v,revealEpoch:y,enterTransition:x}=b(),S=n(r,`last`,i),ee=ue(v),C;t[0]===x?C=t[1]:(C=x&&typeof x==`object`?x:{duration:.28,ease:[.22,1,.36,1]},t[0]=x,t[1]=C);let te=C;if(!S)return null;let ne=+!!ee,re=ee?1:.55,T;t[2]!==ne||t[3]!==re?(T={opacity:ne,scale:re},t[2]=ne,t[3]=re,t[4]=T):T=t[4];let E;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(E={opacity:0,scale:.55},t[5]=E):E=t[5];let D=y??0,O;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(O={transformBox:`fill-box`,transformOrigin:`center`},t[6]=O):O=t[6];let k;t[7]!==p||t[8]!==S.cx||t[9]!==S.cy||t[10]!==h||t[11]!==g||t[12]!==f||t[13]!==m||t[14]!==_?(k=/* @__PURE__ */ (0,j.jsx)(w,{cx:S.cx,cy:S.cy,fill:p,radius:h,ringGap:g,shape:f,stroke:m,strokeWidth:_}),t[7]=p,t[8]=S.cx,t[9]=S.cy,t[10]=h,t[11]=g,t[12]=f,t[13]=m,t[14]=_,t[15]=k):k=t[15];let A;return t[16]!==te||t[17]!==T||t[18]!==D||t[19]!==k?(A=/* @__PURE__ */ (0,j.jsx)(o.g,{animate:T,initial:E,style:O,transition:te,children:k},D),t[16]=te,t[17]=T,t[18]=D,t[19]=k,t[20]=A):A=t[20],A}M.displayName=`LineSeriesTerminalMarker`,M.__isPostOverlay=!0;export{ce as n,M as t};
1
+ import{a as e}from"./rolldown-runtime-BWaJ3C7D.js";import{t}from"./react-CUaU2Z9V.js";import{r as n,x as r}from"./series-tag-BaecVmtO.js";import{t as i}from"./compiler-runtime-B3BlmaWz.js";import{t as a}from"./jsx-runtime-Dgn0yPdi.js";import{n as o}from"./react-B3hSlcN2.js";import{t as s}from"./animate-CDZpAV4V.js";import{t as c}from"./use-reduced-motion-CNBdBisf.js";import{a as l,c as u,d,f,i as p,l as m,o as h,r as g,s as _,u as v}from"./time-series-chart-shell-C7ciyZuR.js";import{n as y,o as b,s as x}from"./chart-context-DEIvTsqh.js";import{n as S}from"./line-loading-timing-CPzkfImv.js";import{n as ee}from"./area-CyDNcvCa.js";import{a as C,i as te,r as ne}from"./projection-line-end-marker-QD35F55G.js";import{r as w,t as re}from"./series-markers-PiCafGdw.js";import{t as T}from"./chart-formatters-C23Gt1wa.js";function E(e,t,n,r,i,a=!1){let o=[];for(let s=0;s<e.length;s++){let c=e[s];if(!c)continue;let l=c[i],u=typeof l==`number`&&Number.isFinite(l)?l:null,d=u!==null;if(a&&!d)continue;let f=t(c);o.push({x:n(f)??0,y:u===null?0:r(u)??0,key:String(f.getTime?.()??s),defined:d})}return o}function D(e,t,n){if(n>=1)return t;if(n<=0)return e.length>0?e:t;let r=new Map(e.map(e=>[e.key,e]));return t.map((i,a)=>{let o=r.get(i.key);if(o)return{key:i.key,x:o.x+(i.x-o.x)*n,y:o.y+(i.y-o.y)*n,defined:i.defined};let s=a>0?t[a-1]:void 0,c=s?r.get(s.key):void 0,l=a<t.length-1?t[a+1]:void 0,u=l?r.get(l.key):void 0,d=c??u??e[0]??i;return{key:i.key,x:d.x+(i.x-d.x)*n,y:d.y+(i.y-d.y)*n,defined:i.defined}})}function O(e,t){return e.length===0?``:ee().x(e=>e.x).y(e=>e.y).defined(e=>e.defined!==!1).curve(t)(e)??``}function k({renderData:e,xAccessor:t,dataKey:n,innerWidth:r,xDomainMin:i,xDomainMax:a}){return`${r}|${i}|${a}|${e.map(e=>{let r=t(e),i=e[n];return`${r.getTime()}:${typeof i==`number`?i:``}`}).join(`,`)}`}var A=/* @__PURE__ */ e(t(),1);function ie({renderData:e,xAccessor:t,xScale:n,yScale:r,dataKey:i,curve:a,chartPhase:o,durationMs:l,innerWidth:u,enabled:d,connectNulls:f=!1}){let p=c(),[m,h]=(0,A.useState)(null),g=(0,A.useRef)(null),_=(0,A.useRef)(!1),v=n.domain?.()??[/* @__PURE__ */ new Date(0),/* @__PURE__ */ new Date(0)],y=k({renderData:e,xAccessor:t,dataKey:i,innerWidth:u,xDomainMin:v[0]?.getTime?.()??0,xDomainMax:v[1]?.getTime?.()??0}),b=(0,A.useMemo)(()=>E(e,t,n,r,i,f),[e,t,n,r,i,f]),x=(0,A.useRef)(y);return(0,A.useEffect)(()=>{_.current||(g.current=b)},[b]),(0,A.useEffect)(()=>{if(!(d&&!p&&o===`ready`&&l>0&&e.length>0)){_.current=!1,h(null),g.current=b,x.current=y;return}if(x.current===y)return;x.current=y;let a=g.current??b;if(a.length===0){g.current=b;return}_.current=!0;let c=a,u=s(0,1,{duration:l/1e3,ease:[...S],onUpdate:a=>{let o=E(e,t,n,r,i,f),s=D(c,o,a);g.current=s,h(s)},onComplete:()=>{_.current=!1,g.current=b,h(null)}});return()=>{u.stop(),_.current=!1,g.current=b,h(null)}},[y,o,l,d,p,e,t,n,r,i,f,b]),{pathD:O(m??b,a),isPathAnimating:m!=null}}var ae=i(),j=/* @__PURE__ */ e(a(),1);function oe(e){let t=(0,ae.c)(23),{animatedPathD:n,connectNulls:r,curve:i,dataKey:a,getY:o,pathRef:s,renderData:c,strokeWidth:l,useDataTransitionPath:u,visibleStroke:d,xAccessor:f,xScale:p}=e;if(u&&n){let e;return t[0]!==n||t[1]!==s||t[2]!==l||t[3]!==d?(e=/* @__PURE__ */ (0,j.jsx)(`path`,{d:n,fill:`none`,ref:s,stroke:d,strokeLinecap:`round`,strokeWidth:l}),t[0]=n,t[1]=s,t[2]=l,t[3]=d,t[4]=e):e=t[4],e}let m;t[5]===a?m=t[6]:(m=e=>T(e[a])!=null,t[5]=a,t[6]=m);let h=m,g;t[7]!==r||t[8]!==h||t[9]!==c?(g=r?c.filter(h):c,t[7]=r,t[8]=h,t[9]=c,t[10]=g):g=t[10];let _=g,v=r?void 0:h,y;t[11]!==f||t[12]!==p?(y=e=>p(f(e))??0,t[11]=f,t[12]=p,t[13]=y):y=t[13];let b;return t[14]!==i||t[15]!==o||t[16]!==s||t[17]!==_||t[18]!==l||t[19]!==v||t[20]!==y||t[21]!==d?(b=/* @__PURE__ */ (0,j.jsx)(C,{curve:i,data:_,defined:v,innerRef:s,stroke:d,strokeLinecap:`round`,strokeWidth:l,x:y,y:o}),t[14]=i,t[15]=o,t[16]=s,t[17]=_,t[18]=l,t[19]=v,t[20]=y,t[21]=d,t[22]=b):b=t[22],b}function se(e){let t=(0,ae.c)(20),{curve:n,handleLoadingPulseComplete:i,innerWidth:a,loadingStroke:o,loadingStrokeOpacity:s,loadingStyle:c,pathD:l,pulseEpoch:u,pulseMode:d,showLoadingPulse:f,strokeWidth:p}=e,m=f&&a>0&&c===`sweep`,h=f&&a>0&&!m,g;t[0]!==n||t[1]!==i||t[2]!==o||t[3]!==s||t[4]!==d||t[5]!==p||t[6]!==m?(g=m?/* @__PURE__ */ (0,j.jsx)(r,{curve:n,mode:d??`loop`,onTransitionComplete:i,stroke:o,strokeOpacity:s,strokeWidth:p},`loading-sweep`):null,t[0]=n,t[1]=i,t[2]=o,t[3]=s,t[4]=d,t[5]=p,t[6]=m,t[7]=g):g=t[7];let v;t[8]!==i||t[9]!==o||t[10]!==s||t[11]!==l||t[12]!==u||t[13]!==h||t[14]!==d||t[15]!==p?(v=h&&l?/* @__PURE__ */ (0,j.jsx)(_,{loopEpoch:u,mode:d??void 0,onCycleComplete:i,pathD:l,stroke:o,strokeOpacity:s,strokeWidth:p},`loading-pulse`):null,t[8]=i,t[9]=o,t[10]=s,t[11]=l,t[12]=u,t[13]=h,t[14]=d,t[15]=p,t[16]=v):v=t[16];let y;return t[17]!==g||t[18]!==v?(y=/* @__PURE__ */ (0,j.jsxs)(j.Fragment,{children:[g,v]}),t[17]=g,t[18]=v,t[19]=y):y=t[19],y}function ce(e){let t=(0,ae.c)(112),{dataKey:n,yAxisId:r,stroke:i,strokeWidth:a,connectNulls:o,curve:s,animate:c,fadeEdges:_,showHighlight:S,showMarkers:ee,markers:C,dashFromIndex:w,dashUntilIndex:E,dashArray:D,loading:O,loadingStroke:k,loadingStrokeOpacity:ce,loadingPulseMode:ue,onLoadingPulseCycleComplete:M,loadingStyle:de}=e,N=i===void 0?y.linePrimary:i,P=a===void 0?2.5:a,fe=o!==void 0&&o,F=s===void 0?f:s,I=c===void 0||c,pe=_===void 0||_,me=S===void 0||S,he=ee!==void 0&&ee,ge=D===void 0?`6,4`:D,_e=k===void 0?y.foreground:k,ve=ce===void 0?.5:ce,ye=de===void 0?`pulse`:de,{data:L,renderData:R,xScale:z,innerHeight:B,innerWidth:V,xAccessor:H,lines:be,chartPhase:U,notifyLoadingPulseComplete:xe,yDomainTweenDuration:Se}=b(),W=x(r),G=I&&U===`ready`,Ce;t[0]!==U||t[1]!==fe||t[2]!==F||t[3]!==n||t[4]!==V||t[5]!==R||t[6]!==G||t[7]!==H||t[8]!==z||t[9]!==Se||t[10]!==W?(Ce={chartPhase:U,curve:F,dataKey:n,durationMs:Se,enabled:G,innerWidth:V,renderData:R,xAccessor:H,xScale:z,yScale:W,connectNulls:fe},t[0]=U,t[1]=fe,t[2]=F,t[3]=n,t[4]=V,t[5]=R,t[6]=G,t[7]=H,t[8]=z,t[9]=Se,t[10]=W,t[11]=Ce):Ce=t[11];let{pathD:we}=ie(Ce),Te;t[12]===U?Te=t[13]:(Te=u(U),t[12]=U,t[13]=Te);let K=O===!1?null:ue??(O===!0?`loop`:Te),Ee=K!=null,[De,Oe]=(0,A.useState)(0),q=me&&!Ee,ke;t[14]!==xe||t[15]!==M||t[16]!==K?(ke=()=>{M?.(),K===`loop`?window.setTimeout(()=>{Oe(le)},280):xe?.()},t[14]=xe,t[15]=M,t[16]=K,t[17]=ke):ke=t[17];let Ae=ke,je;if(t[18]!==n||t[19]!==be){let e;t[21]===n?e=t[22]:(e=e=>e.dataKey===n,t[21]=n,t[22]=e),je=be.findIndex(e),t[18]=n,t[19]=be,t[20]=je}else je=t[20];let Me=Math.max(0,je),Ne=(0,A.useRef)(null),Pe=G?we:null,Fe;t[23]!==I||t[24]!==w||t[25]!==E||t[26]!==V||t[27]!==R||t[28]!==Pe?(Fe=[R,V,w,E,I,Pe],t[23]=I,t[24]=w,t[25]=E,t[26]=V,t[27]=R,t[28]=Pe,t[29]=Fe):Fe=t[29];let{pathLength:Ie,pathD:J}=h(Ne,Fe),Le=(0,A.useId)(),Re;if(t[30]!==Le){let e;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(e=/:/g,t[32]=e):e=t[32],Re=Le.replace(e,``),t[30]=Le,t[31]=Re}else Re=t[31];let ze=Re,Be;if(t[33]!==n){let e;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(e=/[^A-Za-z0-9_-]+/g,t[35]=e):e=t[35],Be=n.replace(e,`_`),t[33]=n,t[34]=Be}else Be=t[34];let Ve=`line-gradient-${Be}-${ze}`,He;t[36]!==n||t[37]!==W?(He=e=>{let t=T(e[n]),r=W.range()[0]??0;return t==null?r:W(t)??r},t[36]=n,t[37]=W,t[38]=He):He=t[38];let Ue=He,We;t[39]!==w||t[40]!==E||t[41]!==L.length?(We=l(w,L.length)||p(E,L.length),t[39]=w,t[40]=E,t[41]=L.length,t[42]=We):We=t[42];let Ge=We,Y,X,Z;if(t[43]!==U||t[44]!==pe||t[45]!==Ve||t[46]!==Ge||t[47]!==V||t[48]!==N){let e=v(pe);Y=e.any?`url(#${Ve})`:N;let n=e.any?m(e):null,r=U===`revealing`||U===`ready`||U===`exitingReady`;Z=`transparent`,r&&!Ge&&(Z=Y),X=n?/* @__PURE__ */ (0,j.jsx)(`defs`,{children:/* @__PURE__ */ (0,j.jsx)(`linearGradient`,{id:Ve,...d(V),children:n.map(e=>/* @__PURE__ */ (0,j.jsx)(`stop`,{offset:e.offset,style:{stopColor:N,stopOpacity:e.opacity}},e.offset))})}):null,t[43]=U,t[44]=pe,t[45]=Ve,t[46]=Ge,t[47]=V,t[48]=N,t[49]=Y,t[50]=X,t[51]=Z}else Y=t[49],X=t[50],Z=t[51];let Q;t[52]!==we||t[53]!==fe||t[54]!==F||t[55]!==n||t[56]!==Ue||t[57]!==R||t[58]!==P||t[59]!==G||t[60]!==Z||t[61]!==H||t[62]!==z?(Q=/* @__PURE__ */ (0,j.jsx)(oe,{animatedPathD:we,connectNulls:fe,curve:F,dataKey:n,getY:Ue,pathRef:Ne,renderData:R,strokeWidth:P,useDataTransitionPath:G,visibleStroke:Z,xAccessor:H,xScale:z}),t[52]=we,t[53]=fe,t[54]=F,t[55]=n,t[56]=Ue,t[57]=R,t[58]=P,t[59]=G,t[60]=Z,t[61]=H,t[62]=z,t[63]=Q):Q=t[63];let Ke;t[64]!==ge||t[65]!==w||t[66]!==E||t[67]!==L||t[68]!==B||t[69]!==V||t[70]!==Y||t[71]!==J||t[72]!==Ie||t[73]!==P||t[74]!==H||t[75]!==z?(Ke=/* @__PURE__ */ (0,j.jsx)(g,{dashArray:ge,dashFromIndex:w,dashUntilIndex:E,data:L,innerHeight:B,innerWidth:V,pathD:J,pathLength:Ie,stroke:Y,strokeWidth:P,xAccessor:H,xScale:z}),t[64]=ge,t[65]=w,t[66]=E,t[67]=L,t[68]=B,t[69]=V,t[70]=Y,t[71]=J,t[72]=Ie,t[73]=P,t[74]=H,t[75]=z,t[76]=Ke):Ke=t[76];let qe;t[77]!==q||t[78]!==Me||t[79]!==Q||t[80]!==Ke?(qe=/* @__PURE__ */ (0,j.jsxs)(ne,{dimOpacity:.3,enabled:q,seriesIndex:Me,children:[Q,Ke]}),t[77]=q,t[78]=Me,t[79]=Q,t[80]=Ke,t[81]=qe):qe=t[81];let Je;t[82]!==I||t[83]!==n||t[84]!==C||t[85]!==he||t[86]!==N?(Je=he?/* @__PURE__ */ (0,j.jsx)(re,{animate:I,dataKey:n,...C,fill:C?.fill??N,stroke:C?.stroke??C?.fill??N}):null,t[82]=I,t[83]=n,t[84]=C,t[85]=he,t[86]=N,t[87]=Je):Je=t[87];let Ye=J??we,Xe;t[88]!==q||t[89]!==B||t[90]!==N||t[91]!==P||t[92]!==Ye?(Xe=/* @__PURE__ */ (0,j.jsx)(te,{enabled:q,height:B,pathD:Ye,pathRef:Ne,stroke:N,strokeWidth:P}),t[88]=q,t[89]=B,t[90]=N,t[91]=P,t[92]=Ye,t[93]=Xe):Xe=t[93];let $;t[94]!==F||t[95]!==Ae||t[96]!==V||t[97]!==_e||t[98]!==ve||t[99]!==ye||t[100]!==J||t[101]!==De||t[102]!==K||t[103]!==Ee||t[104]!==P?($=/* @__PURE__ */ (0,j.jsx)(se,{curve:F,handleLoadingPulseComplete:Ae,innerWidth:V,loadingStroke:_e,loadingStrokeOpacity:ve,loadingStyle:ye,pathD:J,pulseEpoch:De,pulseMode:K,showLoadingPulse:Ee,strokeWidth:P}),t[94]=F,t[95]=Ae,t[96]=V,t[97]=_e,t[98]=ve,t[99]=ye,t[100]=J,t[101]=De,t[102]=K,t[103]=Ee,t[104]=P,t[105]=$):$=t[105];let Ze;return t[106]!==X||t[107]!==qe||t[108]!==Je||t[109]!==Xe||t[110]!==$?(Ze=/* @__PURE__ */ (0,j.jsxs)(j.Fragment,{children:[X,qe,Je,Xe,$]}),t[106]=X,t[107]=qe,t[108]=Je,t[109]=Xe,t[110]=$,t[111]=Ze):Ze=t[111],Ze}function le(e){return e+1}ce.displayName=`Line`;function ue(e){return e===`ready`||e===`exitingReady`}function M(e){let t=(0,ae.c)(21),{dataKey:r,yAxisId:i,shape:a,fill:s,stroke:c,radius:l,ringGap:u,strokeWidth:d}=e,f=a===void 0?`circle`:a,p=s===void 0?`transparent`:s,m=c===void 0?`var(--chart-1)`:c,h=l===void 0?5:l,g=u===void 0?0:u,_=d===void 0?1.5:d,{chartPhase:v,revealEpoch:y,enterTransition:x}=b(),S=n(r,`last`,i),ee=ue(v),C;t[0]===x?C=t[1]:(C=x&&typeof x==`object`?x:{duration:.28,ease:[.22,1,.36,1]},t[0]=x,t[1]=C);let te=C;if(!S)return null;let ne=+!!ee,re=ee?1:.55,T;t[2]!==ne||t[3]!==re?(T={opacity:ne,scale:re},t[2]=ne,t[3]=re,t[4]=T):T=t[4];let E;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(E={opacity:0,scale:.55},t[5]=E):E=t[5];let D=y??0,O;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(O={transformBox:`fill-box`,transformOrigin:`center`},t[6]=O):O=t[6];let k;t[7]!==p||t[8]!==S.cx||t[9]!==S.cy||t[10]!==h||t[11]!==g||t[12]!==f||t[13]!==m||t[14]!==_?(k=/* @__PURE__ */ (0,j.jsx)(w,{cx:S.cx,cy:S.cy,fill:p,radius:h,ringGap:g,shape:f,stroke:m,strokeWidth:_}),t[7]=p,t[8]=S.cx,t[9]=S.cy,t[10]=h,t[11]=g,t[12]=f,t[13]=m,t[14]=_,t[15]=k):k=t[15];let A;return t[16]!==te||t[17]!==T||t[18]!==D||t[19]!==k?(A=/* @__PURE__ */ (0,j.jsx)(o.g,{animate:T,initial:E,style:O,transition:te,children:k},D),t[16]=te,t[17]=T,t[18]=D,t[19]=k,t[20]=A):A=t[20],A}M.displayName=`LineSeriesTerminalMarker`,M.__isPostOverlay=!0;export{ce as n,M as t};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-BWaJ3C7D.js";import{t}from"./react-CUaU2Z9V.js";import{c as n,f as r,g as i,h as a,m as o,u as s,w as c}from"./series-tag-BaecVmtO.js";import{t as l}from"./compiler-runtime-B3BlmaWz.js";import{t as u}from"./jsx-runtime-Dgn0yPdi.js";import{n as d}from"./react-B3hSlcN2.js";import{t as f}from"./animate-CDZpAV4V.js";import{t as p}from"./use-transform-BCUQCfk7.js";import{t as m}from"./use-motion-value-Cmuy9rGX.js";import{n as h,r as g}from"./animation-D8IqP_32.js";import{t as _}from"./linear-CCtfjCEb.js";import{t as v}from"./time-IoebuFti.js";import{a as y,i as b,r as x}from"./y-axis-scales-Di1QS_P5.js";import{n as S,o as C,t as ee}from"./chart-context-DEIvTsqh.js";import{n as w,t as T}from"./line-loading-timing-CPzkfImv.js";import{a as E,t as D}from"./chart-formatters-C23Gt1wa.js";import{r as O}from"./chart-density-B2pG6con.js";import{a as k,i as te,n as A}from"./chart-phase-BaIoHaYw.js";import{a as j,c as M,i as N,o as ne}from"./chart-child-passthrough-CU3_U3Y7.js";import{a as re,i as ie,o as ae,r as oe,s as se}from"./projection-config-BrjUSVSl.js";import{r as ce}from"./y-domain-utils-DBuIZ5LP.js";import{n as le}from"./reference-area-C1I15Ptt.js";import{n as ue,t as de}from"./chart-defs-DZc-Ynt6.js";import{n as fe,r as pe}from"./decimate-time-series-x2tNinEL.js";import{t as me}from"./reference-area-config-BIi3r2Ui.js";function he(e,t){let n,r;if(t===void 0)for(let t of e)t!=null&&(n===void 0?t>=t&&(n=r=t):(n>t&&(n=t),r<t&&(r=t)));else{let i=-1;for(let a of e)(a=t(a,++i,e))!=null&&(n===void 0?a>=a&&(n=r=a):(n>a&&(n=a),r<a&&(r=a)))}return[n,r]}function P(e){this._context=e}P.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=F(e),i=F(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o])}(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function F(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function I(e){return new P(e)}function L(e){return e===!1?{left:!1,right:!1,any:!1}:e===`left`?{left:!0,right:!1,any:!0}:e===`right`?{left:!1,right:!0,any:!0}:{left:!0,right:!0,any:!0}}function R(e){return[{offset:`0%`,opacity:+!e.left},{offset:`15%`,opacity:1},{offset:`85%`,opacity:1},{offset:`100%`,opacity:+!e.right}]}function z(e){return{gradientUnits:`userSpaceOnUse`,x1:0,x2:e,y1:0,y2:0}}var ge=l(),B=/* @__PURE__ */ e(t(),1),V=/* @__PURE__ */ e(u(),1);function _e(e){switch(e){case`loading`:return`loop`;case`exiting`:return`exit`;case`revealingLoading`:return`enter`;default:return null}}function ve(e,t,n,r){let i=(0,ge.c)(19),a=m(0),o=e+20,s=e+10,c;i[0]===o?c=i[1]:(c=e=>e<=.5?e/.5*o:(1-(e-.5)/.5)*o,i[0]=o,i[1]=c);let l=p(a,c),u;i[2]!==o||i[3]!==s?(u=e=>{if(e<=.5)return-10;let t=(e-.5)/.5;return s-(1-t)*o},i[2]=o,i[3]=s,i[4]=u):u=i[4];let d=p(a,u),h;i[5]!==e||i[6]!==t||i[7]!==r||i[8]!==a?(h=()=>{if(e<=0)return;let n=T/2,i=!1,o,s=()=>{i||r?.()},c=e=>{let t=n*((1-e)/.5);o=f(a,1,{duration:Math.max(t,.01),ease:[...w],onComplete:s})};if(t===`loop`)return a.set(0),o=f(a,1,{duration:T,ease:[...w],onComplete:s}),()=>{i=!0,o?.stop()};if(t===`exit`){let e=a.get();if(e<.5){let t=n*((.5-e)/.5);o=f(a,.5,{duration:Math.max(t,.01),ease:[...w],onComplete:()=>{i||c(.5)}})}else c(e);return()=>{i=!0,o?.stop()}}if(t===`enter`)return a.set(0),o=f(a,.5,{duration:n,ease:[...w],onComplete:s}),()=>{i=!0,o?.stop()}},i[5]=e,i[6]=t,i[7]=r,i[8]=a,i[9]=h):h=i[9];let g;i[10]!==e||i[11]!==n||i[12]!==t||i[13]!==r||i[14]!==a?(g=[e,n,t,r,a],i[10]=e,i[11]=n,i[12]=t,i[13]=r,i[14]=a,i[15]=g):g=i[15],(0,B.useEffect)(h,g);let _;return i[16]!==l||i[17]!==d?(_={clipX:d,clipWidth:l},i[16]=l,i[17]=d,i[18]=_):_=i[18],_}function H(e){let t=(0,ge.c)(29),{pathD:n,mode:r,loopEpoch:i,stroke:a,strokeOpacity:o,strokeWidth:s,onCycleComplete:c}=e,l=r===void 0?`loop`:r,u=i===void 0?0:i,f=a===void 0?S.foreground:a,p=o===void 0?.5:o,m=s===void 0?2.5:s,{innerWidth:h,innerHeight:g}=C(),_=(0,B.useId)(),v=`line-loading-clip-${_}`,y=`line-loading-gradient-${_}`,b=R(L(!0)),x=g+20,{clipX:ee,clipWidth:w}=ve(h,l,u,c);if(h<=0)return null;let T;t[0]!==w||t[1]!==ee?(T={width:w,x:ee},t[0]=w,t[1]=ee,t[2]=T):T=t[2];let E;t[3]!==x||t[4]!==T?(E=/* @__PURE__ */ (0,V.jsx)(d.rect,{height:x,style:T,y:-10}),t[3]=x,t[4]=T,t[5]=E):E=t[5];let D;t[6]!==v||t[7]!==E?(D=/* @__PURE__ */ (0,V.jsx)(`clipPath`,{id:v,children:E}),t[6]=v,t[7]=E,t[8]=D):D=t[8];let O;t[9]===h?O=t[10]:(O=z(h),t[9]=h,t[10]=O);let k;t[11]===f?k=t[12]:(k=e=>/* @__PURE__ */ (0,V.jsx)(`stop`,{offset:e.offset,stopColor:f,stopOpacity:e.opacity},e.offset),t[11]=f,t[12]=k);let te=b.map(k),A;t[13]!==y||t[14]!==te||t[15]!==O?(A=/* @__PURE__ */ (0,V.jsx)(`linearGradient`,{id:y,...O,children:te}),t[13]=y,t[14]=te,t[15]=O,t[16]=A):A=t[16];let j;t[17]!==A||t[18]!==D?(j=/* @__PURE__ */ (0,V.jsxs)(`defs`,{children:[D,A]}),t[17]=A,t[18]=D,t[19]=j):j=t[19];let M=`url(#${v})`,N=`url(#${y})`,ne;t[20]!==n||t[21]!==p||t[22]!==m||t[23]!==M||t[24]!==N?(ne=/* @__PURE__ */ (0,V.jsx)(`path`,{clipPath:M,d:n,fill:`none`,opacity:p,stroke:N,strokeLinecap:`round`,strokeWidth:m}),t[20]=n,t[21]=p,t[22]=m,t[23]=M,t[24]=N,t[25]=ne):ne=t[25];let re;return t[26]!==j||t[27]!==ne?(re=/* @__PURE__ */ (0,V.jsxs)(V.Fragment,{children:[j,ne]}),t[26]=j,t[27]=ne,t[28]=re):re=t[28],re}const ye={pathD:null,pathLength:0};function be(e,t){let[n,r]=(0,B.useState)(ye);return(0,B.useEffect)(()=>{let t=e.current;if(!t)return;let n=t.getAttribute(`d`),i=n?t.getTotalLength():0;r(e=>e.pathD===n&&e.pathLength===i?e:{pathD:n,pathLength:i})},t),n}function xe(e,t){return e!=null&&e>=0&&e<t-1}function Se(e,t){return e!=null&&e>0&&e<t}function Ce(e,t,n,r){let i=e[t];return i?n(r(i))??0:0}function we(e){let t=(0,ge.c)(45),{pathD:n,pathLength:r,dashStartX:i,leadEndX:a,innerWidth:o,innerHeight:s,stroke:c,strokeWidth:l,dashArray:u}=e,d=(0,B.useId)(),f;if(t[0]!==d){let e;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=/:/g,t[2]=e):e=t[2],f=d.replace(e,``),t[0]=d,t[1]=f}else f=t[1];let p=f,m=`${p}-solid`,h=`${p}-dashed`;if(!n||r<=0||i==null&&a==null)return null;let g=l*2,_=l,v=-g,y=o+g,b=a??v,x=i??y,S=-g,C=s+g*2,ee=Math.max(0,x-b),w;t[3]!==C||t[4]!==S||t[5]!==b||t[6]!==ee?(w=/* @__PURE__ */ (0,V.jsx)(`rect`,{height:C,width:ee,x:b,y:S}),t[3]=C,t[4]=S,t[5]=b,t[6]=ee,t[7]=w):w=t[7];let T;t[8]!==m||t[9]!==w?(T=/* @__PURE__ */ (0,V.jsx)(`clipPath`,{id:m,children:w}),t[8]=m,t[9]=w,t[10]=T):T=t[10];let E;t[11]!==C||t[12]!==S||t[13]!==a||t[14]!==_||t[15]!==v?(E=a==null?null:/* @__PURE__ */ (0,V.jsx)(`rect`,{height:C,width:Math.max(0,a+_-v),x:v,y:S}),t[11]=C,t[12]=S,t[13]=a,t[14]=_,t[15]=v,t[16]=E):E=t[16];let D;t[17]!==C||t[18]!==S||t[19]!==i||t[20]!==_||t[21]!==y?(D=i==null?null:/* @__PURE__ */ (0,V.jsx)(`rect`,{height:C,width:Math.max(0,y-(i-_)),x:i-_,y:S}),t[17]=C,t[18]=S,t[19]=i,t[20]=_,t[21]=y,t[22]=D):D=t[22];let O;t[23]!==h||t[24]!==E||t[25]!==D?(O=/* @__PURE__ */ (0,V.jsxs)(`clipPath`,{id:h,children:[E,D]}),t[23]=h,t[24]=E,t[25]=D,t[26]=O):O=t[26];let k;t[27]!==T||t[28]!==O?(k=/* @__PURE__ */ (0,V.jsxs)(`defs`,{children:[T,O]}),t[27]=T,t[28]=O,t[29]=k):k=t[29];let te=`url(#${m})`,A;t[30]!==n||t[31]!==c||t[32]!==l||t[33]!==te?(A=/* @__PURE__ */ (0,V.jsx)(`path`,{clipPath:te,d:n,fill:`none`,stroke:c,strokeLinecap:`round`,strokeWidth:l}),t[30]=n,t[31]=c,t[32]=l,t[33]=te,t[34]=A):A=t[34];let j=`url(#${h})`,M;t[35]!==u||t[36]!==n||t[37]!==c||t[38]!==l||t[39]!==j?(M=/* @__PURE__ */ (0,V.jsx)(`path`,{clipPath:j,d:n,fill:`none`,stroke:c,strokeDasharray:u,strokeLinecap:`round`,strokeWidth:l}),t[35]=u,t[36]=n,t[37]=c,t[38]=l,t[39]=j,t[40]=M):M=t[40];let N;return t[41]!==A||t[42]!==M||t[43]!==k?(N=/* @__PURE__ */ (0,V.jsxs)(V.Fragment,{children:[k,A,M]}),t[41]=A,t[42]=M,t[43]=k,t[44]=N):N=t[44],N}function Te(e){let t=(0,ge.c)(28),{dashFromIndex:n,dashUntilIndex:r,dashArray:i,data:a,pathD:o,pathLength:s,innerWidth:c,innerHeight:l,stroke:u,strokeWidth:d,xScale:f,xAccessor:p}=e,m;t[0]!==n||t[1]!==a.length?(m=xe(n,a.length),t[0]=n,t[1]=a.length,t[2]=m):m=t[2];let h=m,g;t[3]!==r||t[4]!==a.length?(g=Se(r,a.length),t[3]=r,t[4]=a.length,t[5]=g):g=t[5];let _=g;if(!h&&!_||s<=0)return null;let v;t[6]!==n||t[7]!==a||t[8]!==h||t[9]!==p||t[10]!==f?(v=h&&n!=null?Ce(a,n,f,p):void 0,t[6]=n,t[7]=a,t[8]=h,t[9]=p,t[10]=f,t[11]=v):v=t[11];let y=v,b;t[12]!==r||t[13]!==a||t[14]!==_||t[15]!==p||t[16]!==f?(b=_&&r!=null?Ce(a,r,f,p):void 0,t[12]=r,t[13]=a,t[14]=_,t[15]=p,t[16]=f,t[17]=b):b=t[17];let x=b,S;return t[18]!==i||t[19]!==y||t[20]!==l||t[21]!==c||t[22]!==x||t[23]!==o||t[24]!==s||t[25]!==u||t[26]!==d?(S=/* @__PURE__ */ (0,V.jsx)(we,{dashArray:i,dashStartX:y,innerHeight:l,innerWidth:c,leadEndX:x,pathD:o,pathLength:s,stroke:u,strokeWidth:d}),t[18]=i,t[19]=y,t[20]=l,t[21]=c,t[22]=x,t[23]=o,t[24]=s,t[25]=u,t[26]=d,t[27]=S):S=t[27],S}const Ee=(0,B.memo)(Te);function De(e,t,n){let r=t[0].getTime(),i=t[1].getTime(),a=Math.min(r,i),o=Math.max(r,i);return e.filter(e=>{let t=n(e).getTime();return t>=a&&t<=o})}function Oe(e,t,n){return!n||t<=0||e<=0?0:e/(2*t)}function ke(e){let{innerWidth:t,dataLength:n,columnWidth:r,seriesCount:i,composedBarSize:a,composedMaxBarSize:o,composedBarGap:s=4,stacked:c=!1}=e,l=s,u=c?1:Math.max(1,i),d=r;d<=0&&(d=n<2?t:t/(n-1));let f=a??Math.min(d*.88,o??1/0);if(o!=null&&(f=Math.min(f,o)),u>1){let e=d*.92;u*f+(u-1)*l>e&&e>0&&(f=Math.max(4,(e-(u-1)*l)/u))}return Math.max(2,f)}function Ae(e){let{barWidth:t,seriesCount:n,gap:r=4,stacked:i=!1}=e;if(i||n<=1)return Math.ceil(t/2);let a=n*t+(n-1)*r;return Math.ceil(a/2)}function je({chartStatus:e,targetData:t,skeletonData:n,animationDuration:r,yDomainTweenDuration:i,revealSignature:a=``,skipEnterReveal:o=!1}){let[s,c]=(0,B.useState)(()=>k(e)),[l,u]=(0,B.useState)(()=>e===`loading`?n:t),[d,f]=(0,B.useState)(0),[p,m]=(0,B.useState)(0),[h,g]=(0,B.useState)(()=>e===`ready`),_=(0,B.useRef)(e),v=(0,B.useRef)(s);v.current=s;let y=(0,B.useRef)(n);y.current=n,(0,B.useEffect)(()=>{let n=_.current;n!==e&&(_.current=e,e===`ready`&&n===`loading`?(g(!1),r<=0?i<=0?(u(t),c(`revealing`)):c(`gridTweenReady`):c(`exiting`)):e===`loading`&&n===`ready`&&(g(!1),r<=0?i<=0?(u(y.current),c(`loading`)):c(`gridTweenLoading`):(m(e=>e+1),c(`exitingReady`))))},[r,e,t,i]),(0,B.useEffect)(()=>{o||e===`ready`&&v.current===`ready`&&(c(`revealing`),g(!1))},[r,e,a,o]),(0,B.useEffect)(()=>{switch(s){case`loading`:e===`loading`&&u(y.current);break;case`exiting`:u(y.current);break;case`exitingReady`:case`gridTweenLoading`:case`gridTweenReady`:case`revealing`:case`ready`:u(t)}},[s,e,t]);let b=(0,B.useCallback)(()=>{v.current===`exiting`&&c(`gridTweenReady`)},[]),x=(0,B.useCallback)(()=>{v.current===`exitingReady`&&c(`gridTweenLoading`)},[]),S=(0,B.useCallback)(()=>{v.current===`gridTweenLoading`?c(`loading`):v.current===`gridTweenReady`&&c(`revealing`)},[]);return(0,B.useEffect)(()=>{if(s!==`revealing`)return;if(f(e=>e+1),r<=0){c(`ready`),g(!0);return}let e=window.setTimeout(()=>{c(`ready`),g(!0)},r);return()=>window.clearTimeout(e)},[r,s]),{chartPhase:s,plotData:l,revealEpoch:d,concealEpoch:p,isLoaded:h,notifyLoadingPulseComplete:b,notifyRevealConcealComplete:x,notifyYDomainTweenComplete:S}}function U(e,t){let n=1/0,r=-1/0;for(let i of e)for(let e of t){let t=D(i[e]);t!=null&&(t<n&&(n=t),t>r&&(r=t))}return n===1/0?{minValue:0,maxValue:100}:{minValue:n,maxValue:r}}function Me(e,t,n,r=!0){if(n!=null&&n>0)return[0,n*1.1];let{minValue:i,maxValue:a}=U(e,t);if(i===a){let e=Math.abs(a)||1;return[r&&i>=0?0:i-e,a+e]}if(r&&i>=0)return[0,a*1.1];if(i>=0)return[i,a];let o=(a-i)*.05||1;return[i-o,a+o]}function Ne(e,t){return e.key==null?(0,B.cloneElement)(e,{key:`chart-child-${t}`}):e}function Pe(e,t){let n=/* @__PURE__ */ new Map;for(let r of e){let e=String(r[t]);n.has(e)||n.set(e,n.size)}return n}function Fe(e){let t=(0,ge.c)(2),{width:n,height:r}=e;if(n<10||r<10)return null;let i;return t[0]===e?i=t[1]:(i=/* @__PURE__ */ (0,V.jsx)(Ie,{...e}),t[0]=e,t[1]=i),i}const Ie=(0,B.memo)(function(e){let t=(0,ge.c)(157),{width:l,height:u,data:d,xDataKey:f,xScaleType:p,xTickFormat:m,margin:S,density:C,animationDuration:w,animationEasing:T,enterTransition:D,revealSignature:k,children:P,containerRef:F,lines:I,clipPathId:L,composedBarDataKeys:R,composedBarSize:z,composedMaxBarSize:_e,composedBarGap:ve,composedStacked:H,composedStackOffsets:ye,composedStackGap:be,yScaleDomainMax:xe,startFromZero:Se,chartStatus:Ce,loadingLabel:we,yDomainTween:Te,yDomainTweenDuration:Ee,xDomain:U,xDomainSlotCount:Fe,tweenYDomainOnXDomainChange:Ie,onPhaseChange:ze}=e,W=p===void 0?`time`:p,Be=C===void 0?O:C,Ve=T===void 0?h:T,He=k===void 0?``:k,Ue=Se===void 0||Se,We=Ce===void 0?A:Ce,Ge=Te===void 0||Te,Ke=Ee===void 0?500:Ee,qe=Ie!==void 0&&Ie,Je=r(),G=l-S.left-S.right,K=u-S.top-S.bottom,Ye;t[0]!==I||t[1]!==Ue||t[2]!==xe?(Ye=(e,t)=>{let n=y(I);return Me(e,t,n.size===1&&n.has(`left`)&&xe!=null?xe:void 0,Ue)},t[0]=I,t[1]=Ue,t[2]=xe,t[3]=Ye):Ye=t[3];let Xe=Ye,Ze=I[0]?.dataKey??`value`,Qe=d.length===0?o({dataKey:Ze}):a(d,Ze),{chartPhase:q,plotData:J,revealEpoch:$e,concealEpoch:et,isLoaded:tt,notifyLoadingPulseComplete:nt,notifyRevealConcealComplete:rt,notifyYDomainTweenComplete:it}=je({animationDuration:w,chartStatus:We,revealSignature:He,skeletonData:Qe,skipEnterReveal:Je,targetData:d,yDomainTweenDuration:Ke}),at,ot;t[4]!==q||t[5]!==ze?(at=()=>{ze?.(q)},ot=[q,ze],t[4]=q,t[5]=ze,t[6]=at,t[7]=ot):(at=t[6],ot=t[7]),(0,B.useEffect)(at,ot);let st=W===`point`?Pe(d,f):null,ct;t[8]===f?ct=t[9]:(ct=e=>e[f],t[8]=f,t[9]=ct);let lt=ct,Y=e=>{let t=e[f];return W===`point`?new Date(st?.get(String(t))??0):W===`linear`?new Date(Number(t)):t instanceof Date?t:new Date(t)},X=U?De(J,U,Y):J,ut=oe(P),dt=U?U[0].getTime():he(J,e=>Y(e).getTime())[0]??0,ft=U?U[1].getTime():he(J,e=>Y(e).getTime())[1]??dt;U||(ft=ie(ft,ut));let pt=st?.size??0,mt=W===`point`?Oe(G,pt,(R?.length??0)>0):0,ht=v({range:[mt,G-mt],domain:[dt,ft]}),gt=fe(U?J:X,pe(G),I.map(Le)),_t=U&&Fe!=null?Fe:X.length,vt=W===`point`?_t>0?G/_t:0:_t<2?0:G/(_t-1),yt=ce({lines:I,resolveDomain:e=>Xe(Qe,e)}),bt=ce({lines:I,resolveDomain:e=>Xe(U?X:d,e)});if(ut.length>0){let e=c(bt,(e,t)=>re(e,ut,t));for(let t of ut)e[t.yAxisId]||(e[t.yAxisId]=re([0,100],ut,t.yAxisId));bt=e}let xt=s({chartPhase:q,durationMs:Ke,enabled:Ge,onSettled:it,skeletonByAxis:yt,targetByAxis:bt,tweenOnTargetChange:Ge||qe&&U!=null}),St,Z;t[10]!==xt||t[11]!==K||t[12]!==I?(Z=x({domainsByAxis:xt,innerHeight:K,lines:I}),St=b(Z,_({range:[K,0],domain:[0,100],nice:!0})),t[10]=xt,t[11]=K,t[12]=I,t[13]=St,t[14]=Z):(St=t[13],Z=t[14]);let Ct=St,wt=X.map((e,t)=>m?m(lt(e),t):W===`time`?E.format(Y(e)):String(lt(e))),Tt;t[15]!==q||t[16]!==tt?(Tt=tt&&te(q),t[15]=q,t[16]=tt,t[17]=Tt):Tt=t[17];let Et=Tt,Dt=ae(ut),Ot=se(ut),kt;t[18]!==Et||t[19]!==I||t[20]!==S||t[21]!==Dt||t[22]!==Ot||t[23]!==X||t[24]!==Y||t[25]!==ht||t[26]!==Ct||t[27]!==Z?(kt={canInteract:Et,data:X,hoverMaxBySeries:Dt,hoverMaxTime:Ot,lines:I,margin:S,xAccessor:Y,xScale:ht,yScale:Ct,yScales:Z},t[18]=Et,t[19]=I,t[20]=S,t[21]=Dt,t[22]=Ot,t[23]=X,t[24]=Y,t[25]=ht,t[26]=Ct,t[27]=Z,t[28]=kt):kt=t[28];let{tooltipData:At,setTooltipData:jt,selection:Mt,clearSelection:Nt,interactionHandlers:Q,interactionStyle:Pt,isSynthesizedMouse:Ft}=n(kt),It,Lt;t[29]!==F||t[30]!==Q.onMouseLeave||t[31]!==Ft?(It=()=>{let e=F.current,t=Q.onMouseLeave;if(!(e&&t))return;let n=n=>{if(n.pointerType===`touch`||Ft())return;let r=n.relatedTarget;r instanceof Node&&e.contains(r)||t()},r=n=>{n.target instanceof Node&&e.contains(n.target)||t()};return e.addEventListener(`pointerleave`,n),document.addEventListener(`pointerdown`,r),()=>{e.removeEventListener(`pointerleave`,n),document.removeEventListener(`pointerdown`,r)}},Lt=[F,Q.onMouseLeave,Ft],t[29]=F,t[30]=Q.onMouseLeave,t[31]=Ft,t[32]=It,t[33]=Lt):(It=t[32],Lt=t[33]),(0,B.useEffect)(It,Lt);let Rt,zt,Bt,$,Vt;t[34]===P?(Rt=t[35],zt=t[36],Bt=t[37],$=t[38],Vt=t[39]):(zt=[],Rt=[],Vt=[],$=[],Bt=[],B.Children.forEach(P,(e,t)=>{if(!(0,B.isValidElement)(e))return;let n=Ne(e,t),r=M(n);de(r)?zt.push(r):ue(r)?$.push(r):j(r)?Bt.push(r):N(r)?Rt.push(r):ne(r)?Vt.push(r):$.push(r)}),t[34]=P,t[35]=Rt,t[36]=zt,t[37]=Bt,t[38]=$,t[39]=Vt);let[Ht,Ut]=(0,B.useState)(Re),Wt;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(Wt=(e,t)=>{Ut(n=>{let r=n.get(e);if(r&&r.yAxisId===t.yAxisId&&r.y1===t.y1&&r.y2===t.y2&&r.axisLabelColor===t.axisLabelColor)return n;let i=new Map(n);return i.set(e,t),i})},t[40]=Wt):Wt=t[40];let Gt=Wt,Kt;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(Kt={registerReferenceArea:Gt,unregisterReferenceArea:e=>{Ut(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})}},t[41]=Kt):Kt=t[41];let qt=Kt,Jt;if(t[42]!==P||t[43]!==Ht){let e=me(P),n;t[45]===Ht?n=t[46]:(n=[...Ht.values()],t[45]=Ht,t[46]=n);let r=n;Jt=r.length===0?e:e.length===0?r:[...e,...r],t[42]=P,t[43]=Ht,t[44]=Jt}else Jt=t[44];let Yt=Jt,Xt;t[47]!==w||t[48]!==Ve||t[49]!==q||t[50]!==We||t[51]!==Nt||t[52]!==vt||t[53]!==R||t[54]!==ve||t[55]!==z||t[56]!==_e||t[57]!==be||t[58]!==ye||t[59]!==H||t[60]!==F||t[61]!==wt||t[62]!==Be||t[63]!==D||t[64]!==u||t[65]!==K||t[66]!==G||t[67]!==tt||t[68]!==I||t[69]!==we||t[70]!==S||t[71]!==nt||t[72]!==Yt||t[73]!==gt||t[74]!==$e||t[75]!==Mt||t[76]!==jt||t[77]!==At||t[78]!==X||t[79]!==l||t[80]!==Y||t[81]!==U||t[82]!==Fe||t[83]!==ht||t[84]!==W||t[85]!==yt||t[86]!==bt||t[87]!==Ke||t[88]!==Ct||t[89]!==Z?(Xt={data:X,renderData:gt,xScale:ht,yScale:Ct,yScales:Z,width:l,height:u,innerWidth:G,innerHeight:K,margin:S,density:Be,columnWidth:vt,tooltipData:At,setTooltipData:jt,containerRef:F,lines:I,referenceAreas:Yt,chartPhase:q,chartStatus:We,loadingLabel:we,yDomainTweenDuration:Ke,yDomainSkeletonByAxis:yt,yDomainTargetByAxis:bt,isLoaded:tt,animationDuration:w,animationEasing:Ve,enterTransition:D,revealEpoch:$e,notifyLoadingPulseComplete:nt,xAccessor:Y,xScaleType:W,dateLabels:wt,xDomain:U,xDomainSlotCount:Fe,selection:Mt,clearSelection:Nt,composedBarDataKeys:R,composedBarSize:z,composedMaxBarSize:_e,composedBarGap:ve,composedStacked:H,composedStackOffsets:ye,composedStackGap:be},t[47]=w,t[48]=Ve,t[49]=q,t[50]=We,t[51]=Nt,t[52]=vt,t[53]=R,t[54]=ve,t[55]=z,t[56]=_e,t[57]=be,t[58]=ye,t[59]=H,t[60]=F,t[61]=wt,t[62]=Be,t[63]=D,t[64]=u,t[65]=K,t[66]=G,t[67]=tt,t[68]=I,t[69]=we,t[70]=S,t[71]=nt,t[72]=Yt,t[73]=gt,t[74]=$e,t[75]=Mt,t[76]=jt,t[77]=At,t[78]=X,t[79]=l,t[80]=Y,t[81]=U,t[82]=Fe,t[83]=ht,t[84]=W,t[85]=yt,t[86]=bt,t[87]=Ke,t[88]=Ct,t[89]=Z,t[90]=Xt):Xt=t[90];let Zt=Xt,Qt=!Je&&gt.length>1&&G>0&&w>0,$t=q===`revealing`,en=q===`exitingReady`&&w>0,tn;t[91]!==w||t[92]!==D?(tn=D??{...g,duration:w/1e3},t[91]=w,t[92]=D,t[93]=tn):tn=t[93];let nn=tn,rn=0;if(R?.length){let e;t[94]!==vt||t[95]!==R.length||t[96]!==ve||t[97]!==z||t[98]!==_e||t[99]!==H||t[100]!==G||t[101]!==J.length?(e=Ae({barWidth:ke({columnWidth:vt,composedBarGap:ve,composedBarSize:z,composedMaxBarSize:_e,dataLength:J.length,innerWidth:G,seriesCount:R.length,stacked:H}),gap:ve,seriesCount:R.length,stacked:H}),t[94]=vt,t[95]=R.length,t[96]=ve,t[97]=z,t[98]=_e,t[99]=H,t[100]=G,t[101]=J.length,t[102]=e):e=t[102],rn=e}let an;t[103]!==L||t[104]!==et||t[105]!==nn||t[106]!==K||t[107]!==G||t[108]!==$t||t[109]!==en||t[110]!==rt||t[111]!==rn||t[112]!==$e||t[113]!==Qt?(an=Qt?/* @__PURE__ */ (0,V.jsx)(i,{animating:$t||en,clipPathId:L,enterTransition:nn,height:K+20,mode:en?`conceal`:`reveal`,onComplete:en?rt:void 0,padding:rn,revealEpoch:en?et:$e,targetWidth:G}):null,t[103]=L,t[104]=et,t[105]=nn,t[106]=K,t[107]=G,t[108]=$t,t[109]=en,t[110]=rt,t[111]=rn,t[112]=$e,t[113]=Qt,t[114]=an):an=t[114];let on;t[115]!==zt||t[116]!==an?(on=/* @__PURE__ */ (0,V.jsxs)(`defs`,{children:[zt,an]}),t[115]=zt,t[116]=an,t[117]=on):on=t[117];let sn;t[118]!==u||t[119]!==l?(sn=/* @__PURE__ */ (0,V.jsx)(`rect`,{fill:`transparent`,height:u,width:l,x:0,y:0}),t[118]=u,t[119]=l,t[120]=sn):sn=t[120];let cn;t[121]!==F||t[122]!==Q||t[123]!==Ft?(cn=e=>{if(Ft())return;let t=e.relatedTarget;t instanceof Node&&F.current?.contains(t)||Q.onMouseLeave?.()},t[121]=F,t[122]=Q,t[123]=Ft,t[124]=cn):cn=t[124];let ln=`translate(${S.left},${S.top})`,un;t[125]!==K||t[126]!==G?(un=/* @__PURE__ */ (0,V.jsx)(`rect`,{fill:`transparent`,height:K,width:G,x:0,y:0}),t[125]=K,t[126]=G,t[127]=un):un=t[127];let dn=-S.left,fn=-S.top,pn;t[128]!==u||t[129]!==dn||t[130]!==fn||t[131]!==l?(pn=/* @__PURE__ */ (0,V.jsx)(`rect`,{"data-chart-interaction-overlay":``,fill:`transparent`,height:u,width:l,x:dn,y:fn}),t[128]=u,t[129]=dn,t[130]=fn,t[131]=l,t[132]=pn):pn=t[132];let mn;t[133]!==L||t[134]!==$||t[135]!==Qt?(mn=Qt?/* @__PURE__ */ (0,V.jsx)(`g`,{clipPath:`url(#${L})`,children:$}):$,t[133]=L,t[134]=$,t[135]=Qt,t[136]=mn):mn=t[136];let hn;t[137]!==Rt||t[138]!==Q||t[139]!==Pt||t[140]!==Bt||t[141]!==cn||t[142]!==ln||t[143]!==un||t[144]!==pn||t[145]!==mn||t[146]!==Vt?(hn=/* @__PURE__ */ (0,V.jsxs)(`g`,{...Q,onMouseLeave:cn,style:Pt,transform:ln,children:[un,pn,Rt,Vt,mn,Bt]}),t[137]=Rt,t[138]=Q,t[139]=Pt,t[140]=Bt,t[141]=cn,t[142]=ln,t[143]=un,t[144]=pn,t[145]=mn,t[146]=Vt,t[147]=hn):hn=t[147];let gn;t[148]!==u||t[149]!==on||t[150]!==sn||t[151]!==hn||t[152]!==l?(gn=/* @__PURE__ */ (0,V.jsxs)(`svg`,{"aria-hidden":`true`,height:u,width:l,children:[on,sn,hn]}),t[148]=u,t[149]=on,t[150]=sn,t[151]=hn,t[152]=l,t[153]=gn):gn=t[153];let _n;return t[154]!==Zt||t[155]!==gn?(_n=/* @__PURE__ */ (0,V.jsx)(le.Provider,{value:qt,children:/* @__PURE__ */ (0,V.jsx)(ee,{value:Zt,children:gn})}),t[154]=Zt,t[155]=gn,t[156]=_n):_n=t[156],_n});function Le(e){return e.dataKey}function Re(){return/* @__PURE__ */ new Map}export{xe as a,_e as c,z as d,I as f,Se as i,R as l,ke as n,be as o,Ee as r,H as s,Fe as t,L as u};
@@ -11,6 +11,8 @@ function useChartPhaseOrchestrator({ chartStatus, targetData, skeletonData, anim
11
11
  const prevStatusRef = useRef(chartStatus);
12
12
  const phaseRef = useRef(chartPhase);
13
13
  phaseRef.current = chartPhase;
14
+ const skeletonRef = useRef(skeletonData);
15
+ skeletonRef.current = skeletonData;
14
16
  useEffect(() => {
15
17
  const prevStatus = prevStatusRef.current;
16
18
  if (prevStatus === chartStatus) return;
@@ -29,7 +31,7 @@ function useChartPhaseOrchestrator({ chartStatus, targetData, skeletonData, anim
29
31
  setIsLoaded(false);
30
32
  if (animationDuration <= 0) {
31
33
  if (yDomainTweenDuration <= 0) {
32
- setPlotData(skeletonData);
34
+ setPlotData(skeletonRef.current);
33
35
  setChartPhase("loading");
34
36
  } else setChartPhase("gridTweenLoading");
35
37
  } else {
@@ -40,7 +42,6 @@ function useChartPhaseOrchestrator({ chartStatus, targetData, skeletonData, anim
40
42
  }, [
41
43
  animationDuration,
42
44
  chartStatus,
43
- skeletonData,
44
45
  targetData,
45
46
  yDomainTweenDuration
46
47
  ]);
@@ -59,10 +60,10 @@ function useChartPhaseOrchestrator({ chartStatus, targetData, skeletonData, anim
59
60
  useEffect(() => {
60
61
  switch (chartPhase) {
61
62
  case "loading":
62
- if (chartStatus === "loading") setPlotData(skeletonData);
63
+ if (chartStatus === "loading") setPlotData(skeletonRef.current);
63
64
  break;
64
65
  case "exiting":
65
- setPlotData(skeletonData);
66
+ setPlotData(skeletonRef.current);
66
67
  break;
67
68
  case "exitingReady":
68
69
  case "gridTweenLoading":
@@ -73,7 +74,6 @@ function useChartPhaseOrchestrator({ chartStatus, targetData, skeletonData, anim
73
74
  }, [
74
75
  chartPhase,
75
76
  chartStatus,
76
- skeletonData,
77
77
  targetData
78
78
  ]);
79
79
  /** Loading pulse exit finished — tween grid to ready spacing next. */