@undp/data-viz 2.0.8 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AreaChart.cjs +1 -1
- package/dist/AreaChart.d.ts +2 -0
- package/dist/AreaChart.js +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.d.ts +2 -0
- package/dist/BarGraph.js +1188 -1213
- package/dist/BarGraph.js.map +1 -1
- package/dist/BasicStatCard.d.ts +2 -0
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.d.ts +2 -0
- package/dist/BeeSwarmChart.js +258 -267
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.d.ts +2 -0
- package/dist/BiVariateChoroplethMap.js +126 -131
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.d.ts +2 -0
- package/dist/BulletChart.js +404 -413
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.d.ts +2 -0
- package/dist/ButterflyChart.js +179 -184
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.d.ts +2 -0
- package/dist/ChoroplethMap.js +268 -273
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.d.ts +2 -0
- package/dist/CirclePackingGraph.js +1 -1
- package/dist/DataCards.cjs +1 -1
- package/dist/DataCards.d.ts +2 -0
- package/dist/DataCards.js +2 -2
- package/dist/DataTable.d.ts +2 -0
- package/dist/DetailsModal-0Ry5nXiC.js +32 -0
- package/dist/DetailsModal-0Ry5nXiC.js.map +1 -0
- package/dist/DetailsModal-BN0HDFlV.cjs +2 -0
- package/dist/DetailsModal-BN0HDFlV.cjs.map +1 -0
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.d.ts +2 -0
- package/dist/DifferenceLineChart.js +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.d.ts +2 -0
- package/dist/DonutChart.js +185 -190
- package/dist/DonutChart.js.map +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.d.ts +2 -0
- package/dist/DotDensityMap.js +198 -203
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.d.ts +2 -0
- package/dist/DualAxisLineChart.js +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.d.ts +2 -0
- package/dist/DumbbellChart.js +364 -373
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/GeoHubCompareMaps.d.ts +2 -0
- package/dist/GeoHubMap.d.ts +2 -0
- package/dist/GeoHubMapWithLayerSelection.d.ts +2 -0
- package/dist/{GraphEl-BcKU0bG1.cjs → GraphEl-B16EYkko.cjs} +2 -2
- package/dist/{GraphEl-BcKU0bG1.cjs.map → GraphEl-B16EYkko.cjs.map} +1 -1
- package/dist/{GraphEl-CGq1EWRn.js → GraphEl-ebgfxefq.js} +3 -3
- package/dist/{GraphEl-CGq1EWRn.js.map → GraphEl-ebgfxefq.js.map} +1 -1
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.cjs.map +1 -1
- package/dist/GriddedGraphs.d.ts +3 -0
- package/dist/GriddedGraphs.js +158 -146
- package/dist/GriddedGraphs.js.map +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +3 -0
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.cjs.map +1 -1
- package/dist/HeatMap.d.ts +2 -0
- package/dist/HeatMap.js +111 -116
- package/dist/HeatMap.js.map +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.d.ts +2 -0
- package/dist/Histogram.js +1 -1
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.d.ts +2 -0
- package/dist/HybridMap.js +202 -207
- package/dist/HybridMap.js.map +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.d.ts +2 -0
- package/dist/LineChartWithConfidenceInterval.js +1 -1
- package/dist/{Modal-DGcuAHyK.js → Modal-bMQA6bL_.js} +5 -5
- package/dist/{Modal-DGcuAHyK.js.map → Modal-bMQA6bL_.js.map} +1 -1
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.cjs.map +1 -1
- package/dist/MultiGraphDashboard.d.ts +3 -0
- package/dist/MultiGraphDashboard.js +90 -85
- package/dist/MultiGraphDashboard.js.map +1 -1
- package/dist/MultiGraphDashboardFromConfig.d.ts +3 -0
- package/dist/MultiGraphDashboardWideToLongFormat.d.ts +2 -0
- package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +2 -0
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.d.ts +2 -0
- package/dist/MultiLineAltChart.js +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.d.ts +2 -0
- package/dist/MultiLineChart.js +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.cjs.map +1 -1
- package/dist/ParetoChart.d.ts +2 -0
- package/dist/ParetoChart.js +187 -192
- package/dist/ParetoChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +3 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +76 -72
- package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +3 -0
- package/dist/PerformanceIntensiveScrollStory.d.ts +2 -0
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.cjs.map +1 -1
- package/dist/RadarChart.d.ts +2 -0
- package/dist/RadarChart.js +158 -163
- package/dist/RadarChart.js.map +1 -1
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.cjs.map +1 -1
- package/dist/SankeyChart.d.ts +2 -0
- package/dist/SankeyChart.js +172 -177
- package/dist/SankeyChart.js.map +1 -1
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.cjs.map +1 -1
- package/dist/ScatterPlot.d.ts +2 -0
- package/dist/ScatterPlot.js +222 -227
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/ScrollStory.d.ts +2 -0
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.d.ts +2 -0
- package/dist/SimpleLineChart.js +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.cjs.map +1 -1
- package/dist/SingleGraphDashboard.d.ts +3 -0
- package/dist/SingleGraphDashboard.js +131 -128
- package/dist/SingleGraphDashboard.js.map +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +3 -0
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +2 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +2 -0
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +3 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js +145 -141
- package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +3 -0
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.cjs.map +1 -1
- package/dist/SlopeChart.d.ts +2 -0
- package/dist/SlopeChart.js +182 -187
- package/dist/SlopeChart.js.map +1 -1
- package/dist/SparkLine.cjs +1 -1
- package/dist/SparkLine.d.ts +2 -0
- package/dist/SparkLine.js +1 -1
- package/dist/StatCardFromData.d.ts +2 -0
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.d.ts +2 -0
- package/dist/StripChart.js +249 -258
- package/dist/StripChart.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.cjs.map +1 -1
- package/dist/ThreeDGlobe.d.ts +2 -0
- package/dist/ThreeDGlobe.js +142 -147
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/Tooltip-Dj5eVppQ.js +45 -0
- package/dist/Tooltip-Dj5eVppQ.js.map +1 -0
- package/dist/Tooltip-uUdw6wJL.cjs +2 -0
- package/dist/Tooltip-uUdw6wJL.cjs.map +1 -0
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.cjs.map +1 -1
- package/dist/TreeMapGraph.d.ts +2 -0
- package/dist/TreeMapGraph.js +159 -164
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/Types.d.ts +3 -0
- package/dist/UnitChart.d.ts +2 -0
- package/dist/{checkIfMultiple-Y9iKaV_u.js → checkIfMultiple-CIRtG0KE.js} +2 -2
- package/dist/{checkIfMultiple-Y9iKaV_u.js.map → checkIfMultiple-CIRtG0KE.js.map} +1 -1
- package/dist/getUniqValue-DsqSii6M.js +11 -0
- package/dist/getUniqValue-DsqSii6M.js.map +1 -0
- package/dist/getUniqValue-NX8DgwND.cjs +2 -0
- package/dist/getUniqValue-NX8DgwND.cjs.map +1 -0
- package/dist/index-BBV4tAeA.js +330 -0
- package/dist/index-BBV4tAeA.js.map +1 -0
- package/dist/index-CF5hnGvG.cjs +2 -0
- package/dist/index-CF5hnGvG.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -2
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/package.json +1 -1
- package/dist/Tooltip-4dJo4_AF.cjs +0 -2
- package/dist/Tooltip-4dJo4_AF.cjs.map +0 -1
- package/dist/Tooltip-CwWUegPB.js +0 -43
- package/dist/Tooltip-CwWUegPB.js.map +0 -1
- package/dist/getUniqValue-BKHCm3zE.js +0 -11
- package/dist/getUniqValue-BKHCm3zE.js.map +0 -1
- package/dist/getUniqValue-RViz8tTw.cjs +0 -2
- package/dist/getUniqValue-RViz8tTw.cjs.map +0 -1
- package/dist/index-B2LQV7Tk.js +0 -335
- package/dist/index-B2LQV7Tk.js.map +0 -1
- package/dist/index-xRHRLDIp.cjs +0 -2
- package/dist/index-xRHRLDIp.cjs.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-CTPQjnHt.cjs"),R=require("react"),b=require("./parse-hMnG_lRV.cjs"),qe=require("./index-Cno4Q0YE.cjs"),Se=require("./numberFormattingFunction-02t-wJta.cjs"),Ge=require("./Tooltip-4dJo4_AF.cjs"),v=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Le=require("./customArea-CMF5g-C3.cjs"),We=require("./AxisTitle-sS5bLLR7.cjs"),Ye=require("./Axis-DxRV2yMi.cjs"),Xe=require("./XTicksAndGridLines-B6CELS7q.cjs"),Pe=require("./ReferenceLine-BH0qdf4R.cjs"),Be=require("./YTicksAndGridLines-4pxTRlRK.cjs"),ze=require("./index-B_sAFsEV.cjs"),G=require("./Colors.cjs"),Ee=require("./uniqBy-O05lp2S5.cjs"),Je=require("./sort-O96oMZLb.cjs"),Ke=require("./time-CZd5YLSP.cjs"),Qe=require("./linear-BwPAspcq.cjs"),Ze=require("./delaunay-rcy0HhZi.cjs"),Me=require("./line-DHV4JwCR.cjs"),Re=require("./step-BZ3C8QFW.cjs"),_e=require("./select-Bnfk0lJx.cjs"),Te=require("./init-DU0ybBc_.cjs"),ti=require("./pointer-Dkq5NV1q.cjs"),ei=require("./use-in-view-QcfiW0w3.cjs"),Ut=require("./proxy-BxvUI_9l.cjs"),ii=require("./GraphFooter.cjs"),oi=require("./GraphHeader.cjs"),ni=require("./EmptyState-sAEZ_5rU.cjs"),ri=require("./ColorLegendWithMouseOver.cjs"),Ie=require("./GraphContainer-d8A46BK2.cjs"),si=require("./getNoOfTicks-C_1CFXv_.cjs");function li(i){const t=n.compilerRuntimeExports.c(128),{data:u,width:tt,height:Ft,lineColors:f,dateFormat:r,noOfXTicks:me,rightMargin:et,topMargin:Ht,bottomMargin:it,suffix:$,prefix:h,leftMargin:C,tooltip:yt,onSeriesMouseOver:ot,refValues:nt,highlightAreaSettings:Gt,minValue:W,maxValue:vt,highlightedLines:V,animate:s,rtl:Y,strokeWidth:q,showDots:oe,annotations:jt,customHighlightAreaSettings:Wt,yAxisTitle:X,noOfYTicks:Yt,minDate:Xt,maxDate:Pt,curveType:rt,styles:j,colorDomain:k,selectedColor:Ot,classNames:w,showLabels:pe,dimmedOpacity:N,precision:P,naLabel:de,customLayers:B}=i,bt=R.useRef(null);let z;t[0]!==s.amount||t[1]!==s.once?(z={once:s.once,amount:s.amount},t[0]=s.amount,t[1]=s.once,t[2]=z):z=t[2];const x=ei.useInView(bt,z),[D,ne]=R.useState(!1);let Ct,st;t[3]!==s.duration||t[4]!==D||t[5]!==x?(Ct=()=>{if(x&&!D){const e=setTimeout(()=>{ne(!0)},(s.duration+.5)*1e3);return()=>clearTimeout(e)}},st=[x,D,s.duration],t[3]=s.duration,t[4]=D,t[5]=x,t[6]=Ct,t[7]=st):(Ct=t[6],st=t[7]),R.useEffect(Ct,st);const re=rt==="linear"?Me.curveLinear:rt==="step"?Re.curveStep:rt==="stepAfter"?Re.stepAfter:rt==="stepBefore"?Re.stepBefore:Re.monotoneX;let wt;t[8]!==r?(wt=e=>({...e,date:b.parse(`${e.date}`,r,new Date)}),t[8]=r,t[9]=wt):wt=t[9];const l=qe.orderBy(u.map(wt),["date"],["asc"]).filter(Vi),g=Ee.uniqBy(l,"label",!0);let Rt;t[10]!==r?(Rt=e=>b.parse(`${e}`,r,new Date),t[10]=r,t[11]=Rt):Rt=t[11];const Bt=Je.sort(Ee.uniqBy(u,"date",!0).map(Rt),$i),[m,lt]=R.useState(void 0),[at,J]=R.useState(void 0),[ct,K]=R.useState(void 0),Et=X?C+30:C;let ut;t[12]!==it||t[13]!==et||t[14]!==Et||t[15]!==Ht?(ut={top:Ht,bottom:it,left:Et,right:et},t[12]=it,t[13]=et,t[14]=Et,t[15]=Ht,t[16]=ut):ut=t[16];const d=ut,se=R.useRef(null),le=g.map(e=>qe.orderBy(l.filter(o=>o.label==e),["date"],["asc"]));let ft;if(t[17]!==r||t[18]!==Gt){let e;t[20]!==r?(e=o=>({...o,coordinates:[o.coordinates[0]===null?null:b.parse(`${o.coordinates[0]}`,r,new Date),o.coordinates[1]===null?null:b.parse(`${o.coordinates[1]}`,r,new Date)]}),t[20]=r,t[21]=e):e=t[21],ft=Gt.map(e),t[17]=r,t[18]=Gt,t[19]=ft}else ft=t[19];const At=ft;let xt;if(t[22]!==Wt||t[23]!==r){let e;t[25]!==r?(e=o=>({...o,coordinates:o.coordinates.map((y,Vt)=>Vt%2===0?b.parse(`${y}`,r,new Date):y)}),t[25]=r,t[26]=e):e=t[26],xt=Wt.map(e),t[22]=Wt,t[23]=r,t[24]=xt}else xt=t[24];const zt=xt,p=tt-d.left-d.right,E=Ft-d.top-d.bottom,ae=Xt?b.parse(`${Xt}`,r,new Date):Bt[0],Jt=Pt?b.parse(`${Pt}`,r,new Date):Bt[Bt.length-1],O=v.checkIfNullOrUndefined(W)?Math.min(...l.map(Ti).filter(Ii))?Math.min(...l.map(Mi).filter(Si))>0?0:Math.min(...l.map(qi).filter(Li)):0:W,U=Math.max(...l.map(Di).filter(Ni))?Math.max(...l.map(ki).filter(Ai)):0,a=Ke.time().domain([ae,Jt]).range([0,p]);let Q;t[27]!==O||t[28]!==W?(Q=v.checkIfNullOrUndefined(W)?O:W,t[27]=O,t[28]=W,t[29]=Q):Q=t[29];let L;t[30]!==U||t[31]!==vt?(L=v.checkIfNullOrUndefined(vt)?U>0?U:0:vt,t[30]=U,t[31]=vt,t[32]=L):L=t[32];const c=Qe.linear().domain([Q,L]).range([E,0]).nice(),ce=Ze.Delaunay.from(l.filter(Ei),e=>a(e.date),e=>c(e.y)).voronoi([0,0,p<0?0:p,E<0?0:E]),kt=Me.line().x(e=>a(e.date)).y(e=>c(e.y)).curve(re),Nt=c.ticks(Yt),Kt=a.ticks(me);R.useEffect(()=>{const e=y=>{const Vt=l[Te.bisectCenter(l.map(Ri),a.invert(ti.pointer(y)[0]),0)];lt(Vt||l[l.length-1]),K(y.clientY),J(y.clientX),ot?.(Vt||l[l.length-1])},o=()=>{lt(void 0),J(void 0),K(void 0)};_e.select(se.current).on("mousemove",e).on("mouseout",o),ot?.(void 0)},[a,l,ot]);let Z;t[33]!==s||t[34]!==E||t[35]!==p||t[36]!==At||t[37]!==x||t[38]!==a?(Z=n.jsxRuntimeExports.jsx(ze.HighlightArea,{areaSettings:At,width:p,height:E,scale:a,animate:s,isInView:x}),t[33]=s,t[34]=E,t[35]=p,t[36]=At,t[37]=x,t[38]=a,t[39]=Z):Z=t[39];const Dt=j?.yAxis?.gridLines,S=j?.yAxis?.labels;let mt;t[40]!==Dt||t[41]!==S?(mt={gridLines:Dt,labels:S},t[40]=Dt,t[41]=S,t[42]=mt):mt=t[42];const Lt=w?.yAxis?.gridLines,qt=w?.yAxis?.labels;let pt;t[43]!==Lt||t[44]!==qt?(pt={gridLines:Lt,labels:qt},t[43]=Lt,t[44]=qt,t[45]=pt):pt=t[45];const dt=c(O<0?0:O),St=c(O<0?0:O),Mt=0-C,_=p+d.right,ue=O<0?0:O;let M;t[46]!==P||t[47]!==h||t[48]!==$||t[49]!==ue?(M=Se.numberFormattingFunction(ue,"NA",P,h,$),t[46]=P,t[47]=h,t[48]=$,t[49]=ue,t[50]=M):M=t[50];const fe=0-C,It=c(O<0?0:O),xe=U<0?"1em":-5;let F;t[51]!==fe||t[52]!==It||t[53]!==xe?(F={x:fe,y:It,dx:0,dy:xe},t[51]=fe,t[52]=It,t[53]=xe,t[54]=F):F=t[54];const Qt=w?.xAxis?.axis,ht=w?.yAxis?.labels;let I;t[55]!==Qt||t[56]!==ht?(I={axis:Qt,label:ht},t[55]=Qt,t[56]=ht,t[57]=I):I=t[57];const Tt=j?.xAxis?.axis,$t=j?.yAxis?.labels;let A;t[58]!==Tt||t[59]!==$t?(A={axis:Tt,label:$t},t[58]=Tt,t[59]=$t,t[60]=A):A=t[60];let T;t[61]!==dt||t[62]!==St||t[63]!==Mt||t[64]!==_||t[65]!==M||t[66]!==F||t[67]!==I||t[68]!==A?(T=n.jsxRuntimeExports.jsx(Ye.Axis,{y1:dt,y2:St,x1:Mt,x2:_,label:M,labelPos:F,classNames:I,styles:A}),t[61]=dt,t[62]=St,t[63]=Mt,t[64]=_,t[65]=M,t[66]=F,t[67]=I,t[68]=A,t[69]=T):T=t[69];const H=0-C-15,gt=E/2,Zt=j?.yAxis?.title,_t=w?.yAxis?.title;let he;t[70]!==H||t[71]!==gt||t[72]!==Zt||t[73]!==_t||t[74]!==X?(he=n.jsxRuntimeExports.jsx(We.AxisTitle,{x:H,y:gt,style:Zt,className:_t,text:X,rotate90:!0}),t[70]=H,t[71]=gt,t[72]=Zt,t[73]=_t,t[74]=X,t[75]=he):he=t[75];let ge;t[76]!==r?(ge=e=>b.format(e,r),t[76]=r,t[77]=ge):ge=t[77];const $e=Kt.map(ge),Ve=Kt.map(e=>a(e)),Ae=j?.xAxis?.gridLines,ke=j?.xAxis?.labels;let ye;t[78]!==Ae||t[79]!==ke?(ye={gridLines:Ae,labels:ke},t[78]=Ae,t[79]=ke,t[80]=ye):ye=t[80];const Ne=w?.xAxis?.gridLines;let te;t[81]!==Ne?(te=n.mo("opacity-0",Ne),t[81]=Ne,t[82]=te):te=t[82];const De=w?.xAxis?.labels;let ee;t[83]!==De?(ee=n.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",De),t[83]=De,t[84]=ee):ee=t[84];let ve;t[85]!==te||t[86]!==ee?(ve={gridLines:te,labels:ee},t[85]=te,t[86]=ee,t[87]=ve):ve=t[87];let je;t[88]!==B?(je=B.filter(bi).map(Oi),t[88]=B,t[89]=je):je=t[89];const Ue=l.filter(ui).map((e,o)=>n.jsxRuntimeExports.jsx("g",{children:n.jsxRuntimeExports.jsx("path",{d:ce.renderCell(l.findIndex(y=>y.label===e.label&&y.date===e.date)),opacity:0,onMouseEnter:y=>{lt(e),K(y.clientY),J(y.clientX),ot?.(e)},onMouseMove:y=>{lt(e),K(y.clientY),J(y.clientX)},onMouseLeave:()=>{lt(void 0),J(void 0),K(void 0),ot?.(void 0)}})},o));let Oe;t[90]!==s||t[91]!==p||t[92]!==x||t[93]!==C||t[94]!==d.right||t[95]!==nt||t[96]!==c?(Oe=nt?n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:nt.map((e,o)=>n.jsxRuntimeExports.jsx(Pe.RefLineY,{text:e.text,color:e.color,y:c(e.value),x1:0-C,x2:p+d.right,classNames:e.classNames,styles:e.styles,animate:s,isInView:x},o))}):null,t[90]=s,t[91]=p,t[92]=x,t[93]=C,t[94]=d.right,t[95]=nt,t[96]=c,t[97]=Oe):Oe=t[97];let ie;if(t[98]!==s||t[99]!==jt||t[100]!==r||t[101]!==p||t[102]!==x||t[103]!==d.right||t[104]!==Y||t[105]!==a||t[106]!==c){let e;t[108]!==s||t[109]!==r||t[110]!==p||t[111]!==x||t[112]!==d.right||t[113]!==Y||t[114]!==a||t[115]!==c?(e=(o,y)=>{const Vt=Le.getLineEndPoint({x:o.xCoordinate?a(b.parse(`${o.xCoordinate}`,r,new Date))+(o.xOffset||0):0+(o.xOffset||0),y:o.yCoordinate?c(o.yCoordinate)+(o.yOffset||0)-8:0+(o.yOffset||0)-8},{x:o.xCoordinate?a(b.parse(`${o.xCoordinate}`,r,new Date)):0,y:o.yCoordinate?c(o.yCoordinate):0},v.checkIfNullOrUndefined(o.connectorRadius)?3.5:o.connectorRadius),Fe=o.showConnector?{y1:Vt.y,x1:Vt.x,y2:o.yCoordinate?c(o.yCoordinate)+(o.yOffset||0):0+(o.yOffset||0),x2:o.xCoordinate?a(b.parse(`${o.xCoordinate}`,r,new Date))+(o.xOffset||0):0+(o.xOffset||0),cy:o.yCoordinate?c(o.yCoordinate):0,cx:o.xCoordinate?a(b.parse(`${o.xCoordinate}`,r,new Date)):0,circleRadius:v.checkIfNullOrUndefined(o.connectorRadius)?3.5:o.connectorRadius,strokeWidth:o.showConnector===!0?2:Math.min(o.showConnector||0,1)}:void 0,He={y:o.yCoordinate?c(o.yCoordinate)+(o.yOffset||0)-8:0+(o.yOffset||0)-8,x:Y?0:o.xCoordinate?a(b.parse(`${o.xCoordinate}`,r,new Date))+(o.xOffset||0):0+(o.xOffset||0),width:Y?o.xCoordinate?a(b.parse(`${o.xCoordinate}`,r,new Date))+(o.xOffset||0):0+(o.xOffset||0):p+d.right-(o.xCoordinate?a(b.parse(`${o.xCoordinate}`,r,new Date))+(o.xOffset||0):0+(o.xOffset||0)),maxWidth:o.maxWidth,fontWeight:o.fontWeight,align:o.align};return n.jsxRuntimeExports.jsx(Le.Annotation,{color:o.color,connectorsSettings:Fe,labelSettings:He,text:o.text,classNames:o.classNames,styles:o.styles,animate:s,isInView:x},y)},t[108]=s,t[109]=r,t[110]=p,t[111]=x,t[112]=d.right,t[113]=Y,t[114]=a,t[115]=c,t[116]=e):e=t[116],ie=jt.map(e),t[98]=s,t[99]=jt,t[100]=r,t[101]=p,t[102]=x,t[103]=d.right,t[104]=Y,t[105]=a,t[106]=c,t[107]=ie}else ie=t[107];let be;t[117]!==ie?(be=n.jsxRuntimeExports.jsx("g",{children:ie}),t[117]=ie,t[118]=be):be=t[118];let Ce;t[119]!==B?(Ce=B.filter(ci).map(ai),t[119]=B,t[120]=Ce):Ce=t[120];let we;return t[121]!==w?.tooltip||t[122]!==at||t[123]!==ct||t[124]!==m||t[125]!==j?.tooltip||t[126]!==yt?(we=m&&yt&&at&&ct?n.jsxRuntimeExports.jsx(Ge.Tooltip,{data:m,body:yt,xPos:at,yPos:ct,backgroundStyle:j?.tooltip,className:w?.tooltip}):null,t[121]=w?.tooltip,t[122]=at,t[123]=ct,t[124]=m,t[125]=j?.tooltip,t[126]=yt,t[127]=we):we=t[127],n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(Ut.motion.svg,{width:`${tt}px`,height:`${Ft}px`,viewBox:`0 0 ${tt} ${Ft}`,direction:"ltr",ref:bt,children:n.jsxRuntimeExports.jsxs("g",{transform:`translate(${d.left},${d.top})`,children:[Z,n.jsxRuntimeExports.jsx(Le.CustomArea,{areaSettings:zt,scaleX:a,scaleY:c,animate:s,isInView:x}),n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx(Be.YTicksAndGridLines,{values:Nt.filter(wi),y:Nt.filter(Ci).map(e=>c(e)),x1:0-C,x2:p+d.right,styles:mt,classNames:pt,suffix:$,prefix:h,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:P}),T,he]}),n.jsxRuntimeExports.jsx("g",{children:n.jsxRuntimeExports.jsx(Xe.XTicksAndGridLines,{values:$e,x:Ve,y1:0,y2:E,styles:ye,classNames:ve,suffix:$,prefix:h,labelType:"primary",showGridLines:!0,precision:P})}),je,n.jsxRuntimeExports.jsxs(Ut.motion.g,{children:[le.map(e=>n.jsxRuntimeExports.jsxs(Ut.motion.g,{exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:m?e[0].label===m.label?1:N:Ot?e[0].color&&f[k.indexOf(e[0].color)]===Ot?1:N:V.length!==0?V.indexOf(e[0].label)!==-1?1:N:1},whileInView:{opacity:m?e[0].label===m.label?1:N:Ot?e[0].color&&f[k.indexOf(e[0].color)]===Ot?1:N:V.length!==0?V.indexOf(e[0].label)!==-1?1:N:1,transition:{duration:s.duration}}},initial:"initial",animate:x?"whileInView":"initial",children:[n.jsxRuntimeExports.jsx(Ut.motion.path,{d:kt(e.filter(ji))||"",style:{fill:"none",strokeWidth:m?e[0].label===m.label?q+Math.max(2,.5*q):q:V.length!==0&&V.indexOf(e[0].label)!==-1?q+Math.max(2,.5*q):q},exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{pathLength:0,d:kt(e.filter(vi))||"",opacity:1,stroke:u.filter(yi).length===0?f[0]:e[0].color?f[k.indexOf(e[0].color)]:G.Colors.gray},whileInView:{pathLength:1,d:kt(e.filter(gi))||"",opacity:1,stroke:u.filter(hi).length===0?f[0]:e[0].color?f[k.indexOf(e[0].color)]:G.Colors.gray,transition:{duration:s.duration}}},initial:"initial",animate:x?"whileInView":"initial"}),e.map((o,y)=>n.jsxRuntimeExports.jsx(Ut.motion.g,{children:v.checkIfNullOrUndefined(o.y)?null:n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:oe?n.jsxRuntimeExports.jsx(Ut.motion.circle,{r:p/e.length<5?0:p/e.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,fill:u.filter(di).length===0?f[0]:e[0].color?f[k.indexOf(e[0].color)]:G.Colors.gray,cx:a(o.date),cy:c(o.y)},whileInView:{opacity:1,fill:u.filter(pi).length===0?f[0]:e[0].color?f[k.indexOf(e[0].color)]:G.Colors.gray,transition:{duration:D?s.duration:.5,delay:D?0:s.duration},cx:a(o.date),cy:c(o.y)}},initial:"initial",animate:x?"whileInView":"initial"}):null})},y)),(V.indexOf(e[0].label)!==-1||m?.label===e[0].label)&&pe?n.jsxRuntimeExports.jsx(Ut.motion.text,{className:"text-sm font-bold",dx:5,dy:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,fill:u.filter(mi).length===0?f[0]:e[0].color?f[k.indexOf(e[0].color)]:G.Colors.gray,x:a(e[e.length-1].date),y:c(e[e.length-1].y)},whileInView:{opacity:1,fill:u.filter(xi).length===0?f[0]:e[0].color?f[k.indexOf(e[0].color)]:G.Colors.gray,x:a(e[e.length-1].date),y:c(e[e.length-1].y),transition:{duration:D?s.duration:.5,delay:D?0:s.duration}}},initial:"initial",animate:x?"whileInView":"initial",children:e[0].label}):null]},e[0].label)),m?n.jsxRuntimeExports.jsx("text",{y:c(m.y)-8,x:a(m.date),className:n.mo("graph-value text-sm font-bold",w?.graphObjectValues),style:{fill:u.filter(fi).length===0?f[0]:m.color?f[k.indexOf(m.color)]:G.Colors.gray,textAnchor:"middle",...j?.graphObjectValues||{}},children:Se.numberFormattingFunction(m.y,de,P,h,$)}):null]}),Ue,Oe,be,Ce]})}),we]})}function ai(i){return i.layer}function ci(i){return i.position==="after"}function ui(i){return!v.checkIfNullOrUndefined(i.y)}function fi(i){return i.color}function xi(i){return i.color}function mi(i){return i.color}function pi(i){return i.color}function di(i){return i.color}function hi(i){return i.color}function gi(i){return!v.checkIfNullOrUndefined(i.y)}function yi(i){return i.color}function vi(i){return!v.checkIfNullOrUndefined(i.y)}function ji(i){return!v.checkIfNullOrUndefined(i.y)}function Oi(i){return i.layer}function bi(i){return i.position==="before"}function Ci(i){return i!==0}function wi(i){return i!==0}function Ri(i){return i.date}function Ei(i){return!v.checkIfNullOrUndefined(i.date)&&!v.checkIfNullOrUndefined(i.y)}function Ai(i){return!v.checkIfNullOrUndefined(i)}function ki(i){return i.y}function Ni(i){return!v.checkIfNullOrUndefined(i)}function Di(i){return i.y}function Li(i){return!v.checkIfNullOrUndefined(i)}function qi(i){return i.y}function Si(i){return!v.checkIfNullOrUndefined(i)}function Mi(i){return i.y}function Ii(i){return!v.checkIfNullOrUndefined(i)}function Ti(i){return i.y}function $i(i,t){return Te.ascending(i,t)}function Vi(i){return!v.checkIfNullOrUndefined(i.y)}function Ui(i){const t=n.compilerRuntimeExports.c(94),{data:u,graphTitle:tt,showNAColor:Ft,colors:f,colorDomain:r,suffix:me,sources:et,prefix:Ht,graphDescription:it,height:$,width:h,footNote:C,noOfXTicks:yt,dateFormat:ot,padding:nt,backgroundColor:Gt,leftMargin:W,rightMargin:vt,topMargin:V,bottomMargin:s,showColorScale:Y,tooltip:q,relativeHeight:oe,onSeriesMouseOver:jt,showLabels:Wt,refValues:X,highlightAreaSettings:Yt,graphID:Xt,minValue:Pt,maxValue:rt,highlightedLines:j,graphDownload:k,dataDownload:Ot,animate:w,language:pe,colorLegendTitle:N,minHeight:P,strokeWidth:de,showDots:B,annotations:bt,customHighlightAreaSettings:z,theme:x,ariaLabel:D,yAxisTitle:ne,noOfYTicks:Ct,minDate:st,maxDate:re,curveType:wt,styles:l,classNames:g,dimmedOpacity:Rt,precision:Bt,customLayers:m,naLabel:lt}=i,at=Ft===void 0?!0:Ft,J=me===void 0?"":me,ct=Ht===void 0?"":Ht,K=yt===void 0?10:yt,Et=ot===void 0?"yyyy":ot,ut=Gt===void 0?!1:Gt,d=W===void 0?30:W,se=vt===void 0?50:vt,le=V===void 0?20:V,ft=s===void 0?25:s,At=Y===void 0?!0:Y,xt=Wt===void 0?!0:Wt;let zt;t[0]!==X?(zt=X===void 0?[]:X,t[0]=X,t[1]=zt):zt=t[1];const p=zt;let E;t[2]!==Yt?(E=Yt===void 0?[]:Yt,t[2]=Yt,t[3]=E):E=t[3];const ae=E;let Jt;t[4]!==j?(Jt=j===void 0?[]:j,t[4]=j,t[5]=Jt):Jt=t[5];const O=Jt,U=k===void 0?!1:k,a=Ot===void 0?!1:Ot,Q=w===void 0?!1:w,L=pe===void 0?"en":pe,c=P===void 0?0:P,ce=de===void 0?2:de,kt=B===void 0?!0:B;let Nt;t[6]!==bt?(Nt=bt===void 0?[]:bt,t[6]=bt,t[7]=Nt):Nt=t[7];const Kt=Nt;let Z;t[8]!==z?(Z=z===void 0?[]:z,t[8]=z,t[9]=Z):Z=t[9];const Dt=Z,S=x===void 0?"light":x,mt=Ct===void 0?5:Ct,Lt=wt===void 0?"curve":wt,qt=Rt===void 0?.3:Rt,pt=Bt===void 0?2:Bt;let dt;t[10]!==m?(dt=m===void 0?[]:m,t[10]=m,t[11]=dt):dt=t[11];const St=dt,Mt=lt===void 0?"NA":lt,[_,ue]=R.useState(0),[M,fe]=R.useState(0),[It,xe]=R.useState(void 0),F=R.useRef(null),Qt=R.useRef(null);let ht,I;t[12]===Symbol.for("react.memo_cache_sentinel")?(ht=()=>{const Zt=new ResizeObserver(_t=>{ue(_t[0].target.clientWidth||620),fe(_t[0].target.clientHeight||480)});return F.current&&Zt.observe(F.current),()=>Zt.disconnect()},I=[],t[12]=ht,t[13]=I):(ht=t[12],I=t[13]),R.useEffect(ht,I);const Tt=g?.graphContainer,$t=l?.graphContainer;let A;t[14]!==g?.description||t[15]!==g?.title||t[16]!==u||t[17]!==a||t[18]!==it||t[19]!==U||t[20]!==tt||t[21]!==l?.description||t[22]!==l?.title||t[23]!==h?(A=tt||it||U||a?n.jsxRuntimeExports.jsx(oi.GraphHeader,{styles:{title:l?.title,description:l?.description},classNames:{title:g?.title,description:g?.description},graphTitle:tt,graphDescription:it,width:h,graphDownload:U?Qt:void 0,dataDownload:a?u.map(Bi).filter(Pi).length>0?u.map(Xi).filter(Yi):u.filter(Wi):null}):null,t[14]=g?.description,t[15]=g?.title,t[16]=u,t[17]=a,t[18]=it,t[19]=U,t[20]=tt,t[21]=l?.description,t[22]=l?.title,t[23]=h,t[24]=A):A=t[24];let T;t[25]!==Q||t[26]!==Kt||t[27]!==ft||t[28]!==g||t[29]!==r||t[30]!==N||t[31]!==f||t[32]!==Lt||t[33]!==Dt||t[34]!==St||t[35]!==u||t[36]!==Et||t[37]!==qt||t[38]!==ae||t[39]!==O||t[40]!==L||t[41]!==d||t[42]!==re||t[43]!==rt||t[44]!==st||t[45]!==Pt||t[46]!==Mt||t[47]!==K||t[48]!==mt||t[49]!==jt||t[50]!==pt||t[51]!==ct||t[52]!==p||t[53]!==se||t[54]!==It||t[55]!==At||t[56]!==kt||t[57]!==xt||t[58]!==at||t[59]!==ce||t[60]!==l||t[61]!==J||t[62]!==M||t[63]!==_||t[64]!==S||t[65]!==q||t[66]!==le||t[67]!==h||t[68]!==ne?(T=u.length===0?n.jsxRuntimeExports.jsx(ni.EmptyState,{}):n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[At&&u.filter(Gi).length!==0?n.jsxRuntimeExports.jsx(ri.ColorLegendWithMouseOver,{width:h,colorLegendTitle:N,colors:f||G.Colors[S].categoricalColors.colors,colorDomain:r||Ee.uniqBy(u,"color",!0),setSelectedColor:xe,showNAColor:at,className:g?.colorLegend}):null,n.jsxRuntimeExports.jsx(Ie.GraphArea,{ref:F,children:_&&M?n.jsxRuntimeExports.jsx(li,{data:u,lineColors:u.filter(Hi).length===0?f?[f]:[G.Colors.primaryColors["blue-600"]]:f||G.Colors[S].categoricalColors.colors,width:_,height:M,dateFormat:Et,noOfXTicks:K??si.getNoOfTicks(_),leftMargin:d,rightMargin:se,topMargin:le,bottomMargin:ft,tooltip:q,onSeriesMouseOver:jt,suffix:J,prefix:ct,highlightAreaSettings:ae,refValues:p,minValue:Pt,maxValue:rt,highlightedLines:O,animate:Q===!0?{duration:.5,once:!0,amount:.5}:Q||{duration:0,once:!0,amount:0},rtl:L==="he"||L==="ar",strokeWidth:ce,showDots:kt,annotations:Kt,customHighlightAreaSettings:Dt,yAxisTitle:ne,noOfYTicks:mt,minDate:st,maxDate:re,curveType:Lt,styles:l,classNames:g,selectedColor:It,showLabels:xt,colorDomain:u.filter(Fi).length===0?[]:r||Ee.uniqBy(u,"color",!0),dimmedOpacity:qt,precision:pt,customLayers:St,naLabel:Mt}):null})]}),t[25]=Q,t[26]=Kt,t[27]=ft,t[28]=g,t[29]=r,t[30]=N,t[31]=f,t[32]=Lt,t[33]=Dt,t[34]=St,t[35]=u,t[36]=Et,t[37]=qt,t[38]=ae,t[39]=O,t[40]=L,t[41]=d,t[42]=re,t[43]=rt,t[44]=st,t[45]=Pt,t[46]=Mt,t[47]=K,t[48]=mt,t[49]=jt,t[50]=pt,t[51]=ct,t[52]=p,t[53]=se,t[54]=It,t[55]=At,t[56]=kt,t[57]=xt,t[58]=at,t[59]=ce,t[60]=l,t[61]=J,t[62]=M,t[63]=_,t[64]=S,t[65]=q,t[66]=le,t[67]=h,t[68]=ne,t[69]=T):T=t[69];let H;t[70]!==g?.footnote||t[71]!==g?.source||t[72]!==C||t[73]!==et||t[74]!==l?.footnote||t[75]!==l?.source||t[76]!==h?(H=et||C?n.jsxRuntimeExports.jsx(ii.GraphFooter,{styles:{footnote:l?.footnote,source:l?.source},classNames:{footnote:g?.footnote,source:g?.source},sources:et,footNote:C,width:h}):null,t[70]=g?.footnote,t[71]=g?.source,t[72]=C,t[73]=et,t[74]=l?.footnote,t[75]=l?.source,t[76]=h,t[77]=H):H=t[77];let gt;return t[78]!==D||t[79]!==ut||t[80]!==Xt||t[81]!==$||t[82]!==L||t[83]!==c||t[84]!==nt||t[85]!==oe||t[86]!==Tt||t[87]!==$t||t[88]!==A||t[89]!==T||t[90]!==H||t[91]!==S||t[92]!==h?(gt=n.jsxRuntimeExports.jsxs(Ie.GraphContainer,{className:Tt,style:$t,id:Xt,ref:Qt,"aria-label":D,backgroundColor:ut,theme:S,language:L,minHeight:c,width:h,height:$,relativeHeight:oe,padding:nt,children:[A,T,H]}),t[78]=D,t[79]=ut,t[80]=Xt,t[81]=$,t[82]=L,t[83]=c,t[84]=nt,t[85]=oe,t[86]=Tt,t[87]=$t,t[88]=A,t[89]=T,t[90]=H,t[91]=S,t[92]=h,t[93]=gt):gt=t[93],gt}function Fi(i){return i.color}function Hi(i){return i.color}function Gi(i){return i.color}function Wi(i){return i!==void 0}function Yi(i){return i!==void 0}function Xi(i){return i.data}function Pi(i){return i!==void 0}function Bi(i){return i.data}exports.MultiLineAltChart=Ui;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-CTPQjnHt.cjs"),R=require("react"),b=require("./parse-hMnG_lRV.cjs"),qe=require("./index-Cno4Q0YE.cjs"),Se=require("./numberFormattingFunction-02t-wJta.cjs"),Ge=require("./Tooltip-uUdw6wJL.cjs"),v=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Le=require("./customArea-CMF5g-C3.cjs"),We=require("./AxisTitle-sS5bLLR7.cjs"),Ye=require("./Axis-DxRV2yMi.cjs"),Xe=require("./XTicksAndGridLines-B6CELS7q.cjs"),Pe=require("./ReferenceLine-BH0qdf4R.cjs"),Be=require("./YTicksAndGridLines-4pxTRlRK.cjs"),ze=require("./index-B_sAFsEV.cjs"),G=require("./Colors.cjs"),Ee=require("./uniqBy-O05lp2S5.cjs"),Je=require("./sort-O96oMZLb.cjs"),Ke=require("./time-CZd5YLSP.cjs"),Qe=require("./linear-BwPAspcq.cjs"),Ze=require("./delaunay-rcy0HhZi.cjs"),Me=require("./line-DHV4JwCR.cjs"),Re=require("./step-BZ3C8QFW.cjs"),_e=require("./select-Bnfk0lJx.cjs"),Te=require("./init-DU0ybBc_.cjs"),ti=require("./pointer-Dkq5NV1q.cjs"),ei=require("./use-in-view-QcfiW0w3.cjs"),Ut=require("./proxy-BxvUI_9l.cjs"),ii=require("./GraphFooter.cjs"),oi=require("./GraphHeader.cjs"),ni=require("./EmptyState-sAEZ_5rU.cjs"),ri=require("./ColorLegendWithMouseOver.cjs"),Ie=require("./GraphContainer-d8A46BK2.cjs"),si=require("./getNoOfTicks-C_1CFXv_.cjs");function li(i){const t=n.compilerRuntimeExports.c(128),{data:u,width:tt,height:Ft,lineColors:f,dateFormat:r,noOfXTicks:me,rightMargin:et,topMargin:Ht,bottomMargin:it,suffix:$,prefix:h,leftMargin:C,tooltip:yt,onSeriesMouseOver:ot,refValues:nt,highlightAreaSettings:Gt,minValue:W,maxValue:vt,highlightedLines:V,animate:s,rtl:Y,strokeWidth:q,showDots:oe,annotations:jt,customHighlightAreaSettings:Wt,yAxisTitle:X,noOfYTicks:Yt,minDate:Xt,maxDate:Pt,curveType:rt,styles:j,colorDomain:k,selectedColor:Ot,classNames:w,showLabels:pe,dimmedOpacity:N,precision:P,naLabel:de,customLayers:B}=i,bt=R.useRef(null);let z;t[0]!==s.amount||t[1]!==s.once?(z={once:s.once,amount:s.amount},t[0]=s.amount,t[1]=s.once,t[2]=z):z=t[2];const x=ei.useInView(bt,z),[D,ne]=R.useState(!1);let Ct,st;t[3]!==s.duration||t[4]!==D||t[5]!==x?(Ct=()=>{if(x&&!D){const e=setTimeout(()=>{ne(!0)},(s.duration+.5)*1e3);return()=>clearTimeout(e)}},st=[x,D,s.duration],t[3]=s.duration,t[4]=D,t[5]=x,t[6]=Ct,t[7]=st):(Ct=t[6],st=t[7]),R.useEffect(Ct,st);const re=rt==="linear"?Me.curveLinear:rt==="step"?Re.curveStep:rt==="stepAfter"?Re.stepAfter:rt==="stepBefore"?Re.stepBefore:Re.monotoneX;let wt;t[8]!==r?(wt=e=>({...e,date:b.parse(`${e.date}`,r,new Date)}),t[8]=r,t[9]=wt):wt=t[9];const l=qe.orderBy(u.map(wt),["date"],["asc"]).filter(Vi),g=Ee.uniqBy(l,"label",!0);let Rt;t[10]!==r?(Rt=e=>b.parse(`${e}`,r,new Date),t[10]=r,t[11]=Rt):Rt=t[11];const Bt=Je.sort(Ee.uniqBy(u,"date",!0).map(Rt),$i),[m,lt]=R.useState(void 0),[at,J]=R.useState(void 0),[ct,K]=R.useState(void 0),Et=X?C+30:C;let ut;t[12]!==it||t[13]!==et||t[14]!==Et||t[15]!==Ht?(ut={top:Ht,bottom:it,left:Et,right:et},t[12]=it,t[13]=et,t[14]=Et,t[15]=Ht,t[16]=ut):ut=t[16];const d=ut,se=R.useRef(null),le=g.map(e=>qe.orderBy(l.filter(o=>o.label==e),["date"],["asc"]));let ft;if(t[17]!==r||t[18]!==Gt){let e;t[20]!==r?(e=o=>({...o,coordinates:[o.coordinates[0]===null?null:b.parse(`${o.coordinates[0]}`,r,new Date),o.coordinates[1]===null?null:b.parse(`${o.coordinates[1]}`,r,new Date)]}),t[20]=r,t[21]=e):e=t[21],ft=Gt.map(e),t[17]=r,t[18]=Gt,t[19]=ft}else ft=t[19];const At=ft;let xt;if(t[22]!==Wt||t[23]!==r){let e;t[25]!==r?(e=o=>({...o,coordinates:o.coordinates.map((y,Vt)=>Vt%2===0?b.parse(`${y}`,r,new Date):y)}),t[25]=r,t[26]=e):e=t[26],xt=Wt.map(e),t[22]=Wt,t[23]=r,t[24]=xt}else xt=t[24];const zt=xt,p=tt-d.left-d.right,E=Ft-d.top-d.bottom,ae=Xt?b.parse(`${Xt}`,r,new Date):Bt[0],Jt=Pt?b.parse(`${Pt}`,r,new Date):Bt[Bt.length-1],O=v.checkIfNullOrUndefined(W)?Math.min(...l.map(Ti).filter(Ii))?Math.min(...l.map(Mi).filter(Si))>0?0:Math.min(...l.map(qi).filter(Li)):0:W,U=Math.max(...l.map(Di).filter(Ni))?Math.max(...l.map(ki).filter(Ai)):0,a=Ke.time().domain([ae,Jt]).range([0,p]);let Q;t[27]!==O||t[28]!==W?(Q=v.checkIfNullOrUndefined(W)?O:W,t[27]=O,t[28]=W,t[29]=Q):Q=t[29];let L;t[30]!==U||t[31]!==vt?(L=v.checkIfNullOrUndefined(vt)?U>0?U:0:vt,t[30]=U,t[31]=vt,t[32]=L):L=t[32];const c=Qe.linear().domain([Q,L]).range([E,0]).nice(),ce=Ze.Delaunay.from(l.filter(Ei),e=>a(e.date),e=>c(e.y)).voronoi([0,0,p<0?0:p,E<0?0:E]),kt=Me.line().x(e=>a(e.date)).y(e=>c(e.y)).curve(re),Nt=c.ticks(Yt),Kt=a.ticks(me);R.useEffect(()=>{const e=y=>{const Vt=l[Te.bisectCenter(l.map(Ri),a.invert(ti.pointer(y)[0]),0)];lt(Vt||l[l.length-1]),K(y.clientY),J(y.clientX),ot?.(Vt||l[l.length-1])},o=()=>{lt(void 0),J(void 0),K(void 0)};_e.select(se.current).on("mousemove",e).on("mouseout",o),ot?.(void 0)},[a,l,ot]);let Z;t[33]!==s||t[34]!==E||t[35]!==p||t[36]!==At||t[37]!==x||t[38]!==a?(Z=n.jsxRuntimeExports.jsx(ze.HighlightArea,{areaSettings:At,width:p,height:E,scale:a,animate:s,isInView:x}),t[33]=s,t[34]=E,t[35]=p,t[36]=At,t[37]=x,t[38]=a,t[39]=Z):Z=t[39];const Dt=j?.yAxis?.gridLines,S=j?.yAxis?.labels;let mt;t[40]!==Dt||t[41]!==S?(mt={gridLines:Dt,labels:S},t[40]=Dt,t[41]=S,t[42]=mt):mt=t[42];const Lt=w?.yAxis?.gridLines,qt=w?.yAxis?.labels;let pt;t[43]!==Lt||t[44]!==qt?(pt={gridLines:Lt,labels:qt},t[43]=Lt,t[44]=qt,t[45]=pt):pt=t[45];const dt=c(O<0?0:O),St=c(O<0?0:O),Mt=0-C,_=p+d.right,ue=O<0?0:O;let M;t[46]!==P||t[47]!==h||t[48]!==$||t[49]!==ue?(M=Se.numberFormattingFunction(ue,"NA",P,h,$),t[46]=P,t[47]=h,t[48]=$,t[49]=ue,t[50]=M):M=t[50];const fe=0-C,It=c(O<0?0:O),xe=U<0?"1em":-5;let F;t[51]!==fe||t[52]!==It||t[53]!==xe?(F={x:fe,y:It,dx:0,dy:xe},t[51]=fe,t[52]=It,t[53]=xe,t[54]=F):F=t[54];const Qt=w?.xAxis?.axis,ht=w?.yAxis?.labels;let I;t[55]!==Qt||t[56]!==ht?(I={axis:Qt,label:ht},t[55]=Qt,t[56]=ht,t[57]=I):I=t[57];const Tt=j?.xAxis?.axis,$t=j?.yAxis?.labels;let A;t[58]!==Tt||t[59]!==$t?(A={axis:Tt,label:$t},t[58]=Tt,t[59]=$t,t[60]=A):A=t[60];let T;t[61]!==dt||t[62]!==St||t[63]!==Mt||t[64]!==_||t[65]!==M||t[66]!==F||t[67]!==I||t[68]!==A?(T=n.jsxRuntimeExports.jsx(Ye.Axis,{y1:dt,y2:St,x1:Mt,x2:_,label:M,labelPos:F,classNames:I,styles:A}),t[61]=dt,t[62]=St,t[63]=Mt,t[64]=_,t[65]=M,t[66]=F,t[67]=I,t[68]=A,t[69]=T):T=t[69];const H=0-C-15,gt=E/2,Zt=j?.yAxis?.title,_t=w?.yAxis?.title;let he;t[70]!==H||t[71]!==gt||t[72]!==Zt||t[73]!==_t||t[74]!==X?(he=n.jsxRuntimeExports.jsx(We.AxisTitle,{x:H,y:gt,style:Zt,className:_t,text:X,rotate90:!0}),t[70]=H,t[71]=gt,t[72]=Zt,t[73]=_t,t[74]=X,t[75]=he):he=t[75];let ge;t[76]!==r?(ge=e=>b.format(e,r),t[76]=r,t[77]=ge):ge=t[77];const $e=Kt.map(ge),Ve=Kt.map(e=>a(e)),Ae=j?.xAxis?.gridLines,ke=j?.xAxis?.labels;let ye;t[78]!==Ae||t[79]!==ke?(ye={gridLines:Ae,labels:ke},t[78]=Ae,t[79]=ke,t[80]=ye):ye=t[80];const Ne=w?.xAxis?.gridLines;let te;t[81]!==Ne?(te=n.mo("opacity-0",Ne),t[81]=Ne,t[82]=te):te=t[82];const De=w?.xAxis?.labels;let ee;t[83]!==De?(ee=n.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",De),t[83]=De,t[84]=ee):ee=t[84];let ve;t[85]!==te||t[86]!==ee?(ve={gridLines:te,labels:ee},t[85]=te,t[86]=ee,t[87]=ve):ve=t[87];let je;t[88]!==B?(je=B.filter(bi).map(Oi),t[88]=B,t[89]=je):je=t[89];const Ue=l.filter(ui).map((e,o)=>n.jsxRuntimeExports.jsx("g",{children:n.jsxRuntimeExports.jsx("path",{d:ce.renderCell(l.findIndex(y=>y.label===e.label&&y.date===e.date)),opacity:0,onMouseEnter:y=>{lt(e),K(y.clientY),J(y.clientX),ot?.(e)},onMouseMove:y=>{lt(e),K(y.clientY),J(y.clientX)},onMouseLeave:()=>{lt(void 0),J(void 0),K(void 0),ot?.(void 0)}})},o));let Oe;t[90]!==s||t[91]!==p||t[92]!==x||t[93]!==C||t[94]!==d.right||t[95]!==nt||t[96]!==c?(Oe=nt?n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:nt.map((e,o)=>n.jsxRuntimeExports.jsx(Pe.RefLineY,{text:e.text,color:e.color,y:c(e.value),x1:0-C,x2:p+d.right,classNames:e.classNames,styles:e.styles,animate:s,isInView:x},o))}):null,t[90]=s,t[91]=p,t[92]=x,t[93]=C,t[94]=d.right,t[95]=nt,t[96]=c,t[97]=Oe):Oe=t[97];let ie;if(t[98]!==s||t[99]!==jt||t[100]!==r||t[101]!==p||t[102]!==x||t[103]!==d.right||t[104]!==Y||t[105]!==a||t[106]!==c){let e;t[108]!==s||t[109]!==r||t[110]!==p||t[111]!==x||t[112]!==d.right||t[113]!==Y||t[114]!==a||t[115]!==c?(e=(o,y)=>{const Vt=Le.getLineEndPoint({x:o.xCoordinate?a(b.parse(`${o.xCoordinate}`,r,new Date))+(o.xOffset||0):0+(o.xOffset||0),y:o.yCoordinate?c(o.yCoordinate)+(o.yOffset||0)-8:0+(o.yOffset||0)-8},{x:o.xCoordinate?a(b.parse(`${o.xCoordinate}`,r,new Date)):0,y:o.yCoordinate?c(o.yCoordinate):0},v.checkIfNullOrUndefined(o.connectorRadius)?3.5:o.connectorRadius),Fe=o.showConnector?{y1:Vt.y,x1:Vt.x,y2:o.yCoordinate?c(o.yCoordinate)+(o.yOffset||0):0+(o.yOffset||0),x2:o.xCoordinate?a(b.parse(`${o.xCoordinate}`,r,new Date))+(o.xOffset||0):0+(o.xOffset||0),cy:o.yCoordinate?c(o.yCoordinate):0,cx:o.xCoordinate?a(b.parse(`${o.xCoordinate}`,r,new Date)):0,circleRadius:v.checkIfNullOrUndefined(o.connectorRadius)?3.5:o.connectorRadius,strokeWidth:o.showConnector===!0?2:Math.min(o.showConnector||0,1)}:void 0,He={y:o.yCoordinate?c(o.yCoordinate)+(o.yOffset||0)-8:0+(o.yOffset||0)-8,x:Y?0:o.xCoordinate?a(b.parse(`${o.xCoordinate}`,r,new Date))+(o.xOffset||0):0+(o.xOffset||0),width:Y?o.xCoordinate?a(b.parse(`${o.xCoordinate}`,r,new Date))+(o.xOffset||0):0+(o.xOffset||0):p+d.right-(o.xCoordinate?a(b.parse(`${o.xCoordinate}`,r,new Date))+(o.xOffset||0):0+(o.xOffset||0)),maxWidth:o.maxWidth,fontWeight:o.fontWeight,align:o.align};return n.jsxRuntimeExports.jsx(Le.Annotation,{color:o.color,connectorsSettings:Fe,labelSettings:He,text:o.text,classNames:o.classNames,styles:o.styles,animate:s,isInView:x},y)},t[108]=s,t[109]=r,t[110]=p,t[111]=x,t[112]=d.right,t[113]=Y,t[114]=a,t[115]=c,t[116]=e):e=t[116],ie=jt.map(e),t[98]=s,t[99]=jt,t[100]=r,t[101]=p,t[102]=x,t[103]=d.right,t[104]=Y,t[105]=a,t[106]=c,t[107]=ie}else ie=t[107];let be;t[117]!==ie?(be=n.jsxRuntimeExports.jsx("g",{children:ie}),t[117]=ie,t[118]=be):be=t[118];let Ce;t[119]!==B?(Ce=B.filter(ci).map(ai),t[119]=B,t[120]=Ce):Ce=t[120];let we;return t[121]!==w?.tooltip||t[122]!==at||t[123]!==ct||t[124]!==m||t[125]!==j?.tooltip||t[126]!==yt?(we=m&&yt&&at&&ct?n.jsxRuntimeExports.jsx(Ge.Tooltip,{data:m,body:yt,xPos:at,yPos:ct,backgroundStyle:j?.tooltip,className:w?.tooltip}):null,t[121]=w?.tooltip,t[122]=at,t[123]=ct,t[124]=m,t[125]=j?.tooltip,t[126]=yt,t[127]=we):we=t[127],n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(Ut.motion.svg,{width:`${tt}px`,height:`${Ft}px`,viewBox:`0 0 ${tt} ${Ft}`,direction:"ltr",ref:bt,children:n.jsxRuntimeExports.jsxs("g",{transform:`translate(${d.left},${d.top})`,children:[Z,n.jsxRuntimeExports.jsx(Le.CustomArea,{areaSettings:zt,scaleX:a,scaleY:c,animate:s,isInView:x}),n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx(Be.YTicksAndGridLines,{values:Nt.filter(wi),y:Nt.filter(Ci).map(e=>c(e)),x1:0-C,x2:p+d.right,styles:mt,classNames:pt,suffix:$,prefix:h,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:P}),T,he]}),n.jsxRuntimeExports.jsx("g",{children:n.jsxRuntimeExports.jsx(Xe.XTicksAndGridLines,{values:$e,x:Ve,y1:0,y2:E,styles:ye,classNames:ve,suffix:$,prefix:h,labelType:"primary",showGridLines:!0,precision:P})}),je,n.jsxRuntimeExports.jsxs(Ut.motion.g,{children:[le.map(e=>n.jsxRuntimeExports.jsxs(Ut.motion.g,{exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:m?e[0].label===m.label?1:N:Ot?e[0].color&&f[k.indexOf(e[0].color)]===Ot?1:N:V.length!==0?V.indexOf(e[0].label)!==-1?1:N:1},whileInView:{opacity:m?e[0].label===m.label?1:N:Ot?e[0].color&&f[k.indexOf(e[0].color)]===Ot?1:N:V.length!==0?V.indexOf(e[0].label)!==-1?1:N:1,transition:{duration:s.duration}}},initial:"initial",animate:x?"whileInView":"initial",children:[n.jsxRuntimeExports.jsx(Ut.motion.path,{d:kt(e.filter(ji))||"",style:{fill:"none",strokeWidth:m?e[0].label===m.label?q+Math.max(2,.5*q):q:V.length!==0&&V.indexOf(e[0].label)!==-1?q+Math.max(2,.5*q):q},exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{pathLength:0,d:kt(e.filter(vi))||"",opacity:1,stroke:u.filter(yi).length===0?f[0]:e[0].color?f[k.indexOf(e[0].color)]:G.Colors.gray},whileInView:{pathLength:1,d:kt(e.filter(gi))||"",opacity:1,stroke:u.filter(hi).length===0?f[0]:e[0].color?f[k.indexOf(e[0].color)]:G.Colors.gray,transition:{duration:s.duration}}},initial:"initial",animate:x?"whileInView":"initial"}),e.map((o,y)=>n.jsxRuntimeExports.jsx(Ut.motion.g,{children:v.checkIfNullOrUndefined(o.y)?null:n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:oe?n.jsxRuntimeExports.jsx(Ut.motion.circle,{r:p/e.length<5?0:p/e.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,fill:u.filter(di).length===0?f[0]:e[0].color?f[k.indexOf(e[0].color)]:G.Colors.gray,cx:a(o.date),cy:c(o.y)},whileInView:{opacity:1,fill:u.filter(pi).length===0?f[0]:e[0].color?f[k.indexOf(e[0].color)]:G.Colors.gray,transition:{duration:D?s.duration:.5,delay:D?0:s.duration},cx:a(o.date),cy:c(o.y)}},initial:"initial",animate:x?"whileInView":"initial"}):null})},y)),(V.indexOf(e[0].label)!==-1||m?.label===e[0].label)&&pe?n.jsxRuntimeExports.jsx(Ut.motion.text,{className:"text-sm font-bold",dx:5,dy:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,fill:u.filter(mi).length===0?f[0]:e[0].color?f[k.indexOf(e[0].color)]:G.Colors.gray,x:a(e[e.length-1].date),y:c(e[e.length-1].y)},whileInView:{opacity:1,fill:u.filter(xi).length===0?f[0]:e[0].color?f[k.indexOf(e[0].color)]:G.Colors.gray,x:a(e[e.length-1].date),y:c(e[e.length-1].y),transition:{duration:D?s.duration:.5,delay:D?0:s.duration}}},initial:"initial",animate:x?"whileInView":"initial",children:e[0].label}):null]},e[0].label)),m?n.jsxRuntimeExports.jsx("text",{y:c(m.y)-8,x:a(m.date),className:n.mo("graph-value text-sm font-bold",w?.graphObjectValues),style:{fill:u.filter(fi).length===0?f[0]:m.color?f[k.indexOf(m.color)]:G.Colors.gray,textAnchor:"middle",...j?.graphObjectValues||{}},children:Se.numberFormattingFunction(m.y,de,P,h,$)}):null]}),Ue,Oe,be,Ce]})}),we]})}function ai(i){return i.layer}function ci(i){return i.position==="after"}function ui(i){return!v.checkIfNullOrUndefined(i.y)}function fi(i){return i.color}function xi(i){return i.color}function mi(i){return i.color}function pi(i){return i.color}function di(i){return i.color}function hi(i){return i.color}function gi(i){return!v.checkIfNullOrUndefined(i.y)}function yi(i){return i.color}function vi(i){return!v.checkIfNullOrUndefined(i.y)}function ji(i){return!v.checkIfNullOrUndefined(i.y)}function Oi(i){return i.layer}function bi(i){return i.position==="before"}function Ci(i){return i!==0}function wi(i){return i!==0}function Ri(i){return i.date}function Ei(i){return!v.checkIfNullOrUndefined(i.date)&&!v.checkIfNullOrUndefined(i.y)}function Ai(i){return!v.checkIfNullOrUndefined(i)}function ki(i){return i.y}function Ni(i){return!v.checkIfNullOrUndefined(i)}function Di(i){return i.y}function Li(i){return!v.checkIfNullOrUndefined(i)}function qi(i){return i.y}function Si(i){return!v.checkIfNullOrUndefined(i)}function Mi(i){return i.y}function Ii(i){return!v.checkIfNullOrUndefined(i)}function Ti(i){return i.y}function $i(i,t){return Te.ascending(i,t)}function Vi(i){return!v.checkIfNullOrUndefined(i.y)}function Ui(i){const t=n.compilerRuntimeExports.c(94),{data:u,graphTitle:tt,showNAColor:Ft,colors:f,colorDomain:r,suffix:me,sources:et,prefix:Ht,graphDescription:it,height:$,width:h,footNote:C,noOfXTicks:yt,dateFormat:ot,padding:nt,backgroundColor:Gt,leftMargin:W,rightMargin:vt,topMargin:V,bottomMargin:s,showColorScale:Y,tooltip:q,relativeHeight:oe,onSeriesMouseOver:jt,showLabels:Wt,refValues:X,highlightAreaSettings:Yt,graphID:Xt,minValue:Pt,maxValue:rt,highlightedLines:j,graphDownload:k,dataDownload:Ot,animate:w,language:pe,colorLegendTitle:N,minHeight:P,strokeWidth:de,showDots:B,annotations:bt,customHighlightAreaSettings:z,theme:x,ariaLabel:D,yAxisTitle:ne,noOfYTicks:Ct,minDate:st,maxDate:re,curveType:wt,styles:l,classNames:g,dimmedOpacity:Rt,precision:Bt,customLayers:m,naLabel:lt}=i,at=Ft===void 0?!0:Ft,J=me===void 0?"":me,ct=Ht===void 0?"":Ht,K=yt===void 0?10:yt,Et=ot===void 0?"yyyy":ot,ut=Gt===void 0?!1:Gt,d=W===void 0?30:W,se=vt===void 0?50:vt,le=V===void 0?20:V,ft=s===void 0?25:s,At=Y===void 0?!0:Y,xt=Wt===void 0?!0:Wt;let zt;t[0]!==X?(zt=X===void 0?[]:X,t[0]=X,t[1]=zt):zt=t[1];const p=zt;let E;t[2]!==Yt?(E=Yt===void 0?[]:Yt,t[2]=Yt,t[3]=E):E=t[3];const ae=E;let Jt;t[4]!==j?(Jt=j===void 0?[]:j,t[4]=j,t[5]=Jt):Jt=t[5];const O=Jt,U=k===void 0?!1:k,a=Ot===void 0?!1:Ot,Q=w===void 0?!1:w,L=pe===void 0?"en":pe,c=P===void 0?0:P,ce=de===void 0?2:de,kt=B===void 0?!0:B;let Nt;t[6]!==bt?(Nt=bt===void 0?[]:bt,t[6]=bt,t[7]=Nt):Nt=t[7];const Kt=Nt;let Z;t[8]!==z?(Z=z===void 0?[]:z,t[8]=z,t[9]=Z):Z=t[9];const Dt=Z,S=x===void 0?"light":x,mt=Ct===void 0?5:Ct,Lt=wt===void 0?"curve":wt,qt=Rt===void 0?.3:Rt,pt=Bt===void 0?2:Bt;let dt;t[10]!==m?(dt=m===void 0?[]:m,t[10]=m,t[11]=dt):dt=t[11];const St=dt,Mt=lt===void 0?"NA":lt,[_,ue]=R.useState(0),[M,fe]=R.useState(0),[It,xe]=R.useState(void 0),F=R.useRef(null),Qt=R.useRef(null);let ht,I;t[12]===Symbol.for("react.memo_cache_sentinel")?(ht=()=>{const Zt=new ResizeObserver(_t=>{ue(_t[0].target.clientWidth||620),fe(_t[0].target.clientHeight||480)});return F.current&&Zt.observe(F.current),()=>Zt.disconnect()},I=[],t[12]=ht,t[13]=I):(ht=t[12],I=t[13]),R.useEffect(ht,I);const Tt=g?.graphContainer,$t=l?.graphContainer;let A;t[14]!==g?.description||t[15]!==g?.title||t[16]!==u||t[17]!==a||t[18]!==it||t[19]!==U||t[20]!==tt||t[21]!==l?.description||t[22]!==l?.title||t[23]!==h?(A=tt||it||U||a?n.jsxRuntimeExports.jsx(oi.GraphHeader,{styles:{title:l?.title,description:l?.description},classNames:{title:g?.title,description:g?.description},graphTitle:tt,graphDescription:it,width:h,graphDownload:U?Qt:void 0,dataDownload:a?u.map(Bi).filter(Pi).length>0?u.map(Xi).filter(Yi):u.filter(Wi):null}):null,t[14]=g?.description,t[15]=g?.title,t[16]=u,t[17]=a,t[18]=it,t[19]=U,t[20]=tt,t[21]=l?.description,t[22]=l?.title,t[23]=h,t[24]=A):A=t[24];let T;t[25]!==Q||t[26]!==Kt||t[27]!==ft||t[28]!==g||t[29]!==r||t[30]!==N||t[31]!==f||t[32]!==Lt||t[33]!==Dt||t[34]!==St||t[35]!==u||t[36]!==Et||t[37]!==qt||t[38]!==ae||t[39]!==O||t[40]!==L||t[41]!==d||t[42]!==re||t[43]!==rt||t[44]!==st||t[45]!==Pt||t[46]!==Mt||t[47]!==K||t[48]!==mt||t[49]!==jt||t[50]!==pt||t[51]!==ct||t[52]!==p||t[53]!==se||t[54]!==It||t[55]!==At||t[56]!==kt||t[57]!==xt||t[58]!==at||t[59]!==ce||t[60]!==l||t[61]!==J||t[62]!==M||t[63]!==_||t[64]!==S||t[65]!==q||t[66]!==le||t[67]!==h||t[68]!==ne?(T=u.length===0?n.jsxRuntimeExports.jsx(ni.EmptyState,{}):n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[At&&u.filter(Gi).length!==0?n.jsxRuntimeExports.jsx(ri.ColorLegendWithMouseOver,{width:h,colorLegendTitle:N,colors:f||G.Colors[S].categoricalColors.colors,colorDomain:r||Ee.uniqBy(u,"color",!0),setSelectedColor:xe,showNAColor:at,className:g?.colorLegend}):null,n.jsxRuntimeExports.jsx(Ie.GraphArea,{ref:F,children:_&&M?n.jsxRuntimeExports.jsx(li,{data:u,lineColors:u.filter(Hi).length===0?f?[f]:[G.Colors.primaryColors["blue-600"]]:f||G.Colors[S].categoricalColors.colors,width:_,height:M,dateFormat:Et,noOfXTicks:K??si.getNoOfTicks(_),leftMargin:d,rightMargin:se,topMargin:le,bottomMargin:ft,tooltip:q,onSeriesMouseOver:jt,suffix:J,prefix:ct,highlightAreaSettings:ae,refValues:p,minValue:Pt,maxValue:rt,highlightedLines:O,animate:Q===!0?{duration:.5,once:!0,amount:.5}:Q||{duration:0,once:!0,amount:0},rtl:L==="he"||L==="ar",strokeWidth:ce,showDots:kt,annotations:Kt,customHighlightAreaSettings:Dt,yAxisTitle:ne,noOfYTicks:mt,minDate:st,maxDate:re,curveType:Lt,styles:l,classNames:g,selectedColor:It,showLabels:xt,colorDomain:u.filter(Fi).length===0?[]:r||Ee.uniqBy(u,"color",!0),dimmedOpacity:qt,precision:pt,customLayers:St,naLabel:Mt}):null})]}),t[25]=Q,t[26]=Kt,t[27]=ft,t[28]=g,t[29]=r,t[30]=N,t[31]=f,t[32]=Lt,t[33]=Dt,t[34]=St,t[35]=u,t[36]=Et,t[37]=qt,t[38]=ae,t[39]=O,t[40]=L,t[41]=d,t[42]=re,t[43]=rt,t[44]=st,t[45]=Pt,t[46]=Mt,t[47]=K,t[48]=mt,t[49]=jt,t[50]=pt,t[51]=ct,t[52]=p,t[53]=se,t[54]=It,t[55]=At,t[56]=kt,t[57]=xt,t[58]=at,t[59]=ce,t[60]=l,t[61]=J,t[62]=M,t[63]=_,t[64]=S,t[65]=q,t[66]=le,t[67]=h,t[68]=ne,t[69]=T):T=t[69];let H;t[70]!==g?.footnote||t[71]!==g?.source||t[72]!==C||t[73]!==et||t[74]!==l?.footnote||t[75]!==l?.source||t[76]!==h?(H=et||C?n.jsxRuntimeExports.jsx(ii.GraphFooter,{styles:{footnote:l?.footnote,source:l?.source},classNames:{footnote:g?.footnote,source:g?.source},sources:et,footNote:C,width:h}):null,t[70]=g?.footnote,t[71]=g?.source,t[72]=C,t[73]=et,t[74]=l?.footnote,t[75]=l?.source,t[76]=h,t[77]=H):H=t[77];let gt;return t[78]!==D||t[79]!==ut||t[80]!==Xt||t[81]!==$||t[82]!==L||t[83]!==c||t[84]!==nt||t[85]!==oe||t[86]!==Tt||t[87]!==$t||t[88]!==A||t[89]!==T||t[90]!==H||t[91]!==S||t[92]!==h?(gt=n.jsxRuntimeExports.jsxs(Ie.GraphContainer,{className:Tt,style:$t,id:Xt,ref:Qt,"aria-label":D,backgroundColor:ut,theme:S,language:L,minHeight:c,width:h,height:$,relativeHeight:oe,padding:nt,children:[A,T,H]}),t[78]=D,t[79]=ut,t[80]=Xt,t[81]=$,t[82]=L,t[83]=c,t[84]=nt,t[85]=oe,t[86]=Tt,t[87]=$t,t[88]=A,t[89]=T,t[90]=H,t[91]=S,t[92]=h,t[93]=gt):gt=t[93],gt}function Fi(i){return i.color}function Hi(i){return i.color}function Gi(i){return i.color}function Wi(i){return i!==void 0}function Yi(i){return i!==void 0}function Xi(i){return i.data}function Pi(i){return i!==void 0}function Bi(i){return i.data}exports.MultiLineAltChart=Ui;
|
|
2
2
|
//# sourceMappingURL=MultiLineAltChart.cjs.map
|
|
@@ -58,6 +58,7 @@ declare interface ClassNameObject {
|
|
|
58
58
|
regLine?: string;
|
|
59
59
|
dataCards?: string;
|
|
60
60
|
colorLegend?: string;
|
|
61
|
+
modal?: string;
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
declare type CurveTypes = 'linear' | 'curve' | 'step' | 'stepAfter' | 'stepBefore';
|
|
@@ -240,6 +241,7 @@ declare interface StyleObject {
|
|
|
240
241
|
mouseOverLine?: React.CSSProperties;
|
|
241
242
|
regLine?: React.CSSProperties;
|
|
242
243
|
dataCards?: React.CSSProperties;
|
|
244
|
+
modal?: React.CSSProperties;
|
|
243
245
|
}
|
|
244
246
|
|
|
245
247
|
export { }
|
|
@@ -3,7 +3,7 @@ import { useRef as De, useState as It, useEffect as Te } from "react";
|
|
|
3
3
|
import { p as A, f as Xe } from "./parse-DlCRUFh_.js";
|
|
4
4
|
import { o as Ne } from "./index-BZQYSqar.js";
|
|
5
5
|
import { n as Ve } from "./numberFormattingFunction-14YCbkN2.js";
|
|
6
|
-
import { T as Ge } from "./Tooltip-
|
|
6
|
+
import { T as Ge } from "./Tooltip-Dj5eVppQ.js";
|
|
7
7
|
import { c as v } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
8
8
|
import { C as Ee, g as Pe, A as Be } from "./customArea-BUhPiPT6.js";
|
|
9
9
|
import { A as ze } from "./AxisTitle-jeI7am8o.js";
|
package/dist/MultiLineChart.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-CTPQjnHt.cjs"),E=require("react"),O=require("./parse-hMnG_lRV.cjs"),Be=require("./index-Cno4Q0YE.cjs"),Fe=require("./numberFormattingFunction-02t-wJta.cjs"),ze=require("./Tooltip-4dJo4_AF.cjs"),R=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),He=require("./customArea-CMF5g-C3.cjs"),Je=require("./AxisTitle-sS5bLLR7.cjs"),Ke=require("./Axis-DxRV2yMi.cjs"),Qe=require("./XTicksAndGridLines-B6CELS7q.cjs"),Ze=require("./ReferenceLine-BH0qdf4R.cjs"),_e=require("./YTicksAndGridLines-4pxTRlRK.cjs"),ti=require("./index-B_sAFsEV.cjs"),ei=require("./time-CZd5YLSP.cjs"),ii=require("./linear-BwPAspcq.cjs"),Ge=require("./line-DHV4JwCR.cjs"),De=require("./step-BZ3C8QFW.cjs"),ni=require("./select-Bnfk0lJx.cjs"),oi=require("./init-DU0ybBc_.cjs"),si=require("./pointer-Dkq5NV1q.cjs"),ri=require("./use-in-view-QcfiW0w3.cjs"),Yt=require("./proxy-BxvUI_9l.cjs"),ai=require("./GraphFooter.cjs"),li=require("./GraphHeader.cjs"),ci=require("./ColorLegend.cjs"),ui=require("./Colors.cjs"),di=require("./EmptyState-sAEZ_5rU.cjs"),xi=require("./generateRandomString-B5zBiJzS.cjs"),Ue=require("./GraphContainer-d8A46BK2.cjs"),mi=require("./getNoOfTicks-C_1CFXv_.cjs");function fi(i){const t=o.compilerRuntimeExports.c(153),{data:A,width:tt,height:Xt,lineColors:k,dateFormat:r,noOfXTicks:pe,labels:L,rightMargin:At,topMargin:C,bottomMargin:et,suffix:G,prefix:U,leftMargin:j,tooltip:it,onSeriesMouseOver:Bt,showValues:ge,showColorLegendAtTop:ye,refValues:kt,highlightAreaSettings:zt,minValue:P,maxValue:nt,highlightedLines:ot,animate:s,rtl:W,strokeWidth:Jt,showDots:Kt,annotations:Lt,customHighlightAreaSettings:St,yAxisTitle:st,noOfYTicks:Qt,minDate:le,maxDate:ce,curveType:Nt,styles:y,classNames:g,dimmedOpacity:ue,precision:Y,customLayers:X,dashedLines:rt,dashSettings:Tt,labelsToBeHidden:ve,revealClipId:at}=i,Zt=E.useRef(null);let Dt;t[0]!==s.amount||t[1]!==s.once?(Dt={once:s.once,amount:s.amount},t[0]=s.amount,t[1]=s.once,t[2]=Dt):Dt=t[2];const u=ri.useInView(Zt,Dt),[w,je]=E.useState(!1);let f,x;t[3]!==s.duration||t[4]!==w||t[5]!==u?(f=()=>{if(u&&!w){const n=setTimeout(()=>{je(!0)},(s.duration+.5)*1e3);return()=>clearTimeout(n)}},x=[u,w,s.duration],t[3]=s.duration,t[4]=w,t[5]=u,t[6]=f,t[7]=x):(f=t[6],x=t[7]),E.useEffect(f,x);const we=Nt==="linear"?Ge.curveLinear:Nt==="step"?De.curveStep:Nt==="stepAfter"?De.stepAfter:Nt==="stepBefore"?De.stepBefore:De.monotoneX,[b,It]=E.useState(void 0),[B,qt]=E.useState(void 0),[z,de]=E.useState(void 0),lt=st?j+30:j;let ct;t[8]!==et||t[9]!==At||t[10]!==lt||t[11]!==C?(ct={top:C,bottom:et,left:lt,right:At},t[8]=et,t[9]=At,t[10]=lt,t[11]=C,t[12]=ct):ct=t[12];const h=ct,ut=E.useRef(null);let dt;t[13]!==r?(dt=n=>({...n,date:O.parse(`${n.date}`,r,new Date)}),t[13]=r,t[14]=dt):dt=t[14];const d=Be.orderBy(A.map(dt),["date"],["asc"]),xe=d[0].y.map((n,e)=>d.map(m=>({...m,y:m.y[e]})).filter(Ii));let xt;if(t[15]!==r||t[16]!==zt){let n;t[18]!==r?(n=e=>({...e,coordinates:[e.coordinates[0]===null?null:O.parse(`${e.coordinates[0]}`,r,new Date),e.coordinates[1]===null?null:O.parse(`${e.coordinates[1]}`,r,new Date)]}),t[18]=r,t[19]=n):n=t[19],xt=zt.map(n),t[15]=r,t[16]=zt,t[17]=xt}else xt=t[17];const Mt=xt;let mt;if(t[20]!==St||t[21]!==r){let n;t[23]!==r?(n=e=>({...e,coordinates:e.coordinates.map((m,_)=>_%2===0?O.parse(`${m}`,r,new Date):m)}),t[23]=r,t[24]=n):n=t[24],mt=St.map(n),t[20]=St,t[21]=r,t[22]=mt}else mt=t[22];const me=mt,c=tt-h.left-h.right,p=Xt-h.top-h.bottom,fe=le?O.parse(`${le}`,r,new Date):d[0].date,_t=ce?O.parse(`${ce}`,r,new Date):d[d.length-1].date,v=R.checkIfNullOrUndefined(P)?Math.min(...d.map(Ti))?Math.min(...d.map(Si))>0?0:Math.min(...d.map(ki)):0:P,I=Math.max(...d.map(bi))?Math.max(...d.map(Ci)):0,a=ei.time().domain([fe,_t]).range([0,c]);let J;t[25]!==v||t[26]!==P?(J=R.checkIfNullOrUndefined(P)?v:P,t[25]=v,t[26]=P,t[27]=J):J=t[27];let K;t[28]!==I||t[29]!==nt?(K=R.checkIfNullOrUndefined(nt)?I>0?I:0:nt,t[28]=I,t[29]=nt,t[30]=K):K=t[30];const l=ii.linear().domain([J,K]).range([p,0]).nice(),q=Ge.line().x(n=>a(n.date)).y(n=>l(n.y)).curve(we),te=l.ticks(Qt),ee=a.ticks(pe);E.useEffect(()=>{const n=m=>{const _=d[oi.bisectCenter(d.map(Ri),a.invert(si.pointer(m)[0]),0)];It(_||d[d.length-1]),de(m.clientY),qt(m.clientX),Bt?.(_||d[d.length-1])},e=()=>{It(void 0),qt(void 0),de(void 0)};ni.select(ut.current).on("mousemove",n).on("mouseout",e),Bt?.(void 0)},[a,d,Bt]);let ft;t[31]===Symbol.for("react.memo_cache_sentinel")?(ft={width:0},t[31]=ft):ft=t[31];let S;t[32]!==s.duration?(S={duration:s.duration},t[32]=s.duration,t[33]=S):S=t[33];let M;t[34]!==c||t[35]!==S?(M={initial:ft,whileInView:{width:c,transition:S}},t[34]=c,t[35]=S,t[36]=M):M=t[36];const ht=u?"whileInView":"initial";let V;t[37]!==p||t[38]!==M||t[39]!==ht?(V=o.jsxRuntimeExports.jsx(Yt.motion.rect,{x:0,y:0,height:p,variants:M,initial:"initial",animate:ht}),t[37]=p,t[38]=M,t[39]=ht,t[40]=V):V=t[40];let pt;t[41]!==at||t[42]!==V?(pt=o.jsxRuntimeExports.jsx("defs",{children:o.jsxRuntimeExports.jsx("clipPath",{id:at,children:V})}),t[41]=at,t[42]=V,t[43]=pt):pt=t[43];let gt;t[44]!==s||t[45]!==p||t[46]!==c||t[47]!==Mt||t[48]!==u||t[49]!==a?(gt=o.jsxRuntimeExports.jsx(ti.HighlightArea,{areaSettings:Mt,width:c,height:p,scale:a,animate:s,isInView:u}),t[44]=s,t[45]=p,t[46]=c,t[47]=Mt,t[48]=u,t[49]=a,t[50]=gt):gt=t[50];const Vt=y?.yAxis?.gridLines,$t=y?.yAxis?.labels;let yt;t[51]!==Vt||t[52]!==$t?(yt={gridLines:Vt,labels:$t},t[51]=Vt,t[52]=$t,t[53]=yt):yt=t[53];const vt=g?.yAxis?.gridLines,Ht=g?.yAxis?.labels;let Q;t[54]!==vt||t[55]!==Ht?(Q={gridLines:vt,labels:Ht},t[54]=vt,t[55]=Ht,t[56]=Q):Q=t[56];const Ft=l(v<0?0:v),jt=l(v<0?0:v),Gt=0-j,wt=c+h.right,Ot=v<0?0:v;let N;t[57]!==Y||t[58]!==U||t[59]!==G||t[60]!==Ot?(N=Fe.numberFormattingFunction(Ot,"NA",Y,U,G),t[57]=Y,t[58]=U,t[59]=G,t[60]=Ot,t[61]=N):N=t[61];const Z=0-j,he=l(v<0?0:v),Rt=I<0?"1em":-5;let Ct;t[62]!==Z||t[63]!==he||t[64]!==Rt?(Ct={x:Z,y:he,dx:0,dy:Rt},t[62]=Z,t[63]=he,t[64]=Rt,t[65]=Ct):Ct=t[65];const Ut=g?.xAxis?.axis,ie=g?.yAxis?.labels;let T;t[66]!==Ut||t[67]!==ie?(T={axis:Ut,label:ie},t[66]=Ut,t[67]=ie,t[68]=T):T=t[68];const Et=y?.xAxis?.axis,Pt=y?.yAxis?.labels;let $;t[69]!==Et||t[70]!==Pt?($={axis:Et,label:Pt},t[69]=Et,t[70]=Pt,t[71]=$):$=t[71];let D;t[72]!==Ft||t[73]!==jt||t[74]!==Gt||t[75]!==wt||t[76]!==N||t[77]!==Ct||t[78]!==T||t[79]!==$?(D=o.jsxRuntimeExports.jsx(Ke.Axis,{y1:Ft,y2:jt,x1:Gt,x2:wt,label:N,labelPos:Ct,classNames:T,styles:$}),t[72]=Ft,t[73]=jt,t[74]=Gt,t[75]=wt,t[76]=N,t[77]=Ct,t[78]=T,t[79]=$,t[80]=D):D=t[80];const H=0-j-15,F=p/2,bt=y?.yAxis?.title,ne=g?.yAxis?.title;let Wt;t[81]!==H||t[82]!==F||t[83]!==bt||t[84]!==ne||t[85]!==st?(Wt=o.jsxRuntimeExports.jsx(Je.AxisTitle,{x:H,y:F,style:bt,className:ne,text:st,rotate90:!0}),t[81]=H,t[82]=F,t[83]=bt,t[84]=ne,t[85]=st,t[86]=Wt):Wt=t[86];let Oe;t[87]!==r?(Oe=n=>O.format(n,r),t[87]=r,t[88]=Oe):Oe=t[88];const Pe=ee.map(Oe),We=ee.map(n=>a(n)),Ie=y?.xAxis?.gridLines,qe=y?.xAxis?.labels;let Re;t[89]!==Ie||t[90]!==qe?(Re={gridLines:Ie,labels:qe},t[89]=Ie,t[90]=qe,t[91]=Re):Re=t[91];const Me=g?.xAxis?.gridLines;let oe;t[92]!==Me?(oe=o.mo("opacity-0",Me),t[92]=Me,t[93]=oe):oe=t[93];const Ve=g?.xAxis?.labels;let se;t[94]!==Ve?(se=o.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",Ve),t[94]=Ve,t[95]=se):se=t[95];let Ce;t[96]!==oe||t[97]!==se?(Ce={gridLines:oe,labels:se},t[96]=oe,t[97]=se,t[98]=Ce):Ce=t[98];let Ee;t[99]!==X?(Ee=X.filter(ji).map(vi),t[99]=X,t[100]=Ee):Ee=t[100];const $e=xe.map((n,e)=>o.jsxRuntimeExports.jsxs(Yt.motion.g,{exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:ot.length!==0?ot.indexOf(L[e])!==-1?1:ue:1},whileInView:{opacity:ot.length!==0?ot.indexOf(L[e])!==-1?1:ue:1,transition:{duration:s.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:[o.jsxRuntimeExports.jsx(Yt.motion.path,{style:{fill:"none",strokeWidth:Jt},clipPath:`url(#${at})`,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{...rt.length===0?{pathLength:0}:{},d:q(n.filter(yi))||"",opacity:1,stroke:k[e]},whileInView:{...rt.length===0?{pathLength:1}:{},d:q(n.filter(gi))||"",opacity:1,stroke:k[e],transition:{duration:s.duration}}},strokeDasharray:rt.includes(L[e])?Tt[e%Tt.length]:void 0,initial:"initial",animate:u?"whileInView":"initial"}),n.map((m,_)=>o.jsxRuntimeExports.jsx("g",{children:R.checkIfNullOrUndefined(m.y)?null:o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[Kt?o.jsxRuntimeExports.jsx(Yt.motion.circle,{r:c/d.length<5?0:c/d.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,fill:k[e],cx:a(m.date),cy:l(m.y)},whileInView:{opacity:1,fill:k[e],transition:{duration:w?s.duration:.5,delay:w?0:s.duration},cx:a(m.date),cy:l(m.y)}},initial:"initial",animate:u?"whileInView":"initial"}):null,ge?o.jsxRuntimeExports.jsx(Yt.motion.text,{dy:-8,style:{textAnchor:"middle",...y?.graphObjectValues||{}},className:o.mo("graph-value text-xs font-bold",g?.graphObjectValues),exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,fill:k[e],x:a(m.date),y:l(m.y)},whileInView:{opacity:1,fill:k[e],x:a(m.date),y:l(m.y),transition:{duration:w?s.duration:.5,delay:w?0:s.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:Fe.numberFormattingFunction(m.y,"NA",Y,U,G)}):null]})},_)),ye||ve.includes(L[e])?null:o.jsxRuntimeExports.jsx(Yt.motion.text,{className:"text-xs",dx:5,dy:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,fill:k[e],x:a(n[n.length-1].date),y:l(n[n.length-1].y)},whileInView:{opacity:1,fill:k[e],x:a(n[n.length-1].date),y:l(n[n.length-1].y),transition:{duration:w?s.duration:.5,delay:w?0:s.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:L[e]})]},L[e]));let re;t[101]!==g?.mouseOverLine||t[102]!==p||t[103]!==b||t[104]!==y?.mouseOverLine||t[105]!==a?(re=b?o.jsxRuntimeExports.jsx("line",{y1:0,y2:p,x1:a(b.date),x2:a(b.date),className:o.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",g?.mouseOverLine),style:y?.mouseOverLine}):null,t[101]=g?.mouseOverLine,t[102]=p,t[103]=b,t[104]=y?.mouseOverLine,t[105]=a,t[106]=re):re=t[106];let be;t[107]!==$e||t[108]!==re?(be=o.jsxRuntimeExports.jsxs("g",{children:[$e,re]}),t[107]=$e,t[108]=re,t[109]=be):be=t[109];let Ae;t[110]!==s||t[111]!==c||t[112]!==u||t[113]!==j||t[114]!==h.right||t[115]!==kt||t[116]!==l?(Ae=kt?o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:kt.map((n,e)=>o.jsxRuntimeExports.jsx(Ze.RefLineY,{text:n.text,color:n.color,y:l(n.value),x1:0-j,x2:c+h.right,classNames:n.classNames,styles:n.styles,animate:s,isInView:u},e))}):null,t[110]=s,t[111]=c,t[112]=u,t[113]=j,t[114]=h.right,t[115]=kt,t[116]=l,t[117]=Ae):Ae=t[117];let ae;if(t[118]!==s||t[119]!==Lt||t[120]!==r||t[121]!==c||t[122]!==u||t[123]!==h.right||t[124]!==W||t[125]!==a||t[126]!==l){let n;t[128]!==s||t[129]!==r||t[130]!==c||t[131]!==u||t[132]!==h.right||t[133]!==W||t[134]!==a||t[135]!==l?(n=(e,m)=>{const _=He.getLineEndPoint({x:e.xCoordinate?a(O.parse(`${e.xCoordinate}`,r,new Date))+(e.xOffset||0):0+(e.xOffset||0),y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8},{x:e.xCoordinate?a(O.parse(`${e.xCoordinate}`,r,new Date)):0,y:e.yCoordinate?l(e.yCoordinate):0},R.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),Ye=e.showConnector?{y1:_.y,x1:_.x,y2:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?a(O.parse(`${e.xCoordinate}`,r,new Date))+(e.xOffset||0):0+(e.xOffset||0),cy:e.yCoordinate?l(e.yCoordinate):0,cx:e.xCoordinate?a(O.parse(`${e.xCoordinate}`,r,new Date)):0,circleRadius:R.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,Xe={y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:W?0:e.xCoordinate?a(O.parse(`${e.xCoordinate}`,r,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:W?e.xCoordinate?a(O.parse(`${e.xCoordinate}`,r,new Date))+(e.xOffset||0):0+(e.xOffset||0):c+h.right-(e.xCoordinate?a(O.parse(`${e.xCoordinate}`,r,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return o.jsxRuntimeExports.jsx(He.Annotation,{color:e.color,connectorsSettings:Ye,labelSettings:Xe,text:e.text,classNames:e.classNames,styles:e.styles,animate:s,isInView:u},m)},t[128]=s,t[129]=r,t[130]=c,t[131]=u,t[132]=h.right,t[133]=W,t[134]=a,t[135]=l,t[136]=n):n=t[136],ae=Lt.map(n),t[118]=s,t[119]=Lt,t[120]=r,t[121]=c,t[122]=u,t[123]=h.right,t[124]=W,t[125]=a,t[126]=l,t[127]=ae}else ae=t[127];let ke;t[137]!==ae?(ke=o.jsxRuntimeExports.jsx("g",{children:ae}),t[137]=ae,t[138]=ke):ke=t[138];let Le;t[139]!==X?(Le=X.filter(pi).map(hi),t[139]=X,t[140]=Le):Le=t[140];let Se;t[141]===Symbol.for("react.memo_cache_sentinel")?(Se={fill:"none",pointerEvents:"all"},t[141]=Se):Se=t[141];let Ne;t[142]!==ut||t[143]!==p||t[144]!==c?(Ne=o.jsxRuntimeExports.jsx("rect",{ref:ut,style:Se,width:c,height:p}),t[142]=ut,t[143]=p,t[144]=c,t[145]=Ne):Ne=t[145];let Te;return t[146]!==g?.tooltip||t[147]!==B||t[148]!==z||t[149]!==b||t[150]!==y?.tooltip||t[151]!==it?(Te=b&&it&&B&&z?o.jsxRuntimeExports.jsx(ze.Tooltip,{data:b,body:it,xPos:B,yPos:z,backgroundStyle:y?.tooltip,className:g?.tooltip}):null,t[146]=g?.tooltip,t[147]=B,t[148]=z,t[149]=b,t[150]=y?.tooltip,t[151]=it,t[152]=Te):Te=t[152],o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(Yt.motion.svg,{width:`${tt}px`,height:`${Xt}px`,viewBox:`0 0 ${tt} ${Xt}`,direction:"ltr",ref:Zt,children:o.jsxRuntimeExports.jsxs("g",{transform:`translate(${h.left},${h.top})`,children:[pt,gt,o.jsxRuntimeExports.jsx(He.CustomArea,{areaSettings:me,scaleX:a,scaleY:l,animate:s,isInView:u}),o.jsxRuntimeExports.jsxs("g",{children:[o.jsxRuntimeExports.jsx(_e.YTicksAndGridLines,{values:te.filter(Oi),y:te.filter(wi).map(n=>l(n)),x1:0-j,x2:c+h.right,styles:yt,classNames:Q,suffix:G,prefix:U,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:Y}),D,Wt]}),o.jsxRuntimeExports.jsx("g",{children:o.jsxRuntimeExports.jsx(Qe.XTicksAndGridLines,{values:Pe,x:We,y1:0,y2:p,styles:Re,classNames:Ce,suffix:G,prefix:U,labelType:"primary",showGridLines:!0,precision:Y})}),Ee,be,Ae,ke,Le,Ne]})}),Te]})}function hi(i){return i.layer}function pi(i){return i.position==="after"}function gi(i){return!R.checkIfNullOrUndefined(i.y)}function yi(i){return!R.checkIfNullOrUndefined(i.y)}function vi(i){return i.layer}function ji(i){return i.position==="before"}function wi(i){return i!==0}function Oi(i){return i!==0}function Ri(i){return i.date}function Ci(i){return Math.max(...i.y.filter(Ei))}function Ei(i){return!R.checkIfNullOrUndefined(i)}function bi(i){return Math.max(...i.y.filter(Ai))}function Ai(i){return!R.checkIfNullOrUndefined(i)}function ki(i){return Math.min(...i.y.filter(Li))}function Li(i){return!R.checkIfNullOrUndefined(i)}function Si(i){return Math.min(...i.y.filter(Ni))}function Ni(i){return!R.checkIfNullOrUndefined(i)}function Ti(i){return Math.min(...i.y.filter(Di))}function Di(i){return!R.checkIfNullOrUndefined(i)}function Ii(i){return!R.checkIfNullOrUndefined(i.y)}function qi(i){const t=o.compilerRuntimeExports.c(99),{data:A,graphTitle:tt,lineColors:Xt,suffix:k,sources:r,prefix:pe,graphDescription:L,height:At,width:C,footNote:et,noOfXTicks:G,dateFormat:U,labels:j,padding:it,showValues:Bt,backgroundColor:ge,leftMargin:ye,rightMargin:kt,topMargin:zt,bottomMargin:P,tooltip:nt,relativeHeight:ot,onSeriesMouseOver:s,showColorLegendAtTop:W,refValues:Jt,highlightAreaSettings:Kt,graphID:Lt,minValue:St,maxValue:st,highlightedLines:Qt,graphDownload:le,dataDownload:ce,animate:Nt,language:y,colorLegendTitle:g,minHeight:ue,strokeWidth:Y,showDots:X,annotations:rt,customHighlightAreaSettings:Tt,theme:ve,ariaLabel:at,yAxisTitle:Zt,noOfYTicks:Dt,minDate:u,maxDate:w,curveType:je,styles:f,classNames:x,dimmedOpacity:we,precision:b,customLayers:It,dashedLines:B,dashSettings:qt,labelsToBeHidden:z,showColorScale:de}=i,lt=Xt===void 0?ui.Colors.light.categoricalColors.colors:Xt,ct=k===void 0?"":k,h=pe===void 0?"":pe,ut=G===void 0?10:G,dt=U===void 0?"yyyy":U,d=Bt===void 0?!1:Bt,xe=ge===void 0?!1:ge,xt=ye===void 0?30:ye,Mt=kt===void 0?50:kt,mt=zt===void 0?20:zt,me=P===void 0?25:P,c=W===void 0?!1:W;let p;t[0]!==Jt?(p=Jt===void 0?[]:Jt,t[0]=Jt,t[1]=p):p=t[1];const fe=p;let _t;t[2]!==Kt?(_t=Kt===void 0?[]:Kt,t[2]=Kt,t[3]=_t):_t=t[3];const v=_t;let I;t[4]!==Qt?(I=Qt===void 0?[]:Qt,t[4]=Qt,t[5]=I):I=t[5];const a=I,J=le===void 0?!1:le,K=ce===void 0?!1:ce,l=Nt===void 0?!1:Nt,q=y===void 0?"en":y,te=ue===void 0?0:ue,ee=Y===void 0?2:Y,ft=X===void 0?!0:X;let S;t[6]!==rt?(S=rt===void 0?[]:rt,t[6]=rt,t[7]=S):S=t[7];const M=S;let ht;t[8]!==Tt?(ht=Tt===void 0?[]:Tt,t[8]=Tt,t[9]=ht):ht=t[9];const V=ht,pt=ve===void 0?"light":ve,gt=Dt===void 0?5:Dt,Vt=je===void 0?"curve":je,$t=we===void 0?.3:we,yt=b===void 0?2:b;let vt;t[10]!==It?(vt=It===void 0?[]:It,t[10]=It,t[11]=vt):vt=t[11];const Ht=vt;let Q;t[12]!==B?(Q=B===void 0?[]:B,t[12]=B,t[13]=Q):Q=t[13];const Ft=Q;let jt;t[14]!==qt?(jt=qt===void 0?["5 5"]:qt,t[14]=qt,t[15]=jt):jt=t[15];const Gt=jt;let wt;t[16]!==z?(wt=z===void 0?[]:z,t[16]=z,t[17]=wt):wt=t[17];const Ot=wt,N=de===void 0?!0:de,[Z,he]=E.useState(0),[Rt,Ct]=E.useState(0),Ut=E.useRef(null),ie=E.useRef(null);let T,Et;t[18]===Symbol.for("react.memo_cache_sentinel")?(T=()=>{const ne=new ResizeObserver(Wt=>{he(Wt[0].target.clientWidth||620),Ct(Wt[0].target.clientHeight||480)});return Ut.current&&ne.observe(Ut.current),()=>ne.disconnect()},Et=[],t[18]=T,t[19]=Et):(T=t[18],Et=t[19]),E.useEffect(T,Et);const Pt=x?.graphContainer,$=f?.graphContainer;let D;t[20]!==x?.description||t[21]!==x?.title||t[22]!==A||t[23]!==K||t[24]!==L||t[25]!==J||t[26]!==tt||t[27]!==f?.description||t[28]!==f?.title||t[29]!==C?(D=tt||L||J||K?o.jsxRuntimeExports.jsx(li.GraphHeader,{styles:{title:f?.title,description:f?.description},classNames:{title:x?.title,description:x?.description},graphTitle:tt,graphDescription:L,width:C,graphDownload:J?ie:void 0,dataDownload:K?A.map(Fi).filter(Hi).length>0?A.map($i).filter(Vi):A.filter(Mi):null}):null,t[20]=x?.description,t[21]=x?.title,t[22]=A,t[23]=K,t[24]=L,t[25]=J,t[26]=tt,t[27]=f?.description,t[28]=f?.title,t[29]=C,t[30]=D):D=t[30];let H;t[31]!==l||t[32]!==M||t[33]!==me||t[34]!==x||t[35]!==g||t[36]!==Vt||t[37]!==V||t[38]!==Ht||t[39]!==Gt||t[40]!==Ft||t[41]!==A||t[42]!==dt||t[43]!==$t||t[44]!==v||t[45]!==a||t[46]!==j||t[47]!==Ot||t[48]!==q||t[49]!==xt||t[50]!==lt||t[51]!==w||t[52]!==st||t[53]!==u||t[54]!==St||t[55]!==ut||t[56]!==gt||t[57]!==s||t[58]!==yt||t[59]!==h||t[60]!==fe||t[61]!==Mt||t[62]!==c||t[63]!==N||t[64]!==ft||t[65]!==d||t[66]!==ee||t[67]!==f||t[68]!==ct||t[69]!==Rt||t[70]!==Z||t[71]!==nt||t[72]!==mt||t[73]!==Zt?(H=A.length===0?o.jsxRuntimeExports.jsx(di.EmptyState,{}):o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[c&&N?o.jsxRuntimeExports.jsx(ci.ColorLegend,{colorDomain:j,colorLegendTitle:g,labelsToBeHidden:Ot,colors:lt,showNAColor:!1,className:x?.colorLegend}):null,o.jsxRuntimeExports.jsx(Ue.GraphArea,{ref:Ut,children:Z&&Rt?o.jsxRuntimeExports.jsx(fi,{data:A,lineColors:lt,width:Z,height:Rt,dateFormat:dt,noOfXTicks:ut??mi.getNoOfTicks(Z),leftMargin:xt,rightMargin:Mt,topMargin:mt,bottomMargin:me,labels:j,tooltip:nt,onSeriesMouseOver:s,showColorLegendAtTop:N?c:!0,showValues:d,suffix:ct,prefix:h,highlightAreaSettings:v,refValues:fe,minValue:St,maxValue:st,highlightedLines:a,animate:l===!0?{duration:.5,once:!0,amount:.5}:l||{duration:0,once:!0,amount:0},rtl:q==="he"||q==="ar",strokeWidth:ee,showDots:ft,annotations:M,customHighlightAreaSettings:V,yAxisTitle:Zt,noOfYTicks:gt,minDate:u,maxDate:w,curveType:Vt,styles:f,classNames:x,dimmedOpacity:$t,precision:yt,customLayers:Ht,labelsToBeHidden:Ot,dashedLines:Ft,dashSettings:Gt,revealClipId:xi.generateRandomString(8)}):null})]}),t[31]=l,t[32]=M,t[33]=me,t[34]=x,t[35]=g,t[36]=Vt,t[37]=V,t[38]=Ht,t[39]=Gt,t[40]=Ft,t[41]=A,t[42]=dt,t[43]=$t,t[44]=v,t[45]=a,t[46]=j,t[47]=Ot,t[48]=q,t[49]=xt,t[50]=lt,t[51]=w,t[52]=st,t[53]=u,t[54]=St,t[55]=ut,t[56]=gt,t[57]=s,t[58]=yt,t[59]=h,t[60]=fe,t[61]=Mt,t[62]=c,t[63]=N,t[64]=ft,t[65]=d,t[66]=ee,t[67]=f,t[68]=ct,t[69]=Rt,t[70]=Z,t[71]=nt,t[72]=mt,t[73]=Zt,t[74]=H):H=t[74];let F;t[75]!==x?.footnote||t[76]!==x?.source||t[77]!==et||t[78]!==r||t[79]!==f?.footnote||t[80]!==f?.source||t[81]!==C?(F=r||et?o.jsxRuntimeExports.jsx(ai.GraphFooter,{styles:{footnote:f?.footnote,source:f?.source},classNames:{footnote:x?.footnote,source:x?.source},sources:r,footNote:et,width:C}):null,t[75]=x?.footnote,t[76]=x?.source,t[77]=et,t[78]=r,t[79]=f?.footnote,t[80]=f?.source,t[81]=C,t[82]=F):F=t[82];let bt;return t[83]!==at||t[84]!==xe||t[85]!==Lt||t[86]!==At||t[87]!==q||t[88]!==te||t[89]!==it||t[90]!==ot||t[91]!==Pt||t[92]!==$||t[93]!==D||t[94]!==H||t[95]!==F||t[96]!==pt||t[97]!==C?(bt=o.jsxRuntimeExports.jsxs(Ue.GraphContainer,{className:Pt,style:$,id:Lt,ref:ie,"aria-label":at,backgroundColor:xe,theme:pt,language:q,minHeight:te,width:C,height:At,relativeHeight:ot,padding:it,children:[D,H,F]}),t[83]=at,t[84]=xe,t[85]=Lt,t[86]=At,t[87]=q,t[88]=te,t[89]=it,t[90]=ot,t[91]=Pt,t[92]=$,t[93]=D,t[94]=H,t[95]=F,t[96]=pt,t[97]=C,t[98]=bt):bt=t[98],bt}function Mi(i){return i!==void 0}function Vi(i){return i!==void 0}function $i(i){return i.data}function Hi(i){return i!==void 0}function Fi(i){return i.data}exports.MultiLineChart=qi;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-CTPQjnHt.cjs"),E=require("react"),O=require("./parse-hMnG_lRV.cjs"),Be=require("./index-Cno4Q0YE.cjs"),Fe=require("./numberFormattingFunction-02t-wJta.cjs"),ze=require("./Tooltip-uUdw6wJL.cjs"),R=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),He=require("./customArea-CMF5g-C3.cjs"),Je=require("./AxisTitle-sS5bLLR7.cjs"),Ke=require("./Axis-DxRV2yMi.cjs"),Qe=require("./XTicksAndGridLines-B6CELS7q.cjs"),Ze=require("./ReferenceLine-BH0qdf4R.cjs"),_e=require("./YTicksAndGridLines-4pxTRlRK.cjs"),ti=require("./index-B_sAFsEV.cjs"),ei=require("./time-CZd5YLSP.cjs"),ii=require("./linear-BwPAspcq.cjs"),Ge=require("./line-DHV4JwCR.cjs"),De=require("./step-BZ3C8QFW.cjs"),ni=require("./select-Bnfk0lJx.cjs"),oi=require("./init-DU0ybBc_.cjs"),si=require("./pointer-Dkq5NV1q.cjs"),ri=require("./use-in-view-QcfiW0w3.cjs"),Yt=require("./proxy-BxvUI_9l.cjs"),ai=require("./GraphFooter.cjs"),li=require("./GraphHeader.cjs"),ci=require("./ColorLegend.cjs"),ui=require("./Colors.cjs"),di=require("./EmptyState-sAEZ_5rU.cjs"),xi=require("./generateRandomString-B5zBiJzS.cjs"),Ue=require("./GraphContainer-d8A46BK2.cjs"),mi=require("./getNoOfTicks-C_1CFXv_.cjs");function fi(i){const t=o.compilerRuntimeExports.c(153),{data:A,width:tt,height:Xt,lineColors:k,dateFormat:r,noOfXTicks:pe,labels:L,rightMargin:At,topMargin:C,bottomMargin:et,suffix:G,prefix:U,leftMargin:j,tooltip:it,onSeriesMouseOver:Bt,showValues:ge,showColorLegendAtTop:ye,refValues:kt,highlightAreaSettings:zt,minValue:P,maxValue:nt,highlightedLines:ot,animate:s,rtl:W,strokeWidth:Jt,showDots:Kt,annotations:Lt,customHighlightAreaSettings:St,yAxisTitle:st,noOfYTicks:Qt,minDate:le,maxDate:ce,curveType:Nt,styles:y,classNames:g,dimmedOpacity:ue,precision:Y,customLayers:X,dashedLines:rt,dashSettings:Tt,labelsToBeHidden:ve,revealClipId:at}=i,Zt=E.useRef(null);let Dt;t[0]!==s.amount||t[1]!==s.once?(Dt={once:s.once,amount:s.amount},t[0]=s.amount,t[1]=s.once,t[2]=Dt):Dt=t[2];const u=ri.useInView(Zt,Dt),[w,je]=E.useState(!1);let f,x;t[3]!==s.duration||t[4]!==w||t[5]!==u?(f=()=>{if(u&&!w){const n=setTimeout(()=>{je(!0)},(s.duration+.5)*1e3);return()=>clearTimeout(n)}},x=[u,w,s.duration],t[3]=s.duration,t[4]=w,t[5]=u,t[6]=f,t[7]=x):(f=t[6],x=t[7]),E.useEffect(f,x);const we=Nt==="linear"?Ge.curveLinear:Nt==="step"?De.curveStep:Nt==="stepAfter"?De.stepAfter:Nt==="stepBefore"?De.stepBefore:De.monotoneX,[b,It]=E.useState(void 0),[B,qt]=E.useState(void 0),[z,de]=E.useState(void 0),lt=st?j+30:j;let ct;t[8]!==et||t[9]!==At||t[10]!==lt||t[11]!==C?(ct={top:C,bottom:et,left:lt,right:At},t[8]=et,t[9]=At,t[10]=lt,t[11]=C,t[12]=ct):ct=t[12];const h=ct,ut=E.useRef(null);let dt;t[13]!==r?(dt=n=>({...n,date:O.parse(`${n.date}`,r,new Date)}),t[13]=r,t[14]=dt):dt=t[14];const d=Be.orderBy(A.map(dt),["date"],["asc"]),xe=d[0].y.map((n,e)=>d.map(m=>({...m,y:m.y[e]})).filter(Ii));let xt;if(t[15]!==r||t[16]!==zt){let n;t[18]!==r?(n=e=>({...e,coordinates:[e.coordinates[0]===null?null:O.parse(`${e.coordinates[0]}`,r,new Date),e.coordinates[1]===null?null:O.parse(`${e.coordinates[1]}`,r,new Date)]}),t[18]=r,t[19]=n):n=t[19],xt=zt.map(n),t[15]=r,t[16]=zt,t[17]=xt}else xt=t[17];const Mt=xt;let mt;if(t[20]!==St||t[21]!==r){let n;t[23]!==r?(n=e=>({...e,coordinates:e.coordinates.map((m,_)=>_%2===0?O.parse(`${m}`,r,new Date):m)}),t[23]=r,t[24]=n):n=t[24],mt=St.map(n),t[20]=St,t[21]=r,t[22]=mt}else mt=t[22];const me=mt,c=tt-h.left-h.right,p=Xt-h.top-h.bottom,fe=le?O.parse(`${le}`,r,new Date):d[0].date,_t=ce?O.parse(`${ce}`,r,new Date):d[d.length-1].date,v=R.checkIfNullOrUndefined(P)?Math.min(...d.map(Ti))?Math.min(...d.map(Si))>0?0:Math.min(...d.map(ki)):0:P,I=Math.max(...d.map(bi))?Math.max(...d.map(Ci)):0,a=ei.time().domain([fe,_t]).range([0,c]);let J;t[25]!==v||t[26]!==P?(J=R.checkIfNullOrUndefined(P)?v:P,t[25]=v,t[26]=P,t[27]=J):J=t[27];let K;t[28]!==I||t[29]!==nt?(K=R.checkIfNullOrUndefined(nt)?I>0?I:0:nt,t[28]=I,t[29]=nt,t[30]=K):K=t[30];const l=ii.linear().domain([J,K]).range([p,0]).nice(),q=Ge.line().x(n=>a(n.date)).y(n=>l(n.y)).curve(we),te=l.ticks(Qt),ee=a.ticks(pe);E.useEffect(()=>{const n=m=>{const _=d[oi.bisectCenter(d.map(Ri),a.invert(si.pointer(m)[0]),0)];It(_||d[d.length-1]),de(m.clientY),qt(m.clientX),Bt?.(_||d[d.length-1])},e=()=>{It(void 0),qt(void 0),de(void 0)};ni.select(ut.current).on("mousemove",n).on("mouseout",e),Bt?.(void 0)},[a,d,Bt]);let ft;t[31]===Symbol.for("react.memo_cache_sentinel")?(ft={width:0},t[31]=ft):ft=t[31];let S;t[32]!==s.duration?(S={duration:s.duration},t[32]=s.duration,t[33]=S):S=t[33];let M;t[34]!==c||t[35]!==S?(M={initial:ft,whileInView:{width:c,transition:S}},t[34]=c,t[35]=S,t[36]=M):M=t[36];const ht=u?"whileInView":"initial";let V;t[37]!==p||t[38]!==M||t[39]!==ht?(V=o.jsxRuntimeExports.jsx(Yt.motion.rect,{x:0,y:0,height:p,variants:M,initial:"initial",animate:ht}),t[37]=p,t[38]=M,t[39]=ht,t[40]=V):V=t[40];let pt;t[41]!==at||t[42]!==V?(pt=o.jsxRuntimeExports.jsx("defs",{children:o.jsxRuntimeExports.jsx("clipPath",{id:at,children:V})}),t[41]=at,t[42]=V,t[43]=pt):pt=t[43];let gt;t[44]!==s||t[45]!==p||t[46]!==c||t[47]!==Mt||t[48]!==u||t[49]!==a?(gt=o.jsxRuntimeExports.jsx(ti.HighlightArea,{areaSettings:Mt,width:c,height:p,scale:a,animate:s,isInView:u}),t[44]=s,t[45]=p,t[46]=c,t[47]=Mt,t[48]=u,t[49]=a,t[50]=gt):gt=t[50];const Vt=y?.yAxis?.gridLines,$t=y?.yAxis?.labels;let yt;t[51]!==Vt||t[52]!==$t?(yt={gridLines:Vt,labels:$t},t[51]=Vt,t[52]=$t,t[53]=yt):yt=t[53];const vt=g?.yAxis?.gridLines,Ht=g?.yAxis?.labels;let Q;t[54]!==vt||t[55]!==Ht?(Q={gridLines:vt,labels:Ht},t[54]=vt,t[55]=Ht,t[56]=Q):Q=t[56];const Ft=l(v<0?0:v),jt=l(v<0?0:v),Gt=0-j,wt=c+h.right,Ot=v<0?0:v;let N;t[57]!==Y||t[58]!==U||t[59]!==G||t[60]!==Ot?(N=Fe.numberFormattingFunction(Ot,"NA",Y,U,G),t[57]=Y,t[58]=U,t[59]=G,t[60]=Ot,t[61]=N):N=t[61];const Z=0-j,he=l(v<0?0:v),Rt=I<0?"1em":-5;let Ct;t[62]!==Z||t[63]!==he||t[64]!==Rt?(Ct={x:Z,y:he,dx:0,dy:Rt},t[62]=Z,t[63]=he,t[64]=Rt,t[65]=Ct):Ct=t[65];const Ut=g?.xAxis?.axis,ie=g?.yAxis?.labels;let T;t[66]!==Ut||t[67]!==ie?(T={axis:Ut,label:ie},t[66]=Ut,t[67]=ie,t[68]=T):T=t[68];const Et=y?.xAxis?.axis,Pt=y?.yAxis?.labels;let $;t[69]!==Et||t[70]!==Pt?($={axis:Et,label:Pt},t[69]=Et,t[70]=Pt,t[71]=$):$=t[71];let D;t[72]!==Ft||t[73]!==jt||t[74]!==Gt||t[75]!==wt||t[76]!==N||t[77]!==Ct||t[78]!==T||t[79]!==$?(D=o.jsxRuntimeExports.jsx(Ke.Axis,{y1:Ft,y2:jt,x1:Gt,x2:wt,label:N,labelPos:Ct,classNames:T,styles:$}),t[72]=Ft,t[73]=jt,t[74]=Gt,t[75]=wt,t[76]=N,t[77]=Ct,t[78]=T,t[79]=$,t[80]=D):D=t[80];const H=0-j-15,F=p/2,bt=y?.yAxis?.title,ne=g?.yAxis?.title;let Wt;t[81]!==H||t[82]!==F||t[83]!==bt||t[84]!==ne||t[85]!==st?(Wt=o.jsxRuntimeExports.jsx(Je.AxisTitle,{x:H,y:F,style:bt,className:ne,text:st,rotate90:!0}),t[81]=H,t[82]=F,t[83]=bt,t[84]=ne,t[85]=st,t[86]=Wt):Wt=t[86];let Oe;t[87]!==r?(Oe=n=>O.format(n,r),t[87]=r,t[88]=Oe):Oe=t[88];const Pe=ee.map(Oe),We=ee.map(n=>a(n)),Ie=y?.xAxis?.gridLines,qe=y?.xAxis?.labels;let Re;t[89]!==Ie||t[90]!==qe?(Re={gridLines:Ie,labels:qe},t[89]=Ie,t[90]=qe,t[91]=Re):Re=t[91];const Me=g?.xAxis?.gridLines;let oe;t[92]!==Me?(oe=o.mo("opacity-0",Me),t[92]=Me,t[93]=oe):oe=t[93];const Ve=g?.xAxis?.labels;let se;t[94]!==Ve?(se=o.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",Ve),t[94]=Ve,t[95]=se):se=t[95];let Ce;t[96]!==oe||t[97]!==se?(Ce={gridLines:oe,labels:se},t[96]=oe,t[97]=se,t[98]=Ce):Ce=t[98];let Ee;t[99]!==X?(Ee=X.filter(ji).map(vi),t[99]=X,t[100]=Ee):Ee=t[100];const $e=xe.map((n,e)=>o.jsxRuntimeExports.jsxs(Yt.motion.g,{exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:ot.length!==0?ot.indexOf(L[e])!==-1?1:ue:1},whileInView:{opacity:ot.length!==0?ot.indexOf(L[e])!==-1?1:ue:1,transition:{duration:s.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:[o.jsxRuntimeExports.jsx(Yt.motion.path,{style:{fill:"none",strokeWidth:Jt},clipPath:`url(#${at})`,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{...rt.length===0?{pathLength:0}:{},d:q(n.filter(yi))||"",opacity:1,stroke:k[e]},whileInView:{...rt.length===0?{pathLength:1}:{},d:q(n.filter(gi))||"",opacity:1,stroke:k[e],transition:{duration:s.duration}}},strokeDasharray:rt.includes(L[e])?Tt[e%Tt.length]:void 0,initial:"initial",animate:u?"whileInView":"initial"}),n.map((m,_)=>o.jsxRuntimeExports.jsx("g",{children:R.checkIfNullOrUndefined(m.y)?null:o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[Kt?o.jsxRuntimeExports.jsx(Yt.motion.circle,{r:c/d.length<5?0:c/d.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,fill:k[e],cx:a(m.date),cy:l(m.y)},whileInView:{opacity:1,fill:k[e],transition:{duration:w?s.duration:.5,delay:w?0:s.duration},cx:a(m.date),cy:l(m.y)}},initial:"initial",animate:u?"whileInView":"initial"}):null,ge?o.jsxRuntimeExports.jsx(Yt.motion.text,{dy:-8,style:{textAnchor:"middle",...y?.graphObjectValues||{}},className:o.mo("graph-value text-xs font-bold",g?.graphObjectValues),exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,fill:k[e],x:a(m.date),y:l(m.y)},whileInView:{opacity:1,fill:k[e],x:a(m.date),y:l(m.y),transition:{duration:w?s.duration:.5,delay:w?0:s.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:Fe.numberFormattingFunction(m.y,"NA",Y,U,G)}):null]})},_)),ye||ve.includes(L[e])?null:o.jsxRuntimeExports.jsx(Yt.motion.text,{className:"text-xs",dx:5,dy:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,fill:k[e],x:a(n[n.length-1].date),y:l(n[n.length-1].y)},whileInView:{opacity:1,fill:k[e],x:a(n[n.length-1].date),y:l(n[n.length-1].y),transition:{duration:w?s.duration:.5,delay:w?0:s.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:L[e]})]},L[e]));let re;t[101]!==g?.mouseOverLine||t[102]!==p||t[103]!==b||t[104]!==y?.mouseOverLine||t[105]!==a?(re=b?o.jsxRuntimeExports.jsx("line",{y1:0,y2:p,x1:a(b.date),x2:a(b.date),className:o.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",g?.mouseOverLine),style:y?.mouseOverLine}):null,t[101]=g?.mouseOverLine,t[102]=p,t[103]=b,t[104]=y?.mouseOverLine,t[105]=a,t[106]=re):re=t[106];let be;t[107]!==$e||t[108]!==re?(be=o.jsxRuntimeExports.jsxs("g",{children:[$e,re]}),t[107]=$e,t[108]=re,t[109]=be):be=t[109];let Ae;t[110]!==s||t[111]!==c||t[112]!==u||t[113]!==j||t[114]!==h.right||t[115]!==kt||t[116]!==l?(Ae=kt?o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:kt.map((n,e)=>o.jsxRuntimeExports.jsx(Ze.RefLineY,{text:n.text,color:n.color,y:l(n.value),x1:0-j,x2:c+h.right,classNames:n.classNames,styles:n.styles,animate:s,isInView:u},e))}):null,t[110]=s,t[111]=c,t[112]=u,t[113]=j,t[114]=h.right,t[115]=kt,t[116]=l,t[117]=Ae):Ae=t[117];let ae;if(t[118]!==s||t[119]!==Lt||t[120]!==r||t[121]!==c||t[122]!==u||t[123]!==h.right||t[124]!==W||t[125]!==a||t[126]!==l){let n;t[128]!==s||t[129]!==r||t[130]!==c||t[131]!==u||t[132]!==h.right||t[133]!==W||t[134]!==a||t[135]!==l?(n=(e,m)=>{const _=He.getLineEndPoint({x:e.xCoordinate?a(O.parse(`${e.xCoordinate}`,r,new Date))+(e.xOffset||0):0+(e.xOffset||0),y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8},{x:e.xCoordinate?a(O.parse(`${e.xCoordinate}`,r,new Date)):0,y:e.yCoordinate?l(e.yCoordinate):0},R.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),Ye=e.showConnector?{y1:_.y,x1:_.x,y2:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?a(O.parse(`${e.xCoordinate}`,r,new Date))+(e.xOffset||0):0+(e.xOffset||0),cy:e.yCoordinate?l(e.yCoordinate):0,cx:e.xCoordinate?a(O.parse(`${e.xCoordinate}`,r,new Date)):0,circleRadius:R.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,Xe={y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:W?0:e.xCoordinate?a(O.parse(`${e.xCoordinate}`,r,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:W?e.xCoordinate?a(O.parse(`${e.xCoordinate}`,r,new Date))+(e.xOffset||0):0+(e.xOffset||0):c+h.right-(e.xCoordinate?a(O.parse(`${e.xCoordinate}`,r,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return o.jsxRuntimeExports.jsx(He.Annotation,{color:e.color,connectorsSettings:Ye,labelSettings:Xe,text:e.text,classNames:e.classNames,styles:e.styles,animate:s,isInView:u},m)},t[128]=s,t[129]=r,t[130]=c,t[131]=u,t[132]=h.right,t[133]=W,t[134]=a,t[135]=l,t[136]=n):n=t[136],ae=Lt.map(n),t[118]=s,t[119]=Lt,t[120]=r,t[121]=c,t[122]=u,t[123]=h.right,t[124]=W,t[125]=a,t[126]=l,t[127]=ae}else ae=t[127];let ke;t[137]!==ae?(ke=o.jsxRuntimeExports.jsx("g",{children:ae}),t[137]=ae,t[138]=ke):ke=t[138];let Le;t[139]!==X?(Le=X.filter(pi).map(hi),t[139]=X,t[140]=Le):Le=t[140];let Se;t[141]===Symbol.for("react.memo_cache_sentinel")?(Se={fill:"none",pointerEvents:"all"},t[141]=Se):Se=t[141];let Ne;t[142]!==ut||t[143]!==p||t[144]!==c?(Ne=o.jsxRuntimeExports.jsx("rect",{ref:ut,style:Se,width:c,height:p}),t[142]=ut,t[143]=p,t[144]=c,t[145]=Ne):Ne=t[145];let Te;return t[146]!==g?.tooltip||t[147]!==B||t[148]!==z||t[149]!==b||t[150]!==y?.tooltip||t[151]!==it?(Te=b&&it&&B&&z?o.jsxRuntimeExports.jsx(ze.Tooltip,{data:b,body:it,xPos:B,yPos:z,backgroundStyle:y?.tooltip,className:g?.tooltip}):null,t[146]=g?.tooltip,t[147]=B,t[148]=z,t[149]=b,t[150]=y?.tooltip,t[151]=it,t[152]=Te):Te=t[152],o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(Yt.motion.svg,{width:`${tt}px`,height:`${Xt}px`,viewBox:`0 0 ${tt} ${Xt}`,direction:"ltr",ref:Zt,children:o.jsxRuntimeExports.jsxs("g",{transform:`translate(${h.left},${h.top})`,children:[pt,gt,o.jsxRuntimeExports.jsx(He.CustomArea,{areaSettings:me,scaleX:a,scaleY:l,animate:s,isInView:u}),o.jsxRuntimeExports.jsxs("g",{children:[o.jsxRuntimeExports.jsx(_e.YTicksAndGridLines,{values:te.filter(Oi),y:te.filter(wi).map(n=>l(n)),x1:0-j,x2:c+h.right,styles:yt,classNames:Q,suffix:G,prefix:U,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:Y}),D,Wt]}),o.jsxRuntimeExports.jsx("g",{children:o.jsxRuntimeExports.jsx(Qe.XTicksAndGridLines,{values:Pe,x:We,y1:0,y2:p,styles:Re,classNames:Ce,suffix:G,prefix:U,labelType:"primary",showGridLines:!0,precision:Y})}),Ee,be,Ae,ke,Le,Ne]})}),Te]})}function hi(i){return i.layer}function pi(i){return i.position==="after"}function gi(i){return!R.checkIfNullOrUndefined(i.y)}function yi(i){return!R.checkIfNullOrUndefined(i.y)}function vi(i){return i.layer}function ji(i){return i.position==="before"}function wi(i){return i!==0}function Oi(i){return i!==0}function Ri(i){return i.date}function Ci(i){return Math.max(...i.y.filter(Ei))}function Ei(i){return!R.checkIfNullOrUndefined(i)}function bi(i){return Math.max(...i.y.filter(Ai))}function Ai(i){return!R.checkIfNullOrUndefined(i)}function ki(i){return Math.min(...i.y.filter(Li))}function Li(i){return!R.checkIfNullOrUndefined(i)}function Si(i){return Math.min(...i.y.filter(Ni))}function Ni(i){return!R.checkIfNullOrUndefined(i)}function Ti(i){return Math.min(...i.y.filter(Di))}function Di(i){return!R.checkIfNullOrUndefined(i)}function Ii(i){return!R.checkIfNullOrUndefined(i.y)}function qi(i){const t=o.compilerRuntimeExports.c(99),{data:A,graphTitle:tt,lineColors:Xt,suffix:k,sources:r,prefix:pe,graphDescription:L,height:At,width:C,footNote:et,noOfXTicks:G,dateFormat:U,labels:j,padding:it,showValues:Bt,backgroundColor:ge,leftMargin:ye,rightMargin:kt,topMargin:zt,bottomMargin:P,tooltip:nt,relativeHeight:ot,onSeriesMouseOver:s,showColorLegendAtTop:W,refValues:Jt,highlightAreaSettings:Kt,graphID:Lt,minValue:St,maxValue:st,highlightedLines:Qt,graphDownload:le,dataDownload:ce,animate:Nt,language:y,colorLegendTitle:g,minHeight:ue,strokeWidth:Y,showDots:X,annotations:rt,customHighlightAreaSettings:Tt,theme:ve,ariaLabel:at,yAxisTitle:Zt,noOfYTicks:Dt,minDate:u,maxDate:w,curveType:je,styles:f,classNames:x,dimmedOpacity:we,precision:b,customLayers:It,dashedLines:B,dashSettings:qt,labelsToBeHidden:z,showColorScale:de}=i,lt=Xt===void 0?ui.Colors.light.categoricalColors.colors:Xt,ct=k===void 0?"":k,h=pe===void 0?"":pe,ut=G===void 0?10:G,dt=U===void 0?"yyyy":U,d=Bt===void 0?!1:Bt,xe=ge===void 0?!1:ge,xt=ye===void 0?30:ye,Mt=kt===void 0?50:kt,mt=zt===void 0?20:zt,me=P===void 0?25:P,c=W===void 0?!1:W;let p;t[0]!==Jt?(p=Jt===void 0?[]:Jt,t[0]=Jt,t[1]=p):p=t[1];const fe=p;let _t;t[2]!==Kt?(_t=Kt===void 0?[]:Kt,t[2]=Kt,t[3]=_t):_t=t[3];const v=_t;let I;t[4]!==Qt?(I=Qt===void 0?[]:Qt,t[4]=Qt,t[5]=I):I=t[5];const a=I,J=le===void 0?!1:le,K=ce===void 0?!1:ce,l=Nt===void 0?!1:Nt,q=y===void 0?"en":y,te=ue===void 0?0:ue,ee=Y===void 0?2:Y,ft=X===void 0?!0:X;let S;t[6]!==rt?(S=rt===void 0?[]:rt,t[6]=rt,t[7]=S):S=t[7];const M=S;let ht;t[8]!==Tt?(ht=Tt===void 0?[]:Tt,t[8]=Tt,t[9]=ht):ht=t[9];const V=ht,pt=ve===void 0?"light":ve,gt=Dt===void 0?5:Dt,Vt=je===void 0?"curve":je,$t=we===void 0?.3:we,yt=b===void 0?2:b;let vt;t[10]!==It?(vt=It===void 0?[]:It,t[10]=It,t[11]=vt):vt=t[11];const Ht=vt;let Q;t[12]!==B?(Q=B===void 0?[]:B,t[12]=B,t[13]=Q):Q=t[13];const Ft=Q;let jt;t[14]!==qt?(jt=qt===void 0?["5 5"]:qt,t[14]=qt,t[15]=jt):jt=t[15];const Gt=jt;let wt;t[16]!==z?(wt=z===void 0?[]:z,t[16]=z,t[17]=wt):wt=t[17];const Ot=wt,N=de===void 0?!0:de,[Z,he]=E.useState(0),[Rt,Ct]=E.useState(0),Ut=E.useRef(null),ie=E.useRef(null);let T,Et;t[18]===Symbol.for("react.memo_cache_sentinel")?(T=()=>{const ne=new ResizeObserver(Wt=>{he(Wt[0].target.clientWidth||620),Ct(Wt[0].target.clientHeight||480)});return Ut.current&&ne.observe(Ut.current),()=>ne.disconnect()},Et=[],t[18]=T,t[19]=Et):(T=t[18],Et=t[19]),E.useEffect(T,Et);const Pt=x?.graphContainer,$=f?.graphContainer;let D;t[20]!==x?.description||t[21]!==x?.title||t[22]!==A||t[23]!==K||t[24]!==L||t[25]!==J||t[26]!==tt||t[27]!==f?.description||t[28]!==f?.title||t[29]!==C?(D=tt||L||J||K?o.jsxRuntimeExports.jsx(li.GraphHeader,{styles:{title:f?.title,description:f?.description},classNames:{title:x?.title,description:x?.description},graphTitle:tt,graphDescription:L,width:C,graphDownload:J?ie:void 0,dataDownload:K?A.map(Fi).filter(Hi).length>0?A.map($i).filter(Vi):A.filter(Mi):null}):null,t[20]=x?.description,t[21]=x?.title,t[22]=A,t[23]=K,t[24]=L,t[25]=J,t[26]=tt,t[27]=f?.description,t[28]=f?.title,t[29]=C,t[30]=D):D=t[30];let H;t[31]!==l||t[32]!==M||t[33]!==me||t[34]!==x||t[35]!==g||t[36]!==Vt||t[37]!==V||t[38]!==Ht||t[39]!==Gt||t[40]!==Ft||t[41]!==A||t[42]!==dt||t[43]!==$t||t[44]!==v||t[45]!==a||t[46]!==j||t[47]!==Ot||t[48]!==q||t[49]!==xt||t[50]!==lt||t[51]!==w||t[52]!==st||t[53]!==u||t[54]!==St||t[55]!==ut||t[56]!==gt||t[57]!==s||t[58]!==yt||t[59]!==h||t[60]!==fe||t[61]!==Mt||t[62]!==c||t[63]!==N||t[64]!==ft||t[65]!==d||t[66]!==ee||t[67]!==f||t[68]!==ct||t[69]!==Rt||t[70]!==Z||t[71]!==nt||t[72]!==mt||t[73]!==Zt?(H=A.length===0?o.jsxRuntimeExports.jsx(di.EmptyState,{}):o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[c&&N?o.jsxRuntimeExports.jsx(ci.ColorLegend,{colorDomain:j,colorLegendTitle:g,labelsToBeHidden:Ot,colors:lt,showNAColor:!1,className:x?.colorLegend}):null,o.jsxRuntimeExports.jsx(Ue.GraphArea,{ref:Ut,children:Z&&Rt?o.jsxRuntimeExports.jsx(fi,{data:A,lineColors:lt,width:Z,height:Rt,dateFormat:dt,noOfXTicks:ut??mi.getNoOfTicks(Z),leftMargin:xt,rightMargin:Mt,topMargin:mt,bottomMargin:me,labels:j,tooltip:nt,onSeriesMouseOver:s,showColorLegendAtTop:N?c:!0,showValues:d,suffix:ct,prefix:h,highlightAreaSettings:v,refValues:fe,minValue:St,maxValue:st,highlightedLines:a,animate:l===!0?{duration:.5,once:!0,amount:.5}:l||{duration:0,once:!0,amount:0},rtl:q==="he"||q==="ar",strokeWidth:ee,showDots:ft,annotations:M,customHighlightAreaSettings:V,yAxisTitle:Zt,noOfYTicks:gt,minDate:u,maxDate:w,curveType:Vt,styles:f,classNames:x,dimmedOpacity:$t,precision:yt,customLayers:Ht,labelsToBeHidden:Ot,dashedLines:Ft,dashSettings:Gt,revealClipId:xi.generateRandomString(8)}):null})]}),t[31]=l,t[32]=M,t[33]=me,t[34]=x,t[35]=g,t[36]=Vt,t[37]=V,t[38]=Ht,t[39]=Gt,t[40]=Ft,t[41]=A,t[42]=dt,t[43]=$t,t[44]=v,t[45]=a,t[46]=j,t[47]=Ot,t[48]=q,t[49]=xt,t[50]=lt,t[51]=w,t[52]=st,t[53]=u,t[54]=St,t[55]=ut,t[56]=gt,t[57]=s,t[58]=yt,t[59]=h,t[60]=fe,t[61]=Mt,t[62]=c,t[63]=N,t[64]=ft,t[65]=d,t[66]=ee,t[67]=f,t[68]=ct,t[69]=Rt,t[70]=Z,t[71]=nt,t[72]=mt,t[73]=Zt,t[74]=H):H=t[74];let F;t[75]!==x?.footnote||t[76]!==x?.source||t[77]!==et||t[78]!==r||t[79]!==f?.footnote||t[80]!==f?.source||t[81]!==C?(F=r||et?o.jsxRuntimeExports.jsx(ai.GraphFooter,{styles:{footnote:f?.footnote,source:f?.source},classNames:{footnote:x?.footnote,source:x?.source},sources:r,footNote:et,width:C}):null,t[75]=x?.footnote,t[76]=x?.source,t[77]=et,t[78]=r,t[79]=f?.footnote,t[80]=f?.source,t[81]=C,t[82]=F):F=t[82];let bt;return t[83]!==at||t[84]!==xe||t[85]!==Lt||t[86]!==At||t[87]!==q||t[88]!==te||t[89]!==it||t[90]!==ot||t[91]!==Pt||t[92]!==$||t[93]!==D||t[94]!==H||t[95]!==F||t[96]!==pt||t[97]!==C?(bt=o.jsxRuntimeExports.jsxs(Ue.GraphContainer,{className:Pt,style:$,id:Lt,ref:ie,"aria-label":at,backgroundColor:xe,theme:pt,language:q,minHeight:te,width:C,height:At,relativeHeight:ot,padding:it,children:[D,H,F]}),t[83]=at,t[84]=xe,t[85]=Lt,t[86]=At,t[87]=q,t[88]=te,t[89]=it,t[90]=ot,t[91]=Pt,t[92]=$,t[93]=D,t[94]=H,t[95]=F,t[96]=pt,t[97]=C,t[98]=bt):bt=t[98],bt}function Mi(i){return i!==void 0}function Vi(i){return i!==void 0}function $i(i){return i.data}function Hi(i){return i!==void 0}function Fi(i){return i.data}exports.MultiLineChart=qi;
|
|
2
2
|
//# sourceMappingURL=MultiLineChart.cjs.map
|
package/dist/MultiLineChart.d.ts
CHANGED
|
@@ -58,6 +58,7 @@ declare interface ClassNameObject {
|
|
|
58
58
|
regLine?: string;
|
|
59
59
|
dataCards?: string;
|
|
60
60
|
colorLegend?: string;
|
|
61
|
+
modal?: string;
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
declare type CurveTypes = 'linear' | 'curve' | 'step' | 'stepAfter' | 'stepBefore';
|
|
@@ -242,6 +243,7 @@ declare interface StyleObject {
|
|
|
242
243
|
mouseOverLine?: React.CSSProperties;
|
|
243
244
|
regLine?: React.CSSProperties;
|
|
244
245
|
dataCards?: React.CSSProperties;
|
|
246
|
+
modal?: React.CSSProperties;
|
|
245
247
|
}
|
|
246
248
|
|
|
247
249
|
export { }
|
package/dist/MultiLineChart.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useRef as Ne, useState as re, useEffect as Ye } from "react";
|
|
|
3
3
|
import { p as O, f as Ue } from "./parse-DlCRUFh_.js";
|
|
4
4
|
import { o as qe } from "./index-BZQYSqar.js";
|
|
5
5
|
import { n as Pe } from "./numberFormattingFunction-14YCbkN2.js";
|
|
6
|
-
import { T as Je } from "./Tooltip-
|
|
6
|
+
import { T as Je } from "./Tooltip-Dj5eVppQ.js";
|
|
7
7
|
import { c as A } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
8
8
|
import { C as Ke, g as Qe, A as Ze } from "./customArea-BUhPiPT6.js";
|
|
9
9
|
import { A as _e } from "./AxisTitle-jeI7am8o.js";
|
package/dist/ParetoChart.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-CTPQjnHt.cjs"),st=require("react"),xe=require("./index-DQA8q5sC.cjs"),he=require("./Modal-JW_IExO3.cjs"),ne=require("./numberFormattingFunction-02t-wJta.cjs"),ge=require("./Tooltip-4dJo4_AF.cjs"),ye=require("./string2HTML-CPGr_I5E.cjs"),ue=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ce=require("./Axis-DxRV2yMi.cjs"),me=require("./AxisTitle-sS5bLLR7.cjs"),be=require("./XAxesLabels-Bt5NZBmX.cjs"),ve=require("./band-VYfcZeJ2.cjs"),pe=require("./linear-BwPAspcq.cjs"),de=require("./line-DHV4JwCR.cjs"),se=require("./step-BZ3C8QFW.cjs"),je=require("./use-in-view-QcfiW0w3.cjs"),Dt=require("./proxy-BxvUI_9l.cjs"),Ae=require("./index-DG2bgAva.cjs"),we=require("./GraphFooter.cjs"),Ee=require("./GraphHeader.cjs"),Re=require("./ColorLegend.cjs"),oe=require("./Colors.cjs"),Me=require("./EmptyState-sAEZ_5rU.cjs"),fe=require("./GraphContainer-d8A46BK2.cjs");function Ce(e){const t=n.compilerRuntimeExports.c(156),{data:j,width:P,height:D,barColor:d,lineColor:p,axisTitles:u,sameAxes:A,rightMargin:zt,leftMargin:Qt,topMargin:Ft,bottomMargin:Ht,tooltip:Et,showValues:Rt,onSeriesMouseOver:ot,barPadding:Yt,truncateBy:Mt,showLabels:Gt,onSeriesMouseClick:C,resetSelectionOnDoubleClick:pt,detailsOnClick:y,noOfTicks:dt,lineSuffix:ft,barSuffix:Ct,linePrefix:kt,barPrefix:Lt,curveType:St,styles:s,classNames:o,animate:r,precision:F,customLayers:k,naLabel:rt,showAxisLabels:R}=e,Jt=st.useRef(null);let ht;t[0]!==r.amount||t[1]!==r.once?(ht={once:r.once,amount:r.amount},t[0]=r.amount,t[1]=r.once,t[2]=ht):ht=t[2];const L=je.useInView(Jt,ht),Xt=St==="linear"?de.curveLinear:St==="step"?se.curveStep:St==="stepAfter"?se.stepAfter:St==="stepBefore"?se.stepBefore:se.monotoneX,[Nt,lt]=st.useState(void 0),[w,gt]=st.useState(void 0),[Ot,c]=st.useState(void 0),[x,at]=st.useState(void 0),Wt=Qt+50,yt=zt+65;let Tt;t[3]!==Ht||t[4]!==Wt||t[5]!==yt||t[6]!==Ft?(Tt={top:Ft,bottom:Ht,left:Wt,right:yt},t[3]=Ht,t[4]=Wt,t[5]=yt,t[6]=Ft,t[7]=Tt):Tt=t[7];const l=Tt,h=P-l.left-l.right,a=D-l.top-l.bottom;let S,H,Y,M,G,X,W,N,O,T,$,B,U,z,J;if(t[8]!==r||t[9]!==u||t[10]!==d||t[11]!==Yt||t[12]!==Lt||t[13]!==Ct||t[14]!==o?.graphObjectValues||t[15]!==o?.xAxis?.axis||t[16]!==o?.xAxis?.labels||t[17]!==o?.yAxis?.gridLines||t[18]!==o?.yAxis?.labels||t[19]!==o?.yAxis?.title||t[20]!==Xt||t[21]!==k||t[22]!==j||t[23]!==y||t[24]!==a||t[25]!==h||t[26]!==D||t[27]!==L||t[28]!==p||t[29]!==kt||t[30]!==ft||t[31]!==l.bottom||t[32]!==l.left||t[33]!==l.right||t[34]!==l.top||t[35]!==w||t[36]!==rt||t[37]!==dt||t[38]!==C||t[39]!==ot||t[40]!==F||t[41]!==pt||t[42]!==A||t[43]!==R||t[44]!==Gt||t[45]!==Rt||t[46]!==s?.graphObjectValues||t[47]!==s?.xAxis?.axis||t[48]!==s?.xAxis?.labels||t[49]!==s?.yAxis?.gridLines||t[50]!==s?.yAxis?.labels||t[51]!==s?.yAxis?.title||t[52]!==Mt||t[53]!==P){const m=j.map(ei),g=ve.band().domain(m.map(ti)).range([0,h]).paddingInner(Yt),$t=Math.min(...m.map(_e).filter(Ze))!==1/0?Math.min(...m.map(Qe).filter(Ke))>0?0:Math.min(...m.map(Je).filter(ze)):0,vt=Math.min(...m.map(Ue).filter(Be))!==1/0?Math.min(...m.map(We).filter(Xe))>0?0:Math.min(...m.map(Ge).filter(Ye)):0,jt=Math.max(...m.map(He).filter(Fe))!==1/0?Math.max(...m.map(De).filter(Pe)):0,ct=Math.max(...m.map(Ve).filter(Ie))!==1/0?Math.max(...m.map(qe).filter($e)):0,Bt=$t<vt?$t:vt,At=jt>ct?jt:ct,f=pe.linear().domain([A?Bt:$t,A?At>0?At:0:jt>0?jt:0]).range([a,0]).nice(),b=pe.linear().domain([A?Bt:vt,A?At>0?At:0:ct>0?ct:0]).range([a,0]).nice(),qt=de.line().defined(Te).x(i=>g(`${i.id}`)+g.bandwidth()/2).y(i=>b(i.line)).curve(Xt),re=f.ticks(dt),Ut=b.ticks(dt);H=Dt.motion.svg,G=`${P}px`,X=`${D}px`,W=`0 0 ${P} ${D}`,N="ltr",O=Jt,U=`translate(${l.left},${l.top})`;const Kt=o?.xAxis?.axis;let et;t[69]!==Kt?(et={axis:Kt},t[69]=Kt,t[70]=et):et=t[70];let ut;t[71]!==s?.xAxis?.axis?(ut=s?.xAxis?.axis||{},t[71]=s?.xAxis?.axis,t[72]=ut):ut=t[72];let q;t[73]!==d||t[74]!==ut?(q={axis:{stroke:d,...ut}},t[73]=d,t[74]=ut,t[75]=q):q=t[75];let xt;t[76]!==a||t[77]!==et||t[78]!==q?(xt=n.jsxRuntimeExports.jsx(ce.Axis,{y1:0,y2:a,x1:-15,x2:-15,classNames:et,styles:q}),t[76]=a,t[77]=et,t[78]=q,t[79]=xt):xt=t[79];let wt;t[80]!==u||t[81]!==d||t[82]!==o?.yAxis?.title||t[83]!==a||t[84]!==l.left||t[85]!==R||t[86]!==s?.yAxis?.title?(wt=R?n.jsxRuntimeExports.jsx(me.AxisTitle,{x:10-l.left,y:a/2,style:{fill:d,...s?.yAxis?.title||{}},className:o?.yAxis?.title,text:u[0].length>100?`${u[0].substring(0,100)}...`:u[0],rotate90:!0}):null,t[80]=u,t[81]=d,t[82]=o?.yAxis?.title,t[83]=a,t[84]=l.left,t[85]=R,t[86]=s?.yAxis?.title,t[87]=wt):wt=t[87],z=n.jsxRuntimeExports.jsxs("g",{children:[re.map((i,Pt)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:f(i),y2:f(i),x1:-15,x2:-20,style:{stroke:d,strokeWidth:1,...s?.yAxis?.gridLines||{}},className:o?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:-25,y:f(i),dy:"0.33em",className:n.mo("text-xs",o?.yAxis?.labels),style:{textAnchor:"end",fill:d,...s?.yAxis?.labels||{}},children:ne.numberFormattingFunction(i,rt,F,Lt,Ct)})]},Pt)),xt,wt]});const It=h+15,it=h+15,nt=o?.xAxis?.axis;let E;t[88]!==nt?(E={axis:nt},t[88]=nt,t[89]=E):E=t[89];let I;t[90]!==s?.xAxis?.axis?(I=s?.xAxis?.axis||{},t[90]=s?.xAxis?.axis,t[91]=I):I=t[91];let mt;t[92]!==p||t[93]!==I?(mt={axis:{stroke:p,...I}},t[92]=p,t[93]=I,t[94]=mt):mt=t[94];let Vt;t[95]!==a||t[96]!==It||t[97]!==it||t[98]!==E||t[99]!==mt?(Vt=n.jsxRuntimeExports.jsx(ce.Axis,{y1:0,y2:a,x1:It,x2:it,classNames:E,styles:mt}),t[95]=a,t[96]=It,t[97]=it,t[98]=E,t[99]=mt,t[100]=Vt):Vt=t[100];let Zt;t[101]!==u||t[102]!==o?.yAxis?.title||t[103]!==a||t[104]!==h||t[105]!==p||t[106]!==l.right||t[107]!==R||t[108]!==s?.yAxis?.title?(Zt=R?n.jsxRuntimeExports.jsx(me.AxisTitle,{x:h+l.right-15,y:a/2,style:{fill:p,...s?.yAxis?.title||{}},className:o?.yAxis?.title,text:u[1].length>100?`${u[1].substring(0,100)}...`:u[1],rotate90:!0}):null,t[101]=u,t[102]=o?.yAxis?.title,t[103]=a,t[104]=h,t[105]=p,t[106]=l.right,t[107]=R,t[108]=s?.yAxis?.title,t[109]=Zt):Zt=t[109],J=n.jsxRuntimeExports.jsxs("g",{children:[Ut.map((i,Pt)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:b(i),y2:b(i),x1:h+15,x2:h+20,style:{stroke:p,strokeWidth:1,...s?.yAxis?.gridLines||{}},className:o?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:h+25,y:b(i),dy:"0.33em",dx:-2,style:{textAnchor:"start",fill:p,...s?.yAxis?.labels||{}},className:n.mo("text-xs",o?.yAxis?.labels),children:ne.numberFormattingFunction(i,rt,F,kt,ft)})]},Pt)),Vt,Zt]});const le=o?.xAxis?.axis;let _t;t[110]!==le?(_t={axis:le},t[110]=le,t[111]=_t):_t=t[111];const ae=s?.xAxis?.axis;let te;t[112]!==ae?(te={axis:ae},t[112]=ae,t[113]=te):te=t[113],Y=n.jsxRuntimeExports.jsx(ce.Axis,{y1:A?f(0):a,y2:A?f(0):a,x1:-15,x2:h+15,classNames:_t,styles:te}),t[114]!==k?(M=k.filter(Oe).map(Ne),t[114]=k,t[115]=M):M=t[115],S=Ae.AnimatePresence,T=m.map((i,Pt)=>n.jsxRuntimeExports.jsxs(Dt.motion.g,{className:"undp-viz-g-with-hover",opacity:.85,onMouseEnter:V=>{lt(i),at(V.clientY),c(V.clientX),ot?.(i)},onClick:()=>{(C||y)&&(xe.isEqual(w,i)&&pt?(gt(void 0),C?.(void 0)):(gt(i),C?.(i)))},onMouseMove:V=>{lt(i),at(V.clientY),c(V.clientX)},onMouseLeave:()=>{lt(void 0),c(void 0),at(void 0),ot?.(void 0)},children:[n.jsxRuntimeExports.jsx(Dt.motion.rect,{variants:{initial:{attrY:f(0),height:0,opacity:1,fill:d},whileInView:{attrY:i.bar?i.bar>0?f(i.bar):f(0):0,height:i.bar?Math.abs(f(i.bar)-f(0)):0,opacity:1,fill:d,transition:{duration:r.duration}}},initial:"initial",animate:L?"whileInView":"initial",exit:{attrY:f(0),height:0,opacity:0,transition:{duration:r.duration}},x:g(`${Pt}`),width:g.bandwidth()}),Rt&&!ue.checkIfNullOrUndefined(i.bar)?n.jsxRuntimeExports.jsx(Dt.motion.text,{x:g(`${i.id}`)+g.bandwidth()/2,exit:{attrY:f(0),opacity:0,transition:{duration:r.duration}},variants:{initial:{attrY:f(0),opacity:0,fill:d},whileInView:{attrY:f(i.bar||0),opacity:1,fill:d,transition:{duration:r.duration}}},initial:"initial",animate:L?"whileInView":"initial",style:{textAnchor:"middle",...s?.graphObjectValues||{}},className:n.mo("graph-value text-sm",o?.graphObjectValues),dy:i.bar?i.bar>=0?"-5px":"1em":"-5px",children:ne.numberFormattingFunction(i.bar,rt,F,Lt,Ct)}):null,Gt?n.jsxRuntimeExports.jsx(be.XAxesLabels,{value:`${i.label}`.length<Mt?`${i.label}`:`${`${i.label}`.substring(0,Mt)}...`,y:a+5,x:g(`${i.id}`),width:g.bandwidth(),height:l.bottom,style:s?.xAxis?.labels,className:o?.xAxis?.labels,alignment:"top",animate:r,isInView:L}):null]},i.label));let ee;t[116]!==r.duration?(ee={opacity:0,transition:{duration:r.duration}},t[116]=r.duration,t[117]=ee):ee=t[117];let ie;t[118]===Symbol.for("react.memo_cache_sentinel")?(ie={fill:"none",strokeWidth:2},t[118]=ie):ie=t[118],$=n.jsxRuntimeExports.jsx(Dt.motion.path,{exit:ee,variants:{initial:{d:qt(m.map(Se)),opacity:0,stroke:p},whileInView:{d:qt(m),opacity:1,stroke:p,transition:{duration:r.duration}}},initial:"initial",animate:L?"whileInView":"initial",style:ie}),B=m.map((i,Pt)=>n.jsxRuntimeExports.jsx("g",{children:ue.checkIfNullOrUndefined(i.line)?null:n.jsxRuntimeExports.jsxs("g",{onMouseEnter:V=>{lt(i),at(V.clientY),c(V.clientX),ot?.(i)},onClick:()=>{(C||y)&&(xe.isEqual(w,i)&&pt?(gt(void 0),C?.(void 0)):(gt(i),C?.(i)))},onMouseMove:V=>{lt(i),at(V.clientY),c(V.clientX)},onMouseLeave:()=>{lt(void 0),c(void 0),at(void 0),ot?.(void 0)},children:[n.jsxRuntimeExports.jsx(Dt.motion.circle,{exit:{cy:b(0),opacity:0,transition:{duration:r.duration}},variants:{initial:{cy:b(0),opacity:0,fill:p},whileInView:{cy:b(i.line),opacity:1,fill:p,transition:{duration:r.duration}}},initial:"initial",animate:L?"whileInView":"initial",cx:g(i.id)+g.bandwidth()/2,r:h/m.length<5?0:h/m.length<20?2:4}),Rt?n.jsxRuntimeExports.jsx(Dt.motion.text,{x:g(`${i.id}`)+g.bandwidth()/2,exit:{y:b(0),opacity:0,transition:{duration:r.duration}},style:{textAnchor:"middle",...s?.graphObjectValues||{}},variants:{initial:{y:b(0),opacity:0,fill:p},whileInView:{y:b(i.line),opacity:1,fill:p,transition:{duration:r.duration}}},initial:"initial",animate:L?"whileInView":"initial",className:n.mo("graph-value text-sm",o?.graphObjectValues),dy:"-5px",children:ne.numberFormattingFunction(i.line,rt,F,kt,ft)}):null]})},Pt)),t[8]=r,t[9]=u,t[10]=d,t[11]=Yt,t[12]=Lt,t[13]=Ct,t[14]=o?.graphObjectValues,t[15]=o?.xAxis?.axis,t[16]=o?.xAxis?.labels,t[17]=o?.yAxis?.gridLines,t[18]=o?.yAxis?.labels,t[19]=o?.yAxis?.title,t[20]=Xt,t[21]=k,t[22]=j,t[23]=y,t[24]=a,t[25]=h,t[26]=D,t[27]=L,t[28]=p,t[29]=kt,t[30]=ft,t[31]=l.bottom,t[32]=l.left,t[33]=l.right,t[34]=l.top,t[35]=w,t[36]=rt,t[37]=dt,t[38]=C,t[39]=ot,t[40]=F,t[41]=pt,t[42]=A,t[43]=R,t[44]=Gt,t[45]=Rt,t[46]=s?.graphObjectValues,t[47]=s?.xAxis?.axis,t[48]=s?.xAxis?.labels,t[49]=s?.yAxis?.gridLines,t[50]=s?.yAxis?.labels,t[51]=s?.yAxis?.title,t[52]=Mt,t[53]=P,t[54]=S,t[55]=H,t[56]=Y,t[57]=M,t[58]=G,t[59]=X,t[60]=W,t[61]=N,t[62]=O,t[63]=T,t[64]=$,t[65]=B,t[66]=U,t[67]=z,t[68]=J}else S=t[54],H=t[55],Y=t[56],M=t[57],G=t[58],X=t[59],W=t[60],N=t[61],O=t[62],T=t[63],$=t[64],B=t[65],U=t[66],z=t[67],J=t[68];let K;t[119]!==S||t[120]!==T||t[121]!==$||t[122]!==B?(K=n.jsxRuntimeExports.jsxs(S,{children:[T,$,B]}),t[119]=S,t[120]=T,t[121]=$,t[122]=B,t[123]=K):K=t[123];let v;t[124]!==k?(v=k.filter(Le).map(ke),t[124]=k,t[125]=v):v=t[125];let Q;t[126]!==Y||t[127]!==M||t[128]!==K||t[129]!==v||t[130]!==U||t[131]!==z||t[132]!==J?(Q=n.jsxRuntimeExports.jsxs("g",{transform:U,children:[z,J,Y,M,K,v]}),t[126]=Y,t[127]=M,t[128]=K,t[129]=v,t[130]=U,t[131]=z,t[132]=J,t[133]=Q):Q=t[133];let Z;t[134]!==H||t[135]!==G||t[136]!==X||t[137]!==W||t[138]!==N||t[139]!==O||t[140]!==Q?(Z=n.jsxRuntimeExports.jsx(H,{width:G,height:X,viewBox:W,direction:N,ref:O,children:Q}),t[134]=H,t[135]=G,t[136]=X,t[137]=W,t[138]=N,t[139]=O,t[140]=Q,t[141]=Z):Z=t[141];let _;t[142]!==o?.tooltip||t[143]!==Ot||t[144]!==x||t[145]!==Nt||t[146]!==s?.tooltip||t[147]!==Et?(_=Nt&&Et&&Ot&&x?n.jsxRuntimeExports.jsx(ge.Tooltip,{data:Nt,body:Et,xPos:Ot,yPos:x,backgroundStyle:s?.tooltip,className:o?.tooltip}):null,t[142]=o?.tooltip,t[143]=Ot,t[144]=x,t[145]=Nt,t[146]=s?.tooltip,t[147]=Et,t[148]=_):_=t[148];let tt;t[149]!==y||t[150]!==w?(tt=y&&w!==void 0?n.jsxRuntimeExports.jsx(he.le,{open:w!==void 0,onClose:()=>{gt(void 0)},children:n.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof y=="string"?{__html:ye.string2HTML(y,w)}:void 0,children:typeof y=="function"?y(w):null})}):null,t[149]=y,t[150]=w,t[151]=tt):tt=t[151];let bt;return t[152]!==Z||t[153]!==_||t[154]!==tt?(bt=n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[Z,_,tt]}),t[152]=Z,t[153]=_,t[154]=tt,t[155]=bt):bt=t[155],bt}function ke(e){return e.layer}function Le(e){return e.position==="after"}function Se(e){return{...e,line:0}}function Ne(e){return e.layer}function Oe(e){return e.position==="before"}function Te(e){return!ue.checkIfNullOrUndefined(e.line)}function $e(e){return e!=null}function qe(e){return e.line}function Ie(e){return e!=null}function Ve(e){return e.line}function Pe(e){return e!=null}function De(e){return e.bar}function Fe(e){return e!=null}function He(e){return e.bar}function Ye(e){return e!=null}function Ge(e){return e.line}function Xe(e){return e!=null}function We(e){return e.line}function Be(e){return e!=null}function Ue(e){return e.line}function ze(e){return e!=null}function Je(e){return e.bar}function Ke(e){return e!=null}function Qe(e){return e.bar}function Ze(e){return e!=null}function _e(e){return e.bar}function ti(e){return`${e.id}`}function ei(e,t){return{...e,id:`${t}`}}function ii(e){const t=n.compilerRuntimeExports.c(77),{data:j,graphTitle:P,sources:D,graphDescription:d,height:p,width:u,footNote:A,padding:zt,lineColor:Qt,barColor:Ft,sameAxes:Ht,backgroundColor:Et,leftMargin:Rt,rightMargin:ot,topMargin:Yt,bottomMargin:Mt,lineAxisTitle:Gt,barAxisTitle:C,tooltip:pt,relativeHeight:y,onSeriesMouseOver:dt,graphID:ft,graphDownload:Ct,dataDownload:kt,barPadding:Lt,truncateBy:St,showLabels:s,onSeriesMouseClick:o,language:r,colorLegendTitle:F,minHeight:k,theme:rt,ariaLabel:R,resetSelectionOnDoubleClick:Jt,detailsOnClick:ht,showValues:L,noOfTicks:Xt,lineSuffix:Nt,barSuffix:lt,linePrefix:w,barPrefix:gt,curveType:Ot,styles:c,classNames:x,animate:at,precision:Wt,customLayers:yt,naLabel:Tt,showColorScale:l,showAxisLabels:h}=e,a=Qt===void 0?oe.Colors.light.categoricalColors.colors[1]:Qt,S=Ft===void 0?oe.Colors.light.categoricalColors.colors[0]:Ft,H=Ht===void 0?!1:Ht,Y=Et===void 0?!1:Et,M=Rt===void 0?80:Rt,G=ot===void 0?80:ot,X=Yt===void 0?20:Yt,W=Mt===void 0?25:Mt,N=Gt===void 0?"Line chart":Gt,O=C===void 0?"Bar graph":C,T=Ct===void 0?!1:Ct,$=kt===void 0?!1:kt,B=Lt===void 0?.25:Lt,U=St===void 0?999:St,z=s===void 0?!0:s,J=r===void 0?"en":r,K=k===void 0?0:k,v=rt===void 0?"light":rt,Q=Jt===void 0?!0:Jt,Z=L===void 0?!0:L,_=Xt===void 0?5:Xt,tt=Nt===void 0?"":Nt,bt=lt===void 0?"":lt,m=w===void 0?"":w,g=gt===void 0?"":gt,$t=Ot===void 0?"curve":Ot,vt=at===void 0?!1:at,jt=Wt===void 0?2:Wt;let ct;t[0]!==yt?(ct=yt===void 0?[]:yt,t[0]=yt,t[1]=ct):ct=t[1];const Bt=ct,At=Tt===void 0?"NA":Tt,f=l===void 0?!0:l,b=h===void 0?!0:h,[qt,re]=st.useState(0),[Ut,Kt]=st.useState(0),et=st.useRef(null),ut=st.useRef(null);let q,xt;t[2]===Symbol.for("react.memo_cache_sentinel")?(q=()=>{const mt=new ResizeObserver(Vt=>{re(Vt[0].target.clientWidth||620),Kt(Vt[0].target.clientHeight||480)});return et.current&&mt.observe(et.current),()=>mt.disconnect()},xt=[],t[2]=q,t[3]=xt):(q=t[2],xt=t[3]),st.useEffect(q,xt);const wt=x?.graphContainer,It=c?.graphContainer;let it;t[4]!==x?.description||t[5]!==x?.title||t[6]!==j||t[7]!==$||t[8]!==d||t[9]!==T||t[10]!==P||t[11]!==c?.description||t[12]!==c?.title||t[13]!==u?(it=P||d||T||$?n.jsxRuntimeExports.jsx(Ee.GraphHeader,{styles:{title:c?.title,description:c?.description},classNames:{title:x?.title,description:x?.description},graphTitle:P,graphDescription:d,width:u,graphDownload:T?ut:void 0,dataDownload:$?j.map(li).filter(ri).length>0?j.map(oi).filter(si):j.filter(ni):null}):null,t[4]=x?.description,t[5]=x?.title,t[6]=j,t[7]=$,t[8]=d,t[9]=T,t[10]=P,t[11]=c?.description,t[12]=c?.title,t[13]=u,t[14]=it):it=t[14];let nt;t[15]!==vt||t[16]!==O||t[17]!==S||t[18]!==B||t[19]!==g||t[20]!==bt||t[21]!==W||t[22]!==x||t[23]!==F||t[24]!==$t||t[25]!==Bt||t[26]!==j||t[27]!==ht||t[28]!==M||t[29]!==N||t[30]!==a||t[31]!==m||t[32]!==tt||t[33]!==At||t[34]!==_||t[35]!==o||t[36]!==dt||t[37]!==jt||t[38]!==Q||t[39]!==G||t[40]!==H||t[41]!==b||t[42]!==f||t[43]!==z||t[44]!==Z||t[45]!==c||t[46]!==Ut||t[47]!==qt||t[48]!==v||t[49]!==pt||t[50]!==X||t[51]!==U?(nt=j.length===0?n.jsxRuntimeExports.jsx(Me.EmptyState,{}):n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[f?n.jsxRuntimeExports.jsx(Re.ColorLegend,{colorDomain:[O,N],colors:[S||oe.Colors[v].categoricalColors.colors[0],a||oe.Colors[v].categoricalColors.colors[1]],colorLegendTitle:F,showNAColor:!1,className:x?.colorLegend}):null,n.jsxRuntimeExports.jsx(fe.GraphArea,{ref:et,children:qt&&Ut?n.jsxRuntimeExports.jsx(Ce,{data:j,sameAxes:H,lineColor:a,barColor:S,width:qt,height:Ut,truncateBy:U,leftMargin:M,rightMargin:G,topMargin:X,bottomMargin:W,axisTitles:[O,N],tooltip:pt,onSeriesMouseOver:dt,barPadding:B,showLabels:z,onSeriesMouseClick:o,resetSelectionOnDoubleClick:Q,detailsOnClick:ht,noOfTicks:_,lineSuffix:tt,barSuffix:bt,linePrefix:m,barPrefix:g,curveType:$t,showValues:Z,styles:c,classNames:x,animate:vt===!0?{duration:.5,once:!0,amount:.5}:vt||{duration:0,once:!0,amount:0},precision:jt,customLayers:Bt,naLabel:At,showAxisLabels:b}):null})]}),t[15]=vt,t[16]=O,t[17]=S,t[18]=B,t[19]=g,t[20]=bt,t[21]=W,t[22]=x,t[23]=F,t[24]=$t,t[25]=Bt,t[26]=j,t[27]=ht,t[28]=M,t[29]=N,t[30]=a,t[31]=m,t[32]=tt,t[33]=At,t[34]=_,t[35]=o,t[36]=dt,t[37]=jt,t[38]=Q,t[39]=G,t[40]=H,t[41]=b,t[42]=f,t[43]=z,t[44]=Z,t[45]=c,t[46]=Ut,t[47]=qt,t[48]=v,t[49]=pt,t[50]=X,t[51]=U,t[52]=nt):nt=t[52];let E;t[53]!==x?.footnote||t[54]!==x?.source||t[55]!==A||t[56]!==D||t[57]!==c?.footnote||t[58]!==c?.source||t[59]!==u?(E=D||A?n.jsxRuntimeExports.jsx(we.GraphFooter,{styles:{footnote:c?.footnote,source:c?.source},classNames:{footnote:x?.footnote,source:x?.source},sources:D,footNote:A,width:u}):null,t[53]=x?.footnote,t[54]=x?.source,t[55]=A,t[56]=D,t[57]=c?.footnote,t[58]=c?.source,t[59]=u,t[60]=E):E=t[60];let I;return t[61]!==R||t[62]!==Y||t[63]!==ft||t[64]!==p||t[65]!==J||t[66]!==K||t[67]!==zt||t[68]!==y||t[69]!==wt||t[70]!==It||t[71]!==it||t[72]!==nt||t[73]!==E||t[74]!==v||t[75]!==u?(I=n.jsxRuntimeExports.jsxs(fe.GraphContainer,{className:wt,style:It,id:ft,ref:ut,"aria-label":R,backgroundColor:Y,theme:v,language:J,minHeight:K,width:u,height:p,relativeHeight:y,padding:zt,children:[it,nt,E]}),t[61]=R,t[62]=Y,t[63]=ft,t[64]=p,t[65]=J,t[66]=K,t[67]=zt,t[68]=y,t[69]=wt,t[70]=It,t[71]=it,t[72]=nt,t[73]=E,t[74]=v,t[75]=u,t[76]=I):I=t[76],I}function ni(e){return e!==void 0}function si(e){return e!==void 0}function oi(e){return e.data}function ri(e){return e!==void 0}function li(e){return e.data}exports.ParetoChart=ii;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-CTPQjnHt.cjs"),st=require("react"),xe=require("./index-DQA8q5sC.cjs"),ne=require("./numberFormattingFunction-02t-wJta.cjs"),he=require("./Tooltip-uUdw6wJL.cjs"),ue=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ce=require("./Axis-DxRV2yMi.cjs"),me=require("./AxisTitle-sS5bLLR7.cjs"),ge=require("./XAxesLabels-Bt5NZBmX.cjs"),ye=require("./DetailsModal-BN0HDFlV.cjs"),be=require("./band-VYfcZeJ2.cjs"),pe=require("./linear-BwPAspcq.cjs"),de=require("./line-DHV4JwCR.cjs"),se=require("./step-BZ3C8QFW.cjs"),ve=require("./use-in-view-QcfiW0w3.cjs"),Dt=require("./proxy-BxvUI_9l.cjs"),je=require("./index-DG2bgAva.cjs"),Ae=require("./GraphFooter.cjs"),we=require("./GraphHeader.cjs"),Ee=require("./ColorLegend.cjs"),oe=require("./Colors.cjs"),Re=require("./EmptyState-sAEZ_5rU.cjs"),fe=require("./GraphContainer-d8A46BK2.cjs");function Ce(e){const t=n.compilerRuntimeExports.c(157),{data:v,width:P,height:D,barColor:d,lineColor:p,axisTitles:u,sameAxes:j,rightMargin:zt,leftMargin:Qt,topMargin:Ft,bottomMargin:Yt,tooltip:Et,showValues:Rt,onSeriesMouseOver:ot,barPadding:Ht,truncateBy:Ct,showLabels:Gt,onSeriesMouseClick:C,resetSelectionOnDoubleClick:pt,detailsOnClick:w,noOfTicks:dt,lineSuffix:ft,barSuffix:Mt,linePrefix:kt,barPrefix:St,curveType:Lt,styles:s,classNames:o,animate:r,precision:F,customLayers:M,naLabel:rt,showAxisLabels:E}=e,Jt=st.useRef(null);let ht;t[0]!==r.amount||t[1]!==r.once?(ht={once:r.once,amount:r.amount},t[0]=r.amount,t[1]=r.once,t[2]=ht):ht=t[2];const k=ve.useInView(Jt,ht),Xt=Lt==="linear"?de.curveLinear:Lt==="step"?se.curveStep:Lt==="stepAfter"?se.stepAfter:Lt==="stepBefore"?se.stepBefore:se.monotoneX,[Nt,lt]=st.useState(void 0),[S,gt]=st.useState(void 0),[Ot,c]=st.useState(void 0),[x,at]=st.useState(void 0),Wt=Qt+50,yt=zt+65;let $t;t[3]!==Yt||t[4]!==Wt||t[5]!==yt||t[6]!==Ft?($t={top:Ft,bottom:Yt,left:Wt,right:yt},t[3]=Yt,t[4]=Wt,t[5]=yt,t[6]=Ft,t[7]=$t):$t=t[7];const l=$t,h=P-l.left-l.right,a=D-l.top-l.bottom;let L,Y,H,R,G,X,W,N,O,$,q,B,U,z,J;if(t[8]!==r||t[9]!==u||t[10]!==d||t[11]!==Ht||t[12]!==St||t[13]!==Mt||t[14]!==o?.graphObjectValues||t[15]!==o?.xAxis?.axis||t[16]!==o?.xAxis?.labels||t[17]!==o?.yAxis?.gridLines||t[18]!==o?.yAxis?.labels||t[19]!==o?.yAxis?.title||t[20]!==Xt||t[21]!==M||t[22]!==v||t[23]!==w||t[24]!==a||t[25]!==h||t[26]!==D||t[27]!==k||t[28]!==p||t[29]!==kt||t[30]!==ft||t[31]!==l.bottom||t[32]!==l.left||t[33]!==l.right||t[34]!==l.top||t[35]!==S||t[36]!==rt||t[37]!==dt||t[38]!==C||t[39]!==ot||t[40]!==F||t[41]!==pt||t[42]!==j||t[43]!==E||t[44]!==Gt||t[45]!==Rt||t[46]!==s?.graphObjectValues||t[47]!==s?.xAxis?.axis||t[48]!==s?.xAxis?.labels||t[49]!==s?.yAxis?.gridLines||t[50]!==s?.yAxis?.labels||t[51]!==s?.yAxis?.title||t[52]!==Ct||t[53]!==P){const m=v.map(ti),g=be.band().domain(m.map(_e)).range([0,h]).paddingInner(Ht),qt=Math.min(...m.map(Ze).filter(Qe))!==1/0?Math.min(...m.map(Ke).filter(Je))>0?0:Math.min(...m.map(ze).filter(Ue)):0,vt=Math.min(...m.map(Be).filter(We))!==1/0?Math.min(...m.map(Xe).filter(Ge))>0?0:Math.min(...m.map(He).filter(Ye)):0,jt=Math.max(...m.map(Fe).filter(De))!==1/0?Math.max(...m.map(Pe).filter(Te)):0,ct=Math.max(...m.map(Ie).filter(Ve))!==1/0?Math.max(...m.map(qe).filter($e)):0,Bt=qt<vt?qt:vt,At=jt>ct?jt:ct,f=pe.linear().domain([j?Bt:qt,j?At>0?At:0:jt>0?jt:0]).range([a,0]).nice(),y=pe.linear().domain([j?Bt:vt,j?At>0?At:0:ct>0?ct:0]).range([a,0]).nice(),Vt=de.line().defined(Oe).x(i=>g(`${i.id}`)+g.bandwidth()/2).y(i=>y(i.line)).curve(Xt),re=f.ticks(dt),Ut=y.ticks(dt);Y=Dt.motion.svg,G=`${P}px`,X=`${D}px`,W=`0 0 ${P} ${D}`,N="ltr",O=Jt,U=`translate(${l.left},${l.top})`;const Kt=o?.xAxis?.axis;let et;t[69]!==Kt?(et={axis:Kt},t[69]=Kt,t[70]=et):et=t[70];let ut;t[71]!==s?.xAxis?.axis?(ut=s?.xAxis?.axis||{},t[71]=s?.xAxis?.axis,t[72]=ut):ut=t[72];let V;t[73]!==d||t[74]!==ut?(V={axis:{stroke:d,...ut}},t[73]=d,t[74]=ut,t[75]=V):V=t[75];let xt;t[76]!==a||t[77]!==et||t[78]!==V?(xt=n.jsxRuntimeExports.jsx(ce.Axis,{y1:0,y2:a,x1:-15,x2:-15,classNames:et,styles:V}),t[76]=a,t[77]=et,t[78]=V,t[79]=xt):xt=t[79];let wt;t[80]!==u||t[81]!==d||t[82]!==o?.yAxis?.title||t[83]!==a||t[84]!==l.left||t[85]!==E||t[86]!==s?.yAxis?.title?(wt=E?n.jsxRuntimeExports.jsx(me.AxisTitle,{x:10-l.left,y:a/2,style:{fill:d,...s?.yAxis?.title||{}},className:o?.yAxis?.title,text:u[0].length>100?`${u[0].substring(0,100)}...`:u[0],rotate90:!0}):null,t[80]=u,t[81]=d,t[82]=o?.yAxis?.title,t[83]=a,t[84]=l.left,t[85]=E,t[86]=s?.yAxis?.title,t[87]=wt):wt=t[87],z=n.jsxRuntimeExports.jsxs("g",{children:[re.map((i,Pt)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:f(i),y2:f(i),x1:-15,x2:-20,style:{stroke:d,strokeWidth:1,...s?.yAxis?.gridLines||{}},className:o?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:-25,y:f(i),dy:"0.33em",className:n.mo("text-xs",o?.yAxis?.labels),style:{textAnchor:"end",fill:d,...s?.yAxis?.labels||{}},children:ne.numberFormattingFunction(i,rt,F,St,Mt)})]},Pt)),xt,wt]});const It=h+15,it=h+15,nt=o?.xAxis?.axis;let A;t[88]!==nt?(A={axis:nt},t[88]=nt,t[89]=A):A=t[89];let I;t[90]!==s?.xAxis?.axis?(I=s?.xAxis?.axis||{},t[90]=s?.xAxis?.axis,t[91]=I):I=t[91];let mt;t[92]!==p||t[93]!==I?(mt={axis:{stroke:p,...I}},t[92]=p,t[93]=I,t[94]=mt):mt=t[94];let Tt;t[95]!==a||t[96]!==It||t[97]!==it||t[98]!==A||t[99]!==mt?(Tt=n.jsxRuntimeExports.jsx(ce.Axis,{y1:0,y2:a,x1:It,x2:it,classNames:A,styles:mt}),t[95]=a,t[96]=It,t[97]=it,t[98]=A,t[99]=mt,t[100]=Tt):Tt=t[100];let Zt;t[101]!==u||t[102]!==o?.yAxis?.title||t[103]!==a||t[104]!==h||t[105]!==p||t[106]!==l.right||t[107]!==E||t[108]!==s?.yAxis?.title?(Zt=E?n.jsxRuntimeExports.jsx(me.AxisTitle,{x:h+l.right-15,y:a/2,style:{fill:p,...s?.yAxis?.title||{}},className:o?.yAxis?.title,text:u[1].length>100?`${u[1].substring(0,100)}...`:u[1],rotate90:!0}):null,t[101]=u,t[102]=o?.yAxis?.title,t[103]=a,t[104]=h,t[105]=p,t[106]=l.right,t[107]=E,t[108]=s?.yAxis?.title,t[109]=Zt):Zt=t[109],J=n.jsxRuntimeExports.jsxs("g",{children:[Ut.map((i,Pt)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:y(i),y2:y(i),x1:h+15,x2:h+20,style:{stroke:p,strokeWidth:1,...s?.yAxis?.gridLines||{}},className:o?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:h+25,y:y(i),dy:"0.33em",dx:-2,style:{textAnchor:"start",fill:p,...s?.yAxis?.labels||{}},className:n.mo("text-xs",o?.yAxis?.labels),children:ne.numberFormattingFunction(i,rt,F,kt,ft)})]},Pt)),Tt,Zt]});const le=o?.xAxis?.axis;let _t;t[110]!==le?(_t={axis:le},t[110]=le,t[111]=_t):_t=t[111];const ae=s?.xAxis?.axis;let te;t[112]!==ae?(te={axis:ae},t[112]=ae,t[113]=te):te=t[113],H=n.jsxRuntimeExports.jsx(ce.Axis,{y1:j?f(0):a,y2:j?f(0):a,x1:-15,x2:h+15,classNames:_t,styles:te}),t[114]!==M?(R=M.filter(Ne).map(Le),t[114]=M,t[115]=R):R=t[115],L=je.AnimatePresence,$=m.map((i,Pt)=>n.jsxRuntimeExports.jsxs(Dt.motion.g,{className:"undp-viz-g-with-hover",opacity:.85,onMouseEnter:T=>{lt(i),at(T.clientY),c(T.clientX),ot?.(i)},onClick:()=>{(C||w)&&(xe.isEqual(S,i)&&pt?(gt(void 0),C?.(void 0)):(gt(i),C?.(i)))},onMouseMove:T=>{lt(i),at(T.clientY),c(T.clientX)},onMouseLeave:()=>{lt(void 0),c(void 0),at(void 0),ot?.(void 0)},children:[n.jsxRuntimeExports.jsx(Dt.motion.rect,{variants:{initial:{attrY:f(0),height:0,opacity:1,fill:d},whileInView:{attrY:i.bar?i.bar>0?f(i.bar):f(0):0,height:i.bar?Math.abs(f(i.bar)-f(0)):0,opacity:1,fill:d,transition:{duration:r.duration}}},initial:"initial",animate:k?"whileInView":"initial",exit:{attrY:f(0),height:0,opacity:0,transition:{duration:r.duration}},x:g(`${Pt}`),width:g.bandwidth()}),Rt&&!ue.checkIfNullOrUndefined(i.bar)?n.jsxRuntimeExports.jsx(Dt.motion.text,{x:g(`${i.id}`)+g.bandwidth()/2,exit:{attrY:f(0),opacity:0,transition:{duration:r.duration}},variants:{initial:{attrY:f(0),opacity:0,fill:d},whileInView:{attrY:f(i.bar||0),opacity:1,fill:d,transition:{duration:r.duration}}},initial:"initial",animate:k?"whileInView":"initial",style:{textAnchor:"middle",...s?.graphObjectValues||{}},className:n.mo("graph-value text-sm",o?.graphObjectValues),dy:i.bar?i.bar>=0?"-5px":"1em":"-5px",children:ne.numberFormattingFunction(i.bar,rt,F,St,Mt)}):null,Gt?n.jsxRuntimeExports.jsx(ge.XAxesLabels,{value:`${i.label}`.length<Ct?`${i.label}`:`${`${i.label}`.substring(0,Ct)}...`,y:a+5,x:g(`${i.id}`),width:g.bandwidth(),height:l.bottom,style:s?.xAxis?.labels,className:o?.xAxis?.labels,alignment:"top",animate:r,isInView:k}):null]},i.label));let ee;t[116]!==r.duration?(ee={opacity:0,transition:{duration:r.duration}},t[116]=r.duration,t[117]=ee):ee=t[117];let ie;t[118]===Symbol.for("react.memo_cache_sentinel")?(ie={fill:"none",strokeWidth:2},t[118]=ie):ie=t[118],q=n.jsxRuntimeExports.jsx(Dt.motion.path,{exit:ee,variants:{initial:{d:Vt(m.map(Se)),opacity:0,stroke:p},whileInView:{d:Vt(m),opacity:1,stroke:p,transition:{duration:r.duration}}},initial:"initial",animate:k?"whileInView":"initial",style:ie}),B=m.map((i,Pt)=>n.jsxRuntimeExports.jsx("g",{children:ue.checkIfNullOrUndefined(i.line)?null:n.jsxRuntimeExports.jsxs("g",{onMouseEnter:T=>{lt(i),at(T.clientY),c(T.clientX),ot?.(i)},onClick:()=>{(C||w)&&(xe.isEqual(S,i)&&pt?(gt(void 0),C?.(void 0)):(gt(i),C?.(i)))},onMouseMove:T=>{lt(i),at(T.clientY),c(T.clientX)},onMouseLeave:()=>{lt(void 0),c(void 0),at(void 0),ot?.(void 0)},children:[n.jsxRuntimeExports.jsx(Dt.motion.circle,{exit:{cy:y(0),opacity:0,transition:{duration:r.duration}},variants:{initial:{cy:y(0),opacity:0,fill:p},whileInView:{cy:y(i.line),opacity:1,fill:p,transition:{duration:r.duration}}},initial:"initial",animate:k?"whileInView":"initial",cx:g(i.id)+g.bandwidth()/2,r:h/m.length<5?0:h/m.length<20?2:4}),Rt?n.jsxRuntimeExports.jsx(Dt.motion.text,{x:g(`${i.id}`)+g.bandwidth()/2,exit:{y:y(0),opacity:0,transition:{duration:r.duration}},style:{textAnchor:"middle",...s?.graphObjectValues||{}},variants:{initial:{y:y(0),opacity:0,fill:p},whileInView:{y:y(i.line),opacity:1,fill:p,transition:{duration:r.duration}}},initial:"initial",animate:k?"whileInView":"initial",className:n.mo("graph-value text-sm",o?.graphObjectValues),dy:"-5px",children:ne.numberFormattingFunction(i.line,rt,F,kt,ft)}):null]})},Pt)),t[8]=r,t[9]=u,t[10]=d,t[11]=Ht,t[12]=St,t[13]=Mt,t[14]=o?.graphObjectValues,t[15]=o?.xAxis?.axis,t[16]=o?.xAxis?.labels,t[17]=o?.yAxis?.gridLines,t[18]=o?.yAxis?.labels,t[19]=o?.yAxis?.title,t[20]=Xt,t[21]=M,t[22]=v,t[23]=w,t[24]=a,t[25]=h,t[26]=D,t[27]=k,t[28]=p,t[29]=kt,t[30]=ft,t[31]=l.bottom,t[32]=l.left,t[33]=l.right,t[34]=l.top,t[35]=S,t[36]=rt,t[37]=dt,t[38]=C,t[39]=ot,t[40]=F,t[41]=pt,t[42]=j,t[43]=E,t[44]=Gt,t[45]=Rt,t[46]=s?.graphObjectValues,t[47]=s?.xAxis?.axis,t[48]=s?.xAxis?.labels,t[49]=s?.yAxis?.gridLines,t[50]=s?.yAxis?.labels,t[51]=s?.yAxis?.title,t[52]=Ct,t[53]=P,t[54]=L,t[55]=Y,t[56]=H,t[57]=R,t[58]=G,t[59]=X,t[60]=W,t[61]=N,t[62]=O,t[63]=$,t[64]=q,t[65]=B,t[66]=U,t[67]=z,t[68]=J}else L=t[54],Y=t[55],H=t[56],R=t[57],G=t[58],X=t[59],W=t[60],N=t[61],O=t[62],$=t[63],q=t[64],B=t[65],U=t[66],z=t[67],J=t[68];let K;t[119]!==L||t[120]!==$||t[121]!==q||t[122]!==B?(K=n.jsxRuntimeExports.jsxs(L,{children:[$,q,B]}),t[119]=L,t[120]=$,t[121]=q,t[122]=B,t[123]=K):K=t[123];let b;t[124]!==M?(b=M.filter(ke).map(Me),t[124]=M,t[125]=b):b=t[125];let Q;t[126]!==H||t[127]!==R||t[128]!==K||t[129]!==b||t[130]!==U||t[131]!==z||t[132]!==J?(Q=n.jsxRuntimeExports.jsxs("g",{transform:U,children:[z,J,H,R,K,b]}),t[126]=H,t[127]=R,t[128]=K,t[129]=b,t[130]=U,t[131]=z,t[132]=J,t[133]=Q):Q=t[133];let Z;t[134]!==Y||t[135]!==G||t[136]!==X||t[137]!==W||t[138]!==N||t[139]!==O||t[140]!==Q?(Z=n.jsxRuntimeExports.jsx(Y,{width:G,height:X,viewBox:W,direction:N,ref:O,children:Q}),t[134]=Y,t[135]=G,t[136]=X,t[137]=W,t[138]=N,t[139]=O,t[140]=Q,t[141]=Z):Z=t[141];let _;t[142]!==o?.tooltip||t[143]!==Ot||t[144]!==x||t[145]!==Nt||t[146]!==s?.tooltip||t[147]!==Et?(_=Nt&&Et&&Ot&&x?n.jsxRuntimeExports.jsx(he.Tooltip,{data:Nt,body:Et,xPos:Ot,yPos:x,backgroundStyle:s?.tooltip,className:o?.tooltip}):null,t[142]=o?.tooltip,t[143]=Ot,t[144]=x,t[145]=Nt,t[146]=s?.tooltip,t[147]=Et,t[148]=_):_=t[148];let tt;t[149]!==o?.modal||t[150]!==w||t[151]!==S?(tt=w&&S!==void 0?n.jsxRuntimeExports.jsx(ye.DetailsModal,{body:w,data:S,setData:gt,className:o?.modal}):null,t[149]=o?.modal,t[150]=w,t[151]=S,t[152]=tt):tt=t[152];let bt;return t[153]!==Z||t[154]!==_||t[155]!==tt?(bt=n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[Z,_,tt]}),t[153]=Z,t[154]=_,t[155]=tt,t[156]=bt):bt=t[156],bt}function Me(e){return e.layer}function ke(e){return e.position==="after"}function Se(e){return{...e,line:0}}function Le(e){return e.layer}function Ne(e){return e.position==="before"}function Oe(e){return!ue.checkIfNullOrUndefined(e.line)}function $e(e){return e!=null}function qe(e){return e.line}function Ve(e){return e!=null}function Ie(e){return e.line}function Te(e){return e!=null}function Pe(e){return e.bar}function De(e){return e!=null}function Fe(e){return e.bar}function Ye(e){return e!=null}function He(e){return e.line}function Ge(e){return e!=null}function Xe(e){return e.line}function We(e){return e!=null}function Be(e){return e.line}function Ue(e){return e!=null}function ze(e){return e.bar}function Je(e){return e!=null}function Ke(e){return e.bar}function Qe(e){return e!=null}function Ze(e){return e.bar}function _e(e){return`${e.id}`}function ti(e,t){return{...e,id:`${t}`}}function ei(e){const t=n.compilerRuntimeExports.c(77),{data:v,graphTitle:P,sources:D,graphDescription:d,height:p,width:u,footNote:j,padding:zt,lineColor:Qt,barColor:Ft,sameAxes:Yt,backgroundColor:Et,leftMargin:Rt,rightMargin:ot,topMargin:Ht,bottomMargin:Ct,lineAxisTitle:Gt,barAxisTitle:C,tooltip:pt,relativeHeight:w,onSeriesMouseOver:dt,graphID:ft,graphDownload:Mt,dataDownload:kt,barPadding:St,truncateBy:Lt,showLabels:s,onSeriesMouseClick:o,language:r,colorLegendTitle:F,minHeight:M,theme:rt,ariaLabel:E,resetSelectionOnDoubleClick:Jt,detailsOnClick:ht,showValues:k,noOfTicks:Xt,lineSuffix:Nt,barSuffix:lt,linePrefix:S,barPrefix:gt,curveType:Ot,styles:c,classNames:x,animate:at,precision:Wt,customLayers:yt,naLabel:$t,showColorScale:l,showAxisLabels:h}=e,a=Qt===void 0?oe.Colors.light.categoricalColors.colors[1]:Qt,L=Ft===void 0?oe.Colors.light.categoricalColors.colors[0]:Ft,Y=Yt===void 0?!1:Yt,H=Et===void 0?!1:Et,R=Rt===void 0?80:Rt,G=ot===void 0?80:ot,X=Ht===void 0?20:Ht,W=Ct===void 0?25:Ct,N=Gt===void 0?"Line chart":Gt,O=C===void 0?"Bar graph":C,$=Mt===void 0?!1:Mt,q=kt===void 0?!1:kt,B=St===void 0?.25:St,U=Lt===void 0?999:Lt,z=s===void 0?!0:s,J=r===void 0?"en":r,K=M===void 0?0:M,b=rt===void 0?"light":rt,Q=Jt===void 0?!0:Jt,Z=k===void 0?!0:k,_=Xt===void 0?5:Xt,tt=Nt===void 0?"":Nt,bt=lt===void 0?"":lt,m=S===void 0?"":S,g=gt===void 0?"":gt,qt=Ot===void 0?"curve":Ot,vt=at===void 0?!1:at,jt=Wt===void 0?2:Wt;let ct;t[0]!==yt?(ct=yt===void 0?[]:yt,t[0]=yt,t[1]=ct):ct=t[1];const Bt=ct,At=$t===void 0?"NA":$t,f=l===void 0?!0:l,y=h===void 0?!0:h,[Vt,re]=st.useState(0),[Ut,Kt]=st.useState(0),et=st.useRef(null),ut=st.useRef(null);let V,xt;t[2]===Symbol.for("react.memo_cache_sentinel")?(V=()=>{const mt=new ResizeObserver(Tt=>{re(Tt[0].target.clientWidth||620),Kt(Tt[0].target.clientHeight||480)});return et.current&&mt.observe(et.current),()=>mt.disconnect()},xt=[],t[2]=V,t[3]=xt):(V=t[2],xt=t[3]),st.useEffect(V,xt);const wt=x?.graphContainer,It=c?.graphContainer;let it;t[4]!==x?.description||t[5]!==x?.title||t[6]!==v||t[7]!==q||t[8]!==d||t[9]!==$||t[10]!==P||t[11]!==c?.description||t[12]!==c?.title||t[13]!==u?(it=P||d||$||q?n.jsxRuntimeExports.jsx(we.GraphHeader,{styles:{title:c?.title,description:c?.description},classNames:{title:x?.title,description:x?.description},graphTitle:P,graphDescription:d,width:u,graphDownload:$?ut:void 0,dataDownload:q?v.map(ri).filter(oi).length>0?v.map(si).filter(ni):v.filter(ii):null}):null,t[4]=x?.description,t[5]=x?.title,t[6]=v,t[7]=q,t[8]=d,t[9]=$,t[10]=P,t[11]=c?.description,t[12]=c?.title,t[13]=u,t[14]=it):it=t[14];let nt;t[15]!==vt||t[16]!==O||t[17]!==L||t[18]!==B||t[19]!==g||t[20]!==bt||t[21]!==W||t[22]!==x||t[23]!==F||t[24]!==qt||t[25]!==Bt||t[26]!==v||t[27]!==ht||t[28]!==R||t[29]!==N||t[30]!==a||t[31]!==m||t[32]!==tt||t[33]!==At||t[34]!==_||t[35]!==o||t[36]!==dt||t[37]!==jt||t[38]!==Q||t[39]!==G||t[40]!==Y||t[41]!==y||t[42]!==f||t[43]!==z||t[44]!==Z||t[45]!==c||t[46]!==Ut||t[47]!==Vt||t[48]!==b||t[49]!==pt||t[50]!==X||t[51]!==U?(nt=v.length===0?n.jsxRuntimeExports.jsx(Re.EmptyState,{}):n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[f?n.jsxRuntimeExports.jsx(Ee.ColorLegend,{colorDomain:[O,N],colors:[L||oe.Colors[b].categoricalColors.colors[0],a||oe.Colors[b].categoricalColors.colors[1]],colorLegendTitle:F,showNAColor:!1,className:x?.colorLegend}):null,n.jsxRuntimeExports.jsx(fe.GraphArea,{ref:et,children:Vt&&Ut?n.jsxRuntimeExports.jsx(Ce,{data:v,sameAxes:Y,lineColor:a,barColor:L,width:Vt,height:Ut,truncateBy:U,leftMargin:R,rightMargin:G,topMargin:X,bottomMargin:W,axisTitles:[O,N],tooltip:pt,onSeriesMouseOver:dt,barPadding:B,showLabels:z,onSeriesMouseClick:o,resetSelectionOnDoubleClick:Q,detailsOnClick:ht,noOfTicks:_,lineSuffix:tt,barSuffix:bt,linePrefix:m,barPrefix:g,curveType:qt,showValues:Z,styles:c,classNames:x,animate:vt===!0?{duration:.5,once:!0,amount:.5}:vt||{duration:0,once:!0,amount:0},precision:jt,customLayers:Bt,naLabel:At,showAxisLabels:y}):null})]}),t[15]=vt,t[16]=O,t[17]=L,t[18]=B,t[19]=g,t[20]=bt,t[21]=W,t[22]=x,t[23]=F,t[24]=qt,t[25]=Bt,t[26]=v,t[27]=ht,t[28]=R,t[29]=N,t[30]=a,t[31]=m,t[32]=tt,t[33]=At,t[34]=_,t[35]=o,t[36]=dt,t[37]=jt,t[38]=Q,t[39]=G,t[40]=Y,t[41]=y,t[42]=f,t[43]=z,t[44]=Z,t[45]=c,t[46]=Ut,t[47]=Vt,t[48]=b,t[49]=pt,t[50]=X,t[51]=U,t[52]=nt):nt=t[52];let A;t[53]!==x?.footnote||t[54]!==x?.source||t[55]!==j||t[56]!==D||t[57]!==c?.footnote||t[58]!==c?.source||t[59]!==u?(A=D||j?n.jsxRuntimeExports.jsx(Ae.GraphFooter,{styles:{footnote:c?.footnote,source:c?.source},classNames:{footnote:x?.footnote,source:x?.source},sources:D,footNote:j,width:u}):null,t[53]=x?.footnote,t[54]=x?.source,t[55]=j,t[56]=D,t[57]=c?.footnote,t[58]=c?.source,t[59]=u,t[60]=A):A=t[60];let I;return t[61]!==E||t[62]!==H||t[63]!==ft||t[64]!==p||t[65]!==J||t[66]!==K||t[67]!==zt||t[68]!==w||t[69]!==wt||t[70]!==It||t[71]!==it||t[72]!==nt||t[73]!==A||t[74]!==b||t[75]!==u?(I=n.jsxRuntimeExports.jsxs(fe.GraphContainer,{className:wt,style:It,id:ft,ref:ut,"aria-label":E,backgroundColor:H,theme:b,language:J,minHeight:K,width:u,height:p,relativeHeight:w,padding:zt,children:[it,nt,A]}),t[61]=E,t[62]=H,t[63]=ft,t[64]=p,t[65]=J,t[66]=K,t[67]=zt,t[68]=w,t[69]=wt,t[70]=It,t[71]=it,t[72]=nt,t[73]=A,t[74]=b,t[75]=u,t[76]=I):I=t[76],I}function ii(e){return e!==void 0}function ni(e){return e!==void 0}function si(e){return e.data}function oi(e){return e!==void 0}function ri(e){return e.data}exports.ParetoChart=ei;
|
|
2
2
|
//# sourceMappingURL=ParetoChart.cjs.map
|