ethiopia-map 0.1.6 → 0.1.7

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.
@@ -1,5 +1,5 @@
1
- import { jsx as U, jsxs as l } from "react/jsx-runtime";
2
- import { useState as mM, useRef as $, useCallback as GM, useEffect as q, useMemo as pM, useContext as ZL, createContext as aL, forwardRef as EL, useImperativeHandle as GL } from "react";
1
+ import { jsx as g, jsxs as R } from "react/jsx-runtime";
2
+ import { useState as mM, useRef as $, useCallback as GM, useEffect as q, useMemo as XM, useContext as ZL, createContext as aL, forwardRef as EL, useImperativeHandle as GL } from "react";
3
3
  const bL = [
4
4
  "afar",
5
5
  "tigray",
@@ -38,101 +38,101 @@ function sL({
38
38
  data: N,
39
39
  serviceStats: L = {},
40
40
  locations: j = [],
41
- selectedRegionId: S,
41
+ selectedRegionId: u,
42
42
  defaultSelectedRegionId: I = null,
43
- onRegionSelect: u,
44
- theme: C = "light",
43
+ onRegionSelect: S,
44
+ theme: z = "light",
45
45
  era: D,
46
46
  year: Q,
47
47
  layer: t,
48
- defaultLayer: z = "regions",
49
- onLayerChange: i,
50
- viewMode: g = "map",
51
- selectionAnimation: o = "pulse",
48
+ defaultLayer: T = "regions",
49
+ onLayerChange: c,
50
+ viewMode: G = "map",
51
+ selectionAnimation: y = "pulse",
52
52
  showLabels: e = !0,
53
53
  showMarkers: H = !1,
54
- showInMapStats: IM = !0,
55
- autoTour: Z = !1,
56
- autoTourSequence: a = bL,
57
- autoTourIntervalMs: G = 3200,
58
- regionColors: c = {}
54
+ showInMapStats: DM = !0,
55
+ autoTour: J = !1,
56
+ autoTourSequence: l = bL,
57
+ autoTourIntervalMs: o = 3200,
58
+ regionColors: i = {}
59
59
  }) {
60
- const [V, DM] = mM(I), [J, B] = mM(z), m = $(0), wM = S !== void 0, b = t !== void 0, CM = wM ? S : V, MM = b ? t : J, gM = CM ? N[CM] : null, f = GM(
61
- (n) => {
62
- wM || DM(n), u == null || u({
63
- regionId: n,
64
- region: n ? N[n] : null
60
+ const [h, wM] = mM(I), [b, B] = mM(T), m = $(0), zM = u !== void 0, a = t !== void 0, MM = zM ? u : h, LM = a ? t : b, gM = MM ? N[MM] : null, f = GM(
61
+ (V) => {
62
+ zM || wM(V), S == null || S({
63
+ regionId: V,
64
+ region: V ? N[V] : null
65
65
  });
66
66
  },
67
- [wM, N, u]
68
- ), TM = GM(
69
- (n) => {
70
- b || B(n), i == null || i(n);
67
+ [zM, N, S]
68
+ ), CM = GM(
69
+ (V) => {
70
+ a || B(V), c == null || c(V);
71
71
  },
72
- [b, i]
72
+ [a, c]
73
73
  );
74
74
  q(() => {
75
- if (!Z || a.length === 0) {
75
+ if (!J || l.length === 0) {
76
76
  m.current = 0;
77
77
  return;
78
78
  }
79
- const n = () => {
80
- const Y = a[m.current] ?? null;
81
- m.current = (m.current + 1) % a.length, f(Y);
79
+ const V = () => {
80
+ const Y = l[m.current] ?? null;
81
+ m.current = (m.current + 1) % l.length, f(Y);
82
82
  };
83
- m.current = 0, n();
84
- const uM = window.setInterval(n, G);
83
+ m.current = 0, V();
84
+ const TM = window.setInterval(V, o);
85
85
  return () => {
86
- window.clearInterval(uM);
86
+ window.clearInterval(TM);
87
87
  };
88
- }, [Z, G, a, f]);
89
- const F = pM(
88
+ }, [J, o, l, f]);
89
+ const F = XM(
90
90
  () => ({
91
91
  data: N,
92
92
  serviceStats: L,
93
93
  locations: j,
94
- regionColors: c,
95
- selectedRegionId: CM ?? null,
94
+ regionColors: i,
95
+ selectedRegionId: MM ?? null,
96
96
  selectedRegion: gM,
97
97
  selectRegion: f,
98
- setLayer: TM,
99
- theme: C,
98
+ setLayer: CM,
99
+ theme: z,
100
100
  era: D,
101
101
  year: Q,
102
- layer: MM,
103
- viewMode: g,
104
- selectionAnimation: o,
102
+ layer: LM,
103
+ viewMode: G,
104
+ selectionAnimation: y,
105
105
  showLabels: e,
106
106
  showMarkers: H,
107
- showInMapStats: IM,
108
- autoTour: Z,
109
- autoTourSequence: a,
110
- autoTourIntervalMs: G
107
+ showInMapStats: DM,
108
+ autoTour: J,
109
+ autoTourSequence: l,
110
+ autoTourIntervalMs: o
111
111
  }),
112
112
  [
113
113
  N,
114
114
  L,
115
115
  j,
116
- c,
117
- CM,
116
+ i,
117
+ MM,
118
118
  gM,
119
119
  f,
120
- TM,
121
- C,
120
+ CM,
121
+ z,
122
122
  D,
123
123
  Q,
124
- MM,
125
- g,
126
- o,
124
+ LM,
125
+ G,
126
+ y,
127
127
  e,
128
128
  H,
129
- IM,
130
- Z,
131
- a,
132
- G
129
+ DM,
130
+ J,
131
+ l,
132
+ o
133
133
  ]
134
134
  );
135
- return /* @__PURE__ */ U(xL.Provider, { value: F, children: M });
135
+ return /* @__PURE__ */ g(xL.Provider, { value: F, children: M });
136
136
  }
137
137
  function bM() {
138
138
  const M = ZL(xL);
@@ -144,7 +144,7 @@ function yN({
144
144
  children: M,
145
145
  ...N
146
146
  }) {
147
- return /* @__PURE__ */ U(sL, { ...N, children: M });
147
+ return /* @__PURE__ */ g(sL, { ...N, children: M });
148
148
  }
149
149
  const LL = [
150
150
  { id: "addis-ababa", svgId: "path331", altSvgId: "ET-AA" },
@@ -166,16 +166,16 @@ const LL = [
166
166
  function AL(M) {
167
167
  return Math.max(...Object.values(M).map((N) => N.value), 1);
168
168
  }
169
- function vM(M, N, L) {
169
+ function pM(M, N, L) {
170
170
  const j = L[M] || N[M].color;
171
171
  if (j) return j;
172
- const S = N[M].value / AL(N), I = 84 - S * 36;
173
- return `hsl(158 ${24 + S * 20}% ${I}%)`;
172
+ const u = N[M].value / AL(N), I = 84 - u * 36;
173
+ return `hsl(158 ${24 + u * 20}% ${I}%)`;
174
174
  }
175
175
  function pL(M, N) {
176
- return N === "percent" ? `${M}%` : Math.abs(M) >= 1e4 ? nM(M) : new Intl.NumberFormat().format(M);
176
+ return N === "percent" ? `${M}%` : Math.abs(M) >= 1e4 ? vM(M) : new Intl.NumberFormat().format(M);
177
177
  }
178
- function nM(M) {
178
+ function vM(M) {
179
179
  return M == null || M === "" ? "--" : typeof M != "number" ? String(M) : new Intl.NumberFormat("en", {
180
180
  notation: Math.abs(M) >= 1e4 ? "compact" : "standard",
181
181
  maximumFractionDigits: (Math.abs(M) >= 1e4, 1)
@@ -213,116 +213,133 @@ function tL({
213
213
  style: N,
214
214
  listClassName: L,
215
215
  listStyle: j,
216
- title: S = "Select a region",
216
+ title: u = "Select a region",
217
217
  kicker: I = "Regional services",
218
- regionName: u,
219
- regionValue: C,
218
+ regionName: S,
219
+ regionValue: z,
220
220
  services: D = _L,
221
221
  emptyText: Q = "No regional indicators were found for this region.",
222
222
  variant: t = "card",
223
- incrementalRows: z,
224
- getBarPercent: i
223
+ incrementalRows: T,
224
+ getBarPercent: c,
225
+ onClose: G
225
226
  }) {
226
- const g = pM(
227
- () => MN(z, t),
227
+ const y = XM(
228
+ () => MN(T, t),
228
229
  [
229
- z == null ? void 0 : z.enabled,
230
- z == null ? void 0 : z.initialCount,
231
- z == null ? void 0 : z.step,
232
- z == null ? void 0 : z.thresholdPx,
233
- z == null ? void 0 : z.showMoreFallback,
234
- z == null ? void 0 : z.animateNewRows,
235
- z == null ? void 0 : z.rowAnimationDelayMs,
236
- z == null ? void 0 : z.rowAnimationDurationMs,
237
- z == null ? void 0 : z.sentinelVisible,
230
+ T == null ? void 0 : T.enabled,
231
+ T == null ? void 0 : T.initialCount,
232
+ T == null ? void 0 : T.step,
233
+ T == null ? void 0 : T.thresholdPx,
234
+ T == null ? void 0 : T.showMoreFallback,
235
+ T == null ? void 0 : T.animateNewRows,
236
+ T == null ? void 0 : T.rowAnimationDelayMs,
237
+ T == null ? void 0 : T.rowAnimationDurationMs,
238
+ T == null ? void 0 : T.sentinelVisible,
238
239
  t
239
240
  ]
240
- ), o = pM(
241
+ ), e = XM(
241
242
  () => Math.max(...D.map((Y) => Y.value), 1),
242
243
  [D]
243
- ), e = $(null), H = $(null), IM = $(0), [Z, a] = mM(
244
- () => g.enabled ? Math.min(g.initialCount, D.length) : D.length
244
+ ), H = $(null), DM = $(null), J = $(0), [l, o] = mM(
245
+ () => y.enabled ? Math.min(y.initialCount, D.length) : D.length
245
246
  );
246
247
  q(() => {
247
- a(
248
- g.enabled ? Math.min(g.initialCount, D.length) : D.length
248
+ o(
249
+ y.enabled ? Math.min(y.initialCount, D.length) : D.length
249
250
  );
250
- }, [g.enabled, g.initialCount, D, D.length, u]);
251
- const G = GM(() => {
252
- g.enabled && a(
253
- (Y) => Math.min(D.length, Y + g.step)
251
+ }, [
252
+ y.enabled,
253
+ y.initialCount,
254
+ D,
255
+ D.length,
256
+ S
257
+ ]);
258
+ const i = GM(() => {
259
+ y.enabled && o(
260
+ (Y) => Math.min(D.length, Y + y.step)
254
261
  );
255
- }, [g.enabled, g.step, D.length]), c = GM(
262
+ }, [y.enabled, y.step, D.length]), h = GM(
256
263
  (Y) => {
257
- const LM = H.current;
258
- return (LM ? LM.offsetTop - Y.scrollTop - Y.clientHeight : Y.scrollHeight - Y.scrollTop - Y.clientHeight) <= g.thresholdPx;
264
+ const NM = DM.current;
265
+ return (NM ? NM.offsetTop - Y.scrollTop - Y.clientHeight : Y.scrollHeight - Y.scrollTop - Y.clientHeight) <= y.thresholdPx;
259
266
  },
260
- [g.thresholdPx]
261
- ), V = GM(
267
+ [y.thresholdPx]
268
+ ), wM = GM(
262
269
  (Y) => {
263
- !g.enabled || Z >= D.length || c(Y.currentTarget) && G();
270
+ !y.enabled || l >= D.length || h(Y.currentTarget) && i();
264
271
  },
265
272
  [
266
- G,
267
- g.enabled,
268
- c,
273
+ i,
274
+ y.enabled,
275
+ h,
269
276
  D.length,
270
- Z
277
+ l
271
278
  ]
272
- ), DM = GM(
279
+ ), b = GM(
273
280
  (Y) => {
274
- const LM = e.current;
275
- if (!g.enabled || Y.deltaY <= 0 || Z >= D.length || !LM || !c(LM))
281
+ const NM = H.current;
282
+ if (!y.enabled || Y.deltaY <= 0 || l >= D.length || !NM || !h(NM))
276
283
  return;
277
284
  const yM = Date.now();
278
- yM - IM.current < $L || (IM.current = yM, G());
285
+ yM - J.current < $L || (J.current = yM, i());
279
286
  },
280
287
  [
281
- G,
282
- g.enabled,
288
+ i,
289
+ y.enabled,
283
290
  D.length,
284
- c,
285
- Z
291
+ h,
292
+ l
286
293
  ]
287
- ), J = g.enabled ? D.slice(0, Z) : D, B = g.enabled && Z < D.length, m = u || S, wM = t === "overlay", b = t === "overlay" ? ZM("map-stat-overlay", "visible", M) : ZM("ethiopia-map-panel", "ethiopia-region-services", M), CM = t === "overlay" ? "map-stat-heading" : "ethiopia-map-panel-heading", MM = t === "overlay" ? "map-stat-index" : "ethiopia-service-index", gM = t === "overlay" ? "map-stat-list" : "ethiopia-service-list", f = t === "overlay" ? "map-stat-row" : "ethiopia-service-row", TM = t === "overlay" ? "map-stat-copy" : "ethiopia-service-copy", F = t === "overlay" ? "map-stat-comparison" : "ethiopia-service-comparison", n = t === "overlay" ? "map-stat-empty" : "ethiopia-empty-state", uM = t === "overlay" ? "map-stat-show-more" : "ethiopia-service-show-more";
288
- return /* @__PURE__ */ l(
294
+ ), B = y.enabled ? D.slice(0, l) : D, m = y.enabled && l < D.length, zM = S || u, a = t === "overlay", MM = t === "overlay" ? ZM("map-stat-overlay", "visible", M) : ZM("ethiopia-map-panel", "ethiopia-region-services", M), LM = t === "overlay" ? "map-stat-heading" : "ethiopia-map-panel-heading", gM = t === "overlay" ? "map-stat-list" : "ethiopia-service-list", f = t === "overlay" ? "map-stat-row" : "ethiopia-service-row", CM = t === "overlay" ? "map-stat-copy" : "ethiopia-service-copy", F = t === "overlay" ? "map-stat-comparison" : "ethiopia-service-comparison", V = t === "overlay" ? "map-stat-empty" : "ethiopia-empty-state", TM = t === "overlay" ? "map-stat-show-more" : "ethiopia-service-show-more";
295
+ return /* @__PURE__ */ R(
289
296
  "section",
290
297
  {
291
- className: b,
298
+ className: MM,
292
299
  style: N,
293
- onWheel: g.enabled ? DM : void 0,
300
+ onWheel: y.enabled ? b : void 0,
294
301
  children: [
295
- /* @__PURE__ */ l("div", { className: CM, children: [
296
- /* @__PURE__ */ l("div", { children: [
297
- /* @__PURE__ */ U("p", { className: "ethiopia-map-kicker", children: I }),
298
- /* @__PURE__ */ U("h2", { children: m })
302
+ /* @__PURE__ */ R("div", { className: LM, children: [
303
+ /* @__PURE__ */ R("div", { children: [
304
+ /* @__PURE__ */ g("p", { className: "ethiopia-map-kicker", children: I }),
305
+ /* @__PURE__ */ g("h2", { children: zM })
299
306
  ] }),
300
- /* @__PURE__ */ U("span", { className: MM, children: nM(C) })
307
+ /* @__PURE__ */ g("div", { className: "ethiopia-panel-heading-actions", children: G ? /* @__PURE__ */ g(
308
+ "button",
309
+ {
310
+ type: "button",
311
+ className: "ethiopia-panel-close-btn",
312
+ onClick: G,
313
+ "aria-label": "Close panel",
314
+ title: "Close selection",
315
+ children: "✕"
316
+ }
317
+ ) : null })
301
318
  ] }),
302
- D.length === 0 ? /* @__PURE__ */ U("div", { className: n, children: Q }) : /* @__PURE__ */ l(
319
+ D.length === 0 ? /* @__PURE__ */ g("div", { className: V, children: Q }) : /* @__PURE__ */ R(
303
320
  "div",
304
321
  {
305
- ref: e,
322
+ ref: H,
306
323
  className: ZM(gM, L),
307
324
  style: j,
308
- tabIndex: g.enabled ? 0 : void 0,
309
- onScroll: g.enabled ? V : void 0,
325
+ tabIndex: y.enabled ? 0 : void 0,
326
+ onScroll: y.enabled ? wM : void 0,
310
327
  children: [
311
- J.map((Y, LM) => {
328
+ B.map((Y, NM) => {
312
329
  var eM;
313
- const yM = g.enabled ? LM % g.step : LM, HM = (i == null ? void 0 : i(Y)) ?? Math.max(5, Math.round(Y.value / o * 100)), QM = wM ? {
314
- "--delay": g.animateNewRows ? `${Math.min(yM, 18) * g.rowAnimationDelayMs}ms` : "0ms",
315
- "--row-animation-duration": `${g.rowAnimationDurationMs}ms`
330
+ const yM = y.enabled ? NM % y.step : NM, HM = (c == null ? void 0 : c(Y)) ?? Math.max(5, Math.round(Y.value / e * 100)), QM = a ? {
331
+ "--delay": y.animateNewRows ? `${Math.min(yM, 18) * y.rowAnimationDelayMs}ms` : "0ms",
332
+ "--row-animation-duration": `${y.rowAnimationDurationMs}ms`
316
333
  } : void 0;
317
- return /* @__PURE__ */ l("div", { className: f, style: QM, children: [
318
- /* @__PURE__ */ l("div", { className: TM, children: [
319
- /* @__PURE__ */ U("span", { children: Y.label }),
320
- /* @__PURE__ */ l("strong", { children: [
334
+ return /* @__PURE__ */ R("div", { className: f, style: QM, children: [
335
+ /* @__PURE__ */ R("div", { className: CM, children: [
336
+ /* @__PURE__ */ g("span", { children: Y.label }),
337
+ /* @__PURE__ */ R("strong", { children: [
321
338
  pL(Y.value, Y.valueKind),
322
339
  Y.unit ? ` ${Y.unit}` : ""
323
340
  ] })
324
341
  ] }),
325
- (eM = Y.comparison) != null && eM.enabled ? /* @__PURE__ */ l(
342
+ (eM = Y.comparison) != null && eM.enabled ? /* @__PURE__ */ R(
326
343
  "div",
327
344
  {
328
345
  className: ZM(
@@ -330,8 +347,8 @@ function tL({
330
347
  Y.comparison.outcome
331
348
  ),
332
349
  children: [
333
- /* @__PURE__ */ U("span", { children: Y.comparison.outcome }),
334
- /* @__PURE__ */ l("strong", { children: [
350
+ /* @__PURE__ */ g("span", { children: Y.comparison.outcome }),
351
+ /* @__PURE__ */ R("strong", { children: [
335
352
  Y.comparison.direction === "decrease" ? "-" : "+",
336
353
  Y.comparison.percent,
337
354
  "% vs ",
@@ -340,26 +357,26 @@ function tL({
340
357
  ]
341
358
  }
342
359
  ) : null,
343
- wM ? /* @__PURE__ */ U("div", { className: "map-stat-bar", "aria-hidden": "true", children: /* @__PURE__ */ U("i", { style: { width: `${HM}%` } }) }) : null
360
+ a ? /* @__PURE__ */ g("div", { className: "map-stat-bar", "aria-hidden": "true", children: /* @__PURE__ */ g("i", { style: { width: `${HM}%` } }) }) : null
344
361
  ] }, Y.label);
345
362
  }),
346
- B ? /* @__PURE__ */ U(
363
+ m ? /* @__PURE__ */ g(
347
364
  "div",
348
365
  {
349
- ref: H,
366
+ ref: DM,
350
367
  className: ZM(
351
368
  t === "overlay" ? "map-stat-scroll-sentinel" : "ethiopia-service-scroll-sentinel",
352
- g.sentinelVisible ? "visible" : "hidden"
369
+ y.sentinelVisible ? "visible" : "hidden"
353
370
  ),
354
- children: g.sentinelVisible ? /* @__PURE__ */ U("span", { children: "More indicators" }) : null
371
+ children: y.sentinelVisible ? /* @__PURE__ */ g("span", { children: "More indicators" }) : null
355
372
  }
356
373
  ) : null,
357
- B && g.showMoreFallback ? /* @__PURE__ */ U(
374
+ m && y.showMoreFallback ? /* @__PURE__ */ g(
358
375
  "button",
359
376
  {
360
- className: uM,
377
+ className: TM,
361
378
  type: "button",
362
- onClick: G,
379
+ onClick: i,
363
380
  children: "Show more"
364
381
  }
365
382
  ) : null
@@ -385,14 +402,14 @@ function wL(M, N) {
385
402
  const L = cL(M, N);
386
403
  return L === "11-region" ? XL : L === "12-region" ? VL : L === "13-region" ? hL : jL;
387
404
  }
388
- const CL = [], rM = {
405
+ const CL = [], FM = {
389
406
  scale: 1.095,
390
407
  offsetX: 28,
391
408
  offsetY: 24
392
409
  };
393
410
  function _(M) {
394
- const [N, L, j, S] = M.split(/\s+/).map(Number);
395
- return { x: N, y: L, width: j, height: S };
411
+ const [N, L, j, u] = M.split(/\s+/).map(Number);
412
+ return { x: N, y: L, width: j, height: u };
396
413
  }
397
414
  function YM(M) {
398
415
  return `${M.x} ${M.y} ${M.width} ${M.height}`;
@@ -407,23 +424,23 @@ function TL(M) {
407
424
  };
408
425
  }
409
426
  function YL(M, N) {
410
- const L = _(p), j = TL(M), S = TL(N), I = Math.hypot(
411
- S.x - j.x,
412
- S.y - j.y
413
- ), u = Math.hypot(L.width, L.height), C = u ? I / u : 0, D = Math.max(
427
+ const L = _(p), j = TL(M), u = TL(N), I = Math.hypot(
428
+ u.x - j.x,
429
+ u.y - j.y
430
+ ), S = Math.hypot(L.width, L.height), z = S ? I / S : 0, D = Math.max(
414
431
  M.width / N.width,
415
432
  N.width / M.width
416
433
  ), Q = Math.max(
417
434
  M.height / N.height,
418
435
  N.height / M.height
419
436
  ), t = Math.log2(Math.max(D, Q, 1));
420
- return C * 1.15 + t * 0.42;
437
+ return z * 1.15 + t * 0.42;
421
438
  }
422
439
  function uL() {
423
- const M = _(p), N = M.width * rM.scale, L = M.height * rM.scale;
440
+ const M = _(p), N = M.width * FM.scale, L = M.height * FM.scale;
424
441
  return {
425
- x: M.x - (N - M.width) / 2 + rM.offsetX,
426
- y: M.y - (L - M.height) / 2 + rM.offsetY,
442
+ x: M.x - (N - M.width) / 2 + FM.offsetX,
443
+ y: M.y - (L - M.height) / 2 + FM.offsetY,
427
444
  width: N,
428
445
  height: L
429
446
  };
@@ -438,7 +455,7 @@ function LN(M) {
438
455
  function SL(M) {
439
456
  return M.toLowerCase().replace(/[^a-z0-9]+/g, "");
440
457
  }
441
- function XM(M) {
458
+ function rM(M) {
442
459
  return M < 0.5 ? 4 * M * M * M : 1 - Math.pow(-2 * M + 2, 3) / 2;
443
460
  }
444
461
  function $M(M) {
@@ -449,47 +466,47 @@ function NL(M, N) {
449
466
  return !L || !j ? new DOMMatrix() : L.inverse().multiply(j);
450
467
  }
451
468
  function NN(M, N) {
452
- const L = N.getBBox(), j = NL(M, N), S = [
469
+ const L = N.getBBox(), j = NL(M, N), u = [
453
470
  new DOMPoint(L.x, L.y),
454
471
  new DOMPoint(L.x + L.width, L.y),
455
472
  new DOMPoint(L.x + L.width, L.y + L.height),
456
473
  new DOMPoint(L.x, L.y + L.height)
457
- ].map((C) => C.matrixTransform(j)), I = S.map((C) => C.x), u = S.map((C) => C.y);
474
+ ].map((z) => z.matrixTransform(j)), I = u.map((z) => z.x), S = u.map((z) => z.y);
458
475
  return {
459
476
  x: Math.min(...I),
460
- y: Math.min(...u),
477
+ y: Math.min(...S),
461
478
  width: Math.max(...I) - Math.min(...I),
462
- height: Math.max(...u) - Math.min(...u)
479
+ height: Math.max(...S) - Math.min(...S)
463
480
  };
464
481
  }
465
482
  function zL(M, N) {
466
- const L = NN(M, N), j = _(p), S = Math.max(L.width, L.height) * 0.18, I = S, u = Math.max(j.width * 0.4, L.width * 0.84, 680), C = L.width + I + u, D = j.width * 0.54, Q = j.height * 0.38, t = Math.min(
483
+ const L = NN(M, N), j = _(p), u = Math.max(L.width, L.height) * 0.18, I = u, S = Math.max(j.width * 0.4, L.width * 0.84, 680), z = L.width + I + S, D = j.width * 0.54, Q = j.height * 0.38, t = Math.min(
467
484
  j.width,
468
- Math.max(C, D)
469
- ), z = Math.min(
485
+ Math.max(z, D)
486
+ ), T = Math.min(
470
487
  j.height,
471
- Math.max(L.height + S * 2, Q)
472
- ), i = j.y + j.height - z;
488
+ Math.max(L.height + u * 2, Q)
489
+ ), c = j.y + j.height - T;
473
490
  return {
474
- x: Math.max(j.x, L.x + L.width + u - t),
475
- y: Math.max(j.y, Math.min(L.y + L.height / 2 - z / 2, i)),
491
+ x: Math.max(j.x, L.x + L.width + S - t),
492
+ y: Math.max(j.y, Math.min(L.y + L.height / 2 - T / 2, c)),
476
493
  width: t,
477
- height: z
494
+ height: T
478
495
  };
479
496
  }
480
- function _M(M, N, L, j, S = 850) {
497
+ function _M(M, N, L, j, u = 850) {
481
498
  L.current && (window.cancelAnimationFrame(L.current), L.current = null);
482
- const I = _(M.getAttribute("viewBox") || p), u = performance.now(), C = ++j.current, D = M.closest(".ethiopia-map-surface");
499
+ const I = _(M.getAttribute("viewBox") || p), S = performance.now(), z = ++j.current, D = M.closest(".ethiopia-map-surface");
483
500
  D == null || D.classList.add("zooming");
484
501
  const Q = (t) => {
485
- if (C !== j.current) return;
486
- const z = Math.min(1, (t - u) / S), i = XM(z), g = {
487
- x: I.x + (N.x - I.x) * i,
488
- y: I.y + (N.y - I.y) * i,
489
- width: I.width + (N.width - I.width) * i,
490
- height: I.height + (N.height - I.height) * i
502
+ if (z !== j.current) return;
503
+ const T = Math.min(1, (t - S) / u), c = rM(T), G = {
504
+ x: I.x + (N.x - I.x) * c,
505
+ y: I.y + (N.y - I.y) * c,
506
+ width: I.width + (N.width - I.width) * c,
507
+ height: I.height + (N.height - I.height) * c
491
508
  };
492
- M.setAttribute("viewBox", YM(g)), z < 1 ? L.current = window.requestAnimationFrame(Q) : (L.current = null, M.setAttribute("viewBox", YM(N)), D == null || D.classList.remove("zooming"));
509
+ M.setAttribute("viewBox", YM(G)), T < 1 ? L.current = window.requestAnimationFrame(Q) : (L.current = null, M.setAttribute("viewBox", YM(N)), D == null || D.classList.remove("zooming"));
493
510
  };
494
511
  L.current = window.requestAnimationFrame(Q);
495
512
  }
@@ -502,13 +519,13 @@ function gL(M) {
502
519
  return iL(760 + j * 680, 850, 1900);
503
520
  }
504
521
  function AN(M, N, L) {
505
- const j = M.getBBox(), S = L / Math.max(1, j.width), I = 30 / Math.max(1, j.height);
522
+ const j = M.getBBox(), u = L / Math.max(1, j.width), I = 30 / Math.max(1, j.height);
506
523
  return {
507
- a: S,
524
+ a: u,
508
525
  b: 0,
509
526
  c: 0,
510
527
  d: I,
511
- e: 420 - j.x * S,
528
+ e: 420 - j.x * u,
512
529
  f: N - j.y * I
513
530
  };
514
531
  }
@@ -537,19 +554,19 @@ const QL = [
537
554
  ];
538
555
  function IN(M) {
539
556
  const N = M.cloneNode(!0), L = M.querySelectorAll("*");
540
- return N.querySelectorAll("*").forEach((S, I) => {
541
- const u = L[I];
542
- if (!u) return;
543
- const C = getComputedStyle(u);
557
+ return N.querySelectorAll("*").forEach((u, I) => {
558
+ const S = L[I];
559
+ if (!S) return;
560
+ const z = getComputedStyle(S);
544
561
  for (const D of QL) {
545
- const Q = C.getPropertyValue(D);
546
- Q && Q !== "none" && !Q.startsWith("0px") && S.style.setProperty(D, Q);
562
+ const Q = z.getPropertyValue(D);
563
+ Q && Q !== "none" && !Q.startsWith("0px") && u.style.setProperty(D, Q);
547
564
  }
548
- }), N.querySelectorAll("[href]").forEach((S) => {
549
- const I = S.getAttribute("href");
565
+ }), N.querySelectorAll("[href]").forEach((u) => {
566
+ const I = u.getAttribute("href");
550
567
  if (I && !I.startsWith("http") && !I.startsWith("data:"))
551
568
  try {
552
- S.setAttribute("href", new URL(I, document.baseURI).href);
569
+ u.setAttribute("href", new URL(I, document.baseURI).href);
553
570
  } catch {
554
571
  }
555
572
  }), N;
@@ -557,9 +574,9 @@ function IN(M) {
557
574
  function DN(M) {
558
575
  M.querySelectorAll("*").forEach((L) => {
559
576
  const j = getComputedStyle(L);
560
- for (const S of QL) {
561
- const I = j.getPropertyValue(S);
562
- I && I !== "none" && !I.startsWith("0px") && L.style.setProperty(S, I);
577
+ for (const u of QL) {
578
+ const I = j.getPropertyValue(u);
579
+ I && I !== "none" && !I.startsWith("0px") && L.style.setProperty(u, I);
563
580
  }
564
581
  }), M.querySelectorAll("[href]").forEach((L) => {
565
582
  const j = L.getAttribute("href");
@@ -571,22 +588,22 @@ function DN(M) {
571
588
  });
572
589
  }
573
590
  function yL(M, N = !1) {
574
- const L = M.getAttribute("viewBox") || p, j = _(L), S = j.width / j.height, I = 2400, u = Math.round(I / S), C = document.createElement("canvas");
575
- C.width = I, C.height = u;
576
- const D = C.getContext("2d");
591
+ const L = M.getAttribute("viewBox") || p, j = _(L), u = j.width / j.height, I = 2400, S = Math.round(I / u), z = document.createElement("canvas");
592
+ z.width = I, z.height = S;
593
+ const D = z.getContext("2d");
577
594
  if (!D) return Promise.reject(new Error("Could not get canvas context"));
578
595
  const Q = IN(M);
579
- Q.setAttribute("width", String(I)), Q.setAttribute("height", String(u)), Q.setAttribute("viewBox", L);
580
- const t = new XMLSerializer().serializeToString(Q), z = new Blob([t], {
596
+ Q.setAttribute("width", String(I)), Q.setAttribute("height", String(S)), Q.setAttribute("viewBox", L);
597
+ const t = new XMLSerializer().serializeToString(Q), T = new Blob([t], {
581
598
  type: "image/svg+xml;charset=utf-8"
582
- }), i = URL.createObjectURL(z);
583
- return new Promise((g, o) => {
599
+ }), c = URL.createObjectURL(T);
600
+ return new Promise((G, y) => {
584
601
  const e = new Image();
585
602
  e.onload = () => {
586
- N && (D.fillStyle = "#ffffff", D.fillRect(0, 0, I, u)), D.drawImage(e, 0, 0, I, u), URL.revokeObjectURL(i), kL(D, I, u), g(C);
603
+ N && (D.fillStyle = "#ffffff", D.fillRect(0, 0, I, S)), D.drawImage(e, 0, 0, I, S), URL.revokeObjectURL(c), kL(D, I, S), G(z);
587
604
  }, e.onerror = () => {
588
- URL.revokeObjectURL(i), o(new Error("Failed to render SVG to canvas"));
589
- }, e.src = i;
605
+ URL.revokeObjectURL(c), y(new Error("Failed to render SVG to canvas"));
606
+ }, e.src = c;
590
607
  });
591
608
  }
592
609
  let aM = null;
@@ -598,8 +615,8 @@ let aM = null;
598
615
  })();
599
616
  function kL(M, N, L) {
600
617
  if (!aM || !aM.naturalWidth) return;
601
- const j = Math.round(L * 0.1), S = Math.round(j * (aM.naturalWidth / aM.naturalHeight)), I = Math.round(N * 0.025);
602
- M.drawImage(aM, N - S - I, L - j - I, S, j);
618
+ const j = Math.round(L * 0.1), u = Math.round(j * (aM.naturalWidth / aM.naturalHeight)), I = Math.round(N * 0.025);
619
+ M.drawImage(aM, N - u - I, L - j - I, u, j);
603
620
  }
604
621
  function ML(M, N) {
605
622
  const L = document.createElement("a");
@@ -609,82 +626,82 @@ const wN = EL(function({
609
626
  className: N,
610
627
  style: L,
611
628
  svgText: j,
612
- svgUrl: S,
629
+ svgUrl: u,
613
630
  terrainImageUrl: I = eL,
614
- inMapStatsClassName: u,
615
- inMapStatsStyle: C,
631
+ inMapStatsClassName: S,
632
+ inMapStatsStyle: z,
616
633
  inMapStatsListClassName: D,
617
634
  inMapStatsListStyle: Q,
618
635
  inMapStatsEmptyText: t = "No regional indicators were found for this region.",
619
- incrementalRows: z,
620
- showLayerControl: i = !1,
621
- layerControlClassName: g,
622
- layerControlLabels: o,
636
+ incrementalRows: T,
637
+ showLayerControl: c = !1,
638
+ layerControlClassName: G,
639
+ layerControlLabels: y,
623
640
  alignX: e = 37,
624
641
  alignY: H = 55,
625
- alignScale: IM = 2.212,
626
- showGhostReference: Z = !1
627
- }, a) {
628
- const G = $(null), c = $(null), V = $(0), DM = $(null), [J, B] = mM(null), {
642
+ alignScale: DM = 2.212,
643
+ showGhostReference: J = !1
644
+ }, l) {
645
+ const o = $(null), i = $(null), h = $(0), wM = $(null), [b, B] = mM(null), {
629
646
  data: m,
630
- regionColors: wM,
631
- selectedRegionId: b,
632
- selectRegion: CM,
633
- layer: MM,
647
+ regionColors: zM,
648
+ selectedRegionId: a,
649
+ selectRegion: MM,
650
+ layer: LM,
634
651
  theme: gM,
635
652
  era: f,
636
- year: TM,
653
+ year: CM,
637
654
  viewMode: F,
638
- showLabels: n,
639
- selectionAnimation: uM,
655
+ showLabels: V,
656
+ selectionAnimation: TM,
640
657
  showInMapStats: Y,
641
- serviceStats: LM,
658
+ serviceStats: NM,
642
659
  selectedRegion: yM,
643
660
  setLayer: HM
644
- } = bM(), QM = $(CM), eM = $(/* @__PURE__ */ new Map()), IL = $(F), [JM, VM] = mM(
645
- () => j ?? wL(f, TM)
661
+ } = bM(), QM = $(MM), eM = $(/* @__PURE__ */ new Map()), IL = $(F), [JM, nM] = mM(
662
+ () => j ?? wL(f, CM)
646
663
  );
647
664
  q(() => {
648
- DM.current = b;
649
- }, [b]), q(() => {
665
+ wM.current = a;
666
+ }, [a]), q(() => {
650
667
  LN(I);
651
668
  }, [I]), q(() => {
652
- QM.current = CM;
653
- }, [CM]), q(() => {
654
- const y = new Map(
669
+ QM.current = MM;
670
+ }, [MM]), q(() => {
671
+ const U = new Map(
655
672
  Object.entries(m).map(([A, w]) => [SL(w.name), A])
656
673
  );
657
- y.set("oromiya", "oromia"), y.set("southern nations", "snnpr"), y.set("southern nations snnpr", "snnpr"), y.set("snnpr", "snnpr"), eM.current = y;
674
+ U.set("oromiya", "oromia"), U.set("southern nations", "snnpr"), U.set("southern nations snnpr", "snnpr"), U.set("snnpr", "snnpr"), eM.current = U;
658
675
  }, [m]), q(() => {
659
676
  if (j !== void 0) {
660
- VM(j);
677
+ nM(j);
661
678
  return;
662
679
  }
663
- if (!S) {
664
- VM(wL(f, TM));
680
+ if (!u) {
681
+ nM(wL(f, CM));
665
682
  return;
666
683
  }
667
- let y = !0;
668
- return fetch(S).then((A) => {
684
+ let U = !0;
685
+ return fetch(u).then((A) => {
669
686
  if (!A.ok)
670
687
  throw new Error(`Could not load SVG: ${A.status}`);
671
688
  return A.text();
672
689
  }).then((A) => {
673
- y && VM(A);
690
+ U && nM(A);
674
691
  }).catch(() => {
675
- y && VM("");
692
+ U && nM("");
676
693
  }), () => {
677
- y = !1;
694
+ U = !1;
678
695
  };
679
- }, [j, S, f, TM]), q(() => {
680
- const y = G.current;
681
- if (!y || !JM) return;
682
- y.innerHTML = JM;
683
- const A = y.querySelector("svg");
696
+ }, [j, u, f, CM]), q(() => {
697
+ const U = o.current;
698
+ if (!U || !JM) return;
699
+ U.innerHTML = JM;
700
+ const A = U.querySelector("svg");
684
701
  A && (A.classList.add("ethiopia-map"), A.querySelectorAll("title").forEach((w) => w.remove()), LL.forEach(({ id: w, svgId: s, altSvgId: E }) => {
685
702
  const O = A.querySelector(`#${CSS.escape(s)}`) || (E ? A.querySelector(`#${CSS.escape(E)}`) : null);
686
703
  O && (O.removeAttribute("style"), O.setAttribute("fill-rule", "evenodd"), O.setAttribute("stroke", "none"), O.dataset.region = w, O.classList.add("map-region"), O.style.cursor = "pointer", O.addEventListener("click", () => {
687
- B(null), QM.current(DM.current === w ? null : w);
704
+ B(null), QM.current(wM.current === w ? null : w);
688
705
  }), O.addEventListener("mouseenter", () => B(w)), O.addEventListener("mouseleave", () => B(null)), O.addEventListener("pointerover", () => B(w)), O.addEventListener("pointerout", () => B(null)));
689
706
  }), A.querySelectorAll("path, polygon").forEach((w) => {
690
707
  w.classList.contains("map-region") || (w.style.display = "none");
@@ -706,29 +723,29 @@ const wN = EL(function({
706
723
  );
707
724
  s && (w.dataset.regionLabel = s, w.style.cursor = "pointer", w.addEventListener("click", (E) => {
708
725
  E.stopPropagation(), B(null), QM.current(
709
- DM.current === s ? null : s
726
+ wM.current === s ? null : s
710
727
  );
711
728
  }), w.addEventListener("mouseenter", () => B(s)), w.addEventListener("mouseleave", () => B(null)), w.addEventListener("pointerover", () => B(s)), w.addEventListener("pointerout", () => B(null)));
712
729
  }));
713
730
  }, [JM]), q(() => {
714
- const y = G.current, A = y == null ? void 0 : y.querySelector("svg");
731
+ const U = o.current, A = U == null ? void 0 : U.querySelector("svg");
715
732
  if (!A) return;
716
- if (cL(f, TM) === "11-region") {
733
+ if (cL(f, CM) === "11-region") {
717
734
  A.setAttribute("viewBox", p);
718
735
  let s = A.querySelector("#ethiopia-11-alignment-group");
719
736
  if (!s) {
720
737
  s = document.createElementNS("http://www.w3.org/2000/svg", "g"), s.id = "ethiopia-11-alignment-group";
721
738
  const O = [];
722
- Array.from(A.children).forEach((R) => {
723
- !R.classList.contains("terrain-image-layer") && !R.classList.contains("bar-morph-layer") && !R.classList.contains("heat-layer") && R.id !== "ghost-reference-14-layer" && O.push(R);
724
- }), O.forEach((R) => s.appendChild(R)), A.appendChild(s);
739
+ Array.from(A.children).forEach((d) => {
740
+ !d.classList.contains("terrain-image-layer") && !d.classList.contains("bar-morph-layer") && !d.classList.contains("heat-layer") && d.id !== "ghost-reference-14-layer" && O.push(d);
741
+ }), O.forEach((d) => s.appendChild(d)), A.appendChild(s);
725
742
  }
726
743
  s.setAttribute(
727
744
  "transform",
728
- `translate(${e}, ${H}) scale(${IM})`
745
+ `translate(${e}, ${H}) scale(${DM})`
729
746
  );
730
747
  let E = A.querySelector("#ghost-reference-14-layer");
731
- Z ? (E || (E = document.createElementNS("http://www.w3.org/2000/svg", "g"), E.id = "ghost-reference-14-layer", E.style.pointerEvents = "none", new DOMParser().parseFromString(jL, "image/svg+xml").querySelectorAll("path").forEach((x) => {
748
+ J ? (E || (E = document.createElementNS("http://www.w3.org/2000/svg", "g"), E.id = "ghost-reference-14-layer", E.style.pointerEvents = "none", new DOMParser().parseFromString(jL, "image/svg+xml").querySelectorAll("path").forEach((x) => {
732
749
  const k = document.createElementNS("http://www.w3.org/2000/svg", "path");
733
750
  k.setAttribute("d", x.getAttribute("d") || ""), k.setAttribute("fill", "rgba(225, 29, 72, 0.06)"), k.setAttribute("stroke", "#e11d48"), k.setAttribute("stroke-width", "2.5"), k.setAttribute("stroke-dasharray", "5 5"), k.setAttribute("opacity", "0.65"), E.appendChild(k);
734
751
  }), A.insertBefore(E, A.firstChild)), E.style.display = "block") : E && (E.style.display = "none");
@@ -742,39 +759,39 @@ const wN = EL(function({
742
759
  const E = A.querySelector("#ghost-reference-14-layer");
743
760
  E && E.remove();
744
761
  }
745
- }, [JM, f, TM, e, H, IM, Z]), q(() => {
746
- const y = G.current, A = y == null ? void 0 : y.querySelector("svg");
762
+ }, [JM, f, CM, e, H, DM, J]), q(() => {
763
+ const U = o.current, A = U == null ? void 0 : U.querySelector("svg");
747
764
  if (!A) return;
748
- const w = MM === "terrain", s = F === "bars", E = s && IL.current !== "bars";
749
- y == null || y.classList.toggle("terrain-mode", w), y == null || y.classList.toggle("light-mode", gM === "light"), y == null || y.classList.toggle("dark-mode", gM === "dark"), y == null || y.classList.toggle("bars-mode", s);
765
+ const w = LM === "terrain", s = F === "bars", E = s && IL.current !== "bars";
766
+ U == null || U.classList.toggle("terrain-mode", w), U == null || U.classList.toggle("light-mode", gM === "light"), U == null || U.classList.toggle("dark-mode", gM === "dark"), U == null || U.classList.toggle("bars-mode", s);
750
767
  let O = A.querySelector(".terrain-image-layer");
751
768
  if (!O) {
752
- const T = uL();
769
+ const C = uL();
753
770
  O = document.createElementNS("http://www.w3.org/2000/svg", "g"), O.classList.add("terrain-image-layer"), O.style.pointerEvents = "none", O.style.display = "none";
754
771
  const x = document.createElementNS("http://www.w3.org/2000/svg", "image");
755
- x.setAttribute("href", I), x.setAttribute("x", String(T.x)), x.setAttribute("y", String(T.y)), x.setAttribute("width", String(T.width)), x.setAttribute("height", String(T.height)), x.setAttribute("preserveAspectRatio", "none"), x.setAttribute("decoding", "async"), x.setAttribute("fetchpriority", "high"), x.style.pointerEvents = "none", O.appendChild(x), A.insertBefore(O, A.firstChild);
772
+ x.setAttribute("href", I), x.setAttribute("x", String(C.x)), x.setAttribute("y", String(C.y)), x.setAttribute("width", String(C.width)), x.setAttribute("height", String(C.height)), x.setAttribute("preserveAspectRatio", "none"), x.setAttribute("decoding", "async"), x.setAttribute("fetchpriority", "high"), x.style.pointerEvents = "none", O.appendChild(x), A.insertBefore(O, A.firstChild);
756
773
  }
757
774
  if (O) {
758
- const T = uL(), x = O.querySelector("image");
759
- x && (x.setAttribute("href", I), x.setAttribute("x", String(T.x)), x.setAttribute("y", String(T.y)), x.setAttribute("width", String(T.width)), x.setAttribute("height", String(T.height))), O.style.display = w && !s ? "block" : "none";
775
+ const C = uL(), x = O.querySelector("image");
776
+ x && (x.setAttribute("href", I), x.setAttribute("x", String(C.x)), x.setAttribute("y", String(C.y)), x.setAttribute("width", String(C.width)), x.setAttribute("height", String(C.height))), O.style.display = w && !s ? "block" : "none";
760
777
  }
761
- A.querySelectorAll("path:not(.map-region)").forEach((T) => {
762
- T.style.display = s ? "none" : "", T.style.fill = w ? "rgba(255, 255, 255, 0.02)" : "", T.style.opacity = w ? "0.34" : "", T.style.stroke = w ? "rgba(27, 35, 31, 0.26)" : "", T.style.vectorEffect = "non-scaling-stroke";
763
- }), A.querySelectorAll("#Dry_lakes").forEach((T) => {
764
- T.style.display = s ? "none" : "";
778
+ A.querySelectorAll("path:not(.map-region)").forEach((C) => {
779
+ C.style.display = s ? "none" : "", C.style.fill = w ? "rgba(255, 255, 255, 0.02)" : "", C.style.opacity = w ? "0.34" : "", C.style.stroke = w ? "rgba(27, 35, 31, 0.26)" : "", C.style.vectorEffect = "non-scaling-stroke";
780
+ }), A.querySelectorAll("#Dry_lakes").forEach((C) => {
781
+ C.style.display = s ? "none" : "";
765
782
  });
766
- let R = A.querySelector(".bar-morph-layer");
767
- if (R && R.remove(), s) {
768
- R = document.createElementNS("http://www.w3.org/2000/svg", "g"), R.classList.add("bar-morph-layer");
769
- const T = AL(m), x = Object.entries(m).sort(([, d], [, r]) => r.value - d.value), k = document.createElementNS("http://www.w3.org/2000/svg", "g");
770
- k.classList.add("bar-flight-layer"), R.appendChild(k), x.forEach(([d, r], kM) => {
771
- const xM = 120 + kM * 86, lM = Math.max(24, r.value / T * 880), oM = vM(d, m, wM), tM = A.querySelector(`[data-region="${d}"]`);
783
+ let d = A.querySelector(".bar-morph-layer");
784
+ if (d && d.remove(), s) {
785
+ d = document.createElementNS("http://www.w3.org/2000/svg", "g"), d.classList.add("bar-morph-layer");
786
+ const C = AL(m), x = Object.entries(m).sort(([, Z], [, r]) => r.value - Z.value), k = document.createElementNS("http://www.w3.org/2000/svg", "g");
787
+ k.classList.add("bar-flight-layer"), d.appendChild(k), x.forEach(([Z, r], kM) => {
788
+ const xM = 120 + kM * 86, lM = Math.max(24, r.value / C * 880), oM = pM(Z, m, zM), tM = A.querySelector(`[data-region="${Z}"]`);
772
789
  if (E && tM) {
773
- const h = tM.cloneNode(!1), W = NL(A, tM), UM = AN(tM, xM, lM), PM = 70 + kM * 38;
774
- h.removeAttribute("id"), h.removeAttribute("class"), h.classList.add("bar-region-ghost"), h.setAttribute("transform", $M(W)), h.style.fill = oM, h.style.stroke = "#ffffff", h.style.strokeWidth = "4px", h.style.vectorEffect = "non-scaling-stroke", h.style.pointerEvents = "none", k.appendChild(h), window.setTimeout(() => {
775
- const zM = performance.now(), X = (iM) => {
776
- if (!h.isConnected) return;
777
- const RM = Math.min(1, (iM - zM) / 920), sM = XM(RM), KM = {
790
+ const n = tM.cloneNode(!1), W = NL(A, tM), UM = AN(tM, xM, lM), PM = 70 + kM * 38;
791
+ n.removeAttribute("id"), n.removeAttribute("class"), n.classList.add("bar-region-ghost"), n.setAttribute("transform", $M(W)), n.style.fill = oM, n.style.stroke = "#ffffff", n.style.strokeWidth = "4px", n.style.vectorEffect = "non-scaling-stroke", n.style.pointerEvents = "none", k.appendChild(n), window.setTimeout(() => {
792
+ const SM = performance.now(), X = (iM) => {
793
+ if (!n.isConnected) return;
794
+ const RM = Math.min(1, (iM - SM) / 920), sM = rM(RM), KM = {
778
795
  a: W.a + (UM.a - W.a) * sM,
779
796
  b: W.b + (UM.b - W.b) * sM,
780
797
  c: W.c + (UM.c - W.c) * sM,
@@ -782,7 +799,7 @@ const wN = EL(function({
782
799
  e: W.e + (UM.e - W.e) * sM,
783
800
  f: W.f + (UM.f - W.f) * sM
784
801
  };
785
- h.setAttribute("transform", $M(KM)), h.style.opacity = String(0.96 - sM * 0.62), RM < 1 ? window.requestAnimationFrame(X) : h.style.opacity = "0";
802
+ n.setAttribute("transform", $M(KM)), n.style.opacity = String(0.96 - sM * 0.62), RM < 1 ? window.requestAnimationFrame(X) : n.style.opacity = "0";
786
803
  };
787
804
  window.requestAnimationFrame(X);
788
805
  }, PM);
@@ -790,58 +807,58 @@ const wN = EL(function({
790
807
  const cM = document.createElementNS("http://www.w3.org/2000/svg", "text");
791
808
  cM.setAttribute("x", "82"), cM.setAttribute("y", String(xM + 22)), cM.classList.add("bar-morph-label"), cM.textContent = r.name;
792
809
  const P = document.createElementNS("http://www.w3.org/2000/svg", "text");
793
- P.setAttribute("x", String(420 + lM + 12)), P.setAttribute("y", String(xM + 22)), P.style.textAnchor = "start", P.classList.add("bar-morph-value"), P.textContent = nM(r.value);
794
- const NM = document.createElementNS("http://www.w3.org/2000/svg", "rect");
795
- NM.setAttribute("x", "420"), NM.setAttribute("y", String(xM)), NM.setAttribute("width", "880"), NM.setAttribute("height", "30"), NM.classList.add("bar-morph-track");
810
+ P.setAttribute("x", String(420 + lM + 12)), P.setAttribute("y", String(xM + 22)), P.style.textAnchor = "start", P.classList.add("bar-morph-value"), P.textContent = vM(r.value);
811
+ const jM = document.createElementNS("http://www.w3.org/2000/svg", "rect");
812
+ jM.setAttribute("x", "420"), jM.setAttribute("y", String(xM)), jM.setAttribute("width", "880"), jM.setAttribute("height", "30"), jM.classList.add("bar-morph-track");
796
813
  const v = document.createElementNS("http://www.w3.org/2000/svg", "rect");
797
814
  v.setAttribute("x", "420"), v.setAttribute("y", String(xM)), v.setAttribute("width", String(lM)), v.setAttribute("height", "30"), v.setAttribute("rx", "4"), v.setAttribute("fill", oM), v.classList.add("bar-morph-bar");
798
- const SM = document.createElementNS("http://www.w3.org/2000/svg", "g");
799
- SM.classList.add("bar-row"), SM.style.opacity = E ? "0" : "1", SM.append(cM, NM, v, P), R == null || R.appendChild(SM), E && window.setTimeout(() => {
800
- SM.classList.add("visible");
815
+ const uM = document.createElementNS("http://www.w3.org/2000/svg", "g");
816
+ uM.classList.add("bar-row"), uM.style.opacity = E ? "0" : "1", uM.append(cM, jM, v, P), d == null || d.appendChild(uM), E && window.setTimeout(() => {
817
+ uM.classList.add("visible");
801
818
  }, 560 + kM * 38);
802
- }), A.appendChild(R), E && window.setTimeout(() => {
819
+ }), A.appendChild(d), E && window.setTimeout(() => {
803
820
  k.isConnected && k.remove();
804
821
  }, 1500);
805
822
  }
806
- if (LL.forEach(({ id: T, svgId: x, altSvgId: k }) => {
807
- const d = A.querySelector(`#${CSS.escape(x)}`) || (k ? A.querySelector(`#${CSS.escape(k)}`) : null);
808
- d && (d.style.display = s ? "none" : "inline", d.style.fill = w ? "rgba(255, 255, 255, 0.04)" : vM(T, m, wM), d.style.stroke = w ? "rgba(27, 35, 31, 0.72)" : "rgba(54, 86, 75, 0.72)", d.style.strokeWidth = w ? "1.5px" : "3.8px", d.style.vectorEffect = "non-scaling-stroke", d.setAttribute("fill-rule", "evenodd"), d.classList.toggle("selected", b === T), d.classList.toggle(
823
+ if (LL.forEach(({ id: C, svgId: x, altSvgId: k }) => {
824
+ const Z = A.querySelector(`#${CSS.escape(x)}`) || (k ? A.querySelector(`#${CSS.escape(k)}`) : null);
825
+ Z && (Z.style.display = s ? "none" : "inline", Z.style.fill = w ? "rgba(255, 255, 255, 0.04)" : pM(C, m, zM), Z.style.stroke = w ? "rgba(27, 35, 31, 0.72)" : "rgba(54, 86, 75, 0.72)", Z.style.strokeWidth = w ? "1.5px" : "3.8px", Z.style.vectorEffect = "non-scaling-stroke", Z.setAttribute("fill-rule", "evenodd"), Z.classList.toggle("selected", a === C), Z.classList.toggle(
809
826
  "pulse",
810
- b === T && uM === "pulse"
811
- ), d.classList.toggle(
827
+ a === C && TM === "pulse"
828
+ ), Z.classList.toggle(
812
829
  "lifted",
813
- b === T && uM === "static"
814
- ), d.classList.toggle(
830
+ a === C && TM === "static"
831
+ ), Z.classList.toggle(
815
832
  "outline-only",
816
- b === T && uM === "outline"
833
+ a === C && TM === "outline"
817
834
  ));
818
- }), A.querySelectorAll("text, tspan").forEach((T) => {
835
+ }), A.querySelectorAll("text, tspan").forEach((C) => {
819
836
  var k;
820
- if (T.closest(".bar-morph-layer")) {
821
- T.style.pointerEvents = "none", T.style.opacity = "1";
837
+ if (C.closest(".bar-morph-layer")) {
838
+ C.style.pointerEvents = "none", C.style.opacity = "1";
822
839
  return;
823
840
  }
824
- const x = T.dataset.regionLabel || ((k = T.closest("text")) == null ? void 0 : k.dataset.regionLabel);
825
- T.style.pointerEvents = x ? "auto" : "none", T.style.opacity = n && !s ? "1" : "0";
841
+ const x = C.dataset.regionLabel || ((k = C.closest("text")) == null ? void 0 : k.dataset.regionLabel);
842
+ C.style.pointerEvents = x ? "auto" : "none", C.style.opacity = V && !s ? "1" : "0";
826
843
  }), s)
827
844
  _M(
828
845
  A,
829
846
  _(p),
830
- c,
831
- V,
847
+ i,
848
+ h,
832
849
  gL(A)
833
850
  );
834
- else if (b) {
835
- const T = A.querySelector(
836
- `.map-region[data-region="${b}"]`
851
+ else if (a) {
852
+ const C = A.querySelector(
853
+ `.map-region[data-region="${a}"]`
837
854
  );
838
- if (T) {
839
- const x = zL(A, T);
855
+ if (C) {
856
+ const x = zL(A, C);
840
857
  _M(
841
858
  A,
842
859
  x,
843
- c,
844
- V,
860
+ i,
861
+ h,
845
862
  jN(A, x)
846
863
  );
847
864
  }
@@ -849,103 +866,103 @@ const wN = EL(function({
849
866
  _M(
850
867
  A,
851
868
  _(p),
852
- c,
853
- V,
869
+ i,
870
+ h,
854
871
  gL(A)
855
872
  );
856
873
  IL.current = F;
857
874
  }, [
858
875
  m,
859
- MM,
876
+ LM,
860
877
  JM,
861
- wM,
862
- b,
863
- uM,
864
- n,
878
+ zM,
879
+ a,
880
+ TM,
881
+ V,
865
882
  I,
866
883
  gM,
867
884
  F
868
885
  ]), q(() => {
869
- const y = G.current, A = y == null ? void 0 : y.querySelector("svg");
886
+ const U = o.current, A = U == null ? void 0 : U.querySelector("svg");
870
887
  if (!A) return;
871
888
  let w = A.querySelector(".region-outline-layer");
872
889
  w || (w = document.createElementNS("http://www.w3.org/2000/svg", "g"), w.classList.add("region-outline-layer")), w.innerHTML = "", [
873
- uM === "outline" ? b : null,
874
- J
890
+ TM === "outline" ? a : null,
891
+ b
875
892
  ].forEach((E, O) => {
876
- if (!E || F === "bars" || O === 1 && E === b)
893
+ if (!E || F === "bars" || O === 1 && E === a)
877
894
  return;
878
- const R = A.querySelector(
895
+ const d = A.querySelector(
879
896
  `.map-region[data-region="${E}"]`
880
897
  );
881
- if (!R) return;
882
- const T = R.cloneNode(!1), x = NL(A, R);
883
- T.removeAttribute("id"), T.removeAttribute("class"), T.removeAttribute("data-region"), T.removeAttribute("data-svg-id"), T.classList.add(
898
+ if (!d) return;
899
+ const C = d.cloneNode(!1), x = NL(A, d);
900
+ C.removeAttribute("id"), C.removeAttribute("class"), C.removeAttribute("data-region"), C.removeAttribute("data-svg-id"), C.classList.add(
884
901
  O === 0 ? "selected-region-outline" : "hover-region-outline"
885
- ), T.style.fill = "none", T.style.stroke = "#ffffff", T.style.strokeWidth = O === 0 ? "4px" : "2px", T.style.strokeLinecap = "round", T.style.strokeLinejoin = "round", T.style.vectorEffect = "non-scaling-stroke", T.style.pointerEvents = "none", T.setAttribute("transform", $M(x)), w.appendChild(T);
902
+ ), C.style.fill = "none", C.style.stroke = "#ffffff", C.style.strokeWidth = O === 0 ? "4px" : "2px", C.style.strokeLinecap = "round", C.style.strokeLinejoin = "round", C.style.vectorEffect = "non-scaling-stroke", C.style.pointerEvents = "none", C.setAttribute("transform", $M(x)), w.appendChild(C);
886
903
  }), A.appendChild(w);
887
- }, [J, b, uM, F]);
888
- const lL = b && LM[b] || CL, fM = MM === "terrain" ? "regions" : "terrain", DL = (o == null ? void 0 : o[fM]) ?? (fM === "terrain" ? "Terrain" : "Normal"), RL = (y) => Math.max(
889
- ...Object.values(LM).flatMap(
890
- (A) => (A || []).filter((w) => w.label === y.label).map((w) => w.value)
904
+ }, [b, a, TM, F]);
905
+ const lL = a && NM[a] || CL, fM = LM === "terrain" ? "regions" : "terrain", DL = (y == null ? void 0 : y[fM]) ?? (fM === "terrain" ? "Terrain" : "Normal"), RL = (U) => Math.max(
906
+ ...Object.values(NM).flatMap(
907
+ (A) => (A || []).filter((w) => w.label === U.label).map((w) => w.value)
891
908
  ),
892
- y.value,
909
+ U.value,
893
910
  1
894
911
  );
895
- return GL(a, () => ({
896
- async exportPNG(y = "ethiopia-map") {
912
+ return GL(l, () => ({
913
+ async exportPNG(U = "ethiopia-map") {
897
914
  var A;
898
915
  try {
899
- const w = (A = G.current) == null ? void 0 : A.querySelector("svg");
916
+ const w = (A = o.current) == null ? void 0 : A.querySelector("svg");
900
917
  if (!w) return;
901
918
  (await yL(w)).toBlob((E) => {
902
- E && ML(E, `${y}.png`);
919
+ E && ML(E, `${U}.png`);
903
920
  }, "image/png");
904
921
  } catch (w) {
905
922
  console.error("exportPNG failed:", w);
906
923
  }
907
924
  },
908
- async exportJPG(y = "ethiopia-map") {
925
+ async exportJPG(U = "ethiopia-map") {
909
926
  var A;
910
927
  try {
911
- const w = (A = G.current) == null ? void 0 : A.querySelector("svg");
928
+ const w = (A = o.current) == null ? void 0 : A.querySelector("svg");
912
929
  if (!w) return;
913
930
  (await yL(w, !0)).toBlob((E) => {
914
- E && ML(E, `${y}.jpg`);
931
+ E && ML(E, `${U}.jpg`);
915
932
  }, "image/jpeg", 0.92);
916
933
  } catch (w) {
917
934
  console.error("exportJPG failed:", w);
918
935
  }
919
936
  },
920
- async exportVideo(y = "ethiopia-map", A) {
937
+ async exportVideo(U = "ethiopia-map", A) {
921
938
  var w, s;
922
939
  try {
923
- const E = (w = G.current) == null ? void 0 : w.closest(".ethiopia-map-surface"), O = (s = G.current) == null ? void 0 : s.querySelector("svg");
940
+ const E = (w = o.current) == null ? void 0 : w.closest(".ethiopia-map-surface"), O = (s = o.current) == null ? void 0 : s.querySelector("svg");
924
941
  if (!E || !O) return;
925
- const R = E.getBoundingClientRect(), T = E.cloneNode(!0);
926
- T.style.cssText = `position:fixed;left:-9999px;top:0;width:${R.width}px;height:${R.height}px;overflow:hidden`, document.body.appendChild(T);
927
- const x = T.querySelector("svg");
942
+ const d = E.getBoundingClientRect(), C = E.cloneNode(!0);
943
+ C.style.cssText = `position:fixed;left:-9999px;top:0;width:${d.width}px;height:${d.height}px;overflow:hidden`, document.body.appendChild(C);
944
+ const x = C.querySelector("svg");
928
945
  DN(x), x.setAttribute("viewBox", p);
929
946
  const k = _(p);
930
- let d = { ...k }, r = null, kM = "", xM = "", lM = "", oM = "";
947
+ let Z = { ...k }, r = null, kM = "", xM = "", lM = "", oM = "";
931
948
  if (A != null && A.regionId) {
932
- const zM = x.querySelector(`[data-region="${A.regionId}"]`);
933
- if (zM) {
934
- const X = getComputedStyle(T);
935
- kM = X.getPropertyValue("--region-shadow-wall").trim() || "rgba(0,0,0,0.6)", xM = X.getPropertyValue("--region-shadow-mid").trim() || "rgba(0,0,0,0.42)", lM = X.getPropertyValue("--region-shadow-ambient").trim() || "rgba(0,0,0,0.3)", oM = X.getPropertyValue("--region-shadow-glow").trim() || "rgba(23,107,84,0.45)", zM.style.stroke = "#ffffff", r = zM, d = zL(x, zM);
949
+ const SM = x.querySelector(`[data-region="${A.regionId}"]`);
950
+ if (SM) {
951
+ const X = getComputedStyle(C);
952
+ kM = X.getPropertyValue("--region-shadow-wall").trim() || "rgba(0,0,0,0.6)", xM = X.getPropertyValue("--region-shadow-mid").trim() || "rgba(0,0,0,0.42)", lM = X.getPropertyValue("--region-shadow-ambient").trim() || "rgba(0,0,0,0.3)", oM = X.getPropertyValue("--region-shadow-glow").trim() || "rgba(23,107,84,0.45)", SM.style.stroke = "#ffffff", r = SM, Z = zL(x, SM);
936
953
  }
937
954
  }
938
- const tM = _(p), cM = tM.width / tM.height, P = 1920, NM = Math.round(P / cM), v = document.createElement("canvas");
939
- v.width = P, v.height = NM;
940
- const SM = v.getContext("2d"), h = v.captureStream(30), W = new MediaRecorder(h, { mimeType: "video/webm" }), UM = [];
941
- W.ondataavailable = (zM) => UM.push(zM.data), await new Promise((zM) => {
942
- W.onstop = () => zM(), W.start();
955
+ const tM = _(p), cM = tM.width / tM.height, P = 1920, jM = Math.round(P / cM), v = document.createElement("canvas");
956
+ v.width = P, v.height = jM;
957
+ const uM = v.getContext("2d"), n = v.captureStream(30), W = new MediaRecorder(n, { mimeType: "video/webm" }), UM = [];
958
+ W.ondataavailable = (SM) => UM.push(SM.data), await new Promise((SM) => {
959
+ W.onstop = () => SM(), W.start();
943
960
  const X = 600, iM = 1400, RM = 620, KM = X + iM + RM + 600, dL = performance.now();
944
961
  function BM(K) {
945
- const EM = new XMLSerializer().serializeToString(x), OM = new Blob([EM], { type: "image/svg+xml;charset=utf-8" }), FM = URL.createObjectURL(OM), dM = new Image();
962
+ const EM = new XMLSerializer().serializeToString(x), OM = new Blob([EM], { type: "image/svg+xml;charset=utf-8" }), VM = URL.createObjectURL(OM), dM = new Image();
946
963
  dM.onload = () => {
947
- SM.fillStyle = "#ffffff", SM.fillRect(0, 0, P, NM), SM.drawImage(dM, 0, 0, P, NM), URL.revokeObjectURL(FM), kL(SM, P, NM), K();
948
- }, dM.onerror = () => K(), dM.src = FM;
964
+ uM.fillStyle = "#ffffff", uM.fillRect(0, 0, P, jM), uM.drawImage(dM, 0, 0, P, jM), URL.revokeObjectURL(VM), kL(uM, P, jM), K();
965
+ }, dM.onerror = () => K(), dM.src = VM;
949
966
  }
950
967
  function WM(K) {
951
968
  if (!r) return;
@@ -953,42 +970,42 @@ const wN = EL(function({
953
970
  r.style.removeProperty("transform"), r.style.removeProperty("filter");
954
971
  return;
955
972
  }
956
- const EM = XM(Math.min(1, K)), OM = -22 * EM, FM = 1 + 0.022 * EM, dM = -4 * EM;
957
- r.style.transform = `translate3d(${dM}px, ${OM}px, 0) scaleY(${FM})`, r.style.transformBox = "fill-box", r.style.transformOrigin = "center bottom", r.style.filter = `drop-shadow(5px 26px 0 ${kM}) drop-shadow(4px 20px 3px ${xM}) drop-shadow(2px 10px 14px ${lM}) drop-shadow(0 0 18px ${oM})`;
973
+ const EM = rM(Math.min(1, K)), OM = -22 * EM, VM = 1 + 0.022 * EM, dM = -4 * EM;
974
+ r.style.transform = `translate3d(${dM}px, ${OM}px, 0) scaleY(${VM})`, r.style.transformBox = "fill-box", r.style.transformOrigin = "center bottom", r.style.filter = `drop-shadow(5px 26px 0 ${kM}) drop-shadow(4px 20px 3px ${xM}) drop-shadow(2px 10px 14px ${lM}) drop-shadow(0 0 18px ${oM})`;
958
975
  }
959
976
  function hM() {
960
977
  const K = performance.now() - dL;
961
978
  if (K < X)
962
979
  WM(0), x.setAttribute("viewBox", YM(k)), BM(() => requestAnimationFrame(hM));
963
980
  else if (K < X + iM) {
964
- const EM = Math.min(1, (K - X) / iM), OM = XM(EM);
981
+ const EM = Math.min(1, (K - X) / iM), OM = rM(EM);
965
982
  WM(0), x.setAttribute("viewBox", YM({
966
- x: k.x + (d.x - k.x) * OM,
967
- y: k.y + (d.y - k.y) * OM,
968
- width: k.width + (d.width - k.width) * OM,
969
- height: k.height + (d.height - k.height) * OM
983
+ x: k.x + (Z.x - k.x) * OM,
984
+ y: k.y + (Z.y - k.y) * OM,
985
+ width: k.width + (Z.width - k.width) * OM,
986
+ height: k.height + (Z.height - k.height) * OM
970
987
  })), BM(() => requestAnimationFrame(hM));
971
988
  } else if (K < X + iM + RM) {
972
989
  const EM = (K - X - iM) / RM;
973
- WM(EM), x.setAttribute("viewBox", YM(d)), BM(() => requestAnimationFrame(hM));
974
- } else K < KM ? (WM(1), x.setAttribute("viewBox", YM(d)), BM(() => requestAnimationFrame(hM))) : (WM(1), x.setAttribute("viewBox", YM(d)), BM(() => W.stop()));
990
+ WM(EM), x.setAttribute("viewBox", YM(Z)), BM(() => requestAnimationFrame(hM));
991
+ } else K < KM ? (WM(1), x.setAttribute("viewBox", YM(Z)), BM(() => requestAnimationFrame(hM))) : (WM(1), x.setAttribute("viewBox", YM(Z)), BM(() => W.stop()));
975
992
  }
976
993
  requestAnimationFrame(hM);
977
994
  });
978
995
  const PM = new Blob(UM, { type: "video/webm" });
979
- ML(PM, `${y}.webm`), document.body.removeChild(T);
996
+ ML(PM, `${U}.webm`), document.body.removeChild(C);
980
997
  } catch (E) {
981
998
  console.error("exportVideo failed:", E);
982
999
  }
983
1000
  }
984
- }), []), /* @__PURE__ */ l(
1001
+ }), []), /* @__PURE__ */ R(
985
1002
  "div",
986
1003
  {
987
1004
  className: [
988
1005
  "ethiopia-map-surface",
989
- CN(MM),
1006
+ CN(LM),
990
1007
  gM === "dark" ? "dark-mode" : "light-mode",
991
- b && F !== "bars" ? "focus-mode" : "",
1008
+ a && F !== "bars" ? "focus-mode" : "",
992
1009
  F === "bars" ? "bars-mode" : "",
993
1010
  N
994
1011
  ].filter(Boolean).join(" "),
@@ -996,24 +1013,25 @@ const wN = EL(function({
996
1013
  "aria-label": "Interactive map of Ethiopia",
997
1014
  style: L,
998
1015
  children: [
999
- /* @__PURE__ */ U("div", { className: "ethiopia-map-svg-host", ref: G }),
1000
- Y && b && yM && F !== "bars" ? /* @__PURE__ */ U(
1016
+ /* @__PURE__ */ g("div", { className: "ethiopia-map-svg-host", ref: o }),
1017
+ Y && a && yM && F !== "bars" ? /* @__PURE__ */ g(
1001
1018
  tL,
1002
1019
  {
1003
1020
  variant: "overlay",
1004
- className: u,
1005
- style: C,
1021
+ className: S,
1022
+ style: z,
1006
1023
  listClassName: D,
1007
1024
  listStyle: Q,
1008
1025
  regionName: yM.name,
1009
1026
  regionValue: yM.value,
1010
1027
  services: lL,
1011
1028
  emptyText: t,
1012
- incrementalRows: z,
1013
- getBarPercent: (y) => Math.max(5, Math.round(y.value / RL(y) * 100))
1029
+ incrementalRows: T,
1030
+ onClose: () => MM(null),
1031
+ getBarPercent: (U) => Math.max(5, Math.round(U.value / RL(U) * 100))
1014
1032
  }
1015
1033
  ) : null,
1016
- /* @__PURE__ */ U(
1034
+ /* @__PURE__ */ g(
1017
1035
  "img",
1018
1036
  {
1019
1037
  src: OL,
@@ -1022,21 +1040,21 @@ const wN = EL(function({
1022
1040
  "aria-hidden": "true"
1023
1041
  }
1024
1042
  ),
1025
- i && F !== "bars" ? /* @__PURE__ */ l(
1043
+ c && F !== "bars" ? /* @__PURE__ */ R(
1026
1044
  "button",
1027
1045
  {
1028
1046
  type: "button",
1029
1047
  className: [
1030
1048
  "ethiopia-map-layer-toggle",
1031
- MM === "terrain" ? "is-terrain" : "is-regions",
1032
- g
1049
+ LM === "terrain" ? "is-terrain" : "is-regions",
1050
+ G
1033
1051
  ].filter(Boolean).join(" "),
1034
1052
  "aria-label": `Switch to ${DL} map mode`,
1035
- "aria-pressed": MM === "terrain",
1053
+ "aria-pressed": LM === "terrain",
1036
1054
  onClick: () => HM(fM),
1037
1055
  children: [
1038
- /* @__PURE__ */ U("span", { className: "ethiopia-map-layer-toggle__icon", "aria-hidden": "true" }),
1039
- /* @__PURE__ */ U("span", { children: DL })
1056
+ /* @__PURE__ */ g("span", { className: "ethiopia-map-layer-toggle__icon", "aria-hidden": "true" }),
1057
+ /* @__PURE__ */ g("span", { children: DL })
1040
1058
  ]
1041
1059
  }
1042
1060
  ) : null
@@ -1051,37 +1069,37 @@ const UN = EL(function({
1051
1069
  className: N,
1052
1070
  style: L,
1053
1071
  svgText: j,
1054
- svgUrl: S,
1072
+ svgUrl: u,
1055
1073
  terrainImageUrl: I,
1056
- inMapStatsClassName: u,
1057
- inMapStatsStyle: C,
1074
+ inMapStatsClassName: S,
1075
+ inMapStatsStyle: z,
1058
1076
  inMapStatsListClassName: D,
1059
1077
  inMapStatsListStyle: Q,
1060
1078
  inMapStatsEmptyText: t,
1061
- incrementalRows: z,
1062
- showLayerControl: i,
1063
- layerControlClassName: g,
1064
- layerControlLabels: o,
1079
+ incrementalRows: T,
1080
+ showLayerControl: c,
1081
+ layerControlClassName: G,
1082
+ layerControlLabels: y,
1065
1083
  ...e
1066
1084
  }, H) {
1067
- return /* @__PURE__ */ U(sL, { ...e, children: /* @__PURE__ */ U(
1085
+ return /* @__PURE__ */ g(sL, { ...e, children: /* @__PURE__ */ g(
1068
1086
  wN,
1069
1087
  {
1070
1088
  ref: H,
1071
1089
  className: N,
1072
1090
  style: L,
1073
1091
  svgText: j,
1074
- svgUrl: S,
1092
+ svgUrl: u,
1075
1093
  terrainImageUrl: I,
1076
- inMapStatsClassName: u,
1077
- inMapStatsStyle: C,
1094
+ inMapStatsClassName: S,
1095
+ inMapStatsStyle: z,
1078
1096
  inMapStatsListClassName: D,
1079
1097
  inMapStatsListStyle: Q,
1080
1098
  inMapStatsEmptyText: t,
1081
- incrementalRows: z,
1082
- showLayerControl: i,
1083
- layerControlClassName: g,
1084
- layerControlLabels: o
1099
+ incrementalRows: T,
1100
+ showLayerControl: c,
1101
+ layerControlClassName: G,
1102
+ layerControlLabels: y
1085
1103
  }
1086
1104
  ) });
1087
1105
  });
@@ -1093,53 +1111,53 @@ function xN({
1093
1111
  title: N = "Region index",
1094
1112
  kicker: L = "Legend",
1095
1113
  maxItems: j,
1096
- onRegionClick: S
1114
+ onRegionClick: u
1097
1115
  }) {
1098
- const { data: I, regionColors: u, selectedRegionId: C, selectRegion: D } = bM(), Q = AL(I), t = pM(() => {
1099
- const z = Object.entries(I);
1100
- return z.sort(([, i], [, g]) => g.value - i.value).slice(0, j ?? z.length);
1116
+ const { data: I, regionColors: S, selectedRegionId: z, selectRegion: D } = bM(), Q = AL(I), t = XM(() => {
1117
+ const T = Object.entries(I);
1118
+ return T.sort(([, c], [, G]) => G.value - c.value).slice(0, j ?? T.length);
1101
1119
  }, [I, j]);
1102
- return /* @__PURE__ */ l("section", { className: ["ethiopia-map-panel", "ethiopia-map-legend", M].filter(Boolean).join(" "), children: [
1103
- /* @__PURE__ */ l("div", { className: "ethiopia-map-panel-heading", children: [
1104
- /* @__PURE__ */ l("div", { children: [
1105
- /* @__PURE__ */ U("p", { className: "ethiopia-map-kicker", children: L }),
1106
- /* @__PURE__ */ U("h2", { children: N })
1120
+ return /* @__PURE__ */ R("section", { className: ["ethiopia-map-panel", "ethiopia-map-legend", M].filter(Boolean).join(" "), children: [
1121
+ /* @__PURE__ */ R("div", { className: "ethiopia-map-panel-heading", children: [
1122
+ /* @__PURE__ */ R("div", { children: [
1123
+ /* @__PURE__ */ g("p", { className: "ethiopia-map-kicker", children: L }),
1124
+ /* @__PURE__ */ g("h2", { children: N })
1107
1125
  ] }),
1108
- /* @__PURE__ */ l("div", { className: "ethiopia-map-legend-range", children: [
1109
- /* @__PURE__ */ U("span", { children: "Low" }),
1110
- /* @__PURE__ */ U("i", { "aria-hidden": "true" }),
1111
- /* @__PURE__ */ U("span", { children: "High" })
1126
+ /* @__PURE__ */ R("div", { className: "ethiopia-map-legend-range", children: [
1127
+ /* @__PURE__ */ g("span", { children: "Low" }),
1128
+ /* @__PURE__ */ g("i", { "aria-hidden": "true" }),
1129
+ /* @__PURE__ */ g("span", { children: "High" })
1112
1130
  ] })
1113
1131
  ] }),
1114
- /* @__PURE__ */ U("div", { className: "ethiopia-map-legend-list", children: t.map(([z, i]) => {
1115
- const g = vM(z, I, u), o = Math.max(4, Math.round(i.value / Q * 100)), e = C === z;
1116
- return /* @__PURE__ */ l(
1132
+ /* @__PURE__ */ g("div", { className: "ethiopia-map-legend-list", children: t.map(([T, c]) => {
1133
+ const G = pM(T, I, S), y = Math.max(4, Math.round(c.value / Q * 100)), e = z === T;
1134
+ return /* @__PURE__ */ R(
1117
1135
  "button",
1118
1136
  {
1119
1137
  className: `ethiopia-map-legend-row${e ? " active" : ""}`,
1120
1138
  type: "button",
1121
1139
  onClick: () => {
1122
- D(e ? null : z), e || S == null || S(z);
1140
+ D(e ? null : T), e || u == null || u(T);
1123
1141
  },
1124
1142
  children: [
1125
- /* @__PURE__ */ U("span", { className: "ethiopia-map-swatch", style: { background: g } }),
1126
- /* @__PURE__ */ l("span", { className: "ethiopia-map-legend-main", children: [
1127
- /* @__PURE__ */ l("span", { className: "ethiopia-map-legend-title-line", children: [
1128
- /* @__PURE__ */ U("strong", { children: i.name }),
1129
- /* @__PURE__ */ U("span", { children: i.trend })
1143
+ /* @__PURE__ */ g("span", { className: "ethiopia-map-swatch", style: { background: G } }),
1144
+ /* @__PURE__ */ R("span", { className: "ethiopia-map-legend-main", children: [
1145
+ /* @__PURE__ */ R("span", { className: "ethiopia-map-legend-title-line", children: [
1146
+ /* @__PURE__ */ g("strong", { children: c.name }),
1147
+ /* @__PURE__ */ g("span", { children: c.trend })
1130
1148
  ] }),
1131
- /* @__PURE__ */ U("span", { className: "ethiopia-map-legend-bar", children: /* @__PURE__ */ U(
1149
+ /* @__PURE__ */ g("span", { className: "ethiopia-map-legend-bar", children: /* @__PURE__ */ g(
1132
1150
  "span",
1133
1151
  {
1134
1152
  className: "ethiopia-map-legend-bar-fill",
1135
- style: { width: `${o}%`, background: g }
1153
+ style: { width: `${y}%`, background: G }
1136
1154
  }
1137
1155
  ) })
1138
1156
  ] }),
1139
- /* @__PURE__ */ U("span", { className: "ethiopia-map-legend-value", children: nM(i.value) })
1157
+ /* @__PURE__ */ g("span", { className: "ethiopia-map-legend-value", children: vM(c.value) })
1140
1158
  ]
1141
1159
  },
1142
- z
1160
+ T
1143
1161
  );
1144
1162
  }) })
1145
1163
  ] });
@@ -1150,28 +1168,28 @@ function sN({
1150
1168
  kicker: L = "Lat/lng overlay",
1151
1169
  showMarkerToggle: j = !0
1152
1170
  }) {
1153
- const { locations: S, showMarkers: I } = bM();
1154
- return /* @__PURE__ */ l("section", { className: ["ethiopia-map-panel", "ethiopia-locations-panel", M].filter(Boolean).join(" "), children: [
1155
- /* @__PURE__ */ l("div", { className: "ethiopia-map-panel-heading", children: [
1156
- /* @__PURE__ */ l("div", { children: [
1157
- /* @__PURE__ */ U("p", { className: "ethiopia-map-kicker", children: L }),
1158
- /* @__PURE__ */ U("h2", { children: N })
1171
+ const { locations: u, showMarkers: I } = bM();
1172
+ return /* @__PURE__ */ R("section", { className: ["ethiopia-map-panel", "ethiopia-locations-panel", M].filter(Boolean).join(" "), children: [
1173
+ /* @__PURE__ */ R("div", { className: "ethiopia-map-panel-heading", children: [
1174
+ /* @__PURE__ */ R("div", { children: [
1175
+ /* @__PURE__ */ g("p", { className: "ethiopia-map-kicker", children: L }),
1176
+ /* @__PURE__ */ g("h2", { children: N })
1159
1177
  ] }),
1160
- j ? /* @__PURE__ */ U("span", { className: "ethiopia-location-toggle", children: I ? "Markers on" : "Markers off" }) : null
1178
+ j ? /* @__PURE__ */ g("span", { className: "ethiopia-location-toggle", children: I ? "Markers on" : "Markers off" }) : null
1161
1179
  ] }),
1162
- /* @__PURE__ */ U("div", { className: "ethiopia-location-list", children: S.length === 0 ? /* @__PURE__ */ U("div", { className: "ethiopia-empty-state", children: "No locations provided." }) : S.map((u, C) => /* @__PURE__ */ l("div", { className: "ethiopia-location-item", children: [
1163
- /* @__PURE__ */ l("div", { children: [
1164
- /* @__PURE__ */ U("strong", { children: u.name ?? `Location ${C + 1}` }),
1165
- /* @__PURE__ */ l("span", { children: [
1166
- u.region ?? "GPS",
1180
+ /* @__PURE__ */ g("div", { className: "ethiopia-location-list", children: u.length === 0 ? /* @__PURE__ */ g("div", { className: "ethiopia-empty-state", children: "No locations provided." }) : u.map((S, z) => /* @__PURE__ */ R("div", { className: "ethiopia-location-item", children: [
1181
+ /* @__PURE__ */ R("div", { children: [
1182
+ /* @__PURE__ */ g("strong", { children: S.name ?? `Location ${z + 1}` }),
1183
+ /* @__PURE__ */ R("span", { children: [
1184
+ S.region ?? "GPS",
1167
1185
  " - ",
1168
- u.lat.toFixed(2),
1186
+ S.lat.toFixed(2),
1169
1187
  ", ",
1170
- u.lng.toFixed(2)
1188
+ S.lng.toFixed(2)
1171
1189
  ] })
1172
1190
  ] }),
1173
- u.intensity !== void 0 ? /* @__PURE__ */ U("em", { children: u.intensity }) : null
1174
- ] }, u.id ?? `${u.lat}-${u.lng}-${C}`)) })
1191
+ S.intensity !== void 0 ? /* @__PURE__ */ g("em", { children: S.intensity }) : null
1192
+ ] }, S.id ?? `${S.lat}-${S.lng}-${z}`)) })
1175
1193
  ] });
1176
1194
  }
1177
1195
  const UL = [];
@@ -1180,22 +1198,24 @@ function ON({
1180
1198
  style: N,
1181
1199
  listClassName: L,
1182
1200
  listStyle: j,
1183
- emptyText: S = "Select a region to inspect service statistics.",
1184
- incrementalRows: I
1201
+ emptyText: u = "Select a region to inspect service statistics.",
1202
+ incrementalRows: I,
1203
+ onClose: S
1185
1204
  }) {
1186
- const { selectedRegionId: u, selectedRegion: C, serviceStats: D } = bM(), Q = u && D[u] || UL;
1187
- return /* @__PURE__ */ U(
1205
+ const { selectedRegionId: z, selectedRegion: D, serviceStats: Q, selectRegion: t } = bM(), T = z && Q[z] || UL, c = S ?? (z ? () => t(null) : void 0);
1206
+ return /* @__PURE__ */ g(
1188
1207
  tL,
1189
1208
  {
1190
1209
  className: M,
1191
1210
  style: N,
1192
1211
  listClassName: L,
1193
1212
  listStyle: j,
1194
- regionName: C == null ? void 0 : C.name,
1195
- regionValue: C == null ? void 0 : C.value,
1196
- services: Q,
1197
- emptyText: S,
1198
- incrementalRows: I
1213
+ regionName: D == null ? void 0 : D.name,
1214
+ regionValue: D == null ? void 0 : D.value,
1215
+ services: T,
1216
+ emptyText: u,
1217
+ incrementalRows: I,
1218
+ onClose: c
1199
1219
  }
1200
1220
  );
1201
1221
  }
@@ -1204,17 +1224,17 @@ function TN(M, N) {
1204
1224
  return !L || !j ? new DOMMatrix() : L.inverse().multiply(j);
1205
1225
  }
1206
1226
  function uN(M, N) {
1207
- const L = N.getBBox(), j = TN(M, N), S = [
1227
+ const L = N.getBBox(), j = TN(M, N), u = [
1208
1228
  new DOMPoint(L.x, L.y),
1209
1229
  new DOMPoint(L.x + L.width, L.y),
1210
1230
  new DOMPoint(L.x + L.width, L.y + L.height),
1211
1231
  new DOMPoint(L.x, L.y + L.height)
1212
- ].map((C) => C.matrixTransform(j)), I = S.map((C) => C.x), u = S.map((C) => C.y);
1232
+ ].map((z) => z.matrixTransform(j)), I = u.map((z) => z.x), S = u.map((z) => z.y);
1213
1233
  return {
1214
1234
  x: Math.min(...I),
1215
- y: Math.min(...u),
1235
+ y: Math.min(...S),
1216
1236
  width: Math.max(...I) - Math.min(...I),
1217
- height: Math.max(...u) - Math.min(...u)
1237
+ height: Math.max(...S) - Math.min(...S)
1218
1238
  };
1219
1239
  }
1220
1240
  function tN({
@@ -1222,56 +1242,56 @@ function tN({
1222
1242
  emptyTitle: N = "Click a region",
1223
1243
  emptyCopy: L = "Use the map to inspect regional values, nearby sample locations, and a focused outline view.",
1224
1244
  showStats: j = !0,
1225
- previewSelectionAnimation: S,
1245
+ previewSelectionAnimation: u,
1226
1246
  summaryStats: I,
1227
- renderPreview: u
1247
+ renderPreview: S
1228
1248
  }) {
1229
1249
  const {
1230
- selectedRegionId: C,
1250
+ selectedRegionId: z,
1231
1251
  selectedRegion: D,
1232
1252
  locations: Q,
1233
1253
  data: t,
1234
- regionColors: z,
1235
- selectionAnimation: i
1236
- } = bM(), g = $(null), o = S ?? i, e = C ? Q.filter((Z) => Z.region === C) : [], H = { regionId: C, region: D }, IM = (I == null ? void 0 : I(H)) ?? (D == null ? void 0 : D.summaryStats) ?? [
1254
+ regionColors: T,
1255
+ selectionAnimation: c
1256
+ } = bM(), G = $(null), y = u ?? c, e = z ? Q.filter((J) => J.region === z) : [], H = { regionId: z, region: D }, DM = (I == null ? void 0 : I(H)) ?? (D == null ? void 0 : D.summaryStats) ?? [
1237
1257
  { label: "Index", value: (D == null ? void 0 : D.value) ?? null },
1238
- { label: "Locations", value: C ? e.length : null },
1258
+ { label: "Locations", value: z ? e.length : null },
1239
1259
  { label: "Trend", value: (D == null ? void 0 : D.trend) ?? null }
1240
1260
  ];
1241
1261
  return q(() => {
1242
- const Z = g.current;
1243
- if (!Z || u || !C) return;
1244
- Z.innerHTML = jL;
1245
- const a = Z.querySelector("svg");
1246
- if (!a) return;
1247
- a.removeAttribute("id"), a.setAttribute("aria-hidden", "true"), a.querySelectorAll("title").forEach((c) => c.remove()), a.querySelectorAll(".marker-layer, .heat-layer, .region-outline-layer, .bar-morph-layer").forEach((c) => c.remove()), LL.forEach(({ id: c, svgId: V, altSvgId: DM }) => {
1248
- const J = a.querySelector(`#${CSS.escape(V)}`) || (DM ? a.querySelector(`#${CSS.escape(DM)}`) : null);
1249
- J && (J.dataset.region = c, J.removeAttribute("style"), J.classList.add("map-region"), J.style.pointerEvents = "none", J.style.fill = c === C ? o === "outline" ? "rgba(255, 255, 255, 0.05)" : vM(c, t, z) : "var(--ethiopia-preview-base, #f7faf6)", J.style.opacity = c === C ? "1" : "0.16", J.style.stroke = c === C ? "#ffffff" : "var(--ethiopia-preview-stroke, rgba(42, 73, 63, 0.16))", J.style.strokeWidth = c === C ? "4px" : "2px", J.style.vectorEffect = "non-scaling-stroke", c === C && (J.classList.add("selected"), J.classList.toggle("pulse", o === "pulse"), J.classList.toggle("lifted", o === "static"), J.classList.toggle("outline-only", o === "outline")));
1250
- }), a.querySelectorAll("text, tspan").forEach((c) => {
1251
- c.style.opacity = "0", c.style.pointerEvents = "none";
1262
+ const J = G.current;
1263
+ if (!J || S || !z) return;
1264
+ J.innerHTML = jL;
1265
+ const l = J.querySelector("svg");
1266
+ if (!l) return;
1267
+ l.removeAttribute("id"), l.setAttribute("aria-hidden", "true"), l.querySelectorAll("title").forEach((i) => i.remove()), l.querySelectorAll(".marker-layer, .heat-layer, .region-outline-layer, .bar-morph-layer").forEach((i) => i.remove()), LL.forEach(({ id: i, svgId: h, altSvgId: wM }) => {
1268
+ const b = l.querySelector(`#${CSS.escape(h)}`) || (wM ? l.querySelector(`#${CSS.escape(wM)}`) : null);
1269
+ b && (b.dataset.region = i, b.removeAttribute("style"), b.classList.add("map-region"), b.style.pointerEvents = "none", b.style.fill = i === z ? y === "outline" ? "rgba(255, 255, 255, 0.05)" : pM(i, t, T) : "var(--ethiopia-preview-base, #f7faf6)", b.style.opacity = i === z ? "1" : "0.16", b.style.stroke = i === z ? "#ffffff" : "var(--ethiopia-preview-stroke, rgba(42, 73, 63, 0.16))", b.style.strokeWidth = i === z ? "4px" : "2px", b.style.vectorEffect = "non-scaling-stroke", i === z && (b.classList.add("selected"), b.classList.toggle("pulse", y === "pulse"), b.classList.toggle("lifted", y === "static"), b.classList.toggle("outline-only", y === "outline")));
1270
+ }), l.querySelectorAll("text, tspan").forEach((i) => {
1271
+ i.style.opacity = "0", i.style.pointerEvents = "none";
1252
1272
  });
1253
- const G = a.querySelector(
1254
- `[data-region="${C}"]`
1273
+ const o = l.querySelector(
1274
+ `[data-region="${z}"]`
1255
1275
  );
1256
- if (G) {
1257
- const c = uN(a, G), V = Math.max(c.width, c.height) * 0.18;
1258
- a.setAttribute(
1276
+ if (o) {
1277
+ const i = uN(l, o), h = Math.max(i.width, i.height) * 0.18;
1278
+ l.setAttribute(
1259
1279
  "viewBox",
1260
- `${c.x - V} ${c.y - V} ${c.width + V * 2} ${c.height + V * 2}`
1280
+ `${i.x - h} ${i.y - h} ${i.width + h * 2} ${i.height + h * 2}`
1261
1281
  );
1262
1282
  }
1263
- }, [t, o, z, u, C]), /* @__PURE__ */ l("section", { className: ["ethiopia-map-panel", "ethiopia-selected-region", M].filter(Boolean).join(" "), children: [
1264
- /* @__PURE__ */ U("p", { className: "ethiopia-map-kicker", children: "Selected region" }),
1265
- /* @__PURE__ */ U("h2", { children: (D == null ? void 0 : D.name) ?? N }),
1266
- /* @__PURE__ */ U("p", { children: (D == null ? void 0 : D.copy) ?? L }),
1267
- /* @__PURE__ */ U("div", { className: "ethiopia-selected-region-preview", children: u ? u({ regionId: C, region: D }) : C ? /* @__PURE__ */ U("div", { className: "ethiopia-selected-region-preview-canvas", ref: g }) : /* @__PURE__ */ U("div", { className: "ethiopia-empty-state", children: "No region selected" }) }),
1268
- j ? /* @__PURE__ */ U("div", { className: "ethiopia-selected-region-stats", children: IM.slice(0, 3).map((Z) => /* @__PURE__ */ l("div", { children: [
1269
- /* @__PURE__ */ U("span", { children: Z.label }),
1270
- /* @__PURE__ */ U("strong", { children: nM(Z.value) })
1271
- ] }, Z.label)) }) : null
1283
+ }, [t, y, T, S, z]), /* @__PURE__ */ R("section", { className: ["ethiopia-map-panel", "ethiopia-selected-region", M].filter(Boolean).join(" "), children: [
1284
+ /* @__PURE__ */ g("p", { className: "ethiopia-map-kicker", children: "Selected region" }),
1285
+ /* @__PURE__ */ g("h2", { children: (D == null ? void 0 : D.name) ?? N }),
1286
+ /* @__PURE__ */ g("p", { children: (D == null ? void 0 : D.copy) ?? L }),
1287
+ /* @__PURE__ */ g("div", { className: "ethiopia-selected-region-preview", children: S ? S({ regionId: z, region: D }) : z ? /* @__PURE__ */ g("div", { className: "ethiopia-selected-region-preview-canvas", ref: G }) : /* @__PURE__ */ g("div", { className: "ethiopia-empty-state", children: "No region selected" }) }),
1288
+ j ? /* @__PURE__ */ g("div", { className: "ethiopia-selected-region-stats", children: DM.slice(0, 3).map((J) => /* @__PURE__ */ R("div", { children: [
1289
+ /* @__PURE__ */ g("span", { children: J.label }),
1290
+ /* @__PURE__ */ g("strong", { children: vM(J.value) })
1291
+ ] }, J.label)) }) : null
1272
1292
  ] });
1273
1293
  }
1274
- const jM = (M, N, L, j) => ({
1294
+ const AM = (M, N, L, j) => ({
1275
1295
  enabled: !0,
1276
1296
  percent: M,
1277
1297
  direction: N,
@@ -1368,28 +1388,28 @@ const jM = (M, N, L, j) => ({
1368
1388
  trend: "+6%",
1369
1389
  copy: "Historical Southern Nations, Nationalities, and Peoples' Region administrative area."
1370
1390
  }
1371
- }, AM = (M, N, L, j) => ({
1391
+ }, IM = (M, N, L, j) => ({
1372
1392
  label: M,
1373
1393
  valueKind: N,
1374
1394
  value: L,
1375
1395
  comparison: j ?? null
1376
1396
  }), iN = {
1377
1397
  amhara: [
1378
- AM("Maternal death rate", "percent", 67, jM(12, "increase", "last month", "negative")),
1379
- AM("Schools", "number", 6420, jM(7, "increase", "last year", "positive")),
1380
- AM("Hospitals", "number", 86, jM(5, "increase", "last year", "positive")),
1381
- AM("Universities", "number", 10, jM(1, "increase", "last year", "positive")),
1382
- AM("Health centers", "number", 721, jM(8, "increase", "last year", "positive"))
1398
+ IM("Maternal death rate", "percent", 67, AM(12, "increase", "last month", "negative")),
1399
+ IM("Schools", "number", 6420, AM(7, "increase", "last year", "positive")),
1400
+ IM("Hospitals", "number", 86, AM(5, "increase", "last year", "positive")),
1401
+ IM("Universities", "number", 10, AM(1, "increase", "last year", "positive")),
1402
+ IM("Health centers", "number", 721, AM(8, "increase", "last year", "positive"))
1383
1403
  ],
1384
1404
  afar: [
1385
- AM("Maternal death rate", "percent", 82, jM(6, "increase", "last month", "negative")),
1386
- AM("Schools", "number", 620, jM(2, "increase", "last year", "positive")),
1387
- AM("Hospitals", "number", 12, jM(1, "decrease", "last year", "negative"))
1405
+ IM("Maternal death rate", "percent", 82, AM(6, "increase", "last month", "negative")),
1406
+ IM("Schools", "number", 620, AM(2, "increase", "last year", "positive")),
1407
+ IM("Hospitals", "number", 12, AM(1, "decrease", "last year", "negative"))
1388
1408
  ],
1389
1409
  tigray: [
1390
- AM("Maternal death rate", "percent", 64, jM(9, "decrease", "last month", "positive")),
1391
- AM("Schools", "number", 1840, jM(4, "increase", "last year", "positive")),
1392
- AM("Hospitals", "number", 31, jM(3, "increase", "last year", "positive"))
1410
+ IM("Maternal death rate", "percent", 64, AM(9, "decrease", "last month", "positive")),
1411
+ IM("Schools", "number", 1840, AM(4, "increase", "last year", "positive")),
1412
+ IM("Hospitals", "number", 31, AM(3, "increase", "last year", "positive"))
1393
1413
  ]
1394
1414
  }, YN = [
1395
1415
  { name: "Addis Ababa", region: "addis-ababa", lat: 9.03, lng: 38.74, intensity: 96 },