@undp/data-viz 2.2.1 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AreaChart.cjs +1 -1
- package/dist/AreaChart.js +1 -1
- package/dist/Axis-D56Gy0se.js +31 -0
- package/dist/Axis-D56Gy0se.js.map +1 -0
- package/dist/Axis-Jt_tmhxS.cjs +2 -0
- package/dist/Axis-Jt_tmhxS.cjs.map +1 -0
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.d.ts +6 -0
- package/dist/BarGraph.js +1759 -1750
- package/dist/BarGraph.js.map +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.d.ts +2 -0
- package/dist/BeeSwarmChart.js +270 -267
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.d.ts +2 -0
- package/dist/BiVariateChoroplethMap.js +264 -250
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.d.ts +2 -0
- package/dist/BulletChart.js +544 -542
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.d.ts +2 -0
- package/dist/ButterflyChart.js +332 -330
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.d.ts +2 -0
- package/dist/ChoroplethMap.js +272 -258
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.js +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.js +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.d.ts +2 -0
- package/dist/DumbbellChart.js +537 -536
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/GraphEl-BZbunD1_.cjs +2 -0
- package/dist/GraphEl-BZbunD1_.cjs.map +1 -0
- package/dist/{GraphEl-DKrjuQNB.js → GraphEl-C1Rz1V__.js} +68 -57
- package/dist/GraphEl-C1Rz1V__.js.map +1 -0
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.d.ts +2 -0
- package/dist/GriddedGraphs.js +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +2 -0
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.cjs.map +1 -1
- package/dist/Histogram.d.ts +2 -0
- package/dist/Histogram.js +50 -49
- package/dist/Histogram.js.map +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.js +1 -1
- package/dist/MultiGraphDashboard.d.ts +2 -0
- package/dist/MultiGraphDashboardFromConfig.d.ts +2 -0
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.js +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.js +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.js +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +2 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +2 -0
- package/dist/PerformanceIntensiveScrollStory.d.ts +2 -0
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.js +1 -1
- package/dist/ScrollStory.d.ts +2 -0
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.js +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.d.ts +2 -0
- package/dist/SingleGraphDashboard.js +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +2 -0
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +2 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +2 -0
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +2 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +2 -0
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.js +1 -1
- package/dist/Types.d.ts +2 -0
- package/dist/WaterfallChart.cjs +1 -1
- package/dist/WaterfallChart.cjs.map +1 -1
- package/dist/WaterfallChart.d.ts +2 -0
- package/dist/WaterfallChart.js +263 -261
- package/dist/WaterfallChart.js.map +1 -1
- package/dist/index.d.ts +24 -0
- package/package.json +1 -1
- package/dist/Axis-DoOqnt6g.js +0 -32
- package/dist/Axis-DoOqnt6g.js.map +0 -1
- package/dist/Axis-Dtjn-EgM.cjs +0 -2
- package/dist/Axis-Dtjn-EgM.cjs.map +0 -1
- package/dist/GraphEl-CBZdcvb7.cjs +0 -2
- package/dist/GraphEl-CBZdcvb7.cjs.map +0 -1
- package/dist/GraphEl-DKrjuQNB.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChoroplethMap.js","sources":["../src/Components/Graphs/Maps/ChoroplethMap/Graph.tsx","../src/Components/Graphs/Maps/ChoroplethMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleThreshold, scaleOrdinal } from 'd3-scale';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport {\r\n AnimateDataType,\r\n ChoroplethMapDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { X } from '@/Components/Icons';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n colorDomain: (number | string)[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData: any;\r\n width: number;\r\n height: number;\r\n colors: string[];\r\n colorLegendTitle?: string;\r\n categorical: boolean;\r\n data: ChoroplethMapDataType[];\r\n scale: number;\r\n centerPoint?: [number, number];\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n mapBorderColor: string;\r\n isWorldMap: boolean;\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 showColorScale: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedIds: string[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n mapProperty: string;\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 zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n collapseColorScaleByDefault?: boolean;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colorDomain,\r\n colors,\r\n mapData,\r\n colorLegendTitle,\r\n categorical,\r\n height,\r\n width,\r\n scale,\r\n centerPoint,\r\n tooltip,\r\n mapBorderWidth,\r\n mapBorderColor,\r\n mapNoDataColor,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedIds,\r\n onSeriesMouseClick,\r\n mapProperty,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n collapseColorScaleByDefault,\r\n } = props;\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\r\n const colorScale = categorical\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const bounds = bbox(mapData as any);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const center = centerOfMass(mapData as any);\r\n const lonDiff = bounds[2] - bounds[0];\r\n const latDiff = bounds[3] - bounds[1];\r\n const scaleX = (((width * 190) / 960) * 360) / lonDiff;\r\n const scaleY = (((height * 190) / 678) * 180) / latDiff;\r\n const scaleVar = scale * Math.min(scaleX, scaleY);\r\n\r\n const projection =\r\n mapProjection === 'mercator'\r\n ? geoMercator()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'equalEarth'\r\n ? geoEqualEarth()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'naturalEarth'\r\n ? geoNaturalEarth1()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'orthographic'\r\n ? geoOrthographic()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : geoAlbersUsa()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar);\r\n const handleZoom = (direction: 'in' | 'out') => {\r\n if (!mapSvg.current || !zoomRef.current) return;\r\n const svg = select(mapSvg.current);\r\n svg.call(zoomRef.current.scaleBy, direction === 'in' ? 1.2 : 1 / 1.2);\r\n };\r\n return (\r\n <>\r\n <div className='relative'>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n ref={mapSvg}\r\n direction='ltr'\r\n >\r\n <g ref={mapG}>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData.features.map((d: any, i: number) => {\r\n const index = data.findIndex(el => el.id === d.properties[mapProperty]);\r\n if (index !== -1) return null;\r\n return (\r\n <g\r\n key={i}\r\n opacity={\r\n selectedColor\r\n ? dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.properties[mapProperty]) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1\r\n }\r\n >\r\n {d.geometry.type === 'MultiPolygon'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={masterPath}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={path}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })}\r\n </g>\r\n );\r\n })\r\n }\r\n <AnimatePresence>\r\n {data.map(d => {\r\n const index = mapData.features.findIndex(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => d.id === el.properties[mapProperty],\r\n );\r\n const color = !checkIfNullOrUndefined(d.x)\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorScale(d.x as any)\r\n : mapNoDataColor;\r\n return (\r\n <motion.g\r\n key={d.id}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? selectedColor === color\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.id) !== -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 {index === -1\r\n ? null\r\n : mapData.features[index].geometry.type === 'MultiPolygon'\r\n ? mapData.features[index].geometry.coordinates.map(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1)\r\n path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <motion.path\r\n key={`${d.id}-${j}`}\r\n d={masterPath}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: 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 stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n );\r\n },\r\n )\r\n : mapData.features[index].geometry.coordinates.map(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <motion.path\r\n key={`${d.id}-${j}`}\r\n d={path}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: 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 stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n );\r\n },\r\n )}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {mouseOverData\r\n ? mapData.features\r\n .filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: { properties: any }) => d.properties[mapProperty] === mouseOverData.id,\r\n )\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .map((d: any, i: number) => {\r\n return (\r\n <g key={i}>\r\n {d.geometry.type === 'MultiPolygon'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1)\r\n path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={masterPath}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: '0.5',\r\n }}\r\n />\r\n );\r\n })\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={path}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: '0.5',\r\n }}\r\n />\r\n );\r\n })}\r\n </g>\r\n );\r\n })\r\n : null}\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n className='color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{\r\n width: categorical ? undefined : '340px',\r\n }}\r\n >\r\n {colorLegendTitle && colorLegendTitle !== '' ? (\r\n <P\r\n size='xs'\r\n marginBottom='xs'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {colorLegendTitle}\r\n </P>\r\n ) : null}\r\n {!categorical ? (\r\n <svg width='100%' viewBox='0 0 320 30' direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g\r\n key={i}\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n className='cursor-pointer'\r\n >\r\n <rect\r\n x={(i * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={\r\n selectedColor === colors[i]\r\n ? 'stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }\r\n style={{\r\n fill: colors[i],\r\n ...(selectedColor === colors[i] ? {} : { stroke: colors[i] }),\r\n }}\r\n />\r\n <text\r\n x={((i + 1) * 320) / colors.length}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-xs'\r\n style={{ textAnchor: 'middle' }}\r\n >\r\n {numberFormattingFunction(d as number, 'NA')}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n onMouseOver={() => {\r\n setSelectedColor(colors[colorDomain.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n x={(colorDomain.length * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={`cursor-pointer ${\r\n selectedColor === colors[colorDomain.length]\r\n ? 'stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }`}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n ...(selectedColor === colors[colorDomain.length]\r\n ? {}\r\n : { stroke: colors[colorDomain.length] }),\r\n }}\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n ) : (\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div\r\n key={i}\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i % colors.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start map-legend-button'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {zoomInteraction === 'button' && (\r\n <div className='absolute left-4 top-4 flex flex-col zoom-buttons'>\r\n <button\r\n onClick={() => handleZoom('in')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n </div>\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 {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 </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect, useEffectEvent, useMemo } from 'react';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n ChoroplethMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n ScaleDataType,\r\n MapProjectionTypes,\r\n ZoomInteractionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n} from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { getUniqValue } from '@/Utils/getUniqValue';\r\nimport { getJenks } from '@/Utils/getJenks';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\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: ChoroplethMapDataType[];\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 /** Colors for the choropleth map */\r\n colors?: string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: number[] | string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: 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\r\n // Graph Parameters\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData?: any;\r\n /** Scaling factor for the map. Multiplies the scale number to scale. */\r\n scale?: number;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Defines the zoom mode for the map */\r\n zoomInteraction?: ZoomInteractionTypes;\r\n /** Stroke width of the regions in the map */\r\n mapBorderWidth?: number;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\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 /** Scale for the colors */\r\n scaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Toggle visibility of color scale. */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** Property in the property object in mapData geoJson object is used to match to the id in the data object */\r\n mapProperty?: string;\r\n /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\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 /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\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 ChoroplethMap(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json',\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = 'The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.',\r\n colorDomain,\r\n colorLegendTitle,\r\n scaleType = 'threshold',\r\n scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n relativeHeight,\r\n tooltip,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n showColorScale = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n highlightedIds = [],\r\n onSeriesMouseClick,\r\n mapProperty = 'ISO3',\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\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 mapProjection,\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n } = props;\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [play, setPlay] = useState(timeline.autoplay);\r\n const uniqDatesSorted = useMemo(() => {\r\n const dates = [\r\n ...new Set(\r\n data\r\n .filter(d => d.date)\r\n .map(d => parse(`${d.date}`, timeline.dateFormat || 'yyyy', new Date()).getTime()),\r\n ),\r\n ];\r\n dates.sort((a, b) => a - b);\r\n return dates;\r\n }, [data, timeline.dateFormat]);\r\n const [index, setIndex] = useState(timeline.autoplay ? 0 : uniqDatesSorted.length - 1);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mapShape, setMapShape] = useState<any>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const onUpdateShape = useEffectEvent((shape: any) => {\r\n setMapShape(shape);\r\n });\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n onUpdateShape(d);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [mapData]);\r\n\r\n const domain =\r\n colorDomain ||\r\n (scaleType === 'categorical'\r\n ? getUniqValue(data, 'x')\r\n : getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors?.length || 4,\r\n ));\r\n\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\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={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 {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? d.date === format(new Date(uniqDatesSorted[index]), timeline.dateFormat || 'yyyy')\r\n : d,\r\n )}\r\n mapData={\r\n showAntarctica\r\n ? mapShape\r\n : {\r\n ...mapShape,\r\n features: mapShape.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => el.properties.NAME !== 'Antarctica',\r\n ),\r\n }\r\n }\r\n colorDomain={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n colors ||\r\n (scaleType === 'categorical'\r\n ? Colors[theme].categoricalColors.colors\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n colorLegendTitle={colorLegendTitle}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n categorical={scaleType === 'categorical'}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n isWorldMap={isWorldMap}\r\n showColorScale={showColorScale}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n mapProperty={mapProperty}\r\n highlightedIds={highlightedIds}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n classNames={classNames}\r\n detailsOnClick={detailsOnClick}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n zoomInteraction={zoomInteraction}\r\n dimmedOpacity={dimmedOpacity}\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 customLayers={customLayers}\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n />\r\n ) : (\r\n <div\r\n style={{\r\n height: `${Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}px`,\r\n }}\r\n className='flex items-center justify-center'\r\n >\r\n <Spinner aria-label='Loading graph' />\r\n </div>\r\n )}\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","data","colorDomain","colors","mapData","colorLegendTitle","categorical","height","width","scale","centerPoint","tooltip","mapBorderWidth","mapBorderColor","mapNoDataColor","onSeriesMouseOver","showColorScale","zoomScaleExtend","zoomTranslateExtend","highlightedIds","onSeriesMouseClick","mapProperty","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","collapseColorScaleByDefault","selectedColor","setSelectedColor","useState","undefined","zoomRef","useRef","showLegend","setShowLegend","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","colorScale","scaleOrdinal","domain","range","scaleThreshold","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","e","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","filter","on","transform","attr","call","bounds","bbox","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","handleZoom","direction","svg","scaleBy","jsxs","Fragment","jsx","motion","d","position","map","layer","features","i","findIndex","el","id","properties","length","indexOf","j","masterPath","forEach","geo","path","c","k","point","stroke","strokeWidth","fill","AnimatePresence","index","color","checkIfNullOrUndefined","x","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","fillOpacity","cn","colorLegend","X","P","display","WebkitLineClamp","WebkitBoxOrient","backgroundColor","textAnchor","numberFormattingFunction","DetailsModal","modal","Tooltip","ChoroplethMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","scaleType","t2","t3","padding","t4","t5","t6","t7","relativeHeight","isWorldMap","t8","t9","t10","graphID","t11","t12","graphDownload","t13","dataDownload","t14","showAntarctica","t15","language","t16","minHeight","t17","theme","t18","ariaLabel","t19","t20","t21","t22","t23","timeline","t24","Colors","light","graphNoData","grays","t25","t26","t27","t28","enabled","autoplay","showOnlyActiveDate","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t29","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","setIndex","mapShape","setMapShape","graphDiv","graphParentDiv","t30","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t31","shape","onUpdateShape","useEffectEvent","t32","fetchAndParseJSON","then","d_1","t33","t34","getUniqValue","getJenks","_temp3","t35","t36","speed","interval","setInterval","clearInterval","t37","t38","getSliderMarks","markObj","t39","graphContainer","t40","t41","description","title","GraphHeader","_temp4","_temp5","_temp6","_temp7","_temp8","t42","Pause","Play","SliderUI","nextValue","nextValue_0","t43","GraphArea","d_8","format","_temp9","categoricalColors","sequentialColors","max","Spinner","t44","footnote","source","GraphFooter","t45","GraphContainer","NAME","d_5","d_4","d_3","d_7","d_6","d_2","a","b"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAyEO,SAASA,GAAMC,GAAc;AAClC,QAAM;AAAA,IACJC,MAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,kBAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,qBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,oBAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,6BAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,YAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,cAAAA;AAAAA,IACAC,6BAAAA;AAAAA,EAAAA,IACE/B,GACE,CAACgC,GAAeC,CAAgB,IAAIC,EAA6BC,MAAS,GAC1EC,KAAUC,GAAoD,IAAI,GAClE,CAACC,IAAYC,EAAa,IAA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AK;AA3J7B,SAAAyQ,GAAAkD,GAAA;AAAA,SAsGiB5M,EAAC2B;AAA+B;AAtGjD,SAAAiG,GAAAiF,GAAAC,GAAA;AAAA,SA8DkBD,IAAIC;AAAC;AA9DvB,SAAApF,GAAA1H,GAAA;AAAA,SA0DgBA,EAACsH;AAAK;"}
|
|
1
|
+
{"version":3,"file":"ChoroplethMap.js","sources":["../src/Components/Graphs/Maps/ChoroplethMap/Graph.tsx","../src/Components/Graphs/Maps/ChoroplethMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleThreshold, scaleOrdinal } from 'd3-scale';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport {\r\n AnimateDataType,\r\n ChoroplethMapDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { X } from '@/Components/Icons';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n colorDomain: (number | string)[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData: any;\r\n width: number;\r\n height: number;\r\n colors: string[];\r\n colorLegendTitle?: string;\r\n categorical: boolean;\r\n data: ChoroplethMapDataType[];\r\n scale: number;\r\n centerPoint?: [number, number];\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n mapBorderColor: string;\r\n isWorldMap: boolean;\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 showColorScale: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedIds: string[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n mapProperty: string;\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 zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n collapseColorScaleByDefault?: boolean;\r\n zoomAndCenterByHighlightedIds: boolean;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colorDomain,\r\n colors,\r\n mapData,\r\n colorLegendTitle,\r\n categorical,\r\n height,\r\n width,\r\n scale,\r\n centerPoint,\r\n tooltip,\r\n mapBorderWidth,\r\n mapBorderColor,\r\n mapNoDataColor,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedIds,\r\n onSeriesMouseClick,\r\n mapProperty,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n collapseColorScaleByDefault,\r\n zoomAndCenterByHighlightedIds,\r\n } = props;\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\r\n const colorScale = categorical\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n const bounds = bbox({\r\n ...mapData,\r\n features: zoomAndCenterByHighlightedIds\r\n ? mapData.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n (highlightedIds || []).length === 0 ||\r\n highlightedIds.indexOf(d.properties[mapProperty]) !== -1,\r\n )\r\n : mapData.features,\r\n });\r\n\r\n const center = centerOfMass({\r\n ...mapData,\r\n features: zoomAndCenterByHighlightedIds\r\n ? mapData.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n (highlightedIds || []).length === 0 ||\r\n highlightedIds.indexOf(d.properties[mapProperty]) !== -1,\r\n )\r\n : mapData.features,\r\n });\r\n const lonDiff = bounds[2] - bounds[0];\r\n const latDiff = bounds[3] - bounds[1];\r\n const scaleX = (((width * 190) / 960) * 360) / lonDiff;\r\n const scaleY = (((height * 190) / 678) * 180) / latDiff;\r\n const scaleVar = scale * Math.min(scaleX, scaleY);\r\n\r\n const projection =\r\n mapProjection === 'mercator'\r\n ? geoMercator()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'equalEarth'\r\n ? geoEqualEarth()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'naturalEarth'\r\n ? geoNaturalEarth1()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'orthographic'\r\n ? geoOrthographic()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : geoAlbersUsa()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar);\r\n const handleZoom = (direction: 'in' | 'out') => {\r\n if (!mapSvg.current || !zoomRef.current) return;\r\n const svg = select(mapSvg.current);\r\n svg.call(zoomRef.current.scaleBy, direction === 'in' ? 1.2 : 1 / 1.2);\r\n };\r\n return (\r\n <>\r\n <div className='relative'>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n ref={mapSvg}\r\n direction='ltr'\r\n >\r\n <g ref={mapG}>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData.features.map((d: any, i: number) => {\r\n const index = data.findIndex(el => el.id === d.properties[mapProperty]);\r\n if (index !== -1) return null;\r\n return (\r\n <g\r\n key={i}\r\n opacity={\r\n selectedColor\r\n ? dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.properties[mapProperty]) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1\r\n }\r\n >\r\n {d.geometry.type === 'MultiPolygon'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={masterPath}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={path}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })}\r\n </g>\r\n );\r\n })\r\n }\r\n <AnimatePresence>\r\n {data.map(d => {\r\n const index = mapData.features.findIndex(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => d.id === el.properties[mapProperty],\r\n );\r\n const color = !checkIfNullOrUndefined(d.x)\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorScale(d.x as any)\r\n : mapNoDataColor;\r\n return (\r\n <motion.g\r\n key={d.id}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? selectedColor === color\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.id) !== -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 {index === -1\r\n ? null\r\n : mapData.features[index].geometry.type === 'MultiPolygon'\r\n ? mapData.features[index].geometry.coordinates.map(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1)\r\n path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <motion.path\r\n key={`${d.id}-${j}`}\r\n d={masterPath}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: 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 stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n );\r\n },\r\n )\r\n : mapData.features[index].geometry.coordinates.map(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <motion.path\r\n key={`${d.id}-${j}`}\r\n d={path}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: 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 stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n );\r\n },\r\n )}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {mouseOverData\r\n ? mapData.features\r\n .filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: { properties: any }) => d.properties[mapProperty] === mouseOverData.id,\r\n )\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .map((d: any, i: number) => {\r\n return (\r\n <g key={i}>\r\n {d.geometry.type === 'MultiPolygon'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1)\r\n path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={masterPath}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: '0.5',\r\n }}\r\n />\r\n );\r\n })\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={path}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: '0.5',\r\n }}\r\n />\r\n );\r\n })}\r\n </g>\r\n );\r\n })\r\n : null}\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n className='color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{\r\n width: categorical ? undefined : '340px',\r\n }}\r\n >\r\n {colorLegendTitle && colorLegendTitle !== '' ? (\r\n <P\r\n size='xs'\r\n marginBottom='xs'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {colorLegendTitle}\r\n </P>\r\n ) : null}\r\n {!categorical ? (\r\n <svg width='100%' viewBox='0 0 320 30' direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g\r\n key={i}\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n className='cursor-pointer'\r\n >\r\n <rect\r\n x={(i * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={\r\n selectedColor === colors[i]\r\n ? 'stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }\r\n style={{\r\n fill: colors[i],\r\n ...(selectedColor === colors[i] ? {} : { stroke: colors[i] }),\r\n }}\r\n />\r\n <text\r\n x={((i + 1) * 320) / colors.length}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-xs'\r\n style={{ textAnchor: 'middle' }}\r\n >\r\n {numberFormattingFunction(d as number, 'NA')}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n onMouseOver={() => {\r\n setSelectedColor(colors[colorDomain.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n x={(colorDomain.length * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={`cursor-pointer ${\r\n selectedColor === colors[colorDomain.length]\r\n ? 'stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }`}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n ...(selectedColor === colors[colorDomain.length]\r\n ? {}\r\n : { stroke: colors[colorDomain.length] }),\r\n }}\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n ) : (\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div\r\n key={i}\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i % colors.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start map-legend-button'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {zoomInteraction === 'button' && (\r\n <div className='absolute left-4 top-4 flex flex-col zoom-buttons'>\r\n <button\r\n onClick={() => handleZoom('in')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n </div>\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 {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 </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect, useEffectEvent, useMemo } from 'react';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n ChoroplethMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n ScaleDataType,\r\n MapProjectionTypes,\r\n ZoomInteractionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n} from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { getUniqValue } from '@/Utils/getUniqValue';\r\nimport { getJenks } from '@/Utils/getJenks';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\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: ChoroplethMapDataType[];\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 /** Colors for the choropleth map */\r\n colors?: string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: number[] | string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: 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\r\n // Graph Parameters\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData?: any;\r\n /** Scaling factor for the map. Multiplies the scale number to scale. */\r\n scale?: number;\r\n /** Toggle if the map is centered and zoomed to the highlighted ids. */\r\n zoomAndCenterByHighlightedIds?: boolean;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Defines the zoom mode for the map */\r\n zoomInteraction?: ZoomInteractionTypes;\r\n /** Stroke width of the regions in the map */\r\n mapBorderWidth?: number;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\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 /** Scale for the colors */\r\n scaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Toggle visibility of color scale. */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** Property in the property object in mapData geoJson object is used to match to the id in the data object */\r\n mapProperty?: string;\r\n /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\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 /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\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 ChoroplethMap(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json',\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = 'The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.',\r\n colorDomain,\r\n colorLegendTitle,\r\n scaleType = 'threshold',\r\n scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n relativeHeight,\r\n tooltip,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n showColorScale = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n highlightedIds = [],\r\n onSeriesMouseClick,\r\n mapProperty = 'ISO3',\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\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 mapProjection,\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n zoomAndCenterByHighlightedIds = false,\r\n } = props;\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [play, setPlay] = useState(timeline.autoplay);\r\n const uniqDatesSorted = useMemo(() => {\r\n const dates = [\r\n ...new Set(\r\n data\r\n .filter(d => d.date)\r\n .map(d => parse(`${d.date}`, timeline.dateFormat || 'yyyy', new Date()).getTime()),\r\n ),\r\n ];\r\n dates.sort((a, b) => a - b);\r\n return dates;\r\n }, [data, timeline.dateFormat]);\r\n const [index, setIndex] = useState(timeline.autoplay ? 0 : uniqDatesSorted.length - 1);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mapShape, setMapShape] = useState<any>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const onUpdateShape = useEffectEvent((shape: any) => {\r\n setMapShape(shape);\r\n });\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n onUpdateShape(d);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [mapData]);\r\n\r\n const domain =\r\n colorDomain ||\r\n (scaleType === 'categorical'\r\n ? getUniqValue(data, 'x')\r\n : getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors?.length || 4,\r\n ));\r\n\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\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={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 {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? d.date === format(new Date(uniqDatesSorted[index]), timeline.dateFormat || 'yyyy')\r\n : d,\r\n )}\r\n mapData={\r\n showAntarctica\r\n ? mapShape\r\n : {\r\n ...mapShape,\r\n features: mapShape.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => el.properties.NAME !== 'Antarctica',\r\n ),\r\n }\r\n }\r\n colorDomain={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n colors ||\r\n (scaleType === 'categorical'\r\n ? Colors[theme].categoricalColors.colors\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n colorLegendTitle={colorLegendTitle}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n categorical={scaleType === 'categorical'}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n isWorldMap={isWorldMap}\r\n showColorScale={showColorScale}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n mapProperty={mapProperty}\r\n highlightedIds={highlightedIds}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n classNames={classNames}\r\n detailsOnClick={detailsOnClick}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n zoomInteraction={zoomInteraction}\r\n dimmedOpacity={dimmedOpacity}\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 customLayers={customLayers}\r\n zoomAndCenterByHighlightedIds={zoomAndCenterByHighlightedIds}\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n />\r\n ) : (\r\n <div\r\n style={{\r\n height: `${Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}px`,\r\n }}\r\n className='flex items-center justify-center'\r\n >\r\n <Spinner aria-label='Loading graph' />\r\n </div>\r\n )}\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","data","colorDomain","colors","mapData","colorLegendTitle","categorical","height","width","scale","centerPoint","tooltip","mapBorderWidth","mapBorderColor","mapNoDataColor","onSeriesMouseOver","showColorScale","zoomScaleExtend","zoomTranslateExtend","highlightedIds","onSeriesMouseClick","mapProperty","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","collapseColorScaleByDefault","zoomAndCenterByHighlightedIds","selectedColor","setSelectedColor","useState","undefined","zoomRef","useRef","showLegend","setShowLegend","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","colorScale","scaleOrdinal","domain","range","scaleThreshold","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","e","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","filter","on","transform","attr","call","bounds","bbox","features","d","length","indexOf","properties","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","handleZoom","direction","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","i","findIndex","el","id","j","masterPath","forEach","geo","path","c","k","point","stroke","strokeWidth","fill","AnimatePresence","index","color","checkIfNullOrUndefined","x","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","fillOpacity","cn","colorLegend","X","P","display","WebkitLineClamp","WebkitBoxOrient","backgroundColor","textAnchor","numberFormattingFunction","DetailsModal","modal","Tooltip","ChoroplethMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","scaleType","t2","t3","padding","t4","t5","t6","t7","relativeHeight","isWorldMap","t8","t9","t10","graphID","t11","t12","graphDownload","t13","dataDownload","t14","showAntarctica","t15","language","t16","minHeight","t17","theme","t18","ariaLabel","t19","t20","t21","t22","t23","timeline","t24","t25","Colors","light","graphNoData","grays","t26","t27","t28","t29","enabled","autoplay","showOnlyActiveDate","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t30","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","setIndex","mapShape","setMapShape","graphDiv","graphParentDiv","t31","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t32","shape","onUpdateShape","useEffectEvent","t33","fetchAndParseJSON","then","d_1","t34","t35","getUniqValue","getJenks","_temp3","t36","t37","speed","interval","setInterval","clearInterval","t38","t39","getSliderMarks","markObj","t40","graphContainer","t41","t42","description","title","GraphHeader","_temp4","_temp5","_temp6","_temp7","_temp8","t43","Pause","Play","SliderUI","nextValue","nextValue_0","t44","GraphArea","d_8","format","_temp9","categoricalColors","sequentialColors","max","Spinner","t45","footnote","source","GraphFooter","t46","GraphContainer","NAME","d_5","d_4","d_3","d_7","d_6","d_2","a","b"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA0EO,SAASA,GAAMC,GAAc;AAClC,QAAM;AAAA,IACJC,MAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,kBAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,qBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,oBAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,6BAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,YAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,cAAAA;AAAAA,IACAC,6BAAAA;AAAAA,IACAC,+BAAAA;AAAAA,EAAAA,IACEhC,GACE,CAACiC,GAAeC,CAAgB,IAAIC,EAA6BC,MAAS,GAC1EC,KAAUC,GAAoD,IAAI,GAClE,CAACC,IAAYC,EAAa,IAAIL,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,SAAAkH,IAAAlH,SAAAoH,IAAApH,SAAAqH,IAAArH,SAAA8H,IAAA9H,SAAAoI,IAAApI,SAAA6I,IAAA7I,SAAAkC,IAAAlC,SAAA7J,GAAA6J,SAAAiJ,MAAAA,KAAAjJ,EAAA,GAAA,GAlKjBiJ;AAkKiB;AA/Rd,SAAAT,GAAAlL,GAAA;AAAA,SA+M4BA,EAAEjC,WAAW8N,SAAU;AAAY;AA/M/D,SAAAtB,GAAAuB,GAAA;AAAA,SA8J4BlO,MAAMnD;AAAS;AA9J3C,SAAA6P,GAAAyB,GAAA;AAAA,SA6J6CnO,MAAMnD;AAAS;AA7J5D,SAAA4P,GAAA2B,GAAA;AAAA,SA6JyBpO,EAACtF;AAAK;AA7J/B,SAAA8R,GAAA6B,GAAA;AAAA,SA4J2CrO,MAAMnD;AAAS;AA5J1D,SAAA0P,GAAA+B,GAAA;AAAA,SA4JuBtO,EAACtF;AAAK;AA5J7B,SAAA2Q,GAAAkD,GAAA;AAAA,SAuGiBvO,EAACqD;AAA+B;AAvGjD,SAAAkG,GAAAiF,GAAAC,GAAA;AAAA,SA+DkBD,IAAIC;AAAC;AA/DvB,SAAApF,GAAArJ,GAAA;AAAA,SA2DgBA,EAACiJ;AAAK;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-6v2a2njQ.cjs"),L=require("react"),C=require("./parse-xYI9yrvL.cjs"),xi=require("./index-Cno4Q0YE.cjs"),ei=require("./numberFormattingFunction-02t-wJta.cjs"),mi=require("./Tooltip-BLa2EfMs.cjs"),qt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ii=require("./customArea-B1LWQBmM.cjs"),di=require("./AxisTitle-DV4n0RxE.cjs"),fi=require("./Axis-Dtjn-EgM.cjs"),pi=require("./XTicksAndGridLines-CekrPykD.cjs"),hi=require("./ReferenceLine-M9aP3dj-.cjs"),yi=require("./YTicksAndGridLines-UzVC5eBM.cjs"),gi=require("./index-D69M6klB.cjs"),ji=require("./time-CkcKbhwe.cjs"),vi=require("./linear-CgUCbw9F.cjs"),ni=require("./line-DaEMhXmx.cjs"),He=require("./step-BZ3C8QFW.cjs"),oi=require("./area-C1gxfNGD.cjs"),wi=require("./select-Bnfk0lJx.cjs"),D=require("./proxy-C4-uo6nS.cjs"),Ri=require("./init-DU0ybBc_.cjs"),bi=require("./pointer-Dkq5NV1q.cjs"),Ei=require("./use-in-view-C3o_ntMv.cjs"),Oi=require("./GraphFooter.cjs"),Ci=require("./GraphHeader.cjs"),Ai=require("./ColorLegend.cjs"),We=require("./Colors.cjs"),Vi=require("./generateRandomString-B5zBiJzS.cjs"),Li=require("./EmptyState-CGeBqbmR.cjs"),si=require("./GraphContainer-B1EDxJ0S.cjs"),Si=require("./getNoOfTicks-C_1CFXv_.cjs");function ki(r){const t=s.compilerRuntimeExports.c(217),{data:j,width:rt,height:$t,lineColors:c,suffix:O,prefix:w,dateFormat:x,showValues:R,noOfXTicks:Mt,rightMargin:Ft,leftMargin:S,topMargin:Gt,bottomMargin:wt,tooltip:B,highlightAreaSettings:Pt,onSeriesMouseOver:Ht,animate:i,rtl:z,showColorLegendAtTop:Wt,colorDomain:$,diffAreaColors:I,idSuffix:lt,strokeWidth:M,showDots:F,refValues:Rt,minValue:N,maxValue:bt,annotations:Yt,customHighlightAreaSettings:Xt,yAxisTitle:T,noOfYTicks:de,minDate:Ut,maxDate:Et,curveType:Ot,styles:h,classNames:d,precision:E,customLayers:G}=r,Ct=L.useRef(null);let J;t[0]!==i.amount||t[1]!==i.once?(J={once:i.once,amount:i.amount},t[0]=i.amount,t[1]=i.once,t[2]=J):J=t[2];const u=Ei.useInView(Ct,J),[f,se]=L.useState(!1);let At,ct;t[3]!==i.duration||t[4]!==f||t[5]!==u?(At=()=>{if(u&&!f){const o=setTimeout(()=>{se(!0)},(i.duration+.5)*1e3);return()=>clearTimeout(o)}},ct=[u,f,i.duration],t[3]=i.duration,t[4]=f,t[5]=u,t[6]=At,t[7]=ct):(At=t[6],ct=t[7]),L.useEffect(At,ct);const K=Ot==="linear"?ni.curveLinear:Ot==="step"?He.curveStep:Ot==="stepAfter"?He.stepAfter:Ot==="stepBefore"?He.stepBefore:He.monotoneX,[k,g]=L.useState(void 0),[p,ae]=L.useState(void 0),[Q,Bt]=L.useState(void 0),Vt=T?S+30:S;let ut;t[8]!==wt||t[9]!==Ft||t[10]!==Vt||t[11]!==Gt?(ut={top:Gt,bottom:wt,left:Vt,right:Ft},t[8]=wt,t[9]=Ft,t[10]=Vt,t[11]=Gt,t[12]=ut):ut=t[12];const y=ut,xt=L.useRef(null);let Z;t[13]!==x?(Z=o=>({...o,date:C.parse(`${o.date}`,x,new Date)}),t[13]=x,t[14]=Z):Z=t[14];const n=xi.orderBy(j.map(Z),["date"],["asc"]);let mt;if(t[15]!==x||t[16]!==Pt){let o;t[18]!==x?(o=e=>({...e,coordinates:[e.coordinates[0]===null?null:C.parse(`${e.coordinates[0]}`,x,new Date),e.coordinates[1]===null?null:C.parse(`${e.coordinates[1]}`,x,new Date)]}),t[18]=x,t[19]=o):o=t[19],mt=Pt.map(o),t[15]=x,t[16]=Pt,t[17]=mt}else mt=t[17];const Lt=mt;let dt;if(t[20]!==Xt||t[21]!==x){let o;t[23]!==x?(o=e=>({...e,coordinates:e.coordinates.map((U,Tt)=>Tt%2===0?C.parse(`${U}`,x,new Date):U)}),t[23]=x,t[24]=o):o=t[24],dt=Xt.map(o),t[20]=Xt,t[21]=x,t[22]=dt}else dt=t[22];const re=dt,m=rt-y.left-y.right,v=$t-y.top-y.bottom,le=Ut?C.parse(`${Ut}`,x,new Date):n[0].date,zt=Et?C.parse(`${Et}`,x,new Date):n[n.length-1].date,_=Math.min(...n.map(zi))!==1/0?Math.min(...n.map(Bi))>0?0:Math.min(...n.map(Ui)):0,tt=Math.min(...n.map(Xi))!==1/0?Math.min(...n.map(Yi))>0?0:Math.min(...n.map(Wi)):0,P=Math.max(...n.map(Hi))!==1/0?Math.max(...n.map(Pi)):0,Jt=Math.max(...n.map(Gi))!==1/0?Math.max(...n.map(Fi)):0;let q;t[25]!==_||t[26]!==tt||t[27]!==N?(q=qt.checkIfNullOrUndefined(N)?_<tt?_:tt:N,t[25]=_,t[26]=tt,t[27]=N,t[28]=q):q=t[28];const b=q,et=P>Jt?P:Jt,a=ji.time().domain([le,zt]).range([0,m]);let ft;t[29]!==b||t[30]!==N?(ft=qt.checkIfNullOrUndefined(N)?b:N,t[29]=b,t[30]=N,t[31]=ft):ft=t[31];let it;t[32]!==et||t[33]!==bt?(it=qt.checkIfNullOrUndefined(bt)?et>0?et:0:bt,t[32]=et,t[33]=bt,t[34]=it):it=t[34];const l=vi.linear().domain([ft,it]).range([v,0]).nice(),pt=ni.line().x(o=>a(o.date)).y(o=>l(o.y1)).curve(K),Kt=ni.line().x(o=>a(o.date)).y(o=>l(o.y2)).curve(K),St=oi.area().x(o=>a(o.date)).y1(o=>l(o.y1)).y0(o=>l(o.y2)).curve(K),ce=oi.area().x(o=>a(o.date)).y1(o=>l(o.y1)).y0(0).curve(K),ue=oi.area().x(o=>a(o.date)).y1(o=>l(o.y2)).y0(0).curve(K),Qt=l.ticks(de),Zt=a.ticks(Mt);L.useEffect(()=>{const o=U=>{const Tt=n[Ri.bisectCenter(n.map(Mi),a.invert(bi.pointer(U)[0]),0)];g(Tt||n[n.length-1]),Ht?.(Tt||n[n.length-1]),Bt(U.clientY),ae(U.clientX)},e=()=>{g(void 0),ae(void 0),Bt(void 0),Ht?.(void 0)};wi.select(xt.current).on("mousemove",o).on("mouseout",e)},[a,n,Ht]);let ht;t[35]===Symbol.for("react.memo_cache_sentinel")?(ht={fill:"none"},t[35]=ht):ht=t[35];let nt;t[36]===Symbol.for("react.memo_cache_sentinel")?(nt={fill:"none"},t[36]=nt):nt=t[36];let yt;t[37]!==i||t[38]!==v||t[39]!==m||t[40]!==Lt||t[41]!==u||t[42]!==a?(yt=s.jsxRuntimeExports.jsx(gi.HighlightArea,{areaSettings:Lt,width:m,height:v,scale:a,animate:i,isInView:u}),t[37]=i,t[38]=v,t[39]=m,t[40]=Lt,t[41]=u,t[42]=a,t[43]=yt):yt=t[43];const ot=h?.yAxis?.gridLines,xe=h?.yAxis?.labels;let st;t[44]!==ot||t[45]!==xe?(st={gridLines:ot,labels:xe},t[44]=ot,t[45]=xe,t[46]=st):st=t[46];const me=d?.yAxis?.gridLines,kt=d?.yAxis?.labels;let Dt;t[47]!==me||t[48]!==kt?(Dt={gridLines:me,labels:kt},t[47]=me,t[48]=kt,t[49]=Dt):Dt=t[49];const gt=l(b<0?0:b),jt=l(b<0?0:b),It=0-S,Nt=m+y.right,H=b<0?0:b;let A;t[50]!==E||t[51]!==w||t[52]!==O||t[53]!==H?(A=ei.numberFormattingFunction(H,"NA",E,w,O),t[50]=E,t[51]=w,t[52]=O,t[53]=H,t[54]=A):A=t[54];const W=0-S,Y=l(b<0?0:b),X=et<0?"1rem":-5;let V;t[55]!==W||t[56]!==Y||t[57]!==X?(V={x:W,y:Y,dx:0,dy:X},t[55]=W,t[56]=Y,t[57]=X,t[58]=V):V=t[58];const vt=d?.xAxis?.axis,_t=d?.yAxis?.labels;let at;t[59]!==vt||t[60]!==_t?(at={axis:vt,label:_t},t[59]=vt,t[60]=_t,t[61]=at):at=t[61];const Ye=h?.xAxis?.axis,Xe=h?.yAxis?.labels;let te;t[62]!==Ye||t[63]!==Xe?(te={axis:Ye,label:Xe},t[62]=Ye,t[63]=Xe,t[64]=te):te=t[64];let fe;t[65]!==gt||t[66]!==jt||t[67]!==It||t[68]!==Nt||t[69]!==A||t[70]!==V||t[71]!==at||t[72]!==te?(fe=s.jsxRuntimeExports.jsx(fi.Axis,{y1:gt,y2:jt,x1:It,x2:Nt,label:A,labelPos:V,classNames:at,styles:te}),t[65]=gt,t[66]=jt,t[67]=It,t[68]=Nt,t[69]=A,t[70]=V,t[71]=at,t[72]=te,t[73]=fe):fe=t[73];const Ue=0-S-15,Be=v/2,ze=h?.yAxis?.title,Je=d?.yAxis?.title;let pe;t[74]!==Ue||t[75]!==Be||t[76]!==ze||t[77]!==Je||t[78]!==T?(pe=s.jsxRuntimeExports.jsx(di.AxisTitle,{x:Ue,y:Be,style:ze,className:Je,text:T,rotate90:!0}),t[74]=Ue,t[75]=Be,t[76]=ze,t[77]=Je,t[78]=T,t[79]=pe):pe=t[79];let he;t[80]!==x?(he=o=>C.format(o,x),t[80]=x,t[81]=he):he=t[81];const ai=Zt.map(he),ri=Zt.map(o=>a(o)),Ke=h?.xAxis?.gridLines,Qe=h?.xAxis?.labels;let ye;t[82]!==Ke||t[83]!==Qe?(ye={gridLines:Ke,labels:Qe},t[82]=Ke,t[83]=Qe,t[84]=ye):ye=t[84];const Ze=d?.xAxis?.gridLines;let ee;t[85]!==Ze?(ee=s.mo("opacity-0",Ze),t[85]=Ze,t[86]=ee):ee=t[86];const _e=d?.xAxis?.labels;let ie;t[87]!==_e?(ie=s.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",_e),t[87]=_e,t[88]=ie):ie=t[88];let ge;t[89]!==ee||t[90]!==ie?(ge={gridLines:ee,labels:ie},t[89]=ee,t[90]=ie,t[91]=ge):ge=t[91];let je;t[92]!==G?(je=G.filter(Ti).map(Ni),t[92]=G,t[93]=je):je=t[93];let ve;t[94]!==I[1]?(ve={fill:I[1]},t[94]=I[1],t[95]=ve):ve=t[95];let we;t[96]!==i.duration?(we={opacity:0,transition:{duration:i.duration}},t[96]=i.duration,t[97]=we):we=t[97];let Re;t[98]===Symbol.for("react.memo_cache_sentinel")?(Re={opacity:1},t[98]=Re):Re=t[98];let be;t[99]!==i.duration?(be={initial:Re,whileInView:{opacity:1,transition:{duration:i.duration}}},t[99]=i.duration,t[100]=be):be=t[100];let Ee;t[101]!==I[0]?(Ee={fill:I[0]},t[101]=I[0],t[102]=Ee):Ee=t[102];let Oe;t[103]!==i.duration?(Oe={opacity:0,transition:{duration:i.duration}},t[103]=i.duration,t[104]=Oe):Oe=t[104];let Ce;t[105]===Symbol.for("react.memo_cache_sentinel")?(Ce={opacity:0},t[105]=Ce):Ce=t[105];let Ae;t[106]!==i.duration?(Ae={initial:Ce,whileInView:{opacity:1,transition:{duration:i.duration}}},t[106]=i.duration,t[107]=Ae):Ae=t[107];let Ve;t[108]!==c[0]||t[109]!==M?(Ve={fill:"none",stroke:c[0],strokeWidth:M},t[108]=c[0],t[109]=M,t[110]=Ve):Ve=t[110];let Le;t[111]!==i.duration?(Le={opacity:0,transition:{duration:i.duration}},t[111]=i.duration,t[112]=Le):Le=t[112];let Se;t[113]!==c[1]||t[114]!==M?(Se={fill:"none",stroke:c[1],strokeWidth:M},t[113]=c[1],t[114]=M,t[115]=Se):Se=t[115];let ke;t[116]!==i.duration?(ke={opacity:0,transition:{duration:i.duration}},t[116]=i.duration,t[117]=ke):ke=t[117];const li=1,ti=Kt(n)||"";let ne;t[118]!==i.duration?(ne={duration:i.duration},t[118]=i.duration,t[119]=ne):ne=t[119];let De;t[120]!==ti||t[121]!==ne?(De={pathLength:li,d:ti,opacity:1,transition:ne},t[120]=ti,t[121]=ne,t[122]=De):De=t[122];let Ie;t[123]!==i.duration||t[124]!==$||t[125]!==n||t[126]!==f||t[127]!==u||t[128]!==c[0]||t[129]!==c[1]||t[130]!==Wt||t[131]!==a||t[132]!==l?(Ie=Wt?null:s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(D.motion.text,{className:"text-xs",dx:5,dy:4,exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,x:a(n[n.length-1].date),y:l(n[n.length-1].y1),fill:c[0]},whileInView:{opacity:1,x:a(n[n.length-1].date),y:l(n[n.length-1].y1),fill:c[0],transition:{duration:f?i.duration:.5,delay:f?0:i.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:$[0]},$[0]),s.jsxRuntimeExports.jsx(D.motion.text,{className:"text-xs",dx:5,dy:4,exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,x:a(n[n.length-1].date),y:l(n[n.length-1].y2),fill:c[1]},whileInView:{opacity:1,x:a(n[n.length-1].date),y:l(n[n.length-1].y2),fill:c[1],transition:{duration:f?i.duration:.5,delay:f?0:i.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:$[1]},$[1])]}),t[123]=i.duration,t[124]=$,t[125]=n,t[126]=f,t[127]=u,t[128]=c[0],t[129]=c[1],t[130]=Wt,t[131]=a,t[132]=l,t[133]=Ie):Ie=t[133];let Ne;t[134]!==d?.mouseOverLine||t[135]!==v||t[136]!==k||t[137]!==h?.mouseOverLine||t[138]!==a?(Ne=k?s.jsxRuntimeExports.jsx("line",{y1:0,y2:v,x1:a(k.date),x2:a(k.date),className:s.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",d?.mouseOverLine),style:h?.mouseOverLine}):null,t[134]=d?.mouseOverLine,t[135]=v,t[136]=k,t[137]=h?.mouseOverLine,t[138]=a,t[139]=Ne):Ne=t[139];let Te;if(t[140]!==i.duration||t[141]!==d?.graphObjectValues||t[142]!==n||t[143]!==m||t[144]!==f||t[145]!==u||t[146]!==c[0]||t[147]!==c[1]||t[148]!==E||t[149]!==w||t[150]!==F||t[151]!==R||t[152]!==h?.graphObjectValues||t[153]!==O||t[154]!==a||t[155]!==l){let o;t[157]!==i.duration||t[158]!==d?.graphObjectValues||t[159]!==n.length||t[160]!==m||t[161]!==f||t[162]!==u||t[163]!==c[0]||t[164]!==c[1]||t[165]!==E||t[166]!==w||t[167]!==F||t[168]!==R||t[169]!==h?.graphObjectValues||t[170]!==O||t[171]!==a||t[172]!==l?(o=(e,U)=>s.jsxRuntimeExports.jsxs(D.motion.g,{children:[qt.checkIfNullOrUndefined(e.y1)?null:s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[F?s.jsxRuntimeExports.jsx(D.motion.circle,{r:m/n.length<5?0:m/n.length<20?2:4,exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,cx:a(e.date),cy:l(e.y1),fill:c[0]},whileInView:{opacity:1,fill:c[0],transition:{duration:.5,delay:i.duration},cx:a(e.date),cy:l(e.y1)}},initial:"initial",animate:u?"whileInView":"initial"}):null,R?s.jsxRuntimeExports.jsx(D.motion.text,{dy:e.y2<e.y1?-8:"1em",style:{textAnchor:"middle",...h?.graphObjectValues||{}},className:s.mo("graph-value graph-value-line-1 text-xs font-bold",d?.graphObjectValues),exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,x:a(e.date),y:l(e.y1),fill:c[0]},whileInView:{opacity:1,fill:c[0],x:a(e.date),y:l(e.y1),transition:{duration:f?i.duration:.5,delay:f?0:i.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:ei.numberFormattingFunction(e.y1,"NA",E,w,O)}):null]}),qt.checkIfNullOrUndefined(e.y2)?null:s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[F?s.jsxRuntimeExports.jsx(D.motion.circle,{r:m/n.length<5?0:m/n.length<20?2:4,exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,cx:a(e.date),cy:l(e.y2),fill:c[1]},whileInView:{opacity:1,fill:c[1],transition:{duration:f?i.duration:.5,delay:f?0:i.duration},cx:a(e.date),cy:l(e.y2)}},initial:"initial",animate:u?"whileInView":"initial"}):null,R?s.jsxRuntimeExports.jsx(D.motion.text,{dy:e.y2>e.y1?-8:"1em",style:{textAnchor:"middle",...h?.graphObjectValues||{}},className:s.mo("graph-value graph-value-line-2 text-xs font-bold",d?.graphObjectValues),exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,x:a(e.date),y:l(e.y2),fill:c[1]},whileInView:{opacity:1,x:a(e.date),y:l(e.y2),fill:c[1],transition:{duration:f?i.duration:.5,delay:f?0:i.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:ei.numberFormattingFunction(e.y2,"NA",E,w,O)}):null]})]},U),t[157]=i.duration,t[158]=d?.graphObjectValues,t[159]=n.length,t[160]=m,t[161]=f,t[162]=u,t[163]=c[0],t[164]=c[1],t[165]=E,t[166]=w,t[167]=F,t[168]=R,t[169]=h?.graphObjectValues,t[170]=O,t[171]=a,t[172]=l,t[173]=o):o=t[173],Te=n.map(o),t[140]=i.duration,t[141]=d?.graphObjectValues,t[142]=n,t[143]=m,t[144]=f,t[145]=u,t[146]=c[0],t[147]=c[1],t[148]=E,t[149]=w,t[150]=F,t[151]=R,t[152]=h?.graphObjectValues,t[153]=O,t[154]=a,t[155]=l,t[156]=Te}else Te=t[156];let qe;t[174]!==i||t[175]!==m||t[176]!==u||t[177]!==S||t[178]!==y.right||t[179]!==Rt||t[180]!==l?(qe=Rt?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:Rt.map((o,e)=>s.jsxRuntimeExports.jsx(hi.RefLineY,{text:o.text,color:o.color,y:l(o.value),x1:0-S,x2:m+y.right,classNames:o.classNames,styles:o.styles,animate:i,isInView:u},e))}):null,t[174]=i,t[175]=m,t[176]=u,t[177]=S,t[178]=y.right,t[179]=Rt,t[180]=l,t[181]=qe):qe=t[181];let oe;if(t[182]!==i||t[183]!==Yt||t[184]!==x||t[185]!==m||t[186]!==u||t[187]!==y.right||t[188]!==z||t[189]!==a||t[190]!==l){let o;t[192]!==i||t[193]!==x||t[194]!==m||t[195]!==u||t[196]!==y.right||t[197]!==z||t[198]!==a||t[199]!==l?(o=(e,U)=>{const Tt=ii.getLineEndPoint({x:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0),y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8},{x:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date)):0,y:e.yCoordinate?l(e.yCoordinate):0},qt.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),ci=e.showConnector?{y1:Tt.y,x1:Tt.x,y2:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0),cy:e.yCoordinate?l(e.yCoordinate):0,cx:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date)):0,circleRadius:qt.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,ui={y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:z?0:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:z?e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0):m+y.right-(e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return s.jsxRuntimeExports.jsx(ii.Annotation,{color:e.color,connectorsSettings:ci,labelSettings:ui,text:e.text,classNames:e.classNames,styles:e.styles,animate:i,isInView:u},U)},t[192]=i,t[193]=x,t[194]=m,t[195]=u,t[196]=y.right,t[197]=z,t[198]=a,t[199]=l,t[200]=o):o=t[200],oe=Yt.map(o),t[182]=i,t[183]=Yt,t[184]=x,t[185]=m,t[186]=u,t[187]=y.right,t[188]=z,t[189]=a,t[190]=l,t[191]=oe}else oe=t[191];let $e;t[201]!==oe?($e=s.jsxRuntimeExports.jsx("g",{children:oe}),t[201]=oe,t[202]=$e):$e=t[202];let Me;t[203]!==G?(Me=G.filter(Ii).map(Di),t[203]=G,t[204]=Me):Me=t[204];let Fe;t[205]===Symbol.for("react.memo_cache_sentinel")?(Fe={fill:"none",pointerEvents:"all"},t[205]=Fe):Fe=t[205];let Ge;t[206]!==xt||t[207]!==v||t[208]!==m?(Ge=s.jsxRuntimeExports.jsx("rect",{ref:xt,style:Fe,width:m,height:v}),t[206]=xt,t[207]=v,t[208]=m,t[209]=Ge):Ge=t[209];let Pe;return t[210]!==d?.tooltip||t[211]!==p||t[212]!==Q||t[213]!==k||t[214]!==h?.tooltip||t[215]!==B?(Pe=k&&B&&p&&Q?s.jsxRuntimeExports.jsx(mi.Tooltip,{data:k,body:B,xPos:p,yPos:Q,backgroundStyle:h?.tooltip,className:d?.tooltip}):null,t[210]=d?.tooltip,t[211]=p,t[212]=Q,t[213]=k,t[214]=h?.tooltip,t[215]=B,t[216]=Pe):Pe=t[216],s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(D.motion.svg,{width:`${rt}px`,height:`${$t}px`,viewBox:`0 0 ${rt} ${$t}`,direction:"ltr",ref:Ct,children:s.jsxRuntimeExports.jsxs("g",{transform:`translate(${y.left},${y.top})`,children:[s.jsxRuntimeExports.jsx("clipPath",{id:`above${lt}`,children:s.jsxRuntimeExports.jsx("path",{d:ue(n),style:ht})}),s.jsxRuntimeExports.jsx("clipPath",{id:`below${lt}`,children:s.jsxRuntimeExports.jsx("path",{d:ce(n),style:nt})}),yt,s.jsxRuntimeExports.jsx(ii.CustomArea,{areaSettings:re,scaleX:a,scaleY:l,animate:i,isInView:u}),s.jsxRuntimeExports.jsx("g",{children:s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(yi.YTicksAndGridLines,{values:Qt.filter($i),y:Qt.filter(qi).map(o=>l(o)),x1:0-S,x2:m+y.right,styles:st,classNames:Dt,suffix:O,prefix:w,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:E}),fe,pe]})}),s.jsxRuntimeExports.jsx(pi.XTicksAndGridLines,{values:ai,x:ri,y1:0,y2:v,styles:ye,classNames:ge,suffix:O,prefix:w,labelType:"primary",showGridLines:!0,precision:E}),je,s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(D.motion.path,{clipPath:`url(#below${lt})`,d:St(n)||"",style:ve,exit:we,variants:be,initial:"initial",animate:u?"whileInView":"initial"}),s.jsxRuntimeExports.jsx(D.motion.path,{clipPath:`url(#above${lt})`,d:St(n)||"",style:Ee,exit:Oe,variants:Ae,initial:"initial",animate:u?"whileInView":"initial"})]}),s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(D.motion.path,{d:pt(n)||"",style:Ve,exit:Le,variants:{initial:{pathLength:0,d:pt(n)||"",opacity:1},whileInView:{pathLength:1,d:pt(n)||"",opacity:1,transition:{duration:i.duration}}},initial:"initial",animate:u?"whileInView":"initial"}),s.jsxRuntimeExports.jsx(D.motion.path,{style:Se,exit:ke,variants:{initial:{pathLength:0,d:Kt(n)||"",opacity:1},whileInView:De},initial:"initial",animate:u?"whileInView":"initial"}),Ie,Ne,Te]}),qe,$e,Me,Ge]})}),Pe]})}function Di(r){return r.layer}function Ii(r){return r.position==="after"}function Ni(r){return r.layer}function Ti(r){return r.position==="before"}function qi(r){return r!==0}function $i(r){return r!==0}function Mi(r){return r.date}function Fi(r){return r.y2}function Gi(r){return r.y2}function Pi(r){return r.y1}function Hi(r){return r.y1}function Wi(r){return r.y2}function Yi(r){return r.y2}function Xi(r){return r.y2}function Ui(r){return r.y1}function Bi(r){return r.y1}function zi(r){return r.y1}function Ji(r){const t=s.compilerRuntimeExports.c(102),{data:j,graphTitle:rt,suffix:$t,sources:c,prefix:O,graphDescription:w,height:x,width:R,footNote:Mt,noOfXTicks:Ft,dateFormat:S,showValues:Gt,padding:wt,lineColors:B,backgroundColor:Pt,leftMargin:Ht,rightMargin:i,topMargin:z,bottomMargin:Wt,tooltip:$,highlightAreaSettings:I,relativeHeight:lt,onSeriesMouseOver:M,graphID:F,graphDownload:Rt,dataDownload:N,animate:bt,language:Yt,minHeight:Xt,labels:T,showColorLegendAtTop:de,colorLegendTitle:Ut,diffAreaColors:Et,strokeWidth:Ot,showDots:h,refValues:d,minValue:E,maxValue:G,annotations:Ct,customHighlightAreaSettings:J,theme:u,ariaLabel:f,yAxisTitle:se,noOfYTicks:At,minDate:ct,maxDate:K,curveType:k,styles:g,classNames:p,precision:ae,customLayers:Q}=r,Bt=$t===void 0?"":$t,Vt=O===void 0?"":O,ut=Ft===void 0?10:Ft,y=S===void 0?"yyyy":S,xt=Gt===void 0?!1:Gt;let Z;t[0]!==B?(Z=B===void 0?[We.Colors.light.categoricalColors.colors[0],We.Colors.light.categoricalColors.colors[1]]:B,t[0]=B,t[1]=Z):Z=t[1];const n=Z,mt=Pt===void 0?!1:Pt,Lt=Ht===void 0?30:Ht,dt=i===void 0?50:i,re=z===void 0?20:z,m=Wt===void 0?25:Wt;let v;t[2]!==I?(v=I===void 0?[]:I,t[2]=I,t[3]=v):v=t[3];const le=v,zt=Rt===void 0?!1:Rt,_=N===void 0?!1:N,tt=bt===void 0?!1:bt,P=Yt===void 0?"en":Yt,Jt=Xt===void 0?0:Xt,q=de===void 0?!1:de;let b;t[4]!==Et?(b=Et===void 0?[We.Colors.alerts.red,We.Colors.alerts.darkGreen]:Et,t[4]=Et,t[5]=b):b=t[5];const et=b,a=Ot===void 0?2:Ot,ft=h===void 0?!0:h;let it;t[6]!==d?(it=d===void 0?[]:d,t[6]=d,t[7]=it):it=t[7];const l=it;let pt;t[8]!==Ct?(pt=Ct===void 0?[]:Ct,t[8]=Ct,t[9]=pt):pt=t[9];const Kt=pt;let St;t[10]!==J?(St=J===void 0?[]:J,t[10]=J,t[11]=St):St=t[11];const ce=St,ue=u===void 0?"light":u,Qt=At===void 0?5:At,Zt=k===void 0?"curve":k,ht=ae===void 0?2:ae;let nt;t[12]!==Q?(nt=Q===void 0?[]:Q,t[12]=Q,t[13]=nt):nt=t[13];const yt=nt,[ot,xe]=L.useState(0),[st,me]=L.useState(0),kt=L.useRef(null),Dt=L.useRef(null);let gt,jt;t[14]===Symbol.for("react.memo_cache_sentinel")?(gt=()=>{const _t=new ResizeObserver(at=>{xe(at[0].target.clientWidth||620),me(at[0].target.clientHeight||480)});return kt.current&&_t.observe(kt.current),()=>_t.disconnect()},jt=[],t[14]=gt,t[15]=jt):(gt=t[14],jt=t[15]),L.useEffect(gt,jt);const It=p?.graphContainer,Nt=g?.graphContainer;let H;t[16]!==p?.description||t[17]!==p?.title||t[18]!==j||t[19]!==_||t[20]!==w||t[21]!==zt||t[22]!==rt||t[23]!==g?.description||t[24]!==g?.title||t[25]!==R?(H=rt||w||zt||_?s.jsxRuntimeExports.jsx(Ci.GraphHeader,{styles:{title:g?.title,description:g?.description},classNames:{title:p?.title,description:p?.description},graphTitle:rt,graphDescription:w,width:R,graphDownload:zt?Dt:void 0,dataDownload:_?j.map(tn).filter(_i).length>0?j.map(Zi).filter(Qi):j.filter(Ki):null}):null,t[16]=p?.description,t[17]=p?.title,t[18]=j,t[19]=_,t[20]=w,t[21]=zt,t[22]=rt,t[23]=g?.description,t[24]=g?.title,t[25]=R,t[26]=H):H=t[26];let A;t[27]!==p?.colorLegend||t[28]!==Ut||t[29]!==j.length||t[30]!==T||t[31]!==n||t[32]!==q?(A=q&&j.length>0?s.jsxRuntimeExports.jsx(Ai.ColorLegend,{colorDomain:T,colorLegendTitle:Ut,colors:n,showNAColor:!1,className:p?.colorLegend}):null,t[27]=p?.colorLegend,t[28]=Ut,t[29]=j.length,t[30]=T,t[31]=n,t[32]=q,t[33]=A):A=t[33];let W;t[34]!==j.length?(W=j.length===0&&s.jsxRuntimeExports.jsx(Li.EmptyState,{}),t[34]=j.length,t[35]=W):W=t[35];let Y;t[36]!==tt||t[37]!==Kt||t[38]!==m||t[39]!==p||t[40]!==Zt||t[41]!==ce||t[42]!==yt||t[43]!==j||t[44]!==y||t[45]!==et||t[46]!==le||t[47]!==T||t[48]!==P||t[49]!==Lt||t[50]!==n||t[51]!==K||t[52]!==G||t[53]!==ct||t[54]!==E||t[55]!==ut||t[56]!==Qt||t[57]!==M||t[58]!==ht||t[59]!==Vt||t[60]!==l||t[61]!==dt||t[62]!==q||t[63]!==ft||t[64]!==xt||t[65]!==a||t[66]!==g||t[67]!==Bt||t[68]!==st||t[69]!==ot||t[70]!==$||t[71]!==re||t[72]!==se?(Y=ot&&st&&j.length>0?s.jsxRuntimeExports.jsx(ki,{data:j,lineColors:n,colorDomain:T,width:ot,height:st,suffix:Bt,prefix:Vt,dateFormat:y,showValues:xt,noOfXTicks:ut??Si.getNoOfTicks(ot),leftMargin:Lt,rightMargin:dt,topMargin:re,bottomMargin:m,highlightAreaSettings:le,tooltip:$,onSeriesMouseOver:M,showColorLegendAtTop:q,animate:tt===!0?{duration:.5,once:!0,amount:.5}:tt||{duration:0,once:!0,amount:0},rtl:P==="he"||P==="ar",diffAreaColors:et,idSuffix:Vi.generateRandomString(8),strokeWidth:a,showDots:ft,refValues:l,minValue:E,maxValue:G,annotations:Kt,customHighlightAreaSettings:ce,yAxisTitle:se,noOfYTicks:Qt,minDate:ct,maxDate:K,curveType:Zt,styles:g,classNames:p,precision:ht,customLayers:yt}):null,t[36]=tt,t[37]=Kt,t[38]=m,t[39]=p,t[40]=Zt,t[41]=ce,t[42]=yt,t[43]=j,t[44]=y,t[45]=et,t[46]=le,t[47]=T,t[48]=P,t[49]=Lt,t[50]=n,t[51]=K,t[52]=G,t[53]=ct,t[54]=E,t[55]=ut,t[56]=Qt,t[57]=M,t[58]=ht,t[59]=Vt,t[60]=l,t[61]=dt,t[62]=q,t[63]=ft,t[64]=xt,t[65]=a,t[66]=g,t[67]=Bt,t[68]=st,t[69]=ot,t[70]=$,t[71]=re,t[72]=se,t[73]=Y):Y=t[73];let X;t[74]!==W||t[75]!==Y?(X=s.jsxRuntimeExports.jsxs(si.GraphArea,{ref:kt,children:[W,Y]}),t[74]=W,t[75]=Y,t[76]=X):X=t[76];let V;t[77]!==p?.footnote||t[78]!==p?.source||t[79]!==Mt||t[80]!==c||t[81]!==g?.footnote||t[82]!==g?.source||t[83]!==R?(V=c||Mt?s.jsxRuntimeExports.jsx(Oi.GraphFooter,{styles:{footnote:g?.footnote,source:g?.source},classNames:{footnote:p?.footnote,source:p?.source},sources:c,footNote:Mt,width:R}):null,t[77]=p?.footnote,t[78]=p?.source,t[79]=Mt,t[80]=c,t[81]=g?.footnote,t[82]=g?.source,t[83]=R,t[84]=V):V=t[84];let vt;return t[85]!==f||t[86]!==mt||t[87]!==F||t[88]!==x||t[89]!==P||t[90]!==Jt||t[91]!==wt||t[92]!==lt||t[93]!==It||t[94]!==Nt||t[95]!==H||t[96]!==A||t[97]!==X||t[98]!==V||t[99]!==ue||t[100]!==R?(vt=s.jsxRuntimeExports.jsxs(si.GraphContainer,{className:It,style:Nt,id:F,ref:Dt,"aria-label":f,backgroundColor:mt,theme:ue,language:P,minHeight:Jt,width:R,height:x,relativeHeight:lt,padding:wt,children:[H,A,X,V]}),t[85]=f,t[86]=mt,t[87]=F,t[88]=x,t[89]=P,t[90]=Jt,t[91]=wt,t[92]=lt,t[93]=It,t[94]=Nt,t[95]=H,t[96]=A,t[97]=X,t[98]=V,t[99]=ue,t[100]=R,t[101]=vt):vt=t[101],vt}function Ki(r){return r!==void 0}function Qi(r){return r!==void 0}function Zi(r){return r.data}function _i(r){return r!==void 0}function tn(r){return r.data}exports.DifferenceLineChart=Ji;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-6v2a2njQ.cjs"),L=require("react"),C=require("./parse-xYI9yrvL.cjs"),xi=require("./index-Cno4Q0YE.cjs"),ei=require("./numberFormattingFunction-02t-wJta.cjs"),mi=require("./Tooltip-BLa2EfMs.cjs"),qt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ii=require("./customArea-B1LWQBmM.cjs"),di=require("./AxisTitle-DV4n0RxE.cjs"),fi=require("./Axis-Jt_tmhxS.cjs"),pi=require("./XTicksAndGridLines-CekrPykD.cjs"),hi=require("./ReferenceLine-M9aP3dj-.cjs"),yi=require("./YTicksAndGridLines-UzVC5eBM.cjs"),gi=require("./index-D69M6klB.cjs"),ji=require("./time-CkcKbhwe.cjs"),vi=require("./linear-CgUCbw9F.cjs"),ni=require("./line-DaEMhXmx.cjs"),He=require("./step-BZ3C8QFW.cjs"),oi=require("./area-C1gxfNGD.cjs"),wi=require("./select-Bnfk0lJx.cjs"),D=require("./proxy-C4-uo6nS.cjs"),Ri=require("./init-DU0ybBc_.cjs"),bi=require("./pointer-Dkq5NV1q.cjs"),Ei=require("./use-in-view-C3o_ntMv.cjs"),Oi=require("./GraphFooter.cjs"),Ci=require("./GraphHeader.cjs"),Ai=require("./ColorLegend.cjs"),We=require("./Colors.cjs"),Vi=require("./generateRandomString-B5zBiJzS.cjs"),Li=require("./EmptyState-CGeBqbmR.cjs"),si=require("./GraphContainer-B1EDxJ0S.cjs"),Si=require("./getNoOfTicks-C_1CFXv_.cjs");function ki(r){const t=s.compilerRuntimeExports.c(217),{data:j,width:rt,height:$t,lineColors:c,suffix:O,prefix:w,dateFormat:x,showValues:R,noOfXTicks:Mt,rightMargin:Ft,leftMargin:S,topMargin:Gt,bottomMargin:wt,tooltip:B,highlightAreaSettings:Pt,onSeriesMouseOver:Ht,animate:i,rtl:z,showColorLegendAtTop:Wt,colorDomain:$,diffAreaColors:I,idSuffix:lt,strokeWidth:M,showDots:F,refValues:Rt,minValue:N,maxValue:bt,annotations:Yt,customHighlightAreaSettings:Xt,yAxisTitle:T,noOfYTicks:de,minDate:Ut,maxDate:Et,curveType:Ot,styles:h,classNames:d,precision:E,customLayers:G}=r,Ct=L.useRef(null);let J;t[0]!==i.amount||t[1]!==i.once?(J={once:i.once,amount:i.amount},t[0]=i.amount,t[1]=i.once,t[2]=J):J=t[2];const u=Ei.useInView(Ct,J),[f,se]=L.useState(!1);let At,ct;t[3]!==i.duration||t[4]!==f||t[5]!==u?(At=()=>{if(u&&!f){const o=setTimeout(()=>{se(!0)},(i.duration+.5)*1e3);return()=>clearTimeout(o)}},ct=[u,f,i.duration],t[3]=i.duration,t[4]=f,t[5]=u,t[6]=At,t[7]=ct):(At=t[6],ct=t[7]),L.useEffect(At,ct);const K=Ot==="linear"?ni.curveLinear:Ot==="step"?He.curveStep:Ot==="stepAfter"?He.stepAfter:Ot==="stepBefore"?He.stepBefore:He.monotoneX,[k,g]=L.useState(void 0),[p,ae]=L.useState(void 0),[Q,Bt]=L.useState(void 0),Vt=T?S+30:S;let ut;t[8]!==wt||t[9]!==Ft||t[10]!==Vt||t[11]!==Gt?(ut={top:Gt,bottom:wt,left:Vt,right:Ft},t[8]=wt,t[9]=Ft,t[10]=Vt,t[11]=Gt,t[12]=ut):ut=t[12];const y=ut,xt=L.useRef(null);let Z;t[13]!==x?(Z=o=>({...o,date:C.parse(`${o.date}`,x,new Date)}),t[13]=x,t[14]=Z):Z=t[14];const n=xi.orderBy(j.map(Z),["date"],["asc"]);let mt;if(t[15]!==x||t[16]!==Pt){let o;t[18]!==x?(o=e=>({...e,coordinates:[e.coordinates[0]===null?null:C.parse(`${e.coordinates[0]}`,x,new Date),e.coordinates[1]===null?null:C.parse(`${e.coordinates[1]}`,x,new Date)]}),t[18]=x,t[19]=o):o=t[19],mt=Pt.map(o),t[15]=x,t[16]=Pt,t[17]=mt}else mt=t[17];const Lt=mt;let dt;if(t[20]!==Xt||t[21]!==x){let o;t[23]!==x?(o=e=>({...e,coordinates:e.coordinates.map((U,Tt)=>Tt%2===0?C.parse(`${U}`,x,new Date):U)}),t[23]=x,t[24]=o):o=t[24],dt=Xt.map(o),t[20]=Xt,t[21]=x,t[22]=dt}else dt=t[22];const re=dt,m=rt-y.left-y.right,v=$t-y.top-y.bottom,le=Ut?C.parse(`${Ut}`,x,new Date):n[0].date,zt=Et?C.parse(`${Et}`,x,new Date):n[n.length-1].date,_=Math.min(...n.map(zi))!==1/0?Math.min(...n.map(Bi))>0?0:Math.min(...n.map(Ui)):0,tt=Math.min(...n.map(Xi))!==1/0?Math.min(...n.map(Yi))>0?0:Math.min(...n.map(Wi)):0,P=Math.max(...n.map(Hi))!==1/0?Math.max(...n.map(Pi)):0,Jt=Math.max(...n.map(Gi))!==1/0?Math.max(...n.map(Fi)):0;let q;t[25]!==_||t[26]!==tt||t[27]!==N?(q=qt.checkIfNullOrUndefined(N)?_<tt?_:tt:N,t[25]=_,t[26]=tt,t[27]=N,t[28]=q):q=t[28];const b=q,et=P>Jt?P:Jt,a=ji.time().domain([le,zt]).range([0,m]);let ft;t[29]!==b||t[30]!==N?(ft=qt.checkIfNullOrUndefined(N)?b:N,t[29]=b,t[30]=N,t[31]=ft):ft=t[31];let it;t[32]!==et||t[33]!==bt?(it=qt.checkIfNullOrUndefined(bt)?et>0?et:0:bt,t[32]=et,t[33]=bt,t[34]=it):it=t[34];const l=vi.linear().domain([ft,it]).range([v,0]).nice(),pt=ni.line().x(o=>a(o.date)).y(o=>l(o.y1)).curve(K),Kt=ni.line().x(o=>a(o.date)).y(o=>l(o.y2)).curve(K),St=oi.area().x(o=>a(o.date)).y1(o=>l(o.y1)).y0(o=>l(o.y2)).curve(K),ce=oi.area().x(o=>a(o.date)).y1(o=>l(o.y1)).y0(0).curve(K),ue=oi.area().x(o=>a(o.date)).y1(o=>l(o.y2)).y0(0).curve(K),Qt=l.ticks(de),Zt=a.ticks(Mt);L.useEffect(()=>{const o=U=>{const Tt=n[Ri.bisectCenter(n.map(Mi),a.invert(bi.pointer(U)[0]),0)];g(Tt||n[n.length-1]),Ht?.(Tt||n[n.length-1]),Bt(U.clientY),ae(U.clientX)},e=()=>{g(void 0),ae(void 0),Bt(void 0),Ht?.(void 0)};wi.select(xt.current).on("mousemove",o).on("mouseout",e)},[a,n,Ht]);let ht;t[35]===Symbol.for("react.memo_cache_sentinel")?(ht={fill:"none"},t[35]=ht):ht=t[35];let nt;t[36]===Symbol.for("react.memo_cache_sentinel")?(nt={fill:"none"},t[36]=nt):nt=t[36];let yt;t[37]!==i||t[38]!==v||t[39]!==m||t[40]!==Lt||t[41]!==u||t[42]!==a?(yt=s.jsxRuntimeExports.jsx(gi.HighlightArea,{areaSettings:Lt,width:m,height:v,scale:a,animate:i,isInView:u}),t[37]=i,t[38]=v,t[39]=m,t[40]=Lt,t[41]=u,t[42]=a,t[43]=yt):yt=t[43];const ot=h?.yAxis?.gridLines,xe=h?.yAxis?.labels;let st;t[44]!==ot||t[45]!==xe?(st={gridLines:ot,labels:xe},t[44]=ot,t[45]=xe,t[46]=st):st=t[46];const me=d?.yAxis?.gridLines,kt=d?.yAxis?.labels;let Dt;t[47]!==me||t[48]!==kt?(Dt={gridLines:me,labels:kt},t[47]=me,t[48]=kt,t[49]=Dt):Dt=t[49];const gt=l(b<0?0:b),jt=l(b<0?0:b),It=0-S,Nt=m+y.right,H=b<0?0:b;let A;t[50]!==E||t[51]!==w||t[52]!==O||t[53]!==H?(A=ei.numberFormattingFunction(H,"NA",E,w,O),t[50]=E,t[51]=w,t[52]=O,t[53]=H,t[54]=A):A=t[54];const W=0-S,Y=l(b<0?0:b),X=et<0?"1rem":-5;let V;t[55]!==W||t[56]!==Y||t[57]!==X?(V={x:W,y:Y,dx:0,dy:X},t[55]=W,t[56]=Y,t[57]=X,t[58]=V):V=t[58];const vt=d?.xAxis?.axis,_t=d?.yAxis?.labels;let at;t[59]!==vt||t[60]!==_t?(at={axis:vt,label:_t},t[59]=vt,t[60]=_t,t[61]=at):at=t[61];const Ye=h?.xAxis?.axis,Xe=h?.yAxis?.labels;let te;t[62]!==Ye||t[63]!==Xe?(te={axis:Ye,label:Xe},t[62]=Ye,t[63]=Xe,t[64]=te):te=t[64];let fe;t[65]!==gt||t[66]!==jt||t[67]!==It||t[68]!==Nt||t[69]!==A||t[70]!==V||t[71]!==at||t[72]!==te?(fe=s.jsxRuntimeExports.jsx(fi.Axis,{y1:gt,y2:jt,x1:It,x2:Nt,label:A,labelPos:V,classNames:at,styles:te}),t[65]=gt,t[66]=jt,t[67]=It,t[68]=Nt,t[69]=A,t[70]=V,t[71]=at,t[72]=te,t[73]=fe):fe=t[73];const Ue=0-S-15,Be=v/2,ze=h?.yAxis?.title,Je=d?.yAxis?.title;let pe;t[74]!==Ue||t[75]!==Be||t[76]!==ze||t[77]!==Je||t[78]!==T?(pe=s.jsxRuntimeExports.jsx(di.AxisTitle,{x:Ue,y:Be,style:ze,className:Je,text:T,rotate90:!0}),t[74]=Ue,t[75]=Be,t[76]=ze,t[77]=Je,t[78]=T,t[79]=pe):pe=t[79];let he;t[80]!==x?(he=o=>C.format(o,x),t[80]=x,t[81]=he):he=t[81];const ai=Zt.map(he),ri=Zt.map(o=>a(o)),Ke=h?.xAxis?.gridLines,Qe=h?.xAxis?.labels;let ye;t[82]!==Ke||t[83]!==Qe?(ye={gridLines:Ke,labels:Qe},t[82]=Ke,t[83]=Qe,t[84]=ye):ye=t[84];const Ze=d?.xAxis?.gridLines;let ee;t[85]!==Ze?(ee=s.mo("opacity-0",Ze),t[85]=Ze,t[86]=ee):ee=t[86];const _e=d?.xAxis?.labels;let ie;t[87]!==_e?(ie=s.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",_e),t[87]=_e,t[88]=ie):ie=t[88];let ge;t[89]!==ee||t[90]!==ie?(ge={gridLines:ee,labels:ie},t[89]=ee,t[90]=ie,t[91]=ge):ge=t[91];let je;t[92]!==G?(je=G.filter(Ti).map(Ni),t[92]=G,t[93]=je):je=t[93];let ve;t[94]!==I[1]?(ve={fill:I[1]},t[94]=I[1],t[95]=ve):ve=t[95];let we;t[96]!==i.duration?(we={opacity:0,transition:{duration:i.duration}},t[96]=i.duration,t[97]=we):we=t[97];let Re;t[98]===Symbol.for("react.memo_cache_sentinel")?(Re={opacity:1},t[98]=Re):Re=t[98];let be;t[99]!==i.duration?(be={initial:Re,whileInView:{opacity:1,transition:{duration:i.duration}}},t[99]=i.duration,t[100]=be):be=t[100];let Ee;t[101]!==I[0]?(Ee={fill:I[0]},t[101]=I[0],t[102]=Ee):Ee=t[102];let Oe;t[103]!==i.duration?(Oe={opacity:0,transition:{duration:i.duration}},t[103]=i.duration,t[104]=Oe):Oe=t[104];let Ce;t[105]===Symbol.for("react.memo_cache_sentinel")?(Ce={opacity:0},t[105]=Ce):Ce=t[105];let Ae;t[106]!==i.duration?(Ae={initial:Ce,whileInView:{opacity:1,transition:{duration:i.duration}}},t[106]=i.duration,t[107]=Ae):Ae=t[107];let Ve;t[108]!==c[0]||t[109]!==M?(Ve={fill:"none",stroke:c[0],strokeWidth:M},t[108]=c[0],t[109]=M,t[110]=Ve):Ve=t[110];let Le;t[111]!==i.duration?(Le={opacity:0,transition:{duration:i.duration}},t[111]=i.duration,t[112]=Le):Le=t[112];let Se;t[113]!==c[1]||t[114]!==M?(Se={fill:"none",stroke:c[1],strokeWidth:M},t[113]=c[1],t[114]=M,t[115]=Se):Se=t[115];let ke;t[116]!==i.duration?(ke={opacity:0,transition:{duration:i.duration}},t[116]=i.duration,t[117]=ke):ke=t[117];const li=1,ti=Kt(n)||"";let ne;t[118]!==i.duration?(ne={duration:i.duration},t[118]=i.duration,t[119]=ne):ne=t[119];let De;t[120]!==ti||t[121]!==ne?(De={pathLength:li,d:ti,opacity:1,transition:ne},t[120]=ti,t[121]=ne,t[122]=De):De=t[122];let Ie;t[123]!==i.duration||t[124]!==$||t[125]!==n||t[126]!==f||t[127]!==u||t[128]!==c[0]||t[129]!==c[1]||t[130]!==Wt||t[131]!==a||t[132]!==l?(Ie=Wt?null:s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(D.motion.text,{className:"text-xs",dx:5,dy:4,exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,x:a(n[n.length-1].date),y:l(n[n.length-1].y1),fill:c[0]},whileInView:{opacity:1,x:a(n[n.length-1].date),y:l(n[n.length-1].y1),fill:c[0],transition:{duration:f?i.duration:.5,delay:f?0:i.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:$[0]},$[0]),s.jsxRuntimeExports.jsx(D.motion.text,{className:"text-xs",dx:5,dy:4,exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,x:a(n[n.length-1].date),y:l(n[n.length-1].y2),fill:c[1]},whileInView:{opacity:1,x:a(n[n.length-1].date),y:l(n[n.length-1].y2),fill:c[1],transition:{duration:f?i.duration:.5,delay:f?0:i.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:$[1]},$[1])]}),t[123]=i.duration,t[124]=$,t[125]=n,t[126]=f,t[127]=u,t[128]=c[0],t[129]=c[1],t[130]=Wt,t[131]=a,t[132]=l,t[133]=Ie):Ie=t[133];let Ne;t[134]!==d?.mouseOverLine||t[135]!==v||t[136]!==k||t[137]!==h?.mouseOverLine||t[138]!==a?(Ne=k?s.jsxRuntimeExports.jsx("line",{y1:0,y2:v,x1:a(k.date),x2:a(k.date),className:s.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",d?.mouseOverLine),style:h?.mouseOverLine}):null,t[134]=d?.mouseOverLine,t[135]=v,t[136]=k,t[137]=h?.mouseOverLine,t[138]=a,t[139]=Ne):Ne=t[139];let Te;if(t[140]!==i.duration||t[141]!==d?.graphObjectValues||t[142]!==n||t[143]!==m||t[144]!==f||t[145]!==u||t[146]!==c[0]||t[147]!==c[1]||t[148]!==E||t[149]!==w||t[150]!==F||t[151]!==R||t[152]!==h?.graphObjectValues||t[153]!==O||t[154]!==a||t[155]!==l){let o;t[157]!==i.duration||t[158]!==d?.graphObjectValues||t[159]!==n.length||t[160]!==m||t[161]!==f||t[162]!==u||t[163]!==c[0]||t[164]!==c[1]||t[165]!==E||t[166]!==w||t[167]!==F||t[168]!==R||t[169]!==h?.graphObjectValues||t[170]!==O||t[171]!==a||t[172]!==l?(o=(e,U)=>s.jsxRuntimeExports.jsxs(D.motion.g,{children:[qt.checkIfNullOrUndefined(e.y1)?null:s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[F?s.jsxRuntimeExports.jsx(D.motion.circle,{r:m/n.length<5?0:m/n.length<20?2:4,exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,cx:a(e.date),cy:l(e.y1),fill:c[0]},whileInView:{opacity:1,fill:c[0],transition:{duration:.5,delay:i.duration},cx:a(e.date),cy:l(e.y1)}},initial:"initial",animate:u?"whileInView":"initial"}):null,R?s.jsxRuntimeExports.jsx(D.motion.text,{dy:e.y2<e.y1?-8:"1em",style:{textAnchor:"middle",...h?.graphObjectValues||{}},className:s.mo("graph-value graph-value-line-1 text-xs font-bold",d?.graphObjectValues),exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,x:a(e.date),y:l(e.y1),fill:c[0]},whileInView:{opacity:1,fill:c[0],x:a(e.date),y:l(e.y1),transition:{duration:f?i.duration:.5,delay:f?0:i.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:ei.numberFormattingFunction(e.y1,"NA",E,w,O)}):null]}),qt.checkIfNullOrUndefined(e.y2)?null:s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[F?s.jsxRuntimeExports.jsx(D.motion.circle,{r:m/n.length<5?0:m/n.length<20?2:4,exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,cx:a(e.date),cy:l(e.y2),fill:c[1]},whileInView:{opacity:1,fill:c[1],transition:{duration:f?i.duration:.5,delay:f?0:i.duration},cx:a(e.date),cy:l(e.y2)}},initial:"initial",animate:u?"whileInView":"initial"}):null,R?s.jsxRuntimeExports.jsx(D.motion.text,{dy:e.y2>e.y1?-8:"1em",style:{textAnchor:"middle",...h?.graphObjectValues||{}},className:s.mo("graph-value graph-value-line-2 text-xs font-bold",d?.graphObjectValues),exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,x:a(e.date),y:l(e.y2),fill:c[1]},whileInView:{opacity:1,x:a(e.date),y:l(e.y2),fill:c[1],transition:{duration:f?i.duration:.5,delay:f?0:i.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:ei.numberFormattingFunction(e.y2,"NA",E,w,O)}):null]})]},U),t[157]=i.duration,t[158]=d?.graphObjectValues,t[159]=n.length,t[160]=m,t[161]=f,t[162]=u,t[163]=c[0],t[164]=c[1],t[165]=E,t[166]=w,t[167]=F,t[168]=R,t[169]=h?.graphObjectValues,t[170]=O,t[171]=a,t[172]=l,t[173]=o):o=t[173],Te=n.map(o),t[140]=i.duration,t[141]=d?.graphObjectValues,t[142]=n,t[143]=m,t[144]=f,t[145]=u,t[146]=c[0],t[147]=c[1],t[148]=E,t[149]=w,t[150]=F,t[151]=R,t[152]=h?.graphObjectValues,t[153]=O,t[154]=a,t[155]=l,t[156]=Te}else Te=t[156];let qe;t[174]!==i||t[175]!==m||t[176]!==u||t[177]!==S||t[178]!==y.right||t[179]!==Rt||t[180]!==l?(qe=Rt?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:Rt.map((o,e)=>s.jsxRuntimeExports.jsx(hi.RefLineY,{text:o.text,color:o.color,y:l(o.value),x1:0-S,x2:m+y.right,classNames:o.classNames,styles:o.styles,animate:i,isInView:u},e))}):null,t[174]=i,t[175]=m,t[176]=u,t[177]=S,t[178]=y.right,t[179]=Rt,t[180]=l,t[181]=qe):qe=t[181];let oe;if(t[182]!==i||t[183]!==Yt||t[184]!==x||t[185]!==m||t[186]!==u||t[187]!==y.right||t[188]!==z||t[189]!==a||t[190]!==l){let o;t[192]!==i||t[193]!==x||t[194]!==m||t[195]!==u||t[196]!==y.right||t[197]!==z||t[198]!==a||t[199]!==l?(o=(e,U)=>{const Tt=ii.getLineEndPoint({x:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0),y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8},{x:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date)):0,y:e.yCoordinate?l(e.yCoordinate):0},qt.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),ci=e.showConnector?{y1:Tt.y,x1:Tt.x,y2:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0),cy:e.yCoordinate?l(e.yCoordinate):0,cx:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date)):0,circleRadius:qt.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,ui={y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:z?0:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:z?e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0):m+y.right-(e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return s.jsxRuntimeExports.jsx(ii.Annotation,{color:e.color,connectorsSettings:ci,labelSettings:ui,text:e.text,classNames:e.classNames,styles:e.styles,animate:i,isInView:u},U)},t[192]=i,t[193]=x,t[194]=m,t[195]=u,t[196]=y.right,t[197]=z,t[198]=a,t[199]=l,t[200]=o):o=t[200],oe=Yt.map(o),t[182]=i,t[183]=Yt,t[184]=x,t[185]=m,t[186]=u,t[187]=y.right,t[188]=z,t[189]=a,t[190]=l,t[191]=oe}else oe=t[191];let $e;t[201]!==oe?($e=s.jsxRuntimeExports.jsx("g",{children:oe}),t[201]=oe,t[202]=$e):$e=t[202];let Me;t[203]!==G?(Me=G.filter(Ii).map(Di),t[203]=G,t[204]=Me):Me=t[204];let Fe;t[205]===Symbol.for("react.memo_cache_sentinel")?(Fe={fill:"none",pointerEvents:"all"},t[205]=Fe):Fe=t[205];let Ge;t[206]!==xt||t[207]!==v||t[208]!==m?(Ge=s.jsxRuntimeExports.jsx("rect",{ref:xt,style:Fe,width:m,height:v}),t[206]=xt,t[207]=v,t[208]=m,t[209]=Ge):Ge=t[209];let Pe;return t[210]!==d?.tooltip||t[211]!==p||t[212]!==Q||t[213]!==k||t[214]!==h?.tooltip||t[215]!==B?(Pe=k&&B&&p&&Q?s.jsxRuntimeExports.jsx(mi.Tooltip,{data:k,body:B,xPos:p,yPos:Q,backgroundStyle:h?.tooltip,className:d?.tooltip}):null,t[210]=d?.tooltip,t[211]=p,t[212]=Q,t[213]=k,t[214]=h?.tooltip,t[215]=B,t[216]=Pe):Pe=t[216],s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(D.motion.svg,{width:`${rt}px`,height:`${$t}px`,viewBox:`0 0 ${rt} ${$t}`,direction:"ltr",ref:Ct,children:s.jsxRuntimeExports.jsxs("g",{transform:`translate(${y.left},${y.top})`,children:[s.jsxRuntimeExports.jsx("clipPath",{id:`above${lt}`,children:s.jsxRuntimeExports.jsx("path",{d:ue(n),style:ht})}),s.jsxRuntimeExports.jsx("clipPath",{id:`below${lt}`,children:s.jsxRuntimeExports.jsx("path",{d:ce(n),style:nt})}),yt,s.jsxRuntimeExports.jsx(ii.CustomArea,{areaSettings:re,scaleX:a,scaleY:l,animate:i,isInView:u}),s.jsxRuntimeExports.jsx("g",{children:s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(yi.YTicksAndGridLines,{values:Qt.filter($i),y:Qt.filter(qi).map(o=>l(o)),x1:0-S,x2:m+y.right,styles:st,classNames:Dt,suffix:O,prefix:w,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:E}),fe,pe]})}),s.jsxRuntimeExports.jsx(pi.XTicksAndGridLines,{values:ai,x:ri,y1:0,y2:v,styles:ye,classNames:ge,suffix:O,prefix:w,labelType:"primary",showGridLines:!0,precision:E}),je,s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(D.motion.path,{clipPath:`url(#below${lt})`,d:St(n)||"",style:ve,exit:we,variants:be,initial:"initial",animate:u?"whileInView":"initial"}),s.jsxRuntimeExports.jsx(D.motion.path,{clipPath:`url(#above${lt})`,d:St(n)||"",style:Ee,exit:Oe,variants:Ae,initial:"initial",animate:u?"whileInView":"initial"})]}),s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(D.motion.path,{d:pt(n)||"",style:Ve,exit:Le,variants:{initial:{pathLength:0,d:pt(n)||"",opacity:1},whileInView:{pathLength:1,d:pt(n)||"",opacity:1,transition:{duration:i.duration}}},initial:"initial",animate:u?"whileInView":"initial"}),s.jsxRuntimeExports.jsx(D.motion.path,{style:Se,exit:ke,variants:{initial:{pathLength:0,d:Kt(n)||"",opacity:1},whileInView:De},initial:"initial",animate:u?"whileInView":"initial"}),Ie,Ne,Te]}),qe,$e,Me,Ge]})}),Pe]})}function Di(r){return r.layer}function Ii(r){return r.position==="after"}function Ni(r){return r.layer}function Ti(r){return r.position==="before"}function qi(r){return r!==0}function $i(r){return r!==0}function Mi(r){return r.date}function Fi(r){return r.y2}function Gi(r){return r.y2}function Pi(r){return r.y1}function Hi(r){return r.y1}function Wi(r){return r.y2}function Yi(r){return r.y2}function Xi(r){return r.y2}function Ui(r){return r.y1}function Bi(r){return r.y1}function zi(r){return r.y1}function Ji(r){const t=s.compilerRuntimeExports.c(102),{data:j,graphTitle:rt,suffix:$t,sources:c,prefix:O,graphDescription:w,height:x,width:R,footNote:Mt,noOfXTicks:Ft,dateFormat:S,showValues:Gt,padding:wt,lineColors:B,backgroundColor:Pt,leftMargin:Ht,rightMargin:i,topMargin:z,bottomMargin:Wt,tooltip:$,highlightAreaSettings:I,relativeHeight:lt,onSeriesMouseOver:M,graphID:F,graphDownload:Rt,dataDownload:N,animate:bt,language:Yt,minHeight:Xt,labels:T,showColorLegendAtTop:de,colorLegendTitle:Ut,diffAreaColors:Et,strokeWidth:Ot,showDots:h,refValues:d,minValue:E,maxValue:G,annotations:Ct,customHighlightAreaSettings:J,theme:u,ariaLabel:f,yAxisTitle:se,noOfYTicks:At,minDate:ct,maxDate:K,curveType:k,styles:g,classNames:p,precision:ae,customLayers:Q}=r,Bt=$t===void 0?"":$t,Vt=O===void 0?"":O,ut=Ft===void 0?10:Ft,y=S===void 0?"yyyy":S,xt=Gt===void 0?!1:Gt;let Z;t[0]!==B?(Z=B===void 0?[We.Colors.light.categoricalColors.colors[0],We.Colors.light.categoricalColors.colors[1]]:B,t[0]=B,t[1]=Z):Z=t[1];const n=Z,mt=Pt===void 0?!1:Pt,Lt=Ht===void 0?30:Ht,dt=i===void 0?50:i,re=z===void 0?20:z,m=Wt===void 0?25:Wt;let v;t[2]!==I?(v=I===void 0?[]:I,t[2]=I,t[3]=v):v=t[3];const le=v,zt=Rt===void 0?!1:Rt,_=N===void 0?!1:N,tt=bt===void 0?!1:bt,P=Yt===void 0?"en":Yt,Jt=Xt===void 0?0:Xt,q=de===void 0?!1:de;let b;t[4]!==Et?(b=Et===void 0?[We.Colors.alerts.red,We.Colors.alerts.darkGreen]:Et,t[4]=Et,t[5]=b):b=t[5];const et=b,a=Ot===void 0?2:Ot,ft=h===void 0?!0:h;let it;t[6]!==d?(it=d===void 0?[]:d,t[6]=d,t[7]=it):it=t[7];const l=it;let pt;t[8]!==Ct?(pt=Ct===void 0?[]:Ct,t[8]=Ct,t[9]=pt):pt=t[9];const Kt=pt;let St;t[10]!==J?(St=J===void 0?[]:J,t[10]=J,t[11]=St):St=t[11];const ce=St,ue=u===void 0?"light":u,Qt=At===void 0?5:At,Zt=k===void 0?"curve":k,ht=ae===void 0?2:ae;let nt;t[12]!==Q?(nt=Q===void 0?[]:Q,t[12]=Q,t[13]=nt):nt=t[13];const yt=nt,[ot,xe]=L.useState(0),[st,me]=L.useState(0),kt=L.useRef(null),Dt=L.useRef(null);let gt,jt;t[14]===Symbol.for("react.memo_cache_sentinel")?(gt=()=>{const _t=new ResizeObserver(at=>{xe(at[0].target.clientWidth||620),me(at[0].target.clientHeight||480)});return kt.current&&_t.observe(kt.current),()=>_t.disconnect()},jt=[],t[14]=gt,t[15]=jt):(gt=t[14],jt=t[15]),L.useEffect(gt,jt);const It=p?.graphContainer,Nt=g?.graphContainer;let H;t[16]!==p?.description||t[17]!==p?.title||t[18]!==j||t[19]!==_||t[20]!==w||t[21]!==zt||t[22]!==rt||t[23]!==g?.description||t[24]!==g?.title||t[25]!==R?(H=rt||w||zt||_?s.jsxRuntimeExports.jsx(Ci.GraphHeader,{styles:{title:g?.title,description:g?.description},classNames:{title:p?.title,description:p?.description},graphTitle:rt,graphDescription:w,width:R,graphDownload:zt?Dt:void 0,dataDownload:_?j.map(tn).filter(_i).length>0?j.map(Zi).filter(Qi):j.filter(Ki):null}):null,t[16]=p?.description,t[17]=p?.title,t[18]=j,t[19]=_,t[20]=w,t[21]=zt,t[22]=rt,t[23]=g?.description,t[24]=g?.title,t[25]=R,t[26]=H):H=t[26];let A;t[27]!==p?.colorLegend||t[28]!==Ut||t[29]!==j.length||t[30]!==T||t[31]!==n||t[32]!==q?(A=q&&j.length>0?s.jsxRuntimeExports.jsx(Ai.ColorLegend,{colorDomain:T,colorLegendTitle:Ut,colors:n,showNAColor:!1,className:p?.colorLegend}):null,t[27]=p?.colorLegend,t[28]=Ut,t[29]=j.length,t[30]=T,t[31]=n,t[32]=q,t[33]=A):A=t[33];let W;t[34]!==j.length?(W=j.length===0&&s.jsxRuntimeExports.jsx(Li.EmptyState,{}),t[34]=j.length,t[35]=W):W=t[35];let Y;t[36]!==tt||t[37]!==Kt||t[38]!==m||t[39]!==p||t[40]!==Zt||t[41]!==ce||t[42]!==yt||t[43]!==j||t[44]!==y||t[45]!==et||t[46]!==le||t[47]!==T||t[48]!==P||t[49]!==Lt||t[50]!==n||t[51]!==K||t[52]!==G||t[53]!==ct||t[54]!==E||t[55]!==ut||t[56]!==Qt||t[57]!==M||t[58]!==ht||t[59]!==Vt||t[60]!==l||t[61]!==dt||t[62]!==q||t[63]!==ft||t[64]!==xt||t[65]!==a||t[66]!==g||t[67]!==Bt||t[68]!==st||t[69]!==ot||t[70]!==$||t[71]!==re||t[72]!==se?(Y=ot&&st&&j.length>0?s.jsxRuntimeExports.jsx(ki,{data:j,lineColors:n,colorDomain:T,width:ot,height:st,suffix:Bt,prefix:Vt,dateFormat:y,showValues:xt,noOfXTicks:ut??Si.getNoOfTicks(ot),leftMargin:Lt,rightMargin:dt,topMargin:re,bottomMargin:m,highlightAreaSettings:le,tooltip:$,onSeriesMouseOver:M,showColorLegendAtTop:q,animate:tt===!0?{duration:.5,once:!0,amount:.5}:tt||{duration:0,once:!0,amount:0},rtl:P==="he"||P==="ar",diffAreaColors:et,idSuffix:Vi.generateRandomString(8),strokeWidth:a,showDots:ft,refValues:l,minValue:E,maxValue:G,annotations:Kt,customHighlightAreaSettings:ce,yAxisTitle:se,noOfYTicks:Qt,minDate:ct,maxDate:K,curveType:Zt,styles:g,classNames:p,precision:ht,customLayers:yt}):null,t[36]=tt,t[37]=Kt,t[38]=m,t[39]=p,t[40]=Zt,t[41]=ce,t[42]=yt,t[43]=j,t[44]=y,t[45]=et,t[46]=le,t[47]=T,t[48]=P,t[49]=Lt,t[50]=n,t[51]=K,t[52]=G,t[53]=ct,t[54]=E,t[55]=ut,t[56]=Qt,t[57]=M,t[58]=ht,t[59]=Vt,t[60]=l,t[61]=dt,t[62]=q,t[63]=ft,t[64]=xt,t[65]=a,t[66]=g,t[67]=Bt,t[68]=st,t[69]=ot,t[70]=$,t[71]=re,t[72]=se,t[73]=Y):Y=t[73];let X;t[74]!==W||t[75]!==Y?(X=s.jsxRuntimeExports.jsxs(si.GraphArea,{ref:kt,children:[W,Y]}),t[74]=W,t[75]=Y,t[76]=X):X=t[76];let V;t[77]!==p?.footnote||t[78]!==p?.source||t[79]!==Mt||t[80]!==c||t[81]!==g?.footnote||t[82]!==g?.source||t[83]!==R?(V=c||Mt?s.jsxRuntimeExports.jsx(Oi.GraphFooter,{styles:{footnote:g?.footnote,source:g?.source},classNames:{footnote:p?.footnote,source:p?.source},sources:c,footNote:Mt,width:R}):null,t[77]=p?.footnote,t[78]=p?.source,t[79]=Mt,t[80]=c,t[81]=g?.footnote,t[82]=g?.source,t[83]=R,t[84]=V):V=t[84];let vt;return t[85]!==f||t[86]!==mt||t[87]!==F||t[88]!==x||t[89]!==P||t[90]!==Jt||t[91]!==wt||t[92]!==lt||t[93]!==It||t[94]!==Nt||t[95]!==H||t[96]!==A||t[97]!==X||t[98]!==V||t[99]!==ue||t[100]!==R?(vt=s.jsxRuntimeExports.jsxs(si.GraphContainer,{className:It,style:Nt,id:F,ref:Dt,"aria-label":f,backgroundColor:mt,theme:ue,language:P,minHeight:Jt,width:R,height:x,relativeHeight:lt,padding:wt,children:[H,A,X,V]}),t[85]=f,t[86]=mt,t[87]=F,t[88]=x,t[89]=P,t[90]=Jt,t[91]=wt,t[92]=lt,t[93]=It,t[94]=Nt,t[95]=H,t[96]=A,t[97]=X,t[98]=V,t[99]=ue,t[100]=R,t[101]=vt):vt=t[101],vt}function Ki(r){return r!==void 0}function Qi(r){return r!==void 0}function Zi(r){return r.data}function _i(r){return r!==void 0}function tn(r){return r.data}exports.DifferenceLineChart=Ji;
|
|
2
2
|
//# sourceMappingURL=DifferenceLineChart.cjs.map
|
|
@@ -7,7 +7,7 @@ import { T as hi } from "./Tooltip-BRnAz2Gv.js";
|
|
|
7
7
|
import { c as Nt } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
8
8
|
import { C as pi, g as xi, A as yi } from "./customArea-ASDaSE4u.js";
|
|
9
9
|
import { A as gi } from "./AxisTitle-VFq89Olw.js";
|
|
10
|
-
import { A as vi } from "./Axis-
|
|
10
|
+
import { A as vi } from "./Axis-D56Gy0se.js";
|
|
11
11
|
import { X as wi } from "./XTicksAndGridLines-CVZkZkpS.js";
|
|
12
12
|
import { a as bi } from "./ReferenceLine-DgtoRgw0.js";
|
|
13
13
|
import { Y as ji } from "./YTicksAndGridLines-GnXnSRF2.js";
|