@undp/data-viz 2.2.0 → 2.2.2

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