@cfasim-ui/charts 0.7.0 → 0.7.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
@@ -7,7 +7,7 @@ import { select as F } from "d3-selection";
7
7
  import "d3-transition";
8
8
  import { feature as de, merge as fe, mesh as pe } from "topojson-client";
9
9
  //#region src/ChartMenu/ChartMenu.vue?vue&type=script&setup=true&lang.ts
10
- var me = ["aria-label"], he = /* @__PURE__ */ l({
10
+ var I = ["aria-label"], me = /* @__PURE__ */ l({
11
11
  __name: "ChartMenu",
12
12
  props: {
13
13
  items: {},
@@ -104,44 +104,44 @@ var me = ["aria-label"], he = /* @__PURE__ */ l({
104
104
  "stroke-linecap": "round",
105
105
  "stroke-linejoin": "round",
106
106
  "aria-hidden": "true"
107
- }, [o("path", { d: "M7 1v8M3 6l4 4 4-4M2 13h10" })], -1)]], 8, me))], 2));
107
+ }, [o("path", { d: "M7 1v8M3 6l4 4 4-4M2 13h10" })], -1)]], 8, I))], 2));
108
108
  }
109
- }), I = (e, t) => {
109
+ }), L = (e, t) => {
110
110
  let n = e.__vccOpts || e;
111
111
  for (let [e, r] of t) n[e] = r;
112
112
  return n;
113
- }, ge = /* @__PURE__ */ I(he, [["__scopeId", "data-v-f5743494"]]);
113
+ }, he = /* @__PURE__ */ L(me, [["__scopeId", "data-v-f5743494"]]);
114
114
  //#endregion
115
115
  //#region src/_shared/axes.ts
116
- function L(e) {
116
+ function R(e) {
117
117
  return Math.round(e) + .5;
118
118
  }
119
- function _e(e, t) {
119
+ function ge(e, t) {
120
120
  let n = e / t, r = 10 ** Math.floor(Math.log10(n)), i = n / r, a;
121
121
  return a = i <= 1.5 ? 1 : i <= 3 ? 2 : i <= 7 ? 5 : 10, a * r;
122
122
  }
123
- function ve(e, t, n) {
123
+ function _e(e, t, n) {
124
124
  if (!(n > 0) || !isFinite(n)) return [];
125
125
  let r = [], i = Math.ceil(e / n) * 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 R = new Intl.NumberFormat();
130
- function z(e) {
131
- return Math.abs(e) >= 1e3 ? R.format(e) : Number.isInteger(e) ? e.toString() : e.toFixed(1);
129
+ var z = new Intl.NumberFormat();
130
+ function B(e) {
131
+ return Math.abs(e) >= 1e3 ? z.format(e) : Number.isInteger(e) ? e.toString() : e.toFixed(1);
132
132
  }
133
133
  //#endregion
134
134
  //#region src/_shared/computeTicks.ts
135
- function ye(e) {
135
+ function ve(e) {
136
136
  let { min: t, max: n, ticks: r } = e;
137
137
  if (t === n) return [];
138
138
  let i = e.displayOffset ?? 0;
139
139
  if (Array.isArray(r)) return r.map((e) => e - i).filter((e) => e >= t && e <= n);
140
- if (typeof r == "number") return ve(t + i, n + i, r).map((e) => e - i);
141
- let a = Math.max(3, Math.floor(e.targetTickCount ?? 3)), o = _e(n - t, a);
142
- return ve(t + i, n + i, o).map((e) => e - i);
140
+ if (typeof r == "number") return _e(t + i, n + i, r).map((e) => e - i);
141
+ let a = Math.max(3, Math.floor(e.targetTickCount ?? 3)), o = ge(n - t, a);
142
+ return _e(t + i, n + i, o).map((e) => e - i);
143
143
  }
144
- function be(e, t, n, r) {
144
+ function ye(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 be(e, t, n, r) {
149
149
  let i = n - t || 1;
150
150
  return (e - t) / i;
151
151
  }
152
- function xe(e, t, n, r) {
152
+ function be(e, t, n, r) {
153
153
  if (n !== "log") return {
154
154
  min: e,
155
155
  max: t
@@ -160,7 +160,7 @@ function xe(e, t, n, r) {
160
160
  max: t > 0 ? Math.max(t, i) : i
161
161
  };
162
162
  }
163
- function Se(e) {
163
+ function xe(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 Se(e) {
173
173
  }
174
174
  //#endregion
175
175
  //#region src/_shared/useChartSize.ts
176
- function Ce(e = {}) {
176
+ function Se(e = {}) {
177
177
  let t = v(null), n = v(0), r = v(0), i = null, a = null;
178
178
  return g(() => {
179
179
  t.value && (n.value = t.value.clientWidth, r.value = t.value.clientHeight, i = new ResizeObserver((t) => {
@@ -192,8 +192,8 @@ function Ce(e = {}) {
192
192
  measuredHeight: r
193
193
  };
194
194
  }
195
- var we = .6, B = 8;
196
- function Te(e, t) {
195
+ var Ce = .6, V = 8;
196
+ function we(e, t) {
197
197
  return {
198
198
  fontSize: e?.fontSize ?? t.fontSize,
199
199
  fill: e?.color ?? "currentColor",
@@ -201,8 +201,8 @@ function Te(e, t) {
201
201
  fillOpacity: e?.color == null ? t.fillOpacity : void 0
202
202
  };
203
203
  }
204
- var Ee = 7, De = 18, Oe = 16;
205
- function ke(e) {
204
+ var Te = 7, Ee = 18, De = 16;
205
+ function Oe(e) {
206
206
  return e == null ? {
207
207
  top: 0,
208
208
  right: 0,
@@ -220,12 +220,12 @@ function ke(e) {
220
220
  left: e.left ?? 0
221
221
  };
222
222
  }
223
- function V(e) {
224
- return De + e.length * Ee;
223
+ function ke(e) {
224
+ return Ee + e.length * Te;
225
225
  }
226
226
  function Ae(e) {
227
227
  let t = n(() => {
228
- let t = ke(e.extraPadding?.());
228
+ let t = Oe(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 Ae(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 = V(e);
241
+ let t = ke(e);
242
242
  o > 0 && o + t > n && (a++, o = 0), i.push({
243
243
  x: o,
244
244
  row: a
245
- }), o += t + Oe;
245
+ }), o += t + De;
246
246
  }
247
247
  return {
248
248
  positions: i,
@@ -252,9 +252,9 @@ function Ae(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 + B;
255
+ return t.split("\n").length * n + V;
256
256
  }), o = n(() => {
257
- let n = ke(e.extraPadding?.()), r = i.value.rowCount;
257
+ let n = Oe(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,
@@ -395,105 +395,145 @@ function Ne(e) {
395
395
  }
396
396
  //#endregion
397
397
  //#region src/ChartMenu/download.ts
398
- function Pe(e, t) {
398
+ function U(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 U = [
402
+ var W = [
403
403
  "color",
404
404
  "font-family",
405
405
  "font-size",
406
406
  "font-weight"
407
- ], W = ["fill", "stroke"];
408
- function Fe(e) {
407
+ ], G = ["fill", "stroke"];
408
+ function Pe(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 G(e) {
414
+ function K(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 U) {
418
+ for (let e of W) {
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 W) {
424
+ for (let e of t.querySelectorAll("*")) for (let t of G) {
425
425
  let n = e.getAttribute(t);
426
- !n || !n.includes("var(") || e.setAttribute(t, Fe(n));
426
+ !n || !n.includes("var(") || e.setAttribute(t, Pe(n));
427
427
  }
428
428
  return t;
429
429
  }
430
- function K(e, t) {
431
- let n = G(e), r = new XMLSerializer().serializeToString(n);
432
- Pe(new Blob([r], { type: "image/svg+xml" }), `${t}.svg`);
430
+ function q(e, t) {
431
+ let n = K(e), r = new XMLSerializer().serializeToString(n);
432
+ U(new Blob([r], { type: "image/svg+xml" }), `${t}.svg`);
433
433
  }
434
- function Ie(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;
434
+ function Fe(e, t) {
435
+ let n = K(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 && Pe(e, `${t}.png`);
441
+ e && U(e, `${t}.png`);
442
442
  }), URL.revokeObjectURL(a);
443
443
  }, o.src = a;
444
444
  }
445
- function Le(e, t) {
446
- Pe(new Blob([e], { type: "text/csv" }), `${t}.csv`);
445
+ function Ie(e, t) {
446
+ U(new Blob([e], { type: "text/csv" }), `${t}.csv`);
447
+ }
448
+ //#endregion
449
+ //#region src/_shared/touch.ts
450
+ function J() {
451
+ return typeof window < "u" && "ontouchstart" in window;
447
452
  }
448
453
  //#endregion
449
454
  //#region src/_shared/useChartFullscreen.ts
450
- var Re = 0, ze = "";
455
+ var Le = 0, Re = "";
456
+ function ze() {
457
+ typeof document > "u" || (Le === 0 && (Re = document.body.style.overflow, document.body.style.overflow = "hidden"), Le++);
458
+ }
451
459
  function Be() {
452
- typeof document > "u" || (Re === 0 && (ze = document.body.style.overflow, document.body.style.overflow = "hidden"), Re++);
460
+ typeof document > "u" || Le !== 0 && (Le--, Le === 0 && (document.body.style.overflow = Re));
453
461
  }
454
- function Ve() {
455
- typeof document > "u" || Re !== 0 && (Re--, Re === 0 && (document.body.style.overflow = ze));
462
+ var Ve = 0, Y = null;
463
+ function He() {
464
+ return document.querySelector("meta[name=\"viewport\"]");
456
465
  }
457
- function He(e = {}) {
458
- let t = v(!1), r = !1;
459
- function i(e) {
460
- e !== t.value && (t.value = e, e && !r ? (Be(), r = !0) : !e && r && (Ve(), r = !1));
466
+ function Ue() {
467
+ if (typeof document > "u" || !J()) return;
468
+ let e = He();
469
+ if (e) {
470
+ if (Ve === 0) {
471
+ Y = e.getAttribute("content");
472
+ let t = Y || "width=device-width, initial-scale=1";
473
+ e.setAttribute("content", `${t}, maximum-scale=1`);
474
+ }
475
+ Ve++;
461
476
  }
462
- function a(e) {
477
+ }
478
+ function We() {
479
+ if (!(typeof document > "u") && Ve !== 0 && (Ve--, Ve === 0)) {
480
+ let e = He();
481
+ e && Y != null && e.setAttribute("content", Y), Y = null;
482
+ }
483
+ }
484
+ function Ge(e = {}) {
485
+ let t = v(!1), r = !1, i = v(null);
486
+ function a() {
487
+ let e = typeof window < "u" ? window.visualViewport : null;
488
+ e && (i.value = {
489
+ top: `${e.offsetTop}px`,
490
+ left: `${e.offsetLeft}px`,
491
+ width: `${e.width}px`,
492
+ height: `${e.height}px`
493
+ });
494
+ }
495
+ function o(e) {
496
+ let t = typeof window < "u" ? window.visualViewport : null;
497
+ t && (e ? (t.addEventListener("resize", a), t.addEventListener("scroll", a), a()) : (t.removeEventListener("resize", a), t.removeEventListener("scroll", a), i.value = null));
498
+ }
499
+ function s(e) {
500
+ e !== t.value && (t.value = e, e && !r ? (ze(), Ue(), o(!0), r = !0) : !e && r && (Be(), We(), o(!1), r = !1));
501
+ }
502
+ function c(e) {
463
503
  if (e.key !== "Escape" || !t.value) return;
464
504
  let n = e.target;
465
- n instanceof Element && n.closest("[role=\"menu\"], [role=\"dialog\"]") || i(!1);
505
+ n instanceof Element && n.closest("[role=\"menu\"], [role=\"dialog\"]") || s(!1);
466
506
  }
467
- function o() {
468
- i(!0);
507
+ function l() {
508
+ s(!0);
469
509
  }
470
- function s() {
471
- i(!1);
510
+ function u() {
511
+ s(!1);
472
512
  }
473
- function c() {
474
- i(!t.value);
513
+ function d() {
514
+ s(!t.value);
475
515
  }
476
516
  return g(() => {
477
- typeof document > "u" || document.addEventListener("keydown", a);
517
+ typeof document > "u" || document.addEventListener("keydown", c);
478
518
  }), ee(() => {
479
- typeof document > "u" || (document.removeEventListener("keydown", a), r &&= (Ve(), !1));
519
+ typeof document > "u" || (document.removeEventListener("keydown", c), r &&= (Be(), We(), o(!1), !1));
480
520
  }), {
481
521
  isFullscreen: t,
482
- toggle: c,
483
- enter: o,
484
- exit: s,
522
+ toggle: d,
523
+ enter: l,
524
+ exit: u,
485
525
  menuItem: n(() => ({
486
526
  label: t.value ? "Collapse" : "Fullscreen",
487
- action: c,
527
+ action: d,
488
528
  ariaPressed: t.value
489
529
  })),
490
530
  fullscreenStyle: n(() => t.value ? {
491
531
  position: "fixed",
492
- inset: "0",
532
+ ...i.value ?? { inset: "0" },
493
533
  "z-index": "var(--cfasim-z-fullscreen, 1000)",
494
534
  background: "var(--color-bg-0, #fff)",
495
535
  color: "var(--color-text, inherit)",
496
- padding: "2em",
536
+ padding: J() ? "0" : "2em",
497
537
  "box-sizing": "border-box",
498
538
  display: "flex",
499
539
  "flex-direction": "column",
@@ -504,7 +544,7 @@ function He(e = {}) {
504
544
  }
505
545
  //#endregion
506
546
  //#region src/_shared/useChartMenu.ts
507
- function Ue(e) {
547
+ function X(e) {
508
548
  let t = v(null);
509
549
  function r() {
510
550
  let t = e.filename();
@@ -512,23 +552,23 @@ function Ue(e) {
512
552
  let n = e.legacyMenuLabel();
513
553
  return typeof n == "string" ? n : "chart";
514
554
  }
515
- let i = e.fullscreen ? He({ target: e.fullscreenTarget }) : null, a = n(() => {
555
+ let i = e.fullscreen ? Ge({ target: e.fullscreenTarget }) : null, a = n(() => {
516
556
  let n = r(), a = [];
517
557
  i && a.push(i.menuItem.value), a.push({
518
558
  label: "Save as SVG",
519
559
  action: () => {
520
- t.value && K(t.value, n);
560
+ t.value && q(t.value, n);
521
561
  }
522
562
  }, {
523
563
  label: "Save as PNG",
524
564
  action: () => {
525
- t.value && Ie(t.value, n);
565
+ t.value && Fe(t.value, n);
526
566
  }
527
567
  });
528
568
  let o = e.downloadButton?.();
529
569
  return !e.downloadLink() && !o && a.push({
530
570
  label: "Download CSV",
531
- action: () => Le(e.getCsv(), n)
571
+ action: () => Ie(e.getCsv(), n)
532
572
  }), a;
533
573
  }), o = n(() => {
534
574
  if (e.downloadButton?.()) return null;
@@ -539,7 +579,7 @@ function Ue(e) {
539
579
  return t ? typeof t == "string" ? t : "Download data (CSV)" : null;
540
580
  });
541
581
  function l() {
542
- Le(e.getCsv(), r());
582
+ Ie(e.getCsv(), r());
543
583
  }
544
584
  return {
545
585
  svgRef: t,
@@ -556,13 +596,8 @@ function Ue(e) {
556
596
  };
557
597
  }
558
598
  //#endregion
559
- //#region src/_shared/touch.ts
560
- function q() {
561
- return typeof window < "u" && "ontouchstart" in window;
562
- }
563
- //#endregion
564
599
  //#region src/_shared/ChartZoomControls.vue?vue&type=script&setup=true&lang.ts
565
- var We = ["disabled"], Ge = ["disabled"], Ke = ["disabled"], qe = /* @__PURE__ */ I(/* @__PURE__ */ l({
600
+ var Ke = ["disabled"], qe = ["disabled"], Z = ["disabled"], Je = /* @__PURE__ */ L(/* @__PURE__ */ l({
566
601
  __name: "ChartZoomControls",
567
602
  props: {
568
603
  canZoomIn: {
@@ -605,7 +640,7 @@ var We = ["disabled"], Ge = ["disabled"], Ke = ["disabled"], qe = /* @__PURE__ *
605
640
  "stroke-width": "1.5",
606
641
  "stroke-linecap": "round",
607
642
  "aria-hidden": "true"
608
- }, [o("path", { d: "M7 2v10M2 7h10" })], -1)]], 8, We),
643
+ }, [o("path", { d: "M7 2v10M2 7h10" })], -1)]], 8, Ke),
609
644
  o("button", {
610
645
  type: "button",
611
646
  class: "chart-zoom-button",
@@ -621,7 +656,7 @@ var We = ["disabled"], Ge = ["disabled"], Ke = ["disabled"], qe = /* @__PURE__ *
621
656
  "stroke-width": "1.5",
622
657
  "stroke-linecap": "round",
623
658
  "aria-hidden": "true"
624
- }, [o("path", { d: "M2 7h10" })], -1)]], 8, Ge),
659
+ }, [o("path", { d: "M2 7h10" })], -1)]], 8, qe),
625
660
  o("button", {
626
661
  type: "button",
627
662
  class: "chart-zoom-button",
@@ -638,13 +673,13 @@ var We = ["disabled"], Ge = ["disabled"], Ke = ["disabled"], qe = /* @__PURE__ *
638
673
  "stroke-linecap": "round",
639
674
  "stroke-linejoin": "round",
640
675
  "aria-hidden": "true"
641
- }, [o("path", { d: "M1.75 7a5.25 5.25 0 1 0 5.25-5.25c-1.48 0-2.9.6-3.94 1.6L1.75 4.7" }), o("path", { d: "M1.75 1.75v2.95h2.95" })], -1)]], 8, Ke)
676
+ }, [o("path", { d: "M1.75 7a5.25 5.25 0 1 0 5.25-5.25c-1.48 0-2.9.6-3.94 1.6L1.75 4.7" }), o("path", { d: "M1.75 1.75v2.95h2.95" })], -1)]], 8, Z)
642
677
  ], 2));
643
678
  }
644
679
  }), [["__scopeId", "data-v-87ceeada"]]);
645
680
  //#endregion
646
681
  //#region src/_shared/seriesCsv.ts
647
- function J(e) {
682
+ function Ye(e) {
648
683
  if (e.length === 0) return "";
649
684
  let t = 0;
650
685
  for (let n of e) n.data.length > t && (t = n.data.length);
@@ -656,43 +691,43 @@ function J(e) {
656
691
  }
657
692
  return i.join("\n");
658
693
  }
659
- function Je(e, t, n = "category") {
694
+ function Xe(e, t, n = "category") {
660
695
  if (t.length === 0 || e.length === 0) return "";
661
696
  let r = [(t.length === 1 ? [n, t[0].label || "value"] : [n, ...t.map((e, t) => e.label || `series_${t}`)]).join(",")];
662
697
  for (let n = 0; n < e.length; n++) {
663
- let i = [Ye(e[n])];
698
+ let i = [Ze(e[n])];
664
699
  for (let e of t) i.push(n < e.data.length ? String(e.data[n]) : "");
665
700
  r.push(i.join(","));
666
701
  }
667
702
  return r.join("\n");
668
703
  }
669
- function Ye(e) {
704
+ function Ze(e) {
670
705
  return e.includes(",") || e.includes("\"") || e.includes("\n") ? `"${e.replace(/"/g, "\"\"")}"` : e;
671
706
  }
672
707
  //#endregion
673
708
  //#region src/_shared/ChartAnnotations.vue?vue&type=script&setup=true&lang.ts
674
- var Xe = {
709
+ var Qe = {
675
710
  class: "chart-annotations",
676
711
  "pointer-events": "none"
677
- }, Y = ["stroke", "stroke-width"], Ze = [
712
+ }, $e = ["stroke", "stroke-width"], et = [
678
713
  "d",
679
714
  "stroke",
680
715
  "stroke-width"
681
- ], X = [
716
+ ], tt = [
682
717
  "fill",
683
718
  "stroke",
684
719
  "stroke-width",
685
720
  "transform"
686
- ], Qe = [
721
+ ], nt = [
687
722
  "stroke",
688
723
  "stroke-width",
689
724
  "stroke-dasharray"
690
- ], $e = [
725
+ ], rt = [
691
726
  "d",
692
727
  "stroke",
693
728
  "stroke-width",
694
729
  "stroke-dasharray"
695
- ], et = ["fill", "transform"], tt = [
730
+ ], it = ["fill", "transform"], at = [
696
731
  "x",
697
732
  "y",
698
733
  "text-anchor",
@@ -701,7 +736,7 @@ var Xe = {
701
736
  "fill",
702
737
  "stroke",
703
738
  "stroke-width"
704
- ], nt = ["x", "dy"], rt = ["font-weight", "font-style"], it = 13, at = "normal", ot = 700, st = "var(--color-bg-0, #fff)", ct = 3, lt = 1, ut = 4, dt = 6, ft = 1.2, pt = .35, mt = /* @__PURE__ */ l({
739
+ ], ot = ["x", "dy"], st = ["font-weight", "font-style"], ct = 13, lt = "normal", ut = 700, dt = "var(--color-bg-0, #fff)", ft = 3, pt = 1, mt = 4, ht = 6, gt = 1.2, _t = .35, vt = /* @__PURE__ */ l({
705
740
  __name: "ChartAnnotations",
706
741
  props: {
707
742
  annotations: { default: () => [] },
@@ -738,7 +773,7 @@ var Xe = {
738
773
  if (!n || !isFinite(n.x) || !isFinite(n.y)) continue;
739
774
  let i = t.pointer ?? "curved", a = i.startsWith("rule");
740
775
  if (a && !r.bounds) continue;
741
- let { x: o, y: l } = t.offset, d = n.x + o, p = n.y + l, m = t.color ?? "currentColor", h = t.fontSize ?? it, g = t.fontWeight ?? at, ee = t.outlineColor ?? st, _ = t.outlineWidth ?? ct, v = t.lineColor ?? m, y = t.lineWidth ?? lt, te = s(t.lineDash), b = {
776
+ let { x: o, y: l } = t.offset, d = n.x + o, p = n.y + l, m = t.color ?? "currentColor", h = t.fontSize ?? ct, g = t.fontWeight ?? lt, ee = t.outlineColor ?? dt, _ = t.outlineWidth ?? ft, v = t.lineColor ?? m, y = t.lineWidth ?? pt, te = s(t.lineDash), b = {
742
777
  left: "start",
743
778
  center: "middle",
744
779
  right: "end"
@@ -753,7 +788,7 @@ var Xe = {
753
788
  textX: d,
754
789
  textY: p,
755
790
  textAnchor: b,
756
- dy: h * ft,
791
+ dy: h * gt,
757
792
  fontSize: h,
758
793
  fontWeight: g,
759
794
  color: m,
@@ -819,11 +854,11 @@ var Xe = {
819
854
  }
820
855
  function f(e, t, n, r, i, a, o) {
821
856
  if (o === "none") return { path: "" };
822
- let s = n - e, c = r - t, l = i * ft, u = (c < 0 ? r + (a - 1) * l : r) - i * pt;
857
+ let s = n - e, c = r - t, l = i * gt, u = (c < 0 ? r + (a - 1) * l : r) - i * _t;
823
858
  if (s === 0 || c === 0 || o === "straight") {
824
859
  let i = c === 0 ? r : u, a = n - e, o = i - t, s = Math.hypot(a, o);
825
860
  if (s <= 10) return { path: "" };
826
- let l = a / s, d = o / s, f = e + l * ut, p = t + d * ut, m = n - l * dt, h = i - d * dt, g = Math.atan2(-d, -l) * 180 / Math.PI;
861
+ let l = a / s, d = o / s, f = e + l * mt, p = t + d * mt, m = n - l * ht, h = i - d * ht, g = Math.atan2(-d, -l) * 180 / Math.PI;
827
862
  return {
828
863
  path: `M${f},${p} L${m},${h}`,
829
864
  arrow: {
@@ -834,8 +869,8 @@ var Xe = {
834
869
  };
835
870
  }
836
871
  let d = u - t;
837
- if (Math.abs(d) <= ut || Math.abs(s) <= dt) return { path: "" };
838
- let f = Math.sign(s), p = Math.sign(d), m = e, h = t + p * ut, g = n - f * dt, ee = u, _ = p > 0 ? -90 : 90;
872
+ if (Math.abs(d) <= mt || Math.abs(s) <= ht) return { path: "" };
873
+ let f = Math.sign(s), p = Math.sign(d), m = e, h = t + p * mt, g = n - f * ht, ee = u, _ = p > 0 ? -90 : 90;
839
874
  return {
840
875
  path: `M${m},${h} Q${m},${u} ${g},${ee}`,
841
876
  arrow: {
@@ -845,7 +880,7 @@ var Xe = {
845
880
  }
846
881
  };
847
882
  }
848
- return (t, n) => (_(), a("g", Xe, [(_(!0), a(e, null, y(l.value, (t, n) => (_(), a(e, { key: n }, [
883
+ return (t, n) => (_(), a("g", Qe, [(_(!0), a(e, null, y(l.value, (t, n) => (_(), a(e, { key: n }, [
849
884
  t.rule && t.outlineWidth > 0 ? (_(), a("line", d({
850
885
  key: 0,
851
886
  ref_for: !0
@@ -854,7 +889,7 @@ var Xe = {
854
889
  stroke: t.outlineColor,
855
890
  "stroke-width": t.lineWidth + t.outlineWidth,
856
891
  "stroke-linecap": "round"
857
- }), null, 16, Y)) : i("", !0),
892
+ }), null, 16, $e)) : i("", !0),
858
893
  t.pointerPath && t.outlineWidth > 0 ? (_(), a("path", {
859
894
  key: 1,
860
895
  d: t.pointerPath,
@@ -863,7 +898,7 @@ var Xe = {
863
898
  stroke: t.outlineColor,
864
899
  "stroke-width": t.lineWidth + t.outlineWidth,
865
900
  "stroke-linecap": "round"
866
- }, null, 8, Ze)) : i("", !0),
901
+ }, null, 8, et)) : i("", !0),
867
902
  t.arrowTip && t.outlineWidth > 0 ? (_(), a("polygon", {
868
903
  key: 2,
869
904
  points: "0,0 -6,-3 -6,3",
@@ -873,7 +908,7 @@ var Xe = {
873
908
  "stroke-width": t.outlineWidth,
874
909
  "stroke-linejoin": "round",
875
910
  transform: t.arrowTransform
876
- }, null, 8, X)) : i("", !0),
911
+ }, null, 8, tt)) : i("", !0),
877
912
  t.rule ? (_(), a("line", d({
878
913
  key: 3,
879
914
  ref_for: !0
@@ -882,7 +917,7 @@ var Xe = {
882
917
  "stroke-width": t.lineWidth,
883
918
  "stroke-dasharray": t.lineDash,
884
919
  "stroke-linecap": "round"
885
- }), null, 16, Qe)) : i("", !0),
920
+ }), null, 16, nt)) : i("", !0),
886
921
  t.pointerPath ? (_(), a("path", {
887
922
  key: 4,
888
923
  d: t.pointerPath,
@@ -891,13 +926,13 @@ var Xe = {
891
926
  "stroke-width": t.lineWidth,
892
927
  "stroke-dasharray": t.lineDash,
893
928
  "stroke-linecap": "round"
894
- }, null, 8, $e)) : i("", !0),
929
+ }, null, 8, rt)) : i("", !0),
895
930
  t.arrowTip ? (_(), a("polygon", {
896
931
  key: 5,
897
932
  points: "0,0 -6,-3 -6,3",
898
933
  fill: t.lineColor,
899
934
  transform: t.arrowTransform
900
- }, null, 8, et)) : i("", !0),
935
+ }, null, 8, it)) : i("", !0),
901
936
  o("text", {
902
937
  x: t.textX,
903
938
  y: t.textY,
@@ -915,14 +950,14 @@ var Xe = {
915
950
  dy: r === 0 ? 0 : t.dy
916
951
  }, [(_(!0), a(e, null, y(n, (e, t) => (_(), a("tspan", {
917
952
  key: t,
918
- "font-weight": e.bold ? ot : void 0,
953
+ "font-weight": e.bold ? ut : void 0,
919
954
  "font-style": e.italic ? "italic" : void 0
920
- }, b(e.text), 9, rt))), 128))], 8, nt))), 128))], 8, tt)
955
+ }, b(e.text), 9, st))), 128))], 8, ot))), 128))], 8, at)
921
956
  ], 64))), 128))]));
922
957
  }
923
- }), ht = 400, gt = 200;
924
- function _t(e) {
925
- let { containerRef: t, measuredWidth: r, measuredHeight: i } = Ce({ 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 } = Ue({
958
+ }), yt = 400, bt = 200;
959
+ function xt(e) {
960
+ let { containerRef: t, measuredWidth: r, measuredHeight: i } = Se({ 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 } = X({
926
961
  filename: e.filename,
927
962
  legacyMenuLabel: e.menu,
928
963
  getCsv: e.getCsv,
@@ -930,12 +965,12 @@ function _t(e) {
930
965
  downloadButton: e.downloadButton,
931
966
  fullscreen: !0,
932
967
  fullscreenTarget: e.fullscreenTarget
933
- }), g = n(() => f.value && r.value > 0 ? r.value : e.width() ?? (r.value || ht)), ee = n(() => {
968
+ }), g = n(() => f.value && r.value > 0 ? r.value : e.width() ?? (r.value || yt)), ee = n(() => {
934
969
  if (f.value && i.value > 0) {
935
970
  let t = e.extraBelowHeight?.() ?? 0;
936
971
  return i.value - t;
937
972
  }
938
- return e.height() ?? gt;
973
+ return e.height() ?? bt;
939
974
  }), { padding: _, legendY: v, inlineLegendLayout: y, innerW: te, innerH: b, bounds: ne } = Ae({
940
975
  title: e.title,
941
976
  titleStyle: e.titleStyle,
@@ -981,17 +1016,17 @@ function _t(e) {
981
1016
  exitFullscreen: h
982
1017
  };
983
1018
  }
984
- function vt(e, t) {
1019
+ function St(e, t) {
985
1020
  return (n) => {
986
1021
  let r = e();
987
1022
  if (r !== void 0) return re(n, r);
988
1023
  let i = t();
989
- return i === void 0 ? z(n) : re(n, i);
1024
+ return i === void 0 ? B(n) : re(n, i);
990
1025
  };
991
1026
  }
992
1027
  //#endregion
993
1028
  //#region src/_shared/contrast.ts
994
- function yt(e) {
1029
+ function Ct(e) {
995
1030
  let t = e.trim();
996
1031
  if (t.startsWith("#")) {
997
1032
  let e = t.slice(1);
@@ -1018,201 +1053,201 @@ function yt(e) {
1018
1053
  }
1019
1054
  return null;
1020
1055
  }
1021
- function bt([e, t, n]) {
1056
+ function wt([e, t, n]) {
1022
1057
  let r = (e) => {
1023
1058
  let t = e / 255;
1024
1059
  return t <= .03928 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
1025
1060
  };
1026
1061
  return .2126 * r(e) + .7152 * r(t) + .0722 * r(n);
1027
1062
  }
1028
- var xt = null, St = /* @__PURE__ */ new Map();
1029
- function Ct(e) {
1030
- let t = yt(e);
1063
+ var Tt = null, Et = /* @__PURE__ */ new Map();
1064
+ function Dt(e) {
1065
+ let t = Ct(e);
1031
1066
  if (t) return t;
1032
- if (St.has(e)) return St.get(e) ?? null;
1067
+ if (Et.has(e)) return Et.get(e) ?? null;
1033
1068
  if (typeof document > "u") return null;
1034
- xt || (xt = document.createElement("span"), xt.style.cssText = "position:absolute;width:0;height:0;visibility:hidden;pointer-events:none", document.body.appendChild(xt)), xt.style.color = "", xt.style.color = e;
1035
- let n = getComputedStyle(xt).color, r = yt(n);
1036
- return St.set(e, r), r;
1069
+ Tt || (Tt = document.createElement("span"), Tt.style.cssText = "position:absolute;width:0;height:0;visibility:hidden;pointer-events:none", document.body.appendChild(Tt)), Tt.style.color = "", Tt.style.color = e;
1070
+ let n = getComputedStyle(Tt).color, r = Ct(n);
1071
+ return Et.set(e, r), r;
1037
1072
  }
1038
- function wt(e, t = "#ffffff", n = "#1a1a1a") {
1039
- let r = Ct(e);
1040
- return r && bt(r) > .179 ? n : t;
1073
+ function Ot(e, t = "#ffffff", n = "#1a1a1a") {
1074
+ let r = Dt(e);
1075
+ return r && wt(r) > .179 ? n : t;
1041
1076
  }
1042
1077
  //#endregion
1043
1078
  //#region src/_shared/dateAxis.ts
1044
- var Tt = /^(\d{4})-(\d{2})-(\d{2})$/, Et = /^(\d{4})-(\d{2})-(\d{2})[Tt ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:?\d{2})?$/, Z = 1e3, Dt = 60 * Z, Ot = 60 * Dt, kt = 24 * Ot, At = 7 * kt, jt = 30 * kt, Mt = 365 * kt, Nt = [
1079
+ var kt = /^(\d{4})-(\d{2})-(\d{2})$/, At = /^(\d{4})-(\d{2})-(\d{2})[Tt ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:?\d{2})?$/, jt = 1e3, Mt = 60 * jt, Nt = 60 * Mt, Pt = 24 * Nt, Ft = 7 * Pt, It = 30 * Pt, Lt = 365 * Pt, Rt = [
1045
1080
  {
1046
1081
  unit: "second",
1047
1082
  step: 1,
1048
- ms: 1 * Z
1083
+ ms: 1 * jt
1049
1084
  },
1050
1085
  {
1051
1086
  unit: "second",
1052
1087
  step: 5,
1053
- ms: 5 * Z
1088
+ ms: 5 * jt
1054
1089
  },
1055
1090
  {
1056
1091
  unit: "second",
1057
1092
  step: 15,
1058
- ms: 15 * Z
1093
+ ms: 15 * jt
1059
1094
  },
1060
1095
  {
1061
1096
  unit: "second",
1062
1097
  step: 30,
1063
- ms: 30 * Z
1098
+ ms: 30 * jt
1064
1099
  },
1065
1100
  {
1066
1101
  unit: "minute",
1067
1102
  step: 1,
1068
- ms: 1 * Dt
1103
+ ms: 1 * Mt
1069
1104
  },
1070
1105
  {
1071
1106
  unit: "minute",
1072
1107
  step: 5,
1073
- ms: 5 * Dt
1108
+ ms: 5 * Mt
1074
1109
  },
1075
1110
  {
1076
1111
  unit: "minute",
1077
1112
  step: 15,
1078
- ms: 15 * Dt
1113
+ ms: 15 * Mt
1079
1114
  },
1080
1115
  {
1081
1116
  unit: "minute",
1082
1117
  step: 30,
1083
- ms: 30 * Dt
1118
+ ms: 30 * Mt
1084
1119
  },
1085
1120
  {
1086
1121
  unit: "hour",
1087
1122
  step: 1,
1088
- ms: 1 * Ot
1123
+ ms: 1 * Nt
1089
1124
  },
1090
1125
  {
1091
1126
  unit: "hour",
1092
1127
  step: 3,
1093
- ms: 3 * Ot
1128
+ ms: 3 * Nt
1094
1129
  },
1095
1130
  {
1096
1131
  unit: "hour",
1097
1132
  step: 6,
1098
- ms: 6 * Ot
1133
+ ms: 6 * Nt
1099
1134
  },
1100
1135
  {
1101
1136
  unit: "hour",
1102
1137
  step: 12,
1103
- ms: 12 * Ot
1138
+ ms: 12 * Nt
1104
1139
  },
1105
1140
  {
1106
1141
  unit: "day",
1107
1142
  step: 1,
1108
- ms: 1 * kt
1143
+ ms: 1 * Pt
1109
1144
  },
1110
1145
  {
1111
1146
  unit: "day",
1112
1147
  step: 2,
1113
- ms: 2 * kt
1148
+ ms: 2 * Pt
1114
1149
  },
1115
1150
  {
1116
1151
  unit: "week",
1117
1152
  step: 1,
1118
- ms: 1 * At
1153
+ ms: 1 * Ft
1119
1154
  },
1120
1155
  {
1121
1156
  unit: "month",
1122
1157
  step: 1,
1123
- ms: 1 * jt
1158
+ ms: 1 * It
1124
1159
  },
1125
1160
  {
1126
1161
  unit: "month",
1127
1162
  step: 3,
1128
- ms: 3 * jt
1163
+ ms: 3 * It
1129
1164
  },
1130
1165
  {
1131
1166
  unit: "month",
1132
1167
  step: 6,
1133
- ms: 6 * jt
1168
+ ms: 6 * It
1134
1169
  },
1135
1170
  {
1136
1171
  unit: "year",
1137
1172
  step: 1,
1138
- ms: 1 * Mt
1173
+ ms: 1 * Lt
1139
1174
  },
1140
1175
  {
1141
1176
  unit: "year",
1142
1177
  step: 2,
1143
- ms: 2 * Mt
1178
+ ms: 2 * Lt
1144
1179
  },
1145
1180
  {
1146
1181
  unit: "year",
1147
1182
  step: 5,
1148
- ms: 5 * Mt
1183
+ ms: 5 * Lt
1149
1184
  },
1150
1185
  {
1151
1186
  unit: "year",
1152
1187
  step: 10,
1153
- ms: 10 * Mt
1188
+ ms: 10 * Lt
1154
1189
  },
1155
1190
  {
1156
1191
  unit: "year",
1157
1192
  step: 25,
1158
- ms: 25 * Mt
1193
+ ms: 25 * Lt
1159
1194
  },
1160
1195
  {
1161
1196
  unit: "year",
1162
1197
  step: 50,
1163
- ms: 50 * Mt
1198
+ ms: 50 * Lt
1164
1199
  },
1165
1200
  {
1166
1201
  unit: "year",
1167
1202
  step: 100,
1168
- ms: 100 * Mt
1203
+ ms: 100 * Lt
1169
1204
  }
1170
- ], Pt = 1e3;
1171
- function Ft(e, t) {
1205
+ ], zt = 1e3;
1206
+ function Bt(e, t) {
1172
1207
  if (e instanceof Date) {
1173
1208
  let t = e.getTime();
1174
1209
  return Number.isFinite(t) ? t : null;
1175
1210
  }
1176
1211
  if (typeof e != "string") return null;
1177
- let n = Tt.exec(e);
1212
+ let n = kt.exec(e);
1178
1213
  if (n) {
1179
1214
  let e = +n[1], r = n[2] - 1, i = +n[3];
1180
1215
  return t === "utc" ? Date.UTC(e, r, i) : new Date(e, r, i).getTime();
1181
1216
  }
1182
- let r = Et.exec(e);
1217
+ let r = At.exec(e);
1183
1218
  if (r) {
1184
1219
  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];
1185
1220
  if (l) {
1186
1221
  if (l === "Z" || l === "z") return Date.UTC(e, n, i, a, o, s, c);
1187
- let t = l[0] === "+" ? 1 : -1, r = +l.slice(1, 3), u = +l.slice(-2), d = t * (r * 60 + u) * Dt;
1222
+ let t = l[0] === "+" ? 1 : -1, r = +l.slice(1, 3), u = +l.slice(-2), d = t * (r * 60 + u) * Mt;
1188
1223
  return Date.UTC(e, n, i, a, o, s, c) - d;
1189
1224
  }
1190
1225
  return t === "utc" ? Date.UTC(e, n, i, a, o, s, c) : new Date(e, n, i, a, o, s, c).getTime();
1191
1226
  }
1192
1227
  return null;
1193
1228
  }
1194
- function It(e) {
1195
- return e instanceof Date ? Number.isFinite(e.getTime()) : typeof e == "string" ? Tt.test(e) || Et.test(e) : !1;
1229
+ function Vt(e) {
1230
+ return e instanceof Date ? Number.isFinite(e.getTime()) : typeof e == "string" ? kt.test(e) || At.test(e) : !1;
1196
1231
  }
1197
- function Lt(e, t) {
1232
+ function Ht(e, t) {
1198
1233
  if (e.length === 0) return !1;
1199
1234
  for (let n = 0; n < e.length; n++) {
1200
1235
  let r = e[n];
1201
- if (!It(r) || Ft(r, t) === null) return !1;
1236
+ if (!Vt(r) || Bt(r, t) === null) return !1;
1202
1237
  }
1203
1238
  return !0;
1204
1239
  }
1205
- function Rt(e, t) {
1240
+ function Ut(e, t) {
1206
1241
  let n = e / Math.max(1, t);
1207
- for (let e of Nt) if (n <= e.ms) return e;
1208
- return Nt[Nt.length - 1];
1242
+ for (let e of Rt) if (n <= e.ms) return e;
1243
+ return Rt[Rt.length - 1];
1209
1244
  }
1210
- function zt(e, t, n) {
1245
+ function Wt(e, t, n) {
1211
1246
  let r = new Date(e);
1212
1247
  if (n === "utc") switch (t) {
1213
- case "second": return Math.floor(e / Z) * Z;
1214
- case "minute": return Math.floor(e / Dt) * Dt;
1215
- case "hour": return Math.floor(e / Ot) * Ot;
1248
+ case "second": return Math.floor(e / jt) * jt;
1249
+ case "minute": return Math.floor(e / Mt) * Mt;
1250
+ case "hour": return Math.floor(e / Nt) * Nt;
1216
1251
  case "day": return Date.UTC(r.getUTCFullYear(), r.getUTCMonth(), r.getUTCDate());
1217
1252
  case "week": {
1218
1253
  let e = (r.getUTCDay() + 6) % 7;
@@ -1222,8 +1257,8 @@ function zt(e, t, n) {
1222
1257
  case "year": return Date.UTC(r.getUTCFullYear(), 0, 1);
1223
1258
  }
1224
1259
  switch (t) {
1225
- case "second": return Math.floor(e / Z) * Z;
1226
- case "minute": return Math.floor(e / Dt) * Dt;
1260
+ case "second": return Math.floor(e / jt) * jt;
1261
+ case "minute": return Math.floor(e / Mt) * Mt;
1227
1262
  case "hour": return new Date(r.getFullYear(), r.getMonth(), r.getDate(), r.getHours()).getTime();
1228
1263
  case "day": return new Date(r.getFullYear(), r.getMonth(), r.getDate()).getTime();
1229
1264
  case "week": {
@@ -1234,11 +1269,11 @@ function zt(e, t, n) {
1234
1269
  case "year": return new Date(r.getFullYear(), 0, 1).getTime();
1235
1270
  }
1236
1271
  }
1237
- function Bt(e, t, n, r) {
1238
- if (t === "second") return e + n * Z;
1239
- if (t === "minute") return e + n * Dt;
1240
- if (t === "hour" && r === "utc") return e + n * Ot;
1241
- if (t === "week" && r === "utc") return e + n * At;
1272
+ function Gt(e, t, n, r) {
1273
+ if (t === "second") return e + n * jt;
1274
+ if (t === "minute") return e + n * Mt;
1275
+ if (t === "hour" && r === "utc") return e + n * Nt;
1276
+ if (t === "week" && r === "utc") return e + n * Ft;
1242
1277
  let i = new Date(e);
1243
1278
  if (r === "utc") switch (t) {
1244
1279
  case "day": return Date.UTC(i.getUTCFullYear(), i.getUTCMonth(), i.getUTCDate() + n, i.getUTCHours(), i.getUTCMinutes(), i.getUTCSeconds(), i.getUTCMilliseconds());
@@ -1254,21 +1289,21 @@ function Bt(e, t, n, r) {
1254
1289
  }
1255
1290
  return e;
1256
1291
  }
1257
- function Vt(e, t, n, r) {
1292
+ function Kt(e, t, n, r) {
1258
1293
  if (!Number.isFinite(e) || !Number.isFinite(t) || e >= t || n < 1) return {
1259
1294
  values: [],
1260
1295
  unit: "day"
1261
1296
  };
1262
- let { unit: i, step: a } = Rt(t - e, n), o = zt(e, i, r), s = 0;
1263
- for (; o < e && s < Pt;) o = Bt(o, i, a, r), s++;
1297
+ let { unit: i, step: a } = Ut(t - e, n), o = Wt(e, i, r), s = 0;
1298
+ for (; o < e && s < zt;) o = Gt(o, i, a, r), s++;
1264
1299
  let c = [];
1265
- for (let e = 0; e < Pt && o <= t; e++) c.push(o), o = Bt(o, i, a, r);
1300
+ for (let e = 0; e < zt && o <= t; e++) c.push(o), o = Gt(o, i, a, r);
1266
1301
  return {
1267
1302
  values: c,
1268
1303
  unit: i
1269
1304
  };
1270
1305
  }
1271
- var Ht = {
1306
+ var qt = {
1272
1307
  iso: {
1273
1308
  year: "numeric",
1274
1309
  month: "2-digit",
@@ -1306,7 +1341,7 @@ var Ht = {
1306
1341
  hourCycle: "h23"
1307
1342
  },
1308
1343
  medium: { dateStyle: "medium" }
1309
- }, Ut = {
1344
+ }, Jt = {
1310
1345
  year: "year",
1311
1346
  month: "month-year",
1312
1347
  week: "month-day",
@@ -1318,27 +1353,27 @@ var Ht = {
1318
1353
  function Q(e) {
1319
1354
  return e < 10 ? "0" + e : String(e);
1320
1355
  }
1321
- function Wt(e, t) {
1356
+ function Yt(e, t) {
1322
1357
  let n = new Date(e);
1323
1358
  return t === "utc" ? `${n.getUTCFullYear()}-${Q(n.getUTCMonth() + 1)}-${Q(n.getUTCDate())}` : `${n.getFullYear()}-${Q(n.getMonth() + 1)}-${Q(n.getDate())}`;
1324
1359
  }
1325
- function Gt(e, t) {
1360
+ function Xt(e, t) {
1326
1361
  let n = new Date(e);
1327
1362
  return t === "utc" ? `${n.getUTCFullYear()}-${Q(n.getUTCMonth() + 1)}-${Q(n.getUTCDate())}T${Q(n.getUTCHours())}:${Q(n.getUTCMinutes())}:${Q(n.getUTCSeconds())}Z` : `${n.getFullYear()}-${Q(n.getMonth() + 1)}-${Q(n.getDate())}T${Q(n.getHours())}:${Q(n.getMinutes())}:${Q(n.getSeconds())}`;
1328
1363
  }
1329
- function Kt(e) {
1330
- return e in Ht;
1364
+ function Zt(e) {
1365
+ return e in qt;
1331
1366
  }
1332
- function qt(e, t, n, r) {
1367
+ function Qt(e, t, n, r) {
1333
1368
  if (typeof t == "function") return t(e, r);
1334
1369
  let i = null, a;
1335
- if (t === void 0) i = r ? Ut[r] : "iso", a = Ht[i];
1370
+ if (t === void 0) i = r ? Jt[r] : "iso", a = qt[i];
1336
1371
  else if (typeof t == "string") {
1337
- if (!Kt(t)) throw Error(`Unknown date format preset: "${t}"`);
1338
- i = t, a = Ht[i];
1372
+ if (!Zt(t)) throw Error(`Unknown date format preset: "${t}"`);
1373
+ i = t, a = qt[i];
1339
1374
  } else a = t;
1340
- if (i === "iso") return Wt(e, n);
1341
- if (i === "iso-datetime") return Gt(e, n);
1375
+ if (i === "iso") return Yt(e, n);
1376
+ if (i === "iso-datetime") return Xt(e, n);
1342
1377
  let o = n === "utc" ? {
1343
1378
  ...a,
1344
1379
  timeZone: "UTC"
@@ -1347,73 +1382,73 @@ function qt(e, t, n, r) {
1347
1382
  }
1348
1383
  //#endregion
1349
1384
  //#region src/LineChart/LineChart.vue?vue&type=script&setup=true&lang.ts
1350
- var Jt = {
1385
+ var $t = {
1351
1386
  class: "chart-sr-only",
1352
1387
  "aria-live": "polite"
1353
- }, Yt = [
1388
+ }, en = [
1354
1389
  "width",
1355
1390
  "height",
1356
1391
  "role",
1357
1392
  "aria-label"
1358
- ], Xt = [
1393
+ ], tn = [
1359
1394
  "x",
1360
1395
  "y",
1361
1396
  "text-anchor",
1362
1397
  "font-size",
1363
1398
  "font-weight",
1364
1399
  "fill"
1365
- ], Zt = ["x", "dy"], Qt = { key: 1 }, $t = [
1400
+ ], nn = ["x", "dy"], rn = { key: 1 }, an = [
1366
1401
  "x1",
1367
1402
  "y1",
1368
1403
  "x2",
1369
1404
  "y2",
1370
1405
  "stroke",
1371
1406
  "stroke-dasharray"
1372
- ], en = [
1407
+ ], on = [
1373
1408
  "cx",
1374
1409
  "cy",
1375
1410
  "fill",
1376
1411
  "fill-opacity",
1377
1412
  "stroke"
1378
- ], tn = [
1413
+ ], sn = [
1379
1414
  "x",
1380
1415
  "y",
1381
1416
  "font-size",
1382
1417
  "fill",
1383
1418
  "font-weight"
1384
- ], nn = [
1419
+ ], cn = [
1385
1420
  "x1",
1386
1421
  "y1",
1387
1422
  "x2",
1388
1423
  "y2"
1389
- ], rn = [
1424
+ ], ln = [
1390
1425
  "x1",
1391
1426
  "y1",
1392
1427
  "x2",
1393
1428
  "y2"
1394
- ], an = [
1429
+ ], un = [
1395
1430
  "x1",
1396
1431
  "y1",
1397
1432
  "x2",
1398
1433
  "y2"
1399
- ], on = [
1434
+ ], dn = [
1400
1435
  "x1",
1401
1436
  "y1",
1402
1437
  "x2",
1403
1438
  "y2"
1404
- ], sn = [
1439
+ ], fn = [
1405
1440
  "x",
1406
1441
  "y",
1407
1442
  "font-size",
1408
1443
  "fill",
1409
1444
  "font-weight",
1410
1445
  "fill-opacity"
1411
- ], cn = [
1446
+ ], pn = [
1412
1447
  "transform",
1413
1448
  "font-size",
1414
1449
  "fill",
1415
1450
  "font-weight"
1416
- ], ln = [
1451
+ ], mn = [
1417
1452
  "x",
1418
1453
  "y",
1419
1454
  "text-anchor",
@@ -1421,43 +1456,43 @@ var Jt = {
1421
1456
  "fill",
1422
1457
  "font-weight",
1423
1458
  "fill-opacity"
1424
- ], un = [
1459
+ ], hn = [
1425
1460
  "x",
1426
1461
  "y",
1427
1462
  "font-size",
1428
1463
  "fill",
1429
1464
  "font-weight"
1430
- ], dn = [
1465
+ ], $ = [
1431
1466
  "d",
1432
1467
  "fill",
1433
1468
  "fill-opacity"
1434
- ], fn = [
1469
+ ], gn = [
1435
1470
  "d",
1436
1471
  "stroke",
1437
1472
  "stroke-width"
1438
- ], pn = [
1473
+ ], _n = [
1439
1474
  "d",
1440
1475
  "stroke",
1441
1476
  "stroke-width",
1442
1477
  "stroke-opacity",
1443
1478
  "stroke-dasharray"
1444
- ], mn = [
1479
+ ], vn = [
1445
1480
  "cx",
1446
1481
  "cy",
1447
1482
  "r",
1448
1483
  "fill",
1449
1484
  "fill-opacity",
1450
1485
  "stroke"
1451
- ], $ = [
1486
+ ], yn = [
1452
1487
  "d",
1453
1488
  "fill",
1454
1489
  "fill-opacity"
1455
- ], hn = [
1490
+ ], bn = [
1456
1491
  "d",
1457
1492
  "stroke",
1458
1493
  "stroke-width",
1459
1494
  "stroke-dasharray"
1460
- ], gn = [
1495
+ ], xn = [
1461
1496
  "x1",
1462
1497
  "y1",
1463
1498
  "x2",
@@ -1465,7 +1500,7 @@ var Jt = {
1465
1500
  "stroke",
1466
1501
  "stroke-width",
1467
1502
  "stroke-dasharray"
1468
- ], _n = [
1503
+ ], Sn = [
1469
1504
  "x1",
1470
1505
  "y1",
1471
1506
  "x2",
@@ -1473,53 +1508,53 @@ var Jt = {
1473
1508
  "stroke",
1474
1509
  "stroke-width",
1475
1510
  "stroke-dasharray"
1476
- ], vn = [
1511
+ ], Cn = [
1477
1512
  "x1",
1478
1513
  "y1",
1479
1514
  "x2",
1480
1515
  "y2"
1481
- ], yn = [
1516
+ ], wn = [
1482
1517
  "x1",
1483
1518
  "y1",
1484
1519
  "x2",
1485
1520
  "y2"
1486
- ], bn = [
1521
+ ], Tn = [
1487
1522
  "x1",
1488
1523
  "y1",
1489
1524
  "x2",
1490
1525
  "y2"
1491
- ], xn = [
1526
+ ], En = [
1492
1527
  "cx",
1493
1528
  "cy",
1494
1529
  "fill"
1495
- ], Sn = [
1530
+ ], Dn = [
1496
1531
  "x",
1497
1532
  "y",
1498
1533
  "width",
1499
1534
  "height"
1500
- ], Cn = [
1535
+ ], On = [
1501
1536
  "cx",
1502
1537
  "cy",
1503
1538
  "fill",
1504
1539
  "fill-opacity",
1505
1540
  "stroke"
1506
- ], wn = [
1541
+ ], kn = [
1507
1542
  "x",
1508
1543
  "y",
1509
1544
  "font-size",
1510
1545
  "font-weight",
1511
1546
  "fill"
1512
- ], Tn = [
1547
+ ], An = [
1513
1548
  "x",
1514
1549
  "y",
1515
1550
  "font-size",
1516
1551
  "font-weight",
1517
1552
  "fill",
1518
1553
  "fill-opacity"
1519
- ], En = { class: "line-chart-tooltip" }, Dn = {
1554
+ ], jn = { class: "line-chart-tooltip" }, Mn = {
1520
1555
  key: 0,
1521
1556
  class: "line-chart-tooltip-label"
1522
- }, On = ["href", "download"], kn = 36, An = 12, jn = 7, Mn = 16, Nn = /* @__PURE__ */ I(/* @__PURE__ */ l({
1557
+ }, Nn = ["href", "download"], Pn = 36, Fn = 12, In = 7, Ln = 16, Rn = /* @__PURE__ */ L(/* @__PURE__ */ l({
1523
1558
  inheritAttrs: !1,
1524
1559
  __name: "LineChart",
1525
1560
  props: {
@@ -1580,13 +1615,13 @@ var Jt = {
1580
1615
  if (!e) return;
1581
1616
  if (!t) return e;
1582
1617
  let r = new Float64Array(e.length);
1583
- for (let t = 0; t < e.length; t++) r[t] = Ft(e[t], n) ?? NaN;
1618
+ for (let t = 0; t < e.length; t++) r[t] = Bt(e[t], n) ?? NaN;
1584
1619
  return r;
1585
1620
  }
1586
- let w = vt(() => f.tooltipValueFormat, () => f.yTickFormat), T = n(() => f.timezone ?? "utc"), E = n(() => {
1621
+ let w = St(() => f.tooltipValueFormat, () => f.yTickFormat), T = n(() => f.timezone ?? "utc"), E = n(() => {
1587
1622
  let e = T.value, t = !1, n = !1;
1588
1623
  for (let r of x(f)) {
1589
- if (n = !0, !Lt(r, e)) {
1624
+ if (n = !0, !Ht(r, e)) {
1590
1625
  t = !1;
1591
1626
  break;
1592
1627
  }
@@ -1647,7 +1682,7 @@ var Jt = {
1647
1682
  });
1648
1683
  function N(e) {
1649
1684
  let { min: t, max: n } = oe.value, r = n - t || 1;
1650
- return U.value.left + (e - t) / r * G.value;
1685
+ return W.value.left + (e - t) / r * K.value;
1651
1686
  }
1652
1687
  let se = n(() => {
1653
1688
  let e = Infinity, t = -Infinity, n = Infinity, r = (r) => {
@@ -1664,7 +1699,7 @@ var Jt = {
1664
1699
  range: 1
1665
1700
  };
1666
1701
  f.yMin != null && f.yMin < e && (e = f.yMin);
1667
- let i = xe(e, t, f.yScaleType, n);
1702
+ let i = be(e, t, f.yScaleType, n);
1668
1703
  return {
1669
1704
  min: i.min,
1670
1705
  max: i.max,
@@ -1673,7 +1708,7 @@ var Jt = {
1673
1708
  });
1674
1709
  function P(e) {
1675
1710
  let { min: t, max: n } = se.value;
1676
- return U.value.top + K.value - be(e, t, n, f.yScaleType) * K.value;
1711
+ return W.value.top + q.value - ye(e, t, n, f.yScaleType) * q.value;
1677
1712
  }
1678
1713
  function ce(e) {
1679
1714
  let t = e.data;
@@ -1721,10 +1756,10 @@ var Jt = {
1721
1756
  return N(r ? j(r, n) : n);
1722
1757
  }
1723
1758
  function de(e, t = !0) {
1724
- let n = U.value.top + K.value;
1759
+ let n = W.value.top + q.value;
1725
1760
  if (e.seriesIndex == null) {
1726
1761
  let t = F(e, "start"), r = F(e, "end");
1727
- return t > r ? "" : `M${t},${U.value.top}L${r},${U.value.top}L${r},${n}L${t},${n}Z`;
1762
+ return t > r ? "" : `M${t},${W.value.top}L${r},${W.value.top}L${r},${n}L${t},${n}Z`;
1728
1763
  }
1729
1764
  let r = O.value[e.seriesIndex];
1730
1765
  if (!r) return "";
@@ -1740,14 +1775,14 @@ var Jt = {
1740
1775
  labels: [],
1741
1776
  extraHeight: 0
1742
1777
  };
1743
- let t = [], n = U.value.left + G.value;
1778
+ let t = [], n = W.value.left + K.value;
1744
1779
  for (let r of e) {
1745
1780
  if (!r.label && !r.description || r.legend === "inline" || r.legend === !1) continue;
1746
- let e = r.label ?? "", i = r.description ?? "", a = Math.max(e.length, i.length) * jn, 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 = Te({
1781
+ let e = r.label ?? "", i = r.description ?? "", a = Math.max(e.length, i.length) * In, 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 = we({
1747
1782
  color: l,
1748
1783
  fontWeight: 600,
1749
1784
  ...r.inlineLabelStyle
1750
- }, { fontSize: 11 }), d = Te(r.inlineDescriptionStyle, {
1785
+ }, { fontSize: 11 }), d = we(r.inlineDescriptionStyle, {
1751
1786
  fontSize: 11,
1752
1787
  fillOpacity: .6
1753
1788
  });
@@ -1767,7 +1802,7 @@ var Jt = {
1767
1802
  let r = [];
1768
1803
  for (let e of t) {
1769
1804
  let t = e.cx - e.textWidth / 2, n = 0;
1770
- for (; n < r.length && !(t >= r[n] + Mn);) n++;
1805
+ for (; n < r.length && !(t >= r[n] + Ln);) n++;
1771
1806
  e.row = n;
1772
1807
  let i = e.cx + e.textWidth / 2;
1773
1808
  r[n] = Math.max(r[n] ?? -Infinity, i);
@@ -1777,7 +1812,7 @@ var Jt = {
1777
1812
  extraHeight: 0
1778
1813
  } : {
1779
1814
  labels: t,
1780
- extraHeight: (Math.max(...t.map((e) => e.row)) + 1) * kn + An
1815
+ extraHeight: (Math.max(...t.map((e) => e.row)) + 1) * Pn + Fn
1781
1816
  };
1782
1817
  }), pe = n(() => {
1783
1818
  let e = [];
@@ -1799,38 +1834,38 @@ var Jt = {
1799
1834
  });
1800
1835
  }
1801
1836
  return e;
1802
- }), me = n(() => pe.value.map((e) => e.label)), he = n(() => Pe.value + fe.value.extraHeight), I = n(() => U.value.top + K.value + U.value.bottom + An), _e = n(() => {
1803
- let { min: e, max: t } = se.value, n = (e) => f.yTickFormat === void 0 ? z(e) : re(e, f.yTickFormat);
1837
+ }), I = n(() => pe.value.map((e) => e.label)), me = n(() => U.value + fe.value.extraHeight), L = n(() => W.value.top + q.value + W.value.bottom + Fn), ge = n(() => {
1838
+ let { min: e, max: t } = se.value, n = (e) => f.yTickFormat === void 0 ? B(e) : re(e, f.yTickFormat);
1804
1839
  return e === t ? [{
1805
1840
  value: n(e),
1806
- y: L(U.value.top + K.value / 2)
1807
- }] : (f.yScaleType === "log" ? Se({
1841
+ y: R(W.value.top + q.value / 2)
1842
+ }] : (f.yScaleType === "log" ? xe({
1808
1843
  min: e,
1809
1844
  max: t,
1810
1845
  ticks: f.yTicks
1811
- }) : ye({
1846
+ }) : ve({
1812
1847
  min: e,
1813
1848
  max: t,
1814
1849
  ticks: f.yTicks,
1815
- targetTickCount: K.value / 50
1850
+ targetTickCount: q.value / 50
1816
1851
  })).map((e) => ({
1817
1852
  value: n(e),
1818
- y: L(P(e))
1853
+ y: R(P(e))
1819
1854
  }));
1820
1855
  });
1821
- function ve(e, t, n) {
1856
+ function _e(e, t, n) {
1822
1857
  let r = f.xTickFormat;
1823
- if (D.value) return typeof r == "function" ? r(e, t) : qt(e, r, T.value, n);
1858
+ if (D.value) return typeof r == "function" ? r(e, t) : Qt(e, r, T.value, n);
1824
1859
  let i = e + M.value;
1825
- return r === void 0 ? !A.value && f.xLabels && Number.isInteger(e) && e >= 0 && e < f.xLabels.length ? f.xLabels[e] : z(i) : typeof r == "function" ? r(i, t) : re(i, r);
1860
+ return r === void 0 ? !A.value && f.xLabels && Number.isInteger(e) && e >= 0 && e < f.xLabels.length ? f.xLabels[e] : B(i) : typeof r == "function" ? r(i, t) : re(i, r);
1826
1861
  }
1827
- let R = n(() => {
1862
+ let z = n(() => {
1828
1863
  let { min: e, max: t } = oe.value;
1829
1864
  if (e === t) return [];
1830
- let n = D.value, r = n ? 0 : M.value, i = k.value, a = G.value / 80, o, s;
1865
+ let n = D.value, r = n ? 0 : M.value, i = k.value, a = K.value / 80, o, s;
1831
1866
  if (n) {
1832
- let n = Vt(e, t, a, T.value);
1833
- s = n.unit, o = ye({
1867
+ let n = Kt(e, t, a, T.value);
1868
+ s = n.unit, o = ve({
1834
1869
  min: e,
1835
1870
  max: t,
1836
1871
  ticks: n.values
@@ -1839,31 +1874,31 @@ var Jt = {
1839
1874
  let e = Math.max(3, Math.floor(a)), t = Math.max(1, Math.round((i - 1) / e));
1840
1875
  o = [];
1841
1876
  for (let e = 0; e < i; e += t) o.push(e);
1842
- } else o = ye({
1877
+ } else o = ve({
1843
1878
  min: e,
1844
1879
  max: t,
1845
1880
  ticks: f.xTicks,
1846
1881
  targetTickCount: a,
1847
1882
  displayOffset: r
1848
1883
  });
1849
- let c = U.value.left, l = U.value.left + G.value;
1884
+ let c = W.value.left, l = W.value.left + K.value;
1850
1885
  return o.map((e, t) => {
1851
- let n = L(N(e)), r = "middle";
1886
+ let n = R(N(e)), r = "middle";
1852
1887
  return n - c <= 1 ? r = "start" : l - n <= 1 && (r = "end"), {
1853
- value: ve(e, t, s),
1888
+ value: _e(e, t, s),
1854
1889
  x: n,
1855
1890
  anchor: r
1856
1891
  };
1857
1892
  });
1858
1893
  });
1859
- function Ce() {
1860
- return typeof f.csv == "function" ? f.csv() : typeof f.csv == "string" ? f.csv : J(O.value);
1894
+ function Se() {
1895
+ return typeof f.csv == "function" ? f.csv() : typeof f.csv == "string" ? f.csv : Ye(O.value);
1861
1896
  }
1862
- let B = n(() => !!f.tooltipData || !!f.tooltipTrigger), Ee = n(() => {
1863
- let e = Le.value, t = O.value[0];
1897
+ let V = n(() => !!f.tooltipData || !!f.tooltipTrigger), Te = n(() => {
1898
+ let e = Ie.value, t = O.value[0];
1864
1899
  return e === null || !t ? null : j(t, e);
1865
- }), De = n(() => Ee.value === null ? 0 : N(Ee.value));
1866
- function Oe(e, t) {
1900
+ }), Ee = n(() => Te.value === null ? 0 : N(Te.value));
1901
+ function De(e, t) {
1867
1902
  let n = e.data.length;
1868
1903
  if (n === 0) return null;
1869
1904
  let r = 0, i = Infinity;
@@ -1875,13 +1910,13 @@ var Jt = {
1875
1910
  }
1876
1911
  return i === Infinity ? null : r;
1877
1912
  }
1878
- let ke = n(() => {
1879
- let e = Ee.value;
1913
+ let Oe = n(() => {
1914
+ let e = Te.value;
1880
1915
  if (e === null) return [];
1881
1916
  let t = [];
1882
1917
  for (let n of O.value) {
1883
1918
  if (n.showInTooltip === !1) continue;
1884
- let r = Oe(n, e);
1919
+ let r = De(n, e);
1885
1920
  if (r === null) continue;
1886
1921
  let i = n.data[r];
1887
1922
  isFinite(i) && t.push({
@@ -1891,14 +1926,14 @@ var Jt = {
1891
1926
  });
1892
1927
  }
1893
1928
  return t;
1894
- }), V = n(() => {
1895
- let e = Le.value, t = Ee.value;
1929
+ }), ke = n(() => {
1930
+ let e = Ie.value, t = Te.value;
1896
1931
  if (e === null || t === null) return null;
1897
- let n = ve(t, e), r = O.value, i = [];
1932
+ let n = _e(t, e), r = O.value, i = [];
1898
1933
  for (let e = 0; e < r.length; e++) {
1899
1934
  let n = r[e];
1900
1935
  if (n.showInTooltip === !1) continue;
1901
- let a = Oe(n, t);
1936
+ let a = De(n, t);
1902
1937
  i.push({
1903
1938
  value: a === null ? NaN : Number(n.data[a]),
1904
1939
  color: n.color ?? "currentColor",
@@ -1924,9 +1959,9 @@ var Jt = {
1924
1959
  let n = O.value[0];
1925
1960
  if (!n || n.data.length === 0) return null;
1926
1961
  let { min: r, max: i } = oe.value, a = i - r || 1;
1927
- return Oe(n, r + (e - t.left - U.value.left) / G.value * a);
1962
+ return De(n, r + (e - t.left - W.value.left) / K.value * a);
1928
1963
  }
1929
- let { containerRef: Me, svgRef: H, width: Ne, height: Pe, padding: U, legendY: W, inlineLegendLayout: Fe, innerW: G, innerH: K, bounds: Ie, hoverIndex: Le, tooltipRef: Re, tooltipPos: ze, tooltipHandlers: Be, menuItems: Ve, downloadLinkText: He, csvHref: Ue, downloadButtonText: q, triggerCsvDownload: We, menuFilename: Ge, isFullscreen: Ke, fullscreenStyle: qe, teleportTarget: Je, exitFullscreen: Ye } = _t({
1964
+ let { containerRef: Me, svgRef: H, width: Ne, height: U, padding: W, legendY: G, inlineLegendLayout: Pe, innerW: K, innerH: q, bounds: Fe, hoverIndex: Ie, tooltipRef: J, tooltipPos: Le, tooltipHandlers: Re, menuItems: ze, downloadLinkText: Be, csvHref: Ve, downloadButtonText: Y, triggerCsvDownload: He, menuFilename: Ue, isFullscreen: We, fullscreenStyle: Ge, teleportTarget: X, exitFullscreen: Ke } = xt({
1930
1965
  width: () => f.width,
1931
1966
  height: () => f.height,
1932
1967
  title: () => f.title,
@@ -1942,17 +1977,17 @@ var Jt = {
1942
1977
  downloadButton: () => f.downloadButton,
1943
1978
  fullscreenTarget: () => f.fullscreenTarget,
1944
1979
  chartPadding: () => f.chartPadding,
1945
- inlineLegendLabels: () => me.value,
1946
- hasTooltipSlot: () => B.value,
1947
- getCsv: Ce,
1980
+ inlineLegendLabels: () => I.value,
1981
+ hasTooltipSlot: () => V.value,
1982
+ getCsv: Se,
1948
1983
  pointerToIndex: je,
1949
1984
  onHover: (e) => ee("hover", e),
1950
1985
  extraBelowHeight: () => fe.value.extraHeight
1951
- }), Xe = n(() => Te(f.axisLabelStyle, { fontSize: 13 })), Y = n(() => Te(f.tickLabelStyle, {
1986
+ }), qe = n(() => we(f.axisLabelStyle, { fontSize: 13 })), Z = n(() => we(f.tickLabelStyle, {
1952
1987
  fontSize: 10,
1953
- fillOpacity: we
1954
- })), Ze = n(() => Te(f.legendStyle, { fontSize: 11 })), X = n(() => {
1955
- let e = f.titleStyle, t = e?.align ?? "left", n = Ie.value, r = t === "left" ? n.left : t === "right" ? n.right : n.left + n.width / 2, i = t === "left" ? "start" : t === "right" ? "end" : "middle";
1988
+ fillOpacity: Ce
1989
+ })), Je = n(() => we(f.legendStyle, { fontSize: 11 })), Xe = n(() => {
1990
+ let e = f.titleStyle, t = e?.align ?? "left", n = Fe.value, r = t === "left" ? n.left : t === "right" ? n.right : n.left + n.width / 2, i = t === "left" ? "start" : t === "right" ? "end" : "middle";
1956
1991
  return {
1957
1992
  lines: (f.title ?? "").split("\n"),
1958
1993
  fontSize: e?.fontSize ?? 14,
@@ -1962,8 +1997,8 @@ var Jt = {
1962
1997
  x: r,
1963
1998
  anchor: i
1964
1999
  };
1965
- }), Qe = n(() => {
1966
- let e = Fe.value.positions, t = U.value.left, n = W.value;
2000
+ }), Ze = n(() => {
2001
+ let e = Pe.value.positions, t = W.value.left, n = G.value;
1967
2002
  return pe.value.map((r, i) => {
1968
2003
  let a = e[i];
1969
2004
  return {
@@ -1974,48 +2009,48 @@ var Jt = {
1974
2009
  });
1975
2010
  });
1976
2011
  return (n, l) => (_(), r(t, {
1977
- to: S(Je),
1978
- disabled: !S(Ke)
2012
+ to: S(X),
2013
+ disabled: !S(We)
1979
2014
  }, [o("div", d({
1980
2015
  ref_key: "containerRef",
1981
2016
  ref: Me
1982
2017
  }, n.$attrs, {
1983
- class: ["line-chart-wrapper", { "is-fullscreen": S(Ke) }],
1984
- style: S(qe)
2018
+ class: ["line-chart-wrapper", { "is-fullscreen": S(We) }],
2019
+ style: S(Ge)
1985
2020
  }), [
1986
- c.menu ? (_(), r(ge, {
2021
+ c.menu ? (_(), r(he, {
1987
2022
  key: 0,
1988
- items: S(Ve),
1989
- "is-fullscreen": S(Ke),
1990
- onClose: S(Ye)
2023
+ items: S(ze),
2024
+ "is-fullscreen": S(We),
2025
+ onClose: S(Ke)
1991
2026
  }, null, 8, [
1992
2027
  "items",
1993
2028
  "is-fullscreen",
1994
2029
  "onClose"
1995
2030
  ])) : i("", !0),
1996
- o("div", Jt, b(S(Ke) ? "Chart expanded to fill window" : ""), 1),
2031
+ o("div", $t, b(S(We) ? "Chart expanded to fill window" : ""), 1),
1997
2032
  (_(), a("svg", {
1998
2033
  ref_key: "svgRef",
1999
2034
  ref: H,
2000
2035
  width: S(Ne),
2001
- height: he.value,
2036
+ height: me.value,
2002
2037
  role: g.value || void 0,
2003
2038
  "aria-label": p.value || void 0
2004
2039
  }, [
2005
2040
  c.title ? (_(), a("text", {
2006
2041
  key: 0,
2007
- x: X.value.x,
2008
- y: X.value.lineHeight,
2009
- "text-anchor": X.value.anchor,
2010
- "font-size": X.value.fontSize,
2011
- "font-weight": X.value.fontWeight,
2012
- fill: X.value.color
2013
- }, [(_(!0), a(e, null, y(X.value.lines, (e, t) => (_(), a("tspan", {
2042
+ x: Xe.value.x,
2043
+ y: Xe.value.lineHeight,
2044
+ "text-anchor": Xe.value.anchor,
2045
+ "font-size": Xe.value.fontSize,
2046
+ "font-weight": Xe.value.fontWeight,
2047
+ fill: Xe.value.color
2048
+ }, [(_(!0), a(e, null, y(Xe.value.lines, (e, t) => (_(), a("tspan", {
2014
2049
  key: t,
2015
- x: X.value.x,
2016
- dy: t === 0 ? 0 : X.value.lineHeight
2017
- }, b(e), 9, Zt))), 128))], 8, Xt)) : i("", !0),
2018
- Qe.value.length > 0 ? (_(), a("g", Qt, [(_(!0), a(e, null, y(Qe.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.type === "series" ? (_(), a("line", {
2050
+ x: Xe.value.x,
2051
+ dy: t === 0 ? 0 : Xe.value.lineHeight
2052
+ }, b(e), 9, nn))), 128))], 8, tn)) : i("", !0),
2053
+ Ze.value.length > 0 ? (_(), a("g", rn, [(_(!0), a(e, null, y(Ze.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.type === "series" ? (_(), a("line", {
2019
2054
  key: 0,
2020
2055
  x1: t.x,
2021
2056
  y1: t.y,
@@ -2024,7 +2059,7 @@ var Jt = {
2024
2059
  stroke: t.color,
2025
2060
  "stroke-width": "2",
2026
2061
  "stroke-dasharray": t.dashed ? "4 2" : void 0
2027
- }, null, 8, $t)) : (_(), a("circle", {
2062
+ }, null, 8, an)) : (_(), a("circle", {
2028
2063
  key: 1,
2029
2064
  cx: t.x + 4,
2030
2065
  cy: t.y,
@@ -2033,89 +2068,89 @@ var Jt = {
2033
2068
  "fill-opacity": t.fillOpacity,
2034
2069
  stroke: t.color,
2035
2070
  "stroke-width": "1.5"
2036
- }, null, 8, en)), o("text", {
2071
+ }, null, 8, on)), o("text", {
2037
2072
  x: t.x + 18,
2038
2073
  y: t.y + 4,
2039
- "font-size": Ze.value.fontSize,
2040
- fill: Ze.value.fill,
2041
- "font-weight": Ze.value.fontWeight
2042
- }, b(t.label), 9, tn)], 64))), 128))])) : i("", !0),
2074
+ "font-size": Je.value.fontSize,
2075
+ fill: Je.value.fill,
2076
+ "font-weight": Je.value.fontWeight
2077
+ }, b(t.label), 9, sn)], 64))), 128))])) : i("", !0),
2043
2078
  o("line", {
2044
- x1: S(L)(S(U).left),
2045
- y1: S(L)(S(U).top),
2046
- x2: S(L)(S(U).left),
2047
- y2: S(L)(S(U).top + S(K)),
2079
+ x1: S(R)(S(W).left),
2080
+ y1: S(R)(S(W).top),
2081
+ x2: S(R)(S(W).left),
2082
+ y2: S(R)(S(W).top + S(q)),
2048
2083
  stroke: "currentColor",
2049
2084
  "stroke-opacity": "0.3"
2050
- }, null, 8, nn),
2085
+ }, null, 8, cn),
2051
2086
  o("line", {
2052
- x1: S(L)(S(U).left),
2053
- y1: S(L)(S(U).top + S(K)),
2054
- x2: S(L)(S(U).left + S(G)),
2055
- y2: S(L)(S(U).top + S(K)),
2087
+ x1: S(R)(S(W).left),
2088
+ y1: S(R)(S(W).top + S(q)),
2089
+ x2: S(R)(S(W).left + S(K)),
2090
+ y2: S(R)(S(W).top + S(q)),
2056
2091
  stroke: "currentColor",
2057
2092
  "stroke-opacity": "0.3"
2058
- }, null, 8, rn),
2059
- c.yGrid ? (_(!0), a(e, { key: 2 }, y(_e.value, (e, t) => (_(), a("line", {
2093
+ }, null, 8, ln),
2094
+ c.yGrid ? (_(!0), a(e, { key: 2 }, y(ge.value, (e, t) => (_(), a("line", {
2060
2095
  key: "yg" + t,
2061
- x1: S(U).left,
2096
+ x1: S(W).left,
2062
2097
  y1: e.y,
2063
- x2: S(U).left + S(G),
2098
+ x2: S(W).left + S(K),
2064
2099
  y2: e.y,
2065
2100
  stroke: "currentColor",
2066
2101
  "stroke-opacity": "0.1"
2067
- }, null, 8, an))), 128)) : i("", !0),
2068
- c.xGrid ? (_(!0), a(e, { key: 3 }, y(R.value, (e, t) => (_(), a("line", {
2102
+ }, null, 8, un))), 128)) : i("", !0),
2103
+ c.xGrid ? (_(!0), a(e, { key: 3 }, y(z.value, (e, t) => (_(), a("line", {
2069
2104
  key: "xg" + t,
2070
2105
  x1: e.x,
2071
- y1: S(U).top,
2106
+ y1: S(W).top,
2072
2107
  x2: e.x,
2073
- y2: S(U).top + S(K),
2108
+ y2: S(W).top + S(q),
2074
2109
  stroke: "currentColor",
2075
2110
  "stroke-opacity": "0.1"
2076
- }, null, 8, on))), 128)) : i("", !0),
2077
- (_(!0), a(e, null, y(_e.value, (e, t) => (_(), a("text", {
2111
+ }, null, 8, dn))), 128)) : i("", !0),
2112
+ (_(!0), a(e, null, y(ge.value, (e, t) => (_(), a("text", {
2078
2113
  key: "y" + t,
2079
2114
  "data-testid": "y-tick",
2080
- x: S(U).left - 6,
2115
+ x: S(W).left - 6,
2081
2116
  y: e.y,
2082
2117
  "text-anchor": "end",
2083
2118
  "dominant-baseline": "middle",
2084
- "font-size": Y.value.fontSize,
2085
- fill: Y.value.fill,
2086
- "font-weight": Y.value.fontWeight,
2087
- "fill-opacity": Y.value.fillOpacity
2088
- }, b(e.value), 9, sn))), 128)),
2119
+ "font-size": Z.value.fontSize,
2120
+ fill: Z.value.fill,
2121
+ "font-weight": Z.value.fontWeight,
2122
+ "fill-opacity": Z.value.fillOpacity
2123
+ }, b(e.value), 9, fn))), 128)),
2089
2124
  c.yLabel ? (_(), a("text", {
2090
2125
  key: 4,
2091
2126
  x: 0,
2092
2127
  y: 0,
2093
- transform: `translate(14, ${S(U).top + S(K) / 2}) rotate(-90)`,
2128
+ transform: `translate(14, ${S(W).top + S(q) / 2}) rotate(-90)`,
2094
2129
  "text-anchor": "middle",
2095
- "font-size": Xe.value.fontSize,
2096
- fill: Xe.value.fill,
2097
- "font-weight": Xe.value.fontWeight
2098
- }, b(c.yLabel), 9, cn)) : i("", !0),
2099
- (_(!0), a(e, null, y(R.value, (e, t) => (_(), a("text", {
2130
+ "font-size": qe.value.fontSize,
2131
+ fill: qe.value.fill,
2132
+ "font-weight": qe.value.fontWeight
2133
+ }, b(c.yLabel), 9, pn)) : i("", !0),
2134
+ (_(!0), a(e, null, y(z.value, (e, t) => (_(), a("text", {
2100
2135
  key: "x" + t,
2101
2136
  "data-testid": "x-tick",
2102
2137
  x: e.x,
2103
- y: S(U).top + S(K) + 16,
2138
+ y: S(W).top + S(q) + 16,
2104
2139
  "text-anchor": e.anchor,
2105
- "font-size": Y.value.fontSize,
2106
- fill: Y.value.fill,
2107
- "font-weight": Y.value.fontWeight,
2108
- "fill-opacity": Y.value.fillOpacity
2109
- }, b(e.value), 9, ln))), 128)),
2140
+ "font-size": Z.value.fontSize,
2141
+ fill: Z.value.fill,
2142
+ "font-weight": Z.value.fontWeight,
2143
+ "fill-opacity": Z.value.fillOpacity
2144
+ }, b(e.value), 9, mn))), 128)),
2110
2145
  c.xLabel ? (_(), a("text", {
2111
2146
  key: 5,
2112
- x: S(U).left + S(G) / 2,
2113
- y: S(Pe) - 4,
2147
+ x: S(W).left + S(K) / 2,
2148
+ y: S(U) - 4,
2114
2149
  "text-anchor": "middle",
2115
- "font-size": Xe.value.fontSize,
2116
- fill: Xe.value.fill,
2117
- "font-weight": Xe.value.fontWeight
2118
- }, b(c.xLabel), 9, un)) : i("", !0),
2150
+ "font-size": qe.value.fontSize,
2151
+ fill: qe.value.fill,
2152
+ "font-weight": qe.value.fontWeight
2153
+ }, b(c.xLabel), 9, hn)) : i("", !0),
2119
2154
  (_(!0), a(e, null, y(ie.value, (e, t) => (_(), a("path", {
2120
2155
  key: "area" + t,
2121
2156
  d: ue(e),
@@ -2123,7 +2158,7 @@ var Jt = {
2123
2158
  "fill-opacity": e.opacity ?? .2,
2124
2159
  stroke: "none",
2125
2160
  style: h(e.blendMode ? { mixBlendMode: e.blendMode } : void 0)
2126
- }, null, 12, dn))), 128)),
2161
+ }, null, 12, $))), 128)),
2127
2162
  (_(!0), a(e, null, y(O.value, (t, n) => (_(), a(e, { key: n }, [
2128
2163
  t.line !== !1 && t.outline ? (_(), a("path", {
2129
2164
  key: 0,
@@ -2134,7 +2169,7 @@ var Jt = {
2134
2169
  "stroke-linecap": "round",
2135
2170
  "stroke-linejoin": "round",
2136
2171
  "data-testid": "line-outline"
2137
- }, null, 8, fn)) : i("", !0),
2172
+ }, null, 8, gn)) : i("", !0),
2138
2173
  t.line === !1 ? i("", !0) : (_(), a("path", {
2139
2174
  key: 1,
2140
2175
  d: ce(t),
@@ -2144,7 +2179,7 @@ var Jt = {
2144
2179
  "stroke-opacity": t.lineOpacity ?? t.opacity ?? c.lineOpacity,
2145
2180
  "stroke-dasharray": t.dashed ? "6 3" : void 0,
2146
2181
  style: h(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
2147
- }, null, 12, pn)),
2182
+ }, null, 12, _n)),
2148
2183
  t.dots ? (_(!0), a(e, { key: 2 }, y(le(t), (e, n) => (_(), a("circle", {
2149
2184
  key: n,
2150
2185
  cx: e.x,
@@ -2154,7 +2189,7 @@ var Jt = {
2154
2189
  "fill-opacity": t.dotOpacity ?? t.opacity ?? c.lineOpacity,
2155
2190
  stroke: t.dotStroke ?? "none",
2156
2191
  style: h(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
2157
- }, null, 12, mn))), 128)) : i("", !0)
2192
+ }, null, 12, vn))), 128)) : i("", !0)
2158
2193
  ], 64))), 128)),
2159
2194
  (_(!0), a(e, null, y(c.areaSections ?? [], (t, n) => (_(), a(e, { key: "areasec" + n }, [
2160
2195
  o("path", {
@@ -2162,7 +2197,7 @@ var Jt = {
2162
2197
  fill: t.color ?? (t.seriesIndex == null ? "#999" : O.value[t.seriesIndex]?.color ?? "currentColor"),
2163
2198
  "fill-opacity": t.opacity ?? .15,
2164
2199
  stroke: "none"
2165
- }, null, 8, $),
2200
+ }, null, 8, yn),
2166
2201
  t.seriesIndex == null ? i("", !0) : (_(), a("path", {
2167
2202
  key: 0,
2168
2203
  d: de(t, !1),
@@ -2170,53 +2205,53 @@ var Jt = {
2170
2205
  stroke: t.color ?? O.value[t.seriesIndex]?.color ?? "currentColor",
2171
2206
  "stroke-width": t.strokeWidth ?? 2,
2172
2207
  "stroke-dasharray": t.dashed ? "6 3" : void 0
2173
- }, null, 8, hn)),
2208
+ }, null, 8, bn)),
2174
2209
  t.seriesIndex == null ? (_(), a(e, { key: 1 }, [o("line", {
2175
- x1: S(L)(F(t, "start")),
2176
- y1: S(U).top,
2177
- x2: S(L)(F(t, "start")),
2178
- y2: S(U).top + S(K),
2210
+ x1: S(R)(F(t, "start")),
2211
+ y1: S(W).top,
2212
+ x2: S(R)(F(t, "start")),
2213
+ y2: S(W).top + S(q),
2179
2214
  stroke: t.color ?? "#999",
2180
2215
  "stroke-width": t.strokeWidth ?? 2,
2181
2216
  "stroke-dasharray": t.dashed ? "6 3" : void 0
2182
- }, null, 8, gn), o("line", {
2183
- x1: S(L)(F(t, "end")),
2184
- y1: S(U).top,
2185
- x2: S(L)(F(t, "end")),
2186
- y2: S(U).top + S(K),
2217
+ }, null, 8, xn), o("line", {
2218
+ x1: S(R)(F(t, "end")),
2219
+ y1: S(W).top,
2220
+ x2: S(R)(F(t, "end")),
2221
+ y2: S(W).top + S(q),
2187
2222
  stroke: t.color ?? "#999",
2188
2223
  "stroke-width": t.strokeWidth ?? 2,
2189
2224
  "stroke-dasharray": t.dashed ? "6 3" : void 0
2190
- }, null, 8, _n)], 64)) : i("", !0),
2225
+ }, null, 8, Sn)], 64)) : i("", !0),
2191
2226
  o("line", {
2192
- x1: S(L)(F(t, "start")),
2193
- y1: S(U).top + S(K) - 4,
2194
- x2: S(L)(F(t, "start")),
2195
- y2: S(U).top + S(K) + 4,
2227
+ x1: S(R)(F(t, "start")),
2228
+ y1: S(W).top + S(q) - 4,
2229
+ x2: S(R)(F(t, "start")),
2230
+ y2: S(W).top + S(q) + 4,
2196
2231
  stroke: "currentColor",
2197
2232
  "stroke-opacity": "0.4"
2198
- }, null, 8, vn),
2233
+ }, null, 8, Cn),
2199
2234
  o("line", {
2200
- x1: S(L)(F(t, "end")),
2201
- y1: S(U).top + S(K) - 4,
2202
- x2: S(L)(F(t, "end")),
2203
- y2: S(U).top + S(K) + 4,
2235
+ x1: S(R)(F(t, "end")),
2236
+ y1: S(W).top + S(q) - 4,
2237
+ x2: S(R)(F(t, "end")),
2238
+ y2: S(W).top + S(q) + 4,
2204
2239
  stroke: "currentColor",
2205
2240
  "stroke-opacity": "0.4"
2206
- }, null, 8, yn)
2241
+ }, null, 8, wn)
2207
2242
  ], 64))), 128)),
2208
- B.value && S(Le) !== null ? (_(), a("line", {
2243
+ V.value && S(Ie) !== null ? (_(), a("line", {
2209
2244
  key: 6,
2210
- x1: S(L)(De.value),
2211
- y1: S(U).top,
2212
- x2: S(L)(De.value),
2213
- y2: S(U).top + S(K),
2245
+ x1: S(R)(Ee.value),
2246
+ y1: S(W).top,
2247
+ x2: S(R)(Ee.value),
2248
+ y2: S(W).top + S(q),
2214
2249
  stroke: "currentColor",
2215
2250
  "stroke-opacity": "0.3",
2216
2251
  "stroke-dasharray": "4 2",
2217
2252
  "pointer-events": "none"
2218
- }, null, 8, bn)) : i("", !0),
2219
- (_(!0), a(e, null, y(ke.value, (e, t) => (_(), a("circle", {
2253
+ }, null, 8, Tn)) : i("", !0),
2254
+ (_(!0), a(e, null, y(Oe.value, (e, t) => (_(), a("circle", {
2220
2255
  key: "hd" + t,
2221
2256
  cx: e.x,
2222
2257
  cy: e.y,
@@ -2225,167 +2260,167 @@ var Jt = {
2225
2260
  stroke: "var(--color-bg-0, #fff)",
2226
2261
  "stroke-width": "2",
2227
2262
  "pointer-events": "none"
2228
- }, null, 8, xn))), 128)),
2229
- B.value ? (_(), a("rect", d({
2263
+ }, null, 8, En))), 128)),
2264
+ V.value ? (_(), a("rect", d({
2230
2265
  key: 7,
2231
- x: S(U).left,
2232
- y: S(U).top,
2233
- width: S(G),
2234
- height: S(K),
2266
+ x: S(W).left,
2267
+ y: S(W).top,
2268
+ width: S(K),
2269
+ height: S(q),
2235
2270
  fill: "transparent",
2236
2271
  style: {
2237
2272
  cursor: "crosshair",
2238
2273
  "touch-action": "pan-y"
2239
2274
  }
2240
- }, ne(S(Be), !0)), null, 16, Sn)) : i("", !0),
2241
- c.annotations && c.annotations.length > 0 ? (_(), r(S(mt), {
2275
+ }, ne(S(Re), !0)), null, 16, Dn)) : i("", !0),
2276
+ c.annotations && c.annotations.length > 0 ? (_(), r(S(vt), {
2242
2277
  key: 8,
2243
2278
  annotations: c.annotations,
2244
2279
  project: Ae,
2245
- bounds: S(Ie)
2280
+ bounds: S(Fe)
2246
2281
  }, null, 8, ["annotations", "bounds"])) : i("", !0),
2247
2282
  (_(!0), a(e, null, y(fe.value.labels, (e, t) => (_(), a("g", { key: "seclab" + t }, [
2248
2283
  o("circle", {
2249
2284
  cx: e.cx - e.textWidth / 2 - 2,
2250
- cy: I.value + e.row * kn + 4,
2285
+ cy: L.value + e.row * Pn + 4,
2251
2286
  r: "4",
2252
2287
  fill: e.color,
2253
2288
  "fill-opacity": e.fillOpacity,
2254
2289
  stroke: e.color,
2255
2290
  "stroke-width": "1.5"
2256
- }, null, 8, Cn),
2291
+ }, null, 8, On),
2257
2292
  e.labelText ? (_(), a("text", {
2258
2293
  key: 0,
2259
2294
  x: e.cx - e.textWidth / 2 + 8,
2260
- y: I.value + e.row * kn + 8,
2295
+ y: L.value + e.row * Pn + 8,
2261
2296
  "font-size": e.labelStyle.fontSize,
2262
2297
  "font-weight": e.labelStyle.fontWeight,
2263
2298
  fill: e.labelStyle.fill
2264
- }, b(e.labelText), 9, wn)) : i("", !0),
2299
+ }, b(e.labelText), 9, kn)) : i("", !0),
2265
2300
  e.descText ? (_(), a("text", {
2266
2301
  key: 1,
2267
2302
  x: e.cx - e.textWidth / 2 + 8,
2268
- y: I.value + e.row * kn + 22,
2303
+ y: L.value + e.row * Pn + 22,
2269
2304
  "font-size": e.descStyle.fontSize,
2270
2305
  "font-weight": e.descStyle.fontWeight,
2271
2306
  fill: e.descStyle.fill,
2272
2307
  "fill-opacity": e.descStyle.fillOpacity
2273
- }, b(e.descText), 9, Tn)) : i("", !0)
2308
+ }, b(e.descText), 9, An)) : i("", !0)
2274
2309
  ]))), 128))
2275
- ], 8, Yt)),
2276
- B.value && S(Le) !== null && V.value ? (_(), a("div", {
2310
+ ], 8, en)),
2311
+ V.value && S(Ie) !== null && ke.value ? (_(), a("div", {
2277
2312
  key: 1,
2278
2313
  ref_key: "tooltipRef",
2279
- ref: Re,
2314
+ ref: J,
2280
2315
  class: "chart-tooltip-content",
2281
2316
  style: h({
2282
2317
  position: "absolute",
2283
2318
  top: "0",
2284
2319
  left: "0",
2285
2320
  willChange: "transform",
2286
- transform: S(ze) ? `translate3d(${S(ze).left}px, ${S(ze).top}px, 0) translateY(-50%)` : "translateY(-50%)",
2287
- visibility: S(ze) ? "visible" : "hidden"
2321
+ transform: S(Le) ? `translate3d(${S(Le).left}px, ${S(Le).top}px, 0) translateY(-50%)` : "translateY(-50%)",
2322
+ visibility: S(Le) ? "visible" : "hidden"
2288
2323
  })
2289
- }, [te(n.$slots, "tooltip", m(u(V.value)), () => [o("div", En, [V.value.xLabel ? (_(), a("div", Dn, b(V.value.xLabel), 1)) : i("", !0), (_(!0), a(e, null, y(V.value.values, (e) => (_(), a("div", {
2324
+ }, [te(n.$slots, "tooltip", m(u(ke.value)), () => [o("div", jn, [ke.value.xLabel ? (_(), a("div", Mn, b(ke.value.xLabel), 1)) : i("", !0), (_(!0), a(e, null, y(ke.value.values, (e) => (_(), a("div", {
2290
2325
  key: e.seriesIndex,
2291
2326
  class: "line-chart-tooltip-row"
2292
2327
  }, [o("span", {
2293
2328
  class: "line-chart-tooltip-swatch",
2294
2329
  style: h({ background: e.color })
2295
2330
  }, null, 4), s(" " + b(isFinite(e.value) ? S(w)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
2296
- S(He) ? (_(), a("a", {
2331
+ S(Be) ? (_(), a("a", {
2297
2332
  key: 2,
2298
2333
  class: "line-chart-download-link",
2299
- href: S(Ue),
2300
- download: `${S(Ge)()}.csv`
2301
- }, b(S(He)), 9, On)) : i("", !0),
2302
- S(q) ? (_(), a("button", {
2334
+ href: S(Ve),
2335
+ download: `${S(Ue)()}.csv`
2336
+ }, b(S(Be)), 9, Nn)) : i("", !0),
2337
+ S(Y) ? (_(), a("button", {
2303
2338
  key: 3,
2304
2339
  type: "button",
2305
2340
  class: "line-chart-download-button",
2306
- onClick: l[0] ||= (...e) => S(We) && S(We)(...e)
2307
- }, b(S(q)), 1)) : i("", !0)
2341
+ onClick: l[0] ||= (...e) => S(He) && S(He)(...e)
2342
+ }, b(S(Y)), 1)) : i("", !0)
2308
2343
  ], 16)], 8, ["to", "disabled"]));
2309
2344
  }
2310
- }), [["__scopeId", "data-v-a3132bed"]]), Pn = {
2345
+ }), [["__scopeId", "data-v-a3132bed"]]), zn = {
2311
2346
  class: "chart-sr-only",
2312
2347
  "aria-live": "polite"
2313
- }, Fn = [
2348
+ }, Bn = [
2314
2349
  "width",
2315
2350
  "height",
2316
2351
  "role",
2317
2352
  "aria-label"
2318
- ], In = [
2353
+ ], Vn = [
2319
2354
  "x",
2320
2355
  "y",
2321
2356
  "text-anchor",
2322
2357
  "font-size",
2323
2358
  "font-weight",
2324
2359
  "fill"
2325
- ], Ln = ["x", "dy"], Rn = [
2360
+ ], Hn = ["x", "dy"], Un = [
2326
2361
  "data-testid",
2327
2362
  "x",
2328
2363
  "y",
2329
2364
  "text-anchor",
2330
2365
  "font-size",
2331
2366
  "fill"
2332
- ], zn = { key: 1 }, Bn = [
2367
+ ], Wn = { key: 1 }, Gn = [
2333
2368
  "x",
2334
2369
  "y",
2335
2370
  "fill"
2336
- ], Vn = [
2371
+ ], Kn = [
2337
2372
  "x1",
2338
2373
  "y1",
2339
2374
  "x2",
2340
2375
  "y2",
2341
2376
  "stroke",
2342
2377
  "stroke-dasharray"
2343
- ], Hn = [
2378
+ ], qn = [
2344
2379
  "x",
2345
2380
  "y",
2346
2381
  "font-size",
2347
2382
  "fill",
2348
2383
  "font-weight"
2349
- ], Un = [
2384
+ ], Jn = [
2350
2385
  "x1",
2351
2386
  "y1",
2352
2387
  "x2",
2353
2388
  "y2"
2354
- ], Wn = [
2389
+ ], Yn = [
2355
2390
  "x1",
2356
2391
  "y1",
2357
2392
  "x2",
2358
2393
  "y2"
2359
- ], Gn = [
2394
+ ], Xn = [
2360
2395
  "x1",
2361
2396
  "y1",
2362
2397
  "x2",
2363
2398
  "y2"
2364
- ], Kn = [
2399
+ ], Zn = [
2365
2400
  "x",
2366
2401
  "y",
2367
2402
  "width",
2368
2403
  "height"
2369
- ], qn = [
2404
+ ], Qn = [
2370
2405
  "x",
2371
2406
  "y",
2372
2407
  "font-size",
2373
2408
  "fill",
2374
2409
  "font-weight",
2375
2410
  "fill-opacity"
2376
- ], Jn = [
2411
+ ], $n = [
2377
2412
  "x",
2378
2413
  "y",
2379
2414
  "font-size",
2380
2415
  "fill",
2381
2416
  "font-weight",
2382
2417
  "fill-opacity"
2383
- ], Yn = [
2418
+ ], er = [
2384
2419
  "transform",
2385
2420
  "font-size",
2386
2421
  "fill",
2387
2422
  "font-weight"
2388
- ], Xn = [
2423
+ ], tr = [
2389
2424
  "x",
2390
2425
  "y",
2391
2426
  "text-anchor",
@@ -2393,7 +2428,7 @@ var Jt = {
2393
2428
  "fill",
2394
2429
  "font-weight",
2395
2430
  "fill-opacity"
2396
- ], Zn = [
2431
+ ], nr = [
2397
2432
  "x",
2398
2433
  "y",
2399
2434
  "text-anchor",
@@ -2401,13 +2436,13 @@ var Jt = {
2401
2436
  "fill",
2402
2437
  "font-weight",
2403
2438
  "fill-opacity"
2404
- ], Qn = [
2439
+ ], rr = [
2405
2440
  "x",
2406
2441
  "y",
2407
2442
  "font-size",
2408
2443
  "fill",
2409
2444
  "font-weight"
2410
- ], $n = [
2445
+ ], ir = [
2411
2446
  "data-category",
2412
2447
  "data-series",
2413
2448
  "x",
@@ -2416,34 +2451,34 @@ var Jt = {
2416
2451
  "height",
2417
2452
  "fill",
2418
2453
  "fill-opacity"
2419
- ], er = [
2454
+ ], ar = [
2420
2455
  "x",
2421
2456
  "y",
2422
2457
  "text-anchor",
2423
2458
  "font-size",
2424
2459
  "font-weight",
2425
2460
  "fill"
2426
- ], tr = [
2461
+ ], or = [
2427
2462
  "d",
2428
2463
  "stroke",
2429
2464
  "stroke-width",
2430
2465
  "stroke-opacity",
2431
2466
  "stroke-dasharray"
2432
- ], nr = [
2467
+ ], sr = [
2433
2468
  "cx",
2434
2469
  "cy",
2435
2470
  "r",
2436
2471
  "fill",
2437
2472
  "fill-opacity"
2438
- ], rr = [
2473
+ ], cr = [
2439
2474
  "x",
2440
2475
  "y",
2441
2476
  "width",
2442
2477
  "height"
2443
- ], ir = { class: "bar-chart-tooltip" }, ar = {
2478
+ ], lr = { class: "bar-chart-tooltip" }, ur = {
2444
2479
  key: 0,
2445
2480
  class: "bar-chart-tooltip-label"
2446
- }, or = ["href", "download"], sr = 22, cr = 2, lr = 11, ur = .6, dr = 4, fr = 4, pr = /* @__PURE__ */ I(/* @__PURE__ */ l({
2481
+ }, dr = ["href", "download"], fr = 22, pr = 2, mr = 11, hr = .6, gr = 4, _r = 4, vr = /* @__PURE__ */ L(/* @__PURE__ */ l({
2447
2482
  inheritAttrs: !1,
2448
2483
  __name: "BarChart",
2449
2484
  props: {
@@ -2533,9 +2568,9 @@ var Jt = {
2533
2568
  return t;
2534
2569
  }), E = n(() => {
2535
2570
  let e = f.categories;
2536
- if (!e || e.length === 0 || !Lt(e, "utc")) return null;
2571
+ if (!e || e.length === 0 || !Ht(e, "utc")) return null;
2537
2572
  let t = Array(e.length);
2538
- for (let n = 0; n < e.length; n++) t[n] = Ft(e[n], "utc") ?? NaN;
2573
+ for (let n = 0; n < e.length; n++) t[n] = Bt(e[n], "utc") ?? NaN;
2539
2574
  return t;
2540
2575
  }), D = n(() => f.orientation === "vertical"), O = n(() => {
2541
2576
  let e = Infinity, t = -Infinity, n = Infinity, r = (e) => {
@@ -2559,13 +2594,13 @@ var Jt = {
2559
2594
  isFinite(e) || (e = 0), isFinite(t) || (t = 0);
2560
2595
  let i = f.valueMin ?? 0;
2561
2596
  f.valueScaleType === "log" ? i > 0 && i < e && (e = i) : i < e && (e = i);
2562
- let a = xe(e, t, f.valueScaleType, n);
2597
+ let a = be(e, t, f.valueScaleType, n);
2563
2598
  return {
2564
2599
  min: a.min,
2565
2600
  max: a.max,
2566
2601
  range: a.max - a.min || 1
2567
2602
  };
2568
- }), ie = n(() => D.value ? U.value : W.value), k = n(() => D.value ? W.value : U.value), A = n(() => {
2603
+ }), ie = n(() => D.value ? W.value : G.value), k = n(() => D.value ? G.value : W.value), A = n(() => {
2569
2604
  let e = w.value;
2570
2605
  return e > 0 ? ie.value / e : 0;
2571
2606
  }), j = n(() => A.value * (1 - f.barPadding)), ae = n(() => {
@@ -2583,8 +2618,8 @@ var Jt = {
2583
2618
  return N(Math.max(e, Math.min(t, n)));
2584
2619
  });
2585
2620
  function N(e) {
2586
- let { min: t, max: n } = O.value, r = be(e, t, n, f.valueScaleType);
2587
- return D.value ? H.value.top + W.value - r * W.value : H.value.left + r * U.value;
2621
+ let { min: t, max: n } = O.value, r = ye(e, t, n, f.valueScaleType);
2622
+ return D.value ? H.value.top + G.value - r * G.value : H.value.left + r * W.value;
2588
2623
  }
2589
2624
  function se(e, t, n, r, i, a, o, s, c, l) {
2590
2625
  let u = Math.min(e, t), d = Math.abs(e - t);
@@ -2624,17 +2659,17 @@ var Jt = {
2624
2659
  let n = t[c], l = Number(n.data[i] ?? NaN);
2625
2660
  if (!isFinite(l)) continue;
2626
2661
  let u = l >= 0 ? o : s, d = u + l;
2627
- e.push(se(N(u), N(d), r, a, n.color ?? me(c), n.opacity ?? 1, n.blendMode, l, i, c)), l >= 0 ? o = d : s = d;
2662
+ e.push(se(N(u), N(d), r, a, n.color ?? I(c), n.opacity ?? 1, n.blendMode, l, i, c)), l >= 0 ? o = d : s = d;
2628
2663
  }
2629
2664
  } else if (f.layout === "overlay") for (let o = 0; o < n; o++) {
2630
2665
  let n = t[o], s = Number(n.data[i] ?? NaN);
2631
- isFinite(s) && e.push(se(c, N(s), r, a, n.color ?? me(o), n.opacity ?? 1, n.blendMode, s, i, o));
2666
+ isFinite(s) && e.push(se(c, N(s), r, a, n.color ?? I(o), n.opacity ?? 1, n.blendMode, s, i, o));
2632
2667
  }
2633
2668
  else for (let a = 0; a < n; a++) {
2634
2669
  let s = t[a], l = Number(s.data[i] ?? NaN);
2635
2670
  if (!isFinite(l)) continue;
2636
2671
  let u = r + (n === 1 ? 0 : a * (o + f.groupGap));
2637
- e.push(se(c, N(l), u, o, s.color ?? me(a), s.opacity ?? 1, s.blendMode, l, i, a));
2672
+ e.push(se(c, N(l), u, o, s.color ?? I(a), s.opacity ?? 1, s.blendMode, l, i, a));
2638
2673
  }
2639
2674
  }
2640
2675
  return e;
@@ -2654,9 +2689,9 @@ var Jt = {
2654
2689
  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;
2655
2690
  return D.value ? {
2656
2691
  x: r,
2657
- y: H.value.top + W.value - a * W.value
2692
+ y: H.value.top + G.value - a * G.value
2658
2693
  } : {
2659
- x: H.value.left + a * U.value,
2694
+ x: H.value.left + a * W.value,
2660
2695
  y: r
2661
2696
  };
2662
2697
  }
@@ -2709,36 +2744,36 @@ var Jt = {
2709
2744
  "var(--color-info, #6366f1)",
2710
2745
  "var(--color-warning, #d97706)"
2711
2746
  ];
2712
- function me(e) {
2747
+ function I(e) {
2713
2748
  return pe[e % pe.length];
2714
2749
  }
2715
- let he = vt(() => f.tooltipValueFormat, () => f.valueTickFormat), I = n(() => {
2716
- let { min: e, max: t } = O.value, n = (e) => f.valueTickFormat === void 0 ? z(e) : re(e, f.valueTickFormat);
2750
+ let me = St(() => f.tooltipValueFormat, () => f.valueTickFormat), L = n(() => {
2751
+ let { min: e, max: t } = O.value, n = (e) => f.valueTickFormat === void 0 ? B(e) : re(e, f.valueTickFormat);
2717
2752
  if (e === t) return [{
2718
2753
  value: n(e),
2719
- pos: L(N(e))
2754
+ pos: R(N(e))
2720
2755
  }];
2721
2756
  let r = D.value ? 50 : 80;
2722
- return (f.valueScaleType === "log" ? Se({
2757
+ return (f.valueScaleType === "log" ? xe({
2723
2758
  min: e,
2724
2759
  max: t,
2725
2760
  ticks: f.valueTicks
2726
- }) : ye({
2761
+ }) : ve({
2727
2762
  min: e,
2728
2763
  max: t,
2729
2764
  ticks: f.valueTicks,
2730
2765
  targetTickCount: k.value / r
2731
2766
  })).map((e) => ({
2732
2767
  value: n(e),
2733
- pos: L(N(e))
2768
+ pos: R(N(e))
2734
2769
  }));
2735
- }), _e = n(() => {
2770
+ }), ge = n(() => {
2736
2771
  let e = w.value, t = E.value;
2737
2772
  if (t && t.length > 0) {
2738
2773
  let e = Infinity, n = -Infinity;
2739
2774
  for (let r of t) Number.isFinite(r) && (r < e && (e = r), r > n && (n = r));
2740
2775
  if (!Number.isFinite(e) || e === n) return [];
2741
- let r = D.value ? U.value : W.value, i = Math.max(2, Math.floor(r / 80)), a = Vt(e, n, i, "utc"), o = a.unit, s = [], c = /* @__PURE__ */ new Set();
2776
+ let r = D.value ? W.value : G.value, i = Math.max(2, Math.floor(r / 80)), a = Kt(e, n, i, "utc"), o = a.unit, s = [], c = /* @__PURE__ */ new Set();
2742
2777
  for (let e of a.values) {
2743
2778
  let n = -1, r = Infinity;
2744
2779
  for (let i = 0; i < t.length; i++) {
@@ -2747,7 +2782,7 @@ var Jt = {
2747
2782
  }
2748
2783
  if (n < 0 || c.has(n)) continue;
2749
2784
  c.add(n);
2750
- let i = M(n) + A.value / 2, a = f.categoryFormat ? f.categoryFormat(T.value[n], n) : qt(t[n], f.dateFormat, "utc", o);
2785
+ let i = M(n) + A.value / 2, a = f.categoryFormat ? f.categoryFormat(T.value[n], n) : Qt(t[n], f.dateFormat, "utc", o);
2751
2786
  s.push({
2752
2787
  label: a,
2753
2788
  pos: i,
@@ -2768,12 +2803,12 @@ var Jt = {
2768
2803
  });
2769
2804
  }
2770
2805
  return n;
2771
- }), ve = n(() => {
2806
+ }), _e = n(() => {
2772
2807
  let e = [];
2773
2808
  return C.value.forEach((t, n) => {
2774
2809
  !t.legend || t.showInLegend === !1 || e.push({
2775
2810
  label: t.legend,
2776
- color: t.color ?? me(n),
2811
+ color: t.color ?? I(n),
2777
2812
  kind: "bar"
2778
2813
  });
2779
2814
  }), ue.value.forEach((t) => {
@@ -2784,18 +2819,18 @@ var Jt = {
2784
2819
  dashed: t.dashed
2785
2820
  });
2786
2821
  }), e;
2787
- }), R = n(() => ve.value.map((e) => e.label));
2788
- function Ce() {
2822
+ }), z = n(() => _e.value.map((e) => e.label));
2823
+ function Se() {
2789
2824
  if (typeof f.csv == "function") return f.csv();
2790
2825
  if (typeof f.csv == "string") return f.csv;
2791
2826
  let e = C.value.map((e) => ({
2792
2827
  label: e.legend,
2793
2828
  data: e.data
2794
2829
  }));
2795
- return Je(T.value, e);
2830
+ return Xe(T.value, e);
2796
2831
  }
2797
- let B = n(() => !!f.tooltipData || !!f.tooltipTrigger);
2798
- function Ee(e, t) {
2832
+ let V = n(() => !!f.tooltipData || !!f.tooltipTrigger);
2833
+ function Te(e, t) {
2799
2834
  if (!isFinite(e) || !isFinite(t) || A.value === 0) return null;
2800
2835
  let n = (D.value ? H.value.left : H.value.top) + (e + .5) * A.value, r = N(t);
2801
2836
  return D.value ? {
@@ -2806,16 +2841,16 @@ var Jt = {
2806
2841
  y: n
2807
2842
  };
2808
2843
  }
2809
- function De(e, t) {
2810
- let n = V.value?.getBoundingClientRect();
2844
+ function Ee(e, t) {
2845
+ let n = ke.value?.getBoundingClientRect();
2811
2846
  if (!n) return null;
2812
2847
  let r = w.value;
2813
2848
  if (r === 0 || A.value === 0) return null;
2814
2849
  let i = D.value ? e - n.left - H.value.left : t - n.top - H.value.top;
2815
2850
  return Math.max(0, Math.min(r - 1, Math.floor(i / A.value)));
2816
2851
  }
2817
- let Oe = n(() => !!(f.categoryHeader || f.valueHeader)), ke = n(() => {
2818
- let e = Oe.value ? sr : 0, t = f.chartPadding;
2852
+ let De = n(() => !!(f.categoryHeader || f.valueHeader)), Oe = n(() => {
2853
+ let e = De.value ? fr : 0, t = f.chartPadding;
2819
2854
  return e ? t == null ? { top: e } : typeof t == "number" ? {
2820
2855
  top: t + e,
2821
2856
  right: t,
@@ -2825,7 +2860,7 @@ var Jt = {
2825
2860
  ...t,
2826
2861
  top: (t.top ?? 0) + e
2827
2862
  } : t;
2828
- }), { containerRef: V, svgRef: Ae, width: je, height: Me, padding: H, legendY: Ne, inlineLegendLayout: Pe, innerW: U, innerH: W, bounds: Fe, hoverIndex: G, tooltipRef: K, tooltipPos: Ie, tooltipHandlers: Le, menuItems: Re, downloadLinkText: ze, csvHref: Be, downloadButtonText: Ve, triggerCsvDownload: He, menuFilename: Ue, isFullscreen: q, fullscreenStyle: We, teleportTarget: Ge, exitFullscreen: Ke } = _t({
2863
+ }), { containerRef: ke, svgRef: Ae, width: je, height: Me, padding: H, legendY: Ne, inlineLegendLayout: U, innerW: W, innerH: G, bounds: Pe, hoverIndex: K, tooltipRef: q, tooltipPos: Fe, tooltipHandlers: Ie, menuItems: J, downloadLinkText: Le, csvHref: Re, downloadButtonText: ze, triggerCsvDownload: Be, menuFilename: Ve, isFullscreen: Y, fullscreenStyle: He, teleportTarget: Ue, exitFullscreen: We } = xt({
2829
2864
  width: () => f.width,
2830
2865
  height: () => f.height,
2831
2866
  title: () => f.title,
@@ -2840,18 +2875,18 @@ var Jt = {
2840
2875
  downloadLink: () => f.downloadLink,
2841
2876
  downloadButton: () => f.downloadButton,
2842
2877
  fullscreenTarget: () => f.fullscreenTarget,
2843
- chartPadding: () => ke.value,
2844
- inlineLegendLabels: () => R.value,
2845
- hasTooltipSlot: () => B.value,
2846
- getCsv: Ce,
2847
- pointerToIndex: De,
2878
+ chartPadding: () => Oe.value,
2879
+ inlineLegendLabels: () => z.value,
2880
+ hasTooltipSlot: () => V.value,
2881
+ getCsv: Se,
2882
+ pointerToIndex: Ee,
2848
2883
  scrubAxis: () => D.value ? "x" : "y",
2849
2884
  onHover: (e) => ee("hover", e)
2850
- }), qe = n(() => Te(f.axisLabelStyle, { fontSize: 13 })), J = n(() => Te(f.tickLabelStyle, {
2885
+ }), Ge = n(() => we(f.axisLabelStyle, { fontSize: 13 })), X = n(() => we(f.tickLabelStyle, {
2851
2886
  fontSize: 10,
2852
- fillOpacity: we
2853
- })), Ye = n(() => Te(f.legendStyle, { fontSize: 11 })), Xe = n(() => f.categoryAlign === "start" && !D.value ? cr : H.value.left), Y = n(() => {
2854
- let e = f.titleStyle, t = e?.align ?? "left", n = Fe.value, r = t === "left" ? Xe.value : t === "right" ? n.right : n.left + n.width / 2, i = t === "left" ? "start" : t === "right" ? "end" : "middle";
2887
+ fillOpacity: Ce
2888
+ })), Ke = n(() => we(f.legendStyle, { fontSize: 11 })), qe = n(() => f.categoryAlign === "start" && !D.value ? pr : H.value.left), Z = n(() => {
2889
+ let e = f.titleStyle, t = e?.align ?? "left", n = Pe.value, r = t === "left" ? qe.value : t === "right" ? n.right : n.left + n.width / 2, i = t === "left" ? "start" : t === "right" ? "end" : "middle";
2855
2890
  return {
2856
2891
  lines: (f.title ?? "").split("\n"),
2857
2892
  fontSize: e?.fontSize ?? 14,
@@ -2861,20 +2896,20 @@ var Jt = {
2861
2896
  x: r,
2862
2897
  anchor: i
2863
2898
  };
2864
- }), Ze = n(() => {
2865
- let e = G.value;
2899
+ }), Je = n(() => {
2900
+ let e = K.value;
2866
2901
  if (e === null) return;
2867
2902
  let t = E.value;
2868
- return t && Number.isFinite(t[e]) ? qt(t[e], f.dateFormat, "utc") : T.value[e];
2869
- }), X = n(() => {
2870
- let e = G.value;
2903
+ return t && Number.isFinite(t[e]) ? Qt(t[e], f.dateFormat, "utc") : T.value[e];
2904
+ }), Ye = n(() => {
2905
+ let e = K.value;
2871
2906
  if (e === null) return null;
2872
2907
  let t = C.value, n = [];
2873
2908
  for (let r = 0; r < t.length; r++) {
2874
2909
  let i = t[r];
2875
2910
  i.showInTooltip !== !1 && n.push({
2876
2911
  value: Number(i.data[e] ?? NaN),
2877
- color: i.color ?? me(r),
2912
+ color: i.color ?? I(r),
2878
2913
  seriesIndex: r
2879
2914
  });
2880
2915
  }
@@ -2884,24 +2919,24 @@ var Jt = {
2884
2919
  values: n,
2885
2920
  data: f.tooltipData?.[e] ?? null
2886
2921
  };
2887
- }), Qe = n(() => {
2888
- let e = G.value;
2922
+ }), Ze = n(() => {
2923
+ let e = K.value;
2889
2924
  if (e === null) return null;
2890
2925
  let t = M(e);
2891
2926
  return D.value ? {
2892
2927
  x: t,
2893
2928
  y: H.value.top,
2894
2929
  w: A.value,
2895
- h: W.value
2930
+ h: G.value
2896
2931
  } : {
2897
2932
  x: H.value.left,
2898
2933
  y: t,
2899
- w: U.value,
2934
+ w: W.value,
2900
2935
  h: A.value
2901
2936
  };
2902
- }), $e = n(() => {
2903
- let e = Pe.value.positions, t = Xe.value, n = Ne.value;
2904
- return ve.value.map((r, i) => {
2937
+ }), Qe = n(() => {
2938
+ let e = U.value.positions, t = qe.value, n = Ne.value;
2939
+ return _e.value.map((r, i) => {
2905
2940
  let a = e[i];
2906
2941
  return {
2907
2942
  ...r,
@@ -2909,7 +2944,7 @@ var Jt = {
2909
2944
  y: n + a.row * 20
2910
2945
  };
2911
2946
  });
2912
- }), et = n(() => {
2947
+ }), $e = n(() => {
2913
2948
  let e = f.barLabels;
2914
2949
  if (!e) return null;
2915
2950
  let t = e === !0 ? {} : e;
@@ -2920,37 +2955,37 @@ var Jt = {
2920
2955
  align: t.align ?? "center",
2921
2956
  overlap: t.overlap ?? "shift",
2922
2957
  minSize: t.minSize ?? 0,
2923
- fontSize: t.fontSize ?? lr,
2958
+ fontSize: t.fontSize ?? mr,
2924
2959
  fontWeight: t.fontWeight
2925
2960
  };
2926
2961
  });
2927
- function tt(e, t) {
2928
- let n = et.value?.format;
2929
- return typeof n == "function" ? n(e, t) : n === void 0 ? f.valueTickFormat === void 0 ? z(e) : re(e, f.valueTickFormat) : re(e, n);
2962
+ function et(e, t) {
2963
+ let n = $e.value?.format;
2964
+ return typeof n == "function" ? n(e, t) : n === void 0 ? f.valueTickFormat === void 0 ? B(e) : re(e, f.valueTickFormat) : re(e, n);
2930
2965
  }
2931
- function nt(e, t, n) {
2966
+ function tt(e, t, n) {
2932
2967
  for (let r = P.value.length - 1; r >= 0; r--) {
2933
2968
  let i = P.value[r];
2934
2969
  if (i.categoryIndex === e && t >= i.x && t <= i.x + i.w && n >= i.y && n <= i.y + i.h) return i.color;
2935
2970
  }
2936
2971
  return null;
2937
2972
  }
2938
- let rt = n(() => {
2939
- let e = et.value;
2973
+ let nt = n(() => {
2974
+ let e = $e.value;
2940
2975
  if (!e) return [];
2941
2976
  let t = D.value, n = e.fontSize, r = [];
2942
2977
  for (let i of P.value) {
2943
- let a = tt(i.value, {
2978
+ let a = et(i.value, {
2944
2979
  value: i.value,
2945
2980
  categoryIndex: i.categoryIndex,
2946
2981
  seriesIndex: i.seriesIndex,
2947
2982
  category: T.value[i.categoryIndex] ?? String(i.categoryIndex)
2948
2983
  });
2949
2984
  if (!a) continue;
2950
- let o = t ? i.h : i.w, s = a.length * n * ur, c = o >= s + 2 * dr && 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;
2951
- if (f = t ? i.x + i.w / 2 : i.y + i.h / 2, !l) u = m + dr, d = u + g, p = "start";
2952
- else if (e.align === "start") u = h + dr, d = u + g, p = "start";
2953
- else if (e.align === "end") d = m - dr, u = d - g, p = "end";
2985
+ let o = t ? i.h : i.w, s = a.length * n * hr, c = o >= s + 2 * gr && 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;
2986
+ if (f = t ? i.x + i.w / 2 : i.y + i.h / 2, !l) u = m + gr, d = u + g, p = "start";
2987
+ else if (e.align === "start") u = h + gr, d = u + g, p = "start";
2988
+ else if (e.align === "end") d = m - gr, u = d - g, p = "end";
2954
2989
  else {
2955
2990
  let e = (m + h) / 2;
2956
2991
  u = e - g / 2, d = e + g / 2, p = "middle";
@@ -2976,12 +3011,12 @@ var Jt = {
2976
3011
  t.sort((e, t) => e.lo - t.lo);
2977
3012
  let n = -Infinity;
2978
3013
  for (let r of t) {
2979
- if (r.lo < n + fr) {
3014
+ if (r.lo < n + _r) {
2980
3015
  if (e.overlap === "hide") {
2981
3016
  r.hidden = !0;
2982
3017
  continue;
2983
3018
  }
2984
- let t = n + fr - r.lo;
3019
+ let t = n + _r - r.lo;
2985
3020
  r.lo += t, r.hi += t, r.inside = !1, r.svgAnchor = "start";
2986
3021
  }
2987
3022
  if (r.hi > i) {
@@ -2998,10 +3033,10 @@ var Jt = {
2998
3033
  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);
2999
3034
  let l;
3000
3035
  if (!o) l = e.color;
3001
- else if (i.inside) l = wt(i.bar.color);
3036
+ else if (i.inside) l = Ot(i.bar.color);
3002
3037
  else {
3003
- let e = t ? i.cross : (i.lo + i.hi) / 2, n = t ? -((i.lo + i.hi) / 2) : i.cross, r = nt(i.bar.categoryIndex, e, n);
3004
- l = r ? wt(r) : "currentColor";
3038
+ let e = t ? i.cross : (i.lo + i.hi) / 2, n = t ? -((i.lo + i.hi) / 2) : i.cross, r = tt(i.bar.categoryIndex, e, n);
3039
+ l = r ? Ot(r) : "currentColor";
3005
3040
  }
3006
3041
  s.push({
3007
3042
  key: `${i.bar.categoryIndex}-${i.bar.seriesIndex}`,
@@ -3015,23 +3050,23 @@ var Jt = {
3015
3050
  });
3016
3051
  }
3017
3052
  return s;
3018
- }), it = n(() => {
3053
+ }), rt = n(() => {
3019
3054
  let e = H.value.left - 6;
3020
3055
  switch (f.categoryAlign ?? "end") {
3021
3056
  case "start": return {
3022
3057
  anchor: "start",
3023
- x: cr
3058
+ x: pr
3024
3059
  };
3025
3060
  case "center": return {
3026
3061
  anchor: "middle",
3027
- x: (cr + e) / 2
3062
+ x: (pr + e) / 2
3028
3063
  };
3029
3064
  default: return {
3030
3065
  anchor: "end",
3031
3066
  x: e
3032
3067
  };
3033
3068
  }
3034
- }), at = n(() => {
3069
+ }), it = n(() => {
3035
3070
  let e = [], t = H.value.top - 7;
3036
3071
  if (f.valueHeader && e.push({
3037
3072
  key: "vh",
@@ -3040,7 +3075,7 @@ var Jt = {
3040
3075
  y: t,
3041
3076
  anchor: "start"
3042
3077
  }), f.categoryHeader) {
3043
- let n = !D.value, r = it.value;
3078
+ let n = !D.value, r = rt.value;
3044
3079
  e.push({
3045
3080
  key: "ch",
3046
3081
  text: f.categoryHeader,
@@ -3052,26 +3087,26 @@ var Jt = {
3052
3087
  return e;
3053
3088
  });
3054
3089
  return (n, l) => (_(), r(t, {
3055
- to: S(Ge),
3056
- disabled: !S(q)
3090
+ to: S(Ue),
3091
+ disabled: !S(Y)
3057
3092
  }, [o("div", d({
3058
3093
  ref_key: "containerRef",
3059
- ref: V
3094
+ ref: ke
3060
3095
  }, n.$attrs, {
3061
- class: ["bar-chart-wrapper", { "is-fullscreen": S(q) }],
3062
- style: S(We)
3096
+ class: ["bar-chart-wrapper", { "is-fullscreen": S(Y) }],
3097
+ style: S(He)
3063
3098
  }), [
3064
- c.menu ? (_(), r(ge, {
3099
+ c.menu ? (_(), r(he, {
3065
3100
  key: 0,
3066
- items: S(Re),
3067
- "is-fullscreen": S(q),
3068
- onClose: S(Ke)
3101
+ items: S(J),
3102
+ "is-fullscreen": S(Y),
3103
+ onClose: S(We)
3069
3104
  }, null, 8, [
3070
3105
  "items",
3071
3106
  "is-fullscreen",
3072
3107
  "onClose"
3073
3108
  ])) : i("", !0),
3074
- o("div", Pn, b(S(q) ? "Chart expanded to fill window" : ""), 1),
3109
+ o("div", zn, b(S(Y) ? "Chart expanded to fill window" : ""), 1),
3075
3110
  (_(), a("svg", {
3076
3111
  ref_key: "svgRef",
3077
3112
  ref: Ae,
@@ -3082,35 +3117,35 @@ var Jt = {
3082
3117
  }, [
3083
3118
  c.title ? (_(), a("text", {
3084
3119
  key: 0,
3085
- x: Y.value.x,
3086
- y: Y.value.lineHeight,
3087
- "text-anchor": Y.value.anchor,
3088
- "font-size": Y.value.fontSize,
3089
- "font-weight": Y.value.fontWeight,
3090
- fill: Y.value.color
3091
- }, [(_(!0), a(e, null, y(Y.value.lines, (e, t) => (_(), a("tspan", {
3120
+ x: Z.value.x,
3121
+ y: Z.value.lineHeight,
3122
+ "text-anchor": Z.value.anchor,
3123
+ "font-size": Z.value.fontSize,
3124
+ "font-weight": Z.value.fontWeight,
3125
+ fill: Z.value.color
3126
+ }, [(_(!0), a(e, null, y(Z.value.lines, (e, t) => (_(), a("tspan", {
3092
3127
  key: t,
3093
- x: Y.value.x,
3094
- dy: t === 0 ? 0 : Y.value.lineHeight
3095
- }, b(e), 9, Ln))), 128))], 8, In)) : i("", !0),
3096
- (_(!0), a(e, null, y(at.value, (e) => (_(), a("text", {
3128
+ x: Z.value.x,
3129
+ dy: t === 0 ? 0 : Z.value.lineHeight
3130
+ }, b(e), 9, Hn))), 128))], 8, Vn)) : i("", !0),
3131
+ (_(!0), a(e, null, y(it.value, (e) => (_(), a("text", {
3097
3132
  key: e.key,
3098
3133
  "data-testid": e.key === "ch" ? "category-header" : "value-header",
3099
3134
  x: e.x,
3100
3135
  y: e.y,
3101
3136
  "text-anchor": e.anchor,
3102
- "font-size": qe.value.fontSize,
3103
- fill: qe.value.fill,
3137
+ "font-size": Ge.value.fontSize,
3138
+ fill: Ge.value.fill,
3104
3139
  "font-weight": "600"
3105
- }, b(e.text), 9, Rn))), 128)),
3106
- $e.value.length > 0 ? (_(), a("g", zn, [(_(!0), a(e, null, y($e.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.kind === "bar" ? (_(), a("rect", {
3140
+ }, b(e.text), 9, Un))), 128)),
3141
+ Qe.value.length > 0 ? (_(), a("g", Wn, [(_(!0), a(e, null, y(Qe.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.kind === "bar" ? (_(), a("rect", {
3107
3142
  key: 0,
3108
3143
  x: t.x,
3109
3144
  y: t.y - 5,
3110
3145
  width: "12",
3111
3146
  height: "10",
3112
3147
  fill: t.color
3113
- }, null, 8, Bn)) : (_(), a("line", {
3148
+ }, null, 8, Gn)) : (_(), a("line", {
3114
3149
  key: 1,
3115
3150
  x1: t.x,
3116
3151
  y1: t.y,
@@ -3119,113 +3154,113 @@ var Jt = {
3119
3154
  stroke: t.color,
3120
3155
  "stroke-width": "2",
3121
3156
  "stroke-dasharray": t.dashed ? "4 2" : void 0
3122
- }, null, 8, Vn)), o("text", {
3157
+ }, null, 8, Kn)), o("text", {
3123
3158
  x: t.x + 18,
3124
3159
  y: t.y + 4,
3125
- "font-size": Ye.value.fontSize,
3126
- fill: Ye.value.fill,
3127
- "font-weight": Ye.value.fontWeight
3128
- }, b(t.label), 9, Hn)], 64))), 128))])) : i("", !0),
3160
+ "font-size": Ke.value.fontSize,
3161
+ fill: Ke.value.fill,
3162
+ "font-weight": Ke.value.fontWeight
3163
+ }, b(t.label), 9, qn)], 64))), 128))])) : i("", !0),
3129
3164
  !D.value || c.valueAxis ? (_(), a("line", {
3130
3165
  key: 2,
3131
- x1: S(L)(S(H).left),
3132
- y1: S(L)(S(H).top),
3133
- x2: S(L)(S(H).left),
3134
- y2: S(L)(S(H).top + S(W)),
3166
+ x1: S(R)(S(H).left),
3167
+ y1: S(R)(S(H).top),
3168
+ x2: S(R)(S(H).left),
3169
+ y2: S(R)(S(H).top + S(G)),
3135
3170
  stroke: "currentColor",
3136
3171
  "stroke-opacity": "0.3"
3137
- }, null, 8, Un)) : i("", !0),
3172
+ }, null, 8, Jn)) : i("", !0),
3138
3173
  D.value || c.valueAxis ? (_(), a("line", {
3139
3174
  key: 3,
3140
- x1: S(L)(S(H).left),
3141
- y1: S(L)(S(H).top + S(W)),
3142
- x2: S(L)(S(H).left + S(U)),
3143
- y2: S(L)(S(H).top + S(W)),
3175
+ x1: S(R)(S(H).left),
3176
+ y1: S(R)(S(H).top + S(G)),
3177
+ x2: S(R)(S(H).left + S(W)),
3178
+ y2: S(R)(S(H).top + S(G)),
3144
3179
  stroke: "currentColor",
3145
3180
  "stroke-opacity": "0.3"
3146
- }, null, 8, Wn)) : i("", !0),
3147
- c.valueGrid && c.valueAxis ? (_(!0), a(e, { key: 4 }, y(I.value, (e, t) => (_(), a("line", {
3181
+ }, null, 8, Yn)) : i("", !0),
3182
+ c.valueGrid && c.valueAxis ? (_(!0), a(e, { key: 4 }, y(L.value, (e, t) => (_(), a("line", {
3148
3183
  key: "vg" + t,
3149
3184
  x1: D.value ? S(H).left : e.pos,
3150
3185
  y1: D.value ? e.pos : S(H).top,
3151
- x2: D.value ? S(H).left + S(U) : e.pos,
3152
- y2: D.value ? e.pos : S(H).top + S(W),
3186
+ x2: D.value ? S(H).left + S(W) : e.pos,
3187
+ y2: D.value ? e.pos : S(H).top + S(G),
3153
3188
  stroke: "currentColor",
3154
3189
  "stroke-opacity": "0.1"
3155
- }, null, 8, Gn))), 128)) : i("", !0),
3156
- Qe.value && B.value ? (_(), a("rect", {
3190
+ }, null, 8, Xn))), 128)) : i("", !0),
3191
+ Ze.value && V.value ? (_(), a("rect", {
3157
3192
  key: 5,
3158
- x: Qe.value.x,
3159
- y: Qe.value.y,
3160
- width: Qe.value.w,
3161
- height: Qe.value.h,
3193
+ x: Ze.value.x,
3194
+ y: Ze.value.y,
3195
+ width: Ze.value.w,
3196
+ height: Ze.value.h,
3162
3197
  fill: "currentColor",
3163
3198
  "fill-opacity": "0.06",
3164
3199
  "pointer-events": "none"
3165
- }, null, 8, Kn)) : i("", !0),
3166
- c.valueAxis && D.value ? (_(!0), a(e, { key: 6 }, y(I.value, (e, t) => (_(), a("text", {
3200
+ }, null, 8, Zn)) : i("", !0),
3201
+ c.valueAxis && D.value ? (_(!0), a(e, { key: 6 }, y(L.value, (e, t) => (_(), a("text", {
3167
3202
  key: "vt" + t,
3168
3203
  "data-testid": "value-tick",
3169
3204
  x: S(H).left - 6,
3170
3205
  y: e.pos,
3171
3206
  "text-anchor": "end",
3172
3207
  "dominant-baseline": "middle",
3173
- "font-size": J.value.fontSize,
3174
- fill: J.value.fill,
3175
- "font-weight": J.value.fontWeight,
3176
- "fill-opacity": J.value.fillOpacity
3177
- }, b(e.value), 9, qn))), 128)) : c.valueAxis ? (_(!0), a(e, { key: 7 }, y(I.value, (e, t) => (_(), a("text", {
3208
+ "font-size": X.value.fontSize,
3209
+ fill: X.value.fill,
3210
+ "font-weight": X.value.fontWeight,
3211
+ "fill-opacity": X.value.fillOpacity
3212
+ }, b(e.value), 9, Qn))), 128)) : c.valueAxis ? (_(!0), a(e, { key: 7 }, y(L.value, (e, t) => (_(), a("text", {
3178
3213
  key: "vt" + t,
3179
3214
  "data-testid": "value-tick",
3180
3215
  x: e.pos,
3181
- y: S(H).top + S(W) + 16,
3216
+ y: S(H).top + S(G) + 16,
3182
3217
  "text-anchor": "middle",
3183
- "font-size": J.value.fontSize,
3184
- fill: J.value.fill,
3185
- "font-weight": J.value.fontWeight,
3186
- "fill-opacity": J.value.fillOpacity
3187
- }, b(e.value), 9, Jn))), 128)) : i("", !0),
3218
+ "font-size": X.value.fontSize,
3219
+ fill: X.value.fill,
3220
+ "font-weight": X.value.fontWeight,
3221
+ "fill-opacity": X.value.fillOpacity
3222
+ }, b(e.value), 9, $n))), 128)) : i("", !0),
3188
3223
  c.yLabel ? (_(), a("text", {
3189
3224
  key: 8,
3190
3225
  x: 0,
3191
3226
  y: 0,
3192
- transform: `translate(14, ${S(H).top + S(W) / 2}) rotate(-90)`,
3227
+ transform: `translate(14, ${S(H).top + S(G) / 2}) rotate(-90)`,
3193
3228
  "text-anchor": "middle",
3194
- "font-size": qe.value.fontSize,
3195
- fill: qe.value.fill,
3196
- "font-weight": qe.value.fontWeight
3197
- }, b(c.yLabel), 9, Yn)) : i("", !0),
3198
- D.value ? (_(!0), a(e, { key: 9 }, y(_e.value, (e, t) => (_(), a("text", {
3229
+ "font-size": Ge.value.fontSize,
3230
+ fill: Ge.value.fill,
3231
+ "font-weight": Ge.value.fontWeight
3232
+ }, b(c.yLabel), 9, er)) : i("", !0),
3233
+ D.value ? (_(!0), a(e, { key: 9 }, y(ge.value, (e, t) => (_(), a("text", {
3199
3234
  key: "ct" + t,
3200
3235
  "data-testid": "category-tick",
3201
3236
  x: e.pos,
3202
- y: S(H).top + S(W) + 16,
3237
+ y: S(H).top + S(G) + 16,
3203
3238
  "text-anchor": e.anchor,
3204
- "font-size": J.value.fontSize,
3205
- fill: J.value.fill,
3206
- "font-weight": J.value.fontWeight,
3207
- "fill-opacity": J.value.fillOpacity
3208
- }, b(e.label), 9, Xn))), 128)) : (_(!0), a(e, { key: 10 }, y(_e.value, (e, t) => (_(), a("text", {
3239
+ "font-size": X.value.fontSize,
3240
+ fill: X.value.fill,
3241
+ "font-weight": X.value.fontWeight,
3242
+ "fill-opacity": X.value.fillOpacity
3243
+ }, b(e.label), 9, tr))), 128)) : (_(!0), a(e, { key: 10 }, y(ge.value, (e, t) => (_(), a("text", {
3209
3244
  key: "ct" + t,
3210
3245
  "data-testid": "category-tick",
3211
- x: it.value.x,
3246
+ x: rt.value.x,
3212
3247
  y: e.pos,
3213
- "text-anchor": it.value.anchor,
3248
+ "text-anchor": rt.value.anchor,
3214
3249
  "dominant-baseline": "middle",
3215
- "font-size": J.value.fontSize,
3216
- fill: J.value.fill,
3217
- "font-weight": J.value.fontWeight,
3218
- "fill-opacity": J.value.fillOpacity
3219
- }, b(e.label), 9, Zn))), 128)),
3250
+ "font-size": X.value.fontSize,
3251
+ fill: X.value.fill,
3252
+ "font-weight": X.value.fontWeight,
3253
+ "fill-opacity": X.value.fillOpacity
3254
+ }, b(e.label), 9, nr))), 128)),
3220
3255
  c.xLabel ? (_(), a("text", {
3221
3256
  key: 11,
3222
- x: S(H).left + S(U) / 2,
3257
+ x: S(H).left + S(W) / 2,
3223
3258
  y: S(Me) - 4,
3224
3259
  "text-anchor": "middle",
3225
- "font-size": qe.value.fontSize,
3226
- fill: qe.value.fill,
3227
- "font-weight": qe.value.fontWeight
3228
- }, b(c.xLabel), 9, Qn)) : i("", !0),
3260
+ "font-size": Ge.value.fontSize,
3261
+ fill: Ge.value.fill,
3262
+ "font-weight": Ge.value.fontWeight
3263
+ }, b(c.xLabel), 9, rr)) : i("", !0),
3229
3264
  (_(!0), a(e, null, y(P.value, (e, t) => (_(), a("rect", {
3230
3265
  key: "bar" + t,
3231
3266
  "data-testid": "bar",
@@ -3238,8 +3273,8 @@ var Jt = {
3238
3273
  fill: e.color,
3239
3274
  "fill-opacity": e.opacity,
3240
3275
  style: h(e.blendMode ? { mixBlendMode: e.blendMode } : void 0)
3241
- }, null, 12, $n))), 128)),
3242
- (_(!0), a(e, null, y(rt.value, (e) => (_(), a("text", {
3276
+ }, null, 12, ir))), 128)),
3277
+ (_(!0), a(e, null, y(nt.value, (e) => (_(), a("text", {
3243
3278
  key: "blbl" + e.key,
3244
3279
  "data-testid": "bar-label",
3245
3280
  x: e.x,
@@ -3250,7 +3285,7 @@ var Jt = {
3250
3285
  "font-weight": e.fontWeight,
3251
3286
  fill: e.fill,
3252
3287
  "pointer-events": "none"
3253
- }, b(e.text), 9, er))), 128)),
3288
+ }, b(e.text), 9, ar))), 128)),
3254
3289
  (_(!0), a(e, null, y(F.value, (t, n) => (_(), a(e, { key: "sl" + n }, [t.pathD ? (_(), a("path", {
3255
3290
  key: 0,
3256
3291
  "data-testid": "summary-line",
@@ -3263,7 +3298,7 @@ var Jt = {
3263
3298
  "stroke-linecap": "round",
3264
3299
  "stroke-linejoin": "round",
3265
3300
  style: h(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
3266
- }, null, 12, tr)) : i("", !0), t.dots ? (_(!0), a(e, { key: 1 }, y(t.points, (e, r) => (_(), a("circle", {
3301
+ }, null, 12, or)) : i("", !0), t.dots ? (_(!0), a(e, { key: 1 }, y(t.points, (e, r) => (_(), a("circle", {
3267
3302
  key: "sld" + n + "-" + r,
3268
3303
  cx: e.x,
3269
3304
  cy: e.y,
@@ -3271,58 +3306,58 @@ var Jt = {
3271
3306
  fill: t.color,
3272
3307
  "fill-opacity": t.opacity,
3273
3308
  style: h(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
3274
- }, null, 12, nr))), 128)) : i("", !0)], 64))), 128)),
3275
- B.value ? (_(), a("rect", d({
3309
+ }, null, 12, sr))), 128)) : i("", !0)], 64))), 128)),
3310
+ V.value ? (_(), a("rect", d({
3276
3311
  key: 12,
3277
3312
  x: S(H).left,
3278
3313
  y: S(H).top,
3279
- width: S(U),
3280
- height: S(W),
3314
+ width: S(W),
3315
+ height: S(G),
3281
3316
  fill: "transparent",
3282
3317
  style: `cursor: crosshair; touch-action: ${D.value ? "pan-y" : "pan-x"}`
3283
- }, ne(S(Le), !0)), null, 16, rr)) : i("", !0),
3284
- c.annotations && c.annotations.length > 0 ? (_(), r(S(mt), {
3318
+ }, ne(S(Ie), !0)), null, 16, cr)) : i("", !0),
3319
+ c.annotations && c.annotations.length > 0 ? (_(), r(S(vt), {
3285
3320
  key: 13,
3286
3321
  annotations: c.annotations,
3287
- project: Ee,
3288
- bounds: S(Fe)
3322
+ project: Te,
3323
+ bounds: S(Pe)
3289
3324
  }, null, 8, ["annotations", "bounds"])) : i("", !0)
3290
- ], 8, Fn)),
3291
- B.value && S(G) !== null && X.value ? (_(), a("div", {
3325
+ ], 8, Bn)),
3326
+ V.value && S(K) !== null && Ye.value ? (_(), a("div", {
3292
3327
  key: 1,
3293
3328
  ref_key: "tooltipRef",
3294
- ref: K,
3329
+ ref: q,
3295
3330
  class: "chart-tooltip-content",
3296
3331
  style: h({
3297
3332
  position: "absolute",
3298
3333
  top: "0",
3299
3334
  left: "0",
3300
3335
  willChange: "transform",
3301
- transform: S(Ie) ? `translate3d(${S(Ie).left}px, ${S(Ie).top}px, 0) translateY(-50%)` : "translateY(-50%)",
3302
- visibility: S(Ie) ? "visible" : "hidden"
3336
+ transform: S(Fe) ? `translate3d(${S(Fe).left}px, ${S(Fe).top}px, 0) translateY(-50%)` : "translateY(-50%)",
3337
+ visibility: S(Fe) ? "visible" : "hidden"
3303
3338
  })
3304
- }, [te(n.$slots, "tooltip", m(u(X.value)), () => [o("div", ir, [Ze.value ? (_(), a("div", ar, b(Ze.value), 1)) : i("", !0), (_(!0), a(e, null, y(X.value.values, (e) => (_(), a("div", {
3339
+ }, [te(n.$slots, "tooltip", m(u(Ye.value)), () => [o("div", lr, [Je.value ? (_(), a("div", ur, b(Je.value), 1)) : i("", !0), (_(!0), a(e, null, y(Ye.value.values, (e) => (_(), a("div", {
3305
3340
  key: e.seriesIndex,
3306
3341
  class: "bar-chart-tooltip-row"
3307
3342
  }, [o("span", {
3308
3343
  class: "bar-chart-tooltip-swatch",
3309
3344
  style: h({ background: e.color })
3310
- }, null, 4), s(" " + b(isFinite(e.value) ? S(he)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
3311
- S(ze) ? (_(), a("a", {
3345
+ }, null, 4), s(" " + b(isFinite(e.value) ? S(me)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
3346
+ S(Le) ? (_(), a("a", {
3312
3347
  key: 2,
3313
3348
  class: "bar-chart-download-link",
3314
- href: S(Be),
3315
- download: `${S(Ue)()}.csv`
3316
- }, b(S(ze)), 9, or)) : i("", !0),
3317
- S(Ve) ? (_(), a("button", {
3349
+ href: S(Re),
3350
+ download: `${S(Ve)()}.csv`
3351
+ }, b(S(Le)), 9, dr)) : i("", !0),
3352
+ S(ze) ? (_(), a("button", {
3318
3353
  key: 3,
3319
3354
  type: "button",
3320
3355
  class: "bar-chart-download-button",
3321
- onClick: l[0] ||= (...e) => S(He) && S(He)(...e)
3322
- }, b(S(Ve)), 1)) : i("", !0)
3356
+ onClick: l[0] ||= (...e) => S(Be) && S(Be)(...e)
3357
+ }, b(S(ze)), 1)) : i("", !0)
3323
3358
  ], 16)], 8, ["to", "disabled"]));
3324
3359
  }
3325
- }), [["__scopeId", "data-v-251f7945"]]), mr = {
3360
+ }), [["__scopeId", "data-v-251f7945"]]), yr = {
3326
3361
  ref: "root",
3327
3362
  class: "chart-tooltip-content",
3328
3363
  style: {
@@ -3334,7 +3369,7 @@ var Jt = {
3334
3369
  "pointer-events": "none",
3335
3370
  transform: "translateY(-50%)"
3336
3371
  }
3337
- }, hr = /* @__PURE__ */ l({
3372
+ }, br = /* @__PURE__ */ l({
3338
3373
  __name: "ChoroplethTooltip",
3339
3374
  setup(e, { expose: n }) {
3340
3375
  let a = v(null), s = w("root");
@@ -3345,24 +3380,24 @@ var Jt = {
3345
3380
  getEl() {
3346
3381
  return s.value;
3347
3382
  }
3348
- }), (e, n) => (_(), r(t, { to: "body" }, [o("div", mr, [a.value ? te(e.$slots, "default", m(d({ key: 0 }, a.value))) : i("", !0)], 512)]));
3383
+ }), (e, n) => (_(), r(t, { to: "body" }, [o("div", yr, [a.value ? te(e.$slots, "default", m(d({ key: 0 }, a.value))) : i("", !0)], 512)]));
3349
3384
  }
3350
- }), gr = ["role", "aria-label"], _r = {
3385
+ }), xr = ["role", "aria-label"], Sr = {
3351
3386
  class: "chart-sr-only",
3352
3387
  "aria-live": "polite"
3353
- }, vr = {
3388
+ }, Cr = {
3354
3389
  key: 1,
3355
3390
  class: "choropleth-header"
3356
- }, yr = {
3391
+ }, wr = {
3357
3392
  key: 0,
3358
3393
  class: "choropleth-legend-title"
3359
- }, br = {
3394
+ }, Tr = {
3360
3395
  key: 2,
3361
3396
  class: "choropleth-legend-continuous"
3362
- }, xr = { class: "choropleth-legend-ticks" }, Sr = {
3397
+ }, Er = { class: "choropleth-legend-ticks" }, Dr = {
3363
3398
  key: 2,
3364
3399
  class: "choropleth-zoom-hint"
3365
- }, Cr = ["viewBox"], wr = ["innerHTML"], Tr = "http://www.w3.org/2000/svg", Er = 10, Dr = 600, Or = 250, kr = 450, Ar = 2, jr = 2, Mr = 1e3, Nr = 12, Pr = /* @__PURE__ */ I(/* @__PURE__ */ l({
3400
+ }, Or = ["viewBox"], kr = ["innerHTML"], Ar = "http://www.w3.org/2000/svg", jr = 10, Mr = 600, Nr = 250, Pr = 30, Fr = 450, Ir = 2, Lr = 2, Rr = 1e3, zr = 12, Br = "light-dark(#000, #fff)", Vr = /* @__PURE__ */ L(/* @__PURE__ */ l({
3366
3401
  inheritAttrs: !1,
3367
3402
  __name: "ChoroplethMap",
3368
3403
  props: {
@@ -3422,10 +3457,10 @@ var Jt = {
3422
3457
  "update:focus"
3423
3458
  ],
3424
3459
  setup(c, { emit: l }) {
3425
- let p = c, ne = n(() => p.ariaLabel ?? p.title), w = n(() => p.role ?? (ne.value ? "figure" : void 0)), D = l, O = (e) => e, ie = v(null), k = v(null), A = v(null), j = v(null), ae = v(null), M = v(null), oe = C(), me = n(() => !!p.tooltipTrigger || !!p.tooltipFormat || !!oe.tooltip), he = n(() => {
3460
+ let p = c, ne = n(() => p.ariaLabel ?? p.title), w = n(() => p.role ?? (ne.value ? "figure" : void 0)), D = l, O = (e) => e, ie = v(null), k = v(null), A = v(null), j = v(null), ae = v(null), M = v(null), oe = C(), I = n(() => !!p.tooltipTrigger || !!p.tooltipFormat || !!oe.tooltip), me = n(() => {
3426
3461
  let e = p.legendStyle, t = {};
3427
3462
  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;
3428
- }), I = n(() => {
3463
+ }), L = n(() => {
3429
3464
  let e = p.titleStyle, t = {
3430
3465
  "font-size": `${e?.fontSize ?? 14}px`,
3431
3466
  "line-height": `${e?.lineHeight ?? 18}px`,
@@ -3434,71 +3469,71 @@ var Jt = {
3434
3469
  width: "100%"
3435
3470
  };
3436
3471
  return e?.color && (t.color = e.color), t;
3437
- }), L = /* @__PURE__ */ new Map(), _e = /* @__PURE__ */ new Map(), ve = null, R = null, z = /* @__PURE__ */ new Map(), ye = /* @__PURE__ */ new Map(), be = !1, xe = null, Se = {
3472
+ }), R = /* @__PURE__ */ new Map(), ge = /* @__PURE__ */ new Map(), _e = null, z = null, B = /* @__PURE__ */ new Map(), ve = /* @__PURE__ */ new Map(), ye = !1, be = null, xe = {
3438
3473
  width: 0,
3439
3474
  height: 0
3440
- }, Ce = null, we = !1, B = null, Te = v(!1), Ee = v(1), De = v(1), Oe = v(!1), ke = v(!1), V = n(() => Oe.value || ke.value), Ae = n(() => p.zoomMode === "scroll"), je = n(() => p.zoom && (Ae.value || !p.touchExpand && V.value)), Me = 0, Ne = 0, Pe = 0, U = null, W = 0;
3441
- function Fe() {
3475
+ }, Se = null, Ce = !1, V = null, we = v(!1), Te = v(1), Ee = v(1), De = v(!1), Oe = n(() => p.zoomMode === "scroll"), ke = n(() => p.zoom && (Oe.value || !p.touchExpand && De.value)), Ae = 0, je = 0, Me = 0, Ne = null, U = 0, W = null;
3476
+ function G() {
3442
3477
  let e = k.value, t = A.value;
3443
- !e || !t || (e.addEventListener("touchstart", $t, { passive: !0 }), e.addEventListener("touchend", en), e.addEventListener("touchcancel", tn, { passive: !0 }), !q() && (t.addEventListener("click", Xt), t.addEventListener("mouseover", Xt), t.addEventListener("mousemove", Zt), t.addEventListener("mouseout", Qt)));
3478
+ !e || !t || (e.addEventListener("touchstart", $t, { passive: !0 }), e.addEventListener("touchend", en), e.addEventListener("touchcancel", nn, { passive: !0 }), !J() && (t.addEventListener("click", Xt), t.addEventListener("mouseover", Xt), t.addEventListener("mousemove", Zt), t.addEventListener("mouseout", Qt)));
3444
3479
  }
3445
- function G() {
3480
+ function Pe() {
3446
3481
  let e = k.value, t = A.value;
3447
- e && (e.removeEventListener("touchstart", $t), e.removeEventListener("touchend", en), e.removeEventListener("touchcancel", tn)), t && (t.removeEventListener("click", Xt), t.removeEventListener("mouseover", Xt), t.removeEventListener("mousemove", Zt), t.removeEventListener("mouseout", Qt));
3482
+ e && (e.removeEventListener("touchstart", $t), e.removeEventListener("touchend", en), e.removeEventListener("touchcancel", nn)), t && (t.removeEventListener("click", Xt), t.removeEventListener("mouseover", Xt), t.removeEventListener("mousemove", Zt), t.removeEventListener("mouseout", Qt));
3448
3483
  }
3449
- function Le() {
3450
- qt();
3484
+ function K() {
3485
+ Jt();
3451
3486
  }
3452
- let Re = null;
3487
+ let Ie = null;
3453
3488
  g(() => {
3454
- ze(), Fe(), rn(), Ge(), Lt(), k.value && typeof ResizeObserver < "u" && (Re = new ResizeObserver((e) => {
3489
+ Le(), G(), an(), Y(), It(), k.value && typeof ResizeObserver < "u" && (Ie = new ResizeObserver((e) => {
3455
3490
  let t = e[0]?.contentRect.width;
3456
- t && (De.value = t / Mr, Q());
3457
- }), Re.observe(k.value)), window.addEventListener("scroll", Le, {
3491
+ t && (Ee.value = t / Rr, Wt());
3492
+ }), Ie.observe(k.value)), window.addEventListener("scroll", K, {
3458
3493
  passive: !0,
3459
3494
  capture: !0
3460
- }), window.addEventListener("resize", Le, { passive: !0 });
3495
+ }), window.addEventListener("resize", K, { passive: !0 });
3461
3496
  }), ee(() => {
3462
- xe?.disconnect(), Re?.disconnect(), Pe && cancelAnimationFrame(Pe), window.clearTimeout(W), Be(), G(), window.removeEventListener("scroll", Le, { capture: !0 }), window.removeEventListener("resize", Le);
3497
+ be?.disconnect(), Ie?.disconnect(), Me && cancelAnimationFrame(Me), window.clearTimeout(U), Re(), Pe(), window.removeEventListener("scroll", K, { capture: !0 }), window.removeEventListener("resize", K);
3463
3498
  });
3464
- function ze() {
3499
+ function Le() {
3465
3500
  if (!k.value || !A.value) return;
3466
3501
  let e = F(k.value);
3467
- B = ce().scaleExtent([1, Je.value]).on("start", () => {
3468
- be = !0, qt();
3502
+ V = ce().scaleExtent([1, We.value]).on("start", () => {
3503
+ ye = !0, Jt();
3469
3504
  }).on("zoom", (e) => {
3470
3505
  A.value && A.value.setAttribute("transform", e.transform);
3471
3506
  let t = e.transform;
3472
- Ee.value = t.k, Q(), Te.value = t.k !== 1 || t.x !== 0 || t.y !== 0, Te.value && (Oe.value = !0);
3507
+ Te.value = t.k, Wt(), we.value = t.k !== 1 || t.x !== 0 || t.y !== 0, we.value && (De.value = !0);
3473
3508
  }).on("end", () => {
3474
- be = !1;
3475
- }), B.filter((e) => {
3509
+ ye = !1;
3510
+ }), V.filter((e) => {
3476
3511
  if (!p.zoom) return !1;
3477
- if (!Ae.value) {
3512
+ if (!Oe.value) {
3478
3513
  let t = $.isFullscreen.value;
3479
3514
  switch (e.type) {
3480
3515
  case "wheel":
3481
3516
  if (!t) return !1;
3482
3517
  break;
3483
3518
  case "dblclick":
3484
- if (q()) return !1;
3519
+ if (J()) return !1;
3485
3520
  break;
3486
3521
  case "mousedown":
3487
- if (!t && !V.value) return !1;
3522
+ if (!t && !De.value) return !1;
3488
3523
  break;
3489
3524
  case "touchstart":
3490
- if (!t && !je.value) return !1;
3525
+ if (!t && !ke.value && !(!p.touchExpand && p.zoomMode !== "scroll" && e.touches.length >= 2)) return !1;
3491
3526
  break;
3492
3527
  }
3493
3528
  }
3494
3529
  return (!e.ctrlKey || e.type === "wheel") && !e.button;
3495
- }), e.call(B);
3530
+ }), e.call(V);
3496
3531
  }
3497
- function Be() {
3498
- k.value && B && (F(k.value).on(".zoom", null), B = null);
3532
+ function Re() {
3533
+ k.value && V && (F(k.value).on(".zoom", null), V = null);
3499
3534
  }
3500
- function Ve(e) {
3501
- let t = St.value, n = vt.value, r = [];
3535
+ function ze(e) {
3536
+ let t = bt.value, n = gt.value, r = [];
3502
3537
  for (let i of e) {
3503
3538
  let e = i.geoType ?? p.geoType, a = t.get(e);
3504
3539
  if (!a) continue;
@@ -3516,79 +3551,87 @@ var Jt = {
3516
3551
  }
3517
3552
  return r;
3518
3553
  }
3519
- function Ue(e) {
3554
+ function Be(e) {
3520
3555
  let t = /* @__PURE__ */ new Set();
3521
- for (let n of Ve(e)) n.geoType === p.geoType && t.add(String(n.feature.id));
3556
+ for (let n of ze(e)) n.geoType === p.geoType && t.add(String(n.feature.id));
3522
3557
  return t;
3523
3558
  }
3524
- let We = !1;
3525
- function Ge() {
3526
- if (!k.value || !B) return;
3527
- let e = Ve(xt.value), t = e.filter((e) => e.geoType === p.geoType), n = e.filter((e) => e.geoType !== p.geoType), r = /* @__PURE__ */ new Map();
3559
+ let Ve = !1;
3560
+ function Y() {
3561
+ if (!k.value || !V) return;
3562
+ let e = ze(yt.value), t = e.filter((e) => e.geoType === p.geoType), n = e.filter((e) => e.geoType !== p.geoType), r = /* @__PURE__ */ new Map();
3528
3563
  for (let e of t) {
3529
- let t = L.get(String(e.feature.id));
3530
- t && r.set(t, e.item.style ?? "solid");
3564
+ let t = R.get(String(e.feature.id));
3565
+ t && r.set(t, e.item);
3566
+ }
3567
+ for (let [e] of B) r.has(e) || e === z || Kt(e);
3568
+ for (let [e, t] of r) {
3569
+ let n = B.get(e);
3570
+ n != null && n.style === t.style && n.stroke === t.stroke && n.strokeWidth === t.strokeWidth && e !== z || e !== z && Gt(e, t);
3531
3571
  }
3532
- for (let [e] of z) r.has(e) || e === R || Gt(e);
3533
- for (let [e, t] of r) z.get(e) === t && e !== R || e !== R && Wt(e, t);
3534
- z.clear();
3535
- for (let [e, t] of r) z.set(e, t);
3536
- if (Ke(n), e.length === 0) {
3537
- We = !0, qt();
3572
+ B.clear();
3573
+ for (let [e, t] of r) B.set(e, t);
3574
+ if (He(n), e.length === 0) {
3575
+ Ve = !0, Jt();
3538
3576
  return;
3539
3577
  }
3540
3578
  if (p.focusZoom === !1) {
3541
- We = !0;
3579
+ Ve = !0;
3542
3580
  return;
3543
3581
  }
3544
3582
  let i = F(k.value);
3545
3583
  i.interrupt();
3546
- let a = We;
3547
- We = !0;
3548
- let [[o, s], [c, l]] = gt.value.bounds({
3584
+ let a = Ve;
3585
+ Ve = !0;
3586
+ let [[o, s], [c, l]] = mt.value.bounds({
3549
3587
  type: "FeatureCollection",
3550
3588
  features: e.map((e) => e.feature)
3551
- }), u = (o + c) / 2, d = (s + l) / 2, f = p.focusZoomLevel, m = le.translate(it.value / 2 - f * u, at.value / 2 - f * d).scale(f), h = t[0]?.feature ?? null, g = () => {
3552
- if (!me.value || !h) return;
3553
- let e = String(h.id), t = L.get(e);
3589
+ }), u = (o + c) / 2, d = (s + l) / 2, f = p.focusZoomLevel, m = le.translate(nt.value / 2 - f * u, rt.value / 2 - f * d).scale(f), h = t[0]?.feature ?? null, g = () => {
3590
+ if (!I.value || !h) return;
3591
+ let e = String(h.id), t = R.get(e);
3554
3592
  if (!t) return;
3555
3593
  let n = t.getBoundingClientRect();
3556
- zt(e, n.left + n.width / 2, n.top + n.height / 2);
3594
+ Rt(e, n.left + n.width / 2, n.top + n.height / 2);
3557
3595
  };
3558
- a ? (Vt(), i.transition().duration(kr).call(B.transform, m).on("end", g)) : (B.transform(i, m), g());
3596
+ a ? (Bt(), i.transition().duration(Fr).call(V.transform, m).on("end", g)) : (V.transform(i, m), g());
3559
3597
  }
3560
- function Ke(e) {
3598
+ function He(e) {
3561
3599
  let t = ae.value;
3562
3600
  if (!t) return;
3563
3601
  let n = new Set(e.map((e) => e.key));
3564
- for (let [e, t] of ye) n.has(e) || (t.remove(), ye.delete(e));
3565
- let r = gt.value;
3602
+ for (let [e, t] of ve) n.has(e) || (t.el.remove(), ve.delete(e));
3603
+ let r = mt.value;
3566
3604
  for (let { item: n, feature: i, key: a } of e) {
3567
- let e = ye.get(a);
3568
- e || (e = document.createElementNS(Tr, "path"), e.setAttribute("d", r(i) ?? ""), e.setAttribute("fill", "none"), e.setAttribute("pointer-events", "none"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("class", "focus-overlay"), t.appendChild(e), ye.set(a, e)), e.setAttribute("stroke", n.stroke ?? "#fff"), Ht(e, n.style);
3605
+ let e = ve.get(a);
3606
+ if (!e) {
3607
+ let n = document.createElementNS(Ar, "path");
3608
+ n.setAttribute("d", r(i) ?? ""), n.setAttribute("fill", "none"), n.setAttribute("pointer-events", "none"), n.setAttribute("stroke-linejoin", "round"), n.setAttribute("class", "focus-overlay"), t.appendChild(n), e = { el: n }, ve.set(a, e);
3609
+ }
3610
+ e.strokeWidth = n.strokeWidth, e.el.setAttribute("stroke", n.stroke ?? "#fff"), Vt(e.el, n.style);
3569
3611
  }
3612
+ Wt();
3570
3613
  }
3571
- function J() {
3572
- if (!k.value || !B) return;
3573
- xt.value.length > 0 && D("update:focus", null);
3614
+ function Ue() {
3615
+ if (!k.value || !V) return;
3616
+ yt.value.length > 0 && D("update:focus", null);
3574
3617
  let e = F(k.value);
3575
- e.interrupt(), Vt();
3576
- let t = q() && !$.isFullscreen.value && !Ae.value, n = e.transition().duration(kr).call(B.transform, le);
3618
+ e.interrupt(), Bt();
3619
+ let t = J() && !$.isFullscreen.value && !Oe.value, n = e.transition().duration(Fr).call(V.transform, le);
3577
3620
  t && n.on("end", () => {
3578
- Oe.value = !1, ke.value = !1;
3621
+ De.value = !1;
3579
3622
  });
3580
3623
  }
3581
- let Je = n(() => Math.max(12, p.focusZoomLevel)), Ye = n(() => p.zoom && (q() ? $.isFullscreen.value || Ae.value || !p.touchExpand : !0)), Xe = n(() => p.zoom && !q() && (Ae.value || V.value || $.isFullscreen.value)), Y = n(() => p.zoom && p.zoomHint && !Ae.value && !$.isFullscreen.value && (q() && p.touchExpand || !V.value)), Ze = n(() => q() ? "Tap to zoom" : "Double click to zoom"), X = n(() => {
3624
+ let We = n(() => Math.max(12, p.focusZoomLevel)), X = n(() => p.zoom && (J() ? $.isFullscreen.value || Oe.value || !p.touchExpand : !0)), Ke = n(() => p.zoom && !J() && (Oe.value || De.value || $.isFullscreen.value)), qe = n(() => p.zoom && p.zoomHint && !Oe.value && !$.isFullscreen.value && (J() && p.touchExpand || !De.value)), Z = n(() => J() ? "Double tap to zoom" : "Double click to zoom"), Ye = n(() => {
3582
3625
  let e = {};
3583
- return ($.isFullscreen.value || je.value) && (e["touch-action"] = "none"), (V.value || $.isFullscreen.value || p.zoom && Ae.value) && (e["will-change"] = "transform"), Object.keys(e).length ? e : void 0;
3626
+ return $.isFullscreen.value || ke.value ? e["touch-action"] = "none" : p.zoom && !Oe.value && J() && (e["touch-action"] = p.touchExpand ? "manipulation" : "pan-x pan-y"), (De.value || $.isFullscreen.value || p.zoom && Oe.value) && (e["will-change"] = "transform"), Object.keys(e).length ? e : void 0;
3584
3627
  });
3585
- function Qe(e) {
3586
- if (!k.value || !B) return;
3628
+ function Xe(e) {
3629
+ if (!k.value || !V) return;
3587
3630
  let t = F(k.value);
3588
- t.interrupt(), Vt(), t.transition().duration(250).call(B.scaleBy, e);
3631
+ t.interrupt(), Bt(), t.transition().duration(250).call(V.scaleBy, e);
3589
3632
  }
3590
- function $e(e, t) {
3591
- let n = k.value, r = jr, i = it.value / 2, a = at.value / 2, o = null;
3633
+ function Ze(e, t) {
3634
+ let n = k.value, r = Lr, i = nt.value / 2, a = rt.value / 2, o = null;
3592
3635
  try {
3593
3636
  o = n.getScreenCTM();
3594
3637
  } catch {
@@ -3598,64 +3641,64 @@ var Jt = {
3598
3641
  let r = o.inverse(), s = r.a * e + r.c * t + r.e, c = r.b * e + r.d * t + r.f;
3599
3642
  [i, a] = ue(n).invert([s, c]);
3600
3643
  }
3601
- return le.translate(it.value / 2 - r * i, at.value / 2 - r * a).scale(r);
3644
+ return le.translate(nt.value / 2 - r * i, rt.value / 2 - r * a).scale(r);
3602
3645
  }
3603
- function et(e) {
3604
- if (!k.value || !B) return;
3646
+ function Qe(e) {
3647
+ if (!k.value || !V) return;
3605
3648
  let t = F(k.value);
3606
- t.interrupt(), t.transition().duration(kr).call(B.transform, e);
3649
+ t.interrupt(), t.transition().duration(Fr).call(V.transform, e);
3607
3650
  }
3608
- function tt(e, t) {
3609
- if (!k.value || !B) return;
3610
- let n = $e(e, t);
3611
- $.enter(), f(() => et(n));
3651
+ function $e(e, t) {
3652
+ if (!k.value || !V) return;
3653
+ let n = Ze(e, t);
3654
+ $.enter(), f(() => Qe(n));
3612
3655
  }
3613
- function nt(e, t) {
3614
- !k.value || !B || et($e(e, t));
3656
+ function et(e, t) {
3657
+ !k.value || !V || Qe(Ze(e, t));
3615
3658
  }
3616
3659
  T(() => p.focusZoomLevel, () => {
3617
- B && B.scaleExtent([1, Je.value]), Ge();
3660
+ V && V.scaleExtent([1, We.value]), Y();
3618
3661
  }), T(() => p.state, () => {
3619
- if (!k.value || !B) return;
3662
+ if (!k.value || !V) return;
3620
3663
  let e = F(k.value);
3621
- e.interrupt(), B.transform(e, le);
3664
+ e.interrupt(), V.transform(e, le);
3622
3665
  });
3623
- let rt = n(() => p.width && p.height ? p.height / p.width : .625), it = n(() => Mr), at = n(() => Mr * rt.value), ot = n(() => {
3666
+ let tt = n(() => p.width && p.height ? p.height / p.width : .625), nt = n(() => Rr), rt = n(() => Rr * tt.value), it = n(() => {
3624
3667
  let e = x(p.topology), t = e?.objects?.states;
3625
3668
  if (!t) return [];
3626
3669
  let n = de(e, t);
3627
3670
  return n.type === "FeatureCollection" ? n.features : [n];
3628
- }), st = n(() => {
3671
+ }), at = n(() => {
3629
3672
  let e = p.state?.trim();
3630
3673
  if (!e) return null;
3631
3674
  if (/^\d{1,2}$/.test(e)) return e.padStart(2, "0");
3632
- let t = ot.value.find((t) => t.properties?.name === e);
3675
+ let t = it.value.find((t) => t.properties?.name === e);
3633
3676
  return t?.id == null ? null : String(t.id).padStart(2, "0");
3634
- }), ct = n(() => {
3635
- let e = st.value;
3636
- return e ? ot.value.find((t) => String(t.id).padStart(2, "0") === e) ?? null : null;
3677
+ }), ot = n(() => {
3678
+ let e = at.value;
3679
+ return e ? it.value.find((t) => String(t.id).padStart(2, "0") === e) ?? null : null;
3637
3680
  });
3638
- T(() => [p.state, st.value], ([e, t]) => {
3681
+ T(() => [p.state, at.value], ([e, t]) => {
3639
3682
  e && e.trim() && !t && console.warn(`[ChoroplethMap] state="${e}" matched no state name or FIPS code; rendering the full map.`);
3640
3683
  }, { immediate: !0 });
3641
- let lt = v(null), ut = null;
3642
- function dt() {
3643
- return ut ||= import("./hsaMapping-BahYDmea.js").then((e) => e.n).then((e) => (lt.value = e, e)), ut;
3684
+ let st = v(null), ct = null;
3685
+ function lt() {
3686
+ return ct ||= import("./hsaMapping-BahYDmea.js").then((e) => e.n).then((e) => (st.value = e, e)), ct;
3644
3687
  }
3645
3688
  T(() => {
3646
3689
  if (p.geoType === "hsas" || p.dataGeoType === "hsas") return !0;
3647
3690
  let e = p.focus;
3648
3691
  return e ? (Array.isArray(e) ? e : [e]).some((e) => typeof e != "string" && e.geoType === "hsas") : !1;
3649
3692
  }, (e) => {
3650
- e && dt();
3693
+ e && lt();
3651
3694
  }, { immediate: !0 });
3652
- let ft = n(() => {
3653
- let e = lt.value;
3695
+ let ut = n(() => {
3696
+ let e = st.value;
3654
3697
  if (!e) return {
3655
3698
  type: "FeatureCollection",
3656
3699
  features: []
3657
3700
  };
3658
- let { fipsToHsa: t, hsaNames: n } = e, r = x(p.topology), i = r.objects.counties.geometries, a = st.value, o = /* @__PURE__ */ new Map();
3701
+ let { fipsToHsa: t, hsaNames: n } = e, r = x(p.topology), i = r.objects.counties.geometries, a = at.value, o = /* @__PURE__ */ new Map();
3659
3702
  for (let e of i) {
3660
3703
  let n = String(e.id).padStart(5, "0");
3661
3704
  if (a && n.slice(0, 2) !== a) continue;
@@ -3673,9 +3716,9 @@ var Jt = {
3673
3716
  type: "FeatureCollection",
3674
3717
  features: s
3675
3718
  };
3676
- }), pt = n(() => {
3677
- if (p.geoType === "hsas") return ft.value;
3678
- let e = st.value;
3719
+ }), dt = n(() => {
3720
+ if (p.geoType === "hsas") return ut.value;
3721
+ let e = at.value;
3679
3722
  if (p.geoType === "counties") {
3680
3723
  let t = x(p.topology), n = de(t, t.objects.counties);
3681
3724
  return e ? {
@@ -3688,43 +3731,43 @@ var Jt = {
3688
3731
  type: "FeatureCollection",
3689
3732
  features: n.features.filter((t) => String(t.id).padStart(2, "0") === e)
3690
3733
  } : n;
3691
- }), mt = n(() => {
3734
+ }), ft = n(() => {
3692
3735
  if (p.geoType !== "counties" && p.geoType !== "hsas") return null;
3693
- if (st.value) return ct.value;
3736
+ if (at.value) return ot.value;
3694
3737
  let e = x(p.topology);
3695
3738
  return pe(e, e.objects.states, (e, t) => e !== t);
3696
- }), ht = n(() => {
3697
- let e = ct.value;
3698
- if (st.value && e) {
3699
- let t = [[Nr, Nr], [it.value - Nr, at.value - Nr]], n = N().fitExtent(t, e), r = P(n).centroid(e);
3739
+ }), pt = n(() => {
3740
+ let e = ot.value;
3741
+ if (at.value && e) {
3742
+ let t = [[zr, zr], [nt.value - zr, rt.value - zr]], n = N().fitExtent(t, e), r = P(n).centroid(e);
3700
3743
  return Number.isFinite(r[0]) && Number.isFinite(r[1]) ? n : se().fitExtent(t, e);
3701
3744
  }
3702
- return N().fitExtent([[0, 0], [it.value, at.value]], pt.value);
3703
- }), gt = n(() => P(ht.value)), _t = n(() => p.geoType === "counties" || p.geoType === "hsas" ? p.strokeWidth * .5 : p.strokeWidth), vt = n(() => {
3745
+ return N().fitExtent([[0, 0], [nt.value, rt.value]], dt.value);
3746
+ }), mt = n(() => P(pt.value)), ht = n(() => p.geoType === "counties" || p.geoType === "hsas" ? p.strokeWidth * .5 : p.strokeWidth), gt = n(() => {
3704
3747
  let e = /* @__PURE__ */ new Map();
3705
- for (let [t, n] of St.value) {
3748
+ for (let [t, n] of bt.value) {
3706
3749
  let r = /* @__PURE__ */ new Map();
3707
3750
  for (let [e, t] of n) t.properties?.name != null && r.set(t.properties.name, e);
3708
3751
  e.set(t, r);
3709
3752
  }
3710
3753
  return e;
3711
3754
  });
3712
- function yt(e) {
3755
+ function _t(e) {
3713
3756
  let t = p.dataGeoType;
3714
3757
  if (!t || t === p.geoType) return e;
3715
- if (p.geoType === "counties" && t === "hsas") return lt.value?.fipsToHsa[e];
3758
+ if (p.geoType === "counties" && t === "hsas") return st.value?.fipsToHsa[e];
3716
3759
  if (p.geoType === "counties" && t === "states" || p.geoType === "hsas" && t === "states") return e.slice(0, 2);
3717
3760
  }
3718
- let bt = n(() => {
3761
+ let vt = n(() => {
3719
3762
  let e = /* @__PURE__ */ new Map();
3720
- for (let t of pt.value.features) t.id != null && e.set(String(t.id), t);
3763
+ for (let t of dt.value.features) t.id != null && e.set(String(t.id), t);
3721
3764
  return e;
3722
- }), xt = n(() => {
3765
+ }), yt = n(() => {
3723
3766
  let e = p.focus;
3724
3767
  return e == null ? [] : (Array.isArray(e) ? e : [e]).map((e) => typeof e == "string" ? { id: e } : e);
3725
- }), St = n(() => {
3768
+ }), bt = n(() => {
3726
3769
  let e = /* @__PURE__ */ new Map();
3727
- e.set(p.geoType, bt.value);
3770
+ e.set(p.geoType, vt.value);
3728
3771
  let t = x(p.topology), n = t?.objects;
3729
3772
  if (!n) return e;
3730
3773
  let r = (e) => {
@@ -3740,18 +3783,18 @@ var Jt = {
3740
3783
  let i = de(t, n.counties);
3741
3784
  e.set("counties", r(i.features));
3742
3785
  }
3743
- return !e.has("hsas") && n.counties && e.set("hsas", r(ft.value.features)), e;
3744
- }), wt = n(() => {
3786
+ return !e.has("hsas") && n.counties && e.set("hsas", r(ut.value.features)), e;
3787
+ }), xt = n(() => {
3745
3788
  let e = /* @__PURE__ */ new Map();
3746
3789
  if (!p.data) return e;
3747
- let t = p.dataGeoType ?? p.geoType, n = vt.value.get(t);
3790
+ let t = p.dataGeoType ?? p.geoType, n = gt.value.get(t);
3748
3791
  for (let t of p.data) {
3749
3792
  e.set(t.id, t.value);
3750
3793
  let r = n?.get(t.id);
3751
3794
  r && e.set(r, t.value);
3752
3795
  }
3753
3796
  return e;
3754
- }), Tt = n(() => {
3797
+ }), St = n(() => {
3755
3798
  if (!p.data || p.data.length === 0) return {
3756
3799
  min: 0,
3757
3800
  max: 1
@@ -3768,310 +3811,335 @@ var Jt = {
3768
3811
  min: 0,
3769
3812
  max: 1
3770
3813
  };
3771
- }), Et = n(() => Array.isArray(p.colorScale) && p.colorScale.length > 0 && "value" in p.colorScale[0]), Z = n(() => Array.isArray(p.colorScale) && !Et.value), Dt = n(() => Z.value ? "" : p.colorScale?.min ?? "#e5f0fa"), Ot = n(() => Z.value ? "" : p.colorScale?.max ?? "#08519c");
3772
- function kt(e) {
3773
- let [t, n, r] = Ct(Dt.value) ?? [
3814
+ }), Ct = n(() => Array.isArray(p.colorScale) && p.colorScale.length > 0 && "value" in p.colorScale[0]), wt = n(() => Array.isArray(p.colorScale) && !Ct.value), Tt = n(() => wt.value ? "" : p.colorScale?.min ?? "#e5f0fa"), Et = n(() => wt.value ? "" : p.colorScale?.max ?? "#08519c");
3815
+ function Ot(e) {
3816
+ let [t, n, r] = Dt(Tt.value) ?? [
3774
3817
  229,
3775
3818
  240,
3776
3819
  250
3777
- ], [i, a, o] = Ct(Ot.value) ?? [
3820
+ ], [i, a, o] = Dt(Et.value) ?? [
3778
3821
  8,
3779
3822
  81,
3780
3823
  156
3781
3824
  ];
3782
3825
  return `rgb(${Math.round(t + (i - t) * e)},${Math.round(n + (a - n) * e)},${Math.round(r + (o - r) * e)})`;
3783
3826
  }
3784
- let At = n(() => Z.value ? p.colorScale.slice().sort((e, t) => t.min - e.min) : null), jt = n(() => {
3785
- if (!Et.value) return null;
3827
+ let kt = n(() => wt.value ? p.colorScale.slice().sort((e, t) => t.min - e.min) : null), At = n(() => {
3828
+ if (!Ct.value) return null;
3786
3829
  let e = /* @__PURE__ */ new Map();
3787
3830
  for (let t of p.colorScale) e.set(t.value, t.color);
3788
3831
  return e;
3789
3832
  });
3790
- function Mt(e) {
3791
- let t = yt(e);
3792
- return t == null ? void 0 : wt.value.get(t);
3833
+ function jt(e) {
3834
+ let t = _t(e);
3835
+ return t == null ? void 0 : xt.value.get(t);
3793
3836
  }
3794
- function Nt(e) {
3795
- let t = Mt(e), n = p.noDataColor;
3837
+ function Mt(e) {
3838
+ let t = jt(e), n = p.noDataColor;
3796
3839
  if (t == null) return n;
3797
- let r = jt.value;
3840
+ let r = At.value;
3798
3841
  if (r) return r.get(String(t)) ?? n;
3799
- let i = At.value;
3842
+ let i = kt.value;
3800
3843
  if (i) {
3801
3844
  let e = t;
3802
3845
  for (let t of i) if (e >= t.min) return t.color;
3803
3846
  return n;
3804
3847
  }
3805
- let { min: a, max: o } = Tt.value;
3806
- return kt((t - a) / (o - a));
3848
+ let { min: a, max: o } = St.value;
3849
+ return Ot((t - a) / (o - a));
3807
3850
  }
3808
- let Pt = (e) => e.properties?.name ?? String(e.id);
3809
- function Ft(e) {
3851
+ let Nt = (e) => e.properties?.name ?? String(e.id);
3852
+ function Pt(e) {
3810
3853
  return e == null ? "" : typeof e == "number" && p.tooltipValueFormat !== void 0 ? re(e, p.tooltipValueFormat) : String(e);
3811
3854
  }
3812
- function It(e, t) {
3813
- return t == null ? e : `${e}: ${Ft(t)}`;
3855
+ function Ft(e, t) {
3856
+ return t == null ? e : `${e}: ${Pt(t)}`;
3814
3857
  }
3815
- function Lt() {
3858
+ function It() {
3816
3859
  let e = M.value?.getEl();
3817
3860
  if (!e) return;
3818
- xe?.disconnect();
3861
+ be?.disconnect();
3819
3862
  let t = !1;
3820
- xe = new ResizeObserver((e) => {
3863
+ be = new ResizeObserver((e) => {
3821
3864
  let n = e[0]?.contentRect;
3822
- n && (Se.width = n.width, Se.height = n.height, !t && we && Ce ? (t = !0, Rt(Ce.x, Ce.y)) : t = !0);
3823
- }), xe.observe(e);
3865
+ n && (xe.width = n.width, xe.height = n.height, !t && Ce && Se ? (t = !0, Lt(Se.x, Se.y)) : t = !0);
3866
+ }), be.observe(e);
3824
3867
  }
3825
- function Rt(e, t) {
3868
+ function Lt(e, t) {
3826
3869
  let n = M.value?.getEl();
3827
3870
  if (!n) return;
3828
- let r = ie.value?.getBoundingClientRect(), { left: i, top: a } = H(e, t, Se.width, Se.height, p.tooltipClamp, r);
3871
+ let r = ie.value?.getBoundingClientRect(), { left: i, top: a } = H(e, t, xe.width, xe.height, p.tooltipClamp, r);
3829
3872
  n.style.transform = `translate3d(${i}px, ${a}px, 0) translateY(-50%)`;
3830
3873
  }
3831
- function zt(e, t, n) {
3832
- let r = _e.get(e);
3874
+ function Rt(e, t, n) {
3875
+ let r = ge.get(e);
3833
3876
  if (!r) return;
3834
3877
  let i = M.value, a = i?.getEl();
3835
- !i || !a || (i.setData(r), Ce = {
3878
+ !i || !a || (i.setData(r), Se = {
3836
3879
  x: t,
3837
3880
  y: n
3838
- }, we = !0, Rt(t, n), a.style.visibility = "visible");
3881
+ }, Ce = !0, Lt(t, n), a.style.visibility = "visible");
3839
3882
  }
3840
- function Bt(e, t) {
3841
- we && (Me = e, Ne = t, !Pe && (Pe = requestAnimationFrame(() => {
3842
- Pe = 0;
3883
+ function zt(e, t) {
3884
+ Ce && (Ae = e, je = t, !Me && (Me = requestAnimationFrame(() => {
3885
+ Me = 0;
3843
3886
  let e = M.value?.getEl();
3844
- !e || !we || (Ce = {
3845
- x: Me,
3846
- y: Ne
3847
- }, e.style.transform = `translate3d(${Me + 16}px, ${Ne}px, 0) translateY(-50%)`);
3887
+ !e || !Ce || (Se = {
3888
+ x: Ae,
3889
+ y: je
3890
+ }, e.style.transform = `translate3d(${Ae + 16}px, ${je}px, 0) translateY(-50%)`);
3848
3891
  })));
3849
3892
  }
3850
- function Vt() {
3851
- if (!we) return;
3852
- we = !1, Ce = null;
3893
+ function Bt() {
3894
+ if (!Ce) return;
3895
+ Ce = !1, Se = null;
3853
3896
  let e = M.value?.getEl();
3854
3897
  e && (e.style.visibility = "hidden");
3855
3898
  }
3856
- function Ht(e, t) {
3899
+ function Vt(e, t) {
3857
3900
  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"));
3858
3901
  }
3859
- function Ut() {
3860
- return Ee.value * De.value || 1;
3902
+ function Ht() {
3903
+ return Te.value * Ee.value || 1;
3861
3904
  }
3862
- function Q() {
3863
- let e = Ut(), t = _t.value;
3864
- j.value?.setAttribute("stroke-width", String(t / e)), ve?.setAttribute("stroke-width", String(1 / e)), ae.value?.setAttribute("stroke-width", String((t + 1.5) / e));
3865
- let n = String((t + 1) / e);
3866
- for (let [e] of z) e.setAttribute("stroke-width", n);
3867
- R && R.setAttribute("stroke-width", n);
3905
+ function Ut(e) {
3906
+ return e?.strokeWidth ?? ht.value + 1;
3868
3907
  }
3869
- function Wt(e, t = "solid") {
3870
- e.parentNode?.appendChild(e), e.setAttribute("stroke-width", String((_t.value + 1) / Ut())), e.setAttribute("stroke", "#555"), Ht(e, t);
3908
+ function Wt() {
3909
+ let e = Ht(), t = ht.value;
3910
+ j.value?.setAttribute("stroke-width", String(t / e)), _e?.setAttribute("stroke-width", String(1 / e)), ae.value?.setAttribute("stroke-width", String((t + 1.5) / e));
3911
+ for (let { el: t, strokeWidth: n } of ve.values()) n == null ? t.removeAttribute("stroke-width") : t.setAttribute("stroke-width", String(n / e));
3912
+ for (let [t, n] of B) t.setAttribute("stroke-width", String(Ut(n) / e));
3913
+ z && !B.has(z) && z.setAttribute("stroke-width", String(Ut() / e));
3871
3914
  }
3872
- function Gt(e) {
3873
- e.removeAttribute("stroke-width"), e.setAttribute("stroke", p.strokeColor), e.removeAttribute("stroke-dasharray"), e.removeAttribute("stroke-linecap");
3915
+ function Gt(e, t) {
3916
+ e.parentNode?.appendChild(e), e.setAttribute("stroke-width", String(Ut(t) / Ht())), e.style.stroke = t?.stroke ?? Br, Vt(e, t?.style);
3874
3917
  }
3875
3918
  function Kt(e) {
3876
- R !== e && (R && !z.has(R) && Gt(R), R = e, Wt(e, z.get(e) ?? "solid"));
3919
+ e.removeAttribute("stroke-width"), e.style.stroke = "", e.setAttribute("stroke", p.strokeColor), e.removeAttribute("stroke-dasharray"), e.removeAttribute("stroke-linecap");
3877
3920
  }
3878
- function qt() {
3879
- if (R) {
3880
- let e = z.get(R);
3881
- e == null ? Gt(R) : Wt(R, e), R = null, D("stateHover", null);
3921
+ function qt(e) {
3922
+ z !== e && (z && !B.has(z) && Kt(z), z = e, Gt(e, B.get(e)));
3923
+ }
3924
+ function Jt() {
3925
+ if (z) {
3926
+ let e = B.get(z);
3927
+ e == null ? Kt(z) : Gt(z, e), z = null, D("stateHover", null);
3882
3928
  }
3883
- Vt();
3929
+ Bt();
3884
3930
  }
3885
- function Jt(e) {
3931
+ function Q(e) {
3886
3932
  let t = e;
3887
3933
  for (; t && !t.dataset?.featId;) t = t.parentElement;
3888
3934
  return t ? t.dataset.featId ?? null : null;
3889
3935
  }
3890
3936
  function Yt(e) {
3891
- p.zoom && (ke.value = !0), D("stateClick", {
3937
+ D("stateClick", {
3892
3938
  id: e.id,
3893
3939
  name: e.name,
3894
3940
  value: e.value
3895
- }), D("update:focus", Ue(xt.value).has(e.id) ? null : e.id);
3941
+ }), D("update:focus", Be(yt.value).has(e.id) ? null : e.id);
3896
3942
  }
3897
3943
  function Xt(e) {
3898
- if (be) return;
3899
- let t = e, n = Jt(t.target);
3944
+ if (ye) return;
3945
+ let t = e, n = Q(t.target);
3900
3946
  if (!n) return;
3901
- let r = _e.get(n);
3947
+ let r = ge.get(n);
3902
3948
  if (!r) return;
3903
3949
  let i = {
3904
3950
  id: r.id,
3905
3951
  name: r.name,
3906
3952
  value: r.value
3907
3953
  };
3908
- e.type === "click" ? p.zoom ? (window.clearTimeout(W), W = 0, t.detail <= 1 && (W = window.setTimeout(() => {
3909
- W = 0, Yt(r);
3910
- }, Or))) : Yt(r) : e.type === "mouseover" && (Kt(L.get(n)), me.value && zt(n, t.clientX, t.clientY), D("stateHover", i));
3954
+ e.type === "click" ? p.zoom ? (window.clearTimeout(U), U = 0, t.detail <= 1 && (U = window.setTimeout(() => {
3955
+ U = 0, Yt(r);
3956
+ }, Nr))) : Yt(r) : e.type === "mouseover" && (qt(R.get(n)), I.value && Rt(n, t.clientX, t.clientY), D("stateHover", i));
3911
3957
  }
3912
3958
  function Zt(e) {
3913
- be || Bt(e.clientX, e.clientY);
3959
+ ye || zt(e.clientX, e.clientY);
3914
3960
  }
3915
3961
  function Qt(e) {
3916
3962
  let t = e.relatedTarget;
3917
- t && A.value?.contains(t) || qt();
3963
+ t && A.value?.contains(t) || Jt();
3918
3964
  }
3919
3965
  function $t(e) {
3920
3966
  if (e.touches.length !== 1) {
3921
- U = null;
3967
+ Ne = null;
3922
3968
  return;
3923
3969
  }
3924
3970
  let t = e.touches[0];
3925
- U = {
3971
+ Ne = {
3926
3972
  x: t.clientX,
3927
3973
  y: t.clientY,
3928
3974
  time: e.timeStamp,
3929
- featId: Jt(e.target)
3975
+ featId: Q(e.target)
3930
3976
  };
3931
3977
  }
3932
3978
  function en(e) {
3933
- let t = U;
3934
- if (U = null, !t || e.touches.length > 0) return;
3979
+ let t = Ne;
3980
+ if (Ne = null, !t || e.touches.length > 0) return;
3935
3981
  let n = e.changedTouches[0];
3936
- if (!n || Math.abs(n.clientX - t.x) > Er || Math.abs(n.clientY - t.y) > Er || e.timeStamp - t.time > Dr) return;
3937
- if (p.zoom && !Ae.value && q() && !$.isFullscreen.value) {
3938
- if (p.touchExpand) {
3939
- e.preventDefault(), tt(n.clientX, n.clientY);
3982
+ if (!n || Math.abs(n.clientX - t.x) > jr || Math.abs(n.clientY - t.y) > jr || e.timeStamp - t.time > Mr) return;
3983
+ if (p.zoom && !Oe.value && J() && !$.isFullscreen.value) {
3984
+ e.preventDefault();
3985
+ let r = W;
3986
+ if (W = {
3987
+ x: n.clientX,
3988
+ y: n.clientY,
3989
+ time: e.timeStamp
3990
+ }, r != null && e.timeStamp - r.time <= Nr && Math.abs(n.clientX - r.x) <= Pr && Math.abs(n.clientY - r.y) <= Pr) {
3991
+ W = null, window.clearTimeout(U), U = 0, p.touchExpand ? $e(n.clientX, n.clientY) : et(n.clientX, n.clientY);
3940
3992
  return;
3941
3993
  }
3942
- if (!V.value) {
3943
- e.preventDefault(), nt(n.clientX, n.clientY);
3994
+ let i = t.featId ? ge.get(t.featId) : void 0;
3995
+ if (!i) {
3996
+ Jt();
3944
3997
  return;
3945
3998
  }
3999
+ tn(i, n.clientX, n.clientY), window.clearTimeout(U), U = window.setTimeout(() => {
4000
+ U = 0, Yt(i);
4001
+ }, Nr);
4002
+ return;
4003
+ }
4004
+ if (!t.featId) {
4005
+ Jt();
4006
+ return;
3946
4007
  }
3947
- if (!t.featId) return;
3948
- let r = _e.get(t.featId);
3949
- r && (e.preventDefault(), Yt(r));
4008
+ let r = ge.get(t.featId);
4009
+ r && (e.preventDefault(), tn(r, n.clientX, n.clientY), Yt(r));
3950
4010
  }
3951
- function tn() {
3952
- U = null;
4011
+ function tn(e, t, n) {
4012
+ let r = R.get(e.id);
4013
+ r && qt(r), D("stateHover", {
4014
+ id: e.id,
4015
+ name: e.name,
4016
+ value: e.value
4017
+ }), I.value && Rt(e.id, t, n);
4018
+ }
4019
+ function nn() {
4020
+ Ne = null;
3953
4021
  }
3954
- function nn(e) {
3955
- let t = document.createElementNS(Tr, "path");
4022
+ function rn(e) {
4023
+ let t = document.createElementNS(Ar, "path");
3956
4024
  return e && t.setAttribute("d", e), t;
3957
4025
  }
3958
- function rn() {
4026
+ function an() {
3959
4027
  let e = j.value, t = ae.value;
3960
4028
  if (!e || !t) return;
3961
4029
  for (; e.firstChild;) e.removeChild(e.firstChild);
3962
4030
  for (; t.firstChild;) t.removeChild(t.firstChild);
3963
- L.clear(), _e.clear(), ve = null, R = null, z.clear(), ye.clear();
3964
- let n = gt.value, r = pt.value.features;
4031
+ R.clear(), ge.clear(), _e = null, z = null, B.clear(), ve.clear();
4032
+ let n = mt.value, r = dt.value.features;
3965
4033
  if (r.length === 0) return;
3966
- let i = p.strokeColor, a = !me.value, o = document.createDocumentFragment();
4034
+ let i = p.strokeColor, a = !I.value, o = document.createDocumentFragment();
3967
4035
  for (let e of r) {
3968
- let t = String(e.id), r = Pt(e), s = Mt(t), c = nn(n(e));
3969
- if (c.setAttribute("class", "state-path"), c.setAttribute("data-feat-id", t), c.setAttribute("fill", Nt(t)), c.setAttribute("stroke", i), a) {
3970
- let e = document.createElementNS(Tr, "title");
3971
- e.textContent = It(r, s), c.appendChild(e);
4036
+ let t = String(e.id), r = Nt(e), s = jt(t), c = rn(n(e));
4037
+ if (c.setAttribute("class", "state-path"), c.setAttribute("data-feat-id", t), c.setAttribute("fill", Mt(t)), c.setAttribute("stroke", i), a) {
4038
+ let e = document.createElementNS(Ar, "title");
4039
+ e.textContent = Ft(r, s), c.appendChild(e);
3972
4040
  }
3973
- o.appendChild(c), L.set(t, c), _e.set(t, {
4041
+ o.appendChild(c), R.set(t, c), ge.set(t, {
3974
4042
  id: t,
3975
4043
  name: r,
3976
4044
  value: s,
3977
4045
  feature: e
3978
4046
  });
3979
4047
  }
3980
- let s = mt.value;
4048
+ let s = ft.value;
3981
4049
  if (s) {
3982
- let e = nn(n(s));
3983
- e.setAttribute("fill", "none"), e.setAttribute("stroke", i), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("pointer-events", "none"), o.appendChild(e), ve = e;
4050
+ let e = rn(n(s));
4051
+ e.setAttribute("fill", "none"), e.setAttribute("stroke", i), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("pointer-events", "none"), o.appendChild(e), _e = e;
3984
4052
  }
3985
- e.appendChild(o), Q();
4053
+ e.appendChild(o), Wt();
3986
4054
  }
3987
- function an() {
3988
- let e = !me.value;
3989
- for (let [t, n] of L) {
3990
- let r = Mt(t), i = _e.get(t);
3991
- if (n.setAttribute("fill", Nt(t)), i && (i.value = r), e && i) {
4055
+ function on() {
4056
+ let e = !I.value;
4057
+ for (let [t, n] of R) {
4058
+ let r = jt(t), i = ge.get(t);
4059
+ if (n.setAttribute("fill", Mt(t)), i && (i.value = r), e && i) {
3992
4060
  let e = n.firstElementChild;
3993
- e && (e.textContent = It(i.name, r));
4061
+ e && (e.textContent = Ft(i.name, r));
3994
4062
  }
3995
4063
  }
3996
4064
  }
3997
- function on() {
3998
- for (let e of L.values()) e === R || z.has(e) || Gt(e);
3999
- ve && ve.setAttribute("stroke", p.strokeColor), Q();
4000
- }
4001
4065
  function sn() {
4066
+ for (let e of R.values()) e === z || B.has(e) || Kt(e);
4067
+ _e && _e.setAttribute("stroke", p.strokeColor), Wt();
4068
+ }
4069
+ function cn() {
4002
4070
  return typeof p.menu == "string" ? p.menu : "choropleth";
4003
4071
  }
4004
- let cn = n(() => p.legend && (Et.value || Z.value || p.data)), ln = n(() => p.colorScale.slice().sort((e, t) => e.min - t.min)), un = n(() => {
4072
+ let ln = n(() => p.legend && (Ct.value || wt.value || p.data)), un = n(() => p.colorScale.slice().sort((e, t) => e.min - t.min)), dn = n(() => {
4005
4073
  let e = [];
4006
4074
  for (let t = 0; t <= 10; t++) {
4007
4075
  let n = t / 10;
4008
4076
  e.push({
4009
4077
  offset: `${(n * 100).toFixed(0)}%`,
4010
- color: kt(n)
4078
+ color: Ot(n)
4011
4079
  });
4012
4080
  }
4013
4081
  return e;
4014
- }), dn = new Intl.NumberFormat("en-US", {
4082
+ }), fn = new Intl.NumberFormat("en-US", {
4015
4083
  notation: "compact",
4016
4084
  maximumFractionDigits: 1
4017
- }), fn = n(() => {
4018
- let { min: e, max: t } = Tt.value, n = t - e, r = [];
4085
+ }), pn = n(() => {
4086
+ let { min: e, max: t } = St.value, n = t - e, r = [];
4019
4087
  for (let t = 1; t <= 3; t++) {
4020
- let i = t / 4, a = e + n * i, o = Math.abs(a) >= 1e3 ? dn.format(a) : Number.isInteger(a) ? String(a) : a.toFixed(1).replace(/\.0$/, "");
4088
+ let i = t / 4, a = e + n * i, o = Math.abs(a) >= 1e3 ? fn.format(a) : Number.isInteger(a) ? String(a) : a.toFixed(1).replace(/\.0$/, "");
4021
4089
  r.push({
4022
4090
  value: o,
4023
4091
  pct: i * 100
4024
4092
  });
4025
4093
  }
4026
4094
  return r;
4027
- }), pn = n(() => {
4095
+ }), mn = n(() => {
4028
4096
  let e = [];
4029
- if (Et.value) for (let t of p.colorScale) e.push({
4097
+ if (Ct.value) for (let t of p.colorScale) e.push({
4030
4098
  key: t.value,
4031
4099
  color: t.color,
4032
4100
  label: t.value
4033
4101
  });
4034
- else if (Z.value) for (let t of ln.value) e.push({
4102
+ else if (wt.value) for (let t of un.value) e.push({
4035
4103
  key: String(t.min),
4036
4104
  color: t.color,
4037
4105
  label: t.label ?? String(t.min)
4038
4106
  });
4039
4107
  return e;
4040
- }), mn = n(() => `linear-gradient(to right, ${un.value.map((e) => `${e.color} ${e.offset}`).join(", ")})`), $ = He({ target: () => p.fullscreenTarget }), hn = n(() => {
4041
- let e = sn();
4108
+ }), hn = n(() => `linear-gradient(to right, ${dn.value.map((e) => `${e.color} ${e.offset}`).join(", ")})`), $ = Ge({ target: () => p.fullscreenTarget }), gn = n(() => {
4109
+ let e = cn();
4042
4110
  return [
4043
4111
  $.menuItem.value,
4044
4112
  {
4045
4113
  label: "Save as SVG",
4046
4114
  action: () => {
4047
- k.value && K(k.value, e);
4115
+ k.value && q(k.value, e);
4048
4116
  }
4049
4117
  },
4050
4118
  {
4051
4119
  label: "Save as PNG",
4052
4120
  action: () => {
4053
- k.value && Ie(k.value, e);
4121
+ k.value && Fe(k.value, e);
4054
4122
  }
4055
4123
  }
4056
4124
  ];
4057
4125
  });
4058
4126
  return T(() => [
4059
- pt.value,
4060
- gt.value,
4061
- me.value
4062
- ], () => rn()), T(() => [
4063
- wt.value,
4127
+ dt.value,
4128
+ mt.value,
4129
+ I.value
4130
+ ], () => an()), T(() => [
4131
+ xt.value,
4064
4132
  p.colorScale,
4065
4133
  p.noDataColor,
4066
4134
  p.dataGeoType
4067
- ], () => an()), T(() => [p.strokeColor, _t.value], () => on()), T(() => [
4068
- xt.value,
4069
- gt.value,
4070
- lt.value
4071
- ], () => Ge(), { flush: "post" }), T(() => $.isFullscreen.value, (e) => {
4072
- if (e || !q() || !k.value || !B) return;
4135
+ ], () => on()), T(() => [p.strokeColor, ht.value], () => sn()), T(() => [
4136
+ yt.value,
4137
+ mt.value,
4138
+ st.value
4139
+ ], () => Y(), { flush: "post" }), T(() => $.isFullscreen.value, (e) => {
4140
+ if (e || !J() || !k.value || !V) return;
4073
4141
  let t = F(k.value);
4074
- t.interrupt(), B.transform(t, le);
4142
+ t.interrupt(), V.transform(t, le);
4075
4143
  }), (n, l) => (_(), r(t, {
4076
4144
  to: S($).teleportTarget.value,
4077
4145
  disabled: !S($).isFullscreen.value
@@ -4080,16 +4148,16 @@ var Jt = {
4080
4148
  ref: ie
4081
4149
  }, n.$attrs, {
4082
4150
  class: ["choropleth-wrapper", {
4083
- pannable: Xe.value,
4151
+ pannable: Ke.value,
4084
4152
  "is-fullscreen": S($).isFullscreen.value
4085
4153
  }],
4086
4154
  style: S($).fullscreenStyle.value,
4087
4155
  role: w.value || void 0,
4088
4156
  "aria-label": ne.value || void 0
4089
4157
  }), [
4090
- c.menu || S($).isFullscreen.value ? (_(), r(ge, {
4158
+ c.menu || S($).isFullscreen.value ? (_(), r(he, {
4091
4159
  key: 0,
4092
- items: hn.value,
4160
+ items: gn.value,
4093
4161
  "is-fullscreen": S($).isFullscreen.value,
4094
4162
  onClose: S($).exit
4095
4163
  }, null, 8, [
@@ -4097,35 +4165,35 @@ var Jt = {
4097
4165
  "is-fullscreen",
4098
4166
  "onClose"
4099
4167
  ])) : i("", !0),
4100
- o("div", _r, b(S($).isFullscreen.value ? "Map expanded to fill window" : ""), 1),
4101
- c.title || cn.value ? (_(), a("div", vr, [c.title ? (_(), a("div", {
4168
+ o("div", Sr, b(S($).isFullscreen.value ? "Map expanded to fill window" : ""), 1),
4169
+ c.title || ln.value ? (_(), a("div", Cr, [c.title ? (_(), a("div", {
4102
4170
  key: 0,
4103
4171
  class: "choropleth-title",
4104
- style: h(I.value)
4105
- }, b(c.title), 5)) : i("", !0), cn.value ? (_(), a("div", {
4172
+ style: h(L.value)
4173
+ }, b(c.title), 5)) : i("", !0), ln.value ? (_(), a("div", {
4106
4174
  key: 1,
4107
4175
  class: "choropleth-legend",
4108
- style: h(he.value)
4109
- }, [c.legendTitle ? (_(), a("span", yr, b(c.legendTitle), 1)) : i("", !0), Et.value || Z.value ? (_(!0), a(e, { key: 1 }, y(pn.value, (e) => (_(), a("span", {
4176
+ style: h(me.value)
4177
+ }, [c.legendTitle ? (_(), a("span", wr, b(c.legendTitle), 1)) : i("", !0), Ct.value || wt.value ? (_(!0), a(e, { key: 1 }, y(mn.value, (e) => (_(), a("span", {
4110
4178
  key: e.key,
4111
4179
  class: "choropleth-legend-item"
4112
4180
  }, [o("span", {
4113
4181
  class: "choropleth-legend-swatch",
4114
4182
  style: h({ background: e.color })
4115
- }, null, 4), s(" " + b(e.label), 1)]))), 128)) : (_(), a("div", br, [o("div", {
4183
+ }, null, 4), s(" " + b(e.label), 1)]))), 128)) : (_(), a("div", Tr, [o("div", {
4116
4184
  class: "choropleth-legend-gradient",
4117
- style: h({ background: mn.value })
4118
- }, null, 4), o("div", xr, [(_(!0), a(e, null, y(fn.value, (e) => (_(), a("span", {
4185
+ style: h({ background: hn.value })
4186
+ }, null, 4), o("div", Er, [(_(!0), a(e, null, y(pn.value, (e) => (_(), a("span", {
4119
4187
  key: e.value,
4120
4188
  style: h({ left: e.pct + "%" })
4121
4189
  }, b(e.value), 5))), 128))])]))], 4)) : i("", !0)])) : i("", !0),
4122
- Y.value ? (_(), a("div", Sr, b(Ze.value), 1)) : i("", !0),
4190
+ qe.value ? (_(), a("div", Dr, b(Z.value), 1)) : i("", !0),
4123
4191
  (_(), a("svg", {
4124
4192
  ref_key: "svgRef",
4125
4193
  ref: k,
4126
- viewBox: `0 0 ${it.value} ${at.value}`,
4194
+ viewBox: `0 0 ${nt.value} ${rt.value}`,
4127
4195
  preserveAspectRatio: "xMidYMid meet",
4128
- style: h(X.value)
4196
+ style: h(Ye.value)
4129
4197
  }, [o("g", {
4130
4198
  ref_key: "mapGroupRef",
4131
4199
  ref: A
@@ -4135,23 +4203,23 @@ var Jt = {
4135
4203
  }, null, 512), o("g", {
4136
4204
  ref_key: "overlayGroupRef",
4137
4205
  ref: ae
4138
- }, null, 512)], 512)], 12, Cr)),
4139
- Ye.value ? (_(), r(S(qe), {
4206
+ }, null, 512)], 512)], 12, Or)),
4207
+ X.value ? (_(), r(S(Je), {
4140
4208
  key: 3,
4141
- "can-zoom-in": Ee.value < Je.value,
4142
- "can-zoom-out": Ee.value > 1,
4143
- "can-reset": Te.value,
4209
+ "can-zoom-in": Te.value < We.value,
4210
+ "can-zoom-out": Te.value > 1,
4211
+ "can-reset": we.value,
4144
4212
  "is-fullscreen": S($).isFullscreen.value,
4145
- onZoomIn: l[0] ||= (e) => Qe(Ar),
4146
- onZoomOut: l[1] ||= (e) => Qe(1 / Ar),
4147
- onReset: J
4213
+ onZoomIn: l[0] ||= (e) => Xe(Ir),
4214
+ onZoomOut: l[1] ||= (e) => Xe(1 / Ir),
4215
+ onReset: Ue
4148
4216
  }, null, 8, [
4149
4217
  "can-zoom-in",
4150
4218
  "can-zoom-out",
4151
4219
  "can-reset",
4152
4220
  "is-fullscreen"
4153
4221
  ])) : i("", !0),
4154
- me.value ? (_(), r(hr, {
4222
+ I.value ? (_(), r(br, {
4155
4223
  key: 4,
4156
4224
  ref_key: "tooltipChildRef",
4157
4225
  ref: M
@@ -4159,12 +4227,12 @@ var Jt = {
4159
4227
  default: E((t) => [te(n.$slots, "tooltip", m(u(O(t))), () => [c.tooltipFormat ? (_(), a("span", {
4160
4228
  key: 0,
4161
4229
  innerHTML: c.tooltipFormat(t)
4162
- }, null, 8, wr)) : t.value == null ? (_(), a(e, { key: 1 }, [s(b(t.name), 1)], 64)) : (_(), a(e, { key: 2 }, [s(b(t.name) + ": " + b(Ft(t.value)), 1)], 64))], !0)]),
4230
+ }, null, 8, kr)) : t.value == null ? (_(), a(e, { key: 1 }, [s(b(t.name), 1)], 64)) : (_(), a(e, { key: 2 }, [s(b(t.name) + ": " + b(Pt(t.value)), 1)], 64))], !0)]),
4163
4231
  _: 3
4164
4232
  }, 512)) : i("", !0)
4165
- ], 16, gr)], 8, ["to", "disabled"]));
4233
+ ], 16, xr)], 8, ["to", "disabled"]));
4166
4234
  }
4167
- }), [["__scopeId", "data-v-1fc9b944"]]), Fr = /* @__PURE__ */ I(/* @__PURE__ */ l({
4235
+ }), [["__scopeId", "data-v-5298a6d6"]]), Hr = /* @__PURE__ */ L(/* @__PURE__ */ l({
4168
4236
  __name: "ChartTooltip",
4169
4237
  props: {
4170
4238
  x: {},
@@ -4215,7 +4283,7 @@ var Jt = {
4215
4283
  _: 3
4216
4284
  }, 8, ["open"])) : i("", !0);
4217
4285
  }
4218
- }), [["__scopeId", "data-v-44377f70"]]), Ir = { class: "TableWrapper" }, Lr = ["href", "download"], Rr = /* @__PURE__ */ I(/* @__PURE__ */ l({
4286
+ }), [["__scopeId", "data-v-44377f70"]]), Ur = { class: "TableWrapper" }, Wr = ["href", "download"], Gr = /* @__PURE__ */ L(/* @__PURE__ */ l({
4219
4287
  __name: "DataTable",
4220
4288
  props: {
4221
4289
  data: {},
@@ -4309,15 +4377,15 @@ var Jt = {
4309
4377
  function S() {
4310
4378
  if (typeof c.csv == "function") return c.csv();
4311
4379
  if (typeof c.csv == "string") return c.csv;
4312
- let e = v.value, t = te.value, n = [e.map((e) => Ye(l(e.name))).join(",")];
4380
+ let e = v.value, t = te.value, n = [e.map((e) => Ze(l(e.name))).join(",")];
4313
4381
  for (let r = 0; r < t; r++) {
4314
- let t = e.map((e) => Ye(ne(e, r)));
4382
+ let t = e.map((e) => Ze(ne(e, r)));
4315
4383
  n.push(t.join(","));
4316
4384
  }
4317
4385
  return n.join("\n");
4318
4386
  }
4319
4387
  function C() {
4320
- Le(S(), x());
4388
+ Ie(S(), x());
4321
4389
  }
4322
4390
  let w = n(() => c.downloadButton || c.downloadLink ? [] : [{
4323
4391
  label: c.downloadMenuLink,
@@ -4331,12 +4399,12 @@ var Jt = {
4331
4399
  "full-width": t.fullWidth,
4332
4400
  "has-menu": D.value
4333
4401
  }]) }, [
4334
- D.value ? (_(), r(ge, {
4402
+ D.value ? (_(), r(he, {
4335
4403
  key: 0,
4336
4404
  items: w.value,
4337
4405
  "force-dropdown": ""
4338
4406
  }, null, 8, ["items"])) : i("", !0),
4339
- o("div", Ir, [o("table", { class: p(["Table", { "full-width": t.fullWidth }]) }, [
4407
+ o("div", Ur, [o("table", { class: p(["Table", { "full-width": t.fullWidth }]) }, [
4340
4408
  o("colgroup", null, [(_(!0), a(e, null, y(v.value, (e) => (_(), a("col", {
4341
4409
  key: e.name,
4342
4410
  style: h(u(e.name))
@@ -4362,9 +4430,9 @@ var Jt = {
4362
4430
  class: "data-table-download-link",
4363
4431
  href: E.value,
4364
4432
  download: `${x()}.csv`
4365
- }, b(T.value), 9, Lr)) : i("", !0)
4433
+ }, b(T.value), 9, Wr)) : i("", !0)
4366
4434
  ], 2));
4367
4435
  }
4368
4436
  }), [["__scopeId", "data-v-9b1b6a76"]]);
4369
4437
  //#endregion
4370
- export { pr as BarChart, Fr as ChartTooltip, Pr as ChoroplethMap, Rr as DataTable, Nn as LineChart };
4438
+ export { vr as BarChart, Hr as ChartTooltip, Vr as ChoroplethMap, Gr as DataTable, Rn as LineChart };