@undp/data-viz 2.3.19 → 2.4.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 (95) hide show
  1. package/dist/BarGraph.cjs +1 -1
  2. package/dist/BarGraph.cjs.map +1 -1
  3. package/dist/BarGraph.js +1360 -1363
  4. package/dist/BarGraph.js.map +1 -1
  5. package/dist/BeeSwarmChart.cjs +1 -1
  6. package/dist/BeeSwarmChart.cjs.map +1 -1
  7. package/dist/BeeSwarmChart.js +302 -305
  8. package/dist/BeeSwarmChart.js.map +1 -1
  9. package/dist/BiVariateChoroplethMap.cjs +1 -1
  10. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  11. package/dist/BiVariateChoroplethMap.js +4 -4
  12. package/dist/BiVariateChoroplethMap.js.map +1 -1
  13. package/dist/BulletChart.cjs +1 -1
  14. package/dist/BulletChart.cjs.map +1 -1
  15. package/dist/BulletChart.js +591 -594
  16. package/dist/BulletChart.js.map +1 -1
  17. package/dist/ChoroplethMap.cjs +1 -1
  18. package/dist/ChoroplethMap.cjs.map +1 -1
  19. package/dist/ChoroplethMap.js +4 -4
  20. package/dist/ChoroplethMap.js.map +1 -1
  21. package/dist/CirclePackingGraph.cjs +1 -1
  22. package/dist/CirclePackingGraph.js +1 -1
  23. package/dist/DotDensityMap.cjs +1 -1
  24. package/dist/DotDensityMap.cjs.map +1 -1
  25. package/dist/DotDensityMap.js +255 -258
  26. package/dist/DotDensityMap.js.map +1 -1
  27. package/dist/DumbbellChart.cjs +1 -1
  28. package/dist/DumbbellChart.cjs.map +1 -1
  29. package/dist/DumbbellChart.js +553 -556
  30. package/dist/DumbbellChart.js.map +1 -1
  31. package/dist/{GraphEl-Dorm_qQE.js → GraphEl-B73N4RIA.js} +2 -2
  32. package/dist/{GraphEl-Dorm_qQE.js.map → GraphEl-B73N4RIA.js.map} +1 -1
  33. package/dist/{GraphEl-D8WRC8-j.cjs → GraphEl-Lt1og0C-.cjs} +2 -2
  34. package/dist/{GraphEl-D8WRC8-j.cjs.map → GraphEl-Lt1og0C-.cjs.map} +1 -1
  35. package/dist/GriddedGraphs.cjs +1 -1
  36. package/dist/GriddedGraphs.js +1 -1
  37. package/dist/Histogram.cjs +1 -1
  38. package/dist/Histogram.js +1 -1
  39. package/dist/HybridMap.cjs +1 -1
  40. package/dist/HybridMap.cjs.map +1 -1
  41. package/dist/HybridMap.js +310 -313
  42. package/dist/HybridMap.js.map +1 -1
  43. package/dist/MultiLineAltChart.cjs +1 -1
  44. package/dist/MultiLineAltChart.cjs.map +1 -1
  45. package/dist/MultiLineAltChart.js +269 -272
  46. package/dist/MultiLineAltChart.js.map +1 -1
  47. package/dist/MultiLineChart.cjs +1 -1
  48. package/dist/MultiLineChart.cjs.map +1 -1
  49. package/dist/MultiLineChart.js +319 -322
  50. package/dist/MultiLineChart.js.map +1 -1
  51. package/dist/RadarChart.cjs +1 -1
  52. package/dist/RadarChart.cjs.map +1 -1
  53. package/dist/RadarChart.js +3 -3
  54. package/dist/RadarChart.js.map +1 -1
  55. package/dist/SankeyChart.cjs +1 -1
  56. package/dist/SankeyChart.cjs.map +1 -1
  57. package/dist/SankeyChart.js +274 -280
  58. package/dist/SankeyChart.js.map +1 -1
  59. package/dist/ScatterPlot.cjs +1 -1
  60. package/dist/ScatterPlot.cjs.map +1 -1
  61. package/dist/ScatterPlot.js +341 -344
  62. package/dist/ScatterPlot.js.map +1 -1
  63. package/dist/SingleGraphDashboard.cjs +1 -1
  64. package/dist/SingleGraphDashboard.js +1 -1
  65. package/dist/SlopeChart.cjs +1 -1
  66. package/dist/SlopeChart.cjs.map +1 -1
  67. package/dist/SlopeChart.js +251 -254
  68. package/dist/SlopeChart.js.map +1 -1
  69. package/dist/StripChart.cjs +1 -1
  70. package/dist/StripChart.cjs.map +1 -1
  71. package/dist/StripChart.js +292 -295
  72. package/dist/StripChart.js.map +1 -1
  73. package/dist/ThreeDGlobe.cjs +1 -1
  74. package/dist/ThreeDGlobe.cjs.map +1 -1
  75. package/dist/ThreeDGlobe.js +3 -3
  76. package/dist/ThreeDGlobe.js.map +1 -1
  77. package/dist/TreeMapGraph.cjs +1 -1
  78. package/dist/TreeMapGraph.cjs.map +1 -1
  79. package/dist/TreeMapGraph.js +196 -199
  80. package/dist/TreeMapGraph.js.map +1 -1
  81. package/dist/WaterfallChart.cjs +1 -1
  82. package/dist/WaterfallChart.cjs.map +1 -1
  83. package/dist/WaterfallChart.js +274 -277
  84. package/dist/WaterfallChart.js.map +1 -1
  85. package/dist/index-B0Awa_de.js +377 -0
  86. package/dist/index-B0Awa_de.js.map +1 -0
  87. package/dist/index-CP8cmNzt.cjs +2 -0
  88. package/dist/index-CP8cmNzt.cjs.map +1 -0
  89. package/dist/index.cjs +1 -1
  90. package/dist/index.js +1 -1
  91. package/package.json +1 -1
  92. package/dist/index-Bdo_HXb_.cjs +0 -2
  93. package/dist/index-Bdo_HXb_.cjs.map +0 -1
  94. package/dist/index-CGrBpeUa.js +0 -380
  95. package/dist/index-CGrBpeUa.js.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 { 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 {showColorScale && data.filter(el => el.color).length !== 0 && data.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 {data.length === 0 && <EmptyState />}\r\n {svgWidth && svgHeight && data.length > 0 ? (\r\n <Graph\r\n data={data.filter(d => !checkIfNullOrUndefined(d.y1) && !checkIfNullOrUndefined(d.y2))}\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 {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","colorLegend","ColorLegendWithMouseOver","categoricalColors","uniqBy","EmptyState","primaryColors","GraphArea","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,CAAA,MAAAyB,EAAAM,UAAA/B,EAAA,CAAA,MAAAyB,EAAAO,QACOF,KAAA;AAAA,IAAAE,MAC3BP,EAAOO;AAAAA,IAAKD,QACVN,EAAOM;AAAAA,EAAAA,GAChB/B,EAAA,CAAA,IAAAyB,EAAAM,QAAA/B,EAAA,CAAA,IAAAyB,EAAAO,MAAAhC,OAAA8B,MAAAA,KA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GAYH,GAAiBnH,QAAAgO,IAAAhO,QAAAqN,GAAArN,QAAAwN,GAAAxN,QAAAI,GAAAJ,QAAA4N,GAAA5N,QAAA8N,GAAA9N,QAAAoN,GAAApN,QAAAsN,GAAAtN,QAAA0G,IAAA1G,QAAA2G,IAAA3G,QAAA6G,IAAA7G,QAAA8G,IAAA9G,QAAA+G,IAAA/G,QAAAkH,GAAAlH,QAAAmH,IAAAnH,QAAA+N,GAAA/N,QAAAoH,MAAAA,KAAApH,EAAA,EAAA,GA5GjBoH;AA4GiB;AA7Kd,SAAAmC,GAAAgD,GAAA;AAAA,SA+HyBf,EAAErD;AAAM;AA/HjC,SAAAmB,GAAAkD,GAAA;AAAA,SA0HyBhB,EAAErD;AAAM;AA1HjC,SAAAe,GAAAuD,GAAA;AAAA,SAsH4B,CAAClH,GAAuB2C,EAACc,EAAG,KAA5B,CAAkCzD,GAAuB2C,EAAC6B,EAAG;AAAC;AAtH1F,SAAApC,GAAA6D,GAAA;AAAA,SAuGoCA,EAAErD;AAAM;AAvG5C,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
+ {"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\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\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 ? (\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 ? (\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 {showColorScale && data.filter(el => el.color).length !== 0 && data.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 {data.length === 0 && <EmptyState />}\r\n {svgWidth && svgHeight && data.length > 0 ? (\r\n <Graph\r\n data={data.filter(d => !checkIfNullOrUndefined(d.y1) && !checkIfNullOrUndefined(d.y2))}\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 {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","whileInView","transition","event","clientY","clientX","event_0","isEqual","cx","cy","y1","fill","_temp7","length","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","colorLegend","ColorLegendWithMouseOver","categoricalColors","uniqBy","EmptyState","primaryColors","GraphArea","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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;AAAAA,IA+CCC;AAAAA,EAAAA,GAYH,GAAiBjH,QAAAgO,IAAAhO,QAAAqN,GAAArN,QAAAwN,GAAAxN,QAAAI,GAAAJ,QAAA4N,GAAA5N,QAAA8N,GAAA9N,QAAAoN,GAAApN,QAAAsN,GAAAtN,QAAAwG,IAAAxG,QAAAyG,IAAAzG,QAAA0G,IAAA1G,QAAA2G,GAAA3G,QAAA6G,IAAA7G,QAAAgH,GAAAhH,QAAAiH,GAAAjH,QAAA+N,GAAA/N,QAAAkH,KAAAA,IAAAlH,EAAA,EAAA,GA5GjBkH;AA4GiB;AA7Kd,SAAAqC,GAAAgD,GAAA;AAAA,SA+HyBf,EAAErD;AAAM;AA/HjC,SAAAmB,GAAAkD,GAAA;AAAA,SA0HyBhB,EAAErD;AAAM;AA1HjC,SAAAc,GAAAwD,GAAA;AAAA,SAsH4B,CAAClH,GAAuB2C,EAACa,EAAG,KAA5B,CAAkCxD,GAAuB2C,EAAC6B,EAAG;AAAC;AAtH1F,SAAApC,GAAA6D,GAAA;AAAA,SAuGoCA,EAAErD;AAAM;AAvG5C,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 l=require("./index-CHPV5EwG-D4pAp7u0.cjs"),z=require("react"),te=require("./index-DQA8q5sC.cjs"),ee=require("./index-Cno4Q0YE.cjs"),ie=require("./Tooltip-Hr46paWP.cjs"),J=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Lt=require("./numberFormattingFunction-Cn9R7CM9.cjs"),x=require("./Colors.cjs"),oe=require("./DetailsModal-jmmKRMRM.cjs"),ne=require("./linear-CgUCbw9F.cjs"),nt=require("./proxy-CqH8m8IQ.cjs"),re=require("./use-in-view-dnRv_qqF.cjs"),le=require("./index-FXfr51ZM.cjs"),Zt=require("./uniqBy-O05lp2S5.cjs"),_t=require("./GraphContainer-Cul9b74X.cjs"),se=require("./EmptyState-CFmiFPHz.cjs"),ce=require("./ColorLegendWithMouseOver.cjs"),ue=require("./GraphFooter.cjs"),pe=require("./GraphHeader.cjs");function ae(e,t){if(e<2)return[];const o=t/(e-1);return Array.from({length:e},(D,v)=>v*o)}function fe(e){const t=l.compilerRuntimeExports.c(102),{data:o,width:D,height:v,colors:n,colorDomain:a,radius:u,leftMargin:V,rightMargin:bt,topMargin:dt,bottomMargin:kt,tooltip:xt,onSeriesMouseOver:rt,highlightedDataPoints:r,selectedColor:lt,minValue:N,maxValue:S,onSeriesMouseClick:K,noOfTicks:at,prefix:Q,suffix:st,stripType:b,highlightColor:g,dotOpacity:Ot,resetSelectionOnDoubleClick:Z,detailsOnClick:O,styles:p,classNames:j,valueColor:f,animate:m,dimmedOpacity:et,precision:it,customLayers:C,showDataMinMax:jt,locale:_}=e,wt=V===void 0?20:V,Ct=bt===void 0?20:bt,Mt=dt===void 0?10:dt,Vt=kt===void 0?10:kt,Rt=z.useRef(null);let ct;t[0]!==m.amount||t[1]!==m.once?(ct={once:m.once,amount:m.amount},t[0]=m.amount,t[1]=m.once,t[2]=ct):ct=t[2];const M=re.useInView(Rt,ct),[ut,It]=z.useState(void 0),[s,d]=z.useState(void 0),[ht,Et]=z.useState(void 0),[gt,yt]=z.useState(void 0);let vt;t[3]!==Vt||t[4]!==wt||t[5]!==Ct||t[6]!==Mt?(vt={top:Mt,bottom:Vt,left:wt,right:Ct},t[3]=Vt,t[4]=wt,t[5]=Ct,t[6]=Mt,t[7]=vt):vt=t[7];const h=vt,X=D-h.left-h.right,Y=v-h.top-h.bottom;let $,I,w,q,E,k,A,T,F,U,P,L;if(t[8]!==m.duration||t[9]!==j?.graphObjectValues||t[10]!==j?.yAxis?.labels||t[11]!==a||t[12]!==n||t[13]!==C||t[14]!==o||t[15]!==O||t[16]!==et||t[17]!==Ot||t[18]!==Y||t[19]!==X||t[20]!==v||t[21]!==g||t[22]!==r||t[23]!==M||t[24]!==_||t[25]!==h.left||t[26]!==h.top||t[27]!==S||t[28]!==N||t[29]!==s||t[30]!==at||t[31]!==K||t[32]!==rt||t[33]!==it||t[34]!==Q||t[35]!==u||t[36]!==Z||t[37]!==lt||t[38]!==jt||t[39]!==b||t[40]!==p?.graphObjectValues||t[41]!==p?.yAxis?.labels||t[42]!==st||t[43]!==f||t[44]!==D){const Dt=o.map(Le);let ft;t[57]!==r?(ft=i=>{const c=(r||[]).indexOf(i.label);return c===-1?1/0:c},t[57]=r,t[58]=ft):ft=t[58];const Nt=ee.orderBy(Dt,[ft],["desc"]);let mt;t[59]!==o||t[60]!==S?(mt=J.checkIfNullOrUndefined(S)?Math.max(...o.filter(Pe).map(Ue))<0?0:Math.max(...o.filter(Fe).map(Te)):S,t[59]=o,t[60]=S,t[61]=mt):mt=t[61];const St=mt;let ot;t[62]!==o||t[63]!==N?(ot=J.checkIfNullOrUndefined(N)?Math.min(...o.filter(Ae).map(qe))>=0?0:Math.min(...o.filter($e).map(Se)):N,t[62]=o,t[63]=N,t[64]=ot):ot=t[64];const Ht=ot,B=ne.linear().domain([Ht,St]).range([Y,0]).nice(),$t=ae(at,Y);I=nt.motion.svg,q=`${D}px`,E=`${v}px`,k=`0 0 ${D} ${v}`,A="ltr",T=Rt,L=`translate(${h.left},${h.top})`,t[65]!==C?(w=C.filter(Ne).map(De),t[65]=C,t[66]=w):w=t[66],$=le.AnimatePresence,F=Nt.map(i=>l.jsxRuntimeExports.jsxs(nt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:0,x:X/2,y:B(0)},whileInView:{x:X/2,y:B(i.position),opacity:lt?i.color&&n[a.indexOf(i.color)]===lt?.95:et:r.length!==0?r.indexOf(i.label)!==-1?.95:et:Ot,transition:{duration:m.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},onMouseEnter:c=>{It(i),yt(c.clientY),Et(c.clientX),rt?.(i)},onClick:()=>{(K||O)&&(te.isEqual(s,i)&&Z?(d(void 0),K?.(void 0)):(d(i),K?.(i)))},onMouseMove:c=>{It(i),yt(c.clientY),Et(c.clientX)},onMouseLeave:()=>{It(void 0),Et(void 0),yt(void 0),rt?.(void 0)},children:[b==="dot"?l.jsxRuntimeExports.jsx(nt.motion.circle,{cy:0,cx:0,variants:{initial:{fill:g&&r?r.indexOf(i.label)!==-1?g:o.filter(Re).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray:o.filter(ke).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray},whileInView:{fill:g&&r?r.indexOf(i.label)!==-1?g:o.filter(Ee).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray:o.filter(Ie).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray,transition:{duration:m.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},r:u}):l.jsxRuntimeExports.jsx(nt.motion.rect,{y:-1,height:2,variants:{initial:{x:0-u,width:u*2,fill:g&&r?r.indexOf(i.label)!==-1?g:o.filter(Ve).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray:o.filter(Me).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray},whileInView:{x:0-u,width:u*2,fill:g&&r?r.indexOf(i.label)!==-1?g:o.filter(Ce).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray:o.filter(we).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray,transition:{duration:m.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}}}),r.length!==0&&r.indexOf(i.label)!==-1?l.jsxRuntimeExports.jsx(nt.motion.text,{y:0,dy:"0.33em",variants:{initial:{opacity:0,x:0+u+3,fill:f||(g&&r?r.indexOf(i.label)!==-1?g:o.filter(je).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray:o.filter(be).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray)},whileInView:{opacity:1,x:0+u+3,fill:f||(g&&r?r.indexOf(i.label)!==-1?g:o.filter(Oe).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray:o.filter(ve).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray),transition:{duration:m.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},style:{textAnchor:"start",...p?.graphObjectValues||{}},className:l.mo("graph-value text-sm font-bold",j?.graphObjectValues),children:Lt.numberFormattingFunction(i.position,void 0,it,Q,st,_)}):null]},i.label)),U=jt?[Math.min(...o.filter(ye).map(ge)),Math.max(...o.filter(he).map(xe))].map((i,c)=>l.jsxRuntimeExports.jsx(nt.motion.g,{variants:{initial:{opacity:0,x:X/2,y:B(0)},whileInView:{x:X/2,y:B(i),opacity:1,transition:{duration:m.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},children:l.jsxRuntimeExports.jsx(nt.motion.text,{y:0,dy:"0.33em",variants:{initial:{opacity:0,x:0+u+3},whileInView:{opacity:1,x:0+u+3,transition:{duration:m.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},style:{textAnchor:"start",...p?.graphObjectValues||{}},className:l.mo("graph-value text-sm text-primary-gray-550 dark:text-primary-gray-200",j?.graphObjectValues),children:Lt.numberFormattingFunction(i,void 0,it,Q,st,_)},c)},c)):null,P=$t.map((i,c)=>l.jsxRuntimeExports.jsx("text",{y:i,x:X/2+u+5,style:{textAnchor:"start",...p?.yAxis?.labels||{}},className:l.mo("fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",j?.yAxis?.labels),children:Lt.numberFormattingFunction(B.invert(i),void 0,it,Q,st,_)},c)),t[8]=m.duration,t[9]=j?.graphObjectValues,t[10]=j?.yAxis?.labels,t[11]=a,t[12]=n,t[13]=C,t[14]=o,t[15]=O,t[16]=et,t[17]=Ot,t[18]=Y,t[19]=X,t[20]=v,t[21]=g,t[22]=r,t[23]=M,t[24]=_,t[25]=h.left,t[26]=h.top,t[27]=S,t[28]=N,t[29]=s,t[30]=at,t[31]=K,t[32]=rt,t[33]=it,t[34]=Q,t[35]=u,t[36]=Z,t[37]=lt,t[38]=jt,t[39]=b,t[40]=p?.graphObjectValues,t[41]=p?.yAxis?.labels,t[42]=st,t[43]=f,t[44]=D,t[45]=$,t[46]=I,t[47]=w,t[48]=q,t[49]=E,t[50]=k,t[51]=A,t[52]=T,t[53]=F,t[54]=U,t[55]=P,t[56]=L}else $=t[45],I=t[46],w=t[47],q=t[48],E=t[49],k=t[50],A=t[51],T=t[52],F=t[53],U=t[54],P=t[55],L=t[56];let H;t[67]!==$||t[68]!==F||t[69]!==U||t[70]!==P?(H=l.jsxRuntimeExports.jsxs($,{children:[F,U,P]}),t[67]=$,t[68]=F,t[69]=U,t[70]=P,t[71]=H):H=t[71];let y;t[72]!==C?(y=C.filter(de).map(me),t[72]=C,t[73]=y):y=t[73];let G;t[74]!==w||t[75]!==H||t[76]!==y||t[77]!==L?(G=l.jsxRuntimeExports.jsxs("g",{transform:L,children:[w,H,y]}),t[74]=w,t[75]=H,t[76]=y,t[77]=L,t[78]=G):G=t[78];let tt;t[79]!==I||t[80]!==q||t[81]!==E||t[82]!==k||t[83]!==A||t[84]!==T||t[85]!==G?(tt=l.jsxRuntimeExports.jsx(I,{width:q,height:E,viewBox:k,direction:A,ref:T,children:G}),t[79]=I,t[80]=q,t[81]=E,t[82]=k,t[83]=A,t[84]=T,t[85]=G,t[86]=tt):tt=t[86];let R;t[87]!==j?.tooltip||t[88]!==ht||t[89]!==gt||t[90]!==ut||t[91]!==p?.tooltip||t[92]!==xt?(R=ut&&xt&&ht&&gt?l.jsxRuntimeExports.jsx(ie.Tooltip,{data:ut,body:xt,xPos:ht,yPos:gt,backgroundStyle:p?.tooltip,className:j?.tooltip}):null,t[87]=j?.tooltip,t[88]=ht,t[89]=gt,t[90]=ut,t[91]=p?.tooltip,t[92]=xt,t[93]=R):R=t[93];let W;t[94]!==j?.modal||t[95]!==O||t[96]!==s?(W=O&&s!==void 0?l.jsxRuntimeExports.jsx(oe.DetailsModal,{body:O,data:s,setData:d,className:j?.modal}):null,t[94]=j?.modal,t[95]=O,t[96]=s,t[97]=W):W=t[97];let pt;return t[98]!==tt||t[99]!==R||t[100]!==W?(pt=l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[tt,R,W]}),t[98]=tt,t[99]=R,t[100]=W,t[101]=pt):pt=t[101],pt}function me(e){return e.layer}function de(e){return e.position==="after"}function xe(e){return e.position}function he(e){return!J.checkIfNullOrUndefined(e.position)}function ge(e){return e.position}function ye(e){return!J.checkIfNullOrUndefined(e.position)}function ve(e){return e.color}function Oe(e){return e.color}function be(e){return e.color}function je(e){return e.color}function we(e){return e.color}function Ce(e){return e.color}function Me(e){return e.color}function Ve(e){return e.color}function Ie(e){return e.color}function Ee(e){return e.color}function ke(e){return e.color}function Re(e){return e.color}function De(e){return e.layer}function Ne(e){return e.position==="before"}function Se(e){return e.position}function $e(e){return!J.checkIfNullOrUndefined(e.position)}function qe(e){return e.position}function Ae(e){return!J.checkIfNullOrUndefined(e.position)}function Te(e){return e.position}function Fe(e){return!J.checkIfNullOrUndefined(e.position)}function Ue(e){return e.position}function Pe(e){return!J.checkIfNullOrUndefined(e.position)}function Le(e,t){return{...e,id:`${t}`}}function He(e){const t=l.compilerRuntimeExports.c(102),{data:o,width:D,height:v,colors:n,colorDomain:a,radius:u,leftMargin:V,rightMargin:bt,topMargin:dt,bottomMargin:kt,tooltip:xt,onSeriesMouseOver:rt,highlightedDataPoints:r,selectedColor:lt,minValue:N,maxValue:S,onSeriesMouseClick:K,prefix:at,suffix:Q,stripType:st,highlightColor:b,dotOpacity:g,resetSelectionOnDoubleClick:Ot,detailsOnClick:Z,styles:O,classNames:p,valueColor:j,animate:f,noOfTicks:m,dimmedOpacity:et,precision:it,customLayers:C,showDataMinMax:jt,locale:_}=e,wt=V===void 0?5:V,Ct=bt===void 0?5:bt,Mt=dt===void 0?10:dt,Vt=kt===void 0?10:kt,Rt=z.useRef(null);let ct;t[0]!==f.amount||t[1]!==f.once?(ct={once:f.once,amount:f.amount},t[0]=f.amount,t[1]=f.once,t[2]=ct):ct=t[2];const M=re.useInView(Rt,ct),[ut,It]=z.useState(void 0),[s,d]=z.useState(void 0),[ht,Et]=z.useState(void 0),[gt,yt]=z.useState(void 0);let vt;t[3]!==Vt||t[4]!==wt||t[5]!==Ct||t[6]!==Mt?(vt={top:Mt,bottom:Vt,left:wt,right:Ct},t[3]=Vt,t[4]=wt,t[5]=Ct,t[6]=Mt,t[7]=vt):vt=t[7];const h=vt,X=D-h.left-h.right,Y=v-h.top-h.bottom;let $,I,w,q,E,k,A,T,F,U,P,L;if(t[8]!==f.duration||t[9]!==p?.graphObjectValues||t[10]!==p?.xAxis?.labels||t[11]!==a||t[12]!==n||t[13]!==C||t[14]!==o||t[15]!==Z||t[16]!==et||t[17]!==g||t[18]!==Y||t[19]!==X||t[20]!==v||t[21]!==b||t[22]!==r||t[23]!==M||t[24]!==_||t[25]!==h.left||t[26]!==h.top||t[27]!==S||t[28]!==N||t[29]!==s||t[30]!==m||t[31]!==K||t[32]!==rt||t[33]!==it||t[34]!==at||t[35]!==u||t[36]!==Ot||t[37]!==lt||t[38]!==jt||t[39]!==st||t[40]!==O?.graphObjectValues||t[41]!==O?.xAxis?.labels||t[42]!==Q||t[43]!==j||t[44]!==D){const Dt=o.map(gi);let ft;t[57]!==r?(ft=i=>{const c=(r||[]).indexOf(i.label);return c===-1?1/0:c},t[57]=r,t[58]=ft):ft=t[58];const Nt=ee.orderBy(Dt,[ft],["desc"]);let mt;t[59]!==o||t[60]!==S?(mt=J.checkIfNullOrUndefined(S)?Math.max(...o.filter(hi).map(xi))<0?0:Math.max(...o.filter(di).map(mi)):S,t[59]=o,t[60]=S,t[61]=mt):mt=t[61];const St=mt;let ot;t[62]!==o||t[63]!==N?(ot=J.checkIfNullOrUndefined(N)?Math.min(...o.filter(fi).map(pi))>=0?0:Math.min(...o.filter(ui).map(ci)):N,t[62]=o,t[63]=N,t[64]=ot):ot=t[64];const Ht=ot,B=ne.linear().domain([Ht,St]).range([0,X]).nice(),$t=ae(m,X);I=nt.motion.svg,q=`${D}px`,E=`${v}px`,k=`0 0 ${D} ${v}`,A="ltr",T=Rt,L=`translate(${h.left},${h.top})`,t[65]!==C?(w=C.filter(si).map(ai),t[65]=C,t[66]=w):w=t[66],$=le.AnimatePresence,F=Nt.map(i=>l.jsxRuntimeExports.jsxs(nt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:0,x:B(0),y:Y/2},whileInView:{x:B(i.position),y:Y/2,opacity:lt?i.color&&n[a.indexOf(i.color)]===lt?.95:et:r.length!==0?r.indexOf(i.label)!==-1?.95:et:g,transition:{duration:f.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:f.duration}},onMouseEnter:c=>{It(i),yt(c.clientY),Et(c.clientX),rt?.(i)},onClick:()=>{(K||Z)&&(te.isEqual(s,i)&&Ot?(d(void 0),K?.(void 0)):(d(i),K?.(i)))},onMouseMove:c=>{It(i),yt(c.clientY),Et(c.clientX)},onMouseLeave:()=>{It(void 0),Et(void 0),yt(void 0),rt?.(void 0)},children:[st==="dot"?l.jsxRuntimeExports.jsx(nt.motion.circle,{cy:0,cx:0,variants:{initial:{fill:b&&r?r.indexOf(i.label)!==-1?b:o.filter(li).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray:o.filter(ri).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray},whileInView:{fill:b&&r?r.indexOf(i.label)!==-1?b:o.filter(ni).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray:o.filter(oi).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray,transition:{duration:f.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:f.duration}},r:u}):l.jsxRuntimeExports.jsx(nt.motion.rect,{x:-1,width:2,variants:{initial:{y:0-u,height:u*2,fill:b&&r?r.indexOf(i.label)!==-1?b:o.filter(ii).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray:o.filter(ei).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray},whileInView:{y:0-u,height:u*2,fill:b&&r?r.indexOf(i.label)!==-1?b:o.filter(ti).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray:o.filter(_e).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray,transition:{duration:f.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:f.duration}}}),r.length!==0&&r.indexOf(i.label)!==-1?l.jsxRuntimeExports.jsx(nt.motion.text,{x:0,variants:{initial:{opacity:0,y:0-u-5,fill:j||(b&&r?r.indexOf(i.label)!==-1?b:o.filter(Ze).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray:o.filter(Qe).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray)},whileInView:{opacity:1,y:0-u-5,fill:j||(b&&r?r.indexOf(i.label)!==-1?b:o.filter(Ke).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray:o.filter(Je).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray),transition:{duration:f.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:f.duration}},style:{textAnchor:"middle",...O?.graphObjectValues||{}},className:l.mo("graph-value text-sm font-bold",p?.graphObjectValues),children:Lt.numberFormattingFunction(i.position,void 0,it,at,Q,_)}):null]},i.label)),U=jt?[Math.min(...o.filter(ze).map(Be)),Math.max(...o.filter(Ye).map(Xe))].map((i,c)=>l.jsxRuntimeExports.jsx(nt.motion.g,{variants:{initial:{opacity:0,x:B(0),y:Y/2},whileInView:{x:B(i),y:Y/2,opacity:1,transition:{duration:f.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:f.duration}},children:l.jsxRuntimeExports.jsx(nt.motion.text,{x:0,variants:{initial:{opacity:0,y:0-u-5},whileInView:{opacity:1,y:0-u-5,transition:{duration:f.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:f.duration}},style:{textAnchor:"middle",...O?.graphObjectValues||{}},className:l.mo("graph-value text-sm text-primary-gray-550 dark:text-primary-gray-200",p?.graphObjectValues),children:Lt.numberFormattingFunction(i,void 0,it,at,Q,_)})},c)):null,P=$t.map((i,c)=>l.jsxRuntimeExports.jsx("text",{x:i,y:Y/2+u,style:{textAnchor:c===0?"start":c===$t.length-1?"end":"middle",...O?.xAxis?.labels||{}},className:l.mo("fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",p?.xAxis?.labels),dy:"1em",children:Lt.numberFormattingFunction(B.invert(i),void 0,it,at,Q,_)},c)),t[8]=f.duration,t[9]=p?.graphObjectValues,t[10]=p?.xAxis?.labels,t[11]=a,t[12]=n,t[13]=C,t[14]=o,t[15]=Z,t[16]=et,t[17]=g,t[18]=Y,t[19]=X,t[20]=v,t[21]=b,t[22]=r,t[23]=M,t[24]=_,t[25]=h.left,t[26]=h.top,t[27]=S,t[28]=N,t[29]=s,t[30]=m,t[31]=K,t[32]=rt,t[33]=it,t[34]=at,t[35]=u,t[36]=Ot,t[37]=lt,t[38]=jt,t[39]=st,t[40]=O?.graphObjectValues,t[41]=O?.xAxis?.labels,t[42]=Q,t[43]=j,t[44]=D,t[45]=$,t[46]=I,t[47]=w,t[48]=q,t[49]=E,t[50]=k,t[51]=A,t[52]=T,t[53]=F,t[54]=U,t[55]=P,t[56]=L}else $=t[45],I=t[46],w=t[47],q=t[48],E=t[49],k=t[50],A=t[51],T=t[52],F=t[53],U=t[54],P=t[55],L=t[56];let H;t[67]!==$||t[68]!==F||t[69]!==U||t[70]!==P?(H=l.jsxRuntimeExports.jsxs($,{children:[F,U,P]}),t[67]=$,t[68]=F,t[69]=U,t[70]=P,t[71]=H):H=t[71];let y;t[72]!==C?(y=C.filter(We).map(Ge),t[72]=C,t[73]=y):y=t[73];let G;t[74]!==w||t[75]!==H||t[76]!==y||t[77]!==L?(G=l.jsxRuntimeExports.jsxs("g",{transform:L,children:[w,H,y]}),t[74]=w,t[75]=H,t[76]=y,t[77]=L,t[78]=G):G=t[78];let tt;t[79]!==I||t[80]!==q||t[81]!==E||t[82]!==k||t[83]!==A||t[84]!==T||t[85]!==G?(tt=l.jsxRuntimeExports.jsx(I,{width:q,height:E,viewBox:k,direction:A,ref:T,children:G}),t[79]=I,t[80]=q,t[81]=E,t[82]=k,t[83]=A,t[84]=T,t[85]=G,t[86]=tt):tt=t[86];let R;t[87]!==p?.tooltip||t[88]!==ht||t[89]!==gt||t[90]!==ut||t[91]!==O?.tooltip||t[92]!==xt?(R=ut&&xt&&ht&&gt?l.jsxRuntimeExports.jsx(ie.Tooltip,{data:ut,body:xt,xPos:ht,yPos:gt,backgroundStyle:O?.tooltip,className:p?.tooltip}):null,t[87]=p?.tooltip,t[88]=ht,t[89]=gt,t[90]=ut,t[91]=O?.tooltip,t[92]=xt,t[93]=R):R=t[93];let W;t[94]!==p?.modal||t[95]!==Z||t[96]!==s?(W=Z&&s!==void 0?l.jsxRuntimeExports.jsx(oe.DetailsModal,{body:Z,data:s,setData:d,className:p?.modal}):null,t[94]=p?.modal,t[95]=Z,t[96]=s,t[97]=W):W=t[97];let pt;return t[98]!==tt||t[99]!==R||t[100]!==W?(pt=l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[tt,R,W]}),t[98]=tt,t[99]=R,t[100]=W,t[101]=pt):pt=t[101],pt}function Ge(e){return e.layer}function We(e){return e.position==="after"}function Xe(e){return e.position}function Ye(e){return!J.checkIfNullOrUndefined(e.position)}function Be(e){return e.position}function ze(e){return!J.checkIfNullOrUndefined(e.position)}function Je(e){return e.color}function Ke(e){return e.color}function Qe(e){return e.color}function Ze(e){return e.color}function _e(e){return e.color}function ti(e){return e.color}function ei(e){return e.color}function ii(e){return e.color}function oi(e){return e.color}function ni(e){return e.color}function ri(e){return e.color}function li(e){return e.color}function ai(e){return e.layer}function si(e){return e.position==="before"}function ci(e){return e.position}function ui(e){return!J.checkIfNullOrUndefined(e.position)}function pi(e){return e.position}function fi(e){return!J.checkIfNullOrUndefined(e.position)}function mi(e){return e.position}function di(e){return!J.checkIfNullOrUndefined(e.position)}function xi(e){return e.position}function hi(e){return!J.checkIfNullOrUndefined(e.position)}function gi(e,t){return{...e,id:`${t}`}}function yi(e){const t=l.compilerRuntimeExports.c(94),{data:o,graphTitle:D,colors:v,sources:n,graphDescription:a,height:u,width:V,footNote:bt,colorDomain:dt,colorLegendTitle:kt,radius:xt,padding:rt,backgroundColor:r,leftMargin:lt,rightMargin:N,topMargin:S,bottomMargin:K,tooltip:at,relativeHeight:Q,onSeriesMouseOver:st,showColorScale:b,highlightedDataPoints:g,graphID:Ot,minValue:Z,maxValue:O,onSeriesMouseClick:p,noOfTicks:j,graphDownload:f,dataDownload:m,prefix:et,suffix:it,stripType:C,language:jt,highlightColor:_,dotOpacity:wt,showNAColor:Ct,minHeight:Mt,theme:Vt,ariaLabel:Rt,valueColor:ct,resetSelectionOnDoubleClick:M,detailsOnClick:ut,orientation:It,styles:s,classNames:d,animate:ht,dimmedOpacity:Et,precision:gt,customLayers:yt,showDataMinMax:vt,locale:h}=e,X=xt===void 0?5:xt,Y=r===void 0?!1:r,$=b===void 0?!0:b;let I;t[0]!==g?(I=g===void 0?[]:g,t[0]=g,t[1]=I):I=t[1];const w=I,q=j===void 0?2:j,E=f===void 0?!1:f,k=m===void 0?!1:m,A=et===void 0?"":et,T=it===void 0?"":it,F=C===void 0?"dot":C,U=jt===void 0?"en":jt,P=wt===void 0?.3:wt,L=Ct===void 0?!0:Ct,H=Mt===void 0?0:Mt,y=Vt===void 0?"light":Vt,G=M===void 0?!0:M,tt=It===void 0?"vertical":It,R=ht===void 0?!1:ht,W=Et===void 0?.3:Et,pt=gt===void 0?2:gt;let Dt;t[2]!==yt?(Dt=yt===void 0?[]:yt,t[2]=yt,t[3]=Dt):Dt=t[3];const ft=Dt,Nt=vt===void 0?!1:vt,mt=h===void 0?"en":h,St=tt==="horizontal"?He:fe,[ot,Ht]=z.useState(0),[B,$t]=z.useState(0),[i,c]=z.useState(void 0),Yt=z.useRef(null),Jt=z.useRef(null);let Gt,Wt;t[4]===Symbol.for("react.memo_cache_sentinel")?(Gt=()=>{const Kt=new ResizeObserver(Qt=>{Ht(Qt[0].target.clientWidth||620),$t(Qt[0].target.clientHeight||480)});return Yt.current&&Kt.observe(Yt.current),()=>Kt.disconnect()},Wt=[],t[4]=Gt,t[5]=Wt):(Gt=t[4],Wt=t[5]),z.useEffect(Gt,Wt);const Bt=d?.graphContainer,zt=s?.graphContainer;let qt;t[6]!==d?.description||t[7]!==d?.title||t[8]!==o||t[9]!==k||t[10]!==a||t[11]!==E||t[12]!==D||t[13]!==s?.description||t[14]!==s?.title||t[15]!==V?(qt=D||a||E||k?l.jsxRuntimeExports.jsx(pe.GraphHeader,{styles:{title:s?.title,description:s?.description},classNames:{title:d?.title,description:d?.description},graphTitle:D,graphDescription:a,width:V,graphDownload:E?Jt:void 0,dataDownload:k?o.map(Vi).filter(Mi).length>0?o.map(Ci).filter(wi):o.filter(ji):null}):null,t[6]=d?.description,t[7]=d?.title,t[8]=o,t[9]=k,t[10]=a,t[11]=E,t[12]=D,t[13]=s?.description,t[14]=s?.title,t[15]=V,t[16]=qt):qt=t[16];let At;t[17]!==d?.colorLegend||t[18]!==dt||t[19]!==kt||t[20]!==v||t[21]!==o||t[22]!==$||t[23]!==L||t[24]!==y||t[25]!==V?(At=$!==!1&&o.filter(bi).length!==0&&o.length>0?l.jsxRuntimeExports.jsx(ce.ColorLegendWithMouseOver,{width:V,colorLegendTitle:kt,colors:v||x.Colors[y].categoricalColors.colors,colorDomain:dt||Zt.uniqBy(o,"color",!0),setSelectedColor:c,showNAColor:L,className:d?.colorLegend}):null,t[17]=d?.colorLegend,t[18]=dt,t[19]=kt,t[20]=v,t[21]=o,t[22]=$,t[23]=L,t[24]=y,t[25]=V,t[26]=At):At=t[26];let Tt;t[27]!==o.length?(Tt=o.length===0&&l.jsxRuntimeExports.jsx(se.EmptyState,{}),t[27]=o.length,t[28]=Tt):Tt=t[28];let Ft;t[29]!==St||t[30]!==R||t[31]!==K||t[32]!==d||t[33]!==dt||t[34]!==v||t[35]!==ft||t[36]!==o||t[37]!==ut||t[38]!==W||t[39]!==P||t[40]!==_||t[41]!==w||t[42]!==lt||t[43]!==mt||t[44]!==O||t[45]!==Z||t[46]!==q||t[47]!==p||t[48]!==st||t[49]!==pt||t[50]!==A||t[51]!==X||t[52]!==G||t[53]!==N||t[54]!==i||t[55]!==Nt||t[56]!==F||t[57]!==s||t[58]!==T||t[59]!==B||t[60]!==ot||t[61]!==y||t[62]!==at||t[63]!==S||t[64]!==ct?(Ft=ot&&B&&o.length>0?l.jsxRuntimeExports.jsx(St,{data:o,width:ot,showDataMinMax:Nt,height:B,colorDomain:o.filter(Oi).length===0?[]:dt||Zt.uniqBy(o,"color",!0),colors:o.filter(vi).length===0?v?[v]:[x.Colors.primaryColors["blue-600"]]:v||x.Colors[y].categoricalColors.colors,selectedColor:i,radius:X,leftMargin:lt,rightMargin:N,topMargin:S,bottomMargin:K,tooltip:at,onSeriesMouseOver:st,highlightedDataPoints:w,minValue:Z,maxValue:O,onSeriesMouseClick:p,prefix:A,suffix:T,stripType:F,highlightColor:_,dotOpacity:P,resetSelectionOnDoubleClick:G,detailsOnClick:ut,styles:s,classNames:d,valueColor:ct,animate:R===!0?{duration:.5,once:!0,amount:.5}:R||{duration:0,once:!0,amount:0},noOfTicks:q,dimmedOpacity:W,precision:pt,customLayers:ft,locale:mt}):null,t[29]=St,t[30]=R,t[31]=K,t[32]=d,t[33]=dt,t[34]=v,t[35]=ft,t[36]=o,t[37]=ut,t[38]=W,t[39]=P,t[40]=_,t[41]=w,t[42]=lt,t[43]=mt,t[44]=O,t[45]=Z,t[46]=q,t[47]=p,t[48]=st,t[49]=pt,t[50]=A,t[51]=X,t[52]=G,t[53]=N,t[54]=i,t[55]=Nt,t[56]=F,t[57]=s,t[58]=T,t[59]=B,t[60]=ot,t[61]=y,t[62]=at,t[63]=S,t[64]=ct,t[65]=Ft):Ft=t[65];let Ut;t[66]!==Tt||t[67]!==Ft?(Ut=l.jsxRuntimeExports.jsxs(_t.GraphArea,{ref:Yt,children:[Tt,Ft]}),t[66]=Tt,t[67]=Ft,t[68]=Ut):Ut=t[68];let Pt;t[69]!==d?.footnote||t[70]!==d?.source||t[71]!==bt||t[72]!==n||t[73]!==s?.footnote||t[74]!==s?.source||t[75]!==V?(Pt=n||bt?l.jsxRuntimeExports.jsx(ue.GraphFooter,{styles:{footnote:s?.footnote,source:s?.source},classNames:{footnote:d?.footnote,source:d?.source},sources:n,footNote:bt,width:V}):null,t[69]=d?.footnote,t[70]=d?.source,t[71]=bt,t[72]=n,t[73]=s?.footnote,t[74]=s?.source,t[75]=V,t[76]=Pt):Pt=t[76];let Xt;return t[77]!==Rt||t[78]!==Y||t[79]!==Ot||t[80]!==u||t[81]!==U||t[82]!==H||t[83]!==rt||t[84]!==Q||t[85]!==Bt||t[86]!==zt||t[87]!==qt||t[88]!==At||t[89]!==Ut||t[90]!==Pt||t[91]!==y||t[92]!==V?(Xt=l.jsxRuntimeExports.jsxs(_t.GraphContainer,{className:Bt,style:zt,id:Ot,ref:Jt,"aria-label":Rt,backgroundColor:Y,theme:y,language:U,minHeight:H,width:V,height:u,relativeHeight:Q,padding:rt,children:[qt,At,Ut,Pt]}),t[77]=Rt,t[78]=Y,t[79]=Ot,t[80]=u,t[81]=U,t[82]=H,t[83]=rt,t[84]=Q,t[85]=Bt,t[86]=zt,t[87]=qt,t[88]=At,t[89]=Ut,t[90]=Pt,t[91]=y,t[92]=V,t[93]=Xt):Xt=t[93],Xt}function vi(e){return e.color}function Oi(e){return e.color}function bi(e){return e.color}function ji(e){return e!==void 0}function wi(e){return e!==void 0}function Ci(e){return e.data}function Mi(e){return e!==void 0}function Vi(e){return e.data}exports.StripChart=yi;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-CHPV5EwG-D4pAp7u0.cjs"),B=require("react"),Zt=require("./index-DQA8q5sC.cjs"),_t=require("./index-Cno4Q0YE.cjs"),te=require("./Tooltip-Hr46paWP.cjs"),z=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Lt=require("./numberFormattingFunction-Cn9R7CM9.cjs"),x=require("./Colors.cjs"),ee=require("./DetailsModal-jmmKRMRM.cjs"),ie=require("./linear-CgUCbw9F.cjs"),rt=require("./proxy-CqH8m8IQ.cjs"),oe=require("./use-in-view-dnRv_qqF.cjs"),ne=require("./index-FXfr51ZM.cjs"),Kt=require("./uniqBy-O05lp2S5.cjs"),Qt=require("./GraphContainer-Cul9b74X.cjs"),le=require("./EmptyState-CFmiFPHz.cjs"),ae=require("./ColorLegendWithMouseOver.cjs"),se=require("./GraphFooter.cjs"),ce=require("./GraphHeader.cjs");function re(e,t){if(e<2)return[];const o=t/(e-1);return Array.from({length:e},(R,y)=>y*o)}function ue(e){const t=l.compilerRuntimeExports.c(102),{data:o,width:R,height:y,colors:n,colorDomain:a,radius:u,leftMargin:V,rightMargin:bt,topMargin:dt,bottomMargin:kt,tooltip:xt,onSeriesMouseOver:lt,highlightedDataPoints:r,selectedColor:at,minValue:D,maxValue:N,onSeriesMouseClick:J,noOfTicks:st,prefix:K,suffix:ct,stripType:j,highlightColor:v,dotOpacity:Ot,resetSelectionOnDoubleClick:Q,detailsOnClick:O,styles:p,classNames:w,valueColor:f,animate:m,dimmedOpacity:et,precision:it,customLayers:C,showDataMinMax:jt,locale:Z}=e,wt=V===void 0?20:V,Ct=bt===void 0?20:bt,Mt=dt===void 0?10:dt,Vt=kt===void 0?10:kt,Rt=B.useRef(null);let ut;t[0]!==m.amount||t[1]!==m.once?(ut={once:m.once,amount:m.amount},t[0]=m.amount,t[1]=m.once,t[2]=ut):ut=t[2];const M=oe.useInView(Rt,ut),[pt,It]=B.useState(void 0),[s,d]=B.useState(void 0),[ht,Et]=B.useState(void 0),[gt,yt]=B.useState(void 0);let vt;t[3]!==Vt||t[4]!==wt||t[5]!==Ct||t[6]!==Mt?(vt={top:Mt,bottom:Vt,left:wt,right:Ct},t[3]=Vt,t[4]=wt,t[5]=Ct,t[6]=Mt,t[7]=vt):vt=t[7];const h=vt,X=R-h.left-h.right,Y=y-h.top-h.bottom;let S,$,b,I,q,A,T,F,U,L,P,g;if(t[8]!==m.duration||t[9]!==w?.graphObjectValues||t[10]!==w?.yAxis?.labels||t[11]!==a||t[12]!==n||t[13]!==C||t[14]!==o||t[15]!==O||t[16]!==et||t[17]!==Ot||t[18]!==Y||t[19]!==X||t[20]!==y||t[21]!==v||t[22]!==r||t[23]!==M||t[24]!==Z||t[25]!==h.left||t[26]!==h.top||t[27]!==N||t[28]!==D||t[29]!==s||t[30]!==st||t[31]!==J||t[32]!==lt||t[33]!==it||t[34]!==K||t[35]!==u||t[36]!==Q||t[37]!==at||t[38]!==jt||t[39]!==j||t[40]!==p?.graphObjectValues||t[41]!==p?.yAxis?.labels||t[42]!==ct||t[43]!==f||t[44]!==R){const Dt=o.map(Ue);let mt;t[57]!==r?(mt=i=>{const c=(r||[]).indexOf(i.label);return c===-1?1/0:c},t[57]=r,t[58]=mt):mt=t[58];const Nt=_t.orderBy(Dt,[mt],["desc"]);let ot;t[59]!==o||t[60]!==N?(ot=z.checkIfNullOrUndefined(N)?Math.max(...o.filter(Fe).map(Te))<0?0:Math.max(...o.filter(Ae).map(qe)):N,t[59]=o,t[60]=N,t[61]=ot):ot=t[61];const Pt=ot;let nt;t[62]!==o||t[63]!==D?(nt=z.checkIfNullOrUndefined(D)?Math.min(...o.filter($e).map(Se))>=0?0:Math.min(...o.filter(Ne).map(De)):D,t[62]=o,t[63]=D,t[64]=nt):nt=t[64];const Ht=nt,tt=ie.linear().domain([Ht,Pt]).range([Y,0]).nice(),St=re(st,Y);$=rt.motion.svg,I=`${R}px`,q=`${y}px`,A=`0 0 ${R} ${y}`,T="ltr",F=Rt,g=`translate(${h.left},${h.top})`,t[65]!==C?(b=C.filter(Re).map(ke),t[65]=C,t[66]=b):b=t[66],S=ne.AnimatePresence,U=Nt.map(i=>l.jsxRuntimeExports.jsxs(rt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:0,x:X/2,y:tt(0)},whileInView:{x:X/2,y:tt(i.position),opacity:at?i.color&&n[a.indexOf(i.color)]===at?.95:et:r?r.indexOf(i.label)!==-1?.95:et:Ot,transition:{duration:m.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},onMouseEnter:c=>{It(i),yt(c.clientY),Et(c.clientX),lt?.(i)},onClick:()=>{(J||O)&&(Zt.isEqual(s,i)&&Q?(d(void 0),J?.(void 0)):(d(i),J?.(i)))},onMouseMove:c=>{It(i),yt(c.clientY),Et(c.clientX)},onMouseLeave:()=>{It(void 0),Et(void 0),yt(void 0),lt?.(void 0)},children:[j==="dot"?l.jsxRuntimeExports.jsx(rt.motion.circle,{cy:0,cx:0,variants:{initial:{fill:v&&r?r.indexOf(i.label)!==-1?v:o.filter(Ee).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray:o.filter(Ie).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray},whileInView:{fill:v&&r?r.indexOf(i.label)!==-1?v:o.filter(Ve).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray:o.filter(Me).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray,transition:{duration:m.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},r:u}):l.jsxRuntimeExports.jsx(rt.motion.rect,{y:-1,height:2,variants:{initial:{x:0-u,width:u*2,fill:v&&r?r.indexOf(i.label)!==-1?v:o.filter(Ce).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray:o.filter(we).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray},whileInView:{x:0-u,width:u*2,fill:v&&r?r.indexOf(i.label)!==-1?v:o.filter(je).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray:o.filter(be).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray,transition:{duration:m.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}}}),r&&r.indexOf(i.label)!==-1?l.jsxRuntimeExports.jsx(rt.motion.text,{y:0,dy:"0.33em",variants:{initial:{opacity:0,x:0+u+3,fill:f||(v&&r?r.indexOf(i.label)!==-1?v:o.filter(Oe).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray:o.filter(ve).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray)},whileInView:{opacity:1,x:0+u+3,fill:f||(v&&r?r.indexOf(i.label)!==-1?v:o.filter(ye).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray:o.filter(ge).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray),transition:{duration:m.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},style:{textAnchor:"start",...p?.graphObjectValues||{}},className:l.mo("graph-value text-sm font-bold",w?.graphObjectValues),children:Lt.numberFormattingFunction(i.position,void 0,it,K,ct,Z)}):null]},i.label)),L=jt?[Math.min(...o.filter(he).map(xe)),Math.max(...o.filter(de).map(me))].map((i,c)=>l.jsxRuntimeExports.jsx(rt.motion.g,{variants:{initial:{opacity:0,x:X/2,y:tt(0)},whileInView:{x:X/2,y:tt(i),opacity:1,transition:{duration:m.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},children:l.jsxRuntimeExports.jsx(rt.motion.text,{y:0,dy:"0.33em",variants:{initial:{opacity:0,x:0+u+3},whileInView:{opacity:1,x:0+u+3,transition:{duration:m.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},style:{textAnchor:"start",...p?.graphObjectValues||{}},className:l.mo("graph-value text-sm text-primary-gray-550 dark:text-primary-gray-200",w?.graphObjectValues),children:Lt.numberFormattingFunction(i,void 0,it,K,ct,Z)},c)},c)):null,P=St.map((i,c)=>l.jsxRuntimeExports.jsx("text",{y:i,x:X/2+u+5,style:{textAnchor:"start",...p?.yAxis?.labels||{}},className:l.mo("fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",w?.yAxis?.labels),children:Lt.numberFormattingFunction(tt.invert(i),void 0,it,K,ct,Z)},c)),t[8]=m.duration,t[9]=w?.graphObjectValues,t[10]=w?.yAxis?.labels,t[11]=a,t[12]=n,t[13]=C,t[14]=o,t[15]=O,t[16]=et,t[17]=Ot,t[18]=Y,t[19]=X,t[20]=y,t[21]=v,t[22]=r,t[23]=M,t[24]=Z,t[25]=h.left,t[26]=h.top,t[27]=N,t[28]=D,t[29]=s,t[30]=st,t[31]=J,t[32]=lt,t[33]=it,t[34]=K,t[35]=u,t[36]=Q,t[37]=at,t[38]=jt,t[39]=j,t[40]=p?.graphObjectValues,t[41]=p?.yAxis?.labels,t[42]=ct,t[43]=f,t[44]=R,t[45]=S,t[46]=$,t[47]=b,t[48]=I,t[49]=q,t[50]=A,t[51]=T,t[52]=F,t[53]=U,t[54]=L,t[55]=P,t[56]=g}else S=t[45],$=t[46],b=t[47],I=t[48],q=t[49],A=t[50],T=t[51],F=t[52],U=t[53],L=t[54],P=t[55],g=t[56];let H;t[67]!==S||t[68]!==U||t[69]!==L||t[70]!==P?(H=l.jsxRuntimeExports.jsxs(S,{children:[U,L,P]}),t[67]=S,t[68]=U,t[69]=L,t[70]=P,t[71]=H):H=t[71];let _;t[72]!==C?(_=C.filter(fe).map(pe),t[72]=C,t[73]=_):_=t[73];let E;t[74]!==b||t[75]!==H||t[76]!==_||t[77]!==g?(E=l.jsxRuntimeExports.jsxs("g",{transform:g,children:[b,H,_]}),t[74]=b,t[75]=H,t[76]=_,t[77]=g,t[78]=E):E=t[78];let G;t[79]!==$||t[80]!==I||t[81]!==q||t[82]!==A||t[83]!==T||t[84]!==F||t[85]!==E?(G=l.jsxRuntimeExports.jsx($,{width:I,height:q,viewBox:A,direction:T,ref:F,children:E}),t[79]=$,t[80]=I,t[81]=q,t[82]=A,t[83]=T,t[84]=F,t[85]=E,t[86]=G):G=t[86];let W;t[87]!==w?.tooltip||t[88]!==ht||t[89]!==gt||t[90]!==pt||t[91]!==p?.tooltip||t[92]!==xt?(W=pt&&xt&&ht&&gt?l.jsxRuntimeExports.jsx(te.Tooltip,{data:pt,body:xt,xPos:ht,yPos:gt,backgroundStyle:p?.tooltip,className:w?.tooltip}):null,t[87]=w?.tooltip,t[88]=ht,t[89]=gt,t[90]=pt,t[91]=p?.tooltip,t[92]=xt,t[93]=W):W=t[93];let k;t[94]!==w?.modal||t[95]!==O||t[96]!==s?(k=O&&s!==void 0?l.jsxRuntimeExports.jsx(ee.DetailsModal,{body:O,data:s,setData:d,className:w?.modal}):null,t[94]=w?.modal,t[95]=O,t[96]=s,t[97]=k):k=t[97];let ft;return t[98]!==G||t[99]!==W||t[100]!==k?(ft=l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[G,W,k]}),t[98]=G,t[99]=W,t[100]=k,t[101]=ft):ft=t[101],ft}function pe(e){return e.layer}function fe(e){return e.position==="after"}function me(e){return e.position}function de(e){return!z.checkIfNullOrUndefined(e.position)}function xe(e){return e.position}function he(e){return!z.checkIfNullOrUndefined(e.position)}function ge(e){return e.color}function ye(e){return e.color}function ve(e){return e.color}function Oe(e){return e.color}function be(e){return e.color}function je(e){return e.color}function we(e){return e.color}function Ce(e){return e.color}function Me(e){return e.color}function Ve(e){return e.color}function Ie(e){return e.color}function Ee(e){return e.color}function ke(e){return e.layer}function Re(e){return e.position==="before"}function De(e){return e.position}function Ne(e){return!z.checkIfNullOrUndefined(e.position)}function Se(e){return e.position}function $e(e){return!z.checkIfNullOrUndefined(e.position)}function qe(e){return e.position}function Ae(e){return!z.checkIfNullOrUndefined(e.position)}function Te(e){return e.position}function Fe(e){return!z.checkIfNullOrUndefined(e.position)}function Ue(e,t){return{...e,id:`${t}`}}function Le(e){const t=l.compilerRuntimeExports.c(102),{data:o,width:R,height:y,colors:n,colorDomain:a,radius:u,leftMargin:V,rightMargin:bt,topMargin:dt,bottomMargin:kt,tooltip:xt,onSeriesMouseOver:lt,highlightedDataPoints:r,selectedColor:at,minValue:D,maxValue:N,onSeriesMouseClick:J,prefix:st,suffix:K,stripType:ct,highlightColor:j,dotOpacity:v,resetSelectionOnDoubleClick:Ot,detailsOnClick:Q,styles:O,classNames:p,valueColor:w,animate:f,noOfTicks:m,dimmedOpacity:et,precision:it,customLayers:C,showDataMinMax:jt,locale:Z}=e,wt=V===void 0?5:V,Ct=bt===void 0?5:bt,Mt=dt===void 0?10:dt,Vt=kt===void 0?10:kt,Rt=B.useRef(null);let ut;t[0]!==f.amount||t[1]!==f.once?(ut={once:f.once,amount:f.amount},t[0]=f.amount,t[1]=f.once,t[2]=ut):ut=t[2];const M=oe.useInView(Rt,ut),[pt,It]=B.useState(void 0),[s,d]=B.useState(void 0),[ht,Et]=B.useState(void 0),[gt,yt]=B.useState(void 0);let vt;t[3]!==Vt||t[4]!==wt||t[5]!==Ct||t[6]!==Mt?(vt={top:Mt,bottom:Vt,left:wt,right:Ct},t[3]=Vt,t[4]=wt,t[5]=Ct,t[6]=Mt,t[7]=vt):vt=t[7];const h=vt,X=R-h.left-h.right,Y=y-h.top-h.bottom;let S,$,b,I,q,A,T,F,U,L,P,g;if(t[8]!==f.duration||t[9]!==p?.graphObjectValues||t[10]!==p?.xAxis?.labels||t[11]!==a||t[12]!==n||t[13]!==C||t[14]!==o||t[15]!==Q||t[16]!==et||t[17]!==v||t[18]!==Y||t[19]!==X||t[20]!==y||t[21]!==j||t[22]!==r||t[23]!==M||t[24]!==Z||t[25]!==h.left||t[26]!==h.top||t[27]!==N||t[28]!==D||t[29]!==s||t[30]!==m||t[31]!==J||t[32]!==lt||t[33]!==it||t[34]!==st||t[35]!==u||t[36]!==Ot||t[37]!==at||t[38]!==jt||t[39]!==ct||t[40]!==O?.graphObjectValues||t[41]!==O?.xAxis?.labels||t[42]!==K||t[43]!==w||t[44]!==R){const Dt=o.map(xi);let mt;t[57]!==r?(mt=i=>{const c=(r||[]).indexOf(i.label);return c===-1?1/0:c},t[57]=r,t[58]=mt):mt=t[58];const Nt=_t.orderBy(Dt,[mt],["desc"]);let ot;t[59]!==o||t[60]!==N?(ot=z.checkIfNullOrUndefined(N)?Math.max(...o.filter(di).map(mi))<0?0:Math.max(...o.filter(fi).map(pi)):N,t[59]=o,t[60]=N,t[61]=ot):ot=t[61];const Pt=ot;let nt;t[62]!==o||t[63]!==D?(nt=z.checkIfNullOrUndefined(D)?Math.min(...o.filter(ui).map(ci))>=0?0:Math.min(...o.filter(si).map(ai)):D,t[62]=o,t[63]=D,t[64]=nt):nt=t[64];const Ht=nt,tt=ie.linear().domain([Ht,Pt]).range([0,X]).nice(),St=re(m,X);$=rt.motion.svg,I=`${R}px`,q=`${y}px`,A=`0 0 ${R} ${y}`,T="ltr",F=Rt,g=`translate(${h.left},${h.top})`,t[65]!==C?(b=C.filter(li).map(ri),t[65]=C,t[66]=b):b=t[66],S=ne.AnimatePresence,U=Nt.map(i=>l.jsxRuntimeExports.jsxs(rt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:0,x:tt(0),y:Y/2},whileInView:{x:tt(i.position),y:Y/2,opacity:at?i.color&&n[a.indexOf(i.color)]===at?.95:et:r?r.indexOf(i.label)!==-1?.95:et:v,transition:{duration:f.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:f.duration}},onMouseEnter:c=>{It(i),yt(c.clientY),Et(c.clientX),lt?.(i)},onClick:()=>{(J||Q)&&(Zt.isEqual(s,i)&&Ot?(d(void 0),J?.(void 0)):(d(i),J?.(i)))},onMouseMove:c=>{It(i),yt(c.clientY),Et(c.clientX)},onMouseLeave:()=>{It(void 0),Et(void 0),yt(void 0),lt?.(void 0)},children:[ct==="dot"?l.jsxRuntimeExports.jsx(rt.motion.circle,{cy:0,cx:0,variants:{initial:{fill:j&&r?r.indexOf(i.label)!==-1?j:o.filter(ni).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray:o.filter(oi).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray},whileInView:{fill:j&&r?r.indexOf(i.label)!==-1?j:o.filter(ii).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray:o.filter(ei).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray,transition:{duration:f.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:f.duration}},r:u}):l.jsxRuntimeExports.jsx(rt.motion.rect,{x:-1,width:2,variants:{initial:{y:0-u,height:u*2,fill:j&&r?r.indexOf(i.label)!==-1?j:o.filter(ti).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray:o.filter(_e).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray},whileInView:{y:0-u,height:u*2,fill:j&&r?r.indexOf(i.label)!==-1?j:o.filter(Ze).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray:o.filter(Qe).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray,transition:{duration:f.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:f.duration}}}),r&&r.indexOf(i.label)!==-1?l.jsxRuntimeExports.jsx(rt.motion.text,{x:0,variants:{initial:{opacity:0,y:0-u-5,fill:w||(j&&r?r.indexOf(i.label)!==-1?j:o.filter(Ke).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray:o.filter(Je).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray)},whileInView:{opacity:1,y:0-u-5,fill:w||(j&&r?r.indexOf(i.label)!==-1?j:o.filter(ze).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray:o.filter(Be).length===0?n[0]:i.color?n[a.indexOf(i.color)]:x.Colors.gray),transition:{duration:f.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:f.duration}},style:{textAnchor:"middle",...O?.graphObjectValues||{}},className:l.mo("graph-value text-sm font-bold",p?.graphObjectValues),children:Lt.numberFormattingFunction(i.position,void 0,it,st,K,Z)}):null]},i.label)),L=jt?[Math.min(...o.filter(Ye).map(Xe)),Math.max(...o.filter(We).map(Ge))].map((i,c)=>l.jsxRuntimeExports.jsx(rt.motion.g,{variants:{initial:{opacity:0,x:tt(0),y:Y/2},whileInView:{x:tt(i),y:Y/2,opacity:1,transition:{duration:f.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:f.duration}},children:l.jsxRuntimeExports.jsx(rt.motion.text,{x:0,variants:{initial:{opacity:0,y:0-u-5},whileInView:{opacity:1,y:0-u-5,transition:{duration:f.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:f.duration}},style:{textAnchor:"middle",...O?.graphObjectValues||{}},className:l.mo("graph-value text-sm text-primary-gray-550 dark:text-primary-gray-200",p?.graphObjectValues),children:Lt.numberFormattingFunction(i,void 0,it,st,K,Z)})},c)):null,P=St.map((i,c)=>l.jsxRuntimeExports.jsx("text",{x:i,y:Y/2+u,style:{textAnchor:c===0?"start":c===St.length-1?"end":"middle",...O?.xAxis?.labels||{}},className:l.mo("fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",p?.xAxis?.labels),dy:"1em",children:Lt.numberFormattingFunction(tt.invert(i),void 0,it,st,K,Z)},c)),t[8]=f.duration,t[9]=p?.graphObjectValues,t[10]=p?.xAxis?.labels,t[11]=a,t[12]=n,t[13]=C,t[14]=o,t[15]=Q,t[16]=et,t[17]=v,t[18]=Y,t[19]=X,t[20]=y,t[21]=j,t[22]=r,t[23]=M,t[24]=Z,t[25]=h.left,t[26]=h.top,t[27]=N,t[28]=D,t[29]=s,t[30]=m,t[31]=J,t[32]=lt,t[33]=it,t[34]=st,t[35]=u,t[36]=Ot,t[37]=at,t[38]=jt,t[39]=ct,t[40]=O?.graphObjectValues,t[41]=O?.xAxis?.labels,t[42]=K,t[43]=w,t[44]=R,t[45]=S,t[46]=$,t[47]=b,t[48]=I,t[49]=q,t[50]=A,t[51]=T,t[52]=F,t[53]=U,t[54]=L,t[55]=P,t[56]=g}else S=t[45],$=t[46],b=t[47],I=t[48],q=t[49],A=t[50],T=t[51],F=t[52],U=t[53],L=t[54],P=t[55],g=t[56];let H;t[67]!==S||t[68]!==U||t[69]!==L||t[70]!==P?(H=l.jsxRuntimeExports.jsxs(S,{children:[U,L,P]}),t[67]=S,t[68]=U,t[69]=L,t[70]=P,t[71]=H):H=t[71];let _;t[72]!==C?(_=C.filter(He).map(Pe),t[72]=C,t[73]=_):_=t[73];let E;t[74]!==b||t[75]!==H||t[76]!==_||t[77]!==g?(E=l.jsxRuntimeExports.jsxs("g",{transform:g,children:[b,H,_]}),t[74]=b,t[75]=H,t[76]=_,t[77]=g,t[78]=E):E=t[78];let G;t[79]!==$||t[80]!==I||t[81]!==q||t[82]!==A||t[83]!==T||t[84]!==F||t[85]!==E?(G=l.jsxRuntimeExports.jsx($,{width:I,height:q,viewBox:A,direction:T,ref:F,children:E}),t[79]=$,t[80]=I,t[81]=q,t[82]=A,t[83]=T,t[84]=F,t[85]=E,t[86]=G):G=t[86];let W;t[87]!==p?.tooltip||t[88]!==ht||t[89]!==gt||t[90]!==pt||t[91]!==O?.tooltip||t[92]!==xt?(W=pt&&xt&&ht&&gt?l.jsxRuntimeExports.jsx(te.Tooltip,{data:pt,body:xt,xPos:ht,yPos:gt,backgroundStyle:O?.tooltip,className:p?.tooltip}):null,t[87]=p?.tooltip,t[88]=ht,t[89]=gt,t[90]=pt,t[91]=O?.tooltip,t[92]=xt,t[93]=W):W=t[93];let k;t[94]!==p?.modal||t[95]!==Q||t[96]!==s?(k=Q&&s!==void 0?l.jsxRuntimeExports.jsx(ee.DetailsModal,{body:Q,data:s,setData:d,className:p?.modal}):null,t[94]=p?.modal,t[95]=Q,t[96]=s,t[97]=k):k=t[97];let ft;return t[98]!==G||t[99]!==W||t[100]!==k?(ft=l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[G,W,k]}),t[98]=G,t[99]=W,t[100]=k,t[101]=ft):ft=t[101],ft}function Pe(e){return e.layer}function He(e){return e.position==="after"}function Ge(e){return e.position}function We(e){return!z.checkIfNullOrUndefined(e.position)}function Xe(e){return e.position}function Ye(e){return!z.checkIfNullOrUndefined(e.position)}function Be(e){return e.color}function ze(e){return e.color}function Je(e){return e.color}function Ke(e){return e.color}function Qe(e){return e.color}function Ze(e){return e.color}function _e(e){return e.color}function ti(e){return e.color}function ei(e){return e.color}function ii(e){return e.color}function oi(e){return e.color}function ni(e){return e.color}function ri(e){return e.layer}function li(e){return e.position==="before"}function ai(e){return e.position}function si(e){return!z.checkIfNullOrUndefined(e.position)}function ci(e){return e.position}function ui(e){return!z.checkIfNullOrUndefined(e.position)}function pi(e){return e.position}function fi(e){return!z.checkIfNullOrUndefined(e.position)}function mi(e){return e.position}function di(e){return!z.checkIfNullOrUndefined(e.position)}function xi(e,t){return{...e,id:`${t}`}}function hi(e){const t=l.compilerRuntimeExports.c(92),{data:o,graphTitle:R,colors:y,sources:n,graphDescription:a,height:u,width:V,footNote:bt,colorDomain:dt,colorLegendTitle:kt,radius:xt,padding:lt,backgroundColor:r,leftMargin:at,rightMargin:D,topMargin:N,bottomMargin:J,tooltip:st,relativeHeight:K,onSeriesMouseOver:ct,showColorScale:j,highlightedDataPoints:v,graphID:Ot,minValue:Q,maxValue:O,onSeriesMouseClick:p,noOfTicks:w,graphDownload:f,dataDownload:m,prefix:et,suffix:it,stripType:C,language:jt,highlightColor:Z,dotOpacity:wt,showNAColor:Ct,minHeight:Mt,theme:Vt,ariaLabel:Rt,valueColor:ut,resetSelectionOnDoubleClick:M,detailsOnClick:pt,orientation:It,styles:s,classNames:d,animate:ht,dimmedOpacity:Et,precision:gt,customLayers:yt,showDataMinMax:vt,locale:h}=e,X=xt===void 0?5:xt,Y=r===void 0?!1:r,S=j===void 0?!0:j,$=w===void 0?2:w,b=f===void 0?!1:f,I=m===void 0?!1:m,q=et===void 0?"":et,A=it===void 0?"":it,T=C===void 0?"dot":C,F=jt===void 0?"en":jt,U=wt===void 0?.3:wt,L=Ct===void 0?!0:Ct,P=Mt===void 0?0:Mt,g=Vt===void 0?"light":Vt,H=M===void 0?!0:M,_=It===void 0?"vertical":It,E=ht===void 0?!1:ht,G=Et===void 0?.3:Et,W=gt===void 0?2:gt;let k;t[0]!==yt?(k=yt===void 0?[]:yt,t[0]=yt,t[1]=k):k=t[1];const ft=k,Dt=vt===void 0?!1:vt,mt=h===void 0?"en":h,Nt=_==="horizontal"?Le:ue,[ot,Pt]=B.useState(0),[nt,Ht]=B.useState(0),[tt,St]=B.useState(void 0),i=B.useRef(null),c=B.useRef(null);let Gt,Wt;t[2]===Symbol.for("react.memo_cache_sentinel")?(Gt=()=>{const zt=new ResizeObserver(Jt=>{Pt(Jt[0].target.clientWidth||620),Ht(Jt[0].target.clientHeight||480)});return i.current&&zt.observe(i.current),()=>zt.disconnect()},Wt=[],t[2]=Gt,t[3]=Wt):(Gt=t[2],Wt=t[3]),B.useEffect(Gt,Wt);const Yt=d?.graphContainer,Bt=s?.graphContainer;let $t;t[4]!==d?.description||t[5]!==d?.title||t[6]!==o||t[7]!==I||t[8]!==a||t[9]!==b||t[10]!==R||t[11]!==s?.description||t[12]!==s?.title||t[13]!==V?($t=R||a||b||I?l.jsxRuntimeExports.jsx(ce.GraphHeader,{styles:{title:s?.title,description:s?.description},classNames:{title:d?.title,description:d?.description},graphTitle:R,graphDescription:a,width:V,graphDownload:b?c:void 0,dataDownload:I?o.map(Ci).filter(wi).length>0?o.map(ji).filter(bi):o.filter(Oi):null}):null,t[4]=d?.description,t[5]=d?.title,t[6]=o,t[7]=I,t[8]=a,t[9]=b,t[10]=R,t[11]=s?.description,t[12]=s?.title,t[13]=V,t[14]=$t):$t=t[14];let qt;t[15]!==d?.colorLegend||t[16]!==dt||t[17]!==kt||t[18]!==y||t[19]!==o||t[20]!==S||t[21]!==L||t[22]!==g||t[23]!==V?(qt=S!==!1&&o.filter(vi).length!==0&&o.length>0?l.jsxRuntimeExports.jsx(ae.ColorLegendWithMouseOver,{width:V,colorLegendTitle:kt,colors:y||x.Colors[g].categoricalColors.colors,colorDomain:dt||Kt.uniqBy(o,"color",!0),setSelectedColor:St,showNAColor:L,className:d?.colorLegend}):null,t[15]=d?.colorLegend,t[16]=dt,t[17]=kt,t[18]=y,t[19]=o,t[20]=S,t[21]=L,t[22]=g,t[23]=V,t[24]=qt):qt=t[24];let At;t[25]!==o.length?(At=o.length===0&&l.jsxRuntimeExports.jsx(le.EmptyState,{}),t[25]=o.length,t[26]=At):At=t[26];let Tt;t[27]!==Nt||t[28]!==E||t[29]!==J||t[30]!==d||t[31]!==dt||t[32]!==y||t[33]!==ft||t[34]!==o||t[35]!==pt||t[36]!==G||t[37]!==U||t[38]!==Z||t[39]!==v||t[40]!==at||t[41]!==mt||t[42]!==O||t[43]!==Q||t[44]!==$||t[45]!==p||t[46]!==ct||t[47]!==W||t[48]!==q||t[49]!==X||t[50]!==H||t[51]!==D||t[52]!==tt||t[53]!==Dt||t[54]!==T||t[55]!==s||t[56]!==A||t[57]!==nt||t[58]!==ot||t[59]!==g||t[60]!==st||t[61]!==N||t[62]!==ut?(Tt=ot&&nt&&o.length>0?l.jsxRuntimeExports.jsx(Nt,{data:o,width:ot,showDataMinMax:Dt,height:nt,colorDomain:o.filter(yi).length===0?[]:dt||Kt.uniqBy(o,"color",!0),colors:o.filter(gi).length===0?y?[y]:[x.Colors.primaryColors["blue-600"]]:y||x.Colors[g].categoricalColors.colors,selectedColor:tt,radius:X,leftMargin:at,rightMargin:D,topMargin:N,bottomMargin:J,tooltip:st,onSeriesMouseOver:ct,highlightedDataPoints:v,minValue:Q,maxValue:O,onSeriesMouseClick:p,prefix:q,suffix:A,stripType:T,highlightColor:Z,dotOpacity:U,resetSelectionOnDoubleClick:H,detailsOnClick:pt,styles:s,classNames:d,valueColor:ut,animate:E===!0?{duration:.5,once:!0,amount:.5}:E||{duration:0,once:!0,amount:0},noOfTicks:$,dimmedOpacity:G,precision:W,customLayers:ft,locale:mt}):null,t[27]=Nt,t[28]=E,t[29]=J,t[30]=d,t[31]=dt,t[32]=y,t[33]=ft,t[34]=o,t[35]=pt,t[36]=G,t[37]=U,t[38]=Z,t[39]=v,t[40]=at,t[41]=mt,t[42]=O,t[43]=Q,t[44]=$,t[45]=p,t[46]=ct,t[47]=W,t[48]=q,t[49]=X,t[50]=H,t[51]=D,t[52]=tt,t[53]=Dt,t[54]=T,t[55]=s,t[56]=A,t[57]=nt,t[58]=ot,t[59]=g,t[60]=st,t[61]=N,t[62]=ut,t[63]=Tt):Tt=t[63];let Ft;t[64]!==At||t[65]!==Tt?(Ft=l.jsxRuntimeExports.jsxs(Qt.GraphArea,{ref:i,children:[At,Tt]}),t[64]=At,t[65]=Tt,t[66]=Ft):Ft=t[66];let Ut;t[67]!==d?.footnote||t[68]!==d?.source||t[69]!==bt||t[70]!==n||t[71]!==s?.footnote||t[72]!==s?.source||t[73]!==V?(Ut=n||bt?l.jsxRuntimeExports.jsx(se.GraphFooter,{styles:{footnote:s?.footnote,source:s?.source},classNames:{footnote:d?.footnote,source:d?.source},sources:n,footNote:bt,width:V}):null,t[67]=d?.footnote,t[68]=d?.source,t[69]=bt,t[70]=n,t[71]=s?.footnote,t[72]=s?.source,t[73]=V,t[74]=Ut):Ut=t[74];let Xt;return t[75]!==Rt||t[76]!==Y||t[77]!==Ot||t[78]!==u||t[79]!==F||t[80]!==P||t[81]!==lt||t[82]!==K||t[83]!==Yt||t[84]!==Bt||t[85]!==$t||t[86]!==qt||t[87]!==Ft||t[88]!==Ut||t[89]!==g||t[90]!==V?(Xt=l.jsxRuntimeExports.jsxs(Qt.GraphContainer,{className:Yt,style:Bt,id:Ot,ref:c,"aria-label":Rt,backgroundColor:Y,theme:g,language:F,minHeight:P,width:V,height:u,relativeHeight:K,padding:lt,children:[$t,qt,Ft,Ut]}),t[75]=Rt,t[76]=Y,t[77]=Ot,t[78]=u,t[79]=F,t[80]=P,t[81]=lt,t[82]=K,t[83]=Yt,t[84]=Bt,t[85]=$t,t[86]=qt,t[87]=Ft,t[88]=Ut,t[89]=g,t[90]=V,t[91]=Xt):Xt=t[91],Xt}function gi(e){return e.color}function yi(e){return e.color}function vi(e){return e.color}function Oi(e){return e!==void 0}function bi(e){return e!==void 0}function ji(e){return e.data}function wi(e){return e!==void 0}function Ci(e){return e.data}exports.StripChart=hi;
2
2
  //# sourceMappingURL=StripChart.cjs.map