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