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