@undp/data-viz 2.5.0 → 2.5.1

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