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