@undp/data-viz 2.3.11 → 2.3.12

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 (146) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.js +1 -1
  3. package/dist/BarGraph.cjs +1 -1
  4. package/dist/BarGraph.cjs.map +1 -1
  5. package/dist/BarGraph.js +4 -4
  6. package/dist/BarGraph.js.map +1 -1
  7. package/dist/BasicStatCard.cjs +1 -1
  8. package/dist/BasicStatCard.js +1 -1
  9. package/dist/BeeSwarmChart.cjs +1 -1
  10. package/dist/BeeSwarmChart.js +2 -2
  11. package/dist/BiVariateChoroplethMap.cjs +1 -1
  12. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  13. package/dist/BiVariateChoroplethMap.js +2 -2
  14. package/dist/BiVariateChoroplethMap.js.map +1 -1
  15. package/dist/BulletChart.cjs +1 -1
  16. package/dist/BulletChart.cjs.map +1 -1
  17. package/dist/BulletChart.js +2 -2
  18. package/dist/BulletChart.js.map +1 -1
  19. package/dist/ButterflyChart.cjs +1 -1
  20. package/dist/ButterflyChart.cjs.map +1 -1
  21. package/dist/ButterflyChart.js +39 -39
  22. package/dist/ButterflyChart.js.map +1 -1
  23. package/dist/ChoroplethMap.cjs +1 -1
  24. package/dist/ChoroplethMap.cjs.map +1 -1
  25. package/dist/ChoroplethMap.js +2 -2
  26. package/dist/ChoroplethMap.js.map +1 -1
  27. package/dist/CirclePackingGraph.cjs +1 -1
  28. package/dist/CirclePackingGraph.js +2 -2
  29. package/dist/ColorLegend.cjs +1 -1
  30. package/dist/ColorLegend.js +1 -1
  31. package/dist/ColorLegendWithMouseOver.cjs +1 -1
  32. package/dist/ColorLegendWithMouseOver.js +1 -1
  33. package/dist/DataCards.cjs +1 -1
  34. package/dist/DataCards.js +2 -2
  35. package/dist/DataTable.cjs +1 -1
  36. package/dist/DataTable.js +1 -1
  37. package/dist/DifferenceLineChart.cjs +1 -1
  38. package/dist/DifferenceLineChart.js +1 -1
  39. package/dist/DonutChart.cjs +1 -1
  40. package/dist/DonutChart.js +3 -3
  41. package/dist/DotDensityMap.cjs +1 -1
  42. package/dist/DotDensityMap.cjs.map +1 -1
  43. package/dist/DotDensityMap.js +19 -19
  44. package/dist/DotDensityMap.js.map +1 -1
  45. package/dist/DualAxisLineChart.cjs +1 -1
  46. package/dist/DualAxisLineChart.js +1 -1
  47. package/dist/DumbbellChart.cjs +1 -1
  48. package/dist/DumbbellChart.cjs.map +1 -1
  49. package/dist/DumbbellChart.js +2 -2
  50. package/dist/DumbbellChart.js.map +1 -1
  51. package/dist/{EmptyState-D807L58h.js → EmptyState-B3fPoH6L.js} +2 -2
  52. package/dist/{EmptyState-D807L58h.js.map → EmptyState-B3fPoH6L.js.map} +1 -1
  53. package/dist/{EmptyState-N1eHt3vq.cjs → EmptyState-B4c-CrXs.cjs} +2 -2
  54. package/dist/{EmptyState-N1eHt3vq.cjs.map → EmptyState-B4c-CrXs.cjs.map} +1 -1
  55. package/dist/FootNote.cjs +1 -1
  56. package/dist/FootNote.js +1 -1
  57. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  58. package/dist/GeoHubMapWithLayerSelection.js +1 -1
  59. package/dist/GraphDescription.cjs +1 -1
  60. package/dist/GraphDescription.js +1 -1
  61. package/dist/{GraphEl-DvwOOhF1.cjs → GraphEl-Bgf8w82K.cjs} +2 -2
  62. package/dist/{GraphEl-DvwOOhF1.cjs.map → GraphEl-Bgf8w82K.cjs.map} +1 -1
  63. package/dist/{GraphEl-CT3xPv2P.js → GraphEl-CXK-LPsj.js} +3 -3
  64. package/dist/{GraphEl-CT3xPv2P.js.map → GraphEl-CXK-LPsj.js.map} +1 -1
  65. package/dist/GraphFooter.cjs +1 -1
  66. package/dist/GraphFooter.js +1 -1
  67. package/dist/GraphTitle.cjs +1 -1
  68. package/dist/GraphTitle.js +1 -1
  69. package/dist/GriddedGraphs.cjs +1 -1
  70. package/dist/GriddedGraphs.js +1 -1
  71. package/dist/HeatMap.cjs +1 -1
  72. package/dist/HeatMap.js +1 -1
  73. package/dist/Histogram.cjs +1 -1
  74. package/dist/Histogram.js +1 -1
  75. package/dist/HybridMap.cjs +1 -1
  76. package/dist/HybridMap.cjs.map +1 -1
  77. package/dist/HybridMap.js +29 -29
  78. package/dist/HybridMap.js.map +1 -1
  79. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  80. package/dist/LineChartWithConfidenceInterval.js +1 -1
  81. package/dist/LinearColorLegend.cjs +1 -1
  82. package/dist/LinearColorLegend.js +1 -1
  83. package/dist/MultiLineAltChart.cjs +1 -1
  84. package/dist/MultiLineAltChart.cjs.map +1 -1
  85. package/dist/MultiLineAltChart.d.ts +2 -0
  86. package/dist/MultiLineAltChart.js +393 -391
  87. package/dist/MultiLineAltChart.js.map +1 -1
  88. package/dist/MultiLineChart.cjs +1 -1
  89. package/dist/MultiLineChart.js +1 -1
  90. package/dist/ParetoChart.cjs +1 -1
  91. package/dist/ParetoChart.js +1 -1
  92. package/dist/RadarChart.cjs +1 -1
  93. package/dist/RadarChart.js +1 -1
  94. package/dist/SankeyChart.cjs +1 -1
  95. package/dist/SankeyChart.js +2 -2
  96. package/dist/ScatterPlot.cjs +1 -1
  97. package/dist/ScatterPlot.cjs.map +1 -1
  98. package/dist/ScatterPlot.d.ts +2 -0
  99. package/dist/ScatterPlot.js +439 -437
  100. package/dist/ScatterPlot.js.map +1 -1
  101. package/dist/SimpleLineChart.cjs +1 -1
  102. package/dist/SimpleLineChart.js +1 -1
  103. package/dist/SingleGraphDashboard.cjs +1 -1
  104. package/dist/SingleGraphDashboard.js +1 -1
  105. package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
  106. package/dist/SingleGraphDashboardGeoHubMaps.js +1 -1
  107. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  108. package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
  109. package/dist/SlopeChart.cjs +1 -1
  110. package/dist/SlopeChart.js +1 -1
  111. package/dist/{Source-24M277ZQ.cjs → Source-BOSAl3UX.cjs} +2 -2
  112. package/dist/{Source-24M277ZQ.cjs.map → Source-BOSAl3UX.cjs.map} +1 -1
  113. package/dist/{Source-eILIr4Ov.js → Source-Djkz-7jX.js} +2 -2
  114. package/dist/{Source-eILIr4Ov.js.map → Source-Djkz-7jX.js.map} +1 -1
  115. package/dist/Source.cjs +1 -1
  116. package/dist/Source.js +2 -2
  117. package/dist/StatCardFromData.cjs +1 -1
  118. package/dist/StatCardFromData.js +1 -1
  119. package/dist/StripChart.cjs +1 -1
  120. package/dist/StripChart.js +1 -1
  121. package/dist/ThreeDGlobe.cjs +1 -1
  122. package/dist/ThreeDGlobe.js +1 -1
  123. package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
  124. package/dist/ThresholdColorLegendWithMouseOver.js +1 -1
  125. package/dist/TreeMapGraph.cjs +1 -1
  126. package/dist/TreeMapGraph.js +2 -2
  127. package/dist/Typography-CZZxlj1W.cjs +2 -0
  128. package/dist/Typography-CZZxlj1W.cjs.map +1 -0
  129. package/dist/{Typography-HicNIA61.js → Typography-DMVW6JnV.js} +67 -60
  130. package/dist/Typography-DMVW6JnV.js.map +1 -0
  131. package/dist/UnitChart.cjs +1 -1
  132. package/dist/UnitChart.js +1 -1
  133. package/dist/WaterfallChart.cjs +1 -1
  134. package/dist/WaterfallChart.js +1 -1
  135. package/dist/{index-B5ggV1vg.js → index-C6VwVS8W.js} +3 -3
  136. package/dist/{index-B5ggV1vg.js.map → index-C6VwVS8W.js.map} +1 -1
  137. package/dist/{index-BDR7MlMo.cjs → index-_TlgeI_i.cjs} +2 -2
  138. package/dist/{index-BDR7MlMo.cjs.map → index-_TlgeI_i.cjs.map} +1 -1
  139. package/dist/index.cjs +1 -1
  140. package/dist/index.d.ts +4 -0
  141. package/dist/index.js +2 -2
  142. package/dist/style.css +1 -1
  143. package/package.json +2 -2
  144. package/dist/Typography-Cc_iHQB-.cjs +0 -2
  145. package/dist/Typography-Cc_iHQB-.cjs.map +0 -1
  146. package/dist/Typography-HicNIA61.js.map +0 -1
@@ -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-TOaaUwS7.cjs"),ne=require("./Spinner-jTMOLuw_.cjs"),ie=require("./GraphContainer-B1EDxJ0S.cjs"),re=require("./GraphEl-DvwOOhF1.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-TOaaUwS7.cjs"),ne=require("./Spinner-jTMOLuw_.cjs"),ie=require("./GraphContainer-B1EDxJ0S.cjs"),re=require("./GraphEl-Bgf8w82K.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
@@ -7,7 +7,7 @@ import { j as V, D as M } from "./DropdownSelect-B2WTeedJ.js";
7
7
  import { b as A, y as H, h as O, c as da, $ as K, P as Q } from "./checkIfMultiple-B97uOUVq.js";
8
8
  import { w as ha } from "./Spinner-CtJETd5V.js";
9
9
  import { G as ca } from "./GraphContainer-DwMxWRCi.js";
10
- import { G as fa } from "./GraphEl-CT3xPv2P.js";
10
+ import { G as fa } from "./GraphEl-CXK-LPsj.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";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-CHPV5EwG-6v2a2njQ.cjs"),R=require("react"),q=require("./Typography-Cc_iHQB-.cjs"),P=require("./GeoHubCompareMaps.cjs"),_=require("./GeoHubMap.cjs"),$=require("./GeoHubMapWithLayerSelection.cjs"),W=require("./GraphHeader.cjs"),B=require("./GraphContainer-B1EDxJ0S.cjs");function O(S){const e=l.compilerRuntimeExports.c(38),{settings:t,graph:a,debugMode:f}=S;f&&(console.log(`Graph: ${a}`),console.log("Settings:",t));let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={geoHubCompareMap:P.GeoHubCompareMaps,geoHubMap:_.GeoHubMap,geoHubMapWithLayerSelection:$.GeoHubMapWithLayerSelection},e[0]=g):g=e[0];const x=g;let d;e[1]!==t?.ariaLabel||e[2]!==t?.backgroundColor||e[3]!==t?.center||e[4]!==t?.classNames||e[5]!==t?.excludeLayers||e[6]!==t?.footNote||e[7]!==t?.graphDescription||e[8]!==t?.graphID||e[9]!==t?.graphTitle||e[10]!==t?.height||e[11]!==t?.includeLayers||e[12]!==t?.language||e[13]!==t?.layerSelection||e[14]!==t?.mapLegend||e[15]!==t?.mapStyle||e[16]!==t?.mapStyles||e[17]!==t?.minHeight||e[18]!==t?.padding||e[19]!==t?.relativeHeight||e[20]!==t?.sources||e[21]!==t?.styles||e[22]!==t?.theme||e[23]!==t?.uiMode||e[24]!==t?.width||e[25]!==t?.zoomLevel?(d=v=>{switch(v){case"geoHubCompareMap":return{theme:t?.theme,graphTitle:t?.graphTitle,sources:t?.sources,graphDescription:t?.graphDescription,footNote:t?.footNote,backgroundColor:t?.backgroundColor,padding:t?.padding,width:t?.width,height:t?.height,relativeHeight:t?.relativeHeight,graphID:t?.graphID,mapStyles:t?.mapStyles,center:t?.center,zoomLevel:t?.zoomLevel,language:t?.language,minHeight:t?.minHeight,ariaLabel:t?.ariaLabel,styles:t?.styles,classNames:t?.classNames,mapLegend:t?.mapLegend};case"geoHubMap":return{theme:t?.theme,mapStyle:t?.mapStyle,center:t?.center,zoomLevel:t?.zoomLevel,graphTitle:t?.graphTitle,sources:t?.sources,graphDescription:t?.graphDescription,footNote:t?.footNote,backgroundColor:t?.backgroundColor,padding:t?.padding,width:t?.width,height:t?.height,relativeHeight:t?.relativeHeight,graphID:t?.graphID,language:t?.language,minHeight:t?.minHeight,includeLayers:t?.includeLayers,excludeLayers:t?.excludeLayers,ariaLabel:t?.ariaLabel,uiMode:t?.uiMode,styles:t?.styles,classNames:t?.classNames,mapLegend:t?.mapLegend};case"geoHubMapWithLayerSelection":return{theme:t?.theme,mapStyle:t?.mapStyle,center:t?.center,zoomLevel:t?.zoomLevel,graphTitle:t?.graphTitle,sources:t?.sources,graphDescription:t?.graphDescription,footNote:t?.footNote,backgroundColor:t?.backgroundColor,padding:t?.padding,width:t?.width,height:t?.height,relativeHeight:t?.relativeHeight,graphID:t?.graphID,language:t?.language,minHeight:t?.minHeight,layerSelection:t?.layerSelection,excludeLayers:t?.excludeLayers,ariaLabel:t?.ariaLabel,uiMode:t?.uiMode,mapLegend:t?.mapLegend};default:return{}}},e[1]=t?.ariaLabel,e[2]=t?.backgroundColor,e[3]=t?.center,e[4]=t?.classNames,e[5]=t?.excludeLayers,e[6]=t?.footNote,e[7]=t?.graphDescription,e[8]=t?.graphID,e[9]=t?.graphTitle,e[10]=t?.height,e[11]=t?.includeLayers,e[12]=t?.language,e[13]=t?.layerSelection,e[14]=t?.mapLegend,e[15]=t?.mapStyle,e[16]=t?.mapStyles,e[17]=t?.minHeight,e[18]=t?.padding,e[19]=t?.relativeHeight,e[20]=t?.sources,e[21]=t?.styles,e[22]=t?.theme,e[23]=t?.uiMode,e[24]=t?.width,e[25]=t?.zoomLevel,e[26]=d):d=e[26];const c=d,o=x[a];let r;e[27]!==c||e[28]!==a?(r=c(a),e[27]=c,e[28]=a,e[29]=r):r=e[29];const h=r,p=`grow my-0 mx-auto flex flex-col w-full justify-center ${t?.theme||"light"}`;let s;e[30]===Symbol.for("react.memo_cache_sentinel")?(s={minHeight:"inherit"},e[30]=s):s=e[30];let i;e[31]!==o||e[32]!==a||e[33]!==h?(i=o?l.jsxRuntimeExports.jsx(o,{...h}):l.jsxRuntimeExports.jsx(q._,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:`Invalid chart type: ${a}`}),e[31]=o,e[32]=a,e[33]=h,e[34]=i):i=e[34];let n;return e[35]!==p||e[36]!==i?(n=l.jsxRuntimeExports.jsx("div",{className:p,style:s,children:i}),e[35]=p,e[36]=i,e[37]=n):n=e[37],n}function V(S){const e=l.compilerRuntimeExports.c(37),{graphSettings:t,graphType:a,debugMode:f,uiMode:g}=S,x=g===void 0?"normal":g,d=R.useRef(null),c=t?.classNames?.graphContainer,o=t?.styles?.graphContainer,r=t?.graphID,h=t?.ariaLabel,p=t?.backgroundColor??!1,s=t?.theme||"light",i=t?.language||"en",n=t?.width,v=t?.height,D=t?.padding,C=t?.minHeight,N=t?.relativeHeight,w=t?.styles?.title,G=t?.styles?.description;let u;e[0]!==w||e[1]!==G?(u={title:w,description:G},e[0]=w,e[1]=G,e[2]=u):u=e[2];const j=t?.classNames?.title,T=t?.classNames?.description;let m;e[3]!==j||e[4]!==T?(m={title:j,description:T},e[3]=j,e[4]=T,e[5]=m):m=e[5];const k=t?.graphTitle,E=t?.graphDescription,I=t?.width;let y;e[6]!==u||e[7]!==m||e[8]!==k||e[9]!==E||e[10]!==I?(y=l.jsxRuntimeExports.jsx(W.GraphHeader,{styles:u,classNames:m,graphTitle:k,graphDescription:E,width:I}),e[6]=u,e[7]=m,e[8]=k,e[9]=E,e[10]=I,e[11]=y):y=e[11];let b;e[12]!==t?(b=t||{},e[12]=t,e[13]=b):b=e[13];const z=t?.theme;let H;e[14]!==b||e[15]!==z||e[16]!==x?(H={...b,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",uiMode:x,theme:z},e[14]=b,e[15]=z,e[16]=x,e[17]=H):H=e[17];let L;e[18]!==f||e[19]!==a||e[20]!==H?(L=l.jsxRuntimeExports.jsx(O,{graph:a,debugMode:f,settings:H}),e[18]=f,e[19]=a,e[20]=H,e[21]=L):L=e[21];let M;return e[22]!==c||e[23]!==D||e[24]!==C||e[25]!==N||e[26]!==o||e[27]!==y||e[28]!==L||e[29]!==r||e[30]!==h||e[31]!==p||e[32]!==s||e[33]!==i||e[34]!==n||e[35]!==v?(M=l.jsxRuntimeExports.jsxs(B.GraphContainer,{className:c,style:o,id:r,ref:d,"aria-label":h,backgroundColor:p,theme:s,language:i,width:n,height:v,padding:D,minHeight:C,relativeHeight:N,children:[y,L]}),e[22]=c,e[23]=D,e[24]=C,e[25]=N,e[26]=o,e[27]=y,e[28]=L,e[29]=r,e[30]=h,e[31]=p,e[32]=s,e[33]=i,e[34]=n,e[35]=v,e[36]=M):M=e[36],M}exports.SingleGraphDashboardGeoHubMaps=V;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-CHPV5EwG-6v2a2njQ.cjs"),R=require("react"),q=require("./Typography-CZZxlj1W.cjs"),P=require("./GeoHubCompareMaps.cjs"),_=require("./GeoHubMap.cjs"),$=require("./GeoHubMapWithLayerSelection.cjs"),W=require("./GraphHeader.cjs"),B=require("./GraphContainer-B1EDxJ0S.cjs");function O(S){const e=l.compilerRuntimeExports.c(38),{settings:t,graph:a,debugMode:f}=S;f&&(console.log(`Graph: ${a}`),console.log("Settings:",t));let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={geoHubCompareMap:P.GeoHubCompareMaps,geoHubMap:_.GeoHubMap,geoHubMapWithLayerSelection:$.GeoHubMapWithLayerSelection},e[0]=g):g=e[0];const x=g;let d;e[1]!==t?.ariaLabel||e[2]!==t?.backgroundColor||e[3]!==t?.center||e[4]!==t?.classNames||e[5]!==t?.excludeLayers||e[6]!==t?.footNote||e[7]!==t?.graphDescription||e[8]!==t?.graphID||e[9]!==t?.graphTitle||e[10]!==t?.height||e[11]!==t?.includeLayers||e[12]!==t?.language||e[13]!==t?.layerSelection||e[14]!==t?.mapLegend||e[15]!==t?.mapStyle||e[16]!==t?.mapStyles||e[17]!==t?.minHeight||e[18]!==t?.padding||e[19]!==t?.relativeHeight||e[20]!==t?.sources||e[21]!==t?.styles||e[22]!==t?.theme||e[23]!==t?.uiMode||e[24]!==t?.width||e[25]!==t?.zoomLevel?(d=v=>{switch(v){case"geoHubCompareMap":return{theme:t?.theme,graphTitle:t?.graphTitle,sources:t?.sources,graphDescription:t?.graphDescription,footNote:t?.footNote,backgroundColor:t?.backgroundColor,padding:t?.padding,width:t?.width,height:t?.height,relativeHeight:t?.relativeHeight,graphID:t?.graphID,mapStyles:t?.mapStyles,center:t?.center,zoomLevel:t?.zoomLevel,language:t?.language,minHeight:t?.minHeight,ariaLabel:t?.ariaLabel,styles:t?.styles,classNames:t?.classNames,mapLegend:t?.mapLegend};case"geoHubMap":return{theme:t?.theme,mapStyle:t?.mapStyle,center:t?.center,zoomLevel:t?.zoomLevel,graphTitle:t?.graphTitle,sources:t?.sources,graphDescription:t?.graphDescription,footNote:t?.footNote,backgroundColor:t?.backgroundColor,padding:t?.padding,width:t?.width,height:t?.height,relativeHeight:t?.relativeHeight,graphID:t?.graphID,language:t?.language,minHeight:t?.minHeight,includeLayers:t?.includeLayers,excludeLayers:t?.excludeLayers,ariaLabel:t?.ariaLabel,uiMode:t?.uiMode,styles:t?.styles,classNames:t?.classNames,mapLegend:t?.mapLegend};case"geoHubMapWithLayerSelection":return{theme:t?.theme,mapStyle:t?.mapStyle,center:t?.center,zoomLevel:t?.zoomLevel,graphTitle:t?.graphTitle,sources:t?.sources,graphDescription:t?.graphDescription,footNote:t?.footNote,backgroundColor:t?.backgroundColor,padding:t?.padding,width:t?.width,height:t?.height,relativeHeight:t?.relativeHeight,graphID:t?.graphID,language:t?.language,minHeight:t?.minHeight,layerSelection:t?.layerSelection,excludeLayers:t?.excludeLayers,ariaLabel:t?.ariaLabel,uiMode:t?.uiMode,mapLegend:t?.mapLegend};default:return{}}},e[1]=t?.ariaLabel,e[2]=t?.backgroundColor,e[3]=t?.center,e[4]=t?.classNames,e[5]=t?.excludeLayers,e[6]=t?.footNote,e[7]=t?.graphDescription,e[8]=t?.graphID,e[9]=t?.graphTitle,e[10]=t?.height,e[11]=t?.includeLayers,e[12]=t?.language,e[13]=t?.layerSelection,e[14]=t?.mapLegend,e[15]=t?.mapStyle,e[16]=t?.mapStyles,e[17]=t?.minHeight,e[18]=t?.padding,e[19]=t?.relativeHeight,e[20]=t?.sources,e[21]=t?.styles,e[22]=t?.theme,e[23]=t?.uiMode,e[24]=t?.width,e[25]=t?.zoomLevel,e[26]=d):d=e[26];const c=d,o=x[a];let r;e[27]!==c||e[28]!==a?(r=c(a),e[27]=c,e[28]=a,e[29]=r):r=e[29];const h=r,p=`grow my-0 mx-auto flex flex-col w-full justify-center ${t?.theme||"light"}`;let s;e[30]===Symbol.for("react.memo_cache_sentinel")?(s={minHeight:"inherit"},e[30]=s):s=e[30];let i;e[31]!==o||e[32]!==a||e[33]!==h?(i=o?l.jsxRuntimeExports.jsx(o,{...h}):l.jsxRuntimeExports.jsx(q._,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:`Invalid chart type: ${a}`}),e[31]=o,e[32]=a,e[33]=h,e[34]=i):i=e[34];let n;return e[35]!==p||e[36]!==i?(n=l.jsxRuntimeExports.jsx("div",{className:p,style:s,children:i}),e[35]=p,e[36]=i,e[37]=n):n=e[37],n}function V(S){const e=l.compilerRuntimeExports.c(37),{graphSettings:t,graphType:a,debugMode:f,uiMode:g}=S,x=g===void 0?"normal":g,d=R.useRef(null),c=t?.classNames?.graphContainer,o=t?.styles?.graphContainer,r=t?.graphID,h=t?.ariaLabel,p=t?.backgroundColor??!1,s=t?.theme||"light",i=t?.language||"en",n=t?.width,v=t?.height,D=t?.padding,C=t?.minHeight,N=t?.relativeHeight,w=t?.styles?.title,G=t?.styles?.description;let u;e[0]!==w||e[1]!==G?(u={title:w,description:G},e[0]=w,e[1]=G,e[2]=u):u=e[2];const j=t?.classNames?.title,T=t?.classNames?.description;let m;e[3]!==j||e[4]!==T?(m={title:j,description:T},e[3]=j,e[4]=T,e[5]=m):m=e[5];const k=t?.graphTitle,E=t?.graphDescription,I=t?.width;let y;e[6]!==u||e[7]!==m||e[8]!==k||e[9]!==E||e[10]!==I?(y=l.jsxRuntimeExports.jsx(W.GraphHeader,{styles:u,classNames:m,graphTitle:k,graphDescription:E,width:I}),e[6]=u,e[7]=m,e[8]=k,e[9]=E,e[10]=I,e[11]=y):y=e[11];let b;e[12]!==t?(b=t||{},e[12]=t,e[13]=b):b=e[13];const z=t?.theme;let H;e[14]!==b||e[15]!==z||e[16]!==x?(H={...b,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",uiMode:x,theme:z},e[14]=b,e[15]=z,e[16]=x,e[17]=H):H=e[17];let L;e[18]!==f||e[19]!==a||e[20]!==H?(L=l.jsxRuntimeExports.jsx(O,{graph:a,debugMode:f,settings:H}),e[18]=f,e[19]=a,e[20]=H,e[21]=L):L=e[21];let M;return e[22]!==c||e[23]!==D||e[24]!==C||e[25]!==N||e[26]!==o||e[27]!==y||e[28]!==L||e[29]!==r||e[30]!==h||e[31]!==p||e[32]!==s||e[33]!==i||e[34]!==n||e[35]!==v?(M=l.jsxRuntimeExports.jsxs(B.GraphContainer,{className:c,style:o,id:r,ref:d,"aria-label":h,backgroundColor:p,theme:s,language:i,width:n,height:v,padding:D,minHeight:C,relativeHeight:N,children:[y,L]}),e[22]=c,e[23]=D,e[24]=C,e[25]=N,e[26]=o,e[27]=y,e[28]=L,e[29]=r,e[30]=h,e[31]=p,e[32]=s,e[33]=i,e[34]=n,e[35]=v,e[36]=M):M=e[36],M}exports.SingleGraphDashboardGeoHubMaps=V;
2
2
  //# sourceMappingURL=SingleGraphDashboardGeoHubMaps.cjs.map
@@ -1,6 +1,6 @@
1
1
  import { c as $, j as b } from "./index-CHPV5EwG-BCLAYDCV.js";
2
2
  import { useRef as E } from "react";
3
- import { _ as P } from "./Typography-HicNIA61.js";
3
+ import { _ as P } from "./Typography-DMVW6JnV.js";
4
4
  import { GeoHubCompareMaps as R } from "./GeoHubCompareMaps.js";
5
5
  import { GeoHubMap as W } from "./GeoHubMap.js";
6
6
  import { GeoHubMapWithLayerSelection as B } from "./GeoHubMapWithLayerSelection.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-6v2a2njQ.cjs"),u=require("react"),le=require("./index-CyZ1lmi_.cjs"),F=require("./index-BS2TADPj.cjs"),ie=require("./index-DQA8q5sC.cjs"),D=require("./DropdownSelect-NNpOs7DX.cjs"),g=require("./checkIfMultiple-TOaaUwS7.cjs"),oe=require("./Spinner-jTMOLuw_.cjs"),W=require("./Typography-Cc_iHQB-.cjs"),ne=require("./ThreeDGlobe.cjs"),A=require("./fetchAndParseData-QTF6tjij.cjs"),Z=require("./transformDataForAggregation-BFdha9Dx.cjs"),J=require("./getUniqValue-NX8DgwND.cjs"),re=require("./GraphHeader.cjs"),K=require("./filterData-T5DQBE9b.cjs"),se=require("./getGraphList-DQ24IzAn.cjs"),Q=require("./transformDataForSelect-YmStusCI.cjs"),ue=require("./GraphContainer-B1EDxJ0S.cjs");function ce(y){const t=i.compilerRuntimeExports.c(24),{settings:a,graph:m,graphData:d,debugMode:S,graphDataConfiguration:n,readableHeader:E,updateFilters:I}=y;if(S&&(console.log(`Graph: ${m}`),console.log("Transformed data:",d),console.log("Settings:",a)),typeof d=="string"){const b=`flex my-0 mx-auto grow flex-col justify-center ${a?.width?"w-fit":"w-full"}`;let x;t[0]===Symbol.for("react.memo_cache_sentinel")?(x={height:"inherit"},t[0]=x):x=t[0];let c;t[1]!==d?(c=i.jsxRuntimeExports.jsx(W._,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:d}),t[1]=d,t[2]=c):c=t[2];let w;return t[3]!==b||t[4]!==c?(w=i.jsxRuntimeExports.jsx("div",{className:b,style:x,children:c}),t[3]=b,t[4]=c,t[5]=w):w=t[5],w}let v;t[6]===Symbol.for("react.memo_cache_sentinel")?(v={threeDGlobe:ne.ThreeDGlobe},t[6]=v):v=t[6];const O=v;let V;t[7]!==d||t[8]!==n||t[9]!==E||t[10]!==a||t[11]!==I?(V=b=>b==="threeDGlobe"?{globeOffset:a?.globeOffset,collapseColorScaleByDefault:a?.collapseColorScaleByDefault,polygonAltitude:a?.polygonAltitude,highlightedIds:a?.highlightedIds,scale:a?.scale,theme:a?.theme,resetSelectionOnDoubleClick:a?.resetSelectionOnDoubleClick,graphTitle:a?.graphTitle,mapData:a?.mapData,graphDescription:a?.graphDescription,footNote:a?.footNote,width:a?.width,height:a?.height,sources:a?.sources,colorDomain:a?.colorDomain,colors:a?.colors,colorLegendTitle:Object.keys(a||{}).indexOf("colorLegendTitle")!==-1?a?.colorLegendTitle:g.getValues("x",n||[],E||[]),scaleType:a?.scaleType,data:d,centerPoint:a?.centerPoint,backgroundColor:a?.backgroundColor,mapNoDataColor:a?.mapNoDataColor,mapBorderColor:a?.mapBorderColor,relativeHeight:a?.relativeHeight,padding:a?.padding,tooltip:a?.tooltip,showColorScale:a?.showColorScale,graphID:a?.graphID,dataDownload:a?.dataDownload,mapProperty:a?.mapProperty,language:a?.language,minHeight:a?.minHeight,ariaLabel:a?.ariaLabel,onSeriesMouseClick:x=>{I?.(x.id)},detailsOnClick:a?.detailsOnClick,styles:a?.styles,classNames:a?.classNames,autoRotate:a?.autoRotate,globeMaterial:a?.globeMaterial,atmosphereColor:a?.atmosphereColor,enableZoom:a?.enableZoom,atmosphereAltitude:a?.atmosphereAltitude,globeCurvatureResolution:a?.globeCurvatureResolution,fogSettings:a?.fogSetting,lights:a?.lights,highlightedAltitude:a?.highlightedAltitude,selectedId:a?.selectedId}:{},t[7]=d,t[8]=n,t[9]=E,t[10]=a,t[11]=I,t[12]=V):V=t[12];const h=V,T=O[m];let p;t[13]!==h||t[14]!==m?(p=h(m),t[13]=h,t[14]=m,t[15]=p):p=t[15];const f=p,G=`grow my-0 mx-auto flex flex-col w-full justify-center ${a?.theme||"light"}`;let R;t[16]===Symbol.for("react.memo_cache_sentinel")?(R={minHeight:"inherit"},t[16]=R):R=t[16];let s;t[17]!==T||t[18]!==m||t[19]!==f?(s=T?i.jsxRuntimeExports.jsx(T,{...f}):i.jsxRuntimeExports.jsx(W._,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:`Invalid chart type: ${m}`}),t[17]=T,t[18]=m,t[19]=f,t[20]=s):s=t[20];let N;return t[21]!==G||t[22]!==s?(N=i.jsxRuntimeExports.jsx("div",{className:G,style:R,children:s}),t[21]=G,t[22]=s,t[23]=N):N=t[23],N}const L=(y,t)=>{const a=t?.map(m=>{const d=y?.findIndex(n=>n.chartConfigId===m.chartConfigId);if(d===-1)return{};const S=y[d]?.allowedColumnIds?.findIndex(n=>n.value===m.columnId);return S===-1?{}:y[d].allowedColumnIds[S].graphSettings||{}})||[];return Object.assign({},...a)};function de(y){const{graphSettings:t,dataSettings:a,filters:m,graphType:d,dataTransform:S,graphDataConfiguration:n,dataFilters:E,debugMode:I,dataSelectionOptions:v,advancedDataSelectionOptions:O,readableHeader:V,noOfFiltersPerRow:h=4,updateFilters:T,uiMode:p="normal",highlightDataPointSettings:f}=y,[G,R]=u.useState(void 0),[s,N]=u.useState(void 0),[b,x]=u.useState(n),[c,w]=u.useState({}),[$,X]=u.useState(void 0),[Y,_]=u.useState([]),M=u.useRef(null),U=u.useRef(n),[P,z]=u.useState([]),H={ignoreCase:!0,ignoreAccents:!0,trim:!0},B=u.useEffectEvent(()=>{const e=(m||[]).map(r=>({filter:r.column,label:r.label||`Filter by ${r.column}`,singleSelect:r.singleSelect,clearable:r.clearable,defaultValue:Q.transformDefaultValue(r.defaultValue),value:Q.transformDefaultValue(r.defaultValue),availableValues:J.getUniqValue(s,r.column).filter(l=>!r.excludeValues?.includes(`${l}`)).map(l=>({value:l,label:l})),allowSelectAll:r.allowSelectAll,width:r.width}));z(e)});u.useEffect(()=>{(async()=>{try{const r=a.dataURL?typeof a.dataURL=="string"?a.fileType==="json"?await A.fetchAndParseJSON(a.dataURL,a.columnsToArray,a.dataTransformation,I):a.fileType==="api"?await A.fetchAndTransformDataFromAPI(a.dataURL,a.apiHeaders,a.columnsToArray,a.dataTransformation,I):await A.fetchAndParseCSV(a.dataURL,a.dataTransformation,a.columnsToArray,I,a.delimiter,!0):await A.fetchAndParseMultipleDataSources(a.dataURL,a.idColumnTitle):await A.transformColumnsToArray(a.data,a.columnsToArray);N(r)}catch(r){console.error("Data fetching error:",r)}})(),B()},[a,I]),u.useEffect(()=>{B()},[m,s]);const ee=u.useEffectEvent(()=>{if(!s||P.length===0)R(s);else{const e=s.filter(r=>P.every(l=>l.value&&F.flattenDeep([l.value]).length>0?le.intersection(F.flattenDeep([r[l.filter]]),F.flattenDeep([l.value]).map(o=>o.value)).length>0:!0));R(e)}});u.useEffect(()=>{ee()},[P,s]),u.useEffect(()=>{v&&w(L(v,n))},[v,n]);const te=u.useEffectEvent(()=>{f?.column&&G&&_(J.getUniqValue(G,f.column).filter(e=>!f?.excludeValues?.includes(`${e}`)).map(e=>({value:e,label:e})))});u.useEffect(()=>{te()},[f]),u.useEffect(()=>{ie.isEqual(U.current,n)||(x(n),U.current=n)},[n]);const k=(e,r)=>{z(l=>l.map(o=>o.filter===e?{...o,value:r}:o))},ae=s?Z.transformDataForGraph(S?Z.transformDataForAggregation(K.filterData(s,E||[]),S.keyColumn,S.aggregationColumnsSetting):K.filterData(s,E||[]),d,b):void 0;return i.jsxRuntimeExports.jsx(ue.GraphContainer,{className:t?.classNames?.graphContainer,style:t?.styles?.graphContainer,id:t?.graphID,ref:M,"aria-label":t?.ariaLabel,backgroundColor:t?.backgroundColor??!1,theme:t?.theme||"light",language:t?.language||"en",width:t?.width,height:t?.height,padding:t?.padding,minHeight:t?.minHeight,relativeHeight:t?.relativeHeight,children:s||se.graphList.filter(e=>e.geoHubMapPresentation).map(e=>e.graphID).indexOf(d)!==-1?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[c?.graphTitle||c?.graphDescription||t?.graphTitle||t?.graphDescription||t?.graphDownload||t?.dataDownload?i.jsxRuntimeExports.jsx(re.GraphHeader,{styles:{title:c?.styles?.title||t?.styles?.title,description:c?.styles?.description||t?.styles?.description},classNames:{title:c?.classNames?.title||t?.classNames?.title,description:c?.classNames?.description||t?.classNames?.description},graphTitle:c?.graphTitle||t?.graphTitle,graphDescription:c?.graphDescription||t?.graphDescription,width:c?.width||t?.width,graphDownload:t?.graphDownload?M:void 0,dataDownload:t?.dataDownload&&s&&s.length>0?s:null}):null,P.length!==0||(v||[]).length!==0||(O||[]).length!==0||f?i.jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap items-start gap-x-4 gap-y-0 w-full",children:[O?.map((e,r)=>i.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/h}% - ${(h-1)/h}rem)`,flexGrow:e.width?0:1,flexShrink:e.ui!=="radio"||e.width?0:1,minWidth:"240px"},className:"pb-4",children:[i.jsxRuntimeExports.jsx(g.b,{className:"mb-2",children:e.label||"Graph by"}),e.ui!=="radio"?i.jsxRuntimeExports.jsx(D.ja,{options:e.options.map(l=>({...l,value:l.label})),size:"sm",isClearable:!1,isSearchable:!0,variant:p,controlShouldRenderValue:!0,defaultValue:e.defaultValue?{...e.defaultValue,value:e.defaultValue?.label}:{...e.options[0],value:e.options[0].label},onChange:l=>{w(l?.graphSettings||{}),x(l?.dataConfiguration)}}):i.jsxRuntimeExports.jsx(g.ye,{defaultValue:e.defaultValue?.label||e.options[0].label,variant:p,onValueChange:l=>{const o=e.options[e.options.findIndex(j=>j.label===l)];w(o.graphSettings||{}),x(o.dataConfiguration)},children:e.options.map((l,o)=>i.jsxRuntimeExports.jsx(g.he,{label:l.label,value:l.label},o))})]},r)),v?.map((e,r)=>i.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/h}% - ${(h-1)/h}rem)`,flexGrow:e.width?0:1,flexShrink:e.ui!=="radio"||e.width?0:1,minWidth:"240px"},className:"pb-4",children:[i.jsxRuntimeExports.jsx(g.b,{className:"mb-2",children:e.label||`Visualize ${e.chartConfigId} by`}),g.checkIfMultiple(e.chartConfigId,b||[])?e.ui!=="radio"?i.jsxRuntimeExports.jsx(D.ja,{options:e.allowedColumnIds,size:"sm",isMulti:!0,isSearchable:!0,variant:p,controlShouldRenderValue:!0,defaultValue:n?n[n.findIndex(l=>l.chartConfigId===e.chartConfigId)].columnId.map(l=>e.allowedColumnIds[e.allowedColumnIds.findIndex(o=>o.value===l)]):void 0,filterOption:D.Du(H),onChange:l=>{const o={columnId:(l||[]).map(C=>C.value),chartConfigId:e.chartConfigId},j=b?.map(C=>C.chartConfigId===o.chartConfigId?o:C);x(j)}}):i.jsxRuntimeExports.jsx(g.$,{variant:p,defaultValue:n?n[n.findIndex(l=>l.chartConfigId===e.chartConfigId)].columnId.map(l=>e.allowedColumnIds[e.allowedColumnIds.findIndex(o=>o.value===l)]).map(l=>l.value):[],onValueChange:l=>{const o={columnId:l||[],chartConfigId:e.chartConfigId},j=b?.map(C=>C.chartConfigId===o.chartConfigId?o:C);x(j)},children:e.allowedColumnIds.map((l,o)=>i.jsxRuntimeExports.jsx(g.P,{label:l.label,value:l.label},o))}):e.ui!=="radio"?i.jsxRuntimeExports.jsx(D.ja,{options:e.allowedColumnIds,size:"sm",isClearable:!1,isSearchable:!0,variant:p,controlShouldRenderValue:!0,defaultValue:n?e.allowedColumnIds[e.allowedColumnIds.findIndex(l=>l.value===n[n.findIndex(o=>o.chartConfigId===e.chartConfigId)].columnId)]:void 0,onChange:l=>{const o={columnId:l?.value,chartConfigId:e.chartConfigId},j=b?.map(C=>C.chartConfigId===o.chartConfigId?o:C);w(L(v,j)),x(j)}}):i.jsxRuntimeExports.jsx(g.ye,{variant:p,defaultValue:n?e.allowedColumnIds[e.allowedColumnIds.findIndex(l=>l.value===n[n.findIndex(o=>o.chartConfigId===e.chartConfigId)].columnId)].label:"",onValueChange:l=>{const j={columnId:e.allowedColumnIds[e.allowedColumnIds.findIndex(q=>q.label===l)].value,chartConfigId:e.chartConfigId},C=b?.map(q=>q.chartConfigId===j.chartConfigId?j:q);w(L(v,C)),x(C)},children:e.allowedColumnIds.map((l,o)=>i.jsxRuntimeExports.jsx(g.he,{label:l.label,value:l.label},o))})]},r)),P?.map((e,r)=>i.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/h}% - ${(h-1)/h}rem)`,flexGrow:e.width?0:1,flexShrink:e.ui!=="radio"||e.width?0:1,minWidth:"240px"},className:"pb-4",children:[i.jsxRuntimeExports.jsx(g.b,{className:"mb-2",children:e.label}),e.singleSelect?e.ui!=="radio"?i.jsxRuntimeExports.jsx(D.ja,{options:e.availableValues,variant:p,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:D.Du(H),onChange:l=>{k(e.filter,l)},value:e.value,defaultValue:e.defaultValue}):i.jsxRuntimeExports.jsx(g.ye,{variant:p,defaultValue:e.defaultValue.value,onValueChange:l=>{k(e.filter,e.availableValues.filter(o=>o.value===l))},children:e.availableValues.map((l,o)=>i.jsxRuntimeExports.jsx(g.he,{label:`${l.label}`,value:`${l.value}`},o))}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[e.ui!=="radio"?i.jsxRuntimeExports.jsx(D.ja,{options:e.availableValues,variant:p,size:"sm",isMulti:!0,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:D.Du(H),onChange:l=>{k(e.filter,l)},value:e.value,defaultValue:e.defaultValue}):i.jsxRuntimeExports.jsx(g.$,{variant:p,defaultValue:e.defaultValue?e.defaultValue.map(l=>`${l.value}`):[],value:e.value?e.value.map(l=>`${l.value}`):void 0,onValueChange:l=>{k(e.filter,e.availableValues.filter(o=>l.indexOf(`${o.value}`)!==-1))},children:e.availableValues.map((l,o)=>i.jsxRuntimeExports.jsx(g.P,{label:`${l.label}`,value:`${l.value}`},o))}),e.allowSelectAll?i.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:()=>{k(e.filter,e.availableValues)},children:"Select all options"}):null]})]},r)),f?i.jsxRuntimeExports.jsxs("div",{style:{width:f.width||`calc(${100/h}% - ${(h-1)/h}rem)`,flexGrow:f.width?0:1,flexShrink:0,minWidth:"240px"},className:"pb-4",children:[i.jsxRuntimeExports.jsx(g.b,{className:"mb-2",children:f.label||"Highlight data"}),i.jsxRuntimeExports.jsx(D.ja,{options:Y,variant:p,size:"sm",isMulti:!0,isClearable:!0,isSearchable:!0,controlShouldRenderValue:!0,filterOption:D.Du(H),onChange:e=>{X(e?.map(r=>r.value))},value:$?.map(e=>({label:e,value:e})),defaultValue:f.defaultValues?.map(e=>({label:e,value:e}))})]}):null]}):null,i.jsxRuntimeExports.jsx(ce,{graph:d,graphData:ae,graphDataConfiguration:b,debugMode:I,readableHeader:V||[],updateFilters:T,settings:{...t||{},...c,graphTitle:void 0,graphDescription:void 0,graphDownload:!1,dataDownload:!1,backgroundColor:void 0,padding:"0",width:void 0,height:void 0,relativeHeight:void 0,minHeight:void 0,theme:t?.theme,...$?{highlightedDataPoints:$,highlightedIds:$?.map(e=>`${e}`),highlightedLines:$?.map(e=>e)}:{}}})]}):i.jsxRuntimeExports.jsx("div",{className:"w-full flex justify-center p-4",children:i.jsxRuntimeExports.jsx(oe.w,{})})})}exports.SingleGraphDashboardThreeDGraphs=de;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-6v2a2njQ.cjs"),u=require("react"),le=require("./index-CyZ1lmi_.cjs"),F=require("./index-BS2TADPj.cjs"),ie=require("./index-DQA8q5sC.cjs"),D=require("./DropdownSelect-NNpOs7DX.cjs"),g=require("./checkIfMultiple-TOaaUwS7.cjs"),oe=require("./Spinner-jTMOLuw_.cjs"),W=require("./Typography-CZZxlj1W.cjs"),ne=require("./ThreeDGlobe.cjs"),A=require("./fetchAndParseData-QTF6tjij.cjs"),Z=require("./transformDataForAggregation-BFdha9Dx.cjs"),J=require("./getUniqValue-NX8DgwND.cjs"),re=require("./GraphHeader.cjs"),K=require("./filterData-T5DQBE9b.cjs"),se=require("./getGraphList-DQ24IzAn.cjs"),Q=require("./transformDataForSelect-YmStusCI.cjs"),ue=require("./GraphContainer-B1EDxJ0S.cjs");function ce(y){const t=i.compilerRuntimeExports.c(24),{settings:a,graph:m,graphData:d,debugMode:S,graphDataConfiguration:n,readableHeader:E,updateFilters:I}=y;if(S&&(console.log(`Graph: ${m}`),console.log("Transformed data:",d),console.log("Settings:",a)),typeof d=="string"){const b=`flex my-0 mx-auto grow flex-col justify-center ${a?.width?"w-fit":"w-full"}`;let x;t[0]===Symbol.for("react.memo_cache_sentinel")?(x={height:"inherit"},t[0]=x):x=t[0];let c;t[1]!==d?(c=i.jsxRuntimeExports.jsx(W._,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:d}),t[1]=d,t[2]=c):c=t[2];let w;return t[3]!==b||t[4]!==c?(w=i.jsxRuntimeExports.jsx("div",{className:b,style:x,children:c}),t[3]=b,t[4]=c,t[5]=w):w=t[5],w}let v;t[6]===Symbol.for("react.memo_cache_sentinel")?(v={threeDGlobe:ne.ThreeDGlobe},t[6]=v):v=t[6];const O=v;let V;t[7]!==d||t[8]!==n||t[9]!==E||t[10]!==a||t[11]!==I?(V=b=>b==="threeDGlobe"?{globeOffset:a?.globeOffset,collapseColorScaleByDefault:a?.collapseColorScaleByDefault,polygonAltitude:a?.polygonAltitude,highlightedIds:a?.highlightedIds,scale:a?.scale,theme:a?.theme,resetSelectionOnDoubleClick:a?.resetSelectionOnDoubleClick,graphTitle:a?.graphTitle,mapData:a?.mapData,graphDescription:a?.graphDescription,footNote:a?.footNote,width:a?.width,height:a?.height,sources:a?.sources,colorDomain:a?.colorDomain,colors:a?.colors,colorLegendTitle:Object.keys(a||{}).indexOf("colorLegendTitle")!==-1?a?.colorLegendTitle:g.getValues("x",n||[],E||[]),scaleType:a?.scaleType,data:d,centerPoint:a?.centerPoint,backgroundColor:a?.backgroundColor,mapNoDataColor:a?.mapNoDataColor,mapBorderColor:a?.mapBorderColor,relativeHeight:a?.relativeHeight,padding:a?.padding,tooltip:a?.tooltip,showColorScale:a?.showColorScale,graphID:a?.graphID,dataDownload:a?.dataDownload,mapProperty:a?.mapProperty,language:a?.language,minHeight:a?.minHeight,ariaLabel:a?.ariaLabel,onSeriesMouseClick:x=>{I?.(x.id)},detailsOnClick:a?.detailsOnClick,styles:a?.styles,classNames:a?.classNames,autoRotate:a?.autoRotate,globeMaterial:a?.globeMaterial,atmosphereColor:a?.atmosphereColor,enableZoom:a?.enableZoom,atmosphereAltitude:a?.atmosphereAltitude,globeCurvatureResolution:a?.globeCurvatureResolution,fogSettings:a?.fogSetting,lights:a?.lights,highlightedAltitude:a?.highlightedAltitude,selectedId:a?.selectedId}:{},t[7]=d,t[8]=n,t[9]=E,t[10]=a,t[11]=I,t[12]=V):V=t[12];const h=V,T=O[m];let p;t[13]!==h||t[14]!==m?(p=h(m),t[13]=h,t[14]=m,t[15]=p):p=t[15];const f=p,G=`grow my-0 mx-auto flex flex-col w-full justify-center ${a?.theme||"light"}`;let R;t[16]===Symbol.for("react.memo_cache_sentinel")?(R={minHeight:"inherit"},t[16]=R):R=t[16];let s;t[17]!==T||t[18]!==m||t[19]!==f?(s=T?i.jsxRuntimeExports.jsx(T,{...f}):i.jsxRuntimeExports.jsx(W._,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:`Invalid chart type: ${m}`}),t[17]=T,t[18]=m,t[19]=f,t[20]=s):s=t[20];let N;return t[21]!==G||t[22]!==s?(N=i.jsxRuntimeExports.jsx("div",{className:G,style:R,children:s}),t[21]=G,t[22]=s,t[23]=N):N=t[23],N}const L=(y,t)=>{const a=t?.map(m=>{const d=y?.findIndex(n=>n.chartConfigId===m.chartConfigId);if(d===-1)return{};const S=y[d]?.allowedColumnIds?.findIndex(n=>n.value===m.columnId);return S===-1?{}:y[d].allowedColumnIds[S].graphSettings||{}})||[];return Object.assign({},...a)};function de(y){const{graphSettings:t,dataSettings:a,filters:m,graphType:d,dataTransform:S,graphDataConfiguration:n,dataFilters:E,debugMode:I,dataSelectionOptions:v,advancedDataSelectionOptions:O,readableHeader:V,noOfFiltersPerRow:h=4,updateFilters:T,uiMode:p="normal",highlightDataPointSettings:f}=y,[G,R]=u.useState(void 0),[s,N]=u.useState(void 0),[b,x]=u.useState(n),[c,w]=u.useState({}),[$,X]=u.useState(void 0),[Y,_]=u.useState([]),M=u.useRef(null),U=u.useRef(n),[P,z]=u.useState([]),H={ignoreCase:!0,ignoreAccents:!0,trim:!0},B=u.useEffectEvent(()=>{const e=(m||[]).map(r=>({filter:r.column,label:r.label||`Filter by ${r.column}`,singleSelect:r.singleSelect,clearable:r.clearable,defaultValue:Q.transformDefaultValue(r.defaultValue),value:Q.transformDefaultValue(r.defaultValue),availableValues:J.getUniqValue(s,r.column).filter(l=>!r.excludeValues?.includes(`${l}`)).map(l=>({value:l,label:l})),allowSelectAll:r.allowSelectAll,width:r.width}));z(e)});u.useEffect(()=>{(async()=>{try{const r=a.dataURL?typeof a.dataURL=="string"?a.fileType==="json"?await A.fetchAndParseJSON(a.dataURL,a.columnsToArray,a.dataTransformation,I):a.fileType==="api"?await A.fetchAndTransformDataFromAPI(a.dataURL,a.apiHeaders,a.columnsToArray,a.dataTransformation,I):await A.fetchAndParseCSV(a.dataURL,a.dataTransformation,a.columnsToArray,I,a.delimiter,!0):await A.fetchAndParseMultipleDataSources(a.dataURL,a.idColumnTitle):await A.transformColumnsToArray(a.data,a.columnsToArray);N(r)}catch(r){console.error("Data fetching error:",r)}})(),B()},[a,I]),u.useEffect(()=>{B()},[m,s]);const ee=u.useEffectEvent(()=>{if(!s||P.length===0)R(s);else{const e=s.filter(r=>P.every(l=>l.value&&F.flattenDeep([l.value]).length>0?le.intersection(F.flattenDeep([r[l.filter]]),F.flattenDeep([l.value]).map(o=>o.value)).length>0:!0));R(e)}});u.useEffect(()=>{ee()},[P,s]),u.useEffect(()=>{v&&w(L(v,n))},[v,n]);const te=u.useEffectEvent(()=>{f?.column&&G&&_(J.getUniqValue(G,f.column).filter(e=>!f?.excludeValues?.includes(`${e}`)).map(e=>({value:e,label:e})))});u.useEffect(()=>{te()},[f]),u.useEffect(()=>{ie.isEqual(U.current,n)||(x(n),U.current=n)},[n]);const k=(e,r)=>{z(l=>l.map(o=>o.filter===e?{...o,value:r}:o))},ae=s?Z.transformDataForGraph(S?Z.transformDataForAggregation(K.filterData(s,E||[]),S.keyColumn,S.aggregationColumnsSetting):K.filterData(s,E||[]),d,b):void 0;return i.jsxRuntimeExports.jsx(ue.GraphContainer,{className:t?.classNames?.graphContainer,style:t?.styles?.graphContainer,id:t?.graphID,ref:M,"aria-label":t?.ariaLabel,backgroundColor:t?.backgroundColor??!1,theme:t?.theme||"light",language:t?.language||"en",width:t?.width,height:t?.height,padding:t?.padding,minHeight:t?.minHeight,relativeHeight:t?.relativeHeight,children:s||se.graphList.filter(e=>e.geoHubMapPresentation).map(e=>e.graphID).indexOf(d)!==-1?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[c?.graphTitle||c?.graphDescription||t?.graphTitle||t?.graphDescription||t?.graphDownload||t?.dataDownload?i.jsxRuntimeExports.jsx(re.GraphHeader,{styles:{title:c?.styles?.title||t?.styles?.title,description:c?.styles?.description||t?.styles?.description},classNames:{title:c?.classNames?.title||t?.classNames?.title,description:c?.classNames?.description||t?.classNames?.description},graphTitle:c?.graphTitle||t?.graphTitle,graphDescription:c?.graphDescription||t?.graphDescription,width:c?.width||t?.width,graphDownload:t?.graphDownload?M:void 0,dataDownload:t?.dataDownload&&s&&s.length>0?s:null}):null,P.length!==0||(v||[]).length!==0||(O||[]).length!==0||f?i.jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap items-start gap-x-4 gap-y-0 w-full",children:[O?.map((e,r)=>i.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/h}% - ${(h-1)/h}rem)`,flexGrow:e.width?0:1,flexShrink:e.ui!=="radio"||e.width?0:1,minWidth:"240px"},className:"pb-4",children:[i.jsxRuntimeExports.jsx(g.b,{className:"mb-2",children:e.label||"Graph by"}),e.ui!=="radio"?i.jsxRuntimeExports.jsx(D.ja,{options:e.options.map(l=>({...l,value:l.label})),size:"sm",isClearable:!1,isSearchable:!0,variant:p,controlShouldRenderValue:!0,defaultValue:e.defaultValue?{...e.defaultValue,value:e.defaultValue?.label}:{...e.options[0],value:e.options[0].label},onChange:l=>{w(l?.graphSettings||{}),x(l?.dataConfiguration)}}):i.jsxRuntimeExports.jsx(g.ye,{defaultValue:e.defaultValue?.label||e.options[0].label,variant:p,onValueChange:l=>{const o=e.options[e.options.findIndex(j=>j.label===l)];w(o.graphSettings||{}),x(o.dataConfiguration)},children:e.options.map((l,o)=>i.jsxRuntimeExports.jsx(g.he,{label:l.label,value:l.label},o))})]},r)),v?.map((e,r)=>i.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/h}% - ${(h-1)/h}rem)`,flexGrow:e.width?0:1,flexShrink:e.ui!=="radio"||e.width?0:1,minWidth:"240px"},className:"pb-4",children:[i.jsxRuntimeExports.jsx(g.b,{className:"mb-2",children:e.label||`Visualize ${e.chartConfigId} by`}),g.checkIfMultiple(e.chartConfigId,b||[])?e.ui!=="radio"?i.jsxRuntimeExports.jsx(D.ja,{options:e.allowedColumnIds,size:"sm",isMulti:!0,isSearchable:!0,variant:p,controlShouldRenderValue:!0,defaultValue:n?n[n.findIndex(l=>l.chartConfigId===e.chartConfigId)].columnId.map(l=>e.allowedColumnIds[e.allowedColumnIds.findIndex(o=>o.value===l)]):void 0,filterOption:D.Du(H),onChange:l=>{const o={columnId:(l||[]).map(C=>C.value),chartConfigId:e.chartConfigId},j=b?.map(C=>C.chartConfigId===o.chartConfigId?o:C);x(j)}}):i.jsxRuntimeExports.jsx(g.$,{variant:p,defaultValue:n?n[n.findIndex(l=>l.chartConfigId===e.chartConfigId)].columnId.map(l=>e.allowedColumnIds[e.allowedColumnIds.findIndex(o=>o.value===l)]).map(l=>l.value):[],onValueChange:l=>{const o={columnId:l||[],chartConfigId:e.chartConfigId},j=b?.map(C=>C.chartConfigId===o.chartConfigId?o:C);x(j)},children:e.allowedColumnIds.map((l,o)=>i.jsxRuntimeExports.jsx(g.P,{label:l.label,value:l.label},o))}):e.ui!=="radio"?i.jsxRuntimeExports.jsx(D.ja,{options:e.allowedColumnIds,size:"sm",isClearable:!1,isSearchable:!0,variant:p,controlShouldRenderValue:!0,defaultValue:n?e.allowedColumnIds[e.allowedColumnIds.findIndex(l=>l.value===n[n.findIndex(o=>o.chartConfigId===e.chartConfigId)].columnId)]:void 0,onChange:l=>{const o={columnId:l?.value,chartConfigId:e.chartConfigId},j=b?.map(C=>C.chartConfigId===o.chartConfigId?o:C);w(L(v,j)),x(j)}}):i.jsxRuntimeExports.jsx(g.ye,{variant:p,defaultValue:n?e.allowedColumnIds[e.allowedColumnIds.findIndex(l=>l.value===n[n.findIndex(o=>o.chartConfigId===e.chartConfigId)].columnId)].label:"",onValueChange:l=>{const j={columnId:e.allowedColumnIds[e.allowedColumnIds.findIndex(q=>q.label===l)].value,chartConfigId:e.chartConfigId},C=b?.map(q=>q.chartConfigId===j.chartConfigId?j:q);w(L(v,C)),x(C)},children:e.allowedColumnIds.map((l,o)=>i.jsxRuntimeExports.jsx(g.he,{label:l.label,value:l.label},o))})]},r)),P?.map((e,r)=>i.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/h}% - ${(h-1)/h}rem)`,flexGrow:e.width?0:1,flexShrink:e.ui!=="radio"||e.width?0:1,minWidth:"240px"},className:"pb-4",children:[i.jsxRuntimeExports.jsx(g.b,{className:"mb-2",children:e.label}),e.singleSelect?e.ui!=="radio"?i.jsxRuntimeExports.jsx(D.ja,{options:e.availableValues,variant:p,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:D.Du(H),onChange:l=>{k(e.filter,l)},value:e.value,defaultValue:e.defaultValue}):i.jsxRuntimeExports.jsx(g.ye,{variant:p,defaultValue:e.defaultValue.value,onValueChange:l=>{k(e.filter,e.availableValues.filter(o=>o.value===l))},children:e.availableValues.map((l,o)=>i.jsxRuntimeExports.jsx(g.he,{label:`${l.label}`,value:`${l.value}`},o))}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[e.ui!=="radio"?i.jsxRuntimeExports.jsx(D.ja,{options:e.availableValues,variant:p,size:"sm",isMulti:!0,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:D.Du(H),onChange:l=>{k(e.filter,l)},value:e.value,defaultValue:e.defaultValue}):i.jsxRuntimeExports.jsx(g.$,{variant:p,defaultValue:e.defaultValue?e.defaultValue.map(l=>`${l.value}`):[],value:e.value?e.value.map(l=>`${l.value}`):void 0,onValueChange:l=>{k(e.filter,e.availableValues.filter(o=>l.indexOf(`${o.value}`)!==-1))},children:e.availableValues.map((l,o)=>i.jsxRuntimeExports.jsx(g.P,{label:`${l.label}`,value:`${l.value}`},o))}),e.allowSelectAll?i.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:()=>{k(e.filter,e.availableValues)},children:"Select all options"}):null]})]},r)),f?i.jsxRuntimeExports.jsxs("div",{style:{width:f.width||`calc(${100/h}% - ${(h-1)/h}rem)`,flexGrow:f.width?0:1,flexShrink:0,minWidth:"240px"},className:"pb-4",children:[i.jsxRuntimeExports.jsx(g.b,{className:"mb-2",children:f.label||"Highlight data"}),i.jsxRuntimeExports.jsx(D.ja,{options:Y,variant:p,size:"sm",isMulti:!0,isClearable:!0,isSearchable:!0,controlShouldRenderValue:!0,filterOption:D.Du(H),onChange:e=>{X(e?.map(r=>r.value))},value:$?.map(e=>({label:e,value:e})),defaultValue:f.defaultValues?.map(e=>({label:e,value:e}))})]}):null]}):null,i.jsxRuntimeExports.jsx(ce,{graph:d,graphData:ae,graphDataConfiguration:b,debugMode:I,readableHeader:V||[],updateFilters:T,settings:{...t||{},...c,graphTitle:void 0,graphDescription:void 0,graphDownload:!1,dataDownload:!1,backgroundColor:void 0,padding:"0",width:void 0,height:void 0,relativeHeight:void 0,minHeight:void 0,theme:t?.theme,...$?{highlightedDataPoints:$,highlightedIds:$?.map(e=>`${e}`),highlightedLines:$?.map(e=>e)}:{}}})]}):i.jsxRuntimeExports.jsx("div",{className:"w-full flex justify-center p-4",children:i.jsxRuntimeExports.jsx(oe.w,{})})})}exports.SingleGraphDashboardThreeDGraphs=de;
2
2
  //# sourceMappingURL=SingleGraphDashboardThreeDGraphs.cjs.map
@@ -6,7 +6,7 @@ import { i as ce } from "./index-Bwrro8-q.js";
6
6
  import { j as k, D as L } from "./DropdownSelect-B2WTeedJ.js";
7
7
  import { g as he, b as M, y as U, h as B, c as ge, $ as X, P as Y } from "./checkIfMultiple-B97uOUVq.js";
8
8
  import { w as pe } from "./Spinner-CtJETd5V.js";
9
- import { _ } from "./Typography-HicNIA61.js";
9
+ import { _ } from "./Typography-DMVW6JnV.js";
10
10
  import { ThreeDGlobe as fe } from "./ThreeDGlobe.js";
11
11
  import { f as me, a as Ce, b as be, c as ve, t as xe } from "./fetchAndParseData-BAXhgTDM.js";
12
12
  import { a as we, t as Ie } from "./transformDataForAggregation-wdPf8bNt.js";
@@ -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-Jt_tmhxS.cjs"),Ft=require("./AxisTitle-DV4n0RxE.cjs"),_t=require("./DetailsModal-DIRTulvr.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-N1eHt3vq.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-DIRTulvr.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-B4c-CrXs.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
@@ -14,7 +14,7 @@ import { A as ne } from "./index-Co3YGYe1.js";
14
14
  import { GraphFooter as re } from "./GraphFooter.js";
15
15
  import { GraphHeader as ae } from "./GraphHeader.js";
16
16
  import { ColorLegendWithMouseOver as se } from "./ColorLegendWithMouseOver.js";
17
- import { E as ce } from "./EmptyState-D807L58h.js";
17
+ import { E as ce } from "./EmptyState-B3fPoH6L.js";
18
18
  import { u as Kt } from "./uniqBy-BHy4I8PK.js";
19
19
  import { a as fe, G as ue } from "./GraphContainer-DwMxWRCi.js";
20
20
  function me(e) {
@@ -1,2 +1,2 @@
1
- "use strict";const r=require("./index-CHPV5EwG-6v2a2njQ.cjs"),j=require("./Typography-Cc_iHQB-.cjs"),d=require("react"),h=r.j("h-0 w-full",{variants:{size:{xs:"py-px",sm:"py-[2px]",base:"py-1",lg:"py-1.5",xl:"py-2","2xl":"py-3","3xl":"py-4","4xl":"py-5","5xl":"py-6","6xl":"py-8","7xl":"py-10","8xl":"py-12","9xl":"py-20"}},defaultVariants:{size:"base"}}),f=d.forwardRef((p,e)=>{const s=r._.c(11);let a,t,l;s[0]!==p?({className:a,size:l,...t}=p,s[0]=p,s[1]=a,s[2]=t,s[3]=l):(a=s[1],t=s[2],l=s[3]);let n;s[4]!==a||s[5]!==l?(n=r.mo(h({size:l}),a),s[4]=a,s[5]=l,s[6]=n):n=s[6];let i;return s[7]!==t||s[8]!==e||s[9]!==n?(i=r.ae.jsx("div",{...t,className:n,ref:e}),s[7]=t,s[8]=e,s[9]=n,s[10]=i):i=s[10],i});f.displayName="Spacer";function E(p){const e=r.compilerRuntimeExports.c(16),{sources:s,style:a,className:t}=p;let l;e[0]!==a?(l=a===void 0?{}:a,e[0]=a,e[1]=l):l=e[1];const n=l;let i;e[2]!==t?(i=r.mo("text-primary-gray-550 dark:text-primary-gray-400",t),e[2]=t,e[3]=i):i=e[3];let o;if(e[4]!==t||e[5]!==s){let y;e[7]!==t?(y=(u,g)=>r.jsxRuntimeExports.jsx("span",{className:r.mo("text-primary-gray-550 dark:text-primary-gray-400",t),style:{fontFamily:"inherit"},children:u.link?r.jsxRuntimeExports.jsx(j.J,{className:r.mo("text-primary-gray-550 dark:text-primary-gray-400",t),href:u.link,target:"_blank",rel:"noreferrer",children:u.source}):u.source},g),e[7]=t,e[8]=y):y=e[8],o=s.map(y),e[4]=t,e[5]=s,e[6]=o}else o=e[6];let x;e[9]!==n||e[10]!==i||e[11]!==o?(x=r.jsxRuntimeExports.jsxs(j._,{size:"sm",marginBottom:"none","aria-label":"Data sources",className:i,style:n,children:["Source:"," ",o]}),e[9]=n,e[10]=i,e[11]=o,e[12]=x):x=e[12];let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=r.jsxRuntimeExports.jsx(f,{size:"base"}),e[13]=m):m=e[13];let c;return e[14]!==x?(c=r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[x,m]}),e[14]=x,e[15]=c):c=e[15],c}exports.Source=E;exports.n=f;
2
- //# sourceMappingURL=Source-24M277ZQ.cjs.map
1
+ "use strict";const r=require("./index-CHPV5EwG-6v2a2njQ.cjs"),j=require("./Typography-CZZxlj1W.cjs"),d=require("react"),h=r.j("h-0 w-full",{variants:{size:{xs:"py-px",sm:"py-[2px]",base:"py-1",lg:"py-1.5",xl:"py-2","2xl":"py-3","3xl":"py-4","4xl":"py-5","5xl":"py-6","6xl":"py-8","7xl":"py-10","8xl":"py-12","9xl":"py-20"}},defaultVariants:{size:"base"}}),f=d.forwardRef((p,e)=>{const s=r._.c(11);let a,t,l;s[0]!==p?({className:a,size:l,...t}=p,s[0]=p,s[1]=a,s[2]=t,s[3]=l):(a=s[1],t=s[2],l=s[3]);let n;s[4]!==a||s[5]!==l?(n=r.mo(h({size:l}),a),s[4]=a,s[5]=l,s[6]=n):n=s[6];let i;return s[7]!==t||s[8]!==e||s[9]!==n?(i=r.ae.jsx("div",{...t,className:n,ref:e}),s[7]=t,s[8]=e,s[9]=n,s[10]=i):i=s[10],i});f.displayName="Spacer";function E(p){const e=r.compilerRuntimeExports.c(16),{sources:s,style:a,className:t}=p;let l;e[0]!==a?(l=a===void 0?{}:a,e[0]=a,e[1]=l):l=e[1];const n=l;let i;e[2]!==t?(i=r.mo("text-primary-gray-550 dark:text-primary-gray-400",t),e[2]=t,e[3]=i):i=e[3];let o;if(e[4]!==t||e[5]!==s){let y;e[7]!==t?(y=(u,g)=>r.jsxRuntimeExports.jsx("span",{className:r.mo("text-primary-gray-550 dark:text-primary-gray-400",t),style:{fontFamily:"inherit"},children:u.link?r.jsxRuntimeExports.jsx(j.J,{className:r.mo("text-primary-gray-550 dark:text-primary-gray-400",t),href:u.link,target:"_blank",rel:"noreferrer",children:u.source}):u.source},g),e[7]=t,e[8]=y):y=e[8],o=s.map(y),e[4]=t,e[5]=s,e[6]=o}else o=e[6];let x;e[9]!==n||e[10]!==i||e[11]!==o?(x=r.jsxRuntimeExports.jsxs(j._,{size:"sm",marginBottom:"none","aria-label":"Data sources",className:i,style:n,children:["Source:"," ",o]}),e[9]=n,e[10]=i,e[11]=o,e[12]=x):x=e[12];let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=r.jsxRuntimeExports.jsx(f,{size:"base"}),e[13]=m):m=e[13];let c;return e[14]!==x?(c=r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[x,m]}),e[14]=x,e[15]=c):c=e[15],c}exports.Source=E;exports.n=f;
2
+ //# sourceMappingURL=Source-BOSAl3UX.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Source-24M277ZQ.cjs","sources":["../node_modules/@undp/design-system-react/dist/Spacer.js","../src/Components/Typography/Source.tsx"],"sourcesContent":["import { j as o } from \"./jsx-runtime-BzflLqGi.js\";\nimport { c as m } from \"./compiler-runtime-Cu50tn6L.js\";\nimport x from \"react\";\nimport { c } from \"./index-CHPV5EwG.js\";\nimport { c as y } from \"./utils-D_Pof5Gy.js\";\nconst f = c(\"h-0 w-full\", {\n variants: {\n size: {\n xs: \"py-px\",\n sm: \"py-[2px]\",\n base: \"py-1\",\n lg: \"py-1.5\",\n xl: \"py-2\",\n \"2xl\": \"py-3\",\n \"3xl\": \"py-4\",\n \"4xl\": \"py-5\",\n \"5xl\": \"py-6\",\n \"6xl\": \"py-8\",\n \"7xl\": \"py-10\",\n \"8xl\": \"py-12\",\n \"9xl\": \"py-20\"\n }\n },\n defaultVariants: {\n size: \"base\"\n }\n}), n = x.forwardRef((r, i) => {\n const s = m.c(11);\n let p, e, a;\n s[0] !== r ? ({\n className: p,\n size: a,\n ...e\n } = r, s[0] = r, s[1] = p, s[2] = e, s[3] = a) : (p = s[1], e = s[2], a = s[3]);\n let l;\n s[4] !== p || s[5] !== a ? (l = y(f({\n size: a\n }), p), s[4] = p, s[5] = a, s[6] = l) : l = s[6];\n let t;\n return s[7] !== e || s[8] !== i || s[9] !== l ? (t = /* @__PURE__ */ o.jsx(\"div\", { ...e, className: l, ref: i }), s[7] = e, s[8] = i, s[9] = l, s[10] = t) : t = s[10], t;\n});\nn.displayName = \"Spacer\";\nexport {\n n as Spacer\n};\n//# sourceMappingURL=Spacer.js.map\n","import { A, P } from '@undp/design-system-react/Typography';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\n\r\nimport { SourcesDataType } from '@/Types';\r\n\r\ninterface SourceProps {\r\n sources: SourcesDataType[];\r\n style?: React.CSSProperties;\r\n className?: string;\r\n}\r\n\r\nexport function Source(props: SourceProps) {\r\n const { sources, style = {}, className } = props;\r\n return (\r\n <>\r\n <P\r\n size='sm'\r\n marginBottom='none'\r\n aria-label='Data sources'\r\n className={cn('text-primary-gray-550 dark:text-primary-gray-400', className)}\r\n style={style}\r\n >\r\n Source:{' '}\r\n {sources.map((d, i) => (\r\n <span\r\n key={i}\r\n className={cn('text-primary-gray-550 dark:text-primary-gray-400', className)}\r\n style={{ fontFamily: 'inherit' }}\r\n >\r\n {d.link ? (\r\n <A\r\n className={cn('text-primary-gray-550 dark:text-primary-gray-400', className)}\r\n href={d.link}\r\n target='_blank'\r\n rel='noreferrer'\r\n >\r\n {d.source}\r\n </A>\r\n ) : (\r\n d.source\r\n )}\r\n </span>\r\n ))}\r\n </P>\r\n <Spacer size='base' />\r\n </>\r\n );\r\n}\r\n"],"names":["f","c","n","x","r","i","m","p","e","a","l","y","t","o","Source","props","$","_c","sources","style","t0","className","t1","undefined","t2","cn","t3","t4","d","jsx","fontFamily","link","A","source","map","jsxs","P","t5","Symbol","for","Spacer","t6"],"mappings":"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","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"Source-BOSAl3UX.cjs","sources":["../node_modules/@undp/design-system-react/dist/Spacer.js","../src/Components/Typography/Source.tsx"],"sourcesContent":["import { j as o } from \"./jsx-runtime-BzflLqGi.js\";\nimport { c as m } from \"./compiler-runtime-Cu50tn6L.js\";\nimport x from \"react\";\nimport { c } from \"./index-CHPV5EwG.js\";\nimport { c as y } from \"./utils-D_Pof5Gy.js\";\nconst f = c(\"h-0 w-full\", {\n variants: {\n size: {\n xs: \"py-px\",\n sm: \"py-[2px]\",\n base: \"py-1\",\n lg: \"py-1.5\",\n xl: \"py-2\",\n \"2xl\": \"py-3\",\n \"3xl\": \"py-4\",\n \"4xl\": \"py-5\",\n \"5xl\": \"py-6\",\n \"6xl\": \"py-8\",\n \"7xl\": \"py-10\",\n \"8xl\": \"py-12\",\n \"9xl\": \"py-20\"\n }\n },\n defaultVariants: {\n size: \"base\"\n }\n}), n = x.forwardRef((r, i) => {\n const s = m.c(11);\n let p, e, a;\n s[0] !== r ? ({\n className: p,\n size: a,\n ...e\n } = r, s[0] = r, s[1] = p, s[2] = e, s[3] = a) : (p = s[1], e = s[2], a = s[3]);\n let l;\n s[4] !== p || s[5] !== a ? (l = y(f({\n size: a\n }), p), s[4] = p, s[5] = a, s[6] = l) : l = s[6];\n let t;\n return s[7] !== e || s[8] !== i || s[9] !== l ? (t = /* @__PURE__ */ o.jsx(\"div\", { ...e, className: l, ref: i }), s[7] = e, s[8] = i, s[9] = l, s[10] = t) : t = s[10], t;\n});\nn.displayName = \"Spacer\";\nexport {\n n as Spacer\n};\n//# sourceMappingURL=Spacer.js.map\n","import { A, P } from '@undp/design-system-react/Typography';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\n\r\nimport { SourcesDataType } from '@/Types';\r\n\r\ninterface SourceProps {\r\n sources: SourcesDataType[];\r\n style?: React.CSSProperties;\r\n className?: string;\r\n}\r\n\r\nexport function Source(props: SourceProps) {\r\n const { sources, style = {}, className } = props;\r\n return (\r\n <>\r\n <P\r\n size='sm'\r\n marginBottom='none'\r\n aria-label='Data sources'\r\n className={cn('text-primary-gray-550 dark:text-primary-gray-400', className)}\r\n style={style}\r\n >\r\n Source:{' '}\r\n {sources.map((d, i) => (\r\n <span\r\n key={i}\r\n className={cn('text-primary-gray-550 dark:text-primary-gray-400', className)}\r\n style={{ fontFamily: 'inherit' }}\r\n >\r\n {d.link ? (\r\n <A\r\n className={cn('text-primary-gray-550 dark:text-primary-gray-400', className)}\r\n href={d.link}\r\n target='_blank'\r\n rel='noreferrer'\r\n >\r\n {d.source}\r\n </A>\r\n ) : (\r\n d.source\r\n )}\r\n </span>\r\n ))}\r\n </P>\r\n <Spacer size='base' />\r\n </>\r\n );\r\n}\r\n"],"names":["f","c","n","x","r","i","m","p","e","a","l","y","t","o","Source","props","$","_c","sources","style","t0","className","t1","undefined","t2","cn","t3","t4","d","jsx","fontFamily","link","A","source","map","jsxs","P","t5","Symbol","for","Spacer","t6"],"mappings":"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","x_google_ignoreList":[0]}
@@ -1,5 +1,5 @@
1
1
  import { _ as j, m as u, a as h, b as _, c as b, j as p } from "./index-CHPV5EwG-BCLAYDCV.js";
2
- import { J as N, _ as k } from "./Typography-HicNIA61.js";
2
+ import { J as N, _ as k } from "./Typography-DMVW6JnV.js";
3
3
  import z from "react";
4
4
  const S = _("h-0 w-full", {
5
5
  variants: {
@@ -75,4 +75,4 @@ export {
75
75
  E as S,
76
76
  d as n
77
77
  };
78
- //# sourceMappingURL=Source-eILIr4Ov.js.map
78
+ //# sourceMappingURL=Source-Djkz-7jX.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Source-eILIr4Ov.js","sources":["../node_modules/@undp/design-system-react/dist/Spacer.js","../src/Components/Typography/Source.tsx"],"sourcesContent":["import { j as o } from \"./jsx-runtime-BzflLqGi.js\";\nimport { c as m } from \"./compiler-runtime-Cu50tn6L.js\";\nimport x from \"react\";\nimport { c } from \"./index-CHPV5EwG.js\";\nimport { c as y } from \"./utils-D_Pof5Gy.js\";\nconst f = c(\"h-0 w-full\", {\n variants: {\n size: {\n xs: \"py-px\",\n sm: \"py-[2px]\",\n base: \"py-1\",\n lg: \"py-1.5\",\n xl: \"py-2\",\n \"2xl\": \"py-3\",\n \"3xl\": \"py-4\",\n \"4xl\": \"py-5\",\n \"5xl\": \"py-6\",\n \"6xl\": \"py-8\",\n \"7xl\": \"py-10\",\n \"8xl\": \"py-12\",\n \"9xl\": \"py-20\"\n }\n },\n defaultVariants: {\n size: \"base\"\n }\n}), n = x.forwardRef((r, i) => {\n const s = m.c(11);\n let p, e, a;\n s[0] !== r ? ({\n className: p,\n size: a,\n ...e\n } = r, s[0] = r, s[1] = p, s[2] = e, s[3] = a) : (p = s[1], e = s[2], a = s[3]);\n let l;\n s[4] !== p || s[5] !== a ? (l = y(f({\n size: a\n }), p), s[4] = p, s[5] = a, s[6] = l) : l = s[6];\n let t;\n return s[7] !== e || s[8] !== i || s[9] !== l ? (t = /* @__PURE__ */ o.jsx(\"div\", { ...e, className: l, ref: i }), s[7] = e, s[8] = i, s[9] = l, s[10] = t) : t = s[10], t;\n});\nn.displayName = \"Spacer\";\nexport {\n n as Spacer\n};\n//# sourceMappingURL=Spacer.js.map\n","import { A, P } from '@undp/design-system-react/Typography';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\n\r\nimport { SourcesDataType } from '@/Types';\r\n\r\ninterface SourceProps {\r\n sources: SourcesDataType[];\r\n style?: React.CSSProperties;\r\n className?: string;\r\n}\r\n\r\nexport function Source(props: SourceProps) {\r\n const { sources, style = {}, className } = props;\r\n return (\r\n <>\r\n <P\r\n size='sm'\r\n marginBottom='none'\r\n aria-label='Data sources'\r\n className={cn('text-primary-gray-550 dark:text-primary-gray-400', className)}\r\n style={style}\r\n >\r\n Source:{' '}\r\n {sources.map((d, i) => (\r\n <span\r\n key={i}\r\n className={cn('text-primary-gray-550 dark:text-primary-gray-400', className)}\r\n style={{ fontFamily: 'inherit' }}\r\n >\r\n {d.link ? (\r\n <A\r\n className={cn('text-primary-gray-550 dark:text-primary-gray-400', className)}\r\n href={d.link}\r\n target='_blank'\r\n rel='noreferrer'\r\n >\r\n {d.source}\r\n </A>\r\n ) : (\r\n d.source\r\n )}\r\n </span>\r\n ))}\r\n </P>\r\n <Spacer size='base' />\r\n </>\r\n );\r\n}\r\n"],"names":["f","c","n","x","r","i","m","p","e","a","l","y","t","o","Source","props","$","_c","sources","style","t0","className","t1","undefined","t2","cn","t3","t4","d","jsx","fontFamily","link","A","source","map","jsxs","P","t5","Symbol","for","Spacer","t6"],"mappings":"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","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"Source-Djkz-7jX.js","sources":["../node_modules/@undp/design-system-react/dist/Spacer.js","../src/Components/Typography/Source.tsx"],"sourcesContent":["import { j as o } from \"./jsx-runtime-BzflLqGi.js\";\nimport { c as m } from \"./compiler-runtime-Cu50tn6L.js\";\nimport x from \"react\";\nimport { c } from \"./index-CHPV5EwG.js\";\nimport { c as y } from \"./utils-D_Pof5Gy.js\";\nconst f = c(\"h-0 w-full\", {\n variants: {\n size: {\n xs: \"py-px\",\n sm: \"py-[2px]\",\n base: \"py-1\",\n lg: \"py-1.5\",\n xl: \"py-2\",\n \"2xl\": \"py-3\",\n \"3xl\": \"py-4\",\n \"4xl\": \"py-5\",\n \"5xl\": \"py-6\",\n \"6xl\": \"py-8\",\n \"7xl\": \"py-10\",\n \"8xl\": \"py-12\",\n \"9xl\": \"py-20\"\n }\n },\n defaultVariants: {\n size: \"base\"\n }\n}), n = x.forwardRef((r, i) => {\n const s = m.c(11);\n let p, e, a;\n s[0] !== r ? ({\n className: p,\n size: a,\n ...e\n } = r, s[0] = r, s[1] = p, s[2] = e, s[3] = a) : (p = s[1], e = s[2], a = s[3]);\n let l;\n s[4] !== p || s[5] !== a ? (l = y(f({\n size: a\n }), p), s[4] = p, s[5] = a, s[6] = l) : l = s[6];\n let t;\n return s[7] !== e || s[8] !== i || s[9] !== l ? (t = /* @__PURE__ */ o.jsx(\"div\", { ...e, className: l, ref: i }), s[7] = e, s[8] = i, s[9] = l, s[10] = t) : t = s[10], t;\n});\nn.displayName = \"Spacer\";\nexport {\n n as Spacer\n};\n//# sourceMappingURL=Spacer.js.map\n","import { A, P } from '@undp/design-system-react/Typography';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\n\r\nimport { SourcesDataType } from '@/Types';\r\n\r\ninterface SourceProps {\r\n sources: SourcesDataType[];\r\n style?: React.CSSProperties;\r\n className?: string;\r\n}\r\n\r\nexport function Source(props: SourceProps) {\r\n const { sources, style = {}, className } = props;\r\n return (\r\n <>\r\n <P\r\n size='sm'\r\n marginBottom='none'\r\n aria-label='Data sources'\r\n className={cn('text-primary-gray-550 dark:text-primary-gray-400', className)}\r\n style={style}\r\n >\r\n Source:{' '}\r\n {sources.map((d, i) => (\r\n <span\r\n key={i}\r\n className={cn('text-primary-gray-550 dark:text-primary-gray-400', className)}\r\n style={{ fontFamily: 'inherit' }}\r\n >\r\n {d.link ? (\r\n <A\r\n className={cn('text-primary-gray-550 dark:text-primary-gray-400', className)}\r\n href={d.link}\r\n target='_blank'\r\n rel='noreferrer'\r\n >\r\n {d.source}\r\n </A>\r\n ) : (\r\n d.source\r\n )}\r\n </span>\r\n ))}\r\n </P>\r\n <Spacer size='base' />\r\n </>\r\n );\r\n}\r\n"],"names":["f","c","n","x","r","i","m","p","e","a","l","y","t","o","Source","props","$","_c","sources","style","t0","className","t1","undefined","t2","cn","t3","t4","d","jsx","fontFamily","link","A","source","map","jsxs","P","t5","Symbol","for","Spacer","t6"],"mappings":";;;AAKK,MAACA,IAAIC,EAAE,cAAc;AAAA,EACxB,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,OAAO;AAAA,MACP,OAAO;AAAA,MACP,OAAO;AAAA,MACP,OAAO;AAAA,MACP,OAAO;AAAA,MACP,OAAO;AAAA,MACP,OAAO;AAAA,IACb;AAAA,EACA;AAAA,EACE,iBAAiB;AAAA,IACf,MAAM;AAAA,EACV;AACA,CAAC,GAAGC,IAAIC,EAAE,WAAW,CAACC,GAAGC,MAAM;AAC7B,QAAM,IAAIC,EAAE,EAAE,EAAE;AAChB,MAAIC,GAAGC,GAAGC;AACV,IAAE,CAAC,MAAML,KAAK;AAAA,IACZ,WAAWG;AAAA,IACX,MAAME;AAAA,IACN,GAAGD;AAAA,EACP,IAAMJ,GAAG,EAAE,CAAC,IAAIA,GAAG,EAAE,CAAC,IAAIG,GAAG,EAAE,CAAC,IAAIC,GAAG,EAAE,CAAC,IAAIC,MAAMF,IAAI,EAAE,CAAC,GAAGC,IAAI,EAAE,CAAC,GAAGC,IAAI,EAAE,CAAC;AAC7E,MAAIC;AACJ,IAAE,CAAC,MAAMH,KAAK,EAAE,CAAC,MAAME,KAAKC,IAAIC,EAAEX,EAAE;AAAA,IAClC,MAAMS;AAAA,EACV,CAAG,GAAGF,CAAC,GAAG,EAAE,CAAC,IAAIA,GAAG,EAAE,CAAC,IAAIE,GAAG,EAAE,CAAC,IAAIC,KAAKA,IAAI,EAAE,CAAC;AAC/C,MAAIE;AACJ,SAAO,EAAE,CAAC,MAAMJ,KAAK,EAAE,CAAC,MAAMH,KAAK,EAAE,CAAC,MAAMK,KAAKE,IAAoBC,gBAAAA,EAAE,IAAI,OAAO,EAAE,GAAGL,GAAG,WAAWE,GAAG,KAAKL,GAAG,GAAG,EAAE,CAAC,IAAIG,GAAG,EAAE,CAAC,IAAIH,GAAG,EAAE,CAAC,IAAIK,GAAG,EAAE,EAAE,IAAIE,KAAKA,IAAI,EAAE,EAAE,GAAGA;AAC3K,CAAC;AACDV,EAAE,cAAc;AC7BT,SAAAY,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAAA,EAAA,EAAA,GACL;AAAA,IAAAC,SAAAA;AAAAA,IAAAC,OAAAC;AAAAA,IAAAC,WAAAA;AAAAA,EAAAA,IAA2CN;AAAM,MAAAO;AAAA,EAAAN,SAAAI,KAAhCE,IAAAF,MAAAG,SAAA,CAAA,IAAAH,GAAUJ,OAAAI,GAAAJ,OAAAM,KAAAA,IAAAN,EAAA,CAAA;AAAV,QAAAG,IAAAG;AAAU,MAAAE;AAAA,EAAAR,SAAAK,KAOVG,IAAAC,EAAG,oDAAoDJ,CAAS,GAACL,OAAAK,GAAAL,OAAAQ,KAAAA,IAAAR,EAAA,CAAA;AAAA,MAAAU;AAAA,MAAAV,EAAA,CAAA,MAAAK,KAAAL,SAAAE,GAAA;AAAA,QAAAS;AAAA,IAAAX,SAAAK,KAI/DM,IAAAA,CAAAC,GAAAvB,MACXwB,gBAAAA,EAAAA,IAAA,QAAA,EAEa,WAAAJ,EAAG,oDAAoDJ,CAAS,GACpE,OAAA;AAAA,MAAAS,YAAc;AAAA,IAAA,GAEpBF,YAACG,OACAF,gBAAAA,EAAAA,IAACG,KACY,WAAAP,EAAG,oDAAoDJ,CAAS,GACrE,MAAAO,EAACG,MACA,QAAA,UACH,KAAA,cAEHH,YAACK,OAAAA,CACJ,IAEAL,EAACK,OAAAA,GAdE5B,CAgBP,GACDW,OAAAK,GAAAL,OAAAW,KAAAA,IAAAX,EAAA,CAAA,GAnBAU,IAAAR,EAAOgB,IAAKP,CAmBZ,GAACX,OAAAK,GAAAL,OAAAE,GAAAF,OAAAU;AAAAA,EAAA;AAAAA,IAAAA,IAAAV,EAAA,CAAA;AAAA,MAAAW;AAAA,EAAAX,EAAA,CAAA,MAAAG,KAAAH,UAAAQ,KAAAR,EAAA,EAAA,MAAAU,KA3BJC,IAAAQ,gBAAAA,EAAAA,KAACC,GAAA,EACM,MAAA,MACQ,cAAA,QACF,cAAA,gBACA,WAAAZ,GACJL,OAAAA,GACR,UAAA;AAAA,IAAA;AAAA,IACS;AAAA,IACPO;AAAAA,EAAAA,GAoBH,GAAIV,OAAAG,GAAAH,QAAAQ,GAAAR,QAAAU,GAAAV,QAAAW,KAAAA,IAAAX,EAAA,EAAA;AAAA,MAAAqB;AAAA,EAAArB,EAAA,EAAA,MAAAsB,uBAAAC,IAAA,2BAAA,KACJF,0BAACG,GAAA,EAAY,MAAA,OAAA,CAAM,GAAGxB,QAAAqB,KAAAA,IAAArB,EAAA,EAAA;AAAA,MAAAyB;AAAA,SAAAzB,UAAAW,KA9BxBc,yCACEd,UAAAA;AAAAA,IAAAA;AAAAA,IA6BAU;AAAAA,EAAAA,GAAsB,GACrBrB,QAAAW,GAAAX,QAAAyB,KAAAA,IAAAzB,EAAA,EAAA,GA/BHyB;AA+BG;","x_google_ignoreList":[0]}
package/dist/Source.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-CHPV5EwG-6v2a2njQ.cjs");require("./Typography-Cc_iHQB-.cjs");const e=require("./Source-24M277ZQ.cjs");exports.Source=e.Source;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-CHPV5EwG-6v2a2njQ.cjs");require("./Typography-CZZxlj1W.cjs");const e=require("./Source-BOSAl3UX.cjs");exports.Source=e.Source;
2
2
  //# sourceMappingURL=Source.cjs.map
package/dist/Source.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./index-CHPV5EwG-BCLAYDCV.js";
2
- import "./Typography-HicNIA61.js";
3
- import { S as t } from "./Source-eILIr4Ov.js";
2
+ import "./Typography-DMVW6JnV.js";
3
+ import { S as t } from "./Source-Djkz-7jX.js";
4
4
  export {
5
5
  t as Source
6
6
  };
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),C=require("./index-CSNtgibC.cjs"),nt=require("./Typography-Cc_iHQB-.cjs"),rt=require("./GraphFooter.cjs"),ot=require("./GraphHeader.cjs"),g=require("./numberFormattingFunction-02t-wJta.cjs");function st(e){const t=o.compilerRuntimeExports.c(50),{year:f,data:r,graphTitle:m,suffix:W,sources:h,prefix:L,graphDescription:p,footNote:y,padding:P,backgroundColor:I,graphID:G,aggregationMethod:V,language:J,countOnly:x,theme:K,ariaLabel:it,textBackground:Q,headingFontSize:U,centerAlign:X,verticalAlign:Y,layout:Z,styles:n,classNames:i,precision:tt}=e,s=W===void 0?"":W,a=L===void 0?"":L,d=I===void 0?!1:I,l=V===void 0?"count":V,c=J===void 0?"en":J,et=K===void 0?"light":K,$=Q===void 0?!1:Q,S=U===void 0?"4.375rem":U,_=X===void 0?!1:X,w=Y===void 0?"center":Y,k=Z===void 0?"primary":Z,u=tt===void 0?2:tt,M=`${et||"light"} w-full`,T=c==="he"||c==="ar"?"rtl":void 0,q=`${et||"light"} flex flex-col w-full box-border h-full ${d?d===!0?"bg-primary-gray-200 dark:bg-primary-gray-650":"":"bg-transparent"} ${c||"en"}`,H=i?.graphContainer;let v;t[0]!==q||t[1]!==H?(v=o.mo(q,H),t[0]=q,t[1]=H,t[2]=v):v=t[2];let j;t[3]!==n?.graphContainer?(j=n?.graphContainer||{},t[3]=n?.graphContainer,t[4]=j):j=t[4];let b;t[5]!==d?(b=d&&d!==!0?{backgroundColor:d}:{},t[5]=d,t[6]=b):b=t[6];const z=d?P||"1rem":P||0;let F;t[7]!==j||t[8]!==b||t[9]!==z?(F={...j,...b,padding:z},t[7]=j,t[8]=b,t[9]=z,t[10]=F):F=t[10];const B=it||`${m?`The graph shows ${m}. `:""}This is a statistic card.${p?` ${p}`:""}`,D=`flex flex-col w-full grow ${k!=="secondary"?"gap-12 justify-between":"gap-4 justify-center"}`;let N;t[11]!==l||t[12]!==_||t[13]!==i?.description||t[14]!==i?.footnote||t[15]!==i?.source||t[16]!==i?.title||t[17]!==x||t[18]!==r||t[19]!==y||t[20]!==p||t[21]!==m||t[22]!==S||t[23]!==c||t[24]!==k||t[25]!==u||t[26]!==a||t[27]!==h||t[28]!==n?.description||t[29]!==n?.footnote||t[30]!==n?.source||t[31]!==n?.title||t[32]!==s||t[33]!==$||t[34]!==w||t[35]!==f?(N=k!=="secondary"?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[m||p?o.jsxRuntimeExports.jsx(ot.GraphHeader,{styles:{title:n?.title,description:n?.description},classNames:{title:i?.title,description:i?.description},graphTitle:m,graphDescription:p}):null,o.jsxRuntimeExports.jsx("div",{className:`flex flex-col justify-between grow ${w==="top"?"justify-start":w==="bottom"?"justify-end":"justify-center"}`,children:o.jsxRuntimeExports.jsxs(nt.R,{marginBottom:"base",className:`leading-none text-outline font-heading ${_?"text-center":c==="he"||c==="ar"?"text-right":"text-left"} ${$?"text-primary-black dark:text-primary-white":"transparent"}`,style:{fontSize:S,letterSpacing:"0.05rem"},children:[r.filter(jt).length>0||l==="count"?x&&x?.length!==0?r.filter(O=>x.indexOf(O.value)!==-1).length:r.length:l==="sum"?g.numberFormattingFunction(C.sum(r.map(vt)),"NA",u,a,s):l==="average"?g.numberFormattingFunction(parseFloat((C.sum(r.map(yt))/r.length).toFixed(2)),"NA",u,a,s):l==="max"?g.numberFormattingFunction(Math.max(...r.map(ht).filter(ft)),"NA",u,a,s):g.numberFormattingFunction(Math.min(...r.map(gt).filter(dt)),"NA",u,a,s)," ",f?o.jsxRuntimeExports.jsxs("span",{className:"text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400",style:{marginLeft:"-8px",lineHeight:"1.09",textShadow:"none",WebkitTextStrokeWidth:0},children:["(",f,")"]}):null]})}),h||y?o.jsxRuntimeExports.jsx(rt.GraphFooter,{styles:{footnote:n?.footnote,source:n?.source},classNames:{footnote:i?.footnote,source:i?.source},sources:h,footNote:y}):null]}):o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs(nt.R,{marginBottom:k==="secondary"?"none":"base",className:`leading-none text-outline font-heading ${_?"text-center":c==="he"||c==="ar"?"text-right":"text-left"} ${$?"text-primary-black dark:text-primary-white":"transparent"}`,style:{fontSize:S,letterSpacing:"0.05rem"},children:[r.filter(xt).length>0||l==="count"?x&&x?.length!==0?r.filter(O=>x.indexOf(O.value)!==-1).length:r.length:l==="sum"?g.numberFormattingFunction(C.sum(r.map(pt)),"NA",u,a,s):l==="average"?g.numberFormattingFunction(parseFloat((C.sum(r.map(mt))/r.length).toFixed(2)),"NA",u,a,s):l==="max"?g.numberFormattingFunction(Math.max(...r.map(ct).filter(ut)),"NA",u,a,s):g.numberFormattingFunction(Math.min(...r.map(lt).filter(at)),"NA",u,a,s)," ",f?o.jsxRuntimeExports.jsxs("span",{className:"text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400",style:{marginLeft:"-8px",lineHeight:"1.09",textShadow:"none",WebkitTextStrokeWidth:0},children:["(",f,")"]}):null]}),m||p?o.jsxRuntimeExports.jsx(ot.GraphHeader,{styles:{title:n?.title,description:n?.description},classNames:{title:i?.title,description:i?.description},graphTitle:m,graphDescription:p}):null,h||y?o.jsxRuntimeExports.jsx(rt.GraphFooter,{styles:{footnote:n?.footnote,source:n?.source},classNames:{footnote:i?.footnote,source:i?.source},sources:h,footNote:y}):null]}),t[11]=l,t[12]=_,t[13]=i?.description,t[14]=i?.footnote,t[15]=i?.source,t[16]=i?.title,t[17]=x,t[18]=r,t[19]=y,t[20]=p,t[21]=m,t[22]=S,t[23]=c,t[24]=k,t[25]=u,t[26]=a,t[27]=h,t[28]=n?.description,t[29]=n?.footnote,t[30]=n?.source,t[31]=n?.title,t[32]=s,t[33]=$,t[34]=w,t[35]=f,t[36]=N):N=t[36];let R;t[37]!==D||t[38]!==N?(R=o.jsxRuntimeExports.jsx("div",{className:D,children:N}),t[37]=D,t[38]=N,t[39]=R):R=t[39];let E;t[40]!==G||t[41]!==T||t[42]!==v||t[43]!==F||t[44]!==B||t[45]!==R?(E=o.jsxRuntimeExports.jsx("div",{id:G,dir:T,className:v,style:F,"aria-label":B,children:R}),t[40]=G,t[41]=T,t[42]=v,t[43]=F,t[44]=B,t[45]=R,t[46]=E):E=t[46];let A;return t[47]!==M||t[48]!==E?(A=o.jsxRuntimeExports.jsx("div",{className:M,children:E}),t[47]=M,t[48]=E,t[49]=A):A=t[49],A}function at(e){return e!==void 0}function lt(e){return e.value}function ut(e){return e!==void 0}function ct(e){return e.value}function mt(e){return e.value}function pt(e){return e.value}function xt(e){return typeof e.value=="string"}function dt(e){return e!==void 0}function gt(e){return e.value}function ft(e){return e!==void 0}function ht(e){return e.value}function yt(e){return e.value}function vt(e){return e.value}function jt(e){return typeof e.value=="string"}exports.StatCardFromData=st;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),C=require("./index-CSNtgibC.cjs"),nt=require("./Typography-CZZxlj1W.cjs"),rt=require("./GraphFooter.cjs"),ot=require("./GraphHeader.cjs"),g=require("./numberFormattingFunction-02t-wJta.cjs");function st(e){const t=o.compilerRuntimeExports.c(50),{year:f,data:r,graphTitle:m,suffix:W,sources:h,prefix:L,graphDescription:p,footNote:y,padding:P,backgroundColor:I,graphID:G,aggregationMethod:V,language:J,countOnly:x,theme:K,ariaLabel:it,textBackground:Q,headingFontSize:U,centerAlign:X,verticalAlign:Y,layout:Z,styles:n,classNames:i,precision:tt}=e,s=W===void 0?"":W,a=L===void 0?"":L,d=I===void 0?!1:I,l=V===void 0?"count":V,c=J===void 0?"en":J,et=K===void 0?"light":K,$=Q===void 0?!1:Q,S=U===void 0?"4.375rem":U,_=X===void 0?!1:X,w=Y===void 0?"center":Y,k=Z===void 0?"primary":Z,u=tt===void 0?2:tt,M=`${et||"light"} w-full`,T=c==="he"||c==="ar"?"rtl":void 0,q=`${et||"light"} flex flex-col w-full box-border h-full ${d?d===!0?"bg-primary-gray-200 dark:bg-primary-gray-650":"":"bg-transparent"} ${c||"en"}`,H=i?.graphContainer;let v;t[0]!==q||t[1]!==H?(v=o.mo(q,H),t[0]=q,t[1]=H,t[2]=v):v=t[2];let j;t[3]!==n?.graphContainer?(j=n?.graphContainer||{},t[3]=n?.graphContainer,t[4]=j):j=t[4];let b;t[5]!==d?(b=d&&d!==!0?{backgroundColor:d}:{},t[5]=d,t[6]=b):b=t[6];const z=d?P||"1rem":P||0;let F;t[7]!==j||t[8]!==b||t[9]!==z?(F={...j,...b,padding:z},t[7]=j,t[8]=b,t[9]=z,t[10]=F):F=t[10];const B=it||`${m?`The graph shows ${m}. `:""}This is a statistic card.${p?` ${p}`:""}`,D=`flex flex-col w-full grow ${k!=="secondary"?"gap-12 justify-between":"gap-4 justify-center"}`;let N;t[11]!==l||t[12]!==_||t[13]!==i?.description||t[14]!==i?.footnote||t[15]!==i?.source||t[16]!==i?.title||t[17]!==x||t[18]!==r||t[19]!==y||t[20]!==p||t[21]!==m||t[22]!==S||t[23]!==c||t[24]!==k||t[25]!==u||t[26]!==a||t[27]!==h||t[28]!==n?.description||t[29]!==n?.footnote||t[30]!==n?.source||t[31]!==n?.title||t[32]!==s||t[33]!==$||t[34]!==w||t[35]!==f?(N=k!=="secondary"?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[m||p?o.jsxRuntimeExports.jsx(ot.GraphHeader,{styles:{title:n?.title,description:n?.description},classNames:{title:i?.title,description:i?.description},graphTitle:m,graphDescription:p}):null,o.jsxRuntimeExports.jsx("div",{className:`flex flex-col justify-between grow ${w==="top"?"justify-start":w==="bottom"?"justify-end":"justify-center"}`,children:o.jsxRuntimeExports.jsxs(nt.R,{marginBottom:"base",className:`leading-none text-outline font-heading ${_?"text-center":c==="he"||c==="ar"?"text-right":"text-left"} ${$?"text-primary-black dark:text-primary-white":"transparent"}`,style:{fontSize:S,letterSpacing:"0.05rem"},children:[r.filter(jt).length>0||l==="count"?x&&x?.length!==0?r.filter(O=>x.indexOf(O.value)!==-1).length:r.length:l==="sum"?g.numberFormattingFunction(C.sum(r.map(vt)),"NA",u,a,s):l==="average"?g.numberFormattingFunction(parseFloat((C.sum(r.map(yt))/r.length).toFixed(2)),"NA",u,a,s):l==="max"?g.numberFormattingFunction(Math.max(...r.map(ht).filter(ft)),"NA",u,a,s):g.numberFormattingFunction(Math.min(...r.map(gt).filter(dt)),"NA",u,a,s)," ",f?o.jsxRuntimeExports.jsxs("span",{className:"text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400",style:{marginLeft:"-8px",lineHeight:"1.09",textShadow:"none",WebkitTextStrokeWidth:0},children:["(",f,")"]}):null]})}),h||y?o.jsxRuntimeExports.jsx(rt.GraphFooter,{styles:{footnote:n?.footnote,source:n?.source},classNames:{footnote:i?.footnote,source:i?.source},sources:h,footNote:y}):null]}):o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs(nt.R,{marginBottom:k==="secondary"?"none":"base",className:`leading-none text-outline font-heading ${_?"text-center":c==="he"||c==="ar"?"text-right":"text-left"} ${$?"text-primary-black dark:text-primary-white":"transparent"}`,style:{fontSize:S,letterSpacing:"0.05rem"},children:[r.filter(xt).length>0||l==="count"?x&&x?.length!==0?r.filter(O=>x.indexOf(O.value)!==-1).length:r.length:l==="sum"?g.numberFormattingFunction(C.sum(r.map(pt)),"NA",u,a,s):l==="average"?g.numberFormattingFunction(parseFloat((C.sum(r.map(mt))/r.length).toFixed(2)),"NA",u,a,s):l==="max"?g.numberFormattingFunction(Math.max(...r.map(ct).filter(ut)),"NA",u,a,s):g.numberFormattingFunction(Math.min(...r.map(lt).filter(at)),"NA",u,a,s)," ",f?o.jsxRuntimeExports.jsxs("span",{className:"text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400",style:{marginLeft:"-8px",lineHeight:"1.09",textShadow:"none",WebkitTextStrokeWidth:0},children:["(",f,")"]}):null]}),m||p?o.jsxRuntimeExports.jsx(ot.GraphHeader,{styles:{title:n?.title,description:n?.description},classNames:{title:i?.title,description:i?.description},graphTitle:m,graphDescription:p}):null,h||y?o.jsxRuntimeExports.jsx(rt.GraphFooter,{styles:{footnote:n?.footnote,source:n?.source},classNames:{footnote:i?.footnote,source:i?.source},sources:h,footNote:y}):null]}),t[11]=l,t[12]=_,t[13]=i?.description,t[14]=i?.footnote,t[15]=i?.source,t[16]=i?.title,t[17]=x,t[18]=r,t[19]=y,t[20]=p,t[21]=m,t[22]=S,t[23]=c,t[24]=k,t[25]=u,t[26]=a,t[27]=h,t[28]=n?.description,t[29]=n?.footnote,t[30]=n?.source,t[31]=n?.title,t[32]=s,t[33]=$,t[34]=w,t[35]=f,t[36]=N):N=t[36];let R;t[37]!==D||t[38]!==N?(R=o.jsxRuntimeExports.jsx("div",{className:D,children:N}),t[37]=D,t[38]=N,t[39]=R):R=t[39];let E;t[40]!==G||t[41]!==T||t[42]!==v||t[43]!==F||t[44]!==B||t[45]!==R?(E=o.jsxRuntimeExports.jsx("div",{id:G,dir:T,className:v,style:F,"aria-label":B,children:R}),t[40]=G,t[41]=T,t[42]=v,t[43]=F,t[44]=B,t[45]=R,t[46]=E):E=t[46];let A;return t[47]!==M||t[48]!==E?(A=o.jsxRuntimeExports.jsx("div",{className:M,children:E}),t[47]=M,t[48]=E,t[49]=A):A=t[49],A}function at(e){return e!==void 0}function lt(e){return e.value}function ut(e){return e!==void 0}function ct(e){return e.value}function mt(e){return e.value}function pt(e){return e.value}function xt(e){return typeof e.value=="string"}function dt(e){return e!==void 0}function gt(e){return e.value}function ft(e){return e!==void 0}function ht(e){return e.value}function yt(e){return e.value}function vt(e){return e.value}function jt(e){return typeof e.value=="string"}exports.StatCardFromData=st;
2
2
  //# sourceMappingURL=StatCardFromData.cjs.map
@@ -1,6 +1,6 @@
1
1
  import { c as at, m as st, j as i } from "./index-CHPV5EwG-BCLAYDCV.js";
2
2
  import { s as T } from "./index-CeVNqhMO.js";
3
- import { R as nt } from "./Typography-HicNIA61.js";
3
+ import { R as nt } from "./Typography-DMVW6JnV.js";
4
4
  import { GraphFooter as rt } from "./GraphFooter.js";
5
5
  import { GraphHeader as ot } from "./GraphHeader.js";
6
6
  import { n as g } from "./numberFormattingFunction-14YCbkN2.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-CHPV5EwG-6v2a2njQ.cjs"),X=require("react"),Kt=require("./index-DQA8q5sC.cjs"),Qt=require("./index-Cno4Q0YE.cjs"),Zt=require("./Tooltip-BLa2EfMs.cjs"),mt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ht=require("./numberFormattingFunction-02t-wJta.cjs"),u=require("./Colors.cjs"),_t=require("./DetailsModal-DIRTulvr.cjs"),te=require("./linear-CgUCbw9F.cjs"),wt=require("./proxy-C4-uo6nS.cjs"),ee=require("./use-in-view-C3o_ntMv.cjs"),oe=require("./index-CoobIWNj.cjs"),zt=require("./uniqBy-O05lp2S5.cjs"),Jt=require("./GraphContainer-B1EDxJ0S.cjs"),ne=require("./EmptyState-N1eHt3vq.cjs"),re=require("./ColorLegendWithMouseOver.cjs"),le=require("./GraphFooter.cjs"),se=require("./GraphHeader.cjs");function ie(e,t){if(e<2)return[];const i=t/(e-1);return Array.from({length:e},(D,v)=>v*i)}function ae(e){const t=l.compilerRuntimeExports.c(98),{data:i,width:D,height:v,colors:n,colorDomain:s,radius:d,leftMargin:E,rightMargin:gt,topMargin:rt,bottomMargin:Mt,tooltip:lt,onSeriesMouseOver:_,highlightedDataPoints:r,selectedColor:tt,minValue:N,maxValue:S,onSeriesMouseClick:Y,noOfTicks:st,prefix:et,suffix:at,stripType:O,highlightColor:h,dotOpacity:dt,resetSelectionOnDoubleClick:B,detailsOnClick:b,styles:f,classNames:C,valueColor:x,animate:g,dimmedOpacity:J,precision:ct,customLayers:w}=e,yt=E===void 0?20:E,xt=gt===void 0?20:gt,vt=rt===void 0?10:rt,Ot=Mt===void 0?10:Mt,Vt=X.useRef(null);let ut;t[0]!==g.amount||t[1]!==g.once?(ut={once:g.once,amount:g.amount},t[0]=g.amount,t[1]=g.once,t[2]=ut):ut=t[2];const $=ee.useInView(Vt,ut),[ot,bt]=X.useState(void 0),[M,jt]=X.useState(void 0),[p,a]=X.useState(void 0),[ft,Ct]=X.useState(void 0);let pt;t[3]!==Ot||t[4]!==yt||t[5]!==xt||t[6]!==vt?(pt={top:vt,bottom:Ot,left:yt,right:xt},t[3]=Ot,t[4]=yt,t[5]=xt,t[6]=vt,t[7]=pt):pt=t[7];const m=pt,K=D-m.left-m.right,Q=v-m.top-m.bottom;let A,V,q,T,R,k,F,P,L,U,j;if(t[8]!==g.duration||t[9]!==C?.graphObjectValues||t[10]!==C?.yAxis?.labels||t[11]!==s||t[12]!==n||t[13]!==w||t[14]!==i||t[15]!==b||t[16]!==J||t[17]!==dt||t[18]!==Q||t[19]!==K||t[20]!==v||t[21]!==h||t[22]!==r||t[23]!==$||t[24]!==m.left||t[25]!==m.top||t[26]!==S||t[27]!==N||t[28]!==M||t[29]!==st||t[30]!==Y||t[31]!==_||t[32]!==ct||t[33]!==et||t[34]!==d||t[35]!==B||t[36]!==tt||t[37]!==O||t[38]!==f?.graphObjectValues||t[39]!==f?.yAxis?.labels||t[40]!==at||t[41]!==x||t[42]!==D){const Dt=i.map(Se);let Z;t[54]!==r?(Z=o=>{const c=(r||[]).indexOf(o.label);return c===-1?1/0:c},t[54]=r,t[55]=Z):Z=t[55];const Nt=Qt.orderBy(Dt,[Z],["desc"]);let nt;t[56]!==i||t[57]!==S?(nt=mt.checkIfNullOrUndefined(S)?Math.max(...i.filter(Ne).map(De))<0?0:Math.max(...i.filter(Ie).map(ke)):S,t[56]=i,t[57]=S,t[58]=nt):nt=t[58];const Rt=nt;let ht;t[59]!==i||t[60]!==N?(ht=mt.checkIfNullOrUndefined(N)?Math.min(...i.filter(Re).map(Ve))>=0?0:Math.min(...i.filter(Ee).map(Me)):N,t[59]=i,t[60]=N,t[61]=ht):ht=t[61];const kt=ht,Et=te.linear().domain([kt,Rt]).range([Q,0]).nice(),It=ie(st,Q);V=wt.motion.svg,q=`${D}px`,T=`${v}px`,R=`0 0 ${D} ${v}`,k="ltr",F=Vt,U=`translate(${m.left},${m.top})`,t[62]!==w?(j=w.filter(we).map(Ce),t[62]=w,t[63]=j):j=t[63],A=oe.AnimatePresence,P=Nt.map(o=>l.jsxRuntimeExports.jsxs(wt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:0,x:K/2,y:Et(0)},whileInView:{x:K/2,y:Et(o.position),opacity:tt?o.color&&n[s.indexOf(o.color)]===tt?.95:J:r.length!==0?r.indexOf(o.label)!==-1?.95:J:dt,transition:{duration:g.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},onMouseEnter:c=>{bt(o),Ct(c.clientY),a(c.clientX),_?.(o)},onClick:()=>{(Y||b)&&(Kt.isEqual(M,o)&&B?(jt(void 0),Y?.(void 0)):(jt(o),Y?.(o)))},onMouseMove:c=>{bt(o),Ct(c.clientY),a(c.clientX)},onMouseLeave:()=>{bt(void 0),a(void 0),Ct(void 0),_?.(void 0)},children:[O==="dot"?l.jsxRuntimeExports.jsx(wt.motion.circle,{cy:0,cx:0,variants:{initial:{fill:h&&r?r.indexOf(o.label)!==-1?h:i.filter(je).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(be).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray},whileInView:{fill:h&&r?r.indexOf(o.label)!==-1?h:i.filter(Oe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(ve).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray,transition:{duration:g.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},r:d}):l.jsxRuntimeExports.jsx(wt.motion.rect,{y:-1,height:2,variants:{initial:{x:0-d,width:d*2,fill:h&&r?r.indexOf(o.label)!==-1?h:i.filter(ye).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(ge).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray},whileInView:{x:0-d,width:d*2,fill:h&&r?r.indexOf(o.label)!==-1?h:i.filter(he).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(xe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray,transition:{duration:g.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}}}),r.length!==0&&r.indexOf(o.label)!==-1?l.jsxRuntimeExports.jsx(wt.motion.text,{y:0,dy:"0.33em",variants:{initial:{opacity:0,x:0+d+3,fill:x||(h&&r?r.indexOf(o.label)!==-1?h:i.filter(de).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(me).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray)},whileInView:{opacity:1,x:0+d+3,fill:x||(h&&r?r.indexOf(o.label)!==-1?h:i.filter(pe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(fe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray),transition:{duration:g.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},style:{textAnchor:"start",...f?.graphObjectValues||{}},className:l.mo("graph-value text-sm font-bold",C?.graphObjectValues),children:Ht.numberFormattingFunction(o.position,"NA",ct,et,at)}):null]},o.label)),L=It.map((o,c)=>l.jsxRuntimeExports.jsx("text",{y:o,x:K/2+d+5,style:{textAnchor:"start",...f?.yAxis?.labels||{}},className:l.mo("fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",C?.yAxis?.labels),children:Ht.numberFormattingFunction(Et.invert(o),"NA",ct,et,at)},c)),t[8]=g.duration,t[9]=C?.graphObjectValues,t[10]=C?.yAxis?.labels,t[11]=s,t[12]=n,t[13]=w,t[14]=i,t[15]=b,t[16]=J,t[17]=dt,t[18]=Q,t[19]=K,t[20]=v,t[21]=h,t[22]=r,t[23]=$,t[24]=m.left,t[25]=m.top,t[26]=S,t[27]=N,t[28]=M,t[29]=st,t[30]=Y,t[31]=_,t[32]=ct,t[33]=et,t[34]=d,t[35]=B,t[36]=tt,t[37]=O,t[38]=f?.graphObjectValues,t[39]=f?.yAxis?.labels,t[40]=at,t[41]=x,t[42]=D,t[43]=A,t[44]=V,t[45]=q,t[46]=T,t[47]=R,t[48]=k,t[49]=F,t[50]=P,t[51]=L,t[52]=U,t[53]=j}else A=t[43],V=t[44],q=t[45],T=t[46],R=t[47],k=t[48],F=t[49],P=t[50],L=t[51],U=t[52],j=t[53];let H;t[64]!==A||t[65]!==P||t[66]!==L?(H=l.jsxRuntimeExports.jsxs(A,{children:[P,L]}),t[64]=A,t[65]=P,t[66]=L,t[67]=H):H=t[67];let G;t[68]!==w?(G=w.filter(ue).map(ce),t[68]=w,t[69]=G):G=t[69];let y;t[70]!==H||t[71]!==G||t[72]!==U||t[73]!==j?(y=l.jsxRuntimeExports.jsxs("g",{transform:U,children:[j,H,G]}),t[70]=H,t[71]=G,t[72]=U,t[73]=j,t[74]=y):y=t[74];let W;t[75]!==V||t[76]!==q||t[77]!==T||t[78]!==R||t[79]!==k||t[80]!==F||t[81]!==y?(W=l.jsxRuntimeExports.jsx(V,{width:q,height:T,viewBox:R,direction:k,ref:F,children:y}),t[75]=V,t[76]=q,t[77]=T,t[78]=R,t[79]=k,t[80]=F,t[81]=y,t[82]=W):W=t[82];let z;t[83]!==C?.tooltip||t[84]!==p||t[85]!==ft||t[86]!==ot||t[87]!==f?.tooltip||t[88]!==lt?(z=ot&&lt&&p&&ft?l.jsxRuntimeExports.jsx(Zt.Tooltip,{data:ot,body:lt,xPos:p,yPos:ft,backgroundStyle:f?.tooltip,className:C?.tooltip}):null,t[83]=C?.tooltip,t[84]=p,t[85]=ft,t[86]=ot,t[87]=f?.tooltip,t[88]=lt,t[89]=z):z=t[89];let I;t[90]!==C?.modal||t[91]!==b||t[92]!==M?(I=b&&M!==void 0?l.jsxRuntimeExports.jsx(_t.DetailsModal,{body:b,data:M,setData:jt,className:C?.modal}):null,t[90]=C?.modal,t[91]=b,t[92]=M,t[93]=I):I=t[93];let it;return t[94]!==W||t[95]!==z||t[96]!==I?(it=l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[W,z,I]}),t[94]=W,t[95]=z,t[96]=I,t[97]=it):it=t[97],it}function ce(e){return e.layer}function ue(e){return e.position==="after"}function fe(e){return e.color}function pe(e){return e.color}function me(e){return e.color}function de(e){return e.color}function xe(e){return e.color}function he(e){return e.color}function ge(e){return e.color}function ye(e){return e.color}function ve(e){return e.color}function Oe(e){return e.color}function be(e){return e.color}function je(e){return e.color}function Ce(e){return e.layer}function we(e){return e.position==="before"}function Me(e){return e.position}function Ee(e){return!mt.checkIfNullOrUndefined(e.position)}function Ve(e){return e.position}function Re(e){return!mt.checkIfNullOrUndefined(e.position)}function ke(e){return e.position}function Ie(e){return!mt.checkIfNullOrUndefined(e.position)}function De(e){return e.position}function Ne(e){return!mt.checkIfNullOrUndefined(e.position)}function Se(e,t){return{...e,id:`${t}`}}function $e(e){const t=l.compilerRuntimeExports.c(98),{data:i,width:D,height:v,colors:n,colorDomain:s,radius:d,leftMargin:E,rightMargin:gt,topMargin:rt,bottomMargin:Mt,tooltip:lt,onSeriesMouseOver:_,highlightedDataPoints:r,selectedColor:tt,minValue:N,maxValue:S,onSeriesMouseClick:Y,prefix:st,suffix:et,stripType:at,highlightColor:O,dotOpacity:h,resetSelectionOnDoubleClick:dt,detailsOnClick:B,styles:b,classNames:f,valueColor:C,animate:x,noOfTicks:g,dimmedOpacity:J,precision:ct,customLayers:w}=e,yt=E===void 0?5:E,xt=gt===void 0?5:gt,vt=rt===void 0?10:rt,Ot=Mt===void 0?10:Mt,Vt=X.useRef(null);let ut;t[0]!==x.amount||t[1]!==x.once?(ut={once:x.once,amount:x.amount},t[0]=x.amount,t[1]=x.once,t[2]=ut):ut=t[2];const $=ee.useInView(Vt,ut),[ot,bt]=X.useState(void 0),[M,jt]=X.useState(void 0),[p,a]=X.useState(void 0),[ft,Ct]=X.useState(void 0);let pt;t[3]!==Ot||t[4]!==yt||t[5]!==xt||t[6]!==vt?(pt={top:vt,bottom:Ot,left:yt,right:xt},t[3]=Ot,t[4]=yt,t[5]=xt,t[6]=vt,t[7]=pt):pt=t[7];const m=pt,K=D-m.left-m.right,Q=v-m.top-m.bottom;let A,V,q,T,R,k,F,P,L,U,j;if(t[8]!==x.duration||t[9]!==f?.graphObjectValues||t[10]!==f?.xAxis?.labels||t[11]!==s||t[12]!==n||t[13]!==w||t[14]!==i||t[15]!==B||t[16]!==J||t[17]!==h||t[18]!==Q||t[19]!==K||t[20]!==v||t[21]!==O||t[22]!==r||t[23]!==$||t[24]!==m.left||t[25]!==m.top||t[26]!==S||t[27]!==N||t[28]!==M||t[29]!==g||t[30]!==Y||t[31]!==_||t[32]!==ct||t[33]!==st||t[34]!==d||t[35]!==dt||t[36]!==tt||t[37]!==at||t[38]!==b?.graphObjectValues||t[39]!==b?.xAxis?.labels||t[40]!==et||t[41]!==C||t[42]!==D){const Dt=i.map(ro);let Z;t[54]!==r?(Z=o=>{const c=(r||[]).indexOf(o.label);return c===-1?1/0:c},t[54]=r,t[55]=Z):Z=t[55];const Nt=Qt.orderBy(Dt,[Z],["desc"]);let nt;t[56]!==i||t[57]!==S?(nt=mt.checkIfNullOrUndefined(S)?Math.max(...i.filter(no).map(io))<0?0:Math.max(...i.filter(oo).map(eo)):S,t[56]=i,t[57]=S,t[58]=nt):nt=t[58];const Rt=nt;let ht;t[59]!==i||t[60]!==N?(ht=mt.checkIfNullOrUndefined(N)?Math.min(...i.filter(to).map(_e))>=0?0:Math.min(...i.filter(Ze).map(Qe)):N,t[59]=i,t[60]=N,t[61]=ht):ht=t[61];const kt=ht,Et=te.linear().domain([kt,Rt]).range([0,K]).nice(),It=ie(g,K);V=wt.motion.svg,q=`${D}px`,T=`${v}px`,R=`0 0 ${D} ${v}`,k="ltr",F=Vt,U=`translate(${m.left},${m.top})`,t[62]!==w?(j=w.filter(Ke).map(Je),t[62]=w,t[63]=j):j=t[63],A=oe.AnimatePresence,P=Nt.map(o=>l.jsxRuntimeExports.jsxs(wt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:0,x:Et(0),y:Q/2},whileInView:{x:Et(o.position),y:Q/2,opacity:tt?o.color&&n[s.indexOf(o.color)]===tt?.95:J:r.length!==0?r.indexOf(o.label)!==-1?.95:J:h,transition:{duration:x.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:x.duration}},onMouseEnter:c=>{bt(o),Ct(c.clientY),a(c.clientX),_?.(o)},onClick:()=>{(Y||B)&&(Kt.isEqual(M,o)&&dt?(jt(void 0),Y?.(void 0)):(jt(o),Y?.(o)))},onMouseMove:c=>{bt(o),Ct(c.clientY),a(c.clientX)},onMouseLeave:()=>{bt(void 0),a(void 0),Ct(void 0),_?.(void 0)},children:[at==="dot"?l.jsxRuntimeExports.jsx(wt.motion.circle,{cy:0,cx:0,variants:{initial:{fill:O&&r?r.indexOf(o.label)!==-1?O:i.filter(ze).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(Be).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray},whileInView:{fill:O&&r?r.indexOf(o.label)!==-1?O:i.filter(Ye).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(Xe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray,transition:{duration:x.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:x.duration}},r:d}):l.jsxRuntimeExports.jsx(wt.motion.rect,{x:-1,width:2,variants:{initial:{y:0-d,height:d*2,fill:O&&r?r.indexOf(o.label)!==-1?O:i.filter(We).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(Ge).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray},whileInView:{y:0-d,height:d*2,fill:O&&r?r.indexOf(o.label)!==-1?O:i.filter(He).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(Ue).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray,transition:{duration:x.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:x.duration}}}),r.length!==0&&r.indexOf(o.label)!==-1?l.jsxRuntimeExports.jsx(wt.motion.text,{x:0,variants:{initial:{opacity:0,y:0-d-5,fill:C||(O&&r?r.indexOf(o.label)!==-1?O:i.filter(Le).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(Pe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray)},whileInView:{opacity:1,y:0-d-5,fill:C||(O&&r?r.indexOf(o.label)!==-1?O:i.filter(Fe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(Te).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray),transition:{duration:x.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:x.duration}},style:{textAnchor:"middle",...b?.graphObjectValues||{}},className:l.mo("graph-value text-sm font-bold",f?.graphObjectValues),children:Ht.numberFormattingFunction(o.position,"NA",ct,st,et)}):null]},o.label)),L=It.map((o,c)=>l.jsxRuntimeExports.jsx("text",{x:o,y:Q/2+d,style:{textAnchor:c===0?"start":c===It.length-1?"end":"middle",...b?.xAxis?.labels||{}},className:l.mo("fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",f?.xAxis?.labels),dy:"1em",children:Ht.numberFormattingFunction(Et.invert(o),"NA",ct,st,et)},c)),t[8]=x.duration,t[9]=f?.graphObjectValues,t[10]=f?.xAxis?.labels,t[11]=s,t[12]=n,t[13]=w,t[14]=i,t[15]=B,t[16]=J,t[17]=h,t[18]=Q,t[19]=K,t[20]=v,t[21]=O,t[22]=r,t[23]=$,t[24]=m.left,t[25]=m.top,t[26]=S,t[27]=N,t[28]=M,t[29]=g,t[30]=Y,t[31]=_,t[32]=ct,t[33]=st,t[34]=d,t[35]=dt,t[36]=tt,t[37]=at,t[38]=b?.graphObjectValues,t[39]=b?.xAxis?.labels,t[40]=et,t[41]=C,t[42]=D,t[43]=A,t[44]=V,t[45]=q,t[46]=T,t[47]=R,t[48]=k,t[49]=F,t[50]=P,t[51]=L,t[52]=U,t[53]=j}else A=t[43],V=t[44],q=t[45],T=t[46],R=t[47],k=t[48],F=t[49],P=t[50],L=t[51],U=t[52],j=t[53];let H;t[64]!==A||t[65]!==P||t[66]!==L?(H=l.jsxRuntimeExports.jsxs(A,{children:[P,L]}),t[64]=A,t[65]=P,t[66]=L,t[67]=H):H=t[67];let G;t[68]!==w?(G=w.filter(qe).map(Ae),t[68]=w,t[69]=G):G=t[69];let y;t[70]!==H||t[71]!==G||t[72]!==U||t[73]!==j?(y=l.jsxRuntimeExports.jsxs("g",{transform:U,children:[j,H,G]}),t[70]=H,t[71]=G,t[72]=U,t[73]=j,t[74]=y):y=t[74];let W;t[75]!==V||t[76]!==q||t[77]!==T||t[78]!==R||t[79]!==k||t[80]!==F||t[81]!==y?(W=l.jsxRuntimeExports.jsx(V,{width:q,height:T,viewBox:R,direction:k,ref:F,children:y}),t[75]=V,t[76]=q,t[77]=T,t[78]=R,t[79]=k,t[80]=F,t[81]=y,t[82]=W):W=t[82];let z;t[83]!==f?.tooltip||t[84]!==p||t[85]!==ft||t[86]!==ot||t[87]!==b?.tooltip||t[88]!==lt?(z=ot&&lt&&p&&ft?l.jsxRuntimeExports.jsx(Zt.Tooltip,{data:ot,body:lt,xPos:p,yPos:ft,backgroundStyle:b?.tooltip,className:f?.tooltip}):null,t[83]=f?.tooltip,t[84]=p,t[85]=ft,t[86]=ot,t[87]=b?.tooltip,t[88]=lt,t[89]=z):z=t[89];let I;t[90]!==f?.modal||t[91]!==B||t[92]!==M?(I=B&&M!==void 0?l.jsxRuntimeExports.jsx(_t.DetailsModal,{body:B,data:M,setData:jt,className:f?.modal}):null,t[90]=f?.modal,t[91]=B,t[92]=M,t[93]=I):I=t[93];let it;return t[94]!==W||t[95]!==z||t[96]!==I?(it=l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[W,z,I]}),t[94]=W,t[95]=z,t[96]=I,t[97]=it):it=t[97],it}function Ae(e){return e.layer}function qe(e){return e.position==="after"}function Te(e){return e.color}function Fe(e){return e.color}function Pe(e){return e.color}function Le(e){return e.color}function Ue(e){return e.color}function He(e){return e.color}function Ge(e){return e.color}function We(e){return e.color}function Xe(e){return e.color}function Ye(e){return e.color}function Be(e){return e.color}function ze(e){return e.color}function Je(e){return e.layer}function Ke(e){return e.position==="before"}function Qe(e){return e.position}function Ze(e){return!mt.checkIfNullOrUndefined(e.position)}function _e(e){return e.position}function to(e){return!mt.checkIfNullOrUndefined(e.position)}function eo(e){return e.position}function oo(e){return!mt.checkIfNullOrUndefined(e.position)}function io(e){return e.position}function no(e){return!mt.checkIfNullOrUndefined(e.position)}function ro(e,t){return{...e,id:`${t}`}}function lo(e){const t=l.compilerRuntimeExports.c(92),{data:i,graphTitle:D,colors:v,sources:n,graphDescription:s,height:d,width:E,footNote:gt,colorDomain:rt,colorLegendTitle:Mt,radius:lt,padding:_,backgroundColor:r,leftMargin:tt,rightMargin:N,topMargin:S,bottomMargin:Y,tooltip:st,relativeHeight:et,onSeriesMouseOver:at,showColorScale:O,highlightedDataPoints:h,graphID:dt,minValue:B,maxValue:b,onSeriesMouseClick:f,noOfTicks:C,graphDownload:x,dataDownload:g,prefix:J,suffix:ct,stripType:w,language:yt,highlightColor:xt,dotOpacity:vt,showNAColor:Ot,minHeight:Vt,theme:ut,ariaLabel:$,valueColor:ot,resetSelectionOnDoubleClick:bt,detailsOnClick:M,orientation:jt,styles:p,classNames:a,animate:ft,dimmedOpacity:Ct,precision:pt,customLayers:m}=e,K=lt===void 0?5:lt,Q=r===void 0?!1:r,A=O===void 0?!0:O;let V;t[0]!==h?(V=h===void 0?[]:h,t[0]=h,t[1]=V):V=t[1];const q=V,T=C===void 0?2:C,R=x===void 0?!1:x,k=g===void 0?!1:g,F=J===void 0?"":J,P=ct===void 0?"":ct,L=w===void 0?"dot":w,U=yt===void 0?"en":yt,j=vt===void 0?.3:vt,H=Ot===void 0?!0:Ot,G=Vt===void 0?0:Vt,y=ut===void 0?"light":ut,W=bt===void 0?!0:bt,z=jt===void 0?"vertical":jt,I=ft===void 0?!1:ft,it=Ct===void 0?.3:Ct,Dt=pt===void 0?2:pt;let Z;t[2]!==m?(Z=m===void 0?[]:m,t[2]=m,t[3]=Z):Z=t[3];const Nt=Z,nt=z==="horizontal"?$e:ae,[Rt,ht]=X.useState(0),[kt,Et]=X.useState(0),[It,o]=X.useState(void 0),c=X.useRef(null),Xt=X.useRef(null);let Pt,Lt;t[4]===Symbol.for("react.memo_cache_sentinel")?(Pt=()=>{const Yt=new ResizeObserver(Bt=>{ht(Bt[0].target.clientWidth||620),Et(Bt[0].target.clientHeight||480)});return c.current&&Yt.observe(c.current),()=>Yt.disconnect()},Lt=[],t[4]=Pt,t[5]=Lt):(Pt=t[4],Lt=t[5]),X.useEffect(Pt,Lt);const Gt=a?.graphContainer,Wt=p?.graphContainer;let St;t[6]!==a?.description||t[7]!==a?.title||t[8]!==i||t[9]!==k||t[10]!==s||t[11]!==R||t[12]!==D||t[13]!==p?.description||t[14]!==p?.title||t[15]!==E?(St=D||s||R||k?l.jsxRuntimeExports.jsx(se.GraphHeader,{styles:{title:p?.title,description:p?.description},classNames:{title:a?.title,description:a?.description},graphTitle:D,graphDescription:s,width:E,graphDownload:R?Xt:void 0,dataDownload:k?i.map(xo).filter(mo).length>0?i.map(po).filter(fo):i.filter(uo):null}):null,t[6]=a?.description,t[7]=a?.title,t[8]=i,t[9]=k,t[10]=s,t[11]=R,t[12]=D,t[13]=p?.description,t[14]=p?.title,t[15]=E,t[16]=St):St=t[16];let $t;t[17]!==a?.colorLegend||t[18]!==rt||t[19]!==Mt||t[20]!==v||t[21]!==i||t[22]!==A||t[23]!==H||t[24]!==y||t[25]!==E?($t=A!==!1&&i.filter(co).length!==0&&i.length>0?l.jsxRuntimeExports.jsx(re.ColorLegendWithMouseOver,{width:E,colorLegendTitle:Mt,colors:v||u.Colors[y].categoricalColors.colors,colorDomain:rt||zt.uniqBy(i,"color",!0),setSelectedColor:o,showNAColor:H,className:a?.colorLegend}):null,t[17]=a?.colorLegend,t[18]=rt,t[19]=Mt,t[20]=v,t[21]=i,t[22]=A,t[23]=H,t[24]=y,t[25]=E,t[26]=$t):$t=t[26];let At;t[27]!==i.length?(At=i.length===0&&l.jsxRuntimeExports.jsx(ne.EmptyState,{}),t[27]=i.length,t[28]=At):At=t[28];let qt;t[29]!==nt||t[30]!==I||t[31]!==Y||t[32]!==a||t[33]!==rt||t[34]!==v||t[35]!==Nt||t[36]!==i||t[37]!==M||t[38]!==it||t[39]!==j||t[40]!==xt||t[41]!==q||t[42]!==tt||t[43]!==b||t[44]!==B||t[45]!==T||t[46]!==f||t[47]!==at||t[48]!==Dt||t[49]!==F||t[50]!==K||t[51]!==W||t[52]!==N||t[53]!==It||t[54]!==L||t[55]!==p||t[56]!==P||t[57]!==kt||t[58]!==Rt||t[59]!==y||t[60]!==st||t[61]!==S||t[62]!==ot?(qt=Rt&&kt&&i.length>0?l.jsxRuntimeExports.jsx(nt,{data:i,width:Rt,height:kt,colorDomain:i.filter(ao).length===0?[]:rt||zt.uniqBy(i,"color",!0),colors:i.filter(so).length===0?v?[v]:[u.Colors.primaryColors["blue-600"]]:v||u.Colors[y].categoricalColors.colors,selectedColor:It,radius:K,leftMargin:tt,rightMargin:N,topMargin:S,bottomMargin:Y,tooltip:st,onSeriesMouseOver:at,highlightedDataPoints:q,minValue:B,maxValue:b,onSeriesMouseClick:f,prefix:F,suffix:P,stripType:L,highlightColor:xt,dotOpacity:j,resetSelectionOnDoubleClick:W,detailsOnClick:M,styles:p,classNames:a,valueColor:ot,animate:I===!0?{duration:.5,once:!0,amount:.5}:I||{duration:0,once:!0,amount:0},noOfTicks:T,dimmedOpacity:it,precision:Dt,customLayers:Nt}):null,t[29]=nt,t[30]=I,t[31]=Y,t[32]=a,t[33]=rt,t[34]=v,t[35]=Nt,t[36]=i,t[37]=M,t[38]=it,t[39]=j,t[40]=xt,t[41]=q,t[42]=tt,t[43]=b,t[44]=B,t[45]=T,t[46]=f,t[47]=at,t[48]=Dt,t[49]=F,t[50]=K,t[51]=W,t[52]=N,t[53]=It,t[54]=L,t[55]=p,t[56]=P,t[57]=kt,t[58]=Rt,t[59]=y,t[60]=st,t[61]=S,t[62]=ot,t[63]=qt):qt=t[63];let Tt;t[64]!==At||t[65]!==qt?(Tt=l.jsxRuntimeExports.jsxs(Jt.GraphArea,{ref:c,children:[At,qt]}),t[64]=At,t[65]=qt,t[66]=Tt):Tt=t[66];let Ft;t[67]!==a?.footnote||t[68]!==a?.source||t[69]!==gt||t[70]!==n||t[71]!==p?.footnote||t[72]!==p?.source||t[73]!==E?(Ft=n||gt?l.jsxRuntimeExports.jsx(le.GraphFooter,{styles:{footnote:p?.footnote,source:p?.source},classNames:{footnote:a?.footnote,source:a?.source},sources:n,footNote:gt,width:E}):null,t[67]=a?.footnote,t[68]=a?.source,t[69]=gt,t[70]=n,t[71]=p?.footnote,t[72]=p?.source,t[73]=E,t[74]=Ft):Ft=t[74];let Ut;return t[75]!==$||t[76]!==Q||t[77]!==dt||t[78]!==d||t[79]!==U||t[80]!==G||t[81]!==_||t[82]!==et||t[83]!==Gt||t[84]!==Wt||t[85]!==St||t[86]!==$t||t[87]!==Tt||t[88]!==Ft||t[89]!==y||t[90]!==E?(Ut=l.jsxRuntimeExports.jsxs(Jt.GraphContainer,{className:Gt,style:Wt,id:dt,ref:Xt,"aria-label":$,backgroundColor:Q,theme:y,language:U,minHeight:G,width:E,height:d,relativeHeight:et,padding:_,children:[St,$t,Tt,Ft]}),t[75]=$,t[76]=Q,t[77]=dt,t[78]=d,t[79]=U,t[80]=G,t[81]=_,t[82]=et,t[83]=Gt,t[84]=Wt,t[85]=St,t[86]=$t,t[87]=Tt,t[88]=Ft,t[89]=y,t[90]=E,t[91]=Ut):Ut=t[91],Ut}function so(e){return e.color}function ao(e){return e.color}function co(e){return e.color}function uo(e){return e!==void 0}function fo(e){return e!==void 0}function po(e){return e.data}function mo(e){return e!==void 0}function xo(e){return e.data}exports.StripChart=lo;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-CHPV5EwG-6v2a2njQ.cjs"),X=require("react"),Kt=require("./index-DQA8q5sC.cjs"),Qt=require("./index-Cno4Q0YE.cjs"),Zt=require("./Tooltip-BLa2EfMs.cjs"),mt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ht=require("./numberFormattingFunction-02t-wJta.cjs"),u=require("./Colors.cjs"),_t=require("./DetailsModal-DIRTulvr.cjs"),te=require("./linear-CgUCbw9F.cjs"),wt=require("./proxy-C4-uo6nS.cjs"),ee=require("./use-in-view-C3o_ntMv.cjs"),oe=require("./index-CoobIWNj.cjs"),zt=require("./uniqBy-O05lp2S5.cjs"),Jt=require("./GraphContainer-B1EDxJ0S.cjs"),ne=require("./EmptyState-B4c-CrXs.cjs"),re=require("./ColorLegendWithMouseOver.cjs"),le=require("./GraphFooter.cjs"),se=require("./GraphHeader.cjs");function ie(e,t){if(e<2)return[];const i=t/(e-1);return Array.from({length:e},(D,v)=>v*i)}function ae(e){const t=l.compilerRuntimeExports.c(98),{data:i,width:D,height:v,colors:n,colorDomain:s,radius:d,leftMargin:E,rightMargin:gt,topMargin:rt,bottomMargin:Mt,tooltip:lt,onSeriesMouseOver:_,highlightedDataPoints:r,selectedColor:tt,minValue:N,maxValue:S,onSeriesMouseClick:Y,noOfTicks:st,prefix:et,suffix:at,stripType:O,highlightColor:h,dotOpacity:dt,resetSelectionOnDoubleClick:B,detailsOnClick:b,styles:f,classNames:C,valueColor:x,animate:g,dimmedOpacity:J,precision:ct,customLayers:w}=e,yt=E===void 0?20:E,xt=gt===void 0?20:gt,vt=rt===void 0?10:rt,Ot=Mt===void 0?10:Mt,Vt=X.useRef(null);let ut;t[0]!==g.amount||t[1]!==g.once?(ut={once:g.once,amount:g.amount},t[0]=g.amount,t[1]=g.once,t[2]=ut):ut=t[2];const $=ee.useInView(Vt,ut),[ot,bt]=X.useState(void 0),[M,jt]=X.useState(void 0),[p,a]=X.useState(void 0),[ft,Ct]=X.useState(void 0);let pt;t[3]!==Ot||t[4]!==yt||t[5]!==xt||t[6]!==vt?(pt={top:vt,bottom:Ot,left:yt,right:xt},t[3]=Ot,t[4]=yt,t[5]=xt,t[6]=vt,t[7]=pt):pt=t[7];const m=pt,K=D-m.left-m.right,Q=v-m.top-m.bottom;let A,V,q,T,R,k,F,P,L,U,j;if(t[8]!==g.duration||t[9]!==C?.graphObjectValues||t[10]!==C?.yAxis?.labels||t[11]!==s||t[12]!==n||t[13]!==w||t[14]!==i||t[15]!==b||t[16]!==J||t[17]!==dt||t[18]!==Q||t[19]!==K||t[20]!==v||t[21]!==h||t[22]!==r||t[23]!==$||t[24]!==m.left||t[25]!==m.top||t[26]!==S||t[27]!==N||t[28]!==M||t[29]!==st||t[30]!==Y||t[31]!==_||t[32]!==ct||t[33]!==et||t[34]!==d||t[35]!==B||t[36]!==tt||t[37]!==O||t[38]!==f?.graphObjectValues||t[39]!==f?.yAxis?.labels||t[40]!==at||t[41]!==x||t[42]!==D){const Dt=i.map(Se);let Z;t[54]!==r?(Z=o=>{const c=(r||[]).indexOf(o.label);return c===-1?1/0:c},t[54]=r,t[55]=Z):Z=t[55];const Nt=Qt.orderBy(Dt,[Z],["desc"]);let nt;t[56]!==i||t[57]!==S?(nt=mt.checkIfNullOrUndefined(S)?Math.max(...i.filter(Ne).map(De))<0?0:Math.max(...i.filter(Ie).map(ke)):S,t[56]=i,t[57]=S,t[58]=nt):nt=t[58];const Rt=nt;let ht;t[59]!==i||t[60]!==N?(ht=mt.checkIfNullOrUndefined(N)?Math.min(...i.filter(Re).map(Ve))>=0?0:Math.min(...i.filter(Ee).map(Me)):N,t[59]=i,t[60]=N,t[61]=ht):ht=t[61];const kt=ht,Et=te.linear().domain([kt,Rt]).range([Q,0]).nice(),It=ie(st,Q);V=wt.motion.svg,q=`${D}px`,T=`${v}px`,R=`0 0 ${D} ${v}`,k="ltr",F=Vt,U=`translate(${m.left},${m.top})`,t[62]!==w?(j=w.filter(we).map(Ce),t[62]=w,t[63]=j):j=t[63],A=oe.AnimatePresence,P=Nt.map(o=>l.jsxRuntimeExports.jsxs(wt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:0,x:K/2,y:Et(0)},whileInView:{x:K/2,y:Et(o.position),opacity:tt?o.color&&n[s.indexOf(o.color)]===tt?.95:J:r.length!==0?r.indexOf(o.label)!==-1?.95:J:dt,transition:{duration:g.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},onMouseEnter:c=>{bt(o),Ct(c.clientY),a(c.clientX),_?.(o)},onClick:()=>{(Y||b)&&(Kt.isEqual(M,o)&&B?(jt(void 0),Y?.(void 0)):(jt(o),Y?.(o)))},onMouseMove:c=>{bt(o),Ct(c.clientY),a(c.clientX)},onMouseLeave:()=>{bt(void 0),a(void 0),Ct(void 0),_?.(void 0)},children:[O==="dot"?l.jsxRuntimeExports.jsx(wt.motion.circle,{cy:0,cx:0,variants:{initial:{fill:h&&r?r.indexOf(o.label)!==-1?h:i.filter(je).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(be).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray},whileInView:{fill:h&&r?r.indexOf(o.label)!==-1?h:i.filter(Oe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(ve).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray,transition:{duration:g.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},r:d}):l.jsxRuntimeExports.jsx(wt.motion.rect,{y:-1,height:2,variants:{initial:{x:0-d,width:d*2,fill:h&&r?r.indexOf(o.label)!==-1?h:i.filter(ye).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(ge).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray},whileInView:{x:0-d,width:d*2,fill:h&&r?r.indexOf(o.label)!==-1?h:i.filter(he).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(xe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray,transition:{duration:g.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}}}),r.length!==0&&r.indexOf(o.label)!==-1?l.jsxRuntimeExports.jsx(wt.motion.text,{y:0,dy:"0.33em",variants:{initial:{opacity:0,x:0+d+3,fill:x||(h&&r?r.indexOf(o.label)!==-1?h:i.filter(de).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(me).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray)},whileInView:{opacity:1,x:0+d+3,fill:x||(h&&r?r.indexOf(o.label)!==-1?h:i.filter(pe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(fe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray),transition:{duration:g.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},style:{textAnchor:"start",...f?.graphObjectValues||{}},className:l.mo("graph-value text-sm font-bold",C?.graphObjectValues),children:Ht.numberFormattingFunction(o.position,"NA",ct,et,at)}):null]},o.label)),L=It.map((o,c)=>l.jsxRuntimeExports.jsx("text",{y:o,x:K/2+d+5,style:{textAnchor:"start",...f?.yAxis?.labels||{}},className:l.mo("fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",C?.yAxis?.labels),children:Ht.numberFormattingFunction(Et.invert(o),"NA",ct,et,at)},c)),t[8]=g.duration,t[9]=C?.graphObjectValues,t[10]=C?.yAxis?.labels,t[11]=s,t[12]=n,t[13]=w,t[14]=i,t[15]=b,t[16]=J,t[17]=dt,t[18]=Q,t[19]=K,t[20]=v,t[21]=h,t[22]=r,t[23]=$,t[24]=m.left,t[25]=m.top,t[26]=S,t[27]=N,t[28]=M,t[29]=st,t[30]=Y,t[31]=_,t[32]=ct,t[33]=et,t[34]=d,t[35]=B,t[36]=tt,t[37]=O,t[38]=f?.graphObjectValues,t[39]=f?.yAxis?.labels,t[40]=at,t[41]=x,t[42]=D,t[43]=A,t[44]=V,t[45]=q,t[46]=T,t[47]=R,t[48]=k,t[49]=F,t[50]=P,t[51]=L,t[52]=U,t[53]=j}else A=t[43],V=t[44],q=t[45],T=t[46],R=t[47],k=t[48],F=t[49],P=t[50],L=t[51],U=t[52],j=t[53];let H;t[64]!==A||t[65]!==P||t[66]!==L?(H=l.jsxRuntimeExports.jsxs(A,{children:[P,L]}),t[64]=A,t[65]=P,t[66]=L,t[67]=H):H=t[67];let G;t[68]!==w?(G=w.filter(ue).map(ce),t[68]=w,t[69]=G):G=t[69];let y;t[70]!==H||t[71]!==G||t[72]!==U||t[73]!==j?(y=l.jsxRuntimeExports.jsxs("g",{transform:U,children:[j,H,G]}),t[70]=H,t[71]=G,t[72]=U,t[73]=j,t[74]=y):y=t[74];let W;t[75]!==V||t[76]!==q||t[77]!==T||t[78]!==R||t[79]!==k||t[80]!==F||t[81]!==y?(W=l.jsxRuntimeExports.jsx(V,{width:q,height:T,viewBox:R,direction:k,ref:F,children:y}),t[75]=V,t[76]=q,t[77]=T,t[78]=R,t[79]=k,t[80]=F,t[81]=y,t[82]=W):W=t[82];let z;t[83]!==C?.tooltip||t[84]!==p||t[85]!==ft||t[86]!==ot||t[87]!==f?.tooltip||t[88]!==lt?(z=ot&&lt&&p&&ft?l.jsxRuntimeExports.jsx(Zt.Tooltip,{data:ot,body:lt,xPos:p,yPos:ft,backgroundStyle:f?.tooltip,className:C?.tooltip}):null,t[83]=C?.tooltip,t[84]=p,t[85]=ft,t[86]=ot,t[87]=f?.tooltip,t[88]=lt,t[89]=z):z=t[89];let I;t[90]!==C?.modal||t[91]!==b||t[92]!==M?(I=b&&M!==void 0?l.jsxRuntimeExports.jsx(_t.DetailsModal,{body:b,data:M,setData:jt,className:C?.modal}):null,t[90]=C?.modal,t[91]=b,t[92]=M,t[93]=I):I=t[93];let it;return t[94]!==W||t[95]!==z||t[96]!==I?(it=l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[W,z,I]}),t[94]=W,t[95]=z,t[96]=I,t[97]=it):it=t[97],it}function ce(e){return e.layer}function ue(e){return e.position==="after"}function fe(e){return e.color}function pe(e){return e.color}function me(e){return e.color}function de(e){return e.color}function xe(e){return e.color}function he(e){return e.color}function ge(e){return e.color}function ye(e){return e.color}function ve(e){return e.color}function Oe(e){return e.color}function be(e){return e.color}function je(e){return e.color}function Ce(e){return e.layer}function we(e){return e.position==="before"}function Me(e){return e.position}function Ee(e){return!mt.checkIfNullOrUndefined(e.position)}function Ve(e){return e.position}function Re(e){return!mt.checkIfNullOrUndefined(e.position)}function ke(e){return e.position}function Ie(e){return!mt.checkIfNullOrUndefined(e.position)}function De(e){return e.position}function Ne(e){return!mt.checkIfNullOrUndefined(e.position)}function Se(e,t){return{...e,id:`${t}`}}function $e(e){const t=l.compilerRuntimeExports.c(98),{data:i,width:D,height:v,colors:n,colorDomain:s,radius:d,leftMargin:E,rightMargin:gt,topMargin:rt,bottomMargin:Mt,tooltip:lt,onSeriesMouseOver:_,highlightedDataPoints:r,selectedColor:tt,minValue:N,maxValue:S,onSeriesMouseClick:Y,prefix:st,suffix:et,stripType:at,highlightColor:O,dotOpacity:h,resetSelectionOnDoubleClick:dt,detailsOnClick:B,styles:b,classNames:f,valueColor:C,animate:x,noOfTicks:g,dimmedOpacity:J,precision:ct,customLayers:w}=e,yt=E===void 0?5:E,xt=gt===void 0?5:gt,vt=rt===void 0?10:rt,Ot=Mt===void 0?10:Mt,Vt=X.useRef(null);let ut;t[0]!==x.amount||t[1]!==x.once?(ut={once:x.once,amount:x.amount},t[0]=x.amount,t[1]=x.once,t[2]=ut):ut=t[2];const $=ee.useInView(Vt,ut),[ot,bt]=X.useState(void 0),[M,jt]=X.useState(void 0),[p,a]=X.useState(void 0),[ft,Ct]=X.useState(void 0);let pt;t[3]!==Ot||t[4]!==yt||t[5]!==xt||t[6]!==vt?(pt={top:vt,bottom:Ot,left:yt,right:xt},t[3]=Ot,t[4]=yt,t[5]=xt,t[6]=vt,t[7]=pt):pt=t[7];const m=pt,K=D-m.left-m.right,Q=v-m.top-m.bottom;let A,V,q,T,R,k,F,P,L,U,j;if(t[8]!==x.duration||t[9]!==f?.graphObjectValues||t[10]!==f?.xAxis?.labels||t[11]!==s||t[12]!==n||t[13]!==w||t[14]!==i||t[15]!==B||t[16]!==J||t[17]!==h||t[18]!==Q||t[19]!==K||t[20]!==v||t[21]!==O||t[22]!==r||t[23]!==$||t[24]!==m.left||t[25]!==m.top||t[26]!==S||t[27]!==N||t[28]!==M||t[29]!==g||t[30]!==Y||t[31]!==_||t[32]!==ct||t[33]!==st||t[34]!==d||t[35]!==dt||t[36]!==tt||t[37]!==at||t[38]!==b?.graphObjectValues||t[39]!==b?.xAxis?.labels||t[40]!==et||t[41]!==C||t[42]!==D){const Dt=i.map(ro);let Z;t[54]!==r?(Z=o=>{const c=(r||[]).indexOf(o.label);return c===-1?1/0:c},t[54]=r,t[55]=Z):Z=t[55];const Nt=Qt.orderBy(Dt,[Z],["desc"]);let nt;t[56]!==i||t[57]!==S?(nt=mt.checkIfNullOrUndefined(S)?Math.max(...i.filter(no).map(io))<0?0:Math.max(...i.filter(oo).map(eo)):S,t[56]=i,t[57]=S,t[58]=nt):nt=t[58];const Rt=nt;let ht;t[59]!==i||t[60]!==N?(ht=mt.checkIfNullOrUndefined(N)?Math.min(...i.filter(to).map(_e))>=0?0:Math.min(...i.filter(Ze).map(Qe)):N,t[59]=i,t[60]=N,t[61]=ht):ht=t[61];const kt=ht,Et=te.linear().domain([kt,Rt]).range([0,K]).nice(),It=ie(g,K);V=wt.motion.svg,q=`${D}px`,T=`${v}px`,R=`0 0 ${D} ${v}`,k="ltr",F=Vt,U=`translate(${m.left},${m.top})`,t[62]!==w?(j=w.filter(Ke).map(Je),t[62]=w,t[63]=j):j=t[63],A=oe.AnimatePresence,P=Nt.map(o=>l.jsxRuntimeExports.jsxs(wt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:0,x:Et(0),y:Q/2},whileInView:{x:Et(o.position),y:Q/2,opacity:tt?o.color&&n[s.indexOf(o.color)]===tt?.95:J:r.length!==0?r.indexOf(o.label)!==-1?.95:J:h,transition:{duration:x.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:x.duration}},onMouseEnter:c=>{bt(o),Ct(c.clientY),a(c.clientX),_?.(o)},onClick:()=>{(Y||B)&&(Kt.isEqual(M,o)&&dt?(jt(void 0),Y?.(void 0)):(jt(o),Y?.(o)))},onMouseMove:c=>{bt(o),Ct(c.clientY),a(c.clientX)},onMouseLeave:()=>{bt(void 0),a(void 0),Ct(void 0),_?.(void 0)},children:[at==="dot"?l.jsxRuntimeExports.jsx(wt.motion.circle,{cy:0,cx:0,variants:{initial:{fill:O&&r?r.indexOf(o.label)!==-1?O:i.filter(ze).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(Be).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray},whileInView:{fill:O&&r?r.indexOf(o.label)!==-1?O:i.filter(Ye).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(Xe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray,transition:{duration:x.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:x.duration}},r:d}):l.jsxRuntimeExports.jsx(wt.motion.rect,{x:-1,width:2,variants:{initial:{y:0-d,height:d*2,fill:O&&r?r.indexOf(o.label)!==-1?O:i.filter(We).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(Ge).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray},whileInView:{y:0-d,height:d*2,fill:O&&r?r.indexOf(o.label)!==-1?O:i.filter(He).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(Ue).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray,transition:{duration:x.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:x.duration}}}),r.length!==0&&r.indexOf(o.label)!==-1?l.jsxRuntimeExports.jsx(wt.motion.text,{x:0,variants:{initial:{opacity:0,y:0-d-5,fill:C||(O&&r?r.indexOf(o.label)!==-1?O:i.filter(Le).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(Pe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray)},whileInView:{opacity:1,y:0-d-5,fill:C||(O&&r?r.indexOf(o.label)!==-1?O:i.filter(Fe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(Te).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray),transition:{duration:x.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:x.duration}},style:{textAnchor:"middle",...b?.graphObjectValues||{}},className:l.mo("graph-value text-sm font-bold",f?.graphObjectValues),children:Ht.numberFormattingFunction(o.position,"NA",ct,st,et)}):null]},o.label)),L=It.map((o,c)=>l.jsxRuntimeExports.jsx("text",{x:o,y:Q/2+d,style:{textAnchor:c===0?"start":c===It.length-1?"end":"middle",...b?.xAxis?.labels||{}},className:l.mo("fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",f?.xAxis?.labels),dy:"1em",children:Ht.numberFormattingFunction(Et.invert(o),"NA",ct,st,et)},c)),t[8]=x.duration,t[9]=f?.graphObjectValues,t[10]=f?.xAxis?.labels,t[11]=s,t[12]=n,t[13]=w,t[14]=i,t[15]=B,t[16]=J,t[17]=h,t[18]=Q,t[19]=K,t[20]=v,t[21]=O,t[22]=r,t[23]=$,t[24]=m.left,t[25]=m.top,t[26]=S,t[27]=N,t[28]=M,t[29]=g,t[30]=Y,t[31]=_,t[32]=ct,t[33]=st,t[34]=d,t[35]=dt,t[36]=tt,t[37]=at,t[38]=b?.graphObjectValues,t[39]=b?.xAxis?.labels,t[40]=et,t[41]=C,t[42]=D,t[43]=A,t[44]=V,t[45]=q,t[46]=T,t[47]=R,t[48]=k,t[49]=F,t[50]=P,t[51]=L,t[52]=U,t[53]=j}else A=t[43],V=t[44],q=t[45],T=t[46],R=t[47],k=t[48],F=t[49],P=t[50],L=t[51],U=t[52],j=t[53];let H;t[64]!==A||t[65]!==P||t[66]!==L?(H=l.jsxRuntimeExports.jsxs(A,{children:[P,L]}),t[64]=A,t[65]=P,t[66]=L,t[67]=H):H=t[67];let G;t[68]!==w?(G=w.filter(qe).map(Ae),t[68]=w,t[69]=G):G=t[69];let y;t[70]!==H||t[71]!==G||t[72]!==U||t[73]!==j?(y=l.jsxRuntimeExports.jsxs("g",{transform:U,children:[j,H,G]}),t[70]=H,t[71]=G,t[72]=U,t[73]=j,t[74]=y):y=t[74];let W;t[75]!==V||t[76]!==q||t[77]!==T||t[78]!==R||t[79]!==k||t[80]!==F||t[81]!==y?(W=l.jsxRuntimeExports.jsx(V,{width:q,height:T,viewBox:R,direction:k,ref:F,children:y}),t[75]=V,t[76]=q,t[77]=T,t[78]=R,t[79]=k,t[80]=F,t[81]=y,t[82]=W):W=t[82];let z;t[83]!==f?.tooltip||t[84]!==p||t[85]!==ft||t[86]!==ot||t[87]!==b?.tooltip||t[88]!==lt?(z=ot&&lt&&p&&ft?l.jsxRuntimeExports.jsx(Zt.Tooltip,{data:ot,body:lt,xPos:p,yPos:ft,backgroundStyle:b?.tooltip,className:f?.tooltip}):null,t[83]=f?.tooltip,t[84]=p,t[85]=ft,t[86]=ot,t[87]=b?.tooltip,t[88]=lt,t[89]=z):z=t[89];let I;t[90]!==f?.modal||t[91]!==B||t[92]!==M?(I=B&&M!==void 0?l.jsxRuntimeExports.jsx(_t.DetailsModal,{body:B,data:M,setData:jt,className:f?.modal}):null,t[90]=f?.modal,t[91]=B,t[92]=M,t[93]=I):I=t[93];let it;return t[94]!==W||t[95]!==z||t[96]!==I?(it=l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[W,z,I]}),t[94]=W,t[95]=z,t[96]=I,t[97]=it):it=t[97],it}function Ae(e){return e.layer}function qe(e){return e.position==="after"}function Te(e){return e.color}function Fe(e){return e.color}function Pe(e){return e.color}function Le(e){return e.color}function Ue(e){return e.color}function He(e){return e.color}function Ge(e){return e.color}function We(e){return e.color}function Xe(e){return e.color}function Ye(e){return e.color}function Be(e){return e.color}function ze(e){return e.color}function Je(e){return e.layer}function Ke(e){return e.position==="before"}function Qe(e){return e.position}function Ze(e){return!mt.checkIfNullOrUndefined(e.position)}function _e(e){return e.position}function to(e){return!mt.checkIfNullOrUndefined(e.position)}function eo(e){return e.position}function oo(e){return!mt.checkIfNullOrUndefined(e.position)}function io(e){return e.position}function no(e){return!mt.checkIfNullOrUndefined(e.position)}function ro(e,t){return{...e,id:`${t}`}}function lo(e){const t=l.compilerRuntimeExports.c(92),{data:i,graphTitle:D,colors:v,sources:n,graphDescription:s,height:d,width:E,footNote:gt,colorDomain:rt,colorLegendTitle:Mt,radius:lt,padding:_,backgroundColor:r,leftMargin:tt,rightMargin:N,topMargin:S,bottomMargin:Y,tooltip:st,relativeHeight:et,onSeriesMouseOver:at,showColorScale:O,highlightedDataPoints:h,graphID:dt,minValue:B,maxValue:b,onSeriesMouseClick:f,noOfTicks:C,graphDownload:x,dataDownload:g,prefix:J,suffix:ct,stripType:w,language:yt,highlightColor:xt,dotOpacity:vt,showNAColor:Ot,minHeight:Vt,theme:ut,ariaLabel:$,valueColor:ot,resetSelectionOnDoubleClick:bt,detailsOnClick:M,orientation:jt,styles:p,classNames:a,animate:ft,dimmedOpacity:Ct,precision:pt,customLayers:m}=e,K=lt===void 0?5:lt,Q=r===void 0?!1:r,A=O===void 0?!0:O;let V;t[0]!==h?(V=h===void 0?[]:h,t[0]=h,t[1]=V):V=t[1];const q=V,T=C===void 0?2:C,R=x===void 0?!1:x,k=g===void 0?!1:g,F=J===void 0?"":J,P=ct===void 0?"":ct,L=w===void 0?"dot":w,U=yt===void 0?"en":yt,j=vt===void 0?.3:vt,H=Ot===void 0?!0:Ot,G=Vt===void 0?0:Vt,y=ut===void 0?"light":ut,W=bt===void 0?!0:bt,z=jt===void 0?"vertical":jt,I=ft===void 0?!1:ft,it=Ct===void 0?.3:Ct,Dt=pt===void 0?2:pt;let Z;t[2]!==m?(Z=m===void 0?[]:m,t[2]=m,t[3]=Z):Z=t[3];const Nt=Z,nt=z==="horizontal"?$e:ae,[Rt,ht]=X.useState(0),[kt,Et]=X.useState(0),[It,o]=X.useState(void 0),c=X.useRef(null),Xt=X.useRef(null);let Pt,Lt;t[4]===Symbol.for("react.memo_cache_sentinel")?(Pt=()=>{const Yt=new ResizeObserver(Bt=>{ht(Bt[0].target.clientWidth||620),Et(Bt[0].target.clientHeight||480)});return c.current&&Yt.observe(c.current),()=>Yt.disconnect()},Lt=[],t[4]=Pt,t[5]=Lt):(Pt=t[4],Lt=t[5]),X.useEffect(Pt,Lt);const Gt=a?.graphContainer,Wt=p?.graphContainer;let St;t[6]!==a?.description||t[7]!==a?.title||t[8]!==i||t[9]!==k||t[10]!==s||t[11]!==R||t[12]!==D||t[13]!==p?.description||t[14]!==p?.title||t[15]!==E?(St=D||s||R||k?l.jsxRuntimeExports.jsx(se.GraphHeader,{styles:{title:p?.title,description:p?.description},classNames:{title:a?.title,description:a?.description},graphTitle:D,graphDescription:s,width:E,graphDownload:R?Xt:void 0,dataDownload:k?i.map(xo).filter(mo).length>0?i.map(po).filter(fo):i.filter(uo):null}):null,t[6]=a?.description,t[7]=a?.title,t[8]=i,t[9]=k,t[10]=s,t[11]=R,t[12]=D,t[13]=p?.description,t[14]=p?.title,t[15]=E,t[16]=St):St=t[16];let $t;t[17]!==a?.colorLegend||t[18]!==rt||t[19]!==Mt||t[20]!==v||t[21]!==i||t[22]!==A||t[23]!==H||t[24]!==y||t[25]!==E?($t=A!==!1&&i.filter(co).length!==0&&i.length>0?l.jsxRuntimeExports.jsx(re.ColorLegendWithMouseOver,{width:E,colorLegendTitle:Mt,colors:v||u.Colors[y].categoricalColors.colors,colorDomain:rt||zt.uniqBy(i,"color",!0),setSelectedColor:o,showNAColor:H,className:a?.colorLegend}):null,t[17]=a?.colorLegend,t[18]=rt,t[19]=Mt,t[20]=v,t[21]=i,t[22]=A,t[23]=H,t[24]=y,t[25]=E,t[26]=$t):$t=t[26];let At;t[27]!==i.length?(At=i.length===0&&l.jsxRuntimeExports.jsx(ne.EmptyState,{}),t[27]=i.length,t[28]=At):At=t[28];let qt;t[29]!==nt||t[30]!==I||t[31]!==Y||t[32]!==a||t[33]!==rt||t[34]!==v||t[35]!==Nt||t[36]!==i||t[37]!==M||t[38]!==it||t[39]!==j||t[40]!==xt||t[41]!==q||t[42]!==tt||t[43]!==b||t[44]!==B||t[45]!==T||t[46]!==f||t[47]!==at||t[48]!==Dt||t[49]!==F||t[50]!==K||t[51]!==W||t[52]!==N||t[53]!==It||t[54]!==L||t[55]!==p||t[56]!==P||t[57]!==kt||t[58]!==Rt||t[59]!==y||t[60]!==st||t[61]!==S||t[62]!==ot?(qt=Rt&&kt&&i.length>0?l.jsxRuntimeExports.jsx(nt,{data:i,width:Rt,height:kt,colorDomain:i.filter(ao).length===0?[]:rt||zt.uniqBy(i,"color",!0),colors:i.filter(so).length===0?v?[v]:[u.Colors.primaryColors["blue-600"]]:v||u.Colors[y].categoricalColors.colors,selectedColor:It,radius:K,leftMargin:tt,rightMargin:N,topMargin:S,bottomMargin:Y,tooltip:st,onSeriesMouseOver:at,highlightedDataPoints:q,minValue:B,maxValue:b,onSeriesMouseClick:f,prefix:F,suffix:P,stripType:L,highlightColor:xt,dotOpacity:j,resetSelectionOnDoubleClick:W,detailsOnClick:M,styles:p,classNames:a,valueColor:ot,animate:I===!0?{duration:.5,once:!0,amount:.5}:I||{duration:0,once:!0,amount:0},noOfTicks:T,dimmedOpacity:it,precision:Dt,customLayers:Nt}):null,t[29]=nt,t[30]=I,t[31]=Y,t[32]=a,t[33]=rt,t[34]=v,t[35]=Nt,t[36]=i,t[37]=M,t[38]=it,t[39]=j,t[40]=xt,t[41]=q,t[42]=tt,t[43]=b,t[44]=B,t[45]=T,t[46]=f,t[47]=at,t[48]=Dt,t[49]=F,t[50]=K,t[51]=W,t[52]=N,t[53]=It,t[54]=L,t[55]=p,t[56]=P,t[57]=kt,t[58]=Rt,t[59]=y,t[60]=st,t[61]=S,t[62]=ot,t[63]=qt):qt=t[63];let Tt;t[64]!==At||t[65]!==qt?(Tt=l.jsxRuntimeExports.jsxs(Jt.GraphArea,{ref:c,children:[At,qt]}),t[64]=At,t[65]=qt,t[66]=Tt):Tt=t[66];let Ft;t[67]!==a?.footnote||t[68]!==a?.source||t[69]!==gt||t[70]!==n||t[71]!==p?.footnote||t[72]!==p?.source||t[73]!==E?(Ft=n||gt?l.jsxRuntimeExports.jsx(le.GraphFooter,{styles:{footnote:p?.footnote,source:p?.source},classNames:{footnote:a?.footnote,source:a?.source},sources:n,footNote:gt,width:E}):null,t[67]=a?.footnote,t[68]=a?.source,t[69]=gt,t[70]=n,t[71]=p?.footnote,t[72]=p?.source,t[73]=E,t[74]=Ft):Ft=t[74];let Ut;return t[75]!==$||t[76]!==Q||t[77]!==dt||t[78]!==d||t[79]!==U||t[80]!==G||t[81]!==_||t[82]!==et||t[83]!==Gt||t[84]!==Wt||t[85]!==St||t[86]!==$t||t[87]!==Tt||t[88]!==Ft||t[89]!==y||t[90]!==E?(Ut=l.jsxRuntimeExports.jsxs(Jt.GraphContainer,{className:Gt,style:Wt,id:dt,ref:Xt,"aria-label":$,backgroundColor:Q,theme:y,language:U,minHeight:G,width:E,height:d,relativeHeight:et,padding:_,children:[St,$t,Tt,Ft]}),t[75]=$,t[76]=Q,t[77]=dt,t[78]=d,t[79]=U,t[80]=G,t[81]=_,t[82]=et,t[83]=Gt,t[84]=Wt,t[85]=St,t[86]=$t,t[87]=Tt,t[88]=Ft,t[89]=y,t[90]=E,t[91]=Ut):Ut=t[91],Ut}function so(e){return e.color}function ao(e){return e.color}function co(e){return e.color}function uo(e){return e!==void 0}function fo(e){return e!==void 0}function po(e){return e.data}function mo(e){return e!==void 0}function xo(e){return e.data}exports.StripChart=lo;
2
2
  //# sourceMappingURL=StripChart.cjs.map
@@ -13,7 +13,7 @@ import { u as oe } from "./use-in-view-DqvKAveg.js";
13
13
  import { A as ne } from "./index-Co3YGYe1.js";
14
14
  import { u as Qt } from "./uniqBy-BHy4I8PK.js";
15
15
  import { a as ae, G as se } from "./GraphContainer-DwMxWRCi.js";
16
- import { E as ce } from "./EmptyState-D807L58h.js";
16
+ import { E as ce } from "./EmptyState-B3fPoH6L.js";
17
17
  import { ColorLegendWithMouseOver as ue } from "./ColorLegendWithMouseOver.js";
18
18
  import { GraphFooter as fe } from "./GraphFooter.js";
19
19
  import { GraphHeader as pe } from "./GraphHeader.js";