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