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