@undp/data-viz 2.4.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.js +245 -248
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.js +281 -284
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.js +198 -201
- package/dist/HybridMap.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.cjs.map +1 -1
- package/dist/ThreeDGlobe.js +116 -119
- package/dist/ThreeDGlobe.js.map +1 -1
- package/package.json +1 -1
package/dist/ThreeDGlobe.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { j as i, m as
|
|
2
|
-
import { useState as I, useRef as
|
|
3
|
-
import { w as
|
|
4
|
-
import
|
|
5
|
-
import { i as
|
|
1
|
+
import { j as i, m as lt, c as ct } from "./index-CHPV5EwG-BzibaIRc.js";
|
|
2
|
+
import { useState as I, useRef as Qe, useEffect as G, useCallback as dt, useEffectEvent as pt } from "react";
|
|
3
|
+
import { w as ht } from "./Spinner-B2IIKg9r.js";
|
|
4
|
+
import mt from "react-globe.gl";
|
|
5
|
+
import { i as ut } from "./index-Bwrro8-q.js";
|
|
6
6
|
import * as H from "three";
|
|
7
|
-
import { _ as
|
|
8
|
-
import { g as
|
|
9
|
-
import { T as
|
|
10
|
-
import { n as
|
|
11
|
-
import { X as
|
|
12
|
-
import { g as
|
|
13
|
-
import { D as
|
|
14
|
-
import { o as
|
|
15
|
-
import { t as
|
|
16
|
-
import { GraphHeader as
|
|
17
|
-
import { GraphFooter as
|
|
18
|
-
import { f as
|
|
19
|
-
import { Colors as
|
|
20
|
-
import { g as
|
|
21
|
-
import { g as
|
|
22
|
-
import { a as
|
|
23
|
-
var
|
|
24
|
-
function
|
|
25
|
-
if (
|
|
26
|
-
|
|
7
|
+
import { _ as et } from "./Typography-BO0gQDIT.js";
|
|
8
|
+
import { g as gt } from "./_commonjsHelpers-ByX85dGu.js";
|
|
9
|
+
import { T as ft } from "./Tooltip-Bj-s__cI.js";
|
|
10
|
+
import { n as vt } from "./numberFormattingFunction-DqMf_v1m.js";
|
|
11
|
+
import { X as yt, E as bt } from "./index-ApTBN0kp.js";
|
|
12
|
+
import { g as xt } from "./getCentroidCoordinates-s0OOUjLF.js";
|
|
13
|
+
import { D as wt } from "./DetailsModal-B2XBWR7w.js";
|
|
14
|
+
import { o as Ct } from "./ordinal-CHaxGJ_l.js";
|
|
15
|
+
import { t as Dt } from "./threshold-DFfqcDMa.js";
|
|
16
|
+
import { GraphHeader as St } from "./GraphHeader.js";
|
|
17
|
+
import { GraphFooter as jt } from "./GraphFooter.js";
|
|
18
|
+
import { f as Nt } from "./fetchAndParseData-BAXhgTDM.js";
|
|
19
|
+
import { Colors as oe } from "./Colors.js";
|
|
20
|
+
import { g as Rt } from "./getUniqValue-DsqSii6M.js";
|
|
21
|
+
import { g as kt } from "./getJenks-DTCcQSDi.js";
|
|
22
|
+
import { a as Ot, G as Et } from "./GraphContainer-B8ZqOzKI.js";
|
|
23
|
+
var Ke, tt;
|
|
24
|
+
function Lt() {
|
|
25
|
+
if (tt) return Ke;
|
|
26
|
+
tt = 1;
|
|
27
27
|
var t = function(o) {
|
|
28
28
|
return o.charAt(0) === "#" ? o.slice(1) : o;
|
|
29
29
|
}, e = function(o) {
|
|
@@ -53,11 +53,11 @@ function zt() {
|
|
|
53
53
|
var f = t(o), s = e(f), w = b(s);
|
|
54
54
|
return D(w, n);
|
|
55
55
|
};
|
|
56
|
-
return
|
|
56
|
+
return Ke = g, Ke;
|
|
57
57
|
}
|
|
58
|
-
var
|
|
59
|
-
const
|
|
60
|
-
function
|
|
58
|
+
var Pt = Lt();
|
|
59
|
+
const ot = /* @__PURE__ */ gt(Pt);
|
|
60
|
+
function zt(t) {
|
|
61
61
|
let e;
|
|
62
62
|
switch (t.type) {
|
|
63
63
|
case "ambient":
|
|
@@ -77,7 +77,7 @@ function Tt(t) {
|
|
|
77
77
|
}
|
|
78
78
|
return e;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function Mt(t) {
|
|
81
81
|
const {
|
|
82
82
|
width: e,
|
|
83
83
|
autoRotate: d,
|
|
@@ -95,10 +95,10 @@ function At(t) {
|
|
|
95
95
|
tooltip: L,
|
|
96
96
|
styles: be,
|
|
97
97
|
classNames: $,
|
|
98
|
-
mapNoDataColor:
|
|
98
|
+
mapNoDataColor: re,
|
|
99
99
|
colorLegendTitle: C,
|
|
100
|
-
showColorScale:
|
|
101
|
-
hoverStrokeColor:
|
|
100
|
+
showColorScale: ae,
|
|
101
|
+
hoverStrokeColor: ie,
|
|
102
102
|
detailsOnClick: W,
|
|
103
103
|
onSeriesMouseClick: V,
|
|
104
104
|
onSeriesMouseOver: xe,
|
|
@@ -109,26 +109,26 @@ function At(t) {
|
|
|
109
109
|
polygonAltitude: u,
|
|
110
110
|
centerLng: Z,
|
|
111
111
|
centerLat: _,
|
|
112
|
-
atmosphereAltitude:
|
|
112
|
+
atmosphereAltitude: se,
|
|
113
113
|
globeCurvatureResolution: J,
|
|
114
114
|
fogSettings: M,
|
|
115
115
|
lights: T,
|
|
116
|
-
highlightedAltitude:
|
|
116
|
+
highlightedAltitude: ne,
|
|
117
117
|
selectedId: v,
|
|
118
118
|
collapseColorScaleByDefault: X,
|
|
119
119
|
dimmedOpacity: A,
|
|
120
|
-
locale:
|
|
121
|
-
} = t, [ce, Ce] = I(!1), p =
|
|
120
|
+
locale: le
|
|
121
|
+
} = t, [ce, Ce] = I(!1), p = Qe(void 0), [R, U] = I(void 0), [De, de] = I(X === void 0 ? !(e < 680) : !X), [Y, K] = I({
|
|
122
122
|
x: 0,
|
|
123
123
|
y: 0
|
|
124
|
-
}), [N, pe] = I(void 0), he = D ?
|
|
124
|
+
}), [N, pe] = I(void 0), he = D ? Ct().domain(g).range(l) : Dt().domain(g).range(l);
|
|
125
125
|
G(() => {
|
|
126
126
|
p.current && (p.current.controls().enableZoom = x);
|
|
127
127
|
}, [x]), G(() => {
|
|
128
128
|
p.current && (N || v ? p.current.controls().autoRotate = !1 : (p.current.controls().autoRotate = d !== 0, p.current.controls().autoRotateSpeed = d));
|
|
129
129
|
}, [N, v, d]), G(() => {
|
|
130
130
|
if (p.current && v) {
|
|
131
|
-
const r = f.find((y) => y.properties[s] === v), [a, c] =
|
|
131
|
+
const r = f.find((y) => y.properties[s] === v), [a, c] = xt(r);
|
|
132
132
|
p.current.pointOfView({
|
|
133
133
|
lat: c,
|
|
134
134
|
lng: a,
|
|
@@ -139,7 +139,7 @@ function At(t) {
|
|
|
139
139
|
const r = p.current?.renderer().domElement;
|
|
140
140
|
if (!r) return;
|
|
141
141
|
const a = (c) => {
|
|
142
|
-
|
|
142
|
+
K({
|
|
143
143
|
x: c.clientX,
|
|
144
144
|
y: c.clientY
|
|
145
145
|
});
|
|
@@ -154,13 +154,13 @@ function At(t) {
|
|
|
154
154
|
}, [z, Z, _]);
|
|
155
155
|
const S = o || new H.MeshBasicMaterial({
|
|
156
156
|
color: "#FFF"
|
|
157
|
-
}), B =
|
|
157
|
+
}), B = dt(() => {
|
|
158
158
|
if (!p.current) return;
|
|
159
159
|
const r = p.current.scene(), a = p.current.camera();
|
|
160
160
|
let c = [];
|
|
161
161
|
r.traverse((h) => {
|
|
162
162
|
h instanceof H.Light && c.push(h);
|
|
163
|
-
}), c = [...c, ...a.children], c.forEach((h) => h.parent?.remove(h)), T.map((h) =>
|
|
163
|
+
}), c = [...c, ...a.children], c.forEach((h) => h.parent?.remove(h)), T.map((h) => zt(h)).forEach((h, j) => {
|
|
164
164
|
T[j].type !== "ambient" && T[j].position === "camera" ? (a.add(h), T[j].type !== "point" && a.add(h.target)) : r.add(h);
|
|
165
165
|
}), M && (r.fog = new H.Fog(M.color, M.near, M.far));
|
|
166
166
|
}, [T, M]), k = () => {
|
|
@@ -169,21 +169,21 @@ function At(t) {
|
|
|
169
169
|
return G(() => {
|
|
170
170
|
ce && B();
|
|
171
171
|
}, [ce, B]), /* @__PURE__ */ i.jsxs("div", { className: "relative", children: [
|
|
172
|
-
/* @__PURE__ */ i.jsx(
|
|
173
|
-
const a = v ? r?.properties?.[s] === v ? 1 : A : P ? P.includes(r?.properties?.[s]) ? 1 : A : 1, c = r?.properties?.[s], y = b.find((j) => j.id === c)?.x, h = y != null ? he(y) :
|
|
174
|
-
return
|
|
172
|
+
/* @__PURE__ */ i.jsx(mt, { ref: p, height: n, width: e, globeOffset: m, lineHoverPrecision: 0, polygonsData: f, polygonAltitude: (r) => P?.includes(r?.properties?.[s]) || r?.properties?.[s] === v || r?.properties?.[s] === N?.id || r?.properties?.[s] === R?.id ? ne : u, polygonCapColor: (r) => {
|
|
173
|
+
const a = v ? r?.properties?.[s] === v ? 1 : A : P ? P.includes(r?.properties?.[s]) ? 1 : A : 1, c = r?.properties?.[s], y = b.find((j) => j.id === c)?.x, h = y != null ? he(y) : re;
|
|
174
|
+
return ot(h, `${a}`);
|
|
175
175
|
}, polygonSideColor: (r) => {
|
|
176
|
-
const a = r?.properties?.[s], c = b.find((j) => j.id === a)?.x, y = v ? r?.properties?.[s] === v ? 1 : A : P ? P.includes(r?.properties?.[s]) ? 1 : A : 1, h = c != null ? he(c) :
|
|
177
|
-
return
|
|
178
|
-
}, polygonStrokeColor: (r) => r?.properties?.[s] === N?.id ?
|
|
176
|
+
const a = r?.properties?.[s], c = b.find((j) => j.id === a)?.x, y = v ? r?.properties?.[s] === v ? 1 : A : P ? P.includes(r?.properties?.[s]) ? 1 : A : 1, h = c != null ? he(c) : re;
|
|
177
|
+
return ot(h, `${y}`);
|
|
178
|
+
}, polygonStrokeColor: (r) => r?.properties?.[s] === N?.id ? ie : w, onGlobeClick: () => {
|
|
179
179
|
U(void 0);
|
|
180
180
|
}, onPolygonClick: (r) => {
|
|
181
181
|
const a = r?.properties?.[s] ? b.find((c) => c.id === r?.properties?.[s]) : void 0;
|
|
182
|
-
(V || W) && (
|
|
182
|
+
(V || W) && (ut(R, a) && we && a ? (U(void 0), V?.(void 0)) : (U(a), V?.(a)));
|
|
183
183
|
}, onPolygonHover: (r) => {
|
|
184
184
|
const a = r?.properties?.[s] ? b.find((c) => c.id === r?.properties?.[s]) : void 0;
|
|
185
185
|
pe(a), xe?.(a);
|
|
186
|
-
}, atmosphereColor: E, atmosphereAltitude:
|
|
186
|
+
}, atmosphereColor: E, atmosphereAltitude: se, globeCurvatureResolution: J, globeMaterial: S, backgroundColor: "rgba(0, 0, 0, 0)", polygonsTransitionDuration: 100, onGlobeReady: () => {
|
|
187
187
|
if (p.current) {
|
|
188
188
|
p.current.pointOfView({
|
|
189
189
|
lat: _,
|
|
@@ -200,14 +200,14 @@ function At(t) {
|
|
|
200
200
|
r.add(a), k();
|
|
201
201
|
}
|
|
202
202
|
} }),
|
|
203
|
-
|
|
203
|
+
ae === !1 ? null : /* @__PURE__ */ i.jsx("div", { className: lt("absolute left-4 bottom-4 map-color-legend", $?.colorLegend), children: De ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
204
204
|
/* @__PURE__ */ i.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: () => {
|
|
205
205
|
de(!1);
|
|
206
|
-
}, children: /* @__PURE__ */ i.jsx(
|
|
206
|
+
}, children: /* @__PURE__ */ i.jsx(yt, {}) }),
|
|
207
207
|
/* @__PURE__ */ i.jsxs("div", { className: "color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]", style: {
|
|
208
208
|
width: D ? void 0 : "340px"
|
|
209
209
|
}, children: [
|
|
210
|
-
C && C !== "" ? /* @__PURE__ */ i.jsx(
|
|
210
|
+
C && C !== "" ? /* @__PURE__ */ i.jsx(et, { size: "xs", marginBottom: "xs", className: "p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300", style: {
|
|
211
211
|
display: "-webkit-box",
|
|
212
212
|
WebkitLineClamp: "1",
|
|
213
213
|
WebkitBoxOrient: "vertical"
|
|
@@ -216,7 +216,7 @@ function At(t) {
|
|
|
216
216
|
/* @__PURE__ */ i.jsx("div", { className: "w-2 h-2 rounded-full", style: {
|
|
217
217
|
backgroundColor: l[a % l.length]
|
|
218
218
|
} }),
|
|
219
|
-
/* @__PURE__ */ i.jsx(
|
|
219
|
+
/* @__PURE__ */ i.jsx(et, { size: "sm", marginBottom: "none", leading: "none", children: r })
|
|
220
220
|
] }, a)) }) : /* @__PURE__ */ i.jsx("svg", { width: "100%", viewBox: "0 0 320 30", direction: "ltr", children: /* @__PURE__ */ i.jsxs("g", { children: [
|
|
221
221
|
g.map((r, a) => /* @__PURE__ */ i.jsxs("g", { className: "cursor-pointer", children: [
|
|
222
222
|
/* @__PURE__ */ i.jsx("rect", { x: a * 320 / l.length + 1, y: 1, width: 320 / l.length - 2, height: 8, style: {
|
|
@@ -225,7 +225,7 @@ function At(t) {
|
|
|
225
225
|
} }),
|
|
226
226
|
/* @__PURE__ */ i.jsx("text", { x: (a + 1) * 320 / l.length, y: 25, className: "fill-primary-gray-700 dark:fill-primary-gray-300 text-xs", style: {
|
|
227
227
|
textAnchor: "middle"
|
|
228
|
-
}, children:
|
|
228
|
+
}, children: vt(r, void 0, void 0, void 0, void 0, le) })
|
|
229
229
|
] }, a)),
|
|
230
230
|
/* @__PURE__ */ i.jsx("g", { children: /* @__PURE__ */ i.jsx("rect", { x: g.length * 320 / l.length + 1, y: 1, width: 320 / l.length - 2, height: 8, style: {
|
|
231
231
|
fill: l[g.length],
|
|
@@ -235,13 +235,13 @@ function At(t) {
|
|
|
235
235
|
] })
|
|
236
236
|
] }) : /* @__PURE__ */ i.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: () => {
|
|
237
237
|
de(!0);
|
|
238
|
-
}, children: /* @__PURE__ */ i.jsx(
|
|
239
|
-
N && L ? /* @__PURE__ */ i.jsx(
|
|
240
|
-
W && R !== void 0 ? /* @__PURE__ */ i.jsx(
|
|
238
|
+
}, children: /* @__PURE__ */ i.jsx(bt, {}) }) }),
|
|
239
|
+
N && L ? /* @__PURE__ */ i.jsx(ft, { data: N, body: L, xPos: Y.x, yPos: Y.y, backgroundStyle: be?.tooltip, className: $?.tooltip }) : null,
|
|
240
|
+
W && R !== void 0 ? /* @__PURE__ */ i.jsx(wt, { body: W, data: R, setData: U, className: $?.modal }) : null
|
|
241
241
|
] });
|
|
242
242
|
}
|
|
243
|
-
function
|
|
244
|
-
const e =
|
|
243
|
+
function co(t) {
|
|
244
|
+
const e = ct.c(96), {
|
|
245
245
|
data: d,
|
|
246
246
|
mapData: b,
|
|
247
247
|
graphTitle: x,
|
|
@@ -257,10 +257,10 @@ function ho(t) {
|
|
|
257
257
|
padding: L,
|
|
258
258
|
mapNoDataColor: be,
|
|
259
259
|
backgroundColor: $,
|
|
260
|
-
mapBorderColor:
|
|
260
|
+
mapBorderColor: re,
|
|
261
261
|
relativeHeight: C,
|
|
262
|
-
tooltip:
|
|
263
|
-
graphID:
|
|
262
|
+
tooltip: ae,
|
|
263
|
+
graphID: ie,
|
|
264
264
|
mapProperty: W,
|
|
265
265
|
dataDownload: V,
|
|
266
266
|
language: xe,
|
|
@@ -271,15 +271,15 @@ function ho(t) {
|
|
|
271
271
|
classNames: u,
|
|
272
272
|
autoRotate: Z,
|
|
273
273
|
enableZoom: _,
|
|
274
|
-
globeMaterial:
|
|
274
|
+
globeMaterial: se,
|
|
275
275
|
centerPoint: J,
|
|
276
276
|
atmosphereColor: M,
|
|
277
277
|
showColorScale: T,
|
|
278
|
-
resetSelectionOnDoubleClick:
|
|
278
|
+
resetSelectionOnDoubleClick: ne,
|
|
279
279
|
detailsOnClick: v,
|
|
280
280
|
onSeriesMouseOver: X,
|
|
281
281
|
onSeriesMouseClick: A,
|
|
282
|
-
highlightedIds:
|
|
282
|
+
highlightedIds: le,
|
|
283
283
|
highlightedAltitude: ce,
|
|
284
284
|
dimmedOpacity: Ce,
|
|
285
285
|
scale: p,
|
|
@@ -287,23 +287,20 @@ function ho(t) {
|
|
|
287
287
|
polygonAltitude: U,
|
|
288
288
|
globeCurvatureResolution: De,
|
|
289
289
|
atmosphereAltitude: de,
|
|
290
|
-
fogSettings:
|
|
291
|
-
lights:
|
|
290
|
+
fogSettings: Y,
|
|
291
|
+
lights: K,
|
|
292
292
|
selectedId: N,
|
|
293
293
|
collapseColorScaleByDefault: pe,
|
|
294
294
|
locale: he
|
|
295
|
-
} = t, S = b === void 0 ? "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json" : b, B = f === 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." : f, k = E === void 0 ? "threshold" : E, r = be === void 0 ?
|
|
295
|
+
} = t, S = b === void 0 ? "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json" : b, B = f === 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." : f, k = E === void 0 ? "threshold" : E, r = be === void 0 ? oe.light.graphNoData : be, a = $ === void 0 ? !1 : $, c = re === void 0 ? oe.light.grays["gray-500"] : re, y = W === void 0 ? "ISO3" : W, h = V === void 0 ? !1 : V, j = xe === void 0 ? "en" : xe, O = we === void 0 ? 0 : we, F = P === void 0 ? "light" : P, me = Z === void 0 ? !0 : Z, Ae = _ === void 0 ? !0 : _;
|
|
296
296
|
let Se;
|
|
297
297
|
e[0] !== J ? (Se = J === void 0 ? [0, 0] : J, e[0] = J, e[1] = Se) : Se = e[1];
|
|
298
|
-
const je = Se,
|
|
298
|
+
const je = Se, Be = M === void 0 ? "#999" : M, Fe = T === void 0 ? !0 : T, Ge = ne === void 0 ? !0 : ne, Ie = ce === void 0 ? 0.1 : ce, Ue = Ce === void 0 ? 0.3 : Ce, qe = p === void 0 ? 1 : p;
|
|
299
299
|
let Ne;
|
|
300
|
-
e[2] !==
|
|
301
|
-
const
|
|
300
|
+
e[2] !== R ? (Ne = R === void 0 ? [0, 0] : R, e[2] = R, e[3] = Ne) : Ne = e[3];
|
|
301
|
+
const He = Ne, $e = U === void 0 ? 0.01 : U, We = De === void 0 ? 4 : De, Ve = de === void 0 ? 0.15 : de;
|
|
302
302
|
let Re;
|
|
303
|
-
e[4] !==
|
|
304
|
-
const We = Re, Ve = U === void 0 ? 0.01 : U, Ze = De === void 0 ? 4 : De, _e = de === void 0 ? 0.15 : de;
|
|
305
|
-
let ke;
|
|
306
|
-
e[6] !== Q ? (ke = Q === void 0 ? [{
|
|
303
|
+
e[4] !== K ? (Re = K === void 0 ? [{
|
|
307
304
|
type: "ambient",
|
|
308
305
|
color: 4210752,
|
|
309
306
|
intensity: 0.4
|
|
@@ -316,81 +313,81 @@ function ho(t) {
|
|
|
316
313
|
y: 10,
|
|
317
314
|
z: 5
|
|
318
315
|
}
|
|
319
|
-
}] :
|
|
320
|
-
const
|
|
321
|
-
let
|
|
322
|
-
e[
|
|
316
|
+
}] : K, e[4] = K, e[5] = Re) : Re = e[5];
|
|
317
|
+
const Ze = Re, _e = he === void 0 ? "en" : he, [ke, rt] = I(void 0), [q, at] = I(0), [ue, it] = I(0), Je = Qe(null), st = Qe(null);
|
|
318
|
+
let Oe, Ee;
|
|
319
|
+
e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Oe = () => {
|
|
323
320
|
const ve = new ResizeObserver((ye) => {
|
|
324
|
-
|
|
321
|
+
at(ye[0].target.clientWidth || 620), it(ye[0].target.clientHeight || 480);
|
|
325
322
|
});
|
|
326
|
-
return
|
|
327
|
-
},
|
|
323
|
+
return Je.current && ve.observe(Je.current), () => ve.disconnect();
|
|
324
|
+
}, Ee = [], e[6] = Oe, e[7] = Ee) : (Oe = e[6], Ee = e[7]), G(Oe, Ee);
|
|
325
|
+
let Le;
|
|
326
|
+
e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Le = (ve) => {
|
|
327
|
+
rt(ve);
|
|
328
|
+
}, e[8] = Le) : Le = e[8];
|
|
329
|
+
const ge = pt(Le);
|
|
328
330
|
let Pe;
|
|
329
|
-
e[
|
|
330
|
-
|
|
331
|
-
}, e[10] = Pe) : Pe = e[10];
|
|
332
|
-
const ge = mt(Pe);
|
|
333
|
-
let ze;
|
|
334
|
-
e[11] !== S || e[12] !== ge ? (ze = () => {
|
|
335
|
-
typeof S == "string" ? kt(S).then((ye) => {
|
|
331
|
+
e[9] !== S || e[10] !== ge ? (Pe = () => {
|
|
332
|
+
typeof S == "string" ? Nt(S).then((ye) => {
|
|
336
333
|
if (S === "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json") {
|
|
337
|
-
const
|
|
338
|
-
ge(
|
|
334
|
+
const nt = ye.features.map(Ut);
|
|
335
|
+
ge(nt);
|
|
339
336
|
} else
|
|
340
337
|
ge(ye.features);
|
|
341
338
|
}) : ge(S.features);
|
|
342
|
-
}, e[
|
|
339
|
+
}, e[9] = S, e[10] = ge, e[11] = Pe) : Pe = e[11];
|
|
340
|
+
let ze;
|
|
341
|
+
e[12] !== S ? (ze = [S], e[12] = S, e[13] = ze) : ze = e[13], G(Pe, ze);
|
|
343
342
|
let Me;
|
|
344
|
-
e[14] !==
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
let ee;
|
|
349
|
-
e[21] !== u?.description || e[22] !== u?.title || e[23] !== d || e[24] !== h || e[25] !== l || e[26] !== x || e[27] !== m?.description || e[28] !== m?.title || e[29] !== n ? (ee = x || l || h ? /* @__PURE__ */ i.jsx(Nt, { styles: {
|
|
343
|
+
e[14] !== s || e[15] !== D?.length || e[16] !== d || e[17] !== k ? (Me = s || (k === "categorical" ? Rt(d, "x") : kt(d.map(It), D?.length || 4)), e[14] = s, e[15] = D?.length, e[16] = d, e[17] = k, e[18] = Me) : Me = e[18];
|
|
344
|
+
const fe = Me, Xe = u?.graphContainer, Ye = m?.graphContainer;
|
|
345
|
+
let Q;
|
|
346
|
+
e[19] !== u?.description || e[20] !== u?.title || e[21] !== d || e[22] !== h || e[23] !== l || e[24] !== x || e[25] !== m?.description || e[26] !== m?.title || e[27] !== n ? (Q = x || l || h ? /* @__PURE__ */ i.jsx(St, { styles: {
|
|
350
347
|
title: m?.title,
|
|
351
348
|
description: m?.description
|
|
352
349
|
}, classNames: {
|
|
353
350
|
title: u?.title,
|
|
354
351
|
description: u?.description
|
|
355
|
-
}, graphTitle: x, graphDescription: l, width: n, graphDownload: void 0, dataDownload: h ? d.map(
|
|
356
|
-
let
|
|
357
|
-
e[
|
|
352
|
+
}, graphTitle: x, graphDescription: l, width: n, graphDownload: void 0, dataDownload: h ? d.map(Gt).filter(Ft).length > 0 ? d.map(Bt).filter(At) : d.filter(Tt) : null }) : null, e[19] = u?.description, e[20] = u?.title, e[21] = d, e[22] = h, e[23] = l, e[24] = x, e[25] = m?.description, e[26] = m?.title, e[27] = n, e[28] = Q) : Q = e[28];
|
|
353
|
+
let ee;
|
|
354
|
+
e[29] !== Ve || e[30] !== Be || e[31] !== me || e[32] !== je || e[33] !== u || e[34] !== pe || e[35] !== w || e[36] !== D || e[37] !== d || e[38] !== v || e[39] !== Ue || e[40] !== fe || e[41] !== Ae || e[42] !== Y || e[43] !== We || e[44] !== se || e[45] !== He || e[46] !== o || e[47] !== Ie || e[48] !== le || e[49] !== Ze || e[50] !== _e || e[51] !== c || e[52] !== r || e[53] !== y || e[54] !== ke || e[55] !== O || e[56] !== A || e[57] !== X || e[58] !== $e || e[59] !== C || e[60] !== Ge || e[61] !== qe || e[62] !== k || e[63] !== N || e[64] !== Fe || e[65] !== m || e[66] !== ue || e[67] !== q || e[68] !== F || e[69] !== ae || e[70] !== n ? (ee = /* @__PURE__ */ i.jsx(Ot, { ref: Je, children: q && ue && ke ? /* @__PURE__ */ i.jsx(Mt, { data: d, globeOffset: He, polygonData: ke, colorDomain: fe, width: q, height: ue, colors: D || (k === "categorical" ? oe[F].sequentialColors[`neutralColorsx0${fe.length}`] : oe[F].sequentialColors[`neutralColorsx0${fe.length + 1}`]), mapNoDataColor: r, categorical: k === "categorical", mapBorderColor: c, tooltip: ae, mapProperty: y, styles: m, classNames: u, autoRotate: me === !0 ? 1.5 : me === !1 ? 0 : me, enableZoom: Ae, globeMaterial: se, atmosphereColor: Be, colorLegendTitle: w, showColorScale: Fe, hoverStrokeColor: F === "light" ? oe.light.grays["gray-700"] : oe.light.grays["gray-300"], highlightedIds: le, resetSelectionOnDoubleClick: Ge, detailsOnClick: v, onSeriesMouseOver: X, onSeriesMouseClick: A, scale: qe, polygonAltitude: $e, centerLat: je[0], centerLng: je[1], atmosphereAltitude: Ve, globeCurvatureResolution: We, fogSettings: Y, lights: Ze, highlightedAltitude: Ie, selectedId: N, collapseColorScaleByDefault: pe, dimmedOpacity: Ue, locale: _e }) : /* @__PURE__ */ i.jsx("div", { style: {
|
|
358
355
|
height: `${Math.max(O, o || (C ? O ? (n || q) * C > O ? (n || q) * C : O : (n || q) * C : ue))}px`
|
|
359
|
-
}, className: "flex items-center justify-center", children: /* @__PURE__ */ i.jsx(
|
|
360
|
-
let
|
|
361
|
-
e[
|
|
356
|
+
}, className: "flex items-center justify-center", children: /* @__PURE__ */ i.jsx(ht, { "aria-label": "Loading graph" }) }) }), e[29] = Ve, e[30] = Be, e[31] = me, e[32] = je, e[33] = u, e[34] = pe, e[35] = w, e[36] = D, e[37] = d, e[38] = v, e[39] = Ue, e[40] = fe, e[41] = Ae, e[42] = Y, e[43] = We, e[44] = se, e[45] = He, e[46] = o, e[47] = Ie, e[48] = le, e[49] = Ze, e[50] = _e, e[51] = c, e[52] = r, e[53] = y, e[54] = ke, e[55] = O, e[56] = A, e[57] = X, e[58] = $e, e[59] = C, e[60] = Ge, e[61] = qe, e[62] = k, e[63] = N, e[64] = Fe, e[65] = m, e[66] = ue, e[67] = q, e[68] = F, e[69] = ae, e[70] = n, e[71] = ee) : ee = e[71];
|
|
357
|
+
let te;
|
|
358
|
+
e[72] !== u?.footnote || e[73] !== u?.source || e[74] !== B || e[75] !== g || e[76] !== m?.footnote || e[77] !== m?.source || e[78] !== n ? (te = g || B ? /* @__PURE__ */ i.jsx(jt, { styles: {
|
|
362
359
|
footnote: m?.footnote,
|
|
363
360
|
source: m?.source
|
|
364
361
|
}, classNames: {
|
|
365
362
|
footnote: u?.footnote,
|
|
366
363
|
source: u?.source
|
|
367
|
-
}, sources: g, footNote: B, width: n }) : null, e[
|
|
368
|
-
let
|
|
369
|
-
return e[
|
|
364
|
+
}, sources: g, footNote: B, width: n }) : null, e[72] = u?.footnote, e[73] = u?.source, e[74] = B, e[75] = g, e[76] = m?.footnote, e[77] = m?.source, e[78] = n, e[79] = te) : te = e[79];
|
|
365
|
+
let Te;
|
|
366
|
+
return e[80] !== z || e[81] !== a || e[82] !== ie || e[83] !== o || e[84] !== j || e[85] !== O || e[86] !== L || e[87] !== C || e[88] !== Xe || e[89] !== Ye || e[90] !== Q || e[91] !== ee || e[92] !== te || e[93] !== F || e[94] !== n ? (Te = /* @__PURE__ */ i.jsxs(Et, { className: Xe, style: Ye, id: ie, ref: st, "aria-label": z, backgroundColor: a, theme: F, language: j, minHeight: O, width: n, height: o, relativeHeight: C, padding: L, children: [
|
|
367
|
+
Q,
|
|
370
368
|
ee,
|
|
371
|
-
te
|
|
372
|
-
|
|
373
|
-
] }), e[82] = z, e[83] = a, e[84] = se, e[85] = o, e[86] = j, e[87] = O, e[88] = L, e[89] = C, e[90] = Ke, e[91] = Qe, e[92] = ee, e[93] = te, e[94] = oe, e[95] = F, e[96] = n, e[97] = Ae) : Ae = e[97], Ae;
|
|
369
|
+
te
|
|
370
|
+
] }), e[80] = z, e[81] = a, e[82] = ie, e[83] = o, e[84] = j, e[85] = O, e[86] = L, e[87] = C, e[88] = Xe, e[89] = Ye, e[90] = Q, e[91] = ee, e[92] = te, e[93] = F, e[94] = n, e[95] = Te) : Te = e[95], Te;
|
|
374
371
|
}
|
|
375
|
-
function
|
|
372
|
+
function Tt(t) {
|
|
376
373
|
return t !== void 0;
|
|
377
374
|
}
|
|
378
|
-
function
|
|
375
|
+
function At(t) {
|
|
379
376
|
return t !== void 0;
|
|
380
377
|
}
|
|
381
|
-
function
|
|
378
|
+
function Bt(t) {
|
|
382
379
|
return t.data;
|
|
383
380
|
}
|
|
384
|
-
function
|
|
381
|
+
function Ft(t) {
|
|
385
382
|
return t !== void 0;
|
|
386
383
|
}
|
|
387
|
-
function
|
|
384
|
+
function Gt(t) {
|
|
388
385
|
return t.data;
|
|
389
386
|
}
|
|
390
|
-
function
|
|
387
|
+
function It(t) {
|
|
391
388
|
return t.x;
|
|
392
389
|
}
|
|
393
|
-
function
|
|
390
|
+
function Ut(t) {
|
|
394
391
|
if (t.geometry.type === "Polygon") {
|
|
395
392
|
const b = [...t.geometry.coordinates[0]].reverse(), x = {
|
|
396
393
|
...t.geometry,
|
|
@@ -416,6 +413,6 @@ function Ht(t) {
|
|
|
416
413
|
};
|
|
417
414
|
}
|
|
418
415
|
export {
|
|
419
|
-
|
|
416
|
+
co as ThreeDGlobe
|
|
420
417
|
};
|
|
421
418
|
//# sourceMappingURL=ThreeDGlobe.js.map
|