@cfasim-ui/charts 0.4.1 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,11 +1,12 @@
1
- import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, guardReactiveProps as l, mergeProps as u, normalizeClass as d, normalizeProps as f, normalizeStyle as p, onMounted as ee, onUnmounted as m, openBlock as h, ref as g, renderList as _, renderSlot as v, toDisplayString as y, toHandlers as te, toRaw as b, unref as x, useId as S, watch as ne, withCtx as C } from "vue";
2
- import { DropdownMenuContent as w, DropdownMenuItem as T, DropdownMenuPortal as re, DropdownMenuRoot as E, DropdownMenuTrigger as D, PopoverAnchor as O, PopoverContent as k, PopoverPortal as A, PopoverRoot as j } from "reka-ui";
3
- import { geoAlbersUsa as M, geoPath as N } from "d3-geo";
4
- import { zoom as P } from "d3-zoom";
5
- import { select as F } from "d3-selection";
6
- import { feature as I, merge as L, mesh as ie } from "topojson-client";
1
+ import { Fragment as e, Teleport as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, mergeProps as d, normalizeClass as f, normalizeProps as p, normalizeStyle as m, onMounted as h, onUnmounted as ee, openBlock as g, ref as _, renderList as v, renderSlot as te, toDisplayString as y, toHandlers as ne, toRaw as b, unref as x, useSlots as re, useTemplateRef as S, watch as C, withCtx as w } from "vue";
2
+ import { DropdownMenuContent as T, DropdownMenuItem as E, DropdownMenuPortal as D, DropdownMenuRoot as O, DropdownMenuTrigger as k, PopoverAnchor as A, PopoverContent as j, PopoverPortal as M, PopoverRoot as N } from "reka-ui";
3
+ import { geoAlbersUsa as P, geoPath as ie } from "d3-geo";
4
+ import { zoom as F, zoomIdentity as I } from "d3-zoom";
5
+ import { select as ae } from "d3-selection";
6
+ import "d3-transition";
7
+ import { feature as L, merge as oe, mesh as R } from "topojson-client";
7
8
  //#region src/ChartMenu/ChartMenu.vue?vue&type=script&setup=true&lang.ts
8
- var R = { class: "chart-menu-trigger-area" }, ae = ["aria-label"], z = /* @__PURE__ */ c({
9
+ var z = { class: "chart-menu-trigger-area" }, B = ["aria-label"], V = /* @__PURE__ */ l({
9
10
  __name: "ChartMenu",
10
11
  props: {
11
12
  items: {},
@@ -15,51 +16,51 @@ var R = { class: "chart-menu-trigger-area" }, ae = ["aria-label"], z = /* @__PUR
15
16
  }
16
17
  },
17
18
  setup(t) {
18
- let r = t, c = () => r.forceDropdown || r.items.length > 1;
19
- return (r, l) => (h(), i("div", R, [c() ? (h(), n(x(E), {
19
+ let n = t, i = () => n.forceDropdown || n.items.length > 1;
20
+ return (n, l) => (g(), a("div", z, [i() ? (g(), r(x(O), {
20
21
  key: 1,
21
22
  modal: !1
22
23
  }, {
23
- default: C(() => [s(x(D), {
24
+ default: w(() => [c(x(k), {
24
25
  class: "chart-menu-button",
25
26
  "aria-label": "Chart options"
26
27
  }, {
27
- default: C(() => [...l[2] ||= [a("svg", {
28
+ default: w(() => [...l[2] ||= [o("svg", {
28
29
  width: "16",
29
30
  height: "16",
30
31
  viewBox: "0 0 16 16",
31
32
  fill: "currentColor",
32
33
  "aria-hidden": "true"
33
34
  }, [
34
- a("circle", {
35
+ o("circle", {
35
36
  cx: "3",
36
37
  cy: "8",
37
38
  r: "1.5"
38
39
  }),
39
- a("circle", {
40
+ o("circle", {
40
41
  cx: "8",
41
42
  cy: "8",
42
43
  r: "1.5"
43
44
  }),
44
- a("circle", {
45
+ o("circle", {
45
46
  cx: "13",
46
47
  cy: "8",
47
48
  r: "1.5"
48
49
  })
49
50
  ], -1)]]),
50
51
  _: 1
51
- }), s(x(re), null, {
52
- default: C(() => [s(x(w), {
52
+ }), c(x(D), null, {
53
+ default: w(() => [c(x(T), {
53
54
  class: "chart-menu-content",
54
55
  "side-offset": 4,
55
56
  align: "end"
56
57
  }, {
57
- default: C(() => [(h(!0), i(e, null, _(t.items, (e) => (h(), n(x(T), {
58
+ default: w(() => [(g(!0), a(e, null, v(t.items, (e) => (g(), r(x(E), {
58
59
  key: e.label,
59
60
  class: "chart-menu-item",
60
61
  onSelect: e.action
61
62
  }, {
62
- default: C(() => [o(y(e.label), 1)]),
63
+ default: w(() => [s(y(e.label), 1)]),
63
64
  _: 2
64
65
  }, 1032, ["onSelect"]))), 128))]),
65
66
  _: 1
@@ -67,12 +68,12 @@ var R = { class: "chart-menu-trigger-area" }, ae = ["aria-label"], z = /* @__PUR
67
68
  _: 1
68
69
  })]),
69
70
  _: 1
70
- })) : (h(), i("button", {
71
+ })) : (g(), a("button", {
71
72
  key: 0,
72
73
  class: "chart-menu-button chart-menu-single",
73
74
  "aria-label": t.items[0].label,
74
75
  onClick: l[0] ||= (...e) => t.items[0].action && t.items[0].action(...e)
75
- }, [...l[1] ||= [a("svg", {
76
+ }, [...l[1] ||= [o("svg", {
76
77
  width: "14",
77
78
  height: "14",
78
79
  viewBox: "0 0 14 14",
@@ -82,48 +83,48 @@ var R = { class: "chart-menu-trigger-area" }, ae = ["aria-label"], z = /* @__PUR
82
83
  "stroke-linecap": "round",
83
84
  "stroke-linejoin": "round",
84
85
  "aria-hidden": "true"
85
- }, [a("path", { d: "M7 1v8M3 6l4 4 4-4M2 13h10" })], -1)]], 8, ae))]));
86
+ }, [o("path", { d: "M7 1v8M3 6l4 4 4-4M2 13h10" })], -1)]], 8, B))]));
86
87
  }
87
- }), B = (e, t) => {
88
+ }), H = (e, t) => {
88
89
  let n = e.__vccOpts || e;
89
90
  for (let [e, r] of t) n[e] = r;
90
91
  return n;
91
- }, oe = /* @__PURE__ */ B(z, [["__scopeId", "data-v-b3c563e8"]]);
92
+ }, se = /* @__PURE__ */ H(V, [["__scopeId", "data-v-b3c563e8"]]);
92
93
  //#endregion
93
94
  //#region src/_shared/axes.ts
94
- function V(e) {
95
+ function U(e) {
95
96
  return Math.round(e) + .5;
96
97
  }
97
- function H(e, t) {
98
+ function W(e, t) {
98
99
  let n = e / t, r = 10 ** Math.floor(Math.log10(n)), i = n / r, a;
99
100
  return a = i <= 1.5 ? 1 : i <= 3 ? 2 : i <= 7 ? 5 : 10, a * r;
100
101
  }
101
- function se(e, t, n) {
102
+ function G(e, t, n) {
102
103
  if (!(n > 0) || !isFinite(n)) return [];
103
104
  let r = [], i = Math.ceil(e / n) * n;
104
105
  for (let e = 0, a = i; a <= t + 1e-9 && e < 1e3; e++, a = i + e * n) r.push(a);
105
106
  return r;
106
107
  }
107
- var U = new Intl.NumberFormat();
108
- function W(e) {
109
- return Math.abs(e) >= 1e3 ? U.format(e) : Number.isInteger(e) ? e.toString() : e.toFixed(1);
108
+ var ce = new Intl.NumberFormat();
109
+ function K(e) {
110
+ return Math.abs(e) >= 1e3 ? ce.format(e) : Number.isInteger(e) ? e.toString() : e.toFixed(1);
110
111
  }
111
112
  //#endregion
112
113
  //#region src/_shared/computeTicks.ts
113
- function ce(e) {
114
+ function le(e) {
114
115
  let { min: t, max: n, ticks: r } = e;
115
116
  if (t === n) return [];
116
117
  let i = e.displayOffset ?? 0;
117
118
  if (Array.isArray(r)) return r.map((e) => e - i).filter((e) => e >= t && e <= n);
118
- if (typeof r == "number") return se(t + i, n + i, r).map((e) => e - i);
119
- let a = Math.max(3, Math.floor(e.targetTickCount ?? 3)), o = H(n - t, a);
120
- return se(t + i, n + i, o).map((e) => e - i);
119
+ if (typeof r == "number") return G(t + i, n + i, r).map((e) => e - i);
120
+ let a = Math.max(3, Math.floor(e.targetTickCount ?? 3)), o = W(n - t, a);
121
+ return G(t + i, n + i, o).map((e) => e - i);
121
122
  }
122
123
  //#endregion
123
124
  //#region src/_shared/useChartSize.ts
124
- function G(e = {}) {
125
- let t = g(null), n = g(0), r = null, i = null;
126
- return ee(() => {
125
+ function ue(e = {}) {
126
+ let t = _(null), n = _(0), r = null, i = null;
127
+ return h(() => {
127
128
  t.value && (n.value = t.value.clientWidth, r = new ResizeObserver((t) => {
128
129
  let r = t[0];
129
130
  if (!r) return;
@@ -132,30 +133,30 @@ function G(e = {}) {
132
133
  n.value = r.contentRect.width;
133
134
  }, a)) : n.value = r.contentRect.width;
134
135
  }), r.observe(t.value));
135
- }), m(() => {
136
+ }), ee(() => {
136
137
  r?.disconnect(), i && clearTimeout(i);
137
138
  }), {
138
139
  containerRef: t,
139
140
  measuredWidth: n
140
141
  };
141
142
  }
142
- function K(e) {
143
- let n = t(() => ({
143
+ function de(e) {
144
+ let t = n(() => ({
144
145
  top: (e.title() ? 30 : 10) + (e.hasInlineLegend() ? 20 : 0),
145
146
  right: 10,
146
147
  bottom: e.xLabel() ? 46 : 30,
147
148
  left: e.yLabel() ? 66 : 50
148
149
  }));
149
150
  return {
150
- padding: n,
151
- innerW: t(() => e.width() - n.value.left - n.value.right),
152
- innerH: t(() => e.height() - n.value.top - n.value.bottom)
151
+ padding: t,
152
+ innerW: n(() => e.width() - t.value.left - t.value.right),
153
+ innerH: n(() => e.height() - t.value.top - t.value.bottom)
153
154
  };
154
155
  }
155
156
  //#endregion
156
157
  //#region src/tooltip-position.ts
157
158
  var q = 16, J = 8;
158
- function le(e, t, n, r, i, a) {
159
+ function Y(e, t, n, r, i, a) {
159
160
  if (i === "none") return {
160
161
  left: e + q,
161
162
  top: t
@@ -178,8 +179,8 @@ function le(e, t, n, r, i, a) {
178
179
  }
179
180
  //#endregion
180
181
  //#region src/_shared/useChartTooltip.ts
181
- function ue(e) {
182
- let t = e.touchYOffset ?? 50, n = g(null), r = g(!1), i = g(null), a = g(null), o = g(null);
182
+ function fe(e) {
183
+ let t = e.touchYOffset ?? 50, n = _(null), r = _(!1), i = _(null), a = _(null), o = _(null);
183
184
  function s(e) {
184
185
  return "touches" in e ? e.touches[0] ?? null : e;
185
186
  }
@@ -192,14 +193,14 @@ function ue(e) {
192
193
  clientY: r.clientY
193
194
  }, e.onHover?.({ index: i }));
194
195
  }
195
- ne([a, n], () => {
196
+ C([a, n], () => {
196
197
  if (n.value === null || !a.value) {
197
198
  o.value = null;
198
199
  return;
199
200
  }
200
201
  let s = i.value, c = e.containerRef.value;
201
202
  if (!s || !c) return;
202
- let l = c.getBoundingClientRect(), u = r.value ? t : 0, d = e.clamp?.() ?? "chart", { left: f, top: p } = le(a.value.clientX, a.value.clientY - u, s.offsetWidth, s.offsetHeight, d, l);
203
+ let l = c.getBoundingClientRect(), u = r.value ? t : 0, d = e.clamp?.() ?? "chart", { left: f, top: p } = Y(a.value.clientX, a.value.clientY - u, s.offsetWidth, s.offsetHeight, d, l);
203
204
  o.value = {
204
205
  left: f - l.left,
205
206
  top: p - l.top
@@ -224,7 +225,7 @@ function ue(e) {
224
225
  function p(t) {
225
226
  e.enabled() && (t.preventDefault(), c(t));
226
227
  }
227
- function ee() {
228
+ function m() {
228
229
  e.enabled() && (r.value = !1, n.value = null, e.onHover?.(null));
229
230
  }
230
231
  return {
@@ -239,23 +240,23 @@ function ue(e) {
239
240
  click: d,
240
241
  touchstart: f,
241
242
  touchmove: p,
242
- touchend: ee
243
+ touchend: m
243
244
  }
244
245
  };
245
246
  }
246
247
  //#endregion
247
248
  //#region src/ChartMenu/download.ts
248
- function Y(e, t) {
249
+ function pe(e, t) {
249
250
  let n = URL.createObjectURL(e), r = document.createElement("a");
250
251
  r.href = n, r.download = t, r.click(), URL.revokeObjectURL(n);
251
252
  }
252
- function de(e, t) {
253
+ function X(e, t) {
253
254
  let n = e.cloneNode(!0);
254
255
  n.setAttribute("xmlns", "http://www.w3.org/2000/svg");
255
256
  let r = new XMLSerializer().serializeToString(n);
256
- Y(new Blob([r], { type: "image/svg+xml" }), `${t}.svg`);
257
+ pe(new Blob([r], { type: "image/svg+xml" }), `${t}.svg`);
257
258
  }
258
- function X(e, t) {
259
+ function me(e, t) {
259
260
  let n = e.cloneNode(!0);
260
261
  n.setAttribute("xmlns", "http://www.w3.org/2000/svg");
261
262
  let 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;
@@ -264,17 +265,17 @@ function X(e, t) {
264
265
  e.width = s * 2, e.height = c * 2;
265
266
  let n = e.getContext("2d");
266
267
  n.scale(2, 2), n.drawImage(o, 0, 0, s, c), e.toBlob((e) => {
267
- e && Y(e, `${t}.png`);
268
+ e && pe(e, `${t}.png`);
268
269
  }), URL.revokeObjectURL(a);
269
270
  }, o.src = a;
270
271
  }
271
- function fe(e, t) {
272
- Y(new Blob([e], { type: "text/csv" }), `${t}.csv`);
272
+ function Z(e, t) {
273
+ pe(new Blob([e], { type: "text/csv" }), `${t}.csv`);
273
274
  }
274
275
  //#endregion
275
276
  //#region src/_shared/useChartMenu.ts
276
- function pe(e) {
277
- let n = g(null);
277
+ function he(e) {
278
+ let t = _(null);
278
279
  function r() {
279
280
  let t = e.filename();
280
281
  if (t) return t;
@@ -282,35 +283,35 @@ function pe(e) {
282
283
  return typeof n == "string" ? n : "chart";
283
284
  }
284
285
  return {
285
- svgRef: n,
286
- items: t(() => {
287
- let t = r(), i = [{
286
+ svgRef: t,
287
+ items: n(() => {
288
+ let n = r(), i = [{
288
289
  label: "Save as SVG",
289
290
  action: () => {
290
- n.value && de(n.value, t);
291
+ t.value && X(t.value, n);
291
292
  }
292
293
  }, {
293
294
  label: "Save as PNG",
294
295
  action: () => {
295
- n.value && X(n.value, t);
296
+ t.value && me(t.value, n);
296
297
  }
297
298
  }];
298
299
  return e.downloadLink() || i.push({
299
300
  label: "Download CSV",
300
- action: () => fe(e.getCsv(), t)
301
+ action: () => Z(e.getCsv(), n)
301
302
  }), i;
302
303
  }),
303
- downloadLinkText: t(() => {
304
+ downloadLinkText: n(() => {
304
305
  let t = e.downloadLink();
305
306
  return t ? typeof t == "string" ? t : "Download data (CSV)" : null;
306
307
  }),
307
- csvHref: t(() => e.downloadLink() ? `data:text/csv;charset=utf-8,${encodeURIComponent(e.getCsv())}` : null),
308
+ csvHref: n(() => e.downloadLink() ? `data:text/csv;charset=utf-8,${encodeURIComponent(e.getCsv())}` : null),
308
309
  resolvedFilename: r
309
310
  };
310
311
  }
311
312
  //#endregion
312
313
  //#region src/_shared/seriesCsv.ts
313
- function me(e) {
314
+ function ge(e) {
314
315
  if (e.length === 0) return "";
315
316
  let t = 0;
316
317
  for (let n of e) n.data.length > t && (t = n.data.length);
@@ -322,7 +323,7 @@ function me(e) {
322
323
  }
323
324
  return i.join("\n");
324
325
  }
325
- function Z(e, t, n = "category") {
326
+ function _e(e, t, n = "category") {
326
327
  if (t.length === 0 || e.length === 0) return "";
327
328
  let r = [(t.length === 1 ? [n, t[0].label || "value"] : [n, ...t.map((e, t) => e.label || `series_${t}`)]).join(",")];
328
329
  for (let n = 0; n < e.length; n++) {
@@ -337,70 +338,70 @@ function Q(e) {
337
338
  }
338
339
  //#endregion
339
340
  //#region src/LineChart/LineChart.vue?vue&type=script&setup=true&lang.ts
340
- var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
341
+ var ve = ["width", "height"], ye = ["x"], be = { key: 1 }, xe = [
341
342
  "x1",
342
343
  "y1",
343
344
  "x2",
344
345
  "y2",
345
346
  "stroke",
346
347
  "stroke-dasharray"
347
- ], ye = [
348
+ ], $ = [
348
349
  "cx",
349
350
  "cy",
350
351
  "fill",
351
352
  "fill-opacity",
352
353
  "stroke"
353
- ], be = ["x", "y"], xe = [
354
+ ], Se = ["x", "y"], Ce = [
354
355
  "x1",
355
356
  "y1",
356
357
  "x2",
357
358
  "y2"
358
- ], $ = [
359
+ ], we = [
359
360
  "x1",
360
361
  "y1",
361
362
  "x2",
362
363
  "y2"
363
- ], Se = [
364
+ ], Te = [
364
365
  "x1",
365
366
  "y1",
366
367
  "x2",
367
368
  "y2"
368
- ], Ce = [
369
+ ], Ee = [
369
370
  "x1",
370
371
  "y1",
371
372
  "x2",
372
373
  "y2"
373
- ], we = ["x", "y"], Te = ["transform"], Ee = [
374
+ ], De = ["x", "y"], Oe = ["transform"], ke = [
374
375
  "x",
375
376
  "y",
376
377
  "text-anchor"
377
- ], De = ["x", "y"], Oe = [
378
+ ], Ae = ["x", "y"], je = [
378
379
  "d",
379
380
  "fill",
380
381
  "fill-opacity"
381
- ], ke = [
382
+ ], Me = [
382
383
  "d",
383
384
  "stroke",
384
385
  "stroke-width",
385
386
  "stroke-opacity",
386
387
  "stroke-dasharray"
387
- ], Ae = [
388
+ ], Ne = [
388
389
  "cx",
389
390
  "cy",
390
391
  "r",
391
392
  "fill",
392
393
  "fill-opacity",
393
394
  "stroke"
394
- ], je = [
395
+ ], Pe = [
395
396
  "d",
396
397
  "fill",
397
398
  "fill-opacity"
398
- ], Me = [
399
+ ], Fe = [
399
400
  "d",
400
401
  "stroke",
401
402
  "stroke-width",
402
403
  "stroke-dasharray"
403
- ], Ne = [
404
+ ], Ie = [
404
405
  "x1",
405
406
  "y1",
406
407
  "x2",
@@ -408,7 +409,7 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
408
409
  "stroke",
409
410
  "stroke-width",
410
411
  "stroke-dasharray"
411
- ], Pe = [
412
+ ], Le = [
412
413
  "x1",
413
414
  "y1",
414
415
  "x2",
@@ -416,44 +417,44 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
416
417
  "stroke",
417
418
  "stroke-width",
418
419
  "stroke-dasharray"
419
- ], Fe = [
420
+ ], Re = [
420
421
  "x1",
421
422
  "y1",
422
423
  "x2",
423
424
  "y2"
424
- ], Ie = [
425
+ ], ze = [
425
426
  "x1",
426
427
  "y1",
427
428
  "x2",
428
429
  "y2"
429
- ], Le = [
430
+ ], Be = [
430
431
  "x1",
431
432
  "y1",
432
433
  "x2",
433
434
  "y2"
434
- ], Re = [
435
+ ], Ve = [
435
436
  "cx",
436
437
  "cy",
437
438
  "fill"
438
- ], ze = [
439
+ ], He = [
439
440
  "x",
440
441
  "y",
441
442
  "width",
442
443
  "height"
443
- ], Be = [
444
+ ], Ue = [
444
445
  "cx",
445
446
  "cy",
446
447
  "fill",
447
448
  "fill-opacity",
448
449
  "stroke"
449
- ], Ve = [
450
+ ], We = [
450
451
  "x",
451
452
  "y",
452
453
  "fill"
453
- ], He = ["x", "y"], Ue = { class: "line-chart-tooltip" }, We = {
454
+ ], Ge = ["x", "y"], Ke = { class: "line-chart-tooltip" }, qe = {
454
455
  key: 0,
455
456
  class: "line-chart-tooltip-label"
456
- }, Ge = ["href", "download"], Ke = 36, qe = 12, Je = 7, Ye = 16, Xe = /* @__PURE__ */ B(/* @__PURE__ */ c({
457
+ }, Je = ["href", "download"], Ye = 36, Xe = 12, Ze = 7, Qe = 16, $e = /* @__PURE__ */ H(/* @__PURE__ */ l({
457
458
  __name: "LineChart",
458
459
  props: {
459
460
  y: {},
@@ -491,44 +492,44 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
491
492
  downloadLink: { type: [Boolean, String] }
492
493
  },
493
494
  emits: ["hover"],
494
- setup(s, { emit: c }) {
495
- let d = s, ee = c, { containerRef: m, measuredWidth: g } = G({ debounce: () => d.debounce }), b = t(() => d.width ?? (g.value || 400)), S = t(() => d.height ?? 200), ne = t(() => O.value.some((e) => e.legend) || d.areaSections?.some((e) => e.legend === "inline" && (e.label || e.description)) || !1), { padding: C, innerW: w, innerH: T } = K({
496
- title: () => d.title,
497
- xLabel: () => d.xLabel,
498
- yLabel: () => d.yLabel,
499
- hasInlineLegend: () => ne.value,
500
- width: () => b.value,
501
- height: () => S.value
502
- }), re = [];
495
+ setup(t, { emit: c }) {
496
+ let l = t, f = c, { containerRef: h, measuredWidth: ee } = ue({ debounce: () => l.debounce }), _ = n(() => l.width ?? (ee.value || 400)), b = n(() => l.height ?? 200), re = n(() => O.value.some((e) => e.legend) || l.areaSections?.some((e) => e.legend === "inline" && (e.label || e.description)) || !1), { padding: S, innerW: C, innerH: w } = de({
497
+ title: () => l.title,
498
+ xLabel: () => l.xLabel,
499
+ yLabel: () => l.yLabel,
500
+ hasInlineLegend: () => re.value,
501
+ width: () => _.value,
502
+ height: () => b.value
503
+ }), T = [];
503
504
  function E(e) {
504
505
  return {
505
506
  ...e,
506
- data: e.y ?? e.data ?? re
507
+ data: e.y ?? e.data ?? T
507
508
  };
508
509
  }
509
510
  function D(e) {
510
- return d.tooltipValueFormat ? d.tooltipValueFormat(e) : d.yTickFormat ? d.yTickFormat(e) : W(e);
511
+ return l.tooltipValueFormat ? l.tooltipValueFormat(e) : l.yTickFormat ? l.yTickFormat(e) : K(e);
511
512
  }
512
- let O = t(() => {
513
- if (d.series && d.series.length > 0) return d.series.map(E);
514
- let e = d.y ?? d.data;
513
+ let O = n(() => {
514
+ if (l.series && l.series.length > 0) return l.series.map(E);
515
+ let e = l.y ?? l.data;
515
516
  return e ? [{
516
517
  data: e,
517
- x: d.x
518
+ x: l.x
518
519
  }] : [];
519
- }), k = t(() => d.areas ?? []), A = t(() => {
520
+ }), k = n(() => l.areas ?? []), A = n(() => {
520
521
  let e = 0;
521
522
  for (let t of O.value) t.data.length > e && (e = t.data.length);
522
523
  for (let t of k.value) t.upper.length > e && (e = t.upper.length), t.lower.length > e && (e = t.lower.length);
523
524
  return e;
524
- }), j = t(() => O.value.some((e) => e.x != null) || k.value.some((e) => e.x != null));
525
+ }), j = n(() => O.value.some((e) => e.x != null) || k.value.some((e) => e.x != null));
525
526
  function M(e, t) {
526
527
  return e.x ? Number(e.x[t]) : t;
527
528
  }
528
529
  function N(e, t) {
529
530
  return e.x ? Number(e.x[t]) : t;
530
531
  }
531
- let P = t(() => j.value ? 0 : d.xMin ?? 0), F = t(() => {
532
+ let P = n(() => j.value ? 0 : l.xMin ?? 0), ie = n(() => {
532
533
  let e = Infinity, t = -Infinity;
533
534
  for (let n of O.value) for (let r = 0; r < n.data.length; r++) {
534
535
  let i = M(n, r);
@@ -549,18 +550,18 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
549
550
  max: 0
550
551
  };
551
552
  });
552
- function I(e) {
553
- let { min: t, max: n } = F.value, r = n - t || 1;
554
- return C.value.left + (e - t) / r * w.value;
553
+ function F(e) {
554
+ let { min: t, max: n } = ie.value, r = n - t || 1;
555
+ return S.value.left + (e - t) / r * C.value;
555
556
  }
556
- let L = t(() => {
557
+ let I = n(() => {
557
558
  let e = Infinity, t = -Infinity;
558
559
  for (let n of O.value) for (let r of n.data) isFinite(r) && (r < e && (e = r), r > t && (t = r));
559
560
  for (let n of k.value) {
560
561
  for (let r of n.upper) isFinite(r) && (r < e && (e = r), r > t && (t = r));
561
562
  for (let r of n.lower) isFinite(r) && (r < e && (e = r), r > t && (t = r));
562
563
  }
563
- return isFinite(e) ? (d.yMin != null && d.yMin < e && (e = d.yMin), {
564
+ return isFinite(e) ? (l.yMin != null && l.yMin < e && (e = l.yMin), {
564
565
  min: e,
565
566
  max: t,
566
567
  range: t - e || 1
@@ -570,75 +571,75 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
570
571
  range: 1
571
572
  };
572
573
  });
573
- function ie(e) {
574
+ function ae(e) {
574
575
  let t = e.data;
575
576
  if (t.length === 0) return "";
576
- let { min: n, range: r } = L.value, i = T.value / r, a = C.value.top + T.value, o = "", s = !1;
577
+ let { min: n, range: r } = I.value, i = w.value / r, a = S.value.top + w.value, o = "", s = !1;
577
578
  for (let r = 0; r < t.length; r++) {
578
579
  let c = M(e, r);
579
580
  if (!isFinite(t[r]) || !isFinite(c)) {
580
581
  s = !1;
581
582
  continue;
582
583
  }
583
- let l = I(c), u = a - (t[r] - n) * i;
584
+ let l = F(c), u = a - (t[r] - n) * i;
584
585
  o += s ? `L${l},${u}` : `M${l},${u}`, s = !0;
585
586
  }
586
587
  return o;
587
588
  }
588
- function R(e) {
589
- let t = e.data, { min: n, range: r } = L.value, i = T.value / r, a = C.value.top + T.value, o = [];
589
+ function L(e) {
590
+ let t = e.data, { min: n, range: r } = I.value, i = w.value / r, a = S.value.top + w.value, o = [];
590
591
  for (let r = 0; r < t.length; r++) {
591
592
  let s = M(e, r);
592
593
  !isFinite(t[r]) || !isFinite(s) || o.push({
593
- x: I(s),
594
+ x: F(s),
594
595
  y: a - (t[r] - n) * i
595
596
  });
596
597
  }
597
598
  return o;
598
599
  }
599
- function ae(e) {
600
+ function oe(e) {
600
601
  let t = Math.min(e.upper.length, e.lower.length);
601
602
  if (t === 0) return "";
602
- let { min: n, range: r } = L.value, i = T.value / r, a = C.value.top + T.value, o = (e) => a - (e - n) * i, s = [], c = [];
603
+ let { min: n, range: r } = I.value, i = w.value / r, a = S.value.top + w.value, o = (e) => a - (e - n) * i, s = [], c = [];
603
604
  for (let n = 0; n < t; n++) isFinite(e.upper[n]) && isFinite(e.lower[n]) && isFinite(N(e, n)) ? c.push(n) : c.length && (s.push(c), c = []);
604
605
  c.length && s.push(c);
605
606
  let l = "";
606
607
  for (let t of s) {
607
- l += `M${I(N(e, t[0]))},${o(e.upper[t[0]])}`;
608
- for (let n = 1; n < t.length; n++) l += `L${I(N(e, t[n]))},${o(e.upper[t[n]])}`;
609
- for (let n = t.length - 1; n >= 0; n--) l += `L${I(N(e, t[n]))},${o(e.lower[t[n]])}`;
608
+ l += `M${F(N(e, t[0]))},${o(e.upper[t[0]])}`;
609
+ for (let n = 1; n < t.length; n++) l += `L${F(N(e, t[n]))},${o(e.upper[t[n]])}`;
610
+ for (let n = t.length - 1; n >= 0; n--) l += `L${F(N(e, t[n]))},${o(e.lower[t[n]])}`;
610
611
  l += "Z";
611
612
  }
612
613
  return l;
613
614
  }
614
- function z(e, t) {
615
+ function R(e, t) {
615
616
  let n = t === "start" ? e.startIndex : e.endIndex, r = e.seriesIndex != null && O.value[e.seriesIndex] || O.value[0];
616
- return I(r ? M(r, n) : n);
617
+ return F(r ? M(r, n) : n);
617
618
  }
618
- function B(e, t = !0) {
619
- let n = C.value.top + T.value;
619
+ function z(e, t = !0) {
620
+ let n = S.value.top + w.value;
620
621
  if (e.seriesIndex == null) {
621
- let t = z(e, "start"), r = z(e, "end");
622
- return t > r ? "" : `M${t},${C.value.top}L${r},${C.value.top}L${r},${n}L${t},${n}Z`;
622
+ let t = R(e, "start"), r = R(e, "end");
623
+ return t > r ? "" : `M${t},${S.value.top}L${r},${S.value.top}L${r},${n}L${t},${n}Z`;
623
624
  }
624
625
  let r = O.value[e.seriesIndex];
625
626
  if (!r) return "";
626
- let { min: i, range: a } = L.value, o = T.value / a, s = (e) => n - (e - i) * o, c = Math.max(0, e.startIndex), l = Math.min(r.data.length - 1, e.endIndex);
627
+ let { min: i, range: a } = I.value, o = w.value / a, s = (e) => n - (e - i) * o, c = Math.max(0, e.startIndex), l = Math.min(r.data.length - 1, e.endIndex);
627
628
  if (c > l) return "";
628
- let u = `M${I(M(r, c))},${s(r.data[c])}`;
629
- for (let e = c + 1; e <= l; e++) isFinite(r.data[e]) && (u += `L${I(M(r, e))},${s(r.data[e])}`);
630
- return t && (u += `L${I(M(r, l))},${n}`, u += `L${I(M(r, c))},${n}`, u += "Z"), u;
629
+ let u = `M${F(M(r, c))},${s(r.data[c])}`;
630
+ for (let e = c + 1; e <= l; e++) isFinite(r.data[e]) && (u += `L${F(M(r, e))},${s(r.data[e])}`);
631
+ return t && (u += `L${F(M(r, l))},${n}`, u += `L${F(M(r, c))},${n}`, u += "Z"), u;
631
632
  }
632
- let H = t(() => {
633
- let e = d.areaSections;
633
+ let B = n(() => {
634
+ let e = l.areaSections;
634
635
  if (!e?.length) return {
635
636
  labels: [],
636
637
  extraHeight: 0
637
638
  };
638
- let t = [], n = C.value.left + w.value;
639
+ let t = [], n = S.value.left + C.value;
639
640
  for (let r of e) {
640
641
  if (!r.label && !r.description || r.legend === "inline" || r.legend === !1) continue;
641
- let e = r.label ?? "", i = r.description ?? "", a = Math.max(e.length, i.length) * Je, o = z(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");
642
+ let e = r.label ?? "", i = r.description ?? "", a = Math.max(e.length, i.length) * Ze, o = R(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");
642
643
  t.push({
643
644
  cx: c,
644
645
  labelText: e,
@@ -653,7 +654,7 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
653
654
  let r = [];
654
655
  for (let e of t) {
655
656
  let t = e.cx - e.textWidth / 2, n = 0;
656
- for (; n < r.length && !(t >= r[n] + Ye);) n++;
657
+ for (; n < r.length && !(t >= r[n] + Qe);) n++;
657
658
  e.row = n;
658
659
  let i = e.cx + e.textWidth / 2;
659
660
  r[n] = Math.max(r[n] ?? -Infinity, i);
@@ -663,9 +664,9 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
663
664
  extraHeight: 0
664
665
  } : {
665
666
  labels: t,
666
- extraHeight: (Math.max(...t.map((e) => e.row)) + 1) * Ke + qe
667
+ extraHeight: (Math.max(...t.map((e) => e.row)) + 1) * Ye + Xe
667
668
  };
668
- }), se = t(() => {
669
+ }), V = n(() => {
669
670
  let e = [];
670
671
  for (let t of O.value) t.legend && e.push({
671
672
  label: t.legend,
@@ -673,7 +674,7 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
673
674
  type: "series",
674
675
  dashed: t.dashed
675
676
  });
676
- let t = d.areaSections;
677
+ let t = l.areaSections;
677
678
  if (t) for (let n of t) {
678
679
  if (n.legend !== "inline" || !n.label && !n.description) continue;
679
680
  let t = [n.label, n.description].filter(Boolean).join(" "), r = n.color ?? (n.seriesIndex == null ? "#999" : O.value[n.seriesIndex]?.color ?? "currentColor");
@@ -685,41 +686,41 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
685
686
  });
686
687
  }
687
688
  return e;
688
- }), U = t(() => S.value + H.value.extraHeight), q = t(() => C.value.top + T.value + C.value.bottom + qe), J = t(() => {
689
- let { min: e, max: t } = L.value, n = (t) => V(C.value.top + T.value - (t - e) / L.value.range * T.value), r = (e) => d.yTickFormat ? d.yTickFormat(e) : W(e);
689
+ }), H = n(() => b.value + B.value.extraHeight), W = n(() => S.value.top + w.value + S.value.bottom + Xe), G = n(() => {
690
+ let { min: e, max: t } = I.value, n = (t) => U(S.value.top + w.value - (t - e) / I.value.range * w.value), r = (e) => l.yTickFormat ? l.yTickFormat(e) : K(e);
690
691
  return e === t ? [{
691
692
  value: r(e),
692
- y: V(C.value.top + T.value / 2)
693
- }] : ce({
693
+ y: U(S.value.top + w.value / 2)
694
+ }] : le({
694
695
  min: e,
695
696
  max: t,
696
- ticks: d.yTicks,
697
- targetTickCount: T.value / 50
697
+ ticks: l.yTicks,
698
+ targetTickCount: w.value / 50
698
699
  }).map((e) => ({
699
700
  value: r(e),
700
701
  y: n(e)
701
702
  }));
702
- }), le = t(() => {
703
- let { min: e, max: t } = F.value;
703
+ }), ce = n(() => {
704
+ let { min: e, max: t } = ie.value;
704
705
  if (e === t) return [];
705
706
  let n = P.value, r = A.value, i = (e, t) => {
706
707
  let r = e + n;
707
- return d.xTickFormat ? d.xTickFormat(r, t) : !j.value && d.xLabels && Number.isInteger(e) && e >= 0 && e < d.xLabels.length ? d.xLabels[e] : W(r);
708
+ return l.xTickFormat ? l.xTickFormat(r, t) : !j.value && l.xLabels && Number.isInteger(e) && e >= 0 && e < l.xLabels.length ? l.xLabels[e] : K(r);
708
709
  }, a;
709
- if (d.xTicks == null && !j.value && d.xLabels && d.xLabels.length === r) {
710
- let e = Math.max(3, Math.floor(w.value / 80)), t = Math.max(1, Math.round((r - 1) / e));
710
+ if (l.xTicks == null && !j.value && l.xLabels && l.xLabels.length === r) {
711
+ let e = Math.max(3, Math.floor(C.value / 80)), t = Math.max(1, Math.round((r - 1) / e));
711
712
  a = [];
712
713
  for (let e = 0; e < r; e += t) a.push(e);
713
- } else a = ce({
714
+ } else a = le({
714
715
  min: e,
715
716
  max: t,
716
- ticks: d.xTicks,
717
- targetTickCount: w.value / 80,
717
+ ticks: l.xTicks,
718
+ targetTickCount: C.value / 80,
718
719
  displayOffset: n
719
720
  });
720
- let o = C.value.left, s = C.value.left + w.value;
721
+ let o = S.value.left, s = S.value.left + C.value;
721
722
  return a.map((e, t) => {
722
- let n = V(I(e)), r = "middle";
723
+ let n = U(F(e)), r = "middle";
723
724
  return n - o <= 1 ? r = "start" : s - n <= 1 && (r = "end"), {
724
725
  value: i(e, t),
725
726
  x: n,
@@ -727,14 +728,14 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
727
728
  };
728
729
  });
729
730
  });
730
- function Y() {
731
- return typeof d.csv == "function" ? d.csv() : typeof d.csv == "string" ? d.csv : me(O.value);
731
+ function q() {
732
+ return typeof l.csv == "function" ? l.csv() : typeof l.csv == "string" ? l.csv : ge(O.value);
732
733
  }
733
- let de = t(() => !!d.tooltipData || !!d.tooltipTrigger), X = t(() => {
734
- let e = Qe.value, t = O.value[0];
734
+ let J = n(() => !!l.tooltipData || !!l.tooltipTrigger), Y = n(() => {
735
+ let e = Q.value, t = O.value[0];
735
736
  return e === null || !t ? null : M(t, e);
736
- }), fe = t(() => X.value === null ? 0 : I(X.value));
737
- function Z(e, t) {
737
+ }), pe = n(() => Y.value === null ? 0 : F(Y.value));
738
+ function X(e, t) {
738
739
  let n = e.data.length;
739
740
  if (n === 0) return null;
740
741
  let r = 0, i = Infinity;
@@ -746,265 +747,265 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
746
747
  }
747
748
  return i === Infinity ? null : r;
748
749
  }
749
- let Q = t(() => {
750
- let e = X.value;
750
+ let me = n(() => {
751
+ let e = Y.value;
751
752
  if (e === null) return [];
752
- let { min: t, range: n } = L.value, r = T.value / n, i = C.value.top + T.value, a = [];
753
+ let { min: t, range: n } = I.value, r = w.value / n, i = S.value.top + w.value, a = [];
753
754
  for (let n of O.value) {
754
- let o = Z(n, e);
755
+ let o = X(n, e);
755
756
  if (o === null) continue;
756
757
  let s = n.data[o];
757
758
  isFinite(s) && a.push({
758
- x: I(M(n, o)),
759
+ x: F(M(n, o)),
759
760
  y: i - (s - t) * r,
760
761
  color: n.color ?? "currentColor"
761
762
  });
762
763
  }
763
764
  return a;
764
- }), Xe = t(() => {
765
- let e = Qe.value, t = X.value;
765
+ }), Z = n(() => {
766
+ let e = Q.value, t = Y.value;
766
767
  if (e === null || t === null) return null;
767
768
  let n = t + P.value, r;
768
- return r = d.xTickFormat ? d.xTickFormat(n, e) : j.value ? W(n) : d.xLabels?.[e], {
769
+ return r = l.xTickFormat ? l.xTickFormat(n, e) : j.value ? K(n) : l.xLabels?.[e], {
769
770
  index: e,
770
771
  xLabel: r,
771
772
  values: O.value.map((e, n) => {
772
- let r = Z(e, t);
773
+ let r = X(e, t);
773
774
  return {
774
775
  value: r === null ? NaN : Number(e.data[r]),
775
776
  color: e.color ?? "currentColor",
776
777
  seriesIndex: n
777
778
  };
778
779
  }),
779
- data: d.tooltipData?.[e] ?? null
780
+ data: l.tooltipData?.[e] ?? null
780
781
  };
781
782
  });
782
- function Ze(e) {
783
- let t = m.value?.getBoundingClientRect();
783
+ function _e(e) {
784
+ let t = h.value?.getBoundingClientRect();
784
785
  if (!t) return null;
785
786
  let n = O.value[0];
786
787
  if (!n || n.data.length === 0) return null;
787
- let { min: r, max: i } = F.value, a = i - r || 1;
788
- return Z(n, r + (e - t.left - C.value.left) / w.value * a);
788
+ let { min: r, max: i } = ie.value, a = i - r || 1;
789
+ return X(n, r + (e - t.left - S.value.left) / C.value * a);
789
790
  }
790
- let { hoverIndex: Qe, tooltipRef: $e, tooltipPos: et, handlers: tt } = ue({
791
- enabled: () => de.value,
792
- trigger: () => d.tooltipTrigger,
793
- clamp: () => d.tooltipClamp,
794
- pointerToIndex: Ze,
795
- containerRef: m,
796
- onHover: (e) => ee("hover", e)
797
- }), { svgRef: nt, items: rt, downloadLinkText: it, csvHref: at, resolvedFilename: ot } = pe({
798
- filename: () => d.filename,
799
- legacyMenuLabel: () => d.menu,
800
- getCsv: Y,
801
- downloadLink: () => d.downloadLink
791
+ let { hoverIndex: Q, tooltipRef: $e, tooltipPos: et, handlers: tt } = fe({
792
+ enabled: () => J.value,
793
+ trigger: () => l.tooltipTrigger,
794
+ clamp: () => l.tooltipClamp,
795
+ pointerToIndex: _e,
796
+ containerRef: h,
797
+ onHover: (e) => f("hover", e)
798
+ }), { svgRef: nt, items: rt, downloadLinkText: it, csvHref: at, resolvedFilename: ot } = he({
799
+ filename: () => l.filename,
800
+ legacyMenuLabel: () => l.menu,
801
+ getCsv: q,
802
+ downloadLink: () => l.downloadLink
802
803
  });
803
- return (t, c) => (h(), i("div", {
804
+ return (n, c) => (g(), a("div", {
804
805
  ref_key: "containerRef",
805
- ref: m,
806
+ ref: h,
806
807
  class: "line-chart-wrapper"
807
808
  }, [
808
- s.menu ? (h(), n(oe, {
809
+ t.menu ? (g(), r(se, {
809
810
  key: 0,
810
811
  items: x(rt)
811
- }, null, 8, ["items"])) : r("", !0),
812
- (h(), i("svg", {
812
+ }, null, 8, ["items"])) : i("", !0),
813
+ (g(), a("svg", {
813
814
  ref_key: "svgRef",
814
815
  ref: nt,
815
- width: b.value,
816
- height: U.value
816
+ width: _.value,
817
+ height: H.value
817
818
  }, [
818
- s.title ? (h(), i("text", {
819
+ t.title ? (g(), a("text", {
819
820
  key: 0,
820
- x: b.value / 2,
821
+ x: _.value / 2,
821
822
  y: 18,
822
823
  "text-anchor": "middle",
823
824
  "font-size": "14",
824
825
  "font-weight": "600",
825
826
  fill: "currentColor"
826
- }, y(s.title), 9, ge)) : r("", !0),
827
- se.value.length > 0 ? (h(), i("g", _e, [(h(!0), i(e, null, _(se.value, (t, n) => (h(), i(e, { key: "ileg" + n }, [t.type === "series" ? (h(), i("line", {
827
+ }, y(t.title), 9, ye)) : i("", !0),
828
+ V.value.length > 0 ? (g(), a("g", be, [(g(!0), a(e, null, v(V.value, (t, n) => (g(), a(e, { key: "ileg" + n }, [t.type === "series" ? (g(), a("line", {
828
829
  key: 0,
829
- x1: x(C).left + n * 120,
830
- y1: x(C).top - x(20) / 2,
831
- x2: x(C).left + n * 120 + 12,
832
- y2: x(C).top - x(20) / 2,
830
+ x1: x(S).left + n * 120,
831
+ y1: x(S).top - x(20) / 2,
832
+ x2: x(S).left + n * 120 + 12,
833
+ y2: x(S).top - x(20) / 2,
833
834
  stroke: t.color,
834
835
  "stroke-width": "2",
835
836
  "stroke-dasharray": t.dashed ? "4 2" : void 0
836
- }, null, 8, ve)) : (h(), i("circle", {
837
+ }, null, 8, xe)) : (g(), a("circle", {
837
838
  key: 1,
838
- cx: x(C).left + n * 120 + 4,
839
- cy: x(C).top - x(20) / 2,
839
+ cx: x(S).left + n * 120 + 4,
840
+ cy: x(S).top - x(20) / 2,
840
841
  r: "4",
841
842
  fill: t.color,
842
843
  "fill-opacity": t.fillOpacity,
843
844
  stroke: t.color,
844
845
  "stroke-width": "1.5"
845
- }, null, 8, ye)), a("text", {
846
- x: x(C).left + n * 120 + 18,
847
- y: x(C).top - x(20) / 2 + 4,
846
+ }, null, 8, $)), o("text", {
847
+ x: x(S).left + n * 120 + 18,
848
+ y: x(S).top - x(20) / 2 + 4,
848
849
  "font-size": "11",
849
850
  fill: "currentColor"
850
- }, y(t.label), 9, be)], 64))), 128))])) : r("", !0),
851
- a("line", {
852
- x1: x(V)(x(C).left),
853
- y1: x(V)(x(C).top),
854
- x2: x(V)(x(C).left),
855
- y2: x(V)(x(C).top + x(T)),
851
+ }, y(t.label), 9, Se)], 64))), 128))])) : i("", !0),
852
+ o("line", {
853
+ x1: x(U)(x(S).left),
854
+ y1: x(U)(x(S).top),
855
+ x2: x(U)(x(S).left),
856
+ y2: x(U)(x(S).top + x(w)),
856
857
  stroke: "currentColor",
857
858
  "stroke-opacity": "0.3"
858
- }, null, 8, xe),
859
- a("line", {
860
- x1: x(V)(x(C).left),
861
- y1: x(V)(x(C).top + x(T)),
862
- x2: x(V)(x(C).left + x(w)),
863
- y2: x(V)(x(C).top + x(T)),
859
+ }, null, 8, Ce),
860
+ o("line", {
861
+ x1: x(U)(x(S).left),
862
+ y1: x(U)(x(S).top + x(w)),
863
+ x2: x(U)(x(S).left + x(C)),
864
+ y2: x(U)(x(S).top + x(w)),
864
865
  stroke: "currentColor",
865
866
  "stroke-opacity": "0.3"
866
- }, null, 8, $),
867
- s.yGrid ? (h(!0), i(e, { key: 2 }, _(J.value, (e, t) => (h(), i("line", {
867
+ }, null, 8, we),
868
+ t.yGrid ? (g(!0), a(e, { key: 2 }, v(G.value, (e, t) => (g(), a("line", {
868
869
  key: "yg" + t,
869
- x1: x(C).left,
870
+ x1: x(S).left,
870
871
  y1: e.y,
871
- x2: x(C).left + x(w),
872
+ x2: x(S).left + x(C),
872
873
  y2: e.y,
873
874
  stroke: "currentColor",
874
875
  "stroke-opacity": "0.1"
875
- }, null, 8, Se))), 128)) : r("", !0),
876
- s.xGrid ? (h(!0), i(e, { key: 3 }, _(le.value, (e, t) => (h(), i("line", {
876
+ }, null, 8, Te))), 128)) : i("", !0),
877
+ t.xGrid ? (g(!0), a(e, { key: 3 }, v(ce.value, (e, t) => (g(), a("line", {
877
878
  key: "xg" + t,
878
879
  x1: e.x,
879
- y1: x(C).top,
880
+ y1: x(S).top,
880
881
  x2: e.x,
881
- y2: x(C).top + x(T),
882
+ y2: x(S).top + x(w),
882
883
  stroke: "currentColor",
883
884
  "stroke-opacity": "0.1"
884
- }, null, 8, Ce))), 128)) : r("", !0),
885
- (h(!0), i(e, null, _(J.value, (e, t) => (h(), i("text", {
885
+ }, null, 8, Ee))), 128)) : i("", !0),
886
+ (g(!0), a(e, null, v(G.value, (e, t) => (g(), a("text", {
886
887
  key: "y" + t,
887
888
  "data-testid": "y-tick",
888
- x: x(C).left - 6,
889
+ x: x(S).left - 6,
889
890
  y: e.y,
890
891
  "text-anchor": "end",
891
892
  "dominant-baseline": "middle",
892
893
  "font-size": "10",
893
894
  fill: "currentColor",
894
895
  "fill-opacity": "0.6"
895
- }, y(e.value), 9, we))), 128)),
896
- s.yLabel ? (h(), i("text", {
896
+ }, y(e.value), 9, De))), 128)),
897
+ t.yLabel ? (g(), a("text", {
897
898
  key: 4,
898
899
  x: 0,
899
900
  y: 0,
900
- transform: `translate(14, ${x(C).top + x(T) / 2}) rotate(-90)`,
901
+ transform: `translate(14, ${x(S).top + x(w) / 2}) rotate(-90)`,
901
902
  "text-anchor": "middle",
902
903
  "font-size": "13",
903
904
  fill: "currentColor"
904
- }, y(s.yLabel), 9, Te)) : r("", !0),
905
- (h(!0), i(e, null, _(le.value, (e, t) => (h(), i("text", {
905
+ }, y(t.yLabel), 9, Oe)) : i("", !0),
906
+ (g(!0), a(e, null, v(ce.value, (e, t) => (g(), a("text", {
906
907
  key: "x" + t,
907
908
  "data-testid": "x-tick",
908
909
  x: e.x,
909
- y: x(C).top + x(T) + 16,
910
+ y: x(S).top + x(w) + 16,
910
911
  "text-anchor": e.anchor,
911
912
  "font-size": "10",
912
913
  fill: "currentColor",
913
914
  "fill-opacity": "0.6"
914
- }, y(e.value), 9, Ee))), 128)),
915
- s.xLabel ? (h(), i("text", {
915
+ }, y(e.value), 9, ke))), 128)),
916
+ t.xLabel ? (g(), a("text", {
916
917
  key: 5,
917
- x: x(C).left + x(w) / 2,
918
- y: S.value - 4,
918
+ x: x(S).left + x(C) / 2,
919
+ y: b.value - 4,
919
920
  "text-anchor": "middle",
920
921
  "font-size": "13",
921
922
  fill: "currentColor"
922
- }, y(s.xLabel), 9, De)) : r("", !0),
923
- (h(!0), i(e, null, _(k.value, (e, t) => (h(), i("path", {
923
+ }, y(t.xLabel), 9, Ae)) : i("", !0),
924
+ (g(!0), a(e, null, v(k.value, (e, t) => (g(), a("path", {
924
925
  key: "area" + t,
925
- d: ae(e),
926
+ d: oe(e),
926
927
  fill: e.color ?? "currentColor",
927
928
  "fill-opacity": e.opacity ?? .2,
928
929
  stroke: "none"
929
- }, null, 8, Oe))), 128)),
930
- (h(!0), i(e, null, _(O.value, (t, n) => (h(), i(e, { key: n }, [t.line === !1 ? r("", !0) : (h(), i("path", {
930
+ }, null, 8, je))), 128)),
931
+ (g(!0), a(e, null, v(O.value, (n, r) => (g(), a(e, { key: r }, [n.line === !1 ? i("", !0) : (g(), a("path", {
931
932
  key: 0,
932
- d: ie(t),
933
+ d: ae(n),
933
934
  fill: "none",
934
- stroke: t.color ?? "currentColor",
935
- "stroke-width": t.strokeWidth ?? 1.5,
936
- "stroke-opacity": t.lineOpacity ?? t.opacity ?? s.lineOpacity,
937
- "stroke-dasharray": t.dashed ? "6 3" : void 0
938
- }, null, 8, ke)), t.dots ? (h(!0), i(e, { key: 1 }, _(R(t), (e, n) => (h(), i("circle", {
939
- key: n,
935
+ stroke: n.color ?? "currentColor",
936
+ "stroke-width": n.strokeWidth ?? 1.5,
937
+ "stroke-opacity": n.lineOpacity ?? n.opacity ?? t.lineOpacity,
938
+ "stroke-dasharray": n.dashed ? "6 3" : void 0
939
+ }, null, 8, Me)), n.dots ? (g(!0), a(e, { key: 1 }, v(L(n), (e, r) => (g(), a("circle", {
940
+ key: r,
940
941
  cx: e.x,
941
942
  cy: e.y,
942
- r: t.dotRadius ?? (t.strokeWidth ?? 1.5) + 1,
943
- fill: t.dotFill ?? t.color ?? "currentColor",
944
- "fill-opacity": t.dotOpacity ?? t.opacity ?? s.lineOpacity,
945
- stroke: t.dotStroke ?? "none"
946
- }, null, 8, Ae))), 128)) : r("", !0)], 64))), 128)),
947
- (h(!0), i(e, null, _(s.areaSections ?? [], (t, n) => (h(), i(e, { key: "areasec" + n }, [
948
- a("path", {
949
- d: B(t),
943
+ r: n.dotRadius ?? (n.strokeWidth ?? 1.5) + 1,
944
+ fill: n.dotFill ?? n.color ?? "currentColor",
945
+ "fill-opacity": n.dotOpacity ?? n.opacity ?? t.lineOpacity,
946
+ stroke: n.dotStroke ?? "none"
947
+ }, null, 8, Ne))), 128)) : i("", !0)], 64))), 128)),
948
+ (g(!0), a(e, null, v(t.areaSections ?? [], (t, n) => (g(), a(e, { key: "areasec" + n }, [
949
+ o("path", {
950
+ d: z(t),
950
951
  fill: t.color ?? (t.seriesIndex == null ? "#999" : O.value[t.seriesIndex]?.color ?? "currentColor"),
951
952
  "fill-opacity": t.opacity ?? .15,
952
953
  stroke: "none"
953
- }, null, 8, je),
954
- t.seriesIndex == null ? r("", !0) : (h(), i("path", {
954
+ }, null, 8, Pe),
955
+ t.seriesIndex == null ? i("", !0) : (g(), a("path", {
955
956
  key: 0,
956
- d: B(t, !1),
957
+ d: z(t, !1),
957
958
  fill: "none",
958
959
  stroke: t.color ?? O.value[t.seriesIndex]?.color ?? "currentColor",
959
960
  "stroke-width": t.strokeWidth ?? 2,
960
961
  "stroke-dasharray": t.dashed ? "6 3" : void 0
961
- }, null, 8, Me)),
962
- t.seriesIndex == null ? (h(), i(e, { key: 1 }, [a("line", {
963
- x1: x(V)(z(t, "start")),
964
- y1: x(C).top,
965
- x2: x(V)(z(t, "start")),
966
- y2: x(C).top + x(T),
962
+ }, null, 8, Fe)),
963
+ t.seriesIndex == null ? (g(), a(e, { key: 1 }, [o("line", {
964
+ x1: x(U)(R(t, "start")),
965
+ y1: x(S).top,
966
+ x2: x(U)(R(t, "start")),
967
+ y2: x(S).top + x(w),
967
968
  stroke: t.color ?? "#999",
968
969
  "stroke-width": t.strokeWidth ?? 2,
969
970
  "stroke-dasharray": t.dashed ? "6 3" : void 0
970
- }, null, 8, Ne), a("line", {
971
- x1: x(V)(z(t, "end")),
972
- y1: x(C).top,
973
- x2: x(V)(z(t, "end")),
974
- y2: x(C).top + x(T),
971
+ }, null, 8, Ie), o("line", {
972
+ x1: x(U)(R(t, "end")),
973
+ y1: x(S).top,
974
+ x2: x(U)(R(t, "end")),
975
+ y2: x(S).top + x(w),
975
976
  stroke: t.color ?? "#999",
976
977
  "stroke-width": t.strokeWidth ?? 2,
977
978
  "stroke-dasharray": t.dashed ? "6 3" : void 0
978
- }, null, 8, Pe)], 64)) : r("", !0),
979
- a("line", {
980
- x1: x(V)(z(t, "start")),
981
- y1: x(C).top + x(T) - 4,
982
- x2: x(V)(z(t, "start")),
983
- y2: x(C).top + x(T) + 4,
979
+ }, null, 8, Le)], 64)) : i("", !0),
980
+ o("line", {
981
+ x1: x(U)(R(t, "start")),
982
+ y1: x(S).top + x(w) - 4,
983
+ x2: x(U)(R(t, "start")),
984
+ y2: x(S).top + x(w) + 4,
984
985
  stroke: "currentColor",
985
986
  "stroke-opacity": "0.4"
986
- }, null, 8, Fe),
987
- a("line", {
988
- x1: x(V)(z(t, "end")),
989
- y1: x(C).top + x(T) - 4,
990
- x2: x(V)(z(t, "end")),
991
- y2: x(C).top + x(T) + 4,
987
+ }, null, 8, Re),
988
+ o("line", {
989
+ x1: x(U)(R(t, "end")),
990
+ y1: x(S).top + x(w) - 4,
991
+ x2: x(U)(R(t, "end")),
992
+ y2: x(S).top + x(w) + 4,
992
993
  stroke: "currentColor",
993
994
  "stroke-opacity": "0.4"
994
- }, null, 8, Ie)
995
+ }, null, 8, ze)
995
996
  ], 64))), 128)),
996
- de.value && x(Qe) !== null ? (h(), i("line", {
997
+ J.value && x(Q) !== null ? (g(), a("line", {
997
998
  key: 6,
998
- x1: x(V)(fe.value),
999
- y1: x(C).top,
1000
- x2: x(V)(fe.value),
1001
- y2: x(C).top + x(T),
999
+ x1: x(U)(pe.value),
1000
+ y1: x(S).top,
1001
+ x2: x(U)(pe.value),
1002
+ y2: x(S).top + x(w),
1002
1003
  stroke: "currentColor",
1003
1004
  "stroke-opacity": "0.3",
1004
1005
  "stroke-dasharray": "4 2",
1005
1006
  "pointer-events": "none"
1006
- }, null, 8, Le)) : r("", !0),
1007
- (h(!0), i(e, null, _(Q.value, (e, t) => (h(), i("circle", {
1007
+ }, null, 8, Be)) : i("", !0),
1008
+ (g(!0), a(e, null, v(me.value, (e, t) => (g(), a("circle", {
1008
1009
  key: "hd" + t,
1009
1010
  cx: e.x,
1010
1011
  cy: e.y,
@@ -1013,53 +1014,53 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
1013
1014
  stroke: "var(--color-bg-0, #fff)",
1014
1015
  "stroke-width": "2",
1015
1016
  "pointer-events": "none"
1016
- }, null, 8, Re))), 128)),
1017
- de.value ? (h(), i("rect", u({
1017
+ }, null, 8, Ve))), 128)),
1018
+ J.value ? (g(), a("rect", d({
1018
1019
  key: 7,
1019
- x: x(C).left,
1020
- y: x(C).top,
1021
- width: x(w),
1022
- height: x(T),
1020
+ x: x(S).left,
1021
+ y: x(S).top,
1022
+ width: x(C),
1023
+ height: x(w),
1023
1024
  fill: "transparent",
1024
1025
  style: {
1025
1026
  cursor: "crosshair",
1026
1027
  "touch-action": "none"
1027
1028
  }
1028
- }, te(x(tt), !0)), null, 16, ze)) : r("", !0),
1029
- (h(!0), i(e, null, _(H.value.labels, (e, t) => (h(), i("g", { key: "seclab" + t }, [
1030
- a("circle", {
1029
+ }, ne(x(tt), !0)), null, 16, He)) : i("", !0),
1030
+ (g(!0), a(e, null, v(B.value.labels, (e, t) => (g(), a("g", { key: "seclab" + t }, [
1031
+ o("circle", {
1031
1032
  cx: e.cx - e.textWidth / 2 - 2,
1032
- cy: q.value + e.row * Ke + 4,
1033
+ cy: W.value + e.row * Ye + 4,
1033
1034
  r: "4",
1034
1035
  fill: e.color,
1035
1036
  "fill-opacity": e.fillOpacity,
1036
1037
  stroke: e.color,
1037
1038
  "stroke-width": "1.5"
1038
- }, null, 8, Be),
1039
- e.labelText ? (h(), i("text", {
1039
+ }, null, 8, Ue),
1040
+ e.labelText ? (g(), a("text", {
1040
1041
  key: 0,
1041
1042
  x: e.cx - e.textWidth / 2 + 8,
1042
- y: q.value + e.row * Ke + 8,
1043
+ y: W.value + e.row * Ye + 8,
1043
1044
  "font-size": "11",
1044
1045
  "font-weight": "600",
1045
1046
  fill: e.color
1046
- }, y(e.labelText), 9, Ve)) : r("", !0),
1047
- e.descText ? (h(), i("text", {
1047
+ }, y(e.labelText), 9, We)) : i("", !0),
1048
+ e.descText ? (g(), a("text", {
1048
1049
  key: 1,
1049
1050
  x: e.cx - e.textWidth / 2 + 8,
1050
- y: q.value + e.row * Ke + 22,
1051
+ y: W.value + e.row * Ye + 22,
1051
1052
  "font-size": "11",
1052
1053
  fill: "currentColor",
1053
1054
  "fill-opacity": "0.6"
1054
- }, y(e.descText), 9, He)) : r("", !0)
1055
+ }, y(e.descText), 9, Ge)) : i("", !0)
1055
1056
  ]))), 128))
1056
- ], 8, he)),
1057
- de.value && x(Qe) !== null && Xe.value ? (h(), i("div", {
1057
+ ], 8, ve)),
1058
+ J.value && x(Q) !== null && Z.value ? (g(), a("div", {
1058
1059
  key: 1,
1059
1060
  ref_key: "tooltipRef",
1060
1061
  ref: $e,
1061
1062
  class: "chart-tooltip-content",
1062
- style: p({
1063
+ style: m({
1063
1064
  position: "absolute",
1064
1065
  top: "0",
1065
1066
  left: "0",
@@ -1067,50 +1068,50 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
1067
1068
  transform: x(et) ? `translate3d(${x(et).left}px, ${x(et).top}px, 0) translateY(-50%)` : "translateY(-50%)",
1068
1069
  visibility: x(et) ? "visible" : "hidden"
1069
1070
  })
1070
- }, [v(t.$slots, "tooltip", f(l(Xe.value)), () => [a("div", Ue, [Xe.value.xLabel ? (h(), i("div", We, y(Xe.value.xLabel), 1)) : r("", !0), (h(!0), i(e, null, _(Xe.value.values, (e) => (h(), i("div", {
1071
+ }, [te(n.$slots, "tooltip", p(u(Z.value)), () => [o("div", Ke, [Z.value.xLabel ? (g(), a("div", qe, y(Z.value.xLabel), 1)) : i("", !0), (g(!0), a(e, null, v(Z.value.values, (e) => (g(), a("div", {
1071
1072
  key: e.seriesIndex,
1072
1073
  class: "line-chart-tooltip-row"
1073
- }, [a("span", {
1074
+ }, [o("span", {
1074
1075
  class: "line-chart-tooltip-swatch",
1075
- style: p({ background: e.color })
1076
- }, null, 4), o(" " + y(isFinite(e.value) ? D(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : r("", !0),
1077
- x(it) ? (h(), i("a", {
1076
+ style: m({ background: e.color })
1077
+ }, null, 4), s(" " + y(isFinite(e.value) ? D(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
1078
+ x(it) ? (g(), a("a", {
1078
1079
  key: 2,
1079
1080
  class: "line-chart-download-link",
1080
1081
  href: x(at),
1081
1082
  download: `${x(ot)()}.csv`
1082
- }, y(x(it)), 9, Ge)) : r("", !0)
1083
+ }, y(x(it)), 9, Je)) : i("", !0)
1083
1084
  ], 512));
1084
1085
  }
1085
- }), [["__scopeId", "data-v-083d1c2f"]]), Ze = ["width", "height"], Qe = ["x"], $e = { key: 1 }, et = [
1086
+ }), [["__scopeId", "data-v-083d1c2f"]]), et = ["width", "height"], tt = ["x"], nt = { key: 1 }, rt = [
1086
1087
  "x",
1087
1088
  "y",
1088
1089
  "fill"
1089
- ], tt = ["x", "y"], nt = [
1090
+ ], it = ["x", "y"], at = [
1090
1091
  "x1",
1091
1092
  "y1",
1092
1093
  "x2",
1093
1094
  "y2"
1094
- ], rt = [
1095
+ ], ot = [
1095
1096
  "x1",
1096
1097
  "y1",
1097
1098
  "x2",
1098
1099
  "y2"
1099
- ], it = [
1100
+ ], st = [
1100
1101
  "x1",
1101
1102
  "y1",
1102
1103
  "x2",
1103
1104
  "y2"
1104
- ], at = [
1105
+ ], ct = [
1105
1106
  "x",
1106
1107
  "y",
1107
1108
  "width",
1108
1109
  "height"
1109
- ], ot = ["x", "y"], st = ["x", "y"], ct = ["transform"], lt = [
1110
+ ], lt = ["x", "y"], ut = ["x", "y"], dt = ["transform"], ft = [
1110
1111
  "x",
1111
1112
  "y",
1112
1113
  "text-anchor"
1113
- ], ut = ["x", "y"], dt = ["x", "y"], ft = [
1114
+ ], pt = ["x", "y"], mt = ["x", "y"], ht = [
1114
1115
  "data-category",
1115
1116
  "data-series",
1116
1117
  "x",
@@ -1119,15 +1120,15 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
1119
1120
  "height",
1120
1121
  "fill",
1121
1122
  "fill-opacity"
1122
- ], pt = [
1123
+ ], gt = [
1123
1124
  "x",
1124
1125
  "y",
1125
1126
  "width",
1126
1127
  "height"
1127
- ], mt = { class: "bar-chart-tooltip" }, ht = {
1128
+ ], _t = { class: "bar-chart-tooltip" }, vt = {
1128
1129
  key: 0,
1129
1130
  class: "bar-chart-tooltip-label"
1130
- }, gt = ["href", "download"], _t = /* @__PURE__ */ B(/* @__PURE__ */ c({
1131
+ }, yt = ["href", "download"], bt = /* @__PURE__ */ H(/* @__PURE__ */ l({
1131
1132
  __name: "BarChart",
1132
1133
  props: {
1133
1134
  data: {},
@@ -1165,38 +1166,38 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
1165
1166
  downloadLink: { type: [Boolean, String] }
1166
1167
  },
1167
1168
  emits: ["hover"],
1168
- setup(s, { emit: c }) {
1169
- let d = s, ee = c, { containerRef: m, measuredWidth: g } = G({ debounce: () => d.debounce }), b = t(() => d.width ?? (g.value || 400)), S = t(() => d.height ?? 200), ne = t(() => D.value.some((e) => e.legend)), { padding: C, innerW: w, innerH: T } = K({
1170
- title: () => d.title,
1171
- xLabel: () => d.xLabel,
1172
- yLabel: () => d.yLabel,
1173
- hasInlineLegend: () => ne.value,
1174
- width: () => b.value,
1175
- height: () => S.value
1176
- }), re = [];
1169
+ setup(t, { emit: c }) {
1170
+ let l = t, f = c, { containerRef: h, measuredWidth: ee } = ue({ debounce: () => l.debounce }), _ = n(() => l.width ?? (ee.value || 400)), b = n(() => l.height ?? 200), re = n(() => D.value.some((e) => e.legend)), { padding: S, innerW: C, innerH: w } = de({
1171
+ title: () => l.title,
1172
+ xLabel: () => l.xLabel,
1173
+ yLabel: () => l.yLabel,
1174
+ hasInlineLegend: () => re.value,
1175
+ width: () => _.value,
1176
+ height: () => b.value
1177
+ }), T = [];
1177
1178
  function E(e) {
1178
1179
  return {
1179
- data: e.y ?? e.data ?? re,
1180
+ data: e.y ?? e.data ?? T,
1180
1181
  color: e.color,
1181
1182
  opacity: e.opacity,
1182
1183
  legend: e.legend
1183
1184
  };
1184
1185
  }
1185
- let D = t(() => {
1186
- if (d.series && d.series.length > 0) return d.series.map(E);
1187
- let e = d.y ?? d.data;
1186
+ let D = n(() => {
1187
+ if (l.series && l.series.length > 0) return l.series.map(E);
1188
+ let e = l.y ?? l.data;
1188
1189
  return e ? [{ data: e }] : [];
1189
- }), O = t(() => {
1190
- let e = d.categories?.length ?? 0;
1190
+ }), O = n(() => {
1191
+ let e = l.categories?.length ?? 0;
1191
1192
  for (let t of D.value) t.data.length > e && (e = t.data.length);
1192
1193
  return e;
1193
- }), k = t(() => {
1194
+ }), k = n(() => {
1194
1195
  let e = O.value, t = Array(e);
1195
- for (let n = 0; n < e; n++) t[n] = d.categories?.[n] ?? String(n);
1196
+ for (let n = 0; n < e; n++) t[n] = l.categories?.[n] ?? String(n);
1196
1197
  return t;
1197
- }), A = t(() => d.orientation === "vertical"), j = t(() => {
1198
+ }), A = n(() => l.orientation === "vertical"), j = n(() => {
1198
1199
  let e = Infinity, t = -Infinity;
1199
- if (d.layout === "stacked") {
1200
+ if (l.layout === "stacked") {
1200
1201
  let n = O.value;
1201
1202
  for (let r = 0; r < n; r++) {
1202
1203
  let n = 0, i = 0;
@@ -1212,7 +1213,7 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
1212
1213
  isFinite(n) && (n < e && (e = n), n > t && (t = n));
1213
1214
  }
1214
1215
  isFinite(e) || (e = 0), isFinite(t) || (t = 0);
1215
- let n = d.valueMin ?? 0;
1216
+ let n = l.valueMin ?? 0;
1216
1217
  n < e && (e = n);
1217
1218
  let r = t - e || 1;
1218
1219
  return {
@@ -1220,28 +1221,28 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
1220
1221
  max: t,
1221
1222
  range: r
1222
1223
  };
1223
- }), M = t(() => A.value ? w.value : T.value), N = t(() => A.value ? T.value : w.value), P = t(() => {
1224
+ }), M = n(() => A.value ? C.value : w.value), N = n(() => A.value ? w.value : C.value), P = n(() => {
1224
1225
  let e = O.value;
1225
1226
  return e > 0 ? M.value / e : 0;
1226
- }), F = t(() => P.value * (1 - d.barPadding)), I = t(() => {
1227
+ }), ie = n(() => P.value * (1 - l.barPadding)), F = n(() => {
1227
1228
  let e = D.value.length;
1228
1229
  if (e === 0) return 0;
1229
- if (d.layout === "stacked" || e === 1) return F.value;
1230
- let t = d.groupGap * (e - 1);
1231
- return Math.max(1, (F.value - t) / e);
1230
+ if (l.layout === "stacked" || e === 1) return ie.value;
1231
+ let t = l.groupGap * (e - 1);
1232
+ return Math.max(1, (ie.value - t) / e);
1232
1233
  });
1233
- function L(e) {
1234
- return (A.value ? C.value.left : C.value.top) + e * P.value;
1234
+ function I(e) {
1235
+ return (A.value ? S.value.left : S.value.top) + e * P.value;
1235
1236
  }
1236
- let ie = t(() => {
1237
- let { min: e, max: t } = j.value, n = d.valueMin ?? 0;
1238
- return R(Math.max(e, Math.min(t, n)));
1237
+ let ae = n(() => {
1238
+ let { min: e, max: t } = j.value, n = l.valueMin ?? 0;
1239
+ return L(Math.max(e, Math.min(t, n)));
1239
1240
  });
1240
- function R(e) {
1241
+ function L(e) {
1241
1242
  let { min: t, range: n } = j.value, r = N.value / n;
1242
- return A.value ? C.value.top + T.value - (e - t) * r : C.value.left + (e - t) * r;
1243
+ return A.value ? S.value.top + w.value - (e - t) * r : S.value.left + (e - t) * r;
1243
1244
  }
1244
- function ae(e, t, n, r, i, a, o, s, c) {
1245
+ function oe(e, t, n, r, i, a, o, s, c) {
1245
1246
  let l = Math.min(e, t), u = Math.abs(e - t);
1246
1247
  return A.value ? {
1247
1248
  x: n,
@@ -1265,29 +1266,29 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
1265
1266
  seriesIndex: c
1266
1267
  };
1267
1268
  }
1268
- let z = t(() => {
1269
+ let R = n(() => {
1269
1270
  let e = [], t = D.value, n = t.length;
1270
1271
  if (n === 0) return e;
1271
- let r = O.value, i = P.value, a = F.value, o = I.value, s = (i - a) / 2, c = ie.value;
1272
+ let r = O.value, i = P.value, a = ie.value, o = F.value, s = (i - a) / 2, c = ae.value;
1272
1273
  for (let i = 0; i < r; i++) {
1273
- let r = L(i) + s;
1274
- if (d.layout === "stacked") {
1274
+ let r = I(i) + s;
1275
+ if (l.layout === "stacked") {
1275
1276
  let o = 0, s = 0;
1276
1277
  for (let c = 0; c < n; c++) {
1277
1278
  let n = t[c], l = Number(n.data[i] ?? NaN);
1278
1279
  if (!isFinite(l)) continue;
1279
1280
  let u = l >= 0 ? o : s, d = u + l;
1280
- e.push(ae(R(u), R(d), r, a, n.color ?? H(c), n.opacity ?? 1, l, i, c)), l >= 0 ? o = d : s = d;
1281
+ e.push(oe(L(u), L(d), r, a, n.color ?? B(c), n.opacity ?? 1, l, i, c)), l >= 0 ? o = d : s = d;
1281
1282
  }
1282
1283
  } else for (let a = 0; a < n; a++) {
1283
- let s = t[a], l = Number(s.data[i] ?? NaN);
1284
- if (!isFinite(l)) continue;
1285
- let u = r + (n === 1 ? 0 : a * (o + d.groupGap));
1286
- e.push(ae(c, R(l), u, o, s.color ?? H(a), s.opacity ?? 1, l, i, a));
1284
+ let s = t[a], u = Number(s.data[i] ?? NaN);
1285
+ if (!isFinite(u)) continue;
1286
+ let d = r + (n === 1 ? 0 : a * (o + l.groupGap));
1287
+ e.push(oe(c, L(u), d, o, s.color ?? B(a), s.opacity ?? 1, u, i, a));
1287
1288
  }
1288
1289
  }
1289
1290
  return e;
1290
- }), B = [
1291
+ }), z = [
1291
1292
  "var(--color-primary, #3b82f6)",
1292
1293
  "var(--color-accent, #f59e0b)",
1293
1294
  "var(--color-success, #10b981)",
@@ -1295,32 +1296,32 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
1295
1296
  "var(--color-info, #6366f1)",
1296
1297
  "var(--color-warning, #d97706)"
1297
1298
  ];
1298
- function H(e) {
1299
- return B[e % B.length];
1299
+ function B(e) {
1300
+ return z[e % z.length];
1300
1301
  }
1301
- function se(e) {
1302
- return d.tooltipValueFormat ? d.tooltipValueFormat(e) : d.valueTickFormat ? d.valueTickFormat(e) : W(e);
1302
+ function V(e) {
1303
+ return l.tooltipValueFormat ? l.tooltipValueFormat(e) : l.valueTickFormat ? l.valueTickFormat(e) : K(e);
1303
1304
  }
1304
- let U = t(() => {
1305
- let { min: e, max: t } = j.value, n = (e) => d.valueTickFormat ? d.valueTickFormat(e) : W(e);
1305
+ let H = n(() => {
1306
+ let { min: e, max: t } = j.value, n = (e) => l.valueTickFormat ? l.valueTickFormat(e) : K(e);
1306
1307
  if (e === t) return [{
1307
1308
  value: n(e),
1308
- pos: V(R(e))
1309
+ pos: U(L(e))
1309
1310
  }];
1310
1311
  let r = A.value ? 50 : 80;
1311
- return ce({
1312
+ return le({
1312
1313
  min: e,
1313
1314
  max: t,
1314
- ticks: d.valueTicks,
1315
+ ticks: l.valueTicks,
1315
1316
  targetTickCount: N.value / r
1316
1317
  }).map((e) => ({
1317
1318
  value: n(e),
1318
- pos: V(R(e))
1319
+ pos: U(L(e))
1319
1320
  }));
1320
- }), q = t(() => {
1321
- let e = [], t = O.value, n = (e, t) => d.categoryFormat ? d.categoryFormat(e, t) : e;
1321
+ }), W = n(() => {
1322
+ let e = [], t = O.value, n = (e, t) => l.categoryFormat ? l.categoryFormat(e, t) : e;
1322
1323
  for (let r = 0; r < t; r++) {
1323
- let t = L(r) + P.value / 2;
1324
+ let t = I(r) + P.value / 2;
1324
1325
  e.push({
1325
1326
  label: n(k.value[r], r),
1326
1327
  pos: t,
@@ -1328,138 +1329,138 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
1328
1329
  });
1329
1330
  }
1330
1331
  return e;
1331
- }), J = t(() => {
1332
+ }), G = n(() => {
1332
1333
  let e = [];
1333
1334
  return D.value.forEach((t, n) => {
1334
1335
  t.legend && e.push({
1335
1336
  label: t.legend,
1336
- color: t.color ?? H(n)
1337
+ color: t.color ?? B(n)
1337
1338
  });
1338
1339
  }), e;
1339
1340
  });
1340
- function le() {
1341
- if (typeof d.csv == "function") return d.csv();
1342
- if (typeof d.csv == "string") return d.csv;
1341
+ function ce() {
1342
+ if (typeof l.csv == "function") return l.csv();
1343
+ if (typeof l.csv == "string") return l.csv;
1343
1344
  let e = D.value.map((e) => ({
1344
1345
  label: e.legend,
1345
1346
  data: e.data
1346
1347
  }));
1347
- return Z(k.value, e);
1348
+ return _e(k.value, e);
1348
1349
  }
1349
- let Y = t(() => !!d.tooltipData || !!d.tooltipTrigger);
1350
- function de(e, t) {
1351
- let n = m.value?.getBoundingClientRect();
1350
+ let q = n(() => !!l.tooltipData || !!l.tooltipTrigger);
1351
+ function J(e, t) {
1352
+ let n = h.value?.getBoundingClientRect();
1352
1353
  if (!n) return null;
1353
1354
  let r = O.value;
1354
1355
  if (r === 0 || P.value === 0) return null;
1355
- let i = A.value ? e - n.left - C.value.left : t - n.top - C.value.top;
1356
+ let i = A.value ? e - n.left - S.value.left : t - n.top - S.value.top;
1356
1357
  return Math.max(0, Math.min(r - 1, Math.floor(i / P.value)));
1357
1358
  }
1358
- let { hoverIndex: X, tooltipRef: fe, tooltipPos: me, handlers: Q } = ue({
1359
- enabled: () => Y.value,
1360
- trigger: () => d.tooltipTrigger,
1361
- clamp: () => d.tooltipClamp,
1362
- pointerToIndex: de,
1363
- containerRef: m,
1364
- onHover: (e) => ee("hover", e)
1365
- }), { svgRef: he, items: ge, downloadLinkText: _e, csvHref: ve, resolvedFilename: ye } = pe({
1366
- filename: () => d.filename,
1367
- legacyMenuLabel: () => d.menu,
1368
- getCsv: le,
1369
- downloadLink: () => d.downloadLink
1370
- }), be = t(() => {
1371
- let e = X.value;
1359
+ let { hoverIndex: Y, tooltipRef: pe, tooltipPos: X, handlers: me } = fe({
1360
+ enabled: () => q.value,
1361
+ trigger: () => l.tooltipTrigger,
1362
+ clamp: () => l.tooltipClamp,
1363
+ pointerToIndex: J,
1364
+ containerRef: h,
1365
+ onHover: (e) => f("hover", e)
1366
+ }), { svgRef: Z, items: ge, downloadLinkText: Q, csvHref: ve, resolvedFilename: ye } = he({
1367
+ filename: () => l.filename,
1368
+ legacyMenuLabel: () => l.menu,
1369
+ getCsv: ce,
1370
+ downloadLink: () => l.downloadLink
1371
+ }), be = n(() => {
1372
+ let e = Y.value;
1372
1373
  if (e !== null) return k.value[e];
1373
- }), xe = t(() => {
1374
- let e = X.value;
1374
+ }), xe = n(() => {
1375
+ let e = Y.value;
1375
1376
  return e === null ? null : {
1376
1377
  index: e,
1377
1378
  category: k.value[e] ?? String(e),
1378
1379
  values: D.value.map((t, n) => ({
1379
1380
  value: Number(t.data[e] ?? NaN),
1380
- color: t.color ?? H(n),
1381
+ color: t.color ?? B(n),
1381
1382
  seriesIndex: n
1382
1383
  })),
1383
- data: d.tooltipData?.[e] ?? null
1384
+ data: l.tooltipData?.[e] ?? null
1384
1385
  };
1385
- }), $ = t(() => {
1386
- let e = X.value;
1386
+ }), $ = n(() => {
1387
+ let e = Y.value;
1387
1388
  if (e === null) return null;
1388
- let t = L(e);
1389
+ let t = I(e);
1389
1390
  return A.value ? {
1390
1391
  x: t,
1391
- y: C.value.top,
1392
+ y: S.value.top,
1392
1393
  w: P.value,
1393
- h: T.value
1394
+ h: w.value
1394
1395
  } : {
1395
- x: C.value.left,
1396
+ x: S.value.left,
1396
1397
  y: t,
1397
- w: w.value,
1398
+ w: C.value,
1398
1399
  h: P.value
1399
1400
  };
1400
1401
  });
1401
- return (t, c) => (h(), i("div", {
1402
+ return (n, c) => (g(), a("div", {
1402
1403
  ref_key: "containerRef",
1403
- ref: m,
1404
+ ref: h,
1404
1405
  class: "bar-chart-wrapper"
1405
1406
  }, [
1406
- s.menu ? (h(), n(oe, {
1407
+ t.menu ? (g(), r(se, {
1407
1408
  key: 0,
1408
1409
  items: x(ge)
1409
- }, null, 8, ["items"])) : r("", !0),
1410
- (h(), i("svg", {
1410
+ }, null, 8, ["items"])) : i("", !0),
1411
+ (g(), a("svg", {
1411
1412
  ref_key: "svgRef",
1412
- ref: he,
1413
- width: b.value,
1414
- height: S.value
1413
+ ref: Z,
1414
+ width: _.value,
1415
+ height: b.value
1415
1416
  }, [
1416
- s.title ? (h(), i("text", {
1417
+ t.title ? (g(), a("text", {
1417
1418
  key: 0,
1418
- x: b.value / 2,
1419
+ x: _.value / 2,
1419
1420
  y: 18,
1420
1421
  "text-anchor": "middle",
1421
1422
  "font-size": "14",
1422
1423
  "font-weight": "600",
1423
1424
  fill: "currentColor"
1424
- }, y(s.title), 9, Qe)) : r("", !0),
1425
- J.value.length > 0 ? (h(), i("g", $e, [(h(!0), i(e, null, _(J.value, (t, n) => (h(), i(e, { key: "ileg" + n }, [a("rect", {
1426
- x: x(C).left + n * 120,
1427
- y: x(C).top - x(20) / 2 - 5,
1425
+ }, y(t.title), 9, tt)) : i("", !0),
1426
+ G.value.length > 0 ? (g(), a("g", nt, [(g(!0), a(e, null, v(G.value, (t, n) => (g(), a(e, { key: "ileg" + n }, [o("rect", {
1427
+ x: x(S).left + n * 120,
1428
+ y: x(S).top - x(20) / 2 - 5,
1428
1429
  width: "12",
1429
1430
  height: "10",
1430
1431
  fill: t.color
1431
- }, null, 8, et), a("text", {
1432
- x: x(C).left + n * 120 + 18,
1433
- y: x(C).top - x(20) / 2 + 4,
1432
+ }, null, 8, rt), o("text", {
1433
+ x: x(S).left + n * 120 + 18,
1434
+ y: x(S).top - x(20) / 2 + 4,
1434
1435
  "font-size": "11",
1435
1436
  fill: "currentColor"
1436
- }, y(t.label), 9, tt)], 64))), 128))])) : r("", !0),
1437
- a("line", {
1438
- x1: x(V)(x(C).left),
1439
- y1: x(V)(x(C).top),
1440
- x2: x(V)(x(C).left),
1441
- y2: x(V)(x(C).top + x(T)),
1437
+ }, y(t.label), 9, it)], 64))), 128))])) : i("", !0),
1438
+ o("line", {
1439
+ x1: x(U)(x(S).left),
1440
+ y1: x(U)(x(S).top),
1441
+ x2: x(U)(x(S).left),
1442
+ y2: x(U)(x(S).top + x(w)),
1442
1443
  stroke: "currentColor",
1443
1444
  "stroke-opacity": "0.3"
1444
- }, null, 8, nt),
1445
- a("line", {
1446
- x1: x(V)(x(C).left),
1447
- y1: x(V)(x(C).top + x(T)),
1448
- x2: x(V)(x(C).left + x(w)),
1449
- y2: x(V)(x(C).top + x(T)),
1445
+ }, null, 8, at),
1446
+ o("line", {
1447
+ x1: x(U)(x(S).left),
1448
+ y1: x(U)(x(S).top + x(w)),
1449
+ x2: x(U)(x(S).left + x(C)),
1450
+ y2: x(U)(x(S).top + x(w)),
1450
1451
  stroke: "currentColor",
1451
1452
  "stroke-opacity": "0.3"
1452
- }, null, 8, rt),
1453
- s.valueGrid ? (h(!0), i(e, { key: 2 }, _(U.value, (e, t) => (h(), i("line", {
1453
+ }, null, 8, ot),
1454
+ t.valueGrid ? (g(!0), a(e, { key: 2 }, v(H.value, (e, t) => (g(), a("line", {
1454
1455
  key: "vg" + t,
1455
- x1: A.value ? x(C).left : e.pos,
1456
- y1: A.value ? e.pos : x(C).top,
1457
- x2: A.value ? x(C).left + x(w) : e.pos,
1458
- y2: A.value ? e.pos : x(C).top + x(T),
1456
+ x1: A.value ? x(S).left : e.pos,
1457
+ y1: A.value ? e.pos : x(S).top,
1458
+ x2: A.value ? x(S).left + x(C) : e.pos,
1459
+ y2: A.value ? e.pos : x(S).top + x(w),
1459
1460
  stroke: "currentColor",
1460
1461
  "stroke-opacity": "0.1"
1461
- }, null, 8, it))), 128)) : r("", !0),
1462
- $.value && Y.value ? (h(), i("rect", {
1462
+ }, null, 8, st))), 128)) : i("", !0),
1463
+ $.value && q.value ? (g(), a("rect", {
1463
1464
  key: 3,
1464
1465
  x: $.value.x,
1465
1466
  y: $.value.y,
@@ -1468,65 +1469,65 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
1468
1469
  fill: "currentColor",
1469
1470
  "fill-opacity": "0.06",
1470
1471
  "pointer-events": "none"
1471
- }, null, 8, at)) : r("", !0),
1472
- A.value ? (h(!0), i(e, { key: 4 }, _(U.value, (e, t) => (h(), i("text", {
1472
+ }, null, 8, ct)) : i("", !0),
1473
+ A.value ? (g(!0), a(e, { key: 4 }, v(H.value, (e, t) => (g(), a("text", {
1473
1474
  key: "vt" + t,
1474
1475
  "data-testid": "value-tick",
1475
- x: x(C).left - 6,
1476
+ x: x(S).left - 6,
1476
1477
  y: e.pos,
1477
1478
  "text-anchor": "end",
1478
1479
  "dominant-baseline": "middle",
1479
1480
  "font-size": "10",
1480
1481
  fill: "currentColor",
1481
1482
  "fill-opacity": "0.6"
1482
- }, y(e.value), 9, ot))), 128)) : (h(!0), i(e, { key: 5 }, _(U.value, (e, t) => (h(), i("text", {
1483
+ }, y(e.value), 9, lt))), 128)) : (g(!0), a(e, { key: 5 }, v(H.value, (e, t) => (g(), a("text", {
1483
1484
  key: "vt" + t,
1484
1485
  "data-testid": "value-tick",
1485
1486
  x: e.pos,
1486
- y: x(C).top + x(T) + 16,
1487
+ y: x(S).top + x(w) + 16,
1487
1488
  "text-anchor": "middle",
1488
1489
  "font-size": "10",
1489
1490
  fill: "currentColor",
1490
1491
  "fill-opacity": "0.6"
1491
- }, y(e.value), 9, st))), 128)),
1492
- s.yLabel ? (h(), i("text", {
1492
+ }, y(e.value), 9, ut))), 128)),
1493
+ t.yLabel ? (g(), a("text", {
1493
1494
  key: 6,
1494
1495
  x: 0,
1495
1496
  y: 0,
1496
- transform: `translate(14, ${x(C).top + x(T) / 2}) rotate(-90)`,
1497
+ transform: `translate(14, ${x(S).top + x(w) / 2}) rotate(-90)`,
1497
1498
  "text-anchor": "middle",
1498
1499
  "font-size": "13",
1499
1500
  fill: "currentColor"
1500
- }, y(s.yLabel), 9, ct)) : r("", !0),
1501
- A.value ? (h(!0), i(e, { key: 7 }, _(q.value, (e, t) => (h(), i("text", {
1501
+ }, y(t.yLabel), 9, dt)) : i("", !0),
1502
+ A.value ? (g(!0), a(e, { key: 7 }, v(W.value, (e, t) => (g(), a("text", {
1502
1503
  key: "ct" + t,
1503
1504
  "data-testid": "category-tick",
1504
1505
  x: e.pos,
1505
- y: x(C).top + x(T) + 16,
1506
+ y: x(S).top + x(w) + 16,
1506
1507
  "text-anchor": e.anchor,
1507
1508
  "font-size": "10",
1508
1509
  fill: "currentColor",
1509
1510
  "fill-opacity": "0.6"
1510
- }, y(e.label), 9, lt))), 128)) : (h(!0), i(e, { key: 8 }, _(q.value, (e, t) => (h(), i("text", {
1511
+ }, y(e.label), 9, ft))), 128)) : (g(!0), a(e, { key: 8 }, v(W.value, (e, t) => (g(), a("text", {
1511
1512
  key: "ct" + t,
1512
1513
  "data-testid": "category-tick",
1513
- x: x(C).left - 6,
1514
+ x: x(S).left - 6,
1514
1515
  y: e.pos,
1515
1516
  "text-anchor": "end",
1516
1517
  "dominant-baseline": "middle",
1517
1518
  "font-size": "10",
1518
1519
  fill: "currentColor",
1519
1520
  "fill-opacity": "0.6"
1520
- }, y(e.label), 9, ut))), 128)),
1521
- s.xLabel ? (h(), i("text", {
1521
+ }, y(e.label), 9, pt))), 128)),
1522
+ t.xLabel ? (g(), a("text", {
1522
1523
  key: 9,
1523
- x: x(C).left + x(w) / 2,
1524
- y: S.value - 4,
1524
+ x: x(S).left + x(C) / 2,
1525
+ y: b.value - 4,
1525
1526
  "text-anchor": "middle",
1526
1527
  "font-size": "13",
1527
1528
  fill: "currentColor"
1528
- }, y(s.xLabel), 9, dt)) : r("", !0),
1529
- (h(!0), i(e, null, _(z.value, (e, t) => (h(), i("rect", {
1529
+ }, y(t.xLabel), 9, mt)) : i("", !0),
1530
+ (g(!0), a(e, null, v(R.value, (e, t) => (g(), a("rect", {
1530
1531
  key: "bar" + t,
1531
1532
  "data-testid": "bar",
1532
1533
  "data-category": e.categoryIndex,
@@ -1537,49 +1538,49 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
1537
1538
  height: e.h,
1538
1539
  fill: e.color,
1539
1540
  "fill-opacity": e.opacity
1540
- }, null, 8, ft))), 128)),
1541
- Y.value ? (h(), i("rect", u({
1541
+ }, null, 8, ht))), 128)),
1542
+ q.value ? (g(), a("rect", d({
1542
1543
  key: 10,
1543
- x: x(C).left,
1544
- y: x(C).top,
1545
- width: x(w),
1546
- height: x(T),
1544
+ x: x(S).left,
1545
+ y: x(S).top,
1546
+ width: x(C),
1547
+ height: x(w),
1547
1548
  fill: "transparent",
1548
1549
  style: {
1549
1550
  cursor: "crosshair",
1550
1551
  "touch-action": "none"
1551
1552
  }
1552
- }, te(x(Q), !0)), null, 16, pt)) : r("", !0)
1553
- ], 8, Ze)),
1554
- Y.value && x(X) !== null && xe.value ? (h(), i("div", {
1553
+ }, ne(x(me), !0)), null, 16, gt)) : i("", !0)
1554
+ ], 8, et)),
1555
+ q.value && x(Y) !== null && xe.value ? (g(), a("div", {
1555
1556
  key: 1,
1556
1557
  ref_key: "tooltipRef",
1557
- ref: fe,
1558
+ ref: pe,
1558
1559
  class: "chart-tooltip-content",
1559
- style: p({
1560
+ style: m({
1560
1561
  position: "absolute",
1561
1562
  top: "0",
1562
1563
  left: "0",
1563
1564
  willChange: "transform",
1564
- transform: x(me) ? `translate3d(${x(me).left}px, ${x(me).top}px, 0) translateY(-50%)` : "translateY(-50%)",
1565
- visibility: x(me) ? "visible" : "hidden"
1565
+ transform: x(X) ? `translate3d(${x(X).left}px, ${x(X).top}px, 0) translateY(-50%)` : "translateY(-50%)",
1566
+ visibility: x(X) ? "visible" : "hidden"
1566
1567
  })
1567
- }, [v(t.$slots, "tooltip", f(l(xe.value)), () => [a("div", mt, [be.value ? (h(), i("div", ht, y(be.value), 1)) : r("", !0), (h(!0), i(e, null, _(xe.value.values, (e) => (h(), i("div", {
1568
+ }, [te(n.$slots, "tooltip", p(u(xe.value)), () => [o("div", _t, [be.value ? (g(), a("div", vt, y(be.value), 1)) : i("", !0), (g(!0), a(e, null, v(xe.value.values, (e) => (g(), a("div", {
1568
1569
  key: e.seriesIndex,
1569
1570
  class: "bar-chart-tooltip-row"
1570
- }, [a("span", {
1571
+ }, [o("span", {
1571
1572
  class: "bar-chart-tooltip-swatch",
1572
- style: p({ background: e.color })
1573
- }, null, 4), o(" " + y(isFinite(e.value) ? se(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : r("", !0),
1574
- x(_e) ? (h(), i("a", {
1573
+ style: m({ background: e.color })
1574
+ }, null, 4), s(" " + y(isFinite(e.value) ? V(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
1575
+ x(Q) ? (g(), a("a", {
1575
1576
  key: 2,
1576
1577
  class: "bar-chart-download-link",
1577
1578
  href: x(ve),
1578
1579
  download: `${x(ye)()}.csv`
1579
- }, y(x(_e)), 9, gt)) : r("", !0)
1580
+ }, y(x(Q)), 9, yt)) : i("", !0)
1580
1581
  ], 512));
1581
1582
  }
1582
- }), [["__scopeId", "data-v-4f604d9f"]]), vt = {
1583
+ }), [["__scopeId", "data-v-4f604d9f"]]), xt = {
1583
1584
  "01013": "010259",
1584
1585
  "01015": "010177",
1585
1586
  "01029": "010177",
@@ -4740,7 +4741,7 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
4740
4741
  51019: "510014",
4741
4742
  "02158": "020820",
4742
4743
  46102: "460957"
4743
- }, yt = {
4744
+ }, St = {
4744
4745
  "010259": "Butler, AL",
4745
4746
  "010177": "Calhoun (Anniston), AL - Cleburne, AL",
4746
4747
  "010172": "Chambers, AL - Randolph, AL",
@@ -5690,25 +5691,47 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
5690
5691
  560775: "Teton, WY - Lincoln, WY",
5691
5692
  560792: "Uinta, WY",
5692
5693
  560804: "Weston, WY"
5693
- }, bt = ["width", "height"], xt = [
5694
- "data-feat-id",
5695
- "d",
5696
- "fill",
5697
- "stroke",
5698
- "stroke-width"
5699
- ], St = { key: 0 }, Ct = ["d", "stroke"], wt = ["transform"], Tt = {
5694
+ }, Ct = {
5695
+ ref: "root",
5696
+ class: "chart-tooltip-content",
5697
+ style: {
5698
+ position: "fixed",
5699
+ left: "0",
5700
+ top: "0",
5701
+ visibility: "hidden",
5702
+ "will-change": "transform",
5703
+ "pointer-events": "none",
5704
+ transform: "translateY(-50%)"
5705
+ }
5706
+ }, wt = /* @__PURE__ */ l({
5707
+ __name: "ChoroplethTooltip",
5708
+ setup(e, { expose: n }) {
5709
+ let a = _(null), s = S("root");
5710
+ return n({
5711
+ setData(e) {
5712
+ a.value = e;
5713
+ },
5714
+ getEl() {
5715
+ return s.value;
5716
+ }
5717
+ }), (e, n) => (g(), r(t, { to: "body" }, [o("div", Ct, [a.value ? te(e.$slots, "default", p(d({ key: 0 }, a.value))) : i("", !0)], 512)]));
5718
+ }
5719
+ }), Tt = {
5720
+ key: 1,
5721
+ class: "choropleth-header"
5722
+ }, Et = {
5700
5723
  key: 0,
5701
- y: 5,
5702
- "font-size": "13",
5703
- "font-weight": "600",
5704
- fill: "currentColor"
5705
- }, Et = ["x", "fill"], Dt = ["x"], Ot = {
5724
+ class: "choropleth-title"
5725
+ }, Dt = {
5726
+ key: 1,
5727
+ class: "choropleth-legend"
5728
+ }, Ot = {
5706
5729
  key: 0,
5707
- y: 5,
5708
- "font-size": "13",
5709
- "font-weight": "600",
5710
- fill: "currentColor"
5711
- }, kt = ["offset", "stop-color"], At = ["x", "fill"], jt = ["x"], Mt = ["x"], Nt = /* @__PURE__ */ B(/* @__PURE__ */ c({
5730
+ class: "choropleth-legend-title"
5731
+ }, kt = {
5732
+ key: 2,
5733
+ class: "choropleth-legend-continuous"
5734
+ }, At = { class: "choropleth-legend-ticks" }, jt = ["viewBox"], Mt = ["innerHTML"], Nt = "http://www.w3.org/2000/svg", Pt = 450, Ft = 1e3, It = /* @__PURE__ */ H(/* @__PURE__ */ l({
5712
5735
  __name: "ChoroplethMap",
5713
5736
  props: {
5714
5737
  topology: {},
@@ -5741,90 +5764,176 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
5741
5764
  tooltipTrigger: {},
5742
5765
  tooltipFormat: {},
5743
5766
  tooltipValueFormat: {},
5744
- tooltipClamp: { default: "chart" }
5767
+ tooltipClamp: { default: "chart" },
5768
+ focus: {},
5769
+ focusZoomLevel: { default: 4 }
5745
5770
  },
5746
- emits: ["stateClick", "stateHover"],
5747
- setup(o, { emit: s }) {
5748
- let c = o, l = s, u = `choropleth-gradient-${S()}`, f = g(null), p = g(null), v = g(null), te = g(0), x = null, C = null, w = !1, T = typeof window < "u" && "ontouchstart" in window, re = null, E = null;
5749
- function D() {
5750
- if (T) return;
5751
- let e = v.value;
5752
- e && (e.addEventListener("click", $), e.addEventListener("mouseover", $), e.addEventListener("mousemove", Se), e.addEventListener("mouseout", Ce));
5771
+ emits: [
5772
+ "stateClick",
5773
+ "stateHover",
5774
+ "update:focus"
5775
+ ],
5776
+ setup(t, { emit: c }) {
5777
+ let l = t, d = c, ne = (e) => e, x = _(null), S = _(null), T = _(null), E = _(null), D = re(), O = n(() => !!l.tooltipTrigger || !!l.tooltipFormat || !!D.tooltip), k = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Map(), j = null, M = null, N = /* @__PURE__ */ new Set(), z = !1, B = typeof window < "u" && "ontouchstart" in window, V = null, H = {
5778
+ width: 0,
5779
+ height: 0
5780
+ }, U = null, W = !1, G = null, ce = _(!1), K = 0, le = 0, ue = 0;
5781
+ function de() {
5782
+ if (B) return;
5783
+ let e = T.value;
5784
+ e && (e.addEventListener("click", $e), e.addEventListener("mouseover", $e), e.addEventListener("mousemove", et), e.addEventListener("mouseout", tt));
5753
5785
  }
5754
- function O() {
5755
- let e = v.value;
5756
- e && (e.removeEventListener("click", $), e.removeEventListener("mouseover", $), e.removeEventListener("mousemove", Se), e.removeEventListener("mouseout", Ce));
5786
+ function q() {
5787
+ let e = T.value;
5788
+ e && (e.removeEventListener("click", $e), e.removeEventListener("mouseover", $e), e.removeEventListener("mousemove", et), e.removeEventListener("mouseout", tt));
5757
5789
  }
5758
- ee(() => {
5759
- f.value && (te.value = f.value.clientWidth, re = new ResizeObserver((e) => {
5760
- let t = e[0];
5761
- t && (te.value = t.contentRect.width);
5762
- }), re.observe(f.value)), k(), D();
5763
- }), m(() => {
5764
- re?.disconnect(), A(), O(), ye();
5790
+ function J() {
5791
+ Ze();
5792
+ }
5793
+ h(() => {
5794
+ fe(), de(), rt(), _e(), Ue(), window.addEventListener("scroll", J, {
5795
+ passive: !0,
5796
+ capture: !0
5797
+ }), window.addEventListener("resize", J, { passive: !0 });
5798
+ }), ee(() => {
5799
+ V?.disconnect(), ue && cancelAnimationFrame(ue), pe(), q(), window.removeEventListener("scroll", J, { capture: !0 }), window.removeEventListener("resize", J);
5765
5800
  });
5766
- function k() {
5767
- if (!p.value || !v.value || !c.zoom && !c.pan) return;
5768
- let e = F(p.value);
5769
- E = P().scaleExtent(c.zoom ? [1, 12] : [1, 1]).on("start", () => {
5770
- w = !0, xe();
5801
+ function fe() {
5802
+ if (!S.value || !T.value) return;
5803
+ let e = ae(S.value), t = Math.max(12, l.focusZoomLevel);
5804
+ G = F().scaleExtent([1, t]).on("start", () => {
5805
+ z = !0, Ze();
5771
5806
  }).on("zoom", (e) => {
5772
- v.value && v.value.setAttribute("transform", e.transform);
5807
+ T.value && T.value.setAttribute("transform", e.transform);
5808
+ let t = e.transform;
5809
+ ce.value = t.k !== 1 || t.x !== 0 || t.y !== 0;
5773
5810
  }).on("end", () => {
5774
- w = !1;
5775
- }), c.pan || E.filter((e) => e.type === "wheel" || e.type === "dblclick"), e.call(E);
5811
+ z = !1;
5812
+ }), G.filter((e) => {
5813
+ let t = Oe.value.length > 0, n = !!l.zoom || t, r = !!l.pan || t;
5814
+ if (e.type === "wheel" || e.type === "dblclick") {
5815
+ if (!n) return !1;
5816
+ } else if (e.type === "mousedown" || e.type === "touchstart") {
5817
+ if (!r) return !1;
5818
+ } else if (!n && !r) return !1;
5819
+ return (!e.ctrlKey || e.type === "wheel") && !e.button;
5820
+ }), e.call(G);
5821
+ }
5822
+ function pe() {
5823
+ S.value && G && (ae(S.value).on(".zoom", null), G = null);
5824
+ }
5825
+ function Z(e) {
5826
+ let t = De.value, n = Ee.value, r = /* @__PURE__ */ new Set();
5827
+ for (let i of e) {
5828
+ let e = t.has(i) ? i : n.get(i);
5829
+ e != null && r.add(e);
5830
+ }
5831
+ return r;
5832
+ }
5833
+ function he(e) {
5834
+ let t = De.value, n = [];
5835
+ for (let r of Z(e)) {
5836
+ let e = t.get(r);
5837
+ e && n.push(e);
5838
+ }
5839
+ return n;
5840
+ }
5841
+ let ge = !1;
5842
+ function _e() {
5843
+ if (!S.value || !G) return;
5844
+ let e = Oe.value, t = e.length > 0 ? he(e) : [], n = /* @__PURE__ */ new Set();
5845
+ for (let e of t) {
5846
+ let t = k.get(String(e.id));
5847
+ t && n.add(t);
5848
+ }
5849
+ for (let e of N) n.has(e) || e === M || Ye(e);
5850
+ for (let e of n) !N.has(e) && e !== M && Je(e);
5851
+ N.clear();
5852
+ for (let e of n) N.add(e);
5853
+ let r = ae(S.value);
5854
+ r.interrupt();
5855
+ let i = ge && t.length > 0;
5856
+ if (ge = !0, t.length === 0) {
5857
+ G.transform(r, I), Ze();
5858
+ return;
5859
+ }
5860
+ let [[a, o], [s, c]] = we.value.bounds({
5861
+ type: "FeatureCollection",
5862
+ features: t
5863
+ }), u = (a + s) / 2, d = (o + c) / 2, f = l.focusZoomLevel, p = I.translate(ye.value / 2 - f * u, be.value / 2 - f * d).scale(f), m = () => {
5864
+ if (!O.value) return;
5865
+ let e = String(t[0].id), n = k.get(e);
5866
+ if (!n) return;
5867
+ let r = n.getBoundingClientRect();
5868
+ Ge(e, r.left + r.width / 2, r.top + r.height / 2);
5869
+ };
5870
+ i ? (qe(), r.transition().duration(Pt).call(G.transform, p).on("end", m)) : (G.transform(r, p), m());
5776
5871
  }
5777
- function A() {
5778
- p.value && E && (F(p.value).on(".zoom", null), E = null);
5872
+ function Q() {
5873
+ if (!S.value || !G) return;
5874
+ let e = ae(S.value);
5875
+ e.interrupt(), G.transform(e, I), Oe.value.length > 0 && d("update:focus", null);
5779
5876
  }
5780
- ne(() => [c.zoom, c.pan], () => {
5781
- A(), O(), k(), D();
5877
+ C(() => l.focusZoomLevel, () => {
5878
+ G && G.scaleExtent([1, Math.max(12, l.focusZoomLevel)]), _e();
5782
5879
  });
5783
- let j = t(() => c.width ?? (te.value || 600)), R = t(() => c.width && c.height ? c.height / c.width : .625), ae = t(() => j.value * R.value), z = t(() => {
5784
- let e = b(c.topology), t = e.objects.counties.geometries, n = /* @__PURE__ */ new Map();
5880
+ let ve = n(() => l.width && l.height ? l.height / l.width : .625), ye = n(() => Ft), be = n(() => Ft * ve.value), xe = n(() => {
5881
+ let e = b(l.topology), t = e.objects.counties.geometries, n = /* @__PURE__ */ new Map();
5785
5882
  for (let e of t) {
5786
- let t = vt[String(e.id).padStart(5, "0")];
5883
+ let t = xt[String(e.id).padStart(5, "0")];
5787
5884
  t && (n.has(t) || n.set(t, []), n.get(t).push(e));
5788
5885
  }
5789
5886
  let r = [];
5790
5887
  for (let [t, i] of n) r.push({
5791
5888
  type: "Feature",
5792
5889
  id: t,
5793
- properties: { name: yt[t] ?? t },
5794
- geometry: L(e, i)
5890
+ properties: { name: St[t] ?? t },
5891
+ geometry: oe(e, i)
5795
5892
  });
5796
5893
  return {
5797
5894
  type: "FeatureCollection",
5798
5895
  features: r
5799
5896
  };
5800
- }), B = t(() => {
5801
- if (c.geoType === "hsas") return z.value;
5802
- if (c.geoType === "counties") {
5803
- let e = b(c.topology);
5804
- return I(e, e.objects.counties);
5897
+ }), $ = n(() => {
5898
+ if (l.geoType === "hsas") return xe.value;
5899
+ if (l.geoType === "counties") {
5900
+ let e = b(l.topology);
5901
+ return L(e, e.objects.counties);
5805
5902
  }
5806
- let e = b(c.topology);
5807
- return I(e, e.objects.states);
5808
- }), V = t(() => {
5809
- if (c.geoType !== "counties" && c.geoType !== "hsas") return null;
5810
- let e = b(c.topology);
5811
- return ie(e, e.objects.states, (e, t) => e !== t);
5812
- }), H = t(() => M().fitExtent([[0, ke.value], [j.value, ae.value + ke.value]], B.value)), se = t(() => N(H.value)), U = t(() => c.geoType === "counties" || c.geoType === "hsas" ? c.strokeWidth * .5 : c.strokeWidth), W = t(() => {
5903
+ let e = b(l.topology);
5904
+ return L(e, e.objects.states);
5905
+ }), Se = n(() => {
5906
+ if (l.geoType !== "counties" && l.geoType !== "hsas") return null;
5907
+ let e = b(l.topology);
5908
+ return R(e, e.objects.states, (e, t) => e !== t);
5909
+ }), Ce = n(() => P().fitExtent([[0, 0], [ye.value, be.value]], $.value)), we = n(() => ie(Ce.value)), Te = n(() => l.geoType === "counties" || l.geoType === "hsas" ? l.strokeWidth * .5 : l.strokeWidth), Ee = n(() => {
5813
5910
  let e = /* @__PURE__ */ new Map();
5814
- if (!c.data) return e;
5815
- for (let t of c.data) {
5816
- e.set(t.id, t.value);
5817
- let n = B.value.features.find((e) => e.properties?.name === t.id);
5818
- n?.id != null && e.set(String(n.id), t.value);
5911
+ for (let t of $.value.features) t.properties?.name != null && t.id != null && e.set(t.properties.name, String(t.id));
5912
+ return e;
5913
+ }), De = n(() => {
5914
+ let e = /* @__PURE__ */ new Map();
5915
+ for (let t of $.value.features) t.id != null && e.set(String(t.id), t);
5916
+ return e;
5917
+ }), Oe = n(() => {
5918
+ let e = l.focus;
5919
+ return e == null ? [] : Array.isArray(e) ? e : [e];
5920
+ }), ke = n(() => {
5921
+ let e = /* @__PURE__ */ new Map();
5922
+ if (!l.data) return e;
5923
+ let t = Ee.value;
5924
+ for (let n of l.data) {
5925
+ e.set(n.id, n.value);
5926
+ let r = t.get(n.id);
5927
+ r && e.set(r, n.value);
5819
5928
  }
5820
5929
  return e;
5821
- }), ce = t(() => {
5822
- if (!c.data || c.data.length === 0) return {
5930
+ }), Ae = n(() => {
5931
+ if (!l.data || l.data.length === 0) return {
5823
5932
  min: 0,
5824
5933
  max: 1
5825
5934
  };
5826
5935
  let e = Infinity, t = -Infinity;
5827
- for (let n of c.data) typeof n.value == "number" && (n.value < e && (e = n.value), n.value > t && (t = n.value));
5936
+ for (let n of l.data) typeof n.value == "number" && (n.value < e && (e = n.value), n.value > t && (t = n.value));
5828
5937
  return isFinite(e) ? e === t ? {
5829
5938
  min: e,
5830
5939
  max: e + 1
@@ -5835,8 +5944,8 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
5835
5944
  min: 0,
5836
5945
  max: 1
5837
5946
  };
5838
- }), G = t(() => Array.isArray(c.colorScale) && c.colorScale.length > 0 && "value" in c.colorScale[0]), K = t(() => Array.isArray(c.colorScale) && !G.value), q = t(() => K.value ? "" : c.colorScale?.min ?? "#e5f0fa"), J = t(() => K.value ? "" : c.colorScale?.max ?? "#08519c");
5839
- function ue(e) {
5947
+ }), je = n(() => Array.isArray(l.colorScale) && l.colorScale.length > 0 && "value" in l.colorScale[0]), Me = n(() => Array.isArray(l.colorScale) && !je.value), Ne = n(() => Me.value ? "" : l.colorScale?.min ?? "#e5f0fa"), Pe = n(() => Me.value ? "" : l.colorScale?.max ?? "#08519c");
5948
+ function Fe(e) {
5840
5949
  let t = e.replace("#", "");
5841
5950
  return [
5842
5951
  parseInt(t.slice(0, 2), 16),
@@ -5844,247 +5953,268 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
5844
5953
  parseInt(t.slice(4, 6), 16)
5845
5954
  ];
5846
5955
  }
5847
- function Y(e) {
5848
- let [t, n, r] = ue(q.value), [i, a, o] = ue(J.value);
5956
+ function Ie(e) {
5957
+ let [t, n, r] = Fe(Ne.value), [i, a, o] = Fe(Pe.value);
5849
5958
  return `rgb(${Math.round(t + (i - t) * e)},${Math.round(n + (a - n) * e)},${Math.round(r + (o - r) * e)})`;
5850
5959
  }
5851
- function fe(e) {
5852
- let t = c.colorScale.slice().sort((e, t) => t.min - e.min);
5853
- for (let n of t) if (e >= n.min) return n.color;
5854
- return c.noDataColor;
5960
+ let Le = n(() => Me.value ? l.colorScale.slice().sort((e, t) => t.min - e.min) : null), Re = n(() => {
5961
+ if (!je.value) return null;
5962
+ let e = /* @__PURE__ */ new Map();
5963
+ for (let t of l.colorScale) e.set(t.value, t.color);
5964
+ return e;
5965
+ });
5966
+ function ze(e) {
5967
+ let t = ke.value.get(e), n = l.noDataColor;
5968
+ if (t == null) return n;
5969
+ let r = Re.value;
5970
+ if (r) return r.get(String(t)) ?? n;
5971
+ let i = Le.value;
5972
+ if (i) {
5973
+ let e = t;
5974
+ for (let t of i) if (e >= t.min) return t.color;
5975
+ return n;
5976
+ }
5977
+ let { min: a, max: o } = Ae.value;
5978
+ return Ie((t - a) / (o - a));
5855
5979
  }
5856
- function pe(e) {
5857
- let t = c.colorScale.find((t) => t.value === String(e));
5858
- return t ? t.color : c.noDataColor;
5980
+ let Be = (e) => e.properties?.name ?? String(e.id);
5981
+ function Ve(e) {
5982
+ return e == null ? "" : typeof e == "number" && l.tooltipValueFormat ? l.tooltipValueFormat(e) : String(e);
5859
5983
  }
5860
- function me(e) {
5861
- let t = W.value.get(String(e));
5862
- if (t == null) return c.noDataColor;
5863
- if (G.value) return pe(t);
5864
- if (K.value) return fe(t);
5865
- let { min: n, max: r } = ce.value;
5866
- return Y((t - n) / (r - n));
5984
+ function He(e, t) {
5985
+ return t == null ? e : `${e}: ${Ve(t)}`;
5867
5986
  }
5868
- function Z(e) {
5869
- return e.properties?.name ?? String(e.id);
5987
+ function Ue() {
5988
+ let e = E.value?.getEl();
5989
+ if (!e) return;
5990
+ V?.disconnect();
5991
+ let t = !1;
5992
+ V = new ResizeObserver((e) => {
5993
+ let n = e[0]?.contentRect;
5994
+ n && (H.width = n.width, H.height = n.height, !t && W && U ? (t = !0, We(U.x, U.y)) : t = !0);
5995
+ }), V.observe(e);
5870
5996
  }
5871
- function Q(e) {
5872
- return W.value.get(String(e.id));
5997
+ function We(e, t) {
5998
+ let n = E.value?.getEl();
5999
+ if (!n) return;
6000
+ let r = x.value?.getBoundingClientRect(), { left: i, top: a } = Y(e, t, H.width, H.height, l.tooltipClamp, r);
6001
+ n.style.transform = `translate3d(${i}px, ${a}px, 0) translateY(-50%)`;
5873
6002
  }
5874
- function he(e) {
5875
- return e == null ? "" : typeof e == "number" && c.tooltipValueFormat ? c.tooltipValueFormat(e) : String(e);
6003
+ function Ge(e, t, n) {
6004
+ let r = A.get(e);
6005
+ if (!r) return;
6006
+ let i = E.value, a = i?.getEl();
6007
+ !i || !a || (i.setData(r), U = {
6008
+ x: t,
6009
+ y: n
6010
+ }, W = !0, We(t, n), a.style.visibility = "visible");
5876
6011
  }
5877
- let ge = t(() => {
5878
- let e = /* @__PURE__ */ new Map();
5879
- for (let t of B.value.features) e.set(String(t.id), t);
5880
- return e;
5881
- });
5882
- function _e(e) {
6012
+ function Ke(e, t) {
6013
+ W && (K = e, le = t, !ue && (ue = requestAnimationFrame(() => {
6014
+ ue = 0;
6015
+ let e = E.value?.getEl();
6016
+ !e || !W || (U = {
6017
+ x: K,
6018
+ y: le
6019
+ }, e.style.transform = `translate3d(${K + 16}px, ${le}px, 0) translateY(-50%)`);
6020
+ })));
6021
+ }
6022
+ function qe() {
6023
+ if (!W) return;
6024
+ W = !1, U = null;
6025
+ let e = E.value?.getEl();
6026
+ e && (e.style.visibility = "hidden");
6027
+ }
6028
+ function Je(e) {
6029
+ e.parentNode?.appendChild(e), e.setAttribute("stroke-width", String(Te.value + 1)), e.setAttribute("stroke", "#555");
6030
+ }
6031
+ function Ye(e) {
6032
+ e.setAttribute("stroke-width", String(Te.value)), e.setAttribute("stroke", l.strokeColor);
6033
+ }
6034
+ function Xe(e) {
6035
+ M !== e && (M && !N.has(M) && Ye(M), M = e, Je(e));
6036
+ }
6037
+ function Ze() {
6038
+ M && (N.has(M) || Ye(M), M = null, d("stateHover", null)), qe();
6039
+ }
6040
+ function Qe(e) {
5883
6041
  let t = e;
5884
6042
  for (; t && !t.dataset?.featId;) t = t.parentElement;
5885
- if (!t) return null;
5886
- let n = ge.value.get(t.dataset.featId);
5887
- return n ? {
5888
- pathEl: t,
5889
- feat: n
5890
- } : null;
6043
+ return t ? t.dataset.featId ?? null : null;
5891
6044
  }
5892
- function ve(e, t, n) {
5893
- C || (C = document.createElement("div"), C.className = "chart-tooltip-content", C.style.position = "fixed", C.style.transform = "translateY(-50%)", document.body.appendChild(C));
5894
- let r = Z(e), i = Q(e), a = {
5895
- id: String(e.id),
5896
- name: r,
5897
- value: i
6045
+ function $e(e) {
6046
+ if (z) return;
6047
+ let t = e, n = Qe(t.target);
6048
+ if (!n) return;
6049
+ let r = A.get(n);
6050
+ if (!r) return;
6051
+ let i = {
6052
+ id: r.id,
6053
+ name: r.name,
6054
+ value: r.value
5898
6055
  };
5899
- c.tooltipFormat ? C.innerHTML = c.tooltipFormat(a) : i == null ? C.textContent = r : C.textContent = `${r}: ${he(i)}`;
5900
- let o = f.value?.getBoundingClientRect(), { left: s, top: l } = le(t, n, C.offsetWidth, C.offsetHeight, c.tooltipClamp, o);
5901
- C.style.left = `${s}px`, C.style.top = `${l}px`;
6056
+ e.type === "click" ? (d("stateClick", i), d("update:focus", Z(Oe.value).has(r.id) ? null : r.id)) : e.type === "mouseover" && (Xe(k.get(n)), O.value && Ge(n, t.clientX, t.clientY), d("stateHover", i));
5902
6057
  }
5903
- function ye() {
5904
- C &&= (C.remove(), null);
6058
+ function et(e) {
6059
+ z || Ke(e.clientX, e.clientY);
5905
6060
  }
5906
- function be(e, t) {
5907
- x && x !== e && (x.setAttribute("stroke-width", String(U.value)), x.setAttribute("stroke", c.strokeColor)), x = e, e.parentNode?.appendChild(e), e.setAttribute("stroke-width", String(U.value + 1)), e.setAttribute("stroke", "#555");
6061
+ function tt(e) {
6062
+ let t = e.relatedTarget;
6063
+ t && T.value?.contains(t) || Ze();
5908
6064
  }
5909
- function xe() {
5910
- x && (x.setAttribute("stroke-width", String(U.value)), x.setAttribute("stroke", c.strokeColor), x = null, l("stateHover", null)), ye();
6065
+ function nt(e) {
6066
+ let t = document.createElementNS(Nt, "path");
6067
+ return e && t.setAttribute("d", e), t;
5911
6068
  }
5912
- function $(e) {
5913
- if (w) return;
5914
- let t = e, n = _e(t.target);
5915
- n && (e.type === "click" ? l("stateClick", {
5916
- id: String(n.feat.id),
5917
- name: Z(n.feat),
5918
- value: Q(n.feat)
5919
- }) : e.type === "mouseover" && (be(n.pathEl, n.feat), c.tooltipTrigger && ve(n.feat, t.clientX, t.clientY), l("stateHover", {
5920
- id: String(n.feat.id),
5921
- name: Z(n.feat),
5922
- value: Q(n.feat)
5923
- })));
6069
+ function rt() {
6070
+ let e = T.value;
6071
+ if (!e) return;
6072
+ for (; e.firstChild;) e.removeChild(e.firstChild);
6073
+ k.clear(), A.clear(), j = null, M = null, N.clear();
6074
+ let t = we.value, n = $.value.features, r = l.strokeColor, i = String(Te.value), a = !O.value, o = document.createDocumentFragment();
6075
+ for (let e of n) {
6076
+ let n = String(e.id), s = Be(e), c = ke.value.get(n), l = nt(t(e));
6077
+ if (l.setAttribute("class", "state-path"), l.setAttribute("data-feat-id", n), l.setAttribute("fill", ze(n)), l.setAttribute("stroke", r), l.setAttribute("stroke-width", i), l.setAttribute("vector-effect", "non-scaling-stroke"), a) {
6078
+ let e = document.createElementNS(Nt, "title");
6079
+ e.textContent = He(s, c), l.appendChild(e);
6080
+ }
6081
+ o.appendChild(l), k.set(n, l), A.set(n, {
6082
+ id: n,
6083
+ name: s,
6084
+ value: c,
6085
+ feature: e
6086
+ });
6087
+ }
6088
+ let s = Se.value;
6089
+ if (s) {
6090
+ let e = nt(t(s));
6091
+ e.setAttribute("fill", "none"), e.setAttribute("stroke", r), e.setAttribute("stroke-width", "1"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("pointer-events", "none"), e.setAttribute("vector-effect", "non-scaling-stroke"), o.appendChild(e), j = e;
6092
+ }
6093
+ e.appendChild(o);
5924
6094
  }
5925
- function Se(e) {
5926
- w || !C || (C.style.left = `${e.clientX + 16}px`, C.style.top = `${e.clientY}px`);
6095
+ function it() {
6096
+ let e = !O.value;
6097
+ for (let [t, n] of k) {
6098
+ let r = ke.value.get(t), i = A.get(t);
6099
+ if (n.setAttribute("fill", ze(t)), i && (i.value = r), e && i) {
6100
+ let e = n.firstElementChild;
6101
+ e && (e.textContent = He(i.name, r));
6102
+ }
6103
+ }
5927
6104
  }
5928
- function Ce(e) {
5929
- let t = e.relatedTarget;
5930
- t && v.value?.contains(t) || xe();
6105
+ function at() {
6106
+ for (let e of k.values()) e === M || N.has(e) || Ye(e);
6107
+ j && j.setAttribute("stroke", l.strokeColor);
5931
6108
  }
5932
- function we() {
5933
- return typeof c.menu == "string" ? c.menu : "choropleth";
6109
+ function ot() {
6110
+ return typeof l.menu == "string" ? l.menu : "choropleth";
5934
6111
  }
5935
- let Te = t(() => c.legend && (G.value || K.value || c.data)), Ee = t(() => c.colorScale.slice().sort((e, t) => e.min - t.min)), De = t(() => c.title ? 24 : 0), Oe = t(() => Te.value ? 28 : 0), ke = t(() => De.value + Oe.value), Ae = t(() => ae.value + ke.value), je = t(() => De.value + 18), Me = t(() => {
6112
+ let st = n(() => l.legend && (je.value || Me.value || l.data)), ct = n(() => l.colorScale.slice().sort((e, t) => e.min - t.min)), lt = n(() => {
5936
6113
  let e = [];
5937
6114
  for (let t = 0; t <= 10; t++) {
5938
6115
  let n = t / 10;
5939
6116
  e.push({
5940
6117
  offset: `${(n * 100).toFixed(0)}%`,
5941
- color: Y(n)
6118
+ color: Ie(n)
5942
6119
  });
5943
6120
  }
5944
6121
  return e;
5945
- }), Ne = t(() => {
5946
- let { min: e, max: t } = ce.value, n = t - e, r = [];
6122
+ }), ut = new Intl.NumberFormat("en-US", {
6123
+ notation: "compact",
6124
+ maximumFractionDigits: 1
6125
+ }), dt = n(() => {
6126
+ let { min: e, max: t } = Ae.value, n = t - e, r = [];
5947
6127
  for (let t = 1; t <= 3; t++) {
5948
- let i = t / 4, a = e + n * i, o = Number.isInteger(a) ? String(a) : a.toFixed(1).replace(/\.0$/, "");
6128
+ let i = t / 4, a = e + n * i, o = Math.abs(a) >= 1e3 ? ut.format(a) : Number.isInteger(a) ? String(a) : a.toFixed(1).replace(/\.0$/, "");
5949
6129
  r.push({
5950
6130
  value: o,
5951
6131
  pct: i * 100
5952
6132
  });
5953
6133
  }
5954
6134
  return r;
5955
- }), Pe = t(() => {
6135
+ }), ft = n(() => {
5956
6136
  let e = [];
5957
- if (G.value) for (let t of c.colorScale) e.push({
6137
+ if (je.value) for (let t of l.colorScale) e.push({
5958
6138
  key: t.value,
5959
6139
  color: t.color,
5960
6140
  label: t.value
5961
6141
  });
5962
- else if (K.value) for (let t of Ee.value) e.push({
6142
+ else if (Me.value) for (let t of ct.value) e.push({
5963
6143
  key: String(t.min),
5964
6144
  color: t.color,
5965
6145
  label: t.label ?? String(t.min)
5966
6146
  });
5967
6147
  return e;
5968
- }), Fe = t(() => {
5969
- let e = c.legendTitle ? c.legendTitle.length * 8 + 12 : 0;
5970
- for (let t of Pe.value) e += 16 + t.label.length * 7 + 12;
5971
- return e - (Pe.value.length > 0 ? 12 : 0);
5972
- }), Ie = t(() => {
5973
- let e = c.legendTitle ? c.legendTitle.length * 8 + 12 : 0;
5974
- return Pe.value.map((t) => {
5975
- let n = e;
5976
- return e += 16 + t.label.length * 7 + 12, n;
5977
- });
5978
- }), Le = t(() => {
5979
- if (G.value || K.value) return (j.value - Fe.value) / 2;
5980
- let e = c.legendTitle ? c.legendTitle.length * 8 + 12 : 0;
5981
- return (j.value - e - 160) / 2;
5982
- }), Re = t(() => {
5983
- let e = we();
6148
+ }), pt = n(() => `linear-gradient(to right, ${lt.value.map((e) => `${e.color} ${e.offset}`).join(", ")})`), mt = n(() => {
6149
+ let e = ot();
5984
6150
  return [{
5985
6151
  label: "Save as SVG",
5986
6152
  action: () => {
5987
- p.value && de(p.value, e);
6153
+ S.value && X(S.value, e);
5988
6154
  }
5989
6155
  }, {
5990
6156
  label: "Save as PNG",
5991
6157
  action: () => {
5992
- p.value && X(p.value, e);
6158
+ S.value && me(S.value, e);
5993
6159
  }
5994
6160
  }];
5995
6161
  });
5996
- return (t, s) => (h(), i("div", {
6162
+ return C(() => [we.value, O.value], () => rt()), C(() => [
6163
+ ke.value,
6164
+ l.colorScale,
6165
+ l.noDataColor
6166
+ ], () => it()), C(() => [l.strokeColor, Te.value], () => at()), C(() => [Oe.value, we.value], () => _e(), { flush: "post" }), (n, c) => (g(), a("div", {
5997
6167
  ref_key: "containerRef",
5998
- ref: f,
5999
- class: d(["choropleth-wrapper", { pannable: o.pan }])
6000
- }, [o.menu ? (h(), n(oe, {
6001
- key: 0,
6002
- items: Re.value
6003
- }, null, 8, ["items"])) : r("", !0), (h(), i("svg", {
6004
- ref_key: "svgRef",
6005
- ref: p,
6006
- width: j.value,
6007
- height: Ae.value
6168
+ ref: x,
6169
+ class: f(["choropleth-wrapper", { pannable: t.pan }])
6008
6170
  }, [
6009
- a("g", {
6010
- ref_key: "mapGroupRef",
6011
- ref: v
6012
- }, [(h(!0), i(e, null, _(B.value.features, (e) => (h(), i("path", {
6013
- key: String(e.id),
6014
- "data-feat-id": String(e.id),
6015
- d: se.value(e) ?? void 0,
6016
- fill: me(e.id),
6017
- stroke: o.strokeColor,
6018
- "stroke-width": U.value,
6019
- class: "state-path"
6020
- }, [o.tooltipTrigger ? r("", !0) : (h(), i("title", St, y(Z(e)) + y(Q(e) == null ? "" : `: ${he(Q(e))}`), 1))], 8, xt))), 128)), V.value ? (h(), i("path", {
6171
+ t.menu ? (g(), r(se, {
6021
6172
  key: 0,
6022
- d: se.value(V.value) ?? void 0,
6023
- fill: "none",
6024
- stroke: o.strokeColor,
6025
- "stroke-width": 1,
6026
- "stroke-linejoin": "round",
6027
- "pointer-events": "none"
6028
- }, null, 8, Ct)) : r("", !0)], 512),
6029
- Te.value ? (h(), i("g", {
6030
- key: 0,
6031
- class: "choropleth-legend",
6032
- transform: `translate(${Le.value},${je.value})`
6033
- }, [G.value || K.value ? (h(), i(e, { key: 0 }, [o.legendTitle ? (h(), i("text", Tt, y(o.legendTitle), 1)) : r("", !0), (h(!0), i(e, null, _(Pe.value, (t, n) => (h(), i(e, { key: t.key }, [a("rect", {
6034
- x: Ie.value[n],
6035
- y: -5,
6036
- width: "12",
6037
- height: "12",
6038
- rx: "3",
6039
- fill: t.color
6040
- }, null, 8, Et), a("text", {
6041
- x: Ie.value[n] + 16,
6042
- y: 5,
6043
- "font-size": "13",
6044
- fill: "currentColor"
6045
- }, y(t.label), 9, Dt)], 64))), 128))], 64)) : (h(), i(e, { key: 1 }, [
6046
- o.legendTitle ? (h(), i("text", Ot, y(o.legendTitle), 1)) : r("", !0),
6047
- a("defs", null, [a("linearGradient", {
6048
- id: u,
6049
- x1: "0",
6050
- x2: "1",
6051
- y1: "0",
6052
- y2: "0"
6053
- }, [(h(!0), i(e, null, _(Me.value, (e) => (h(), i("stop", {
6054
- key: e.offset,
6055
- offset: e.offset,
6056
- "stop-color": e.color
6057
- }, null, 8, kt))), 128))])]),
6058
- a("rect", {
6059
- x: o.legendTitle ? o.legendTitle.length * 8 + 12 : 0,
6060
- y: -6,
6061
- width: 160,
6062
- height: 12,
6063
- rx: "2",
6064
- fill: `url(#${u})`
6065
- }, null, 8, At),
6066
- (h(!0), i(e, null, _(Ne.value, (e) => (h(), i("text", {
6067
- key: e.value,
6068
- x: (o.legendTitle ? o.legendTitle.length * 8 + 12 : 0) + e.pct / 100 * 160,
6069
- y: 20,
6070
- "font-size": "11",
6071
- fill: "currentColor",
6072
- opacity: "0.7",
6073
- "text-anchor": "middle"
6074
- }, y(e.value), 9, jt))), 128))
6075
- ], 64))], 8, wt)) : r("", !0),
6076
- o.title ? (h(), i("text", {
6077
- key: 1,
6078
- x: j.value / 2,
6079
- y: 18,
6080
- "text-anchor": "middle",
6081
- "font-size": "14",
6082
- "font-weight": "600",
6083
- fill: "currentColor"
6084
- }, y(o.title), 9, Mt)) : r("", !0)
6085
- ], 8, bt))], 2));
6173
+ items: mt.value
6174
+ }, null, 8, ["items"])) : i("", !0),
6175
+ t.title || st.value ? (g(), a("div", Tt, [t.title ? (g(), a("div", Et, y(t.title), 1)) : i("", !0), st.value ? (g(), a("div", Dt, [t.legendTitle ? (g(), a("span", Ot, y(t.legendTitle), 1)) : i("", !0), je.value || Me.value ? (g(!0), a(e, { key: 1 }, v(ft.value, (e) => (g(), a("span", {
6176
+ key: e.key,
6177
+ class: "choropleth-legend-item"
6178
+ }, [o("span", {
6179
+ class: "choropleth-legend-swatch",
6180
+ style: m({ background: e.color })
6181
+ }, null, 4), s(" " + y(e.label), 1)]))), 128)) : (g(), a("div", kt, [o("div", {
6182
+ class: "choropleth-legend-gradient",
6183
+ style: m({ background: pt.value })
6184
+ }, null, 4), o("div", At, [(g(!0), a(e, null, v(dt.value, (e) => (g(), a("span", {
6185
+ key: e.value,
6186
+ style: m({ left: e.pct + "%" })
6187
+ }, y(e.value), 5))), 128))])]))])) : i("", !0)])) : i("", !0),
6188
+ (g(), a("svg", {
6189
+ ref_key: "svgRef",
6190
+ ref: S,
6191
+ viewBox: `0 0 ${ye.value} ${be.value}`,
6192
+ preserveAspectRatio: "xMidYMid meet"
6193
+ }, [o("g", {
6194
+ ref_key: "mapGroupRef",
6195
+ ref: T
6196
+ }, null, 512)], 8, jt)),
6197
+ ce.value ? (g(), a("button", {
6198
+ key: 2,
6199
+ type: "button",
6200
+ class: "choropleth-reset",
6201
+ "aria-label": "Reset zoom",
6202
+ onClick: Q
6203
+ }, " Reset ")) : i("", !0),
6204
+ O.value ? (g(), r(wt, {
6205
+ key: 3,
6206
+ ref_key: "tooltipChildRef",
6207
+ ref: E
6208
+ }, {
6209
+ default: w((r) => [te(n.$slots, "tooltip", p(u(ne(r))), () => [t.tooltipFormat ? (g(), a("span", {
6210
+ key: 0,
6211
+ innerHTML: t.tooltipFormat(r)
6212
+ }, null, 8, Mt)) : r.value == null ? (g(), a(e, { key: 1 }, [s(y(r.name), 1)], 64)) : (g(), a(e, { key: 2 }, [s(y(r.name) + ": " + y(Ve(r.value)), 1)], 64))], !0)]),
6213
+ _: 3
6214
+ }, 512)) : i("", !0)
6215
+ ], 2));
6086
6216
  }
6087
- }), [["__scopeId", "data-v-105ba317"]]), Pt = /* @__PURE__ */ B(/* @__PURE__ */ c({
6217
+ }), [["__scopeId", "data-v-62648243"]]), Lt = /* @__PURE__ */ H(/* @__PURE__ */ l({
6088
6218
  __name: "ChartTooltip",
6089
6219
  props: {
6090
6220
  x: {},
@@ -6095,47 +6225,47 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
6095
6225
  },
6096
6226
  emits: ["close"],
6097
6227
  setup(e) {
6098
- return (t, o) => e.mode === "hover" && e.open ? (h(), i("div", {
6228
+ return (t, n) => e.mode === "hover" && e.open ? (g(), a("div", {
6099
6229
  key: 0,
6100
6230
  class: "chart-tooltip-content",
6101
- style: p({
6231
+ style: m({
6102
6232
  position: "absolute",
6103
6233
  left: `${e.x + e.sideOffset}px`,
6104
6234
  top: `${e.y}px`,
6105
6235
  transform: "translateY(-50%)"
6106
6236
  })
6107
- }, [v(t.$slots, "default", {}, void 0, !0)], 4)) : e.mode === "click" ? (h(), n(x(j), {
6237
+ }, [te(t.$slots, "default", {}, void 0, !0)], 4)) : e.mode === "click" ? (g(), r(x(N), {
6108
6238
  key: 1,
6109
6239
  open: e.open
6110
6240
  }, {
6111
- default: C(() => [s(x(O), { "as-child": "" }, {
6112
- default: C(() => [a("div", {
6241
+ default: w(() => [c(x(A), { "as-child": "" }, {
6242
+ default: w(() => [o("div", {
6113
6243
  class: "chart-tooltip-anchor",
6114
- style: p({
6244
+ style: m({
6115
6245
  left: `${e.x}px`,
6116
6246
  top: `${e.y}px`
6117
6247
  })
6118
6248
  }, null, 4)]),
6119
6249
  _: 1
6120
- }), s(x(A), null, {
6121
- default: C(() => [e.open ? (h(), n(x(k), {
6250
+ }), c(x(M), null, {
6251
+ default: w(() => [e.open ? (g(), r(x(j), {
6122
6252
  key: 0,
6123
6253
  class: "chart-tooltip-content",
6124
6254
  side: "right",
6125
6255
  "side-offset": e.sideOffset,
6126
6256
  "update-position-strategy": "always",
6127
- onPointerDownOutside: o[0] ||= (e) => t.$emit("close"),
6128
- onEscapeKeyDown: o[1] ||= (e) => t.$emit("close")
6257
+ onPointerDownOutside: n[0] ||= (e) => t.$emit("close"),
6258
+ onEscapeKeyDown: n[1] ||= (e) => t.$emit("close")
6129
6259
  }, {
6130
- default: C(() => [v(t.$slots, "default", {}, void 0, !0)]),
6260
+ default: w(() => [te(t.$slots, "default", {}, void 0, !0)]),
6131
6261
  _: 3
6132
- }, 8, ["side-offset"])) : r("", !0)]),
6262
+ }, 8, ["side-offset"])) : i("", !0)]),
6133
6263
  _: 3
6134
6264
  })]),
6135
6265
  _: 3
6136
- }, 8, ["open"])) : r("", !0);
6266
+ }, 8, ["open"])) : i("", !0);
6137
6267
  }
6138
- }), [["__scopeId", "data-v-44377f70"]]), Ft = { class: "TableWrapper" }, It = /* @__PURE__ */ B(/* @__PURE__ */ c({
6268
+ }), [["__scopeId", "data-v-44377f70"]]), Rt = { class: "TableWrapper" }, zt = /* @__PURE__ */ H(/* @__PURE__ */ l({
6139
6269
  __name: "DataTable",
6140
6270
  props: {
6141
6271
  data: {},
@@ -6153,12 +6283,12 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
6153
6283
  default: !1
6154
6284
  }
6155
6285
  },
6156
- setup(o) {
6286
+ setup(t) {
6157
6287
  let s = {
6158
6288
  small: "80px",
6159
6289
  medium: "150px",
6160
6290
  large: "250px"
6161
- }, c = o;
6291
+ }, c = t;
6162
6292
  function l(e) {
6163
6293
  return c.columnConfig?.[e]?.label ?? e;
6164
6294
  }
@@ -6174,16 +6304,16 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
6174
6304
  minWidth: n
6175
6305
  };
6176
6306
  }
6177
- function f(e) {
6307
+ function d(e) {
6178
6308
  let t = c.columnConfig?.[e]?.align;
6179
6309
  if (t) return { textAlign: t };
6180
6310
  }
6181
- function ee(e) {
6311
+ function p(e) {
6182
6312
  return typeof e.column == "function";
6183
6313
  }
6184
- let m = t(() => {
6314
+ let h = n(() => {
6185
6315
  let e = c.data;
6186
- return ee(e) ? e.columns.map((t) => ({
6316
+ return p(e) ? e.columns.map((t) => ({
6187
6317
  name: t.name,
6188
6318
  values: e.column(t.name),
6189
6319
  enumLabels: t.enumLabels
@@ -6191,60 +6321,60 @@ var he = ["width", "height"], ge = ["x"], _e = { key: 1 }, ve = [
6191
6321
  name: e,
6192
6322
  values: t
6193
6323
  }));
6194
- }), g = t(() => {
6195
- let e = m.value;
6324
+ }), ee = n(() => {
6325
+ let e = h.value;
6196
6326
  if (e.length === 0) return 0;
6197
6327
  let t = 0;
6198
6328
  for (let n of e) t = Math.max(t, n.values.length);
6199
6329
  return c.maxRows ? Math.min(t, c.maxRows) : t;
6200
6330
  });
6201
- function v(e, t) {
6331
+ function _(e, t) {
6202
6332
  let n = e.values[t];
6203
6333
  return n == null ? "" : e.enumLabels && typeof n == "number" ? e.enumLabels[n] ?? String(n) : typeof n == "number" ? Number.isInteger(n) ? n.toString() : n.toFixed(4) : typeof n == "boolean" ? n ? "true" : "false" : String(n);
6204
6334
  }
6205
6335
  function te() {
6206
6336
  return c.filename ? c.filename : typeof c.menu == "string" ? c.menu : "data";
6207
6337
  }
6208
- function b(e) {
6338
+ function ne(e) {
6209
6339
  return e.includes(",") || e.includes("\"") || e.includes("\n") ? `"${e.replace(/"/g, "\"\"")}"` : e;
6210
6340
  }
6211
- function x() {
6341
+ function b() {
6212
6342
  if (typeof c.csv == "function") return c.csv();
6213
6343
  if (typeof c.csv == "string") return c.csv;
6214
- let e = m.value, t = g.value, n = [e.map((e) => b(l(e.name))).join(",")];
6344
+ let e = h.value, t = ee.value, n = [e.map((e) => ne(l(e.name))).join(",")];
6215
6345
  for (let r = 0; r < t; r++) {
6216
- let t = e.map((e) => b(v(e, r)));
6346
+ let t = e.map((e) => ne(_(e, r)));
6217
6347
  n.push(t.join(","));
6218
6348
  }
6219
6349
  return n.join("\n");
6220
6350
  }
6221
- let S = t(() => [{
6351
+ let x = n(() => [{
6222
6352
  label: c.downloadMenuLink,
6223
- action: () => fe(x(), te())
6224
- }]), ne = t(() => !!c.menu);
6225
- return (t, s) => (h(), i("div", { class: d(["TableOuter", {
6226
- "full-width": o.fullWidth,
6227
- "has-menu": ne.value
6228
- }]) }, [ne.value ? (h(), n(oe, {
6353
+ action: () => Z(b(), te())
6354
+ }]), re = n(() => !!c.menu);
6355
+ return (n, s) => (g(), a("div", { class: f(["TableOuter", {
6356
+ "full-width": t.fullWidth,
6357
+ "has-menu": re.value
6358
+ }]) }, [re.value ? (g(), r(se, {
6229
6359
  key: 0,
6230
- items: S.value,
6360
+ items: x.value,
6231
6361
  "force-dropdown": ""
6232
- }, null, 8, ["items"])) : r("", !0), a("div", Ft, [a("table", { class: d(["Table", { "full-width": o.fullWidth }]) }, [
6233
- a("colgroup", null, [(h(!0), i(e, null, _(m.value, (e) => (h(), i("col", {
6362
+ }, null, 8, ["items"])) : i("", !0), o("div", Rt, [o("table", { class: f(["Table", { "full-width": t.fullWidth }]) }, [
6363
+ o("colgroup", null, [(g(!0), a(e, null, v(h.value, (e) => (g(), a("col", {
6234
6364
  key: e.name,
6235
- style: p(u(e.name))
6365
+ style: m(u(e.name))
6236
6366
  }, null, 4))), 128))]),
6237
- a("thead", null, [a("tr", null, [(h(!0), i(e, null, _(m.value, (e) => (h(), i("th", {
6367
+ o("thead", null, [o("tr", null, [(g(!0), a(e, null, v(h.value, (e) => (g(), a("th", {
6238
6368
  key: e.name,
6239
- style: p(f(e.name))
6369
+ style: m(d(e.name))
6240
6370
  }, y(l(e.name)), 5))), 128))])]),
6241
- a("tbody", null, [(h(!0), i(e, null, _(g.value, (t) => (h(), i("tr", { key: t }, [(h(!0), i(e, null, _(m.value, (e) => (h(), i("td", {
6371
+ o("tbody", null, [(g(!0), a(e, null, v(ee.value, (n) => (g(), a("tr", { key: n }, [(g(!0), a(e, null, v(h.value, (e) => (g(), a("td", {
6242
6372
  key: e.name,
6243
- class: d(o.columnConfig?.[e.name]?.cellClass),
6244
- style: p(f(e.name))
6245
- }, y(v(e, t - 1)), 7))), 128))]))), 128))])
6373
+ class: f(t.columnConfig?.[e.name]?.cellClass),
6374
+ style: m(d(e.name))
6375
+ }, y(_(e, n - 1)), 7))), 128))]))), 128))])
6246
6376
  ], 2)])], 2));
6247
6377
  }
6248
6378
  }), [["__scopeId", "data-v-d5c290dc"]]);
6249
6379
  //#endregion
6250
- export { _t as BarChart, Pt as ChartTooltip, Nt as ChoroplethMap, It as DataTable, Xe as LineChart };
6380
+ export { bt as BarChart, Lt as ChartTooltip, It as ChoroplethMap, zt as DataTable, $e as LineChart };