@undp/data-viz 2.4.1 → 2.5.1
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.cjs.map +1 -1
- package/dist/AreaChart.d.ts +11 -9
- package/dist/AreaChart.js +320 -322
- package/dist/AreaChart.js.map +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.d.ts +15 -25
- package/dist/BarGraph.js +1694 -1694
- package/dist/BarGraph.js.map +1 -1
- package/dist/BasicStatCard.cjs +1 -1
- package/dist/BasicStatCard.cjs.map +1 -1
- package/dist/BasicStatCard.d.ts +13 -9
- package/dist/BasicStatCard.js +79 -81
- package/dist/BasicStatCard.js.map +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.d.ts +11 -9
- package/dist/BeeSwarmChart.js +335 -336
- 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 +13 -3
- package/dist/BiVariateChoroplethMap.js +309 -304
- 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 +11 -5
- package/dist/BulletChart.js +560 -559
- 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 +11 -9
- package/dist/ButterflyChart.js +348 -350
- 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 +11 -3
- package/dist/ChoroplethMap.js +314 -311
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.d.ts +11 -9
- package/dist/CirclePackingGraph.js +1 -1
- package/dist/DataCards.cjs +1 -1
- package/dist/DataCards.d.ts +1 -1
- package/dist/DataCards.js +1 -1
- package/dist/DataTable.cjs +1 -1
- package/dist/DataTable.cjs.map +1 -1
- package/dist/DataTable.d.ts +4 -5
- package/dist/DataTable.js +114 -116
- package/dist/DataTable.js.map +1 -1
- package/dist/{DetailsModal-jmmKRMRM.cjs → DetailsModal-Du8Fr1QD.cjs} +2 -2
- package/dist/{DetailsModal-jmmKRMRM.cjs.map → DetailsModal-Du8Fr1QD.cjs.map} +1 -1
- package/dist/{DetailsModal-B2XBWR7w.js → DetailsModal-GqEbGHY2.js} +2 -2
- package/dist/{DetailsModal-B2XBWR7w.js.map → DetailsModal-GqEbGHY2.js.map} +1 -1
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.cjs.map +1 -1
- package/dist/DifferenceLineChart.d.ts +11 -9
- package/dist/DifferenceLineChart.js +502 -504
- package/dist/DifferenceLineChart.js.map +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.d.ts +14 -9
- package/dist/DonutChart.js +174 -179
- package/dist/DonutChart.js.map +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.d.ts +1 -1
- package/dist/DotDensityMap.js +270 -267
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.cjs.map +1 -1
- package/dist/DualAxisLineChart.d.ts +13 -9
- package/dist/DualAxisLineChart.js +341 -351
- package/dist/DualAxisLineChart.js.map +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.d.ts +11 -9
- package/dist/DumbbellChart.js +592 -593
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/GeoHubCompareMaps.cjs +1 -1
- package/dist/GeoHubCompareMaps.d.ts +1 -1
- package/dist/GeoHubCompareMaps.js +1 -1
- package/dist/GeoHubMap.cjs +1 -1
- package/dist/GeoHubMap.d.ts +1 -1
- package/dist/GeoHubMap.js +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
- package/dist/GeoHubMapWithLayerSelection.d.ts +1 -1
- package/dist/GeoHubMapWithLayerSelection.js +1 -1
- package/dist/GraphEl-BgkDbq50.cjs +2 -0
- package/dist/GraphEl-BgkDbq50.cjs.map +1 -0
- package/dist/GraphEl-Ch0uAeZw.js +1830 -0
- package/dist/GraphEl-Ch0uAeZw.js.map +1 -0
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.d.ts +29 -16
- package/dist/GriddedGraphs.js +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +29 -16
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.cjs.map +1 -1
- package/dist/HeatMap.d.ts +11 -9
- package/dist/HeatMap.js +203 -205
- package/dist/HeatMap.js.map +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.cjs.map +1 -1
- package/dist/Histogram.d.ts +11 -5
- package/dist/Histogram.js +88 -89
- package/dist/Histogram.js.map +1 -1
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.d.ts +11 -3
- package/dist/HybridMap.js +339 -336
- package/dist/HybridMap.js.map +1 -1
- package/dist/ImageDownloadButton.cjs +1 -1
- package/dist/ImageDownloadButton.js +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
- package/dist/LineChartWithConfidenceInterval.d.ts +11 -9
- package/dist/LineChartWithConfidenceInterval.js +393 -395
- package/dist/LineChartWithConfidenceInterval.js.map +1 -1
- package/dist/LinearColorLegend.cjs +1 -1
- package/dist/LinearColorLegend.js +1 -1
- package/dist/MultiGraphDashboard.d.ts +29 -16
- package/dist/MultiGraphDashboardFromConfig.d.ts +29 -16
- package/dist/MultiGraphDashboardWideToLongFormat.d.ts +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +1 -1
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.cjs.map +1 -1
- package/dist/MultiLineAltChart.d.ts +11 -9
- package/dist/MultiLineAltChart.js +411 -413
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.cjs.map +1 -1
- package/dist/MultiLineChart.d.ts +11 -9
- package/dist/MultiLineChart.js +438 -440
- package/dist/MultiLineChart.js.map +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.cjs.map +1 -1
- package/dist/ParetoChart.d.ts +13 -13
- package/dist/ParetoChart.js +347 -355
- package/dist/ParetoChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +29 -16
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +29 -16
- package/dist/PerformanceIntensiveScrollStory.d.ts +29 -16
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.cjs.map +1 -1
- package/dist/RadarChart.d.ts +11 -5
- package/dist/RadarChart.js +213 -213
- package/dist/RadarChart.js.map +1 -1
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.cjs.map +1 -1
- package/dist/SankeyChart.d.ts +11 -9
- package/dist/SankeyChart.js +448 -450
- package/dist/SankeyChart.js.map +1 -1
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.cjs.map +1 -1
- package/dist/ScatterPlot.d.ts +15 -13
- package/dist/ScatterPlot.js +477 -483
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/ScrollStory.d.ts +29 -16
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.cjs.map +1 -1
- package/dist/SimpleLineChart.d.ts +11 -9
- package/dist/SimpleLineChart.js +362 -364
- package/dist/SimpleLineChart.js.map +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.d.ts +29 -16
- package/dist/SingleGraphDashboard.js +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +29 -16
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +29 -16
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +29 -16
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +29 -16
- package/dist/SingleGraphDashboardThreeDGraphs.js +40 -39
- package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +29 -16
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.d.ts +1 -1
- package/dist/SlopeChart.js +2 -2
- package/dist/SparkLine.cjs +1 -1
- package/dist/SparkLine.d.ts +1 -1
- package/dist/SparkLine.js +1 -1
- package/dist/StatCardFromData.cjs +1 -1
- package/dist/StatCardFromData.cjs.map +1 -1
- package/dist/StatCardFromData.d.ts +11 -9
- package/dist/StatCardFromData.js +113 -116
- package/dist/StatCardFromData.js.map +1 -1
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.d.ts +11 -9
- package/dist/StripChart.js +434 -435
- package/dist/StripChart.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.cjs.map +1 -1
- package/dist/ThreeDGlobe.d.ts +11 -3
- package/dist/ThreeDGlobe.js +143 -143
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.js +1 -1
- package/dist/{Tooltip-Bj-s__cI.js → Tooltip-3EYDVa3w.js} +2 -2
- package/dist/{Tooltip-Bj-s__cI.js.map → Tooltip-3EYDVa3w.js.map} +1 -1
- package/dist/{Tooltip-Hr46paWP.cjs → Tooltip-C9F3uYG0.cjs} +2 -2
- package/dist/{Tooltip-Hr46paWP.cjs.map → Tooltip-C9F3uYG0.cjs.map} +1 -1
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.cjs.map +1 -1
- package/dist/TreeMapGraph.d.ts +11 -9
- package/dist/TreeMapGraph.js +369 -371
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/Types.d.ts +29 -16
- package/dist/UnitChart.cjs +1 -1
- package/dist/UnitChart.cjs.map +1 -1
- package/dist/UnitChart.d.ts +11 -5
- package/dist/UnitChart.js +118 -119
- package/dist/UnitChart.js.map +1 -1
- package/dist/WaterfallChart.cjs +1 -1
- package/dist/WaterfallChart.cjs.map +1 -1
- package/dist/WaterfallChart.d.ts +11 -9
- package/dist/WaterfallChart.js +306 -308
- package/dist/WaterfallChart.js.map +1 -1
- package/dist/XTicksAndGridLines-B4UhDVyU.cjs +2 -0
- package/dist/XTicksAndGridLines-B4UhDVyU.cjs.map +1 -0
- package/dist/XTicksAndGridLines-CkYwVshF.js +40 -0
- package/dist/XTicksAndGridLines-CkYwVshF.js.map +1 -0
- package/dist/YTicksAndGridLines-BbujwxOB.js +40 -0
- package/dist/YTicksAndGridLines-BbujwxOB.js.map +1 -0
- package/dist/YTicksAndGridLines-sT3zdCs6.cjs +2 -0
- package/dist/YTicksAndGridLines-sT3zdCs6.cjs.map +1 -0
- package/dist/{imageDownload-Diofs_vY.js → imageDownload-BYsNEtMS.js} +11 -11
- package/dist/{imageDownload-Diofs_vY.js.map → imageDownload-BYsNEtMS.js.map} +1 -1
- package/dist/{imageDownload-61q6jyJW.cjs → imageDownload-CkMwA7Cw.cjs} +4 -4
- package/dist/{imageDownload-61q6jyJW.cjs.map → imageDownload-CkMwA7Cw.cjs.map} +1 -1
- package/dist/index-BPyj_6hG.js +375 -0
- package/dist/index-BPyj_6hG.js.map +1 -0
- package/dist/index-DuLvdHo2.cjs +2 -0
- package/dist/index-DuLvdHo2.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +108 -245
- package/dist/index.js +3 -3
- package/dist/numberFormattingFunction-BUUV_luR.js +28 -0
- package/dist/numberFormattingFunction-BUUV_luR.js.map +1 -0
- package/dist/numberFormattingFunction-u2iNHL_c.cjs +2 -0
- package/dist/numberFormattingFunction-u2iNHL_c.cjs.map +1 -0
- package/dist/{string2HTML-ZoGd08P_.cjs → string2HTML-30nfIm8R.cjs} +2 -2
- package/dist/{string2HTML-ZoGd08P_.cjs.map → string2HTML-30nfIm8R.cjs.map} +1 -1
- package/dist/{string2HTML-BrFperRM.js → string2HTML-DL-pInUB.js} +2 -2
- package/dist/{string2HTML-BrFperRM.js.map → string2HTML-DL-pInUB.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +2 -2
- package/package.json +2 -2
- package/dist/GraphEl-B73N4RIA.js +0 -1906
- package/dist/GraphEl-B73N4RIA.js.map +0 -1
- package/dist/GraphEl-Lt1og0C-.cjs +0 -2
- package/dist/GraphEl-Lt1og0C-.cjs.map +0 -1
- package/dist/XTicksAndGridLines-C5DuC5oY.cjs +0 -2
- package/dist/XTicksAndGridLines-C5DuC5oY.cjs.map +0 -1
- package/dist/XTicksAndGridLines-gdbGX2rm.js +0 -39
- package/dist/XTicksAndGridLines-gdbGX2rm.js.map +0 -1
- package/dist/YTicksAndGridLines-CsNSq9W9.js +0 -39
- package/dist/YTicksAndGridLines-CsNSq9W9.js.map +0 -1
- package/dist/YTicksAndGridLines-DFjm8RCc.cjs +0 -2
- package/dist/YTicksAndGridLines-DFjm8RCc.cjs.map +0 -1
- package/dist/index-B0Awa_de.js +0 -377
- package/dist/index-B0Awa_de.js.map +0 -1
- package/dist/index-CP8cmNzt.cjs +0 -2
- package/dist/index-CP8cmNzt.cjs.map +0 -1
- package/dist/numberFormattingFunction-Cn9R7CM9.cjs +0 -2
- package/dist/numberFormattingFunction-Cn9R7CM9.cjs.map +0 -1
- package/dist/numberFormattingFunction-DqMf_v1m.js +0 -28
- package/dist/numberFormattingFunction-DqMf_v1m.js.map +0 -1
package/dist/ChoroplethMap.js
CHANGED
|
@@ -1,226 +1,228 @@
|
|
|
1
|
-
import { j as t, m as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { g as
|
|
4
|
-
import { w as
|
|
5
|
-
import { f as
|
|
6
|
-
import { i as
|
|
7
|
-
import { i as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { i as
|
|
10
|
-
import { n as
|
|
11
|
-
import { T as
|
|
12
|
-
import { c as
|
|
13
|
-
import { X as
|
|
14
|
-
import { D as
|
|
1
|
+
import { j as t, m as Pt, c as Wt } from "./index-CHPV5EwG-BzibaIRc.js";
|
|
2
|
+
import { useMemo as wt, useState as k, useRef as We, useEffect as Pe, useEffectEvent as Ct } from "react";
|
|
3
|
+
import { g as _t, N as At } from "./getSliderMarks-X-_goqH9.js";
|
|
4
|
+
import { w as Ft } from "./Spinner-B2IIKg9r.js";
|
|
5
|
+
import { f as Lt, p as Tt } from "./parse-Dv4of-PN.js";
|
|
6
|
+
import { i as $t } from "./index-Bwrro8-q.js";
|
|
7
|
+
import { i as Nt, z as Ht, a as Gt, g as Ut, b as Vt, c as Rt, d as qt, e as Xt, f as Yt } from "./index-CKpKc9DR.js";
|
|
8
|
+
import { _ as Mt } from "./Typography-BO0gQDIT.js";
|
|
9
|
+
import { i as Zt } from "./index-DCsFBfJ_.js";
|
|
10
|
+
import { n as Jt } from "./numberFormattingFunction-BUUV_luR.js";
|
|
11
|
+
import { T as Kt } from "./Tooltip-3EYDVa3w.js";
|
|
12
|
+
import { c as Qt } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
13
|
+
import { X as eo, E as to, P as oo, e as ro } from "./index-ApTBN0kp.js";
|
|
14
|
+
import { D as ao } from "./DetailsModal-GqEbGHY2.js";
|
|
15
|
+
import { ImageDownloadButton as no } from "./ImageDownloadButton.js";
|
|
15
16
|
import { o as io } from "./ordinal-CHaxGJ_l.js";
|
|
16
17
|
import { t as so } from "./threshold-DFfqcDMa.js";
|
|
17
|
-
import { s as
|
|
18
|
-
import { m as
|
|
18
|
+
import { s as kt } from "./select-DKy99ogv.js";
|
|
19
|
+
import { m as lt } from "./proxy-BsxtcZKa.js";
|
|
19
20
|
import { u as lo } from "./use-in-view-KOXq5Kmc.js";
|
|
20
21
|
import { A as co } from "./index-Cv_5q6Rb.js";
|
|
21
22
|
import { GraphFooter as mo } from "./GraphFooter.js";
|
|
22
23
|
import { GraphHeader as po } from "./GraphHeader.js";
|
|
23
|
-
import { Colors as
|
|
24
|
-
import { f as
|
|
24
|
+
import { Colors as ct } from "./Colors.js";
|
|
25
|
+
import { f as St } from "./fetchAndParseData-BAXhgTDM.js";
|
|
25
26
|
import { g as uo } from "./getUniqValue-DsqSii6M.js";
|
|
26
27
|
import { g as ho } from "./getJenks-DTCcQSDi.js";
|
|
27
28
|
import { a as fo, G as go } from "./GraphContainer-B8ZqOzKI.js";
|
|
28
|
-
function yo(
|
|
29
|
+
function yo(m) {
|
|
29
30
|
const {
|
|
30
31
|
data: e,
|
|
31
|
-
colorDomain:
|
|
32
|
+
colorDomain: a,
|
|
32
33
|
colors: i,
|
|
33
|
-
mapData:
|
|
34
|
-
colorLegendTitle:
|
|
35
|
-
categorical:
|
|
36
|
-
height:
|
|
37
|
-
width:
|
|
38
|
-
scale:
|
|
39
|
-
centerPoint:
|
|
40
|
-
tooltip:
|
|
41
|
-
mapBorderWidth:
|
|
42
|
-
mapBorderColor:
|
|
43
|
-
mapNoDataColor:
|
|
44
|
-
onSeriesMouseOver:
|
|
45
|
-
showColorScale:
|
|
46
|
-
zoomScaleExtend:
|
|
47
|
-
zoomTranslateExtend:
|
|
34
|
+
mapData: A,
|
|
35
|
+
colorLegendTitle: C,
|
|
36
|
+
categorical: F,
|
|
37
|
+
height: v,
|
|
38
|
+
width: p,
|
|
39
|
+
scale: h,
|
|
40
|
+
centerPoint: L,
|
|
41
|
+
tooltip: te,
|
|
42
|
+
mapBorderWidth: q,
|
|
43
|
+
mapBorderColor: oe,
|
|
44
|
+
mapNoDataColor: fe,
|
|
45
|
+
onSeriesMouseOver: re,
|
|
46
|
+
showColorScale: ge,
|
|
47
|
+
zoomScaleExtend: _e,
|
|
48
|
+
zoomTranslateExtend: Ae,
|
|
48
49
|
highlightedIds: j,
|
|
49
|
-
onSeriesMouseClick:
|
|
50
|
-
mapProperty:
|
|
51
|
-
resetSelectionOnDoubleClick:
|
|
52
|
-
detailsOnClick:
|
|
53
|
-
styles:
|
|
54
|
-
classNames:
|
|
55
|
-
mapProjection:
|
|
56
|
-
zoomInteraction:
|
|
57
|
-
animate:
|
|
58
|
-
dimmedOpacity:
|
|
59
|
-
customLayers:
|
|
60
|
-
collapseColorScaleByDefault:
|
|
61
|
-
zoomAndCenterByHighlightedIds:
|
|
50
|
+
onSeriesMouseClick: ae,
|
|
51
|
+
mapProperty: f,
|
|
52
|
+
resetSelectionOnDoubleClick: ye,
|
|
53
|
+
detailsOnClick: X,
|
|
54
|
+
styles: Fe,
|
|
55
|
+
classNames: ne,
|
|
56
|
+
mapProjection: O,
|
|
57
|
+
zoomInteraction: E,
|
|
58
|
+
animate: N,
|
|
59
|
+
dimmedOpacity: B,
|
|
60
|
+
customLayers: ie,
|
|
61
|
+
collapseColorScaleByDefault: ve,
|
|
62
|
+
zoomAndCenterByHighlightedIds: xe,
|
|
62
63
|
projectionRotate: T,
|
|
63
|
-
rewindCoordinatesInMapData:
|
|
64
|
-
overlayMapData:
|
|
65
|
-
overlayMapBorderColor:
|
|
66
|
-
overlayMapBorderWidth:
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
rewindCoordinatesInMapData: Y,
|
|
65
|
+
overlayMapData: Z,
|
|
66
|
+
overlayMapBorderColor: Le,
|
|
67
|
+
overlayMapBorderWidth: Te,
|
|
68
|
+
numberDisplayOptions: J,
|
|
69
|
+
graphDownload: be
|
|
70
|
+
} = m, x = wt(() => Y ? Nt(A, {
|
|
69
71
|
reverse: !0
|
|
70
|
-
}) :
|
|
72
|
+
}) : A, [A, Y]), u = wt(() => !Y || !Z ? Z : Nt(Z, {
|
|
71
73
|
reverse: !0
|
|
72
|
-
}), [
|
|
73
|
-
once:
|
|
74
|
-
amount:
|
|
75
|
-
}),
|
|
76
|
-
|
|
77
|
-
const o =
|
|
78
|
-
if (
|
|
79
|
-
if (
|
|
80
|
-
const
|
|
81
|
-
return
|
|
82
|
-
},
|
|
83
|
-
transform:
|
|
74
|
+
}), [Z, Y]), [s, I] = k(void 0), se = We(null), [$e, De] = k(ve === void 0 ? !(p < 680) : !ve), [$, H] = k(void 0), [G, U] = k(void 0), [je, le] = k(void 0), [g, K] = k(void 0), b = We(null), Q = lo(b, {
|
|
75
|
+
once: N.once,
|
|
76
|
+
amount: N.amount
|
|
77
|
+
}), M = We(null), ke = F ? io().domain(a).range(i) : so().domain(a).range(i);
|
|
78
|
+
Pe(() => {
|
|
79
|
+
const o = kt(M.current), r = kt(b.current), D = (n) => {
|
|
80
|
+
if (E === "noZoom") return !1;
|
|
81
|
+
if (E === "button") return !n.type.includes("wheel");
|
|
82
|
+
const Se = n.type === "wheel", Oe = n.type.startsWith("touch"), Ee = n.type === "mousedown" || n.type === "mousemove";
|
|
83
|
+
return Oe ? !0 : Se ? E === "scroll" ? !0 : n.ctrlKey : Ee && !n.button && !n.ctrlKey;
|
|
84
|
+
}, y = Ht().scaleExtent(_e).translateExtent(Ae || [[-20, -20], [p + 20, v + 20]]).filter(D).on("zoom", ({
|
|
85
|
+
transform: n
|
|
84
86
|
}) => {
|
|
85
|
-
o.attr("transform",
|
|
87
|
+
o.attr("transform", n);
|
|
86
88
|
});
|
|
87
|
-
r.call(
|
|
88
|
-
}, [
|
|
89
|
-
const
|
|
89
|
+
r.call(y), se.current = y;
|
|
90
|
+
}, [v, p, E]);
|
|
91
|
+
const V = Gt({
|
|
90
92
|
...x,
|
|
91
|
-
features:
|
|
93
|
+
features: xe ? x.features.filter(
|
|
92
94
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
93
|
-
(o) => (j || []).length === 0 || j?.indexOf(o.properties[
|
|
95
|
+
(o) => (j || []).length === 0 || j?.indexOf(o.properties[f]) !== -1
|
|
94
96
|
) : x.features
|
|
95
|
-
}),
|
|
97
|
+
}), z = Zt({
|
|
96
98
|
...x,
|
|
97
|
-
features:
|
|
99
|
+
features: xe ? x.features.filter(
|
|
98
100
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
99
|
-
(o) => (j || []).length === 0 || j?.indexOf(o.properties[
|
|
101
|
+
(o) => (j || []).length === 0 || j?.indexOf(o.properties[f]) !== -1
|
|
100
102
|
) : x.features
|
|
101
|
-
}),
|
|
102
|
-
if (!
|
|
103
|
-
|
|
103
|
+
}), we = (V[2] - V[0]) * 1.15, Ce = (V[3] - V[1]) * 1.15, ce = p * 190 / 960 * 360 / we, Ne = v * 190 / 678 * 180 / Ce, S = h * Math.min(ce, Ne), Me = O === "mercator" ? Ut().rotate(T).center(L || z.geometry.coordinates).translate([p / 2, v / 2]).scale(S) : O === "equalEarth" ? Vt().rotate(T).center(L || z.geometry.coordinates).translate([p / 2, v / 2]).scale(S) : O === "naturalEarth" ? Rt().rotate(T).center(L || z.geometry.coordinates).translate([p / 2, v / 2]).scale(S) : O === "orthographic" ? qt().rotate(T).center(L || z.geometry.coordinates).translate([p / 2, v / 2]).scale(S) : Xt().rotate(T).center(L || z.geometry.coordinates).translate([p / 2, v / 2]).scale(S), R = Yt().projection(Me), P = (o) => {
|
|
104
|
+
if (!b.current || !se.current) return;
|
|
105
|
+
kt(b.current).call(se.current.scaleBy, o === "in" ? 1.2 : 1 / 1.2);
|
|
104
106
|
};
|
|
105
107
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
106
108
|
/* @__PURE__ */ t.jsxs("div", { className: "relative", children: [
|
|
107
|
-
/* @__PURE__ */ t.jsx(
|
|
108
|
-
|
|
109
|
+
/* @__PURE__ */ t.jsx(lt.svg, { width: `${p}px`, height: `${v}px`, viewBox: `0 0 ${p} ${v}`, ref: b, direction: "ltr", children: /* @__PURE__ */ t.jsxs("g", { ref: M, children: [
|
|
110
|
+
ie.filter((o) => o.position === "before").map((o) => o.layer),
|
|
109
111
|
x.features.map((o, r) => {
|
|
110
|
-
if (!o.properties?.[
|
|
111
|
-
const
|
|
112
|
-
return
|
|
113
|
-
stroke:
|
|
114
|
-
strokeWidth:
|
|
115
|
-
fill:
|
|
112
|
+
if (!o.properties?.[f]) return null;
|
|
113
|
+
const D = R(o);
|
|
114
|
+
return D ? /* @__PURE__ */ t.jsx(lt.g, { opacity: s ? B : j ? j.indexOf(o.properties[f]) !== -1 ? 1 : B : 1, children: /* @__PURE__ */ t.jsx("path", { d: D, style: {
|
|
115
|
+
stroke: oe,
|
|
116
|
+
strokeWidth: q,
|
|
117
|
+
fill: fe,
|
|
116
118
|
vectorEffect: "non-scaling-stroke"
|
|
117
119
|
} }) }, r) : null;
|
|
118
120
|
}),
|
|
119
121
|
/* @__PURE__ */ t.jsx(co, { children: e.map((o) => {
|
|
120
122
|
const r = x.features.findIndex(
|
|
121
123
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
122
|
-
(
|
|
124
|
+
(n) => o.id === n.properties[f]
|
|
123
125
|
);
|
|
124
126
|
if (r === -1) return null;
|
|
125
|
-
const
|
|
126
|
-
if (!
|
|
127
|
-
const
|
|
127
|
+
const D = R(x.features[r]);
|
|
128
|
+
if (!D) return null;
|
|
129
|
+
const y = Qt(o.x) ? fe : (
|
|
128
130
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
129
|
-
|
|
131
|
+
ke(o.x)
|
|
130
132
|
);
|
|
131
|
-
return /* @__PURE__ */ t.jsx(
|
|
133
|
+
return /* @__PURE__ */ t.jsx(lt.g, { className: "undp-map-shapes", variants: {
|
|
132
134
|
initial: {
|
|
133
135
|
opacity: 0
|
|
134
136
|
},
|
|
135
137
|
whileInView: {
|
|
136
|
-
opacity: s ? s ===
|
|
138
|
+
opacity: s ? s === y && (!j || j.indexOf(o.id) !== -1) ? 1 : B : j ? j.indexOf(o.id) !== -1 ? 1 : B : 1,
|
|
137
139
|
transition: {
|
|
138
|
-
duration:
|
|
140
|
+
duration: N.duration
|
|
139
141
|
}
|
|
140
142
|
}
|
|
141
|
-
}, initial: "initial", animate:
|
|
143
|
+
}, initial: "initial", animate: Q ? "whileInView" : "initial", exit: {
|
|
142
144
|
opacity: 0,
|
|
143
145
|
transition: {
|
|
144
|
-
duration:
|
|
146
|
+
duration: N.duration
|
|
145
147
|
}
|
|
146
|
-
}, onMouseEnter: (
|
|
147
|
-
|
|
148
|
-
}, onMouseMove: (
|
|
149
|
-
|
|
148
|
+
}, onMouseEnter: (n) => {
|
|
149
|
+
U(o), K(n.clientY), le(n.clientX), re?.(o);
|
|
150
|
+
}, onMouseMove: (n) => {
|
|
151
|
+
U(o), K(n.clientY), le(n.clientX);
|
|
150
152
|
}, onMouseLeave: () => {
|
|
151
|
-
|
|
153
|
+
U(void 0), le(void 0), K(void 0), re?.(void 0);
|
|
152
154
|
}, onClick: () => {
|
|
153
|
-
(
|
|
154
|
-
}, children: /* @__PURE__ */ t.jsx(
|
|
155
|
+
(ae || X) && ($t($, o) && ye ? (H(void 0), ae?.(void 0)) : (H(o), ae?.(o)));
|
|
156
|
+
}, children: /* @__PURE__ */ t.jsx(lt.path, { d: D, variants: {
|
|
155
157
|
initial: {
|
|
156
|
-
fill:
|
|
158
|
+
fill: y,
|
|
157
159
|
opacity: 0
|
|
158
160
|
},
|
|
159
161
|
whileInView: {
|
|
160
|
-
fill:
|
|
162
|
+
fill: y,
|
|
161
163
|
opacity: 1,
|
|
162
164
|
transition: {
|
|
163
|
-
duration:
|
|
165
|
+
duration: N.duration
|
|
164
166
|
}
|
|
165
167
|
}
|
|
166
|
-
}, initial: "initial", animate:
|
|
168
|
+
}, initial: "initial", animate: Q ? "whileInView" : "initial", exit: {
|
|
167
169
|
opacity: 0,
|
|
168
170
|
transition: {
|
|
169
|
-
duration:
|
|
171
|
+
duration: N.duration
|
|
170
172
|
}
|
|
171
173
|
}, style: {
|
|
172
|
-
stroke:
|
|
173
|
-
strokeWidth:
|
|
174
|
+
stroke: oe,
|
|
175
|
+
strokeWidth: q,
|
|
174
176
|
vectorEffect: "non-scaling-stroke"
|
|
175
177
|
} }, `${o.id}`) }, o.id);
|
|
176
178
|
}) }),
|
|
177
|
-
|
|
179
|
+
G ? x.features.filter(
|
|
178
180
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
179
|
-
(o) => o.properties[
|
|
180
|
-
).map((o, r) => /* @__PURE__ */ t.jsx("path", { d:
|
|
181
|
+
(o) => o.properties[f] === G.id
|
|
182
|
+
).map((o, r) => /* @__PURE__ */ t.jsx("path", { d: R(o) || "", className: "stroke-primary-gray-700 dark:stroke-primary-gray-300", style: {
|
|
181
183
|
fill: "none",
|
|
182
184
|
fillOpacity: 0,
|
|
183
185
|
strokeWidth: "0.5",
|
|
184
186
|
vectorEffect: "non-scaling-stroke"
|
|
185
187
|
} }, r)) : null,
|
|
186
|
-
|
|
187
|
-
const
|
|
188
|
-
return
|
|
189
|
-
stroke:
|
|
190
|
-
strokeWidth:
|
|
188
|
+
u?.features.map((o, r) => {
|
|
189
|
+
const D = R(o);
|
|
190
|
+
return D ? /* @__PURE__ */ t.jsx("g", { children: /* @__PURE__ */ t.jsx("path", { d: D, style: {
|
|
191
|
+
stroke: Le || oe,
|
|
192
|
+
strokeWidth: Te || q + 1,
|
|
191
193
|
fill: "none",
|
|
192
194
|
pointerEvents: "none",
|
|
193
195
|
vectorEffect: "non-scaling-stroke"
|
|
194
196
|
} }) }, r) : null;
|
|
195
197
|
}),
|
|
196
|
-
|
|
198
|
+
ie.filter((o) => o.position === "after").map((o) => o.layer)
|
|
197
199
|
] }) }),
|
|
198
|
-
|
|
200
|
+
ge === !1 ? null : /* @__PURE__ */ t.jsx("div", { className: Pt("absolute left-4 bottom-4 map-color-legend", ne?.colorLegend), children: $e ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
199
201
|
/* @__PURE__ */ t.jsx("div", { 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]", onClick: () => {
|
|
200
202
|
De(!1);
|
|
201
|
-
}, children: /* @__PURE__ */ t.jsx(
|
|
203
|
+
}, children: /* @__PURE__ */ t.jsx(eo, {}) }),
|
|
202
204
|
/* @__PURE__ */ t.jsxs("div", { className: "color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]", style: {
|
|
203
|
-
width:
|
|
205
|
+
width: F ? void 0 : "340px"
|
|
204
206
|
}, children: [
|
|
205
|
-
|
|
207
|
+
C && C !== "" ? /* @__PURE__ */ t.jsx(Mt, { size: "xs", marginBottom: "xs", className: "p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300", style: {
|
|
206
208
|
display: "-webkit-box",
|
|
207
209
|
WebkitLineClamp: "1",
|
|
208
210
|
WebkitBoxOrient: "vertical"
|
|
209
|
-
}, children:
|
|
210
|
-
|
|
211
|
-
|
|
211
|
+
}, children: C }) : null,
|
|
212
|
+
F ? /* @__PURE__ */ t.jsx("div", { className: "flex flex-col gap-3", children: a.map((o, r) => /* @__PURE__ */ t.jsxs("div", { className: "flex gap-2 items-center", onMouseOver: () => {
|
|
213
|
+
I(i[r % i.length]);
|
|
212
214
|
}, onMouseLeave: () => {
|
|
213
|
-
|
|
215
|
+
I(void 0);
|
|
214
216
|
}, children: [
|
|
215
217
|
/* @__PURE__ */ t.jsx("div", { className: "w-2 h-2 rounded-full", style: {
|
|
216
218
|
backgroundColor: i[r % i.length]
|
|
217
219
|
} }),
|
|
218
|
-
/* @__PURE__ */ t.jsx(
|
|
220
|
+
/* @__PURE__ */ t.jsx(Mt, { size: "sm", marginBottom: "none", leading: "none", children: o })
|
|
219
221
|
] }, r)) }) : /* @__PURE__ */ t.jsx("svg", { width: "100%", viewBox: "0 0 320 30", direction: "ltr", children: /* @__PURE__ */ t.jsxs("g", { children: [
|
|
220
|
-
|
|
221
|
-
|
|
222
|
+
a.map((o, r) => /* @__PURE__ */ t.jsxs("g", { onMouseOver: () => {
|
|
223
|
+
I(i[r]);
|
|
222
224
|
}, onMouseLeave: () => {
|
|
223
|
-
|
|
225
|
+
I(void 0);
|
|
224
226
|
}, className: "cursor-pointer", children: [
|
|
225
227
|
/* @__PURE__ */ t.jsx("rect", { x: r * 320 / i.length + 1, y: 1, width: 320 / i.length - 2, height: 8, className: s === i[r] ? "stroke-primary-gray-700 dark:stroke-primary-gray-300" : "", style: {
|
|
226
228
|
fill: i[r],
|
|
@@ -230,237 +232,238 @@ function yo(p) {
|
|
|
230
232
|
} }),
|
|
231
233
|
/* @__PURE__ */ t.jsx("text", { x: (r + 1) * 320 / i.length, y: 25, className: "fill-primary-gray-700 dark:fill-primary-gray-300 text-xs", style: {
|
|
232
234
|
textAnchor: "middle"
|
|
233
|
-
}, children:
|
|
235
|
+
}, children: Jt(o, "NA", J?.precision ?? 2, void 0, void 0, J?.locale || "en", J?.padZeros || !1) })
|
|
234
236
|
] }, r)),
|
|
235
237
|
/* @__PURE__ */ t.jsx("g", { children: /* @__PURE__ */ t.jsx("rect", { onMouseOver: () => {
|
|
236
|
-
|
|
238
|
+
I(i[a.length]);
|
|
237
239
|
}, onMouseLeave: () => {
|
|
238
|
-
|
|
239
|
-
}, x:
|
|
240
|
-
fill: i[
|
|
241
|
-
...s === i[
|
|
242
|
-
stroke: i[
|
|
240
|
+
I(void 0);
|
|
241
|
+
}, x: a.length * 320 / i.length + 1, y: 1, width: 320 / i.length - 2, height: 8, className: `cursor-pointer ${s === i[a.length] ? "stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300" : ""}`, style: {
|
|
242
|
+
fill: i[a.length],
|
|
243
|
+
...s === i[a.length] ? {} : {
|
|
244
|
+
stroke: i[a.length]
|
|
243
245
|
}
|
|
244
246
|
} }) })
|
|
245
247
|
] }) })
|
|
246
248
|
] })
|
|
247
249
|
] }) : /* @__PURE__ */ t.jsx("button", { type: "button", className: "p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button", onClick: () => {
|
|
248
250
|
De(!0);
|
|
249
|
-
}, children: /* @__PURE__ */ t.jsx(
|
|
250
|
-
|
|
251
|
-
/* @__PURE__ */ t.jsx("button", { onClick: () =>
|
|
252
|
-
/* @__PURE__ */ t.jsx("button", { onClick: () =>
|
|
253
|
-
] })
|
|
251
|
+
}, children: /* @__PURE__ */ t.jsx(to, {}) }) }),
|
|
252
|
+
E === "button" && /* @__PURE__ */ t.jsxs("div", { className: "absolute left-4 top-4 flex flex-col undp-viz-zoom-buttons", children: [
|
|
253
|
+
/* @__PURE__ */ t.jsx("button", { onClick: () => P("in"), 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", children: "+" }),
|
|
254
|
+
/* @__PURE__ */ t.jsx("button", { onClick: () => P("out"), 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", children: "–" })
|
|
255
|
+
] }),
|
|
256
|
+
be && /* @__PURE__ */ t.jsx("div", { className: "absolute right-4 top-4 flex flex-col image-download-button", children: /* @__PURE__ */ t.jsx(no, { nodeID: be, buttonSmall: !0 }) })
|
|
254
257
|
] }),
|
|
255
|
-
|
|
256
|
-
|
|
258
|
+
X && $ !== void 0 ? /* @__PURE__ */ t.jsx(ao, { body: X, data: $, setData: H, className: ne?.modal }) : null,
|
|
259
|
+
G && te && je && g ? /* @__PURE__ */ t.jsx(Kt, { data: G, body: te, xPos: je, yPos: g, backgroundStyle: Fe?.tooltip, className: ne?.tooltip }) : null
|
|
257
260
|
] });
|
|
258
261
|
}
|
|
259
|
-
function
|
|
260
|
-
const e =
|
|
261
|
-
data:
|
|
262
|
+
function tr(m) {
|
|
263
|
+
const e = Wt.c(135), {
|
|
264
|
+
data: a,
|
|
262
265
|
mapData: i,
|
|
263
|
-
graphTitle:
|
|
264
|
-
colors:
|
|
265
|
-
sources:
|
|
266
|
-
graphDescription:
|
|
267
|
-
height:
|
|
268
|
-
width:
|
|
269
|
-
footNote:
|
|
270
|
-
colorDomain:
|
|
271
|
-
colorLegendTitle:
|
|
272
|
-
scaleType:
|
|
273
|
-
scale:
|
|
274
|
-
centerPoint:
|
|
275
|
-
padding:
|
|
276
|
-
mapBorderWidth:
|
|
277
|
-
mapNoDataColor:
|
|
266
|
+
graphTitle: A,
|
|
267
|
+
colors: C,
|
|
268
|
+
sources: F,
|
|
269
|
+
graphDescription: v,
|
|
270
|
+
height: p,
|
|
271
|
+
width: h,
|
|
272
|
+
footNote: L,
|
|
273
|
+
colorDomain: te,
|
|
274
|
+
colorLegendTitle: q,
|
|
275
|
+
scaleType: oe,
|
|
276
|
+
scale: fe,
|
|
277
|
+
centerPoint: re,
|
|
278
|
+
padding: ge,
|
|
279
|
+
mapBorderWidth: _e,
|
|
280
|
+
mapNoDataColor: Ae,
|
|
278
281
|
backgroundColor: j,
|
|
279
|
-
mapBorderColor:
|
|
280
|
-
relativeHeight:
|
|
281
|
-
tooltip:
|
|
282
|
-
onSeriesMouseOver:
|
|
283
|
-
isWorldMap:
|
|
284
|
-
showColorScale:
|
|
285
|
-
zoomScaleExtend:
|
|
286
|
-
zoomTranslateExtend:
|
|
287
|
-
graphID:
|
|
288
|
-
highlightedIds:
|
|
289
|
-
onSeriesMouseClick:
|
|
290
|
-
mapProperty:
|
|
291
|
-
graphDownload:
|
|
282
|
+
mapBorderColor: ae,
|
|
283
|
+
relativeHeight: f,
|
|
284
|
+
tooltip: ye,
|
|
285
|
+
onSeriesMouseOver: X,
|
|
286
|
+
isWorldMap: Fe,
|
|
287
|
+
showColorScale: ne,
|
|
288
|
+
zoomScaleExtend: O,
|
|
289
|
+
zoomTranslateExtend: E,
|
|
290
|
+
graphID: N,
|
|
291
|
+
highlightedIds: B,
|
|
292
|
+
onSeriesMouseClick: ie,
|
|
293
|
+
mapProperty: ve,
|
|
294
|
+
graphDownload: xe,
|
|
292
295
|
dataDownload: T,
|
|
293
|
-
showAntarctica:
|
|
294
|
-
language:
|
|
295
|
-
minHeight:
|
|
296
|
-
theme:
|
|
297
|
-
ariaLabel:
|
|
298
|
-
resetSelectionOnDoubleClick:
|
|
299
|
-
detailsOnClick:
|
|
300
|
-
styles:
|
|
301
|
-
classNames:
|
|
302
|
-
mapProjection:
|
|
303
|
-
zoomInteraction:
|
|
304
|
-
animate:
|
|
305
|
-
dimmedOpacity:
|
|
296
|
+
showAntarctica: Y,
|
|
297
|
+
language: Z,
|
|
298
|
+
minHeight: Le,
|
|
299
|
+
theme: Te,
|
|
300
|
+
ariaLabel: J,
|
|
301
|
+
resetSelectionOnDoubleClick: be,
|
|
302
|
+
detailsOnClick: x,
|
|
303
|
+
styles: u,
|
|
304
|
+
classNames: s,
|
|
305
|
+
mapProjection: I,
|
|
306
|
+
zoomInteraction: se,
|
|
307
|
+
animate: $e,
|
|
308
|
+
dimmedOpacity: De,
|
|
306
309
|
customLayers: $,
|
|
307
|
-
timeline:
|
|
308
|
-
collapseColorScaleByDefault:
|
|
309
|
-
projectionRotate:
|
|
310
|
-
zoomAndCenterByHighlightedIds:
|
|
311
|
-
rewindCoordinatesInMapData:
|
|
312
|
-
mapOverlay:
|
|
313
|
-
|
|
314
|
-
} =
|
|
315
|
-
let
|
|
316
|
-
e[0] !==
|
|
317
|
-
const
|
|
318
|
-
let He;
|
|
319
|
-
e[2] !== $ ? (He = $ === void 0 ? [] : $, e[2] = $, e[3] = He) : He = e[3];
|
|
320
|
-
const mt = He;
|
|
310
|
+
timeline: H,
|
|
311
|
+
collapseColorScaleByDefault: G,
|
|
312
|
+
projectionRotate: U,
|
|
313
|
+
zoomAndCenterByHighlightedIds: je,
|
|
314
|
+
rewindCoordinatesInMapData: le,
|
|
315
|
+
mapOverlay: g,
|
|
316
|
+
numberDisplayOptions: K
|
|
317
|
+
} = m, b = i === void 0 ? "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json" : i, Q = L === void 0 ? "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." : L, M = oe === void 0 ? "threshold" : oe, ke = fe === void 0 ? 0.95 : fe, V = _e === void 0 ? 0.5 : _e, z = Ae === void 0 ? ct.light.graphNoData : Ae, we = j === void 0 ? !1 : j, Ce = ae === void 0 ? ct.light.grays["gray-500"] : ae, ce = Fe === void 0 ? !0 : Fe, Ne = ne === void 0 ? !0 : ne;
|
|
318
|
+
let S;
|
|
319
|
+
e[0] !== O ? (S = O === void 0 ? [0.8, 6] : O, e[0] = O, e[1] = S) : S = e[1];
|
|
320
|
+
const Me = S, R = ve === void 0 ? "ISO3" : ve, P = xe === void 0 ? !1 : xe, o = T === void 0 ? !1 : T, r = Y === void 0 ? !1 : Y, D = Z === void 0 ? "en" : Z, y = Le === void 0 ? 0 : Le, n = Te === void 0 ? "light" : Te, Se = be === void 0 ? !0 : be, Oe = I === void 0 ? "naturalEarth" : I, Ee = se === void 0 ? "button" : se, He = $e === void 0 ? !1 : $e, dt = De === void 0 ? 0.3 : De;
|
|
321
321
|
let Ge;
|
|
322
|
-
e[
|
|
322
|
+
e[2] !== $ ? (Ge = $ === void 0 ? [] : $, e[2] = $, e[3] = Ge) : Ge = e[3];
|
|
323
|
+
const mt = Ge;
|
|
324
|
+
let Ue;
|
|
325
|
+
e[4] !== H ? (Ue = H === void 0 ? {
|
|
323
326
|
enabled: !1,
|
|
324
327
|
autoplay: !1,
|
|
325
328
|
showOnlyActiveDate: !0
|
|
326
|
-
} :
|
|
327
|
-
const l =
|
|
328
|
-
let
|
|
329
|
-
e[6] !==
|
|
330
|
-
const pt =
|
|
331
|
-
let
|
|
332
|
-
if (e[8] !==
|
|
333
|
-
let
|
|
334
|
-
e[11] !== l.dateFormat ? (
|
|
329
|
+
} : H, e[4] = H, e[5] = Ue) : Ue = e[5];
|
|
330
|
+
const l = Ue;
|
|
331
|
+
let Ve;
|
|
332
|
+
e[6] !== U ? (Ve = U === void 0 ? [0, 0] : U, e[6] = U, e[7] = Ve) : Ve = e[7];
|
|
333
|
+
const pt = Ve, ut = je === void 0 ? !1 : je, ht = le === void 0 ? !0 : le, [ee, Ot] = k(0), [Be, Et] = k(0), [W, Bt] = k(l.autoplay);
|
|
334
|
+
let Ie;
|
|
335
|
+
if (e[8] !== a || e[9] !== l.dateFormat) {
|
|
336
|
+
let c;
|
|
337
|
+
e[11] !== l.dateFormat ? (c = (w) => Tt(`${w.date}`, l.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime(), e[11] = l.dateFormat, e[12] = c) : c = e[12], Ie = [...new Set(a.filter(No).map(c))], Ie.sort(Co), e[8] = a, e[9] = l.dateFormat, e[10] = Ie;
|
|
335
338
|
} else
|
|
336
|
-
|
|
337
|
-
const
|
|
338
|
-
let
|
|
339
|
-
e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
340
|
-
const
|
|
341
|
-
|
|
339
|
+
Ie = e[10];
|
|
340
|
+
const d = Ie, [_, ft] = k(l.autoplay ? 0 : d.length - 1), [de, It] = k(void 0), [gt, zt] = k(void 0), yt = We(null), vt = We(null);
|
|
341
|
+
let Re, qe;
|
|
342
|
+
e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Re = () => {
|
|
343
|
+
const c = new ResizeObserver((w) => {
|
|
344
|
+
Ot(w[0].target.clientWidth || 620), Et(w[0].target.clientHeight || 480);
|
|
342
345
|
});
|
|
343
|
-
return
|
|
344
|
-
},
|
|
345
|
-
let
|
|
346
|
-
e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
347
|
-
|
|
348
|
-
}, e[15] =
|
|
349
|
-
const
|
|
350
|
-
let
|
|
351
|
-
e[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
352
|
-
|
|
353
|
-
}, e[16] =
|
|
354
|
-
const
|
|
346
|
+
return yt.current && c.observe(yt.current), () => c.disconnect();
|
|
347
|
+
}, qe = [], e[13] = Re, e[14] = qe) : (Re = e[13], qe = e[14]), Pe(Re, qe);
|
|
348
|
+
let Xe;
|
|
349
|
+
e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Xe = (c) => {
|
|
350
|
+
It(c);
|
|
351
|
+
}, e[15] = Xe) : Xe = e[15];
|
|
352
|
+
const Ye = Ct(Xe);
|
|
353
|
+
let Ze;
|
|
354
|
+
e[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Ze = (c) => {
|
|
355
|
+
zt(c);
|
|
356
|
+
}, e[16] = Ze) : Ze = e[16];
|
|
357
|
+
const ze = Ct(Ze);
|
|
355
358
|
let Je;
|
|
356
|
-
e[17] !==
|
|
357
|
-
typeof
|
|
358
|
-
|
|
359
|
-
}) :
|
|
360
|
-
}, e[17] =
|
|
359
|
+
e[17] !== b || e[18] !== Ye ? (Je = () => {
|
|
360
|
+
typeof b == "string" ? St(b).then((w) => {
|
|
361
|
+
Ye(w);
|
|
362
|
+
}) : Ye(b);
|
|
363
|
+
}, e[17] = b, e[18] = Ye, e[19] = Je) : Je = e[19];
|
|
361
364
|
let Ke;
|
|
362
|
-
e[20] !==
|
|
363
|
-
let Ze;
|
|
364
|
-
e[22] !== h?.mapData || e[23] !== Ie ? (Ze = () => {
|
|
365
|
-
h?.mapData || Ie(void 0), typeof h?.mapData == "string" ? Ot(h?.mapData).then((D) => {
|
|
366
|
-
Ie(D);
|
|
367
|
-
}) : Ie(h?.mapData);
|
|
368
|
-
}, e[22] = h?.mapData, e[23] = Ie, e[24] = Ze) : Ze = e[24];
|
|
369
|
-
const xt = h?.mapData;
|
|
365
|
+
e[20] !== b ? (Ke = [b], e[20] = b, e[21] = Ke) : Ke = e[21], Pe(Je, Ke);
|
|
370
366
|
let Qe;
|
|
371
|
-
e[
|
|
367
|
+
e[22] !== g?.mapData || e[23] !== ze ? (Qe = () => {
|
|
368
|
+
g?.mapData || ze(void 0), typeof g?.mapData == "string" ? St(g?.mapData).then((w) => {
|
|
369
|
+
ze(w);
|
|
370
|
+
}) : ze(g?.mapData);
|
|
371
|
+
}, e[22] = g?.mapData, e[23] = ze, e[24] = Qe) : Qe = e[24];
|
|
372
|
+
const xt = g?.mapData;
|
|
372
373
|
let et;
|
|
373
|
-
e[
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
374
|
+
e[25] !== xt ? (et = [xt], e[25] = xt, e[26] = et) : et = e[26], Pe(Qe, et);
|
|
375
|
+
let tt;
|
|
376
|
+
e[27] !== te || e[28] !== C?.length || e[29] !== a || e[30] !== M ? (tt = te || (M === "categorical" ? uo(a, "x") : ho(a.map(wo), C?.length || 4)), e[27] = te, e[28] = C?.length, e[29] = a, e[30] = M, e[31] = tt) : tt = e[31];
|
|
377
|
+
const ot = tt;
|
|
378
|
+
let rt, at;
|
|
379
|
+
e[32] !== W || e[33] !== l.speed || e[34] !== d ? (rt = () => {
|
|
380
|
+
const c = setInterval(() => {
|
|
381
|
+
ft((w) => w < d.length - 1 ? w + 1 : 0);
|
|
379
382
|
}, (l.speed || 2) * 1e3);
|
|
380
|
-
return
|
|
381
|
-
},
|
|
383
|
+
return W || clearInterval(c), () => clearInterval(c);
|
|
384
|
+
}, at = [d, W, l.speed], e[32] = W, e[33] = l.speed, e[34] = d, e[35] = rt, e[36] = at) : (rt = e[35], at = e[36]), Pe(rt, at);
|
|
382
385
|
const bt = l.dateFormat || "yyyy";
|
|
383
|
-
let
|
|
384
|
-
e[37] !==
|
|
385
|
-
const
|
|
386
|
-
let
|
|
387
|
-
e[42] !==
|
|
386
|
+
let nt;
|
|
387
|
+
e[37] !== _ || e[38] !== bt || e[39] !== l.showOnlyActiveDate || e[40] !== d ? (nt = _t(d, _, l.showOnlyActiveDate, bt), e[37] = _, e[38] = bt, e[39] = l.showOnlyActiveDate, e[40] = d, e[41] = nt) : nt = e[41];
|
|
388
|
+
const it = nt, Dt = s?.graphContainer, jt = u?.graphContainer;
|
|
389
|
+
let me;
|
|
390
|
+
e[42] !== s?.description || e[43] !== s?.title || e[44] !== a || e[45] !== o || e[46] !== v || e[47] !== P || e[48] !== A || e[49] !== u?.description || e[50] !== u?.title || e[51] !== h ? (me = A || v || o ? /* @__PURE__ */ t.jsx(po, { styles: {
|
|
391
|
+
title: u?.title,
|
|
392
|
+
description: u?.description
|
|
393
|
+
}, classNames: {
|
|
388
394
|
title: s?.title,
|
|
389
395
|
description: s?.description
|
|
390
|
-
},
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
}, graphTitle: _, graphDescription: y, width: f, graphDownload: o ? wt : void 0, dataDownload: r ? n.map(Do).filter(ko).length > 0 ? n.map(jo).filter(bo) : n.filter(xo) : null }) : null, e[42] = c?.description, e[43] = c?.title, e[44] = n, e[45] = r, e[46] = y, e[47] = o, e[48] = _, e[49] = s?.description, e[50] = s?.title, e[51] = f, e[52] = pe) : pe = e[52];
|
|
394
|
-
let ue;
|
|
395
|
-
e[53] !== W || e[54] !== nt || e[55] !== P || e[56] !== l.enabled || e[57] !== m ? (ue = l.enabled && m.length > 0 && nt ? /* @__PURE__ */ t.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
|
|
396
|
+
}, graphTitle: A, graphDescription: v, width: h, graphDownload: P ? vt : void 0, dataDownload: o ? a.map(ko).filter(jo).length > 0 ? a.map(Do).filter(bo) : a.filter(xo) : null }) : null, e[42] = s?.description, e[43] = s?.title, e[44] = a, e[45] = o, e[46] = v, e[47] = P, e[48] = A, e[49] = u?.description, e[50] = u?.title, e[51] = h, e[52] = me) : me = e[52];
|
|
397
|
+
let pe;
|
|
398
|
+
e[53] !== _ || e[54] !== it || e[55] !== W || e[56] !== l.enabled || e[57] !== d ? (pe = l.enabled && d.length > 0 && it ? /* @__PURE__ */ t.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
|
|
396
399
|
/* @__PURE__ */ t.jsx("button", { type: "button", onClick: () => {
|
|
397
|
-
|
|
398
|
-
}, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label":
|
|
399
|
-
/* @__PURE__ */ t.jsx(
|
|
400
|
-
|
|
401
|
-
}, onChange: (
|
|
402
|
-
|
|
400
|
+
Bt(!W);
|
|
401
|
+
}, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label": W ? "Click to pause animation" : "Click to play animation", children: W ? /* @__PURE__ */ t.jsx(oo, {}) : /* @__PURE__ */ t.jsx(ro, {}) }),
|
|
402
|
+
/* @__PURE__ */ t.jsx(At, { min: d[0], max: d[d.length - 1], marks: it, step: null, defaultValue: d[d.length - 1], value: d[_], onChangeComplete: (c) => {
|
|
403
|
+
ft(d.indexOf(c));
|
|
404
|
+
}, onChange: (c) => {
|
|
405
|
+
ft(d.indexOf(c));
|
|
403
406
|
}, "aria-label": "Time slider. Use arrow keys to adjust selected time period." })
|
|
404
|
-
] }) : null, e[53] =
|
|
405
|
-
let
|
|
406
|
-
e[59] !==
|
|
407
|
-
...
|
|
408
|
-
features:
|
|
409
|
-
}, colorDomain:
|
|
407
|
+
] }) : null, e[53] = _, e[54] = it, e[55] = W, e[56] = l.enabled, e[57] = d, e[58] = pe) : pe = e[58];
|
|
408
|
+
let ue;
|
|
409
|
+
e[59] !== He || e[60] !== re || e[61] !== s || e[62] !== G || e[63] !== q || e[64] !== C || e[65] !== mt || e[66] !== a || e[67] !== x || e[68] !== dt || e[69] !== ot || e[70] !== P || e[71] !== p || e[72] !== B || e[73] !== _ || e[74] !== ce || e[75] !== Ce || e[76] !== V || e[77] !== z || e[78] !== g?.mapBorderColor || e[79] !== g?.mapBorderWidth || e[80] !== Oe || e[81] !== R || e[82] !== de || e[83] !== y || e[84] !== K || e[85] !== ie || e[86] !== X || e[87] !== gt || e[88] !== pt || e[89] !== f || e[90] !== Se || e[91] !== ht || e[92] !== ke || e[93] !== M || e[94] !== r || e[95] !== Ne || e[96] !== u || e[97] !== Be || e[98] !== ee || e[99] !== n || e[100] !== l.dateFormat || e[101] !== l.enabled || e[102] !== ye || e[103] !== d || e[104] !== h || e[105] !== ut || e[106] !== Ee || e[107] !== Me || e[108] !== E ? (ue = /* @__PURE__ */ t.jsx(fo, { ref: yt, children: ee && Be && de ? /* @__PURE__ */ t.jsx(yo, { data: a.filter((c) => l.enabled ? `${c.date}` === Lt(new Date(d[_]), l.dateFormat || "yyyy") : c), mapData: r ? de : {
|
|
410
|
+
...de,
|
|
411
|
+
features: de.features.filter(vo)
|
|
412
|
+
}, colorDomain: ot, width: ee, height: Be, scale: ke, centerPoint: re, colors: C || (M === "categorical" ? ct[n].categoricalColors.colors : ct[n].sequentialColors[`neutralColorsx0${ot.length + 1}`]), colorLegendTitle: q, mapBorderWidth: V, mapNoDataColor: z, categorical: M === "categorical", mapBorderColor: Ce, tooltip: ye, onSeriesMouseOver: X, isWorldMap: ce, showColorScale: Ne, zoomScaleExtend: Me, zoomTranslateExtend: E, onSeriesMouseClick: ie, mapProperty: R, highlightedIds: B, resetSelectionOnDoubleClick: Se, styles: u, overlayMapData: gt, overlayMapBorderColor: g?.mapBorderColor, overlayMapBorderWidth: g?.mapBorderWidth, classNames: s, detailsOnClick: x, mapProjection: Oe || (ce ? "naturalEarth" : "mercator"), zoomInteraction: Ee, dimmedOpacity: dt, animate: He === !0 ? {
|
|
410
413
|
duration: 0.5,
|
|
411
414
|
once: !0,
|
|
412
415
|
amount: 0.5
|
|
413
|
-
} :
|
|
416
|
+
} : He || {
|
|
414
417
|
duration: 0,
|
|
415
418
|
once: !0,
|
|
416
419
|
amount: 0
|
|
417
|
-
}, customLayers: mt, zoomAndCenterByHighlightedIds: ut, collapseColorScaleByDefault:
|
|
418
|
-
height: `${Math.max(
|
|
419
|
-
}, className: "flex items-center justify-center", children: /* @__PURE__ */ t.jsx(
|
|
420
|
-
let
|
|
421
|
-
e[
|
|
420
|
+
}, customLayers: mt, zoomAndCenterByHighlightedIds: ut, collapseColorScaleByDefault: G, projectionRotate: pt, rewindCoordinatesInMapData: ht, numberDisplayOptions: K, graphDownload: P ? vt : void 0 }) : /* @__PURE__ */ t.jsx("div", { style: {
|
|
421
|
+
height: `${Math.max(y, p || (f ? y ? (h || ee) * f > y ? (h || ee) * f : y : (h || ee) * f : Be))}px`
|
|
422
|
+
}, className: "flex items-center justify-center", children: /* @__PURE__ */ t.jsx(Ft, { "aria-label": "Loading graph" }) }) }), e[59] = He, e[60] = re, e[61] = s, e[62] = G, e[63] = q, e[64] = C, e[65] = mt, e[66] = a, e[67] = x, e[68] = dt, e[69] = ot, e[70] = P, e[71] = p, e[72] = B, e[73] = _, e[74] = ce, e[75] = Ce, e[76] = V, e[77] = z, e[78] = g?.mapBorderColor, e[79] = g?.mapBorderWidth, e[80] = Oe, e[81] = R, e[82] = de, e[83] = y, e[84] = K, e[85] = ie, e[86] = X, e[87] = gt, e[88] = pt, e[89] = f, e[90] = Se, e[91] = ht, e[92] = ke, e[93] = M, e[94] = r, e[95] = Ne, e[96] = u, e[97] = Be, e[98] = ee, e[99] = n, e[100] = l.dateFormat, e[101] = l.enabled, e[102] = ye, e[103] = d, e[104] = h, e[105] = ut, e[106] = Ee, e[107] = Me, e[108] = E, e[109] = ue) : ue = e[109];
|
|
423
|
+
let he;
|
|
424
|
+
e[110] !== s?.footnote || e[111] !== s?.source || e[112] !== Q || e[113] !== F || e[114] !== u?.footnote || e[115] !== u?.source || e[116] !== h ? (he = F || Q ? /* @__PURE__ */ t.jsx(mo, { styles: {
|
|
425
|
+
footnote: u?.footnote,
|
|
426
|
+
source: u?.source
|
|
427
|
+
}, classNames: {
|
|
422
428
|
footnote: s?.footnote,
|
|
423
429
|
source: s?.source
|
|
424
|
-
},
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
let it;
|
|
429
|
-
return e[117] !== je || e[118] !== Ne || e[119] !== C || e[120] !== u || e[121] !== N || e[122] !== a || e[123] !== ye || e[124] !== g || e[125] !== jt || e[126] !== kt || e[127] !== pe || e[128] !== ue || e[129] !== he || e[130] !== fe || e[131] !== z || e[132] !== f ? (it = /* @__PURE__ */ t.jsxs(go, { className: jt, style: kt, id: C, ref: wt, "aria-label": je, backgroundColor: Ne, theme: z, language: N, minHeight: a, width: f, height: u, relativeHeight: g, padding: ye, children: [
|
|
430
|
+
}, sources: F, footNote: Q, width: h }) : null, e[110] = s?.footnote, e[111] = s?.source, e[112] = Q, e[113] = F, e[114] = u?.footnote, e[115] = u?.source, e[116] = h, e[117] = he) : he = e[117];
|
|
431
|
+
let st;
|
|
432
|
+
return e[118] !== J || e[119] !== we || e[120] !== N || e[121] !== p || e[122] !== D || e[123] !== y || e[124] !== ge || e[125] !== f || e[126] !== Dt || e[127] !== jt || e[128] !== me || e[129] !== pe || e[130] !== ue || e[131] !== he || e[132] !== n || e[133] !== h ? (st = /* @__PURE__ */ t.jsxs(go, { className: Dt, style: jt, id: N, ref: vt, "aria-label": J, backgroundColor: we, theme: n, language: D, minHeight: y, width: h, height: p, relativeHeight: f, padding: ge, children: [
|
|
433
|
+
me,
|
|
430
434
|
pe,
|
|
431
435
|
ue,
|
|
432
|
-
he
|
|
433
|
-
|
|
434
|
-
] }), e[117] = je, e[118] = Ne, e[119] = C, e[120] = u, e[121] = N, e[122] = a, e[123] = ye, e[124] = g, e[125] = jt, e[126] = kt, e[127] = pe, e[128] = ue, e[129] = he, e[130] = fe, e[131] = z, e[132] = f, e[133] = it) : it = e[133], it;
|
|
436
|
+
he
|
|
437
|
+
] }), e[118] = J, e[119] = we, e[120] = N, e[121] = p, e[122] = D, e[123] = y, e[124] = ge, e[125] = f, e[126] = Dt, e[127] = jt, e[128] = me, e[129] = pe, e[130] = ue, e[131] = he, e[132] = n, e[133] = h, e[134] = st) : st = e[134], st;
|
|
435
438
|
}
|
|
436
|
-
function vo(
|
|
437
|
-
return
|
|
439
|
+
function vo(m) {
|
|
440
|
+
return m.properties?.NAME !== "Antarctica";
|
|
438
441
|
}
|
|
439
|
-
function xo(
|
|
440
|
-
return
|
|
442
|
+
function xo(m) {
|
|
443
|
+
return m !== void 0;
|
|
441
444
|
}
|
|
442
|
-
function bo(
|
|
443
|
-
return
|
|
445
|
+
function bo(m) {
|
|
446
|
+
return m !== void 0;
|
|
444
447
|
}
|
|
445
|
-
function
|
|
446
|
-
return
|
|
448
|
+
function Do(m) {
|
|
449
|
+
return m.data;
|
|
447
450
|
}
|
|
448
|
-
function
|
|
449
|
-
return
|
|
451
|
+
function jo(m) {
|
|
452
|
+
return m !== void 0;
|
|
450
453
|
}
|
|
451
|
-
function
|
|
452
|
-
return
|
|
454
|
+
function ko(m) {
|
|
455
|
+
return m.data;
|
|
453
456
|
}
|
|
454
|
-
function wo(
|
|
455
|
-
return
|
|
457
|
+
function wo(m) {
|
|
458
|
+
return m.x;
|
|
456
459
|
}
|
|
457
|
-
function Co(
|
|
458
|
-
return
|
|
460
|
+
function Co(m, e) {
|
|
461
|
+
return m - e;
|
|
459
462
|
}
|
|
460
|
-
function No(
|
|
461
|
-
return
|
|
463
|
+
function No(m) {
|
|
464
|
+
return m.date;
|
|
462
465
|
}
|
|
463
466
|
export {
|
|
464
|
-
|
|
467
|
+
tr as ChoroplethMap
|
|
465
468
|
};
|
|
466
469
|
//# sourceMappingURL=ChoroplethMap.js.map
|