@cfasim-ui/charts 0.6.1 → 0.6.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.
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { Fragment as e, Teleport as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, mergeProps as d, normalizeClass as f, normalizeProps as p, normalizeStyle as m, onMounted as h, onUnmounted as g, openBlock as _, ref as v, renderList as y, renderSlot as b, toDisplayString as x, toHandlers as ee, toRaw as S, unref as C, useSlots as w, useTemplateRef as T, watch as E, withCtx as D } from "vue";
2
2
  import { formatNumber as te } from "@cfasim-ui/shared";
3
- import { DropdownMenuContent as O, DropdownMenuItem as k, DropdownMenuPortal as ne, DropdownMenuRoot as A, DropdownMenuTrigger as j, PopoverAnchor as M, PopoverContent as re, PopoverPortal as ie, PopoverRoot as N } from "reka-ui";
4
- import { geoAlbersUsa as ae, geoPath as P } from "d3-geo";
3
+ import { DropdownMenuContent as O, DropdownMenuItem as k, DropdownMenuPortal as A, DropdownMenuRoot as j, DropdownMenuTrigger as M, PopoverAnchor as N, PopoverContent as ne, PopoverPortal as re, PopoverRoot as P } from "reka-ui";
4
+ import { geoAlbersUsa as ie, geoMercator as F, geoPath as ae } from "d3-geo";
5
5
  import { zoom as oe, zoomIdentity as se } from "d3-zoom";
6
- import { select as ce } from "d3-selection";
6
+ import { select as I } from "d3-selection";
7
7
  import "d3-transition";
8
- import { feature as F, merge as le, mesh as ue } from "topojson-client";
8
+ import { feature as ce, merge as le, mesh as ue } from "topojson-client";
9
9
  //#region src/ChartMenu/ChartMenu.vue?vue&type=script&setup=true&lang.ts
10
- var de = ["aria-label"], I = /* @__PURE__ */ l({
10
+ var de = ["aria-label"], fe = /* @__PURE__ */ l({
11
11
  __name: "ChartMenu",
12
12
  props: {
13
13
  items: {},
@@ -37,11 +37,11 @@ var de = ["aria-label"], I = /* @__PURE__ */ l({
37
37
  "stroke-width": "1.75",
38
38
  "stroke-linecap": "round",
39
39
  "aria-hidden": "true"
40
- }, [o("path", { d: "M4 4l8 8M12 4l-8 8" })], -1)]])) : u() ? (_(), r(C(A), {
40
+ }, [o("path", { d: "M4 4l8 8M12 4l-8 8" })], -1)]])) : u() ? (_(), r(C(j), {
41
41
  key: 2,
42
42
  modal: !1
43
43
  }, {
44
- default: D(() => [c(C(j), {
44
+ default: D(() => [c(C(M), {
45
45
  class: "chart-menu-button",
46
46
  "aria-label": "Chart options"
47
47
  }, {
@@ -69,7 +69,7 @@ var de = ["aria-label"], I = /* @__PURE__ */ l({
69
69
  })
70
70
  ], -1)]]),
71
71
  _: 1
72
- }), c(C(ne), null, {
72
+ }), c(C(A), null, {
73
73
  default: D(() => [c(C(O), {
74
74
  class: "chart-menu-content",
75
75
  "side-offset": 4,
@@ -110,7 +110,7 @@ var de = ["aria-label"], I = /* @__PURE__ */ l({
110
110
  let n = e.__vccOpts || e;
111
111
  for (let [e, r] of t) n[e] = r;
112
112
  return n;
113
- }, fe = /* @__PURE__ */ L(I, [["__scopeId", "data-v-f5743494"]]);
113
+ }, pe = /* @__PURE__ */ L(fe, [["__scopeId", "data-v-f5743494"]]);
114
114
  //#endregion
115
115
  //#region src/_shared/axes.ts
116
116
  function R(e) {
@@ -126,13 +126,13 @@ function B(e, t, n) {
126
126
  for (let e = 0, a = i; a <= t + 1e-9 && e < 1e3; e++, a = i + e * n) r.push(a);
127
127
  return r;
128
128
  }
129
- var pe = new Intl.NumberFormat();
130
- function me(e) {
131
- return Math.abs(e) >= 1e3 ? pe.format(e) : Number.isInteger(e) ? e.toString() : e.toFixed(1);
129
+ var me = new Intl.NumberFormat();
130
+ function he(e) {
131
+ return Math.abs(e) >= 1e3 ? me.format(e) : Number.isInteger(e) ? e.toString() : e.toFixed(1);
132
132
  }
133
133
  //#endregion
134
134
  //#region src/_shared/computeTicks.ts
135
- function he(e) {
135
+ function ge(e) {
136
136
  let { min: t, max: n, ticks: r } = e;
137
137
  if (t === n) return [];
138
138
  let i = e.displayOffset ?? 0;
@@ -141,7 +141,7 @@ function he(e) {
141
141
  let a = Math.max(3, Math.floor(e.targetTickCount ?? 3)), o = z(n - t, a);
142
142
  return B(t + i, n + i, o).map((e) => e - i);
143
143
  }
144
- function ge(e, t, n, r) {
144
+ function _e(e, t, n, r) {
145
145
  if (r === "log") {
146
146
  let r = Math.log10(t), i = Math.log10(n) - r || 1;
147
147
  return (Math.log10(e > 0 ? e : t) - r) / i;
@@ -149,7 +149,7 @@ function ge(e, t, n, r) {
149
149
  let i = n - t || 1;
150
150
  return (e - t) / i;
151
151
  }
152
- function _e(e, t, n, r) {
152
+ function ve(e, t, n, r) {
153
153
  if (n !== "log") return {
154
154
  min: e,
155
155
  max: t
@@ -160,7 +160,7 @@ function _e(e, t, n, r) {
160
160
  max: t > 0 ? Math.max(t, i) : i
161
161
  };
162
162
  }
163
- function ve(e) {
163
+ function ye(e) {
164
164
  let { min: t, max: n, ticks: r } = e;
165
165
  if (!(t > 0) || !(n > 0) || t === n) return [];
166
166
  if (Array.isArray(r)) return r.filter((e) => e > 0 && e >= t && e <= n);
@@ -173,7 +173,7 @@ function ve(e) {
173
173
  }
174
174
  //#endregion
175
175
  //#region src/_shared/useChartSize.ts
176
- function ye(e = {}) {
176
+ function be(e = {}) {
177
177
  let t = v(null), n = v(0), r = v(0), i = null, a = null;
178
178
  return h(() => {
179
179
  t.value && (n.value = t.value.clientWidth, r.value = t.value.clientHeight, i = new ResizeObserver((t) => {
@@ -192,8 +192,8 @@ function ye(e = {}) {
192
192
  measuredHeight: r
193
193
  };
194
194
  }
195
- var V = .6, be = 8;
196
- function xe(e, t) {
195
+ var V = .6, xe = 8;
196
+ function Se(e, t) {
197
197
  return {
198
198
  fontSize: e?.fontSize ?? t.fontSize,
199
199
  fill: e?.color ?? "currentColor",
@@ -201,8 +201,8 @@ function xe(e, t) {
201
201
  fillOpacity: e?.color == null ? t.fillOpacity : void 0
202
202
  };
203
203
  }
204
- var Se = 7, Ce = 18, we = 16;
205
- function Te(e) {
204
+ var Ce = 7, we = 18, Te = 16;
205
+ function Ee(e) {
206
206
  return e == null ? {
207
207
  top: 0,
208
208
  right: 0,
@@ -220,12 +220,12 @@ function Te(e) {
220
220
  left: e.left ?? 0
221
221
  };
222
222
  }
223
- function Ee(e) {
224
- return Ce + e.length * Se;
225
- }
226
223
  function De(e) {
224
+ return we + e.length * Ce;
225
+ }
226
+ function Oe(e) {
227
227
  let t = n(() => {
228
- let t = Te(e.extraPadding?.());
228
+ let t = Ee(e.extraPadding?.());
229
229
  return {
230
230
  left: (e.yLabel() ? 56 : 50) + t.left,
231
231
  right: 10 + t.right
@@ -238,11 +238,11 @@ function De(e) {
238
238
  };
239
239
  let n = Math.max(0, r.value), i = [], a = 0, o = 0;
240
240
  for (let e of t) {
241
- let t = Ee(e);
241
+ let t = De(e);
242
242
  o > 0 && o + t > n && (a++, o = 0), i.push({
243
243
  x: o,
244
244
  row: a
245
- }), o += t + we;
245
+ }), o += t + Te;
246
246
  }
247
247
  return {
248
248
  positions: i,
@@ -252,9 +252,9 @@ function De(e) {
252
252
  let t = e.title();
253
253
  if (!t) return 10;
254
254
  let n = e.titleStyle?.()?.lineHeight ?? 18;
255
- return t.split("\n").length * n + be;
255
+ return t.split("\n").length * n + xe;
256
256
  }), o = n(() => {
257
- let n = Te(e.extraPadding?.()), r = i.value.rowCount;
257
+ let n = Ee(e.extraPadding?.()), r = i.value.rowCount;
258
258
  return {
259
259
  top: a.value + r * 20 + n.top,
260
260
  bottom: (e.xLabel() ? 38 : 30) + n.bottom,
@@ -283,10 +283,10 @@ function De(e) {
283
283
  }
284
284
  //#endregion
285
285
  //#region src/tooltip-position.ts
286
- var Oe = 16, ke = 8;
287
- function Ae(e, t, n, r, i, a) {
286
+ var ke = 16, Ae = 8;
287
+ function H(e, t, n, r, i, a) {
288
288
  if (i === "none") return {
289
- left: e + Oe,
289
+ left: e + ke,
290
290
  top: t
291
291
  };
292
292
  let o = i === "chart" && a ? {
@@ -299,15 +299,15 @@ function Ae(e, t, n, r, i, a) {
299
299
  right: window.innerWidth,
300
300
  top: 0,
301
301
  bottom: window.innerHeight
302
- }, s = e + Oe + n > o.right - ke ? e - Oe - n : e + Oe, c = r / 2;
302
+ }, s = e + ke + n > o.right - Ae ? e - ke - n : e + ke, c = r / 2;
303
303
  return {
304
304
  left: s,
305
- top: Math.min(Math.max(t, o.top + ke + c), o.bottom - ke - c)
305
+ top: Math.min(Math.max(t, o.top + Ae + c), o.bottom - Ae - c)
306
306
  };
307
307
  }
308
308
  //#endregion
309
309
  //#region src/_shared/useChartTooltip.ts
310
- function H(e) {
310
+ function je(e) {
311
311
  let t = e.touchYOffset ?? 50, n = v(null), r = v(!1), i = v(null), a = v(null), o = v(null), s = null, c = "pending";
312
312
  function l(e) {
313
313
  return "touches" in e ? e.touches[0] ?? null : e;
@@ -328,7 +328,7 @@ function H(e) {
328
328
  }
329
329
  let s = i.value, c = e.containerRef.value;
330
330
  if (!s || !c) return;
331
- let l = c.getBoundingClientRect(), u = r.value ? t : 0, d = e.clamp?.() ?? "chart", { left: f, top: p } = Ae(a.value.clientX, a.value.clientY - u, s.offsetWidth, s.offsetHeight, d, l);
331
+ let l = c.getBoundingClientRect(), u = r.value ? t : 0, d = e.clamp?.() ?? "chart", { left: f, top: p } = H(a.value.clientX, a.value.clientY - u, s.offsetWidth, s.offsetHeight, d, l);
332
332
  o.value = {
333
333
  left: f - l.left,
334
334
  top: p - l.top
@@ -395,69 +395,69 @@ function H(e) {
395
395
  }
396
396
  //#endregion
397
397
  //#region src/ChartMenu/download.ts
398
- function je(e, t) {
398
+ function Me(e, t) {
399
399
  let n = URL.createObjectURL(e), r = document.createElement("a");
400
400
  r.href = n, r.download = t, r.click(), URL.revokeObjectURL(n);
401
401
  }
402
- var Me = [
402
+ var U = [
403
403
  "color",
404
404
  "font-family",
405
405
  "font-size",
406
406
  "font-weight"
407
- ], U = ["fill", "stroke"];
408
- function W(e) {
407
+ ], W = ["fill", "stroke"];
408
+ function Ne(e) {
409
409
  let t = e.match(/^\s*var\(\s*(--[\w-]+)\s*(?:,\s*([^)]*?)\s*)?\)\s*$/);
410
410
  if (!t) return e;
411
411
  let [, n, r] = t;
412
412
  return window.getComputedStyle(document.documentElement).getPropertyValue(n).trim() || (r ? r.trim() : e);
413
413
  }
414
- function Ne(e) {
414
+ function G(e) {
415
415
  let t = e.cloneNode(!0);
416
416
  t.setAttribute("xmlns", "http://www.w3.org/2000/svg");
417
417
  let n = window.getComputedStyle(e), r = [];
418
- for (let e of Me) {
418
+ for (let e of U) {
419
419
  let t = n.getPropertyValue(e);
420
420
  t && r.push(`${e}: ${t}`);
421
421
  }
422
422
  let i = t.getAttribute("style") ?? "";
423
423
  t.setAttribute("style", [i, ...r].filter(Boolean).join("; "));
424
- for (let e of t.querySelectorAll("*")) for (let t of U) {
424
+ for (let e of t.querySelectorAll("*")) for (let t of W) {
425
425
  let n = e.getAttribute(t);
426
- !n || !n.includes("var(") || e.setAttribute(t, W(n));
426
+ !n || !n.includes("var(") || e.setAttribute(t, Ne(n));
427
427
  }
428
428
  return t;
429
429
  }
430
- function G(e, t) {
431
- let n = Ne(e), r = new XMLSerializer().serializeToString(n);
432
- je(new Blob([r], { type: "image/svg+xml" }), `${t}.svg`);
433
- }
434
430
  function K(e, t) {
435
- let n = Ne(e), r = new XMLSerializer().serializeToString(n), i = new Blob([r], { type: "image/svg+xml;charset=utf-8" }), a = URL.createObjectURL(i), o = new Image(), s = e.width.baseVal.value || e.clientWidth, c = e.height.baseVal.value || e.clientHeight;
431
+ let n = G(e), r = new XMLSerializer().serializeToString(n);
432
+ Me(new Blob([r], { type: "image/svg+xml" }), `${t}.svg`);
433
+ }
434
+ function Pe(e, t) {
435
+ let n = G(e), r = new XMLSerializer().serializeToString(n), i = new Blob([r], { type: "image/svg+xml;charset=utf-8" }), a = URL.createObjectURL(i), o = new Image(), s = e.width.baseVal.value || e.clientWidth, c = e.height.baseVal.value || e.clientHeight;
436
436
  o.onload = () => {
437
437
  let e = document.createElement("canvas");
438
438
  e.width = s * 2, e.height = c * 2;
439
439
  let n = e.getContext("2d");
440
440
  n.scale(2, 2), n.drawImage(o, 0, 0, s, c), e.toBlob((e) => {
441
- e && je(e, `${t}.png`);
441
+ e && Me(e, `${t}.png`);
442
442
  }), URL.revokeObjectURL(a);
443
443
  }, o.src = a;
444
444
  }
445
- function Pe(e, t) {
446
- je(new Blob([e], { type: "text/csv" }), `${t}.csv`);
445
+ function Fe(e, t) {
446
+ Me(new Blob([e], { type: "text/csv" }), `${t}.csv`);
447
447
  }
448
448
  //#endregion
449
449
  //#region src/_shared/useChartFullscreen.ts
450
- var q = 0, Fe = "";
451
- function Ie() {
452
- typeof document > "u" || (q === 0 && (Fe = document.body.style.overflow, document.body.style.overflow = "hidden"), q++);
450
+ var Ie = 0, Le = "";
451
+ function Re() {
452
+ typeof document > "u" || (Ie === 0 && (Le = document.body.style.overflow, document.body.style.overflow = "hidden"), Ie++);
453
453
  }
454
- function Le() {
455
- typeof document > "u" || q !== 0 && (q--, q === 0 && (document.body.style.overflow = Fe));
454
+ function ze() {
455
+ typeof document > "u" || Ie !== 0 && (Ie--, Ie === 0 && (document.body.style.overflow = Le));
456
456
  }
457
- function Re(e = {}) {
457
+ function Be(e = {}) {
458
458
  let t = v(!1), r = !1;
459
459
  function i(e) {
460
- e !== t.value && (t.value = e, e && !r ? (Ie(), r = !0) : !e && r && (Le(), r = !1));
460
+ e !== t.value && (t.value = e, e && !r ? (Re(), r = !0) : !e && r && (ze(), r = !1));
461
461
  }
462
462
  function a(e) {
463
463
  if (e.key !== "Escape" || !t.value) return;
@@ -476,7 +476,7 @@ function Re(e = {}) {
476
476
  return h(() => {
477
477
  typeof document > "u" || document.addEventListener("keydown", a);
478
478
  }), g(() => {
479
- typeof document > "u" || (document.removeEventListener("keydown", a), r &&= (Le(), !1));
479
+ typeof document > "u" || (document.removeEventListener("keydown", a), r &&= (ze(), !1));
480
480
  }), {
481
481
  isFullscreen: t,
482
482
  toggle: c,
@@ -504,7 +504,7 @@ function Re(e = {}) {
504
504
  }
505
505
  //#endregion
506
506
  //#region src/_shared/useChartMenu.ts
507
- function ze(e) {
507
+ function Ve(e) {
508
508
  let t = v(null);
509
509
  function r() {
510
510
  let t = e.filename();
@@ -512,23 +512,23 @@ function ze(e) {
512
512
  let n = e.legacyMenuLabel();
513
513
  return typeof n == "string" ? n : "chart";
514
514
  }
515
- let i = e.fullscreen ? Re({ target: e.fullscreenTarget }) : null, a = n(() => {
515
+ let i = e.fullscreen ? Be({ target: e.fullscreenTarget }) : null, a = n(() => {
516
516
  let n = r(), a = [];
517
517
  i && a.push(i.menuItem.value), a.push({
518
518
  label: "Save as SVG",
519
519
  action: () => {
520
- t.value && G(t.value, n);
520
+ t.value && K(t.value, n);
521
521
  }
522
522
  }, {
523
523
  label: "Save as PNG",
524
524
  action: () => {
525
- t.value && K(t.value, n);
525
+ t.value && Pe(t.value, n);
526
526
  }
527
527
  });
528
528
  let o = e.downloadButton?.();
529
529
  return !e.downloadLink() && !o && a.push({
530
530
  label: "Download CSV",
531
- action: () => Pe(e.getCsv(), n)
531
+ action: () => Fe(e.getCsv(), n)
532
532
  }), a;
533
533
  }), o = n(() => {
534
534
  if (e.downloadButton?.()) return null;
@@ -539,7 +539,7 @@ function ze(e) {
539
539
  return t ? typeof t == "string" ? t : "Download data (CSV)" : null;
540
540
  });
541
541
  function l() {
542
- Pe(e.getCsv(), r());
542
+ Fe(e.getCsv(), r());
543
543
  }
544
544
  return {
545
545
  svgRef: t,
@@ -557,7 +557,7 @@ function ze(e) {
557
557
  }
558
558
  //#endregion
559
559
  //#region src/_shared/seriesCsv.ts
560
- function Be(e) {
560
+ function He(e) {
561
561
  if (e.length === 0) return "";
562
562
  let t = 0;
563
563
  for (let n of e) n.data.length > t && (t = n.data.length);
@@ -569,43 +569,43 @@ function Be(e) {
569
569
  }
570
570
  return i.join("\n");
571
571
  }
572
- function Ve(e, t, n = "category") {
572
+ function Ue(e, t, n = "category") {
573
573
  if (t.length === 0 || e.length === 0) return "";
574
574
  let r = [(t.length === 1 ? [n, t[0].label || "value"] : [n, ...t.map((e, t) => e.label || `series_${t}`)]).join(",")];
575
575
  for (let n = 0; n < e.length; n++) {
576
- let i = [He(e[n])];
576
+ let i = [We(e[n])];
577
577
  for (let e of t) i.push(n < e.data.length ? String(e.data[n]) : "");
578
578
  r.push(i.join(","));
579
579
  }
580
580
  return r.join("\n");
581
581
  }
582
- function He(e) {
582
+ function We(e) {
583
583
  return e.includes(",") || e.includes("\"") || e.includes("\n") ? `"${e.replace(/"/g, "\"\"")}"` : e;
584
584
  }
585
585
  //#endregion
586
586
  //#region src/_shared/ChartAnnotations.vue?vue&type=script&setup=true&lang.ts
587
- var Ue = {
587
+ var Ge = {
588
588
  class: "chart-annotations",
589
589
  "pointer-events": "none"
590
- }, We = ["stroke", "stroke-width"], Ge = [
590
+ }, Ke = ["stroke", "stroke-width"], qe = [
591
591
  "d",
592
592
  "stroke",
593
593
  "stroke-width"
594
- ], Ke = [
594
+ ], q = [
595
595
  "fill",
596
596
  "stroke",
597
597
  "stroke-width",
598
598
  "transform"
599
- ], J = [
599
+ ], Je = [
600
600
  "stroke",
601
601
  "stroke-width",
602
602
  "stroke-dasharray"
603
- ], qe = [
603
+ ], J = [
604
604
  "d",
605
605
  "stroke",
606
606
  "stroke-width",
607
607
  "stroke-dasharray"
608
- ], Y = ["fill", "transform"], X = [
608
+ ], Y = ["fill", "transform"], Ye = [
609
609
  "x",
610
610
  "y",
611
611
  "text-anchor",
@@ -614,7 +614,7 @@ var Ue = {
614
614
  "fill",
615
615
  "stroke",
616
616
  "stroke-width"
617
- ], Je = ["x", "dy"], Z = ["font-weight", "font-style"], Q = 13, Ye = "normal", Xe = 700, Ze = "var(--color-bg-0, #fff)", Qe = 3, $e = 1, et = 4, tt = 6, nt = 1.2, rt = .35, it = /* @__PURE__ */ l({
617
+ ], X = ["x", "dy"], Z = ["font-weight", "font-style"], Xe = 13, Ze = "normal", Qe = 700, $e = "var(--color-bg-0, #fff)", et = 3, tt = 1, nt = 4, rt = 6, it = 1.2, at = .35, ot = /* @__PURE__ */ l({
618
618
  __name: "ChartAnnotations",
619
619
  props: {
620
620
  annotations: { default: () => [] },
@@ -651,7 +651,7 @@ var Ue = {
651
651
  if (!n || !isFinite(n.x) || !isFinite(n.y)) continue;
652
652
  let i = t.pointer ?? "curved", a = i.startsWith("rule");
653
653
  if (a && !r.bounds) continue;
654
- let { x: o, y: l } = t.offset, d = n.x + o, p = n.y + l, m = t.color ?? "currentColor", h = t.fontSize ?? Q, g = t.fontWeight ?? Ye, _ = t.outlineColor ?? Ze, v = t.outlineWidth ?? Qe, y = t.lineColor ?? m, b = t.lineWidth ?? $e, x = s(t.lineDash), ee = {
654
+ let { x: o, y: l } = t.offset, d = n.x + o, p = n.y + l, m = t.color ?? "currentColor", h = t.fontSize ?? Xe, g = t.fontWeight ?? Ze, _ = t.outlineColor ?? $e, v = t.outlineWidth ?? et, y = t.lineColor ?? m, b = t.lineWidth ?? tt, x = s(t.lineDash), ee = {
655
655
  left: "start",
656
656
  center: "middle",
657
657
  right: "end"
@@ -666,7 +666,7 @@ var Ue = {
666
666
  textX: d,
667
667
  textY: p,
668
668
  textAnchor: ee,
669
- dy: h * nt,
669
+ dy: h * it,
670
670
  fontSize: h,
671
671
  fontWeight: g,
672
672
  color: m,
@@ -732,11 +732,11 @@ var Ue = {
732
732
  }
733
733
  function f(e, t, n, r, i, a) {
734
734
  if (a === "none") return { path: "" };
735
- let o = n - e, s = r - t, c = r - i * rt;
735
+ let o = n - e, s = r - t, c = r - i * at;
736
736
  if (o === 0 || s === 0 || a === "straight") {
737
737
  let i = s === 0 ? r : c, a = n - e, o = i - t, l = Math.hypot(a, o);
738
738
  if (l <= 10) return { path: "" };
739
- let u = a / l, d = o / l, f = e + u * et, p = t + d * et, m = n - u * tt, h = i - d * tt, g = Math.atan2(-d, -u) * 180 / Math.PI;
739
+ let u = a / l, d = o / l, f = e + u * nt, p = t + d * nt, m = n - u * rt, h = i - d * rt, g = Math.atan2(-d, -u) * 180 / Math.PI;
740
740
  return {
741
741
  path: `M${f},${p} L${m},${h}`,
742
742
  arrow: {
@@ -747,8 +747,8 @@ var Ue = {
747
747
  };
748
748
  }
749
749
  let l = c - t;
750
- if (Math.abs(l) <= et || Math.abs(o) <= tt) return { path: "" };
751
- let u = Math.sign(o), d = Math.sign(l), f = e, p = t + d * et, m = n - u * tt, h = c, g = d > 0 ? -90 : 90;
750
+ if (Math.abs(l) <= nt || Math.abs(o) <= rt) return { path: "" };
751
+ let u = Math.sign(o), d = Math.sign(l), f = e, p = t + d * nt, m = n - u * rt, h = c, g = d > 0 ? -90 : 90;
752
752
  return {
753
753
  path: `M${f},${p} Q${f},${c} ${m},${h}`,
754
754
  arrow: {
@@ -758,7 +758,7 @@ var Ue = {
758
758
  }
759
759
  };
760
760
  }
761
- return (t, n) => (_(), a("g", Ue, [(_(!0), a(e, null, y(l.value, (t, n) => (_(), a(e, { key: n }, [
761
+ return (t, n) => (_(), a("g", Ge, [(_(!0), a(e, null, y(l.value, (t, n) => (_(), a(e, { key: n }, [
762
762
  t.rule && t.outlineWidth > 0 ? (_(), a("line", d({
763
763
  key: 0,
764
764
  ref_for: !0
@@ -767,7 +767,7 @@ var Ue = {
767
767
  stroke: t.outlineColor,
768
768
  "stroke-width": t.lineWidth + t.outlineWidth,
769
769
  "stroke-linecap": "round"
770
- }), null, 16, We)) : i("", !0),
770
+ }), null, 16, Ke)) : i("", !0),
771
771
  t.pointerPath && t.outlineWidth > 0 ? (_(), a("path", {
772
772
  key: 1,
773
773
  d: t.pointerPath,
@@ -776,7 +776,7 @@ var Ue = {
776
776
  stroke: t.outlineColor,
777
777
  "stroke-width": t.lineWidth + t.outlineWidth,
778
778
  "stroke-linecap": "round"
779
- }, null, 8, Ge)) : i("", !0),
779
+ }, null, 8, qe)) : i("", !0),
780
780
  t.arrowTip && t.outlineWidth > 0 ? (_(), a("polygon", {
781
781
  key: 2,
782
782
  points: "0,0 -6,-3 -6,3",
@@ -786,7 +786,7 @@ var Ue = {
786
786
  "stroke-width": t.outlineWidth,
787
787
  "stroke-linejoin": "round",
788
788
  transform: t.arrowTransform
789
- }, null, 8, Ke)) : i("", !0),
789
+ }, null, 8, q)) : i("", !0),
790
790
  t.rule ? (_(), a("line", d({
791
791
  key: 3,
792
792
  ref_for: !0
@@ -795,7 +795,7 @@ var Ue = {
795
795
  "stroke-width": t.lineWidth,
796
796
  "stroke-dasharray": t.lineDash,
797
797
  "stroke-linecap": "round"
798
- }), null, 16, J)) : i("", !0),
798
+ }), null, 16, Je)) : i("", !0),
799
799
  t.pointerPath ? (_(), a("path", {
800
800
  key: 4,
801
801
  d: t.pointerPath,
@@ -804,7 +804,7 @@ var Ue = {
804
804
  "stroke-width": t.lineWidth,
805
805
  "stroke-dasharray": t.lineDash,
806
806
  "stroke-linecap": "round"
807
- }, null, 8, qe)) : i("", !0),
807
+ }, null, 8, J)) : i("", !0),
808
808
  t.arrowTip ? (_(), a("polygon", {
809
809
  key: 5,
810
810
  points: "0,0 -6,-3 -6,3",
@@ -828,14 +828,14 @@ var Ue = {
828
828
  dy: r === 0 ? 0 : t.dy
829
829
  }, [(_(!0), a(e, null, y(n, (e, t) => (_(), a("tspan", {
830
830
  key: t,
831
- "font-weight": e.bold ? Xe : void 0,
831
+ "font-weight": e.bold ? Qe : void 0,
832
832
  "font-style": e.italic ? "italic" : void 0
833
- }, x(e.text), 9, Z))), 128))], 8, Je))), 128))], 8, X)
833
+ }, x(e.text), 9, Z))), 128))], 8, X))), 128))], 8, Ye)
834
834
  ], 64))), 128))]));
835
835
  }
836
- }), at = 400, ot = 200;
837
- function st(e) {
838
- let { containerRef: t, measuredWidth: r, measuredHeight: i } = ye({ debounce: e.debounce }), { svgRef: a, items: o, downloadLinkText: s, csvHref: c, downloadButtonText: l, triggerCsvDownload: u, resolvedFilename: d, isFullscreen: f, fullscreenStyle: p, teleportTarget: m, exitFullscreen: h } = ze({
836
+ }), st = 400, ct = 200;
837
+ function lt(e) {
838
+ let { containerRef: t, measuredWidth: r, measuredHeight: i } = be({ debounce: e.debounce }), { svgRef: a, items: o, downloadLinkText: s, csvHref: c, downloadButtonText: l, triggerCsvDownload: u, resolvedFilename: d, isFullscreen: f, fullscreenStyle: p, teleportTarget: m, exitFullscreen: h } = Ve({
839
839
  filename: e.filename,
840
840
  legacyMenuLabel: e.menu,
841
841
  getCsv: e.getCsv,
@@ -843,13 +843,13 @@ function st(e) {
843
843
  downloadButton: e.downloadButton,
844
844
  fullscreen: !0,
845
845
  fullscreenTarget: e.fullscreenTarget
846
- }), g = n(() => f.value && r.value > 0 ? r.value : e.width() ?? (r.value || at)), _ = n(() => {
846
+ }), g = n(() => f.value && r.value > 0 ? r.value : e.width() ?? (r.value || st)), _ = n(() => {
847
847
  if (f.value && i.value > 0) {
848
848
  let t = e.extraBelowHeight?.() ?? 0;
849
849
  return i.value - t;
850
850
  }
851
- return e.height() ?? ot;
852
- }), { padding: v, legendY: y, inlineLegendLayout: b, innerW: x, innerH: ee, bounds: S } = De({
851
+ return e.height() ?? ct;
852
+ }), { padding: v, legendY: y, inlineLegendLayout: b, innerW: x, innerH: ee, bounds: S } = Oe({
853
853
  title: e.title,
854
854
  titleStyle: e.titleStyle,
855
855
  xLabel: e.xLabel,
@@ -858,7 +858,7 @@ function st(e) {
858
858
  width: () => g.value,
859
859
  height: () => _.value,
860
860
  extraPadding: e.chartPadding
861
- }), { hoverIndex: C, tooltipRef: w, tooltipPos: T, handlers: E } = H({
861
+ }), { hoverIndex: C, tooltipRef: w, tooltipPos: T, handlers: E } = je({
862
862
  enabled: e.hasTooltipSlot,
863
863
  trigger: e.tooltipTrigger,
864
864
  clamp: () => e.tooltipClamp() ?? "chart",
@@ -895,17 +895,17 @@ function st(e) {
895
895
  measuredHeight: i
896
896
  };
897
897
  }
898
- function ct(e, t) {
898
+ function ut(e, t) {
899
899
  return (n) => {
900
900
  let r = e();
901
901
  if (r !== void 0) return te(n, r);
902
902
  let i = t();
903
- return i === void 0 ? me(n) : te(n, i);
903
+ return i === void 0 ? he(n) : te(n, i);
904
904
  };
905
905
  }
906
906
  //#endregion
907
907
  //#region src/_shared/contrast.ts
908
- function lt(e) {
908
+ function dt(e) {
909
909
  let t = e.trim();
910
910
  if (t.startsWith("#")) {
911
911
  let e = t.slice(1);
@@ -932,201 +932,201 @@ function lt(e) {
932
932
  }
933
933
  return null;
934
934
  }
935
- function ut([e, t, n]) {
935
+ function ft([e, t, n]) {
936
936
  let r = (e) => {
937
937
  let t = e / 255;
938
938
  return t <= .03928 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
939
939
  };
940
940
  return .2126 * r(e) + .7152 * r(t) + .0722 * r(n);
941
941
  }
942
- var dt = null, ft = /* @__PURE__ */ new Map();
943
- function pt(e) {
944
- let t = lt(e);
942
+ var pt = null, mt = /* @__PURE__ */ new Map();
943
+ function ht(e) {
944
+ let t = dt(e);
945
945
  if (t) return t;
946
- if (ft.has(e)) return ft.get(e) ?? null;
946
+ if (mt.has(e)) return mt.get(e) ?? null;
947
947
  if (typeof document > "u") return null;
948
- dt || (dt = document.createElement("span"), dt.style.cssText = "position:absolute;width:0;height:0;visibility:hidden;pointer-events:none", document.body.appendChild(dt)), dt.style.color = "", dt.style.color = e;
949
- let n = getComputedStyle(dt).color, r = lt(n);
950
- return ft.set(e, r), r;
948
+ pt || (pt = document.createElement("span"), pt.style.cssText = "position:absolute;width:0;height:0;visibility:hidden;pointer-events:none", document.body.appendChild(pt)), pt.style.color = "", pt.style.color = e;
949
+ let n = getComputedStyle(pt).color, r = dt(n);
950
+ return mt.set(e, r), r;
951
951
  }
952
- function mt(e, t = "#ffffff", n = "#1a1a1a") {
953
- let r = pt(e);
954
- return r && ut(r) > .179 ? n : t;
952
+ function gt(e, t = "#ffffff", n = "#1a1a1a") {
953
+ let r = ht(e);
954
+ return r && ft(r) > .179 ? n : t;
955
955
  }
956
956
  //#endregion
957
957
  //#region src/_shared/dateAxis.ts
958
- var ht = /^(\d{4})-(\d{2})-(\d{2})$/, gt = /^(\d{4})-(\d{2})-(\d{2})[Tt ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:?\d{2})?$/, _t = 1e3, vt = 60 * _t, yt = 60 * vt, bt = 24 * yt, xt = 7 * bt, St = 30 * bt, Ct = 365 * bt, wt = [
958
+ var _t = /^(\d{4})-(\d{2})-(\d{2})$/, vt = /^(\d{4})-(\d{2})-(\d{2})[Tt ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:?\d{2})?$/, Q = 1e3, yt = 60 * Q, bt = 60 * yt, xt = 24 * bt, St = 7 * xt, Ct = 30 * xt, wt = 365 * xt, Tt = [
959
959
  {
960
960
  unit: "second",
961
961
  step: 1,
962
- ms: 1 * _t
962
+ ms: 1 * Q
963
963
  },
964
964
  {
965
965
  unit: "second",
966
966
  step: 5,
967
- ms: 5 * _t
967
+ ms: 5 * Q
968
968
  },
969
969
  {
970
970
  unit: "second",
971
971
  step: 15,
972
- ms: 15 * _t
972
+ ms: 15 * Q
973
973
  },
974
974
  {
975
975
  unit: "second",
976
976
  step: 30,
977
- ms: 30 * _t
977
+ ms: 30 * Q
978
978
  },
979
979
  {
980
980
  unit: "minute",
981
981
  step: 1,
982
- ms: 1 * vt
982
+ ms: 1 * yt
983
983
  },
984
984
  {
985
985
  unit: "minute",
986
986
  step: 5,
987
- ms: 5 * vt
987
+ ms: 5 * yt
988
988
  },
989
989
  {
990
990
  unit: "minute",
991
991
  step: 15,
992
- ms: 15 * vt
992
+ ms: 15 * yt
993
993
  },
994
994
  {
995
995
  unit: "minute",
996
996
  step: 30,
997
- ms: 30 * vt
997
+ ms: 30 * yt
998
998
  },
999
999
  {
1000
1000
  unit: "hour",
1001
1001
  step: 1,
1002
- ms: 1 * yt
1002
+ ms: 1 * bt
1003
1003
  },
1004
1004
  {
1005
1005
  unit: "hour",
1006
1006
  step: 3,
1007
- ms: 3 * yt
1007
+ ms: 3 * bt
1008
1008
  },
1009
1009
  {
1010
1010
  unit: "hour",
1011
1011
  step: 6,
1012
- ms: 6 * yt
1012
+ ms: 6 * bt
1013
1013
  },
1014
1014
  {
1015
1015
  unit: "hour",
1016
1016
  step: 12,
1017
- ms: 12 * yt
1017
+ ms: 12 * bt
1018
1018
  },
1019
1019
  {
1020
1020
  unit: "day",
1021
1021
  step: 1,
1022
- ms: 1 * bt
1022
+ ms: 1 * xt
1023
1023
  },
1024
1024
  {
1025
1025
  unit: "day",
1026
1026
  step: 2,
1027
- ms: 2 * bt
1027
+ ms: 2 * xt
1028
1028
  },
1029
1029
  {
1030
1030
  unit: "week",
1031
1031
  step: 1,
1032
- ms: 1 * xt
1032
+ ms: 1 * St
1033
1033
  },
1034
1034
  {
1035
1035
  unit: "month",
1036
1036
  step: 1,
1037
- ms: 1 * St
1037
+ ms: 1 * Ct
1038
1038
  },
1039
1039
  {
1040
1040
  unit: "month",
1041
1041
  step: 3,
1042
- ms: 3 * St
1042
+ ms: 3 * Ct
1043
1043
  },
1044
1044
  {
1045
1045
  unit: "month",
1046
1046
  step: 6,
1047
- ms: 6 * St
1047
+ ms: 6 * Ct
1048
1048
  },
1049
1049
  {
1050
1050
  unit: "year",
1051
1051
  step: 1,
1052
- ms: 1 * Ct
1052
+ ms: 1 * wt
1053
1053
  },
1054
1054
  {
1055
1055
  unit: "year",
1056
1056
  step: 2,
1057
- ms: 2 * Ct
1057
+ ms: 2 * wt
1058
1058
  },
1059
1059
  {
1060
1060
  unit: "year",
1061
1061
  step: 5,
1062
- ms: 5 * Ct
1062
+ ms: 5 * wt
1063
1063
  },
1064
1064
  {
1065
1065
  unit: "year",
1066
1066
  step: 10,
1067
- ms: 10 * Ct
1067
+ ms: 10 * wt
1068
1068
  },
1069
1069
  {
1070
1070
  unit: "year",
1071
1071
  step: 25,
1072
- ms: 25 * Ct
1072
+ ms: 25 * wt
1073
1073
  },
1074
1074
  {
1075
1075
  unit: "year",
1076
1076
  step: 50,
1077
- ms: 50 * Ct
1077
+ ms: 50 * wt
1078
1078
  },
1079
1079
  {
1080
1080
  unit: "year",
1081
1081
  step: 100,
1082
- ms: 100 * Ct
1082
+ ms: 100 * wt
1083
1083
  }
1084
- ], Tt = 1e3;
1085
- function Et(e, t) {
1084
+ ], Et = 1e3;
1085
+ function Dt(e, t) {
1086
1086
  if (e instanceof Date) {
1087
1087
  let t = e.getTime();
1088
1088
  return Number.isFinite(t) ? t : null;
1089
1089
  }
1090
1090
  if (typeof e != "string") return null;
1091
- let n = ht.exec(e);
1091
+ let n = _t.exec(e);
1092
1092
  if (n) {
1093
1093
  let e = +n[1], r = n[2] - 1, i = +n[3];
1094
1094
  return t === "utc" ? Date.UTC(e, r, i) : new Date(e, r, i).getTime();
1095
1095
  }
1096
- let r = gt.exec(e);
1096
+ let r = vt.exec(e);
1097
1097
  if (r) {
1098
1098
  let e = +r[1], n = r[2] - 1, i = +r[3], a = +r[4], o = +r[5], s = r[6] ? +r[6] : 0, c = r[7] ? Number("0." + r[7]) * 1e3 : 0, l = r[8];
1099
1099
  if (l) {
1100
1100
  if (l === "Z" || l === "z") return Date.UTC(e, n, i, a, o, s, c);
1101
- let t = l[0] === "+" ? 1 : -1, r = +l.slice(1, 3), u = +l.slice(-2), d = t * (r * 60 + u) * vt;
1101
+ let t = l[0] === "+" ? 1 : -1, r = +l.slice(1, 3), u = +l.slice(-2), d = t * (r * 60 + u) * yt;
1102
1102
  return Date.UTC(e, n, i, a, o, s, c) - d;
1103
1103
  }
1104
1104
  return t === "utc" ? Date.UTC(e, n, i, a, o, s, c) : new Date(e, n, i, a, o, s, c).getTime();
1105
1105
  }
1106
1106
  return null;
1107
1107
  }
1108
- function Dt(e) {
1109
- return e instanceof Date ? Number.isFinite(e.getTime()) : typeof e == "string" ? ht.test(e) || gt.test(e) : !1;
1108
+ function Ot(e) {
1109
+ return e instanceof Date ? Number.isFinite(e.getTime()) : typeof e == "string" ? _t.test(e) || vt.test(e) : !1;
1110
1110
  }
1111
- function Ot(e, t) {
1111
+ function kt(e, t) {
1112
1112
  if (e.length === 0) return !1;
1113
1113
  for (let n = 0; n < e.length; n++) {
1114
1114
  let r = e[n];
1115
- if (!Dt(r) || Et(r, t) === null) return !1;
1115
+ if (!Ot(r) || Dt(r, t) === null) return !1;
1116
1116
  }
1117
1117
  return !0;
1118
1118
  }
1119
- function kt(e, t) {
1119
+ function At(e, t) {
1120
1120
  let n = e / Math.max(1, t);
1121
- for (let e of wt) if (n <= e.ms) return e;
1122
- return wt[wt.length - 1];
1121
+ for (let e of Tt) if (n <= e.ms) return e;
1122
+ return Tt[Tt.length - 1];
1123
1123
  }
1124
- function At(e, t, n) {
1124
+ function jt(e, t, n) {
1125
1125
  let r = new Date(e);
1126
1126
  if (n === "utc") switch (t) {
1127
- case "second": return Math.floor(e / _t) * _t;
1128
- case "minute": return Math.floor(e / vt) * vt;
1129
- case "hour": return Math.floor(e / yt) * yt;
1127
+ case "second": return Math.floor(e / Q) * Q;
1128
+ case "minute": return Math.floor(e / yt) * yt;
1129
+ case "hour": return Math.floor(e / bt) * bt;
1130
1130
  case "day": return Date.UTC(r.getUTCFullYear(), r.getUTCMonth(), r.getUTCDate());
1131
1131
  case "week": {
1132
1132
  let e = (r.getUTCDay() + 6) % 7;
@@ -1136,8 +1136,8 @@ function At(e, t, n) {
1136
1136
  case "year": return Date.UTC(r.getUTCFullYear(), 0, 1);
1137
1137
  }
1138
1138
  switch (t) {
1139
- case "second": return Math.floor(e / _t) * _t;
1140
- case "minute": return Math.floor(e / vt) * vt;
1139
+ case "second": return Math.floor(e / Q) * Q;
1140
+ case "minute": return Math.floor(e / yt) * yt;
1141
1141
  case "hour": return new Date(r.getFullYear(), r.getMonth(), r.getDate(), r.getHours()).getTime();
1142
1142
  case "day": return new Date(r.getFullYear(), r.getMonth(), r.getDate()).getTime();
1143
1143
  case "week": {
@@ -1148,11 +1148,11 @@ function At(e, t, n) {
1148
1148
  case "year": return new Date(r.getFullYear(), 0, 1).getTime();
1149
1149
  }
1150
1150
  }
1151
- function jt(e, t, n, r) {
1152
- if (t === "second") return e + n * _t;
1153
- if (t === "minute") return e + n * vt;
1154
- if (t === "hour" && r === "utc") return e + n * yt;
1155
- if (t === "week" && r === "utc") return e + n * xt;
1151
+ function Mt(e, t, n, r) {
1152
+ if (t === "second") return e + n * Q;
1153
+ if (t === "minute") return e + n * yt;
1154
+ if (t === "hour" && r === "utc") return e + n * bt;
1155
+ if (t === "week" && r === "utc") return e + n * St;
1156
1156
  let i = new Date(e);
1157
1157
  if (r === "utc") switch (t) {
1158
1158
  case "day": return Date.UTC(i.getUTCFullYear(), i.getUTCMonth(), i.getUTCDate() + n, i.getUTCHours(), i.getUTCMinutes(), i.getUTCSeconds(), i.getUTCMilliseconds());
@@ -1168,21 +1168,21 @@ function jt(e, t, n, r) {
1168
1168
  }
1169
1169
  return e;
1170
1170
  }
1171
- function Mt(e, t, n, r) {
1171
+ function Nt(e, t, n, r) {
1172
1172
  if (!Number.isFinite(e) || !Number.isFinite(t) || e >= t || n < 1) return {
1173
1173
  values: [],
1174
1174
  unit: "day"
1175
1175
  };
1176
- let { unit: i, step: a } = kt(t - e, n), o = At(e, i, r), s = 0;
1177
- for (; o < e && s < Tt;) o = jt(o, i, a, r), s++;
1176
+ let { unit: i, step: a } = At(t - e, n), o = jt(e, i, r), s = 0;
1177
+ for (; o < e && s < Et;) o = Mt(o, i, a, r), s++;
1178
1178
  let c = [];
1179
- for (let e = 0; e < Tt && o <= t; e++) c.push(o), o = jt(o, i, a, r);
1179
+ for (let e = 0; e < Et && o <= t; e++) c.push(o), o = Mt(o, i, a, r);
1180
1180
  return {
1181
1181
  values: c,
1182
1182
  unit: i
1183
1183
  };
1184
1184
  }
1185
- var Nt = {
1185
+ var Pt = {
1186
1186
  iso: {
1187
1187
  year: "numeric",
1188
1188
  month: "2-digit",
@@ -1220,7 +1220,7 @@ var Nt = {
1220
1220
  hourCycle: "h23"
1221
1221
  },
1222
1222
  medium: { dateStyle: "medium" }
1223
- }, Pt = {
1223
+ }, Ft = {
1224
1224
  year: "year",
1225
1225
  month: "month-year",
1226
1226
  week: "month-day",
@@ -1232,27 +1232,27 @@ var Nt = {
1232
1232
  function $(e) {
1233
1233
  return e < 10 ? "0" + e : String(e);
1234
1234
  }
1235
- function Ft(e, t) {
1235
+ function It(e, t) {
1236
1236
  let n = new Date(e);
1237
1237
  return t === "utc" ? `${n.getUTCFullYear()}-${$(n.getUTCMonth() + 1)}-${$(n.getUTCDate())}` : `${n.getFullYear()}-${$(n.getMonth() + 1)}-${$(n.getDate())}`;
1238
1238
  }
1239
- function It(e, t) {
1239
+ function Lt(e, t) {
1240
1240
  let n = new Date(e);
1241
1241
  return t === "utc" ? `${n.getUTCFullYear()}-${$(n.getUTCMonth() + 1)}-${$(n.getUTCDate())}T${$(n.getUTCHours())}:${$(n.getUTCMinutes())}:${$(n.getUTCSeconds())}Z` : `${n.getFullYear()}-${$(n.getMonth() + 1)}-${$(n.getDate())}T${$(n.getHours())}:${$(n.getMinutes())}:${$(n.getSeconds())}`;
1242
1242
  }
1243
- function Lt(e) {
1244
- return e in Nt;
1243
+ function Rt(e) {
1244
+ return e in Pt;
1245
1245
  }
1246
- function Rt(e, t, n, r) {
1246
+ function zt(e, t, n, r) {
1247
1247
  if (typeof t == "function") return t(e, r);
1248
1248
  let i = null, a;
1249
- if (t === void 0) i = r ? Pt[r] : "iso", a = Nt[i];
1249
+ if (t === void 0) i = r ? Ft[r] : "iso", a = Pt[i];
1250
1250
  else if (typeof t == "string") {
1251
- if (!Lt(t)) throw Error(`Unknown date format preset: "${t}"`);
1252
- i = t, a = Nt[i];
1251
+ if (!Rt(t)) throw Error(`Unknown date format preset: "${t}"`);
1252
+ i = t, a = Pt[i];
1253
1253
  } else a = t;
1254
- if (i === "iso") return Ft(e, n);
1255
- if (i === "iso-datetime") return It(e, n);
1254
+ if (i === "iso") return It(e, n);
1255
+ if (i === "iso-datetime") return Lt(e, n);
1256
1256
  let o = n === "utc" ? {
1257
1257
  ...a,
1258
1258
  timeZone: "UTC"
@@ -1261,40 +1261,35 @@ function Rt(e, t, n, r) {
1261
1261
  }
1262
1262
  //#endregion
1263
1263
  //#region src/LineChart/LineChart.vue?vue&type=script&setup=true&lang.ts
1264
- var zt = {
1264
+ var Bt = {
1265
1265
  class: "chart-sr-only",
1266
1266
  "aria-live": "polite"
1267
- }, Bt = ["width", "height"], Vt = [
1267
+ }, Vt = ["width", "height"], Ht = [
1268
1268
  "x",
1269
1269
  "y",
1270
1270
  "text-anchor",
1271
1271
  "font-size",
1272
1272
  "font-weight",
1273
1273
  "fill"
1274
- ], Ht = ["x", "dy"], Ut = { key: 1 }, Wt = [
1274
+ ], Ut = ["x", "dy"], Wt = { key: 1 }, Gt = [
1275
1275
  "x1",
1276
1276
  "y1",
1277
1277
  "x2",
1278
1278
  "y2",
1279
1279
  "stroke",
1280
1280
  "stroke-dasharray"
1281
- ], Gt = [
1281
+ ], Kt = [
1282
1282
  "cx",
1283
1283
  "cy",
1284
1284
  "fill",
1285
1285
  "fill-opacity",
1286
1286
  "stroke"
1287
- ], Kt = [
1287
+ ], qt = [
1288
1288
  "x",
1289
1289
  "y",
1290
1290
  "font-size",
1291
1291
  "fill",
1292
1292
  "font-weight"
1293
- ], qt = [
1294
- "x1",
1295
- "y1",
1296
- "x2",
1297
- "y2"
1298
1293
  ], Jt = [
1299
1294
  "x1",
1300
1295
  "y1",
@@ -1311,18 +1306,23 @@ var zt = {
1311
1306
  "x2",
1312
1307
  "y2"
1313
1308
  ], Zt = [
1309
+ "x1",
1310
+ "y1",
1311
+ "x2",
1312
+ "y2"
1313
+ ], Qt = [
1314
1314
  "x",
1315
1315
  "y",
1316
1316
  "font-size",
1317
1317
  "fill",
1318
1318
  "font-weight",
1319
1319
  "fill-opacity"
1320
- ], Qt = [
1320
+ ], $t = [
1321
1321
  "transform",
1322
1322
  "font-size",
1323
1323
  "fill",
1324
1324
  "font-weight"
1325
- ], $t = [
1325
+ ], en = [
1326
1326
  "x",
1327
1327
  "y",
1328
1328
  "text-anchor",
@@ -1330,43 +1330,43 @@ var zt = {
1330
1330
  "fill",
1331
1331
  "font-weight",
1332
1332
  "fill-opacity"
1333
- ], en = [
1333
+ ], tn = [
1334
1334
  "x",
1335
1335
  "y",
1336
1336
  "font-size",
1337
1337
  "fill",
1338
1338
  "font-weight"
1339
- ], tn = [
1339
+ ], nn = [
1340
1340
  "d",
1341
1341
  "fill",
1342
1342
  "fill-opacity"
1343
- ], nn = [
1343
+ ], rn = [
1344
1344
  "d",
1345
1345
  "stroke",
1346
1346
  "stroke-width"
1347
- ], rn = [
1347
+ ], an = [
1348
1348
  "d",
1349
1349
  "stroke",
1350
1350
  "stroke-width",
1351
1351
  "stroke-opacity",
1352
1352
  "stroke-dasharray"
1353
- ], an = [
1353
+ ], on = [
1354
1354
  "cx",
1355
1355
  "cy",
1356
1356
  "r",
1357
1357
  "fill",
1358
1358
  "fill-opacity",
1359
1359
  "stroke"
1360
- ], on = [
1360
+ ], sn = [
1361
1361
  "d",
1362
1362
  "fill",
1363
1363
  "fill-opacity"
1364
- ], sn = [
1364
+ ], cn = [
1365
1365
  "d",
1366
1366
  "stroke",
1367
1367
  "stroke-width",
1368
1368
  "stroke-dasharray"
1369
- ], cn = [
1369
+ ], ln = [
1370
1370
  "x1",
1371
1371
  "y1",
1372
1372
  "x2",
@@ -1374,7 +1374,7 @@ var zt = {
1374
1374
  "stroke",
1375
1375
  "stroke-width",
1376
1376
  "stroke-dasharray"
1377
- ], ln = [
1377
+ ], un = [
1378
1378
  "x1",
1379
1379
  "y1",
1380
1380
  "x2",
@@ -1382,53 +1382,53 @@ var zt = {
1382
1382
  "stroke",
1383
1383
  "stroke-width",
1384
1384
  "stroke-dasharray"
1385
- ], un = [
1385
+ ], dn = [
1386
1386
  "x1",
1387
1387
  "y1",
1388
1388
  "x2",
1389
1389
  "y2"
1390
- ], dn = [
1390
+ ], fn = [
1391
1391
  "x1",
1392
1392
  "y1",
1393
1393
  "x2",
1394
1394
  "y2"
1395
- ], fn = [
1395
+ ], pn = [
1396
1396
  "x1",
1397
1397
  "y1",
1398
1398
  "x2",
1399
1399
  "y2"
1400
- ], pn = [
1400
+ ], mn = [
1401
1401
  "cx",
1402
1402
  "cy",
1403
1403
  "fill"
1404
- ], mn = [
1404
+ ], hn = [
1405
1405
  "x",
1406
1406
  "y",
1407
1407
  "width",
1408
1408
  "height"
1409
- ], hn = [
1409
+ ], gn = [
1410
1410
  "cx",
1411
1411
  "cy",
1412
1412
  "fill",
1413
1413
  "fill-opacity",
1414
1414
  "stroke"
1415
- ], gn = [
1415
+ ], _n = [
1416
1416
  "x",
1417
1417
  "y",
1418
1418
  "font-size",
1419
1419
  "font-weight",
1420
1420
  "fill"
1421
- ], _n = [
1421
+ ], vn = [
1422
1422
  "x",
1423
1423
  "y",
1424
1424
  "font-size",
1425
1425
  "font-weight",
1426
1426
  "fill",
1427
1427
  "fill-opacity"
1428
- ], vn = { class: "line-chart-tooltip" }, yn = {
1428
+ ], yn = { class: "line-chart-tooltip" }, bn = {
1429
1429
  key: 0,
1430
1430
  class: "line-chart-tooltip-label"
1431
- }, bn = ["href", "download"], xn = 36, Sn = 12, Cn = 7, wn = 16, Tn = /* @__PURE__ */ L(/* @__PURE__ */ l({
1431
+ }, xn = ["href", "download"], Sn = 36, Cn = 12, wn = 7, Tn = 16, En = /* @__PURE__ */ L(/* @__PURE__ */ l({
1432
1432
  inheritAttrs: !1,
1433
1433
  __name: "LineChart",
1434
1434
  props: {
@@ -1487,13 +1487,13 @@ var zt = {
1487
1487
  if (!e) return;
1488
1488
  if (!t) return e;
1489
1489
  let r = new Float64Array(e.length);
1490
- for (let t = 0; t < e.length; t++) r[t] = Et(e[t], n) ?? NaN;
1490
+ for (let t = 0; t < e.length; t++) r[t] = Dt(e[t], n) ?? NaN;
1491
1491
  return r;
1492
1492
  }
1493
- let w = ct(() => f.tooltipValueFormat, () => f.yTickFormat), T = n(() => f.timezone ?? "utc"), E = n(() => {
1493
+ let w = ut(() => f.tooltipValueFormat, () => f.yTickFormat), T = n(() => f.timezone ?? "utc"), E = n(() => {
1494
1494
  let e = T.value, t = !1, n = !1;
1495
1495
  for (let r of v(f)) {
1496
- if (n = !0, !Ot(r, e)) {
1496
+ if (n = !0, !kt(r, e)) {
1497
1497
  t = !1;
1498
1498
  break;
1499
1499
  }
@@ -1519,28 +1519,28 @@ var zt = {
1519
1519
  series: r,
1520
1520
  areas: i
1521
1521
  };
1522
- }), D = n(() => E.value.isDate), O = n(() => E.value.series), k = n(() => E.value.areas), ne = n(() => {
1522
+ }), D = n(() => E.value.isDate), O = n(() => E.value.series), k = n(() => E.value.areas), A = n(() => {
1523
1523
  let e = 0;
1524
1524
  for (let t of O.value) t.data.length > e && (e = t.data.length);
1525
1525
  for (let t of k.value) t.upper.length > e && (e = t.upper.length), t.lower.length > e && (e = t.lower.length);
1526
1526
  return e;
1527
- }), A = n(() => O.value.some((e) => e.x != null) || k.value.some((e) => e.x != null));
1528
- function j(e, t) {
1527
+ }), j = n(() => O.value.some((e) => e.x != null) || k.value.some((e) => e.x != null));
1528
+ function M(e, t) {
1529
1529
  return e.x ? Number(e.x[t]) : t;
1530
1530
  }
1531
- function M(e, t) {
1531
+ function N(e, t) {
1532
1532
  return e.x ? Number(e.x[t]) : t;
1533
1533
  }
1534
- let re = n(() => A.value ? 0 : f.xMin ?? 0), ie = n(() => {
1534
+ let ne = n(() => j.value ? 0 : f.xMin ?? 0), re = n(() => {
1535
1535
  let e = Infinity, t = -Infinity;
1536
1536
  for (let n of O.value) for (let r = 0; r < n.data.length; r++) {
1537
- let i = j(n, r);
1537
+ let i = M(n, r);
1538
1538
  isFinite(i) && (i < e && (e = i), i > t && (t = i));
1539
1539
  }
1540
1540
  for (let n of k.value) {
1541
1541
  let r = Math.max(n.upper.length, n.lower.length);
1542
1542
  for (let i = 0; i < r; i++) {
1543
- let r = M(n, i);
1543
+ let r = N(n, i);
1544
1544
  isFinite(r) && (r < e && (e = r), r > t && (t = r));
1545
1545
  }
1546
1546
  }
@@ -1552,11 +1552,11 @@ var zt = {
1552
1552
  max: 0
1553
1553
  };
1554
1554
  });
1555
- function N(e) {
1556
- let { min: t, max: n } = ie.value, r = n - t || 1;
1555
+ function P(e) {
1556
+ let { min: t, max: n } = re.value, r = n - t || 1;
1557
1557
  return U.value.left + (e - t) / r * G.value;
1558
1558
  }
1559
- let ae = n(() => {
1559
+ let ie = n(() => {
1560
1560
  let e = Infinity, t = -Infinity, n = Infinity, r = (r) => {
1561
1561
  isFinite(r) && (r < e && (e = r), r > t && (t = r), r > 0 && r < n && (n = r));
1562
1562
  };
@@ -1571,77 +1571,77 @@ var zt = {
1571
1571
  range: 1
1572
1572
  };
1573
1573
  f.yMin != null && f.yMin < e && (e = f.yMin);
1574
- let i = _e(e, t, f.yScaleType, n);
1574
+ let i = ve(e, t, f.yScaleType, n);
1575
1575
  return {
1576
1576
  min: i.min,
1577
1577
  max: i.max,
1578
1578
  range: i.max - i.min || 1
1579
1579
  };
1580
1580
  });
1581
- function P(e) {
1582
- let { min: t, max: n } = ae.value;
1583
- return U.value.top + K.value - ge(e, t, n, f.yScaleType) * K.value;
1581
+ function F(e) {
1582
+ let { min: t, max: n } = ie.value;
1583
+ return U.value.top + K.value - _e(e, t, n, f.yScaleType) * K.value;
1584
1584
  }
1585
- function oe(e) {
1585
+ function ae(e) {
1586
1586
  let t = e.data;
1587
1587
  if (t.length === 0) return "";
1588
1588
  let n = "", r = !1;
1589
1589
  for (let i = 0; i < t.length; i++) {
1590
- let a = j(e, i);
1590
+ let a = M(e, i);
1591
1591
  if (!isFinite(t[i]) || !isFinite(a)) {
1592
1592
  r = !1;
1593
1593
  continue;
1594
1594
  }
1595
- let o = N(a), s = P(t[i]);
1595
+ let o = P(a), s = F(t[i]);
1596
1596
  n += r ? `L${o},${s}` : `M${o},${s}`, r = !0;
1597
1597
  }
1598
1598
  return n;
1599
1599
  }
1600
- function se(e) {
1600
+ function oe(e) {
1601
1601
  let t = e.data, n = [];
1602
1602
  for (let r = 0; r < t.length; r++) {
1603
- let i = j(e, r);
1603
+ let i = M(e, r);
1604
1604
  !isFinite(t[r]) || !isFinite(i) || n.push({
1605
- x: N(i),
1606
- y: P(t[r])
1605
+ x: P(i),
1606
+ y: F(t[r])
1607
1607
  });
1608
1608
  }
1609
1609
  return n;
1610
1610
  }
1611
- function ce(e) {
1611
+ function se(e) {
1612
1612
  let t = Math.min(e.upper.length, e.lower.length);
1613
1613
  if (t === 0) return "";
1614
1614
  let n = [], r = [];
1615
- for (let i = 0; i < t; i++) isFinite(e.upper[i]) && isFinite(e.lower[i]) && isFinite(M(e, i)) ? r.push(i) : r.length && (n.push(r), r = []);
1615
+ for (let i = 0; i < t; i++) isFinite(e.upper[i]) && isFinite(e.lower[i]) && isFinite(N(e, i)) ? r.push(i) : r.length && (n.push(r), r = []);
1616
1616
  r.length && n.push(r);
1617
1617
  let i = "";
1618
1618
  for (let t of n) {
1619
- i += `M${N(M(e, t[0]))},${P(e.upper[t[0]])}`;
1620
- for (let n = 1; n < t.length; n++) i += `L${N(M(e, t[n]))},${P(e.upper[t[n]])}`;
1621
- for (let n = t.length - 1; n >= 0; n--) i += `L${N(M(e, t[n]))},${P(e.lower[t[n]])}`;
1619
+ i += `M${P(N(e, t[0]))},${F(e.upper[t[0]])}`;
1620
+ for (let n = 1; n < t.length; n++) i += `L${P(N(e, t[n]))},${F(e.upper[t[n]])}`;
1621
+ for (let n = t.length - 1; n >= 0; n--) i += `L${P(N(e, t[n]))},${F(e.lower[t[n]])}`;
1622
1622
  i += "Z";
1623
1623
  }
1624
1624
  return i;
1625
1625
  }
1626
- function F(e, t) {
1626
+ function I(e, t) {
1627
1627
  let n = t === "start" ? e.startIndex : e.endIndex, r = e.seriesIndex != null && O.value[e.seriesIndex] || O.value[0];
1628
- return N(r ? j(r, n) : n);
1628
+ return P(r ? M(r, n) : n);
1629
1629
  }
1630
- function le(e, t = !0) {
1630
+ function ce(e, t = !0) {
1631
1631
  let n = U.value.top + K.value;
1632
1632
  if (e.seriesIndex == null) {
1633
- let t = F(e, "start"), r = F(e, "end");
1633
+ let t = I(e, "start"), r = I(e, "end");
1634
1634
  return t > r ? "" : `M${t},${U.value.top}L${r},${U.value.top}L${r},${n}L${t},${n}Z`;
1635
1635
  }
1636
1636
  let r = O.value[e.seriesIndex];
1637
1637
  if (!r) return "";
1638
1638
  let i = Math.max(0, e.startIndex), a = Math.min(r.data.length - 1, e.endIndex);
1639
1639
  if (i > a) return "";
1640
- let o = `M${N(j(r, i))},${P(r.data[i])}`;
1641
- for (let e = i + 1; e <= a; e++) isFinite(r.data[e]) && (o += `L${N(j(r, e))},${P(r.data[e])}`);
1642
- return t && (o += `L${N(j(r, a))},${n}`, o += `L${N(j(r, i))},${n}`, o += "Z"), o;
1640
+ let o = `M${P(M(r, i))},${F(r.data[i])}`;
1641
+ for (let e = i + 1; e <= a; e++) isFinite(r.data[e]) && (o += `L${P(M(r, e))},${F(r.data[e])}`);
1642
+ return t && (o += `L${P(M(r, a))},${n}`, o += `L${P(M(r, i))},${n}`, o += "Z"), o;
1643
1643
  }
1644
- let ue = n(() => {
1644
+ let le = n(() => {
1645
1645
  let e = f.areaSections;
1646
1646
  if (!e?.length) return {
1647
1647
  labels: [],
@@ -1650,11 +1650,11 @@ var zt = {
1650
1650
  let t = [], n = U.value.left + G.value;
1651
1651
  for (let r of e) {
1652
1652
  if (!r.label && !r.description || r.legend === "inline" || r.legend === !1) continue;
1653
- let e = r.label ?? "", i = r.description ?? "", a = Math.max(e.length, i.length) * Cn, o = F(r, "start") + a / 2 + 2, s = n - a / 2 - 8, c = Math.min(o, s), l = r.color ?? (r.seriesIndex == null ? "#999" : O.value[r.seriesIndex]?.color ?? "currentColor"), u = xe({
1653
+ let e = r.label ?? "", i = r.description ?? "", a = Math.max(e.length, i.length) * wn, o = I(r, "start") + a / 2 + 2, s = n - a / 2 - 8, c = Math.min(o, s), l = r.color ?? (r.seriesIndex == null ? "#999" : O.value[r.seriesIndex]?.color ?? "currentColor"), u = Se({
1654
1654
  color: l,
1655
1655
  fontWeight: 600,
1656
1656
  ...r.inlineLabelStyle
1657
- }, { fontSize: 11 }), d = xe(r.inlineDescriptionStyle, {
1657
+ }, { fontSize: 11 }), d = Se(r.inlineDescriptionStyle, {
1658
1658
  fontSize: 11,
1659
1659
  fillOpacity: .6
1660
1660
  });
@@ -1674,7 +1674,7 @@ var zt = {
1674
1674
  let r = [];
1675
1675
  for (let e of t) {
1676
1676
  let t = e.cx - e.textWidth / 2, n = 0;
1677
- for (; n < r.length && !(t >= r[n] + wn);) n++;
1677
+ for (; n < r.length && !(t >= r[n] + Tn);) n++;
1678
1678
  e.row = n;
1679
1679
  let i = e.cx + e.textWidth / 2;
1680
1680
  r[n] = Math.max(r[n] ?? -Infinity, i);
@@ -1684,9 +1684,9 @@ var zt = {
1684
1684
  extraHeight: 0
1685
1685
  } : {
1686
1686
  labels: t,
1687
- extraHeight: (Math.max(...t.map((e) => e.row)) + 1) * xn + Sn
1687
+ extraHeight: (Math.max(...t.map((e) => e.row)) + 1) * Sn + Cn
1688
1688
  };
1689
- }), de = n(() => {
1689
+ }), ue = n(() => {
1690
1690
  let e = [];
1691
1691
  for (let t of O.value) !t.legend || t.showInLegend === !1 || e.push({
1692
1692
  label: t.legend,
@@ -1706,47 +1706,47 @@ var zt = {
1706
1706
  });
1707
1707
  }
1708
1708
  return e;
1709
- }), I = n(() => de.value.map((e) => e.label)), L = n(() => Me.value + ue.value.extraHeight), z = n(() => U.value.top + K.value + U.value.bottom + Sn), B = n(() => {
1710
- let { min: e, max: t } = ae.value, n = (e) => f.yTickFormat === void 0 ? me(e) : te(e, f.yTickFormat);
1709
+ }), de = n(() => ue.value.map((e) => e.label)), fe = n(() => Me.value + le.value.extraHeight), L = n(() => U.value.top + K.value + U.value.bottom + Cn), z = n(() => {
1710
+ let { min: e, max: t } = ie.value, n = (e) => f.yTickFormat === void 0 ? he(e) : te(e, f.yTickFormat);
1711
1711
  return e === t ? [{
1712
1712
  value: n(e),
1713
1713
  y: R(U.value.top + K.value / 2)
1714
- }] : (f.yScaleType === "log" ? ve({
1714
+ }] : (f.yScaleType === "log" ? ye({
1715
1715
  min: e,
1716
1716
  max: t,
1717
1717
  ticks: f.yTicks
1718
- }) : he({
1718
+ }) : ge({
1719
1719
  min: e,
1720
1720
  max: t,
1721
1721
  ticks: f.yTicks,
1722
1722
  targetTickCount: K.value / 50
1723
1723
  })).map((e) => ({
1724
1724
  value: n(e),
1725
- y: R(P(e))
1725
+ y: R(F(e))
1726
1726
  }));
1727
1727
  });
1728
- function pe(e, t, n) {
1728
+ function B(e, t, n) {
1729
1729
  let r = f.xTickFormat;
1730
- if (D.value) return typeof r == "function" ? r(e, t) : Rt(e, r, T.value, n);
1731
- let i = e + re.value;
1732
- return r === void 0 ? !A.value && f.xLabels && Number.isInteger(e) && e >= 0 && e < f.xLabels.length ? f.xLabels[e] : me(i) : typeof r == "function" ? r(i, t) : te(i, r);
1730
+ if (D.value) return typeof r == "function" ? r(e, t) : zt(e, r, T.value, n);
1731
+ let i = e + ne.value;
1732
+ return r === void 0 ? !j.value && f.xLabels && Number.isInteger(e) && e >= 0 && e < f.xLabels.length ? f.xLabels[e] : he(i) : typeof r == "function" ? r(i, t) : te(i, r);
1733
1733
  }
1734
- let ye = n(() => {
1735
- let { min: e, max: t } = ie.value;
1734
+ let me = n(() => {
1735
+ let { min: e, max: t } = re.value;
1736
1736
  if (e === t) return [];
1737
- let n = D.value, r = n ? 0 : re.value, i = ne.value, a = G.value / 80, o, s;
1737
+ let n = D.value, r = n ? 0 : ne.value, i = A.value, a = G.value / 80, o, s;
1738
1738
  if (n) {
1739
- let n = Mt(e, t, a, T.value);
1740
- s = n.unit, o = he({
1739
+ let n = Nt(e, t, a, T.value);
1740
+ s = n.unit, o = ge({
1741
1741
  min: e,
1742
1742
  max: t,
1743
1743
  ticks: n.values
1744
1744
  });
1745
- } else if (f.xTicks == null && !A.value && f.xLabels && f.xLabels.length === i) {
1745
+ } else if (f.xTicks == null && !j.value && f.xLabels && f.xLabels.length === i) {
1746
1746
  let e = Math.max(3, Math.floor(a)), t = Math.max(1, Math.round((i - 1) / e));
1747
1747
  o = [];
1748
1748
  for (let e = 0; e < i; e += t) o.push(e);
1749
- } else o = he({
1749
+ } else o = ge({
1750
1750
  min: e,
1751
1751
  max: t,
1752
1752
  ticks: f.xTicks,
@@ -1755,27 +1755,27 @@ var zt = {
1755
1755
  });
1756
1756
  let c = U.value.left, l = U.value.left + G.value;
1757
1757
  return o.map((e, t) => {
1758
- let n = R(N(e)), r = "middle";
1758
+ let n = R(P(e)), r = "middle";
1759
1759
  return n - c <= 1 ? r = "start" : l - n <= 1 && (r = "end"), {
1760
- value: pe(e, t, s),
1760
+ value: B(e, t, s),
1761
1761
  x: n,
1762
1762
  anchor: r
1763
1763
  };
1764
1764
  });
1765
1765
  });
1766
1766
  function be() {
1767
- return typeof f.csv == "function" ? f.csv() : typeof f.csv == "string" ? f.csv : Be(O.value);
1767
+ return typeof f.csv == "function" ? f.csv() : typeof f.csv == "string" ? f.csv : He(O.value);
1768
1768
  }
1769
- let Se = n(() => !!f.tooltipData || !!f.tooltipTrigger), Ce = n(() => {
1770
- let e = q.value, t = O.value[0];
1771
- return e === null || !t ? null : j(t, e);
1772
- }), we = n(() => Ce.value === null ? 0 : N(Ce.value));
1769
+ let xe = n(() => !!f.tooltipData || !!f.tooltipTrigger), Ce = n(() => {
1770
+ let e = Fe.value, t = O.value[0];
1771
+ return e === null || !t ? null : M(t, e);
1772
+ }), we = n(() => Ce.value === null ? 0 : P(Ce.value));
1773
1773
  function Te(e, t) {
1774
1774
  let n = e.data.length;
1775
1775
  if (n === 0) return null;
1776
1776
  let r = 0, i = Infinity;
1777
1777
  for (let a = 0; a < n; a++) {
1778
- let n = j(e, a);
1778
+ let n = M(e, a);
1779
1779
  if (!isFinite(n)) continue;
1780
1780
  let o = Math.abs(n - t);
1781
1781
  o < i && (i = o, r = a);
@@ -1792,16 +1792,16 @@ var zt = {
1792
1792
  if (r === null) continue;
1793
1793
  let i = n.data[r];
1794
1794
  isFinite(i) && t.push({
1795
- x: N(j(n, r)),
1796
- y: P(i),
1795
+ x: P(M(n, r)),
1796
+ y: F(i),
1797
1797
  color: n.color ?? "currentColor"
1798
1798
  });
1799
1799
  }
1800
1800
  return t;
1801
1801
  }), De = n(() => {
1802
- let e = q.value, t = Ce.value;
1802
+ let e = Fe.value, t = Ce.value;
1803
1803
  if (e === null || t === null) return null;
1804
- let n = pe(t, e), r = O.value, i = [];
1804
+ let n = B(t, e), r = O.value, i = [];
1805
1805
  for (let e = 0; e < r.length; e++) {
1806
1806
  let n = r[e];
1807
1807
  if (n.showInTooltip === !1) continue;
@@ -1821,8 +1821,8 @@ var zt = {
1821
1821
  });
1822
1822
  function Oe(e, t) {
1823
1823
  return !isFinite(e) || !isFinite(t) ? null : {
1824
- x: N(e - re.value),
1825
- y: P(t)
1824
+ x: P(e - ne.value),
1825
+ y: F(t)
1826
1826
  };
1827
1827
  }
1828
1828
  function ke(e) {
@@ -1830,10 +1830,10 @@ var zt = {
1830
1830
  if (!t) return null;
1831
1831
  let n = O.value[0];
1832
1832
  if (!n || n.data.length === 0) return null;
1833
- let { min: r, max: i } = ie.value, a = i - r || 1;
1833
+ let { min: r, max: i } = re.value, a = i - r || 1;
1834
1834
  return Te(n, r + (e - t.left - U.value.left) / G.value * a);
1835
1835
  }
1836
- let { containerRef: Ae, svgRef: H, width: je, height: Me, padding: U, legendY: W, inlineLegendLayout: Ne, innerW: G, innerH: K, bounds: Pe, hoverIndex: q, tooltipRef: Fe, tooltipPos: Ie, tooltipHandlers: Le, menuItems: Re, downloadLinkText: ze, csvHref: Ve, downloadButtonText: He, triggerCsvDownload: Ue, menuFilename: We, isFullscreen: Ge, fullscreenStyle: Ke, teleportTarget: J, exitFullscreen: qe } = st({
1836
+ let { containerRef: Ae, svgRef: H, width: je, height: Me, padding: U, legendY: W, inlineLegendLayout: Ne, innerW: G, innerH: K, bounds: Pe, hoverIndex: Fe, tooltipRef: Ie, tooltipPos: Le, tooltipHandlers: Re, menuItems: ze, downloadLinkText: Be, csvHref: Ve, downloadButtonText: Ue, triggerCsvDownload: We, menuFilename: Ge, isFullscreen: Ke, fullscreenStyle: qe, teleportTarget: q, exitFullscreen: Je } = lt({
1837
1837
  width: () => f.width,
1838
1838
  height: () => f.height,
1839
1839
  title: () => f.title,
@@ -1849,16 +1849,16 @@ var zt = {
1849
1849
  downloadButton: () => f.downloadButton,
1850
1850
  fullscreenTarget: () => f.fullscreenTarget,
1851
1851
  chartPadding: () => f.chartPadding,
1852
- inlineLegendLabels: () => I.value,
1853
- hasTooltipSlot: () => Se.value,
1852
+ inlineLegendLabels: () => de.value,
1853
+ hasTooltipSlot: () => xe.value,
1854
1854
  getCsv: be,
1855
1855
  pointerToIndex: ke,
1856
1856
  onHover: (e) => h("hover", e),
1857
- extraBelowHeight: () => ue.value.extraHeight
1858
- }), Y = n(() => xe(f.axisLabelStyle, { fontSize: 13 })), X = n(() => xe(f.tickLabelStyle, {
1857
+ extraBelowHeight: () => le.value.extraHeight
1858
+ }), J = n(() => Se(f.axisLabelStyle, { fontSize: 13 })), Y = n(() => Se(f.tickLabelStyle, {
1859
1859
  fontSize: 10,
1860
1860
  fillOpacity: V
1861
- })), Je = n(() => xe(f.legendStyle, { fontSize: 11 })), Z = n(() => {
1861
+ })), Ye = n(() => Se(f.legendStyle, { fontSize: 11 })), X = n(() => {
1862
1862
  let e = f.titleStyle, t = e?.align ?? "left", n = Pe.value, r = t === "left" ? n.left : t === "right" ? n.right : n.left + n.width / 2, i = t === "left" ? "start" : t === "right" ? "end" : "middle";
1863
1863
  return {
1864
1864
  lines: (f.title ?? "").split("\n"),
@@ -1869,9 +1869,9 @@ var zt = {
1869
1869
  x: r,
1870
1870
  anchor: i
1871
1871
  };
1872
- }), Q = n(() => {
1872
+ }), Z = n(() => {
1873
1873
  let e = Ne.value.positions, t = U.value.left, n = W.value;
1874
- return de.value.map((r, i) => {
1874
+ return ue.value.map((r, i) => {
1875
1875
  let a = e[i];
1876
1876
  return {
1877
1877
  ...r,
@@ -1881,46 +1881,46 @@ var zt = {
1881
1881
  });
1882
1882
  });
1883
1883
  return (n, l) => (_(), r(t, {
1884
- to: C(J),
1885
- disabled: !C(Ge)
1884
+ to: C(q),
1885
+ disabled: !C(Ke)
1886
1886
  }, [o("div", d({
1887
1887
  ref_key: "containerRef",
1888
1888
  ref: Ae
1889
1889
  }, n.$attrs, {
1890
- class: ["line-chart-wrapper", { "is-fullscreen": C(Ge) }],
1891
- style: C(Ke)
1890
+ class: ["line-chart-wrapper", { "is-fullscreen": C(Ke) }],
1891
+ style: C(qe)
1892
1892
  }), [
1893
- c.menu ? (_(), r(fe, {
1893
+ c.menu ? (_(), r(pe, {
1894
1894
  key: 0,
1895
- items: C(Re),
1896
- "is-fullscreen": C(Ge),
1897
- onClose: C(qe)
1895
+ items: C(ze),
1896
+ "is-fullscreen": C(Ke),
1897
+ onClose: C(Je)
1898
1898
  }, null, 8, [
1899
1899
  "items",
1900
1900
  "is-fullscreen",
1901
1901
  "onClose"
1902
1902
  ])) : i("", !0),
1903
- o("div", zt, x(C(Ge) ? "Chart expanded to fill window" : ""), 1),
1903
+ o("div", Bt, x(C(Ke) ? "Chart expanded to fill window" : ""), 1),
1904
1904
  (_(), a("svg", {
1905
1905
  ref_key: "svgRef",
1906
1906
  ref: H,
1907
1907
  width: C(je),
1908
- height: L.value
1908
+ height: fe.value
1909
1909
  }, [
1910
1910
  c.title ? (_(), a("text", {
1911
1911
  key: 0,
1912
- x: Z.value.x,
1913
- y: Z.value.lineHeight,
1914
- "text-anchor": Z.value.anchor,
1915
- "font-size": Z.value.fontSize,
1916
- "font-weight": Z.value.fontWeight,
1917
- fill: Z.value.color
1918
- }, [(_(!0), a(e, null, y(Z.value.lines, (e, t) => (_(), a("tspan", {
1912
+ x: X.value.x,
1913
+ y: X.value.lineHeight,
1914
+ "text-anchor": X.value.anchor,
1915
+ "font-size": X.value.fontSize,
1916
+ "font-weight": X.value.fontWeight,
1917
+ fill: X.value.color
1918
+ }, [(_(!0), a(e, null, y(X.value.lines, (e, t) => (_(), a("tspan", {
1919
1919
  key: t,
1920
- x: Z.value.x,
1921
- dy: t === 0 ? 0 : Z.value.lineHeight
1922
- }, x(e), 9, Ht))), 128))], 8, Vt)) : i("", !0),
1923
- Q.value.length > 0 ? (_(), a("g", Ut, [(_(!0), a(e, null, y(Q.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.type === "series" ? (_(), a("line", {
1920
+ x: X.value.x,
1921
+ dy: t === 0 ? 0 : X.value.lineHeight
1922
+ }, x(e), 9, Ut))), 128))], 8, Ht)) : i("", !0),
1923
+ Z.value.length > 0 ? (_(), a("g", Wt, [(_(!0), a(e, null, y(Z.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.type === "series" ? (_(), a("line", {
1924
1924
  key: 0,
1925
1925
  x1: t.x,
1926
1926
  y1: t.y,
@@ -1929,7 +1929,7 @@ var zt = {
1929
1929
  stroke: t.color,
1930
1930
  "stroke-width": "2",
1931
1931
  "stroke-dasharray": t.dashed ? "4 2" : void 0
1932
- }, null, 8, Wt)) : (_(), a("circle", {
1932
+ }, null, 8, Gt)) : (_(), a("circle", {
1933
1933
  key: 1,
1934
1934
  cx: t.x + 4,
1935
1935
  cy: t.y,
@@ -1938,13 +1938,13 @@ var zt = {
1938
1938
  "fill-opacity": t.fillOpacity,
1939
1939
  stroke: t.color,
1940
1940
  "stroke-width": "1.5"
1941
- }, null, 8, Gt)), o("text", {
1941
+ }, null, 8, Kt)), o("text", {
1942
1942
  x: t.x + 18,
1943
1943
  y: t.y + 4,
1944
- "font-size": Je.value.fontSize,
1945
- fill: Je.value.fill,
1946
- "font-weight": Je.value.fontWeight
1947
- }, x(t.label), 9, Kt)], 64))), 128))])) : i("", !0),
1944
+ "font-size": Ye.value.fontSize,
1945
+ fill: Ye.value.fill,
1946
+ "font-weight": Ye.value.fontWeight
1947
+ }, x(t.label), 9, qt)], 64))), 128))])) : i("", !0),
1948
1948
  o("line", {
1949
1949
  x1: C(R)(C(U).left),
1950
1950
  y1: C(R)(C(U).top),
@@ -1952,7 +1952,7 @@ var zt = {
1952
1952
  y2: C(R)(C(U).top + C(K)),
1953
1953
  stroke: "currentColor",
1954
1954
  "stroke-opacity": "0.3"
1955
- }, null, 8, qt),
1955
+ }, null, 8, Jt),
1956
1956
  o("line", {
1957
1957
  x1: C(R)(C(U).left),
1958
1958
  y1: C(R)(C(U).top + C(K)),
@@ -1960,8 +1960,8 @@ var zt = {
1960
1960
  y2: C(R)(C(U).top + C(K)),
1961
1961
  stroke: "currentColor",
1962
1962
  "stroke-opacity": "0.3"
1963
- }, null, 8, Jt),
1964
- c.yGrid ? (_(!0), a(e, { key: 2 }, y(B.value, (e, t) => (_(), a("line", {
1963
+ }, null, 8, Yt),
1964
+ c.yGrid ? (_(!0), a(e, { key: 2 }, y(z.value, (e, t) => (_(), a("line", {
1965
1965
  key: "yg" + t,
1966
1966
  x1: C(U).left,
1967
1967
  y1: e.y,
@@ -1969,8 +1969,8 @@ var zt = {
1969
1969
  y2: e.y,
1970
1970
  stroke: "currentColor",
1971
1971
  "stroke-opacity": "0.1"
1972
- }, null, 8, Yt))), 128)) : i("", !0),
1973
- c.xGrid ? (_(!0), a(e, { key: 3 }, y(ye.value, (e, t) => (_(), a("line", {
1972
+ }, null, 8, Xt))), 128)) : i("", !0),
1973
+ c.xGrid ? (_(!0), a(e, { key: 3 }, y(me.value, (e, t) => (_(), a("line", {
1974
1974
  key: "xg" + t,
1975
1975
  x1: e.x,
1976
1976
  y1: C(U).top,
@@ -1978,79 +1978,79 @@ var zt = {
1978
1978
  y2: C(U).top + C(K),
1979
1979
  stroke: "currentColor",
1980
1980
  "stroke-opacity": "0.1"
1981
- }, null, 8, Xt))), 128)) : i("", !0),
1982
- (_(!0), a(e, null, y(B.value, (e, t) => (_(), a("text", {
1981
+ }, null, 8, Zt))), 128)) : i("", !0),
1982
+ (_(!0), a(e, null, y(z.value, (e, t) => (_(), a("text", {
1983
1983
  key: "y" + t,
1984
1984
  "data-testid": "y-tick",
1985
1985
  x: C(U).left - 6,
1986
1986
  y: e.y,
1987
1987
  "text-anchor": "end",
1988
1988
  "dominant-baseline": "middle",
1989
- "font-size": X.value.fontSize,
1990
- fill: X.value.fill,
1991
- "font-weight": X.value.fontWeight,
1992
- "fill-opacity": X.value.fillOpacity
1993
- }, x(e.value), 9, Zt))), 128)),
1989
+ "font-size": Y.value.fontSize,
1990
+ fill: Y.value.fill,
1991
+ "font-weight": Y.value.fontWeight,
1992
+ "fill-opacity": Y.value.fillOpacity
1993
+ }, x(e.value), 9, Qt))), 128)),
1994
1994
  c.yLabel ? (_(), a("text", {
1995
1995
  key: 4,
1996
1996
  x: 0,
1997
1997
  y: 0,
1998
1998
  transform: `translate(14, ${C(U).top + C(K) / 2}) rotate(-90)`,
1999
1999
  "text-anchor": "middle",
2000
- "font-size": Y.value.fontSize,
2001
- fill: Y.value.fill,
2002
- "font-weight": Y.value.fontWeight
2003
- }, x(c.yLabel), 9, Qt)) : i("", !0),
2004
- (_(!0), a(e, null, y(ye.value, (e, t) => (_(), a("text", {
2000
+ "font-size": J.value.fontSize,
2001
+ fill: J.value.fill,
2002
+ "font-weight": J.value.fontWeight
2003
+ }, x(c.yLabel), 9, $t)) : i("", !0),
2004
+ (_(!0), a(e, null, y(me.value, (e, t) => (_(), a("text", {
2005
2005
  key: "x" + t,
2006
2006
  "data-testid": "x-tick",
2007
2007
  x: e.x,
2008
2008
  y: C(U).top + C(K) + 16,
2009
2009
  "text-anchor": e.anchor,
2010
- "font-size": X.value.fontSize,
2011
- fill: X.value.fill,
2012
- "font-weight": X.value.fontWeight,
2013
- "fill-opacity": X.value.fillOpacity
2014
- }, x(e.value), 9, $t))), 128)),
2010
+ "font-size": Y.value.fontSize,
2011
+ fill: Y.value.fill,
2012
+ "font-weight": Y.value.fontWeight,
2013
+ "fill-opacity": Y.value.fillOpacity
2014
+ }, x(e.value), 9, en))), 128)),
2015
2015
  c.xLabel ? (_(), a("text", {
2016
2016
  key: 5,
2017
2017
  x: C(U).left + C(G) / 2,
2018
2018
  y: C(Me) - 4,
2019
2019
  "text-anchor": "middle",
2020
- "font-size": Y.value.fontSize,
2021
- fill: Y.value.fill,
2022
- "font-weight": Y.value.fontWeight
2023
- }, x(c.xLabel), 9, en)) : i("", !0),
2020
+ "font-size": J.value.fontSize,
2021
+ fill: J.value.fill,
2022
+ "font-weight": J.value.fontWeight
2023
+ }, x(c.xLabel), 9, tn)) : i("", !0),
2024
2024
  (_(!0), a(e, null, y(k.value, (e, t) => (_(), a("path", {
2025
2025
  key: "area" + t,
2026
- d: ce(e),
2026
+ d: se(e),
2027
2027
  fill: e.color ?? "currentColor",
2028
2028
  "fill-opacity": e.opacity ?? .2,
2029
2029
  stroke: "none",
2030
2030
  style: m(e.blendMode ? { mixBlendMode: e.blendMode } : void 0)
2031
- }, null, 12, tn))), 128)),
2031
+ }, null, 12, nn))), 128)),
2032
2032
  (_(!0), a(e, null, y(O.value, (t, n) => (_(), a(e, { key: n }, [
2033
2033
  t.line !== !1 && t.outline ? (_(), a("path", {
2034
2034
  key: 0,
2035
- d: oe(t),
2035
+ d: ae(t),
2036
2036
  fill: "none",
2037
2037
  stroke: t.outlineColor ?? "var(--color-bg-0, #fff)",
2038
2038
  "stroke-width": (t.strokeWidth ?? 1.5) + (t.outlineWidth ?? 4),
2039
2039
  "stroke-linecap": "round",
2040
2040
  "stroke-linejoin": "round",
2041
2041
  "data-testid": "line-outline"
2042
- }, null, 8, nn)) : i("", !0),
2042
+ }, null, 8, rn)) : i("", !0),
2043
2043
  t.line === !1 ? i("", !0) : (_(), a("path", {
2044
2044
  key: 1,
2045
- d: oe(t),
2045
+ d: ae(t),
2046
2046
  fill: "none",
2047
2047
  stroke: t.color ?? "currentColor",
2048
2048
  "stroke-width": t.strokeWidth ?? 1.5,
2049
2049
  "stroke-opacity": t.lineOpacity ?? t.opacity ?? c.lineOpacity,
2050
2050
  "stroke-dasharray": t.dashed ? "6 3" : void 0,
2051
2051
  style: m(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
2052
- }, null, 12, rn)),
2053
- t.dots ? (_(!0), a(e, { key: 2 }, y(se(t), (e, n) => (_(), a("circle", {
2052
+ }, null, 12, an)),
2053
+ t.dots ? (_(!0), a(e, { key: 2 }, y(oe(t), (e, n) => (_(), a("circle", {
2054
2054
  key: n,
2055
2055
  cx: e.x,
2056
2056
  cy: e.y,
@@ -2059,58 +2059,58 @@ var zt = {
2059
2059
  "fill-opacity": t.dotOpacity ?? t.opacity ?? c.lineOpacity,
2060
2060
  stroke: t.dotStroke ?? "none",
2061
2061
  style: m(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
2062
- }, null, 12, an))), 128)) : i("", !0)
2062
+ }, null, 12, on))), 128)) : i("", !0)
2063
2063
  ], 64))), 128)),
2064
2064
  (_(!0), a(e, null, y(c.areaSections ?? [], (t, n) => (_(), a(e, { key: "areasec" + n }, [
2065
2065
  o("path", {
2066
- d: le(t),
2066
+ d: ce(t),
2067
2067
  fill: t.color ?? (t.seriesIndex == null ? "#999" : O.value[t.seriesIndex]?.color ?? "currentColor"),
2068
2068
  "fill-opacity": t.opacity ?? .15,
2069
2069
  stroke: "none"
2070
- }, null, 8, on),
2070
+ }, null, 8, sn),
2071
2071
  t.seriesIndex == null ? i("", !0) : (_(), a("path", {
2072
2072
  key: 0,
2073
- d: le(t, !1),
2073
+ d: ce(t, !1),
2074
2074
  fill: "none",
2075
2075
  stroke: t.color ?? O.value[t.seriesIndex]?.color ?? "currentColor",
2076
2076
  "stroke-width": t.strokeWidth ?? 2,
2077
2077
  "stroke-dasharray": t.dashed ? "6 3" : void 0
2078
- }, null, 8, sn)),
2078
+ }, null, 8, cn)),
2079
2079
  t.seriesIndex == null ? (_(), a(e, { key: 1 }, [o("line", {
2080
- x1: C(R)(F(t, "start")),
2080
+ x1: C(R)(I(t, "start")),
2081
2081
  y1: C(U).top,
2082
- x2: C(R)(F(t, "start")),
2082
+ x2: C(R)(I(t, "start")),
2083
2083
  y2: C(U).top + C(K),
2084
2084
  stroke: t.color ?? "#999",
2085
2085
  "stroke-width": t.strokeWidth ?? 2,
2086
2086
  "stroke-dasharray": t.dashed ? "6 3" : void 0
2087
- }, null, 8, cn), o("line", {
2088
- x1: C(R)(F(t, "end")),
2087
+ }, null, 8, ln), o("line", {
2088
+ x1: C(R)(I(t, "end")),
2089
2089
  y1: C(U).top,
2090
- x2: C(R)(F(t, "end")),
2090
+ x2: C(R)(I(t, "end")),
2091
2091
  y2: C(U).top + C(K),
2092
2092
  stroke: t.color ?? "#999",
2093
2093
  "stroke-width": t.strokeWidth ?? 2,
2094
2094
  "stroke-dasharray": t.dashed ? "6 3" : void 0
2095
- }, null, 8, ln)], 64)) : i("", !0),
2095
+ }, null, 8, un)], 64)) : i("", !0),
2096
2096
  o("line", {
2097
- x1: C(R)(F(t, "start")),
2097
+ x1: C(R)(I(t, "start")),
2098
2098
  y1: C(U).top + C(K) - 4,
2099
- x2: C(R)(F(t, "start")),
2099
+ x2: C(R)(I(t, "start")),
2100
2100
  y2: C(U).top + C(K) + 4,
2101
2101
  stroke: "currentColor",
2102
2102
  "stroke-opacity": "0.4"
2103
- }, null, 8, un),
2103
+ }, null, 8, dn),
2104
2104
  o("line", {
2105
- x1: C(R)(F(t, "end")),
2105
+ x1: C(R)(I(t, "end")),
2106
2106
  y1: C(U).top + C(K) - 4,
2107
- x2: C(R)(F(t, "end")),
2107
+ x2: C(R)(I(t, "end")),
2108
2108
  y2: C(U).top + C(K) + 4,
2109
2109
  stroke: "currentColor",
2110
2110
  "stroke-opacity": "0.4"
2111
- }, null, 8, dn)
2111
+ }, null, 8, fn)
2112
2112
  ], 64))), 128)),
2113
- Se.value && C(q) !== null ? (_(), a("line", {
2113
+ xe.value && C(Fe) !== null ? (_(), a("line", {
2114
2114
  key: 6,
2115
2115
  x1: C(R)(we.value),
2116
2116
  y1: C(U).top,
@@ -2120,7 +2120,7 @@ var zt = {
2120
2120
  "stroke-opacity": "0.3",
2121
2121
  "stroke-dasharray": "4 2",
2122
2122
  "pointer-events": "none"
2123
- }, null, 8, fn)) : i("", !0),
2123
+ }, null, 8, pn)) : i("", !0),
2124
2124
  (_(!0), a(e, null, y(Ee.value, (e, t) => (_(), a("circle", {
2125
2125
  key: "hd" + t,
2126
2126
  cx: e.x,
@@ -2130,8 +2130,8 @@ var zt = {
2130
2130
  stroke: "var(--color-bg-0, #fff)",
2131
2131
  "stroke-width": "2",
2132
2132
  "pointer-events": "none"
2133
- }, null, 8, pn))), 128)),
2134
- Se.value ? (_(), a("rect", d({
2133
+ }, null, 8, mn))), 128)),
2134
+ xe.value ? (_(), a("rect", d({
2135
2135
  key: 7,
2136
2136
  x: C(U).left,
2137
2137
  y: C(U).top,
@@ -2142,150 +2142,150 @@ var zt = {
2142
2142
  cursor: "crosshair",
2143
2143
  "touch-action": "pan-y"
2144
2144
  }
2145
- }, ee(C(Le), !0)), null, 16, mn)) : i("", !0),
2146
- c.annotations && c.annotations.length > 0 ? (_(), r(C(it), {
2145
+ }, ee(C(Re), !0)), null, 16, hn)) : i("", !0),
2146
+ c.annotations && c.annotations.length > 0 ? (_(), r(C(ot), {
2147
2147
  key: 8,
2148
2148
  annotations: c.annotations,
2149
2149
  project: Oe,
2150
2150
  bounds: C(Pe)
2151
2151
  }, null, 8, ["annotations", "bounds"])) : i("", !0),
2152
- (_(!0), a(e, null, y(ue.value.labels, (e, t) => (_(), a("g", { key: "seclab" + t }, [
2152
+ (_(!0), a(e, null, y(le.value.labels, (e, t) => (_(), a("g", { key: "seclab" + t }, [
2153
2153
  o("circle", {
2154
2154
  cx: e.cx - e.textWidth / 2 - 2,
2155
- cy: z.value + e.row * xn + 4,
2155
+ cy: L.value + e.row * Sn + 4,
2156
2156
  r: "4",
2157
2157
  fill: e.color,
2158
2158
  "fill-opacity": e.fillOpacity,
2159
2159
  stroke: e.color,
2160
2160
  "stroke-width": "1.5"
2161
- }, null, 8, hn),
2161
+ }, null, 8, gn),
2162
2162
  e.labelText ? (_(), a("text", {
2163
2163
  key: 0,
2164
2164
  x: e.cx - e.textWidth / 2 + 8,
2165
- y: z.value + e.row * xn + 8,
2165
+ y: L.value + e.row * Sn + 8,
2166
2166
  "font-size": e.labelStyle.fontSize,
2167
2167
  "font-weight": e.labelStyle.fontWeight,
2168
2168
  fill: e.labelStyle.fill
2169
- }, x(e.labelText), 9, gn)) : i("", !0),
2169
+ }, x(e.labelText), 9, _n)) : i("", !0),
2170
2170
  e.descText ? (_(), a("text", {
2171
2171
  key: 1,
2172
2172
  x: e.cx - e.textWidth / 2 + 8,
2173
- y: z.value + e.row * xn + 22,
2173
+ y: L.value + e.row * Sn + 22,
2174
2174
  "font-size": e.descStyle.fontSize,
2175
2175
  "font-weight": e.descStyle.fontWeight,
2176
2176
  fill: e.descStyle.fill,
2177
2177
  "fill-opacity": e.descStyle.fillOpacity
2178
- }, x(e.descText), 9, _n)) : i("", !0)
2178
+ }, x(e.descText), 9, vn)) : i("", !0)
2179
2179
  ]))), 128))
2180
- ], 8, Bt)),
2181
- Se.value && C(q) !== null && De.value ? (_(), a("div", {
2180
+ ], 8, Vt)),
2181
+ xe.value && C(Fe) !== null && De.value ? (_(), a("div", {
2182
2182
  key: 1,
2183
2183
  ref_key: "tooltipRef",
2184
- ref: Fe,
2184
+ ref: Ie,
2185
2185
  class: "chart-tooltip-content",
2186
2186
  style: m({
2187
2187
  position: "absolute",
2188
2188
  top: "0",
2189
2189
  left: "0",
2190
2190
  willChange: "transform",
2191
- transform: C(Ie) ? `translate3d(${C(Ie).left}px, ${C(Ie).top}px, 0) translateY(-50%)` : "translateY(-50%)",
2192
- visibility: C(Ie) ? "visible" : "hidden"
2191
+ transform: C(Le) ? `translate3d(${C(Le).left}px, ${C(Le).top}px, 0) translateY(-50%)` : "translateY(-50%)",
2192
+ visibility: C(Le) ? "visible" : "hidden"
2193
2193
  })
2194
- }, [b(n.$slots, "tooltip", p(u(De.value)), () => [o("div", vn, [De.value.xLabel ? (_(), a("div", yn, x(De.value.xLabel), 1)) : i("", !0), (_(!0), a(e, null, y(De.value.values, (e) => (_(), a("div", {
2194
+ }, [b(n.$slots, "tooltip", p(u(De.value)), () => [o("div", yn, [De.value.xLabel ? (_(), a("div", bn, x(De.value.xLabel), 1)) : i("", !0), (_(!0), a(e, null, y(De.value.values, (e) => (_(), a("div", {
2195
2195
  key: e.seriesIndex,
2196
2196
  class: "line-chart-tooltip-row"
2197
2197
  }, [o("span", {
2198
2198
  class: "line-chart-tooltip-swatch",
2199
2199
  style: m({ background: e.color })
2200
2200
  }, null, 4), s(" " + x(isFinite(e.value) ? C(w)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
2201
- C(ze) ? (_(), a("a", {
2201
+ C(Be) ? (_(), a("a", {
2202
2202
  key: 2,
2203
2203
  class: "line-chart-download-link",
2204
2204
  href: C(Ve),
2205
- download: `${C(We)()}.csv`
2206
- }, x(C(ze)), 9, bn)) : i("", !0),
2207
- C(He) ? (_(), a("button", {
2205
+ download: `${C(Ge)()}.csv`
2206
+ }, x(C(Be)), 9, xn)) : i("", !0),
2207
+ C(Ue) ? (_(), a("button", {
2208
2208
  key: 3,
2209
2209
  type: "button",
2210
2210
  class: "line-chart-download-button",
2211
- onClick: l[0] ||= (...e) => C(Ue) && C(Ue)(...e)
2212
- }, x(C(He)), 1)) : i("", !0)
2211
+ onClick: l[0] ||= (...e) => C(We) && C(We)(...e)
2212
+ }, x(C(Ue)), 1)) : i("", !0)
2213
2213
  ], 16)], 8, ["to", "disabled"]));
2214
2214
  }
2215
- }), [["__scopeId", "data-v-e96123bd"]]), En = {
2215
+ }), [["__scopeId", "data-v-e96123bd"]]), Dn = {
2216
2216
  class: "chart-sr-only",
2217
2217
  "aria-live": "polite"
2218
- }, Dn = ["width", "height"], On = [
2218
+ }, On = ["width", "height"], kn = [
2219
2219
  "x",
2220
2220
  "y",
2221
2221
  "text-anchor",
2222
2222
  "font-size",
2223
2223
  "font-weight",
2224
2224
  "fill"
2225
- ], kn = ["x", "dy"], An = [
2225
+ ], An = ["x", "dy"], jn = [
2226
2226
  "data-testid",
2227
2227
  "x",
2228
2228
  "y",
2229
2229
  "text-anchor",
2230
2230
  "font-size",
2231
2231
  "fill"
2232
- ], jn = { key: 1 }, Mn = [
2232
+ ], Mn = { key: 1 }, Nn = [
2233
2233
  "x",
2234
2234
  "y",
2235
2235
  "fill"
2236
- ], Nn = [
2236
+ ], Pn = [
2237
2237
  "x1",
2238
2238
  "y1",
2239
2239
  "x2",
2240
2240
  "y2",
2241
2241
  "stroke",
2242
2242
  "stroke-dasharray"
2243
- ], Pn = [
2243
+ ], Fn = [
2244
2244
  "x",
2245
2245
  "y",
2246
2246
  "font-size",
2247
2247
  "fill",
2248
2248
  "font-weight"
2249
- ], Fn = [
2249
+ ], In = [
2250
2250
  "x1",
2251
2251
  "y1",
2252
2252
  "x2",
2253
2253
  "y2"
2254
- ], In = [
2254
+ ], Ln = [
2255
2255
  "x1",
2256
2256
  "y1",
2257
2257
  "x2",
2258
2258
  "y2"
2259
- ], Ln = [
2259
+ ], Rn = [
2260
2260
  "x1",
2261
2261
  "y1",
2262
2262
  "x2",
2263
2263
  "y2"
2264
- ], Rn = [
2264
+ ], zn = [
2265
2265
  "x",
2266
2266
  "y",
2267
2267
  "width",
2268
2268
  "height"
2269
- ], zn = [
2269
+ ], Bn = [
2270
2270
  "x",
2271
2271
  "y",
2272
2272
  "font-size",
2273
2273
  "fill",
2274
2274
  "font-weight",
2275
2275
  "fill-opacity"
2276
- ], Bn = [
2276
+ ], Vn = [
2277
2277
  "x",
2278
2278
  "y",
2279
2279
  "font-size",
2280
2280
  "fill",
2281
2281
  "font-weight",
2282
2282
  "fill-opacity"
2283
- ], Vn = [
2283
+ ], Hn = [
2284
2284
  "transform",
2285
2285
  "font-size",
2286
2286
  "fill",
2287
2287
  "font-weight"
2288
- ], Hn = [
2288
+ ], Un = [
2289
2289
  "x",
2290
2290
  "y",
2291
2291
  "text-anchor",
@@ -2293,7 +2293,7 @@ var zt = {
2293
2293
  "fill",
2294
2294
  "font-weight",
2295
2295
  "fill-opacity"
2296
- ], Un = [
2296
+ ], Wn = [
2297
2297
  "x",
2298
2298
  "y",
2299
2299
  "text-anchor",
@@ -2301,13 +2301,13 @@ var zt = {
2301
2301
  "fill",
2302
2302
  "font-weight",
2303
2303
  "fill-opacity"
2304
- ], Wn = [
2304
+ ], Gn = [
2305
2305
  "x",
2306
2306
  "y",
2307
2307
  "font-size",
2308
2308
  "fill",
2309
2309
  "font-weight"
2310
- ], Gn = [
2310
+ ], Kn = [
2311
2311
  "data-category",
2312
2312
  "data-series",
2313
2313
  "x",
@@ -2316,34 +2316,34 @@ var zt = {
2316
2316
  "height",
2317
2317
  "fill",
2318
2318
  "fill-opacity"
2319
- ], Kn = [
2319
+ ], qn = [
2320
2320
  "x",
2321
2321
  "y",
2322
2322
  "text-anchor",
2323
2323
  "font-size",
2324
2324
  "font-weight",
2325
2325
  "fill"
2326
- ], qn = [
2326
+ ], Jn = [
2327
2327
  "d",
2328
2328
  "stroke",
2329
2329
  "stroke-width",
2330
2330
  "stroke-opacity",
2331
2331
  "stroke-dasharray"
2332
- ], Jn = [
2332
+ ], Yn = [
2333
2333
  "cx",
2334
2334
  "cy",
2335
2335
  "r",
2336
2336
  "fill",
2337
2337
  "fill-opacity"
2338
- ], Yn = [
2338
+ ], Xn = [
2339
2339
  "x",
2340
2340
  "y",
2341
2341
  "width",
2342
2342
  "height"
2343
- ], Xn = { class: "bar-chart-tooltip" }, Zn = {
2343
+ ], Zn = { class: "bar-chart-tooltip" }, Qn = {
2344
2344
  key: 0,
2345
2345
  class: "bar-chart-tooltip-label"
2346
- }, Qn = ["href", "download"], $n = 22, er = 2, tr = 11, nr = .6, rr = 4, ir = 4, ar = /* @__PURE__ */ L(/* @__PURE__ */ l({
2346
+ }, $n = ["href", "download"], er = 22, tr = 2, nr = 11, rr = .6, ir = 4, ar = 4, or = /* @__PURE__ */ L(/* @__PURE__ */ l({
2347
2347
  inheritAttrs: !1,
2348
2348
  __name: "BarChart",
2349
2349
  props: {
@@ -2431,9 +2431,9 @@ var zt = {
2431
2431
  return t;
2432
2432
  }), E = n(() => {
2433
2433
  let e = f.categories;
2434
- if (!e || e.length === 0 || !Ot(e, "utc")) return null;
2434
+ if (!e || e.length === 0 || !kt(e, "utc")) return null;
2435
2435
  let t = Array(e.length);
2436
- for (let n = 0; n < e.length; n++) t[n] = Et(e[n], "utc") ?? NaN;
2436
+ for (let n = 0; n < e.length; n++) t[n] = Dt(e[n], "utc") ?? NaN;
2437
2437
  return t;
2438
2438
  }), D = n(() => f.orientation === "vertical"), O = n(() => {
2439
2439
  let e = Infinity, t = -Infinity, n = Infinity, r = (e) => {
@@ -2457,34 +2457,34 @@ var zt = {
2457
2457
  isFinite(e) || (e = 0), isFinite(t) || (t = 0);
2458
2458
  let i = f.valueMin ?? 0;
2459
2459
  f.valueScaleType === "log" ? i > 0 && i < e && (e = i) : i < e && (e = i);
2460
- let a = _e(e, t, f.valueScaleType, n);
2460
+ let a = ve(e, t, f.valueScaleType, n);
2461
2461
  return {
2462
2462
  min: a.min,
2463
2463
  max: a.max,
2464
2464
  range: a.max - a.min || 1
2465
2465
  };
2466
- }), k = n(() => D.value ? U.value : W.value), ne = n(() => D.value ? W.value : U.value), A = n(() => {
2466
+ }), k = n(() => D.value ? U.value : W.value), A = n(() => D.value ? W.value : U.value), j = n(() => {
2467
2467
  let e = w.value;
2468
2468
  return e > 0 ? k.value / e : 0;
2469
- }), j = n(() => A.value * (1 - f.barPadding)), M = n(() => {
2469
+ }), M = n(() => j.value * (1 - f.barPadding)), N = n(() => {
2470
2470
  let e = S.value.length;
2471
2471
  if (e === 0) return 0;
2472
- if (f.layout === "stacked" || e === 1) return j.value;
2472
+ if (f.layout === "stacked" || e === 1) return M.value;
2473
2473
  let t = f.groupGap * (e - 1);
2474
- return Math.max(1, (j.value - t) / e);
2474
+ return Math.max(1, (M.value - t) / e);
2475
2475
  });
2476
- function re(e) {
2477
- return (D.value ? H.value.left : H.value.top) + e * A.value;
2476
+ function ne(e) {
2477
+ return (D.value ? H.value.left : H.value.top) + e * j.value;
2478
2478
  }
2479
- let ie = n(() => {
2479
+ let re = n(() => {
2480
2480
  let { min: e, max: t } = O.value, n = f.valueMin ?? 0;
2481
- return N(Math.max(e, Math.min(t, n)));
2481
+ return P(Math.max(e, Math.min(t, n)));
2482
2482
  });
2483
- function N(e) {
2484
- let { min: t, max: n } = O.value, r = ge(e, t, n, f.valueScaleType);
2483
+ function P(e) {
2484
+ let { min: t, max: n } = O.value, r = _e(e, t, n, f.valueScaleType);
2485
2485
  return D.value ? H.value.top + W.value - r * W.value : H.value.left + r * U.value;
2486
2486
  }
2487
- function ae(e, t, n, r, i, a, o, s, c, l) {
2487
+ function ie(e, t, n, r, i, a, o, s, c, l) {
2488
2488
  let u = Math.min(e, t), d = Math.abs(e - t);
2489
2489
  return D.value ? {
2490
2490
  x: n,
@@ -2510,34 +2510,34 @@ var zt = {
2510
2510
  seriesIndex: l
2511
2511
  };
2512
2512
  }
2513
- let P = n(() => {
2513
+ let F = n(() => {
2514
2514
  let e = [], t = S.value, n = t.length;
2515
2515
  if (n === 0) return e;
2516
- let r = w.value, i = A.value, a = j.value, o = M.value, s = (i - a) / 2, c = ie.value;
2516
+ let r = w.value, i = j.value, a = M.value, o = N.value, s = (i - a) / 2, c = re.value;
2517
2517
  for (let i = 0; i < r; i++) {
2518
- let r = re(i) + s;
2518
+ let r = ne(i) + s;
2519
2519
  if (f.layout === "stacked") {
2520
2520
  let o = 0, s = 0;
2521
2521
  for (let c = 0; c < n; c++) {
2522
2522
  let n = t[c], l = Number(n.data[i] ?? NaN);
2523
2523
  if (!isFinite(l)) continue;
2524
2524
  let u = l >= 0 ? o : s, d = u + l;
2525
- e.push(ae(N(u), N(d), r, a, n.color ?? I(c), n.opacity ?? 1, n.blendMode, l, i, c)), l >= 0 ? o = d : s = d;
2525
+ e.push(ie(P(u), P(d), r, a, n.color ?? de(c), n.opacity ?? 1, n.blendMode, l, i, c)), l >= 0 ? o = d : s = d;
2526
2526
  }
2527
2527
  } else if (f.layout === "overlay") for (let o = 0; o < n; o++) {
2528
2528
  let n = t[o], s = Number(n.data[i] ?? NaN);
2529
- isFinite(s) && e.push(ae(c, N(s), r, a, n.color ?? I(o), n.opacity ?? 1, n.blendMode, s, i, o));
2529
+ isFinite(s) && e.push(ie(c, P(s), r, a, n.color ?? de(o), n.opacity ?? 1, n.blendMode, s, i, o));
2530
2530
  }
2531
2531
  else for (let a = 0; a < n; a++) {
2532
2532
  let s = t[a], l = Number(s.data[i] ?? NaN);
2533
2533
  if (!isFinite(l)) continue;
2534
2534
  let u = r + (n === 1 ? 0 : a * (o + f.groupGap));
2535
- e.push(ae(c, N(l), u, o, s.color ?? I(a), s.opacity ?? 1, s.blendMode, l, i, a));
2535
+ e.push(ie(c, P(l), u, o, s.color ?? de(a), s.opacity ?? 1, s.blendMode, l, i, a));
2536
2536
  }
2537
2537
  }
2538
2538
  return e;
2539
2539
  });
2540
- function oe(e) {
2540
+ function ae(e) {
2541
2541
  let t = Infinity, n = -Infinity;
2542
2542
  for (let r of e.data) {
2543
2543
  let e = Number(r);
@@ -2548,8 +2548,8 @@ var zt = {
2548
2548
  max: n
2549
2549
  };
2550
2550
  }
2551
- function se(e, t, n) {
2552
- let r = (D.value ? H.value.left : H.value.top) + (e + .5) * A.value, i = n.max - n.min || 1, a = (t - n.min) / i;
2551
+ function oe(e, t, n) {
2552
+ let r = (D.value ? H.value.left : H.value.top) + (e + .5) * j.value, i = n.max - n.min || 1, a = (t - n.min) / i;
2553
2553
  return D.value ? {
2554
2554
  x: r,
2555
2555
  y: H.value.top + W.value - a * W.value
@@ -2558,23 +2558,23 @@ var zt = {
2558
2558
  y: r
2559
2559
  };
2560
2560
  }
2561
- let ce = n(() => {
2561
+ let se = n(() => {
2562
2562
  let e = f.summaryLines;
2563
2563
  return !e || e.length === 0 ? [] : e.map((e, t) => ({
2564
2564
  data: e.data ?? g,
2565
2565
  x: e.x,
2566
- color: e.color ?? ue(t),
2566
+ color: e.color ?? le(t),
2567
2567
  strokeWidth: e.strokeWidth ?? 2,
2568
2568
  dashed: e.dashed ?? !1,
2569
2569
  opacity: e.opacity ?? 1,
2570
2570
  blendMode: e.blendMode,
2571
2571
  dots: e.dots ?? !1,
2572
2572
  dotRadius: e.dotRadius ?? (e.strokeWidth ?? 2) + 1,
2573
- extent: oe(e),
2573
+ extent: ae(e),
2574
2574
  legend: e.legend,
2575
2575
  showInLegend: e.showInLegend !== !1
2576
2576
  }));
2577
- }), F = n(() => A.value === 0 ? [] : ce.value.map((e) => {
2577
+ }), I = n(() => j.value === 0 ? [] : se.value.map((e) => {
2578
2578
  let t = [], n = "", r = !1;
2579
2579
  for (let i = 0; i < e.data.length; i++) {
2580
2580
  let a = Number(e.data[i]), o = e.x ? Number(e.x[i]) : i;
@@ -2582,7 +2582,7 @@ var zt = {
2582
2582
  r = !1;
2583
2583
  continue;
2584
2584
  }
2585
- let s = se(o, a, e.extent);
2585
+ let s = oe(o, a, e.extent);
2586
2586
  t.push(s), n += r ? `L${s.x},${s.y}` : `M${s.x},${s.y}`, r = !0;
2587
2587
  }
2588
2588
  return {
@@ -2590,16 +2590,16 @@ var zt = {
2590
2590
  pathD: n,
2591
2591
  points: t
2592
2592
  };
2593
- })), le = [
2593
+ })), ce = [
2594
2594
  "var(--color-fg-1, #111)",
2595
2595
  "var(--color-danger, #ef4444)",
2596
2596
  "var(--color-success, #10b981)",
2597
2597
  "var(--color-info, #6366f1)"
2598
2598
  ];
2599
- function ue(e) {
2600
- return le[e % le.length];
2599
+ function le(e) {
2600
+ return ce[e % ce.length];
2601
2601
  }
2602
- let de = [
2602
+ let ue = [
2603
2603
  "var(--color-primary, #3b82f6)",
2604
2604
  "var(--color-accent, #f59e0b)",
2605
2605
  "var(--color-success, #10b981)",
@@ -2607,36 +2607,36 @@ var zt = {
2607
2607
  "var(--color-info, #6366f1)",
2608
2608
  "var(--color-warning, #d97706)"
2609
2609
  ];
2610
- function I(e) {
2611
- return de[e % de.length];
2610
+ function de(e) {
2611
+ return ue[e % ue.length];
2612
2612
  }
2613
- let L = ct(() => f.tooltipValueFormat, () => f.valueTickFormat), z = n(() => {
2614
- let { min: e, max: t } = O.value, n = (e) => f.valueTickFormat === void 0 ? me(e) : te(e, f.valueTickFormat);
2613
+ let fe = ut(() => f.tooltipValueFormat, () => f.valueTickFormat), L = n(() => {
2614
+ let { min: e, max: t } = O.value, n = (e) => f.valueTickFormat === void 0 ? he(e) : te(e, f.valueTickFormat);
2615
2615
  if (e === t) return [{
2616
2616
  value: n(e),
2617
- pos: R(N(e))
2617
+ pos: R(P(e))
2618
2618
  }];
2619
2619
  let r = D.value ? 50 : 80;
2620
- return (f.valueScaleType === "log" ? ve({
2620
+ return (f.valueScaleType === "log" ? ye({
2621
2621
  min: e,
2622
2622
  max: t,
2623
2623
  ticks: f.valueTicks
2624
- }) : he({
2624
+ }) : ge({
2625
2625
  min: e,
2626
2626
  max: t,
2627
2627
  ticks: f.valueTicks,
2628
- targetTickCount: ne.value / r
2628
+ targetTickCount: A.value / r
2629
2629
  })).map((e) => ({
2630
2630
  value: n(e),
2631
- pos: R(N(e))
2631
+ pos: R(P(e))
2632
2632
  }));
2633
- }), B = n(() => {
2633
+ }), z = n(() => {
2634
2634
  let e = w.value, t = E.value;
2635
2635
  if (t && t.length > 0) {
2636
2636
  let e = Infinity, n = -Infinity;
2637
2637
  for (let r of t) Number.isFinite(r) && (r < e && (e = r), r > n && (n = r));
2638
2638
  if (!Number.isFinite(e) || e === n) return [];
2639
- let r = D.value ? U.value : W.value, i = Math.max(2, Math.floor(r / 80)), a = Mt(e, n, i, "utc"), o = a.unit, s = [], c = /* @__PURE__ */ new Set();
2639
+ let r = D.value ? U.value : W.value, i = Math.max(2, Math.floor(r / 80)), a = Nt(e, n, i, "utc"), o = a.unit, s = [], c = /* @__PURE__ */ new Set();
2640
2640
  for (let e of a.values) {
2641
2641
  let n = -1, r = Infinity;
2642
2642
  for (let i = 0; i < t.length; i++) {
@@ -2645,7 +2645,7 @@ var zt = {
2645
2645
  }
2646
2646
  if (n < 0 || c.has(n)) continue;
2647
2647
  c.add(n);
2648
- let i = re(n) + A.value / 2, a = f.categoryFormat ? f.categoryFormat(T.value[n], n) : Rt(t[n], f.dateFormat, "utc", o);
2648
+ let i = ne(n) + j.value / 2, a = f.categoryFormat ? f.categoryFormat(T.value[n], n) : zt(t[n], f.dateFormat, "utc", o);
2649
2649
  s.push({
2650
2650
  label: a,
2651
2651
  pos: i,
@@ -2656,9 +2656,9 @@ var zt = {
2656
2656
  }
2657
2657
  let n = [], r = (e, t) => f.categoryFormat ? f.categoryFormat(e, t) : e, i = Array(e), a = 0;
2658
2658
  for (let t = 0; t < e; t++) i[t] = r(T.value[t], t), i[t].length > a && (a = i[t].length);
2659
- let o = f.tickLabelStyle?.fontSize ?? 10, s = D.value ? a * o * .6 + 8 : o * 1.2 + 8, c = A.value > 0 ? Math.max(1, Math.ceil(s / A.value)) : 1;
2659
+ let o = f.tickLabelStyle?.fontSize ?? 10, s = D.value ? a * o * .6 + 8 : o * 1.2 + 8, c = j.value > 0 ? Math.max(1, Math.ceil(s / j.value)) : 1;
2660
2660
  for (let t = 0; t < e; t += c) {
2661
- let e = re(t) + A.value / 2;
2661
+ let e = ne(t) + j.value / 2;
2662
2662
  n.push({
2663
2663
  label: i[t],
2664
2664
  pos: e,
@@ -2666,15 +2666,15 @@ var zt = {
2666
2666
  });
2667
2667
  }
2668
2668
  return n;
2669
- }), pe = n(() => {
2669
+ }), B = n(() => {
2670
2670
  let e = [];
2671
2671
  return S.value.forEach((t, n) => {
2672
2672
  !t.legend || t.showInLegend === !1 || e.push({
2673
2673
  label: t.legend,
2674
- color: t.color ?? I(n),
2674
+ color: t.color ?? de(n),
2675
2675
  kind: "bar"
2676
2676
  });
2677
- }), ce.value.forEach((t) => {
2677
+ }), se.value.forEach((t) => {
2678
2678
  !t.legend || !t.showInLegend || e.push({
2679
2679
  label: t.legend,
2680
2680
  color: t.color,
@@ -2682,7 +2682,7 @@ var zt = {
2682
2682
  dashed: t.dashed
2683
2683
  });
2684
2684
  }), e;
2685
- }), ye = n(() => pe.value.map((e) => e.label));
2685
+ }), me = n(() => B.value.map((e) => e.label));
2686
2686
  function be() {
2687
2687
  if (typeof f.csv == "function") return f.csv();
2688
2688
  if (typeof f.csv == "string") return f.csv;
@@ -2690,12 +2690,12 @@ var zt = {
2690
2690
  label: e.legend,
2691
2691
  data: e.data
2692
2692
  }));
2693
- return Ve(T.value, e);
2693
+ return Ue(T.value, e);
2694
2694
  }
2695
- let Se = n(() => !!f.tooltipData || !!f.tooltipTrigger);
2695
+ let xe = n(() => !!f.tooltipData || !!f.tooltipTrigger);
2696
2696
  function Ce(e, t) {
2697
- if (!isFinite(e) || !isFinite(t) || A.value === 0) return null;
2698
- let n = (D.value ? H.value.left : H.value.top) + (e + .5) * A.value, r = N(t);
2697
+ if (!isFinite(e) || !isFinite(t) || j.value === 0) return null;
2698
+ let n = (D.value ? H.value.left : H.value.top) + (e + .5) * j.value, r = P(t);
2699
2699
  return D.value ? {
2700
2700
  x: n,
2701
2701
  y: r
@@ -2708,12 +2708,12 @@ var zt = {
2708
2708
  let n = De.value?.getBoundingClientRect();
2709
2709
  if (!n) return null;
2710
2710
  let r = w.value;
2711
- if (r === 0 || A.value === 0) return null;
2711
+ if (r === 0 || j.value === 0) return null;
2712
2712
  let i = D.value ? e - n.left - H.value.left : t - n.top - H.value.top;
2713
- return Math.max(0, Math.min(r - 1, Math.floor(i / A.value)));
2713
+ return Math.max(0, Math.min(r - 1, Math.floor(i / j.value)));
2714
2714
  }
2715
2715
  let Te = n(() => !!(f.categoryHeader || f.valueHeader)), Ee = n(() => {
2716
- let e = Te.value ? $n : 0, t = f.chartPadding;
2716
+ let e = Te.value ? er : 0, t = f.chartPadding;
2717
2717
  return e ? t == null ? { top: e } : typeof t == "number" ? {
2718
2718
  top: t + e,
2719
2719
  right: t,
@@ -2723,7 +2723,7 @@ var zt = {
2723
2723
  ...t,
2724
2724
  top: (t.top ?? 0) + e
2725
2725
  } : t;
2726
- }), { containerRef: De, svgRef: Oe, width: ke, height: Ae, padding: H, legendY: je, inlineLegendLayout: Me, innerW: U, innerH: W, bounds: Ne, hoverIndex: G, tooltipRef: K, tooltipPos: Pe, tooltipHandlers: q, menuItems: Fe, downloadLinkText: Ie, csvHref: Le, downloadButtonText: Re, triggerCsvDownload: ze, menuFilename: Be, isFullscreen: He, fullscreenStyle: Ue, teleportTarget: We, exitFullscreen: Ge } = st({
2726
+ }), { containerRef: De, svgRef: Oe, width: ke, height: Ae, padding: H, legendY: je, inlineLegendLayout: Me, innerW: U, innerH: W, bounds: Ne, hoverIndex: G, tooltipRef: K, tooltipPos: Pe, tooltipHandlers: Fe, menuItems: Ie, downloadLinkText: Le, csvHref: Re, downloadButtonText: ze, triggerCsvDownload: Be, menuFilename: Ve, isFullscreen: He, fullscreenStyle: We, teleportTarget: Ge, exitFullscreen: Ke } = lt({
2727
2727
  width: () => f.width,
2728
2728
  height: () => f.height,
2729
2729
  title: () => f.title,
@@ -2739,17 +2739,17 @@ var zt = {
2739
2739
  downloadButton: () => f.downloadButton,
2740
2740
  fullscreenTarget: () => f.fullscreenTarget,
2741
2741
  chartPadding: () => Ee.value,
2742
- inlineLegendLabels: () => ye.value,
2743
- hasTooltipSlot: () => Se.value,
2742
+ inlineLegendLabels: () => me.value,
2743
+ hasTooltipSlot: () => xe.value,
2744
2744
  getCsv: be,
2745
2745
  pointerToIndex: we,
2746
2746
  scrubAxis: () => D.value ? "x" : "y",
2747
2747
  onHover: (e) => h("hover", e)
2748
- }), Ke = n(() => xe(f.axisLabelStyle, { fontSize: 13 })), J = n(() => xe(f.tickLabelStyle, {
2748
+ }), qe = n(() => Se(f.axisLabelStyle, { fontSize: 13 })), q = n(() => Se(f.tickLabelStyle, {
2749
2749
  fontSize: 10,
2750
2750
  fillOpacity: V
2751
- })), qe = n(() => xe(f.legendStyle, { fontSize: 11 })), Y = n(() => f.categoryAlign === "start" && !D.value ? er : H.value.left), X = n(() => {
2752
- let e = f.titleStyle, t = e?.align ?? "left", n = Ne.value, r = t === "left" ? Y.value : t === "right" ? n.right : n.left + n.width / 2, i = t === "left" ? "start" : t === "right" ? "end" : "middle";
2751
+ })), Je = n(() => Se(f.legendStyle, { fontSize: 11 })), J = n(() => f.categoryAlign === "start" && !D.value ? tr : H.value.left), Y = n(() => {
2752
+ let e = f.titleStyle, t = e?.align ?? "left", n = Ne.value, r = t === "left" ? J.value : t === "right" ? n.right : n.left + n.width / 2, i = t === "left" ? "start" : t === "right" ? "end" : "middle";
2753
2753
  return {
2754
2754
  lines: (f.title ?? "").split("\n"),
2755
2755
  fontSize: e?.fontSize ?? 14,
@@ -2759,12 +2759,12 @@ var zt = {
2759
2759
  x: r,
2760
2760
  anchor: i
2761
2761
  };
2762
- }), Je = n(() => {
2762
+ }), Ye = n(() => {
2763
2763
  let e = G.value;
2764
2764
  if (e === null) return;
2765
2765
  let t = E.value;
2766
- return t && Number.isFinite(t[e]) ? Rt(t[e], f.dateFormat, "utc") : T.value[e];
2767
- }), Z = n(() => {
2766
+ return t && Number.isFinite(t[e]) ? zt(t[e], f.dateFormat, "utc") : T.value[e];
2767
+ }), X = n(() => {
2768
2768
  let e = G.value;
2769
2769
  if (e === null) return null;
2770
2770
  let t = S.value, n = [];
@@ -2772,7 +2772,7 @@ var zt = {
2772
2772
  let i = t[r];
2773
2773
  i.showInTooltip !== !1 && n.push({
2774
2774
  value: Number(i.data[e] ?? NaN),
2775
- color: i.color ?? I(r),
2775
+ color: i.color ?? de(r),
2776
2776
  seriesIndex: r
2777
2777
  });
2778
2778
  }
@@ -2782,24 +2782,24 @@ var zt = {
2782
2782
  values: n,
2783
2783
  data: f.tooltipData?.[e] ?? null
2784
2784
  };
2785
- }), Q = n(() => {
2785
+ }), Z = n(() => {
2786
2786
  let e = G.value;
2787
2787
  if (e === null) return null;
2788
- let t = re(e);
2788
+ let t = ne(e);
2789
2789
  return D.value ? {
2790
2790
  x: t,
2791
2791
  y: H.value.top,
2792
- w: A.value,
2792
+ w: j.value,
2793
2793
  h: W.value
2794
2794
  } : {
2795
2795
  x: H.value.left,
2796
2796
  y: t,
2797
2797
  w: U.value,
2798
- h: A.value
2798
+ h: j.value
2799
2799
  };
2800
- }), Ye = n(() => {
2801
- let e = Me.value.positions, t = Y.value, n = je.value;
2802
- return pe.value.map((r, i) => {
2800
+ }), Xe = n(() => {
2801
+ let e = Me.value.positions, t = J.value, n = je.value;
2802
+ return B.value.map((r, i) => {
2803
2803
  let a = e[i];
2804
2804
  return {
2805
2805
  ...r,
@@ -2807,7 +2807,7 @@ var zt = {
2807
2807
  y: n + a.row * 20
2808
2808
  };
2809
2809
  });
2810
- }), Xe = n(() => {
2810
+ }), Ze = n(() => {
2811
2811
  let e = f.barLabels;
2812
2812
  if (!e) return null;
2813
2813
  let t = e === !0 ? {} : e;
@@ -2818,37 +2818,37 @@ var zt = {
2818
2818
  align: t.align ?? "center",
2819
2819
  overlap: t.overlap ?? "shift",
2820
2820
  minSize: t.minSize ?? 0,
2821
- fontSize: t.fontSize ?? tr,
2821
+ fontSize: t.fontSize ?? nr,
2822
2822
  fontWeight: t.fontWeight
2823
2823
  };
2824
2824
  });
2825
- function Ze(e, t) {
2826
- let n = Xe.value?.format;
2827
- return typeof n == "function" ? n(e, t) : n === void 0 ? f.valueTickFormat === void 0 ? me(e) : te(e, f.valueTickFormat) : te(e, n);
2825
+ function Qe(e, t) {
2826
+ let n = Ze.value?.format;
2827
+ return typeof n == "function" ? n(e, t) : n === void 0 ? f.valueTickFormat === void 0 ? he(e) : te(e, f.valueTickFormat) : te(e, n);
2828
2828
  }
2829
- function Qe(e, t, n) {
2830
- for (let r = P.value.length - 1; r >= 0; r--) {
2831
- let i = P.value[r];
2829
+ function $e(e, t, n) {
2830
+ for (let r = F.value.length - 1; r >= 0; r--) {
2831
+ let i = F.value[r];
2832
2832
  if (i.categoryIndex === e && t >= i.x && t <= i.x + i.w && n >= i.y && n <= i.y + i.h) return i.color;
2833
2833
  }
2834
2834
  return null;
2835
2835
  }
2836
- let $e = n(() => {
2837
- let e = Xe.value;
2836
+ let et = n(() => {
2837
+ let e = Ze.value;
2838
2838
  if (!e) return [];
2839
2839
  let t = D.value, n = e.fontSize, r = [];
2840
- for (let i of P.value) {
2841
- let a = Ze(i.value, {
2840
+ for (let i of F.value) {
2841
+ let a = Qe(i.value, {
2842
2842
  value: i.value,
2843
2843
  categoryIndex: i.categoryIndex,
2844
2844
  seriesIndex: i.seriesIndex,
2845
2845
  category: T.value[i.categoryIndex] ?? String(i.categoryIndex)
2846
2846
  });
2847
2847
  if (!a) continue;
2848
- let o = t ? i.h : i.w, s = a.length * n * nr, c = o >= s + 2 * rr && o >= e.minSize, l = e.placement === "inside" ? !0 : e.placement === "outside" ? !1 : c, u, d, f, p = "middle", m = t ? -i.y : i.x + i.w, h = t ? -(i.y + i.h) : i.x, g = t ? n : s;
2849
- if (f = t ? i.x + i.w / 2 : i.y + i.h / 2, !l) u = m + rr, d = u + g, p = "start";
2850
- else if (e.align === "start") u = h + rr, d = u + g, p = "start";
2851
- else if (e.align === "end") d = m - rr, u = d - g, p = "end";
2848
+ let o = t ? i.h : i.w, s = a.length * n * rr, c = o >= s + 2 * ir && o >= e.minSize, l = e.placement === "inside" ? !0 : e.placement === "outside" ? !1 : c, u, d, f, p = "middle", m = t ? -i.y : i.x + i.w, h = t ? -(i.y + i.h) : i.x, g = t ? n : s;
2849
+ if (f = t ? i.x + i.w / 2 : i.y + i.h / 2, !l) u = m + ir, d = u + g, p = "start";
2850
+ else if (e.align === "start") u = h + ir, d = u + g, p = "start";
2851
+ else if (e.align === "end") d = m - ir, u = d - g, p = "end";
2852
2852
  else {
2853
2853
  let e = (m + h) / 2;
2854
2854
  u = e - g / 2, d = e + g / 2, p = "middle";
@@ -2874,12 +2874,12 @@ var zt = {
2874
2874
  t.sort((e, t) => e.lo - t.lo);
2875
2875
  let n = -Infinity;
2876
2876
  for (let r of t) {
2877
- if (r.lo < n + ir) {
2877
+ if (r.lo < n + ar) {
2878
2878
  if (e.overlap === "hide") {
2879
2879
  r.hidden = !0;
2880
2880
  continue;
2881
2881
  }
2882
- let t = n + ir - r.lo;
2882
+ let t = n + ar - r.lo;
2883
2883
  r.lo += t, r.hi += t, r.inside = !1, r.svgAnchor = "start";
2884
2884
  }
2885
2885
  if (r.hi > i) {
@@ -2896,10 +2896,10 @@ var zt = {
2896
2896
  t ? (r = i.cross, a = -((i.lo + i.hi) / 2), c = "middle") : (c = i.svgAnchor, r = c === "start" ? i.lo : c === "end" ? i.hi : (i.lo + i.hi) / 2, a = i.cross);
2897
2897
  let l;
2898
2898
  if (!o) l = e.color;
2899
- else if (i.inside) l = mt(i.bar.color);
2899
+ else if (i.inside) l = gt(i.bar.color);
2900
2900
  else {
2901
- let e = t ? i.cross : (i.lo + i.hi) / 2, n = t ? -((i.lo + i.hi) / 2) : i.cross, r = Qe(i.bar.categoryIndex, e, n);
2902
- l = r ? mt(r) : "currentColor";
2901
+ let e = t ? i.cross : (i.lo + i.hi) / 2, n = t ? -((i.lo + i.hi) / 2) : i.cross, r = $e(i.bar.categoryIndex, e, n);
2902
+ l = r ? gt(r) : "currentColor";
2903
2903
  }
2904
2904
  s.push({
2905
2905
  key: `${i.bar.categoryIndex}-${i.bar.seriesIndex}`,
@@ -2913,23 +2913,23 @@ var zt = {
2913
2913
  });
2914
2914
  }
2915
2915
  return s;
2916
- }), et = n(() => {
2916
+ }), tt = n(() => {
2917
2917
  let e = H.value.left - 6;
2918
2918
  switch (f.categoryAlign ?? "end") {
2919
2919
  case "start": return {
2920
2920
  anchor: "start",
2921
- x: er
2921
+ x: tr
2922
2922
  };
2923
2923
  case "center": return {
2924
2924
  anchor: "middle",
2925
- x: (er + e) / 2
2925
+ x: (tr + e) / 2
2926
2926
  };
2927
2927
  default: return {
2928
2928
  anchor: "end",
2929
2929
  x: e
2930
2930
  };
2931
2931
  }
2932
- }), tt = n(() => {
2932
+ }), nt = n(() => {
2933
2933
  let e = [], t = H.value.top - 7;
2934
2934
  if (f.valueHeader && e.push({
2935
2935
  key: "vh",
@@ -2938,7 +2938,7 @@ var zt = {
2938
2938
  y: t,
2939
2939
  anchor: "start"
2940
2940
  }), f.categoryHeader) {
2941
- let n = !D.value, r = et.value;
2941
+ let n = !D.value, r = tt.value;
2942
2942
  e.push({
2943
2943
  key: "ch",
2944
2944
  text: f.categoryHeader,
@@ -2950,26 +2950,26 @@ var zt = {
2950
2950
  return e;
2951
2951
  });
2952
2952
  return (n, l) => (_(), r(t, {
2953
- to: C(We),
2953
+ to: C(Ge),
2954
2954
  disabled: !C(He)
2955
2955
  }, [o("div", d({
2956
2956
  ref_key: "containerRef",
2957
2957
  ref: De
2958
2958
  }, n.$attrs, {
2959
2959
  class: ["bar-chart-wrapper", { "is-fullscreen": C(He) }],
2960
- style: C(Ue)
2960
+ style: C(We)
2961
2961
  }), [
2962
- c.menu ? (_(), r(fe, {
2962
+ c.menu ? (_(), r(pe, {
2963
2963
  key: 0,
2964
- items: C(Fe),
2964
+ items: C(Ie),
2965
2965
  "is-fullscreen": C(He),
2966
- onClose: C(Ge)
2966
+ onClose: C(Ke)
2967
2967
  }, null, 8, [
2968
2968
  "items",
2969
2969
  "is-fullscreen",
2970
2970
  "onClose"
2971
2971
  ])) : i("", !0),
2972
- o("div", En, x(C(He) ? "Chart expanded to fill window" : ""), 1),
2972
+ o("div", Dn, x(C(He) ? "Chart expanded to fill window" : ""), 1),
2973
2973
  (_(), a("svg", {
2974
2974
  ref_key: "svgRef",
2975
2975
  ref: Oe,
@@ -2978,35 +2978,35 @@ var zt = {
2978
2978
  }, [
2979
2979
  c.title ? (_(), a("text", {
2980
2980
  key: 0,
2981
- x: X.value.x,
2982
- y: X.value.lineHeight,
2983
- "text-anchor": X.value.anchor,
2984
- "font-size": X.value.fontSize,
2985
- "font-weight": X.value.fontWeight,
2986
- fill: X.value.color
2987
- }, [(_(!0), a(e, null, y(X.value.lines, (e, t) => (_(), a("tspan", {
2981
+ x: Y.value.x,
2982
+ y: Y.value.lineHeight,
2983
+ "text-anchor": Y.value.anchor,
2984
+ "font-size": Y.value.fontSize,
2985
+ "font-weight": Y.value.fontWeight,
2986
+ fill: Y.value.color
2987
+ }, [(_(!0), a(e, null, y(Y.value.lines, (e, t) => (_(), a("tspan", {
2988
2988
  key: t,
2989
- x: X.value.x,
2990
- dy: t === 0 ? 0 : X.value.lineHeight
2991
- }, x(e), 9, kn))), 128))], 8, On)) : i("", !0),
2992
- (_(!0), a(e, null, y(tt.value, (e) => (_(), a("text", {
2989
+ x: Y.value.x,
2990
+ dy: t === 0 ? 0 : Y.value.lineHeight
2991
+ }, x(e), 9, An))), 128))], 8, kn)) : i("", !0),
2992
+ (_(!0), a(e, null, y(nt.value, (e) => (_(), a("text", {
2993
2993
  key: e.key,
2994
2994
  "data-testid": e.key === "ch" ? "category-header" : "value-header",
2995
2995
  x: e.x,
2996
2996
  y: e.y,
2997
2997
  "text-anchor": e.anchor,
2998
- "font-size": Ke.value.fontSize,
2999
- fill: Ke.value.fill,
2998
+ "font-size": qe.value.fontSize,
2999
+ fill: qe.value.fill,
3000
3000
  "font-weight": "600"
3001
- }, x(e.text), 9, An))), 128)),
3002
- Ye.value.length > 0 ? (_(), a("g", jn, [(_(!0), a(e, null, y(Ye.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.kind === "bar" ? (_(), a("rect", {
3001
+ }, x(e.text), 9, jn))), 128)),
3002
+ Xe.value.length > 0 ? (_(), a("g", Mn, [(_(!0), a(e, null, y(Xe.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.kind === "bar" ? (_(), a("rect", {
3003
3003
  key: 0,
3004
3004
  x: t.x,
3005
3005
  y: t.y - 5,
3006
3006
  width: "12",
3007
3007
  height: "10",
3008
3008
  fill: t.color
3009
- }, null, 8, Mn)) : (_(), a("line", {
3009
+ }, null, 8, Nn)) : (_(), a("line", {
3010
3010
  key: 1,
3011
3011
  x1: t.x,
3012
3012
  y1: t.y,
@@ -3015,13 +3015,13 @@ var zt = {
3015
3015
  stroke: t.color,
3016
3016
  "stroke-width": "2",
3017
3017
  "stroke-dasharray": t.dashed ? "4 2" : void 0
3018
- }, null, 8, Nn)), o("text", {
3018
+ }, null, 8, Pn)), o("text", {
3019
3019
  x: t.x + 18,
3020
3020
  y: t.y + 4,
3021
- "font-size": qe.value.fontSize,
3022
- fill: qe.value.fill,
3023
- "font-weight": qe.value.fontWeight
3024
- }, x(t.label), 9, Pn)], 64))), 128))])) : i("", !0),
3021
+ "font-size": Je.value.fontSize,
3022
+ fill: Je.value.fill,
3023
+ "font-weight": Je.value.fontWeight
3024
+ }, x(t.label), 9, Fn)], 64))), 128))])) : i("", !0),
3025
3025
  !D.value || c.valueAxis ? (_(), a("line", {
3026
3026
  key: 2,
3027
3027
  x1: C(R)(C(H).left),
@@ -3030,7 +3030,7 @@ var zt = {
3030
3030
  y2: C(R)(C(H).top + C(W)),
3031
3031
  stroke: "currentColor",
3032
3032
  "stroke-opacity": "0.3"
3033
- }, null, 8, Fn)) : i("", !0),
3033
+ }, null, 8, In)) : i("", !0),
3034
3034
  D.value || c.valueAxis ? (_(), a("line", {
3035
3035
  key: 3,
3036
3036
  x1: C(R)(C(H).left),
@@ -3039,8 +3039,8 @@ var zt = {
3039
3039
  y2: C(R)(C(H).top + C(W)),
3040
3040
  stroke: "currentColor",
3041
3041
  "stroke-opacity": "0.3"
3042
- }, null, 8, In)) : i("", !0),
3043
- c.valueGrid && c.valueAxis ? (_(!0), a(e, { key: 4 }, y(z.value, (e, t) => (_(), a("line", {
3042
+ }, null, 8, Ln)) : i("", !0),
3043
+ c.valueGrid && c.valueAxis ? (_(!0), a(e, { key: 4 }, y(L.value, (e, t) => (_(), a("line", {
3044
3044
  key: "vg" + t,
3045
3045
  x1: D.value ? C(H).left : e.pos,
3046
3046
  y1: D.value ? e.pos : C(H).top,
@@ -3048,81 +3048,81 @@ var zt = {
3048
3048
  y2: D.value ? e.pos : C(H).top + C(W),
3049
3049
  stroke: "currentColor",
3050
3050
  "stroke-opacity": "0.1"
3051
- }, null, 8, Ln))), 128)) : i("", !0),
3052
- Q.value && Se.value ? (_(), a("rect", {
3051
+ }, null, 8, Rn))), 128)) : i("", !0),
3052
+ Z.value && xe.value ? (_(), a("rect", {
3053
3053
  key: 5,
3054
- x: Q.value.x,
3055
- y: Q.value.y,
3056
- width: Q.value.w,
3057
- height: Q.value.h,
3054
+ x: Z.value.x,
3055
+ y: Z.value.y,
3056
+ width: Z.value.w,
3057
+ height: Z.value.h,
3058
3058
  fill: "currentColor",
3059
3059
  "fill-opacity": "0.06",
3060
3060
  "pointer-events": "none"
3061
- }, null, 8, Rn)) : i("", !0),
3062
- c.valueAxis && D.value ? (_(!0), a(e, { key: 6 }, y(z.value, (e, t) => (_(), a("text", {
3061
+ }, null, 8, zn)) : i("", !0),
3062
+ c.valueAxis && D.value ? (_(!0), a(e, { key: 6 }, y(L.value, (e, t) => (_(), a("text", {
3063
3063
  key: "vt" + t,
3064
3064
  "data-testid": "value-tick",
3065
3065
  x: C(H).left - 6,
3066
3066
  y: e.pos,
3067
3067
  "text-anchor": "end",
3068
3068
  "dominant-baseline": "middle",
3069
- "font-size": J.value.fontSize,
3070
- fill: J.value.fill,
3071
- "font-weight": J.value.fontWeight,
3072
- "fill-opacity": J.value.fillOpacity
3073
- }, x(e.value), 9, zn))), 128)) : c.valueAxis ? (_(!0), a(e, { key: 7 }, y(z.value, (e, t) => (_(), a("text", {
3069
+ "font-size": q.value.fontSize,
3070
+ fill: q.value.fill,
3071
+ "font-weight": q.value.fontWeight,
3072
+ "fill-opacity": q.value.fillOpacity
3073
+ }, x(e.value), 9, Bn))), 128)) : c.valueAxis ? (_(!0), a(e, { key: 7 }, y(L.value, (e, t) => (_(), a("text", {
3074
3074
  key: "vt" + t,
3075
3075
  "data-testid": "value-tick",
3076
3076
  x: e.pos,
3077
3077
  y: C(H).top + C(W) + 16,
3078
3078
  "text-anchor": "middle",
3079
- "font-size": J.value.fontSize,
3080
- fill: J.value.fill,
3081
- "font-weight": J.value.fontWeight,
3082
- "fill-opacity": J.value.fillOpacity
3083
- }, x(e.value), 9, Bn))), 128)) : i("", !0),
3079
+ "font-size": q.value.fontSize,
3080
+ fill: q.value.fill,
3081
+ "font-weight": q.value.fontWeight,
3082
+ "fill-opacity": q.value.fillOpacity
3083
+ }, x(e.value), 9, Vn))), 128)) : i("", !0),
3084
3084
  c.yLabel ? (_(), a("text", {
3085
3085
  key: 8,
3086
3086
  x: 0,
3087
3087
  y: 0,
3088
3088
  transform: `translate(14, ${C(H).top + C(W) / 2}) rotate(-90)`,
3089
3089
  "text-anchor": "middle",
3090
- "font-size": Ke.value.fontSize,
3091
- fill: Ke.value.fill,
3092
- "font-weight": Ke.value.fontWeight
3093
- }, x(c.yLabel), 9, Vn)) : i("", !0),
3094
- D.value ? (_(!0), a(e, { key: 9 }, y(B.value, (e, t) => (_(), a("text", {
3090
+ "font-size": qe.value.fontSize,
3091
+ fill: qe.value.fill,
3092
+ "font-weight": qe.value.fontWeight
3093
+ }, x(c.yLabel), 9, Hn)) : i("", !0),
3094
+ D.value ? (_(!0), a(e, { key: 9 }, y(z.value, (e, t) => (_(), a("text", {
3095
3095
  key: "ct" + t,
3096
3096
  "data-testid": "category-tick",
3097
3097
  x: e.pos,
3098
3098
  y: C(H).top + C(W) + 16,
3099
3099
  "text-anchor": e.anchor,
3100
- "font-size": J.value.fontSize,
3101
- fill: J.value.fill,
3102
- "font-weight": J.value.fontWeight,
3103
- "fill-opacity": J.value.fillOpacity
3104
- }, x(e.label), 9, Hn))), 128)) : (_(!0), a(e, { key: 10 }, y(B.value, (e, t) => (_(), a("text", {
3100
+ "font-size": q.value.fontSize,
3101
+ fill: q.value.fill,
3102
+ "font-weight": q.value.fontWeight,
3103
+ "fill-opacity": q.value.fillOpacity
3104
+ }, x(e.label), 9, Un))), 128)) : (_(!0), a(e, { key: 10 }, y(z.value, (e, t) => (_(), a("text", {
3105
3105
  key: "ct" + t,
3106
3106
  "data-testid": "category-tick",
3107
- x: et.value.x,
3107
+ x: tt.value.x,
3108
3108
  y: e.pos,
3109
- "text-anchor": et.value.anchor,
3109
+ "text-anchor": tt.value.anchor,
3110
3110
  "dominant-baseline": "middle",
3111
- "font-size": J.value.fontSize,
3112
- fill: J.value.fill,
3113
- "font-weight": J.value.fontWeight,
3114
- "fill-opacity": J.value.fillOpacity
3115
- }, x(e.label), 9, Un))), 128)),
3111
+ "font-size": q.value.fontSize,
3112
+ fill: q.value.fill,
3113
+ "font-weight": q.value.fontWeight,
3114
+ "fill-opacity": q.value.fillOpacity
3115
+ }, x(e.label), 9, Wn))), 128)),
3116
3116
  c.xLabel ? (_(), a("text", {
3117
3117
  key: 11,
3118
3118
  x: C(H).left + C(U) / 2,
3119
3119
  y: C(Ae) - 4,
3120
3120
  "text-anchor": "middle",
3121
- "font-size": Ke.value.fontSize,
3122
- fill: Ke.value.fill,
3123
- "font-weight": Ke.value.fontWeight
3124
- }, x(c.xLabel), 9, Wn)) : i("", !0),
3125
- (_(!0), a(e, null, y(P.value, (e, t) => (_(), a("rect", {
3121
+ "font-size": qe.value.fontSize,
3122
+ fill: qe.value.fill,
3123
+ "font-weight": qe.value.fontWeight
3124
+ }, x(c.xLabel), 9, Gn)) : i("", !0),
3125
+ (_(!0), a(e, null, y(F.value, (e, t) => (_(), a("rect", {
3126
3126
  key: "bar" + t,
3127
3127
  "data-testid": "bar",
3128
3128
  "data-category": e.categoryIndex,
@@ -3134,8 +3134,8 @@ var zt = {
3134
3134
  fill: e.color,
3135
3135
  "fill-opacity": e.opacity,
3136
3136
  style: m(e.blendMode ? { mixBlendMode: e.blendMode } : void 0)
3137
- }, null, 12, Gn))), 128)),
3138
- (_(!0), a(e, null, y($e.value, (e) => (_(), a("text", {
3137
+ }, null, 12, Kn))), 128)),
3138
+ (_(!0), a(e, null, y(et.value, (e) => (_(), a("text", {
3139
3139
  key: "blbl" + e.key,
3140
3140
  "data-testid": "bar-label",
3141
3141
  x: e.x,
@@ -3146,8 +3146,8 @@ var zt = {
3146
3146
  "font-weight": e.fontWeight,
3147
3147
  fill: e.fill,
3148
3148
  "pointer-events": "none"
3149
- }, x(e.text), 9, Kn))), 128)),
3150
- (_(!0), a(e, null, y(F.value, (t, n) => (_(), a(e, { key: "sl" + n }, [t.pathD ? (_(), a("path", {
3149
+ }, x(e.text), 9, qn))), 128)),
3150
+ (_(!0), a(e, null, y(I.value, (t, n) => (_(), a(e, { key: "sl" + n }, [t.pathD ? (_(), a("path", {
3151
3151
  key: 0,
3152
3152
  "data-testid": "summary-line",
3153
3153
  d: t.pathD,
@@ -3159,7 +3159,7 @@ var zt = {
3159
3159
  "stroke-linecap": "round",
3160
3160
  "stroke-linejoin": "round",
3161
3161
  style: m(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
3162
- }, null, 12, qn)) : i("", !0), t.dots ? (_(!0), a(e, { key: 1 }, y(t.points, (e, r) => (_(), a("circle", {
3162
+ }, null, 12, Jn)) : i("", !0), t.dots ? (_(!0), a(e, { key: 1 }, y(t.points, (e, r) => (_(), a("circle", {
3163
3163
  key: "sld" + n + "-" + r,
3164
3164
  cx: e.x,
3165
3165
  cy: e.y,
@@ -3167,8 +3167,8 @@ var zt = {
3167
3167
  fill: t.color,
3168
3168
  "fill-opacity": t.opacity,
3169
3169
  style: m(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
3170
- }, null, 12, Jn))), 128)) : i("", !0)], 64))), 128)),
3171
- Se.value ? (_(), a("rect", d({
3170
+ }, null, 12, Yn))), 128)) : i("", !0)], 64))), 128)),
3171
+ xe.value ? (_(), a("rect", d({
3172
3172
  key: 12,
3173
3173
  x: C(H).left,
3174
3174
  y: C(H).top,
@@ -3176,15 +3176,15 @@ var zt = {
3176
3176
  height: C(W),
3177
3177
  fill: "transparent",
3178
3178
  style: `cursor: crosshair; touch-action: ${D.value ? "pan-y" : "pan-x"}`
3179
- }, ee(C(q), !0)), null, 16, Yn)) : i("", !0),
3180
- c.annotations && c.annotations.length > 0 ? (_(), r(C(it), {
3179
+ }, ee(C(Fe), !0)), null, 16, Xn)) : i("", !0),
3180
+ c.annotations && c.annotations.length > 0 ? (_(), r(C(ot), {
3181
3181
  key: 13,
3182
3182
  annotations: c.annotations,
3183
3183
  project: Ce,
3184
3184
  bounds: C(Ne)
3185
3185
  }, null, 8, ["annotations", "bounds"])) : i("", !0)
3186
- ], 8, Dn)),
3187
- Se.value && C(G) !== null && Z.value ? (_(), a("div", {
3186
+ ], 8, On)),
3187
+ xe.value && C(G) !== null && X.value ? (_(), a("div", {
3188
3188
  key: 1,
3189
3189
  ref_key: "tooltipRef",
3190
3190
  ref: K,
@@ -3197,28 +3197,28 @@ var zt = {
3197
3197
  transform: C(Pe) ? `translate3d(${C(Pe).left}px, ${C(Pe).top}px, 0) translateY(-50%)` : "translateY(-50%)",
3198
3198
  visibility: C(Pe) ? "visible" : "hidden"
3199
3199
  })
3200
- }, [b(n.$slots, "tooltip", p(u(Z.value)), () => [o("div", Xn, [Je.value ? (_(), a("div", Zn, x(Je.value), 1)) : i("", !0), (_(!0), a(e, null, y(Z.value.values, (e) => (_(), a("div", {
3200
+ }, [b(n.$slots, "tooltip", p(u(X.value)), () => [o("div", Zn, [Ye.value ? (_(), a("div", Qn, x(Ye.value), 1)) : i("", !0), (_(!0), a(e, null, y(X.value.values, (e) => (_(), a("div", {
3201
3201
  key: e.seriesIndex,
3202
3202
  class: "bar-chart-tooltip-row"
3203
3203
  }, [o("span", {
3204
3204
  class: "bar-chart-tooltip-swatch",
3205
3205
  style: m({ background: e.color })
3206
- }, null, 4), s(" " + x(isFinite(e.value) ? C(L)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
3207
- C(Ie) ? (_(), a("a", {
3206
+ }, null, 4), s(" " + x(isFinite(e.value) ? C(fe)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
3207
+ C(Le) ? (_(), a("a", {
3208
3208
  key: 2,
3209
3209
  class: "bar-chart-download-link",
3210
- href: C(Le),
3211
- download: `${C(Be)()}.csv`
3212
- }, x(C(Ie)), 9, Qn)) : i("", !0),
3213
- C(Re) ? (_(), a("button", {
3210
+ href: C(Re),
3211
+ download: `${C(Ve)()}.csv`
3212
+ }, x(C(Le)), 9, $n)) : i("", !0),
3213
+ C(ze) ? (_(), a("button", {
3214
3214
  key: 3,
3215
3215
  type: "button",
3216
3216
  class: "bar-chart-download-button",
3217
- onClick: l[0] ||= (...e) => C(ze) && C(ze)(...e)
3218
- }, x(C(Re)), 1)) : i("", !0)
3217
+ onClick: l[0] ||= (...e) => C(Be) && C(Be)(...e)
3218
+ }, x(C(ze)), 1)) : i("", !0)
3219
3219
  ], 16)], 8, ["to", "disabled"]));
3220
3220
  }
3221
- }), [["__scopeId", "data-v-67594e38"]]), or = {
3221
+ }), [["__scopeId", "data-v-67594e38"]]), sr = {
3222
3222
  ref: "root",
3223
3223
  class: "chart-tooltip-content",
3224
3224
  style: {
@@ -3230,7 +3230,7 @@ var zt = {
3230
3230
  "pointer-events": "none",
3231
3231
  transform: "translateY(-50%)"
3232
3232
  }
3233
- }, sr = /* @__PURE__ */ l({
3233
+ }, cr = /* @__PURE__ */ l({
3234
3234
  __name: "ChoroplethTooltip",
3235
3235
  setup(e, { expose: n }) {
3236
3236
  let a = v(null), s = T("root");
@@ -3241,21 +3241,21 @@ var zt = {
3241
3241
  getEl() {
3242
3242
  return s.value;
3243
3243
  }
3244
- }), (e, n) => (_(), r(t, { to: "body" }, [o("div", or, [a.value ? b(e.$slots, "default", p(d({ key: 0 }, a.value))) : i("", !0)], 512)]));
3244
+ }), (e, n) => (_(), r(t, { to: "body" }, [o("div", sr, [a.value ? b(e.$slots, "default", p(d({ key: 0 }, a.value))) : i("", !0)], 512)]));
3245
3245
  }
3246
- }), cr = {
3246
+ }), lr = {
3247
3247
  class: "chart-sr-only",
3248
3248
  "aria-live": "polite"
3249
- }, lr = {
3249
+ }, ur = {
3250
3250
  key: 1,
3251
3251
  class: "choropleth-header"
3252
- }, ur = {
3252
+ }, dr = {
3253
3253
  key: 0,
3254
3254
  class: "choropleth-legend-title"
3255
- }, dr = {
3255
+ }, fr = {
3256
3256
  key: 2,
3257
3257
  class: "choropleth-legend-continuous"
3258
- }, fr = { class: "choropleth-legend-ticks" }, pr = ["viewBox"], mr = ["innerHTML"], hr = "http://www.w3.org/2000/svg", gr = 10, _r = 600, vr = 450, yr = 1e3, br = /* @__PURE__ */ L(/* @__PURE__ */ l({
3258
+ }, pr = { class: "choropleth-legend-ticks" }, mr = ["viewBox"], hr = ["innerHTML"], gr = "http://www.w3.org/2000/svg", _r = 10, vr = 600, yr = 450, br = 1e3, xr = 12, Sr = /* @__PURE__ */ L(/* @__PURE__ */ l({
3259
3259
  inheritAttrs: !1,
3260
3260
  __name: "ChoroplethMap",
3261
3261
  props: {
@@ -3263,6 +3263,7 @@ var zt = {
3263
3263
  data: {},
3264
3264
  geoType: { default: "states" },
3265
3265
  dataGeoType: {},
3266
+ state: {},
3266
3267
  width: {},
3267
3268
  height: {},
3268
3269
  colorScale: {},
@@ -3289,12 +3290,20 @@ var zt = {
3289
3290
  type: Boolean,
3290
3291
  default: !1
3291
3292
  },
3293
+ twoFingerPan: {
3294
+ type: Boolean,
3295
+ default: !1
3296
+ },
3292
3297
  tooltipTrigger: {},
3293
3298
  tooltipFormat: {},
3294
3299
  tooltipValueFormat: {},
3295
3300
  tooltipClamp: { default: "chart" },
3296
3301
  focus: {},
3297
3302
  focusZoomLevel: { default: 4 },
3303
+ focusZoom: {
3304
+ type: Boolean,
3305
+ default: !0
3306
+ },
3298
3307
  fullscreenTarget: {}
3299
3308
  },
3300
3309
  emits: [
@@ -3303,7 +3312,7 @@ var zt = {
3303
3312
  "update:focus"
3304
3313
  ],
3305
3314
  setup(c, { emit: l }) {
3306
- let f = c, ee = l, T = (e) => e, O = v(null), k = v(null), ne = v(null), A = v(null), j = v(null), M = v(null), re = w(), ie = n(() => !!f.tooltipTrigger || !!f.tooltipFormat || !!re.tooltip), N = n(() => {
3315
+ let f = c, ee = l, T = (e) => e, O = v(null), k = v(null), A = v(null), j = v(null), M = v(null), N = v(null), ne = w(), re = n(() => !!f.tooltipTrigger || !!f.tooltipFormat || !!ne.tooltip), P = n(() => {
3307
3316
  let e = f.legendStyle, t = {};
3308
3317
  return e?.fontSize != null && (t["font-size"] = `${e.fontSize}px`), e?.fontWeight != null && (t["font-weight"] = String(e.fontWeight)), e?.color != null && (t.color = e.color), t;
3309
3318
  }), de = n(() => {
@@ -3315,55 +3324,55 @@ var zt = {
3315
3324
  width: "100%"
3316
3325
  };
3317
3326
  return e?.color && (t.color = e.color), t;
3318
- }), I = /* @__PURE__ */ new Map(), L = /* @__PURE__ */ new Map(), R = null, z = null, B = /* @__PURE__ */ new Map(), pe = /* @__PURE__ */ new Map(), me = !1, he = typeof window < "u" && "ontouchstart" in window, ge = null, _e = {
3327
+ }), fe = /* @__PURE__ */ new Map(), L = /* @__PURE__ */ new Map(), R = null, z = null, B = /* @__PURE__ */ new Map(), me = /* @__PURE__ */ new Map(), he = !1, ge = typeof window < "u" && "ontouchstart" in window, _e = null, ve = {
3319
3328
  width: 0,
3320
3329
  height: 0
3321
- }, ve = null, ye = !1, V = null, be = v(!1), xe = 0, Se = 0, Ce = 0, we = null;
3322
- function Te() {
3323
- let e = ne.value;
3324
- e && (e.addEventListener("touchstart", St, { passive: !0 }), e.addEventListener("touchend", Ct), e.addEventListener("touchcancel", wt, { passive: !0 }), !he && (e.addEventListener("click", yt), e.addEventListener("mouseover", yt), e.addEventListener("mousemove", bt), e.addEventListener("mouseout", xt)));
3325
- }
3330
+ }, ye = null, be = !1, V = null, xe = v(!1), Se = 0, Ce = 0, we = 0, Te = null;
3326
3331
  function Ee() {
3327
- let e = ne.value;
3328
- e && (e.removeEventListener("touchstart", St), e.removeEventListener("touchend", Ct), e.removeEventListener("touchcancel", wt), e.removeEventListener("click", yt), e.removeEventListener("mouseover", yt), e.removeEventListener("mousemove", bt), e.removeEventListener("mouseout", xt));
3332
+ let e = A.value;
3333
+ e && (e.addEventListener("touchstart", Et, { passive: !0 }), e.addEventListener("touchend", Dt), e.addEventListener("touchcancel", Ot, { passive: !0 }), !ge && (e.addEventListener("click", Ct), e.addEventListener("mouseover", Ct), e.addEventListener("mousemove", wt), e.addEventListener("mouseout", Tt)));
3329
3334
  }
3330
3335
  function De() {
3331
- gt();
3336
+ let e = A.value;
3337
+ e && (e.removeEventListener("touchstart", Et), e.removeEventListener("touchend", Dt), e.removeEventListener("touchcancel", Ot), e.removeEventListener("click", Ct), e.removeEventListener("mouseover", Ct), e.removeEventListener("mousemove", wt), e.removeEventListener("mouseout", Tt));
3338
+ }
3339
+ function Oe() {
3340
+ bt();
3332
3341
  }
3333
3342
  h(() => {
3334
- Oe(), Te(), Et(), U(), st(), window.addEventListener("scroll", De, {
3343
+ ke(), Ee(), At(), W(), ft(), window.addEventListener("scroll", Oe, {
3335
3344
  passive: !0,
3336
3345
  capture: !0
3337
- }), window.addEventListener("resize", De, { passive: !0 });
3346
+ }), window.addEventListener("resize", Oe, { passive: !0 });
3338
3347
  }), g(() => {
3339
- ge?.disconnect(), Ce && cancelAnimationFrame(Ce), ke(), Ee(), window.removeEventListener("scroll", De, { capture: !0 }), window.removeEventListener("resize", De);
3348
+ _e?.disconnect(), we && cancelAnimationFrame(we), Ae(), De(), window.removeEventListener("scroll", Oe, { capture: !0 }), window.removeEventListener("resize", Oe);
3340
3349
  });
3341
- function Oe() {
3342
- if (!k.value || !ne.value) return;
3343
- let e = ce(k.value), t = Math.max(12, f.focusZoomLevel);
3350
+ function ke() {
3351
+ if (!k.value || !A.value) return;
3352
+ let e = I(k.value), t = Math.max(12, f.focusZoomLevel);
3344
3353
  V = oe().scaleExtent([1, t]).on("start", () => {
3345
- me = !0, gt();
3354
+ he = !0, bt();
3346
3355
  }).on("zoom", (e) => {
3347
- ne.value && ne.value.setAttribute("transform", e.transform);
3356
+ A.value && A.value.setAttribute("transform", e.transform);
3348
3357
  let t = e.transform;
3349
- be.value = t.k !== 1 || t.x !== 0 || t.y !== 0;
3358
+ xe.value = t.k !== 1 || t.x !== 0 || t.y !== 0;
3350
3359
  }).on("end", () => {
3351
- me = !1;
3360
+ he = !1;
3352
3361
  }), V.filter((e) => {
3353
- let t = Y.value.length > 0, n = !!f.zoom || t, r = !!f.pan || t;
3362
+ let t = Z.value.length > 0 && f.focusZoom !== !1, n = !!f.zoom || t, r = !!f.pan || t;
3354
3363
  if (e.type === "wheel" || e.type === "dblclick") {
3355
3364
  if (!n) return !1;
3356
3365
  } else if (e.type === "mousedown" || e.type === "touchstart") {
3357
- if (!r) return !1;
3366
+ if (!r || f.twoFingerPan && e.type === "touchstart" && e.touches.length < 2) return !1;
3358
3367
  } else if (!n && !r) return !1;
3359
3368
  return (!e.ctrlKey || e.type === "wheel") && !e.button;
3360
3369
  }), e.call(V);
3361
3370
  }
3362
- function ke() {
3363
- k.value && V && (ce(k.value).on(".zoom", null), V = null);
3371
+ function Ae() {
3372
+ k.value && V && (I(k.value).on(".zoom", null), V = null);
3364
3373
  }
3365
- function H(e) {
3366
- let t = X.value, n = Ke.value, r = [];
3374
+ function je(e) {
3375
+ let t = Xe.value, n = Y.value, r = [];
3367
3376
  for (let i of e) {
3368
3377
  let e = i.geoType ?? f.geoType, a = t.get(e);
3369
3378
  if (!a) continue;
@@ -3381,87 +3390,115 @@ var zt = {
3381
3390
  }
3382
3391
  return r;
3383
3392
  }
3384
- function je(e) {
3393
+ function Me(e) {
3385
3394
  let t = /* @__PURE__ */ new Set();
3386
- for (let n of H(e)) n.geoType === f.geoType && t.add(String(n.feature.id));
3395
+ for (let n of je(e)) n.geoType === f.geoType && t.add(String(n.feature.id));
3387
3396
  return t;
3388
3397
  }
3389
- let Me = !1;
3390
- function U() {
3398
+ let U = !1;
3399
+ function W() {
3391
3400
  if (!k.value || !V) return;
3392
- let e = H(Y.value), t = e.filter((e) => e.geoType === f.geoType), n = e.filter((e) => e.geoType !== f.geoType), r = /* @__PURE__ */ new Map();
3401
+ let e = je(Z.value), t = e.filter((e) => e.geoType === f.geoType), n = e.filter((e) => e.geoType !== f.geoType), r = /* @__PURE__ */ new Map();
3393
3402
  for (let e of t) {
3394
- let t = I.get(String(e.feature.id));
3403
+ let t = fe.get(String(e.feature.id));
3395
3404
  t && r.set(t, e.item.style ?? "solid");
3396
3405
  }
3397
- for (let [e] of B) r.has(e) || e === z || mt(e);
3398
- for (let [e, t] of r) B.get(e) === t && e !== z || e !== z && pt(e, t);
3406
+ for (let [e] of B) r.has(e) || e === z || Q(e);
3407
+ for (let [e, t] of r) B.get(e) === t && e !== z || e !== z && vt(e, t);
3399
3408
  B.clear();
3400
3409
  for (let [e, t] of r) B.set(e, t);
3401
- if (W(n), e.length === 0) {
3402
- Me = !0, gt();
3410
+ if (Ne(n), e.length === 0) {
3411
+ U = !0, bt();
3412
+ return;
3413
+ }
3414
+ if (f.focusZoom === !1) {
3415
+ U = !0;
3403
3416
  return;
3404
3417
  }
3405
- let i = ce(k.value);
3418
+ let i = I(k.value);
3406
3419
  i.interrupt();
3407
- let a = Me;
3408
- Me = !0;
3409
- let [[o, s], [c, l]] = We.value.bounds({
3420
+ let a = U;
3421
+ U = !0;
3422
+ let [[o, s], [c, l]] = Je.value.bounds({
3410
3423
  type: "FeatureCollection",
3411
3424
  features: e.map((e) => e.feature)
3412
- }), u = (o + c) / 2, d = (s + l) / 2, p = f.focusZoomLevel, m = se.translate(q.value / 2 - p * u, Fe.value / 2 - p * d).scale(p), h = t[0]?.feature ?? null, g = () => {
3413
- if (!ie.value || !h) return;
3414
- let e = String(h.id), t = I.get(e);
3425
+ }), u = (o + c) / 2, d = (s + l) / 2, p = f.focusZoomLevel, m = se.translate(Ie.value / 2 - p * u, Le.value / 2 - p * d).scale(p), h = t[0]?.feature ?? null, g = () => {
3426
+ if (!re.value || !h) return;
3427
+ let e = String(h.id), t = fe.get(e);
3415
3428
  if (!t) return;
3416
3429
  let n = t.getBoundingClientRect();
3417
- lt(e, n.left + n.width / 2, n.top + n.height / 2);
3430
+ mt(e, n.left + n.width / 2, n.top + n.height / 2);
3418
3431
  };
3419
- a ? (dt(), i.transition().duration(vr).call(V.transform, m).on("end", g)) : (V.transform(i, m), g());
3432
+ a ? (gt(), i.transition().duration(yr).call(V.transform, m).on("end", g)) : (V.transform(i, m), g());
3420
3433
  }
3421
- function W(e) {
3422
- let t = j.value;
3434
+ function Ne(e) {
3435
+ let t = M.value;
3423
3436
  if (!t) return;
3424
3437
  let n = new Set(e.map((e) => e.key));
3425
- for (let [e, t] of pe) n.has(e) || (t.remove(), pe.delete(e));
3426
- let r = We.value, i = Ge.value + 1.5;
3438
+ for (let [e, t] of me) n.has(e) || (t.remove(), me.delete(e));
3439
+ let r = Je.value, i = J.value + 1.5;
3427
3440
  for (let { item: n, feature: a, key: o } of e) {
3428
- let e = pe.get(o);
3429
- e || (e = document.createElementNS(hr, "path"), e.setAttribute("d", r(a) ?? ""), e.setAttribute("fill", "none"), e.setAttribute("pointer-events", "none"), e.setAttribute("vector-effect", "non-scaling-stroke"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("class", "focus-overlay"), t.appendChild(e), pe.set(o, e)), e.setAttribute("stroke", n.stroke ?? "#fff"), e.setAttribute("stroke-width", String(i)), ft(e, n.style);
3441
+ let e = me.get(o);
3442
+ e || (e = document.createElementNS(gr, "path"), e.setAttribute("d", r(a) ?? ""), e.setAttribute("fill", "none"), e.setAttribute("pointer-events", "none"), e.setAttribute("vector-effect", "non-scaling-stroke"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("class", "focus-overlay"), t.appendChild(e), me.set(o, e)), e.setAttribute("stroke", n.stroke ?? "#fff"), e.setAttribute("stroke-width", String(i)), _t(e, n.style);
3430
3443
  }
3431
3444
  }
3432
- function Ne() {
3445
+ function G() {
3433
3446
  if (!k.value || !V) return;
3434
- Y.value.length > 0 && ee("update:focus", null);
3435
- let e = ce(k.value);
3436
- e.interrupt(), dt(), e.transition().duration(vr).call(V.transform, se);
3447
+ Z.value.length > 0 && ee("update:focus", null);
3448
+ let e = I(k.value);
3449
+ e.interrupt(), gt(), e.transition().duration(yr).call(V.transform, se);
3437
3450
  }
3438
3451
  E(() => f.focusZoomLevel, () => {
3439
- V && V.scaleExtent([1, Math.max(12, f.focusZoomLevel)]), U();
3452
+ V && V.scaleExtent([1, Math.max(12, f.focusZoomLevel)]), W();
3453
+ }), E(() => f.state, () => {
3454
+ if (!k.value || !V) return;
3455
+ let e = I(k.value);
3456
+ e.interrupt(), V.transform(e, se);
3440
3457
  });
3441
- let Pe = n(() => f.width && f.height ? f.height / f.width : .625), q = n(() => yr), Fe = n(() => yr * Pe.value), Ie = v(null), Le = null;
3442
- function ze() {
3443
- return Le ||= import("./hsaMapping-BahYDmea.js").then((e) => e.n).then((e) => (Ie.value = e, e)), Le;
3458
+ let Fe = n(() => f.width && f.height ? f.height / f.width : .625), Ie = n(() => br), Le = n(() => br * Fe.value), Re = n(() => {
3459
+ let e = S(f.topology), t = e?.objects?.states;
3460
+ if (!t) return [];
3461
+ let n = ce(e, t);
3462
+ return n.type === "FeatureCollection" ? n.features : [n];
3463
+ }), ze = n(() => {
3464
+ let e = f.state?.trim();
3465
+ if (!e) return null;
3466
+ if (/^\d{1,2}$/.test(e)) return e.padStart(2, "0");
3467
+ let t = Re.value.find((t) => t.properties?.name === e);
3468
+ return t?.id == null ? null : String(t.id).padStart(2, "0");
3469
+ }), Ve = n(() => {
3470
+ let e = ze.value;
3471
+ return e ? Re.value.find((t) => String(t.id).padStart(2, "0") === e) ?? null : null;
3472
+ });
3473
+ E(() => [f.state, ze.value], ([e, t]) => {
3474
+ e && e.trim() && !t && console.warn(`[ChoroplethMap] state="${e}" matched no state name or FIPS code; rendering the full map.`);
3475
+ }, { immediate: !0 });
3476
+ let He = v(null), Ue = null;
3477
+ function We() {
3478
+ return Ue ||= import("./hsaMapping-BahYDmea.js").then((e) => e.n).then((e) => (He.value = e, e)), Ue;
3444
3479
  }
3445
3480
  E(() => {
3446
3481
  if (f.geoType === "hsas" || f.dataGeoType === "hsas") return !0;
3447
3482
  let e = f.focus;
3448
3483
  return e ? (Array.isArray(e) ? e : [e]).some((e) => typeof e != "string" && e.geoType === "hsas") : !1;
3449
3484
  }, (e) => {
3450
- e && ze();
3485
+ e && We();
3451
3486
  }, { immediate: !0 });
3452
- let Be = n(() => {
3453
- let e = Ie.value;
3487
+ let Ge = n(() => {
3488
+ let e = He.value;
3454
3489
  if (!e) return {
3455
3490
  type: "FeatureCollection",
3456
3491
  features: []
3457
3492
  };
3458
- let { fipsToHsa: t, hsaNames: n } = e, r = S(f.topology), i = r.objects.counties.geometries, a = /* @__PURE__ */ new Map();
3493
+ let { fipsToHsa: t, hsaNames: n } = e, r = S(f.topology), i = r.objects.counties.geometries, a = ze.value, o = /* @__PURE__ */ new Map();
3459
3494
  for (let e of i) {
3460
- let n = t[String(e.id).padStart(5, "0")];
3461
- n && (a.has(n) || a.set(n, []), a.get(n).push(e));
3495
+ let n = String(e.id).padStart(5, "0");
3496
+ if (a && n.slice(0, 2) !== a) continue;
3497
+ let r = t[n];
3498
+ r && (o.has(r) || o.set(r, []), o.get(r).push(e));
3462
3499
  }
3463
- let o = [];
3464
- for (let [e, t] of a) o.push({
3500
+ let s = [];
3501
+ for (let [e, t] of o) s.push({
3465
3502
  type: "Feature",
3466
3503
  id: e,
3467
3504
  properties: { name: n[e] ?? e },
@@ -3469,45 +3506,60 @@ var zt = {
3469
3506
  });
3470
3507
  return {
3471
3508
  type: "FeatureCollection",
3472
- features: o
3509
+ features: s
3473
3510
  };
3474
- }), Ve = n(() => {
3475
- if (f.geoType === "hsas") return Be.value;
3511
+ }), Ke = n(() => {
3512
+ if (f.geoType === "hsas") return Ge.value;
3513
+ let e = ze.value;
3476
3514
  if (f.geoType === "counties") {
3477
- let e = S(f.topology);
3478
- return F(e, e.objects.counties);
3515
+ let t = S(f.topology), n = ce(t, t.objects.counties);
3516
+ return e ? {
3517
+ type: "FeatureCollection",
3518
+ features: n.features.filter((t) => String(t.id).padStart(5, "0").slice(0, 2) === e)
3519
+ } : n;
3479
3520
  }
3480
- let e = S(f.topology);
3481
- return F(e, e.objects.states);
3482
- }), He = n(() => {
3521
+ let t = S(f.topology), n = ce(t, t.objects.states);
3522
+ return e ? {
3523
+ type: "FeatureCollection",
3524
+ features: n.features.filter((t) => String(t.id).padStart(2, "0") === e)
3525
+ } : n;
3526
+ }), qe = n(() => {
3483
3527
  if (f.geoType !== "counties" && f.geoType !== "hsas") return null;
3528
+ if (ze.value) return Ve.value;
3484
3529
  let e = S(f.topology);
3485
3530
  return ue(e, e.objects.states, (e, t) => e !== t);
3486
- }), Ue = n(() => ae().fitExtent([[0, 0], [q.value, Fe.value]], Ve.value)), We = n(() => P(Ue.value)), Ge = n(() => f.geoType === "counties" || f.geoType === "hsas" ? f.strokeWidth * .5 : f.strokeWidth), Ke = n(() => {
3531
+ }), q = n(() => {
3532
+ let e = Ve.value;
3533
+ if (ze.value && e) {
3534
+ let t = [[xr, xr], [Ie.value - xr, Le.value - xr]], n = ie().fitExtent(t, e), r = ae(n).centroid(e);
3535
+ return Number.isFinite(r[0]) && Number.isFinite(r[1]) ? n : F().fitExtent(t, e);
3536
+ }
3537
+ return ie().fitExtent([[0, 0], [Ie.value, Le.value]], Ke.value);
3538
+ }), Je = n(() => ae(q.value)), J = n(() => f.geoType === "counties" || f.geoType === "hsas" ? f.strokeWidth * .5 : f.strokeWidth), Y = n(() => {
3487
3539
  let e = /* @__PURE__ */ new Map();
3488
- for (let [t, n] of X.value) {
3540
+ for (let [t, n] of Xe.value) {
3489
3541
  let r = /* @__PURE__ */ new Map();
3490
3542
  for (let [e, t] of n) t.properties?.name != null && r.set(t.properties.name, e);
3491
3543
  e.set(t, r);
3492
3544
  }
3493
3545
  return e;
3494
3546
  });
3495
- function J(e) {
3547
+ function Ye(e) {
3496
3548
  let t = f.dataGeoType;
3497
3549
  if (!t || t === f.geoType) return e;
3498
- if (f.geoType === "counties" && t === "hsas") return Ie.value?.fipsToHsa[e];
3550
+ if (f.geoType === "counties" && t === "hsas") return He.value?.fipsToHsa[e];
3499
3551
  if (f.geoType === "counties" && t === "states" || f.geoType === "hsas" && t === "states") return e.slice(0, 2);
3500
3552
  }
3501
- let qe = n(() => {
3553
+ let X = n(() => {
3502
3554
  let e = /* @__PURE__ */ new Map();
3503
- for (let t of Ve.value.features) t.id != null && e.set(String(t.id), t);
3555
+ for (let t of Ke.value.features) t.id != null && e.set(String(t.id), t);
3504
3556
  return e;
3505
- }), Y = n(() => {
3557
+ }), Z = n(() => {
3506
3558
  let e = f.focus;
3507
3559
  return e == null ? [] : (Array.isArray(e) ? e : [e]).map((e) => typeof e == "string" ? { id: e } : e);
3508
- }), X = n(() => {
3560
+ }), Xe = n(() => {
3509
3561
  let e = /* @__PURE__ */ new Map();
3510
- e.set(f.geoType, qe.value);
3562
+ e.set(f.geoType, X.value);
3511
3563
  let t = S(f.topology), n = t?.objects;
3512
3564
  if (!n) return e;
3513
3565
  let r = (e) => {
@@ -3516,25 +3568,25 @@ var zt = {
3516
3568
  return t;
3517
3569
  };
3518
3570
  if (!e.has("states") && n.states) {
3519
- let i = F(t, n.states);
3571
+ let i = ce(t, n.states);
3520
3572
  e.set("states", r(i.features));
3521
3573
  }
3522
3574
  if (!e.has("counties") && n.counties) {
3523
- let i = F(t, n.counties);
3575
+ let i = ce(t, n.counties);
3524
3576
  e.set("counties", r(i.features));
3525
3577
  }
3526
- return !e.has("hsas") && n.counties && e.set("hsas", r(Be.value.features)), e;
3527
- }), Je = n(() => {
3578
+ return !e.has("hsas") && n.counties && e.set("hsas", r(Ge.value.features)), e;
3579
+ }), Ze = n(() => {
3528
3580
  let e = /* @__PURE__ */ new Map();
3529
3581
  if (!f.data) return e;
3530
- let t = f.dataGeoType ?? f.geoType, n = Ke.value.get(t);
3582
+ let t = f.dataGeoType ?? f.geoType, n = Y.value.get(t);
3531
3583
  for (let t of f.data) {
3532
3584
  e.set(t.id, t.value);
3533
3585
  let r = n?.get(t.id);
3534
3586
  r && e.set(r, t.value);
3535
3587
  }
3536
3588
  return e;
3537
- }), Z = n(() => {
3589
+ }), Qe = n(() => {
3538
3590
  if (!f.data || f.data.length === 0) return {
3539
3591
  min: 0,
3540
3592
  max: 1
@@ -3551,8 +3603,8 @@ var zt = {
3551
3603
  min: 0,
3552
3604
  max: 1
3553
3605
  };
3554
- }), Q = n(() => Array.isArray(f.colorScale) && f.colorScale.length > 0 && "value" in f.colorScale[0]), Ye = n(() => Array.isArray(f.colorScale) && !Q.value), Xe = n(() => Ye.value ? "" : f.colorScale?.min ?? "#e5f0fa"), Ze = n(() => Ye.value ? "" : f.colorScale?.max ?? "#08519c");
3555
- function Qe(e) {
3606
+ }), $e = n(() => Array.isArray(f.colorScale) && f.colorScale.length > 0 && "value" in f.colorScale[0]), et = n(() => Array.isArray(f.colorScale) && !$e.value), tt = n(() => et.value ? "" : f.colorScale?.min ?? "#e5f0fa"), nt = n(() => et.value ? "" : f.colorScale?.max ?? "#08519c");
3607
+ function rt(e) {
3556
3608
  let t = e.replace("#", "");
3557
3609
  return [
3558
3610
  parseInt(t.slice(0, 2), 16),
@@ -3560,116 +3612,116 @@ var zt = {
3560
3612
  parseInt(t.slice(4, 6), 16)
3561
3613
  ];
3562
3614
  }
3563
- function $e(e) {
3564
- let [t, n, r] = Qe(Xe.value), [i, a, o] = Qe(Ze.value);
3615
+ function it(e) {
3616
+ let [t, n, r] = rt(tt.value), [i, a, o] = rt(nt.value);
3565
3617
  return `rgb(${Math.round(t + (i - t) * e)},${Math.round(n + (a - n) * e)},${Math.round(r + (o - r) * e)})`;
3566
3618
  }
3567
- let et = n(() => Ye.value ? f.colorScale.slice().sort((e, t) => t.min - e.min) : null), tt = n(() => {
3568
- if (!Q.value) return null;
3619
+ let at = n(() => et.value ? f.colorScale.slice().sort((e, t) => t.min - e.min) : null), ot = n(() => {
3620
+ if (!$e.value) return null;
3569
3621
  let e = /* @__PURE__ */ new Map();
3570
3622
  for (let t of f.colorScale) e.set(t.value, t.color);
3571
3623
  return e;
3572
3624
  });
3573
- function nt(e) {
3574
- let t = J(e);
3575
- return t == null ? void 0 : Je.value.get(t);
3625
+ function st(e) {
3626
+ let t = Ye(e);
3627
+ return t == null ? void 0 : Ze.value.get(t);
3576
3628
  }
3577
- function rt(e) {
3578
- let t = nt(e), n = f.noDataColor;
3629
+ function ct(e) {
3630
+ let t = st(e), n = f.noDataColor;
3579
3631
  if (t == null) return n;
3580
- let r = tt.value;
3632
+ let r = ot.value;
3581
3633
  if (r) return r.get(String(t)) ?? n;
3582
- let i = et.value;
3634
+ let i = at.value;
3583
3635
  if (i) {
3584
3636
  let e = t;
3585
3637
  for (let t of i) if (e >= t.min) return t.color;
3586
3638
  return n;
3587
3639
  }
3588
- let { min: a, max: o } = Z.value;
3589
- return $e((t - a) / (o - a));
3640
+ let { min: a, max: o } = Qe.value;
3641
+ return it((t - a) / (o - a));
3590
3642
  }
3591
- let it = (e) => e.properties?.name ?? String(e.id);
3592
- function at(e) {
3643
+ let lt = (e) => e.properties?.name ?? String(e.id);
3644
+ function ut(e) {
3593
3645
  return e == null ? "" : typeof e == "number" && f.tooltipValueFormat !== void 0 ? te(e, f.tooltipValueFormat) : String(e);
3594
3646
  }
3595
- function ot(e, t) {
3596
- return t == null ? e : `${e}: ${at(t)}`;
3647
+ function dt(e, t) {
3648
+ return t == null ? e : `${e}: ${ut(t)}`;
3597
3649
  }
3598
- function st() {
3599
- let e = M.value?.getEl();
3650
+ function ft() {
3651
+ let e = N.value?.getEl();
3600
3652
  if (!e) return;
3601
- ge?.disconnect();
3653
+ _e?.disconnect();
3602
3654
  let t = !1;
3603
- ge = new ResizeObserver((e) => {
3655
+ _e = new ResizeObserver((e) => {
3604
3656
  let n = e[0]?.contentRect;
3605
- n && (_e.width = n.width, _e.height = n.height, !t && ye && ve ? (t = !0, ct(ve.x, ve.y)) : t = !0);
3606
- }), ge.observe(e);
3657
+ n && (ve.width = n.width, ve.height = n.height, !t && be && ye ? (t = !0, pt(ye.x, ye.y)) : t = !0);
3658
+ }), _e.observe(e);
3607
3659
  }
3608
- function ct(e, t) {
3609
- let n = M.value?.getEl();
3660
+ function pt(e, t) {
3661
+ let n = N.value?.getEl();
3610
3662
  if (!n) return;
3611
- let r = O.value?.getBoundingClientRect(), { left: i, top: a } = Ae(e, t, _e.width, _e.height, f.tooltipClamp, r);
3663
+ let r = O.value?.getBoundingClientRect(), { left: i, top: a } = H(e, t, ve.width, ve.height, f.tooltipClamp, r);
3612
3664
  n.style.transform = `translate3d(${i}px, ${a}px, 0) translateY(-50%)`;
3613
3665
  }
3614
- function lt(e, t, n) {
3666
+ function mt(e, t, n) {
3615
3667
  let r = L.get(e);
3616
3668
  if (!r) return;
3617
- let i = M.value, a = i?.getEl();
3618
- !i || !a || (i.setData(r), ve = {
3669
+ let i = N.value, a = i?.getEl();
3670
+ !i || !a || (i.setData(r), ye = {
3619
3671
  x: t,
3620
3672
  y: n
3621
- }, ye = !0, ct(t, n), a.style.visibility = "visible");
3673
+ }, be = !0, pt(t, n), a.style.visibility = "visible");
3622
3674
  }
3623
- function ut(e, t) {
3624
- ye && (xe = e, Se = t, !Ce && (Ce = requestAnimationFrame(() => {
3625
- Ce = 0;
3626
- let e = M.value?.getEl();
3627
- !e || !ye || (ve = {
3628
- x: xe,
3629
- y: Se
3630
- }, e.style.transform = `translate3d(${xe + 16}px, ${Se}px, 0) translateY(-50%)`);
3675
+ function ht(e, t) {
3676
+ be && (Se = e, Ce = t, !we && (we = requestAnimationFrame(() => {
3677
+ we = 0;
3678
+ let e = N.value?.getEl();
3679
+ !e || !be || (ye = {
3680
+ x: Se,
3681
+ y: Ce
3682
+ }, e.style.transform = `translate3d(${Se + 16}px, ${Ce}px, 0) translateY(-50%)`);
3631
3683
  })));
3632
3684
  }
3633
- function dt() {
3634
- if (!ye) return;
3635
- ye = !1, ve = null;
3636
- let e = M.value?.getEl();
3685
+ function gt() {
3686
+ if (!be) return;
3687
+ be = !1, ye = null;
3688
+ let e = N.value?.getEl();
3637
3689
  e && (e.style.visibility = "hidden");
3638
3690
  }
3639
- function ft(e, t) {
3691
+ function _t(e, t) {
3640
3692
  t === "dashed" ? (e.setAttribute("stroke-dasharray", "8 4"), e.removeAttribute("stroke-linecap")) : t === "dotted" ? (e.setAttribute("stroke-dasharray", "0 5"), e.setAttribute("stroke-linecap", "round")) : (e.removeAttribute("stroke-dasharray"), e.removeAttribute("stroke-linecap"));
3641
3693
  }
3642
- function pt(e, t = "solid") {
3643
- e.parentNode?.appendChild(e), e.setAttribute("stroke-width", String(Ge.value + 1)), e.setAttribute("stroke", "#555"), ft(e, t);
3694
+ function vt(e, t = "solid") {
3695
+ e.parentNode?.appendChild(e), e.setAttribute("stroke-width", String(J.value + 1)), e.setAttribute("stroke", "#555"), _t(e, t);
3644
3696
  }
3645
- function mt(e) {
3646
- e.setAttribute("stroke-width", String(Ge.value)), e.setAttribute("stroke", f.strokeColor), e.removeAttribute("stroke-dasharray"), e.removeAttribute("stroke-linecap");
3697
+ function Q(e) {
3698
+ e.setAttribute("stroke-width", String(J.value)), e.setAttribute("stroke", f.strokeColor), e.removeAttribute("stroke-dasharray"), e.removeAttribute("stroke-linecap");
3647
3699
  }
3648
- function ht(e) {
3649
- z !== e && (z && !B.has(z) && mt(z), z = e, pt(e, B.get(e) ?? "solid"));
3700
+ function yt(e) {
3701
+ z !== e && (z && !B.has(z) && Q(z), z = e, vt(e, B.get(e) ?? "solid"));
3650
3702
  }
3651
- function gt() {
3703
+ function bt() {
3652
3704
  if (z) {
3653
3705
  let e = B.get(z);
3654
- e == null ? mt(z) : pt(z, e), z = null, ee("stateHover", null);
3706
+ e == null ? Q(z) : vt(z, e), z = null, ee("stateHover", null);
3655
3707
  }
3656
- dt();
3708
+ gt();
3657
3709
  }
3658
- function _t(e) {
3710
+ function xt(e) {
3659
3711
  let t = e;
3660
3712
  for (; t && !t.dataset?.featId;) t = t.parentElement;
3661
3713
  return t ? t.dataset.featId ?? null : null;
3662
3714
  }
3663
- function vt(e) {
3715
+ function St(e) {
3664
3716
  ee("stateClick", {
3665
3717
  id: e.id,
3666
3718
  name: e.name,
3667
3719
  value: e.value
3668
- }), ee("update:focus", je(Y.value).has(e.id) ? null : e.id);
3720
+ }), ee("update:focus", Me(Z.value).has(e.id) ? null : e.id);
3669
3721
  }
3670
- function yt(e) {
3671
- if (me) return;
3672
- let t = e, n = _t(t.target);
3722
+ function Ct(e) {
3723
+ if (he) return;
3724
+ let t = e, n = xt(t.target);
3673
3725
  if (!n) return;
3674
3726
  let r = L.get(n);
3675
3727
  if (!r) return;
@@ -3678,231 +3730,236 @@ var zt = {
3678
3730
  name: r.name,
3679
3731
  value: r.value
3680
3732
  };
3681
- e.type === "click" ? vt(r) : e.type === "mouseover" && (ht(I.get(n)), ie.value && lt(n, t.clientX, t.clientY), ee("stateHover", i));
3733
+ e.type === "click" ? St(r) : e.type === "mouseover" && (yt(fe.get(n)), re.value && mt(n, t.clientX, t.clientY), ee("stateHover", i));
3682
3734
  }
3683
- function bt(e) {
3684
- me || ut(e.clientX, e.clientY);
3735
+ function wt(e) {
3736
+ he || ht(e.clientX, e.clientY);
3685
3737
  }
3686
- function xt(e) {
3738
+ function Tt(e) {
3687
3739
  let t = e.relatedTarget;
3688
- t && ne.value?.contains(t) || gt();
3740
+ t && A.value?.contains(t) || bt();
3689
3741
  }
3690
- function St(e) {
3742
+ function Et(e) {
3691
3743
  if (e.touches.length !== 1) {
3692
- we = null;
3744
+ Te = null;
3693
3745
  return;
3694
3746
  }
3695
3747
  let t = e.touches[0];
3696
- we = {
3748
+ Te = {
3697
3749
  x: t.clientX,
3698
3750
  y: t.clientY,
3699
3751
  time: e.timeStamp,
3700
- featId: _t(e.target)
3752
+ featId: xt(e.target)
3701
3753
  };
3702
3754
  }
3703
- function Ct(e) {
3704
- let t = we;
3705
- if (we = null, !t || !t.featId || e.touches.length > 0) return;
3755
+ function Dt(e) {
3756
+ let t = Te;
3757
+ if (Te = null, !t || !t.featId || e.touches.length > 0) return;
3706
3758
  let n = e.changedTouches[0];
3707
- if (!n || Math.abs(n.clientX - t.x) > gr || Math.abs(n.clientY - t.y) > gr || e.timeStamp - t.time > _r) return;
3759
+ if (!n || Math.abs(n.clientX - t.x) > _r || Math.abs(n.clientY - t.y) > _r || e.timeStamp - t.time > vr) return;
3708
3760
  let r = L.get(t.featId);
3709
- r && (e.preventDefault(), vt(r));
3761
+ r && (e.preventDefault(), St(r));
3710
3762
  }
3711
- function wt() {
3712
- we = null;
3763
+ function Ot() {
3764
+ Te = null;
3713
3765
  }
3714
- function Tt(e) {
3715
- let t = document.createElementNS(hr, "path");
3766
+ function kt(e) {
3767
+ let t = document.createElementNS(gr, "path");
3716
3768
  return e && t.setAttribute("d", e), t;
3717
3769
  }
3718
- function Et() {
3719
- let e = A.value, t = j.value;
3770
+ function At() {
3771
+ let e = j.value, t = M.value;
3720
3772
  if (!e || !t) return;
3721
3773
  for (; e.firstChild;) e.removeChild(e.firstChild);
3722
3774
  for (; t.firstChild;) t.removeChild(t.firstChild);
3723
- I.clear(), L.clear(), R = null, z = null, B.clear(), pe.clear();
3724
- let n = We.value, r = Ve.value.features, i = f.strokeColor, a = String(Ge.value), o = !ie.value, s = document.createDocumentFragment();
3775
+ fe.clear(), L.clear(), R = null, z = null, B.clear(), me.clear();
3776
+ let n = Je.value, r = Ke.value.features, i = f.strokeColor, a = String(J.value), o = !re.value, s = document.createDocumentFragment();
3725
3777
  for (let e of r) {
3726
- let t = String(e.id), r = it(e), c = nt(t), l = Tt(n(e));
3727
- if (l.setAttribute("class", "state-path"), l.setAttribute("data-feat-id", t), l.setAttribute("fill", rt(t)), l.setAttribute("stroke", i), l.setAttribute("stroke-width", a), l.setAttribute("vector-effect", "non-scaling-stroke"), o) {
3728
- let e = document.createElementNS(hr, "title");
3729
- e.textContent = ot(r, c), l.appendChild(e);
3778
+ let t = String(e.id), r = lt(e), c = st(t), l = kt(n(e));
3779
+ if (l.setAttribute("class", "state-path"), l.setAttribute("data-feat-id", t), l.setAttribute("fill", ct(t)), l.setAttribute("stroke", i), l.setAttribute("stroke-width", a), l.setAttribute("vector-effect", "non-scaling-stroke"), o) {
3780
+ let e = document.createElementNS(gr, "title");
3781
+ e.textContent = dt(r, c), l.appendChild(e);
3730
3782
  }
3731
- s.appendChild(l), I.set(t, l), L.set(t, {
3783
+ s.appendChild(l), fe.set(t, l), L.set(t, {
3732
3784
  id: t,
3733
3785
  name: r,
3734
3786
  value: c,
3735
3787
  feature: e
3736
3788
  });
3737
3789
  }
3738
- let c = He.value;
3790
+ let c = qe.value;
3739
3791
  if (c) {
3740
- let e = Tt(n(c));
3792
+ let e = kt(n(c));
3741
3793
  e.setAttribute("fill", "none"), e.setAttribute("stroke", i), e.setAttribute("stroke-width", "1"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("pointer-events", "none"), e.setAttribute("vector-effect", "non-scaling-stroke"), s.appendChild(e), R = e;
3742
3794
  }
3743
3795
  e.appendChild(s);
3744
3796
  }
3745
- function Dt() {
3746
- let e = !ie.value;
3747
- for (let [t, n] of I) {
3748
- let r = nt(t), i = L.get(t);
3749
- if (n.setAttribute("fill", rt(t)), i && (i.value = r), e && i) {
3797
+ function jt() {
3798
+ let e = !re.value;
3799
+ for (let [t, n] of fe) {
3800
+ let r = st(t), i = L.get(t);
3801
+ if (n.setAttribute("fill", ct(t)), i && (i.value = r), e && i) {
3750
3802
  let e = n.firstElementChild;
3751
- e && (e.textContent = ot(i.name, r));
3803
+ e && (e.textContent = dt(i.name, r));
3752
3804
  }
3753
3805
  }
3754
3806
  }
3755
- function Ot() {
3756
- for (let e of I.values()) e === z || B.has(e) || mt(e);
3807
+ function Mt() {
3808
+ for (let e of fe.values()) e === z || B.has(e) || Q(e);
3757
3809
  R && R.setAttribute("stroke", f.strokeColor);
3758
3810
  }
3759
- function kt() {
3811
+ function Nt() {
3760
3812
  return typeof f.menu == "string" ? f.menu : "choropleth";
3761
3813
  }
3762
- let At = n(() => f.legend && (Q.value || Ye.value || f.data)), jt = n(() => f.colorScale.slice().sort((e, t) => e.min - t.min)), Mt = n(() => {
3814
+ let Pt = n(() => f.legend && ($e.value || et.value || f.data)), Ft = n(() => f.colorScale.slice().sort((e, t) => e.min - t.min)), $ = n(() => {
3763
3815
  let e = [];
3764
3816
  for (let t = 0; t <= 10; t++) {
3765
3817
  let n = t / 10;
3766
3818
  e.push({
3767
3819
  offset: `${(n * 100).toFixed(0)}%`,
3768
- color: $e(n)
3820
+ color: it(n)
3769
3821
  });
3770
3822
  }
3771
3823
  return e;
3772
- }), Nt = new Intl.NumberFormat("en-US", {
3824
+ }), It = new Intl.NumberFormat("en-US", {
3773
3825
  notation: "compact",
3774
3826
  maximumFractionDigits: 1
3775
- }), Pt = n(() => {
3776
- let { min: e, max: t } = Z.value, n = t - e, r = [];
3827
+ }), Lt = n(() => {
3828
+ let { min: e, max: t } = Qe.value, n = t - e, r = [];
3777
3829
  for (let t = 1; t <= 3; t++) {
3778
- let i = t / 4, a = e + n * i, o = Math.abs(a) >= 1e3 ? Nt.format(a) : Number.isInteger(a) ? String(a) : a.toFixed(1).replace(/\.0$/, "");
3830
+ let i = t / 4, a = e + n * i, o = Math.abs(a) >= 1e3 ? It.format(a) : Number.isInteger(a) ? String(a) : a.toFixed(1).replace(/\.0$/, "");
3779
3831
  r.push({
3780
3832
  value: o,
3781
3833
  pct: i * 100
3782
3834
  });
3783
3835
  }
3784
3836
  return r;
3785
- }), $ = n(() => {
3837
+ }), Rt = n(() => {
3786
3838
  let e = [];
3787
- if (Q.value) for (let t of f.colorScale) e.push({
3839
+ if ($e.value) for (let t of f.colorScale) e.push({
3788
3840
  key: t.value,
3789
3841
  color: t.color,
3790
3842
  label: t.value
3791
3843
  });
3792
- else if (Ye.value) for (let t of jt.value) e.push({
3844
+ else if (et.value) for (let t of Ft.value) e.push({
3793
3845
  key: String(t.min),
3794
3846
  color: t.color,
3795
3847
  label: t.label ?? String(t.min)
3796
3848
  });
3797
3849
  return e;
3798
- }), Ft = n(() => `linear-gradient(to right, ${Mt.value.map((e) => `${e.color} ${e.offset}`).join(", ")})`), It = Re({ target: () => f.fullscreenTarget }), Lt = n(() => {
3799
- let e = kt();
3850
+ }), zt = n(() => `linear-gradient(to right, ${$.value.map((e) => `${e.color} ${e.offset}`).join(", ")})`), Bt = Be({ target: () => f.fullscreenTarget }), Vt = n(() => {
3851
+ let e = Nt();
3800
3852
  return [
3801
- It.menuItem.value,
3853
+ Bt.menuItem.value,
3802
3854
  {
3803
3855
  label: "Save as SVG",
3804
3856
  action: () => {
3805
- k.value && G(k.value, e);
3857
+ k.value && K(k.value, e);
3806
3858
  }
3807
3859
  },
3808
3860
  {
3809
3861
  label: "Save as PNG",
3810
3862
  action: () => {
3811
- k.value && K(k.value, e);
3863
+ k.value && Pe(k.value, e);
3812
3864
  }
3813
3865
  }
3814
3866
  ];
3815
3867
  });
3816
- return E(() => [We.value, ie.value], () => Et()), E(() => [
3868
+ return E(() => [
3869
+ Ke.value,
3817
3870
  Je.value,
3871
+ re.value
3872
+ ], () => At()), E(() => [
3873
+ Ze.value,
3818
3874
  f.colorScale,
3819
3875
  f.noDataColor,
3820
3876
  f.dataGeoType
3821
- ], () => Dt()), E(() => [f.strokeColor, Ge.value], () => Ot()), E(() => [
3822
- Y.value,
3823
- We.value,
3824
- Ie.value
3825
- ], () => U(), { flush: "post" }), (n, l) => (_(), r(t, {
3826
- to: C(It).teleportTarget.value,
3827
- disabled: !C(It).isFullscreen.value
3877
+ ], () => jt()), E(() => [f.strokeColor, J.value], () => Mt()), E(() => [
3878
+ Z.value,
3879
+ Je.value,
3880
+ He.value
3881
+ ], () => W(), { flush: "post" }), (n, l) => (_(), r(t, {
3882
+ to: C(Bt).teleportTarget.value,
3883
+ disabled: !C(Bt).isFullscreen.value
3828
3884
  }, [o("div", d({
3829
3885
  ref_key: "containerRef",
3830
3886
  ref: O
3831
3887
  }, n.$attrs, {
3832
3888
  class: ["choropleth-wrapper", {
3833
3889
  pannable: c.pan,
3834
- "is-fullscreen": C(It).isFullscreen.value
3890
+ "is-fullscreen": C(Bt).isFullscreen.value
3835
3891
  }],
3836
- style: C(It).fullscreenStyle.value
3892
+ style: C(Bt).fullscreenStyle.value
3837
3893
  }), [
3838
- c.menu ? (_(), r(fe, {
3894
+ c.menu ? (_(), r(pe, {
3839
3895
  key: 0,
3840
- items: Lt.value,
3841
- "is-fullscreen": C(It).isFullscreen.value,
3842
- onClose: C(It).exit
3896
+ items: Vt.value,
3897
+ "is-fullscreen": C(Bt).isFullscreen.value,
3898
+ onClose: C(Bt).exit
3843
3899
  }, null, 8, [
3844
3900
  "items",
3845
3901
  "is-fullscreen",
3846
3902
  "onClose"
3847
3903
  ])) : i("", !0),
3848
- o("div", cr, x(C(It).isFullscreen.value ? "Map expanded to fill window" : ""), 1),
3849
- c.title || At.value ? (_(), a("div", lr, [c.title ? (_(), a("div", {
3904
+ o("div", lr, x(C(Bt).isFullscreen.value ? "Map expanded to fill window" : ""), 1),
3905
+ c.title || Pt.value ? (_(), a("div", ur, [c.title ? (_(), a("div", {
3850
3906
  key: 0,
3851
3907
  class: "choropleth-title",
3852
3908
  style: m(de.value)
3853
- }, x(c.title), 5)) : i("", !0), At.value ? (_(), a("div", {
3909
+ }, x(c.title), 5)) : i("", !0), Pt.value ? (_(), a("div", {
3854
3910
  key: 1,
3855
3911
  class: "choropleth-legend",
3856
- style: m(N.value)
3857
- }, [c.legendTitle ? (_(), a("span", ur, x(c.legendTitle), 1)) : i("", !0), Q.value || Ye.value ? (_(!0), a(e, { key: 1 }, y($.value, (e) => (_(), a("span", {
3912
+ style: m(P.value)
3913
+ }, [c.legendTitle ? (_(), a("span", dr, x(c.legendTitle), 1)) : i("", !0), $e.value || et.value ? (_(!0), a(e, { key: 1 }, y(Rt.value, (e) => (_(), a("span", {
3858
3914
  key: e.key,
3859
3915
  class: "choropleth-legend-item"
3860
3916
  }, [o("span", {
3861
3917
  class: "choropleth-legend-swatch",
3862
3918
  style: m({ background: e.color })
3863
- }, null, 4), s(" " + x(e.label), 1)]))), 128)) : (_(), a("div", dr, [o("div", {
3919
+ }, null, 4), s(" " + x(e.label), 1)]))), 128)) : (_(), a("div", fr, [o("div", {
3864
3920
  class: "choropleth-legend-gradient",
3865
- style: m({ background: Ft.value })
3866
- }, null, 4), o("div", fr, [(_(!0), a(e, null, y(Pt.value, (e) => (_(), a("span", {
3921
+ style: m({ background: zt.value })
3922
+ }, null, 4), o("div", pr, [(_(!0), a(e, null, y(Lt.value, (e) => (_(), a("span", {
3867
3923
  key: e.value,
3868
3924
  style: m({ left: e.pct + "%" })
3869
3925
  }, x(e.value), 5))), 128))])]))], 4)) : i("", !0)])) : i("", !0),
3870
3926
  (_(), a("svg", {
3871
3927
  ref_key: "svgRef",
3872
3928
  ref: k,
3873
- viewBox: `0 0 ${q.value} ${Fe.value}`,
3874
- preserveAspectRatio: "xMidYMid meet"
3929
+ viewBox: `0 0 ${Ie.value} ${Le.value}`,
3930
+ preserveAspectRatio: "xMidYMid meet",
3931
+ style: m(c.twoFingerPan ? { touchAction: "pan-y" } : void 0)
3875
3932
  }, [o("g", {
3876
3933
  ref_key: "mapGroupRef",
3877
- ref: ne
3934
+ ref: A
3878
3935
  }, [o("g", {
3879
3936
  ref_key: "baseGroupRef",
3880
- ref: A
3937
+ ref: j
3881
3938
  }, null, 512), o("g", {
3882
3939
  ref_key: "overlayGroupRef",
3883
- ref: j
3884
- }, null, 512)], 512)], 8, pr)),
3885
- be.value ? (_(), a("button", {
3940
+ ref: M
3941
+ }, null, 512)], 512)], 12, mr)),
3942
+ xe.value ? (_(), a("button", {
3886
3943
  key: 2,
3887
3944
  type: "button",
3888
3945
  class: "choropleth-reset",
3889
3946
  "aria-label": "Reset zoom",
3890
- onClick: Ne
3947
+ onClick: G
3891
3948
  }, " Reset ")) : i("", !0),
3892
- ie.value ? (_(), r(sr, {
3949
+ re.value ? (_(), r(cr, {
3893
3950
  key: 3,
3894
3951
  ref_key: "tooltipChildRef",
3895
- ref: M
3952
+ ref: N
3896
3953
  }, {
3897
3954
  default: D((t) => [b(n.$slots, "tooltip", p(u(T(t))), () => [c.tooltipFormat ? (_(), a("span", {
3898
3955
  key: 0,
3899
3956
  innerHTML: c.tooltipFormat(t)
3900
- }, null, 8, mr)) : t.value == null ? (_(), a(e, { key: 1 }, [s(x(t.name), 1)], 64)) : (_(), a(e, { key: 2 }, [s(x(t.name) + ": " + x(at(t.value)), 1)], 64))], !0)]),
3957
+ }, null, 8, hr)) : t.value == null ? (_(), a(e, { key: 1 }, [s(x(t.name), 1)], 64)) : (_(), a(e, { key: 2 }, [s(x(t.name) + ": " + x(ut(t.value)), 1)], 64))], !0)]),
3901
3958
  _: 3
3902
3959
  }, 512)) : i("", !0)
3903
3960
  ], 16)], 8, ["to", "disabled"]));
3904
3961
  }
3905
- }), [["__scopeId", "data-v-96a5f36e"]]), xr = /* @__PURE__ */ L(/* @__PURE__ */ l({
3962
+ }), [["__scopeId", "data-v-63f25207"]]), Cr = /* @__PURE__ */ L(/* @__PURE__ */ l({
3906
3963
  __name: "ChartTooltip",
3907
3964
  props: {
3908
3965
  x: {},
@@ -3922,11 +3979,11 @@ var zt = {
3922
3979
  top: `${e.y}px`,
3923
3980
  transform: "translateY(-50%)"
3924
3981
  })
3925
- }, [b(t.$slots, "default", {}, void 0, !0)], 4)) : e.mode === "click" ? (_(), r(C(N), {
3982
+ }, [b(t.$slots, "default", {}, void 0, !0)], 4)) : e.mode === "click" ? (_(), r(C(P), {
3926
3983
  key: 1,
3927
3984
  open: e.open
3928
3985
  }, {
3929
- default: D(() => [c(C(M), { "as-child": "" }, {
3986
+ default: D(() => [c(C(N), { "as-child": "" }, {
3930
3987
  default: D(() => [o("div", {
3931
3988
  class: "chart-tooltip-anchor",
3932
3989
  style: m({
@@ -3935,8 +3992,8 @@ var zt = {
3935
3992
  })
3936
3993
  }, null, 4)]),
3937
3994
  _: 1
3938
- }), c(C(ie), null, {
3939
- default: D(() => [e.open ? (_(), r(C(re), {
3995
+ }), c(C(re), null, {
3996
+ default: D(() => [e.open ? (_(), r(C(ne), {
3940
3997
  key: 0,
3941
3998
  class: "chart-tooltip-content",
3942
3999
  side: "right",
@@ -3953,7 +4010,7 @@ var zt = {
3953
4010
  _: 3
3954
4011
  }, 8, ["open"])) : i("", !0);
3955
4012
  }
3956
- }), [["__scopeId", "data-v-44377f70"]]), Sr = { class: "TableWrapper" }, Cr = ["href", "download"], wr = /* @__PURE__ */ L(/* @__PURE__ */ l({
4013
+ }), [["__scopeId", "data-v-44377f70"]]), wr = { class: "TableWrapper" }, Tr = ["href", "download"], Er = /* @__PURE__ */ L(/* @__PURE__ */ l({
3957
4014
  __name: "DataTable",
3958
4015
  props: {
3959
4016
  data: {},
@@ -4058,7 +4115,7 @@ var zt = {
4058
4115
  return n.join("\n");
4059
4116
  }
4060
4117
  function E() {
4061
- Pe(T(), C());
4118
+ Fe(T(), C());
4062
4119
  }
4063
4120
  let D = n(() => c.downloadButton || c.downloadLink ? [] : [{
4064
4121
  label: c.downloadMenuLink,
@@ -4067,17 +4124,17 @@ var zt = {
4067
4124
  if (c.downloadButton) return null;
4068
4125
  let e = c.downloadLink;
4069
4126
  return e ? typeof e == "string" ? e : "Download data (CSV)" : null;
4070
- }), k = n(() => O.value ? `data:text/csv;charset=utf-8,${encodeURIComponent(T())}` : null), ne = n(() => !!c.menu && D.value.length > 0);
4127
+ }), k = n(() => O.value ? `data:text/csv;charset=utf-8,${encodeURIComponent(T())}` : null), A = n(() => !!c.menu && D.value.length > 0);
4071
4128
  return (n, s) => (_(), a("div", { class: f(["TableOuter", {
4072
4129
  "full-width": t.fullWidth,
4073
- "has-menu": ne.value
4130
+ "has-menu": A.value
4074
4131
  }]) }, [
4075
- ne.value ? (_(), r(fe, {
4132
+ A.value ? (_(), r(pe, {
4076
4133
  key: 0,
4077
4134
  items: D.value,
4078
4135
  "force-dropdown": ""
4079
4136
  }, null, 8, ["items"])) : i("", !0),
4080
- o("div", Sr, [o("table", { class: f(["Table", { "full-width": t.fullWidth }]) }, [
4137
+ o("div", wr, [o("table", { class: f(["Table", { "full-width": t.fullWidth }]) }, [
4081
4138
  o("colgroup", null, [(_(!0), a(e, null, y(b.value, (e) => (_(), a("col", {
4082
4139
  key: e.name,
4083
4140
  style: m(u(e.name))
@@ -4103,9 +4160,9 @@ var zt = {
4103
4160
  class: "data-table-download-link",
4104
4161
  href: k.value,
4105
4162
  download: `${C()}.csv`
4106
- }, x(O.value), 9, Cr)) : i("", !0)
4163
+ }, x(O.value), 9, Tr)) : i("", !0)
4107
4164
  ], 2));
4108
4165
  }
4109
4166
  }), [["__scopeId", "data-v-21721f41"]]);
4110
4167
  //#endregion
4111
- export { ar as BarChart, xr as ChartTooltip, br as ChoroplethMap, wr as DataTable, Tn as LineChart };
4168
+ export { or as BarChart, Cr as ChartTooltip, Sr as ChoroplethMap, Er as DataTable, En as LineChart };