@undp/data-viz 2.0.9 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.d.ts +2 -0
  3. package/dist/AreaChart.js +1 -1
  4. package/dist/BarGraph.cjs +1 -1
  5. package/dist/BarGraph.cjs.map +1 -1
  6. package/dist/BarGraph.d.ts +2 -0
  7. package/dist/BarGraph.js +1188 -1213
  8. package/dist/BarGraph.js.map +1 -1
  9. package/dist/BasicStatCard.d.ts +2 -0
  10. package/dist/BeeSwarmChart.cjs +1 -1
  11. package/dist/BeeSwarmChart.cjs.map +1 -1
  12. package/dist/BeeSwarmChart.d.ts +2 -0
  13. package/dist/BeeSwarmChart.js +258 -267
  14. package/dist/BeeSwarmChart.js.map +1 -1
  15. package/dist/BiVariateChoroplethMap.cjs +1 -1
  16. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  17. package/dist/BiVariateChoroplethMap.d.ts +2 -0
  18. package/dist/BiVariateChoroplethMap.js +126 -131
  19. package/dist/BiVariateChoroplethMap.js.map +1 -1
  20. package/dist/BulletChart.cjs +1 -1
  21. package/dist/BulletChart.cjs.map +1 -1
  22. package/dist/BulletChart.d.ts +2 -0
  23. package/dist/BulletChart.js +404 -413
  24. package/dist/BulletChart.js.map +1 -1
  25. package/dist/ButterflyChart.cjs +1 -1
  26. package/dist/ButterflyChart.cjs.map +1 -1
  27. package/dist/ButterflyChart.d.ts +2 -0
  28. package/dist/ButterflyChart.js +179 -184
  29. package/dist/ButterflyChart.js.map +1 -1
  30. package/dist/ChoroplethMap.cjs +1 -1
  31. package/dist/ChoroplethMap.cjs.map +1 -1
  32. package/dist/ChoroplethMap.d.ts +2 -0
  33. package/dist/ChoroplethMap.js +268 -273
  34. package/dist/ChoroplethMap.js.map +1 -1
  35. package/dist/CirclePackingGraph.cjs +1 -1
  36. package/dist/CirclePackingGraph.d.ts +2 -0
  37. package/dist/CirclePackingGraph.js +1 -1
  38. package/dist/DataCards.d.ts +2 -0
  39. package/dist/DataCards.js +1 -1
  40. package/dist/DataTable.d.ts +2 -0
  41. package/dist/DetailsModal-0Ry5nXiC.js +32 -0
  42. package/dist/DetailsModal-0Ry5nXiC.js.map +1 -0
  43. package/dist/DetailsModal-BN0HDFlV.cjs +2 -0
  44. package/dist/DetailsModal-BN0HDFlV.cjs.map +1 -0
  45. package/dist/DifferenceLineChart.cjs +1 -1
  46. package/dist/DifferenceLineChart.d.ts +2 -0
  47. package/dist/DifferenceLineChart.js +1 -1
  48. package/dist/DonutChart.cjs +1 -1
  49. package/dist/DonutChart.cjs.map +1 -1
  50. package/dist/DonutChart.d.ts +2 -0
  51. package/dist/DonutChart.js +185 -190
  52. package/dist/DonutChart.js.map +1 -1
  53. package/dist/DotDensityMap.cjs +1 -1
  54. package/dist/DotDensityMap.cjs.map +1 -1
  55. package/dist/DotDensityMap.d.ts +2 -0
  56. package/dist/DotDensityMap.js +198 -203
  57. package/dist/DotDensityMap.js.map +1 -1
  58. package/dist/DualAxisLineChart.cjs +1 -1
  59. package/dist/DualAxisLineChart.d.ts +2 -0
  60. package/dist/DualAxisLineChart.js +1 -1
  61. package/dist/DumbbellChart.cjs +1 -1
  62. package/dist/DumbbellChart.cjs.map +1 -1
  63. package/dist/DumbbellChart.d.ts +2 -0
  64. package/dist/DumbbellChart.js +364 -373
  65. package/dist/DumbbellChart.js.map +1 -1
  66. package/dist/GeoHubCompareMaps.d.ts +2 -0
  67. package/dist/GeoHubMap.d.ts +2 -0
  68. package/dist/GeoHubMapWithLayerSelection.d.ts +2 -0
  69. package/dist/{GraphEl-BcKU0bG1.cjs → GraphEl-B16EYkko.cjs} +2 -2
  70. package/dist/{GraphEl-BcKU0bG1.cjs.map → GraphEl-B16EYkko.cjs.map} +1 -1
  71. package/dist/{GraphEl-CGq1EWRn.js → GraphEl-ebgfxefq.js} +3 -3
  72. package/dist/{GraphEl-CGq1EWRn.js.map → GraphEl-ebgfxefq.js.map} +1 -1
  73. package/dist/GriddedGraphs.cjs +1 -1
  74. package/dist/GriddedGraphs.cjs.map +1 -1
  75. package/dist/GriddedGraphs.d.ts +2 -0
  76. package/dist/GriddedGraphs.js +19 -19
  77. package/dist/GriddedGraphs.js.map +1 -1
  78. package/dist/GriddedGraphsFromConfig.d.ts +2 -0
  79. package/dist/HeatMap.cjs +1 -1
  80. package/dist/HeatMap.cjs.map +1 -1
  81. package/dist/HeatMap.d.ts +2 -0
  82. package/dist/HeatMap.js +111 -116
  83. package/dist/HeatMap.js.map +1 -1
  84. package/dist/Histogram.cjs +1 -1
  85. package/dist/Histogram.d.ts +2 -0
  86. package/dist/Histogram.js +1 -1
  87. package/dist/HybridMap.cjs +1 -1
  88. package/dist/HybridMap.cjs.map +1 -1
  89. package/dist/HybridMap.d.ts +2 -0
  90. package/dist/HybridMap.js +202 -207
  91. package/dist/HybridMap.js.map +1 -1
  92. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  93. package/dist/LineChartWithConfidenceInterval.d.ts +2 -0
  94. package/dist/LineChartWithConfidenceInterval.js +1 -1
  95. package/dist/{Modal-DGcuAHyK.js → Modal-bMQA6bL_.js} +5 -5
  96. package/dist/{Modal-DGcuAHyK.js.map → Modal-bMQA6bL_.js.map} +1 -1
  97. package/dist/MultiGraphDashboard.cjs +1 -1
  98. package/dist/MultiGraphDashboard.cjs.map +1 -1
  99. package/dist/MultiGraphDashboard.d.ts +2 -0
  100. package/dist/MultiGraphDashboard.js +10 -10
  101. package/dist/MultiGraphDashboard.js.map +1 -1
  102. package/dist/MultiGraphDashboardFromConfig.d.ts +2 -0
  103. package/dist/MultiGraphDashboardWideToLongFormat.d.ts +2 -0
  104. package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
  105. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +2 -0
  106. package/dist/MultiLineAltChart.cjs +1 -1
  107. package/dist/MultiLineAltChart.d.ts +2 -0
  108. package/dist/MultiLineAltChart.js +1 -1
  109. package/dist/MultiLineChart.cjs +1 -1
  110. package/dist/MultiLineChart.d.ts +2 -0
  111. package/dist/MultiLineChart.js +1 -1
  112. package/dist/ParetoChart.cjs +1 -1
  113. package/dist/ParetoChart.cjs.map +1 -1
  114. package/dist/ParetoChart.d.ts +2 -0
  115. package/dist/ParetoChart.js +187 -192
  116. package/dist/ParetoChart.js.map +1 -1
  117. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
  118. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -1
  119. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +2 -0
  120. package/dist/PerformanceIntensiveMultiGraphDashboard.js +16 -16
  121. package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -1
  122. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +2 -0
  123. package/dist/PerformanceIntensiveScrollStory.d.ts +2 -0
  124. package/dist/RadarChart.cjs +1 -1
  125. package/dist/RadarChart.cjs.map +1 -1
  126. package/dist/RadarChart.d.ts +2 -0
  127. package/dist/RadarChart.js +158 -163
  128. package/dist/RadarChart.js.map +1 -1
  129. package/dist/SankeyChart.cjs +1 -1
  130. package/dist/SankeyChart.cjs.map +1 -1
  131. package/dist/SankeyChart.d.ts +2 -0
  132. package/dist/SankeyChart.js +172 -177
  133. package/dist/SankeyChart.js.map +1 -1
  134. package/dist/ScatterPlot.cjs +1 -1
  135. package/dist/ScatterPlot.cjs.map +1 -1
  136. package/dist/ScatterPlot.d.ts +2 -0
  137. package/dist/ScatterPlot.js +222 -227
  138. package/dist/ScatterPlot.js.map +1 -1
  139. package/dist/ScrollStory.d.ts +2 -0
  140. package/dist/SimpleLineChart.cjs +1 -1
  141. package/dist/SimpleLineChart.d.ts +2 -0
  142. package/dist/SimpleLineChart.js +1 -1
  143. package/dist/SingleGraphDashboard.cjs +1 -1
  144. package/dist/SingleGraphDashboard.cjs.map +1 -1
  145. package/dist/SingleGraphDashboard.d.ts +2 -0
  146. package/dist/SingleGraphDashboard.js +24 -24
  147. package/dist/SingleGraphDashboard.js.map +1 -1
  148. package/dist/SingleGraphDashboardFromConfig.d.ts +2 -0
  149. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +2 -0
  150. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +2 -0
  151. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  152. package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
  153. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +2 -0
  154. package/dist/SingleGraphDashboardThreeDGraphs.js +46 -46
  155. package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
  156. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +2 -0
  157. package/dist/SlopeChart.cjs +1 -1
  158. package/dist/SlopeChart.cjs.map +1 -1
  159. package/dist/SlopeChart.d.ts +2 -0
  160. package/dist/SlopeChart.js +182 -187
  161. package/dist/SlopeChart.js.map +1 -1
  162. package/dist/SparkLine.cjs +1 -1
  163. package/dist/SparkLine.d.ts +2 -0
  164. package/dist/SparkLine.js +1 -1
  165. package/dist/StatCardFromData.d.ts +2 -0
  166. package/dist/StripChart.cjs +1 -1
  167. package/dist/StripChart.cjs.map +1 -1
  168. package/dist/StripChart.d.ts +2 -0
  169. package/dist/StripChart.js +249 -258
  170. package/dist/StripChart.js.map +1 -1
  171. package/dist/ThreeDGlobe.cjs +1 -1
  172. package/dist/ThreeDGlobe.cjs.map +1 -1
  173. package/dist/ThreeDGlobe.d.ts +2 -0
  174. package/dist/ThreeDGlobe.js +142 -147
  175. package/dist/ThreeDGlobe.js.map +1 -1
  176. package/dist/Tooltip-Dj5eVppQ.js +45 -0
  177. package/dist/Tooltip-Dj5eVppQ.js.map +1 -0
  178. package/dist/Tooltip-uUdw6wJL.cjs +2 -0
  179. package/dist/Tooltip-uUdw6wJL.cjs.map +1 -0
  180. package/dist/TreeMapGraph.cjs +1 -1
  181. package/dist/TreeMapGraph.cjs.map +1 -1
  182. package/dist/TreeMapGraph.d.ts +2 -0
  183. package/dist/TreeMapGraph.js +159 -164
  184. package/dist/TreeMapGraph.js.map +1 -1
  185. package/dist/Types.d.ts +2 -0
  186. package/dist/UnitChart.d.ts +2 -0
  187. package/dist/{checkIfMultiple-Y9iKaV_u.js → checkIfMultiple-CIRtG0KE.js} +2 -2
  188. package/dist/{checkIfMultiple-Y9iKaV_u.js.map → checkIfMultiple-CIRtG0KE.js.map} +1 -1
  189. package/dist/index-BBV4tAeA.js +330 -0
  190. package/dist/index-BBV4tAeA.js.map +1 -0
  191. package/dist/index-CF5hnGvG.cjs +2 -0
  192. package/dist/index-CF5hnGvG.cjs.map +1 -0
  193. package/dist/index.cjs +1 -1
  194. package/dist/index.d.ts +2 -0
  195. package/dist/index.js +1 -1
  196. package/package.json +1 -1
  197. package/dist/Tooltip-4dJo4_AF.cjs +0 -2
  198. package/dist/Tooltip-4dJo4_AF.cjs.map +0 -1
  199. package/dist/Tooltip-CwWUegPB.js +0 -43
  200. package/dist/Tooltip-CwWUegPB.js.map +0 -1
  201. package/dist/index-B2LQV7Tk.js +0 -335
  202. package/dist/index-B2LQV7Tk.js.map +0 -1
  203. package/dist/index-xRHRLDIp.cjs +0 -2
  204. package/dist/index-xRHRLDIp.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"SlopeChart.js","sources":["../src/Components/Graphs/SlopeChart/Graph.tsx","../src/Components/Graphs/SlopeChart/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport { useRef, useState } from 'react';\r\nimport { scaleLinear } from 'd3-scale';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Modal } from '@undp/design-system-react/Modal';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n SlopeChartDataType,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\nimport { Axis } from '@/Components/Elements/Axes/Axis';\r\nimport { AxisTitle } from '@/Components/Elements/Axes/AxisTitle';\r\n\r\ninterface Props {\r\n data: SlopeChartDataType[];\r\n width: number;\r\n height: number;\r\n selectedColor?: string;\r\n showLabels: boolean;\r\n colors: string[];\r\n colorDomain: string[];\r\n radius: number;\r\n leftMargin: number;\r\n rightMargin: number;\r\n topMargin: number;\r\n bottomMargin: number;\r\n axisTitles: [string, string];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n highlightedDataPoints: (string | number)[];\r\n maxValue?: number;\r\n minValue?: number;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n width,\r\n height,\r\n showLabels,\r\n colors,\r\n colorDomain,\r\n radius,\r\n leftMargin,\r\n rightMargin,\r\n topMargin,\r\n bottomMargin,\r\n tooltip,\r\n onSeriesMouseOver,\r\n axisTitles,\r\n highlightedDataPoints,\r\n selectedColor,\r\n minValue,\r\n maxValue,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n } = props;\r\n const svgRef = useRef(null);\r\n const isInView = useInView(svgRef, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const margin = {\r\n top: topMargin,\r\n bottom: bottomMargin,\r\n left: leftMargin,\r\n right: rightMargin,\r\n };\r\n const graphWidth = width - margin.left - margin.right;\r\n const graphHeight = height - margin.top - margin.bottom;\r\n const minY = Math.min(Math.min(...data.map(d => d.y1)), Math.min(...data.map(d => d.y2)));\r\n const maxY = Math.max(Math.max(...data.map(d => d.y1)), Math.max(...data.map(d => d.y2)));\r\n const y = scaleLinear()\r\n .domain([\r\n checkIfNullOrUndefined(minValue) ? (minY > 0 ? 0 : minY) : (minValue as number),\r\n checkIfNullOrUndefined(maxValue) ? (maxY > 0 ? maxY : 0) : (maxValue as number),\r\n ])\r\n .range([graphHeight, 0])\r\n .nice();\r\n return (\r\n <>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n className='mx-auto'\r\n direction='ltr'\r\n ref={svgRef}\r\n >\r\n <g transform={`translate(${margin.left},${margin.top})`}>\r\n <g>\r\n <Axis\r\n y1={0}\r\n y2={graphHeight}\r\n x1={radius}\r\n x2={radius}\r\n classNames={{\r\n axis: cn(\r\n 'stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550',\r\n classNames?.yAxis?.axis,\r\n ),\r\n }}\r\n />\r\n <AxisTitle\r\n x={radius}\r\n y={graphHeight + 15}\r\n style={styles?.yAxis?.title}\r\n className={cn(\r\n 'fill-primary-gray-700 dark:fill-primary-gray-300 text-xs',\r\n classNames?.yAxis?.title,\r\n )}\r\n text={axisTitles[0]}\r\n />\r\n </g>\r\n <g>\r\n <Axis\r\n y1={0}\r\n y2={graphHeight}\r\n x1={graphWidth - radius}\r\n x2={graphWidth - radius}\r\n classNames={{\r\n axis: cn(\r\n 'stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550',\r\n classNames?.yAxis?.axis,\r\n ),\r\n }}\r\n />\r\n <AxisTitle\r\n x={graphWidth - radius}\r\n y={graphHeight + 15}\r\n style={styles?.yAxis?.title}\r\n className={cn(\r\n 'fill-primary-gray-700 dark:fill-primary-gray-300 text-xs',\r\n classNames?.yAxis?.title,\r\n )}\r\n text={axisTitles[1]}\r\n />\r\n </g>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n <AnimatePresence>\r\n {data.map((d, i) => {\r\n return (\r\n <motion.g\r\n key={i}\r\n variants={{\r\n initial: {\r\n opacity: selectedColor\r\n ? d.color\r\n ? colors[colorDomain.indexOf(`${d.color}`)] === selectedColor\r\n ? 1\r\n : dimmedOpacity\r\n : dimmedOpacity\r\n : mouseOverData\r\n ? mouseOverData.label === d.label\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedDataPoints.length !== 0\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? d.color\r\n ? colors[colorDomain.indexOf(`${d.color}`)] === selectedColor\r\n ? 1\r\n : dimmedOpacity\r\n : dimmedOpacity\r\n : mouseOverData\r\n ? mouseOverData.label === d.label\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedDataPoints.length !== 0\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n >\r\n <motion.circle\r\n variants={{\r\n initial: {\r\n cx: radius,\r\n cy: y(d.y1),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n opacity: 0,\r\n },\r\n whileInView: {\r\n cx: radius,\r\n cy: y(d.y1),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n r={radius}\r\n style={{\r\n fillOpacity: 0.6,\r\n }}\r\n />\r\n {showLabels ? (\r\n <motion.text\r\n variants={{\r\n initial: {\r\n y: y(d.y1),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n opacity: 0,\r\n },\r\n whileInView: {\r\n y: y(d.y1),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n textAnchor: 'end',\r\n ...(styles?.yAxis?.labels || {}),\r\n }}\r\n className={cn('text-xs', classNames?.yAxis?.labels)}\r\n x={5}\r\n dy='0.33em'\r\n textAnchor='end'\r\n dx={0 - radius - 3}\r\n >\r\n {d.label}\r\n </motion.text>\r\n ) : highlightedDataPoints.length !== 0 ? (\r\n highlightedDataPoints.indexOf(d.label) !== -1 ? (\r\n <motion.text\r\n variants={{\r\n initial: {\r\n y: y(d.y1),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n opacity: 0,\r\n },\r\n whileInView: {\r\n y: y(d.y1),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n textAnchor: 'end',\r\n ...(styles?.yAxis?.labels || {}),\r\n }}\r\n className={cn('text-xs', classNames?.yAxis?.labels)}\r\n x={5}\r\n dy='0.33em'\r\n dx={-3}\r\n >\r\n {d.label}\r\n </motion.text>\r\n ) : null\r\n ) : null}\r\n <motion.circle\r\n variants={{\r\n initial: {\r\n cx: graphWidth - radius,\r\n cy: y(d.y2),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n opacity: 0,\r\n },\r\n whileInView: {\r\n cx: graphWidth - radius,\r\n cy: y(d.y2),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n r={radius}\r\n style={{\r\n fillOpacity: 0.6,\r\n }}\r\n />\r\n {showLabels ? (\r\n <motion.text\r\n variants={{\r\n initial: {\r\n y: y(d.y2),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n opacity: 0,\r\n },\r\n whileInView: {\r\n y: y(d.y2),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n textAnchor: 'start',\r\n ...(styles?.yAxis?.labels || {}),\r\n }}\r\n className={cn('text-xs', classNames?.yAxis?.labels)}\r\n x={graphWidth - 5}\r\n dy='0.33em'\r\n dx={radius + 3}\r\n >\r\n {d.label}\r\n </motion.text>\r\n ) : highlightedDataPoints.length !== 0 ? (\r\n highlightedDataPoints.indexOf(d.label) !== -1 ? (\r\n <motion.text\r\n variants={{\r\n initial: {\r\n y: y(d.y2),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n opacity: 0,\r\n },\r\n whileInView: {\r\n y: y(d.y2),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n textAnchor: 'start',\r\n ...(styles?.yAxis?.labels || {}),\r\n }}\r\n className={cn('text-xs', classNames?.yAxis?.labels)}\r\n x={graphWidth - 5}\r\n dy='0.33em'\r\n dx={3}\r\n >\r\n {d.label}\r\n </motion.text>\r\n ) : null\r\n ) : null}\r\n <motion.line\r\n variants={{\r\n initial: {\r\n x1: radius,\r\n x2: graphWidth - radius,\r\n y1: y(d.y1),\r\n y2: y(d.y1),\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n },\r\n whileInView: {\r\n x1: radius,\r\n x2: graphWidth - radius,\r\n y1: y(d.y1),\r\n y2: y(d.y2),\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n className={classNames?.dataConnectors}\r\n style={{\r\n fill: 'none',\r\n strokeWidth: 1,\r\n ...styles?.dataConnectors,\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <Modal\r\n open={mouseClickData !== undefined}\r\n onClose={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n >\r\n <div\r\n className='graph-modal-content m-0'\r\n dangerouslySetInnerHTML={\r\n typeof detailsOnClick === 'string'\r\n ? { __html: string2HTML(detailsOnClick, mouseClickData) }\r\n : undefined\r\n }\r\n >\r\n {typeof detailsOnClick === 'function' ? detailsOnClick(mouseClickData) : null}\r\n </div>\r\n </Modal>\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect } from 'react';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n Languages,\r\n SlopeChartDataType,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n} from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { ColorLegendWithMouseOver } from '@/Components/Elements/ColorLegendWithMouseOver';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\r\nimport { uniqBy } from '@/Utils/uniqBy';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: SlopeChartDataType[];\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Color or array of colors for circles */\r\n colors?: string | string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n /** Left margin of the graph */\r\n leftMargin?: number;\r\n /** Right margin of the graph */\r\n rightMargin?: number;\r\n /** Top margin of the graph */\r\n topMargin?: number;\r\n /** Bottom margin of the graph */\r\n bottomMargin?: number;\r\n /** Toggles the background to fill the container. This only works if the width of the graph is defined. */\r\n fillContainer?: boolean;\r\n\r\n // Values and Ticks\r\n /** Maximum value for the chart */\r\n maxValue?: number;\r\n /** Minimum value for the chart */\r\n minValue?: number;\r\n\r\n // Graph Parameters\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Radius of the circles */\r\n radius?: number;\r\n /** Title for the two axis */\r\n axisTitles?: [string, string];\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle visibility of NA color in the color scale. This is only applicable if the data props hae color parameter and showColorScale prop is true */\r\n showNAColor?: boolean;\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function SlopeChart(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n showLabels = false,\r\n height,\r\n width,\r\n footNote,\r\n colorDomain,\r\n colorLegendTitle,\r\n radius = 5,\r\n axisTitles = ['', ''],\r\n padding,\r\n backgroundColor = false,\r\n leftMargin = 50,\r\n rightMargin = 50,\r\n topMargin = 20,\r\n bottomMargin = 20,\r\n tooltip,\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n showColorScale = true,\r\n highlightedDataPoints = [],\r\n graphID,\r\n minValue,\r\n maxValue,\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n fillContainer = true,\r\n language = 'en',\r\n showNAColor = true,\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={fillContainer ? undefined : width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {data.length === 0 ? (\r\n <EmptyState />\r\n ) : (\r\n <>\r\n {showColorScale && data.filter(el => el.color).length !== 0 ? (\r\n <ColorLegendWithMouseOver\r\n width={width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={(colors as string[] | undefined) || Colors[theme].categoricalColors.colors}\r\n colorDomain={colorDomain || (uniqBy(data, 'color', true) as string[])}\r\n setSelectedColor={setSelectedColor}\r\n showNAColor={showNAColor}\r\n className={classNames?.colorLegend}\r\n />\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight ? (\r\n <Graph\r\n data={data.filter(\r\n d => !checkIfNullOrUndefined(d.y1) && !checkIfNullOrUndefined(d.y2),\r\n )}\r\n width={fillContainer || !width ? svgWidth : svgWidth < width ? svgWidth : width}\r\n height={svgHeight}\r\n colorDomain={\r\n data.filter(el => el.color).length === 0\r\n ? []\r\n : colorDomain || (uniqBy(data, 'color', true) as string[])\r\n }\r\n colors={\r\n data.filter(el => el.color).length === 0\r\n ? colors\r\n ? [colors as string]\r\n : [Colors.primaryColors['blue-600']]\r\n : (colors as string[] | undefined) || Colors[theme].categoricalColors.colors\r\n }\r\n selectedColor={selectedColor}\r\n axisTitles={axisTitles}\r\n showLabels={showLabels}\r\n radius={radius}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n highlightedDataPoints={highlightedDataPoints}\r\n minValue={minValue}\r\n maxValue={maxValue}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n dimmedOpacity={dimmedOpacity}\r\n customLayers={customLayers}\r\n />\r\n ) : null}\r\n </GraphArea>\r\n </>\r\n )}\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["Graph","props","$","_c","data","width","height","showLabels","colors","colorDomain","radius","leftMargin","rightMargin","topMargin","bottomMargin","tooltip","onSeriesMouseOver","axisTitles","highlightedDataPoints","selectedColor","minValue","maxValue","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","animate","dimmedOpacity","customLayers","svgRef","useRef","t0","amount","once","isInView","useInView","mouseOverData","setMouseOverData","useState","undefined","mouseClickData","setMouseClickData","eventX","setEventX","eventY","setEventY","t1","top","bottom","left","right","margin","graphWidth","graphHeight","t2","Math","min","map","_temp","t3","_temp2","minY","t4","max","_temp3","t5","_temp4","maxY","T0","T1","t10","t11","t12","t13","t14","t15","t16","t6","t7","t8","t9","duration","dataConnectors","yAxis","axis","labels","title","t17","checkIfNullOrUndefined","t18","y","scaleLinear","domain","range","nice","motion","svg","t19","t20","cn","t21","t22","jsx","Axis","t23","t24","t25","t26","t27","AxisTitle","t28","t29","t30","t31","t32","t33","t34","t35","t36","t37","t38","t39","filter","_temp5","_temp6","AnimatePresence","d_5","i","jsxs","initial","opacity","d","color","indexOf","label","length","whileInView","transition","event","clientY","clientX","event_0","isEqual","cx","cy","y1","fill","_temp7","Colors","gray","stroke","_temp8","_temp9","_temp0","fillOpacity","_temp1","_temp10","textAnchor","_temp11","_temp12","y2","_temp13","_temp14","_temp15","_temp16","_temp17","_temp18","_temp19","_temp20","x1","x2","_temp21","_temp22","strokeWidth","_temp23","_temp24","Tooltip","Modal","__html","string2HTML","Fragment","d_7","layer","d_6","position","el_16","el","el_15","el_14","el_13","el_12","el_11","el_10","el_9","el_8","el_7","el_6","el_5","el_4","el_3","el_2","el_1","el_0","d_4","d_3","d_2","d_1","d_0","SlopeChart","graphTitle","sources","graphDescription","footNote","colorLegendTitle","padding","backgroundColor","relativeHeight","showColorScale","graphID","graphDownload","dataDownload","fillContainer","language","showNAColor","minHeight","theme","ariaLabel","svgWidth","setSvgWidth","svgHeight","setSvgHeight","setSelectedColor","graphDiv","graphParentDiv","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","current","observe","disconnect","useEffect","graphContainer","description","GraphHeader","EmptyState","ColorLegendWithMouseOver","categoricalColors","uniqBy","colorLegend","GraphArea","primaryColors","footnote","source","GraphFooter","GraphContainer"],"mappings":";;;;;;;;;;;;;;;;;;;;AAsDO,SAAAA,GAAAC,GAAA;AAAA,QAAAC,IAAAC,GAAAA,EAAA,GAAA,GACL;AAAA,IAAAC,MAAAA;AAAAA,IAAAC,OAAAA;AAAAA,IAAAC,QAAAA;AAAAA,IAAAC,YAAAA;AAAAA,IAAAC,QAAAA;AAAAA,IAAAC,aAAAA;AAAAA,IAAAC,QAAAA;AAAAA,IAAAC,YAAAA;AAAAA,IAAAC,aAAAA;AAAAA,IAAAC,WAAAA;AAAAA,IAAAC,cAAAA;AAAAA,IAAAC,SAAAA;AAAAA,IAAAC,mBAAAA;AAAAA,IAAAC,YAAAA;AAAAA,IAAAC,uBAAAA;AAAAA,IAAAC,eAAAA;AAAAA,IAAAC,UAAAA;AAAAA,IAAAC,UAAAA;AAAAA,IAAAC,oBAAAA;AAAAA,IAAAC,6BAAAA;AAAAA,IAAAC,gBAAAA;AAA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,QAAAI,GAAAJ,QAAA6N,GAAA7N,QAAA+N,GAAA/N,QAAAqN,GAAArN,QAAAuN,GAAAvN,QAAA0G,GAAA1G,QAAA2G,IAAA3G,QAAA6G,IAAA7G,QAAA8G,IAAA9G,QAAA+G,IAAA/G,QAAAgH,GAAAhH,QAAAgO,GAAAhO,QAAAiH,KAAAA,IAAAjH,EAAA,EAAA,GAnHjBiH;AAmHiB;AApLd,SAAAsC,GAAAiD,GAAA;AAAA,SAoI6Bf,EAAEtD;AAAM;AApIrC,SAAAmB,GAAAmD,GAAA;AAAA,SA+H6BhB,EAAEtD;AAAM;AA/HrC,SAAAe,GAAAwD,GAAA;AAAA,SA0HgB,CAACnH,GAAuB2C,EAACc,EAAG,KAA5B,CAAkCzD,GAAuB2C,EAAC6B,EAAG;AAAC;AA1H9E,SAAApC,GAAA8D,GAAA;AAAA,SA2GwCA,EAAEtD;AAAM;AA3GhD,SAAAT,GAAAmF,GAAA;AAAA,SAkG4B3E,MAAM5F;AAAS;AAlG3C,SAAA2B,GAAA6I,GAAA;AAAA,SAiG6C5E,MAAM5F;AAAS;AAjG5D,SAAAyB,GAAAmE,GAAA;AAAA,SAiGyBA,EAAChI;AAAK;AAjG/B,SAAAyD,GAAAgJ,GAAA;AAAA,SAgG2CzE,MAAM5F;AAAS;AAhG1D,SAAAmB,GAAAmJ,GAAA;AAAA,SAgGuB1E,EAAChI;AAAK;"}
1
+ {"version":3,"file":"SlopeChart.js","sources":["../src/Components/Graphs/SlopeChart/Graph.tsx","../src/Components/Graphs/SlopeChart/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport { useRef, useState } from 'react';\r\nimport { scaleLinear } from 'd3-scale';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n SlopeChartDataType,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { Axis } from '@/Components/Elements/Axes/Axis';\r\nimport { AxisTitle } from '@/Components/Elements/Axes/AxisTitle';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: SlopeChartDataType[];\r\n width: number;\r\n height: number;\r\n selectedColor?: string;\r\n showLabels: boolean;\r\n colors: string[];\r\n colorDomain: string[];\r\n radius: number;\r\n leftMargin: number;\r\n rightMargin: number;\r\n topMargin: number;\r\n bottomMargin: number;\r\n axisTitles: [string, string];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n highlightedDataPoints: (string | number)[];\r\n maxValue?: number;\r\n minValue?: number;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n width,\r\n height,\r\n showLabels,\r\n colors,\r\n colorDomain,\r\n radius,\r\n leftMargin,\r\n rightMargin,\r\n topMargin,\r\n bottomMargin,\r\n tooltip,\r\n onSeriesMouseOver,\r\n axisTitles,\r\n highlightedDataPoints,\r\n selectedColor,\r\n minValue,\r\n maxValue,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n } = props;\r\n const svgRef = useRef(null);\r\n const isInView = useInView(svgRef, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const margin = {\r\n top: topMargin,\r\n bottom: bottomMargin,\r\n left: leftMargin,\r\n right: rightMargin,\r\n };\r\n const graphWidth = width - margin.left - margin.right;\r\n const graphHeight = height - margin.top - margin.bottom;\r\n const minY = Math.min(Math.min(...data.map(d => d.y1)), Math.min(...data.map(d => d.y2)));\r\n const maxY = Math.max(Math.max(...data.map(d => d.y1)), Math.max(...data.map(d => d.y2)));\r\n const y = scaleLinear()\r\n .domain([\r\n checkIfNullOrUndefined(minValue) ? (minY > 0 ? 0 : minY) : (minValue as number),\r\n checkIfNullOrUndefined(maxValue) ? (maxY > 0 ? maxY : 0) : (maxValue as number),\r\n ])\r\n .range([graphHeight, 0])\r\n .nice();\r\n return (\r\n <>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n className='mx-auto'\r\n direction='ltr'\r\n ref={svgRef}\r\n >\r\n <g transform={`translate(${margin.left},${margin.top})`}>\r\n <g>\r\n <Axis\r\n y1={0}\r\n y2={graphHeight}\r\n x1={radius}\r\n x2={radius}\r\n classNames={{\r\n axis: cn(\r\n 'stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550',\r\n classNames?.yAxis?.axis,\r\n ),\r\n }}\r\n />\r\n <AxisTitle\r\n x={radius}\r\n y={graphHeight + 15}\r\n style={styles?.yAxis?.title}\r\n className={cn(\r\n 'fill-primary-gray-700 dark:fill-primary-gray-300 text-xs',\r\n classNames?.yAxis?.title,\r\n )}\r\n text={axisTitles[0]}\r\n />\r\n </g>\r\n <g>\r\n <Axis\r\n y1={0}\r\n y2={graphHeight}\r\n x1={graphWidth - radius}\r\n x2={graphWidth - radius}\r\n classNames={{\r\n axis: cn(\r\n 'stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550',\r\n classNames?.yAxis?.axis,\r\n ),\r\n }}\r\n />\r\n <AxisTitle\r\n x={graphWidth - radius}\r\n y={graphHeight + 15}\r\n style={styles?.yAxis?.title}\r\n className={cn(\r\n 'fill-primary-gray-700 dark:fill-primary-gray-300 text-xs',\r\n classNames?.yAxis?.title,\r\n )}\r\n text={axisTitles[1]}\r\n />\r\n </g>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n <AnimatePresence>\r\n {data.map((d, i) => {\r\n return (\r\n <motion.g\r\n key={i}\r\n variants={{\r\n initial: {\r\n opacity: selectedColor\r\n ? d.color\r\n ? colors[colorDomain.indexOf(`${d.color}`)] === selectedColor\r\n ? 1\r\n : dimmedOpacity\r\n : dimmedOpacity\r\n : mouseOverData\r\n ? mouseOverData.label === d.label\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedDataPoints.length !== 0\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? d.color\r\n ? colors[colorDomain.indexOf(`${d.color}`)] === selectedColor\r\n ? 1\r\n : dimmedOpacity\r\n : dimmedOpacity\r\n : mouseOverData\r\n ? mouseOverData.label === d.label\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedDataPoints.length !== 0\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n >\r\n <motion.circle\r\n variants={{\r\n initial: {\r\n cx: radius,\r\n cy: y(d.y1),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n opacity: 0,\r\n },\r\n whileInView: {\r\n cx: radius,\r\n cy: y(d.y1),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n r={radius}\r\n style={{\r\n fillOpacity: 0.6,\r\n }}\r\n />\r\n {showLabels ? (\r\n <motion.text\r\n variants={{\r\n initial: {\r\n y: y(d.y1),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n opacity: 0,\r\n },\r\n whileInView: {\r\n y: y(d.y1),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n textAnchor: 'end',\r\n ...(styles?.yAxis?.labels || {}),\r\n }}\r\n className={cn('text-xs', classNames?.yAxis?.labels)}\r\n x={5}\r\n dy='0.33em'\r\n textAnchor='end'\r\n dx={0 - radius - 3}\r\n >\r\n {d.label}\r\n </motion.text>\r\n ) : highlightedDataPoints.length !== 0 ? (\r\n highlightedDataPoints.indexOf(d.label) !== -1 ? (\r\n <motion.text\r\n variants={{\r\n initial: {\r\n y: y(d.y1),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n opacity: 0,\r\n },\r\n whileInView: {\r\n y: y(d.y1),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n textAnchor: 'end',\r\n ...(styles?.yAxis?.labels || {}),\r\n }}\r\n className={cn('text-xs', classNames?.yAxis?.labels)}\r\n x={5}\r\n dy='0.33em'\r\n dx={-3}\r\n >\r\n {d.label}\r\n </motion.text>\r\n ) : null\r\n ) : null}\r\n <motion.circle\r\n variants={{\r\n initial: {\r\n cx: graphWidth - radius,\r\n cy: y(d.y2),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n opacity: 0,\r\n },\r\n whileInView: {\r\n cx: graphWidth - radius,\r\n cy: y(d.y2),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n r={radius}\r\n style={{\r\n fillOpacity: 0.6,\r\n }}\r\n />\r\n {showLabels ? (\r\n <motion.text\r\n variants={{\r\n initial: {\r\n y: y(d.y2),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n opacity: 0,\r\n },\r\n whileInView: {\r\n y: y(d.y2),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n textAnchor: 'start',\r\n ...(styles?.yAxis?.labels || {}),\r\n }}\r\n className={cn('text-xs', classNames?.yAxis?.labels)}\r\n x={graphWidth - 5}\r\n dy='0.33em'\r\n dx={radius + 3}\r\n >\r\n {d.label}\r\n </motion.text>\r\n ) : highlightedDataPoints.length !== 0 ? (\r\n highlightedDataPoints.indexOf(d.label) !== -1 ? (\r\n <motion.text\r\n variants={{\r\n initial: {\r\n y: y(d.y2),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n opacity: 0,\r\n },\r\n whileInView: {\r\n y: y(d.y2),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n textAnchor: 'start',\r\n ...(styles?.yAxis?.labels || {}),\r\n }}\r\n className={cn('text-xs', classNames?.yAxis?.labels)}\r\n x={graphWidth - 5}\r\n dy='0.33em'\r\n dx={3}\r\n >\r\n {d.label}\r\n </motion.text>\r\n ) : null\r\n ) : null}\r\n <motion.line\r\n variants={{\r\n initial: {\r\n x1: radius,\r\n x2: graphWidth - radius,\r\n y1: y(d.y1),\r\n y2: y(d.y1),\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n },\r\n whileInView: {\r\n x1: radius,\r\n x2: graphWidth - radius,\r\n y1: y(d.y1),\r\n y2: y(d.y2),\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n className={classNames?.dataConnectors}\r\n style={{\r\n fill: 'none',\r\n strokeWidth: 1,\r\n ...styles?.dataConnectors,\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect } from 'react';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n Languages,\r\n SlopeChartDataType,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n} from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { ColorLegendWithMouseOver } from '@/Components/Elements/ColorLegendWithMouseOver';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\r\nimport { uniqBy } from '@/Utils/uniqBy';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: SlopeChartDataType[];\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Color or array of colors for circles */\r\n colors?: string | string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n /** Left margin of the graph */\r\n leftMargin?: number;\r\n /** Right margin of the graph */\r\n rightMargin?: number;\r\n /** Top margin of the graph */\r\n topMargin?: number;\r\n /** Bottom margin of the graph */\r\n bottomMargin?: number;\r\n /** Toggles the background to fill the container. This only works if the width of the graph is defined. */\r\n fillContainer?: boolean;\r\n\r\n // Values and Ticks\r\n /** Maximum value for the chart */\r\n maxValue?: number;\r\n /** Minimum value for the chart */\r\n minValue?: number;\r\n\r\n // Graph Parameters\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Radius of the circles */\r\n radius?: number;\r\n /** Title for the two axis */\r\n axisTitles?: [string, string];\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle visibility of NA color in the color scale. This is only applicable if the data props hae color parameter and showColorScale prop is true */\r\n showNAColor?: boolean;\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function SlopeChart(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n showLabels = false,\r\n height,\r\n width,\r\n footNote,\r\n colorDomain,\r\n colorLegendTitle,\r\n radius = 5,\r\n axisTitles = ['', ''],\r\n padding,\r\n backgroundColor = false,\r\n leftMargin = 50,\r\n rightMargin = 50,\r\n topMargin = 20,\r\n bottomMargin = 20,\r\n tooltip,\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n showColorScale = true,\r\n highlightedDataPoints = [],\r\n graphID,\r\n minValue,\r\n maxValue,\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n fillContainer = true,\r\n language = 'en',\r\n showNAColor = true,\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={fillContainer ? undefined : width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {data.length === 0 ? (\r\n <EmptyState />\r\n ) : (\r\n <>\r\n {showColorScale && data.filter(el => el.color).length !== 0 ? (\r\n <ColorLegendWithMouseOver\r\n width={width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={(colors as string[] | undefined) || Colors[theme].categoricalColors.colors}\r\n colorDomain={colorDomain || (uniqBy(data, 'color', true) as string[])}\r\n setSelectedColor={setSelectedColor}\r\n showNAColor={showNAColor}\r\n className={classNames?.colorLegend}\r\n />\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight ? (\r\n <Graph\r\n data={data.filter(\r\n d => !checkIfNullOrUndefined(d.y1) && !checkIfNullOrUndefined(d.y2),\r\n )}\r\n width={fillContainer || !width ? svgWidth : svgWidth < width ? svgWidth : width}\r\n height={svgHeight}\r\n colorDomain={\r\n data.filter(el => el.color).length === 0\r\n ? []\r\n : colorDomain || (uniqBy(data, 'color', true) as string[])\r\n }\r\n colors={\r\n data.filter(el => el.color).length === 0\r\n ? colors\r\n ? [colors as string]\r\n : [Colors.primaryColors['blue-600']]\r\n : (colors as string[] | undefined) || Colors[theme].categoricalColors.colors\r\n }\r\n selectedColor={selectedColor}\r\n axisTitles={axisTitles}\r\n showLabels={showLabels}\r\n radius={radius}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n highlightedDataPoints={highlightedDataPoints}\r\n minValue={minValue}\r\n maxValue={maxValue}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n dimmedOpacity={dimmedOpacity}\r\n customLayers={customLayers}\r\n />\r\n ) : null}\r\n </GraphArea>\r\n </>\r\n )}\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["Graph","props","$","_c","data","width","height","showLabels","colors","colorDomain","radius","leftMargin","rightMargin","topMargin","bottomMargin","tooltip","onSeriesMouseOver","axisTitles","highlightedDataPoints","selectedColor","minValue","maxValue","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","animate","dimmedOpacity","customLayers","svgRef","useRef","t0","amount","once","isInView","useInView","mouseOverData","setMouseOverData","useState","undefined","mouseClickData","setMouseClickData","eventX","setEventX","eventY","setEventY","t1","top","bottom","left","right","margin","graphWidth","graphHeight","t2","Math","min","map","_temp","t3","_temp2","minY","t4","max","_temp3","t5","_temp4","maxY","T0","T1","t10","t11","t12","t13","t14","t15","t16","t6","t7","t8","t9","duration","dataConnectors","yAxis","axis","labels","title","t17","checkIfNullOrUndefined","t18","y","scaleLinear","domain","range","nice","motion","svg","t19","t20","cn","t21","t22","jsx","Axis","t23","t24","t25","t26","t27","AxisTitle","t28","t29","t30","t31","t32","t33","t34","t35","t36","t37","t38","t39","filter","_temp5","_temp6","AnimatePresence","d_5","i","jsxs","initial","opacity","d","color","indexOf","label","length","whileInView","transition","event","clientY","clientX","event_0","isEqual","cx","cy","y1","fill","_temp7","Colors","gray","stroke","_temp8","_temp9","_temp0","fillOpacity","_temp1","_temp10","textAnchor","_temp11","_temp12","y2","_temp13","_temp14","_temp15","_temp16","_temp17","_temp18","_temp19","_temp20","x1","x2","_temp21","_temp22","strokeWidth","_temp23","_temp24","Tooltip","modal","DetailsModal","Fragment","d_7","layer","d_6","position","el_16","el","el_15","el_14","el_13","el_12","el_11","el_10","el_9","el_8","el_7","el_6","el_5","el_4","el_3","el_2","el_1","el_0","d_4","d_3","d_2","d_1","d_0","SlopeChart","graphTitle","sources","graphDescription","footNote","colorLegendTitle","padding","backgroundColor","relativeHeight","showColorScale","graphID","graphDownload","dataDownload","fillContainer","language","showNAColor","minHeight","theme","ariaLabel","svgWidth","setSvgWidth","svgHeight","setSvgHeight","setSelectedColor","graphDiv","graphParentDiv","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","current","observe","disconnect","useEffect","graphContainer","description","GraphHeader","EmptyState","ColorLegendWithMouseOver","categoricalColors","uniqBy","colorLegend","GraphArea","primaryColors","footnote","source","GraphFooter","GraphContainer"],"mappings":";;;;;;;;;;;;;;;;;;;AAqDO,SAAAA,GAAAC,GAAA;AAAA,QAAAC,IAAAC,GAAAA,EAAA,GAAA,GACL;AAAA,IAAAC,MAAAA;AAAAA,IAAAC,OAAAA;AAAAA,IAAAC,QAAAA;AAAAA,IAAAC,YAAAA;AAAAA,IAAAC,QAAAA;AAAAA,IAAAC,aAAAA;AAAAA,IAAAC,QAAAA;AAAAA,IAAAC,YAAAA;AAAAA,IAAAC,aAAAA;AAAAA,IAAAC,WAAAA;AAAAA,IAAAC,cAAAA;AAAAA,IAAAC,SAAAA;AAAAA,IAAAC,mBAAAA;AAAAA,IAAAC,YAAAA;AAAAA,IAAAC,uBAAAA;AAAAA,IAAAC,eAAAA;AAAAA,IAAAC,UAAAA;AAAAA,IAAAC,UAAAA;AAAAA,IAAAC,oBAAAA;AAAAA,IAAAC,6BAAAA;AAAAA,IAAAC,gBAAAA;AAAAA,IAAAC,QAAAA;AAAAA,IAAAC,YAAAA;AAAAA,IAAAC,SAAAA;AAAAA,IAAAC,eAAAA;AAAAA,IAAAC,cAAAA;AAAAA,EAAAA,IA2BI5B,GACJ6B,KAAeC,GAAO,IAAI;AAAE,MAAAC;AAAA,EAAA9B,EAAA,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GAAA;AAAA,SA+H6BhB,EAAErD;AAAM;AA/HrC,SAAAe,GAAAuD,GAAA;AAAA,SA0HgB,CAAClH,GAAuB2C,EAACc,EAAG,KAA5B,CAAkCzD,GAAuB2C,EAAC6B,EAAG;AAAC;AA1H9E,SAAApC,GAAA6D,GAAA;AAAA,SA2GwCA,EAAErD;AAAM;AA3GhD,SAAAT,GAAAkF,GAAA;AAAA,SAkG4B1E,MAAM5F;AAAS;AAlG3C,SAAA2B,GAAA4I,GAAA;AAAA,SAiG6C3E,MAAM5F;AAAS;AAjG5D,SAAAyB,GAAAmE,GAAA;AAAA,SAiGyBA,EAAChI;AAAK;AAjG/B,SAAAyD,GAAA+I,GAAA;AAAA,SAgG2CxE,MAAM5F;AAAS;AAhG1D,SAAAmB,GAAAkJ,GAAA;AAAA,SAgGuBzE,EAAChI;AAAK;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CHPV5EwG-CTPQjnHt.cjs"),M=require("react"),Rt=require("./parse-hMnG_lRV.cjs"),_t=require("./index-Cno4Q0YE.cjs"),Ct=require("./Tooltip-4dJo4_AF.cjs"),bt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),wt=require("./time-CZd5YLSP.cjs"),$t=require("./linear-BwPAspcq.cjs"),Dt=require("./area-D3Qx7k7K.cjs"),Mt=require("./line-DHV4JwCR.cjs"),vt=require("./step-BZ3C8QFW.cjs"),kt=require("./select-Bnfk0lJx.cjs"),Nt=require("./init-DU0ybBc_.cjs"),Ot=require("./pointer-Dkq5NV1q.cjs"),Gt=require("./GraphFooter.cjs"),At=require("./GraphHeader.cjs"),Ht=require("./Colors.cjs"),It=require("./generateRandomString-B5zBiJzS.cjs"),St=require("./GraphContainer-d8A46BK2.cjs");function Pt(e){const t=r.compilerRuntimeExports.c(71),{data:j,width:w,height:V,lineColor:a,dateFormat:l,areaId:S,leftMargin:c,rightMargin:$,topMargin:rt,bottomMargin:nt,tooltip:D,onSeriesMouseOver:W,minValue:Y,maxValue:B,curveType:X,styles:k,classNames:q,customLayers:R}=e,it=X==="linear"?Mt.curveLinear:X==="step"?vt.curveStep:X==="stepAfter"?vt.stepAfter:X==="stepBefore"?vt.stepBefore:vt.monotoneX,[f,st]=M.useState(void 0),[N,at]=M.useState(void 0),[U,ct]=M.useState(void 0);let z;t[0]!==nt||t[1]!==c||t[2]!==$||t[3]!==rt?(z={top:rt,bottom:nt,left:c,right:$},t[0]=nt,t[1]=c,t[2]=$,t[3]=rt,t[4]=z):z=t[4];const _=z,O=M.useRef(null);let J;t[5]!==l?(J=d=>({...d,date:Rt.parse(`${d.date}`,l,new Date)}),t[5]=l,t[6]=J):J=t[6];const o=_t.orderBy(j.map(J),["date"],["asc"]),n=w-_.left-_.right,i=V-_.top-_.bottom,ut=o[0].date,pt=o[o.length-1].date,K=Math.min(...o.map(te).filter(Zt))!==1/0?Math.min(...o.map(Qt).filter(Kt))>0?0:Math.min(...o.map(Jt).filter(zt)):0,G=Math.max(...o.map(Ut).filter(Xt))!==1/0?Math.max(...o.map(Bt).filter(Yt)):0,s=wt.time().domain([ut,pt]).range([0,n]);let A;t[7]!==K||t[8]!==Y?(A=bt.checkIfNullOrUndefined(Y)?K:Y,t[7]=K,t[8]=Y,t[9]=A):A=t[9];let H;t[10]!==G||t[11]!==B?(H=bt.checkIfNullOrUndefined(B)?G>0?G:0:B,t[10]=G,t[11]=B,t[12]=H):H=t[12];const I=$t.linear().domain([A,H]).range([i,0]).nice(),lt=Dt.area().x(d=>s(d.date)).y1(d=>I(d.y)).y0(i).curve(it),mt=Mt.line().x(d=>s(d.date)).y(d=>I(d.y)).curve(it);M.useEffect(()=>{const d=jt=>{const Et=o[Nt.bisectCenter(o.map(Wt),s.invert(Ot.pointer(jt)[0]),0)];st(Et||o[o.length-1]),W?.(Et||o[o.length-1]),ct(jt.clientY),at(jt.clientX)},qt=()=>{st(void 0),W?.(void 0),at(void 0),ct(void 0)};kt.select(O.current).on("mousemove",d).on("mouseout",qt),W?.(void 0)},[s,o,W]);let P;t[13]!==S||t[14]!==a?(P=S?r.jsxRuntimeExports.jsxs("linearGradient",{id:S,x1:"0",x2:"0",y1:"0",y2:"1",children:[r.jsxRuntimeExports.jsx("stop",{style:{stopColor:a},stopOpacity:"0.1",offset:"0%"}),r.jsxRuntimeExports.jsx("stop",{style:{stopColor:a},stopOpacity:"0",offset:"100%"})]}):null,t[13]=S,t[14]=a,t[15]=P):P=t[15];let F;t[16]!==R?(F=R.filter(Vt).map(Tt),t[16]=R,t[17]=F):F=t[17];const Q=q?.xAxis?.labels;let x;t[18]!==Q?(x=r.mo("xs:max-[360px]:hidden fill-primary-gray-700 dark:fill-primary-gray-300 text-[9px] md:text-[10px] lg:text-xs",Q),t[18]=Q,t[19]=x):x=t[19];const Z=o[o.length-1];let h;t[20]!==Z.date||t[21]!==s?(h=s(Z.date),t[20]=Z.date,t[21]=s,t[22]=h):h=t[22];const dt=k?.xAxis?.labels;let g;t[23]!==dt?(g={textAnchor:"end",...dt},t[23]=dt,t[24]=g):g=t[24];const ft=o[o.length-1];let E;t[25]!==l||t[26]!==ft.date?(E=Rt.format(ft.date,l),t[25]=l,t[26]=ft.date,t[27]=E):E=t[27];let C;t[28]!==i||t[29]!==g||t[30]!==E||t[31]!==x||t[32]!==h?(C=r.jsxRuntimeExports.jsx("text",{className:x,y:i,x:h,style:g,dy:"1em",children:E}),t[28]=i,t[29]=g,t[30]=E,t[31]=x,t[32]=h,t[33]=C):C=t[33];let y;t[34]!==o||t[35]!==s?(y=s(o[0].date),t[34]=o,t[35]=s,t[36]=y):y=t[36];const L=k?.xAxis?.labels;let b;t[37]!==L?(b={textAnchor:"start",...L},t[37]=L,t[38]=b):b=t[38];const tt=q?.xAxis?.labels;let u;t[39]!==tt?(u=r.mo("xs:max-[360px]:hidden fill-primary-gray-700 dark:fill-primary-gray-300 text-[9px] md:text-[10px] lg:text-xs",tt),t[39]=tt,t[40]=u):u=t[40];let p;t[41]!==o||t[42]!==l?(p=Rt.format(o[0].date,l),t[41]=o,t[42]=l,t[43]=p):p=t[43];let m;t[44]!==i||t[45]!==y||t[46]!==b||t[47]!==u||t[48]!==p?(m=r.jsxRuntimeExports.jsx("text",{y:i,x:y,style:b,className:u,dy:"1em",children:p}),t[44]=i,t[45]=y,t[46]=b,t[47]=u,t[48]=p,t[49]=m):m=t[49];let v;t[50]!==C||t[51]!==m?(v=r.jsxRuntimeExports.jsxs("g",{children:[C,m]}),t[50]=C,t[51]=m,t[52]=v):v=t[52];const T=`url(#${S})`;let et;t[53]!==T?(et={fill:T,clipPath:"url(#clip)"},t[53]=T,t[54]=et):et=t[54];let ot;t[55]!==a?(ot={stroke:a,fill:"none",strokeWidth:2},t[55]=a,t[56]=ot):ot=t[56];let xt;t[57]!==R?(xt=R.filter(Lt).map(Ft),t[57]=R,t[58]=xt):xt=t[58];let ht;t[59]===Symbol.for("react.memo_cache_sentinel")?(ht={fill:"none",pointerEvents:"all"},t[59]=ht):ht=t[59];let gt;t[60]!==O||t[61]!==i||t[62]!==n?(gt=r.jsxRuntimeExports.jsx("rect",{ref:O,style:ht,width:n,height:i}),t[60]=O,t[61]=i,t[62]=n,t[63]=gt):gt=t[63];let yt;return t[64]!==q?.tooltip||t[65]!==N||t[66]!==U||t[67]!==f||t[68]!==k?.tooltip||t[69]!==D?(yt=f&&D&&N&&U?r.jsxRuntimeExports.jsx(Ct.Tooltip,{data:f,body:D,xPos:N,yPos:U,backgroundStyle:k?.tooltip,className:q?.tooltip}):null,t[64]=q?.tooltip,t[65]=N,t[66]=U,t[67]=f,t[68]=k?.tooltip,t[69]=D,t[70]=yt):yt=t[70],r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsxs("svg",{width:`${w}px`,height:`${V}px`,viewBox:`0 0 ${w} ${V}`,direction:"ltr",children:[P,r.jsxRuntimeExports.jsxs("g",{transform:`translate(${_.left},${_.top})`,children:[F,v,r.jsxRuntimeExports.jsxs("g",{children:[r.jsxRuntimeExports.jsx("path",{d:lt(o)||"",style:et}),r.jsxRuntimeExports.jsx("path",{d:mt(o)||"",style:ot}),f?r.jsxRuntimeExports.jsx("circle",{y1:0,cy:I(f.y),cx:s(f.date),r:5,style:{fill:a}}):null]}),xt,gt]})]}),yt]})}function Ft(e){return e.layer}function Lt(e){return e.position==="after"}function Tt(e){return e.layer}function Vt(e){return e.position==="before"}function Wt(e){return e.date}function Yt(e){return e!=null}function Bt(e){return e.y}function Xt(e){return e!=null}function Ut(e){return e.y}function zt(e){return e!=null}function Jt(e){return e.y}function Kt(e){return e!=null}function Qt(e){return e.y}function Zt(e){return e!=null}function te(e){return e.y}function ee(e){const t=r.compilerRuntimeExports.c(60),{data:j,graphTitle:w,lineColor:V,sources:a,graphDescription:l,height:S,width:c,footNote:$,dateFormat:rt,area:nt,padding:D,backgroundColor:W,leftMargin:Y,rightMargin:B,topMargin:X,bottomMargin:k,tooltip:q,relativeHeight:R,onSeriesMouseOver:it,graphID:f,minValue:st,maxValue:N,graphDownload:at,dataDownload:U,language:ct,minHeight:z,theme:_,ariaLabel:O,curveType:J,styles:o,classNames:n,customLayers:i}=e,ut=rt===void 0?"yyyy":rt,pt=nt===void 0?!1:nt,K=W===void 0?!0:W,G=Y===void 0?5:Y,s=B===void 0?5:B,A=X===void 0?10:X,H=k===void 0?20:k,I=at===void 0?!1:at,lt=U===void 0?!1:U,mt=ct===void 0?"en":ct,P=z===void 0?0:z,F=_===void 0?"light":_,Q=J===void 0?"curve":J;let x;t[0]!==i?(x=i===void 0?[]:i,t[0]=i,t[1]=x):x=t[1];const Z=x,[h,dt]=M.useState(0),[g,ft]=M.useState(0),E=M.useRef(null),C=M.useRef(null);let y,L;t[2]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{const et=new ResizeObserver(ot=>{dt(ot[0].target.clientWidth||620),ft(ot[0].target.clientHeight||480)});return E.current&&et.observe(E.current),()=>et.disconnect()},L=[],t[2]=y,t[3]=L):(y=t[2],L=t[3]),M.useEffect(y,L);const b=n?.graphContainer,tt=o?.graphContainer;let u;t[4]!==n?.description||t[5]!==n?.title||t[6]!==j||t[7]!==lt||t[8]!==l||t[9]!==I||t[10]!==w||t[11]!==o?.description||t[12]!==o?.title||t[13]!==c?(u=w||l||I||lt?r.jsxRuntimeExports.jsx(At.GraphHeader,{styles:{title:o?.title,description:o?.description},classNames:{title:n?.title,description:n?.description},graphTitle:w,graphDescription:l,width:c,graphDownload:I?C:void 0,dataDownload:lt?j.map(se).filter(ie).length>0?j.map(ne).filter(re):j.filter(oe):null}):null,t[4]=n?.description,t[5]=n?.title,t[6]=j,t[7]=lt,t[8]=l,t[9]=I,t[10]=w,t[11]=o?.description,t[12]=o?.title,t[13]=c,t[14]=u):u=t[14];let p;t[15]!==pt||t[16]!==H||t[17]!==n||t[18]!==Q||t[19]!==Z||t[20]!==j||t[21]!==ut||t[22]!==G||t[23]!==V||t[24]!==N||t[25]!==st||t[26]!==it||t[27]!==s||t[28]!==o||t[29]!==g||t[30]!==h||t[31]!==q||t[32]!==A?(p=h&&g?r.jsxRuntimeExports.jsx(Pt,{data:j,lineColor:V||Ht.Colors.primaryColors["blue-600"],width:h,height:g,dateFormat:ut,areaId:pt?It.generateRandomString(8):void 0,leftMargin:G,rightMargin:s,topMargin:A,bottomMargin:H,tooltip:q,onSeriesMouseOver:it,minValue:st,maxValue:N,curveType:Q,styles:o,classNames:n,customLayers:Z}):null,t[15]=pt,t[16]=H,t[17]=n,t[18]=Q,t[19]=Z,t[20]=j,t[21]=ut,t[22]=G,t[23]=V,t[24]=N,t[25]=st,t[26]=it,t[27]=s,t[28]=o,t[29]=g,t[30]=h,t[31]=q,t[32]=A,t[33]=p):p=t[33];let m;t[34]!==p?(m=r.jsxRuntimeExports.jsx(St.GraphArea,{ref:E,children:p}),t[34]=p,t[35]=m):m=t[35];let v;t[36]!==n?.footnote||t[37]!==n?.source||t[38]!==$||t[39]!==a||t[40]!==o?.footnote||t[41]!==o?.source||t[42]!==c?(v=a||$?r.jsxRuntimeExports.jsx(Gt.GraphFooter,{styles:{footnote:o?.footnote,source:o?.source},classNames:{footnote:n?.footnote,source:n?.source},sources:a,footNote:$,width:c}):null,t[36]=n?.footnote,t[37]=n?.source,t[38]=$,t[39]=a,t[40]=o?.footnote,t[41]=o?.source,t[42]=c,t[43]=v):v=t[43];let T;return t[44]!==O||t[45]!==K||t[46]!==f||t[47]!==S||t[48]!==mt||t[49]!==P||t[50]!==D||t[51]!==R||t[52]!==b||t[53]!==tt||t[54]!==u||t[55]!==m||t[56]!==v||t[57]!==F||t[58]!==c?(T=r.jsxRuntimeExports.jsxs(St.GraphContainer,{className:b,style:tt,id:f,ref:C,"aria-label":O,backgroundColor:K,theme:F,language:mt,minHeight:P,width:c,height:S,relativeHeight:R,padding:D,children:[u,m,v]}),t[44]=O,t[45]=K,t[46]=f,t[47]=S,t[48]=mt,t[49]=P,t[50]=D,t[51]=R,t[52]=b,t[53]=tt,t[54]=u,t[55]=m,t[56]=v,t[57]=F,t[58]=c,t[59]=T):T=t[59],T}function oe(e){return e!==void 0}function re(e){return e!==void 0}function ne(e){return e.data}function ie(e){return e!==void 0}function se(e){return e.data}exports.SparkLine=ee;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CHPV5EwG-CTPQjnHt.cjs"),M=require("react"),Rt=require("./parse-hMnG_lRV.cjs"),_t=require("./index-Cno4Q0YE.cjs"),Ct=require("./Tooltip-uUdw6wJL.cjs"),bt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),wt=require("./time-CZd5YLSP.cjs"),$t=require("./linear-BwPAspcq.cjs"),Dt=require("./area-D3Qx7k7K.cjs"),Mt=require("./line-DHV4JwCR.cjs"),vt=require("./step-BZ3C8QFW.cjs"),kt=require("./select-Bnfk0lJx.cjs"),Nt=require("./init-DU0ybBc_.cjs"),Ot=require("./pointer-Dkq5NV1q.cjs"),Gt=require("./GraphFooter.cjs"),At=require("./GraphHeader.cjs"),Ht=require("./Colors.cjs"),It=require("./generateRandomString-B5zBiJzS.cjs"),St=require("./GraphContainer-d8A46BK2.cjs");function Pt(e){const t=r.compilerRuntimeExports.c(71),{data:j,width:w,height:V,lineColor:a,dateFormat:l,areaId:S,leftMargin:c,rightMargin:$,topMargin:rt,bottomMargin:nt,tooltip:D,onSeriesMouseOver:W,minValue:Y,maxValue:B,curveType:X,styles:k,classNames:q,customLayers:R}=e,it=X==="linear"?Mt.curveLinear:X==="step"?vt.curveStep:X==="stepAfter"?vt.stepAfter:X==="stepBefore"?vt.stepBefore:vt.monotoneX,[f,st]=M.useState(void 0),[N,at]=M.useState(void 0),[U,ct]=M.useState(void 0);let z;t[0]!==nt||t[1]!==c||t[2]!==$||t[3]!==rt?(z={top:rt,bottom:nt,left:c,right:$},t[0]=nt,t[1]=c,t[2]=$,t[3]=rt,t[4]=z):z=t[4];const _=z,O=M.useRef(null);let J;t[5]!==l?(J=d=>({...d,date:Rt.parse(`${d.date}`,l,new Date)}),t[5]=l,t[6]=J):J=t[6];const o=_t.orderBy(j.map(J),["date"],["asc"]),n=w-_.left-_.right,i=V-_.top-_.bottom,ut=o[0].date,pt=o[o.length-1].date,K=Math.min(...o.map(te).filter(Zt))!==1/0?Math.min(...o.map(Qt).filter(Kt))>0?0:Math.min(...o.map(Jt).filter(zt)):0,G=Math.max(...o.map(Ut).filter(Xt))!==1/0?Math.max(...o.map(Bt).filter(Yt)):0,s=wt.time().domain([ut,pt]).range([0,n]);let A;t[7]!==K||t[8]!==Y?(A=bt.checkIfNullOrUndefined(Y)?K:Y,t[7]=K,t[8]=Y,t[9]=A):A=t[9];let H;t[10]!==G||t[11]!==B?(H=bt.checkIfNullOrUndefined(B)?G>0?G:0:B,t[10]=G,t[11]=B,t[12]=H):H=t[12];const I=$t.linear().domain([A,H]).range([i,0]).nice(),lt=Dt.area().x(d=>s(d.date)).y1(d=>I(d.y)).y0(i).curve(it),mt=Mt.line().x(d=>s(d.date)).y(d=>I(d.y)).curve(it);M.useEffect(()=>{const d=jt=>{const Et=o[Nt.bisectCenter(o.map(Wt),s.invert(Ot.pointer(jt)[0]),0)];st(Et||o[o.length-1]),W?.(Et||o[o.length-1]),ct(jt.clientY),at(jt.clientX)},qt=()=>{st(void 0),W?.(void 0),at(void 0),ct(void 0)};kt.select(O.current).on("mousemove",d).on("mouseout",qt),W?.(void 0)},[s,o,W]);let P;t[13]!==S||t[14]!==a?(P=S?r.jsxRuntimeExports.jsxs("linearGradient",{id:S,x1:"0",x2:"0",y1:"0",y2:"1",children:[r.jsxRuntimeExports.jsx("stop",{style:{stopColor:a},stopOpacity:"0.1",offset:"0%"}),r.jsxRuntimeExports.jsx("stop",{style:{stopColor:a},stopOpacity:"0",offset:"100%"})]}):null,t[13]=S,t[14]=a,t[15]=P):P=t[15];let F;t[16]!==R?(F=R.filter(Vt).map(Tt),t[16]=R,t[17]=F):F=t[17];const Q=q?.xAxis?.labels;let x;t[18]!==Q?(x=r.mo("xs:max-[360px]:hidden fill-primary-gray-700 dark:fill-primary-gray-300 text-[9px] md:text-[10px] lg:text-xs",Q),t[18]=Q,t[19]=x):x=t[19];const Z=o[o.length-1];let h;t[20]!==Z.date||t[21]!==s?(h=s(Z.date),t[20]=Z.date,t[21]=s,t[22]=h):h=t[22];const dt=k?.xAxis?.labels;let g;t[23]!==dt?(g={textAnchor:"end",...dt},t[23]=dt,t[24]=g):g=t[24];const ft=o[o.length-1];let E;t[25]!==l||t[26]!==ft.date?(E=Rt.format(ft.date,l),t[25]=l,t[26]=ft.date,t[27]=E):E=t[27];let C;t[28]!==i||t[29]!==g||t[30]!==E||t[31]!==x||t[32]!==h?(C=r.jsxRuntimeExports.jsx("text",{className:x,y:i,x:h,style:g,dy:"1em",children:E}),t[28]=i,t[29]=g,t[30]=E,t[31]=x,t[32]=h,t[33]=C):C=t[33];let y;t[34]!==o||t[35]!==s?(y=s(o[0].date),t[34]=o,t[35]=s,t[36]=y):y=t[36];const L=k?.xAxis?.labels;let b;t[37]!==L?(b={textAnchor:"start",...L},t[37]=L,t[38]=b):b=t[38];const tt=q?.xAxis?.labels;let u;t[39]!==tt?(u=r.mo("xs:max-[360px]:hidden fill-primary-gray-700 dark:fill-primary-gray-300 text-[9px] md:text-[10px] lg:text-xs",tt),t[39]=tt,t[40]=u):u=t[40];let p;t[41]!==o||t[42]!==l?(p=Rt.format(o[0].date,l),t[41]=o,t[42]=l,t[43]=p):p=t[43];let m;t[44]!==i||t[45]!==y||t[46]!==b||t[47]!==u||t[48]!==p?(m=r.jsxRuntimeExports.jsx("text",{y:i,x:y,style:b,className:u,dy:"1em",children:p}),t[44]=i,t[45]=y,t[46]=b,t[47]=u,t[48]=p,t[49]=m):m=t[49];let v;t[50]!==C||t[51]!==m?(v=r.jsxRuntimeExports.jsxs("g",{children:[C,m]}),t[50]=C,t[51]=m,t[52]=v):v=t[52];const T=`url(#${S})`;let et;t[53]!==T?(et={fill:T,clipPath:"url(#clip)"},t[53]=T,t[54]=et):et=t[54];let ot;t[55]!==a?(ot={stroke:a,fill:"none",strokeWidth:2},t[55]=a,t[56]=ot):ot=t[56];let xt;t[57]!==R?(xt=R.filter(Lt).map(Ft),t[57]=R,t[58]=xt):xt=t[58];let ht;t[59]===Symbol.for("react.memo_cache_sentinel")?(ht={fill:"none",pointerEvents:"all"},t[59]=ht):ht=t[59];let gt;t[60]!==O||t[61]!==i||t[62]!==n?(gt=r.jsxRuntimeExports.jsx("rect",{ref:O,style:ht,width:n,height:i}),t[60]=O,t[61]=i,t[62]=n,t[63]=gt):gt=t[63];let yt;return t[64]!==q?.tooltip||t[65]!==N||t[66]!==U||t[67]!==f||t[68]!==k?.tooltip||t[69]!==D?(yt=f&&D&&N&&U?r.jsxRuntimeExports.jsx(Ct.Tooltip,{data:f,body:D,xPos:N,yPos:U,backgroundStyle:k?.tooltip,className:q?.tooltip}):null,t[64]=q?.tooltip,t[65]=N,t[66]=U,t[67]=f,t[68]=k?.tooltip,t[69]=D,t[70]=yt):yt=t[70],r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsxs("svg",{width:`${w}px`,height:`${V}px`,viewBox:`0 0 ${w} ${V}`,direction:"ltr",children:[P,r.jsxRuntimeExports.jsxs("g",{transform:`translate(${_.left},${_.top})`,children:[F,v,r.jsxRuntimeExports.jsxs("g",{children:[r.jsxRuntimeExports.jsx("path",{d:lt(o)||"",style:et}),r.jsxRuntimeExports.jsx("path",{d:mt(o)||"",style:ot}),f?r.jsxRuntimeExports.jsx("circle",{y1:0,cy:I(f.y),cx:s(f.date),r:5,style:{fill:a}}):null]}),xt,gt]})]}),yt]})}function Ft(e){return e.layer}function Lt(e){return e.position==="after"}function Tt(e){return e.layer}function Vt(e){return e.position==="before"}function Wt(e){return e.date}function Yt(e){return e!=null}function Bt(e){return e.y}function Xt(e){return e!=null}function Ut(e){return e.y}function zt(e){return e!=null}function Jt(e){return e.y}function Kt(e){return e!=null}function Qt(e){return e.y}function Zt(e){return e!=null}function te(e){return e.y}function ee(e){const t=r.compilerRuntimeExports.c(60),{data:j,graphTitle:w,lineColor:V,sources:a,graphDescription:l,height:S,width:c,footNote:$,dateFormat:rt,area:nt,padding:D,backgroundColor:W,leftMargin:Y,rightMargin:B,topMargin:X,bottomMargin:k,tooltip:q,relativeHeight:R,onSeriesMouseOver:it,graphID:f,minValue:st,maxValue:N,graphDownload:at,dataDownload:U,language:ct,minHeight:z,theme:_,ariaLabel:O,curveType:J,styles:o,classNames:n,customLayers:i}=e,ut=rt===void 0?"yyyy":rt,pt=nt===void 0?!1:nt,K=W===void 0?!0:W,G=Y===void 0?5:Y,s=B===void 0?5:B,A=X===void 0?10:X,H=k===void 0?20:k,I=at===void 0?!1:at,lt=U===void 0?!1:U,mt=ct===void 0?"en":ct,P=z===void 0?0:z,F=_===void 0?"light":_,Q=J===void 0?"curve":J;let x;t[0]!==i?(x=i===void 0?[]:i,t[0]=i,t[1]=x):x=t[1];const Z=x,[h,dt]=M.useState(0),[g,ft]=M.useState(0),E=M.useRef(null),C=M.useRef(null);let y,L;t[2]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{const et=new ResizeObserver(ot=>{dt(ot[0].target.clientWidth||620),ft(ot[0].target.clientHeight||480)});return E.current&&et.observe(E.current),()=>et.disconnect()},L=[],t[2]=y,t[3]=L):(y=t[2],L=t[3]),M.useEffect(y,L);const b=n?.graphContainer,tt=o?.graphContainer;let u;t[4]!==n?.description||t[5]!==n?.title||t[6]!==j||t[7]!==lt||t[8]!==l||t[9]!==I||t[10]!==w||t[11]!==o?.description||t[12]!==o?.title||t[13]!==c?(u=w||l||I||lt?r.jsxRuntimeExports.jsx(At.GraphHeader,{styles:{title:o?.title,description:o?.description},classNames:{title:n?.title,description:n?.description},graphTitle:w,graphDescription:l,width:c,graphDownload:I?C:void 0,dataDownload:lt?j.map(se).filter(ie).length>0?j.map(ne).filter(re):j.filter(oe):null}):null,t[4]=n?.description,t[5]=n?.title,t[6]=j,t[7]=lt,t[8]=l,t[9]=I,t[10]=w,t[11]=o?.description,t[12]=o?.title,t[13]=c,t[14]=u):u=t[14];let p;t[15]!==pt||t[16]!==H||t[17]!==n||t[18]!==Q||t[19]!==Z||t[20]!==j||t[21]!==ut||t[22]!==G||t[23]!==V||t[24]!==N||t[25]!==st||t[26]!==it||t[27]!==s||t[28]!==o||t[29]!==g||t[30]!==h||t[31]!==q||t[32]!==A?(p=h&&g?r.jsxRuntimeExports.jsx(Pt,{data:j,lineColor:V||Ht.Colors.primaryColors["blue-600"],width:h,height:g,dateFormat:ut,areaId:pt?It.generateRandomString(8):void 0,leftMargin:G,rightMargin:s,topMargin:A,bottomMargin:H,tooltip:q,onSeriesMouseOver:it,minValue:st,maxValue:N,curveType:Q,styles:o,classNames:n,customLayers:Z}):null,t[15]=pt,t[16]=H,t[17]=n,t[18]=Q,t[19]=Z,t[20]=j,t[21]=ut,t[22]=G,t[23]=V,t[24]=N,t[25]=st,t[26]=it,t[27]=s,t[28]=o,t[29]=g,t[30]=h,t[31]=q,t[32]=A,t[33]=p):p=t[33];let m;t[34]!==p?(m=r.jsxRuntimeExports.jsx(St.GraphArea,{ref:E,children:p}),t[34]=p,t[35]=m):m=t[35];let v;t[36]!==n?.footnote||t[37]!==n?.source||t[38]!==$||t[39]!==a||t[40]!==o?.footnote||t[41]!==o?.source||t[42]!==c?(v=a||$?r.jsxRuntimeExports.jsx(Gt.GraphFooter,{styles:{footnote:o?.footnote,source:o?.source},classNames:{footnote:n?.footnote,source:n?.source},sources:a,footNote:$,width:c}):null,t[36]=n?.footnote,t[37]=n?.source,t[38]=$,t[39]=a,t[40]=o?.footnote,t[41]=o?.source,t[42]=c,t[43]=v):v=t[43];let T;return t[44]!==O||t[45]!==K||t[46]!==f||t[47]!==S||t[48]!==mt||t[49]!==P||t[50]!==D||t[51]!==R||t[52]!==b||t[53]!==tt||t[54]!==u||t[55]!==m||t[56]!==v||t[57]!==F||t[58]!==c?(T=r.jsxRuntimeExports.jsxs(St.GraphContainer,{className:b,style:tt,id:f,ref:C,"aria-label":O,backgroundColor:K,theme:F,language:mt,minHeight:P,width:c,height:S,relativeHeight:R,padding:D,children:[u,m,v]}),t[44]=O,t[45]=K,t[46]=f,t[47]=S,t[48]=mt,t[49]=P,t[50]=D,t[51]=R,t[52]=b,t[53]=tt,t[54]=u,t[55]=m,t[56]=v,t[57]=F,t[58]=c,t[59]=T):T=t[59],T}function oe(e){return e!==void 0}function re(e){return e!==void 0}function ne(e){return e.data}function ie(e){return e!==void 0}function se(e){return e.data}exports.SparkLine=ee;
2
2
  //# sourceMappingURL=SparkLine.cjs.map
@@ -30,6 +30,7 @@ declare interface ClassNameObject {
30
30
  regLine?: string;
31
31
  dataCards?: string;
32
32
  colorLegend?: string;
33
+ modal?: string;
33
34
  }
34
35
 
35
36
  declare type CurveTypes = 'linear' | 'curve' | 'step' | 'stepAfter' | 'stepBefore';
@@ -135,6 +136,7 @@ declare interface StyleObject {
135
136
  mouseOverLine?: React.CSSProperties;
136
137
  regLine?: React.CSSProperties;
137
138
  dataCards?: React.CSSProperties;
139
+ modal?: React.CSSProperties;
138
140
  }
139
141
 
140
142
  export { }
package/dist/SparkLine.js CHANGED
@@ -2,7 +2,7 @@ import { c as wt, m as Mt, j as i } from "./index-CHPV5EwG-Curnpaqc.js";
2
2
  import { useState as ut, useRef as bt, useEffect as Dt } from "react";
3
3
  import { f as _t, p as St } from "./parse-DlCRUFh_.js";
4
4
  import { o as At } from "./index-BZQYSqar.js";
5
- import { T as Nt } from "./Tooltip-CwWUegPB.js";
5
+ import { T as Nt } from "./Tooltip-Dj5eVppQ.js";
6
6
  import { c as $t } from "./checkIfNullOrUndefined-DmfiKkNw.js";
7
7
  import { t as kt } from "./time-DCCfQk3V.js";
8
8
  import { a as Ot } from "./linear-BwnDd9KF.js";
@@ -30,6 +30,7 @@ declare interface ClassNameObject {
30
30
  regLine?: string;
31
31
  dataCards?: string;
32
32
  colorLegend?: string;
33
+ modal?: string;
33
34
  }
34
35
 
35
36
  declare type Languages = 'en' | 'ar' | 'az' | 'bn' | 'cy' | 'he' | 'hi' | 'jp' | 'ka' | 'km' | 'ko' | 'my' | 'ne' | 'zh' | 'custom';
@@ -111,6 +112,7 @@ declare interface StyleObject {
111
112
  mouseOverLine?: React.CSSProperties;
112
113
  regLine?: React.CSSProperties;
113
114
  dataCards?: React.CSSProperties;
115
+ modal?: React.CSSProperties;
114
116
  }
115
117
 
116
118
  export { }
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-CHPV5EwG-CTPQjnHt.cjs"),Y=require("react"),Bt=require("./index-DQA8q5sC.cjs"),zt=require("./Modal-JW_IExO3.cjs"),Jt=require("./index-Cno4Q0YE.cjs"),Kt=require("./Tooltip-4dJo4_AF.cjs"),pt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Lt=require("./numberFormattingFunction-02t-wJta.cjs"),c=require("./Colors.cjs"),Qt=require("./string2HTML-CPGr_I5E.cjs"),Zt=require("./linear-BwPAspcq.cjs"),_t=require("./use-in-view-QcfiW0w3.cjs"),wt=require("./proxy-BxvUI_9l.cjs"),te=require("./index-DG2bgAva.cjs"),Xt=require("./uniqBy-O05lp2S5.cjs"),Yt=require("./GraphContainer-d8A46BK2.cjs"),oe=require("./EmptyState-sAEZ_5rU.cjs"),ie=require("./ColorLegendWithMouseOver.cjs"),ne=require("./GraphFooter.cjs"),re=require("./GraphHeader.cjs");function ee(e,t){if(e<2)return[];const i=t/(e-1);return Array.from({length:e},(N,C)=>C*i)}function le(e){const t=l.compilerRuntimeExports.c(97),{data:i,width:N,height:C,colors:n,colorDomain:s,radius:p,leftMargin:M,rightMargin:ht,topMargin:gt,bottomMargin:Mt,tooltip:rt,onSeriesMouseOver:_,highlightedDataPoints:r,selectedColor:tt,minValue:S,maxValue:D,onSeriesMouseClick:B,noOfTicks:lt,prefix:et,suffix:st,stripType:O,highlightColor:h,dotOpacity:mt,resetSelectionOnDoubleClick:E,detailsOnClick:x,styles:g,classNames:$,valueColor:d,animate:y,dimmedOpacity:J,precision:at,customLayers:w}=e,yt=M===void 0?20:M,xt=ht===void 0?20:ht,vt=gt===void 0?10:gt,Ot=Mt===void 0?10:Mt,Rt=Y.useRef(null);let ct;t[0]!==y.amount||t[1]!==y.once?(ct={once:y.once,amount:y.amount},t[0]=y.amount,t[1]=y.once,t[2]=ct):ct=t[2];const A=_t.useInView(Rt,ct),[ot,bt]=Y.useState(void 0),[v,jt]=Y.useState(void 0),[u,m]=Y.useState(void 0),[ut,Ct]=Y.useState(void 0);let ft;t[3]!==Ot||t[4]!==yt||t[5]!==xt||t[6]!==vt?(ft={top:vt,bottom:Ot,left:yt,right:xt},t[3]=Ot,t[4]=yt,t[5]=xt,t[6]=vt,t[7]=ft):ft=t[7];const f=ft,K=N-f.left-f.right,Q=C-f.top-f.bottom;let q,R,T,H,V,I,L,F,P,U,b;if(t[8]!==y.duration||t[9]!==$?.graphObjectValues||t[10]!==$?.yAxis?.labels||t[11]!==s||t[12]!==n||t[13]!==w||t[14]!==i||t[15]!==x||t[16]!==J||t[17]!==mt||t[18]!==Q||t[19]!==K||t[20]!==C||t[21]!==h||t[22]!==r||t[23]!==A||t[24]!==f.left||t[25]!==f.top||t[26]!==D||t[27]!==S||t[28]!==v||t[29]!==lt||t[30]!==B||t[31]!==_||t[32]!==at||t[33]!==et||t[34]!==p||t[35]!==E||t[36]!==tt||t[37]!==O||t[38]!==g?.graphObjectValues||t[39]!==g?.yAxis?.labels||t[40]!==st||t[41]!==d||t[42]!==N){const Nt=i.map(Ne);let Z;t[54]!==r?(Z=o=>{const a=(r||[]).indexOf(o.label);return a===-1?1/0:a},t[54]=r,t[55]=Z):Z=t[55];const St=Jt.orderBy(Nt,[Z],["desc"]);let nt;t[56]!==i||t[57]!==D?(nt=pt.checkIfNullOrUndefined(D)?Math.max(...i.filter(ke).map(Ie))<0?0:Math.max(...i.filter(Ve).map(Re)):D,t[56]=i,t[57]=D,t[58]=nt):nt=t[58];const Vt=nt;let dt;t[59]!==i||t[60]!==S?(dt=pt.checkIfNullOrUndefined(S)?Math.min(...i.filter(Ee).map(Me))>=0?0:Math.min(...i.filter(we).map(Ce)):S,t[59]=i,t[60]=S,t[61]=dt):dt=t[61];const It=dt,Et=Zt.linear().domain([It,Vt]).range([Q,0]).nice(),kt=ee(lt,Q);R=wt.motion.svg,T=`${N}px`,H=`${C}px`,V=`0 0 ${N} ${C}`,I="ltr",L=Rt,U=`translate(${f.left},${f.top})`,t[62]!==w?(b=w.filter(je).map(be),t[62]=w,t[63]=b):b=t[63],q=te.AnimatePresence,F=St.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:mt,transition:{duration:y.duration}}},initial:"initial",animate:A?"whileInView":"initial",exit:{opacity:0,transition:{duration:y.duration}},onMouseEnter:a=>{bt(o),Ct(a.clientY),m(a.clientX),_?.(o)},onClick:()=>{(B||x)&&(Bt.isEqual(v,o)&&E?(jt(void 0),B?.(void 0)):(jt(o),B?.(o)))},onMouseMove:a=>{bt(o),Ct(a.clientY),m(a.clientX)},onMouseLeave:()=>{bt(void 0),m(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(Oe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray:i.filter(ve).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray},whileInView:{fill:h&&r?r.indexOf(o.label)!==-1?h:i.filter(ye).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray:i.filter(ge).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray,transition:{duration:y.duration}}},initial:"initial",animate:A?"whileInView":"initial",exit:{opacity:0,transition:{duration:y.duration}},r:p}):l.jsxRuntimeExports.jsx(wt.motion.rect,{y:-1,height:2,variants:{initial:{x:0-p,width:p*2,fill:h&&r?r.indexOf(o.label)!==-1?h:i.filter(he).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray:i.filter(de).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray},whileInView:{x:0-p,width:p*2,fill:h&&r?r.indexOf(o.label)!==-1?h:i.filter(xe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray:i.filter(me).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray,transition:{duration:y.duration}}},initial:"initial",animate:A?"whileInView":"initial",exit:{opacity:0,transition:{duration:y.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+p+3,fill:d||(h&&r?r.indexOf(o.label)!==-1?h:i.filter(pe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray:i.filter(fe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray)},whileInView:{opacity:1,x:0+p+3,fill:d||(h&&r?r.indexOf(o.label)!==-1?h:i.filter(ue).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray:i.filter(ce).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray),transition:{duration:y.duration}}},initial:"initial",animate:A?"whileInView":"initial",exit:{opacity:0,transition:{duration:y.duration}},style:{textAnchor:"start",...g?.graphObjectValues||{}},className:l.mo("graph-value text-sm font-bold",$?.graphObjectValues),children:Lt.numberFormattingFunction(o.position,"NA",at,et,st)}):null]},o.label)),P=kt.map((o,a)=>l.jsxRuntimeExports.jsx("text",{y:o,x:K/2+p+5,style:{textAnchor:"start",...g?.yAxis?.labels||{}},className:l.mo("fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",$?.yAxis?.labels),children:Lt.numberFormattingFunction(Et.invert(o),"NA",at,et,st)},a)),t[8]=y.duration,t[9]=$?.graphObjectValues,t[10]=$?.yAxis?.labels,t[11]=s,t[12]=n,t[13]=w,t[14]=i,t[15]=x,t[16]=J,t[17]=mt,t[18]=Q,t[19]=K,t[20]=C,t[21]=h,t[22]=r,t[23]=A,t[24]=f.left,t[25]=f.top,t[26]=D,t[27]=S,t[28]=v,t[29]=lt,t[30]=B,t[31]=_,t[32]=at,t[33]=et,t[34]=p,t[35]=E,t[36]=tt,t[37]=O,t[38]=g?.graphObjectValues,t[39]=g?.yAxis?.labels,t[40]=st,t[41]=d,t[42]=N,t[43]=q,t[44]=R,t[45]=T,t[46]=H,t[47]=V,t[48]=I,t[49]=L,t[50]=F,t[51]=P,t[52]=U,t[53]=b}else q=t[43],R=t[44],T=t[45],H=t[46],V=t[47],I=t[48],L=t[49],F=t[50],P=t[51],U=t[52],b=t[53];let G;t[64]!==q||t[65]!==F||t[66]!==P?(G=l.jsxRuntimeExports.jsxs(q,{children:[F,P]}),t[64]=q,t[65]=F,t[66]=P,t[67]=G):G=t[67];let W;t[68]!==w?(W=w.filter(ae).map(se),t[68]=w,t[69]=W):W=t[69];let j;t[70]!==G||t[71]!==W||t[72]!==U||t[73]!==b?(j=l.jsxRuntimeExports.jsxs("g",{transform:U,children:[b,G,W]}),t[70]=G,t[71]=W,t[72]=U,t[73]=b,t[74]=j):j=t[74];let X;t[75]!==R||t[76]!==T||t[77]!==H||t[78]!==V||t[79]!==I||t[80]!==L||t[81]!==j?(X=l.jsxRuntimeExports.jsx(R,{width:T,height:H,viewBox:V,direction:I,ref:L,children:j}),t[75]=R,t[76]=T,t[77]=H,t[78]=V,t[79]=I,t[80]=L,t[81]=j,t[82]=X):X=t[82];let z;t[83]!==$?.tooltip||t[84]!==u||t[85]!==ut||t[86]!==ot||t[87]!==g?.tooltip||t[88]!==rt?(z=ot&&rt&&u&&ut?l.jsxRuntimeExports.jsx(Kt.Tooltip,{data:ot,body:rt,xPos:u,yPos:ut,backgroundStyle:g?.tooltip,className:$?.tooltip}):null,t[83]=$?.tooltip,t[84]=u,t[85]=ut,t[86]=ot,t[87]=g?.tooltip,t[88]=rt,t[89]=z):z=t[89];let k;t[90]!==x||t[91]!==v?(k=x&&v!==void 0?l.jsxRuntimeExports.jsx(zt.le,{open:v!==void 0,onClose:()=>{jt(void 0)},children:l.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof x=="string"?{__html:Qt.string2HTML(x,v)}:void 0,children:typeof x=="function"?x(v):null})}):null,t[90]=x,t[91]=v,t[92]=k):k=t[92];let it;return t[93]!==X||t[94]!==z||t[95]!==k?(it=l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[X,z,k]}),t[93]=X,t[94]=z,t[95]=k,t[96]=it):it=t[96],it}function se(e){return e.layer}function ae(e){return e.position==="after"}function ce(e){return e.color}function ue(e){return e.color}function fe(e){return e.color}function pe(e){return e.color}function me(e){return e.color}function xe(e){return e.color}function de(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.layer}function je(e){return e.position==="before"}function Ce(e){return e.position}function we(e){return!pt.checkIfNullOrUndefined(e.position)}function Me(e){return e.position}function Ee(e){return!pt.checkIfNullOrUndefined(e.position)}function Re(e){return e.position}function Ve(e){return!pt.checkIfNullOrUndefined(e.position)}function Ie(e){return e.position}function ke(e){return!pt.checkIfNullOrUndefined(e.position)}function Ne(e,t){return{...e,id:`${t}`}}function Se(e){const t=l.compilerRuntimeExports.c(97),{data:i,width:N,height:C,colors:n,colorDomain:s,radius:p,leftMargin:M,rightMargin:ht,topMargin:gt,bottomMargin:Mt,tooltip:rt,onSeriesMouseOver:_,highlightedDataPoints:r,selectedColor:tt,minValue:S,maxValue:D,onSeriesMouseClick:B,prefix:lt,suffix:et,stripType:st,highlightColor:O,dotOpacity:h,resetSelectionOnDoubleClick:mt,detailsOnClick:E,styles:x,classNames:g,valueColor:$,animate:d,noOfTicks:y,dimmedOpacity:J,precision:at,customLayers:w}=e,yt=M===void 0?5:M,xt=ht===void 0?5:ht,vt=gt===void 0?10:gt,Ot=Mt===void 0?10:Mt,Rt=Y.useRef(null);let ct;t[0]!==d.amount||t[1]!==d.once?(ct={once:d.once,amount:d.amount},t[0]=d.amount,t[1]=d.once,t[2]=ct):ct=t[2];const A=_t.useInView(Rt,ct),[ot,bt]=Y.useState(void 0),[v,jt]=Y.useState(void 0),[u,m]=Y.useState(void 0),[ut,Ct]=Y.useState(void 0);let ft;t[3]!==Ot||t[4]!==yt||t[5]!==xt||t[6]!==vt?(ft={top:vt,bottom:Ot,left:yt,right:xt},t[3]=Ot,t[4]=yt,t[5]=xt,t[6]=vt,t[7]=ft):ft=t[7];const f=ft,K=N-f.left-f.right,Q=C-f.top-f.bottom;let q,R,T,H,V,I,L,F,P,U,b;if(t[8]!==d.duration||t[9]!==g?.graphObjectValues||t[10]!==g?.xAxis?.labels||t[11]!==s||t[12]!==n||t[13]!==w||t[14]!==i||t[15]!==E||t[16]!==J||t[17]!==h||t[18]!==Q||t[19]!==K||t[20]!==C||t[21]!==O||t[22]!==r||t[23]!==A||t[24]!==f.left||t[25]!==f.top||t[26]!==D||t[27]!==S||t[28]!==v||t[29]!==y||t[30]!==B||t[31]!==_||t[32]!==at||t[33]!==lt||t[34]!==p||t[35]!==mt||t[36]!==tt||t[37]!==st||t[38]!==x?.graphObjectValues||t[39]!==x?.xAxis?.labels||t[40]!==et||t[41]!==$||t[42]!==N){const Nt=i.map(io);let Z;t[54]!==r?(Z=o=>{const a=(r||[]).indexOf(o.label);return a===-1?1/0:a},t[54]=r,t[55]=Z):Z=t[55];const St=Jt.orderBy(Nt,[Z],["desc"]);let nt;t[56]!==i||t[57]!==D?(nt=pt.checkIfNullOrUndefined(D)?Math.max(...i.filter(oo).map(eo))<0?0:Math.max(...i.filter(to).map(_e)):D,t[56]=i,t[57]=D,t[58]=nt):nt=t[58];const Vt=nt;let dt;t[59]!==i||t[60]!==S?(dt=pt.checkIfNullOrUndefined(S)?Math.min(...i.filter(Ze).map(Qe))>=0?0:Math.min(...i.filter(Ke).map(Je)):S,t[59]=i,t[60]=S,t[61]=dt):dt=t[61];const It=dt,Et=Zt.linear().domain([It,Vt]).range([0,K]).nice(),kt=ee(y,K);R=wt.motion.svg,T=`${N}px`,H=`${C}px`,V=`0 0 ${N} ${C}`,I="ltr",L=Rt,U=`translate(${f.left},${f.top})`,t[62]!==w?(b=w.filter(ze).map(Be),t[62]=w,t[63]=b):b=t[63],q=te.AnimatePresence,F=St.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:d.duration}}},initial:"initial",animate:A?"whileInView":"initial",exit:{opacity:0,transition:{duration:d.duration}},onMouseEnter:a=>{bt(o),Ct(a.clientY),m(a.clientX),_?.(o)},onClick:()=>{(B||E)&&(Bt.isEqual(v,o)&&mt?(jt(void 0),B?.(void 0)):(jt(o),B?.(o)))},onMouseMove:a=>{bt(o),Ct(a.clientY),m(a.clientX)},onMouseLeave:()=>{bt(void 0),m(void 0),Ct(void 0),_?.(void 0)},children:[st==="dot"?l.jsxRuntimeExports.jsx(wt.motion.circle,{cy:0,cx:0,variants:{initial:{fill:O&&r?r.indexOf(o.label)!==-1?O:i.filter(Ye).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray:i.filter(Xe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray},whileInView:{fill:O&&r?r.indexOf(o.label)!==-1?O:i.filter(We).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray:i.filter(Ge).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray,transition:{duration:d.duration}}},initial:"initial",animate:A?"whileInView":"initial",exit:{opacity:0,transition:{duration:d.duration}},r:p}):l.jsxRuntimeExports.jsx(wt.motion.rect,{x:-1,width:2,variants:{initial:{y:0-p,height:p*2,fill:O&&r?r.indexOf(o.label)!==-1?O:i.filter(Ue).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray:i.filter(Pe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray},whileInView:{y:0-p,height:p*2,fill:O&&r?r.indexOf(o.label)!==-1?O:i.filter(Fe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray:i.filter(Le).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray,transition:{duration:d.duration}}},initial:"initial",animate:A?"whileInView":"initial",exit:{opacity:0,transition:{duration:d.duration}}}),r.length!==0&&r.indexOf(o.label)!==-1?l.jsxRuntimeExports.jsx(wt.motion.text,{x:0,variants:{initial:{opacity:0,y:0-p-5,fill:$||(O&&r?r.indexOf(o.label)!==-1?O:i.filter(He).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray:i.filter(Te).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray)},whileInView:{opacity:1,y:0-p-5,fill:$||(O&&r?r.indexOf(o.label)!==-1?O:i.filter(qe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray:i.filter(Ae).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray),transition:{duration:d.duration}}},initial:"initial",animate:A?"whileInView":"initial",exit:{opacity:0,transition:{duration:d.duration}},style:{textAnchor:"middle",...x?.graphObjectValues||{}},className:l.mo("graph-value text-sm font-bold",g?.graphObjectValues),children:Lt.numberFormattingFunction(o.position,"NA",at,lt,et)}):null]},o.label)),P=kt.map((o,a)=>l.jsxRuntimeExports.jsx("text",{x:o,y:Q/2+p,style:{textAnchor:a===0?"start":a===kt.length-1?"end":"middle",...x?.xAxis?.labels||{}},className:l.mo("fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",g?.xAxis?.labels),dy:"1em",children:Lt.numberFormattingFunction(Et.invert(o),"NA",at,lt,et)},a)),t[8]=d.duration,t[9]=g?.graphObjectValues,t[10]=g?.xAxis?.labels,t[11]=s,t[12]=n,t[13]=w,t[14]=i,t[15]=E,t[16]=J,t[17]=h,t[18]=Q,t[19]=K,t[20]=C,t[21]=O,t[22]=r,t[23]=A,t[24]=f.left,t[25]=f.top,t[26]=D,t[27]=S,t[28]=v,t[29]=y,t[30]=B,t[31]=_,t[32]=at,t[33]=lt,t[34]=p,t[35]=mt,t[36]=tt,t[37]=st,t[38]=x?.graphObjectValues,t[39]=x?.xAxis?.labels,t[40]=et,t[41]=$,t[42]=N,t[43]=q,t[44]=R,t[45]=T,t[46]=H,t[47]=V,t[48]=I,t[49]=L,t[50]=F,t[51]=P,t[52]=U,t[53]=b}else q=t[43],R=t[44],T=t[45],H=t[46],V=t[47],I=t[48],L=t[49],F=t[50],P=t[51],U=t[52],b=t[53];let G;t[64]!==q||t[65]!==F||t[66]!==P?(G=l.jsxRuntimeExports.jsxs(q,{children:[F,P]}),t[64]=q,t[65]=F,t[66]=P,t[67]=G):G=t[67];let W;t[68]!==w?(W=w.filter($e).map(De),t[68]=w,t[69]=W):W=t[69];let j;t[70]!==G||t[71]!==W||t[72]!==U||t[73]!==b?(j=l.jsxRuntimeExports.jsxs("g",{transform:U,children:[b,G,W]}),t[70]=G,t[71]=W,t[72]=U,t[73]=b,t[74]=j):j=t[74];let X;t[75]!==R||t[76]!==T||t[77]!==H||t[78]!==V||t[79]!==I||t[80]!==L||t[81]!==j?(X=l.jsxRuntimeExports.jsx(R,{width:T,height:H,viewBox:V,direction:I,ref:L,children:j}),t[75]=R,t[76]=T,t[77]=H,t[78]=V,t[79]=I,t[80]=L,t[81]=j,t[82]=X):X=t[82];let z;t[83]!==g?.tooltip||t[84]!==u||t[85]!==ut||t[86]!==ot||t[87]!==x?.tooltip||t[88]!==rt?(z=ot&&rt&&u&&ut?l.jsxRuntimeExports.jsx(Kt.Tooltip,{data:ot,body:rt,xPos:u,yPos:ut,backgroundStyle:x?.tooltip,className:g?.tooltip}):null,t[83]=g?.tooltip,t[84]=u,t[85]=ut,t[86]=ot,t[87]=x?.tooltip,t[88]=rt,t[89]=z):z=t[89];let k;t[90]!==E||t[91]!==v?(k=E&&v!==void 0?l.jsxRuntimeExports.jsx(zt.le,{open:v!==void 0,onClose:()=>{jt(void 0)},children:l.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof E=="string"?{__html:Qt.string2HTML(E,v)}:void 0,children:typeof E=="function"?E(v):null})}):null,t[90]=E,t[91]=v,t[92]=k):k=t[92];let it;return t[93]!==X||t[94]!==z||t[95]!==k?(it=l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[X,z,k]}),t[93]=X,t[94]=z,t[95]=k,t[96]=it):it=t[96],it}function De(e){return e.layer}function $e(e){return e.position==="after"}function Ae(e){return e.color}function qe(e){return e.color}function Te(e){return e.color}function He(e){return e.color}function Le(e){return e.color}function Fe(e){return e.color}function Pe(e){return e.color}function Ue(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.layer}function ze(e){return e.position==="before"}function Je(e){return e.position}function Ke(e){return!pt.checkIfNullOrUndefined(e.position)}function Qe(e){return e.position}function Ze(e){return!pt.checkIfNullOrUndefined(e.position)}function _e(e){return e.position}function to(e){return!pt.checkIfNullOrUndefined(e.position)}function eo(e){return e.position}function oo(e){return!pt.checkIfNullOrUndefined(e.position)}function io(e,t){return{...e,id:`${t}`}}function no(e){const t=l.compilerRuntimeExports.c(80),{data:i,graphTitle:N,colors:C,sources:n,graphDescription:s,height:p,width:M,footNote:ht,colorDomain:gt,colorLegendTitle:Mt,radius:rt,padding:_,backgroundColor:r,leftMargin:tt,rightMargin:S,topMargin:D,bottomMargin:B,tooltip:lt,relativeHeight:et,onSeriesMouseOver:st,showColorScale:O,highlightedDataPoints:h,graphID:mt,minValue:E,maxValue:x,onSeriesMouseClick:g,noOfTicks:$,graphDownload:d,dataDownload:y,prefix:J,suffix:at,stripType:w,language:yt,highlightColor:xt,dotOpacity:vt,showNAColor:Ot,minHeight:Rt,theme:ct,ariaLabel:A,valueColor:ot,resetSelectionOnDoubleClick:bt,detailsOnClick:v,orientation:jt,styles:u,classNames:m,animate:ut,dimmedOpacity:Ct,precision:ft,customLayers:f}=e,K=rt===void 0?5:rt,Q=r===void 0?!1:r,q=O===void 0?!0:O;let R;t[0]!==h?(R=h===void 0?[]:h,t[0]=h,t[1]=R):R=t[1];const T=R,H=$===void 0?2:$,V=d===void 0?!1:d,I=y===void 0?!1:y,L=J===void 0?"":J,F=at===void 0?"":at,P=w===void 0?"dot":w,U=yt===void 0?"en":yt,b=vt===void 0?.3:vt,G=Ot===void 0?!0:Ot,W=Rt===void 0?0:Rt,j=ct===void 0?"light":ct,X=bt===void 0?!0:bt,z=jt===void 0?"vertical":jt,k=ut===void 0?!1:ut,it=Ct===void 0?.3:Ct,Nt=ft===void 0?2:ft;let Z;t[2]!==f?(Z=f===void 0?[]:f,t[2]=f,t[3]=Z):Z=t[3];const St=Z,nt=z==="horizontal"?Se:le,[Vt,dt]=Y.useState(0),[It,Et]=Y.useState(0),[kt,o]=Y.useState(void 0),a=Y.useRef(null),Ut=Y.useRef(null);let qt,Tt;t[4]===Symbol.for("react.memo_cache_sentinel")?(qt=()=>{const Gt=new ResizeObserver(Wt=>{dt(Wt[0].target.clientWidth||620),Et(Wt[0].target.clientHeight||480)});return a.current&&Gt.observe(a.current),()=>Gt.disconnect()},Tt=[],t[4]=qt,t[5]=Tt):(qt=t[4],Tt=t[5]),Y.useEffect(qt,Tt);const Ft=m?.graphContainer,Pt=u?.graphContainer;let Dt;t[6]!==m?.description||t[7]!==m?.title||t[8]!==i||t[9]!==I||t[10]!==s||t[11]!==V||t[12]!==N||t[13]!==u?.description||t[14]!==u?.title||t[15]!==M?(Dt=N||s||V||I?l.jsxRuntimeExports.jsx(re.GraphHeader,{styles:{title:u?.title,description:u?.description},classNames:{title:m?.title,description:m?.description},graphTitle:N,graphDescription:s,width:M,graphDownload:V?Ut:void 0,dataDownload:I?i.map(po).filter(fo).length>0?i.map(uo).filter(co):i.filter(ao):null}):null,t[6]=m?.description,t[7]=m?.title,t[8]=i,t[9]=I,t[10]=s,t[11]=V,t[12]=N,t[13]=u?.description,t[14]=u?.title,t[15]=M,t[16]=Dt):Dt=t[16];let $t;t[17]!==nt||t[18]!==k||t[19]!==B||t[20]!==m||t[21]!==gt||t[22]!==Mt||t[23]!==C||t[24]!==St||t[25]!==i||t[26]!==v||t[27]!==it||t[28]!==b||t[29]!==xt||t[30]!==T||t[31]!==tt||t[32]!==x||t[33]!==E||t[34]!==H||t[35]!==g||t[36]!==st||t[37]!==Nt||t[38]!==L||t[39]!==K||t[40]!==X||t[41]!==S||t[42]!==kt||t[43]!==q||t[44]!==G||t[45]!==P||t[46]!==u||t[47]!==F||t[48]!==It||t[49]!==Vt||t[50]!==j||t[51]!==lt||t[52]!==D||t[53]!==ot||t[54]!==M?($t=i.length===0?l.jsxRuntimeExports.jsx(oe.EmptyState,{}):l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[q!==!1&&i.filter(so).length!==0?l.jsxRuntimeExports.jsx(ie.ColorLegendWithMouseOver,{width:M,colorLegendTitle:Mt,colors:C||c.Colors[j].categoricalColors.colors,colorDomain:gt||Xt.uniqBy(i,"color",!0),setSelectedColor:o,showNAColor:G,className:m?.colorLegend}):null,l.jsxRuntimeExports.jsx(Yt.GraphArea,{ref:a,children:Vt&&It?l.jsxRuntimeExports.jsx(nt,{data:i,width:Vt,height:It,colorDomain:i.filter(lo).length===0?[]:gt||Xt.uniqBy(i,"color",!0),colors:i.filter(ro).length===0?C?[C]:[c.Colors.primaryColors["blue-600"]]:C||c.Colors[j].categoricalColors.colors,selectedColor:kt,radius:K,leftMargin:tt,rightMargin:S,topMargin:D,bottomMargin:B,tooltip:lt,onSeriesMouseOver:st,highlightedDataPoints:T,minValue:E,maxValue:x,onSeriesMouseClick:g,prefix:L,suffix:F,stripType:P,highlightColor:xt,dotOpacity:b,resetSelectionOnDoubleClick:X,detailsOnClick:v,styles:u,classNames:m,valueColor:ot,animate:k===!0?{duration:.5,once:!0,amount:.5}:k||{duration:0,once:!0,amount:0},noOfTicks:H,dimmedOpacity:it,precision:Nt,customLayers:St}):null})]}),t[17]=nt,t[18]=k,t[19]=B,t[20]=m,t[21]=gt,t[22]=Mt,t[23]=C,t[24]=St,t[25]=i,t[26]=v,t[27]=it,t[28]=b,t[29]=xt,t[30]=T,t[31]=tt,t[32]=x,t[33]=E,t[34]=H,t[35]=g,t[36]=st,t[37]=Nt,t[38]=L,t[39]=K,t[40]=X,t[41]=S,t[42]=kt,t[43]=q,t[44]=G,t[45]=P,t[46]=u,t[47]=F,t[48]=It,t[49]=Vt,t[50]=j,t[51]=lt,t[52]=D,t[53]=ot,t[54]=M,t[55]=$t):$t=t[55];let At;t[56]!==m?.footnote||t[57]!==m?.source||t[58]!==ht||t[59]!==n||t[60]!==u?.footnote||t[61]!==u?.source||t[62]!==M?(At=n||ht?l.jsxRuntimeExports.jsx(ne.GraphFooter,{styles:{footnote:u?.footnote,source:u?.source},classNames:{footnote:m?.footnote,source:m?.source},sources:n,footNote:ht,width:M}):null,t[56]=m?.footnote,t[57]=m?.source,t[58]=ht,t[59]=n,t[60]=u?.footnote,t[61]=u?.source,t[62]=M,t[63]=At):At=t[63];let Ht;return t[64]!==A||t[65]!==Q||t[66]!==mt||t[67]!==p||t[68]!==U||t[69]!==W||t[70]!==_||t[71]!==et||t[72]!==Ft||t[73]!==Pt||t[74]!==Dt||t[75]!==$t||t[76]!==At||t[77]!==j||t[78]!==M?(Ht=l.jsxRuntimeExports.jsxs(Yt.GraphContainer,{className:Ft,style:Pt,id:mt,ref:Ut,"aria-label":A,backgroundColor:Q,theme:j,language:U,minHeight:W,width:M,height:p,relativeHeight:et,padding:_,children:[Dt,$t,At]}),t[64]=A,t[65]=Q,t[66]=mt,t[67]=p,t[68]=U,t[69]=W,t[70]=_,t[71]=et,t[72]=Ft,t[73]=Pt,t[74]=Dt,t[75]=$t,t[76]=At,t[77]=j,t[78]=M,t[79]=Ht):Ht=t[79],Ht}function ro(e){return e.color}function lo(e){return e.color}function so(e){return e.color}function ao(e){return e!==void 0}function co(e){return e!==void 0}function uo(e){return e.data}function fo(e){return e!==void 0}function po(e){return e.data}exports.StripChart=no;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-CHPV5EwG-CTPQjnHt.cjs"),X=require("react"),Bt=require("./index-DQA8q5sC.cjs"),zt=require("./index-Cno4Q0YE.cjs"),Jt=require("./Tooltip-uUdw6wJL.cjs"),pt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Pt=require("./numberFormattingFunction-02t-wJta.cjs"),c=require("./Colors.cjs"),Kt=require("./DetailsModal-BN0HDFlV.cjs"),Qt=require("./linear-BwPAspcq.cjs"),Zt=require("./use-in-view-QcfiW0w3.cjs"),wt=require("./proxy-BxvUI_9l.cjs"),_t=require("./index-DG2bgAva.cjs"),Xt=require("./uniqBy-O05lp2S5.cjs"),Yt=require("./GraphContainer-d8A46BK2.cjs"),ee=require("./EmptyState-sAEZ_5rU.cjs"),oe=require("./ColorLegendWithMouseOver.cjs"),ie=require("./GraphFooter.cjs"),ne=require("./GraphHeader.cjs");function te(e,t){if(e<2)return[];const i=t/(e-1);return Array.from({length:e},(D,j)=>j*i)}function re(e){const t=l.compilerRuntimeExports.c(98),{data:i,width:D,height:j,colors:n,colorDomain:s,radius:m,leftMargin:E,rightMargin:ht,topMargin:gt,bottomMargin:Mt,tooltip:rt,onSeriesMouseOver:_,highlightedDataPoints:r,selectedColor:tt,minValue:N,maxValue:S,onSeriesMouseClick:Y,noOfTicks:lt,prefix:et,suffix:st,stripType:y,highlightColor:h,dotOpacity:mt,resetSelectionOnDoubleClick:B,detailsOnClick:v,styles:u,classNames:C,valueColor:d,animate:g,dimmedOpacity:J,precision:at,customLayers:w}=e,yt=E===void 0?20:E,xt=ht===void 0?20:ht,vt=gt===void 0?10:gt,Ot=Mt===void 0?10:Mt,Vt=X.useRef(null);let ct;t[0]!==g.amount||t[1]!==g.once?(ct={once:g.once,amount:g.amount},t[0]=g.amount,t[1]=g.once,t[2]=ct):ct=t[2];const $=Zt.useInView(Vt,ct),[ot,bt]=X.useState(void 0),[M,jt]=X.useState(void 0),[f,x]=X.useState(void 0),[ut,Ct]=X.useState(void 0);let ft;t[3]!==Ot||t[4]!==yt||t[5]!==xt||t[6]!==vt?(ft={top:vt,bottom:Ot,left:yt,right:xt},t[3]=Ot,t[4]=yt,t[5]=xt,t[6]=vt,t[7]=ft):ft=t[7];const p=ft,K=D-p.left-p.right,Q=j-p.top-p.bottom;let A,V,q,T,R,k,F,P,U,H,O;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]!==v||t[16]!==J||t[17]!==mt||t[18]!==Q||t[19]!==K||t[20]!==j||t[21]!==h||t[22]!==r||t[23]!==$||t[24]!==p.left||t[25]!==p.top||t[26]!==S||t[27]!==N||t[28]!==M||t[29]!==lt||t[30]!==Y||t[31]!==_||t[32]!==at||t[33]!==et||t[34]!==m||t[35]!==B||t[36]!==tt||t[37]!==y||t[38]!==u?.graphObjectValues||t[39]!==u?.yAxis?.labels||t[40]!==st||t[41]!==d||t[42]!==D){const Dt=i.map(Ie);let Z;t[54]!==r?(Z=o=>{const a=(r||[]).indexOf(o.label);return a===-1?1/0:a},t[54]=r,t[55]=Z):Z=t[55];const Nt=zt.orderBy(Dt,[Z],["desc"]);let nt;t[56]!==i||t[57]!==S?(nt=pt.checkIfNullOrUndefined(S)?Math.max(...i.filter(ke).map(Re))<0?0:Math.max(...i.filter(Ve).map(Ee)):S,t[56]=i,t[57]=S,t[58]=nt):nt=t[58];const Rt=nt;let dt;t[59]!==i||t[60]!==N?(dt=pt.checkIfNullOrUndefined(N)?Math.min(...i.filter(Me).map(we))>=0?0:Math.min(...i.filter(Ce).map(je)):N,t[59]=i,t[60]=N,t[61]=dt):dt=t[61];const kt=dt,Et=Qt.linear().domain([kt,Rt]).range([Q,0]).nice(),It=te(lt,Q);V=wt.motion.svg,q=`${D}px`,T=`${j}px`,R=`0 0 ${D} ${j}`,k="ltr",F=Vt,H=`translate(${p.left},${p.top})`,t[62]!==w?(O=w.filter(be).map(Oe),t[62]=w,t[63]=O):O=t[63],A=_t.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:mt,transition:{duration:g.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},onMouseEnter:a=>{bt(o),Ct(a.clientY),x(a.clientX),_?.(o)},onClick:()=>{(Y||v)&&(Bt.isEqual(M,o)&&B?(jt(void 0),Y?.(void 0)):(jt(o),Y?.(o)))},onMouseMove:a=>{bt(o),Ct(a.clientY),x(a.clientX)},onMouseLeave:()=>{bt(void 0),x(void 0),Ct(void 0),_?.(void 0)},children:[y==="dot"?l.jsxRuntimeExports.jsx(wt.motion.circle,{cy:0,cx:0,variants:{initial:{fill:h&&r?r.indexOf(o.label)!==-1?h:i.filter(ve).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray:i.filter(ye).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray},whileInView:{fill:h&&r?r.indexOf(o.label)!==-1?h:i.filter(ge).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray:i.filter(he).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray,transition:{duration:g.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},r:m}):l.jsxRuntimeExports.jsx(wt.motion.rect,{y:-1,height:2,variants:{initial:{x:0-m,width:m*2,fill:h&&r?r.indexOf(o.label)!==-1?h:i.filter(de).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray:i.filter(xe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray},whileInView:{x:0-m,width:m*2,fill:h&&r?r.indexOf(o.label)!==-1?h:i.filter(me).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray:i.filter(pe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.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+m+3,fill:d||(h&&r?r.indexOf(o.label)!==-1?h:i.filter(fe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray:i.filter(ue).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray)},whileInView:{opacity:1,x:0+m+3,fill:d||(h&&r?r.indexOf(o.label)!==-1?h:i.filter(ce).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray:i.filter(ae).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray),transition:{duration:g.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},style:{textAnchor:"start",...u?.graphObjectValues||{}},className:l.mo("graph-value text-sm font-bold",C?.graphObjectValues),children:Pt.numberFormattingFunction(o.position,"NA",at,et,st)}):null]},o.label)),U=It.map((o,a)=>l.jsxRuntimeExports.jsx("text",{y:o,x:K/2+m+5,style:{textAnchor:"start",...u?.yAxis?.labels||{}},className:l.mo("fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",C?.yAxis?.labels),children:Pt.numberFormattingFunction(Et.invert(o),"NA",at,et,st)},a)),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]=v,t[16]=J,t[17]=mt,t[18]=Q,t[19]=K,t[20]=j,t[21]=h,t[22]=r,t[23]=$,t[24]=p.left,t[25]=p.top,t[26]=S,t[27]=N,t[28]=M,t[29]=lt,t[30]=Y,t[31]=_,t[32]=at,t[33]=et,t[34]=m,t[35]=B,t[36]=tt,t[37]=y,t[38]=u?.graphObjectValues,t[39]=u?.yAxis?.labels,t[40]=st,t[41]=d,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]=U,t[52]=H,t[53]=O}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],U=t[51],H=t[52],O=t[53];let L;t[64]!==A||t[65]!==P||t[66]!==U?(L=l.jsxRuntimeExports.jsxs(A,{children:[P,U]}),t[64]=A,t[65]=P,t[66]=U,t[67]=L):L=t[67];let G;t[68]!==w?(G=w.filter(se).map(le),t[68]=w,t[69]=G):G=t[69];let b;t[70]!==L||t[71]!==G||t[72]!==H||t[73]!==O?(b=l.jsxRuntimeExports.jsxs("g",{transform:H,children:[O,L,G]}),t[70]=L,t[71]=G,t[72]=H,t[73]=O,t[74]=b):b=t[74];let W;t[75]!==V||t[76]!==q||t[77]!==T||t[78]!==R||t[79]!==k||t[80]!==F||t[81]!==b?(W=l.jsxRuntimeExports.jsx(V,{width:q,height:T,viewBox:R,direction:k,ref:F,children:b}),t[75]=V,t[76]=q,t[77]=T,t[78]=R,t[79]=k,t[80]=F,t[81]=b,t[82]=W):W=t[82];let z;t[83]!==C?.tooltip||t[84]!==f||t[85]!==ut||t[86]!==ot||t[87]!==u?.tooltip||t[88]!==rt?(z=ot&&rt&&f&&ut?l.jsxRuntimeExports.jsx(Jt.Tooltip,{data:ot,body:rt,xPos:f,yPos:ut,backgroundStyle:u?.tooltip,className:C?.tooltip}):null,t[83]=C?.tooltip,t[84]=f,t[85]=ut,t[86]=ot,t[87]=u?.tooltip,t[88]=rt,t[89]=z):z=t[89];let I;t[90]!==C?.modal||t[91]!==v||t[92]!==M?(I=v&&M!==void 0?l.jsxRuntimeExports.jsx(Kt.DetailsModal,{body:v,data:M,setData:jt,className:C?.modal}):null,t[90]=C?.modal,t[91]=v,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 le(e){return e.layer}function se(e){return e.position==="after"}function ae(e){return e.color}function ce(e){return e.color}function ue(e){return e.color}function fe(e){return e.color}function pe(e){return e.color}function me(e){return e.color}function xe(e){return e.color}function de(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.layer}function be(e){return e.position==="before"}function je(e){return e.position}function Ce(e){return!pt.checkIfNullOrUndefined(e.position)}function we(e){return e.position}function Me(e){return!pt.checkIfNullOrUndefined(e.position)}function Ee(e){return e.position}function Ve(e){return!pt.checkIfNullOrUndefined(e.position)}function Re(e){return e.position}function ke(e){return!pt.checkIfNullOrUndefined(e.position)}function Ie(e,t){return{...e,id:`${t}`}}function De(e){const t=l.compilerRuntimeExports.c(98),{data:i,width:D,height:j,colors:n,colorDomain:s,radius:m,leftMargin:E,rightMargin:ht,topMargin:gt,bottomMargin:Mt,tooltip:rt,onSeriesMouseOver:_,highlightedDataPoints:r,selectedColor:tt,minValue:N,maxValue:S,onSeriesMouseClick:Y,prefix:lt,suffix:et,stripType:st,highlightColor:y,dotOpacity:h,resetSelectionOnDoubleClick:mt,detailsOnClick:B,styles:v,classNames:u,valueColor:C,animate:d,noOfTicks:g,dimmedOpacity:J,precision:at,customLayers:w}=e,yt=E===void 0?5:E,xt=ht===void 0?5:ht,vt=gt===void 0?10:gt,Ot=Mt===void 0?10:Mt,Vt=X.useRef(null);let ct;t[0]!==d.amount||t[1]!==d.once?(ct={once:d.once,amount:d.amount},t[0]=d.amount,t[1]=d.once,t[2]=ct):ct=t[2];const $=Zt.useInView(Vt,ct),[ot,bt]=X.useState(void 0),[M,jt]=X.useState(void 0),[f,x]=X.useState(void 0),[ut,Ct]=X.useState(void 0);let ft;t[3]!==Ot||t[4]!==yt||t[5]!==xt||t[6]!==vt?(ft={top:vt,bottom:Ot,left:yt,right:xt},t[3]=Ot,t[4]=yt,t[5]=xt,t[6]=vt,t[7]=ft):ft=t[7];const p=ft,K=D-p.left-p.right,Q=j-p.top-p.bottom;let A,V,q,T,R,k,F,P,U,H,O;if(t[8]!==d.duration||t[9]!==u?.graphObjectValues||t[10]!==u?.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]!==j||t[21]!==y||t[22]!==r||t[23]!==$||t[24]!==p.left||t[25]!==p.top||t[26]!==S||t[27]!==N||t[28]!==M||t[29]!==g||t[30]!==Y||t[31]!==_||t[32]!==at||t[33]!==lt||t[34]!==m||t[35]!==mt||t[36]!==tt||t[37]!==st||t[38]!==v?.graphObjectValues||t[39]!==v?.xAxis?.labels||t[40]!==et||t[41]!==C||t[42]!==D){const Dt=i.map(oo);let Z;t[54]!==r?(Z=o=>{const a=(r||[]).indexOf(o.label);return a===-1?1/0:a},t[54]=r,t[55]=Z):Z=t[55];const Nt=zt.orderBy(Dt,[Z],["desc"]);let nt;t[56]!==i||t[57]!==S?(nt=pt.checkIfNullOrUndefined(S)?Math.max(...i.filter(eo).map(to))<0?0:Math.max(...i.filter(_e).map(Ze)):S,t[56]=i,t[57]=S,t[58]=nt):nt=t[58];const Rt=nt;let dt;t[59]!==i||t[60]!==N?(dt=pt.checkIfNullOrUndefined(N)?Math.min(...i.filter(Qe).map(Ke))>=0?0:Math.min(...i.filter(Je).map(ze)):N,t[59]=i,t[60]=N,t[61]=dt):dt=t[61];const kt=dt,Et=Qt.linear().domain([kt,Rt]).range([0,K]).nice(),It=te(g,K);V=wt.motion.svg,q=`${D}px`,T=`${j}px`,R=`0 0 ${D} ${j}`,k="ltr",F=Vt,H=`translate(${p.left},${p.top})`,t[62]!==w?(O=w.filter(Be).map(Ye),t[62]=w,t[63]=O):O=t[63],A=_t.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:d.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:d.duration}},onMouseEnter:a=>{bt(o),Ct(a.clientY),x(a.clientX),_?.(o)},onClick:()=>{(Y||B)&&(Bt.isEqual(M,o)&&mt?(jt(void 0),Y?.(void 0)):(jt(o),Y?.(o)))},onMouseMove:a=>{bt(o),Ct(a.clientY),x(a.clientX)},onMouseLeave:()=>{bt(void 0),x(void 0),Ct(void 0),_?.(void 0)},children:[st==="dot"?l.jsxRuntimeExports.jsx(wt.motion.circle,{cy:0,cx:0,variants:{initial:{fill:y&&r?r.indexOf(o.label)!==-1?y:i.filter(Xe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray:i.filter(We).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray},whileInView:{fill:y&&r?r.indexOf(o.label)!==-1?y:i.filter(Ge).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray:i.filter(Le).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray,transition:{duration:d.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:d.duration}},r:m}):l.jsxRuntimeExports.jsx(wt.motion.rect,{x:-1,width:2,variants:{initial:{y:0-m,height:m*2,fill:y&&r?r.indexOf(o.label)!==-1?y:i.filter(He).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray:i.filter(Ue).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray},whileInView:{y:0-m,height:m*2,fill:y&&r?r.indexOf(o.label)!==-1?y:i.filter(Pe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray:i.filter(Fe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray,transition:{duration:d.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:d.duration}}}),r.length!==0&&r.indexOf(o.label)!==-1?l.jsxRuntimeExports.jsx(wt.motion.text,{x:0,variants:{initial:{opacity:0,y:0-m-5,fill:C||(y&&r?r.indexOf(o.label)!==-1?y:i.filter(Te).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray:i.filter(qe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray)},whileInView:{opacity:1,y:0-m-5,fill:C||(y&&r?r.indexOf(o.label)!==-1?y:i.filter(Ae).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray:i.filter($e).length===0?n[0]:o.color?n[s.indexOf(o.color)]:c.Colors.gray),transition:{duration:d.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:d.duration}},style:{textAnchor:"middle",...v?.graphObjectValues||{}},className:l.mo("graph-value text-sm font-bold",u?.graphObjectValues),children:Pt.numberFormattingFunction(o.position,"NA",at,lt,et)}):null]},o.label)),U=It.map((o,a)=>l.jsxRuntimeExports.jsx("text",{x:o,y:Q/2+m,style:{textAnchor:a===0?"start":a===It.length-1?"end":"middle",...v?.xAxis?.labels||{}},className:l.mo("fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",u?.xAxis?.labels),dy:"1em",children:Pt.numberFormattingFunction(Et.invert(o),"NA",at,lt,et)},a)),t[8]=d.duration,t[9]=u?.graphObjectValues,t[10]=u?.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]=j,t[21]=y,t[22]=r,t[23]=$,t[24]=p.left,t[25]=p.top,t[26]=S,t[27]=N,t[28]=M,t[29]=g,t[30]=Y,t[31]=_,t[32]=at,t[33]=lt,t[34]=m,t[35]=mt,t[36]=tt,t[37]=st,t[38]=v?.graphObjectValues,t[39]=v?.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]=U,t[52]=H,t[53]=O}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],U=t[51],H=t[52],O=t[53];let L;t[64]!==A||t[65]!==P||t[66]!==U?(L=l.jsxRuntimeExports.jsxs(A,{children:[P,U]}),t[64]=A,t[65]=P,t[66]=U,t[67]=L):L=t[67];let G;t[68]!==w?(G=w.filter(Se).map(Ne),t[68]=w,t[69]=G):G=t[69];let b;t[70]!==L||t[71]!==G||t[72]!==H||t[73]!==O?(b=l.jsxRuntimeExports.jsxs("g",{transform:H,children:[O,L,G]}),t[70]=L,t[71]=G,t[72]=H,t[73]=O,t[74]=b):b=t[74];let W;t[75]!==V||t[76]!==q||t[77]!==T||t[78]!==R||t[79]!==k||t[80]!==F||t[81]!==b?(W=l.jsxRuntimeExports.jsx(V,{width:q,height:T,viewBox:R,direction:k,ref:F,children:b}),t[75]=V,t[76]=q,t[77]=T,t[78]=R,t[79]=k,t[80]=F,t[81]=b,t[82]=W):W=t[82];let z;t[83]!==u?.tooltip||t[84]!==f||t[85]!==ut||t[86]!==ot||t[87]!==v?.tooltip||t[88]!==rt?(z=ot&&rt&&f&&ut?l.jsxRuntimeExports.jsx(Jt.Tooltip,{data:ot,body:rt,xPos:f,yPos:ut,backgroundStyle:v?.tooltip,className:u?.tooltip}):null,t[83]=u?.tooltip,t[84]=f,t[85]=ut,t[86]=ot,t[87]=v?.tooltip,t[88]=rt,t[89]=z):z=t[89];let I;t[90]!==u?.modal||t[91]!==B||t[92]!==M?(I=B&&M!==void 0?l.jsxRuntimeExports.jsx(Kt.DetailsModal,{body:B,data:M,setData:jt,className:u?.modal}):null,t[90]=u?.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 Ne(e){return e.layer}function Se(e){return e.position==="after"}function $e(e){return e.color}function Ae(e){return e.color}function qe(e){return e.color}function Te(e){return e.color}function Fe(e){return e.color}function Pe(e){return e.color}function Ue(e){return e.color}function He(e){return e.color}function Le(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.layer}function Be(e){return e.position==="before"}function ze(e){return e.position}function Je(e){return!pt.checkIfNullOrUndefined(e.position)}function Ke(e){return e.position}function Qe(e){return!pt.checkIfNullOrUndefined(e.position)}function Ze(e){return e.position}function _e(e){return!pt.checkIfNullOrUndefined(e.position)}function to(e){return e.position}function eo(e){return!pt.checkIfNullOrUndefined(e.position)}function oo(e,t){return{...e,id:`${t}`}}function io(e){const t=l.compilerRuntimeExports.c(80),{data:i,graphTitle:D,colors:j,sources:n,graphDescription:s,height:m,width:E,footNote:ht,colorDomain:gt,colorLegendTitle:Mt,radius:rt,padding:_,backgroundColor:r,leftMargin:tt,rightMargin:N,topMargin:S,bottomMargin:Y,tooltip:lt,relativeHeight:et,onSeriesMouseOver:st,showColorScale:y,highlightedDataPoints:h,graphID:mt,minValue:B,maxValue:v,onSeriesMouseClick:u,noOfTicks:C,graphDownload:d,dataDownload:g,prefix:J,suffix:at,stripType:w,language:yt,highlightColor:xt,dotOpacity:vt,showNAColor:Ot,minHeight:Vt,theme:ct,ariaLabel:$,valueColor:ot,resetSelectionOnDoubleClick:bt,detailsOnClick:M,orientation:jt,styles:f,classNames:x,animate:ut,dimmedOpacity:Ct,precision:ft,customLayers:p}=e,K=rt===void 0?5:rt,Q=r===void 0?!1:r,A=y===void 0?!0:y;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=d===void 0?!1:d,k=g===void 0?!1:g,F=J===void 0?"":J,P=at===void 0?"":at,U=w===void 0?"dot":w,H=yt===void 0?"en":yt,O=vt===void 0?.3:vt,L=Ot===void 0?!0:Ot,G=Vt===void 0?0:Vt,b=ct===void 0?"light":ct,W=bt===void 0?!0:bt,z=jt===void 0?"vertical":jt,I=ut===void 0?!1:ut,it=Ct===void 0?.3:Ct,Dt=ft===void 0?2:ft;let Z;t[2]!==p?(Z=p===void 0?[]:p,t[2]=p,t[3]=Z):Z=t[3];const Nt=Z,nt=z==="horizontal"?De:re,[Rt,dt]=X.useState(0),[kt,Et]=X.useState(0),[It,o]=X.useState(void 0),a=X.useRef(null),Lt=X.useRef(null);let qt,Tt;t[4]===Symbol.for("react.memo_cache_sentinel")?(qt=()=>{const Gt=new ResizeObserver(Wt=>{dt(Wt[0].target.clientWidth||620),Et(Wt[0].target.clientHeight||480)});return a.current&&Gt.observe(a.current),()=>Gt.disconnect()},Tt=[],t[4]=qt,t[5]=Tt):(qt=t[4],Tt=t[5]),X.useEffect(qt,Tt);const Ut=x?.graphContainer,Ht=f?.graphContainer;let St;t[6]!==x?.description||t[7]!==x?.title||t[8]!==i||t[9]!==k||t[10]!==s||t[11]!==R||t[12]!==D||t[13]!==f?.description||t[14]!==f?.title||t[15]!==E?(St=D||s||R||k?l.jsxRuntimeExports.jsx(ne.GraphHeader,{styles:{title:f?.title,description:f?.description},classNames:{title:x?.title,description:x?.description},graphTitle:D,graphDescription:s,width:E,graphDownload:R?Lt:void 0,dataDownload:k?i.map(fo).filter(uo).length>0?i.map(co).filter(ao):i.filter(so):null}):null,t[6]=x?.description,t[7]=x?.title,t[8]=i,t[9]=k,t[10]=s,t[11]=R,t[12]=D,t[13]=f?.description,t[14]=f?.title,t[15]=E,t[16]=St):St=t[16];let $t;t[17]!==nt||t[18]!==I||t[19]!==Y||t[20]!==x||t[21]!==gt||t[22]!==Mt||t[23]!==j||t[24]!==Nt||t[25]!==i||t[26]!==M||t[27]!==it||t[28]!==O||t[29]!==xt||t[30]!==q||t[31]!==tt||t[32]!==v||t[33]!==B||t[34]!==T||t[35]!==u||t[36]!==st||t[37]!==Dt||t[38]!==F||t[39]!==K||t[40]!==W||t[41]!==N||t[42]!==It||t[43]!==A||t[44]!==L||t[45]!==U||t[46]!==f||t[47]!==P||t[48]!==kt||t[49]!==Rt||t[50]!==b||t[51]!==lt||t[52]!==S||t[53]!==ot||t[54]!==E?($t=i.length===0?l.jsxRuntimeExports.jsx(ee.EmptyState,{}):l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[A!==!1&&i.filter(lo).length!==0?l.jsxRuntimeExports.jsx(oe.ColorLegendWithMouseOver,{width:E,colorLegendTitle:Mt,colors:j||c.Colors[b].categoricalColors.colors,colorDomain:gt||Xt.uniqBy(i,"color",!0),setSelectedColor:o,showNAColor:L,className:x?.colorLegend}):null,l.jsxRuntimeExports.jsx(Yt.GraphArea,{ref:a,children:Rt&&kt?l.jsxRuntimeExports.jsx(nt,{data:i,width:Rt,height:kt,colorDomain:i.filter(ro).length===0?[]:gt||Xt.uniqBy(i,"color",!0),colors:i.filter(no).length===0?j?[j]:[c.Colors.primaryColors["blue-600"]]:j||c.Colors[b].categoricalColors.colors,selectedColor:It,radius:K,leftMargin:tt,rightMargin:N,topMargin:S,bottomMargin:Y,tooltip:lt,onSeriesMouseOver:st,highlightedDataPoints:q,minValue:B,maxValue:v,onSeriesMouseClick:u,prefix:F,suffix:P,stripType:U,highlightColor:xt,dotOpacity:O,resetSelectionOnDoubleClick:W,detailsOnClick:M,styles:f,classNames:x,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[17]=nt,t[18]=I,t[19]=Y,t[20]=x,t[21]=gt,t[22]=Mt,t[23]=j,t[24]=Nt,t[25]=i,t[26]=M,t[27]=it,t[28]=O,t[29]=xt,t[30]=q,t[31]=tt,t[32]=v,t[33]=B,t[34]=T,t[35]=u,t[36]=st,t[37]=Dt,t[38]=F,t[39]=K,t[40]=W,t[41]=N,t[42]=It,t[43]=A,t[44]=L,t[45]=U,t[46]=f,t[47]=P,t[48]=kt,t[49]=Rt,t[50]=b,t[51]=lt,t[52]=S,t[53]=ot,t[54]=E,t[55]=$t):$t=t[55];let At;t[56]!==x?.footnote||t[57]!==x?.source||t[58]!==ht||t[59]!==n||t[60]!==f?.footnote||t[61]!==f?.source||t[62]!==E?(At=n||ht?l.jsxRuntimeExports.jsx(ie.GraphFooter,{styles:{footnote:f?.footnote,source:f?.source},classNames:{footnote:x?.footnote,source:x?.source},sources:n,footNote:ht,width:E}):null,t[56]=x?.footnote,t[57]=x?.source,t[58]=ht,t[59]=n,t[60]=f?.footnote,t[61]=f?.source,t[62]=E,t[63]=At):At=t[63];let Ft;return t[64]!==$||t[65]!==Q||t[66]!==mt||t[67]!==m||t[68]!==H||t[69]!==G||t[70]!==_||t[71]!==et||t[72]!==Ut||t[73]!==Ht||t[74]!==St||t[75]!==$t||t[76]!==At||t[77]!==b||t[78]!==E?(Ft=l.jsxRuntimeExports.jsxs(Yt.GraphContainer,{className:Ut,style:Ht,id:mt,ref:Lt,"aria-label":$,backgroundColor:Q,theme:b,language:H,minHeight:G,width:E,height:m,relativeHeight:et,padding:_,children:[St,$t,At]}),t[64]=$,t[65]=Q,t[66]=mt,t[67]=m,t[68]=H,t[69]=G,t[70]=_,t[71]=et,t[72]=Ut,t[73]=Ht,t[74]=St,t[75]=$t,t[76]=At,t[77]=b,t[78]=E,t[79]=Ft):Ft=t[79],Ft}function no(e){return e.color}function ro(e){return e.color}function lo(e){return e.color}function so(e){return e!==void 0}function ao(e){return e!==void 0}function co(e){return e.data}function uo(e){return e!==void 0}function fo(e){return e.data}exports.StripChart=io;
2
2
  //# sourceMappingURL=StripChart.cjs.map