@undp/data-viz 2.0.9 → 2.1.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.d.ts +2 -0
- package/dist/AreaChart.js +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.d.ts +2 -0
- package/dist/BarGraph.js +1188 -1213
- package/dist/BarGraph.js.map +1 -1
- package/dist/BasicStatCard.d.ts +2 -0
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.d.ts +2 -0
- package/dist/BeeSwarmChart.js +258 -267
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.d.ts +2 -0
- package/dist/BiVariateChoroplethMap.js +126 -131
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.d.ts +2 -0
- package/dist/BulletChart.js +404 -413
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.d.ts +2 -0
- package/dist/ButterflyChart.js +179 -184
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.d.ts +2 -0
- package/dist/ChoroplethMap.js +268 -273
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.d.ts +2 -0
- package/dist/CirclePackingGraph.js +1 -1
- package/dist/DataCards.d.ts +2 -0
- package/dist/DataCards.js +1 -1
- package/dist/DataTable.d.ts +2 -0
- package/dist/DetailsModal-0Ry5nXiC.js +32 -0
- package/dist/DetailsModal-0Ry5nXiC.js.map +1 -0
- package/dist/DetailsModal-BN0HDFlV.cjs +2 -0
- package/dist/DetailsModal-BN0HDFlV.cjs.map +1 -0
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.d.ts +2 -0
- package/dist/DifferenceLineChart.js +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.d.ts +2 -0
- package/dist/DonutChart.js +185 -190
- 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 +2 -0
- package/dist/DotDensityMap.js +198 -203
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.d.ts +2 -0
- package/dist/DualAxisLineChart.js +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.d.ts +2 -0
- package/dist/DumbbellChart.js +364 -373
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/GeoHubCompareMaps.d.ts +2 -0
- package/dist/GeoHubMap.d.ts +2 -0
- package/dist/GeoHubMapWithLayerSelection.d.ts +2 -0
- package/dist/{GraphEl-BcKU0bG1.cjs → GraphEl-B16EYkko.cjs} +2 -2
- package/dist/{GraphEl-BcKU0bG1.cjs.map → GraphEl-B16EYkko.cjs.map} +1 -1
- package/dist/{GraphEl-CGq1EWRn.js → GraphEl-ebgfxefq.js} +3 -3
- package/dist/{GraphEl-CGq1EWRn.js.map → GraphEl-ebgfxefq.js.map} +1 -1
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.cjs.map +1 -1
- package/dist/GriddedGraphs.d.ts +2 -0
- package/dist/GriddedGraphs.js +19 -19
- package/dist/GriddedGraphs.js.map +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +2 -0
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.cjs.map +1 -1
- package/dist/HeatMap.d.ts +2 -0
- package/dist/HeatMap.js +111 -116
- package/dist/HeatMap.js.map +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.d.ts +2 -0
- package/dist/Histogram.js +1 -1
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.d.ts +2 -0
- package/dist/HybridMap.js +202 -207
- package/dist/HybridMap.js.map +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.d.ts +2 -0
- package/dist/LineChartWithConfidenceInterval.js +1 -1
- package/dist/{Modal-DGcuAHyK.js → Modal-bMQA6bL_.js} +5 -5
- package/dist/{Modal-DGcuAHyK.js.map → Modal-bMQA6bL_.js.map} +1 -1
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.cjs.map +1 -1
- package/dist/MultiGraphDashboard.d.ts +2 -0
- package/dist/MultiGraphDashboard.js +10 -10
- package/dist/MultiGraphDashboard.js.map +1 -1
- package/dist/MultiGraphDashboardFromConfig.d.ts +2 -0
- package/dist/MultiGraphDashboardWideToLongFormat.d.ts +2 -0
- package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +2 -0
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.d.ts +2 -0
- package/dist/MultiLineAltChart.js +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.d.ts +2 -0
- package/dist/MultiLineChart.js +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.cjs.map +1 -1
- package/dist/ParetoChart.d.ts +2 -0
- package/dist/ParetoChart.js +187 -192
- package/dist/ParetoChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +2 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +16 -16
- package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +2 -0
- package/dist/PerformanceIntensiveScrollStory.d.ts +2 -0
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.cjs.map +1 -1
- package/dist/RadarChart.d.ts +2 -0
- package/dist/RadarChart.js +158 -163
- 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 +2 -0
- package/dist/SankeyChart.js +172 -177
- 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 +2 -0
- package/dist/ScatterPlot.js +222 -227
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/ScrollStory.d.ts +2 -0
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.d.ts +2 -0
- package/dist/SimpleLineChart.js +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.cjs.map +1 -1
- package/dist/SingleGraphDashboard.d.ts +2 -0
- package/dist/SingleGraphDashboard.js +24 -24
- package/dist/SingleGraphDashboard.js.map +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +2 -0
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +2 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +2 -0
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +2 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js +46 -46
- package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +2 -0
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.cjs.map +1 -1
- package/dist/SlopeChart.d.ts +2 -0
- package/dist/SlopeChart.js +182 -187
- package/dist/SlopeChart.js.map +1 -1
- package/dist/SparkLine.cjs +1 -1
- package/dist/SparkLine.d.ts +2 -0
- package/dist/SparkLine.js +1 -1
- package/dist/StatCardFromData.d.ts +2 -0
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.d.ts +2 -0
- package/dist/StripChart.js +249 -258
- 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 +2 -0
- package/dist/ThreeDGlobe.js +142 -147
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/Tooltip-Dj5eVppQ.js +45 -0
- package/dist/Tooltip-Dj5eVppQ.js.map +1 -0
- package/dist/Tooltip-uUdw6wJL.cjs +2 -0
- package/dist/Tooltip-uUdw6wJL.cjs.map +1 -0
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.cjs.map +1 -1
- package/dist/TreeMapGraph.d.ts +2 -0
- package/dist/TreeMapGraph.js +159 -164
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/Types.d.ts +2 -0
- package/dist/UnitChart.d.ts +2 -0
- package/dist/{checkIfMultiple-Y9iKaV_u.js → checkIfMultiple-CIRtG0KE.js} +2 -2
- package/dist/{checkIfMultiple-Y9iKaV_u.js.map → checkIfMultiple-CIRtG0KE.js.map} +1 -1
- package/dist/index-BBV4tAeA.js +330 -0
- package/dist/index-BBV4tAeA.js.map +1 -0
- package/dist/index-CF5hnGvG.cjs +2 -0
- package/dist/index-CF5hnGvG.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/Tooltip-4dJo4_AF.cjs +0 -2
- package/dist/Tooltip-4dJo4_AF.cjs.map +0 -1
- package/dist/Tooltip-CwWUegPB.js +0 -43
- package/dist/Tooltip-CwWUegPB.js.map +0 -1
- package/dist/index-B2LQV7Tk.js +0 -335
- package/dist/index-B2LQV7Tk.js.map +0 -1
- package/dist/index-xRHRLDIp.cjs +0 -2
- package/dist/index-xRHRLDIp.cjs.map +0 -1
package/dist/HybridMap.js
CHANGED
|
@@ -1,42 +1,41 @@
|
|
|
1
|
-
import { _ as Ie, m as Ce, b as Ne, j as r, c as
|
|
2
|
-
import * as
|
|
3
|
-
import Pe, { useState as
|
|
1
|
+
import { _ as Ie, m as Ce, b as Ne, j as r, c as ze } from "./index-CHPV5EwG-Curnpaqc.js";
|
|
2
|
+
import * as Le from "react";
|
|
3
|
+
import Pe, { useState as I, useRef as Ft, useEffect as ae, useEffectEvent as _e } from "react";
|
|
4
4
|
import { p as Be, f as Ve } from "./parse-DlCRUFh_.js";
|
|
5
|
-
import { g as
|
|
5
|
+
import { g as We, N as Te } from "./getSliderMarks-HIDJ0_Cd.js";
|
|
6
6
|
import { w as Ae } from "./Spinner-D7rnnwnA.js";
|
|
7
7
|
import { i as we } from "./index-Bwrro8-q.js";
|
|
8
|
-
import { z as Fe, t as
|
|
9
|
-
import { l as Ye } from "./Modal-DGcuAHyK.js";
|
|
8
|
+
import { z as Fe, t as Re, g as qe, a as Ge, b as He, c as Ue, d as Xe } from "./zoom-C9MFjAaV.js";
|
|
10
9
|
import { j as xe } from "./Typography-PxtFcnJb.js";
|
|
11
|
-
import { t as
|
|
10
|
+
import { t as Ye } from "./index-GEsywGxz.js";
|
|
12
11
|
import { n as ke } from "./Source-DwTHB8fn.js";
|
|
13
|
-
import { w as
|
|
14
|
-
import { T as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { s as
|
|
18
|
-
import { o as
|
|
19
|
-
import { t as
|
|
12
|
+
import { w as Je } from "./index-Dzc_aaI9-Bb7gobH_.js";
|
|
13
|
+
import { T as Ke } from "./Tooltip-Dj5eVppQ.js";
|
|
14
|
+
import { X as Ze, P as Qe, e as to } from "./index-D491FEn1.js";
|
|
15
|
+
import { D as eo } from "./DetailsModal-0Ry5nXiC.js";
|
|
16
|
+
import { s as oo } from "./pow-DE4c7dbW.js";
|
|
17
|
+
import { o as ro } from "./ordinal-P77xw8aL.js";
|
|
18
|
+
import { t as ao } from "./threshold-Bgr20hik.js";
|
|
20
19
|
import { s as ve } from "./select-DKy99ogv.js";
|
|
21
20
|
import { c as ie } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
22
|
-
import { n as
|
|
23
|
-
import { u as
|
|
24
|
-
import { m as
|
|
25
|
-
import { A as
|
|
26
|
-
import { GraphFooter as
|
|
27
|
-
import { GraphHeader as
|
|
21
|
+
import { n as io } from "./numberFormattingFunction-14YCbkN2.js";
|
|
22
|
+
import { u as no } from "./use-in-view-Cxa7y1TH.js";
|
|
23
|
+
import { m as ht } from "./proxy-BxkFHwUw.js";
|
|
24
|
+
import { A as lo } from "./index-BqfRwk1n.js";
|
|
25
|
+
import { GraphFooter as so } from "./GraphFooter.js";
|
|
26
|
+
import { GraphHeader as co } from "./GraphHeader.js";
|
|
28
27
|
import { Colors as St } from "./Colors.js";
|
|
29
|
-
import { f as
|
|
30
|
-
import { u as
|
|
31
|
-
import { a as
|
|
32
|
-
import { s as
|
|
33
|
-
import { g as
|
|
34
|
-
import { g as
|
|
35
|
-
import { a as
|
|
36
|
-
var
|
|
37
|
-
const { decorative: e, orientation: p = je, ...v } = i, n =
|
|
28
|
+
import { f as mo } from "./fetchAndParseData-BpqkBPQL.js";
|
|
29
|
+
import { u as po } from "./uniqBy-BHy4I8PK.js";
|
|
30
|
+
import { a as uo, G as ho } from "./GraphContainer-CRqzdKu2.js";
|
|
31
|
+
import { s as go } from "./sort-BIvMlUH1.js";
|
|
32
|
+
import { g as fo } from "./getUniqValue-DsqSii6M.js";
|
|
33
|
+
import { g as yo } from "./getJenks-BbngDoBQ.js";
|
|
34
|
+
import { a as xo } from "./init-BJFW6EwE.js";
|
|
35
|
+
var vo = "Separator", je = "horizontal", bo = ["horizontal", "vertical"], De = Le.forwardRef((i, t) => {
|
|
36
|
+
const { decorative: e, orientation: p = je, ...v } = i, n = wo(p) ? p : je, b = e ? { role: "none" } : { "aria-orientation": n === "vertical" ? n : void 0, role: "separator" };
|
|
38
37
|
return /* @__PURE__ */ Ne.jsx(
|
|
39
|
-
|
|
38
|
+
Je.div,
|
|
40
39
|
{
|
|
41
40
|
"data-orientation": n,
|
|
42
41
|
...b,
|
|
@@ -45,9 +44,9 @@ var bo = "Separator", je = "horizontal", wo = ["horizontal", "vertical"], De = z
|
|
|
45
44
|
}
|
|
46
45
|
);
|
|
47
46
|
});
|
|
48
|
-
De.displayName =
|
|
49
|
-
function
|
|
50
|
-
return
|
|
47
|
+
De.displayName = vo;
|
|
48
|
+
function wo(i) {
|
|
49
|
+
return bo.includes(i);
|
|
51
50
|
}
|
|
52
51
|
var $e = De;
|
|
53
52
|
const Se = Pe.forwardRef((i, t) => {
|
|
@@ -66,7 +65,7 @@ const Se = Pe.forwardRef((i, t) => {
|
|
|
66
65
|
return e[9] !== c || e[10] !== v || e[11] !== t || e[12] !== N ? (z = /* @__PURE__ */ Ne.jsx($e, { ...v, ref: t, orientation: c, className: N }), e[9] = c, e[10] = v, e[11] = t, e[12] = N, e[13] = z) : z = e[13], z;
|
|
67
66
|
});
|
|
68
67
|
Se.displayName = $e.displayName;
|
|
69
|
-
function
|
|
68
|
+
function ko(i) {
|
|
70
69
|
const {
|
|
71
70
|
data: t,
|
|
72
71
|
colors: e,
|
|
@@ -80,73 +79,73 @@ function jo(i) {
|
|
|
80
79
|
centerPoint: S,
|
|
81
80
|
tooltip: N,
|
|
82
81
|
showLabels: z,
|
|
83
|
-
mapBorderWidth:
|
|
84
|
-
mapBorderColor:
|
|
85
|
-
mapNoDataColor:
|
|
86
|
-
onSeriesMouseOver:
|
|
82
|
+
mapBorderWidth: Q,
|
|
83
|
+
mapBorderColor: tt,
|
|
84
|
+
mapNoDataColor: gt,
|
|
85
|
+
onSeriesMouseOver: X,
|
|
87
86
|
showColorScale: Mt,
|
|
88
|
-
zoomScaleExtend:
|
|
89
|
-
zoomTranslateExtend:
|
|
87
|
+
zoomScaleExtend: Rt,
|
|
88
|
+
zoomTranslateExtend: qt,
|
|
90
89
|
highlightedDataPoints: Ot,
|
|
91
|
-
onSeriesMouseClick:
|
|
90
|
+
onSeriesMouseClick: T,
|
|
92
91
|
resetSelectionOnDoubleClick: Et,
|
|
93
|
-
detailsOnClick:
|
|
94
|
-
styles:
|
|
95
|
-
classNames:
|
|
92
|
+
detailsOnClick: Y,
|
|
93
|
+
styles: O,
|
|
94
|
+
classNames: et,
|
|
96
95
|
mapProjection: ot,
|
|
97
|
-
zoomInteraction:
|
|
96
|
+
zoomInteraction: J,
|
|
98
97
|
animate: g,
|
|
99
|
-
dimmedOpacity:
|
|
98
|
+
dimmedOpacity: A,
|
|
100
99
|
customLayers: ft,
|
|
101
100
|
maxRadiusValue: yt,
|
|
102
101
|
categorical: rt,
|
|
103
|
-
dotColor:
|
|
102
|
+
dotColor: K,
|
|
104
103
|
collapseColorScaleByDefault: It,
|
|
105
104
|
highlightedIds: at,
|
|
106
105
|
mapProperty: xt,
|
|
107
106
|
dotLegendTitle: vt,
|
|
108
|
-
dotBorderColor:
|
|
109
|
-
labelColor:
|
|
110
|
-
} = i, [
|
|
107
|
+
dotBorderColor: zt,
|
|
108
|
+
labelColor: Lt
|
|
109
|
+
} = i, [L, P] = I(void 0), [y, f] = I(It === void 0 ? !(c < 680) : !It), it = Ft(null), [nt, Z] = I(void 0), [Pt, E] = I(void 0), [lt, F] = I(void 0), [bt, R] = I(void 0), _ = Ft(null), q = no(_, {
|
|
111
110
|
once: g.once,
|
|
112
111
|
amount: g.amount
|
|
113
|
-
}), wt = Ft(null),
|
|
112
|
+
}), wt = Ft(null), B = t.filter((o) => o.radius === void 0 || o.radius === null).length !== t.length ? oo().domain([0, yt]).range([0.25, b]).nice() : void 0, Gt = rt ? ro().domain(n).range(e) : ao().domain(n).range(e);
|
|
114
113
|
ae(() => {
|
|
115
|
-
const o = ve(wt.current), a = ve(
|
|
116
|
-
if (
|
|
117
|
-
if (
|
|
114
|
+
const o = ve(wt.current), a = ve(_.current), M = (d) => {
|
|
115
|
+
if (J === "noZoom") return !1;
|
|
116
|
+
if (J === "button") return !d.type.includes("wheel");
|
|
118
117
|
const s = d.type === "wheel", k = d.type.startsWith("touch"), m = d.type === "mousedown" || d.type === "mousemove";
|
|
119
|
-
return k ? !0 : s ?
|
|
120
|
-
}, l = Fe().scaleExtent(
|
|
118
|
+
return k ? !0 : s ? J === "scroll" ? !0 : d.ctrlKey : m && !d.button && !d.ctrlKey;
|
|
119
|
+
}, l = Fe().scaleExtent(Rt).translateExtent(qt || [[-20, -20], [c + 20, w + 20]]).filter(M).on("zoom", ({
|
|
121
120
|
transform: d
|
|
122
121
|
}) => {
|
|
123
122
|
o.attr("transform", d);
|
|
124
123
|
});
|
|
125
124
|
a.call(l), it.current = l;
|
|
126
|
-
}, [w, c,
|
|
127
|
-
const D =
|
|
128
|
-
if (!
|
|
129
|
-
ve(
|
|
125
|
+
}, [w, c, J]);
|
|
126
|
+
const D = Re(p), V = Ye(p), G = D[2] - D[0], _t = D[3] - D[1], Bt = c * 190 / 960 * 360 / G, Vt = w * 190 / 678 * 180 / _t, H = u * Math.min(Bt, Vt), W = ot === "mercator" ? qe().rotate([0, 0]).center(S || V.geometry.coordinates).translate([c / 2, w / 2]).scale(H) : ot === "equalEarth" ? Ge().rotate([0, 0]).center(S || V.geometry.coordinates).translate([c / 2, w / 2]).scale(H) : ot === "naturalEarth" ? He().rotate([0, 0]).center(S || V.geometry.coordinates).translate([c / 2, w / 2]).scale(H) : ot === "orthographic" ? Ue().rotate([0, 0]).center(S || V.geometry.coordinates).translate([c / 2, w / 2]).scale(H) : Xe().rotate([0, 0]).center(S || V.geometry.coordinates).translate([c / 2, w / 2]).scale(H), kt = (o) => {
|
|
127
|
+
if (!_.current || !it.current) return;
|
|
128
|
+
ve(_.current).call(it.current.scaleBy, o === "in" ? 1.2 : 1 / 1.2);
|
|
130
129
|
};
|
|
131
130
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
132
131
|
/* @__PURE__ */ r.jsxs("div", { className: "relative", children: [
|
|
133
|
-
/* @__PURE__ */ r.jsx(
|
|
132
|
+
/* @__PURE__ */ r.jsx(ht.svg, { width: `${c}px`, height: `${w}px`, viewBox: `0 0 ${c} ${w}`, ref: _, direction: "ltr", children: /* @__PURE__ */ r.jsxs("g", { ref: wt, children: [
|
|
134
133
|
ft.filter((o) => o.position === "before").map((o) => o.layer),
|
|
135
134
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
136
|
-
p.features.map((o, a) => t.findIndex((l) => l.id === o.properties[xt]) !== -1 ? null : /* @__PURE__ */ r.jsx("g", { opacity:
|
|
135
|
+
p.features.map((o, a) => t.findIndex((l) => l.id === o.properties[xt]) !== -1 ? null : /* @__PURE__ */ r.jsx("g", { opacity: L ? A : at.length !== 0 ? at.indexOf(o.properties[xt]) !== -1 ? 1 : A : 1, children: o.geometry.type === "MultiPolygon" ? (
|
|
137
136
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
138
137
|
o.geometry.coordinates.map((l, d) => {
|
|
139
138
|
let s = "";
|
|
140
139
|
return l.forEach((k) => {
|
|
141
140
|
let m = " M";
|
|
142
|
-
k.forEach((h,
|
|
141
|
+
k.forEach((h, st) => {
|
|
143
142
|
const $ = W([h[0], h[1]]);
|
|
144
|
-
|
|
143
|
+
st !== k.length - 1 ? m = `${m}${$[0]} ${$[1]}L` : m = `${m}${$[0]} ${$[1]}`;
|
|
145
144
|
}), s += m;
|
|
146
145
|
}), /* @__PURE__ */ r.jsx("path", { d: s, style: {
|
|
147
|
-
stroke:
|
|
148
|
-
strokeWidth:
|
|
149
|
-
fill:
|
|
146
|
+
stroke: tt,
|
|
147
|
+
strokeWidth: Q,
|
|
148
|
+
fill: gt
|
|
150
149
|
} }, d);
|
|
151
150
|
})
|
|
152
151
|
) : (
|
|
@@ -157,55 +156,55 @@ function jo(i) {
|
|
|
157
156
|
const h = W([k[0], k[1]]);
|
|
158
157
|
m !== l.length - 1 ? s = `${s}${h[0]} ${h[1]}L` : s = `${s}${h[0]} ${h[1]}`;
|
|
159
158
|
}), /* @__PURE__ */ r.jsx("path", { d: s, style: {
|
|
160
|
-
stroke:
|
|
161
|
-
strokeWidth:
|
|
162
|
-
fill:
|
|
159
|
+
stroke: tt,
|
|
160
|
+
strokeWidth: Q,
|
|
161
|
+
fill: gt
|
|
163
162
|
} }, d);
|
|
164
163
|
})
|
|
165
164
|
) }, a)),
|
|
166
|
-
/* @__PURE__ */ r.jsxs(
|
|
165
|
+
/* @__PURE__ */ r.jsxs(lo, { children: [
|
|
167
166
|
t.filter((o) => o.id).map((o) => {
|
|
168
167
|
const a = p.features.findIndex(
|
|
169
168
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
170
169
|
(l) => o.id === l.properties[xt]
|
|
171
|
-
), M = ie(o.x) ?
|
|
170
|
+
), M = ie(o.x) ? gt : (
|
|
172
171
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
173
|
-
|
|
172
|
+
Gt(o.x)
|
|
174
173
|
);
|
|
175
|
-
return /* @__PURE__ */ r.jsx(
|
|
174
|
+
return /* @__PURE__ */ r.jsx(ht.g, { variants: {
|
|
176
175
|
initial: {
|
|
177
176
|
opacity: 0
|
|
178
177
|
},
|
|
179
178
|
whileInView: {
|
|
180
|
-
opacity:
|
|
179
|
+
opacity: L ? L === M ? 1 : A : at.length !== 0 ? at.indexOf(o.id) !== -1 ? 1 : A : 1,
|
|
181
180
|
transition: {
|
|
182
181
|
duration: g.duration
|
|
183
182
|
}
|
|
184
183
|
}
|
|
185
|
-
}, initial: "initial", animate:
|
|
184
|
+
}, initial: "initial", animate: q ? "whileInView" : "initial", exit: {
|
|
186
185
|
opacity: 0,
|
|
187
186
|
transition: {
|
|
188
187
|
duration: g.duration
|
|
189
188
|
}
|
|
190
189
|
}, onMouseEnter: (l) => {
|
|
191
|
-
|
|
190
|
+
E(o), R(l.clientY), F(l.clientX), X?.(o);
|
|
192
191
|
}, onMouseMove: (l) => {
|
|
193
|
-
|
|
192
|
+
E(o), R(l.clientY), F(l.clientX);
|
|
194
193
|
}, onMouseLeave: () => {
|
|
195
|
-
|
|
194
|
+
E(void 0), F(void 0), R(void 0), X?.(void 0);
|
|
196
195
|
}, onClick: () => {
|
|
197
|
-
(
|
|
196
|
+
(T || Y) && (we(nt, o) && Et ? (Z(void 0), T?.(void 0)) : (Z(o), T?.(o)));
|
|
198
197
|
}, children: a === -1 ? null : p.features[a].geometry.type === "MultiPolygon" ? p.features[a].geometry.coordinates.map(
|
|
199
198
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
200
199
|
(l, d) => {
|
|
201
200
|
let s = "";
|
|
202
201
|
return l.forEach((k) => {
|
|
203
202
|
let m = " M";
|
|
204
|
-
k.forEach((h,
|
|
203
|
+
k.forEach((h, st) => {
|
|
205
204
|
const $ = W([h[0], h[1]]);
|
|
206
|
-
|
|
205
|
+
st !== k.length - 1 ? m = `${m}${$[0]} ${$[1]}L` : m = `${m}${$[0]} ${$[1]}`;
|
|
207
206
|
}), s += m;
|
|
208
|
-
}), /* @__PURE__ */ r.jsx(
|
|
207
|
+
}), /* @__PURE__ */ r.jsx(ht.path, { d: s, variants: {
|
|
209
208
|
initial: {
|
|
210
209
|
fill: M,
|
|
211
210
|
opacity: 0
|
|
@@ -217,14 +216,14 @@ function jo(i) {
|
|
|
217
216
|
duration: g.duration
|
|
218
217
|
}
|
|
219
218
|
}
|
|
220
|
-
}, initial: "initial", animate:
|
|
219
|
+
}, initial: "initial", animate: q ? "whileInView" : "initial", exit: {
|
|
221
220
|
opacity: 0,
|
|
222
221
|
transition: {
|
|
223
222
|
duration: g.duration
|
|
224
223
|
}
|
|
225
224
|
}, style: {
|
|
226
|
-
stroke:
|
|
227
|
-
strokeWidth:
|
|
225
|
+
stroke: tt,
|
|
226
|
+
strokeWidth: Q
|
|
228
227
|
} }, `${o.id}-${d}`);
|
|
229
228
|
}
|
|
230
229
|
) : p.features[a].geometry.coordinates.map(
|
|
@@ -234,7 +233,7 @@ function jo(i) {
|
|
|
234
233
|
return l.forEach((k, m) => {
|
|
235
234
|
const h = W([k[0], k[1]]);
|
|
236
235
|
m !== l.length - 1 ? s = `${s}${h[0]} ${h[1]}L` : s = `${s}${h[0]} ${h[1]}`;
|
|
237
|
-
}), /* @__PURE__ */ r.jsx(
|
|
236
|
+
}), /* @__PURE__ */ r.jsx(ht.path, { d: s, variants: {
|
|
238
237
|
initial: {
|
|
239
238
|
fill: M,
|
|
240
239
|
opacity: 0
|
|
@@ -246,57 +245,57 @@ function jo(i) {
|
|
|
246
245
|
duration: g.duration
|
|
247
246
|
}
|
|
248
247
|
}
|
|
249
|
-
}, initial: "initial", animate:
|
|
248
|
+
}, initial: "initial", animate: q ? "whileInView" : "initial", exit: {
|
|
250
249
|
opacity: 0,
|
|
251
250
|
transition: {
|
|
252
251
|
duration: g.duration
|
|
253
252
|
}
|
|
254
253
|
}, style: {
|
|
255
|
-
stroke:
|
|
256
|
-
strokeWidth:
|
|
254
|
+
stroke: tt,
|
|
255
|
+
strokeWidth: Q
|
|
257
256
|
} }, `${o.id}-${d}`);
|
|
258
257
|
}
|
|
259
258
|
) }, o.id);
|
|
260
259
|
}),
|
|
261
|
-
t.filter((o) => !ie(o.lat) && !ie(o.long)).map((o) => /* @__PURE__ */ r.jsxs(
|
|
260
|
+
t.filter((o) => !ie(o.lat) && !ie(o.long)).map((o) => /* @__PURE__ */ r.jsxs(ht.g, { variants: {
|
|
262
261
|
initial: {
|
|
263
262
|
opacity: 0
|
|
264
263
|
},
|
|
265
264
|
whileInView: {
|
|
266
|
-
opacity: Ot.length !== 0 ? Ot.indexOf(o.label || "") !== -1 ? 1 :
|
|
265
|
+
opacity: Ot.length !== 0 ? Ot.indexOf(o.label || "") !== -1 ? 1 : A : 1,
|
|
267
266
|
transition: {
|
|
268
267
|
duration: g.duration
|
|
269
268
|
}
|
|
270
269
|
}
|
|
271
|
-
}, initial: "initial", animate:
|
|
270
|
+
}, initial: "initial", animate: q ? "whileInView" : "initial", exit: {
|
|
272
271
|
opacity: 0,
|
|
273
272
|
transition: {
|
|
274
273
|
duration: g.duration
|
|
275
274
|
}
|
|
276
275
|
}, onMouseEnter: (a) => {
|
|
277
|
-
|
|
276
|
+
E(o), R(a.clientY), F(a.clientX), X?.(o);
|
|
278
277
|
}, onMouseMove: (a) => {
|
|
279
|
-
|
|
278
|
+
E(o), R(a.clientY), F(a.clientX);
|
|
280
279
|
}, onMouseLeave: () => {
|
|
281
|
-
|
|
280
|
+
E(void 0), F(void 0), R(void 0), X?.(void 0);
|
|
282
281
|
}, onClick: () => {
|
|
283
|
-
(
|
|
282
|
+
(T || Y) && (we(nt, o) && Et ? (Z(void 0), T?.(void 0)) : (Z(o), T?.(o)));
|
|
284
283
|
}, transform: `translate(${W([o.long, o.lat])[0]},${W([o.long, o.lat])[1]})`, children: [
|
|
285
|
-
/* @__PURE__ */ r.jsx(
|
|
284
|
+
/* @__PURE__ */ r.jsx(ht.circle, { cx: 0, cy: 0, variants: {
|
|
286
285
|
initial: {
|
|
287
286
|
r: 0,
|
|
288
|
-
fill:
|
|
289
|
-
stroke:
|
|
287
|
+
fill: K,
|
|
288
|
+
stroke: zt || K
|
|
290
289
|
},
|
|
291
290
|
whileInView: {
|
|
292
|
-
r:
|
|
293
|
-
fill:
|
|
294
|
-
stroke:
|
|
291
|
+
r: B ? B(o.radius || 0) : b,
|
|
292
|
+
fill: K,
|
|
293
|
+
stroke: zt || K,
|
|
295
294
|
transition: {
|
|
296
295
|
duration: g.duration
|
|
297
296
|
}
|
|
298
297
|
}
|
|
299
|
-
}, initial: "initial", animate:
|
|
298
|
+
}, initial: "initial", animate: q ? "whileInView" : "initial", exit: {
|
|
300
299
|
r: 0,
|
|
301
300
|
transition: {
|
|
302
301
|
duration: g.duration
|
|
@@ -304,42 +303,42 @@ function jo(i) {
|
|
|
304
303
|
}, style: {
|
|
305
304
|
fillOpacity: 0.8
|
|
306
305
|
} }),
|
|
307
|
-
z && o.label ? /* @__PURE__ */ r.jsx(
|
|
306
|
+
z && o.label ? /* @__PURE__ */ r.jsx(ht.text, { variants: {
|
|
308
307
|
initial: {
|
|
309
308
|
opacity: 0,
|
|
310
|
-
x:
|
|
309
|
+
x: B ? B(o.radius || 0) : b
|
|
311
310
|
},
|
|
312
311
|
whileInView: {
|
|
313
312
|
opacity: 1,
|
|
314
|
-
x:
|
|
313
|
+
x: B ? B(o.radius || 0) : b,
|
|
315
314
|
transition: {
|
|
316
315
|
duration: g.duration
|
|
317
316
|
}
|
|
318
317
|
}
|
|
319
|
-
}, initial: "initial", animate:
|
|
318
|
+
}, initial: "initial", animate: q ? "whileInView" : "initial", exit: {
|
|
320
319
|
opacity: 0,
|
|
321
320
|
transition: {
|
|
322
321
|
duration: g.duration
|
|
323
322
|
}
|
|
324
323
|
}, y: 0, className: "text-sm", style: {
|
|
325
324
|
textAnchor: "start",
|
|
326
|
-
fill:
|
|
325
|
+
fill: Lt || "#000"
|
|
327
326
|
}, dx: 4, dy: 5, children: o.label }) : null
|
|
328
327
|
] }, o.label || `${o.lat}-${o.long}`))
|
|
329
328
|
] }),
|
|
330
329
|
ft.filter((o) => o.position === "after").map((o) => o.layer)
|
|
331
330
|
] }) }),
|
|
332
|
-
Mt === !1 ? null : /* @__PURE__ */ r.jsx("div", { className: Ce("absolute left-4 bottom-4 map-color-legend",
|
|
331
|
+
Mt === !1 ? null : /* @__PURE__ */ r.jsx("div", { className: Ce("absolute left-4 bottom-4 map-color-legend", et?.colorLegend), children: y ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
333
332
|
/* @__PURE__ */ r.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: () => {
|
|
334
333
|
f(!1);
|
|
335
|
-
}, children: /* @__PURE__ */ r.jsx(
|
|
334
|
+
}, children: /* @__PURE__ */ r.jsx(Ze, {}) }),
|
|
336
335
|
/* @__PURE__ */ r.jsxs("div", { className: "color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]", style: {
|
|
337
336
|
width: rt ? void 0 : "340px"
|
|
338
337
|
}, children: [
|
|
339
338
|
vt && vt !== "" ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
340
339
|
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
341
340
|
/* @__PURE__ */ r.jsx("div", { className: "w-3 h-3 rounded-full", style: {
|
|
342
|
-
backgroundColor:
|
|
341
|
+
backgroundColor: K
|
|
343
342
|
} }),
|
|
344
343
|
/* @__PURE__ */ r.jsx(xe, { size: "xs", marginBottom: "none", className: "p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300", style: {
|
|
345
344
|
display: "-webkit-box",
|
|
@@ -357,9 +356,9 @@ function jo(i) {
|
|
|
357
356
|
WebkitBoxOrient: "vertical"
|
|
358
357
|
}, children: v }) : null,
|
|
359
358
|
rt ? /* @__PURE__ */ r.jsx("div", { className: "flex flex-col gap-3", children: n.map((o, a) => /* @__PURE__ */ r.jsxs("div", { className: "flex gap-2 items-center", onMouseOver: () => {
|
|
360
|
-
|
|
359
|
+
P(e[a % e.length]);
|
|
361
360
|
}, onMouseLeave: () => {
|
|
362
|
-
|
|
361
|
+
P(void 0);
|
|
363
362
|
}, children: [
|
|
364
363
|
/* @__PURE__ */ r.jsx("div", { className: "w-2 h-2 rounded-full", style: {
|
|
365
364
|
backgroundColor: e[a % e.length]
|
|
@@ -367,27 +366,27 @@ function jo(i) {
|
|
|
367
366
|
/* @__PURE__ */ r.jsx(xe, { size: "sm", marginBottom: "none", leading: "none", children: o })
|
|
368
367
|
] }, a)) }) : /* @__PURE__ */ r.jsx("svg", { width: "100%", viewBox: "0 0 320 30", direction: "ltr", children: /* @__PURE__ */ r.jsxs("g", { children: [
|
|
369
368
|
n.map((o, a) => /* @__PURE__ */ r.jsxs("g", { onMouseOver: () => {
|
|
370
|
-
|
|
369
|
+
P(e[a]);
|
|
371
370
|
}, onMouseLeave: () => {
|
|
372
|
-
|
|
371
|
+
P(void 0);
|
|
373
372
|
}, className: "cursor-pointer", children: [
|
|
374
|
-
/* @__PURE__ */ r.jsx("rect", { x: a * 320 / e.length + 1, y: 1, width: 320 / e.length - 2, height: 8, className:
|
|
373
|
+
/* @__PURE__ */ r.jsx("rect", { x: a * 320 / e.length + 1, y: 1, width: 320 / e.length - 2, height: 8, className: L === e[a] ? "stroke-primary-gray-700 dark:stroke-primary-gray-300" : "", style: {
|
|
375
374
|
fill: e[a],
|
|
376
|
-
...
|
|
375
|
+
...L === e[a] ? {} : {
|
|
377
376
|
stroke: e[a]
|
|
378
377
|
}
|
|
379
378
|
} }),
|
|
380
379
|
/* @__PURE__ */ r.jsx("text", { x: (a + 1) * 320 / e.length, y: 25, className: "fill-primary-gray-700 dark:fill-primary-gray-300 text-xs", style: {
|
|
381
380
|
textAnchor: "middle"
|
|
382
|
-
}, children:
|
|
381
|
+
}, children: io(o, "NA") })
|
|
383
382
|
] }, a)),
|
|
384
383
|
/* @__PURE__ */ r.jsx("g", { children: /* @__PURE__ */ r.jsx("rect", { onMouseOver: () => {
|
|
385
|
-
|
|
384
|
+
P(e[n.length]);
|
|
386
385
|
}, onMouseLeave: () => {
|
|
387
|
-
|
|
388
|
-
}, x: n.length * 320 / e.length + 1, y: 1, width: 320 / e.length - 2, height: 8, className: `cursor-pointer ${
|
|
386
|
+
P(void 0);
|
|
387
|
+
}, x: n.length * 320 / e.length + 1, y: 1, width: 320 / e.length - 2, height: 8, className: `cursor-pointer ${L === e[n.length] ? "stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300" : ""}`, style: {
|
|
389
388
|
fill: e[n.length],
|
|
390
|
-
...
|
|
389
|
+
...L === e[n.length] ? {} : {
|
|
391
390
|
stroke: e[n.length]
|
|
392
391
|
}
|
|
393
392
|
} }) })
|
|
@@ -396,21 +395,17 @@ function jo(i) {
|
|
|
396
395
|
] }) : /* @__PURE__ */ r.jsx("button", { type: "button", className: "mb-0 border-0 bg-transparent p-0 self-start map-legend-button", onClick: () => {
|
|
397
396
|
f(!0);
|
|
398
397
|
}, children: /* @__PURE__ */ r.jsx("div", { className: "show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500", children: "Show Legend" }) }) }),
|
|
399
|
-
|
|
398
|
+
J === "button" && /* @__PURE__ */ r.jsxs("div", { className: "absolute left-4 top-4 flex flex-col zoom-buttons", children: [
|
|
400
399
|
/* @__PURE__ */ r.jsx("button", { onClick: () => kt("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: "+" }),
|
|
401
400
|
/* @__PURE__ */ r.jsx("button", { onClick: () => kt("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: "–" })
|
|
402
401
|
] })
|
|
403
402
|
] }),
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
}, children: /* @__PURE__ */ r.jsx("div", { className: "graph-modal-content m-0", dangerouslySetInnerHTML: typeof O == "string" ? {
|
|
407
|
-
__html: Qe(O, H)
|
|
408
|
-
} : void 0, children: typeof O == "function" ? O(H) : null }) }) : null,
|
|
409
|
-
Pt && N && nt && bt ? /* @__PURE__ */ r.jsx(Ze, { data: Pt, body: N, xPos: nt, yPos: bt, backgroundStyle: E?.tooltip, className: gt?.tooltip }) : null
|
|
403
|
+
Y && nt !== void 0 ? /* @__PURE__ */ r.jsx(eo, { body: Y, data: nt, setData: Z, className: et?.modal }) : null,
|
|
404
|
+
Pt && N && lt && bt ? /* @__PURE__ */ r.jsx(Ke, { data: Pt, body: N, xPos: lt, yPos: bt, backgroundStyle: O?.tooltip, className: et?.tooltip }) : null
|
|
410
405
|
] });
|
|
411
406
|
}
|
|
412
|
-
function
|
|
413
|
-
const t =
|
|
407
|
+
function pr(i) {
|
|
408
|
+
const t = ze.c(116), {
|
|
414
409
|
data: e,
|
|
415
410
|
mapData: p,
|
|
416
411
|
graphTitle: v,
|
|
@@ -422,75 +417,75 @@ function hr(i) {
|
|
|
422
417
|
footNote: S,
|
|
423
418
|
mapColorLegendTitle: N,
|
|
424
419
|
colorDomain: z,
|
|
425
|
-
choroplethScaleType:
|
|
426
|
-
radius:
|
|
427
|
-
scale:
|
|
428
|
-
centerPoint:
|
|
420
|
+
choroplethScaleType: Q,
|
|
421
|
+
radius: tt,
|
|
422
|
+
scale: gt,
|
|
423
|
+
centerPoint: X,
|
|
429
424
|
padding: Mt,
|
|
430
|
-
mapBorderWidth:
|
|
431
|
-
mapNoDataColor:
|
|
425
|
+
mapBorderWidth: Rt,
|
|
426
|
+
mapNoDataColor: qt,
|
|
432
427
|
backgroundColor: Ot,
|
|
433
|
-
showLabels:
|
|
428
|
+
showLabels: T,
|
|
434
429
|
mapBorderColor: Et,
|
|
435
|
-
tooltip:
|
|
436
|
-
relativeHeight:
|
|
437
|
-
onSeriesMouseOver:
|
|
430
|
+
tooltip: Y,
|
|
431
|
+
relativeHeight: O,
|
|
432
|
+
onSeriesMouseOver: et,
|
|
438
433
|
isWorldMap: ot,
|
|
439
|
-
showColorScale:
|
|
434
|
+
showColorScale: J,
|
|
440
435
|
zoomScaleExtend: g,
|
|
441
|
-
zoomTranslateExtend:
|
|
436
|
+
zoomTranslateExtend: A,
|
|
442
437
|
graphID: ft,
|
|
443
438
|
highlightedDataPoints: yt,
|
|
444
439
|
onSeriesMouseClick: rt,
|
|
445
|
-
graphDownload:
|
|
440
|
+
graphDownload: K,
|
|
446
441
|
dataDownload: It,
|
|
447
442
|
showAntarctica: at,
|
|
448
443
|
language: xt,
|
|
449
444
|
minHeight: vt,
|
|
450
|
-
theme:
|
|
451
|
-
ariaLabel:
|
|
452
|
-
resetSelectionOnDoubleClick:
|
|
453
|
-
detailsOnClick:
|
|
445
|
+
theme: zt,
|
|
446
|
+
ariaLabel: Lt,
|
|
447
|
+
resetSelectionOnDoubleClick: L,
|
|
448
|
+
detailsOnClick: P,
|
|
454
449
|
styles: y,
|
|
455
450
|
classNames: f,
|
|
456
451
|
mapProjection: it,
|
|
457
|
-
zoomInteraction:
|
|
458
|
-
animate:
|
|
452
|
+
zoomInteraction: nt,
|
|
453
|
+
animate: Z,
|
|
459
454
|
dimmedOpacity: Pt,
|
|
460
|
-
customLayers:
|
|
461
|
-
maxRadiusValue:
|
|
462
|
-
timeline:
|
|
455
|
+
customLayers: E,
|
|
456
|
+
maxRadiusValue: lt,
|
|
457
|
+
timeline: F,
|
|
463
458
|
collapseColorScaleByDefault: bt,
|
|
464
|
-
dotColor:
|
|
465
|
-
highlightedIds:
|
|
466
|
-
mapProperty:
|
|
459
|
+
dotColor: R,
|
|
460
|
+
highlightedIds: _,
|
|
461
|
+
mapProperty: q,
|
|
467
462
|
dotLegendTitle: wt,
|
|
468
|
-
dotBorderColor:
|
|
469
|
-
labelColor:
|
|
470
|
-
} = i, D = p === void 0 ? "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json" : p,
|
|
463
|
+
dotBorderColor: B,
|
|
464
|
+
labelColor: Gt
|
|
465
|
+
} = i, D = p === void 0 ? "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json" : p, V = S === 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." : S, G = Q === void 0 ? "threshold" : Q, _t = tt === void 0 ? 5 : tt, Bt = gt === void 0 ? 0.95 : gt, Vt = Rt === void 0 ? 0.5 : Rt, H = qt === void 0 ? St.light.graphNoData : qt, W = Ot === void 0 ? !1 : Ot, kt = T === void 0 ? !1 : T, o = Et === void 0 ? St.light.grays["gray-500"] : Et, a = ot === void 0 ? !0 : ot, M = J === void 0 ? !0 : J;
|
|
471
466
|
let l;
|
|
472
467
|
t[0] !== g ? (l = g === void 0 ? [0.8, 6] : g, t[0] = g, t[1] = l) : l = t[1];
|
|
473
468
|
const d = l;
|
|
474
469
|
let s;
|
|
475
470
|
t[2] !== yt ? (s = yt === void 0 ? [] : yt, t[2] = yt, t[3] = s) : s = t[3];
|
|
476
|
-
const k = s, m =
|
|
471
|
+
const k = s, m = K === void 0 ? !1 : K, h = It === void 0 ? !1 : It, st = at === void 0 ? !1 : at, $ = xt === void 0 ? "en" : xt, U = vt === void 0 ? 0 : vt, ct = zt === void 0 ? "light" : zt, ne = L === void 0 ? !0 : L, le = nt === void 0 ? "button" : nt, Ht = Z === void 0 ? !1 : Z, se = Pt === void 0 ? 0.3 : Pt;
|
|
477
472
|
let Ut;
|
|
478
|
-
t[4] !==
|
|
479
|
-
const ce = Ut, C =
|
|
473
|
+
t[4] !== E ? (Ut = E === void 0 ? [] : E, t[4] = E, t[5] = Ut) : Ut = t[5];
|
|
474
|
+
const ce = Ut, C = F === void 0 ? {
|
|
480
475
|
enabled: !1,
|
|
481
476
|
autoplay: !1,
|
|
482
477
|
showOnlyActiveDate: !0
|
|
483
|
-
} :
|
|
478
|
+
} : F, de = R === void 0 ? St.primaryColors["blue-600"] : R;
|
|
484
479
|
let Xt;
|
|
485
|
-
t[6] !==
|
|
486
|
-
const me = Xt, pe =
|
|
480
|
+
t[6] !== _ ? (Xt = _ === void 0 ? [] : _, t[6] = _, t[7] = Xt) : Xt = t[7];
|
|
481
|
+
const me = Xt, pe = q === void 0 ? "ISO3" : q, ue = Gt === void 0 ? St.primaryColors["blue-600"] : Gt, [dt, Me] = I(0), [Wt, Oe] = I(0), [mt, he] = I(C.autoplay), x = go(po(e, "date", !0).map((j) => Be(`${j}`, C.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime()), Io), [pt, Tt] = I(C.autoplay ? 0 : x.length - 1), [jt, Ee] = I(void 0), ge = Ft(null), be = Ft(null);
|
|
487
482
|
let Yt;
|
|
488
|
-
t[8] !==
|
|
483
|
+
t[8] !== G || t[9] !== z || t[10] !== n?.length || t[11] !== e ? (Yt = z || (G === "categorical" ? fo(e, "x") : yo(e.map(Eo), n?.length || 4)), t[8] = G, t[9] = z, t[10] = n?.length, t[11] = e, t[12] = Yt) : Yt = t[12];
|
|
489
484
|
const At = Yt;
|
|
490
485
|
let Jt, Kt;
|
|
491
486
|
t[13] === Symbol.for("react.memo_cache_sentinel") ? (Jt = () => {
|
|
492
|
-
const j = new ResizeObserver((
|
|
493
|
-
Me(
|
|
487
|
+
const j = new ResizeObserver((ut) => {
|
|
488
|
+
Me(ut[0].target.clientWidth || 620), Oe(ut[0].target.clientHeight || 480);
|
|
494
489
|
});
|
|
495
490
|
return ge.current && j.observe(ge.current), () => j.disconnect();
|
|
496
491
|
}, Kt = [], t[13] = Jt, t[14] = Kt) : (Jt = t[13], Kt = t[14]), ae(Jt, Kt);
|
|
@@ -501,99 +496,99 @@ function hr(i) {
|
|
|
501
496
|
const Qt = _e(Zt);
|
|
502
497
|
let te;
|
|
503
498
|
t[16] !== D || t[17] !== Qt ? (te = () => {
|
|
504
|
-
typeof D == "string" ?
|
|
505
|
-
Qt(
|
|
499
|
+
typeof D == "string" ? mo(D).then((ut) => {
|
|
500
|
+
Qt(ut);
|
|
506
501
|
}) : Qt(D);
|
|
507
502
|
}, t[16] = D, t[17] = Qt, t[18] = te) : te = t[18];
|
|
508
503
|
let ee;
|
|
509
504
|
t[19] !== D ? (ee = [D], t[19] = D, t[20] = ee) : ee = t[20], ae(te, ee), ae(() => {
|
|
510
505
|
const j = setInterval(() => {
|
|
511
|
-
|
|
506
|
+
Tt((ut) => ut < x.length - 1 ? ut + 1 : 0);
|
|
512
507
|
}, (C.speed || 2) * 1e3);
|
|
513
|
-
return
|
|
514
|
-
}, [x,
|
|
515
|
-
const oe =
|
|
508
|
+
return mt || clearInterval(j), () => clearInterval(j);
|
|
509
|
+
}, [x, mt, C.speed]);
|
|
510
|
+
const oe = We(x, pt, C.showOnlyActiveDate, C.dateFormat || "yyyy"), fe = f?.graphContainer, ye = y?.graphContainer;
|
|
516
511
|
let Ct;
|
|
517
|
-
t[21] !== f?.description || t[22] !== f?.title || t[23] !== e || t[24] !== h || t[25] !== w || t[26] !== m || t[27] !== v || t[28] !== y?.description || t[29] !== y?.title || t[30] !== u ? (Ct = v || w || m || h ? /* @__PURE__ */ r.jsx(
|
|
512
|
+
t[21] !== f?.description || t[22] !== f?.title || t[23] !== e || t[24] !== h || t[25] !== w || t[26] !== m || t[27] !== v || t[28] !== y?.description || t[29] !== y?.title || t[30] !== u ? (Ct = v || w || m || h ? /* @__PURE__ */ r.jsx(co, { styles: {
|
|
518
513
|
title: y?.title,
|
|
519
514
|
description: y?.description
|
|
520
515
|
}, classNames: {
|
|
521
516
|
title: f?.title,
|
|
522
517
|
description: f?.description
|
|
523
|
-
}, graphTitle: v, graphDescription: w, width: u, graphDownload: m ? be : void 0, dataDownload: h ? e.map(
|
|
518
|
+
}, graphTitle: v, graphDescription: w, width: u, graphDownload: m ? be : void 0, dataDownload: h ? e.map(Oo).filter(Mo).length > 0 ? e.map(So).filter($o) : e.filter(Do) : null }) : null, t[21] = f?.description, t[22] = f?.title, t[23] = e, t[24] = h, t[25] = w, t[26] = m, t[27] = v, t[28] = y?.description, t[29] = y?.title, t[30] = u, t[31] = Ct) : Ct = t[31];
|
|
524
519
|
let Nt;
|
|
525
|
-
t[32] !==
|
|
520
|
+
t[32] !== pt || t[33] !== oe || t[34] !== mt || t[35] !== Tt || t[36] !== he || t[37] !== C.enabled || t[38] !== x ? (Nt = C.enabled && x.length > 0 && oe ? /* @__PURE__ */ r.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
|
|
526
521
|
/* @__PURE__ */ r.jsx("button", { type: "button", onClick: () => {
|
|
527
|
-
he(!
|
|
528
|
-
}, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label":
|
|
529
|
-
/* @__PURE__ */ r.jsx(
|
|
530
|
-
|
|
522
|
+
he(!mt);
|
|
523
|
+
}, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label": mt ? "Click to pause animation" : "Click to play animation", children: mt ? /* @__PURE__ */ r.jsx(Qe, {}) : /* @__PURE__ */ r.jsx(to, {}) }),
|
|
524
|
+
/* @__PURE__ */ r.jsx(Te, { min: x[0], max: x[x.length - 1], marks: oe, step: null, defaultValue: x[x.length - 1], value: x[pt], onChangeComplete: (j) => {
|
|
525
|
+
Tt(x.indexOf(j));
|
|
531
526
|
}, onChange: (j) => {
|
|
532
|
-
|
|
527
|
+
Tt(x.indexOf(j));
|
|
533
528
|
}, "aria-label": "Time slider. Use arrow keys to adjust selected time period." })
|
|
534
|
-
] }) : null, t[32] =
|
|
529
|
+
] }) : null, t[32] = pt, t[33] = oe, t[34] = mt, t[35] = Tt, t[36] = he, t[37] = C.enabled, t[38] = x, t[39] = Nt) : Nt = t[39];
|
|
535
530
|
let Dt;
|
|
536
|
-
t[40] !==
|
|
531
|
+
t[40] !== Ht || t[41] !== X || t[42] !== G || t[43] !== f || t[44] !== bt || t[45] !== n || t[46] !== ce || t[47] !== e || t[48] !== P || t[49] !== se || t[50] !== At || t[51] !== B || t[52] !== de || t[53] !== wt || t[54] !== c || t[55] !== k || t[56] !== me || t[57] !== pt || t[58] !== a || t[59] !== ue || t[60] !== o || t[61] !== Vt || t[62] !== N || t[63] !== H || t[64] !== it || t[65] !== pe || t[66] !== jt || t[67] !== lt || t[68] !== U || t[69] !== rt || t[70] !== et || t[71] !== _t || t[72] !== O || t[73] !== ne || t[74] !== Bt || t[75] !== st || t[76] !== M || t[77] !== kt || t[78] !== y || t[79] !== Wt || t[80] !== dt || t[81] !== ct || t[82] !== C.dateFormat || t[83] !== C.enabled || t[84] !== Y || t[85] !== x || t[86] !== u || t[87] !== le || t[88] !== d || t[89] !== A ? (Dt = /* @__PURE__ */ r.jsx(uo, { ref: ge, children: dt && Wt && jt ? /* @__PURE__ */ r.jsx(ko, { dotColor: de, data: e.filter((j) => C.enabled ? j.date === Ve(new Date(x[pt]), C.dateFormat || "yyyy") : j), mapData: st ? jt : {
|
|
537
532
|
...jt,
|
|
538
|
-
features: jt.features.filter(
|
|
539
|
-
}, colorDomain: At, width:
|
|
533
|
+
features: jt.features.filter(No)
|
|
534
|
+
}, colorDomain: At, width: dt, height: Wt, scale: Bt, centerPoint: X, colors: n || (G === "categorical" ? St[ct].sequentialColors[`neutralColorsx0${At.length}`] : St[ct].sequentialColors[`neutralColorsx0${At.length + 1}`]), mapColorLegendTitle: N, radius: _t, categorical: G === "categorical", mapBorderWidth: Vt, mapNoDataColor: H, mapBorderColor: o, tooltip: Y, onSeriesMouseOver: et, showLabels: kt, isWorldMap: a, showColorScale: M, zoomScaleExtend: d, zoomTranslateExtend: A, onSeriesMouseClick: rt, highlightedDataPoints: k, resetSelectionOnDoubleClick: ne, styles: y, classNames: f, zoomInteraction: le, detailsOnClick: P, mapProjection: it || (a ? "naturalEarth" : "mercator"), animate: Ht === !0 ? {
|
|
540
535
|
duration: 0.5,
|
|
541
536
|
once: !0,
|
|
542
537
|
amount: 0.5
|
|
543
|
-
} :
|
|
538
|
+
} : Ht || {
|
|
544
539
|
duration: 0,
|
|
545
540
|
once: !0,
|
|
546
541
|
amount: 0
|
|
547
|
-
}, dimmedOpacity: se, customLayers: ce, maxRadiusValue: ie(
|
|
548
|
-
height: `${Math.max(
|
|
549
|
-
}, className: "flex items-center justify-center", children: /* @__PURE__ */ r.jsx(Ae, { "aria-label": "Loading graph" }) }) }), t[40] =
|
|
542
|
+
}, dimmedOpacity: se, customLayers: ce, maxRadiusValue: ie(lt) ? Math.max(...e.map(Co).filter(jo)) : lt, collapseColorScaleByDefault: bt, highlightedIds: me, mapProperty: pe, dotLegendTitle: wt, dotBorderColor: B, labelColor: ue }) : /* @__PURE__ */ r.jsx("div", { style: {
|
|
543
|
+
height: `${Math.max(U, c || (O ? U ? (u || dt) * O > U ? (u || dt) * O : U : (u || dt) * O : Wt))}px`
|
|
544
|
+
}, className: "flex items-center justify-center", children: /* @__PURE__ */ r.jsx(Ae, { "aria-label": "Loading graph" }) }) }), t[40] = Ht, t[41] = X, t[42] = G, t[43] = f, t[44] = bt, t[45] = n, t[46] = ce, t[47] = e, t[48] = P, t[49] = se, t[50] = At, t[51] = B, t[52] = de, t[53] = wt, t[54] = c, t[55] = k, t[56] = me, t[57] = pt, t[58] = a, t[59] = ue, t[60] = o, t[61] = Vt, t[62] = N, t[63] = H, t[64] = it, t[65] = pe, t[66] = jt, t[67] = lt, t[68] = U, t[69] = rt, t[70] = et, t[71] = _t, t[72] = O, t[73] = ne, t[74] = Bt, t[75] = st, t[76] = M, t[77] = kt, t[78] = y, t[79] = Wt, t[80] = dt, t[81] = ct, t[82] = C.dateFormat, t[83] = C.enabled, t[84] = Y, t[85] = x, t[86] = u, t[87] = le, t[88] = d, t[89] = A, t[90] = Dt) : Dt = t[90];
|
|
550
545
|
let $t;
|
|
551
|
-
t[91] !== f?.footnote || t[92] !== f?.source || t[93] !==
|
|
546
|
+
t[91] !== f?.footnote || t[92] !== f?.source || t[93] !== V || t[94] !== b || t[95] !== y?.footnote || t[96] !== y?.source || t[97] !== u ? ($t = b || V ? /* @__PURE__ */ r.jsx(so, { styles: {
|
|
552
547
|
footnote: y?.footnote,
|
|
553
548
|
source: y?.source
|
|
554
549
|
}, classNames: {
|
|
555
550
|
footnote: f?.footnote,
|
|
556
551
|
source: f?.source
|
|
557
|
-
}, sources: b, footNote:
|
|
552
|
+
}, sources: b, footNote: V, width: u }) : null, t[91] = f?.footnote, t[92] = f?.source, t[93] = V, t[94] = b, t[95] = y?.footnote, t[96] = y?.source, t[97] = u, t[98] = $t) : $t = t[98];
|
|
558
553
|
let re;
|
|
559
|
-
return t[99] !==
|
|
554
|
+
return t[99] !== Lt || t[100] !== W || t[101] !== ft || t[102] !== c || t[103] !== $ || t[104] !== U || t[105] !== Mt || t[106] !== O || t[107] !== fe || t[108] !== ye || t[109] !== Ct || t[110] !== Nt || t[111] !== Dt || t[112] !== $t || t[113] !== ct || t[114] !== u ? (re = /* @__PURE__ */ r.jsxs(ho, { className: fe, style: ye, id: ft, ref: be, "aria-label": Lt, backgroundColor: W, theme: ct, language: $, minHeight: U, width: u, height: c, relativeHeight: O, padding: Mt, children: [
|
|
560
555
|
Ct,
|
|
561
556
|
Nt,
|
|
562
557
|
Dt,
|
|
563
558
|
$t
|
|
564
|
-
] }), t[99] =
|
|
559
|
+
] }), t[99] = Lt, t[100] = W, t[101] = ft, t[102] = c, t[103] = $, t[104] = U, t[105] = Mt, t[106] = O, t[107] = fe, t[108] = ye, t[109] = Ct, t[110] = Nt, t[111] = Dt, t[112] = $t, t[113] = ct, t[114] = u, t[115] = re) : re = t[115], re;
|
|
565
560
|
}
|
|
566
|
-
function
|
|
561
|
+
function jo(i) {
|
|
567
562
|
return i != null;
|
|
568
563
|
}
|
|
569
|
-
function
|
|
564
|
+
function Co(i) {
|
|
570
565
|
return i.radius;
|
|
571
566
|
}
|
|
572
|
-
function
|
|
567
|
+
function No(i) {
|
|
573
568
|
return i.properties.NAME !== "Antarctica";
|
|
574
569
|
}
|
|
575
|
-
function
|
|
570
|
+
function Do(i) {
|
|
576
571
|
return i !== void 0;
|
|
577
572
|
}
|
|
578
|
-
function
|
|
573
|
+
function $o(i) {
|
|
579
574
|
return i !== void 0;
|
|
580
575
|
}
|
|
581
|
-
function
|
|
576
|
+
function So(i) {
|
|
582
577
|
return i.data;
|
|
583
578
|
}
|
|
584
|
-
function
|
|
579
|
+
function Mo(i) {
|
|
585
580
|
return i !== void 0;
|
|
586
581
|
}
|
|
587
|
-
function
|
|
582
|
+
function Oo(i) {
|
|
588
583
|
return i.data;
|
|
589
584
|
}
|
|
590
|
-
function
|
|
585
|
+
function Eo(i) {
|
|
591
586
|
return i.x;
|
|
592
587
|
}
|
|
593
|
-
function
|
|
594
|
-
return
|
|
588
|
+
function Io(i, t) {
|
|
589
|
+
return xo(i, t);
|
|
595
590
|
}
|
|
596
591
|
export {
|
|
597
|
-
|
|
592
|
+
pr as HybridMap
|
|
598
593
|
};
|
|
599
594
|
//# sourceMappingURL=HybridMap.js.map
|