@undp/data-viz 2.2.1 → 2.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.js +1 -1
  3. package/dist/Axis-D56Gy0se.js +31 -0
  4. package/dist/Axis-D56Gy0se.js.map +1 -0
  5. package/dist/Axis-Jt_tmhxS.cjs +2 -0
  6. package/dist/Axis-Jt_tmhxS.cjs.map +1 -0
  7. package/dist/BarGraph.cjs +1 -1
  8. package/dist/BarGraph.cjs.map +1 -1
  9. package/dist/BarGraph.d.ts +6 -0
  10. package/dist/BarGraph.js +1759 -1750
  11. package/dist/BarGraph.js.map +1 -1
  12. package/dist/BeeSwarmChart.cjs +1 -1
  13. package/dist/BeeSwarmChart.cjs.map +1 -1
  14. package/dist/BeeSwarmChart.d.ts +2 -0
  15. package/dist/BeeSwarmChart.js +270 -267
  16. package/dist/BeeSwarmChart.js.map +1 -1
  17. package/dist/BiVariateChoroplethMap.cjs +1 -1
  18. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  19. package/dist/BiVariateChoroplethMap.d.ts +2 -0
  20. package/dist/BiVariateChoroplethMap.js +264 -250
  21. package/dist/BiVariateChoroplethMap.js.map +1 -1
  22. package/dist/BulletChart.cjs +1 -1
  23. package/dist/BulletChart.cjs.map +1 -1
  24. package/dist/BulletChart.d.ts +2 -0
  25. package/dist/BulletChart.js +544 -542
  26. package/dist/BulletChart.js.map +1 -1
  27. package/dist/ButterflyChart.cjs +1 -1
  28. package/dist/ButterflyChart.cjs.map +1 -1
  29. package/dist/ButterflyChart.d.ts +2 -0
  30. package/dist/ButterflyChart.js +332 -330
  31. package/dist/ButterflyChart.js.map +1 -1
  32. package/dist/ChoroplethMap.cjs +1 -1
  33. package/dist/ChoroplethMap.cjs.map +1 -1
  34. package/dist/ChoroplethMap.d.ts +2 -0
  35. package/dist/ChoroplethMap.js +272 -258
  36. package/dist/ChoroplethMap.js.map +1 -1
  37. package/dist/DifferenceLineChart.cjs +1 -1
  38. package/dist/DifferenceLineChart.js +1 -1
  39. package/dist/DualAxisLineChart.cjs +1 -1
  40. package/dist/DualAxisLineChart.js +1 -1
  41. package/dist/DumbbellChart.cjs +1 -1
  42. package/dist/DumbbellChart.cjs.map +1 -1
  43. package/dist/DumbbellChart.d.ts +2 -0
  44. package/dist/DumbbellChart.js +537 -536
  45. package/dist/DumbbellChart.js.map +1 -1
  46. package/dist/GraphEl-BZbunD1_.cjs +2 -0
  47. package/dist/GraphEl-BZbunD1_.cjs.map +1 -0
  48. package/dist/{GraphEl-DKrjuQNB.js → GraphEl-C1Rz1V__.js} +68 -57
  49. package/dist/GraphEl-C1Rz1V__.js.map +1 -0
  50. package/dist/GriddedGraphs.cjs +1 -1
  51. package/dist/GriddedGraphs.d.ts +2 -0
  52. package/dist/GriddedGraphs.js +1 -1
  53. package/dist/GriddedGraphsFromConfig.d.ts +2 -0
  54. package/dist/Histogram.cjs +1 -1
  55. package/dist/Histogram.cjs.map +1 -1
  56. package/dist/Histogram.d.ts +2 -0
  57. package/dist/Histogram.js +50 -49
  58. package/dist/Histogram.js.map +1 -1
  59. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  60. package/dist/LineChartWithConfidenceInterval.js +1 -1
  61. package/dist/MultiGraphDashboard.d.ts +2 -0
  62. package/dist/MultiGraphDashboardFromConfig.d.ts +2 -0
  63. package/dist/MultiLineAltChart.cjs +1 -1
  64. package/dist/MultiLineAltChart.js +1 -1
  65. package/dist/MultiLineChart.cjs +1 -1
  66. package/dist/MultiLineChart.js +1 -1
  67. package/dist/ParetoChart.cjs +1 -1
  68. package/dist/ParetoChart.js +1 -1
  69. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +2 -0
  70. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +2 -0
  71. package/dist/PerformanceIntensiveScrollStory.d.ts +2 -0
  72. package/dist/ScatterPlot.cjs +1 -1
  73. package/dist/ScatterPlot.js +1 -1
  74. package/dist/ScrollStory.d.ts +2 -0
  75. package/dist/SimpleLineChart.cjs +1 -1
  76. package/dist/SimpleLineChart.js +1 -1
  77. package/dist/SingleGraphDashboard.cjs +1 -1
  78. package/dist/SingleGraphDashboard.d.ts +2 -0
  79. package/dist/SingleGraphDashboard.js +1 -1
  80. package/dist/SingleGraphDashboardFromConfig.d.ts +2 -0
  81. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +2 -0
  82. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +2 -0
  83. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +2 -0
  84. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +2 -0
  85. package/dist/SlopeChart.cjs +1 -1
  86. package/dist/SlopeChart.js +1 -1
  87. package/dist/Types.d.ts +2 -0
  88. package/dist/WaterfallChart.cjs +1 -1
  89. package/dist/WaterfallChart.cjs.map +1 -1
  90. package/dist/WaterfallChart.d.ts +2 -0
  91. package/dist/WaterfallChart.js +263 -261
  92. package/dist/WaterfallChart.js.map +1 -1
  93. package/dist/index.d.ts +24 -0
  94. package/package.json +1 -1
  95. package/dist/Axis-DoOqnt6g.js +0 -32
  96. package/dist/Axis-DoOqnt6g.js.map +0 -1
  97. package/dist/Axis-Dtjn-EgM.cjs +0 -2
  98. package/dist/Axis-Dtjn-EgM.cjs.map +0 -1
  99. package/dist/GraphEl-CBZdcvb7.cjs +0 -2
  100. package/dist/GraphEl-CBZdcvb7.cjs.map +0 -1
  101. package/dist/GraphEl-DKrjuQNB.js.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),_t=require("./parse-xYI9yrvL.cjs"),L=require("react"),ei=require("./getSliderMarks-CIuSoedo.cjs"),ti=require("./index-DQA8q5sC.cjs"),di=require("./index-Cno4Q0YE.cjs"),ii=require("./simple-statistics-xm8c0LQQ.cjs"),pi=require("./Tooltip-BLa2EfMs.cjs"),v=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ie=require("./Colors.cjs"),ni=require("./numberFormattingFunction-02t-wJta.cjs"),Zt=require("./customArea-B1LWQBmM.cjs"),oi=require("./Axis-Dtjn-EgM.cjs"),si=require("./AxisTitle-DV4n0RxE.cjs"),hi=require("./XTicksAndGridLines-CekrPykD.cjs"),li=require("./ReferenceLine-M9aP3dj-.cjs"),gi=require("./RegressionLine-Ci-Dh0w0.cjs"),yi=require("./YTicksAndGridLines-UzVC5eBM.cjs"),vi=require("./index-D69M6klB.cjs"),bi=require("./DetailsModal-DHttOA80.cjs"),Ai=require("./pow-BnyPO-NX.cjs"),ri=require("./linear-CgUCbw9F.cjs"),ji=require("./delaunay-rcy0HhZi.cjs"),Ft=require("./proxy-C4-uo6nS.cjs"),Oi=require("./use-in-view-C3o_ntMv.cjs"),ai=require("./index-CoobIWNj.cjs"),Ci=require("./GraphFooter.cjs"),Ri=require("./GraphHeader.cjs"),ki=require("./ColorLegendWithMouseOver.cjs"),wi=require("./EmptyState-CGeBqbmR.cjs"),ci=require("./index-C6er0ety.cjs"),Si=require("./ensureCompleteData-D9bQTiVS.cjs"),ui=require("./uniqBy-O05lp2S5.cjs"),xi=require("./GraphContainer-B1EDxJ0S.cjs");function Ei(i){const e=o.compilerRuntimeExports.c(216),{data:n,width:ne,height:S,showLabels:We,colors:f,colorDomain:R,radius:T,xAxisTitle:g,yAxisTitle:H,leftMargin:P,rightMargin:ut,topMargin:Ct,bottomMargin:Dt,tooltip:xt,onSeriesMouseOver:oe,refXValues:Rt,refYValues:kt,highlightAreaSettings:wt,selectedColor:Ne,highlightedDataPoints:W,maxRadiusValue:ft,maxXValue:mt,minXValue:k,maxYValue:Be,minYValue:j,onSeriesMouseClick:N,rtl:ze,annotations:Je,customHighlightAreaSettings:$e,regressionLine:se,resetSelectionOnDoubleClick:Me,detailsOnClick:$,noOfXTicks:Ke,noOfYTicks:Qe,labelColor:Ve,xSuffix:qe,ySuffix:De,xPrefix:Ie,yPrefix:le,styles:s,classNames:l,animate:a,dimmedOpacity:M,precision:V,customLayers:q}=i,dt=L.useRef(null);let pt;e[0]!==a.amount||e[1]!==a.once?(pt={once:a.once,amount:a.amount},e[0]=a.amount,e[1]=a.once,e[2]=pt):pt=e[2];const b=Oi.useInView(dt,pt),[E,Te]=L.useState(void 0),[X,Ze]=L.useState(void 0),[ht,re]=L.useState(void 0),[h,u]=L.useState(void 0),St=g?Dt+50:Dt,Et=H?P+30:P;let gt;e[3]!==ut||e[4]!==St||e[5]!==Et||e[6]!==Ct?(gt={top:Ct,bottom:St,left:Et,right:ut},e[3]=ut,e[4]=St,e[5]=Et,e[6]=Ct,e[7]=gt):gt=e[7];const p=gt;let B,ae,ce,ue,xe,fe,Y,me,de,pe,z,he,J,ge,K,ye,F,Q;if(e[8]!==a||e[9]!==Je||e[10]!==l?.graphObjectValues||e[11]!==l?.regLine||e[12]!==l?.xAxis?.axis||e[13]!==l?.xAxis?.gridLines||e[14]!==l?.xAxis?.labels||e[15]!==l?.xAxis?.title||e[16]!==l?.yAxis?.gridLines||e[17]!==l?.yAxis?.labels||e[18]!==l?.yAxis?.title||e[19]!==R||e[20]!==f||e[21]!==$e||e[22]!==q||e[23]!==n||e[24]!==$||e[25]!==M||e[26]!==S||e[27]!==wt||e[28]!==W||e[29]!==b||e[30]!==Ve||e[31]!==P||e[32]!==p.bottom||e[33]!==p.left||e[34]!==p.right||e[35]!==p.top||e[36]!==ft||e[37]!==mt||e[38]!==Be||e[39]!==k||e[40]!==j||e[41]!==X||e[42]!==E||e[43]!==Ke||e[44]!==Qe||e[45]!==N||e[46]!==oe||e[47]!==V||e[48]!==T||e[49]!==Rt||e[50]!==kt||e[51]!==se||e[52]!==Me||e[53]!==ze||e[54]!==Ne||e[55]!==We||e[56]!==s?.graphObjectValues||e[57]!==s?.regLine||e[58]!==s?.xAxis?.axis||e[59]!==s?.xAxis?.gridLines||e[60]!==s?.xAxis?.labels||e[61]!==s?.xAxis?.title||e[62]!==s?.yAxis?.gridLines||e[63]!==s?.yAxis?.labels||e[64]!==s?.yAxis?.title||e[65]!==ne||e[66]!==g||e[67]!==Ie||e[68]!==qe||e[69]!==H||e[70]!==le||e[71]!==De){const _=n.map(_i),A=ne-p.left-p.right,y=S-p.top-p.bottom,w=n.filter(Zi).length!==n.length?Ai.sqrt().domain([0,ft]).range([.25,T]).nice():void 0,_e=_.filter(Qi).length===0?_:di.orderBy(_.filter(Ki),"radius","desc"),c=ri.linear().domain([k,mt]).range([0,A]).nice(),d=ri.linear().domain([j,Be]).range([y,0]).nice(),U=c.ticks(Ke),Lt=d.ticks(Qe),It=ji.Delaunay.from(_e.filter(Ji),t=>c(t.x),t=>d(t.y)).voronoi([0,0,A<0?0:A,y<0?0:y]),Tt=ii.linearRegression(n.filter(zi).map(t=>[c(t.x),d(t.y)])),Nt=ii.linearRegressionLine(Tt);ae=Ft.motion.svg,me=`${ne}px`,de=`${S}px`,pe=`0 0 ${ne} ${S}`,z="ltr",he=dt,ce=`translate(${p.left},${p.top})`;let Xe;e[90]!==a||e[91]!==$e||e[92]!==b||e[93]!==c||e[94]!==d?(Xe=o.jsxRuntimeExports.jsx(Zt.CustomArea,{areaSettings:$e,scaleX:c,scaleY:d,animate:a,isInView:b},"custom-area"),e[90]=a,e[91]=$e,e[92]=b,e[93]=c,e[94]=d,e[95]=Xe):Xe=e[95],ue=o.jsxRuntimeExports.jsxs(ai.AnimatePresence,{children:[o.jsxRuntimeExports.jsx(vi.HighlightAreaForScatterPlot,{areaSettings:wt,width:A,height:y,scaleX:c,scaleY:d,animate:a,isInView:b},"highlight-area"),Xe]});const yt=s?.yAxis?.gridLines,vt=s?.yAxis?.labels;let Ye;e[96]!==yt||e[97]!==vt?(Ye={gridLines:yt,labels:vt},e[96]=yt,e[97]=vt,e[98]=Ye):Ye=e[98];const bt=l?.yAxis?.gridLines,et=l?.yAxis?.labels;let r;e[99]!==bt||e[100]!==et?(r={gridLines:bt,labels:et},e[99]=bt,e[100]=et,e[101]=r):r=e[101];const tt=d(j<0?0:j),Pt=d(j<0?0:j),it=A+p.right,Xt=j<0?0:j;let O;e[102]!==V||e[103]!==Xt||e[104]!==le||e[105]!==De?(O=ni.numberFormattingFunction(Xt,"NA",V,le,De),e[102]=V,e[103]=Xt,e[104]=le,e[105]=De,e[106]=O):O=e[106];const Yt=d(j<0?0:j);let G;e[107]!==Yt?(G={x:0,y:Yt,dy:"0.33em",dx:-4},e[107]=Yt,e[108]=G):G=e[108];const x=l?.xAxis?.axis,D=l?.yAxis?.labels;let Ce;e[109]!==x||e[110]!==D?(Ce={axis:x,label:D},e[109]=x,e[110]=D,e[111]=Ce):Ce=e[111];const At=s?.xAxis?.axis;let nt;e[112]!==s?.yAxis?.labels?(nt=s?.yAxis?.labels||{},e[112]=s?.yAxis?.labels,e[113]=nt):nt=e[113];let Re;e[114]!==nt?(Re={textAnchor:"end",...nt},e[114]=nt,e[115]=Re):Re=e[115];let Fe;e[116]!==At||e[117]!==Re?(Fe={axis:At,label:Re},e[116]=At,e[117]=Re,e[118]=Fe):Fe=e[118];let Ue;e[119]!==tt||e[120]!==Pt||e[121]!==it||e[122]!==O||e[123]!==G||e[124]!==Ce||e[125]!==Fe?(Ue=o.jsxRuntimeExports.jsx(oi.Axis,{y1:tt,y2:Pt,x1:0,x2:it,label:O,labelPos:G,classNames:Ce,styles:Fe}),e[119]=tt,e[120]=Pt,e[121]=it,e[122]=O,e[123]=G,e[124]=Ce,e[125]=Fe,e[126]=Ue):Ue=e[126];const ot=0-P-15,st=y/2,lt=s?.yAxis?.title,jt=l?.yAxis?.title;let Ge;e[127]!==ot||e[128]!==st||e[129]!==lt||e[130]!==jt||e[131]!==H?(Ge=o.jsxRuntimeExports.jsx(si.AxisTitle,{x:ot,y:st,style:lt,className:jt,text:H,rotate90:!0}),e[127]=ot,e[128]=st,e[129]=lt,e[130]=jt,e[131]=H,e[132]=Ge):Ge=e[132],xe=o.jsxRuntimeExports.jsxs("g",{children:[o.jsxRuntimeExports.jsx(yi.YTicksAndGridLines,{values:Lt.filter(Bi),y:Lt.filter(Wi).map(t=>d(t)),x1:0,x2:A+p.right,styles:Ye,classNames:r,suffix:De,prefix:le,labelType:"secondary",showGridLines:!0,labelPos:"side",precision:V}),Ue,Ge]});const rt=s?.xAxis?.gridLines,Ot=s?.xAxis?.labels;let at;e[133]!==rt||e[134]!==Ot?(at={gridLines:rt,labels:Ot},e[133]=rt,e[134]=Ot,e[135]=at):at=e[135];const ke=l?.xAxis?.gridLines,we=l?.xAxis?.labels;let ee;e[136]!==ke||e[137]!==we?(ee={gridLines:ke,labels:we},e[136]=ke,e[137]=we,e[138]=ee):ee=e[138];const Se=c(k<0?0:k),Ee=c(k<0?0:k),Le=k<0?0:k;let I;e[139]!==V||e[140]!==Le||e[141]!==Ie||e[142]!==qe?(I=ni.numberFormattingFunction(Le,"NA",V,Ie,qe),e[139]=V,e[140]=Le,e[141]=Ie,e[142]=qe,e[143]=I):I=e[143];const ct=c(k<0?0:k);let m;e[144]!==y||e[145]!==ct?(m={x:ct,y,dy:"1em",dx:0},e[144]=y,e[145]=ct,e[146]=m):m=e[146];const te=l?.xAxis?.axis,Ht=l?.yAxis?.labels;let $t;e[147]!==te||e[148]!==Ht?($t={axis:te,label:Ht},e[147]=te,e[148]=Ht,e[149]=$t):$t=e[149];const Wt=s?.xAxis?.axis;let Mt;e[150]!==s?.yAxis?.labels?(Mt=s?.yAxis?.labels||{},e[150]=s?.yAxis?.labels,e[151]=Mt):Mt=e[151];let Vt;e[152]!==Mt?(Vt={textAnchor:"middle",...Mt},e[152]=Mt,e[153]=Vt):Vt=e[153];let qt;e[154]!==Wt||e[155]!==Vt?(qt={axis:Wt,label:Vt},e[154]=Wt,e[155]=Vt,e[156]=qt):qt=e[156];let Ut;e[157]!==y||e[158]!==Se||e[159]!==Ee||e[160]!==I||e[161]!==m||e[162]!==$t||e[163]!==qt?(Ut=o.jsxRuntimeExports.jsx(oi.Axis,{x1:Se,x2:Ee,y1:0,y2:y,label:I,labelPos:m,classNames:$t,styles:qt}),e[157]=y,e[158]=Se,e[159]=Ee,e[160]=I,e[161]=m,e[162]=$t,e[163]=qt,e[164]=Ut):Ut=e[164];const Bt=A/2,zt=y+30,Jt=s?.xAxis?.title,Kt=l?.xAxis?.title;let Gt;e[165]!==Bt||e[166]!==zt||e[167]!==Jt||e[168]!==Kt||e[169]!==g?(Gt=o.jsxRuntimeExports.jsx(si.AxisTitle,{x:Bt,y:zt,style:Jt,className:Kt,text:g}),e[165]=Bt,e[166]=zt,e[167]=Jt,e[168]=Kt,e[169]=g,e[170]=Gt):Gt=e[170],fe=o.jsxRuntimeExports.jsxs("g",{children:[o.jsxRuntimeExports.jsx(hi.XTicksAndGridLines,{values:U.filter(Hi),x:U.filter(Gi).map(t=>c(t)),y1:0,y2:y,styles:at,classNames:ee,suffix:qe,prefix:Ie,labelType:"primary",showGridLines:!0,precision:V}),Ut,Gt]}),e[171]!==q?(Y=q.filter(Ui).map(Fi),e[171]=q,e[172]=Y):Y=e[172],B=ai.AnimatePresence,J=_e.filter(Yi).map((t,He)=>o.jsxRuntimeExports.jsx("path",{d:It.renderCell(_e.findIndex(C=>C.id===t.id)),opacity:0,onMouseEnter:C=>{Te(t),u(C.clientY),re(C.clientX),oe?.(t)},onMouseMove:C=>{Te(t),u(C.clientY),re(C.clientX)},onMouseLeave:()=>{Te(void 0),re(void 0),u(void 0),oe?.(void 0)},onClick:()=>{(N||$)&&(ti.isEqual(X,t)&&Me?(Ze(void 0),N?.(void 0)):(Ze(t),N?.(t)))}},`tesselation_${t.label||He}`)),ge=_e.filter(Xi).map((t,He)=>o.jsxRuntimeExports.jsxs(Ft.motion.g,{variants:{initial:{x:c(t.x),y:d(t.y),opacity:Ne?t.color&&f[R.indexOf(`${t.color}`)]===Ne?1:M:E?E.id===t.id?1:M:W.length!==0?W.indexOf(t.label||"")!==-1?1:M:1},whileInView:{x:c(t.x),y:d(t.y),opacity:Ne?t.color&&f[R.indexOf(`${t.color}`)]===Ne?1:M:E?E.id===t.id?1:M:W.length!==0?W.indexOf(t.label||"")!==-1?1:M:1,transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",exit:{opacity:0,transition:{duration:a.duration}},onMouseEnter:C=>{Te(t),u(C.clientY),re(C.clientX),oe?.(t)},onMouseMove:C=>{Te(t),u(C.clientY),re(C.clientX)},onMouseLeave:()=>{Te(void 0),re(void 0),u(void 0),oe?.(void 0)},onClick:()=>{(N||$)&&(ti.isEqual(X,t)&&Me?(Ze(void 0),N?.(void 0)):(Ze(t),N?.(t)))},children:[o.jsxRuntimeExports.jsx(Ft.motion.circle,{cx:0,cy:0,exit:{r:0,transition:{duration:a.duration}},variants:{initial:{r:0,fill:n.filter(Pi).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray,stroke:n.filter(Ti).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray},whileInView:{r:w?w(t.radius||0):T,fill:n.filter(Ii).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray,stroke:n.filter(Di).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray,transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",style:{fillOpacity:.6}}),We&&!v.checkIfNullOrUndefined(t.label)?o.jsxRuntimeExports.jsx(Ft.motion.text,{style:{...s?.graphObjectValues||{}},className:o.mo("graph-value text-sm",l?.graphObjectValues),y:0,exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{x:w?w(t.radius||0):T,opacity:0,fill:Ve||(n.filter(qi).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray)},whileInView:{x:w?w(t.radius||0):T,opacity:1,fill:Ve||(n.filter(Vi).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray),transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",dy:"0.33em",dx:3,children:t.label}):W.length!==0&&!v.checkIfNullOrUndefined(t.label)&&W.indexOf(t.label)!==-1?o.jsxRuntimeExports.jsx(Ft.motion.text,{style:{...s?.graphObjectValues||{}},className:o.mo("graph-value text-sm",l?.graphObjectValues),y:0,exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{x:w?w(t.radius||0):T,opacity:0,fill:Ve||(n.filter(Mi).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray)},whileInView:{x:w?w(t.radius||0):T,opacity:1,fill:Ve||(n.filter($i).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray),transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",dy:"0.33em",dx:3,children:t.label}):null]},`${t.label||He}`)),K=Rt.map((t,He)=>o.jsxRuntimeExports.jsx(li.RefLineX,{text:t.text,color:t.color,x:c(t.value),y1:0,y2:y,textSide:c(t.value)>A*.75||ze?"left":"right",classNames:t.classNames,styles:t.styles,animate:a,isInView:b},He)),ye=kt.map((t,He)=>o.jsxRuntimeExports.jsx(li.RefLineY,{text:t.text,color:t.color,y:d(t.value),x1:0,x2:A,classNames:t.classNames,styles:t.styles,animate:a,isInView:b},He));const Qt=Je.map((t,He)=>{const C=Zt.getLineEndPoint({x:t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0),y:t.yCoordinate?d(t.yCoordinate)+(t.yOffset||0)-8:0+(t.yOffset||0)-8},{x:t.xCoordinate?c(t.xCoordinate):0,y:t.yCoordinate?d(t.yCoordinate):0},v.checkIfNullOrUndefined(t.connectorRadius)?3.5:t.connectorRadius),fi=t.showConnector?{y1:C.y,x1:C.x,y2:t.yCoordinate?d(t.yCoordinate)+(t.yOffset||0):0+(t.yOffset||0),x2:t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0),cy:t.yCoordinate?d(t.yCoordinate):0,cx:t.xCoordinate?c(t.xCoordinate):0,circleRadius:v.checkIfNullOrUndefined(t.connectorRadius)?3.5:t.connectorRadius,strokeWidth:t.showConnector===!0?2:Math.min(t.showConnector||0,1)}:void 0,mi={y:t.yCoordinate?d(t.yCoordinate)+(t.yOffset||0)-8:0+(t.yOffset||0)-8,x:ze?0:t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0),width:ze?t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0):A+p.right-(t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0)),maxWidth:t.maxWidth,fontWeight:t.fontWeight,align:t.align};return o.jsxRuntimeExports.jsx(Zt.Annotation,{color:t.color,connectorsSettings:fi,labelSettings:mi,text:t.text,classNames:t.classNames,styles:t.styles,animate:a,isInView:b},He)});e[173]!==Qt?(F=o.jsxRuntimeExports.jsx("g",{children:Qt}),e[173]=Qt,e[174]=F):F=e[174],Q=se?o.jsxRuntimeExports.jsx(gi.RegressionLine,{x1:0,x2:A,y1:Nt(0),y2:Nt(A),graphHeight:y,graphWidth:A,className:l?.regLine,style:s?.regLine,color:typeof se=="string"?se:void 0,animate:a,isInView:b}):null,e[8]=a,e[9]=Je,e[10]=l?.graphObjectValues,e[11]=l?.regLine,e[12]=l?.xAxis?.axis,e[13]=l?.xAxis?.gridLines,e[14]=l?.xAxis?.labels,e[15]=l?.xAxis?.title,e[16]=l?.yAxis?.gridLines,e[17]=l?.yAxis?.labels,e[18]=l?.yAxis?.title,e[19]=R,e[20]=f,e[21]=$e,e[22]=q,e[23]=n,e[24]=$,e[25]=M,e[26]=S,e[27]=wt,e[28]=W,e[29]=b,e[30]=Ve,e[31]=P,e[32]=p.bottom,e[33]=p.left,e[34]=p.right,e[35]=p.top,e[36]=ft,e[37]=mt,e[38]=Be,e[39]=k,e[40]=j,e[41]=X,e[42]=E,e[43]=Ke,e[44]=Qe,e[45]=N,e[46]=oe,e[47]=V,e[48]=T,e[49]=Rt,e[50]=kt,e[51]=se,e[52]=Me,e[53]=ze,e[54]=Ne,e[55]=We,e[56]=s?.graphObjectValues,e[57]=s?.regLine,e[58]=s?.xAxis?.axis,e[59]=s?.xAxis?.gridLines,e[60]=s?.xAxis?.labels,e[61]=s?.xAxis?.title,e[62]=s?.yAxis?.gridLines,e[63]=s?.yAxis?.labels,e[64]=s?.yAxis?.title,e[65]=ne,e[66]=g,e[67]=Ie,e[68]=qe,e[69]=H,e[70]=le,e[71]=De,e[72]=B,e[73]=ae,e[74]=ce,e[75]=ue,e[76]=xe,e[77]=fe,e[78]=Y,e[79]=me,e[80]=de,e[81]=pe,e[82]=z,e[83]=he,e[84]=J,e[85]=ge,e[86]=K,e[87]=ye,e[88]=F,e[89]=Q}else B=e[72],ae=e[73],ce=e[74],ue=e[75],xe=e[76],fe=e[77],Y=e[78],me=e[79],de=e[80],pe=e[81],z=e[82],he=e[83],J=e[84],ge=e[85],K=e[86],ye=e[87],F=e[88],Q=e[89];let ve;e[175]!==B||e[176]!==J||e[177]!==ge||e[178]!==K||e[179]!==ye||e[180]!==F||e[181]!==Q?(ve=o.jsxRuntimeExports.jsxs(B,{children:[J,ge,K,ye,F,Q]}),e[175]=B,e[176]=J,e[177]=ge,e[178]=K,e[179]=ye,e[180]=F,e[181]=Q,e[182]=ve):ve=e[182];let be;e[183]!==q?(be=q.filter(Ni).map(Li),e[183]=q,e[184]=be):be=e[184];let Ae;e[185]!==ce||e[186]!==ue||e[187]!==xe||e[188]!==fe||e[189]!==Y||e[190]!==ve||e[191]!==be?(Ae=o.jsxRuntimeExports.jsxs("g",{transform:ce,children:[ue,xe,fe,Y,ve,be]}),e[185]=ce,e[186]=ue,e[187]=xe,e[188]=fe,e[189]=Y,e[190]=ve,e[191]=be,e[192]=Ae):Ae=e[192];let je;e[193]!==ae||e[194]!==me||e[195]!==de||e[196]!==pe||e[197]!==z||e[198]!==he||e[199]!==Ae?(je=o.jsxRuntimeExports.jsx(ae,{width:me,height:de,viewBox:pe,direction:z,ref:he,children:Ae}),e[193]=ae,e[194]=me,e[195]=de,e[196]=pe,e[197]=z,e[198]=he,e[199]=Ae,e[200]=je):je=e[200];let Oe;e[201]!==l?.tooltip||e[202]!==ht||e[203]!==h||e[204]!==E||e[205]!==s?.tooltip||e[206]!==xt?(Oe=E&&xt&&ht&&h?o.jsxRuntimeExports.jsx(pi.Tooltip,{data:E,body:xt,xPos:ht,yPos:h,backgroundStyle:s?.tooltip,className:l?.tooltip}):null,e[201]=l?.tooltip,e[202]=ht,e[203]=h,e[204]=E,e[205]=s?.tooltip,e[206]=xt,e[207]=Oe):Oe=e[207];let Z;e[208]!==l?.modal||e[209]!==$||e[210]!==X?(Z=$&&X!==void 0?o.jsxRuntimeExports.jsx(bi.DetailsModal,{body:$,data:X,setData:Ze,className:l?.modal}):null,e[208]=l?.modal,e[209]=$,e[210]=X,e[211]=Z):Z=e[211];let Pe;return e[212]!==je||e[213]!==Oe||e[214]!==Z?(Pe=o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[je,Oe,Z]}),e[212]=je,e[213]=Oe,e[214]=Z,e[215]=Pe):Pe=e[215],Pe}function Li(i){return i.layer}function Ni(i){return i.position==="after"}function $i(i){return i.color}function Mi(i){return i.color}function Vi(i){return i.color}function qi(i){return i.color}function Di(i){return i.color}function Ii(i){return i.color}function Ti(i){return i.color}function Pi(i){return i.color}function Xi(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Yi(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Fi(i){return i.layer}function Ui(i){return i.position==="before"}function Gi(i){return i!==0}function Hi(i){return i!==0}function Wi(i){return i!==0}function Bi(i){return i!==0}function zi(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Ji(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Ki(i){return!v.checkIfNullOrUndefined(i.radius)}function Qi(i){return!v.checkIfNullOrUndefined(i.radius)}function Zi(i){return i.radius===void 0||i.radius===null}function _i(i,e){return{...i,id:`${e}`}}function en(i){const e=o.compilerRuntimeExports.c(142),{data:n,graphTitle:ne,colors:S,sources:We,graphDescription:f,showLabels:R,height:T,width:g,footNote:H,colorDomain:P,colorLegendTitle:ut,radius:Ct,xAxisTitle:Dt,yAxisTitle:xt,padding:oe,backgroundColor:Rt,leftMargin:kt,rightMargin:wt,topMargin:Ne,bottomMargin:W,tooltip:ft,relativeHeight:mt,onSeriesMouseOver:k,refXValues:Be,refYValues:j,highlightAreaSettings:N,showColorScale:ze,highlightedDataPoints:Je,graphID:$e,maxRadiusValue:se,maxXValue:Me,minXValue:$,maxYValue:Ke,minYValue:Qe,xSuffix:Ve,ySuffix:qe,xPrefix:De,yPrefix:Ie,onSeriesMouseClick:le,graphDownload:s,dataDownload:l,language:a,showNAColor:M,minHeight:V,annotations:q,customHighlightAreaSettings:dt,theme:pt,regressionLine:b,ariaLabel:E,resetSelectionOnDoubleClick:Te,detailsOnClick:X,noOfXTicks:Ze,noOfYTicks:ht,labelColor:re,styles:h,classNames:u,animate:St,dimmedOpacity:Et,precision:gt,customLayers:p,timeline:B}=i,ae=R===void 0?!1:R,ce=Ct===void 0?5:Ct,ue=Dt===void 0?"X Axis":Dt,xe=xt===void 0?"Y Axis":xt,fe=Rt===void 0?!1:Rt,Y=kt===void 0?0:kt,me=wt===void 0?10:wt,de=Ne===void 0?20:Ne,pe=W===void 0?50:W;let z;e[0]!==Be?(z=Be===void 0?[]:Be,e[0]=Be,e[1]=z):z=e[1];const he=z;let J;e[2]!==j?(J=j===void 0?[]:j,e[2]=j,e[3]=J):J=e[3];const ge=J;let K;e[4]!==N?(K=N===void 0?[]:N,e[4]=N,e[5]=K):K=e[5];const ye=K,F=ze===void 0?!0:ze;let Q;e[6]!==Je?(Q=Je===void 0?[]:Je,e[6]=Je,e[7]=Q):Q=e[7];const ve=Q,be=Ve===void 0?"":Ve,Ae=qe===void 0?"":qe,je=De===void 0?"":De,Oe=Ie===void 0?"":Ie,Z=s===void 0?!1:s,Pe=l===void 0?!1:l,_=a===void 0?"en":a,A=M===void 0?!0:M,y=V===void 0?0:V;let w;e[8]!==q?(w=q===void 0?[]:q,e[8]=q,e[9]=w):w=e[9];const _e=w;let c;e[10]!==dt?(c=dt===void 0?[]:dt,e[10]=dt,e[11]=c):c=e[11];const d=c,U=pt===void 0?"light":pt,Lt=b===void 0?!1:b,It=Te===void 0?!0:Te,Tt=Ze===void 0?5:Ze,Nt=ht===void 0?5:ht,Xe=St===void 0?!1:St,yt=Et===void 0?.3:Et,vt=gt===void 0?2:gt;let Ye;e[12]!==p?(Ye=p===void 0?[]:p,e[12]=p,e[13]=Ye):Ye=e[13];const bt=Ye;let et;e[14]!==B?(et=B===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:B,e[14]=B,e[15]=et):et=e[15];const r=et,[tt,Pt]=L.useState(0),[it,Xt]=L.useState(0),[O,Yt]=L.useState(r.autoplay);let G;if(e[16]!==n||e[17]!==r.dateFormat){let m;e[19]!==r.dateFormat?(m=te=>_t.parse(`${te.date}`,r.dateFormat||"yyyy",new Date).getTime(),e[19]=r.dateFormat,e[20]=m):m=e[20],G=[...new Set(n.filter(Ln).map(m))],G.sort(En),e[16]=n,e[17]=r.dateFormat,e[18]=G}else G=e[18];const x=G,[D,Ce]=L.useState(r.autoplay?0:x.length-1),[At,nt]=L.useState(void 0),Re=L.useRef(null),Fe=L.useRef(null);let Ue,ot;e[21]===Symbol.for("react.memo_cache_sentinel")?(Ue=()=>{const m=new ResizeObserver(te=>{Pt(te[0].target.clientWidth||620),Xt(te[0].target.clientHeight||480)});return Re.current&&m.observe(Re.current),()=>m.disconnect()},ot=[],e[21]=Ue,e[22]=ot):(Ue=e[21],ot=e[22]),L.useEffect(Ue,ot);let st,lt;e[23]!==O||e[24]!==r.speed||e[25]!==x?(st=()=>{const m=setInterval(()=>{Ce(te=>te<x.length-1?te+1:0)},(r.speed||2)*1e3);return O||clearInterval(m),()=>clearInterval(m)},lt=[x,O,r.speed],e[23]=O,e[24]=r.speed,e[25]=x,e[26]=st,e[27]=lt):(st=e[26],lt=e[27]),L.useEffect(st,lt);const jt=r.dateFormat||"yyyy";let Ge;e[28]!==D||e[29]!==jt||e[30]!==r.showOnlyActiveDate||e[31]!==x?(Ge=ei.getSliderMarks(x,D,r.showOnlyActiveDate,jt),e[28]=D,e[29]=jt,e[30]=r.showOnlyActiveDate,e[31]=x,e[32]=Ge):Ge=e[32];const rt=Ge,Ot=u?.graphContainer,at=h?.graphContainer;let ke;e[33]!==u?.description||e[34]!==u?.title||e[35]!==n||e[36]!==Pe||e[37]!==f||e[38]!==Z||e[39]!==ne||e[40]!==h?.description||e[41]!==h?.title||e[42]!==g?(ke=ne||f||Z||Pe?o.jsxRuntimeExports.jsx(Ri.GraphHeader,{styles:{title:h?.title,description:h?.description},classNames:{title:u?.title,description:u?.description},graphTitle:ne,graphDescription:f,width:g,graphDownload:Z?Fe:void 0,dataDownload:Pe?n.map(Sn).filter(wn).length>0?n.map(kn).filter(Rn):n.filter(Cn):null}):null,e[33]=u?.description,e[34]=u?.title,e[35]=n,e[36]=Pe,e[37]=f,e[38]=Z,e[39]=ne,e[40]=h?.description,e[41]=h?.title,e[42]=g,e[43]=ke):ke=e[43];let we;e[44]!==D||e[45]!==rt||e[46]!==O||e[47]!==r.enabled||e[48]!==x?(we=r.enabled&&x.length>0&&rt?o.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[o.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Yt(!O)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":O?"Click to pause animation":"Click to play animation",children:O?o.jsxRuntimeExports.jsx(ci.Pause,{}):o.jsxRuntimeExports.jsx(ci.Play,{})}),o.jsxRuntimeExports.jsx(ei.Nr,{min:x[0],max:x[x.length-1],marks:rt,step:null,defaultValue:x[x.length-1],value:x[D],onChangeComplete:m=>{Ce(x.indexOf(m))},onChange:m=>{Ce(x.indexOf(m))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[44]=D,e[45]=rt,e[46]=O,e[47]=r.enabled,e[48]=x,e[49]=we):we=e[49];let ee;e[50]!==u?.colorLegend||e[51]!==P||e[52]!==ut||e[53]!==S||e[54]!==n||e[55]!==F||e[56]!==A||e[57]!==U||e[58]!==g?(ee=F&&n.filter(On).length!==0&&n.length>0?o.jsxRuntimeExports.jsx(ki.ColorLegendWithMouseOver,{width:g,colorLegendTitle:ut,colors:S||ie.Colors[U].categoricalColors.colors,colorDomain:P||ui.uniqBy(n,"color",!0),setSelectedColor:nt,showNAColor:A,className:u?.colorLegend}):null,e[50]=u?.colorLegend,e[51]=P,e[52]=ut,e[53]=S,e[54]=n,e[55]=F,e[56]=A,e[57]=U,e[58]=g,e[59]=ee):ee=e[59];let Se;e[60]!==n.length?(Se=n.length===0&&o.jsxRuntimeExports.jsx(wi.EmptyState,{}),e[60]=n.length,e[61]=Se):Se=e[61];let Ee;e[62]!==Xe||e[63]!==_e||e[64]!==pe||e[65]!==u||e[66]!==P||e[67]!==S||e[68]!==d||e[69]!==bt||e[70]!==n||e[71]!==X||e[72]!==yt||e[73]!==ye||e[74]!==ve||e[75]!==D||e[76]!==re||e[77]!==_||e[78]!==Y||e[79]!==se||e[80]!==Me||e[81]!==Ke||e[82]!==$||e[83]!==Qe||e[84]!==Tt||e[85]!==Nt||e[86]!==le||e[87]!==k||e[88]!==vt||e[89]!==ce||e[90]!==he||e[91]!==ge||e[92]!==Lt||e[93]!==It||e[94]!==me||e[95]!==At||e[96]!==ae||e[97]!==h||e[98]!==it||e[99]!==tt||e[100]!==U||e[101]!==r.dateFormat||e[102]!==r.enabled||e[103]!==ft||e[104]!==de||e[105]!==x||e[106]!==ue||e[107]!==je||e[108]!==be||e[109]!==xe||e[110]!==Oe||e[111]!==Ae?(Ee=tt&&it&&n.length>0?o.jsxRuntimeExports.jsx(Ei,{data:Si.ensureCompleteDataForScatterPlot(n,r.dateFormat||"yyyy").filter(m=>r.enabled?m.date===_t.format(new Date(x[D]),r.dateFormat||"yyyy"):m),width:tt,height:it,colorDomain:n.filter(jn).length===0?[]:P||ui.uniqBy(n,"color",!0),colors:n.filter(An).length===0?S?[S]:[ie.Colors.primaryColors["blue-600"]]:S||ie.Colors[U].categoricalColors.colors,xAxisTitle:ue,yAxisTitle:xe,refXValues:he,refYValues:ge,showLabels:ae,radius:ce,leftMargin:Y,rightMargin:me,topMargin:de,bottomMargin:pe,tooltip:ft,onSeriesMouseOver:k,highlightAreaSettings:ye,highlightedDataPoints:n.filter(bn).length===0?[]:ve,selectedColor:At,maxRadiusValue:v.checkIfNullOrUndefined(se)?Math.max(...n.map(vn).filter(yn)):se,maxXValue:v.checkIfNullOrUndefined(Me)?Math.max(...n.map(gn).filter(hn))>0?Math.max(...n.map(pn).filter(dn)):0:Me,minXValue:v.checkIfNullOrUndefined($)?Math.min(...n.map(mn).filter(fn))>0?0:Math.min(...n.map(xn).filter(un)):$,maxYValue:v.checkIfNullOrUndefined(Ke)?Math.max(...n.map(cn).filter(an))>0?Math.max(...n.map(rn).filter(ln)):0:Ke,minYValue:v.checkIfNullOrUndefined(Qe)?Math.min(...n.map(sn).filter(on))>0?0:Math.min(...n.map(nn).filter(tn)):Qe,onSeriesMouseClick:le,rtl:_==="he"||_==="ar",annotations:_e,customHighlightAreaSettings:d,regressionLine:Lt,resetSelectionOnDoubleClick:It,detailsOnClick:X,noOfXTicks:Tt,noOfYTicks:Nt,labelColor:re,xSuffix:be,ySuffix:Ae,xPrefix:je,yPrefix:Oe,styles:h,classNames:u,animate:Xe===!0?{duration:.5,once:!0,amount:.5}:Xe||{duration:0,once:!0,amount:0},dimmedOpacity:yt,precision:vt,customLayers:bt}):null,e[62]=Xe,e[63]=_e,e[64]=pe,e[65]=u,e[66]=P,e[67]=S,e[68]=d,e[69]=bt,e[70]=n,e[71]=X,e[72]=yt,e[73]=ye,e[74]=ve,e[75]=D,e[76]=re,e[77]=_,e[78]=Y,e[79]=se,e[80]=Me,e[81]=Ke,e[82]=$,e[83]=Qe,e[84]=Tt,e[85]=Nt,e[86]=le,e[87]=k,e[88]=vt,e[89]=ce,e[90]=he,e[91]=ge,e[92]=Lt,e[93]=It,e[94]=me,e[95]=At,e[96]=ae,e[97]=h,e[98]=it,e[99]=tt,e[100]=U,e[101]=r.dateFormat,e[102]=r.enabled,e[103]=ft,e[104]=de,e[105]=x,e[106]=ue,e[107]=je,e[108]=be,e[109]=xe,e[110]=Oe,e[111]=Ae,e[112]=Ee):Ee=e[112];let Le;e[113]!==Se||e[114]!==Ee?(Le=o.jsxRuntimeExports.jsxs(xi.GraphArea,{ref:Re,children:[Se,Ee]}),e[113]=Se,e[114]=Ee,e[115]=Le):Le=e[115];let I;e[116]!==u?.footnote||e[117]!==u?.source||e[118]!==H||e[119]!==We||e[120]!==h?.footnote||e[121]!==h?.source||e[122]!==g?(I=We||H?o.jsxRuntimeExports.jsx(Ci.GraphFooter,{styles:{footnote:h?.footnote,source:h?.source},classNames:{footnote:u?.footnote,source:u?.source},sources:We,footNote:H,width:g}):null,e[116]=u?.footnote,e[117]=u?.source,e[118]=H,e[119]=We,e[120]=h?.footnote,e[121]=h?.source,e[122]=g,e[123]=I):I=e[123];let ct;return e[124]!==E||e[125]!==fe||e[126]!==$e||e[127]!==T||e[128]!==_||e[129]!==y||e[130]!==oe||e[131]!==mt||e[132]!==Ot||e[133]!==at||e[134]!==ke||e[135]!==we||e[136]!==ee||e[137]!==Le||e[138]!==I||e[139]!==U||e[140]!==g?(ct=o.jsxRuntimeExports.jsxs(xi.GraphContainer,{className:Ot,style:at,id:$e,ref:Fe,"aria-label":E,backgroundColor:fe,theme:U,language:_,minHeight:y,width:g,height:T,relativeHeight:mt,padding:oe,children:[ke,we,ee,Le,I]}),e[124]=E,e[125]=fe,e[126]=$e,e[127]=T,e[128]=_,e[129]=y,e[130]=oe,e[131]=mt,e[132]=Ot,e[133]=at,e[134]=ke,e[135]=we,e[136]=ee,e[137]=Le,e[138]=I,e[139]=U,e[140]=g,e[141]=ct):ct=e[141],ct}function tn(i){return i!=null}function nn(i){return i.y}function on(i){return i!=null}function sn(i){return i.y}function ln(i){return i!=null}function rn(i){return i.y}function an(i){return i!=null}function cn(i){return i.y}function un(i){return i!=null}function xn(i){return i.x}function fn(i){return i!=null}function mn(i){return i.x}function dn(i){return i!=null}function pn(i){return i.x}function hn(i){return i!=null}function gn(i){return i.x}function yn(i){return i!=null}function vn(i){return i.radius}function bn(i){return i.label}function An(i){return i.color}function jn(i){return i.color}function On(i){return i.color}function Cn(i){return i!==void 0}function Rn(i){return i!==void 0}function kn(i){return i.data}function wn(i){return i!==void 0}function Sn(i){return i.data}function En(i,e){return i-e}function Ln(i){return i.date}exports.ScatterPlot=en;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),_t=require("./parse-xYI9yrvL.cjs"),L=require("react"),ei=require("./getSliderMarks-CIuSoedo.cjs"),ti=require("./index-DQA8q5sC.cjs"),di=require("./index-Cno4Q0YE.cjs"),ii=require("./simple-statistics-xm8c0LQQ.cjs"),pi=require("./Tooltip-BLa2EfMs.cjs"),v=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ie=require("./Colors.cjs"),ni=require("./numberFormattingFunction-02t-wJta.cjs"),Zt=require("./customArea-B1LWQBmM.cjs"),oi=require("./Axis-Jt_tmhxS.cjs"),si=require("./AxisTitle-DV4n0RxE.cjs"),hi=require("./XTicksAndGridLines-CekrPykD.cjs"),li=require("./ReferenceLine-M9aP3dj-.cjs"),gi=require("./RegressionLine-Ci-Dh0w0.cjs"),yi=require("./YTicksAndGridLines-UzVC5eBM.cjs"),vi=require("./index-D69M6klB.cjs"),bi=require("./DetailsModal-DHttOA80.cjs"),Ai=require("./pow-BnyPO-NX.cjs"),ri=require("./linear-CgUCbw9F.cjs"),ji=require("./delaunay-rcy0HhZi.cjs"),Ft=require("./proxy-C4-uo6nS.cjs"),Oi=require("./use-in-view-C3o_ntMv.cjs"),ai=require("./index-CoobIWNj.cjs"),Ci=require("./GraphFooter.cjs"),Ri=require("./GraphHeader.cjs"),ki=require("./ColorLegendWithMouseOver.cjs"),wi=require("./EmptyState-CGeBqbmR.cjs"),ci=require("./index-C6er0ety.cjs"),Si=require("./ensureCompleteData-D9bQTiVS.cjs"),ui=require("./uniqBy-O05lp2S5.cjs"),xi=require("./GraphContainer-B1EDxJ0S.cjs");function Ei(i){const e=o.compilerRuntimeExports.c(216),{data:n,width:ne,height:S,showLabels:We,colors:f,colorDomain:R,radius:T,xAxisTitle:g,yAxisTitle:H,leftMargin:P,rightMargin:ut,topMargin:Ct,bottomMargin:Dt,tooltip:xt,onSeriesMouseOver:oe,refXValues:Rt,refYValues:kt,highlightAreaSettings:wt,selectedColor:Ne,highlightedDataPoints:W,maxRadiusValue:ft,maxXValue:mt,minXValue:k,maxYValue:Be,minYValue:j,onSeriesMouseClick:N,rtl:ze,annotations:Je,customHighlightAreaSettings:$e,regressionLine:se,resetSelectionOnDoubleClick:Me,detailsOnClick:$,noOfXTicks:Ke,noOfYTicks:Qe,labelColor:Ve,xSuffix:qe,ySuffix:De,xPrefix:Ie,yPrefix:le,styles:s,classNames:l,animate:a,dimmedOpacity:M,precision:V,customLayers:q}=i,dt=L.useRef(null);let pt;e[0]!==a.amount||e[1]!==a.once?(pt={once:a.once,amount:a.amount},e[0]=a.amount,e[1]=a.once,e[2]=pt):pt=e[2];const b=Oi.useInView(dt,pt),[E,Te]=L.useState(void 0),[X,Ze]=L.useState(void 0),[ht,re]=L.useState(void 0),[h,u]=L.useState(void 0),St=g?Dt+50:Dt,Et=H?P+30:P;let gt;e[3]!==ut||e[4]!==St||e[5]!==Et||e[6]!==Ct?(gt={top:Ct,bottom:St,left:Et,right:ut},e[3]=ut,e[4]=St,e[5]=Et,e[6]=Ct,e[7]=gt):gt=e[7];const p=gt;let B,ae,ce,ue,xe,fe,Y,me,de,pe,z,he,J,ge,K,ye,F,Q;if(e[8]!==a||e[9]!==Je||e[10]!==l?.graphObjectValues||e[11]!==l?.regLine||e[12]!==l?.xAxis?.axis||e[13]!==l?.xAxis?.gridLines||e[14]!==l?.xAxis?.labels||e[15]!==l?.xAxis?.title||e[16]!==l?.yAxis?.gridLines||e[17]!==l?.yAxis?.labels||e[18]!==l?.yAxis?.title||e[19]!==R||e[20]!==f||e[21]!==$e||e[22]!==q||e[23]!==n||e[24]!==$||e[25]!==M||e[26]!==S||e[27]!==wt||e[28]!==W||e[29]!==b||e[30]!==Ve||e[31]!==P||e[32]!==p.bottom||e[33]!==p.left||e[34]!==p.right||e[35]!==p.top||e[36]!==ft||e[37]!==mt||e[38]!==Be||e[39]!==k||e[40]!==j||e[41]!==X||e[42]!==E||e[43]!==Ke||e[44]!==Qe||e[45]!==N||e[46]!==oe||e[47]!==V||e[48]!==T||e[49]!==Rt||e[50]!==kt||e[51]!==se||e[52]!==Me||e[53]!==ze||e[54]!==Ne||e[55]!==We||e[56]!==s?.graphObjectValues||e[57]!==s?.regLine||e[58]!==s?.xAxis?.axis||e[59]!==s?.xAxis?.gridLines||e[60]!==s?.xAxis?.labels||e[61]!==s?.xAxis?.title||e[62]!==s?.yAxis?.gridLines||e[63]!==s?.yAxis?.labels||e[64]!==s?.yAxis?.title||e[65]!==ne||e[66]!==g||e[67]!==Ie||e[68]!==qe||e[69]!==H||e[70]!==le||e[71]!==De){const _=n.map(_i),A=ne-p.left-p.right,y=S-p.top-p.bottom,w=n.filter(Zi).length!==n.length?Ai.sqrt().domain([0,ft]).range([.25,T]).nice():void 0,_e=_.filter(Qi).length===0?_:di.orderBy(_.filter(Ki),"radius","desc"),c=ri.linear().domain([k,mt]).range([0,A]).nice(),d=ri.linear().domain([j,Be]).range([y,0]).nice(),U=c.ticks(Ke),Lt=d.ticks(Qe),It=ji.Delaunay.from(_e.filter(Ji),t=>c(t.x),t=>d(t.y)).voronoi([0,0,A<0?0:A,y<0?0:y]),Tt=ii.linearRegression(n.filter(zi).map(t=>[c(t.x),d(t.y)])),Nt=ii.linearRegressionLine(Tt);ae=Ft.motion.svg,me=`${ne}px`,de=`${S}px`,pe=`0 0 ${ne} ${S}`,z="ltr",he=dt,ce=`translate(${p.left},${p.top})`;let Xe;e[90]!==a||e[91]!==$e||e[92]!==b||e[93]!==c||e[94]!==d?(Xe=o.jsxRuntimeExports.jsx(Zt.CustomArea,{areaSettings:$e,scaleX:c,scaleY:d,animate:a,isInView:b},"custom-area"),e[90]=a,e[91]=$e,e[92]=b,e[93]=c,e[94]=d,e[95]=Xe):Xe=e[95],ue=o.jsxRuntimeExports.jsxs(ai.AnimatePresence,{children:[o.jsxRuntimeExports.jsx(vi.HighlightAreaForScatterPlot,{areaSettings:wt,width:A,height:y,scaleX:c,scaleY:d,animate:a,isInView:b},"highlight-area"),Xe]});const yt=s?.yAxis?.gridLines,vt=s?.yAxis?.labels;let Ye;e[96]!==yt||e[97]!==vt?(Ye={gridLines:yt,labels:vt},e[96]=yt,e[97]=vt,e[98]=Ye):Ye=e[98];const bt=l?.yAxis?.gridLines,et=l?.yAxis?.labels;let r;e[99]!==bt||e[100]!==et?(r={gridLines:bt,labels:et},e[99]=bt,e[100]=et,e[101]=r):r=e[101];const tt=d(j<0?0:j),Pt=d(j<0?0:j),it=A+p.right,Xt=j<0?0:j;let O;e[102]!==V||e[103]!==Xt||e[104]!==le||e[105]!==De?(O=ni.numberFormattingFunction(Xt,"NA",V,le,De),e[102]=V,e[103]=Xt,e[104]=le,e[105]=De,e[106]=O):O=e[106];const Yt=d(j<0?0:j);let G;e[107]!==Yt?(G={x:0,y:Yt,dy:"0.33em",dx:-4},e[107]=Yt,e[108]=G):G=e[108];const x=l?.xAxis?.axis,D=l?.yAxis?.labels;let Ce;e[109]!==x||e[110]!==D?(Ce={axis:x,label:D},e[109]=x,e[110]=D,e[111]=Ce):Ce=e[111];const At=s?.xAxis?.axis;let nt;e[112]!==s?.yAxis?.labels?(nt=s?.yAxis?.labels||{},e[112]=s?.yAxis?.labels,e[113]=nt):nt=e[113];let Re;e[114]!==nt?(Re={textAnchor:"end",...nt},e[114]=nt,e[115]=Re):Re=e[115];let Fe;e[116]!==At||e[117]!==Re?(Fe={axis:At,label:Re},e[116]=At,e[117]=Re,e[118]=Fe):Fe=e[118];let Ue;e[119]!==tt||e[120]!==Pt||e[121]!==it||e[122]!==O||e[123]!==G||e[124]!==Ce||e[125]!==Fe?(Ue=o.jsxRuntimeExports.jsx(oi.Axis,{y1:tt,y2:Pt,x1:0,x2:it,label:O,labelPos:G,classNames:Ce,styles:Fe}),e[119]=tt,e[120]=Pt,e[121]=it,e[122]=O,e[123]=G,e[124]=Ce,e[125]=Fe,e[126]=Ue):Ue=e[126];const ot=0-P-15,st=y/2,lt=s?.yAxis?.title,jt=l?.yAxis?.title;let Ge;e[127]!==ot||e[128]!==st||e[129]!==lt||e[130]!==jt||e[131]!==H?(Ge=o.jsxRuntimeExports.jsx(si.AxisTitle,{x:ot,y:st,style:lt,className:jt,text:H,rotate90:!0}),e[127]=ot,e[128]=st,e[129]=lt,e[130]=jt,e[131]=H,e[132]=Ge):Ge=e[132],xe=o.jsxRuntimeExports.jsxs("g",{children:[o.jsxRuntimeExports.jsx(yi.YTicksAndGridLines,{values:Lt.filter(Bi),y:Lt.filter(Wi).map(t=>d(t)),x1:0,x2:A+p.right,styles:Ye,classNames:r,suffix:De,prefix:le,labelType:"secondary",showGridLines:!0,labelPos:"side",precision:V}),Ue,Ge]});const rt=s?.xAxis?.gridLines,Ot=s?.xAxis?.labels;let at;e[133]!==rt||e[134]!==Ot?(at={gridLines:rt,labels:Ot},e[133]=rt,e[134]=Ot,e[135]=at):at=e[135];const ke=l?.xAxis?.gridLines,we=l?.xAxis?.labels;let ee;e[136]!==ke||e[137]!==we?(ee={gridLines:ke,labels:we},e[136]=ke,e[137]=we,e[138]=ee):ee=e[138];const Se=c(k<0?0:k),Ee=c(k<0?0:k),Le=k<0?0:k;let I;e[139]!==V||e[140]!==Le||e[141]!==Ie||e[142]!==qe?(I=ni.numberFormattingFunction(Le,"NA",V,Ie,qe),e[139]=V,e[140]=Le,e[141]=Ie,e[142]=qe,e[143]=I):I=e[143];const ct=c(k<0?0:k);let m;e[144]!==y||e[145]!==ct?(m={x:ct,y,dy:"1em",dx:0},e[144]=y,e[145]=ct,e[146]=m):m=e[146];const te=l?.xAxis?.axis,Ht=l?.yAxis?.labels;let $t;e[147]!==te||e[148]!==Ht?($t={axis:te,label:Ht},e[147]=te,e[148]=Ht,e[149]=$t):$t=e[149];const Wt=s?.xAxis?.axis;let Mt;e[150]!==s?.yAxis?.labels?(Mt=s?.yAxis?.labels||{},e[150]=s?.yAxis?.labels,e[151]=Mt):Mt=e[151];let Vt;e[152]!==Mt?(Vt={textAnchor:"middle",...Mt},e[152]=Mt,e[153]=Vt):Vt=e[153];let qt;e[154]!==Wt||e[155]!==Vt?(qt={axis:Wt,label:Vt},e[154]=Wt,e[155]=Vt,e[156]=qt):qt=e[156];let Ut;e[157]!==y||e[158]!==Se||e[159]!==Ee||e[160]!==I||e[161]!==m||e[162]!==$t||e[163]!==qt?(Ut=o.jsxRuntimeExports.jsx(oi.Axis,{x1:Se,x2:Ee,y1:0,y2:y,label:I,labelPos:m,classNames:$t,styles:qt}),e[157]=y,e[158]=Se,e[159]=Ee,e[160]=I,e[161]=m,e[162]=$t,e[163]=qt,e[164]=Ut):Ut=e[164];const Bt=A/2,zt=y+30,Jt=s?.xAxis?.title,Kt=l?.xAxis?.title;let Gt;e[165]!==Bt||e[166]!==zt||e[167]!==Jt||e[168]!==Kt||e[169]!==g?(Gt=o.jsxRuntimeExports.jsx(si.AxisTitle,{x:Bt,y:zt,style:Jt,className:Kt,text:g}),e[165]=Bt,e[166]=zt,e[167]=Jt,e[168]=Kt,e[169]=g,e[170]=Gt):Gt=e[170],fe=o.jsxRuntimeExports.jsxs("g",{children:[o.jsxRuntimeExports.jsx(hi.XTicksAndGridLines,{values:U.filter(Hi),x:U.filter(Gi).map(t=>c(t)),y1:0,y2:y,styles:at,classNames:ee,suffix:qe,prefix:Ie,labelType:"primary",showGridLines:!0,precision:V}),Ut,Gt]}),e[171]!==q?(Y=q.filter(Ui).map(Fi),e[171]=q,e[172]=Y):Y=e[172],B=ai.AnimatePresence,J=_e.filter(Yi).map((t,He)=>o.jsxRuntimeExports.jsx("path",{d:It.renderCell(_e.findIndex(C=>C.id===t.id)),opacity:0,onMouseEnter:C=>{Te(t),u(C.clientY),re(C.clientX),oe?.(t)},onMouseMove:C=>{Te(t),u(C.clientY),re(C.clientX)},onMouseLeave:()=>{Te(void 0),re(void 0),u(void 0),oe?.(void 0)},onClick:()=>{(N||$)&&(ti.isEqual(X,t)&&Me?(Ze(void 0),N?.(void 0)):(Ze(t),N?.(t)))}},`tesselation_${t.label||He}`)),ge=_e.filter(Xi).map((t,He)=>o.jsxRuntimeExports.jsxs(Ft.motion.g,{variants:{initial:{x:c(t.x),y:d(t.y),opacity:Ne?t.color&&f[R.indexOf(`${t.color}`)]===Ne?1:M:E?E.id===t.id?1:M:W.length!==0?W.indexOf(t.label||"")!==-1?1:M:1},whileInView:{x:c(t.x),y:d(t.y),opacity:Ne?t.color&&f[R.indexOf(`${t.color}`)]===Ne?1:M:E?E.id===t.id?1:M:W.length!==0?W.indexOf(t.label||"")!==-1?1:M:1,transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",exit:{opacity:0,transition:{duration:a.duration}},onMouseEnter:C=>{Te(t),u(C.clientY),re(C.clientX),oe?.(t)},onMouseMove:C=>{Te(t),u(C.clientY),re(C.clientX)},onMouseLeave:()=>{Te(void 0),re(void 0),u(void 0),oe?.(void 0)},onClick:()=>{(N||$)&&(ti.isEqual(X,t)&&Me?(Ze(void 0),N?.(void 0)):(Ze(t),N?.(t)))},children:[o.jsxRuntimeExports.jsx(Ft.motion.circle,{cx:0,cy:0,exit:{r:0,transition:{duration:a.duration}},variants:{initial:{r:0,fill:n.filter(Pi).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray,stroke:n.filter(Ti).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray},whileInView:{r:w?w(t.radius||0):T,fill:n.filter(Ii).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray,stroke:n.filter(Di).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray,transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",style:{fillOpacity:.6}}),We&&!v.checkIfNullOrUndefined(t.label)?o.jsxRuntimeExports.jsx(Ft.motion.text,{style:{...s?.graphObjectValues||{}},className:o.mo("graph-value text-sm",l?.graphObjectValues),y:0,exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{x:w?w(t.radius||0):T,opacity:0,fill:Ve||(n.filter(qi).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray)},whileInView:{x:w?w(t.radius||0):T,opacity:1,fill:Ve||(n.filter(Vi).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray),transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",dy:"0.33em",dx:3,children:t.label}):W.length!==0&&!v.checkIfNullOrUndefined(t.label)&&W.indexOf(t.label)!==-1?o.jsxRuntimeExports.jsx(Ft.motion.text,{style:{...s?.graphObjectValues||{}},className:o.mo("graph-value text-sm",l?.graphObjectValues),y:0,exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{x:w?w(t.radius||0):T,opacity:0,fill:Ve||(n.filter(Mi).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray)},whileInView:{x:w?w(t.radius||0):T,opacity:1,fill:Ve||(n.filter($i).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray),transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",dy:"0.33em",dx:3,children:t.label}):null]},`${t.label||He}`)),K=Rt.map((t,He)=>o.jsxRuntimeExports.jsx(li.RefLineX,{text:t.text,color:t.color,x:c(t.value),y1:0,y2:y,textSide:c(t.value)>A*.75||ze?"left":"right",classNames:t.classNames,styles:t.styles,animate:a,isInView:b},He)),ye=kt.map((t,He)=>o.jsxRuntimeExports.jsx(li.RefLineY,{text:t.text,color:t.color,y:d(t.value),x1:0,x2:A,classNames:t.classNames,styles:t.styles,animate:a,isInView:b},He));const Qt=Je.map((t,He)=>{const C=Zt.getLineEndPoint({x:t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0),y:t.yCoordinate?d(t.yCoordinate)+(t.yOffset||0)-8:0+(t.yOffset||0)-8},{x:t.xCoordinate?c(t.xCoordinate):0,y:t.yCoordinate?d(t.yCoordinate):0},v.checkIfNullOrUndefined(t.connectorRadius)?3.5:t.connectorRadius),fi=t.showConnector?{y1:C.y,x1:C.x,y2:t.yCoordinate?d(t.yCoordinate)+(t.yOffset||0):0+(t.yOffset||0),x2:t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0),cy:t.yCoordinate?d(t.yCoordinate):0,cx:t.xCoordinate?c(t.xCoordinate):0,circleRadius:v.checkIfNullOrUndefined(t.connectorRadius)?3.5:t.connectorRadius,strokeWidth:t.showConnector===!0?2:Math.min(t.showConnector||0,1)}:void 0,mi={y:t.yCoordinate?d(t.yCoordinate)+(t.yOffset||0)-8:0+(t.yOffset||0)-8,x:ze?0:t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0),width:ze?t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0):A+p.right-(t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0)),maxWidth:t.maxWidth,fontWeight:t.fontWeight,align:t.align};return o.jsxRuntimeExports.jsx(Zt.Annotation,{color:t.color,connectorsSettings:fi,labelSettings:mi,text:t.text,classNames:t.classNames,styles:t.styles,animate:a,isInView:b},He)});e[173]!==Qt?(F=o.jsxRuntimeExports.jsx("g",{children:Qt}),e[173]=Qt,e[174]=F):F=e[174],Q=se?o.jsxRuntimeExports.jsx(gi.RegressionLine,{x1:0,x2:A,y1:Nt(0),y2:Nt(A),graphHeight:y,graphWidth:A,className:l?.regLine,style:s?.regLine,color:typeof se=="string"?se:void 0,animate:a,isInView:b}):null,e[8]=a,e[9]=Je,e[10]=l?.graphObjectValues,e[11]=l?.regLine,e[12]=l?.xAxis?.axis,e[13]=l?.xAxis?.gridLines,e[14]=l?.xAxis?.labels,e[15]=l?.xAxis?.title,e[16]=l?.yAxis?.gridLines,e[17]=l?.yAxis?.labels,e[18]=l?.yAxis?.title,e[19]=R,e[20]=f,e[21]=$e,e[22]=q,e[23]=n,e[24]=$,e[25]=M,e[26]=S,e[27]=wt,e[28]=W,e[29]=b,e[30]=Ve,e[31]=P,e[32]=p.bottom,e[33]=p.left,e[34]=p.right,e[35]=p.top,e[36]=ft,e[37]=mt,e[38]=Be,e[39]=k,e[40]=j,e[41]=X,e[42]=E,e[43]=Ke,e[44]=Qe,e[45]=N,e[46]=oe,e[47]=V,e[48]=T,e[49]=Rt,e[50]=kt,e[51]=se,e[52]=Me,e[53]=ze,e[54]=Ne,e[55]=We,e[56]=s?.graphObjectValues,e[57]=s?.regLine,e[58]=s?.xAxis?.axis,e[59]=s?.xAxis?.gridLines,e[60]=s?.xAxis?.labels,e[61]=s?.xAxis?.title,e[62]=s?.yAxis?.gridLines,e[63]=s?.yAxis?.labels,e[64]=s?.yAxis?.title,e[65]=ne,e[66]=g,e[67]=Ie,e[68]=qe,e[69]=H,e[70]=le,e[71]=De,e[72]=B,e[73]=ae,e[74]=ce,e[75]=ue,e[76]=xe,e[77]=fe,e[78]=Y,e[79]=me,e[80]=de,e[81]=pe,e[82]=z,e[83]=he,e[84]=J,e[85]=ge,e[86]=K,e[87]=ye,e[88]=F,e[89]=Q}else B=e[72],ae=e[73],ce=e[74],ue=e[75],xe=e[76],fe=e[77],Y=e[78],me=e[79],de=e[80],pe=e[81],z=e[82],he=e[83],J=e[84],ge=e[85],K=e[86],ye=e[87],F=e[88],Q=e[89];let ve;e[175]!==B||e[176]!==J||e[177]!==ge||e[178]!==K||e[179]!==ye||e[180]!==F||e[181]!==Q?(ve=o.jsxRuntimeExports.jsxs(B,{children:[J,ge,K,ye,F,Q]}),e[175]=B,e[176]=J,e[177]=ge,e[178]=K,e[179]=ye,e[180]=F,e[181]=Q,e[182]=ve):ve=e[182];let be;e[183]!==q?(be=q.filter(Ni).map(Li),e[183]=q,e[184]=be):be=e[184];let Ae;e[185]!==ce||e[186]!==ue||e[187]!==xe||e[188]!==fe||e[189]!==Y||e[190]!==ve||e[191]!==be?(Ae=o.jsxRuntimeExports.jsxs("g",{transform:ce,children:[ue,xe,fe,Y,ve,be]}),e[185]=ce,e[186]=ue,e[187]=xe,e[188]=fe,e[189]=Y,e[190]=ve,e[191]=be,e[192]=Ae):Ae=e[192];let je;e[193]!==ae||e[194]!==me||e[195]!==de||e[196]!==pe||e[197]!==z||e[198]!==he||e[199]!==Ae?(je=o.jsxRuntimeExports.jsx(ae,{width:me,height:de,viewBox:pe,direction:z,ref:he,children:Ae}),e[193]=ae,e[194]=me,e[195]=de,e[196]=pe,e[197]=z,e[198]=he,e[199]=Ae,e[200]=je):je=e[200];let Oe;e[201]!==l?.tooltip||e[202]!==ht||e[203]!==h||e[204]!==E||e[205]!==s?.tooltip||e[206]!==xt?(Oe=E&&xt&&ht&&h?o.jsxRuntimeExports.jsx(pi.Tooltip,{data:E,body:xt,xPos:ht,yPos:h,backgroundStyle:s?.tooltip,className:l?.tooltip}):null,e[201]=l?.tooltip,e[202]=ht,e[203]=h,e[204]=E,e[205]=s?.tooltip,e[206]=xt,e[207]=Oe):Oe=e[207];let Z;e[208]!==l?.modal||e[209]!==$||e[210]!==X?(Z=$&&X!==void 0?o.jsxRuntimeExports.jsx(bi.DetailsModal,{body:$,data:X,setData:Ze,className:l?.modal}):null,e[208]=l?.modal,e[209]=$,e[210]=X,e[211]=Z):Z=e[211];let Pe;return e[212]!==je||e[213]!==Oe||e[214]!==Z?(Pe=o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[je,Oe,Z]}),e[212]=je,e[213]=Oe,e[214]=Z,e[215]=Pe):Pe=e[215],Pe}function Li(i){return i.layer}function Ni(i){return i.position==="after"}function $i(i){return i.color}function Mi(i){return i.color}function Vi(i){return i.color}function qi(i){return i.color}function Di(i){return i.color}function Ii(i){return i.color}function Ti(i){return i.color}function Pi(i){return i.color}function Xi(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Yi(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Fi(i){return i.layer}function Ui(i){return i.position==="before"}function Gi(i){return i!==0}function Hi(i){return i!==0}function Wi(i){return i!==0}function Bi(i){return i!==0}function zi(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Ji(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Ki(i){return!v.checkIfNullOrUndefined(i.radius)}function Qi(i){return!v.checkIfNullOrUndefined(i.radius)}function Zi(i){return i.radius===void 0||i.radius===null}function _i(i,e){return{...i,id:`${e}`}}function en(i){const e=o.compilerRuntimeExports.c(142),{data:n,graphTitle:ne,colors:S,sources:We,graphDescription:f,showLabels:R,height:T,width:g,footNote:H,colorDomain:P,colorLegendTitle:ut,radius:Ct,xAxisTitle:Dt,yAxisTitle:xt,padding:oe,backgroundColor:Rt,leftMargin:kt,rightMargin:wt,topMargin:Ne,bottomMargin:W,tooltip:ft,relativeHeight:mt,onSeriesMouseOver:k,refXValues:Be,refYValues:j,highlightAreaSettings:N,showColorScale:ze,highlightedDataPoints:Je,graphID:$e,maxRadiusValue:se,maxXValue:Me,minXValue:$,maxYValue:Ke,minYValue:Qe,xSuffix:Ve,ySuffix:qe,xPrefix:De,yPrefix:Ie,onSeriesMouseClick:le,graphDownload:s,dataDownload:l,language:a,showNAColor:M,minHeight:V,annotations:q,customHighlightAreaSettings:dt,theme:pt,regressionLine:b,ariaLabel:E,resetSelectionOnDoubleClick:Te,detailsOnClick:X,noOfXTicks:Ze,noOfYTicks:ht,labelColor:re,styles:h,classNames:u,animate:St,dimmedOpacity:Et,precision:gt,customLayers:p,timeline:B}=i,ae=R===void 0?!1:R,ce=Ct===void 0?5:Ct,ue=Dt===void 0?"X Axis":Dt,xe=xt===void 0?"Y Axis":xt,fe=Rt===void 0?!1:Rt,Y=kt===void 0?0:kt,me=wt===void 0?10:wt,de=Ne===void 0?20:Ne,pe=W===void 0?50:W;let z;e[0]!==Be?(z=Be===void 0?[]:Be,e[0]=Be,e[1]=z):z=e[1];const he=z;let J;e[2]!==j?(J=j===void 0?[]:j,e[2]=j,e[3]=J):J=e[3];const ge=J;let K;e[4]!==N?(K=N===void 0?[]:N,e[4]=N,e[5]=K):K=e[5];const ye=K,F=ze===void 0?!0:ze;let Q;e[6]!==Je?(Q=Je===void 0?[]:Je,e[6]=Je,e[7]=Q):Q=e[7];const ve=Q,be=Ve===void 0?"":Ve,Ae=qe===void 0?"":qe,je=De===void 0?"":De,Oe=Ie===void 0?"":Ie,Z=s===void 0?!1:s,Pe=l===void 0?!1:l,_=a===void 0?"en":a,A=M===void 0?!0:M,y=V===void 0?0:V;let w;e[8]!==q?(w=q===void 0?[]:q,e[8]=q,e[9]=w):w=e[9];const _e=w;let c;e[10]!==dt?(c=dt===void 0?[]:dt,e[10]=dt,e[11]=c):c=e[11];const d=c,U=pt===void 0?"light":pt,Lt=b===void 0?!1:b,It=Te===void 0?!0:Te,Tt=Ze===void 0?5:Ze,Nt=ht===void 0?5:ht,Xe=St===void 0?!1:St,yt=Et===void 0?.3:Et,vt=gt===void 0?2:gt;let Ye;e[12]!==p?(Ye=p===void 0?[]:p,e[12]=p,e[13]=Ye):Ye=e[13];const bt=Ye;let et;e[14]!==B?(et=B===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:B,e[14]=B,e[15]=et):et=e[15];const r=et,[tt,Pt]=L.useState(0),[it,Xt]=L.useState(0),[O,Yt]=L.useState(r.autoplay);let G;if(e[16]!==n||e[17]!==r.dateFormat){let m;e[19]!==r.dateFormat?(m=te=>_t.parse(`${te.date}`,r.dateFormat||"yyyy",new Date).getTime(),e[19]=r.dateFormat,e[20]=m):m=e[20],G=[...new Set(n.filter(Ln).map(m))],G.sort(En),e[16]=n,e[17]=r.dateFormat,e[18]=G}else G=e[18];const x=G,[D,Ce]=L.useState(r.autoplay?0:x.length-1),[At,nt]=L.useState(void 0),Re=L.useRef(null),Fe=L.useRef(null);let Ue,ot;e[21]===Symbol.for("react.memo_cache_sentinel")?(Ue=()=>{const m=new ResizeObserver(te=>{Pt(te[0].target.clientWidth||620),Xt(te[0].target.clientHeight||480)});return Re.current&&m.observe(Re.current),()=>m.disconnect()},ot=[],e[21]=Ue,e[22]=ot):(Ue=e[21],ot=e[22]),L.useEffect(Ue,ot);let st,lt;e[23]!==O||e[24]!==r.speed||e[25]!==x?(st=()=>{const m=setInterval(()=>{Ce(te=>te<x.length-1?te+1:0)},(r.speed||2)*1e3);return O||clearInterval(m),()=>clearInterval(m)},lt=[x,O,r.speed],e[23]=O,e[24]=r.speed,e[25]=x,e[26]=st,e[27]=lt):(st=e[26],lt=e[27]),L.useEffect(st,lt);const jt=r.dateFormat||"yyyy";let Ge;e[28]!==D||e[29]!==jt||e[30]!==r.showOnlyActiveDate||e[31]!==x?(Ge=ei.getSliderMarks(x,D,r.showOnlyActiveDate,jt),e[28]=D,e[29]=jt,e[30]=r.showOnlyActiveDate,e[31]=x,e[32]=Ge):Ge=e[32];const rt=Ge,Ot=u?.graphContainer,at=h?.graphContainer;let ke;e[33]!==u?.description||e[34]!==u?.title||e[35]!==n||e[36]!==Pe||e[37]!==f||e[38]!==Z||e[39]!==ne||e[40]!==h?.description||e[41]!==h?.title||e[42]!==g?(ke=ne||f||Z||Pe?o.jsxRuntimeExports.jsx(Ri.GraphHeader,{styles:{title:h?.title,description:h?.description},classNames:{title:u?.title,description:u?.description},graphTitle:ne,graphDescription:f,width:g,graphDownload:Z?Fe:void 0,dataDownload:Pe?n.map(Sn).filter(wn).length>0?n.map(kn).filter(Rn):n.filter(Cn):null}):null,e[33]=u?.description,e[34]=u?.title,e[35]=n,e[36]=Pe,e[37]=f,e[38]=Z,e[39]=ne,e[40]=h?.description,e[41]=h?.title,e[42]=g,e[43]=ke):ke=e[43];let we;e[44]!==D||e[45]!==rt||e[46]!==O||e[47]!==r.enabled||e[48]!==x?(we=r.enabled&&x.length>0&&rt?o.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[o.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Yt(!O)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":O?"Click to pause animation":"Click to play animation",children:O?o.jsxRuntimeExports.jsx(ci.Pause,{}):o.jsxRuntimeExports.jsx(ci.Play,{})}),o.jsxRuntimeExports.jsx(ei.Nr,{min:x[0],max:x[x.length-1],marks:rt,step:null,defaultValue:x[x.length-1],value:x[D],onChangeComplete:m=>{Ce(x.indexOf(m))},onChange:m=>{Ce(x.indexOf(m))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[44]=D,e[45]=rt,e[46]=O,e[47]=r.enabled,e[48]=x,e[49]=we):we=e[49];let ee;e[50]!==u?.colorLegend||e[51]!==P||e[52]!==ut||e[53]!==S||e[54]!==n||e[55]!==F||e[56]!==A||e[57]!==U||e[58]!==g?(ee=F&&n.filter(On).length!==0&&n.length>0?o.jsxRuntimeExports.jsx(ki.ColorLegendWithMouseOver,{width:g,colorLegendTitle:ut,colors:S||ie.Colors[U].categoricalColors.colors,colorDomain:P||ui.uniqBy(n,"color",!0),setSelectedColor:nt,showNAColor:A,className:u?.colorLegend}):null,e[50]=u?.colorLegend,e[51]=P,e[52]=ut,e[53]=S,e[54]=n,e[55]=F,e[56]=A,e[57]=U,e[58]=g,e[59]=ee):ee=e[59];let Se;e[60]!==n.length?(Se=n.length===0&&o.jsxRuntimeExports.jsx(wi.EmptyState,{}),e[60]=n.length,e[61]=Se):Se=e[61];let Ee;e[62]!==Xe||e[63]!==_e||e[64]!==pe||e[65]!==u||e[66]!==P||e[67]!==S||e[68]!==d||e[69]!==bt||e[70]!==n||e[71]!==X||e[72]!==yt||e[73]!==ye||e[74]!==ve||e[75]!==D||e[76]!==re||e[77]!==_||e[78]!==Y||e[79]!==se||e[80]!==Me||e[81]!==Ke||e[82]!==$||e[83]!==Qe||e[84]!==Tt||e[85]!==Nt||e[86]!==le||e[87]!==k||e[88]!==vt||e[89]!==ce||e[90]!==he||e[91]!==ge||e[92]!==Lt||e[93]!==It||e[94]!==me||e[95]!==At||e[96]!==ae||e[97]!==h||e[98]!==it||e[99]!==tt||e[100]!==U||e[101]!==r.dateFormat||e[102]!==r.enabled||e[103]!==ft||e[104]!==de||e[105]!==x||e[106]!==ue||e[107]!==je||e[108]!==be||e[109]!==xe||e[110]!==Oe||e[111]!==Ae?(Ee=tt&&it&&n.length>0?o.jsxRuntimeExports.jsx(Ei,{data:Si.ensureCompleteDataForScatterPlot(n,r.dateFormat||"yyyy").filter(m=>r.enabled?m.date===_t.format(new Date(x[D]),r.dateFormat||"yyyy"):m),width:tt,height:it,colorDomain:n.filter(jn).length===0?[]:P||ui.uniqBy(n,"color",!0),colors:n.filter(An).length===0?S?[S]:[ie.Colors.primaryColors["blue-600"]]:S||ie.Colors[U].categoricalColors.colors,xAxisTitle:ue,yAxisTitle:xe,refXValues:he,refYValues:ge,showLabels:ae,radius:ce,leftMargin:Y,rightMargin:me,topMargin:de,bottomMargin:pe,tooltip:ft,onSeriesMouseOver:k,highlightAreaSettings:ye,highlightedDataPoints:n.filter(bn).length===0?[]:ve,selectedColor:At,maxRadiusValue:v.checkIfNullOrUndefined(se)?Math.max(...n.map(vn).filter(yn)):se,maxXValue:v.checkIfNullOrUndefined(Me)?Math.max(...n.map(gn).filter(hn))>0?Math.max(...n.map(pn).filter(dn)):0:Me,minXValue:v.checkIfNullOrUndefined($)?Math.min(...n.map(mn).filter(fn))>0?0:Math.min(...n.map(xn).filter(un)):$,maxYValue:v.checkIfNullOrUndefined(Ke)?Math.max(...n.map(cn).filter(an))>0?Math.max(...n.map(rn).filter(ln)):0:Ke,minYValue:v.checkIfNullOrUndefined(Qe)?Math.min(...n.map(sn).filter(on))>0?0:Math.min(...n.map(nn).filter(tn)):Qe,onSeriesMouseClick:le,rtl:_==="he"||_==="ar",annotations:_e,customHighlightAreaSettings:d,regressionLine:Lt,resetSelectionOnDoubleClick:It,detailsOnClick:X,noOfXTicks:Tt,noOfYTicks:Nt,labelColor:re,xSuffix:be,ySuffix:Ae,xPrefix:je,yPrefix:Oe,styles:h,classNames:u,animate:Xe===!0?{duration:.5,once:!0,amount:.5}:Xe||{duration:0,once:!0,amount:0},dimmedOpacity:yt,precision:vt,customLayers:bt}):null,e[62]=Xe,e[63]=_e,e[64]=pe,e[65]=u,e[66]=P,e[67]=S,e[68]=d,e[69]=bt,e[70]=n,e[71]=X,e[72]=yt,e[73]=ye,e[74]=ve,e[75]=D,e[76]=re,e[77]=_,e[78]=Y,e[79]=se,e[80]=Me,e[81]=Ke,e[82]=$,e[83]=Qe,e[84]=Tt,e[85]=Nt,e[86]=le,e[87]=k,e[88]=vt,e[89]=ce,e[90]=he,e[91]=ge,e[92]=Lt,e[93]=It,e[94]=me,e[95]=At,e[96]=ae,e[97]=h,e[98]=it,e[99]=tt,e[100]=U,e[101]=r.dateFormat,e[102]=r.enabled,e[103]=ft,e[104]=de,e[105]=x,e[106]=ue,e[107]=je,e[108]=be,e[109]=xe,e[110]=Oe,e[111]=Ae,e[112]=Ee):Ee=e[112];let Le;e[113]!==Se||e[114]!==Ee?(Le=o.jsxRuntimeExports.jsxs(xi.GraphArea,{ref:Re,children:[Se,Ee]}),e[113]=Se,e[114]=Ee,e[115]=Le):Le=e[115];let I;e[116]!==u?.footnote||e[117]!==u?.source||e[118]!==H||e[119]!==We||e[120]!==h?.footnote||e[121]!==h?.source||e[122]!==g?(I=We||H?o.jsxRuntimeExports.jsx(Ci.GraphFooter,{styles:{footnote:h?.footnote,source:h?.source},classNames:{footnote:u?.footnote,source:u?.source},sources:We,footNote:H,width:g}):null,e[116]=u?.footnote,e[117]=u?.source,e[118]=H,e[119]=We,e[120]=h?.footnote,e[121]=h?.source,e[122]=g,e[123]=I):I=e[123];let ct;return e[124]!==E||e[125]!==fe||e[126]!==$e||e[127]!==T||e[128]!==_||e[129]!==y||e[130]!==oe||e[131]!==mt||e[132]!==Ot||e[133]!==at||e[134]!==ke||e[135]!==we||e[136]!==ee||e[137]!==Le||e[138]!==I||e[139]!==U||e[140]!==g?(ct=o.jsxRuntimeExports.jsxs(xi.GraphContainer,{className:Ot,style:at,id:$e,ref:Fe,"aria-label":E,backgroundColor:fe,theme:U,language:_,minHeight:y,width:g,height:T,relativeHeight:mt,padding:oe,children:[ke,we,ee,Le,I]}),e[124]=E,e[125]=fe,e[126]=$e,e[127]=T,e[128]=_,e[129]=y,e[130]=oe,e[131]=mt,e[132]=Ot,e[133]=at,e[134]=ke,e[135]=we,e[136]=ee,e[137]=Le,e[138]=I,e[139]=U,e[140]=g,e[141]=ct):ct=e[141],ct}function tn(i){return i!=null}function nn(i){return i.y}function on(i){return i!=null}function sn(i){return i.y}function ln(i){return i!=null}function rn(i){return i.y}function an(i){return i!=null}function cn(i){return i.y}function un(i){return i!=null}function xn(i){return i.x}function fn(i){return i!=null}function mn(i){return i.x}function dn(i){return i!=null}function pn(i){return i.x}function hn(i){return i!=null}function gn(i){return i.x}function yn(i){return i!=null}function vn(i){return i.radius}function bn(i){return i.label}function An(i){return i.color}function jn(i){return i.color}function On(i){return i.color}function Cn(i){return i!==void 0}function Rn(i){return i!==void 0}function kn(i){return i.data}function wn(i){return i!==void 0}function Sn(i){return i.data}function En(i,e){return i-e}function Ln(i){return i.date}exports.ScatterPlot=en;
2
2
  //# sourceMappingURL=ScatterPlot.cjs.map
@@ -10,7 +10,7 @@ import { c as v } from "./checkIfNullOrUndefined-DmfiKkNw.js";
10
10
  import { Colors as et } from "./Colors.js";
11
11
  import { n as ii } from "./numberFormattingFunction-14YCbkN2.js";
12
12
  import { g as vi, A as bi, C as Ai } from "./customArea-ASDaSE4u.js";
13
- import { A as oi } from "./Axis-DoOqnt6g.js";
13
+ import { A as oi } from "./Axis-D56Gy0se.js";
14
14
  import { A as ni } from "./AxisTitle-VFq89Olw.js";
15
15
  import { X as Oi } from "./XTicksAndGridLines-CVZkZkpS.js";
16
16
  import { R as Ci, a as wi } from "./ReferenceLine-DgtoRgw0.js";
@@ -412,6 +412,8 @@ declare interface GraphSettingsDataType {
412
412
  mapColorLegendTitle?: string;
413
413
  choroplethScaleType?: Exclude<ScaleDataType, 'linear'>;
414
414
  trackColor?: string;
415
+ zoomAndCenterByHighlightedIds?: boolean;
416
+ hideAxisLine?: boolean;
415
417
  }
416
418
 
417
419
  declare type GraphType = GraphTypeForGriddedGraph;
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-6v2a2njQ.cjs"),w=require("react"),j=require("./parse-xYI9yrvL.cjs"),Le=require("./simple-statistics-xm8c0LQQ.cjs"),Me=require("./index-Cno4Q0YE.cjs"),Se=require("./numberFormattingFunction-02t-wJta.cjs"),Ve=require("./Tooltip-BLa2EfMs.cjs"),bt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ke=require("./customArea-B1LWQBmM.cjs"),Ie=require("./Axis-Dtjn-EgM.cjs"),Fe=require("./AxisTitle-DV4n0RxE.cjs"),He=require("./XTicksAndGridLines-CekrPykD.cjs"),Ge=require("./ReferenceLine-M9aP3dj-.cjs"),Pe=require("./RegressionLine-Ci-Dh0w0.cjs"),We=require("./YTicksAndGridLines-UzVC5eBM.cjs"),Ye=require("./index-D69M6klB.cjs"),Xe=require("./time-CkcKbhwe.cjs"),Ue=require("./linear-CgUCbw9F.cjs"),De=require("./line-DaEMhXmx.cjs"),ge=require("./step-BZ3C8QFW.cjs"),Be=require("./select-Bnfk0lJx.cjs"),ee=require("./proxy-C4-uo6nS.cjs"),ze=require("./init-DU0ybBc_.cjs"),Je=require("./pointer-Dkq5NV1q.cjs"),Ke=require("./use-in-view-C3o_ntMv.cjs"),Qe=require("./GraphFooter.cjs"),Ze=require("./GraphHeader.cjs"),_e=require("./Colors.cjs"),ti=require("./EmptyState-CGeBqbmR.cjs"),qe=require("./GraphContainer-B1EDxJ0S.cjs"),ei=require("./getNoOfTicks-C_1CFXv_.cjs");function ii(i){const t=n.compilerRuntimeExports.c(110),{data:y,width:W,height:rt,lineColor:Y,suffix:E,prefix:$,dateFormat:s,highlightAreaSettings:at,showValues:O,noOfXTicks:At,rightMargin:Ct,leftMargin:C,topMargin:kt,bottomMargin:lt,tooltip:ct,onSeriesMouseOver:Lt,refValues:Yt,minValue:Xt,maxValue:ut,animate:o,rtl:St,strokeWidth:xt,showDots:Dt,annotations:Ut,customHighlightAreaSettings:mt,regressionLine:ft,yAxisTitle:X,noOfYTicks:Bt,maxDate:zt,minDate:Jt,curveType:pt,styles:d,classNames:f,precision:M,customLayers:V}=i,Kt=w.useRef(null);let I;t[0]!==o.amount||t[1]!==o.once?(I={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=I):I=t[2];const x=Ke.useInView(Kt,I),[b,Qt]=w.useState(!1);let dt,U;t[3]!==o.duration||t[4]!==b||t[5]!==x?(dt=()=>{if(x&&!b){const e=setTimeout(()=>{Qt(!0)},(o.duration+.5)*1e3);return()=>clearTimeout(e)}},U=[x,b,o.duration],t[3]=o.duration,t[4]=b,t[5]=x,t[6]=dt,t[7]=U):(dt=t[6],U=t[7]),w.useEffect(dt,U);const ie=pt==="linear"?De.curveLinear:pt==="step"?ge.curveStep:pt==="stepAfter"?ge.stepAfter:pt==="stepBefore"?ge.stepBefore:ge.monotoneX,[k,m]=w.useState(void 0),[c,Zt]=w.useState(void 0),[F,qt]=w.useState(void 0),ht=X?C+30:C;let B;t[8]!==lt||t[9]!==Ct||t[10]!==ht||t[11]!==kt?(B={top:kt,bottom:lt,left:ht,right:Ct},t[8]=lt,t[9]=Ct,t[10]=ht,t[11]=kt,t[12]=B):B=t[12];const v=B,z=w.useRef(null);let J;t[13]!==s?(J=e=>({...e,date:j.parse(`${e.date}`,s,new Date)}),t[13]=s,t[14]=J):J=t[14];const a=Me.orderBy(y.map(J),["date"],["asc"]);let K;if(t[15]!==s||t[16]!==at){let e;t[18]!==s?(e=g=>({...g,coordinates:[g.coordinates[0]===null?null:j.parse(`${g.coordinates[0]}`,s,new Date),g.coordinates[1]===null?null:j.parse(`${g.coordinates[1]}`,s,new Date)]}),t[18]=s,t[19]=e):e=t[19],K=at.map(e),t[15]=s,t[16]=at,t[17]=K}else K=t[17];const gt=K;let Q;if(t[20]!==mt||t[21]!==s){let e;t[23]!==s?(e=g=>({...g,coordinates:g.coordinates.map((P,Wt)=>Wt%2===0?j.parse(`${P}`,s,new Date):P)}),t[23]=s,t[24]=e):e=t[24],Q=mt.map(e),t[20]=mt,t[21]=s,t[22]=Q}else Q=t[22];const Nt=Q,u=W-v.left-v.right,h=rt-v.top-v.bottom,Tt=Jt?j.parse(`${Jt}`,s,new Date):a[0].date,$t=zt?j.parse(`${zt}`,s,new Date):a[a.length-1].date,p=bt.checkIfNullOrUndefined(Xt)?Math.min(...a.map(ji).filter(vi))!==1/0?Math.min(...a.map(yi).filter(gi))>0?0:Math.min(...a.map(hi).filter(di)):0:Xt,L=Math.max(...a.map(pi).filter(fi))!==1/0?Math.max(...a.map(mi).filter(xi)):0,r=Xe.time().domain([Tt,$t]).range([0,u]);let Z;t[25]!==L||t[26]!==ut?(Z=bt.checkIfNullOrUndefined(ut)?L>0?L:0:ut,t[25]=L,t[26]=ut,t[27]=Z):Z=t[27];const l=Ue.linear().domain([p,Z]).range([h,0]).nice(),Mt=De.line().x(e=>r(e.date)).y(e=>l(e.y)).curve(ie),yt=l.ticks(Bt),Vt=r.ticks(At);w.useEffect(()=>{const e=P=>{const Wt=a[ze.bisectCenter(a.map(ui),r.invert(Je.pointer(P)[0]),0)];m(Wt||a[a.length-1]),Lt?.(Wt||a[a.length-1]),qt(P.clientY),Zt(P.clientX)},g=()=>{m(void 0),Zt(void 0),qt(void 0),Lt?.(void 0)};Be.select(z.current).on("mousemove",e).on("mouseout",g)},[r,a,Lt]);const It=Le.linearRegression(a.filter(ci).map(e=>[r(e.date),l(e.y)])),Ft=Le.linearRegressionLine(It);let _;t[28]!==o||t[29]!==h||t[30]!==u||t[31]!==gt||t[32]!==x||t[33]!==r?(_=n.jsxRuntimeExports.jsx(Ye.HighlightArea,{areaSettings:gt,width:u,height:h,scale:r,animate:o,isInView:x}),t[28]=o,t[29]=h,t[30]=u,t[31]=gt,t[32]=x,t[33]=r,t[34]=_):_=t[34];const vt=d?.yAxis?.gridLines,jt=d?.yAxis?.labels;let tt;t[35]!==vt||t[36]!==jt?(tt={gridLines:vt,labels:jt},t[35]=vt,t[36]=jt,t[37]=tt):tt=t[37];const Rt=f?.yAxis?.gridLines,et=f?.yAxis?.labels;let it;t[38]!==Rt||t[39]!==et?(it={gridLines:Rt,labels:et},t[38]=Rt,t[39]=et,t[40]=it):it=t[40];const H=l(p<0?0:p),_t=l(p<0?0:p),nt=0-C,te=u+v.right,wt=p<0?0:p;let G;t[41]!==M||t[42]!==$||t[43]!==E||t[44]!==wt?(G=Se.numberFormattingFunction(wt,"NA",M,$,E),t[41]=M,t[42]=$,t[43]=E,t[44]=wt,t[45]=G):G=t[45];const st=0-C,ot=l(p<0?0:p),Et=L<0?"1em":-5;let S;t[46]!==st||t[47]!==ot||t[48]!==Et?(S={x:st,y:ot,dx:0,dy:Et},t[46]=st,t[47]=ot,t[48]=Et,t[49]=S):S=t[49];const D=f?.xAxis?.axis,q=f?.yAxis?.labels;let R;t[50]!==D||t[51]!==q?(R={axis:D,label:q},t[50]=D,t[51]=q,t[52]=R):R=t[52];const N=d?.xAxis?.axis,T=d?.yAxis?.labels;let A;t[53]!==N||t[54]!==T?(A={axis:N,label:T},t[53]=N,t[54]=T,t[55]=A):A=t[55];let Ot;t[56]!==H||t[57]!==_t||t[58]!==nt||t[59]!==te||t[60]!==G||t[61]!==S||t[62]!==R||t[63]!==A?(Ot=n.jsxRuntimeExports.jsx(Ie.Axis,{y1:H,y2:_t,x1:nt,x2:te,label:G,labelPos:S,classNames:R,styles:A}),t[56]=H,t[57]=_t,t[58]=nt,t[59]=te,t[60]=G,t[61]=S,t[62]=R,t[63]=A,t[64]=Ot):Ot=t[64];const Ht=0-C-15,ye=h/2,ve=d?.yAxis?.title,je=f?.yAxis?.title;let ne;t[65]!==Ht||t[66]!==ye||t[67]!==ve||t[68]!==je||t[69]!==X?(ne=n.jsxRuntimeExports.jsx(Fe.AxisTitle,{x:Ht,y:ye,style:ve,className:je,text:X,rotate90:!0}),t[65]=Ht,t[66]=ye,t[67]=ve,t[68]=je,t[69]=X,t[70]=ne):ne=t[70];let se;t[71]!==s?(se=e=>j.format(e,s),t[71]=s,t[72]=se):se=t[72];const Ne=Vt.map(se),Te=Vt.map(e=>r(e)),Re=d?.xAxis?.gridLines,we=d?.xAxis?.labels;let oe;t[73]!==Re||t[74]!==we?(oe={gridLines:Re,labels:we},t[73]=Re,t[74]=we,t[75]=oe):oe=t[75];const Ee=f?.xAxis?.gridLines;let Gt;t[76]!==Ee?(Gt=n.mo("opacity-0",Ee),t[76]=Ee,t[77]=Gt):Gt=t[77];const Oe=f?.xAxis?.labels;let Pt;t[78]!==Oe?(Pt=n.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",Oe),t[78]=Oe,t[79]=Pt):Pt=t[79];let re;t[80]!==Gt||t[81]!==Pt?(re={gridLines:Gt,labels:Pt},t[80]=Gt,t[81]=Pt,t[82]=re):re=t[82];let ae;t[83]!==V?(ae=V.filter(ri).map(oi),t[83]=V,t[84]=ae):ae=t[84];let le;t[85]!==Y||t[86]!==xt?(le={stroke:Y,fill:"none",strokeWidth:xt},t[85]=Y,t[86]=xt,t[87]=le):le=t[87];let ce;t[88]!==o.duration?(ce={opacity:0,transition:{duration:o.duration}},t[88]=o.duration,t[89]=ce):ce=t[89];const be=a.map((e,g)=>n.jsxRuntimeExports.jsx(ee.motion.g,{children:bt.checkIfNullOrUndefined(e.y)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[Dt?n.jsxRuntimeExports.jsx(ee.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,cx:r(e.date),cy:l(e.y),fill:Y},whileInView:{opacity:1,fill:Y,transition:{duration:b?o.duration:.5,delay:b?0:o.duration},cx:r(e.date),cy:l(e.y)}},initial:"initial",animate:x?"whileInView":"initial"}):null,O?n.jsxRuntimeExports.jsx(ee.motion.text,{dy:-8,style:{textAnchor:"middle",...d?.graphObjectValues||{}},className:n.mo("graph-value text-xs font-bold",f?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,x:r(e.date),y:l(e.y)},whileInView:{opacity:1,x:r(e.date),y:l(e.y),transition:{duration:b?o.duration:.5,delay:b?0:o.duration}}},initial:"initial",animate:x?"whileInView":"initial",children:Se.numberFormattingFunction(e.y,"NA",M,$,E)}):null]})},g));let ue;t[90]!==be?(ue=n.jsxRuntimeExports.jsx("g",{children:be}),t[90]=be,t[91]=ue):ue=t[91];const Ae=Ut.map((e,g)=>{const P=ke.getLineEndPoint({x:e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,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?r(j.parse(`${e.xCoordinate}`,s,new Date)):0,y:e.yCoordinate?l(e.yCoordinate):0},bt.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),Wt=e.showConnector?{y1:P.y,x1:P.x,y2:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,new Date))+(e.xOffset||0):0+(e.xOffset||0),cy:e.yCoordinate?l(e.yCoordinate):0,cx:e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,new Date)):0,circleRadius:bt.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,$e={y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:St?0:e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:St?e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,new Date))+(e.xOffset||0):0+(e.xOffset||0):u+v.right-(e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return n.jsxRuntimeExports.jsx(ke.Annotation,{color:e.color,connectorsSettings:Wt,labelSettings:$e,text:e.text,classNames:e.classNames,styles:e.styles,animate:o,isInView:x},g)});let xe;t[92]!==Ae?(xe=n.jsxRuntimeExports.jsx("g",{children:Ae}),t[92]=Ae,t[93]=xe):xe=t[93];const Ce=ft?n.jsxRuntimeExports.jsx(Pe.RegressionLine,{x1:0,x2:u,y1:Ft(0),y2:Ft(u),graphHeight:h,graphWidth:u,className:f?.regLine,style:d?.regLine,color:typeof ft=="string"?ft:void 0,animate:o,isInView:x}):null;let me;t[94]!==Ce?(me=n.jsxRuntimeExports.jsx("g",{children:Ce}),t[94]=Ce,t[95]=me):me=t[95];let fe;t[96]!==V?(fe=V.filter(si).map(ni),t[96]=V,t[97]=fe):fe=t[97];let pe;t[98]===Symbol.for("react.memo_cache_sentinel")?(pe={fill:"none",pointerEvents:"all"},t[98]=pe):pe=t[98];let de;t[99]!==z||t[100]!==h||t[101]!==u?(de=n.jsxRuntimeExports.jsx("rect",{ref:z,style:pe,width:u,height:h}),t[99]=z,t[100]=h,t[101]=u,t[102]=de):de=t[102];let he;return t[103]!==f?.tooltip||t[104]!==c||t[105]!==F||t[106]!==k||t[107]!==d?.tooltip||t[108]!==ct?(he=k&&ct&&c&&F?n.jsxRuntimeExports.jsx(Ve.Tooltip,{data:k,body:ct,xPos:c,yPos:F,backgroundStyle:d?.tooltip,className:f?.tooltip}):null,t[103]=f?.tooltip,t[104]=c,t[105]=F,t[106]=k,t[107]=d?.tooltip,t[108]=ct,t[109]=he):he=t[109],n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(ee.motion.svg,{width:`${W}px`,height:`${rt}px`,viewBox:`0 0 ${W} ${rt}`,direction:"ltr",ref:Kt,children:n.jsxRuntimeExports.jsxs("g",{transform:`translate(${v.left},${v.top})`,children:[_,n.jsxRuntimeExports.jsx(ke.CustomArea,{areaSettings:Nt,scaleX:r,scaleY:l,animate:o,isInView:x}),n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx(We.YTicksAndGridLines,{values:yt.filter(li),y:yt.filter(ai).map(e=>l(e)),x1:0-C,x2:u+v.right,styles:tt,classNames:it,suffix:E,prefix:$,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:M}),Ot,ne]}),n.jsxRuntimeExports.jsx(He.XTicksAndGridLines,{values:Ne,x:Te,y1:0,y2:h,styles:oe,classNames:re,suffix:E,prefix:$,labelType:"primary",showGridLines:!0,precision:M}),ae,n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx(ee.motion.path,{style:le,exit:ce,variants:{initial:{pathLength:0,d:Mt(a)||"",opacity:1},whileInView:{pathLength:1,d:Mt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:x?"whileInView":"initial"}),k?n.jsxRuntimeExports.jsx("line",{y1:0,y2:h,x1:r(k.date),x2:r(k.date),className:n.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",f?.mouseOverLine),style:d?.mouseOverLine}):null]}),ue,Yt?n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:Yt.map((e,g)=>n.jsxRuntimeExports.jsx(Ge.RefLineY,{text:e.text,color:e.color,y:l(e.value),x1:0-C,x2:u+v.right,classNames:e.classNames,styles:e.styles,animate:o,isInView:x},g))}):null,xe,me,fe,de]})}),he]})}function ni(i){return i.layer}function si(i){return i.position==="after"}function oi(i){return i.layer}function ri(i){return i.position==="before"}function ai(i){return i!==0}function li(i){return i!==0}function ci(i){return!bt.checkIfNullOrUndefined(i.date)&&!bt.checkIfNullOrUndefined(i.y)}function ui(i){return i.date}function xi(i){return i!=null}function mi(i){return i.y}function fi(i){return i!=null}function pi(i){return i.y}function di(i){return i!=null}function hi(i){return i.y}function gi(i){return i!=null}function yi(i){return i.y}function vi(i){return i!=null}function ji(i){return i.y}function Ri(i){const t=n.compilerRuntimeExports.c(88),{data:y,graphTitle:W,lineColor:rt,suffix:Y,sources:E,prefix:$,graphDescription:s,height:at,width:O,footNote:At,noOfXTicks:Ct,dateFormat:C,showValues:kt,padding:lt,backgroundColor:ct,leftMargin:Lt,rightMargin:Yt,topMargin:Xt,bottomMargin:ut,relativeHeight:o,tooltip:St,onSeriesMouseOver:xt,highlightAreaSettings:Dt,graphID:Ut,minValue:mt,maxValue:ft,maxDate:X,minDate:Bt,graphDownload:zt,dataDownload:Jt,animate:pt,language:d,refValues:f,minHeight:M,strokeWidth:V,showDots:Kt,annotations:I,customHighlightAreaSettings:x,theme:b,ariaLabel:Qt,regressionLine:dt,yAxisTitle:U,noOfYTicks:ie,curveType:k,styles:m,classNames:c,precision:Zt,customLayers:F}=i,qt=Y===void 0?"":Y,ht=$===void 0?"":$,B=Ct===void 0?10:Ct,v=C===void 0?"yyyy":C,z=kt===void 0?!1:kt,J=ct===void 0?!1:ct,a=Lt===void 0?30:Lt,K=Yt===void 0?30:Yt,gt=Xt===void 0?20:Xt,Q=ut===void 0?25:ut;let Nt;t[0]!==Dt?(Nt=Dt===void 0?[]:Dt,t[0]=Dt,t[1]=Nt):Nt=t[1];const u=Nt,h=zt===void 0?!1:zt,Tt=Jt===void 0?!1:Jt,$t=pt===void 0?!1:pt,p=d===void 0?"en":d;let L;t[2]!==f?(L=f===void 0?[]:f,t[2]=f,t[3]=L):L=t[3];const r=L,Z=M===void 0?0:M,l=V===void 0?2:V,Mt=Kt===void 0?!0:Kt;let yt;t[4]!==I?(yt=I===void 0?[]:I,t[4]=I,t[5]=yt):yt=t[5];const Vt=yt;let It;t[6]!==x?(It=x===void 0?[]:x,t[6]=x,t[7]=It):It=t[7];const Ft=It,_=b===void 0?"light":b,vt=dt===void 0?!1:dt,jt=ie===void 0?5:ie,tt=k===void 0?"curve":k,Rt=Zt===void 0?2:Zt;let et;t[8]!==F?(et=F===void 0?[]:F,t[8]=F,t[9]=et):et=t[9];const it=et,[H,_t]=w.useState(0),[nt,te]=w.useState(0),wt=w.useRef(null),G=w.useRef(null);let st,ot;t[10]===Symbol.for("react.memo_cache_sentinel")?(st=()=>{const Ot=new ResizeObserver(Ht=>{_t(Ht[0].target.clientWidth||620),te(Ht[0].target.clientHeight||480)});return wt.current&&Ot.observe(wt.current),()=>Ot.disconnect()},ot=[],t[10]=st,t[11]=ot):(st=t[10],ot=t[11]),w.useEffect(st,ot);const Et=c?.graphContainer,S=m?.graphContainer;let D;t[12]!==c?.description||t[13]!==c?.title||t[14]!==y||t[15]!==Tt||t[16]!==s||t[17]!==h||t[18]!==W||t[19]!==m?.description||t[20]!==m?.title||t[21]!==O?(D=W||s||h||Tt?n.jsxRuntimeExports.jsx(Ze.GraphHeader,{styles:{title:m?.title,description:m?.description},classNames:{title:c?.title,description:c?.description},graphTitle:W,graphDescription:s,width:O,graphDownload:h?G:void 0,dataDownload:Tt?y.map(Ai).filter(bi).length>0?y.map(Oi).filter(Ei):y.filter(wi):null}):null,t[12]=c?.description,t[13]=c?.title,t[14]=y,t[15]=Tt,t[16]=s,t[17]=h,t[18]=W,t[19]=m?.description,t[20]=m?.title,t[21]=O,t[22]=D):D=t[22];let q;t[23]!==y.length?(q=y.length===0&&n.jsxRuntimeExports.jsx(ti.EmptyState,{}),t[23]=y.length,t[24]=q):q=t[24];let R;t[25]!==$t||t[26]!==Vt||t[27]!==Q||t[28]!==c||t[29]!==tt||t[30]!==Ft||t[31]!==it||t[32]!==y||t[33]!==v||t[34]!==u||t[35]!==p||t[36]!==a||t[37]!==rt||t[38]!==X||t[39]!==ft||t[40]!==Bt||t[41]!==mt||t[42]!==B||t[43]!==jt||t[44]!==xt||t[45]!==Rt||t[46]!==ht||t[47]!==r||t[48]!==vt||t[49]!==K||t[50]!==Mt||t[51]!==z||t[52]!==l||t[53]!==m||t[54]!==qt||t[55]!==nt||t[56]!==H||t[57]!==St||t[58]!==gt||t[59]!==U?(R=H&&nt&&y.length>0?n.jsxRuntimeExports.jsx(ii,{data:y,lineColor:rt||_e.Colors.primaryColors["blue-600"],width:H,height:nt,suffix:qt,prefix:ht,dateFormat:v,showValues:z,noOfXTicks:B??ei.getNoOfTicks(H),leftMargin:a,rightMargin:K,topMargin:gt,bottomMargin:Q,tooltip:St,highlightAreaSettings:u,onSeriesMouseOver:xt,refValues:r,minValue:mt,maxValue:ft,animate:$t===!0?{duration:.5,once:!0,amount:.5}:$t||{duration:0,once:!0,amount:0},rtl:p==="he"||p==="ar",strokeWidth:l,showDots:Mt,annotations:Vt,customHighlightAreaSettings:Ft,regressionLine:vt,yAxisTitle:U,noOfYTicks:jt,maxDate:X,minDate:Bt,curveType:tt,styles:m,classNames:c,precision:Rt,customLayers:it}):null,t[25]=$t,t[26]=Vt,t[27]=Q,t[28]=c,t[29]=tt,t[30]=Ft,t[31]=it,t[32]=y,t[33]=v,t[34]=u,t[35]=p,t[36]=a,t[37]=rt,t[38]=X,t[39]=ft,t[40]=Bt,t[41]=mt,t[42]=B,t[43]=jt,t[44]=xt,t[45]=Rt,t[46]=ht,t[47]=r,t[48]=vt,t[49]=K,t[50]=Mt,t[51]=z,t[52]=l,t[53]=m,t[54]=qt,t[55]=nt,t[56]=H,t[57]=St,t[58]=gt,t[59]=U,t[60]=R):R=t[60];let N;t[61]!==q||t[62]!==R?(N=n.jsxRuntimeExports.jsxs(qe.GraphArea,{ref:wt,children:[q,R]}),t[61]=q,t[62]=R,t[63]=N):N=t[63];let T;t[64]!==c?.footnote||t[65]!==c?.source||t[66]!==At||t[67]!==E||t[68]!==m?.footnote||t[69]!==m?.source||t[70]!==O?(T=E||At?n.jsxRuntimeExports.jsx(Qe.GraphFooter,{styles:{footnote:m?.footnote,source:m?.source},classNames:{footnote:c?.footnote,source:c?.source},sources:E,footNote:At,width:O}):null,t[64]=c?.footnote,t[65]=c?.source,t[66]=At,t[67]=E,t[68]=m?.footnote,t[69]=m?.source,t[70]=O,t[71]=T):T=t[71];let A;return t[72]!==Qt||t[73]!==J||t[74]!==Ut||t[75]!==at||t[76]!==p||t[77]!==Z||t[78]!==lt||t[79]!==o||t[80]!==Et||t[81]!==S||t[82]!==D||t[83]!==N||t[84]!==T||t[85]!==_||t[86]!==O?(A=n.jsxRuntimeExports.jsxs(qe.GraphContainer,{className:Et,style:S,id:Ut,ref:G,"aria-label":Qt,backgroundColor:J,theme:_,language:p,minHeight:Z,width:O,height:at,relativeHeight:o,padding:lt,children:[D,N,T]}),t[72]=Qt,t[73]=J,t[74]=Ut,t[75]=at,t[76]=p,t[77]=Z,t[78]=lt,t[79]=o,t[80]=Et,t[81]=S,t[82]=D,t[83]=N,t[84]=T,t[85]=_,t[86]=O,t[87]=A):A=t[87],A}function wi(i){return i!==void 0}function Ei(i){return i!==void 0}function Oi(i){return i.data}function bi(i){return i!==void 0}function Ai(i){return i.data}exports.SimpleLineChart=Ri;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-6v2a2njQ.cjs"),w=require("react"),j=require("./parse-xYI9yrvL.cjs"),Le=require("./simple-statistics-xm8c0LQQ.cjs"),Me=require("./index-Cno4Q0YE.cjs"),Se=require("./numberFormattingFunction-02t-wJta.cjs"),Ve=require("./Tooltip-BLa2EfMs.cjs"),bt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ke=require("./customArea-B1LWQBmM.cjs"),Ie=require("./Axis-Jt_tmhxS.cjs"),Fe=require("./AxisTitle-DV4n0RxE.cjs"),He=require("./XTicksAndGridLines-CekrPykD.cjs"),Ge=require("./ReferenceLine-M9aP3dj-.cjs"),Pe=require("./RegressionLine-Ci-Dh0w0.cjs"),We=require("./YTicksAndGridLines-UzVC5eBM.cjs"),Ye=require("./index-D69M6klB.cjs"),Xe=require("./time-CkcKbhwe.cjs"),Ue=require("./linear-CgUCbw9F.cjs"),De=require("./line-DaEMhXmx.cjs"),ge=require("./step-BZ3C8QFW.cjs"),Be=require("./select-Bnfk0lJx.cjs"),ee=require("./proxy-C4-uo6nS.cjs"),ze=require("./init-DU0ybBc_.cjs"),Je=require("./pointer-Dkq5NV1q.cjs"),Ke=require("./use-in-view-C3o_ntMv.cjs"),Qe=require("./GraphFooter.cjs"),Ze=require("./GraphHeader.cjs"),_e=require("./Colors.cjs"),ti=require("./EmptyState-CGeBqbmR.cjs"),qe=require("./GraphContainer-B1EDxJ0S.cjs"),ei=require("./getNoOfTicks-C_1CFXv_.cjs");function ii(i){const t=n.compilerRuntimeExports.c(110),{data:y,width:W,height:rt,lineColor:Y,suffix:E,prefix:$,dateFormat:s,highlightAreaSettings:at,showValues:O,noOfXTicks:At,rightMargin:Ct,leftMargin:C,topMargin:kt,bottomMargin:lt,tooltip:ct,onSeriesMouseOver:Lt,refValues:Yt,minValue:Xt,maxValue:ut,animate:o,rtl:St,strokeWidth:xt,showDots:Dt,annotations:Ut,customHighlightAreaSettings:mt,regressionLine:ft,yAxisTitle:X,noOfYTicks:Bt,maxDate:zt,minDate:Jt,curveType:pt,styles:d,classNames:f,precision:M,customLayers:V}=i,Kt=w.useRef(null);let I;t[0]!==o.amount||t[1]!==o.once?(I={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=I):I=t[2];const x=Ke.useInView(Kt,I),[b,Qt]=w.useState(!1);let dt,U;t[3]!==o.duration||t[4]!==b||t[5]!==x?(dt=()=>{if(x&&!b){const e=setTimeout(()=>{Qt(!0)},(o.duration+.5)*1e3);return()=>clearTimeout(e)}},U=[x,b,o.duration],t[3]=o.duration,t[4]=b,t[5]=x,t[6]=dt,t[7]=U):(dt=t[6],U=t[7]),w.useEffect(dt,U);const ie=pt==="linear"?De.curveLinear:pt==="step"?ge.curveStep:pt==="stepAfter"?ge.stepAfter:pt==="stepBefore"?ge.stepBefore:ge.monotoneX,[k,m]=w.useState(void 0),[c,Zt]=w.useState(void 0),[F,qt]=w.useState(void 0),ht=X?C+30:C;let B;t[8]!==lt||t[9]!==Ct||t[10]!==ht||t[11]!==kt?(B={top:kt,bottom:lt,left:ht,right:Ct},t[8]=lt,t[9]=Ct,t[10]=ht,t[11]=kt,t[12]=B):B=t[12];const v=B,z=w.useRef(null);let J;t[13]!==s?(J=e=>({...e,date:j.parse(`${e.date}`,s,new Date)}),t[13]=s,t[14]=J):J=t[14];const a=Me.orderBy(y.map(J),["date"],["asc"]);let K;if(t[15]!==s||t[16]!==at){let e;t[18]!==s?(e=g=>({...g,coordinates:[g.coordinates[0]===null?null:j.parse(`${g.coordinates[0]}`,s,new Date),g.coordinates[1]===null?null:j.parse(`${g.coordinates[1]}`,s,new Date)]}),t[18]=s,t[19]=e):e=t[19],K=at.map(e),t[15]=s,t[16]=at,t[17]=K}else K=t[17];const gt=K;let Q;if(t[20]!==mt||t[21]!==s){let e;t[23]!==s?(e=g=>({...g,coordinates:g.coordinates.map((P,Wt)=>Wt%2===0?j.parse(`${P}`,s,new Date):P)}),t[23]=s,t[24]=e):e=t[24],Q=mt.map(e),t[20]=mt,t[21]=s,t[22]=Q}else Q=t[22];const Nt=Q,u=W-v.left-v.right,h=rt-v.top-v.bottom,Tt=Jt?j.parse(`${Jt}`,s,new Date):a[0].date,$t=zt?j.parse(`${zt}`,s,new Date):a[a.length-1].date,p=bt.checkIfNullOrUndefined(Xt)?Math.min(...a.map(ji).filter(vi))!==1/0?Math.min(...a.map(yi).filter(gi))>0?0:Math.min(...a.map(hi).filter(di)):0:Xt,L=Math.max(...a.map(pi).filter(fi))!==1/0?Math.max(...a.map(mi).filter(xi)):0,r=Xe.time().domain([Tt,$t]).range([0,u]);let Z;t[25]!==L||t[26]!==ut?(Z=bt.checkIfNullOrUndefined(ut)?L>0?L:0:ut,t[25]=L,t[26]=ut,t[27]=Z):Z=t[27];const l=Ue.linear().domain([p,Z]).range([h,0]).nice(),Mt=De.line().x(e=>r(e.date)).y(e=>l(e.y)).curve(ie),yt=l.ticks(Bt),Vt=r.ticks(At);w.useEffect(()=>{const e=P=>{const Wt=a[ze.bisectCenter(a.map(ui),r.invert(Je.pointer(P)[0]),0)];m(Wt||a[a.length-1]),Lt?.(Wt||a[a.length-1]),qt(P.clientY),Zt(P.clientX)},g=()=>{m(void 0),Zt(void 0),qt(void 0),Lt?.(void 0)};Be.select(z.current).on("mousemove",e).on("mouseout",g)},[r,a,Lt]);const It=Le.linearRegression(a.filter(ci).map(e=>[r(e.date),l(e.y)])),Ft=Le.linearRegressionLine(It);let _;t[28]!==o||t[29]!==h||t[30]!==u||t[31]!==gt||t[32]!==x||t[33]!==r?(_=n.jsxRuntimeExports.jsx(Ye.HighlightArea,{areaSettings:gt,width:u,height:h,scale:r,animate:o,isInView:x}),t[28]=o,t[29]=h,t[30]=u,t[31]=gt,t[32]=x,t[33]=r,t[34]=_):_=t[34];const vt=d?.yAxis?.gridLines,jt=d?.yAxis?.labels;let tt;t[35]!==vt||t[36]!==jt?(tt={gridLines:vt,labels:jt},t[35]=vt,t[36]=jt,t[37]=tt):tt=t[37];const Rt=f?.yAxis?.gridLines,et=f?.yAxis?.labels;let it;t[38]!==Rt||t[39]!==et?(it={gridLines:Rt,labels:et},t[38]=Rt,t[39]=et,t[40]=it):it=t[40];const H=l(p<0?0:p),_t=l(p<0?0:p),nt=0-C,te=u+v.right,wt=p<0?0:p;let G;t[41]!==M||t[42]!==$||t[43]!==E||t[44]!==wt?(G=Se.numberFormattingFunction(wt,"NA",M,$,E),t[41]=M,t[42]=$,t[43]=E,t[44]=wt,t[45]=G):G=t[45];const st=0-C,ot=l(p<0?0:p),Et=L<0?"1em":-5;let S;t[46]!==st||t[47]!==ot||t[48]!==Et?(S={x:st,y:ot,dx:0,dy:Et},t[46]=st,t[47]=ot,t[48]=Et,t[49]=S):S=t[49];const D=f?.xAxis?.axis,q=f?.yAxis?.labels;let R;t[50]!==D||t[51]!==q?(R={axis:D,label:q},t[50]=D,t[51]=q,t[52]=R):R=t[52];const N=d?.xAxis?.axis,T=d?.yAxis?.labels;let A;t[53]!==N||t[54]!==T?(A={axis:N,label:T},t[53]=N,t[54]=T,t[55]=A):A=t[55];let Ot;t[56]!==H||t[57]!==_t||t[58]!==nt||t[59]!==te||t[60]!==G||t[61]!==S||t[62]!==R||t[63]!==A?(Ot=n.jsxRuntimeExports.jsx(Ie.Axis,{y1:H,y2:_t,x1:nt,x2:te,label:G,labelPos:S,classNames:R,styles:A}),t[56]=H,t[57]=_t,t[58]=nt,t[59]=te,t[60]=G,t[61]=S,t[62]=R,t[63]=A,t[64]=Ot):Ot=t[64];const Ht=0-C-15,ye=h/2,ve=d?.yAxis?.title,je=f?.yAxis?.title;let ne;t[65]!==Ht||t[66]!==ye||t[67]!==ve||t[68]!==je||t[69]!==X?(ne=n.jsxRuntimeExports.jsx(Fe.AxisTitle,{x:Ht,y:ye,style:ve,className:je,text:X,rotate90:!0}),t[65]=Ht,t[66]=ye,t[67]=ve,t[68]=je,t[69]=X,t[70]=ne):ne=t[70];let se;t[71]!==s?(se=e=>j.format(e,s),t[71]=s,t[72]=se):se=t[72];const Ne=Vt.map(se),Te=Vt.map(e=>r(e)),Re=d?.xAxis?.gridLines,we=d?.xAxis?.labels;let oe;t[73]!==Re||t[74]!==we?(oe={gridLines:Re,labels:we},t[73]=Re,t[74]=we,t[75]=oe):oe=t[75];const Ee=f?.xAxis?.gridLines;let Gt;t[76]!==Ee?(Gt=n.mo("opacity-0",Ee),t[76]=Ee,t[77]=Gt):Gt=t[77];const Oe=f?.xAxis?.labels;let Pt;t[78]!==Oe?(Pt=n.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",Oe),t[78]=Oe,t[79]=Pt):Pt=t[79];let re;t[80]!==Gt||t[81]!==Pt?(re={gridLines:Gt,labels:Pt},t[80]=Gt,t[81]=Pt,t[82]=re):re=t[82];let ae;t[83]!==V?(ae=V.filter(ri).map(oi),t[83]=V,t[84]=ae):ae=t[84];let le;t[85]!==Y||t[86]!==xt?(le={stroke:Y,fill:"none",strokeWidth:xt},t[85]=Y,t[86]=xt,t[87]=le):le=t[87];let ce;t[88]!==o.duration?(ce={opacity:0,transition:{duration:o.duration}},t[88]=o.duration,t[89]=ce):ce=t[89];const be=a.map((e,g)=>n.jsxRuntimeExports.jsx(ee.motion.g,{children:bt.checkIfNullOrUndefined(e.y)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[Dt?n.jsxRuntimeExports.jsx(ee.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,cx:r(e.date),cy:l(e.y),fill:Y},whileInView:{opacity:1,fill:Y,transition:{duration:b?o.duration:.5,delay:b?0:o.duration},cx:r(e.date),cy:l(e.y)}},initial:"initial",animate:x?"whileInView":"initial"}):null,O?n.jsxRuntimeExports.jsx(ee.motion.text,{dy:-8,style:{textAnchor:"middle",...d?.graphObjectValues||{}},className:n.mo("graph-value text-xs font-bold",f?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,x:r(e.date),y:l(e.y)},whileInView:{opacity:1,x:r(e.date),y:l(e.y),transition:{duration:b?o.duration:.5,delay:b?0:o.duration}}},initial:"initial",animate:x?"whileInView":"initial",children:Se.numberFormattingFunction(e.y,"NA",M,$,E)}):null]})},g));let ue;t[90]!==be?(ue=n.jsxRuntimeExports.jsx("g",{children:be}),t[90]=be,t[91]=ue):ue=t[91];const Ae=Ut.map((e,g)=>{const P=ke.getLineEndPoint({x:e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,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?r(j.parse(`${e.xCoordinate}`,s,new Date)):0,y:e.yCoordinate?l(e.yCoordinate):0},bt.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),Wt=e.showConnector?{y1:P.y,x1:P.x,y2:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,new Date))+(e.xOffset||0):0+(e.xOffset||0),cy:e.yCoordinate?l(e.yCoordinate):0,cx:e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,new Date)):0,circleRadius:bt.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,$e={y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:St?0:e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:St?e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,new Date))+(e.xOffset||0):0+(e.xOffset||0):u+v.right-(e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return n.jsxRuntimeExports.jsx(ke.Annotation,{color:e.color,connectorsSettings:Wt,labelSettings:$e,text:e.text,classNames:e.classNames,styles:e.styles,animate:o,isInView:x},g)});let xe;t[92]!==Ae?(xe=n.jsxRuntimeExports.jsx("g",{children:Ae}),t[92]=Ae,t[93]=xe):xe=t[93];const Ce=ft?n.jsxRuntimeExports.jsx(Pe.RegressionLine,{x1:0,x2:u,y1:Ft(0),y2:Ft(u),graphHeight:h,graphWidth:u,className:f?.regLine,style:d?.regLine,color:typeof ft=="string"?ft:void 0,animate:o,isInView:x}):null;let me;t[94]!==Ce?(me=n.jsxRuntimeExports.jsx("g",{children:Ce}),t[94]=Ce,t[95]=me):me=t[95];let fe;t[96]!==V?(fe=V.filter(si).map(ni),t[96]=V,t[97]=fe):fe=t[97];let pe;t[98]===Symbol.for("react.memo_cache_sentinel")?(pe={fill:"none",pointerEvents:"all"},t[98]=pe):pe=t[98];let de;t[99]!==z||t[100]!==h||t[101]!==u?(de=n.jsxRuntimeExports.jsx("rect",{ref:z,style:pe,width:u,height:h}),t[99]=z,t[100]=h,t[101]=u,t[102]=de):de=t[102];let he;return t[103]!==f?.tooltip||t[104]!==c||t[105]!==F||t[106]!==k||t[107]!==d?.tooltip||t[108]!==ct?(he=k&&ct&&c&&F?n.jsxRuntimeExports.jsx(Ve.Tooltip,{data:k,body:ct,xPos:c,yPos:F,backgroundStyle:d?.tooltip,className:f?.tooltip}):null,t[103]=f?.tooltip,t[104]=c,t[105]=F,t[106]=k,t[107]=d?.tooltip,t[108]=ct,t[109]=he):he=t[109],n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(ee.motion.svg,{width:`${W}px`,height:`${rt}px`,viewBox:`0 0 ${W} ${rt}`,direction:"ltr",ref:Kt,children:n.jsxRuntimeExports.jsxs("g",{transform:`translate(${v.left},${v.top})`,children:[_,n.jsxRuntimeExports.jsx(ke.CustomArea,{areaSettings:Nt,scaleX:r,scaleY:l,animate:o,isInView:x}),n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx(We.YTicksAndGridLines,{values:yt.filter(li),y:yt.filter(ai).map(e=>l(e)),x1:0-C,x2:u+v.right,styles:tt,classNames:it,suffix:E,prefix:$,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:M}),Ot,ne]}),n.jsxRuntimeExports.jsx(He.XTicksAndGridLines,{values:Ne,x:Te,y1:0,y2:h,styles:oe,classNames:re,suffix:E,prefix:$,labelType:"primary",showGridLines:!0,precision:M}),ae,n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx(ee.motion.path,{style:le,exit:ce,variants:{initial:{pathLength:0,d:Mt(a)||"",opacity:1},whileInView:{pathLength:1,d:Mt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:x?"whileInView":"initial"}),k?n.jsxRuntimeExports.jsx("line",{y1:0,y2:h,x1:r(k.date),x2:r(k.date),className:n.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",f?.mouseOverLine),style:d?.mouseOverLine}):null]}),ue,Yt?n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:Yt.map((e,g)=>n.jsxRuntimeExports.jsx(Ge.RefLineY,{text:e.text,color:e.color,y:l(e.value),x1:0-C,x2:u+v.right,classNames:e.classNames,styles:e.styles,animate:o,isInView:x},g))}):null,xe,me,fe,de]})}),he]})}function ni(i){return i.layer}function si(i){return i.position==="after"}function oi(i){return i.layer}function ri(i){return i.position==="before"}function ai(i){return i!==0}function li(i){return i!==0}function ci(i){return!bt.checkIfNullOrUndefined(i.date)&&!bt.checkIfNullOrUndefined(i.y)}function ui(i){return i.date}function xi(i){return i!=null}function mi(i){return i.y}function fi(i){return i!=null}function pi(i){return i.y}function di(i){return i!=null}function hi(i){return i.y}function gi(i){return i!=null}function yi(i){return i.y}function vi(i){return i!=null}function ji(i){return i.y}function Ri(i){const t=n.compilerRuntimeExports.c(88),{data:y,graphTitle:W,lineColor:rt,suffix:Y,sources:E,prefix:$,graphDescription:s,height:at,width:O,footNote:At,noOfXTicks:Ct,dateFormat:C,showValues:kt,padding:lt,backgroundColor:ct,leftMargin:Lt,rightMargin:Yt,topMargin:Xt,bottomMargin:ut,relativeHeight:o,tooltip:St,onSeriesMouseOver:xt,highlightAreaSettings:Dt,graphID:Ut,minValue:mt,maxValue:ft,maxDate:X,minDate:Bt,graphDownload:zt,dataDownload:Jt,animate:pt,language:d,refValues:f,minHeight:M,strokeWidth:V,showDots:Kt,annotations:I,customHighlightAreaSettings:x,theme:b,ariaLabel:Qt,regressionLine:dt,yAxisTitle:U,noOfYTicks:ie,curveType:k,styles:m,classNames:c,precision:Zt,customLayers:F}=i,qt=Y===void 0?"":Y,ht=$===void 0?"":$,B=Ct===void 0?10:Ct,v=C===void 0?"yyyy":C,z=kt===void 0?!1:kt,J=ct===void 0?!1:ct,a=Lt===void 0?30:Lt,K=Yt===void 0?30:Yt,gt=Xt===void 0?20:Xt,Q=ut===void 0?25:ut;let Nt;t[0]!==Dt?(Nt=Dt===void 0?[]:Dt,t[0]=Dt,t[1]=Nt):Nt=t[1];const u=Nt,h=zt===void 0?!1:zt,Tt=Jt===void 0?!1:Jt,$t=pt===void 0?!1:pt,p=d===void 0?"en":d;let L;t[2]!==f?(L=f===void 0?[]:f,t[2]=f,t[3]=L):L=t[3];const r=L,Z=M===void 0?0:M,l=V===void 0?2:V,Mt=Kt===void 0?!0:Kt;let yt;t[4]!==I?(yt=I===void 0?[]:I,t[4]=I,t[5]=yt):yt=t[5];const Vt=yt;let It;t[6]!==x?(It=x===void 0?[]:x,t[6]=x,t[7]=It):It=t[7];const Ft=It,_=b===void 0?"light":b,vt=dt===void 0?!1:dt,jt=ie===void 0?5:ie,tt=k===void 0?"curve":k,Rt=Zt===void 0?2:Zt;let et;t[8]!==F?(et=F===void 0?[]:F,t[8]=F,t[9]=et):et=t[9];const it=et,[H,_t]=w.useState(0),[nt,te]=w.useState(0),wt=w.useRef(null),G=w.useRef(null);let st,ot;t[10]===Symbol.for("react.memo_cache_sentinel")?(st=()=>{const Ot=new ResizeObserver(Ht=>{_t(Ht[0].target.clientWidth||620),te(Ht[0].target.clientHeight||480)});return wt.current&&Ot.observe(wt.current),()=>Ot.disconnect()},ot=[],t[10]=st,t[11]=ot):(st=t[10],ot=t[11]),w.useEffect(st,ot);const Et=c?.graphContainer,S=m?.graphContainer;let D;t[12]!==c?.description||t[13]!==c?.title||t[14]!==y||t[15]!==Tt||t[16]!==s||t[17]!==h||t[18]!==W||t[19]!==m?.description||t[20]!==m?.title||t[21]!==O?(D=W||s||h||Tt?n.jsxRuntimeExports.jsx(Ze.GraphHeader,{styles:{title:m?.title,description:m?.description},classNames:{title:c?.title,description:c?.description},graphTitle:W,graphDescription:s,width:O,graphDownload:h?G:void 0,dataDownload:Tt?y.map(Ai).filter(bi).length>0?y.map(Oi).filter(Ei):y.filter(wi):null}):null,t[12]=c?.description,t[13]=c?.title,t[14]=y,t[15]=Tt,t[16]=s,t[17]=h,t[18]=W,t[19]=m?.description,t[20]=m?.title,t[21]=O,t[22]=D):D=t[22];let q;t[23]!==y.length?(q=y.length===0&&n.jsxRuntimeExports.jsx(ti.EmptyState,{}),t[23]=y.length,t[24]=q):q=t[24];let R;t[25]!==$t||t[26]!==Vt||t[27]!==Q||t[28]!==c||t[29]!==tt||t[30]!==Ft||t[31]!==it||t[32]!==y||t[33]!==v||t[34]!==u||t[35]!==p||t[36]!==a||t[37]!==rt||t[38]!==X||t[39]!==ft||t[40]!==Bt||t[41]!==mt||t[42]!==B||t[43]!==jt||t[44]!==xt||t[45]!==Rt||t[46]!==ht||t[47]!==r||t[48]!==vt||t[49]!==K||t[50]!==Mt||t[51]!==z||t[52]!==l||t[53]!==m||t[54]!==qt||t[55]!==nt||t[56]!==H||t[57]!==St||t[58]!==gt||t[59]!==U?(R=H&&nt&&y.length>0?n.jsxRuntimeExports.jsx(ii,{data:y,lineColor:rt||_e.Colors.primaryColors["blue-600"],width:H,height:nt,suffix:qt,prefix:ht,dateFormat:v,showValues:z,noOfXTicks:B??ei.getNoOfTicks(H),leftMargin:a,rightMargin:K,topMargin:gt,bottomMargin:Q,tooltip:St,highlightAreaSettings:u,onSeriesMouseOver:xt,refValues:r,minValue:mt,maxValue:ft,animate:$t===!0?{duration:.5,once:!0,amount:.5}:$t||{duration:0,once:!0,amount:0},rtl:p==="he"||p==="ar",strokeWidth:l,showDots:Mt,annotations:Vt,customHighlightAreaSettings:Ft,regressionLine:vt,yAxisTitle:U,noOfYTicks:jt,maxDate:X,minDate:Bt,curveType:tt,styles:m,classNames:c,precision:Rt,customLayers:it}):null,t[25]=$t,t[26]=Vt,t[27]=Q,t[28]=c,t[29]=tt,t[30]=Ft,t[31]=it,t[32]=y,t[33]=v,t[34]=u,t[35]=p,t[36]=a,t[37]=rt,t[38]=X,t[39]=ft,t[40]=Bt,t[41]=mt,t[42]=B,t[43]=jt,t[44]=xt,t[45]=Rt,t[46]=ht,t[47]=r,t[48]=vt,t[49]=K,t[50]=Mt,t[51]=z,t[52]=l,t[53]=m,t[54]=qt,t[55]=nt,t[56]=H,t[57]=St,t[58]=gt,t[59]=U,t[60]=R):R=t[60];let N;t[61]!==q||t[62]!==R?(N=n.jsxRuntimeExports.jsxs(qe.GraphArea,{ref:wt,children:[q,R]}),t[61]=q,t[62]=R,t[63]=N):N=t[63];let T;t[64]!==c?.footnote||t[65]!==c?.source||t[66]!==At||t[67]!==E||t[68]!==m?.footnote||t[69]!==m?.source||t[70]!==O?(T=E||At?n.jsxRuntimeExports.jsx(Qe.GraphFooter,{styles:{footnote:m?.footnote,source:m?.source},classNames:{footnote:c?.footnote,source:c?.source},sources:E,footNote:At,width:O}):null,t[64]=c?.footnote,t[65]=c?.source,t[66]=At,t[67]=E,t[68]=m?.footnote,t[69]=m?.source,t[70]=O,t[71]=T):T=t[71];let A;return t[72]!==Qt||t[73]!==J||t[74]!==Ut||t[75]!==at||t[76]!==p||t[77]!==Z||t[78]!==lt||t[79]!==o||t[80]!==Et||t[81]!==S||t[82]!==D||t[83]!==N||t[84]!==T||t[85]!==_||t[86]!==O?(A=n.jsxRuntimeExports.jsxs(qe.GraphContainer,{className:Et,style:S,id:Ut,ref:G,"aria-label":Qt,backgroundColor:J,theme:_,language:p,minHeight:Z,width:O,height:at,relativeHeight:o,padding:lt,children:[D,N,T]}),t[72]=Qt,t[73]=J,t[74]=Ut,t[75]=at,t[76]=p,t[77]=Z,t[78]=lt,t[79]=o,t[80]=Et,t[81]=S,t[82]=D,t[83]=N,t[84]=T,t[85]=_,t[86]=O,t[87]=A):A=t[87],A}function wi(i){return i!==void 0}function Ei(i){return i!==void 0}function Oi(i){return i.data}function bi(i){return i!==void 0}function Ai(i){return i.data}exports.SimpleLineChart=Ri;
2
2
  //# sourceMappingURL=SimpleLineChart.cjs.map
@@ -7,7 +7,7 @@ import { n as Se } from "./numberFormattingFunction-14YCbkN2.js";
7
7
  import { T as We } from "./Tooltip-BRnAz2Gv.js";
8
8
  import { c as Ot } from "./checkIfNullOrUndefined-DmfiKkNw.js";
9
9
  import { g as Ye, A as Xe, C as Ge } from "./customArea-ASDaSE4u.js";
10
- import { A as Pe } from "./Axis-DoOqnt6g.js";
10
+ import { A as Pe } from "./Axis-D56Gy0se.js";
11
11
  import { A as Ee } from "./AxisTitle-VFq89Olw.js";
12
12
  import { X as Be } from "./XTicksAndGridLines-CVZkZkpS.js";
13
13
  import { a as ze } from "./ReferenceLine-DgtoRgw0.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-CHPV5EwG-6v2a2njQ.cjs"),o=require("react"),te=require("./index-CyZ1lmi_.cjs"),q=require("./index-BS2TADPj.cjs"),le=require("./index-DQA8q5sC.cjs"),C=require("./DropdownSelect-NNpOs7DX.cjs"),d=require("./checkIfMultiple-DxnGtm3t.cjs"),ne=require("./Spinner-jTMOLuw_.cjs"),ie=require("./GraphContainer-B1EDxJ0S.cjs"),re=require("./GraphEl-CBZdcvb7.cjs"),$=require("./fetchAndParseData-QTF6tjij.cjs"),U=require("./transformDataForAggregation-BFdha9Dx.cjs"),z=require("./getUniqValue-NX8DgwND.cjs"),se=require("./GraphHeader.cjs"),W=require("./filterData-T5DQBE9b.cjs"),oe=require("./getGraphList-DQ24IzAn.cjs"),J=require("./transformDataForSelect-YmStusCI.cjs"),ue=u=>{if(u.findIndex(n=>n.chartConfigId==="yMin")!==-1&&u.findIndex(n=>n.chartConfigId==="yMax")!==-1)return u;const i=[...u];return u.findIndex(n=>n.chartConfigId==="yMin")===-1&&i.push({chartConfigId:"yMin",columnId:`${u[u.findIndex(n=>n.chartConfigId==="y")].columnId}Min`}),u.findIndex(n=>n.chartConfigId==="yMax")===-1&&i.push({chartConfigId:"yMax",columnId:`${u[u.findIndex(n=>n.chartConfigId==="y")].columnId}Max`}),i},M=(u,i)=>{const n=i?.map(D=>{const b=u?.findIndex(s=>s.chartConfigId===D.chartConfigId);if(b===-1)return{};const w=u[b]?.allowedColumnIds?.findIndex(s=>s.value===D.columnId);return w===-1?{}:u[b].allowedColumnIds[w].graphSettings||{}})||[];return Object.assign({},...n)};function de(u){const{graphSettings:i,dataSettings:n,filters:D,graphType:b,dataTransform:w,graphDataConfiguration:s,dataFilters:A,debugMode:S,dataSelectionOptions:I,advancedDataSelectionOptions:N,readableHeader:B,noOfFiltersPerRow:p=4,updateFilters:K,uiMode:f="normal",highlightDataPointSettings:m}=u,[P,F]=o.useState(void 0),[c,Q]=o.useState(void 0),[v,j]=o.useState(s),[x,V]=o.useState({}),[E,X]=o.useState(void 0),[Y,Z]=o.useState([]),H=o.useRef(null),O=o.useRef(s),[R,k]=o.useState([]),G={ignoreCase:!0,ignoreAccents:!0,trim:!0},L=o.useEffectEvent(()=>{const e=(D||[]).map(r=>({filter:r.column,label:r.label||`Filter by ${r.column}`,singleSelect:r.singleSelect,clearable:r.clearable,ui:r.ui,defaultValue:J.transformDefaultValue(r.defaultValue),value:J.transformDefaultValue(r.defaultValue),availableValues:z.getUniqValue(c,r.column).filter(a=>!r.excludeValues?.includes(`${a}`)).map(a=>({value:a,label:a})),allowSelectAll:r.allowSelectAll,width:r.width}));k(e)});o.useEffect(()=>{(async()=>{try{const r=n.dataURL?typeof n.dataURL=="string"?n.fileType==="json"?await $.fetchAndParseJSON(n.dataURL,n.columnsToArray,n.dataTransformation,S):n.fileType==="api"?await $.fetchAndTransformDataFromAPI(n.dataURL,n.apiHeaders,n.columnsToArray,n.dataTransformation,S):await $.fetchAndParseCSV(n.dataURL,n.dataTransformation,n.columnsToArray,S,n.delimiter,!0):await $.fetchAndParseMultipleDataSources(n.dataURL,n.idColumnTitle):await $.transformColumnsToArray(n.data,n.columnsToArray);Q(r)}catch(r){console.error("Data fetching error:",r)}})(),L()},[n,S]),o.useEffect(()=>{L()},[D,c]);const _=o.useEffectEvent(()=>{if(!c||R.length===0)F(c);else{const e=c.filter(r=>R.every(a=>a.value&&q.flattenDeep([a.value]).length>0?te.intersection(q.flattenDeep([r[a.filter]]),q.flattenDeep([a.value]).map(t=>t.value)).length>0:!0));F(e)}});o.useEffect(()=>{_()},[R,c]),o.useEffect(()=>{I&&V(M(I,s))},[I,s]);const ee=o.useEffectEvent(()=>{m?.column&&P&&Z(z.getUniqValue(P,m.column).filter(e=>!m?.excludeValues?.includes(`${e}`)).map(e=>({value:e,label:e})))});o.useEffect(()=>{ee()},[m]),o.useEffect(()=>{le.isEqual(O.current,s)||(j(s),O.current=s)},[s]);const y=(e,r)=>{k(a=>a.map(t=>t.filter===e?{...t,value:r}:t))},ae=c?U.transformDataForGraph(w?U.transformDataForAggregation(W.filterData(c,A||[]),w.keyColumn,w.aggregationColumnsSetting):W.filterData(c,A||[]),b,b==="lineChartWithConfidenceInterval"&&v?ue(v):v):void 0;return l.jsxRuntimeExports.jsx(ie.GraphContainer,{className:i?.classNames?.graphContainer,style:i?.styles?.graphContainer,id:i?.graphID,ref:H,"aria-label":i?.ariaLabel,backgroundColor:i?.backgroundColor??!1,theme:i?.theme||"light",language:i?.language||"en",width:i?.width,height:i?.height,padding:i?.padding,minHeight:i?.minHeight,relativeHeight:i?.relativeHeight,children:c||oe.graphList.filter(e=>e.geoHubMapPresentation).map(e=>e.graphID).indexOf(b)!==-1?l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[x?.graphTitle||x?.graphDescription||i?.graphTitle||i?.graphDescription||i?.graphDownload||i?.dataDownload?l.jsxRuntimeExports.jsx(se.GraphHeader,{styles:{title:x?.styles?.title||i?.styles?.title,description:x?.styles?.description||i?.styles?.description},classNames:{title:x?.classNames?.title||i?.classNames?.title,description:x?.classNames?.description||i?.classNames?.description},graphTitle:x?.graphTitle||i?.graphTitle,graphDescription:x?.graphDescription||i?.graphDescription,width:x?.width||i?.width,graphDownload:i?.graphDownload?H:void 0,dataDownload:i?.dataDownload&&c&&c.length>0?c:null}):null,R.length!==0||(I||[]).length!==0||(N||[]).length!==0||m?l.jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap items-start gap-x-4 gap-y-0 w-full",children:[N?.map((e,r)=>l.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:e.width?0:1,flexShrink:e.ui!=="radio"||e.width?0:1,minWidth:"240px"},className:"pb-4",children:[l.jsxRuntimeExports.jsx(d.b,{className:"mb-2",children:e.label||"Graph by"}),e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.options.map(a=>({...a,value:a.label})),size:"sm",isClearable:!1,isSearchable:!0,variant:f,controlShouldRenderValue:!0,defaultValue:e.defaultValue?{...e.defaultValue,value:e.defaultValue?.label}:{...e.options[0],value:e.options[0].label},onChange:a=>{V(a?.graphSettings||{}),j(a?.dataConfiguration)}}):l.jsxRuntimeExports.jsx(d.ye,{defaultValue:e.defaultValue?.label||e.options[0].label,variant:f,onValueChange:a=>{const t=e.options[e.options.findIndex(g=>g.label===a)];V(t.graphSettings||{}),j(t.dataConfiguration)},children:e.options.map((a,t)=>l.jsxRuntimeExports.jsx(d.he,{label:a.label,value:a.label},t))})]},r)),I?.map((e,r)=>l.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:e.width?0:1,flexShrink:e.ui!=="radio"||e.width?0:1,minWidth:"240px"},className:"pb-4",children:[l.jsxRuntimeExports.jsx(d.b,{className:"mb-2",children:e.label||`Visualize ${e.chartConfigId} by`}),d.checkIfMultiple(e.chartConfigId,v||[])?e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.allowedColumnIds,size:"sm",isMulti:!0,isSearchable:!0,variant:f,controlShouldRenderValue:!0,defaultValue:s?s[s.findIndex(a=>a.chartConfigId===e.chartConfigId)].columnId.map(a=>e.allowedColumnIds[e.allowedColumnIds.findIndex(t=>t.value===a)]):void 0,filterOption:C.Du(G),onChange:a=>{const t={columnId:(a||[]).map(h=>h.value),chartConfigId:e.chartConfigId},g=v?.map(h=>h.chartConfigId===t.chartConfigId?t:h);j(g)}}):l.jsxRuntimeExports.jsx(d.$,{variant:f,defaultValue:s?s[s.findIndex(a=>a.chartConfigId===e.chartConfigId)].columnId.map(a=>e.allowedColumnIds[e.allowedColumnIds.findIndex(t=>t.value===a)]).map(a=>a.value):[],onValueChange:a=>{const t={columnId:a||[],chartConfigId:e.chartConfigId},g=v?.map(h=>h.chartConfigId===t.chartConfigId?t:h);j(g)},children:e.allowedColumnIds.map((a,t)=>l.jsxRuntimeExports.jsx(d.P,{label:a.label,value:a.label},t))}):e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.allowedColumnIds,size:"sm",isClearable:!1,isSearchable:!0,variant:f,controlShouldRenderValue:!0,defaultValue:s?e.allowedColumnIds[e.allowedColumnIds.findIndex(a=>a.value===s[s.findIndex(t=>t.chartConfigId===e.chartConfigId)].columnId)]:void 0,onChange:a=>{const t={columnId:a?.value,chartConfigId:e.chartConfigId},g=v?.map(h=>h.chartConfigId===t.chartConfigId?t:h);V(M(I,g)),j(g)}}):l.jsxRuntimeExports.jsx(d.ye,{variant:f,defaultValue:s?e.allowedColumnIds[e.allowedColumnIds.findIndex(a=>a.value===s[s.findIndex(t=>t.chartConfigId===e.chartConfigId)].columnId)].label:"",onValueChange:a=>{const g={columnId:e.allowedColumnIds[e.allowedColumnIds.findIndex(T=>T.label===a)].value,chartConfigId:e.chartConfigId},h=v?.map(T=>T.chartConfigId===g.chartConfigId?g:T);V(M(I,h)),j(h)},children:e.allowedColumnIds.map((a,t)=>l.jsxRuntimeExports.jsx(d.he,{label:a.label,value:a.label},t))})]},r)),R?.map((e,r)=>l.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:e.width?0:1,flexShrink:0,minWidth:"240px"},className:"pb-4",children:[l.jsxRuntimeExports.jsx(d.b,{className:"mb-2",children:e.label}),e.singleSelect?e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.availableValues,variant:f,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:C.Du(G),onChange:a=>{y(e.filter,a)},value:e.value,defaultValue:e.defaultValue}):l.jsxRuntimeExports.jsx(d.ye,{variant:f,defaultValue:e.defaultValue.value,onValueChange:a=>{y(e.filter,e.availableValues.filter(t=>t.value===a))},children:e.availableValues.map((a,t)=>l.jsxRuntimeExports.jsx(d.he,{label:`${a.label}`,value:`${a.value}`},t))}):l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.availableValues,variant:f,size:"sm",isMulti:!0,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:C.Du(G),onChange:a=>{y(e.filter,a)},value:e.value,defaultValue:e.defaultValue}):l.jsxRuntimeExports.jsx(d.$,{variant:f,defaultValue:e.defaultValue?e.defaultValue.map(a=>`${a.value}`):[],value:e.value?e.value.map(a=>`${a.value}`):void 0,onValueChange:a=>{y(e.filter,e.availableValues.filter(t=>a.indexOf(`${t.value}`)!==-1))},children:e.availableValues.map((a,t)=>l.jsxRuntimeExports.jsx(d.P,{label:`${a.label}`,value:`${a.value}`},t))}),e.allowSelectAll?l.jsxRuntimeExports.jsx("button",{type:"button",className:"bg-transparent border-0 p-0 mt-2 cursor-pointer text-primary-blue-600 dark:text-primary-blue-400",onClick:()=>{y(e.filter,e.availableValues)},children:"Select all options"}):null]})]},r)),m?l.jsxRuntimeExports.jsxs("div",{style:{width:m.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:m.width?0:1,flexShrink:0,minWidth:"240px"},className:"pb-4",children:[l.jsxRuntimeExports.jsx(d.b,{className:"mb-2",children:m.label||"Highlight data"}),l.jsxRuntimeExports.jsx(C.ja,{options:Y,variant:f,size:"sm",isMulti:!0,isClearable:!0,isSearchable:!0,controlShouldRenderValue:!0,filterOption:C.Du(G),onChange:e=>{X(e?.map(r=>r.value))},value:E?.map(e=>({label:e,value:e})),defaultValue:m.defaultValues?.map(e=>({label:e,value:e}))})]}):null]}):null,l.jsxRuntimeExports.jsx(re.GraphEl,{graph:b,graphData:ae,graphDataConfiguration:v,debugMode:S,readableHeader:B||[],updateFilters:K,settings:{...i||{},...x,graphTitle:void 0,graphDescription:void 0,graphDownload:!1,dataDownload:!1,backgroundColor:void 0,width:void 0,height:void 0,relativeHeight:void 0,minHeight:void 0,padding:"0",theme:i?.theme,...E?{highlightedDataPoints:E,highlightedIds:E?.map(e=>`${e}`),highlightedLines:E?.map(e=>e)}:{}}})]}):l.jsxRuntimeExports.jsx("div",{className:"w-full flex justify-center p-4",children:l.jsxRuntimeExports.jsx(ne.w,{})})})}exports.SingleGraphDashboard=de;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-CHPV5EwG-6v2a2njQ.cjs"),o=require("react"),te=require("./index-CyZ1lmi_.cjs"),q=require("./index-BS2TADPj.cjs"),le=require("./index-DQA8q5sC.cjs"),C=require("./DropdownSelect-NNpOs7DX.cjs"),d=require("./checkIfMultiple-DxnGtm3t.cjs"),ne=require("./Spinner-jTMOLuw_.cjs"),ie=require("./GraphContainer-B1EDxJ0S.cjs"),re=require("./GraphEl-BZbunD1_.cjs"),$=require("./fetchAndParseData-QTF6tjij.cjs"),U=require("./transformDataForAggregation-BFdha9Dx.cjs"),z=require("./getUniqValue-NX8DgwND.cjs"),se=require("./GraphHeader.cjs"),W=require("./filterData-T5DQBE9b.cjs"),oe=require("./getGraphList-DQ24IzAn.cjs"),J=require("./transformDataForSelect-YmStusCI.cjs"),ue=u=>{if(u.findIndex(n=>n.chartConfigId==="yMin")!==-1&&u.findIndex(n=>n.chartConfigId==="yMax")!==-1)return u;const i=[...u];return u.findIndex(n=>n.chartConfigId==="yMin")===-1&&i.push({chartConfigId:"yMin",columnId:`${u[u.findIndex(n=>n.chartConfigId==="y")].columnId}Min`}),u.findIndex(n=>n.chartConfigId==="yMax")===-1&&i.push({chartConfigId:"yMax",columnId:`${u[u.findIndex(n=>n.chartConfigId==="y")].columnId}Max`}),i},M=(u,i)=>{const n=i?.map(D=>{const b=u?.findIndex(s=>s.chartConfigId===D.chartConfigId);if(b===-1)return{};const w=u[b]?.allowedColumnIds?.findIndex(s=>s.value===D.columnId);return w===-1?{}:u[b].allowedColumnIds[w].graphSettings||{}})||[];return Object.assign({},...n)};function de(u){const{graphSettings:i,dataSettings:n,filters:D,graphType:b,dataTransform:w,graphDataConfiguration:s,dataFilters:A,debugMode:S,dataSelectionOptions:I,advancedDataSelectionOptions:N,readableHeader:B,noOfFiltersPerRow:p=4,updateFilters:K,uiMode:f="normal",highlightDataPointSettings:m}=u,[P,F]=o.useState(void 0),[c,Q]=o.useState(void 0),[v,j]=o.useState(s),[x,V]=o.useState({}),[E,X]=o.useState(void 0),[Y,Z]=o.useState([]),H=o.useRef(null),O=o.useRef(s),[R,k]=o.useState([]),G={ignoreCase:!0,ignoreAccents:!0,trim:!0},L=o.useEffectEvent(()=>{const e=(D||[]).map(r=>({filter:r.column,label:r.label||`Filter by ${r.column}`,singleSelect:r.singleSelect,clearable:r.clearable,ui:r.ui,defaultValue:J.transformDefaultValue(r.defaultValue),value:J.transformDefaultValue(r.defaultValue),availableValues:z.getUniqValue(c,r.column).filter(a=>!r.excludeValues?.includes(`${a}`)).map(a=>({value:a,label:a})),allowSelectAll:r.allowSelectAll,width:r.width}));k(e)});o.useEffect(()=>{(async()=>{try{const r=n.dataURL?typeof n.dataURL=="string"?n.fileType==="json"?await $.fetchAndParseJSON(n.dataURL,n.columnsToArray,n.dataTransformation,S):n.fileType==="api"?await $.fetchAndTransformDataFromAPI(n.dataURL,n.apiHeaders,n.columnsToArray,n.dataTransformation,S):await $.fetchAndParseCSV(n.dataURL,n.dataTransformation,n.columnsToArray,S,n.delimiter,!0):await $.fetchAndParseMultipleDataSources(n.dataURL,n.idColumnTitle):await $.transformColumnsToArray(n.data,n.columnsToArray);Q(r)}catch(r){console.error("Data fetching error:",r)}})(),L()},[n,S]),o.useEffect(()=>{L()},[D,c]);const _=o.useEffectEvent(()=>{if(!c||R.length===0)F(c);else{const e=c.filter(r=>R.every(a=>a.value&&q.flattenDeep([a.value]).length>0?te.intersection(q.flattenDeep([r[a.filter]]),q.flattenDeep([a.value]).map(t=>t.value)).length>0:!0));F(e)}});o.useEffect(()=>{_()},[R,c]),o.useEffect(()=>{I&&V(M(I,s))},[I,s]);const ee=o.useEffectEvent(()=>{m?.column&&P&&Z(z.getUniqValue(P,m.column).filter(e=>!m?.excludeValues?.includes(`${e}`)).map(e=>({value:e,label:e})))});o.useEffect(()=>{ee()},[m]),o.useEffect(()=>{le.isEqual(O.current,s)||(j(s),O.current=s)},[s]);const y=(e,r)=>{k(a=>a.map(t=>t.filter===e?{...t,value:r}:t))},ae=c?U.transformDataForGraph(w?U.transformDataForAggregation(W.filterData(c,A||[]),w.keyColumn,w.aggregationColumnsSetting):W.filterData(c,A||[]),b,b==="lineChartWithConfidenceInterval"&&v?ue(v):v):void 0;return l.jsxRuntimeExports.jsx(ie.GraphContainer,{className:i?.classNames?.graphContainer,style:i?.styles?.graphContainer,id:i?.graphID,ref:H,"aria-label":i?.ariaLabel,backgroundColor:i?.backgroundColor??!1,theme:i?.theme||"light",language:i?.language||"en",width:i?.width,height:i?.height,padding:i?.padding,minHeight:i?.minHeight,relativeHeight:i?.relativeHeight,children:c||oe.graphList.filter(e=>e.geoHubMapPresentation).map(e=>e.graphID).indexOf(b)!==-1?l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[x?.graphTitle||x?.graphDescription||i?.graphTitle||i?.graphDescription||i?.graphDownload||i?.dataDownload?l.jsxRuntimeExports.jsx(se.GraphHeader,{styles:{title:x?.styles?.title||i?.styles?.title,description:x?.styles?.description||i?.styles?.description},classNames:{title:x?.classNames?.title||i?.classNames?.title,description:x?.classNames?.description||i?.classNames?.description},graphTitle:x?.graphTitle||i?.graphTitle,graphDescription:x?.graphDescription||i?.graphDescription,width:x?.width||i?.width,graphDownload:i?.graphDownload?H:void 0,dataDownload:i?.dataDownload&&c&&c.length>0?c:null}):null,R.length!==0||(I||[]).length!==0||(N||[]).length!==0||m?l.jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap items-start gap-x-4 gap-y-0 w-full",children:[N?.map((e,r)=>l.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:e.width?0:1,flexShrink:e.ui!=="radio"||e.width?0:1,minWidth:"240px"},className:"pb-4",children:[l.jsxRuntimeExports.jsx(d.b,{className:"mb-2",children:e.label||"Graph by"}),e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.options.map(a=>({...a,value:a.label})),size:"sm",isClearable:!1,isSearchable:!0,variant:f,controlShouldRenderValue:!0,defaultValue:e.defaultValue?{...e.defaultValue,value:e.defaultValue?.label}:{...e.options[0],value:e.options[0].label},onChange:a=>{V(a?.graphSettings||{}),j(a?.dataConfiguration)}}):l.jsxRuntimeExports.jsx(d.ye,{defaultValue:e.defaultValue?.label||e.options[0].label,variant:f,onValueChange:a=>{const t=e.options[e.options.findIndex(g=>g.label===a)];V(t.graphSettings||{}),j(t.dataConfiguration)},children:e.options.map((a,t)=>l.jsxRuntimeExports.jsx(d.he,{label:a.label,value:a.label},t))})]},r)),I?.map((e,r)=>l.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:e.width?0:1,flexShrink:e.ui!=="radio"||e.width?0:1,minWidth:"240px"},className:"pb-4",children:[l.jsxRuntimeExports.jsx(d.b,{className:"mb-2",children:e.label||`Visualize ${e.chartConfigId} by`}),d.checkIfMultiple(e.chartConfigId,v||[])?e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.allowedColumnIds,size:"sm",isMulti:!0,isSearchable:!0,variant:f,controlShouldRenderValue:!0,defaultValue:s?s[s.findIndex(a=>a.chartConfigId===e.chartConfigId)].columnId.map(a=>e.allowedColumnIds[e.allowedColumnIds.findIndex(t=>t.value===a)]):void 0,filterOption:C.Du(G),onChange:a=>{const t={columnId:(a||[]).map(h=>h.value),chartConfigId:e.chartConfigId},g=v?.map(h=>h.chartConfigId===t.chartConfigId?t:h);j(g)}}):l.jsxRuntimeExports.jsx(d.$,{variant:f,defaultValue:s?s[s.findIndex(a=>a.chartConfigId===e.chartConfigId)].columnId.map(a=>e.allowedColumnIds[e.allowedColumnIds.findIndex(t=>t.value===a)]).map(a=>a.value):[],onValueChange:a=>{const t={columnId:a||[],chartConfigId:e.chartConfigId},g=v?.map(h=>h.chartConfigId===t.chartConfigId?t:h);j(g)},children:e.allowedColumnIds.map((a,t)=>l.jsxRuntimeExports.jsx(d.P,{label:a.label,value:a.label},t))}):e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.allowedColumnIds,size:"sm",isClearable:!1,isSearchable:!0,variant:f,controlShouldRenderValue:!0,defaultValue:s?e.allowedColumnIds[e.allowedColumnIds.findIndex(a=>a.value===s[s.findIndex(t=>t.chartConfigId===e.chartConfigId)].columnId)]:void 0,onChange:a=>{const t={columnId:a?.value,chartConfigId:e.chartConfigId},g=v?.map(h=>h.chartConfigId===t.chartConfigId?t:h);V(M(I,g)),j(g)}}):l.jsxRuntimeExports.jsx(d.ye,{variant:f,defaultValue:s?e.allowedColumnIds[e.allowedColumnIds.findIndex(a=>a.value===s[s.findIndex(t=>t.chartConfigId===e.chartConfigId)].columnId)].label:"",onValueChange:a=>{const g={columnId:e.allowedColumnIds[e.allowedColumnIds.findIndex(T=>T.label===a)].value,chartConfigId:e.chartConfigId},h=v?.map(T=>T.chartConfigId===g.chartConfigId?g:T);V(M(I,h)),j(h)},children:e.allowedColumnIds.map((a,t)=>l.jsxRuntimeExports.jsx(d.he,{label:a.label,value:a.label},t))})]},r)),R?.map((e,r)=>l.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:e.width?0:1,flexShrink:0,minWidth:"240px"},className:"pb-4",children:[l.jsxRuntimeExports.jsx(d.b,{className:"mb-2",children:e.label}),e.singleSelect?e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.availableValues,variant:f,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:C.Du(G),onChange:a=>{y(e.filter,a)},value:e.value,defaultValue:e.defaultValue}):l.jsxRuntimeExports.jsx(d.ye,{variant:f,defaultValue:e.defaultValue.value,onValueChange:a=>{y(e.filter,e.availableValues.filter(t=>t.value===a))},children:e.availableValues.map((a,t)=>l.jsxRuntimeExports.jsx(d.he,{label:`${a.label}`,value:`${a.value}`},t))}):l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.availableValues,variant:f,size:"sm",isMulti:!0,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:C.Du(G),onChange:a=>{y(e.filter,a)},value:e.value,defaultValue:e.defaultValue}):l.jsxRuntimeExports.jsx(d.$,{variant:f,defaultValue:e.defaultValue?e.defaultValue.map(a=>`${a.value}`):[],value:e.value?e.value.map(a=>`${a.value}`):void 0,onValueChange:a=>{y(e.filter,e.availableValues.filter(t=>a.indexOf(`${t.value}`)!==-1))},children:e.availableValues.map((a,t)=>l.jsxRuntimeExports.jsx(d.P,{label:`${a.label}`,value:`${a.value}`},t))}),e.allowSelectAll?l.jsxRuntimeExports.jsx("button",{type:"button",className:"bg-transparent border-0 p-0 mt-2 cursor-pointer text-primary-blue-600 dark:text-primary-blue-400",onClick:()=>{y(e.filter,e.availableValues)},children:"Select all options"}):null]})]},r)),m?l.jsxRuntimeExports.jsxs("div",{style:{width:m.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:m.width?0:1,flexShrink:0,minWidth:"240px"},className:"pb-4",children:[l.jsxRuntimeExports.jsx(d.b,{className:"mb-2",children:m.label||"Highlight data"}),l.jsxRuntimeExports.jsx(C.ja,{options:Y,variant:f,size:"sm",isMulti:!0,isClearable:!0,isSearchable:!0,controlShouldRenderValue:!0,filterOption:C.Du(G),onChange:e=>{X(e?.map(r=>r.value))},value:E?.map(e=>({label:e,value:e})),defaultValue:m.defaultValues?.map(e=>({label:e,value:e}))})]}):null]}):null,l.jsxRuntimeExports.jsx(re.GraphEl,{graph:b,graphData:ae,graphDataConfiguration:v,debugMode:S,readableHeader:B||[],updateFilters:K,settings:{...i||{},...x,graphTitle:void 0,graphDescription:void 0,graphDownload:!1,dataDownload:!1,backgroundColor:void 0,width:void 0,height:void 0,relativeHeight:void 0,minHeight:void 0,padding:"0",theme:i?.theme,...E?{highlightedDataPoints:E,highlightedIds:E?.map(e=>`${e}`),highlightedLines:E?.map(e=>e)}:{}}})]}):l.jsxRuntimeExports.jsx("div",{className:"w-full flex justify-center p-4",children:l.jsxRuntimeExports.jsx(ne.w,{})})})}exports.SingleGraphDashboard=de;
2
2
  //# sourceMappingURL=SingleGraphDashboard.cjs.map
@@ -461,6 +461,8 @@ declare interface GraphSettingsDataType {
461
461
  mapColorLegendTitle?: string;
462
462
  choroplethScaleType?: Exclude<ScaleDataType, 'linear'>;
463
463
  trackColor?: string;
464
+ zoomAndCenterByHighlightedIds?: boolean;
465
+ hideAxisLine?: boolean;
464
466
  }
465
467
 
466
468
  declare type GraphType = GraphTypeForGriddedGraph;
@@ -7,7 +7,7 @@ import { j as V, D as M } from "./DropdownSelect-D8rFbygC.js";
7
7
  import { b as A, y as H, h as O, c as da, $ as K, P as Q } from "./checkIfMultiple-D9fVkeOq.js";
8
8
  import { w as ha } from "./Spinner--r2RrJV8.js";
9
9
  import { G as ca } from "./GraphContainer-CF6ws3pd.js";
10
- import { G as fa } from "./GraphEl-DKrjuQNB.js";
10
+ import { G as fa } from "./GraphEl-C1Rz1V__.js";
11
11
  import { f as ga, a as pa, b as ma, c as Ca, t as va } from "./fetchAndParseData-BAXhgTDM.js";
12
12
  import { a as Ia, t as ba } from "./transformDataForAggregation-wdPf8bNt.js";
13
13
  import { g as X } from "./getUniqValue-DsqSii6M.js";
@@ -484,6 +484,8 @@ declare interface GraphSettingsDataType {
484
484
  mapColorLegendTitle?: string;
485
485
  choroplethScaleType?: Exclude<ScaleDataType, 'linear'>;
486
486
  trackColor?: string;
487
+ zoomAndCenterByHighlightedIds?: boolean;
488
+ hideAxisLine?: boolean;
487
489
  }
488
490
 
489
491
  declare type GraphType = GraphTypeForGriddedGraph;
@@ -375,6 +375,8 @@ declare interface GraphSettingsDataType {
375
375
  mapColorLegendTitle?: string;
376
376
  choroplethScaleType?: Exclude<ScaleDataType, 'linear'>;
377
377
  trackColor?: string;
378
+ zoomAndCenterByHighlightedIds?: boolean;
379
+ hideAxisLine?: boolean;
378
380
  }
379
381
 
380
382
  declare interface HighlightAreaSettingsDataType {
@@ -382,6 +382,8 @@ declare interface GraphSettingsDataType {
382
382
  mapColorLegendTitle?: string;
383
383
  choroplethScaleType?: Exclude<ScaleDataType, 'linear'>;
384
384
  trackColor?: string;
385
+ zoomAndCenterByHighlightedIds?: boolean;
386
+ hideAxisLine?: boolean;
385
387
  }
386
388
 
387
389
  declare interface HighlightAreaSettingsDataType {
@@ -461,6 +461,8 @@ declare interface GraphSettingsDataType {
461
461
  mapColorLegendTitle?: string;
462
462
  choroplethScaleType?: Exclude<ScaleDataType, 'linear'>;
463
463
  trackColor?: string;
464
+ zoomAndCenterByHighlightedIds?: boolean;
465
+ hideAxisLine?: boolean;
464
466
  }
465
467
 
466
468
  declare interface HighlightAreaSettingsDataType {
@@ -484,6 +484,8 @@ declare interface GraphSettingsDataType {
484
484
  mapColorLegendTitle?: string;
485
485
  choroplethScaleType?: Exclude<ScaleDataType, 'linear'>;
486
486
  trackColor?: string;
487
+ zoomAndCenterByHighlightedIds?: boolean;
488
+ hideAxisLine?: boolean;
487
489
  }
488
490
 
489
491
  declare interface HighlightAreaSettingsDataType {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-CHPV5EwG-6v2a2njQ.cjs"),H=require("react"),Qt=require("./index-DQA8q5sC.cjs"),Zt=require("./Tooltip-BLa2EfMs.cjs"),Bt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),m=require("./Colors.cjs"),Xt=require("./Axis-Dtjn-EgM.cjs"),Ft=require("./AxisTitle-DV4n0RxE.cjs"),_t=require("./DetailsModal-DHttOA80.cjs"),te=require("./linear-CgUCbw9F.cjs"),pt=require("./proxy-C4-uo6nS.cjs"),ee=require("./use-in-view-C3o_ntMv.cjs"),ie=require("./index-CoobIWNj.cjs"),oe=require("./GraphFooter.cjs"),ne=require("./GraphHeader.cjs"),le=require("./ColorLegendWithMouseOver.cjs"),re=require("./EmptyState-CGeBqbmR.cjs"),zt=require("./uniqBy-O05lp2S5.cjs"),Jt=require("./GraphContainer-B1EDxJ0S.cjs");function se(e){const t=l.compilerRuntimeExports.c(148),{data:o,width:G,height:h,showLabels:st,colors:n,colorDomain:x,radius:a,leftMargin:y,rightMargin:yt,topMargin:P,bottomMargin:Et,tooltip:$t,onSeriesMouseOver:at,axisTitles:g,highlightedDataPoints:j,selectedColor:ct,minValue:ut,maxValue:xt,onSeriesMouseClick:dt,resetSelectionOnDoubleClick:kt,detailsOnClick:D,styles:p,classNames:u,animate:s,dimmedOpacity:v,customLayers:$}=e,St=H.useRef(null);let ht;t[0]!==s.amount||t[1]!==s.once?(ht={once:s.once,amount:s.amount},t[0]=s.amount,t[1]=s.once,t[2]=ht):ht=t[2];const w=ee.useInView(St,ht),[b,Nt]=H.useState(void 0),[W,It]=H.useState(void 0),[Rt,Vt]=H.useState(void 0),[gt,qt]=H.useState(void 0);let vt;t[3]!==Et||t[4]!==y||t[5]!==yt||t[6]!==P?(vt={top:P,bottom:Et,left:y,right:yt},t[3]=Et,t[4]=y,t[5]=yt,t[6]=P,t[7]=vt):vt=t[7];const c=vt,r=G-c.left-c.right,C=h-c.top-c.bottom;let Mt;t[8]!==o?(Mt=Math.min(...o.map(Ne)),t[8]=o,t[9]=Mt):Mt=t[9];let ft;t[10]!==o?(ft=Math.min(...o.map(Se)),t[10]=o,t[11]=ft):ft=t[11];const Y=Math.min(Mt,ft);let Ct;t[12]!==o?(Ct=Math.max(...o.map(De)),t[12]=o,t[13]=Ct):Ct=t[13];let mt;t[14]!==o?(mt=Math.max(...o.map(Me)),t[14]=o,t[15]=mt):mt=t[15];const U=Math.max(Ct,mt);let B,X,k,F,z,J,S,K,N,I,V,R,M;if(t[16]!==s.duration||t[17]!==g[0]||t[18]!==g[1]||t[19]!==u?.dataConnectors||t[20]!==u?.yAxis?.axis||t[21]!==u?.yAxis?.labels||t[22]!==u?.yAxis?.title||t[23]!==x||t[24]!==n||t[25]!==$||t[26]!==o||t[27]!==D||t[28]!==v||t[29]!==C||t[30]!==r||t[31]!==h||t[32]!==j||t[33]!==w||t[34]!==c.left||t[35]!==c.top||t[36]!==xt||t[37]!==U||t[38]!==ut||t[39]!==Y||t[40]!==W||t[41]!==b||t[42]!==dt||t[43]!==at||t[44]!==a||t[45]!==kt||t[46]!==ct||t[47]!==st||t[48]!==p?.dataConnectors||t[49]!==p?.yAxis?.labels||t[50]!==p?.yAxis?.title||t[51]!==G){let T;t[65]!==ut||t[66]!==Y?(T=Bt.checkIfNullOrUndefined(ut)?Y>0?0:Y:ut,t[65]=ut,t[66]=Y,t[67]=T):T=t[67];let Lt;t[68]!==xt||t[69]!==U?(Lt=Bt.checkIfNullOrUndefined(xt)?U>0?U:0:xt,t[68]=xt,t[69]=U,t[70]=Lt):Lt=t[70];const f=te.linear().domain([T,Lt]).range([C,0]).nice();X=pt.motion.svg,F=`${G}px`,z=`${h}px`,J=`0 0 ${G} ${h}`,S="mx-auto",K="ltr",N=St,V=`translate(${c.left},${c.top})`;const Yt=u?.yAxis?.axis;let tt;t[71]!==Yt?(tt=l.mo("stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550",Yt),t[71]=Yt,t[72]=tt):tt=t[72];let wt;t[73]!==tt?(wt={axis:tt},t[73]=tt,t[74]=wt):wt=t[74];let et;t[75]!==C||t[76]!==a||t[77]!==wt?(et=l.jsxRuntimeExports.jsx(Xt.Axis,{y1:0,y2:C,x1:a,x2:a,classNames:wt}),t[75]=C,t[76]=a,t[77]=wt,t[78]=et):et=t[78];const Tt=C+15,bt=p?.yAxis?.title,Ot=u?.yAxis?.title;let it;t[79]!==Ot?(it=l.mo("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",Ot),t[79]=Ot,t[80]=it):it=t[80];let ot;t[81]!==g[0]||t[82]!==a||t[83]!==Tt||t[84]!==bt||t[85]!==it?(ot=l.jsxRuntimeExports.jsx(Ft.AxisTitle,{x:a,y:Tt,style:bt,className:it,text:g[0]}),t[81]=g[0],t[82]=a,t[83]=Tt,t[84]=bt,t[85]=it,t[86]=ot):ot=t[86],t[87]!==et||t[88]!==ot?(R=l.jsxRuntimeExports.jsxs("g",{children:[et,ot]}),t[87]=et,t[88]=ot,t[89]=R):R=t[89];const Dt=r-a,nt=r-a,lt=u?.yAxis?.axis;let O;t[90]!==lt?(O=l.mo("stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550",lt),t[90]=lt,t[91]=O):O=t[91];let A;t[92]!==O?(A={axis:O},t[92]=O,t[93]=A):A=t[93];let E;t[94]!==C||t[95]!==Dt||t[96]!==nt||t[97]!==A?(E=l.jsxRuntimeExports.jsx(Xt.Axis,{y1:0,y2:C,x1:Dt,x2:nt,classNames:A}),t[94]=C,t[95]=Dt,t[96]=nt,t[97]=A,t[98]=E):E=t[98];const rt=r-a,At=C+15,Ht=p?.yAxis?.title,Gt=u?.yAxis?.title;let Pt;t[99]!==Gt?(Pt=l.mo("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",Gt),t[99]=Gt,t[100]=Pt):Pt=t[100];let Wt;t[101]!==g[1]||t[102]!==rt||t[103]!==At||t[104]!==Ht||t[105]!==Pt?(Wt=l.jsxRuntimeExports.jsx(Ft.AxisTitle,{x:rt,y:At,style:Ht,className:Pt,text:g[1]}),t[101]=g[1],t[102]=rt,t[103]=At,t[104]=Ht,t[105]=Pt,t[106]=Wt):Wt=t[106],t[107]!==E||t[108]!==Wt?(M=l.jsxRuntimeExports.jsxs("g",{children:[E,Wt]}),t[107]=E,t[108]=Wt,t[109]=M):M=t[109],t[110]!==$?(k=$.filter(Re).map(ke),t[110]=$,t[111]=k):k=t[111],B=ie.AnimatePresence,I=o.map((i,Kt)=>l.jsxRuntimeExports.jsxs(pt.motion.g,{variants:{initial:{opacity:ct?i.color&&n[x.indexOf(`${i.color}`)]===ct?1:v:b?b.label===i.label?1:v:j.length!==0?j.indexOf(i.label)!==-1?1:v:1},whileInView:{opacity:ct?i.color&&n[x.indexOf(`${i.color}`)]===ct?1:v:b?b.label===i.label?1:v:j.length!==0?j.indexOf(i.label)!==-1?1:v:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},onMouseEnter:Ut=>{Nt(i),qt(Ut.clientY),Vt(Ut.clientX),at?.(i)},onMouseMove:Ut=>{Nt(i),qt(Ut.clientY),Vt(Ut.clientX)},onMouseLeave:()=>{Nt(void 0),Vt(void 0),qt(void 0),at?.(void 0)},onClick:()=>{(dt||D)&&(Qt.isEqual(W,i)&&kt?(It(void 0),dt?.(void 0)):(It(i),dt?.(i)))},children:[l.jsxRuntimeExports.jsx(pt.motion.circle,{variants:{initial:{cx:a,cy:f(i.y1),fill:o.filter($e).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,stroke:o.filter(Ee).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:0},whileInView:{cx:a,cy:f(i.y1),fill:o.filter(Ae).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,stroke:o.filter(Oe).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},r:a,style:{fillOpacity:.6}}),st?l.jsxRuntimeExports.jsx(pt.motion.text,{variants:{initial:{y:f(i.y1),fill:o.filter(be).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:0},whileInView:{y:f(i.y1),fill:o.filter(we).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},style:{textAnchor:"end",...p?.yAxis?.labels||{}},className:l.mo("text-xs",u?.yAxis?.labels),x:5,dy:"0.33em",textAnchor:"end",dx:0-a-3,children:i.label}):j.length!==0&&j.indexOf(i.label)!==-1?l.jsxRuntimeExports.jsx(pt.motion.text,{variants:{initial:{y:f(i.y1),fill:o.filter(je).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:0},whileInView:{y:f(i.y1),fill:o.filter(Ce).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},style:{textAnchor:"end",...p?.yAxis?.labels||{}},className:l.mo("text-xs",u?.yAxis?.labels),x:5,dy:"0.33em",dx:-3,children:i.label}):null,l.jsxRuntimeExports.jsx(pt.motion.circle,{variants:{initial:{cx:r-a,cy:f(i.y2),fill:o.filter(ve).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,stroke:o.filter(ge).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:0},whileInView:{cx:r-a,cy:f(i.y2),fill:o.filter(he).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,stroke:o.filter(de).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},r:a,style:{fillOpacity:.6}}),st?l.jsxRuntimeExports.jsx(pt.motion.text,{variants:{initial:{y:f(i.y2),fill:o.filter(ye).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:0},whileInView:{y:f(i.y2),fill:o.filter(pe).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},style:{textAnchor:"start",...p?.yAxis?.labels||{}},className:l.mo("text-xs",u?.yAxis?.labels),x:r-5,dy:"0.33em",dx:a+3,children:i.label}):j.length!==0&&j.indexOf(i.label)!==-1?l.jsxRuntimeExports.jsx(pt.motion.text,{variants:{initial:{y:f(i.y2),fill:o.filter(me).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:0},whileInView:{y:f(i.y2),fill:o.filter(fe).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},style:{textAnchor:"start",...p?.yAxis?.labels||{}},className:l.mo("text-xs",u?.yAxis?.labels),x:r-5,dy:"0.33em",dx:3,children:i.label}):null,l.jsxRuntimeExports.jsx(pt.motion.line,{variants:{initial:{x1:a,x2:r-a,y1:f(i.y1),y2:f(i.y1),stroke:o.filter(xe).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray},whileInView:{x1:a,x2:r-a,y1:f(i.y1),y2:f(i.y2),stroke:o.filter(ue).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},className:u?.dataConnectors,style:{fill:"none",strokeWidth:1,...p?.dataConnectors}})]},Kt)),t[16]=s.duration,t[17]=g[0],t[18]=g[1],t[19]=u?.dataConnectors,t[20]=u?.yAxis?.axis,t[21]=u?.yAxis?.labels,t[22]=u?.yAxis?.title,t[23]=x,t[24]=n,t[25]=$,t[26]=o,t[27]=D,t[28]=v,t[29]=C,t[30]=r,t[31]=h,t[32]=j,t[33]=w,t[34]=c.left,t[35]=c.top,t[36]=xt,t[37]=U,t[38]=ut,t[39]=Y,t[40]=W,t[41]=b,t[42]=dt,t[43]=at,t[44]=a,t[45]=kt,t[46]=ct,t[47]=st,t[48]=p?.dataConnectors,t[49]=p?.yAxis?.labels,t[50]=p?.yAxis?.title,t[51]=G,t[52]=B,t[53]=X,t[54]=k,t[55]=F,t[56]=z,t[57]=J,t[58]=S,t[59]=K,t[60]=N,t[61]=I,t[62]=V,t[63]=R,t[64]=M}else B=t[52],X=t[53],k=t[54],F=t[55],z=t[56],J=t[57],S=t[58],K=t[59],N=t[60],I=t[61],V=t[62],R=t[63],M=t[64];let Q;t[112]!==B||t[113]!==I?(Q=l.jsxRuntimeExports.jsx(B,{children:I}),t[112]=B,t[113]=I,t[114]=Q):Q=t[114];let d;t[115]!==$?(d=$.filter(ce).map(ae),t[115]=$,t[116]=d):d=t[116];let Z;t[117]!==k||t[118]!==Q||t[119]!==d||t[120]!==V||t[121]!==R||t[122]!==M?(Z=l.jsxRuntimeExports.jsxs("g",{transform:V,children:[R,M,k,Q,d]}),t[117]=k,t[118]=Q,t[119]=d,t[120]=V,t[121]=R,t[122]=M,t[123]=Z):Z=t[123];let q;t[124]!==X||t[125]!==F||t[126]!==z||t[127]!==J||t[128]!==S||t[129]!==K||t[130]!==N||t[131]!==Z?(q=l.jsxRuntimeExports.jsx(X,{width:F,height:z,viewBox:J,className:S,direction:K,ref:N,children:Z}),t[124]=X,t[125]=F,t[126]=z,t[127]=J,t[128]=S,t[129]=K,t[130]=N,t[131]=Z,t[132]=q):q=t[132];let _;t[133]!==u?.tooltip||t[134]!==Rt||t[135]!==gt||t[136]!==b||t[137]!==p?.tooltip||t[138]!==$t?(_=b&&$t&&Rt&&gt?l.jsxRuntimeExports.jsx(Zt.Tooltip,{data:b,body:$t,xPos:Rt,yPos:gt,backgroundStyle:p?.tooltip,className:u?.tooltip}):null,t[133]=u?.tooltip,t[134]=Rt,t[135]=gt,t[136]=b,t[137]=p?.tooltip,t[138]=$t,t[139]=_):_=t[139];let L;t[140]!==u?.modal||t[141]!==D||t[142]!==W?(L=D&&W!==void 0?l.jsxRuntimeExports.jsx(_t.DetailsModal,{body:D,data:W,setData:It,className:u?.modal}):null,t[140]=u?.modal,t[141]=D,t[142]=W,t[143]=L):L=t[143];let jt;return t[144]!==q||t[145]!==_||t[146]!==L?(jt=l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[q,_,L]}),t[144]=q,t[145]=_,t[146]=L,t[147]=jt):jt=t[147],jt}function ae(e){return e.layer}function ce(e){return e.position==="after"}function ue(e){return e.color}function xe(e){return e.color}function fe(e){return e.color}function me(e){return e.color}function pe(e){return e.color}function ye(e){return e.color}function de(e){return e.color}function he(e){return e.color}function ge(e){return e.color}function ve(e){return e.color}function Ce(e){return e.color}function je(e){return e.color}function we(e){return e.color}function be(e){return e.color}function Oe(e){return e.color}function Ae(e){return e.color}function Ee(e){return e.color}function $e(e){return e.color}function ke(e){return e.layer}function Re(e){return e.position==="before"}function Me(e){return e.y2}function De(e){return e.y1}function Se(e){return e.y2}function Ne(e){return e.y1}function Ie(e){const t=l.compilerRuntimeExports.c(89),{data:o,graphTitle:G,colors:h,sources:st,graphDescription:n,showLabels:x,height:a,width:y,footNote:yt,colorDomain:P,colorLegendTitle:Et,radius:$t,axisTitles:at,padding:g,backgroundColor:j,leftMargin:ct,rightMargin:ut,topMargin:xt,bottomMargin:dt,tooltip:kt,relativeHeight:D,onSeriesMouseOver:p,showColorScale:u,highlightedDataPoints:s,graphID:v,minValue:$,maxValue:St,onSeriesMouseClick:ht,graphDownload:w,dataDownload:b,fillContainer:Nt,language:W,showNAColor:It,minHeight:Rt,theme:Vt,ariaLabel:gt,resetSelectionOnDoubleClick:qt,detailsOnClick:vt,styles:c,classNames:r,animate:C,dimmedOpacity:Mt,customLayers:ft}=e,Y=x===void 0?!1:x,Ct=$t===void 0?5:$t;let mt;t[0]!==at?(mt=at===void 0?["",""]:at,t[0]=at,t[1]=mt):mt=t[1];const U=mt,B=j===void 0?!1:j,X=ct===void 0?50:ct,k=ut===void 0?50:ut,F=xt===void 0?20:xt,z=dt===void 0?20:dt,J=u===void 0?!0:u;let S;t[2]!==s?(S=s===void 0?[]:s,t[2]=s,t[3]=S):S=t[3];const K=S,N=w===void 0?!1:w,I=b===void 0?!1:b,V=Nt===void 0?!0:Nt,R=W===void 0?"en":W,M=It===void 0?!0:It,Q=Rt===void 0?0:Rt,d=Vt===void 0?"light":Vt,Z=qt===void 0?!0:qt,q=C===void 0?!1:C,_=Mt===void 0?.3:Mt;let L;t[4]!==ft?(L=ft===void 0?[]:ft,t[4]=ft,t[5]=L):L=t[5];const jt=L,[T,Lt]=H.useState(0),[f,Yt]=H.useState(0),[tt,wt]=H.useState(void 0),et=H.useRef(null),Tt=H.useRef(null);let bt,Ot;t[6]===Symbol.for("react.memo_cache_sentinel")?(bt=()=>{const Ht=new ResizeObserver(Gt=>{Lt(Gt[0].target.clientWidth||620),Yt(Gt[0].target.clientHeight||480)});return et.current&&Ht.observe(et.current),()=>Ht.disconnect()},Ot=[],t[6]=bt,t[7]=Ot):(bt=t[6],Ot=t[7]),H.useEffect(bt,Ot);const it=r?.graphContainer,ot=c?.graphContainer,Dt=V?void 0:y;let nt;t[8]!==r?.description||t[9]!==r?.title||t[10]!==o||t[11]!==I||t[12]!==n||t[13]!==N||t[14]!==G||t[15]!==c?.description||t[16]!==c?.title||t[17]!==y?(nt=G||n||N||I?l.jsxRuntimeExports.jsx(ne.GraphHeader,{styles:{title:c?.title,description:c?.description},classNames:{title:r?.title,description:r?.description},graphTitle:G,graphDescription:n,width:y,graphDownload:N?Tt:void 0,dataDownload:I?o.map(Ye).filter(We).length>0?o.map(Pe).filter(Ge):o.filter(He):null}):null,t[8]=r?.description,t[9]=r?.title,t[10]=o,t[11]=I,t[12]=n,t[13]=N,t[14]=G,t[15]=c?.description,t[16]=c?.title,t[17]=y,t[18]=nt):nt=t[18];let lt;t[19]!==r?.colorLegend||t[20]!==P||t[21]!==Et||t[22]!==h||t[23]!==o||t[24]!==J||t[25]!==M||t[26]!==d||t[27]!==y?(lt=J&&o.filter(Te).length!==0&&o.length>0?l.jsxRuntimeExports.jsx(le.ColorLegendWithMouseOver,{width:y,colorLegendTitle:Et,colors:h||m.Colors[d].categoricalColors.colors,colorDomain:P||zt.uniqBy(o,"color",!0),setSelectedColor:wt,showNAColor:M,className:r?.colorLegend}):null,t[19]=r?.colorLegend,t[20]=P,t[21]=Et,t[22]=h,t[23]=o,t[24]=J,t[25]=M,t[26]=d,t[27]=y,t[28]=lt):lt=t[28];let O;t[29]!==o.length?(O=o.length===0&&l.jsxRuntimeExports.jsx(re.EmptyState,{}),t[29]=o.length,t[30]=O):O=t[30];let A;t[31]!==q||t[32]!==U||t[33]!==z||t[34]!==r||t[35]!==P||t[36]!==h||t[37]!==jt||t[38]!==o||t[39]!==vt||t[40]!==_||t[41]!==V||t[42]!==K||t[43]!==X||t[44]!==St||t[45]!==$||t[46]!==ht||t[47]!==p||t[48]!==Ct||t[49]!==Z||t[50]!==k||t[51]!==tt||t[52]!==Y||t[53]!==c||t[54]!==f||t[55]!==T||t[56]!==d||t[57]!==kt||t[58]!==F||t[59]!==y?(A=T&&f&&o.length>0?l.jsxRuntimeExports.jsx(se,{data:o.filter(Le),width:V||!y||T<y?T:y,height:f,colorDomain:o.filter(qe).length===0?[]:P||zt.uniqBy(o,"color",!0),colors:o.filter(Ve).length===0?h?[h]:[m.Colors.primaryColors["blue-600"]]:h||m.Colors[d].categoricalColors.colors,selectedColor:tt,axisTitles:U,showLabels:Y,radius:Ct,leftMargin:X,rightMargin:k,topMargin:F,bottomMargin:z,tooltip:kt,onSeriesMouseOver:p,highlightedDataPoints:K,minValue:$,maxValue:St,onSeriesMouseClick:ht,resetSelectionOnDoubleClick:Z,detailsOnClick:vt,styles:c,classNames:r,animate:q===!0?{duration:.5,once:!0,amount:.5}:q||{duration:0,once:!0,amount:0},dimmedOpacity:_,customLayers:jt}):null,t[31]=q,t[32]=U,t[33]=z,t[34]=r,t[35]=P,t[36]=h,t[37]=jt,t[38]=o,t[39]=vt,t[40]=_,t[41]=V,t[42]=K,t[43]=X,t[44]=St,t[45]=$,t[46]=ht,t[47]=p,t[48]=Ct,t[49]=Z,t[50]=k,t[51]=tt,t[52]=Y,t[53]=c,t[54]=f,t[55]=T,t[56]=d,t[57]=kt,t[58]=F,t[59]=y,t[60]=A):A=t[60];let E;t[61]!==O||t[62]!==A?(E=l.jsxRuntimeExports.jsxs(Jt.GraphArea,{ref:et,children:[O,A]}),t[61]=O,t[62]=A,t[63]=E):E=t[63];let rt;t[64]!==r?.footnote||t[65]!==r?.source||t[66]!==yt||t[67]!==st||t[68]!==c?.footnote||t[69]!==c?.source||t[70]!==y?(rt=st||yt?l.jsxRuntimeExports.jsx(oe.GraphFooter,{styles:{footnote:c?.footnote,source:c?.source},classNames:{footnote:r?.footnote,source:r?.source},sources:st,footNote:yt,width:y}):null,t[64]=r?.footnote,t[65]=r?.source,t[66]=yt,t[67]=st,t[68]=c?.footnote,t[69]=c?.source,t[70]=y,t[71]=rt):rt=t[71];let At;return t[72]!==gt||t[73]!==B||t[74]!==v||t[75]!==a||t[76]!==R||t[77]!==Q||t[78]!==g||t[79]!==D||t[80]!==it||t[81]!==ot||t[82]!==Dt||t[83]!==nt||t[84]!==lt||t[85]!==E||t[86]!==rt||t[87]!==d?(At=l.jsxRuntimeExports.jsxs(Jt.GraphContainer,{className:it,style:ot,id:v,ref:Tt,"aria-label":gt,backgroundColor:B,theme:d,language:R,minHeight:Q,width:Dt,height:a,relativeHeight:D,padding:g,children:[nt,lt,E,rt]}),t[72]=gt,t[73]=B,t[74]=v,t[75]=a,t[76]=R,t[77]=Q,t[78]=g,t[79]=D,t[80]=it,t[81]=ot,t[82]=Dt,t[83]=nt,t[84]=lt,t[85]=E,t[86]=rt,t[87]=d,t[88]=At):At=t[88],At}function Ve(e){return e.color}function qe(e){return e.color}function Le(e){return!Bt.checkIfNullOrUndefined(e.y1)&&!Bt.checkIfNullOrUndefined(e.y2)}function Te(e){return e.color}function He(e){return e!==void 0}function Ge(e){return e!==void 0}function Pe(e){return e.data}function We(e){return e!==void 0}function Ye(e){return e.data}exports.SlopeChart=Ie;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-CHPV5EwG-6v2a2njQ.cjs"),H=require("react"),Qt=require("./index-DQA8q5sC.cjs"),Zt=require("./Tooltip-BLa2EfMs.cjs"),Bt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),m=require("./Colors.cjs"),Xt=require("./Axis-Jt_tmhxS.cjs"),Ft=require("./AxisTitle-DV4n0RxE.cjs"),_t=require("./DetailsModal-DHttOA80.cjs"),te=require("./linear-CgUCbw9F.cjs"),pt=require("./proxy-C4-uo6nS.cjs"),ee=require("./use-in-view-C3o_ntMv.cjs"),ie=require("./index-CoobIWNj.cjs"),oe=require("./GraphFooter.cjs"),ne=require("./GraphHeader.cjs"),le=require("./ColorLegendWithMouseOver.cjs"),re=require("./EmptyState-CGeBqbmR.cjs"),zt=require("./uniqBy-O05lp2S5.cjs"),Jt=require("./GraphContainer-B1EDxJ0S.cjs");function se(e){const t=l.compilerRuntimeExports.c(148),{data:o,width:G,height:h,showLabels:st,colors:n,colorDomain:x,radius:a,leftMargin:y,rightMargin:yt,topMargin:P,bottomMargin:Et,tooltip:$t,onSeriesMouseOver:at,axisTitles:g,highlightedDataPoints:j,selectedColor:ct,minValue:ut,maxValue:xt,onSeriesMouseClick:dt,resetSelectionOnDoubleClick:kt,detailsOnClick:D,styles:p,classNames:u,animate:s,dimmedOpacity:v,customLayers:$}=e,St=H.useRef(null);let ht;t[0]!==s.amount||t[1]!==s.once?(ht={once:s.once,amount:s.amount},t[0]=s.amount,t[1]=s.once,t[2]=ht):ht=t[2];const w=ee.useInView(St,ht),[b,Nt]=H.useState(void 0),[W,It]=H.useState(void 0),[Rt,Vt]=H.useState(void 0),[gt,qt]=H.useState(void 0);let vt;t[3]!==Et||t[4]!==y||t[5]!==yt||t[6]!==P?(vt={top:P,bottom:Et,left:y,right:yt},t[3]=Et,t[4]=y,t[5]=yt,t[6]=P,t[7]=vt):vt=t[7];const c=vt,r=G-c.left-c.right,C=h-c.top-c.bottom;let Mt;t[8]!==o?(Mt=Math.min(...o.map(Ne)),t[8]=o,t[9]=Mt):Mt=t[9];let ft;t[10]!==o?(ft=Math.min(...o.map(Se)),t[10]=o,t[11]=ft):ft=t[11];const Y=Math.min(Mt,ft);let Ct;t[12]!==o?(Ct=Math.max(...o.map(De)),t[12]=o,t[13]=Ct):Ct=t[13];let mt;t[14]!==o?(mt=Math.max(...o.map(Me)),t[14]=o,t[15]=mt):mt=t[15];const U=Math.max(Ct,mt);let B,X,k,F,z,J,S,K,N,I,V,R,M;if(t[16]!==s.duration||t[17]!==g[0]||t[18]!==g[1]||t[19]!==u?.dataConnectors||t[20]!==u?.yAxis?.axis||t[21]!==u?.yAxis?.labels||t[22]!==u?.yAxis?.title||t[23]!==x||t[24]!==n||t[25]!==$||t[26]!==o||t[27]!==D||t[28]!==v||t[29]!==C||t[30]!==r||t[31]!==h||t[32]!==j||t[33]!==w||t[34]!==c.left||t[35]!==c.top||t[36]!==xt||t[37]!==U||t[38]!==ut||t[39]!==Y||t[40]!==W||t[41]!==b||t[42]!==dt||t[43]!==at||t[44]!==a||t[45]!==kt||t[46]!==ct||t[47]!==st||t[48]!==p?.dataConnectors||t[49]!==p?.yAxis?.labels||t[50]!==p?.yAxis?.title||t[51]!==G){let T;t[65]!==ut||t[66]!==Y?(T=Bt.checkIfNullOrUndefined(ut)?Y>0?0:Y:ut,t[65]=ut,t[66]=Y,t[67]=T):T=t[67];let Lt;t[68]!==xt||t[69]!==U?(Lt=Bt.checkIfNullOrUndefined(xt)?U>0?U:0:xt,t[68]=xt,t[69]=U,t[70]=Lt):Lt=t[70];const f=te.linear().domain([T,Lt]).range([C,0]).nice();X=pt.motion.svg,F=`${G}px`,z=`${h}px`,J=`0 0 ${G} ${h}`,S="mx-auto",K="ltr",N=St,V=`translate(${c.left},${c.top})`;const Yt=u?.yAxis?.axis;let tt;t[71]!==Yt?(tt=l.mo("stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550",Yt),t[71]=Yt,t[72]=tt):tt=t[72];let wt;t[73]!==tt?(wt={axis:tt},t[73]=tt,t[74]=wt):wt=t[74];let et;t[75]!==C||t[76]!==a||t[77]!==wt?(et=l.jsxRuntimeExports.jsx(Xt.Axis,{y1:0,y2:C,x1:a,x2:a,classNames:wt}),t[75]=C,t[76]=a,t[77]=wt,t[78]=et):et=t[78];const Tt=C+15,bt=p?.yAxis?.title,Ot=u?.yAxis?.title;let it;t[79]!==Ot?(it=l.mo("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",Ot),t[79]=Ot,t[80]=it):it=t[80];let ot;t[81]!==g[0]||t[82]!==a||t[83]!==Tt||t[84]!==bt||t[85]!==it?(ot=l.jsxRuntimeExports.jsx(Ft.AxisTitle,{x:a,y:Tt,style:bt,className:it,text:g[0]}),t[81]=g[0],t[82]=a,t[83]=Tt,t[84]=bt,t[85]=it,t[86]=ot):ot=t[86],t[87]!==et||t[88]!==ot?(R=l.jsxRuntimeExports.jsxs("g",{children:[et,ot]}),t[87]=et,t[88]=ot,t[89]=R):R=t[89];const Dt=r-a,nt=r-a,lt=u?.yAxis?.axis;let O;t[90]!==lt?(O=l.mo("stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550",lt),t[90]=lt,t[91]=O):O=t[91];let A;t[92]!==O?(A={axis:O},t[92]=O,t[93]=A):A=t[93];let E;t[94]!==C||t[95]!==Dt||t[96]!==nt||t[97]!==A?(E=l.jsxRuntimeExports.jsx(Xt.Axis,{y1:0,y2:C,x1:Dt,x2:nt,classNames:A}),t[94]=C,t[95]=Dt,t[96]=nt,t[97]=A,t[98]=E):E=t[98];const rt=r-a,At=C+15,Ht=p?.yAxis?.title,Gt=u?.yAxis?.title;let Pt;t[99]!==Gt?(Pt=l.mo("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",Gt),t[99]=Gt,t[100]=Pt):Pt=t[100];let Wt;t[101]!==g[1]||t[102]!==rt||t[103]!==At||t[104]!==Ht||t[105]!==Pt?(Wt=l.jsxRuntimeExports.jsx(Ft.AxisTitle,{x:rt,y:At,style:Ht,className:Pt,text:g[1]}),t[101]=g[1],t[102]=rt,t[103]=At,t[104]=Ht,t[105]=Pt,t[106]=Wt):Wt=t[106],t[107]!==E||t[108]!==Wt?(M=l.jsxRuntimeExports.jsxs("g",{children:[E,Wt]}),t[107]=E,t[108]=Wt,t[109]=M):M=t[109],t[110]!==$?(k=$.filter(Re).map(ke),t[110]=$,t[111]=k):k=t[111],B=ie.AnimatePresence,I=o.map((i,Kt)=>l.jsxRuntimeExports.jsxs(pt.motion.g,{variants:{initial:{opacity:ct?i.color&&n[x.indexOf(`${i.color}`)]===ct?1:v:b?b.label===i.label?1:v:j.length!==0?j.indexOf(i.label)!==-1?1:v:1},whileInView:{opacity:ct?i.color&&n[x.indexOf(`${i.color}`)]===ct?1:v:b?b.label===i.label?1:v:j.length!==0?j.indexOf(i.label)!==-1?1:v:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},onMouseEnter:Ut=>{Nt(i),qt(Ut.clientY),Vt(Ut.clientX),at?.(i)},onMouseMove:Ut=>{Nt(i),qt(Ut.clientY),Vt(Ut.clientX)},onMouseLeave:()=>{Nt(void 0),Vt(void 0),qt(void 0),at?.(void 0)},onClick:()=>{(dt||D)&&(Qt.isEqual(W,i)&&kt?(It(void 0),dt?.(void 0)):(It(i),dt?.(i)))},children:[l.jsxRuntimeExports.jsx(pt.motion.circle,{variants:{initial:{cx:a,cy:f(i.y1),fill:o.filter($e).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,stroke:o.filter(Ee).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:0},whileInView:{cx:a,cy:f(i.y1),fill:o.filter(Ae).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,stroke:o.filter(Oe).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},r:a,style:{fillOpacity:.6}}),st?l.jsxRuntimeExports.jsx(pt.motion.text,{variants:{initial:{y:f(i.y1),fill:o.filter(be).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:0},whileInView:{y:f(i.y1),fill:o.filter(we).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},style:{textAnchor:"end",...p?.yAxis?.labels||{}},className:l.mo("text-xs",u?.yAxis?.labels),x:5,dy:"0.33em",textAnchor:"end",dx:0-a-3,children:i.label}):j.length!==0&&j.indexOf(i.label)!==-1?l.jsxRuntimeExports.jsx(pt.motion.text,{variants:{initial:{y:f(i.y1),fill:o.filter(je).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:0},whileInView:{y:f(i.y1),fill:o.filter(Ce).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},style:{textAnchor:"end",...p?.yAxis?.labels||{}},className:l.mo("text-xs",u?.yAxis?.labels),x:5,dy:"0.33em",dx:-3,children:i.label}):null,l.jsxRuntimeExports.jsx(pt.motion.circle,{variants:{initial:{cx:r-a,cy:f(i.y2),fill:o.filter(ve).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,stroke:o.filter(ge).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:0},whileInView:{cx:r-a,cy:f(i.y2),fill:o.filter(he).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,stroke:o.filter(de).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},r:a,style:{fillOpacity:.6}}),st?l.jsxRuntimeExports.jsx(pt.motion.text,{variants:{initial:{y:f(i.y2),fill:o.filter(ye).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:0},whileInView:{y:f(i.y2),fill:o.filter(pe).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},style:{textAnchor:"start",...p?.yAxis?.labels||{}},className:l.mo("text-xs",u?.yAxis?.labels),x:r-5,dy:"0.33em",dx:a+3,children:i.label}):j.length!==0&&j.indexOf(i.label)!==-1?l.jsxRuntimeExports.jsx(pt.motion.text,{variants:{initial:{y:f(i.y2),fill:o.filter(me).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:0},whileInView:{y:f(i.y2),fill:o.filter(fe).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},style:{textAnchor:"start",...p?.yAxis?.labels||{}},className:l.mo("text-xs",u?.yAxis?.labels),x:r-5,dy:"0.33em",dx:3,children:i.label}):null,l.jsxRuntimeExports.jsx(pt.motion.line,{variants:{initial:{x1:a,x2:r-a,y1:f(i.y1),y2:f(i.y1),stroke:o.filter(xe).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray},whileInView:{x1:a,x2:r-a,y1:f(i.y1),y2:f(i.y2),stroke:o.filter(ue).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},className:u?.dataConnectors,style:{fill:"none",strokeWidth:1,...p?.dataConnectors}})]},Kt)),t[16]=s.duration,t[17]=g[0],t[18]=g[1],t[19]=u?.dataConnectors,t[20]=u?.yAxis?.axis,t[21]=u?.yAxis?.labels,t[22]=u?.yAxis?.title,t[23]=x,t[24]=n,t[25]=$,t[26]=o,t[27]=D,t[28]=v,t[29]=C,t[30]=r,t[31]=h,t[32]=j,t[33]=w,t[34]=c.left,t[35]=c.top,t[36]=xt,t[37]=U,t[38]=ut,t[39]=Y,t[40]=W,t[41]=b,t[42]=dt,t[43]=at,t[44]=a,t[45]=kt,t[46]=ct,t[47]=st,t[48]=p?.dataConnectors,t[49]=p?.yAxis?.labels,t[50]=p?.yAxis?.title,t[51]=G,t[52]=B,t[53]=X,t[54]=k,t[55]=F,t[56]=z,t[57]=J,t[58]=S,t[59]=K,t[60]=N,t[61]=I,t[62]=V,t[63]=R,t[64]=M}else B=t[52],X=t[53],k=t[54],F=t[55],z=t[56],J=t[57],S=t[58],K=t[59],N=t[60],I=t[61],V=t[62],R=t[63],M=t[64];let Q;t[112]!==B||t[113]!==I?(Q=l.jsxRuntimeExports.jsx(B,{children:I}),t[112]=B,t[113]=I,t[114]=Q):Q=t[114];let d;t[115]!==$?(d=$.filter(ce).map(ae),t[115]=$,t[116]=d):d=t[116];let Z;t[117]!==k||t[118]!==Q||t[119]!==d||t[120]!==V||t[121]!==R||t[122]!==M?(Z=l.jsxRuntimeExports.jsxs("g",{transform:V,children:[R,M,k,Q,d]}),t[117]=k,t[118]=Q,t[119]=d,t[120]=V,t[121]=R,t[122]=M,t[123]=Z):Z=t[123];let q;t[124]!==X||t[125]!==F||t[126]!==z||t[127]!==J||t[128]!==S||t[129]!==K||t[130]!==N||t[131]!==Z?(q=l.jsxRuntimeExports.jsx(X,{width:F,height:z,viewBox:J,className:S,direction:K,ref:N,children:Z}),t[124]=X,t[125]=F,t[126]=z,t[127]=J,t[128]=S,t[129]=K,t[130]=N,t[131]=Z,t[132]=q):q=t[132];let _;t[133]!==u?.tooltip||t[134]!==Rt||t[135]!==gt||t[136]!==b||t[137]!==p?.tooltip||t[138]!==$t?(_=b&&$t&&Rt&&gt?l.jsxRuntimeExports.jsx(Zt.Tooltip,{data:b,body:$t,xPos:Rt,yPos:gt,backgroundStyle:p?.tooltip,className:u?.tooltip}):null,t[133]=u?.tooltip,t[134]=Rt,t[135]=gt,t[136]=b,t[137]=p?.tooltip,t[138]=$t,t[139]=_):_=t[139];let L;t[140]!==u?.modal||t[141]!==D||t[142]!==W?(L=D&&W!==void 0?l.jsxRuntimeExports.jsx(_t.DetailsModal,{body:D,data:W,setData:It,className:u?.modal}):null,t[140]=u?.modal,t[141]=D,t[142]=W,t[143]=L):L=t[143];let jt;return t[144]!==q||t[145]!==_||t[146]!==L?(jt=l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[q,_,L]}),t[144]=q,t[145]=_,t[146]=L,t[147]=jt):jt=t[147],jt}function ae(e){return e.layer}function ce(e){return e.position==="after"}function ue(e){return e.color}function xe(e){return e.color}function fe(e){return e.color}function me(e){return e.color}function pe(e){return e.color}function ye(e){return e.color}function de(e){return e.color}function he(e){return e.color}function ge(e){return e.color}function ve(e){return e.color}function Ce(e){return e.color}function je(e){return e.color}function we(e){return e.color}function be(e){return e.color}function Oe(e){return e.color}function Ae(e){return e.color}function Ee(e){return e.color}function $e(e){return e.color}function ke(e){return e.layer}function Re(e){return e.position==="before"}function Me(e){return e.y2}function De(e){return e.y1}function Se(e){return e.y2}function Ne(e){return e.y1}function Ie(e){const t=l.compilerRuntimeExports.c(89),{data:o,graphTitle:G,colors:h,sources:st,graphDescription:n,showLabels:x,height:a,width:y,footNote:yt,colorDomain:P,colorLegendTitle:Et,radius:$t,axisTitles:at,padding:g,backgroundColor:j,leftMargin:ct,rightMargin:ut,topMargin:xt,bottomMargin:dt,tooltip:kt,relativeHeight:D,onSeriesMouseOver:p,showColorScale:u,highlightedDataPoints:s,graphID:v,minValue:$,maxValue:St,onSeriesMouseClick:ht,graphDownload:w,dataDownload:b,fillContainer:Nt,language:W,showNAColor:It,minHeight:Rt,theme:Vt,ariaLabel:gt,resetSelectionOnDoubleClick:qt,detailsOnClick:vt,styles:c,classNames:r,animate:C,dimmedOpacity:Mt,customLayers:ft}=e,Y=x===void 0?!1:x,Ct=$t===void 0?5:$t;let mt;t[0]!==at?(mt=at===void 0?["",""]:at,t[0]=at,t[1]=mt):mt=t[1];const U=mt,B=j===void 0?!1:j,X=ct===void 0?50:ct,k=ut===void 0?50:ut,F=xt===void 0?20:xt,z=dt===void 0?20:dt,J=u===void 0?!0:u;let S;t[2]!==s?(S=s===void 0?[]:s,t[2]=s,t[3]=S):S=t[3];const K=S,N=w===void 0?!1:w,I=b===void 0?!1:b,V=Nt===void 0?!0:Nt,R=W===void 0?"en":W,M=It===void 0?!0:It,Q=Rt===void 0?0:Rt,d=Vt===void 0?"light":Vt,Z=qt===void 0?!0:qt,q=C===void 0?!1:C,_=Mt===void 0?.3:Mt;let L;t[4]!==ft?(L=ft===void 0?[]:ft,t[4]=ft,t[5]=L):L=t[5];const jt=L,[T,Lt]=H.useState(0),[f,Yt]=H.useState(0),[tt,wt]=H.useState(void 0),et=H.useRef(null),Tt=H.useRef(null);let bt,Ot;t[6]===Symbol.for("react.memo_cache_sentinel")?(bt=()=>{const Ht=new ResizeObserver(Gt=>{Lt(Gt[0].target.clientWidth||620),Yt(Gt[0].target.clientHeight||480)});return et.current&&Ht.observe(et.current),()=>Ht.disconnect()},Ot=[],t[6]=bt,t[7]=Ot):(bt=t[6],Ot=t[7]),H.useEffect(bt,Ot);const it=r?.graphContainer,ot=c?.graphContainer,Dt=V?void 0:y;let nt;t[8]!==r?.description||t[9]!==r?.title||t[10]!==o||t[11]!==I||t[12]!==n||t[13]!==N||t[14]!==G||t[15]!==c?.description||t[16]!==c?.title||t[17]!==y?(nt=G||n||N||I?l.jsxRuntimeExports.jsx(ne.GraphHeader,{styles:{title:c?.title,description:c?.description},classNames:{title:r?.title,description:r?.description},graphTitle:G,graphDescription:n,width:y,graphDownload:N?Tt:void 0,dataDownload:I?o.map(Ye).filter(We).length>0?o.map(Pe).filter(Ge):o.filter(He):null}):null,t[8]=r?.description,t[9]=r?.title,t[10]=o,t[11]=I,t[12]=n,t[13]=N,t[14]=G,t[15]=c?.description,t[16]=c?.title,t[17]=y,t[18]=nt):nt=t[18];let lt;t[19]!==r?.colorLegend||t[20]!==P||t[21]!==Et||t[22]!==h||t[23]!==o||t[24]!==J||t[25]!==M||t[26]!==d||t[27]!==y?(lt=J&&o.filter(Te).length!==0&&o.length>0?l.jsxRuntimeExports.jsx(le.ColorLegendWithMouseOver,{width:y,colorLegendTitle:Et,colors:h||m.Colors[d].categoricalColors.colors,colorDomain:P||zt.uniqBy(o,"color",!0),setSelectedColor:wt,showNAColor:M,className:r?.colorLegend}):null,t[19]=r?.colorLegend,t[20]=P,t[21]=Et,t[22]=h,t[23]=o,t[24]=J,t[25]=M,t[26]=d,t[27]=y,t[28]=lt):lt=t[28];let O;t[29]!==o.length?(O=o.length===0&&l.jsxRuntimeExports.jsx(re.EmptyState,{}),t[29]=o.length,t[30]=O):O=t[30];let A;t[31]!==q||t[32]!==U||t[33]!==z||t[34]!==r||t[35]!==P||t[36]!==h||t[37]!==jt||t[38]!==o||t[39]!==vt||t[40]!==_||t[41]!==V||t[42]!==K||t[43]!==X||t[44]!==St||t[45]!==$||t[46]!==ht||t[47]!==p||t[48]!==Ct||t[49]!==Z||t[50]!==k||t[51]!==tt||t[52]!==Y||t[53]!==c||t[54]!==f||t[55]!==T||t[56]!==d||t[57]!==kt||t[58]!==F||t[59]!==y?(A=T&&f&&o.length>0?l.jsxRuntimeExports.jsx(se,{data:o.filter(Le),width:V||!y||T<y?T:y,height:f,colorDomain:o.filter(qe).length===0?[]:P||zt.uniqBy(o,"color",!0),colors:o.filter(Ve).length===0?h?[h]:[m.Colors.primaryColors["blue-600"]]:h||m.Colors[d].categoricalColors.colors,selectedColor:tt,axisTitles:U,showLabels:Y,radius:Ct,leftMargin:X,rightMargin:k,topMargin:F,bottomMargin:z,tooltip:kt,onSeriesMouseOver:p,highlightedDataPoints:K,minValue:$,maxValue:St,onSeriesMouseClick:ht,resetSelectionOnDoubleClick:Z,detailsOnClick:vt,styles:c,classNames:r,animate:q===!0?{duration:.5,once:!0,amount:.5}:q||{duration:0,once:!0,amount:0},dimmedOpacity:_,customLayers:jt}):null,t[31]=q,t[32]=U,t[33]=z,t[34]=r,t[35]=P,t[36]=h,t[37]=jt,t[38]=o,t[39]=vt,t[40]=_,t[41]=V,t[42]=K,t[43]=X,t[44]=St,t[45]=$,t[46]=ht,t[47]=p,t[48]=Ct,t[49]=Z,t[50]=k,t[51]=tt,t[52]=Y,t[53]=c,t[54]=f,t[55]=T,t[56]=d,t[57]=kt,t[58]=F,t[59]=y,t[60]=A):A=t[60];let E;t[61]!==O||t[62]!==A?(E=l.jsxRuntimeExports.jsxs(Jt.GraphArea,{ref:et,children:[O,A]}),t[61]=O,t[62]=A,t[63]=E):E=t[63];let rt;t[64]!==r?.footnote||t[65]!==r?.source||t[66]!==yt||t[67]!==st||t[68]!==c?.footnote||t[69]!==c?.source||t[70]!==y?(rt=st||yt?l.jsxRuntimeExports.jsx(oe.GraphFooter,{styles:{footnote:c?.footnote,source:c?.source},classNames:{footnote:r?.footnote,source:r?.source},sources:st,footNote:yt,width:y}):null,t[64]=r?.footnote,t[65]=r?.source,t[66]=yt,t[67]=st,t[68]=c?.footnote,t[69]=c?.source,t[70]=y,t[71]=rt):rt=t[71];let At;return t[72]!==gt||t[73]!==B||t[74]!==v||t[75]!==a||t[76]!==R||t[77]!==Q||t[78]!==g||t[79]!==D||t[80]!==it||t[81]!==ot||t[82]!==Dt||t[83]!==nt||t[84]!==lt||t[85]!==E||t[86]!==rt||t[87]!==d?(At=l.jsxRuntimeExports.jsxs(Jt.GraphContainer,{className:it,style:ot,id:v,ref:Tt,"aria-label":gt,backgroundColor:B,theme:d,language:R,minHeight:Q,width:Dt,height:a,relativeHeight:D,padding:g,children:[nt,lt,E,rt]}),t[72]=gt,t[73]=B,t[74]=v,t[75]=a,t[76]=R,t[77]=Q,t[78]=g,t[79]=D,t[80]=it,t[81]=ot,t[82]=Dt,t[83]=nt,t[84]=lt,t[85]=E,t[86]=rt,t[87]=d,t[88]=At):At=t[88],At}function Ve(e){return e.color}function qe(e){return e.color}function Le(e){return!Bt.checkIfNullOrUndefined(e.y1)&&!Bt.checkIfNullOrUndefined(e.y2)}function Te(e){return e.color}function He(e){return e!==void 0}function Ge(e){return e!==void 0}function Pe(e){return e.data}function We(e){return e!==void 0}function Ye(e){return e.data}exports.SlopeChart=Ie;
2
2
  //# sourceMappingURL=SlopeChart.cjs.map
@@ -4,7 +4,7 @@ import { i as te } from "./index-Bwrro8-q.js";
4
4
  import { T as ee } from "./Tooltip-BRnAz2Gv.js";
5
5
  import { c as Bt } from "./checkIfNullOrUndefined-DmfiKkNw.js";
6
6
  import { Colors as y } from "./Colors.js";
7
- import { A as Ut } from "./Axis-DoOqnt6g.js";
7
+ import { A as Ut } from "./Axis-D56Gy0se.js";
8
8
  import { A as Jt } from "./AxisTitle-VFq89Olw.js";
9
9
  import { D as ie } from "./DetailsModal-BMCTgVsk.js";
10
10
  import { a as oe } from "./linear-CalFSAaO.js";
package/dist/Types.d.ts CHANGED
@@ -668,6 +668,8 @@ export declare interface GraphSettingsDataType {
668
668
  mapColorLegendTitle?: string;
669
669
  choroplethScaleType?: Exclude<ScaleDataType, 'linear'>;
670
670
  trackColor?: string;
671
+ zoomAndCenterByHighlightedIds?: boolean;
672
+ hideAxisLine?: boolean;
671
673
  }
672
674
 
673
675
  export declare type GraphType = GraphTypeForGriddedGraph;
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-6v2a2njQ.cjs"),R=require("react"),ne=require("./index-DQA8q5sC.cjs"),ee=require("./numberFormattingFunction-02t-wJta.cjs"),se=require("./Tooltip-BLa2EfMs.cjs"),Gt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),bt=require("./Colors.cjs"),re=require("./AxisTitle-DV4n0RxE.cjs"),le=require("./Axis-Dtjn-EgM.cjs"),ae=require("./ReferenceLine-M9aP3dj-.cjs"),ce=require("./YTicksAndGridLines-UzVC5eBM.cjs"),ue=require("./XAxesLabels-C6o9jJal.cjs"),de=require("./DetailsModal-DHttOA80.cjs"),zt=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),me=require("./linear-CgUCbw9F.cjs"),xe=require("./band-VYfcZeJ2.cjs"),te=require("./proxy-C4-uo6nS.cjs"),he=require("./use-in-view-C3o_ntMv.cjs"),fe=require("./index-CoobIWNj.cjs"),ge=require("./ColorLegendWithMouseOver.cjs"),pe=require("./EmptyState-CGeBqbmR.cjs"),oe=require("./GraphContainer-B1EDxJ0S.cjs"),ve=require("./GraphFooter.cjs"),be=require("./GraphHeader.cjs"),ie=require("./uniqBy-O05lp2S5.cjs");function ye(o){let t=0,i=0,j=0;for(const x of o)t+=x||0,t>i&&(i=t),t<j&&(j=t);return{max:i,min:j}}function Ce(o){const t=n.compilerRuntimeExports.c(46),{leftMargin:i,rightMargin:j,topMargin:x,bottomMargin:Wt,data:h,width:yt,height:z,barColor:f,suffix:Ct,prefix:wt,barPadding:Qt,showLabels:Ft,showValues:d,showTicks:jt,colorDomain:g,truncateBy:Ot,tooltip:L,onSeriesMouseOver:Et,refValues:Ht,selectedColor:G,maxValue:Mt,minValue:Rt,highlightedDataPoints:W,onSeriesMouseClick:kt,labelOrder:b,maxBarThickness:Tt,minBarThickness:At,detailsOnClick:B,barAxisTitle:nt,noOfTicks:Ut,styles:m,classNames:a,dimmedOpacity:k,animate:c,precision:Nt,customLayers:T,naLabel:Yt}=o,A=i===void 0?20:i,qt=j===void 0?20:j,$t=x===void 0?20:x,st=Wt===void 0?25:Wt,rt=R.useRef(null);let F;t[0]!==c.amount||t[1]!==c.once?(F={once:c.once,amount:c.amount},t[0]=c.amount,t[1]=c.once,t[2]=F):F=t[2];const D=he.useInView(rt,F),lt=nt?A+30:A;let H;t[3]!==st||t[4]!==qt||t[5]!==lt||t[6]!==$t?(H={top:$t,bottom:st,left:lt,right:qt},t[3]=st,t[4]=qt,t[5]=lt,t[6]=$t,t[7]=H):H=t[7];const p=H,{max:l,min:r}=ye(h.map(Le)),Xt=Gt.checkIfNullOrUndefined(Mt)?l:Mt,y=Gt.checkIfNullOrUndefined(Rt)?r:Rt,[at,Lt]=R.useState(void 0),[N,U]=R.useState(void 0),[Y,ct]=R.useState(void 0),[X,ut]=R.useState(void 0),q=yt-p.left-p.right,Bt=z-p.top-p.bottom;let S;if(t[8]!==h||t[9]!==b){const e=new Set,$=h.map((M,it)=>{const P=b?`${M.label}`:`${it}`;return e.add(P),{...M,id:P}}),E=b?b.filter(M=>!e.has(M)):[];S=[...$,...E.map($e)],t[8]=h,t[9]=b,t[10]=S}else S=t[10];const J=S;let K;t[11]!==J||t[12]!==b?(K=b??J.map(qe),t[11]=J,t[12]=b,t[13]=K):K=t[13];const dt=K,s=me.linear().domain([y,Xt]).range([Bt,0]).nice(),u=xe.band().domain(dt).range([0,At?Math.max(q,At*dt.length):Tt?Math.min(q,Tt*dt.length):q]).paddingInner(Qt),mt=s.ticks(Ut);let C=0;const Jt=J.map(e=>{const $=C;return C=C+(e.size||0),{...e,start:$,end:C}}),xt=a?.xAxis?.axis,v=a?.yAxis?.labels;let Q;t[14]!==v||t[15]!==xt?(Q={axis:xt,label:v},t[14]=v,t[15]=xt,t[16]=Q):Q=t[16];const O=m?.xAxis?.axis,Z=m?.yAxis?.labels;let _;t[17]!==O||t[18]!==Z?(_={axis:O,label:Z},t[17]=O,t[18]=Z,t[19]=_):_=t[19];const ht=0-A-15,tt=Bt/2,ft=m?.yAxis?.title,gt=a?.yAxis?.title;let V;t[20]!==nt||t[21]!==ht||t[22]!==tt||t[23]!==ft||t[24]!==gt?(V=n.jsxRuntimeExports.jsx(re.AxisTitle,{x:ht,y:tt,style:ft,className:gt,text:nt,rotate90:!0}),t[20]=nt,t[21]=ht,t[22]=tt,t[23]=ft,t[24]=gt,t[25]=V):V=t[25];let Dt;t[26]!==T?(Dt=T.filter(Te).map(ke),t[26]=T,t[27]=Dt):Dt=t[27];const et=fe.AnimatePresence,Kt=Jt.map((e,$)=>Gt.checkIfNullOrUndefined(u(e.id))?null:n.jsxRuntimeExports.jsxs(te.motion.g,{className:"undp-viz-g-with-hover",initial:"initial",animate:D?"whileInView":"initial",variants:{initial:{opacity:G?e.color&&f[g.indexOf(e.color)]===G?1:k:W.length!==0?W.indexOf(e.label)!==-1?.85:k:.85},whileInView:{opacity:G?e.color&&f[g.indexOf(e.color)]===G?1:k:W.length!==0?W.indexOf(e.label)!==-1?.85:k:.85,transition:{duration:c.duration}}},exit:{opacity:0,transition:{duration:c.duration}},onMouseEnter:E=>{Lt(e),ut(E.clientY),ct(E.clientX),Et?.(e)},onClick:()=>{(kt||B)&&(ne.isEqual(N,e)?(U(void 0),kt?.(void 0)):(U(e),kt?.(e)))},onMouseMove:E=>{Lt(e),ut(E.clientY),ct(E.clientX)},onMouseLeave:()=>{Lt(void 0),ct(void 0),ut(void 0),Et?.(void 0)},children:[e.size?n.jsxRuntimeExports.jsx(te.motion.rect,{width:u.bandwidth(),initial:"initial",animate:D?"whileInView":"initial",variants:{initial:{height:0,x:u(`${e.id}`),y:s(e.start),fill:h.filter(Re).length===0?f[0]:e.color?f[g.indexOf(e.color)]:bt.Colors.gray},whileInView:{height:Math.abs(s(e.start)-s(e.end)),y:s(Math.max(e.start,e.end)),x:u(`${e.id}`),fill:h.filter(Me).length===0?f[0]:e.color?f[g.indexOf(e.color)]:bt.Colors.gray,transition:{duration:c.duration}}},exit:{height:0,y:s(e.start),transition:{duration:c.duration}}}):null,Ft?n.jsxRuntimeExports.jsx(ue.XAxesLabels,{value:`${e.label}`.length<Ot?`${e.label}`:`${`${e.label}`.substring(0,Ot)}...`,y:s(0)+5,x:u(`${e.id}`),width:u.bandwidth(),height:p.bottom,style:m?.xAxis?.labels,className:a?.xAxis?.labels,alignment:"top",animate:c,isInView:D}):null,d&&Math.abs(s(e.start)-s(e.end))>16?n.jsxRuntimeExports.jsx(te.motion.text,{style:{textAnchor:"middle",...m?.graphObjectValues||{}},className:n.mo("graph-value text-sm",a?.graphObjectValues),dy:"0.33em",variants:{initial:{x:u(`${e.id}`)+u.bandwidth()/2,y:(s(e.start)+s(e.end))/2,opacity:0,fill:h.filter(Ee).length===0?zt.getTextColorBasedOnBgColor(f[0]):e.color?zt.getTextColorBasedOnBgColor(f[g.indexOf(e.color)]):zt.getTextColorBasedOnBgColor(bt.Colors.gray)},whileInView:{x:u(`${e.id}`)+u.bandwidth()/2,y:(s(e.start)+s(e.end))/2,fill:h.filter(Oe).length===0?zt.getTextColorBasedOnBgColor(f[0]):e.color?zt.getTextColorBasedOnBgColor(f[g.indexOf(e.color)]):zt.getTextColorBasedOnBgColor(bt.Colors.gray),opacity:1,transition:{duration:c.duration}}},initial:"initial",animate:D?"whileInView":"initial",exit:{opacity:0,transition:{duration:c.duration}},children:ee.numberFormattingFunction(e.size?Math.abs(e.size):e.size,Yt,Nt,wt,Ct)}):null]},e.label)),pt=Ht?n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:Ht.map((e,$)=>n.jsxRuntimeExports.jsx(ae.RefLineY,{text:e.text,color:e.color,y:s(e.value),x1:0-A,x2:q+p.right,classNames:e.classNames,styles:e.styles,animate:c,isInView:D},$))}):null;let St;t[28]!==et||t[29]!==Kt||t[30]!==pt?(St=n.jsxRuntimeExports.jsxs(et,{children:[Kt,pt]}),t[28]=et,t[29]=Kt,t[30]=pt,t[31]=St):St=t[31];let ot;t[32]!==T?(ot=T.filter(je).map(we),t[32]=T,t[33]=ot):ot=t[33];let vt;t[34]!==a?.tooltip||t[35]!==Y||t[36]!==X||t[37]!==at||t[38]!==m?.tooltip||t[39]!==L?(vt=at&&L&&Y&&X?n.jsxRuntimeExports.jsx(se.Tooltip,{data:at,body:L,xPos:Y,yPos:X,backgroundStyle:m?.tooltip,className:a?.tooltip}):null,t[34]=a?.tooltip,t[35]=Y,t[36]=X,t[37]=at,t[38]=m?.tooltip,t[39]=L,t[40]=vt):vt=t[40];let I;return t[41]!==a?.modal||t[42]!==B||t[43]!==N||t[44]!==U?(I=B&&N!==void 0?n.jsxRuntimeExports.jsx(de.DetailsModal,{body:B,data:N,setData:U,className:a?.modal}):null,t[41]=a?.modal,t[42]=B,t[43]=N,t[44]=U,t[45]=I):I=t[45],n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(te.motion.svg,{ref:rt,width:`${yt}px`,height:`${z}px`,viewBox:`0 0 ${yt} ${z}`,direction:"ltr",children:n.jsxRuntimeExports.jsxs("g",{transform:`translate(${p.left},${p.top})`,children:[n.jsxRuntimeExports.jsx(le.Axis,{y1:s(y<0?0:y),y2:s(y<0?0:y),x1:0-A,x2:q+p.right,label:ee.numberFormattingFunction(y<0?0:y,Yt,Nt,wt,Ct),labelPos:{x:0-A,dx:0,dy:Xt<0?"1em":-5,y:s(y<0?0:y)},classNames:Q,styles:_}),jt?n.jsxRuntimeExports.jsx(ce.YTicksAndGridLines,{values:mt.filter(Ne),y:mt.filter(Ae).map(e=>s(e)),x1:0-A,x2:q+p.right,styles:{gridLines:m?.yAxis?.gridLines,labels:m?.yAxis?.labels},classNames:{gridLines:a?.yAxis?.gridLines,labels:a?.yAxis?.labels},suffix:Ct,prefix:wt,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:Nt}):null,V,Dt,St,ot]})}),vt,I]})}function we(o){return o.layer}function je(o){return o.position==="after"}function Oe(o){return o.color}function Ee(o){return o.color}function Me(o){return o.color}function Re(o){return o.color}function ke(o){return o.layer}function Te(o){return o.position==="before"}function Ae(o){return o!==0}function Ne(o){return o!==0}function qe(o){return`${o.id}`}function $e(o){return{id:o,label:o,color:null,size:null}}function Le(o){return o.size}function Be(o){const t=n.compilerRuntimeExports.c(100),{data:i,graphTitle:j,colors:x,suffix:Wt,sources:h,prefix:yt,graphDescription:z,barPadding:f,showValues:Ct,showTicks:wt,truncateBy:Qt,height:Ft,width:d,footNote:jt,colorDomain:g,colorLegendTitle:Ot,highlightedDataPoints:L,padding:Et,backgroundColor:Ht,topMargin:G,bottomMargin:Mt,leftMargin:Rt,rightMargin:W,showLabels:kt,relativeHeight:b,tooltip:Tt,onSeriesMouseOver:At,refValues:B,showColorScale:nt,graphID:Ut,maxValue:m,minValue:a,onSeriesMouseClick:k,graphDownload:c,dataDownload:Nt,labelOrder:T,language:Yt,showNAColor:A,minHeight:qt,theme:$t,maxBarThickness:st,maxNumberOfBars:rt,minBarThickness:F,ariaLabel:D,detailsOnClick:lt,barAxisTitle:H,noOfTicks:p,styles:l,classNames:r,filterNA:Xt,animate:y,dimmedOpacity:at,precision:Lt,customLayers:N,naLabel:U}=o,Y=Wt===void 0?"":Wt,ct=yt===void 0?"":yt,X=f===void 0?.25:f,ut=Ct===void 0?!0:Ct,q=wt===void 0?!0:wt,Bt=Qt===void 0?999:Qt;let S;t[0]!==L?(S=L===void 0?[]:L,t[0]=L,t[1]=S):S=t[1];const J=S,K=Ht===void 0?!1:Ht,dt=kt===void 0?!0:kt,s=nt===void 0?!0:nt,u=c===void 0?!1:c,mt=Nt===void 0?!1:Nt,C=Yt===void 0?"en":Yt,Jt=A===void 0?!0:A,xt=qt===void 0?0:qt,v=$t===void 0?"light":$t,Q=p===void 0?5:p,O=Xt===void 0?!0:Xt,Z=y===void 0?!1:y,_=at===void 0?.3:at,ht=Lt===void 0?2:Lt;let tt;t[2]!==N?(tt=N===void 0?[]:N,t[2]=N,t[3]=tt):tt=t[3];const ft=tt,gt=U===void 0?"NA":U,[V,Dt]=R.useState(0),[et,Kt]=R.useState(0),[pt,St]=R.useState(void 0),ot=R.useRef(null),vt=R.useRef(null);let I,e;t[4]===Symbol.for("react.memo_cache_sentinel")?(I=()=>{const w=new ResizeObserver(_t=>{Dt(_t[0].target.clientWidth||620),Kt(_t[0].target.clientHeight||480)});return ot.current&&w.observe(ot.current),()=>w.disconnect()},e=[],t[4]=I,t[5]=e):(I=t[4],e=t[5]),R.useEffect(I,e);const $=r?.graphContainer,E=l?.graphContainer;let M;t[6]!==r?.description||t[7]!==r?.title||t[8]!==i||t[9]!==mt||t[10]!==z||t[11]!==u||t[12]!==j||t[13]!==l?.description||t[14]!==l?.title||t[15]!==d?(M=j||z||u||mt?n.jsxRuntimeExports.jsx(be.GraphHeader,{styles:{title:l?.title,description:l?.description},classNames:{title:r?.title,description:r?.description},graphTitle:j,graphDescription:z,width:d,graphDownload:u?vt:void 0,dataDownload:mt?i.map(We).filter(Ge).length>0?i.map(ze).filter(Pe):i.filter(Ie):null}):null,t[6]=r?.description,t[7]=r?.title,t[8]=i,t[9]=mt,t[10]=z,t[11]=u,t[12]=j,t[13]=l?.description,t[14]=l?.title,t[15]=d,t[16]=M):M=t[16];let it;t[17]!==r?.colorLegend||t[18]!==g||t[19]!==Ot||t[20]!==x||t[21]!==i||t[22]!==s||t[23]!==Jt||t[24]!==v||t[25]!==d?(it=s&&i.filter(Ve).length!==0&&i.length>0?n.jsxRuntimeExports.jsx(ge.ColorLegendWithMouseOver,{width:d,colorLegendTitle:Ot,colors:x||bt.Colors[v].categoricalColors.colors,colorDomain:g||ie.uniqBy(i,"color",!0),setSelectedColor:St,showNAColor:Jt,className:r?.colorLegend}):null,t[17]=r?.colorLegend,t[18]=g,t[19]=Ot,t[20]=x,t[21]=i,t[22]=s,t[23]=Jt,t[24]=v,t[25]=d,t[26]=it):it=t[26];let P;t[27]!==i||t[28]!==O?(P=i.filter(w=>O?!Gt.checkIfNullOrUndefined(w.size):w).length===0&&n.jsxRuntimeExports.jsx(pe.EmptyState,{}),t[27]=i,t[28]=O,t[29]=P):P=t[29];let Vt;t[30]!==Z||t[31]!==H||t[32]!==X||t[33]!==Mt||t[34]!==r||t[35]!==g||t[36]!==x||t[37]!==ft||t[38]!==i||t[39]!==lt||t[40]!==_||t[41]!==O||t[42]!==J||t[43]!==T||t[44]!==C||t[45]!==Rt||t[46]!==st||t[47]!==rt||t[48]!==m||t[49]!==F||t[50]!==a||t[51]!==gt||t[52]!==Q||t[53]!==k||t[54]!==At||t[55]!==ht||t[56]!==ct||t[57]!==B||t[58]!==W||t[59]!==pt||t[60]!==dt||t[61]!==q||t[62]!==ut||t[63]!==l||t[64]!==Y||t[65]!==et||t[66]!==V||t[67]!==v||t[68]!==Tt||t[69]!==G||t[70]!==Bt?(Vt=V&&et&&i.filter(w=>O?!Gt.checkIfNullOrUndefined(w.size):w).length>0?n.jsxRuntimeExports.jsx(Ce,{data:i.filter(w=>O?!Gt.checkIfNullOrUndefined(w.size):w).filter((w,_t)=>rt?_t<rt:!0),barColor:i.filter(Se).length===0?x?[x]:[bt.Colors.primaryColors["blue-600"]]:x||bt.Colors[v].categoricalColors.colors,colorDomain:i.filter(De).length===0?[]:g||ie.uniqBy(i,"color",!0),selectedColor:pt,width:V,height:et,suffix:Y,prefix:ct,barPadding:X,showValues:ut,showTicks:q,leftMargin:Rt,rightMargin:W,topMargin:G,bottomMargin:Mt,truncateBy:Bt,showLabels:dt,tooltip:Tt,onSeriesMouseOver:At,refValues:B,maxValue:m,minValue:a,highlightedDataPoints:J,onSeriesMouseClick:k,labelOrder:T,rtl:C==="he"||C==="ar",maxBarThickness:st,minBarThickness:F,detailsOnClick:lt,barAxisTitle:H,noOfTicks:Q,classNames:r,styles:l,animate:Z===!0?{duration:.5,once:!0,amount:.5}:Z||{duration:0,once:!0,amount:0},dimmedOpacity:_,precision:ht,customLayers:ft,naLabel:gt}):null,t[30]=Z,t[31]=H,t[32]=X,t[33]=Mt,t[34]=r,t[35]=g,t[36]=x,t[37]=ft,t[38]=i,t[39]=lt,t[40]=_,t[41]=O,t[42]=J,t[43]=T,t[44]=C,t[45]=Rt,t[46]=st,t[47]=rt,t[48]=m,t[49]=F,t[50]=a,t[51]=gt,t[52]=Q,t[53]=k,t[54]=At,t[55]=ht,t[56]=ct,t[57]=B,t[58]=W,t[59]=pt,t[60]=dt,t[61]=q,t[62]=ut,t[63]=l,t[64]=Y,t[65]=et,t[66]=V,t[67]=v,t[68]=Tt,t[69]=G,t[70]=Bt,t[71]=Vt):Vt=t[71];let It;t[72]!==P||t[73]!==Vt?(It=n.jsxRuntimeExports.jsxs(oe.GraphArea,{ref:ot,children:[P,Vt]}),t[72]=P,t[73]=Vt,t[74]=It):It=t[74];let Pt;t[75]!==r?.footnote||t[76]!==r?.source||t[77]!==jt||t[78]!==h||t[79]!==l?.footnote||t[80]!==l?.source||t[81]!==d?(Pt=h||jt?n.jsxRuntimeExports.jsx(ve.GraphFooter,{sources:h,footNote:jt,width:d,styles:{footnote:l?.footnote,source:l?.source},classNames:{footnote:r?.footnote,source:r?.source}}):null,t[75]=r?.footnote,t[76]=r?.source,t[77]=jt,t[78]=h,t[79]=l?.footnote,t[80]=l?.source,t[81]=d,t[82]=Pt):Pt=t[82];let Zt;return t[83]!==D||t[84]!==K||t[85]!==Ut||t[86]!==Ft||t[87]!==C||t[88]!==xt||t[89]!==Et||t[90]!==b||t[91]!==$||t[92]!==E||t[93]!==M||t[94]!==it||t[95]!==It||t[96]!==Pt||t[97]!==v||t[98]!==d?(Zt=n.jsxRuntimeExports.jsxs(oe.GraphContainer,{className:$,style:E,id:Ut,ref:vt,"aria-label":D,backgroundColor:K,theme:v,language:C,minHeight:xt,width:d,height:Ft,relativeHeight:b,padding:Et,children:[M,it,It,Pt]}),t[83]=D,t[84]=K,t[85]=Ut,t[86]=Ft,t[87]=C,t[88]=xt,t[89]=Et,t[90]=b,t[91]=$,t[92]=E,t[93]=M,t[94]=it,t[95]=It,t[96]=Pt,t[97]=v,t[98]=d,t[99]=Zt):Zt=t[99],Zt}function De(o){return o.color}function Se(o){return o.color}function Ve(o){return o.color}function Ie(o){return o!==void 0}function Pe(o){return o!==void 0}function ze(o){return o.data}function Ge(o){return o!==void 0}function We(o){return o.data}exports.WaterfallChart=Be;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-6v2a2njQ.cjs"),M=require("react"),re=require("./index-DQA8q5sC.cjs"),oe=require("./numberFormattingFunction-02t-wJta.cjs"),le=require("./Tooltip-BLa2EfMs.cjs"),zt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),yt=require("./Colors.cjs"),ae=require("./AxisTitle-DV4n0RxE.cjs"),ce=require("./Axis-Jt_tmhxS.cjs"),ue=require("./ReferenceLine-M9aP3dj-.cjs"),de=require("./YTicksAndGridLines-UzVC5eBM.cjs"),me=require("./XAxesLabels-C6o9jJal.cjs"),xe=require("./DetailsModal-DHttOA80.cjs"),Pt=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),he=require("./linear-CgUCbw9F.cjs"),fe=require("./band-VYfcZeJ2.cjs"),ie=require("./proxy-C4-uo6nS.cjs"),ge=require("./use-in-view-C3o_ntMv.cjs"),pe=require("./index-CoobIWNj.cjs"),ve=require("./ColorLegendWithMouseOver.cjs"),be=require("./EmptyState-CGeBqbmR.cjs"),ne=require("./GraphContainer-B1EDxJ0S.cjs"),ye=require("./GraphFooter.cjs"),Ce=require("./GraphHeader.cjs"),se=require("./uniqBy-O05lp2S5.cjs");function we(i){let t=0,o=0,w=0;for(const x of i)t+=x||0,t>o&&(o=t),t<w&&(w=t);return{max:o,min:w}}function je(i){const t=s.compilerRuntimeExports.c(46),{leftMargin:o,rightMargin:w,topMargin:x,bottomMargin:Gt,data:h,width:Ct,height:S,barColor:f,suffix:wt,prefix:jt,barPadding:Qt,showLabels:Wt,showValues:d,showTicks:st,colorDomain:g,truncateBy:Ot,tooltip:T,onSeriesMouseOver:Et,refValues:Ft,selectedColor:V,maxValue:Mt,minValue:At,highlightedDataPoints:I,onSeriesMouseClick:Rt,labelOrder:v,maxBarThickness:kt,minBarThickness:Lt,detailsOnClick:N,barAxisTitle:rt,noOfTicks:Ht,styles:m,classNames:a,dimmedOpacity:A,animate:c,precision:Tt,customLayers:R,naLabel:Ut,hideAxisLine:Zt}=i,k=o===void 0?20:o,Nt=w===void 0?20:w,lt=x===void 0?20:x,P=Gt===void 0?25:Gt,qt=M.useRef(null);let z;t[0]!==c.amount||t[1]!==c.once?(z={once:c.once,amount:c.amount},t[0]=c.amount,t[1]=c.once,t[2]=z):z=t[2];const q=ge.useInView(qt,z),at=rt?k+30:k;let ct;t[3]!==P||t[4]!==Nt||t[5]!==at||t[6]!==lt?(ct={top:lt,bottom:P,left:at,right:Nt},t[3]=P,t[4]=Nt,t[5]=at,t[6]=lt,t[7]=ct):ct=t[7];const n=ct,{max:l,min:_t}=we(h.map(De)),Yt=zt.checkIfNullOrUndefined(Mt)?l:Mt,b=zt.checkIfNullOrUndefined(At)?_t:At,[ut,G]=M.useState(void 0),[W,F]=M.useState(void 0),[H,dt]=M.useState(void 0),[U,mt]=M.useState(void 0),L=Ct-n.left-n.right,$t=S-n.top-n.bottom;let $;if(t[8]!==h||t[9]!==v){const e=new Set,O=h.map((ot,nt)=>{const D=v?`${ot.label}`:`${nt}`;return e.add(D),{...ot,id:D}}),E=v?v.filter(ot=>!e.has(ot)):[];$=[...O,...E.map(Be)],t[8]=h,t[9]=v,t[10]=$}else $=t[10];const Y=$;let X;t[11]!==Y||t[12]!==v?(X=v??Y.map($e),t[11]=Y,t[12]=v,t[13]=X):X=t[13];const xt=X,r=he.linear().domain([b,Yt]).range([$t,0]).nice(),u=fe.band().domain(xt).range([0,Lt?Math.max(L,Lt*xt.length):kt?Math.min(L,kt*xt.length):L]).paddingInner(Qt),ht=r.ticks(Ht);let y=0;const Xt=Y.map(e=>{const O=y;return y=y+(e.size||0),{...e,start:O,end:y}}),ft=a?.xAxis?.axis,p=a?.yAxis?.labels;let J;t[14]!==p||t[15]!==ft?(J={axis:ft,label:p},t[14]=p,t[15]=ft,t[16]=J):J=t[16];const j=m?.xAxis?.axis,K=m?.yAxis?.labels;let Q;t[17]!==j||t[18]!==K?(Q={axis:j,label:K},t[17]=j,t[18]=K,t[19]=Q):Q=t[19];const gt=0-k-15,Z=$t/2,pt=m?.yAxis?.title,vt=a?.yAxis?.title;let _;t[20]!==rt||t[21]!==gt||t[22]!==Z||t[23]!==pt||t[24]!==vt?(_=s.jsxRuntimeExports.jsx(ae.AxisTitle,{x:gt,y:Z,style:pt,className:vt,text:rt,rotate90:!0}),t[20]=rt,t[21]=gt,t[22]=Z,t[23]=pt,t[24]=vt,t[25]=_):_=t[25];let B;t[26]!==R?(B=R.filter(Te).map(Le),t[26]=R,t[27]=B):B=t[27];const Jt=pe.AnimatePresence,tt=Xt.map((e,O)=>zt.checkIfNullOrUndefined(u(e.id))?null:s.jsxRuntimeExports.jsxs(ie.motion.g,{className:"undp-viz-g-with-hover",initial:"initial",animate:q?"whileInView":"initial",variants:{initial:{opacity:V?e.color&&f[g.indexOf(e.color)]===V?1:A:I.length!==0?I.indexOf(e.label)!==-1?.85:A:.85},whileInView:{opacity:V?e.color&&f[g.indexOf(e.color)]===V?1:A:I.length!==0?I.indexOf(e.label)!==-1?.85:A:.85,transition:{duration:c.duration}}},exit:{opacity:0,transition:{duration:c.duration}},onMouseEnter:E=>{G(e),mt(E.clientY),dt(E.clientX),Et?.(e)},onClick:()=>{(Rt||N)&&(re.isEqual(W,e)?(F(void 0),Rt?.(void 0)):(F(e),Rt?.(e)))},onMouseMove:E=>{G(e),mt(E.clientY),dt(E.clientX)},onMouseLeave:()=>{G(void 0),dt(void 0),mt(void 0),Et?.(void 0)},children:[e.size?s.jsxRuntimeExports.jsx(ie.motion.rect,{width:u.bandwidth(),initial:"initial",animate:q?"whileInView":"initial",variants:{initial:{height:0,x:u(`${e.id}`),y:r(e.start),fill:h.filter(ke).length===0?f[0]:e.color?f[g.indexOf(e.color)]:yt.Colors.gray},whileInView:{height:Math.abs(r(e.start)-r(e.end)),y:r(Math.max(e.start,e.end)),x:u(`${e.id}`),fill:h.filter(Re).length===0?f[0]:e.color?f[g.indexOf(e.color)]:yt.Colors.gray,transition:{duration:c.duration}}},exit:{height:0,y:r(e.start),transition:{duration:c.duration}}}):null,Wt?s.jsxRuntimeExports.jsx(me.XAxesLabels,{value:`${e.label}`.length<Ot?`${e.label}`:`${`${e.label}`.substring(0,Ot)}...`,y:r(0)+5,x:u(`${e.id}`),width:u.bandwidth(),height:n.bottom,style:m?.xAxis?.labels,className:a?.xAxis?.labels,alignment:"top",animate:c,isInView:q}):null,d&&Math.abs(r(e.start)-r(e.end))>16?s.jsxRuntimeExports.jsx(ie.motion.text,{style:{textAnchor:"middle",...m?.graphObjectValues||{}},className:s.mo("graph-value text-sm",a?.graphObjectValues),dy:"0.33em",variants:{initial:{x:u(`${e.id}`)+u.bandwidth()/2,y:(r(e.start)+r(e.end))/2,opacity:0,fill:h.filter(Ae).length===0?Pt.getTextColorBasedOnBgColor(f[0]):e.color?Pt.getTextColorBasedOnBgColor(f[g.indexOf(e.color)]):Pt.getTextColorBasedOnBgColor(yt.Colors.gray)},whileInView:{x:u(`${e.id}`)+u.bandwidth()/2,y:(r(e.start)+r(e.end))/2,fill:h.filter(Me).length===0?Pt.getTextColorBasedOnBgColor(f[0]):e.color?Pt.getTextColorBasedOnBgColor(f[g.indexOf(e.color)]):Pt.getTextColorBasedOnBgColor(yt.Colors.gray),opacity:1,transition:{duration:c.duration}}},initial:"initial",animate:q?"whileInView":"initial",exit:{opacity:0,transition:{duration:c.duration}},children:oe.numberFormattingFunction(e.size?Math.abs(e.size):e.size,Ut,Tt,jt,wt)}):null]},e.label)),Kt=Ft?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:Ft.map((e,O)=>s.jsxRuntimeExports.jsx(ue.RefLineY,{text:e.text,color:e.color,y:r(e.value),x1:0-k,x2:L+n.right,classNames:e.classNames,styles:e.styles,animate:c,isInView:q},O))}):null;let et;t[28]!==Jt||t[29]!==tt||t[30]!==Kt?(et=s.jsxRuntimeExports.jsxs(Jt,{children:[tt,Kt]}),t[28]=Jt,t[29]=tt,t[30]=Kt,t[31]=et):et=t[31];let Bt;t[32]!==R?(Bt=R.filter(Ee).map(Oe),t[32]=R,t[33]=Bt):Bt=t[33];let it;t[34]!==a?.tooltip||t[35]!==H||t[36]!==U||t[37]!==ut||t[38]!==m?.tooltip||t[39]!==T?(it=ut&&T&&H&&U?s.jsxRuntimeExports.jsx(le.Tooltip,{data:ut,body:T,xPos:H,yPos:U,backgroundStyle:m?.tooltip,className:a?.tooltip}):null,t[34]=a?.tooltip,t[35]=H,t[36]=U,t[37]=ut,t[38]=m?.tooltip,t[39]=T,t[40]=it):it=t[40];let bt;return t[41]!==a?.modal||t[42]!==N||t[43]!==W||t[44]!==F?(bt=N&&W!==void 0?s.jsxRuntimeExports.jsx(xe.DetailsModal,{body:N,data:W,setData:F,className:a?.modal}):null,t[41]=a?.modal,t[42]=N,t[43]=W,t[44]=F,t[45]=bt):bt=t[45],s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(ie.motion.svg,{ref:qt,width:`${Ct}px`,height:`${S}px`,viewBox:`0 0 ${Ct} ${S}`,direction:"ltr",children:s.jsxRuntimeExports.jsxs("g",{transform:`translate(${n.left},${n.top})`,children:[s.jsxRuntimeExports.jsx(ce.Axis,{y1:r(b<0?0:b),y2:r(b<0?0:b),x1:0-k,x2:L+n.right,hideAxisLine:Zt,label:st?oe.numberFormattingFunction(b<0?0:b,Ut,Tt,jt,wt):void 0,labelPos:{x:0-k,dx:0,dy:Yt<0?"1em":-5,y:r(b<0?0:b)},classNames:J,styles:Q}),st?s.jsxRuntimeExports.jsx(de.YTicksAndGridLines,{values:ht.filter(qe),y:ht.filter(Ne).map(e=>r(e)),x1:0-k,x2:L+n.right,styles:{gridLines:m?.yAxis?.gridLines,labels:m?.yAxis?.labels},classNames:{gridLines:a?.yAxis?.gridLines,labels:a?.yAxis?.labels},suffix:wt,prefix:jt,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:Tt}):null,_,B,et,Bt]})}),it,bt]})}function Oe(i){return i.layer}function Ee(i){return i.position==="after"}function Me(i){return i.color}function Ae(i){return i.color}function Re(i){return i.color}function ke(i){return i.color}function Le(i){return i.layer}function Te(i){return i.position==="before"}function Ne(i){return i!==0}function qe(i){return i!==0}function $e(i){return`${i.id}`}function Be(i){return{id:i,label:i,color:null,size:null}}function De(i){return i.size}function Se(i){const t=s.compilerRuntimeExports.c(101),{data:o,graphTitle:w,colors:x,suffix:Gt,sources:h,prefix:Ct,graphDescription:S,barPadding:f,showValues:wt,showTicks:jt,truncateBy:Qt,height:Wt,width:d,footNote:st,colorDomain:g,colorLegendTitle:Ot,highlightedDataPoints:T,padding:Et,backgroundColor:Ft,topMargin:V,bottomMargin:Mt,leftMargin:At,rightMargin:I,showLabels:Rt,relativeHeight:v,tooltip:kt,onSeriesMouseOver:Lt,refValues:N,showColorScale:rt,graphID:Ht,maxValue:m,minValue:a,onSeriesMouseClick:A,graphDownload:c,dataDownload:Tt,labelOrder:R,language:Ut,showNAColor:Zt,minHeight:k,theme:Nt,maxBarThickness:lt,maxNumberOfBars:P,minBarThickness:qt,ariaLabel:z,detailsOnClick:q,barAxisTitle:at,noOfTicks:ct,styles:n,classNames:l,filterNA:_t,animate:Yt,dimmedOpacity:b,precision:ut,customLayers:G,naLabel:W,hideAxisLine:F}=i,H=Gt===void 0?"":Gt,dt=Ct===void 0?"":Ct,U=f===void 0?.25:f,mt=wt===void 0?!0:wt,L=jt===void 0?!0:jt,$t=Qt===void 0?999:Qt;let $;t[0]!==T?($=T===void 0?[]:T,t[0]=T,t[1]=$):$=t[1];const Y=$,X=Ft===void 0?!1:Ft,xt=Rt===void 0?!0:Rt,r=rt===void 0?!0:rt,u=c===void 0?!1:c,ht=Tt===void 0?!1:Tt,y=Ut===void 0?"en":Ut,Xt=Zt===void 0?!0:Zt,ft=k===void 0?0:k,p=Nt===void 0?"light":Nt,J=ct===void 0?5:ct,j=_t===void 0?!0:_t,K=Yt===void 0?!1:Yt,Q=b===void 0?.3:b,gt=ut===void 0?2:ut;let Z;t[2]!==G?(Z=G===void 0?[]:G,t[2]=G,t[3]=Z):Z=t[3];const pt=Z,vt=W===void 0?"NA":W,_=F===void 0?!1:F,[B,Jt]=M.useState(0),[tt,Kt]=M.useState(0),[et,Bt]=M.useState(void 0),it=M.useRef(null),bt=M.useRef(null);let e,O;t[4]===Symbol.for("react.memo_cache_sentinel")?(e=()=>{const C=new ResizeObserver(ee=>{Jt(ee[0].target.clientWidth||620),Kt(ee[0].target.clientHeight||480)});return it.current&&C.observe(it.current),()=>C.disconnect()},O=[],t[4]=e,t[5]=O):(e=t[4],O=t[5]),M.useEffect(e,O);const E=l?.graphContainer,ot=n?.graphContainer;let nt;t[6]!==l?.description||t[7]!==l?.title||t[8]!==o||t[9]!==ht||t[10]!==S||t[11]!==u||t[12]!==w||t[13]!==n?.description||t[14]!==n?.title||t[15]!==d?(nt=w||S||u||ht?s.jsxRuntimeExports.jsx(Ce.GraphHeader,{styles:{title:n?.title,description:n?.description},classNames:{title:l?.title,description:l?.description},graphTitle:w,graphDescription:S,width:d,graphDownload:u?bt:void 0,dataDownload:ht?o.map(He).filter(Fe).length>0?o.map(We).filter(Ge):o.filter(ze):null}):null,t[6]=l?.description,t[7]=l?.title,t[8]=o,t[9]=ht,t[10]=S,t[11]=u,t[12]=w,t[13]=n?.description,t[14]=n?.title,t[15]=d,t[16]=nt):nt=t[16];let D;t[17]!==l?.colorLegend||t[18]!==g||t[19]!==Ot||t[20]!==x||t[21]!==o||t[22]!==r||t[23]!==Xt||t[24]!==p||t[25]!==d?(D=r&&o.filter(Pe).length!==0&&o.length>0?s.jsxRuntimeExports.jsx(ve.ColorLegendWithMouseOver,{width:d,colorLegendTitle:Ot,colors:x||yt.Colors[p].categoricalColors.colors,colorDomain:g||se.uniqBy(o,"color",!0),setSelectedColor:Bt,showNAColor:Xt,className:l?.colorLegend}):null,t[17]=l?.colorLegend,t[18]=g,t[19]=Ot,t[20]=x,t[21]=o,t[22]=r,t[23]=Xt,t[24]=p,t[25]=d,t[26]=D):D=t[26];let Dt;t[27]!==o||t[28]!==j?(Dt=o.filter(C=>j?!zt.checkIfNullOrUndefined(C.size):C).length===0&&s.jsxRuntimeExports.jsx(be.EmptyState,{}),t[27]=o,t[28]=j,t[29]=Dt):Dt=t[29];let St;t[30]!==K||t[31]!==at||t[32]!==U||t[33]!==Mt||t[34]!==l||t[35]!==g||t[36]!==x||t[37]!==pt||t[38]!==o||t[39]!==q||t[40]!==Q||t[41]!==j||t[42]!==_||t[43]!==Y||t[44]!==R||t[45]!==y||t[46]!==At||t[47]!==lt||t[48]!==P||t[49]!==m||t[50]!==qt||t[51]!==a||t[52]!==vt||t[53]!==J||t[54]!==A||t[55]!==Lt||t[56]!==gt||t[57]!==dt||t[58]!==N||t[59]!==I||t[60]!==et||t[61]!==xt||t[62]!==L||t[63]!==mt||t[64]!==n||t[65]!==H||t[66]!==tt||t[67]!==B||t[68]!==p||t[69]!==kt||t[70]!==V||t[71]!==$t?(St=B&&tt&&o.filter(C=>j?!zt.checkIfNullOrUndefined(C.size):C).length>0?s.jsxRuntimeExports.jsx(je,{hideAxisLine:_,data:o.filter(C=>j?!zt.checkIfNullOrUndefined(C.size):C).filter((C,ee)=>P?ee<P:!0),barColor:o.filter(Ie).length===0?x?[x]:[yt.Colors.primaryColors["blue-600"]]:x||yt.Colors[p].categoricalColors.colors,colorDomain:o.filter(Ve).length===0?[]:g||se.uniqBy(o,"color",!0),selectedColor:et,width:B,height:tt,suffix:H,prefix:dt,barPadding:U,showValues:mt,showTicks:L,leftMargin:At,rightMargin:I,topMargin:V,bottomMargin:Mt,truncateBy:$t,showLabels:xt,tooltip:kt,onSeriesMouseOver:Lt,refValues:N,maxValue:m,minValue:a,highlightedDataPoints:Y,onSeriesMouseClick:A,labelOrder:R,rtl:y==="he"||y==="ar",maxBarThickness:lt,minBarThickness:qt,detailsOnClick:q,barAxisTitle:at,noOfTicks:J,classNames:l,styles:n,animate:K===!0?{duration:.5,once:!0,amount:.5}:K||{duration:0,once:!0,amount:0},dimmedOpacity:Q,precision:gt,customLayers:pt,naLabel:vt}):null,t[30]=K,t[31]=at,t[32]=U,t[33]=Mt,t[34]=l,t[35]=g,t[36]=x,t[37]=pt,t[38]=o,t[39]=q,t[40]=Q,t[41]=j,t[42]=_,t[43]=Y,t[44]=R,t[45]=y,t[46]=At,t[47]=lt,t[48]=P,t[49]=m,t[50]=qt,t[51]=a,t[52]=vt,t[53]=J,t[54]=A,t[55]=Lt,t[56]=gt,t[57]=dt,t[58]=N,t[59]=I,t[60]=et,t[61]=xt,t[62]=L,t[63]=mt,t[64]=n,t[65]=H,t[66]=tt,t[67]=B,t[68]=p,t[69]=kt,t[70]=V,t[71]=$t,t[72]=St):St=t[72];let Vt;t[73]!==Dt||t[74]!==St?(Vt=s.jsxRuntimeExports.jsxs(ne.GraphArea,{ref:it,children:[Dt,St]}),t[73]=Dt,t[74]=St,t[75]=Vt):Vt=t[75];let It;t[76]!==l?.footnote||t[77]!==l?.source||t[78]!==st||t[79]!==h||t[80]!==n?.footnote||t[81]!==n?.source||t[82]!==d?(It=h||st?s.jsxRuntimeExports.jsx(ye.GraphFooter,{sources:h,footNote:st,width:d,styles:{footnote:n?.footnote,source:n?.source},classNames:{footnote:l?.footnote,source:l?.source}}):null,t[76]=l?.footnote,t[77]=l?.source,t[78]=st,t[79]=h,t[80]=n?.footnote,t[81]=n?.source,t[82]=d,t[83]=It):It=t[83];let te;return t[84]!==z||t[85]!==X||t[86]!==Ht||t[87]!==Wt||t[88]!==y||t[89]!==ft||t[90]!==Et||t[91]!==v||t[92]!==E||t[93]!==ot||t[94]!==nt||t[95]!==D||t[96]!==Vt||t[97]!==It||t[98]!==p||t[99]!==d?(te=s.jsxRuntimeExports.jsxs(ne.GraphContainer,{className:E,style:ot,id:Ht,ref:bt,"aria-label":z,backgroundColor:X,theme:p,language:y,minHeight:ft,width:d,height:Wt,relativeHeight:v,padding:Et,children:[nt,D,Vt,It]}),t[84]=z,t[85]=X,t[86]=Ht,t[87]=Wt,t[88]=y,t[89]=ft,t[90]=Et,t[91]=v,t[92]=E,t[93]=ot,t[94]=nt,t[95]=D,t[96]=Vt,t[97]=It,t[98]=p,t[99]=d,t[100]=te):te=t[100],te}function Ve(i){return i.color}function Ie(i){return i.color}function Pe(i){return i.color}function ze(i){return i!==void 0}function Ge(i){return i!==void 0}function We(i){return i.data}function Fe(i){return i!==void 0}function He(i){return i.data}exports.WaterfallChart=Se;
2
2
  //# sourceMappingURL=WaterfallChart.cjs.map