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