@adyen/lume-vue3 1.6.5 → 1.6.6

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,5 +1,5 @@
1
- import { defineComponent as Z, ref as M, openBlock as _, createElementBlock as $, mergeProps as j, createElementVNode as G, toDisplayString as ae, createCommentVNode as z, isRef as Rt, computed as v, watch as K, toRefs as ne, inject as Be, reactive as Pe, onMounted as ye, unref as d, Fragment as ee, renderList as W, createBlock as J, normalizeClass as oe, normalizeStyle as St, onBeforeUnmount as Ct, watchEffect as Gt, renderSlot as S, createTextVNode as fe, useSlots as ie, withDirectives as rn, withCtx as V, createSlots as de, vShow as sn, pushScopeId as cn, popScopeId as dn, provide as Xe, createVNode as se, nextTick as yt, toHandlers as le, normalizeProps as he, guardReactiveProps as ge, defineAsyncComponent as Ye, resolveDynamicComponent as vn } from "vue";
2
- import { format as mn, ticks as pn, scaleBand as He, scaleLinear as Me, link as fn, line as hn, area as gn } from "d3";
1
+ import { defineComponent as Z, ref as B, openBlock as _, createElementBlock as $, mergeProps as j, createElementVNode as G, toDisplayString as le, createCommentVNode as W, isRef as Bt, computed as v, watch as K, toRefs as ne, inject as Ve, reactive as Pe, onMounted as ye, unref as d, Fragment as ee, renderList as z, createBlock as J, normalizeClass as oe, normalizeStyle as Rt, onBeforeUnmount as St, watchEffect as Ct, renderSlot as S, createTextVNode as pe, useSlots as ie, withDirectives as rn, withCtx as V, createSlots as de, vShow as sn, pushScopeId as cn, popScopeId as dn, provide as Ye, createVNode as se, nextTick as _t, toHandlers as ae, normalizeProps as he, guardReactiveProps as ge, defineAsyncComponent as Ke, resolveDynamicComponent as vn } from "vue";
2
+ import { format as mn, ticks as fn, scaleBand as He, scaleLinear as Me, link as pn, line as hn, area as gn } from "d3";
3
3
  import { createPopper as _n } from "@popperjs/core";
4
4
  import { sankeyLinkHorizontal as yn, sankey as kn, sankeyJustify as bn } from "d3-sankey";
5
5
  const An = {
@@ -44,7 +44,7 @@ const An = {
44
44
  },
45
45
  emits: ["click", "mouseenter"],
46
46
  setup(e, { expose: n, emit: t }) {
47
- const o = t, l = M(null);
47
+ const o = t, l = B(null);
48
48
  return n({ ref: l }), (u, a) => (_(), $("g", j(e.group, {
49
49
  class: ["axis__tick", {
50
50
  "axis__tick--hovered": e.isHovered,
@@ -63,9 +63,9 @@ const An = {
63
63
  ref_key: "labelRef",
64
64
  ref: l,
65
65
  class: "axis__label"
66
- }), ae(e.value), 17)
66
+ }), le(e.value), 17)
67
67
  ]),
68
- e.withGridlines ? (_(), $("line", j({ key: 0 }, e.gridline, { class: "axis__grid-line" }), null, 16)) : z("", !0)
68
+ e.withGridlines ? (_(), $("line", j({ key: 0 }, e.gridline, { class: "axis__grid-line" }), null, 16)) : W("", !0)
69
69
  ], 16));
70
70
  }
71
71
  });
@@ -74,7 +74,7 @@ const te = (e, n) => {
74
74
  for (const [o, l] of n)
75
75
  t[o] = l;
76
76
  return t;
77
- }, kt = /* @__PURE__ */ te(Tn, [["__scopeId", "data-v-59ddc0a6"]]), Ln = [
77
+ }, yt = /* @__PURE__ */ te(Tn, [["__scopeId", "data-v-59ddc0a6"]]), Ln = [
78
78
  "controls",
79
79
  "legend",
80
80
  "axes",
@@ -82,10 +82,10 @@ const te = (e, n) => {
82
82
  "tooltip",
83
83
  "tooltip-content"
84
84
  ];
85
- function jt() {
85
+ function Gt() {
86
86
  return process.env.NODE_ENV === "production";
87
87
  }
88
- function Vt(e) {
88
+ function jt(e) {
89
89
  return (e == null ? void 0 : e.map(
90
90
  (n) => n.values.map((t) => t == null ? void 0 : t.value).flat()
91
91
  ).flat()) || [];
@@ -98,17 +98,17 @@ function On(e) {
98
98
  (n) => "color" in n
99
99
  );
100
100
  }
101
- function Ke(e) {
101
+ function Je(e) {
102
102
  return !!e && typeof e == "object" && !Array.isArray(e);
103
103
  }
104
- function Pt(e, n) {
104
+ function Vt(e, n) {
105
105
  const t = { ...e };
106
106
  return Object.entries(n).forEach(([o, l]) => {
107
- t[o] = Ke(e[o]) && Ke(l) ? Pt(e[o], l) : l;
107
+ t[o] = Je(e[o]) && Je(l) ? Vt(e[o], l) : l;
108
108
  }), t;
109
109
  }
110
110
  function xn(e) {
111
- return e != null && Ke(e) && "value" in e;
111
+ return e != null && Je(e) && "value" in e;
112
112
  }
113
113
  function ve(e) {
114
114
  return (e == null ? void 0 : e.bandwidth) !== void 0;
@@ -134,8 +134,8 @@ function wn(e, n) {
134
134
  }
135
135
  ).values[n]) == null ? void 0 : t.value) || 0;
136
136
  }
137
- function Je(e) {
138
- const n = Rt(e) ? e.value : e;
137
+ function Pt(e) {
138
+ const n = Bt(e) ? e.value : e;
139
139
  if (!n)
140
140
  throw new Error("No empty array can be created from specified data value");
141
141
  const t = Math.max(
@@ -184,9 +184,9 @@ var me = /* @__PURE__ */ ((e) => (e.DatasetLength = `Our guidelines highly recom
184
184
  Learn more: https://lume.design/guidelines/datasets`, e.ColorLoop = "Colors will loop around after the 5th dataset. You can prevent this by setting specific colors for your datasets.", e.Empty = "The dataset(s) provided are empty.", e.InvalidFormat = "The string provided to format is invalid. Please refer to https://github.com/d3/d3-format for valid arguments.", e.NotContainedInSvg = "This component is an `SVGElement`, thus it is required to be inside an `<svg>` container.", e.InvalidHoveredIndex = "The provided hovered index is not valid for the data of this chart.", e.InvalidHoveredElement = "The provided hovered element is not valid for the data of this diagram.", e.IndexExceedsLengthOfDataSets = "Index exceeds length of all of the datasets", e))(me || {});
185
185
  const Bn = "[lume] ";
186
186
  function _e(e, n = !0) {
187
- n && jt() || console.warn(Bn + "Warning: " + e);
187
+ n && Gt() || console.warn(Bn + "Warning: " + e);
188
188
  }
189
- const Ve = (e) => {
189
+ const je = (e) => {
190
190
  let n = null;
191
191
  switch (typeof e) {
192
192
  case "string":
@@ -206,21 +206,21 @@ const Ve = (e) => {
206
206
  return n ? n(...o) : o[0];
207
207
  }
208
208
  return t;
209
- }, Re = () => ({
209
+ }, Be = () => ({
210
210
  options: {
211
211
  type: Object,
212
212
  default: () => ({})
213
213
  }
214
214
  });
215
- function pe(e, n) {
215
+ function fe(e, n) {
216
216
  return { allOptions: v(() => {
217
- const o = Rt(n) ? n == null ? void 0 : n.value : n;
218
- return o ? Pt(o, e.value) : e.value;
217
+ const o = Bt(n) ? n == null ? void 0 : n.value : n;
218
+ return o ? Vt(o, e.value) : e.value;
219
219
  }) };
220
220
  }
221
221
  const Rn = 0.2;
222
222
  function Sn(e, n, t) {
223
- const o = M(), l = v(() => Math.max(...e.value.range())), u = v(() => n.value.length);
223
+ const o = B(), l = v(() => Math.max(...e.value.range())), u = v(() => n.value.length);
224
224
  function a() {
225
225
  if (!n.value)
226
226
  return;
@@ -236,8 +236,8 @@ function Sn(e, n, t) {
236
236
  const c = t.value.skip, p = n.value.length;
237
237
  if (s === 0)
238
238
  return !0;
239
- const r = l.value / p, h = typeof c == "number" && c > 0 && c + 1 || Math.ceil(o.value / r);
240
- return s % h === 0;
239
+ const r = l.value / p, m = typeof c == "number" && c > 0 && c + 1 || Math.ceil(o.value / r);
240
+ return s % m === 0;
241
241
  }
242
242
  return K(n, a), { showTick: i };
243
243
  }
@@ -249,7 +249,7 @@ const D = {
249
249
  SINGLE: "single",
250
250
  GROUPED: "grouped",
251
251
  STACKED: "stacked"
252
- }, zt = "No data", bt = 20, Wt = 0.33, Zt = 0.5, Ut = 12, Se = 8, Gn = 1, jn = [
252
+ }, zt = "No data", kt = 20, Wt = 0.33, Zt = 0.5, Ut = 12, Re = 8, Gn = 1, jn = [
253
253
  "auto",
254
254
  "auto-start",
255
255
  "auto-end",
@@ -308,7 +308,7 @@ const Xt = {
308
308
  return {
309
309
  x: -(c - e.value.step()) / 2,
310
310
  width: c,
311
- height: t.value.tickPadding + Ut + Se
311
+ height: t.value.tickPadding + Ut + Re
312
312
  };
313
313
  }
314
314
  function a() {
@@ -343,7 +343,7 @@ const Xt = {
343
343
  }
344
344
  function u(s) {
345
345
  var p;
346
- const c = (s ? (p = s.getComputedTextLength) == null ? void 0 : p.call(s) : 42) + t.value.tickPadding + Se;
346
+ const c = (s ? (p = s.getComputedTextLength) == null ? void 0 : p.call(s) : 42) + t.value.tickPadding + Re;
347
347
  return {
348
348
  x: -c,
349
349
  width: c,
@@ -384,7 +384,7 @@ const Xt = {
384
384
  }
385
385
  function u() {
386
386
  return {
387
- height: t.value.tickPadding + Ut + Se,
387
+ height: t.value.tickPadding + Ut + Re,
388
388
  width: o.value,
389
389
  x: -(o.value / 2)
390
390
  };
@@ -419,7 +419,7 @@ const Xt = {
419
419
  }
420
420
  function u(s) {
421
421
  var p;
422
- const c = (((p = s == null ? void 0 : s.getComputedTextLength) == null ? void 0 : p.call(s)) || 0) + t.value.tickPadding + Se;
422
+ const c = (((p = s == null ? void 0 : s.getComputedTextLength) == null ? void 0 : p.call(s)) || 0) + t.value.tickPadding + Re;
423
423
  return {
424
424
  width: c,
425
425
  height: o.value,
@@ -471,12 +471,12 @@ const Xt = {
471
471
  Kn
472
472
  ];
473
473
  var Yt = /* @__PURE__ */ ((e) => (e.bandScale = "band-scale-axis", e.linearScale = "linear-scale-axis", e))(Yt || {}), Kt = /* @__PURE__ */ ((e) => (e.left = "left", e.bottom = "bottom", e))(Kt || {}), Qe = /* @__PURE__ */ ((e) => (e.x = "bottom", e.y = "left", e))(Qe || {});
474
- const At = /* @__PURE__ */ Z({
474
+ const bt = /* @__PURE__ */ Z({
475
475
  __name: "lume-axis",
476
476
  props: {
477
477
  scale: {
478
478
  type: Function,
479
- required: !0
479
+ default: null
480
480
  },
481
481
  type: {
482
482
  type: String,
@@ -500,72 +500,74 @@ const At = /* @__PURE__ */ Z({
500
500
  type: String,
501
501
  default: D.VERTICAL
502
502
  },
503
- ...Re()
503
+ ...Be()
504
504
  },
505
505
  emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
506
506
  setup(e, { emit: n }) {
507
- const o = e, l = n, { scale: u, containerSize: a, hoveredIndex: i, options: s, orientation: c } = ne(o), p = Be("isEmpty", M(!1)), r = Pe({}), h = M(null), g = M(null), m = M(null), A = v(
507
+ const o = e, l = n, { scale: u, containerSize: a, hoveredIndex: i, options: s, orientation: c } = ne(o), p = Ve("isEmpty", B(!1)), r = Pe({}), m = B(null), g = B(null), f = B(null), A = v(
508
508
  () => o.type ? Qe[o.type] : o.position
509
- ), x = v(
509
+ ), L = v(
510
510
  () => o.type || (A.value === "left" ? "y" : "x")
511
- ), T = v(
512
- () => x.value === "x" && c.value === D.VERTICAL || x.value === "y" && c.value === D.HORIZONTAL
513
- ), { allOptions: f } = pe(
511
+ ), k = v(
512
+ () => L.value === "x" && c.value === D.VERTICAL || L.value === "y" && c.value === D.HORIZONTAL
513
+ ), { allOptions: h } = fe(
514
514
  s,
515
- x.value === "x" ? Vn : Pn
516
- ), { showTick: O } = Sn(u, h, f), N = v(() => {
517
- var R, H, k, B;
518
- return x.value === "y" && p.value ? `translate(0, ${((R = a.value) == null ? void 0 : R.height) / 2})` : x.value === "x" && p.value ? `translate(-${((H = a.value) == null ? void 0 : H.width) / 2}, ${(k = a.value) == null ? void 0 : k.height})` : `translate(0, ${x.value === "x" ? (B = a.value) == null ? void 0 : B.height : 0})`;
519
- }), E = v(() => {
515
+ L.value === "x" ? Vn : Pn
516
+ ), { showTick: x } = Sn(u, m, h), E = v(() => {
517
+ var R, H, b, M;
518
+ return L.value === "y" && p.value && !u.value ? `translate(0, ${((R = a.value) == null ? void 0 : R.height) / 2})` : L.value === "x" && p.value && !u.value ? `translate(-${((H = a.value) == null ? void 0 : H.width) / 2}, ${(b = a.value) == null ? void 0 : b.height})` : `translate(0, ${L.value === "x" ? (M = a.value) == null ? void 0 : M.height : 0})`;
519
+ }), N = v(() => {
520
+ if (!u.value)
521
+ return [];
520
522
  if (ve(u.value))
521
523
  return u.value.labels || u.value.domain();
522
- const { tickCount: R } = f.value, [H, k] = u.value.domain();
523
- return pn(H, k, R);
524
+ const { tickCount: R } = h.value, [H, b] = u.value.domain();
525
+ return fn(H, b, R);
524
526
  }), F = v(() => {
525
- const { tickFormat: R } = f.value;
526
- return Ve(R);
527
+ const { tickFormat: R } = h.value;
528
+ return je(R);
527
529
  }), w = v(
528
- () => f.value.withHover && T.value && i.value > -1
530
+ () => h.value.withHover && k.value && i.value > -1
529
531
  ), C = v(
530
- () => f.value.tickPadding + Se || 16
531
- ), U = v(() => x.value === "x" ? (
532
+ () => h.value.tickPadding + Re || 16
533
+ ), U = v(() => L.value === "x" ? (
532
534
  // If x axis, get the tick height
533
535
  Math.max(
534
- ...(h.value || []).map(
536
+ ...(m.value || []).map(
535
537
  (R) => {
536
- var H, k;
537
- return ((k = (H = R.ref).getBBox) == null ? void 0 : k.call(H).height) + C.value;
538
+ var H, b;
539
+ return ((b = (H = R.ref).getBBox) == null ? void 0 : b.call(H).height) + C.value;
538
540
  }
539
541
  )
540
542
  )
541
543
  ) : (
542
544
  // If y axis, get the tick width
543
545
  Math.max(
544
- ...(h.value || []).map(
546
+ ...(m.value || []).map(
545
547
  (R) => {
546
- var H, k;
547
- return ((k = (H = R.ref).getBBox) == null ? void 0 : k.call(H).width) + C.value;
548
+ var H, b;
549
+ return ((b = (H = R.ref).getBBox) == null ? void 0 : b.call(H).width) + C.value;
548
550
  }
549
551
  )
550
552
  )
551
553
  ));
552
554
  function X(R) {
553
- const { showTicks: H } = f.value;
555
+ const { showTicks: H } = h.value;
554
556
  return H === !1 ? "" : F.value(R);
555
557
  }
556
- function q(R, H, k) {
557
- l("mouseenter", { index: T.value ? R : null, value: H, event: k });
558
+ function q(R, H, b) {
559
+ l("mouseenter", { index: k.value ? R : null, value: H, event: b });
558
560
  }
559
- function P(R, H, k) {
560
- l("click", { index: R, value: H, event: k });
561
+ function P(R, H, b) {
562
+ l("click", { index: R, value: H, event: b });
561
563
  }
562
564
  function re(R) {
563
565
  var H;
564
- if (!(!h.value || !h.value.length))
565
- return (H = h.value[R]) == null ? void 0 : H.ref;
566
+ if (!(!m.value || !m.value.length))
567
+ return (H = m.value[R]) == null ? void 0 : H.ref;
566
568
  }
567
569
  function xe() {
568
- m.value = E.value.map(
570
+ f.value = N.value.map(
569
571
  (R, H) => ({
570
572
  value: X(R),
571
573
  group: r.getTickGroupAttributes(R, H),
@@ -576,44 +578,46 @@ const At = /* @__PURE__ */ Z({
576
578
  );
577
579
  }
578
580
  function be() {
579
- const R = u.value.step ? "bandScale" : "linearScale", H = Un[`${x.value}-${Yt[R]}`];
580
- Object.entries(H(u, a, f) || []).forEach(
581
- ([k, B]) => {
582
- r[k] = B;
581
+ if (!u.value)
582
+ return;
583
+ const R = u.value.step ? "bandScale" : "linearScale", H = Un[`${L.value}-${Yt[R]}`];
584
+ Object.entries(H(u, a, h) || []).forEach(
585
+ ([b, M]) => {
586
+ r[b] = M;
583
587
  }
584
588
  );
585
589
  }
586
- return K(u, be, { flush: "sync", immediate: !0 }), K(u, xe, { immediate: !0 }), K(h, xe), K(U, (R) => l("lume__internal--axis-size", R)), ye(() => Fe(g.value)), (R, H) => d(u) ? (_(), $("g", {
590
+ return K(u, be, { flush: "sync", immediate: !0 }), K(u, xe, { immediate: !0 }), K(m, xe), K(U, (R) => l("lume__internal--axis-size", R)), ye(() => Fe(g.value)), (R, H) => d(u) ? (_(), $("g", {
587
591
  key: 0,
588
592
  ref_key: "root",
589
593
  ref: g,
590
594
  class: "axis",
591
- transform: N.value,
595
+ transform: E.value,
592
596
  "data-j-axis": "",
593
- onMouseleave: H[1] || (H[1] = (k) => l("mouseleave", k))
597
+ onMouseleave: H[1] || (H[1] = (b) => l("mouseleave", b))
594
598
  }, [
595
- x.value === "x" ? (_(), $("defs", Yn, Jn)) : z("", !0),
596
- (_(!0), $(ee, null, W(m.value, (k, B) => (_(), J(d(kt), j({
597
- key: `${k.value}_${B}`,
599
+ L.value === "x" ? (_(), $("defs", Yn, Jn)) : W("", !0),
600
+ (_(!0), $(ee, null, z(f.value, (b, M) => (_(), J(d(yt), j({
601
+ key: `${b.value}_${M}`,
598
602
  ref_for: !0,
599
603
  ref_key: "tickRefs",
600
- ref: h
601
- }, k, {
602
- "is-hidden": d(f).skip && !d(O)(B),
603
- "with-gridlines": d(f).gridLines,
604
- onMouseenter: (y) => q(B, k.value, y),
605
- onClick: (y) => P(B, k.value, y)
604
+ ref: m
605
+ }, b, {
606
+ "is-hidden": d(h).skip && !d(x)(M),
607
+ "with-gridlines": d(h).gridLines,
608
+ onMouseenter: (y) => q(M, b.value, y),
609
+ onClick: (y) => P(M, b.value, y)
606
610
  }), null, 16, ["is-hidden", "with-gridlines", "onMouseenter", "onClick"]))), 128)),
607
- w.value ? (_(), J(d(kt), j({ key: 1 }, m.value[d(i)], {
611
+ w.value ? (_(), J(d(yt), j({ key: 1 }, f.value[d(i)], {
608
612
  "with-gridlines": !1,
609
613
  "is-hovered": "",
610
- onClick: H[0] || (H[0] = (k) => P(
614
+ onClick: H[0] || (H[0] = (b) => P(
611
615
  d(i),
612
- m.value[d(i)].value,
613
- k
616
+ f.value[d(i)].value,
617
+ b
614
618
  ))
615
- }), null, 16)) : z("", !0)
616
- ], 40, Xn)) : z("", !0);
619
+ }), null, 16)) : W("", !0)
620
+ ], 40, Xn)) : W("", !0);
617
621
  }
618
622
  });
619
623
  function Qn(e, n, t, o) {
@@ -629,7 +633,7 @@ function Qn(e, n, t, o) {
629
633
  return { computedX: a, computedY: i, shouldHaveMinWidth: l, shouldHaveMinHeight: u };
630
634
  }
631
635
  function qn(e, n, t, o) {
632
- const l = M(0), u = M(0), a = v(() => `${e.value + t.value / 2}px ${n.value + o.value / 2}px`);
636
+ const l = B(0), u = B(0), a = v(() => `${e.value + t.value / 2}px ${n.value + o.value / 2}px`);
633
637
  return ye(() => {
634
638
  l.value = t.value, u.value = o.value;
635
639
  }), K(t, (i) => l.value = i), K(o, (i) => u.value = i), { computedWidth: l, computedHeight: u, transformOrigin: a };
@@ -672,9 +676,9 @@ const eo = ["x", "y", "width", "height"], to = /* @__PURE__ */ Z({
672
676
  },
673
677
  emits: ["click", "mouseover", "mouseleave"],
674
678
  setup(e, { emit: n }) {
675
- const t = e, o = n, { x: l, y: u, width: a, height: i, transition: s, classList: c } = ne(t), p = M(null), r = v(
679
+ const t = e, o = n, { x: l, y: u, width: a, height: i, transition: s, classList: c } = ne(t), p = B(null), r = v(
676
680
  () => typeof c.value == "string" ? [c.value] : c.value
677
- ), h = v(() => s.value === "width"), g = v(() => s.value === "height"), m = qn(l, u, a, i), { computedX: A, computedY: x, shouldHaveMinWidth: T, shouldHaveMinHeight: f } = Qn(l, u, a, i), O = v(() => T.value ? 1 : (h.value ? m.computedWidth : a).value), N = v(() => f.value ? 1 : (g.value ? m.computedHeight : i).value), E = h.value || g.value ? m.transformOrigin : null;
681
+ ), m = v(() => s.value === "width"), g = v(() => s.value === "height"), f = qn(l, u, a, i), { computedX: A, computedY: L, shouldHaveMinWidth: k, shouldHaveMinHeight: h } = Qn(l, u, a, i), x = v(() => k.value ? 1 : (m.value ? f.computedWidth : a).value), E = v(() => h.value ? 1 : (g.value ? f.computedHeight : i).value), N = m.value || g.value ? f.transformOrigin : null;
678
682
  return ye(() => Fe(p.value)), (F, w) => (_(), $("rect", {
679
683
  ref_key: "root",
680
684
  ref: p,
@@ -682,16 +686,16 @@ const eo = ["x", "y", "width", "height"], to = /* @__PURE__ */ Z({
682
686
  {
683
687
  "lume-fill--faded": e.isFaded,
684
688
  "lume-bar--negative": e.isNegative,
685
- "lume-bar--transition-width": h.value,
689
+ "lume-bar--transition-width": m.value,
686
690
  "lume-bar--transition-height": g.value
687
691
  },
688
692
  ...r.value
689
693
  ]]),
690
- style: St({ transformOrigin: d(E) }),
694
+ style: Rt({ transformOrigin: d(N) }),
691
695
  x: d(A),
692
- y: d(x),
693
- width: O.value,
694
- height: N.value,
696
+ y: d(L),
697
+ width: x.value,
698
+ height: E.value,
695
699
  "data-j-bar": "",
696
700
  onClick: w[0] || (w[0] = (C) => o("click", C)),
697
701
  onMouseover: w[1] || (w[1] = (C) => o("mouseover", C)),
@@ -701,7 +705,7 @@ const eo = ["x", "y", "width", "height"], to = /* @__PURE__ */ Z({
701
705
  });
702
706
  const dt = /* @__PURE__ */ te(to, [["__scopeId", "data-v-8e8f732a"]]);
703
707
  function no() {
704
- const e = M(), n = Pe({
708
+ const e = B(), n = Pe({
705
709
  dimensions: {}
706
710
  }), t = new ResizeObserver((o) => {
707
711
  o.forEach((l) => {
@@ -710,11 +714,11 @@ function no() {
710
714
  });
711
715
  return ye(() => {
712
716
  t.observe(e.value);
713
- }), Ct(() => {
717
+ }), St(() => {
714
718
  t.unobserve(e.value);
715
719
  }), { resizeState: n, resizeRef: e };
716
720
  }
717
- const oo = ["height"], ao = ["transform"], lo = /* @__PURE__ */ Z({
721
+ const oo = ["height"], lo = ["transform"], ao = /* @__PURE__ */ Z({
718
722
  __name: "lume-chart-container",
719
723
  props: {
720
724
  margins: {
@@ -736,22 +740,22 @@ const oo = ["height"], ao = ["transform"], lo = /* @__PURE__ */ Z({
736
740
  },
737
741
  emits: ["click", "mouseenter", "mouseleave", "resize"],
738
742
  setup(e, { emit: n }) {
739
- const t = e, o = n, { margins: l, containerSize: u } = ne(t), a = M(null), { resizeRef: i, resizeState: s } = no(), c = v(
743
+ const t = e, o = n, { margins: l, containerSize: u } = ne(t), a = B(null), { resizeRef: i, resizeState: s } = no(), c = v(
740
744
  () => u.value.height + l.value.top + l.value.bottom
741
745
  );
742
- return Gt(() => {
746
+ return Ct(() => {
743
747
  if (!a.value)
744
748
  return;
745
749
  const { width: p } = s.dimensions, { height: r } = a.value.getBoundingClientRect();
746
750
  if (!p || !r)
747
751
  return;
748
- const h = p - l.value.left - l.value.right, g = r - l.value.top - l.value.bottom, m = {
749
- width: h > 0 ? h : 0,
752
+ const m = p - l.value.left - l.value.right, g = r - l.value.top - l.value.bottom, f = {
753
+ width: m > 0 ? m : 0,
750
754
  height: g > 0 ? g : 0,
751
755
  outerWidth: p,
752
756
  outerHeight: r
753
757
  };
754
- o("resize", m);
758
+ o("resize", f);
755
759
  }), (p, r) => (_(), $("div", {
756
760
  ref_key: "resizeRef",
757
761
  ref: i,
@@ -769,9 +773,9 @@ const oo = ["height"], ao = ["transform"], lo = /* @__PURE__ */ Z({
769
773
  }]),
770
774
  height: c.value,
771
775
  "data-j-chart-container__root": "",
772
- onClick: r[0] || (r[0] = (h) => o("click", h)),
773
- onMouseenter: r[1] || (r[1] = (h) => o("mouseenter", h)),
774
- onMouseleave: r[2] || (r[2] = (h) => o("mouseleave", h))
776
+ onClick: r[0] || (r[0] = (m) => o("click", m)),
777
+ onMouseenter: r[1] || (r[1] = (m) => o("mouseenter", m)),
778
+ onMouseleave: r[2] || (r[2] = (m) => o("mouseleave", m))
775
779
  }, [
776
780
  G("g", {
777
781
  transform: `translate(${d(l).left}, ${d(l).top})`,
@@ -779,14 +783,14 @@ const oo = ["height"], ao = ["transform"], lo = /* @__PURE__ */ Z({
779
783
  "data-j-chart-container__group": ""
780
784
  }, [
781
785
  S(p.$slots, "default", {}, void 0, !0)
782
- ], 8, ao)
786
+ ], 8, lo)
783
787
  ], 42, oo)),
784
788
  S(p.$slots, "footer", {}, void 0, !0),
785
789
  S(p.$slots, "extra", {}, void 0, !0)
786
790
  ], 2));
787
791
  }
788
792
  });
789
- const uo = /* @__PURE__ */ te(lo, [["__scopeId", "data-v-2c7d0302"]]), ro = ["onClick", "onMouseenter"], io = /* @__PURE__ */ Z({
793
+ const uo = /* @__PURE__ */ te(ao, [["__scopeId", "data-v-2c7d0302"]]), ro = ["onClick", "onMouseenter"], io = /* @__PURE__ */ Z({
790
794
  __name: "lume-chart-legend",
791
795
  props: {
792
796
  data: {
@@ -797,31 +801,30 @@ const uo = /* @__PURE__ */ te(lo, [["__scopeId", "data-v-2c7d0302"]]), ro = ["on
797
801
  },
798
802
  emits: ["click", "mouseenter", "mouseleave"],
799
803
  setup(e, { emit: n }) {
800
- const t = n, o = Be("isEmpty", M(!1));
801
- return (l, u) => d(o) ? z("", !0) : (_(), $("div", {
802
- key: 0,
804
+ const t = n;
805
+ return (o, l) => (_(), $("div", {
803
806
  class: "lume-chart-legend",
804
807
  "data-j-chart-legend": "",
805
- onMouseleave: u[0] || (u[0] = (a) => t("mouseleave"))
808
+ onMouseleave: l[0] || (l[0] = (u) => t("mouseleave"))
806
809
  }, [
807
- (_(!0), $(ee, null, W(e.data, (a, i) => (_(), $("div", {
808
- key: `legend-item-${i}`,
810
+ (_(!0), $(ee, null, z(e.data, (u, a) => (_(), $("div", {
811
+ key: `legend-item-${a}`,
809
812
  class: "lume-chart-legend__item lume-typography--body",
810
813
  tabindex: "0",
811
814
  "data-j-chart-legend__symbol-wrapper": "",
812
- onClick: (s) => t("click", { index: i, dataset: a, event: s }),
813
- onMouseenter: (s) => t("mouseenter", { index: i, dataset: a, event: s })
815
+ onClick: (i) => t("click", { index: a, dataset: u, event: i }),
816
+ onMouseenter: (i) => t("mouseenter", { index: a, dataset: u, event: i })
814
817
  }, [
815
818
  G("span", {
816
- class: oe(["lume-chart-legend__symbol", `lume-background-color--${a.color}`]),
819
+ class: oe(["lume-chart-legend__symbol", `lume-background-color--${u.color}`]),
817
820
  "data-j-chart-legend__symbol": ""
818
821
  }, null, 2),
819
- fe(" " + ae(a.label || i), 1)
822
+ pe(" " + le(u.label || a), 1)
820
823
  ], 40, ro))), 128))
821
824
  ], 32));
822
825
  }
823
826
  });
824
- const Tt = /* @__PURE__ */ te(io, [["__scopeId", "data-v-b298ddd7"]]);
827
+ const At = /* @__PURE__ */ te(io, [["__scopeId", "data-v-f8ebd3b9"]]);
825
828
  const so = {}, co = {
826
829
  class: "lume-tooltip__title",
827
830
  "data-j-tooltip__title": ""
@@ -832,12 +835,12 @@ function vo(e, n) {
832
835
  ]);
833
836
  }
834
837
  const mo = /* @__PURE__ */ te(so, [["render", vo], ["__scopeId", "data-v-8af3fac6"]]);
835
- const po = {}, fo = {
838
+ const fo = {}, po = {
836
839
  class: "lume-tooltip__item",
837
840
  "data-j-tooltip__summary-item": ""
838
841
  }, ho = { class: "lume-tooltip__value" };
839
842
  function go(e, n) {
840
- return _(), $("li", fo, [
843
+ return _(), $("li", po, [
841
844
  G("span", null, [
842
845
  S(e.$slots, "default", {}, void 0, !0)
843
846
  ]),
@@ -846,7 +849,7 @@ function go(e, n) {
846
849
  ])
847
850
  ]);
848
851
  }
849
- const _o = /* @__PURE__ */ te(po, [["render", go], ["__scopeId", "data-v-4ed7ec1b"]]), yo = {
852
+ const _o = /* @__PURE__ */ te(fo, [["render", go], ["__scopeId", "data-v-4ed7ec1b"]]), yo = {
850
853
  class: "lume-tooltip__item",
851
854
  "data-j-tooltip__item": ""
852
855
  }, ko = { "data-j-tooltip__item__label": "" }, bo = {
@@ -866,7 +869,7 @@ const _o = /* @__PURE__ */ te(po, [["render", go], ["__scopeId", "data-v-4ed7ec1
866
869
  key: 0,
867
870
  class: oe([[`lume-background-color--${e.color}`], "lume-tooltip__symbol"]),
868
871
  "data-j-tooltip__item__symbol": ""
869
- }, null, 2)) : z("", !0),
872
+ }, null, 2)) : W("", !0),
870
873
  G("span", ko, [
871
874
  S(n.$slots, "label", {}, void 0, !0)
872
875
  ]),
@@ -913,15 +916,15 @@ const To = /* @__PURE__ */ te(Ao, [["__scopeId", "data-v-4f995c3c"]]), Lo = (e)
913
916
  type: String,
914
917
  default: null
915
918
  },
916
- ...Re()
919
+ ...Be()
917
920
  },
918
921
  emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
919
922
  setup(e, { emit: n }) {
920
- const t = e, o = n, l = M(null), { items: u, options: a } = ne(t), i = ie(), s = M(null), { allOptions: c } = pe(a), p = v(
923
+ const t = e, o = n, l = B(null), { items: u, options: a } = ne(t), i = ie(), s = B(null), { allOptions: c } = fe(a), p = v(
921
924
  () => c.value.fixedPositioning ?? t.fixedPositioning
922
925
  ), r = v(
923
926
  () => p.value ? "fixed" : "absolute"
924
- ), h = v(() => [
927
+ ), m = v(() => [
925
928
  {
926
929
  name: "computeStyles",
927
930
  options: {
@@ -936,35 +939,35 @@ const To = /* @__PURE__ */ te(Ao, [["__scopeId", "data-v-4f995c3c"]]), Lo = (e)
936
939
  ...t.modifiers || []
937
940
  ]), g = v(
938
941
  () => c.value.showTitle !== !1 && t.title != null
939
- ), m = v(() => Ve(c.value.valueFormat)), A = v(() => Ve(c.value.titleFormat)), x = v(
942
+ ), f = v(() => je(c.value.valueFormat)), A = v(() => je(c.value.titleFormat)), L = v(
940
943
  () => {
941
- var E;
942
- return ((E = u.value) == null ? void 0 : E.find((F) => F.isSummary)) || {
944
+ var N;
945
+ return ((N = u.value) == null ? void 0 : N.find((F) => F.isSummary)) || {
943
946
  label: c.value.summary ?? t.summary
944
947
  };
945
948
  }
946
- ), T = v(() => i.summary || x.value.label);
947
- function f() {
949
+ ), k = v(() => i.summary || L.value.label);
950
+ function h() {
948
951
  t.targetElement && l.value && (s.value = _n(t.targetElement, l.value, {
949
952
  placement: t.position,
950
953
  strategy: r.value,
951
- modifiers: h.value
954
+ modifiers: m.value
952
955
  }), o("opened", t.targetElement));
953
956
  }
954
- function O() {
957
+ function x() {
955
958
  s.value && (s.value.destroy(), o("closed"));
956
959
  }
957
- function N() {
960
+ function E() {
958
961
  s.value && (c.value.withAnimation !== !1 && l.value.classList.add("lume-tooltip--animated"), t.targetElement ? function() {
959
962
  s.value.state.elements.reference = t.targetElement, s.value.update(), o("moved", t.targetElement);
960
- }() : O());
963
+ }() : x());
961
964
  }
962
965
  return K(
963
966
  () => t.targetElement,
964
- (E, F) => {
965
- !F && E ? f() : N();
967
+ (N, F) => {
968
+ !F && N ? h() : E();
966
969
  }
967
- ), ye(f), Ct(O), (E, F) => rn((_(), $("div", {
970
+ ), ye(h), St(x), (N, F) => rn((_(), $("div", {
968
971
  ref_key: "root",
969
972
  ref: l,
970
973
  class: oe(["lume-tooltip lume-typography--caption", {
@@ -974,43 +977,43 @@ const To = /* @__PURE__ */ te(Ao, [["__scopeId", "data-v-4f995c3c"]]), Lo = (e)
974
977
  onMouseenter: F[0] || (F[0] = (w) => o("tooltip-mouseenter")),
975
978
  onMouseleave: F[1] || (F[1] = (w) => o("tooltip-mouseleave"))
976
979
  }, [
977
- S(E.$slots, "default", {}, () => [
978
- S(E.$slots, "title", {}, () => [
980
+ S(N.$slots, "default", {}, () => [
981
+ S(N.$slots, "title", {}, () => [
979
982
  g.value ? (_(), J(d(mo), { key: 0 }, {
980
983
  default: V(() => [
981
- fe(ae(A.value(e.title)), 1)
984
+ pe(le(A.value(e.title)), 1)
982
985
  ]),
983
986
  _: 1
984
- })) : z("", !0)
987
+ })) : W("", !0)
985
988
  ], !0),
986
989
  G("ul", Oo, [
987
- S(E.$slots, "summary", {}, () => [
988
- T.value ? (_(), J(d(_o), { key: 0 }, de({
990
+ S(N.$slots, "summary", {}, () => [
991
+ k.value ? (_(), J(d(_o), { key: 0 }, de({
989
992
  default: V(() => [
990
- fe(ae(x.value.label) + " ", 1)
993
+ pe(le(L.value.label) + " ", 1)
991
994
  ]),
992
995
  _: 2
993
996
  }, [
994
- x.value.value ? {
997
+ L.value.value ? {
995
998
  name: "value",
996
999
  fn: V(() => [
997
- fe(ae(m.value(x.value.value)), 1)
1000
+ pe(le(f.value(L.value.value)), 1)
998
1001
  ]),
999
1002
  key: "0"
1000
1003
  } : void 0
1001
- ]), 1024)) : z("", !0)
1004
+ ]), 1024)) : W("", !0)
1002
1005
  ], !0),
1003
- T.value ? (_(), $("li", xo, Io)) : z("", !0),
1004
- S(E.$slots, "items", {}, () => [
1005
- (_(!0), $(ee, null, W(d(u), (w) => (_(), J(d(To), {
1006
+ k.value ? (_(), $("li", xo, Io)) : W("", !0),
1007
+ S(N.$slots, "items", {}, () => [
1008
+ (_(!0), $(ee, null, z(d(u), (w) => (_(), J(d(To), {
1006
1009
  key: w.label,
1007
1010
  color: w.color
1008
1011
  }, {
1009
1012
  label: V(() => [
1010
- fe(ae(w.label), 1)
1013
+ pe(le(w.label), 1)
1011
1014
  ]),
1012
1015
  value: V(() => [
1013
- fe(ae(m.value(w.value)), 1)
1016
+ pe(le(f.value(w.value)), 1)
1014
1017
  ]),
1015
1018
  _: 2
1016
1019
  }, 1032, ["color"]))), 128))
@@ -1024,14 +1027,14 @@ const To = /* @__PURE__ */ te(Ao, [["__scopeId", "data-v-4f995c3c"]]), Lo = (e)
1024
1027
  });
1025
1028
  const Eo = /* @__PURE__ */ te(wo, [["__scopeId", "data-v-8ec11304"]]);
1026
1029
  var Te = /* @__PURE__ */ ((e) => (e.Categorical = "categorical", e.Sequential = "sequential", e.Divergent = "divergent", e))(Te || {});
1027
- const No = Te.Categorical, Ce = ce.Skyblue, Do = it.SkyTeal;
1030
+ const No = Te.Categorical, Se = ce.Skyblue, Do = it.SkyTeal;
1028
1031
  function Ho(e) {
1029
- return e === Te.Divergent ? Do : Ce;
1032
+ return e === Te.Divergent ? Do : Se;
1030
1033
  }
1031
1034
  function Mo(e) {
1032
1035
  return Object.values(ct).includes(e);
1033
1036
  }
1034
- function Lt(e, n) {
1037
+ function Tt(e, n) {
1035
1038
  return n === Te.Divergent ? Object.values(it).includes(e) : Object.values({
1036
1039
  ...ce,
1037
1040
  ...Ft,
@@ -1051,7 +1054,7 @@ function So(e, n) {
1051
1054
  const t = (n + 1) * 10;
1052
1055
  return `${e}-${t}`;
1053
1056
  }
1054
- function Ot(e, n, t) {
1057
+ function Lt(e, n, t) {
1055
1058
  switch (n) {
1056
1059
  default:
1057
1060
  case Te.Categorical:
@@ -1063,7 +1066,7 @@ function Ot(e, n, t) {
1063
1066
  }
1064
1067
  }
1065
1068
  function Co(e, n, t = No, o) {
1066
- return Lt(e, t) ? e : (o > 4 && (_e(me.ColorLoop), o = o % 5), Lt(n, t) ? Ot(n, t, o) : Ot(Ho(t), t, o));
1069
+ return Tt(e, t) ? e : (o > 4 && (_e(me.ColorLoop), o = o % 5), Tt(n, t) ? Lt(n, t, o) : Lt(Ho(t), t, o));
1067
1070
  }
1068
1071
  function Go(e) {
1069
1072
  return e.map((n) => xn(n) ? n : { value: n });
@@ -1097,26 +1100,26 @@ function mt(e, n, t, o, l) {
1097
1100
  }), a = Mn(12), i = v(() => {
1098
1101
  var p;
1099
1102
  return e.value.length > 5 && _e(me.DatasetLength), (p = e.value) == null ? void 0 : p.map(
1100
- (r, h) => {
1103
+ (r, m) => {
1101
1104
  if (jo(r))
1102
1105
  return r;
1103
- const g = Go(r.values), m = Co(
1106
+ const g = Go(r.values), f = Co(
1104
1107
  r.color,
1105
1108
  t == null ? void 0 : t.value,
1106
1109
  o == null ? void 0 : o.value.colorPalette,
1107
- h
1110
+ m
1108
1111
  );
1109
1112
  return {
1110
1113
  ...r,
1111
1114
  values: g,
1112
- color: m,
1115
+ color: f,
1113
1116
  __internal: !0
1114
1117
  };
1115
1118
  }
1116
1119
  );
1117
- }), s = v(() => Array.isArray(n.value) ? n.value : Je(e.value).map((p, r) => r));
1120
+ }), s = v(() => Array.isArray(n.value) ? n.value : Pt(e.value).map((p, r) => r));
1118
1121
  function c(p) {
1119
- const r = (l == null ? void 0 : l.value) === D.HORIZONTAL && Je(e).length * (((o == null ? void 0 : o.value.barHeight) || bt) * 2) + ((o == null ? void 0 : o.value.barHeight) || bt) || p.height;
1122
+ const r = (l == null ? void 0 : l.value) === D.HORIZONTAL && s.value.length * (((o == null ? void 0 : o.value.barHeight) || kt) * 2) + ((o == null ? void 0 : o.value.barHeight) || kt) || p.height;
1120
1123
  u.width = p.width, u.height = r;
1121
1124
  }
1122
1125
  return {
@@ -1138,54 +1141,55 @@ const Vo = () => ({
1138
1141
  }
1139
1142
  });
1140
1143
  function Po(e, n, t, o, l) {
1141
- const u = M(null), a = M(null);
1144
+ const u = B(null), a = B(null);
1142
1145
  function i() {
1146
+ var p, r, m, g;
1143
1147
  const { width: s, height: c } = t;
1144
- !s && !c || !n.value || !e.value || (o.value === D.HORIZONTAL ? (u.value = $t(
1148
+ !s && !c || (o.value === D.HORIZONTAL ? (u.value = (p = e.value) != null && p.length ? xt(
1145
1149
  e.value,
1146
1150
  s,
1147
1151
  o.value,
1148
1152
  l.value.startOnZero
1149
- ), a.value = xt(
1153
+ ) : null, a.value = (r = n.value) != null && r.length ? Ot(
1150
1154
  n.value,
1151
1155
  c,
1152
1156
  o.value,
1153
1157
  l.value
1154
- )) : (u.value = xt(
1158
+ ) : null) : (u.value = (m = n.value) != null && m.length ? Ot(
1155
1159
  n.value,
1156
1160
  s,
1157
1161
  o.value,
1158
1162
  l.value
1159
- ), a.value = $t(
1163
+ ) : null, a.value = (g = e.value) != null && g.length ? xt(
1160
1164
  e.value,
1161
1165
  c,
1162
1166
  o.value,
1163
1167
  l.value.startOnZero
1164
- )));
1168
+ ) : null));
1165
1169
  }
1166
- return Gt(i), { xScale: u, yScale: a };
1170
+ return Ct(i), { xScale: u, yScale: a };
1167
1171
  }
1168
- function xt(e, n, t, o) {
1172
+ function Ot(e, n, t, o) {
1169
1173
  const l = [0, n], { padding: u, paddingInner: a, paddingOuter: i } = o, s = u ?? (t === D.HORIZONTAL ? Zt : Wt);
1170
1174
  return Object.assign(
1171
1175
  He().range(l).paddingInner(a ?? s).paddingOuter(i ?? s).domain(e.map((c, p) => p)),
1172
1176
  { labels: e }
1173
1177
  );
1174
1178
  }
1175
- function $t(e, n, t, o) {
1176
- const l = Vt(e).filter((p) => p != null), u = [0, n];
1179
+ function xt(e, n, t, o) {
1180
+ const l = jt(e).filter((p) => p != null), u = [0, n];
1177
1181
  if (l.length === 0)
1178
1182
  return Me().range(u).domain([0, 0]).nice();
1179
1183
  const a = Math.min(...l), i = o && a > 0 ? 0 : a, s = Math.max(...l), c = t === D.HORIZONTAL ? [i, s] : [s, i];
1180
1184
  return Me().range(u).domain(c).nice();
1181
1185
  }
1182
- function It(e) {
1186
+ function $t(e) {
1183
1187
  return (e == null ? void 0 : e.range) !== void 0 || (e == null ? void 0 : e.copy) !== void 0;
1184
1188
  }
1185
1189
  function qe(e, n) {
1186
1190
  return ve(e) ? e.bandwidth() / 2 + e(e.domain()[n]) : e(n);
1187
1191
  }
1188
- function wt(e, n, {
1192
+ function It(e, n, {
1189
1193
  padding: t,
1190
1194
  paddingInner: o,
1191
1195
  paddingOuter: l
@@ -1199,7 +1203,7 @@ function Jt(e) {
1199
1203
  const Ne = (e, n = !0) => ({
1200
1204
  ...vt(e),
1201
1205
  ...Vo(),
1202
- ...Re(),
1206
+ ...Be(),
1203
1207
  classList: {
1204
1208
  type: [String, Array],
1205
1209
  default: () => []
@@ -1217,7 +1221,7 @@ const Ne = (e, n = !0) => ({
1217
1221
  } : {}
1218
1222
  }), Fo = (e) => ({
1219
1223
  ...vt(e),
1220
- ...Re(),
1224
+ ...Be(),
1221
1225
  hoveredElement: {
1222
1226
  type: [Number, String],
1223
1227
  default: null
@@ -1275,28 +1279,28 @@ const Ne = (e, n = !0) => ({
1275
1279
  },
1276
1280
  emits: ["click", "lume__internal--hover", "mouseover"],
1277
1281
  setup(e, { emit: n }) {
1278
- const t = e, o = n, { data: l, orientation: u, xScale: a, yScale: i } = ne(t), s = v(() => Je(l));
1282
+ const t = e, o = n, { data: l, orientation: u, xScale: a, yScale: i } = ne(t), s = v(() => Pt(l));
1279
1283
  function c(p) {
1280
- var T;
1281
- const r = u.value === D.HORIZONTAL ? i.value : a.value, h = r.domain(), g = $n(r), m = ((T = r.paddingInner) == null ? void 0 : T.call(r)) ?? 0, A = g * m, x = ve(r) ? r(h[p]) - A / 2 : r(p) - g / 2;
1284
+ var k;
1285
+ const r = u.value === D.HORIZONTAL ? i.value : a.value, m = r.domain(), g = $n(r), f = ((k = r.paddingInner) == null ? void 0 : k.call(r)) ?? 0, A = g * f, L = ve(r) ? r(m[p]) - A / 2 : r(p) - g / 2;
1282
1286
  return u.value === D.HORIZONTAL ? {
1283
1287
  width: Math.max(...a.value.range()),
1284
1288
  height: g,
1285
- transform: `translate(0, ${x})`
1289
+ transform: `translate(0, ${L})`
1286
1290
  } : {
1287
1291
  width: g,
1288
1292
  height: Math.max(...i.value.range()),
1289
- transform: `translate(${x}, 0)`
1293
+ transform: `translate(${L}, 0)`
1290
1294
  };
1291
1295
  }
1292
1296
  return (p, r) => (_(), $("g", zo, [
1293
- (_(!0), $(ee, null, W(s.value, (h, g) => (_(), J(d(dt), j(c(g), {
1297
+ (_(!0), $(ee, null, z(s.value, (m, g) => (_(), J(d(dt), j(c(g), {
1294
1298
  key: `overlay-${g}`,
1295
1299
  "data-j-lume-overlay-group": g,
1296
1300
  transition: !1,
1297
1301
  "class-list": "lume-fill--transparent",
1298
- onMouseover: (m) => o("lume__internal--hover", g),
1299
- onClick: (m) => o("click", { index: g, event: m })
1302
+ onMouseover: (f) => o("lume__internal--hover", g),
1303
+ onClick: (f) => o("click", { index: g, event: f })
1300
1304
  }), null, 16, ["data-j-lume-overlay-group", "onMouseover", "onClick"]))), 128))
1301
1305
  ]));
1302
1306
  }
@@ -1309,7 +1313,7 @@ const Ne = (e, n = !0) => ({
1309
1313
  };
1310
1314
  function Zo(e) {
1311
1315
  return { hasNegativeValues: v(
1312
- () => Vt(e.value).some((t) => t < 0)
1316
+ () => jt(e.value).some((t) => t < 0)
1313
1317
  ) };
1314
1318
  }
1315
1319
  function Uo(e, n, t, o) {
@@ -1350,7 +1354,7 @@ function Yo(e, n) {
1350
1354
  }
1351
1355
  ), []);
1352
1356
  }
1353
- const Et = {
1357
+ const wt = {
1354
1358
  "stacked-bar": Yo
1355
1359
  };
1356
1360
  function Qt(e, n, t, o, l, u, a, i) {
@@ -1362,13 +1366,13 @@ function Qt(e, n, t, o, l, u, a, i) {
1362
1366
  );
1363
1367
  function c(p) {
1364
1368
  var g;
1365
- const r = ((g = l == null ? void 0 : l.value) == null ? void 0 : g.length) ?? 0, h = i != null && i.value && Et[i.value] ? Et[i.value](
1369
+ const r = ((g = l == null ? void 0 : l.value) == null ? void 0 : g.length) ?? 0, m = i != null && i.value && wt[i.value] ? wt[i.value](
1366
1370
  p,
1367
1371
  r
1368
1372
  ) : Xo(p, r);
1369
- e.value = h.map((m, A) => ({
1370
- cx: (u == null ? void 0 : u.value) === D.HORIZONTAL ? t.value(m) : qe(t.value, A),
1371
- cy: (u == null ? void 0 : u.value) === D.HORIZONTAL ? qe(o.value, A) : o.value(m)
1373
+ e.value = m.map((f, A) => ({
1374
+ cx: (u == null ? void 0 : u.value) === D.HORIZONTAL ? t.value(f) : qe(t.value, A),
1375
+ cy: (u == null ? void 0 : u.value) === D.HORIZONTAL ? qe(o.value, A) : o.value(f)
1372
1376
  }));
1373
1377
  }
1374
1378
  return K(
@@ -1422,22 +1426,22 @@ function Qo(e) {
1422
1426
  function qo(e) {
1423
1427
  return !e || e === "auto" || e.right == null || e.right === "auto" ? tt : e.right;
1424
1428
  }
1425
- function ea(e, n) {
1429
+ function el(e, n) {
1426
1430
  return !e || e === "auto" || e.bottom == null || e.bottom === "auto" ? n || nt : e.bottom;
1427
1431
  }
1428
- function ta(e, n) {
1432
+ function tl(e, n) {
1429
1433
  return !e || e === "auto" || e.left == null || e.left === "auto" ? n || ot : e.left;
1430
1434
  }
1431
- const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-section" }, aa = {
1435
+ const nl = { class: "lume-chart__header" }, ol = { class: "lume-chart__header-section" }, ll = {
1432
1436
  key: 0,
1433
1437
  class: "lume-chart__title lume-chart-title lume-typography--display"
1434
- }, la = { class: "lume-chart__controls" }, ua = { class: "lume-chart__header-section" }, ra = {
1438
+ }, al = { class: "lume-chart__controls" }, ul = { class: "lume-chart__header-section" }, rl = {
1435
1439
  key: 0,
1436
1440
  class: "lume-chart__axis-title lume-axis-title lume-typography--body"
1437
- }, ia = { key: 3 }, sa = ["r"], ca = {
1441
+ }, il = { key: 3 }, sl = ["r"], cl = {
1438
1442
  key: 0,
1439
1443
  class: "lume-chart__axis-title lume-chart__axis-title--centered lume-axis-title lume-typography--body"
1440
- }, da = /* @__PURE__ */ Z({
1444
+ }, dl = /* @__PURE__ */ Z({
1441
1445
  __name: "lume-chart",
1442
1446
  props: {
1443
1447
  ...Ne(),
@@ -1447,212 +1451,212 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
1447
1451
  }
1448
1452
  },
1449
1453
  setup(e, { emit: n }) {
1450
- const t = e, o = ie(), l = n, { data: u, labels: a, color: i, options: s, orientation: c, chartType: p } = ne(t), r = M(-1), h = M(null), g = M(null), m = M([]), A = M(null), x = M(0), T = M(0), { allOptions: f } = pe(s), { internalData: O, computedLabels: N, containerSize: E, updateSize: F, chartID: w } = mt(u, a, i, f, c), { xScale: C, yScale: U } = Po(
1451
- O,
1452
- N,
1454
+ const t = e, o = ie(), l = n, { data: u, labels: a, color: i, options: s, orientation: c, chartType: p } = ne(t), r = B(-1), m = B(null), g = B(null), f = B([]), A = B(null), L = B(0), k = B(0), { allOptions: h } = fe(s), { internalData: x, computedLabels: E, containerSize: N, updateSize: F, chartID: w } = mt(u, a, i, h, c), { xScale: C, yScale: U } = Po(
1455
+ x,
1453
1456
  E,
1457
+ N,
1454
1458
  c,
1455
- f
1459
+ h
1456
1460
  ), X = v(() => ({
1457
- top: Qo(f.value.margins),
1458
- right: qo(f.value.margins),
1459
- bottom: ea(f.value.margins, x.value),
1460
- left: ta(f.value.margins, T.value)
1461
+ top: Qo(h.value.margins),
1462
+ right: qo(h.value.margins),
1463
+ bottom: el(h.value.margins, L.value),
1464
+ left: tl(h.value.margins, k.value)
1461
1465
  })), q = v(() => {
1462
- var L;
1463
- return t.xScale ? It(t.xScale) ? t.xScale : (L = t.xScale) == null ? void 0 : L.call(t, O.value, a.value, E) : C.value;
1466
+ var O;
1467
+ return t.xScale ? $t(t.xScale) ? t.xScale : (O = t.xScale) == null ? void 0 : O.call(t, x.value, a.value, N) : C.value;
1464
1468
  }), P = v(() => {
1465
- var L;
1466
- return t.yScale ? It(t.yScale) ? t.yScale : (L = t.yScale) == null ? void 0 : L.call(t, O.value, a.value, E) : U.value;
1469
+ var O;
1470
+ return t.yScale ? $t(t.yScale) ? t.yScale : (O = t.yScale) == null ? void 0 : O.call(t, x.value, a.value, N) : U.value;
1467
1471
  }), re = v(() => ({
1468
- ...f.value.xAxisOptions,
1472
+ ...h.value.xAxisOptions,
1469
1473
  withHover: c.value === D.VERTICAL
1470
1474
  })), xe = v(() => ({
1471
- ...f.value.yAxisOptions,
1475
+ ...h.value.yAxisOptions,
1472
1476
  withHover: c.value === D.HORIZONTAL
1473
1477
  })), be = v(() => {
1474
- var L;
1475
- return (L = f.value.xAxisOptions) == null ? void 0 : L.title;
1478
+ var O;
1479
+ return (O = h.value.xAxisOptions) == null ? void 0 : O.title;
1476
1480
  }), R = v(() => {
1477
- var L;
1478
- return (L = f.value.yAxisOptions) == null ? void 0 : L.title;
1481
+ var O;
1482
+ return (O = h.value.yAxisOptions) == null ? void 0 : O.title;
1479
1483
  }), H = v(() => {
1480
- var L;
1481
- return ((L = f.value.xAxisOptions) == null ? void 0 : L.withTitle) !== !1 && be.value;
1482
- }), k = v(() => {
1483
- var L;
1484
- return ((L = f.value.yAxisOptions) == null ? void 0 : L.withTitle) !== !1 && R.value;
1485
- }), B = v(
1486
- () => u.value.every((L) => !L.values.length)
1484
+ var O;
1485
+ return ((O = h.value.xAxisOptions) == null ? void 0 : O.withTitle) !== !1 && be.value;
1486
+ }), b = v(() => {
1487
+ var O;
1488
+ return ((O = h.value.yAxisOptions) == null ? void 0 : O.withTitle) !== !1 && R.value;
1489
+ }), M = v(
1490
+ () => u.value.every((O) => !O.values.length)
1487
1491
  ), y = v(() => {
1488
- const L = [], { noBaseScales: b } = f.value;
1489
- return b || L.push(() => !!(q.value && P.value)), L.every((I) => I() === !0);
1490
- }), { hasNegativeValues: Y } = Zo(O), { negativeBarAttributes: Q } = Uo(
1491
- E,
1492
+ const O = [], { noBaseScales: T } = h.value;
1493
+ return !T && !M.value && O.push(() => !!(q.value && P.value)), O.every((I) => I() === !0);
1494
+ }), { hasNegativeValues: Y } = Zo(x), { negativeBarAttributes: Q } = Uo(
1495
+ N,
1492
1496
  q,
1493
1497
  P,
1494
1498
  c
1495
1499
  ), { shouldGenerateTooltipAnchors: ue } = Qt(
1496
- m,
1497
1500
  f,
1501
+ h,
1498
1502
  q,
1499
1503
  P,
1500
1504
  a,
1501
1505
  c,
1502
- O,
1506
+ x,
1503
1507
  p
1504
- ), { tooltipConfig: $e, showTooltip: We, hideTooltip: Ze } = Ko(), { getTooltipItems: Ie } = Jo(O), Ge = v(
1505
- () => f.value.withTooltip !== !1 && $e.opened
1508
+ ), { tooltipConfig: $e, showTooltip: We, hideTooltip: Ze } = Ko(), { getTooltipItems: Ie } = Jo(x), Ce = v(
1509
+ () => h.value.withTooltip !== !1 && $e.opened
1506
1510
  ), Ae = v(
1507
1511
  () => {
1508
- var L;
1509
- return ((L = f.value.tooltipOptions) == null ? void 0 : L.position) || "top";
1512
+ var O;
1513
+ return ((O = h.value.tooltipOptions) == null ? void 0 : O.position) || "top";
1510
1514
  }
1511
- ), ln = v(() => {
1512
- var b;
1513
- const L = (b = f.value.tooltipOptions) == null ? void 0 : b.withPointerEvents;
1514
- return $e.opened && (!L || L && A.value === !1);
1515
+ ), an = v(() => {
1516
+ var T;
1517
+ const O = (T = h.value.tooltipOptions) == null ? void 0 : T.withPointerEvents;
1518
+ return $e.opened && (!O || O && A.value === !1);
1515
1519
  });
1516
- function je(L) {
1520
+ function Ge(O) {
1517
1521
  var I;
1518
- if (L === r.value)
1522
+ if (O === r.value)
1519
1523
  return;
1520
- const b = r.value;
1521
- if (f.value.withHover !== !1 && (r.value = L), f.value.withTooltip !== !1) {
1522
- const Ue = (I = f.value.tooltipOptions) != null && I.targetElement ? f.value.tooltipOptions.targetElement === "self" ? g.value.$el : f.value.tooltipOptions.targetElement : h.value[L];
1523
- We(Ue);
1524
+ const T = r.value;
1525
+ if (h.value.withHover !== !1 && (r.value = O), h.value.withTooltip !== !1) {
1526
+ const Xe = (I = h.value.tooltipOptions) != null && I.targetElement ? h.value.tooltipOptions.targetElement === "self" ? g.value.$el : h.value.tooltipOptions.targetElement : m.value[O];
1527
+ We(Xe);
1524
1528
  }
1525
- l("hovered-index-changed", { newIndex: L, oldIndex: b });
1529
+ l("hovered-index-changed", { newIndex: O, oldIndex: T });
1526
1530
  }
1527
- function ft() {
1531
+ function Ue() {
1528
1532
  Ze(), r.value = -1;
1529
1533
  }
1530
- function ht(L) {
1534
+ function pt(O) {
1531
1535
  if (!u.value.some(
1532
- ({ values: I }) => L <= I.length - 1
1536
+ ({ values: I }) => O <= I.length - 1
1533
1537
  )) {
1534
1538
  _e(me.InvalidHoveredIndex);
1535
1539
  return;
1536
1540
  }
1537
- je(L);
1541
+ O == null || O === -1 ? Ue() : Ge(O);
1538
1542
  }
1539
1543
  function un() {
1540
1544
  setTimeout(() => {
1541
- ln.value && ft(), l("chart-mouseleave");
1545
+ an.value && Ue(), l("chart-mouseleave");
1542
1546
  }, 0);
1543
1547
  }
1544
- function gt({ index: L, value: b, event: I }) {
1545
- L !== null && je(L), l("axis-mouseenter", { index: L, value: b, event: I });
1548
+ function ht({ index: O, value: T, event: I }) {
1549
+ O !== null && Ge(O), l("axis-mouseenter", { index: O, value: T, event: I });
1546
1550
  }
1547
- function _t({ index: L, value: b, event: I }) {
1548
- l("axis-click", { index: L, value: b, event: I });
1551
+ function gt({ index: O, value: T, event: I }) {
1552
+ l("axis-click", { index: O, value: T, event: I });
1549
1553
  }
1550
1554
  return K(
1551
1555
  u,
1552
- (L, b) => l("data-changed", { newValue: L, oldValue: b })
1556
+ (O, T) => l("data-changed", { newValue: O, oldValue: T })
1553
1557
  ), K(
1554
1558
  a,
1555
- (L, b) => l("labels-changed", { newValue: L, oldValue: b })
1556
- ), K(B, (L) => L && _e(me.Empty), { immediate: !0 }), K(() => t.hoveredIndex, ht), K(
1557
- m,
1558
- (L) => {
1559
- L && t.hoveredIndex != null && r.value === -1 && ht(t.hoveredIndex);
1559
+ (O, T) => l("labels-changed", { newValue: O, oldValue: T })
1560
+ ), K(M, (O) => O && _e(me.Empty), { immediate: !0 }), K(() => t.hoveredIndex, pt), K(
1561
+ f,
1562
+ (O) => {
1563
+ O && t.hoveredIndex != null && r.value === -1 && pt(t.hoveredIndex);
1560
1564
  },
1561
1565
  { flush: "post" }
1562
- ), K(A, (L) => {
1563
- L === !1 && $e.opened && ft();
1566
+ ), K(A, (O) => {
1567
+ O === !1 && $e.opened && Ue();
1564
1568
  }), ye(async () => {
1565
1569
  l("rendered"), o.groups || console.error('"groups" `<slot>` must have content.');
1566
- }), Xe("chartID", w), Xe("isEmpty", B), Xe("tooltipAnchorAttributes", m), (L, b) => (_(), J(d(uo), {
1570
+ }), Ye("chartID", w), Ye("isEmpty", M), Ye("tooltipAnchorAttributes", f), (O, T) => (_(), J(d(uo), {
1567
1571
  id: `lume-chart_${d(w)}`,
1568
1572
  ref_key: "chartContainer",
1569
1573
  ref: g,
1570
1574
  margins: X.value,
1571
- "container-size": d(E),
1572
- "no-min-size": d(f).noMinSize,
1573
- "transparent-background": d(f).transparentBackground,
1575
+ "container-size": d(N),
1576
+ "no-min-size": d(h).noMinSize,
1577
+ "transparent-background": d(h).transparentBackground,
1574
1578
  "data-j-lume-chart": "",
1575
1579
  onResize: d(F),
1576
- onClick: b[24] || (b[24] = (I) => l("chart-click", I)),
1577
- onMouseenter: b[25] || (b[25] = (I) => l("chart-mouseenter", I)),
1580
+ onClick: T[24] || (T[24] = (I) => l("chart-click", I)),
1581
+ onMouseenter: T[25] || (T[25] = (I) => l("chart-mouseenter", I)),
1578
1582
  onMouseleave: un
1579
1583
  }, {
1580
1584
  header: V(() => [
1581
- G("div", na, [
1582
- G("div", oa, [
1583
- L.title ? (_(), $("h1", aa, ae(L.title), 1)) : z("", !0),
1584
- G("div", la, [
1585
- S(L.$slots, "controls", {}, void 0, !0)
1585
+ G("div", nl, [
1586
+ G("div", ol, [
1587
+ O.title ? (_(), $("h1", ll, le(O.title), 1)) : W("", !0),
1588
+ G("div", al, [
1589
+ S(O.$slots, "controls", {}, void 0, !0)
1586
1590
  ])
1587
1591
  ]),
1588
- G("div", ua, [
1589
- k.value ? (_(), $("h3", ra, ae(R.value), 1)) : z("", !0),
1590
- S(L.$slots, "legend", { data: d(O) }, () => [
1591
- d(f).withLegend !== !1 && d(f).legendPosition !== "bottom" ? (_(), J(d(Tt), {
1592
+ G("div", ul, [
1593
+ b.value ? (_(), $("h3", rl, le(R.value), 1)) : W("", !0),
1594
+ S(O.$slots, "legend", { data: d(x) }, () => [
1595
+ d(h).withLegend !== !1 && d(h).legendPosition !== "bottom" ? (_(), J(d(At), {
1592
1596
  key: 0,
1593
- data: d(O),
1597
+ data: d(x),
1594
1598
  class: "lume-chart__legend",
1595
1599
  "data-j-lume-chart__legend": "",
1596
- onClick: b[0] || (b[0] = (I) => l("legend-click", I)),
1597
- onMouseenter: b[1] || (b[1] = (I) => l("legend-mouseenter", I)),
1598
- onMouseleave: b[2] || (b[2] = (I) => l("legend-mouseleave"))
1599
- }, null, 8, ["data"])) : z("", !0)
1600
+ onClick: T[0] || (T[0] = (I) => l("legend-click", I)),
1601
+ onMouseenter: T[1] || (T[1] = (I) => l("legend-mouseenter", I)),
1602
+ onMouseleave: T[2] || (T[2] = (I) => l("legend-mouseleave"))
1603
+ }, null, 8, ["data"])) : W("", !0)
1600
1604
  ], !0)
1601
1605
  ])
1602
1606
  ])
1603
1607
  ]),
1604
1608
  footer: V(() => [
1605
- H.value ? (_(), $("h3", ca, ae(be.value), 1)) : z("", !0),
1606
- d(f).withLegend !== !1 && d(f).legendPosition == "bottom" ? (_(), J(d(Tt), {
1609
+ H.value ? (_(), $("h3", cl, le(be.value), 1)) : W("", !0),
1610
+ d(h).withLegend !== !1 && d(h).legendPosition == "bottom" ? (_(), J(d(At), {
1607
1611
  key: 1,
1608
- data: d(O),
1612
+ data: d(x),
1609
1613
  class: "lume-chart__legend lume-chart__legend--bottom",
1610
1614
  "data-j-lume-chart__legend": "",
1611
- onClick: b[16] || (b[16] = (I) => l("legend-click", I)),
1612
- onMouseenter: b[17] || (b[17] = (I) => l("legend-mouseenter", I)),
1613
- onMouseleave: b[18] || (b[18] = (I) => l("legend-mouseleave"))
1614
- }, null, 8, ["data"])) : z("", !0)
1615
+ onClick: T[16] || (T[16] = (I) => l("legend-click", I)),
1616
+ onMouseenter: T[17] || (T[17] = (I) => l("legend-mouseenter", I)),
1617
+ onMouseleave: T[18] || (T[18] = (I) => l("legend-mouseleave"))
1618
+ }, null, 8, ["data"])) : W("", !0)
1615
1619
  ]),
1616
1620
  extra: V(() => [
1617
- S(L.$slots, "tooltip", j(d($e), {
1618
- data: d(O),
1619
- labels: d(N),
1620
- title: d(N)[r.value],
1621
+ S(O.$slots, "tooltip", j(d($e), {
1622
+ data: d(x),
1623
+ labels: d(E),
1624
+ title: d(E)[r.value],
1621
1625
  items: d(Ie)(r.value),
1622
1626
  position: Ae.value,
1623
- withTooltip: d(f).withTooltip !== !1,
1627
+ withTooltip: d(h).withTooltip !== !1,
1624
1628
  hoveredIndex: r.value,
1625
1629
  handleMouseEnter: () => A.value = !0,
1626
1630
  handleMouseLeave: () => A.value = !1,
1627
- options: d(f).tooltipOptions
1631
+ options: d(h).tooltipOptions
1628
1632
  }), () => [
1629
- Ge.value ? (_(), J(d(Eo), j({ key: 0 }, d($e), {
1633
+ Ce.value ? (_(), J(d(Eo), j({ key: 0 }, d($e), {
1630
1634
  position: Ae.value,
1631
- title: d(N)[r.value],
1635
+ title: d(E)[r.value],
1632
1636
  items: d(Ie)(r.value),
1633
- options: d(f).tooltipOptions,
1637
+ options: d(h).tooltipOptions,
1634
1638
  "data-j-lume-chart__tooltip": "",
1635
- onOpened: b[19] || (b[19] = (I) => l("tooltip-opened", {
1639
+ onOpened: T[19] || (T[19] = (I) => l("tooltip-opened", {
1636
1640
  index: r.value,
1637
1641
  targetElement: I
1638
1642
  })),
1639
- onMoved: b[20] || (b[20] = (I) => l("tooltip-moved", {
1643
+ onMoved: T[20] || (T[20] = (I) => l("tooltip-moved", {
1640
1644
  index: r.value,
1641
1645
  targetElement: I
1642
1646
  })),
1643
- onClosed: b[21] || (b[21] = (I) => l("tooltip-closed")),
1644
- onTooltipMouseenter: b[22] || (b[22] = (I) => A.value = !0),
1645
- onTooltipMouseleave: b[23] || (b[23] = (I) => A.value = !1)
1647
+ onClosed: T[21] || (T[21] = (I) => l("tooltip-closed")),
1648
+ onTooltipMouseenter: T[22] || (T[22] = (I) => A.value = !0),
1649
+ onTooltipMouseleave: T[23] || (T[23] = (I) => A.value = !1)
1646
1650
  }), {
1647
1651
  default: V(() => [
1648
- S(L.$slots, "tooltip-content", {
1649
- data: d(O),
1650
- labels: d(N),
1652
+ S(O.$slots, "tooltip-content", {
1653
+ data: d(x),
1654
+ labels: d(E),
1651
1655
  hoveredIndex: r.value
1652
1656
  }, void 0, !0)
1653
1657
  ]),
1654
1658
  _: 3
1655
- }, 16, ["position", "title", "items", "options"])) : z("", !0)
1659
+ }, 16, ["position", "title", "items", "options"])) : W("", !0)
1656
1660
  ], !0)
1657
1661
  ]),
1658
1662
  default: V(() => [
@@ -1661,90 +1665,90 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
1661
1665
  "class-list": "lume-fill--negative",
1662
1666
  transition: !1,
1663
1667
  "data-j-lume-chart__negative-values": ""
1664
- }), null, 16)) : z("", !0),
1665
- d(f).withAxes !== !1 ? S(L.$slots, "axes", {
1668
+ }), null, 16)) : W("", !0),
1669
+ d(h).withAxes !== !1 ? S(O.$slots, "axes", {
1666
1670
  key: 1,
1667
1671
  xScale: q.value,
1668
1672
  yScale: P.value,
1669
- containerSize: d(E),
1670
- options: d(f),
1673
+ containerSize: d(N),
1674
+ options: d(h),
1671
1675
  hoveredIndex: r.value
1672
1676
  }, () => [
1673
- se(d(At), {
1677
+ se(d(bt), {
1674
1678
  type: "x",
1675
1679
  scale: q.value,
1676
- "container-size": d(E),
1680
+ "container-size": d(N),
1677
1681
  options: re.value,
1678
1682
  "hovered-index": r.value,
1679
1683
  orientation: d(c),
1680
1684
  "data-j-lume-chart__x-axis": "",
1681
- onClick: _t,
1682
- onMouseenter: gt,
1683
- onMouseleave: b[3] || (b[3] = (I) => l("axis-mouseleave")),
1684
- "onLume__internal-AxisSize": b[4] || (b[4] = (I) => x.value = I)
1685
+ onClick: gt,
1686
+ onMouseenter: ht,
1687
+ onMouseleave: T[3] || (T[3] = (I) => l("axis-mouseleave")),
1688
+ "onLume__internal-AxisSize": T[4] || (T[4] = (I) => L.value = I)
1685
1689
  }, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"]),
1686
- se(d(At), {
1690
+ se(d(bt), {
1687
1691
  type: "y",
1688
1692
  scale: P.value,
1689
- "container-size": d(E),
1693
+ "container-size": d(N),
1690
1694
  options: xe.value,
1691
1695
  "hovered-index": r.value,
1692
1696
  orientation: d(c),
1693
1697
  "data-j-lume-chart__y-axis": "",
1694
- onClick: _t,
1695
- onMouseenter: gt,
1696
- onMouseleave: b[5] || (b[5] = (I) => l("axis-mouseleave")),
1697
- "onLume__internal-AxisSize": b[6] || (b[6] = (I) => T.value = I)
1698
+ onClick: gt,
1699
+ onMouseenter: ht,
1700
+ onMouseleave: T[5] || (T[5] = (I) => l("axis-mouseleave")),
1701
+ "onLume__internal-AxisSize": T[6] || (T[6] = (I) => k.value = I)
1698
1702
  }, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"])
1699
- ], !0) : z("", !0),
1700
- d(f).withHover !== !1 ? (_(), J(d(Wo), {
1703
+ ], !0) : W("", !0),
1704
+ d(h).withHover !== !1 ? (_(), J(d(Wo), {
1701
1705
  key: 2,
1702
- data: d(O),
1706
+ data: d(x),
1703
1707
  orientation: d(c),
1704
1708
  "x-scale": q.value,
1705
1709
  "y-scale": P.value,
1706
1710
  "data-j-lume-chart__overlay-group": "",
1707
- "onLume__internal-Hover": je
1708
- }, null, 8, ["data", "orientation", "x-scale", "y-scale"])) : z("", !0),
1709
- d(ue) ? (_(), $("g", ia, [
1710
- (_(!0), $(ee, null, W(m.value, (I, Ue) => (_(), $("circle", j(I, {
1711
+ "onLume__internal-Hover": Ge
1712
+ }, null, 8, ["data", "orientation", "x-scale", "y-scale"])) : W("", !0),
1713
+ d(ue) ? (_(), $("g", il, [
1714
+ (_(!0), $(ee, null, z(f.value, (I, Xe) => (_(), $("circle", j(I, {
1711
1715
  ref_for: !0,
1712
1716
  ref_key: "tooltipAnchor",
1713
- ref: h,
1714
- key: `anchor_${Ue}`,
1717
+ ref: m,
1718
+ key: `anchor_${Xe}`,
1715
1719
  r: d(Gn),
1716
1720
  class: "lume-fill--transparent"
1717
- }), null, 16, sa))), 128))
1718
- ])) : z("", !0),
1719
- S(L.$slots, "groups", {
1720
- data: d(O),
1721
- labels: d(N),
1722
- options: d(f),
1721
+ }), null, 16, sl))), 128))
1722
+ ])) : W("", !0),
1723
+ S(O.$slots, "groups", {
1724
+ data: d(x),
1725
+ labels: d(E),
1726
+ options: d(h),
1723
1727
  orientation: d(c),
1724
1728
  xScale: q.value,
1725
1729
  yScale: P.value,
1726
1730
  hoveredIndex: r.value,
1727
- containerSize: d(E),
1728
- transition: d(f).withTransition !== !1,
1729
- classList: L.classList,
1730
- onNodeClick: b[7] || (b[7] = (I) => l("node-click", I)),
1731
- onNodeMouseenter: b[8] || (b[8] = (I) => l("node-mouseenter", I)),
1732
- onNodeMouseleave: b[9] || (b[9] = (I) => l("node-mouseleave", I)),
1733
- onLinkClick: b[10] || (b[10] = (I) => l("link-click", I)),
1734
- onLinkMouseenter: b[11] || (b[11] = (I) => l("link-mouseenter", I)),
1735
- onLinkMouseleave: b[12] || (b[12] = (I) => l("link-mouseleave", I)),
1736
- onBarClick: b[13] || (b[13] = (I) => l("bar-click", I)),
1737
- onLineClick: b[14] || (b[14] = (I) => l("line-click", I)),
1738
- onPointClick: b[15] || (b[15] = (I) => l("point-click", I)),
1739
- "onLume__internal-Hover": je
1731
+ containerSize: d(N),
1732
+ transition: d(h).withTransition !== !1,
1733
+ classList: O.classList,
1734
+ onNodeClick: T[7] || (T[7] = (I) => l("node-click", I)),
1735
+ onNodeMouseenter: T[8] || (T[8] = (I) => l("node-mouseenter", I)),
1736
+ onNodeMouseleave: T[9] || (T[9] = (I) => l("node-mouseleave", I)),
1737
+ onLinkClick: T[10] || (T[10] = (I) => l("link-click", I)),
1738
+ onLinkMouseenter: T[11] || (T[11] = (I) => l("link-mouseenter", I)),
1739
+ onLinkMouseleave: T[12] || (T[12] = (I) => l("link-mouseleave", I)),
1740
+ onBarClick: T[13] || (T[13] = (I) => l("bar-click", I)),
1741
+ onLineClick: T[14] || (T[14] = (I) => l("line-click", I)),
1742
+ onPointClick: T[15] || (T[15] = (I) => l("point-click", I)),
1743
+ "onLume__internal-Hover": Ge
1740
1744
  }, void 0, !0)
1741
- ], 64)) : z("", !0)
1745
+ ], 64)) : W("", !0)
1742
1746
  ]),
1743
1747
  _: 3
1744
1748
  }, 8, ["id", "margins", "container-size", "no-min-size", "transparent-background", "onResize"]));
1745
1749
  }
1746
1750
  });
1747
- const De = /* @__PURE__ */ te(da, [["__scopeId", "data-v-15099487"]]), Nt = 8, va = 8, ma = 20, Ee = 2, Dt = 2, pa = ["dy", "dominant-baseline"], fa = ["y", "x", "width", "height"], ha = { class: "lume-alluvial-group__label-wrapper" }, ga = /* @__PURE__ */ Z({
1751
+ const De = /* @__PURE__ */ te(dl, [["__scopeId", "data-v-84133075"]]), Et = 8, vl = 8, ml = 20, Ee = 2, Nt = 2, fl = ["dy", "dominant-baseline"], pl = ["y", "x", "width", "height"], hl = { class: "lume-alluvial-group__label-wrapper" }, gl = /* @__PURE__ */ Z({
1748
1752
  __name: "lume-alluvial-node-label",
1749
1753
  props: {
1750
1754
  bottom: { type: Boolean, default: !1 },
@@ -1753,19 +1757,19 @@ const De = /* @__PURE__ */ te(da, [["__scopeId", "data-v-15099487"]]), Nt = 8, v
1753
1757
  },
1754
1758
  emits: ["lume__internal--node-resize"],
1755
1759
  setup(e, { emit: n }) {
1756
- const t = e, o = n, l = M(null), u = M(t.maxWidth), a = M(1);
1760
+ const t = e, o = n, l = B(null), u = B(t.maxWidth), a = B(1);
1757
1761
  return K(
1758
1762
  [l, () => t.maxWidth],
1759
1763
  async ([i, s]) => {
1760
1764
  if (i && s) {
1761
- u.value = s, await yt();
1765
+ u.value = s, await _t();
1762
1766
  const { width: c, height: p } = i.getBoundingClientRect();
1763
- u.value = c + Dt > s ? s : c + Dt, a.value = Math.ceil(p);
1767
+ u.value = c + Nt > s ? s : c + Nt, a.value = Math.ceil(p);
1764
1768
  }
1765
1769
  },
1766
1770
  { immediate: !0 }
1767
1771
  ), K(u, async (i) => {
1768
- i !== t.maxWidth && (await yt(), o("lume__internal--node-resize"));
1772
+ i !== t.maxWidth && (await _t(), o("lume__internal--node-resize"));
1769
1773
  }), (i, s) => e.maxWidth ? (_(), $("foreignObject", {
1770
1774
  key: 1,
1771
1775
  class: "lume-alluvial-group__node-foreign",
@@ -1774,7 +1778,7 @@ const De = /* @__PURE__ */ te(da, [["__scopeId", "data-v-15099487"]]), Nt = 8, v
1774
1778
  width: u.value,
1775
1779
  height: a.value
1776
1780
  }, [
1777
- G("div", ha, [
1781
+ G("div", hl, [
1778
1782
  G("span", {
1779
1783
  ref_key: "text",
1780
1784
  ref: l,
@@ -1783,17 +1787,17 @@ const De = /* @__PURE__ */ te(da, [["__scopeId", "data-v-15099487"]]), Nt = 8, v
1783
1787
  S(i.$slots, "default", {}, void 0, !0)
1784
1788
  ], 512)
1785
1789
  ])
1786
- ], 8, fa)) : (_(), $("text", {
1790
+ ], 8, pl)) : (_(), $("text", {
1787
1791
  key: 0,
1788
1792
  class: "lume-alluvial-group__node-label",
1789
1793
  dy: e.bottom ? ".2em" : "-.2em",
1790
1794
  "dominant-baseline": e.bottom ? "hanging" : "auto"
1791
1795
  }, [
1792
1796
  S(i.$slots, "default", {}, void 0, !0)
1793
- ], 8, pa));
1797
+ ], 8, fl));
1794
1798
  }
1795
1799
  });
1796
- const _a = /* @__PURE__ */ te(ga, [["__scopeId", "data-v-7126dfdb"]]), ya = ["y", "dominant-baseline"], ka = /* @__PURE__ */ Z({
1800
+ const _l = /* @__PURE__ */ te(gl, [["__scopeId", "data-v-7126dfdb"]]), yl = ["y", "dominant-baseline"], kl = /* @__PURE__ */ Z({
1797
1801
  __name: "lume-alluvial-node-value",
1798
1802
  props: {
1799
1803
  bottom: { type: Boolean, default: !0 }
@@ -1805,11 +1809,11 @@ const _a = /* @__PURE__ */ te(ga, [["__scopeId", "data-v-7126dfdb"]]), ya = ["y"
1805
1809
  "dominant-baseline": e.bottom ? "hanging" : "auto"
1806
1810
  }, [
1807
1811
  S(n.$slots, "default", {}, void 0, !0)
1808
- ], 8, ya));
1812
+ ], 8, yl));
1809
1813
  }
1810
1814
  });
1811
- const ba = /* @__PURE__ */ te(ka, [["__scopeId", "data-v-b4fc758b"]]);
1812
- function Ht(e, n) {
1815
+ const bl = /* @__PURE__ */ te(kl, [["__scopeId", "data-v-b4fc758b"]]);
1816
+ function Dt(e, n) {
1813
1817
  return {
1814
1818
  x0: 0 + (n ? n.left : 0),
1815
1819
  y0: 0 + (n ? n.top : 0),
@@ -1817,32 +1821,32 @@ function Ht(e, n) {
1817
1821
  y1: e.height - (n ? n.bottom : 0)
1818
1822
  };
1819
1823
  }
1820
- function Aa(e) {
1821
- const n = M(Ht(e));
1824
+ function Al(e) {
1825
+ const n = B(Dt(e));
1822
1826
  function t(o) {
1823
- n.value = Ht(e, o);
1827
+ n.value = Dt(e, o);
1824
1828
  }
1825
1829
  return { extents: n, updateExtents: t };
1826
1830
  }
1827
1831
  var qt = /* @__PURE__ */ ((e) => (e.GraphProblem = "There was an issue generating your alluvial graph.", e))(qt || {});
1828
- const Ta = "[lume] ";
1829
- function La(e, n, t = !0) {
1830
- t && jt() || console.error(Ta + "Error: " + e, n);
1832
+ const Tl = "[lume] ";
1833
+ function Ll(e, n, t = !0) {
1834
+ t && Gt() || console.error(Tl + "Error: " + e, n);
1831
1835
  }
1832
- const Oa = 200;
1836
+ const Ol = 200;
1833
1837
  function we(e) {
1834
1838
  return typeof e == "string" || typeof e == "number" ? e : e.id ?? e.label;
1835
1839
  }
1836
- function xa(e, n) {
1840
+ function xl(e, n) {
1837
1841
  return n.nodes.find((t) => t.id === e);
1838
1842
  }
1839
- function $a(e, n) {
1843
+ function $l(e, n) {
1840
1844
  return n.links.find((t) => t.id === e);
1841
1845
  }
1842
1846
  function en(e) {
1843
1847
  return !!(e.sourceLinks && e.targetLinks);
1844
1848
  }
1845
- function Ia(e, n) {
1849
+ function Il(e, n) {
1846
1850
  if (!n)
1847
1851
  return;
1848
1852
  const t = e.nodes.filter((a) => a.targetLinks.length === 0).map((a) => `${a.id}`), o = e.nodes.filter((a) => a.sourceLinks.length === 0).map((a) => `${a.id}`), l = n.filter((a) => t.includes(a.dataset.id)).reduce(
@@ -1859,7 +1863,7 @@ function Ia(e, n) {
1859
1863
  bottom: 0
1860
1864
  };
1861
1865
  }
1862
- function wa(e) {
1866
+ function wl(e) {
1863
1867
  return e.map((n) => {
1864
1868
  const t = n.y1 - n.y0 < Ee;
1865
1869
  return {
@@ -1869,35 +1873,35 @@ function wa(e) {
1869
1873
  width: n.x1 - n.x0,
1870
1874
  height: t ? Ee : n.y1 - n.y0,
1871
1875
  textTransform: {
1872
- x: n.depth > 0 ? n.x1 + Nt : n.x0 - Nt,
1876
+ x: n.depth > 0 ? n.x1 + Et : n.x0 - Et,
1873
1877
  y: (n.y1 + n.y0) / 2
1874
1878
  },
1875
1879
  node: n
1876
1880
  };
1877
1881
  });
1878
1882
  }
1879
- function Ea(e) {
1883
+ function El(e) {
1880
1884
  return [e.source.x1, e.y0];
1881
1885
  }
1882
- function Na(e) {
1886
+ function Nl(e) {
1883
1887
  return [e.target.x0, e.y1];
1884
1888
  }
1885
- function Da(e) {
1886
- return e.curveFunction ? fn(e.curveFunction).source(Ea).target(Na) : yn();
1889
+ function Dl(e) {
1890
+ return e.curveFunction ? pn(e.curveFunction).source(El).target(Nl) : yn();
1887
1891
  }
1888
- function Ha(e) {
1892
+ function Hl(e) {
1889
1893
  return e.map((n) => {
1890
1894
  var t;
1891
1895
  return {
1892
1896
  id: n.id,
1893
- color: n.color || ((t = n.source) == null ? void 0 : t.color) || Ce,
1894
- d: Da(n)(n),
1897
+ color: n.color || ((t = n.source) == null ? void 0 : t.color) || Se,
1898
+ d: Dl(n)(n),
1895
1899
  strokeWidth: Math.max(1, n.width),
1896
1900
  link: n
1897
1901
  };
1898
1902
  });
1899
1903
  }
1900
- function Mt(e, n, t, o, l) {
1904
+ function Ht(e, n, t, o, l) {
1901
1905
  if (o === !1) {
1902
1906
  e.node = {
1903
1907
  ...e.node,
@@ -1906,7 +1910,7 @@ function Mt(e, n, t, o, l) {
1906
1910
  return;
1907
1911
  }
1908
1912
  const u = Date.now(), a = Nn(n, t), i = () => {
1909
- let c = (Date.now() - u) / Oa;
1913
+ let c = (Date.now() - u) / Ol;
1910
1914
  c > 1 && (c = 1), e.node = {
1911
1915
  ...e.node,
1912
1916
  transitionValue: l && c === 1 ? void 0 : a(c)
@@ -1914,40 +1918,40 @@ function Mt(e, n, t, o, l) {
1914
1918
  };
1915
1919
  requestAnimationFrame(i);
1916
1920
  }
1917
- const Ma = {
1921
+ const Ml = {
1918
1922
  nodes: [],
1919
1923
  links: []
1920
1924
  };
1921
- function Bt(e, n) {
1925
+ function Mt(e, n) {
1922
1926
  return n.find((t) => t.every((o) => o.x0 === e.x0));
1923
1927
  }
1924
- function Ba(e, n, t) {
1925
- const o = M(null), l = v(() => {
1926
- var r;
1927
- return (r = e.value) == null ? void 0 : r[0].values.map(
1928
- ({ label: h, color: g, value: m, deriveColorFromIncomingLinks: A, offset: x }) => ({
1929
- label: h || m.toString(),
1930
- color: g,
1931
- fallbackColor: g || Ce,
1932
- id: m,
1933
- deriveColorFromIncomingLinks: A,
1934
- offset: x
1928
+ function Bl(e, n, t) {
1929
+ const o = B(null), l = v(() => {
1930
+ var r, m;
1931
+ return (m = (r = e.value) == null ? void 0 : r[0]) == null ? void 0 : m.values.map(
1932
+ ({ label: g, color: f, value: A, deriveColorFromIncomingLinks: L, offset: k }) => ({
1933
+ label: g || A.toString(),
1934
+ color: f,
1935
+ fallbackColor: f || Se,
1936
+ id: A,
1937
+ deriveColorFromIncomingLinks: L,
1938
+ offset: k
1935
1939
  })
1936
1940
  );
1937
1941
  }), u = v(
1938
1942
  () => {
1939
- var r;
1940
- return (r = e.value) == null ? void 0 : r[0].values.map(
1941
- (h) => {
1942
- var g;
1943
- return (g = h.targets) == null ? void 0 : g.map(
1944
- ({ node: m, value: A, color: x, curveFunction: T }) => ({
1945
- id: `${h.value}:${m}`,
1946
- color: x,
1947
- curveFunction: T,
1948
- source: h.value ?? h.label,
1949
- target: m,
1950
- value: A
1943
+ var r, m;
1944
+ return (m = (r = e.value) == null ? void 0 : r[0]) == null ? void 0 : m.values.map(
1945
+ (g) => {
1946
+ var f;
1947
+ return (f = g.targets) == null ? void 0 : f.map(
1948
+ ({ node: A, value: L, color: k, curveFunction: h }) => ({
1949
+ id: `${g.value}:${A}`,
1950
+ color: k,
1951
+ curveFunction: h,
1952
+ source: g.value ?? g.label,
1953
+ target: A,
1954
+ value: L
1951
1955
  })
1952
1956
  );
1953
1957
  }
@@ -1956,77 +1960,80 @@ function Ba(e, n, t) {
1956
1960
  ), a = v(() => kn().nodeId(we).nodeAlign(n.value.nodeAlign).nodePadding(n.value.nodePadding).nodeSort(n.value.nodeSort).nodeWidth(n.value.nodeWidth).linkSort(n.value.linkSort).iterations(n.value.iterations)), i = v(() => {
1957
1961
  var r;
1958
1962
  return (r = o.value) == null ? void 0 : r.nodes.reduce(
1959
- (h, g) => {
1960
- const m = Bt(g, h);
1961
- return m ? (m.push(g), m.sort((A, x) => (A._y0 || A.y0) - (x._y0 || x.y0))) : h.push([g]), h;
1963
+ (m, g) => {
1964
+ const f = Mt(g, m);
1965
+ return f ? (f.push(g), f.sort((A, L) => (A._y0 || A.y0) - (L._y0 || L.y0))) : m.push([g]), m;
1962
1966
  },
1963
1967
  []
1964
1968
  );
1965
1969
  });
1966
1970
  function s(r) {
1967
- const { offset: h } = r, g = Bt(r, i.value);
1971
+ const { offset: m } = r, g = Mt(r, i.value);
1968
1972
  if (!g)
1969
1973
  return;
1970
- const m = g[g.findIndex((x) => x.id === r.id) - 1], A = m && g.length !== 1 ? m.y1 + h : h;
1974
+ const f = g[g.findIndex((L) => L.id === r.id) - 1], A = f && g.length !== 1 ? f.y1 + m : m;
1971
1975
  r._y0 = r.y0, r._y1 = r.y1, r.y0 = A, r.y1 = r.y0 + (r._y1 - r._y0);
1972
1976
  }
1973
- function c(r, h) {
1974
- const { id: g, _y0: m, y0: A } = r, x = h.links.filter(
1975
- (O) => O.source.id === g
1976
- ), T = h.links.filter(
1977
- (O) => O.target.id === g
1978
- ), f = A - m;
1979
- x.forEach((O) => O.y0 += f), T.forEach((O) => O.y1 += f);
1980
- }
1981
- const p = v(() => (o.value && l.value.forEach((r) => {
1982
- r.value === 0 && (r.fallbackColor = st.Grey), typeof r.offset == "number" && (s(r), c(r, o.value));
1983
- }), o.value));
1977
+ function c(r, m) {
1978
+ const { id: g, _y0: f, y0: A } = r, L = m.links.filter(
1979
+ (x) => x.source.id === g
1980
+ ), k = m.links.filter(
1981
+ (x) => x.target.id === g
1982
+ ), h = A - f;
1983
+ L.forEach((x) => x.y0 += h), k.forEach((x) => x.y1 += h);
1984
+ }
1985
+ const p = v(() => {
1986
+ var r;
1987
+ return o.value && ((r = l.value) == null || r.forEach((m) => {
1988
+ m.value === 0 && (m.fallbackColor = st.Grey), typeof m.offset == "number" && (s(m), c(m, o.value));
1989
+ })), o.value;
1990
+ });
1984
1991
  return K([a, t], () => {
1985
1992
  try {
1986
- const { x0: r, y0: h, x1: g, y1: m } = t.value;
1993
+ const { x0: r, y0: m, x1: g, y1: f } = t.value;
1987
1994
  o.value = a.value.extent([
1988
- [r, h],
1989
- [g, m]
1995
+ [r, m],
1996
+ [g, f]
1990
1997
  ])({ nodes: l.value, links: u.value });
1991
1998
  } catch (r) {
1992
- La(qt.GraphProblem, r), o.value = Ma;
1999
+ Ll(qt.GraphProblem, r), o.value = Ml;
1993
2000
  }
1994
2001
  }), { columns: i, graph: p };
1995
2002
  }
1996
- function at(e, n) {
2003
+ function lt(e, n) {
1997
2004
  return n || (n = {}), e.targetLinks && e.targetLinks.forEach(({ source: t, value: o }) => {
1998
- n[t.id] = o, at(
2005
+ n[t.id] = o, lt(
1999
2006
  t,
2000
2007
  n
2001
2008
  );
2002
2009
  }), n;
2003
2010
  }
2004
- function lt(e, n) {
2011
+ function at(e, n) {
2005
2012
  return n || (n = {}), e.sourceLinks && e.sourceLinks.forEach(({ target: t, value: o }) => {
2006
- n[t.id] = o, lt(
2013
+ n[t.id] = o, at(
2007
2014
  t,
2008
2015
  n
2009
2016
  );
2010
2017
  }), n;
2011
2018
  }
2012
- function Ra(e, n) {
2019
+ function Rl(e, n) {
2013
2020
  return n.links.reduce((t, o) => (o.source.id in e && o.target.id in e && t.push(o.id), t), []);
2014
2021
  }
2015
- const Sa = (e, n) => {
2022
+ const Sl = (e, n) => {
2016
2023
  let t;
2017
2024
  en(e) ? t = {
2018
2025
  [e.id]: e.value,
2019
- ...at(e),
2020
- ...lt(e)
2026
+ ...lt(e),
2027
+ ...at(e)
2021
2028
  } : t = {
2022
2029
  [e.source.id]: e.source.value,
2023
2030
  [e.target.id]: e.target.value,
2024
- ...at(e.source),
2025
- ...lt(e.target)
2031
+ ...lt(e.source),
2032
+ ...at(e.target)
2026
2033
  };
2027
- const o = Ra(t, n);
2034
+ const o = Rl(t, n);
2028
2035
  return { nodes: t, links: o };
2029
- }, Ca = (e) => {
2036
+ }, Cl = (e) => {
2030
2037
  if (en(e)) {
2031
2038
  const n = [...e.sourceLinks, ...e.targetLinks];
2032
2039
  return {
@@ -2045,15 +2052,15 @@ const Sa = (e, n) => {
2045
2052
  links: [e.id]
2046
2053
  };
2047
2054
  };
2048
- function Ga(e, n, t) {
2049
- const o = M(null), l = v(() => o.value ? typeof n.value.highlightedElements == "function" ? n.value.highlightedElements(
2055
+ function Gl(e, n, t) {
2056
+ const o = B(null), l = v(() => o.value ? typeof n.value.highlightedElements == "function" ? n.value.highlightedElements(
2050
2057
  o.value,
2051
2058
  t.value
2052
- ) : n.value.highlightedElements === "closest" ? Ca(o.value, t.value) : Sa(o.value, t.value) : { nodes: {}, links: [] });
2059
+ ) : n.value.highlightedElements === "closest" ? Cl(o.value, t.value) : Sl(o.value, t.value) : { nodes: {}, links: [] });
2053
2060
  return K(l, (u, a) => {
2054
2061
  if (u.links.length === 0 && Object.keys(u.nodes).length === 0) {
2055
2062
  e.value.forEach((i) => {
2056
- i.node.id in a.nodes && Mt(
2063
+ i.node.id in a.nodes && Ht(
2057
2064
  i,
2058
2065
  a.nodes[i.node.id],
2059
2066
  i.node.value,
@@ -2064,7 +2071,7 @@ function Ga(e, n, t) {
2064
2071
  return;
2065
2072
  }
2066
2073
  e.value.forEach((i) => {
2067
- i.node.id in u.nodes && Mt(
2074
+ i.node.id in u.nodes && Ht(
2068
2075
  i,
2069
2076
  i.node.value,
2070
2077
  u.nodes[i.node.id],
@@ -2073,10 +2080,10 @@ function Ga(e, n, t) {
2073
2080
  });
2074
2081
  }), { highlightedElements: l, hoveredElement: o };
2075
2082
  }
2076
- const ja = {
2083
+ const jl = {
2077
2084
  class: "lume-alluvial-group",
2078
2085
  "data-j-alluvial-group": ""
2079
- }, Va = { key: 0 }, Pa = ["x", "y"], Fa = { key: 0 }, za = ["id", "x1", "x2"], Wa = ["stop-color"], Za = ["stop-color"], Ua = ["d", "stroke-width", "onClick", "onMouseover"], Xa = ["d", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-width", "data-id", "onClick", "onMouseover"], Ya = ["onClick", "onMouseenter", "onMouseleave", "onMouseover"], Ka = ["x", "y", "height", "width"], Ja = ["transform", "data-id", "width"], Qa = /* @__PURE__ */ Z({
2086
+ }, Vl = { key: 0 }, Pl = ["x", "y"], Fl = { key: 0 }, zl = ["id", "x1", "x2"], Wl = ["stop-color"], Zl = ["stop-color"], Ul = ["d", "stroke-width", "onClick", "onMouseover"], Xl = ["d", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-width", "data-id", "onClick", "onMouseover"], Yl = ["onClick", "onMouseenter", "onMouseleave", "onMouseover"], Kl = ["x", "y", "height", "width"], Jl = ["transform", "data-id", "width"], Ql = /* @__PURE__ */ Z({
2080
2087
  __name: "lume-alluvial-group",
2081
2088
  props: {
2082
2089
  ...ze(),
@@ -2087,120 +2094,120 @@ const ja = {
2087
2094
  },
2088
2095
  emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
2089
2096
  setup(e, { emit: n }) {
2090
- const t = e, o = n, l = Be("chartID"), { data: u, options: a } = ne(t), i = M([]), s = M([]), c = M(null), { extents: p, updateExtents: r } = Aa(t.containerSize), { columns: h, graph: g } = Ba(u, a, p), { hoveredElement: m, highlightedElements: A } = Ga(
2097
+ const t = e, o = n, l = Ve("chartID"), { data: u, options: a } = ne(t), i = B([]), s = B([]), c = B(null), { extents: p, updateExtents: r } = Al(t.containerSize), { columns: m, graph: g } = Bl(u, a, p), { hoveredElement: f, highlightedElements: A } = Gl(
2091
2098
  i,
2092
2099
  a,
2093
2100
  g
2094
- ), x = v(() => Ve(a.value.valueFormat)), T = v(
2101
+ ), L = v(() => je(a.value.valueFormat)), k = v(
2095
2102
  () => Object.keys(A.value.nodes)
2096
- ), f = v(() => h.value ? h.value.map(
2097
- (k) => k[0].x0 + a.value.nodeWidth / 2
2098
- ) : []), O = v(() => {
2103
+ ), h = v(() => m.value ? m.value.map(
2104
+ (b) => b[0].x0 + a.value.nodeWidth / 2
2105
+ ) : []), x = v(() => {
2099
2106
  if (!(!a.value.nodeHeaders || !a.value.nodeHeaders.length))
2100
- return a.value.nodeHeaders.slice(0, f.value.length).map((k, B) => ({
2101
- label: k,
2102
- x: f.value[B]
2107
+ return a.value.nodeHeaders.slice(0, h.value.length).map((b, M) => ({
2108
+ label: b,
2109
+ x: h.value[M]
2103
2110
  }));
2104
- }), N = v(
2105
- () => a.value.nodeHeaderPadding ?? ma
2106
- ), E = v(() => {
2111
+ }), E = v(
2112
+ () => a.value.nodeHeaderPadding ?? ml
2113
+ ), N = v(() => {
2107
2114
  if (!(!a.value.gradient || !g.value))
2108
- return g.value.links.reduce((k, B) => {
2109
- const { source: y, target: Y } = B, Q = y.color || y.fallbackColor, ue = Y.deriveColorFromIncomingLinks ? Q : Y.color || Y.fallbackColor;
2110
- return k[B.id] = {
2115
+ return g.value.links.reduce((b, M) => {
2116
+ const { source: y, target: Y } = M, Q = y.color || y.fallbackColor, ue = Y.deriveColorFromIncomingLinks ? Q : Y.color || Y.fallbackColor;
2117
+ return b[M.id] = {
2111
2118
  source: Q,
2112
2119
  target: ue,
2113
2120
  x1: y.x1,
2114
2121
  x2: Y.x0
2115
- }, k;
2122
+ }, b;
2116
2123
  }, {});
2117
2124
  }), F = v(() => {
2118
- const k = i.value.filter(
2125
+ const b = i.value.filter(
2119
2126
  (y) => P(y)
2120
- ), B = [];
2121
- return k.forEach((y) => {
2127
+ ), M = [];
2128
+ return b.forEach((y) => {
2122
2129
  const Y = [];
2123
2130
  s.value.filter(({ link: Q }) => Q.target.id === y.node.id).reverse().reduce((Q, ue, $e, We) => {
2124
2131
  const Ze = ue.link.target.y1 - ue.link.target.y0 > Ee;
2125
- let Ie, Ge, Ae;
2126
- return Ze ? (Ie = ue.link.target.y1 - ue.link.target.y0, Ge = ue.link.value / y.node.value, Ae = Ge * Ie) : (Ie = Ee, Ae = Ee / We.length), Y.push({
2132
+ let Ie, Ce, Ae;
2133
+ return Ze ? (Ie = ue.link.target.y1 - ue.link.target.y0, Ce = ue.link.value / y.node.value, Ae = Ce * Ie) : (Ie = Ee, Ae = Ee / We.length), Y.push({
2127
2134
  x: y.x,
2128
2135
  y: y.y + Q,
2129
2136
  height: Ae,
2130
2137
  width: y.width,
2131
2138
  key: `node-block-${y.node.id}-source-link-${ue.link.source.id}`,
2132
- class: `lume-alluvial-group__node-block lume-fill--${ue.link.source.color || Ce}`
2139
+ class: `lume-alluvial-group__node-block lume-fill--${ue.link.source.color || Se}`
2133
2140
  }), Q + Ae;
2134
- }, 0), B.push({
2141
+ }, 0), M.push({
2135
2142
  id: y.node.id,
2136
2143
  subNodes: Y
2137
2144
  });
2138
- }), B;
2145
+ }), M;
2139
2146
  });
2140
- function w(k) {
2141
- return a.value.gradient && `url('#${l}_${k.id}')`;
2147
+ function w(b) {
2148
+ return a.value.gradient && `url('#${l}_${b.id}')`;
2142
2149
  }
2143
- function C(k) {
2144
- return T.value.length > 0 && !T.value.includes(k.toString());
2150
+ function C(b) {
2151
+ return k.value.length > 0 && !k.value.includes(b.toString());
2145
2152
  }
2146
- function U(k) {
2147
- return T.value.length > 0 && T.value.includes(k.toString());
2153
+ function U(b) {
2154
+ return k.value.length > 0 && k.value.includes(b.toString());
2148
2155
  }
2149
- function X(k) {
2150
- return A.value.links.length > 0 && !A.value.links.includes(k);
2156
+ function X(b) {
2157
+ return A.value.links.length > 0 && !A.value.links.includes(b);
2151
2158
  }
2152
- function q(k) {
2153
- return A.value.links.length > 0 && A.value.links.includes(k);
2159
+ function q(b) {
2160
+ return A.value.links.length > 0 && A.value.links.includes(b);
2154
2161
  }
2155
- function P(k) {
2156
- return !k.node.color && k.node.deriveColorFromIncomingLinks;
2162
+ function P(b) {
2163
+ return !b.node.color && b.node.deriveColorFromIncomingLinks;
2157
2164
  }
2158
- function re(k, B) {
2159
- k !== m.value && (m.value = k, o("link-mouseenter", { link: k, event: B }));
2165
+ function re(b, M) {
2166
+ b !== f.value && (f.value = b, o("link-mouseenter", { link: b, event: M }));
2160
2167
  }
2161
- function xe(k) {
2162
- const B = m.value;
2163
- m.value = null, o("link-mouseleave", { link: B, event: k });
2168
+ function xe(b) {
2169
+ const M = f.value;
2170
+ f.value = null, o("link-mouseleave", { link: M, event: b });
2164
2171
  }
2165
- function be(k) {
2166
- if (k == null) {
2167
- m.value = null;
2172
+ function be(b) {
2173
+ if (b == null) {
2174
+ f.value = null;
2168
2175
  return;
2169
2176
  }
2170
- const B = xa(k, g.value) || $a(k, g.value);
2171
- if (!B) {
2177
+ const M = xl(b, g.value) || $l(b, g.value);
2178
+ if (!M) {
2172
2179
  _e(me.InvalidHoveredElement);
2173
2180
  return;
2174
2181
  }
2175
- m.value = B;
2182
+ f.value = M;
2176
2183
  }
2177
- function R(k) {
2178
- var B;
2179
- return ((B = F.value.find(({ id: y }) => k === y)) == null ? void 0 : B.subNodes) ?? [];
2184
+ function R(b) {
2185
+ var M;
2186
+ return ((M = F.value.find(({ id: y }) => b === y)) == null ? void 0 : M.subNodes) ?? [];
2180
2187
  }
2181
2188
  function H() {
2182
- const k = Ia(g.value, c.value);
2183
- r(k);
2189
+ const b = Il(g.value, c.value);
2190
+ r(b);
2184
2191
  }
2185
- return K(g, (k) => {
2186
- i.value = wa(k.nodes), s.value = Ha(k.links).reverse(), m.value == null && t.hoveredElementId != null && be(t.hoveredElementId);
2192
+ return K(g, (b) => {
2193
+ i.value = wl(b.nodes), s.value = Hl(b.links).reverse(), f.value == null && t.hoveredElementId != null && be(t.hoveredElementId);
2187
2194
  }), K([t.containerSize, c], () => {
2188
2195
  t.containerSize.width && t.containerSize.height && H();
2189
- }), K(() => t.hoveredElementId, be), (k, B) => (_(), $("g", ja, [
2190
- O.value ? (_(), $("g", Va, [
2191
- (_(!0), $(ee, null, W(O.value, (y) => (_(), $("text", {
2196
+ }), K(() => t.hoveredElementId, be), (b, M) => (_(), $("g", jl, [
2197
+ x.value ? (_(), $("g", Vl, [
2198
+ (_(!0), $(ee, null, z(x.value, (y) => (_(), $("text", {
2192
2199
  key: `header_${y.x}`,
2193
2200
  x: y.x,
2194
- y: -N.value,
2201
+ y: -E.value,
2195
2202
  class: "lume-alluvial-group__node-header lume-typography--caption"
2196
- }, ae(y.label), 9, Pa))), 128))
2197
- ])) : z("", !0),
2203
+ }, le(y.label), 9, Pl))), 128))
2204
+ ])) : W("", !0),
2198
2205
  G("g", {
2199
2206
  class: "lume-alluvial-link-group",
2200
2207
  onMouseleave: xe
2201
2208
  }, [
2202
- d(a).gradient ? (_(), $("defs", Fa, [
2203
- (_(!0), $(ee, null, W(E.value, (y, Y) => (_(), $("linearGradient", {
2209
+ d(a).gradient ? (_(), $("defs", Fl, [
2210
+ (_(!0), $(ee, null, z(N.value, (y, Y) => (_(), $("linearGradient", {
2204
2211
  id: `${d(l)}_${Y}`,
2205
2212
  key: Y,
2206
2213
  gradientUnits: "userSpaceOnUse",
@@ -2210,26 +2217,26 @@ const ja = {
2210
2217
  G("stop", {
2211
2218
  offset: "0%",
2212
2219
  "stop-color": `var(--lume-color--${y.source})`
2213
- }, null, 8, Wa),
2220
+ }, null, 8, Wl),
2214
2221
  G("stop", {
2215
2222
  offset: "100%",
2216
2223
  "stop-color": `var(--lume-color--${y.target})`
2217
- }, null, 8, Za)
2218
- ], 8, za))), 128))
2219
- ])) : z("", !0),
2220
- (_(!0), $(ee, null, W(s.value, (y) => (_(), $("path", {
2224
+ }, null, 8, Zl)
2225
+ ], 8, zl))), 128))
2226
+ ])) : W("", !0),
2227
+ (_(!0), $(ee, null, z(s.value, (y) => (_(), $("path", {
2221
2228
  key: `link-ghost_${y.id}`,
2222
2229
  class: oe(["lume-alluvial-group__link", [
2223
2230
  "lume-stroke--transparent",
2224
2231
  "lume-alluvial-group__link--ghost"
2225
2232
  ]]),
2226
2233
  d: y.d,
2227
- "stroke-width": y.strokeWidth + d(va),
2234
+ "stroke-width": y.strokeWidth + d(vl),
2228
2235
  "data-j-alluvial-ghost": "",
2229
2236
  onClick: (Y) => o("link-click", { link: y.link, event: Y }),
2230
2237
  onMouseover: (Y) => re(y.link, Y)
2231
- }, null, 40, Ua))), 128)),
2232
- (_(!0), $(ee, null, W(s.value, (y) => (_(), $("path", {
2238
+ }, null, 40, Ul))), 128)),
2239
+ (_(!0), $(ee, null, z(s.value, (y) => (_(), $("path", {
2233
2240
  key: `link_${y.id}`,
2234
2241
  class: oe(["lume-alluvial-group__link", {
2235
2242
  [`lume-stroke--${y.color}`]: !d(a).gradient && y.color,
@@ -2238,16 +2245,16 @@ const ja = {
2238
2245
  }]),
2239
2246
  d: y.d,
2240
2247
  stroke: w(y.link),
2241
- "stroke-dasharray": k.containerSize.width,
2242
- "stroke-dashoffset": k.containerSize.width,
2248
+ "stroke-dasharray": b.containerSize.width,
2249
+ "stroke-dashoffset": b.containerSize.width,
2243
2250
  "stroke-width": y.strokeWidth,
2244
2251
  "data-j-alluvial-path": "",
2245
2252
  "data-id": y.id,
2246
2253
  onClick: (Y) => o("link-click", { link: y.link, event: Y }),
2247
2254
  onMouseover: (Y) => re(y.link, Y)
2248
- }, null, 42, Xa))), 128))
2255
+ }, null, 42, Xl))), 128))
2249
2256
  ], 32),
2250
- (_(!0), $(ee, null, W(i.value, (y, Y) => (_(), $("g", {
2257
+ (_(!0), $(ee, null, z(i.value, (y, Y) => (_(), $("g", {
2251
2258
  key: `node-block_${Y}`,
2252
2259
  class: oe(["lume-alluvial-group__node", {
2253
2260
  "lume-alluvial-group__node--faded": C(y.node.id),
@@ -2259,10 +2266,10 @@ const ja = {
2259
2266
  onClick: (Q) => o("node-click", { node: y.node, event: Q }),
2260
2267
  onMouseenter: (Q) => o("node-mouseenter", { node: y.node, event: Q }),
2261
2268
  onMouseleave: (Q) => o("node-mouseleave", { node: y.node, event: Q }),
2262
- onMouseover: (Q) => m.value = y.node,
2263
- onMouseout: B[0] || (B[0] = (Q) => m.value = null)
2269
+ onMouseover: (Q) => f.value = y.node,
2270
+ onMouseout: M[0] || (M[0] = (Q) => f.value = null)
2264
2271
  }, [
2265
- P(y) ? (_(!0), $(ee, { key: 0 }, W(R(
2272
+ P(y) ? (_(!0), $(ee, { key: 0 }, z(R(
2266
2273
  y.node.id
2267
2274
  ), (Q) => (_(), $("rect", j(Q, {
2268
2275
  key: Q.key,
@@ -2274,7 +2281,7 @@ const ja = {
2274
2281
  y: y.y,
2275
2282
  height: y.height,
2276
2283
  width: y.width
2277
- }, null, 10, Ka)),
2284
+ }, null, 10, Kl)),
2278
2285
  G("g", {
2279
2286
  ref_for: !0,
2280
2287
  ref_key: "nodeTextRefs",
@@ -2286,29 +2293,29 @@ const ja = {
2286
2293
  "data-id": y.node.id,
2287
2294
  width: d(a).nodeLabelMaxWidth
2288
2295
  }, [
2289
- S(k.$slots, `node-text-${y.node.id}`, {
2296
+ S(b.$slots, `node-text-${y.node.id}`, {
2290
2297
  node: y.node,
2291
- value: x.value(
2298
+ value: L.value(
2292
2299
  y.node.transitionValue || y.node.value,
2293
2300
  y.node.value
2294
2301
  )
2295
2302
  }, () => [
2296
- se(d(_a), {
2303
+ se(d(_l), {
2297
2304
  bottom: d(a).switchText,
2298
2305
  left: y.node.depth === 0,
2299
2306
  "max-width": d(a).nodeLabelMaxWidth,
2300
2307
  "onLume__internal-NodeResize": H
2301
2308
  }, {
2302
2309
  default: V(() => [
2303
- fe(ae(y.node.label), 1)
2310
+ pe(le(y.node.label), 1)
2304
2311
  ]),
2305
2312
  _: 2
2306
2313
  }, 1032, ["bottom", "left", "max-width"]),
2307
- se(d(ba), {
2314
+ se(d(bl), {
2308
2315
  bottom: !d(a).switchText
2309
2316
  }, {
2310
2317
  default: V(() => [
2311
- fe(ae(x.value(
2318
+ pe(le(L.value(
2312
2319
  y.node.transitionValue || y.node.value,
2313
2320
  y.node.value
2314
2321
  )), 1)
@@ -2316,13 +2323,13 @@ const ja = {
2316
2323
  _: 2
2317
2324
  }, 1032, ["bottom"])
2318
2325
  ], !0)
2319
- ], 10, Ja)
2320
- ], 40, Ya)
2326
+ ], 10, Jl)
2327
+ ], 40, Yl)
2321
2328
  ], 2))), 128))
2322
2329
  ]));
2323
2330
  }
2324
2331
  });
2325
- const qa = /* @__PURE__ */ te(Qa, [["__scopeId", "data-v-f004e5fb"]]), el = {
2332
+ const ql = /* @__PURE__ */ te(Ql, [["__scopeId", "data-v-f004e5fb"]]), ea = {
2326
2333
  margins: {
2327
2334
  top: 0,
2328
2335
  right: 0,
@@ -2341,13 +2348,13 @@ const qa = /* @__PURE__ */ te(Qa, [["__scopeId", "data-v-f004e5fb"]]), el = {
2341
2348
  nodeAlign: bn,
2342
2349
  valueFormat: (e) => String(e),
2343
2350
  iterations: 6
2344
- }, Vl = /* @__PURE__ */ Z({
2351
+ }, Va = /* @__PURE__ */ Z({
2345
2352
  __name: "lume-alluvial-diagram",
2346
2353
  props: {
2347
2354
  ...Fo(ut)
2348
2355
  },
2349
2356
  setup(e, { emit: n }) {
2350
- const t = e, { componentEventPropagator: o } = ke(), l = Oe(ie()), u = Hn(ie()), { options: a } = ne(t), { allOptions: i } = pe(a, el);
2357
+ const t = e, { componentEventPropagator: o } = ke(), l = Oe(ie()), u = Hn(ie()), { options: a } = ne(t), { allOptions: i } = fe(a, ea);
2351
2358
  function s(c) {
2352
2359
  return {
2353
2360
  ...c,
@@ -2358,30 +2365,30 @@ const qa = /* @__PURE__ */ te(Qa, [["__scopeId", "data-v-f004e5fb"]]), el = {
2358
2365
  return (c, p) => (_(), J(d(De), j(t, {
2359
2366
  options: s(d(i)),
2360
2367
  "data-j-alluvial-diagram": ""
2361
- }, le(d(o))), de({
2368
+ }, ae(d(o))), de({
2362
2369
  groups: V((r) => [
2363
- se(d(qa), j(r, { "hovered-element-id": c.hoveredElement }, le(d(o))), de({ _: 2 }, [
2364
- W(d(u), (h, g) => ({
2370
+ se(d(ql), j(r, { "hovered-element-id": c.hoveredElement }, ae(d(o))), de({ _: 2 }, [
2371
+ z(d(u), (m, g) => ({
2365
2372
  name: g,
2366
- fn: V((m) => [
2367
- S(c.$slots, g, he(ge(m || {})))
2373
+ fn: V((f) => [
2374
+ S(c.$slots, g, he(ge(f || {})))
2368
2375
  ])
2369
2376
  }))
2370
2377
  ]), 1040, ["hovered-element-id"])
2371
2378
  ]),
2372
2379
  _: 2
2373
2380
  }, [
2374
- W(d(l), (r, h) => ({
2375
- name: h,
2381
+ z(d(l), (r, m) => ({
2382
+ name: m,
2376
2383
  fn: V((g) => [
2377
- S(c.$slots, h, he(ge(g || {})))
2384
+ S(c.$slots, m, he(ge(g || {})))
2378
2385
  ])
2379
2386
  }))
2380
2387
  ]), 1040, ["options"]));
2381
2388
  }
2382
2389
  });
2383
2390
  var tn = /* @__PURE__ */ ((e) => (e.grouped = "grouped", e.stacked = "stacked", e))(tn || {});
2384
- const Pl = /* @__PURE__ */ Z({
2391
+ const Pa = /* @__PURE__ */ Z({
2385
2392
  __name: "lume-bar-chart",
2386
2393
  props: {
2387
2394
  ...Ne(),
@@ -2392,11 +2399,11 @@ const Pl = /* @__PURE__ */ Z({
2392
2399
  }
2393
2400
  },
2394
2401
  setup(e, { emit: n }) {
2395
- const t = Ye(
2402
+ const t = Ke(
2396
2403
  () => import("./common/42f5d2fc.js")
2397
- ), o = Ye(
2404
+ ), o = Ke(
2398
2405
  () => import("./common/abc9d23d.js")
2399
- ), l = Ye(
2406
+ ), l = Ke(
2400
2407
  () => import("./common/0664fd4d.js")
2401
2408
  ), u = /* @__PURE__ */ new Map([
2402
2409
  ["single", t],
@@ -2415,7 +2422,8 @@ const Pl = /* @__PURE__ */ Z({
2415
2422
  };
2416
2423
  }
2417
2424
  const p = v(() => {
2418
- if (a.data) {
2425
+ var r;
2426
+ if ((r = a.data) != null && r.length) {
2419
2427
  if (ut(a.data))
2420
2428
  return u.get("single");
2421
2429
  if (!a.type)
@@ -2423,35 +2431,35 @@ const Pl = /* @__PURE__ */ Z({
2423
2431
  return u.get(a.type);
2424
2432
  }
2425
2433
  });
2426
- return (r, h) => (_(), J(vn(p.value), j({ ...a, ...r.$attrs }, {
2434
+ return (r, m) => (_(), J(vn(p.value), j({ ...a, ...r.$attrs }, {
2427
2435
  options: c(r.options)
2428
- }, le(d(i))), de({ _: 2 }, [
2429
- W(d(s), (g, m) => ({
2430
- name: m,
2436
+ }, ae(d(i))), de({ _: 2 }, [
2437
+ z(d(s), (g, f) => ({
2438
+ name: f,
2431
2439
  fn: V((A) => [
2432
- S(r.$slots, m, he(ge(A || {})))
2440
+ S(r.$slots, f, he(ge(A || {})))
2433
2441
  ])
2434
2442
  }))
2435
2443
  ]), 1040, ["options"]));
2436
2444
  }
2437
2445
  });
2438
- function tl(e) {
2446
+ function ta(e) {
2439
2447
  return Object.values(Cn).includes(e) || e == null;
2440
2448
  }
2441
- function nl(e) {
2449
+ function na(e) {
2442
2450
  return Object.values(D).includes(e);
2443
2451
  }
2444
- const ol = (e = !1) => ({
2452
+ const oa = (e = !1) => ({
2445
2453
  type: {
2446
2454
  type: String,
2447
2455
  default: null,
2448
- validator: tl
2456
+ validator: ta
2449
2457
  },
2450
2458
  ...e ? {
2451
2459
  orientation: {
2452
2460
  type: String,
2453
2461
  default: D.VERTICAL,
2454
- validator: nl
2462
+ validator: na
2455
2463
  }
2456
2464
  } : {}
2457
2465
  });
@@ -2476,10 +2484,10 @@ function nn(e, n) {
2476
2484
  });
2477
2485
  return { multiBarData: t, groupedData: o };
2478
2486
  }
2479
- function al(e, n) {
2487
+ function la(e, n) {
2480
2488
  return e.value.length === 1 ? "single" : n.value;
2481
2489
  }
2482
- function ll(e, n, t) {
2490
+ function aa(e, n, t) {
2483
2491
  const o = v(
2484
2492
  () => t.value === D.HORIZONTAL
2485
2493
  );
@@ -2489,13 +2497,13 @@ function ll(e, n, t) {
2489
2497
  const u = v(() => o.value ? (() => (l(e.value), e.value))() : e.value), a = v(() => o.value ? n.value : (() => (l(n.value), n.value))());
2490
2498
  return { barXScale: u, barYScale: a };
2491
2499
  }
2492
- function ul(e, n, t, o, l, u) {
2500
+ function ua(e, n, t, o, l, u) {
2493
2501
  const a = v(
2494
2502
  () => o.value === D.HORIZONTAL
2495
2503
  );
2496
- function i(r, h) {
2497
- let g, m;
2498
- return a.value ? (g = r >= 0 ? n.value(0) : n.value(r), m = t.value(t.value.domain()[h])) : (g = n.value(n.value.domain()[h]), m = r < 0 ? t.value(0) : t.value(r)), { x: g, y: m };
2504
+ function i(r, m) {
2505
+ let g, f;
2506
+ return a.value ? (g = r >= 0 ? n.value(0) : n.value(r), f = t.value(t.value.domain()[m])) : (g = n.value(n.value.domain()[m]), f = r < 0 ? t.value(0) : t.value(r)), { x: g, y: f };
2499
2507
  }
2500
2508
  function s(r) {
2501
2509
  return a.value ? r < 0 ? n.value(0) - n.value(r) : n.value(r) - n.value(0) : n.value.bandwidth();
@@ -2503,58 +2511,58 @@ function ul(e, n, t, o, l, u) {
2503
2511
  function c(r) {
2504
2512
  return a.value ? t.value.bandwidth() : r < 0 ? t.value(r) - t.value(0) : t.value(0) - t.value(r);
2505
2513
  }
2506
- function p(r, h, g) {
2507
- const { value: m, color: A } = r, x = A ?? e.value[h].color ?? Ce, { x: T, y: f } = i(m, g), O = s(m), N = c(m);
2514
+ function p(r, m, g) {
2515
+ const { value: f, color: A } = r, L = A ?? e.value[m].color ?? Se, { x: k, y: h } = i(f, g), x = s(f), E = c(f);
2508
2516
  return {
2509
- classList: [`lume-fill--${x}`, ...u],
2510
- x: T,
2511
- y: f,
2512
- width: O,
2513
- height: N,
2517
+ classList: [`lume-fill--${L}`, ...u],
2518
+ x: k,
2519
+ y: h,
2520
+ width: x,
2521
+ height: E,
2514
2522
  isFaded: l.value !== -1 && l.value !== g,
2515
- isNegative: m < 0
2523
+ isNegative: f < 0
2516
2524
  };
2517
2525
  }
2518
2526
  return { barAttributeGenerator: p };
2519
2527
  }
2520
- function rl(e, n, t, o, l, u) {
2528
+ function ra(e, n, t, o, l, u) {
2521
2529
  const a = v(
2522
2530
  () => o.value === D.HORIZONTAL
2523
- ), i = v(() => He().domain(e.value.map((m, A) => A)).range([0, n.value.bandwidth()]).padding(0)), s = v(() => He().domain(e.value.map((m, A) => A)).range([0, t.value.bandwidth()]).padding(0));
2524
- function c(m, A, x) {
2531
+ ), i = v(() => He().domain(e.value.map((f, A) => A)).range([0, n.value.bandwidth()]).padding(0)), s = v(() => He().domain(e.value.map((f, A) => A)).range([0, t.value.bandwidth()]).padding(0));
2532
+ function c(f, A, L) {
2525
2533
  if (a.value)
2526
- return m >= 0 ? n.value(0) : n.value(m);
2527
- const T = n.value.domain();
2528
- return n.value(T[A]) + i.value(x);
2534
+ return f >= 0 ? n.value(0) : n.value(f);
2535
+ const k = n.value.domain();
2536
+ return n.value(k[A]) + i.value(L);
2529
2537
  }
2530
- function p(m, A, x) {
2538
+ function p(f, A, L) {
2531
2539
  if (a.value) {
2532
- const T = t.value.domain();
2533
- return t.value(T[A]) + s.value(x);
2540
+ const k = t.value.domain();
2541
+ return t.value(k[A]) + s.value(L);
2534
2542
  }
2535
- return m < 0 ? t.value(0) : t.value(m);
2543
+ return f < 0 ? t.value(0) : t.value(f);
2536
2544
  }
2537
- function r(m) {
2538
- return a.value ? m < 0 ? n.value(0) - n.value(m) : n.value(m) - n.value(0) : i.value.bandwidth();
2545
+ function r(f) {
2546
+ return a.value ? f < 0 ? n.value(0) - n.value(f) : n.value(f) - n.value(0) : i.value.bandwidth();
2539
2547
  }
2540
- function h(m) {
2541
- return a.value ? s.value.bandwidth() : m < 0 ? t.value(m) - t.value(0) : t.value(0) - t.value(m);
2548
+ function m(f) {
2549
+ return a.value ? s.value.bandwidth() : f < 0 ? t.value(f) - t.value(0) : t.value(0) - t.value(f);
2542
2550
  }
2543
- function g(m, A, x) {
2544
- const { value: T, color: f } = m, O = f ?? e.value[A].color ?? Object.values(ce)[A], N = c(T, x, A), E = p(T, x, A), F = r(T), w = h(T);
2551
+ function g(f, A, L) {
2552
+ const { value: k, color: h } = f, x = h ?? e.value[A].color ?? Object.values(ce)[A], E = c(k, L, A), N = p(k, L, A), F = r(k), w = m(k);
2545
2553
  return {
2546
- classList: [`lume-fill--${O}`, ...u],
2547
- x: N,
2548
- y: E,
2554
+ classList: [`lume-fill--${x}`, ...u],
2555
+ x: E,
2556
+ y: N,
2549
2557
  width: F,
2550
2558
  height: w,
2551
- isFaded: l.value !== -1 && l.value !== x,
2552
- isNegative: T < 0
2559
+ isFaded: l.value !== -1 && l.value !== L,
2560
+ isNegative: k < 0
2553
2561
  };
2554
2562
  }
2555
2563
  return { barAttributeGenerator: g };
2556
2564
  }
2557
- function il(e, n, t) {
2565
+ function ia(e, n, t) {
2558
2566
  const o = v(
2559
2567
  () => n.value === D.HORIZONTAL
2560
2568
  ), l = v(() => {
@@ -2572,79 +2580,79 @@ function il(e, n, t) {
2572
2580
  return Math.max(...s);
2573
2581
  });
2574
2582
  function a(s, c, p) {
2575
- return o.value ? Me().domain([l.value, u.value]).range([0, p.width]) : Object.assign(
2576
- wt(
2577
- He().domain(c.map((r, h) => h)).range([0, p.width]),
2583
+ return c.length ? o.value ? Me().domain([l.value, u.value]).range([0, p.width]) : Object.assign(
2584
+ It(
2585
+ He().domain(c.map((r, m) => m)).range([0, p.width]),
2578
2586
  n.value,
2579
2587
  t.value
2580
2588
  ),
2581
2589
  { labels: c }
2582
- );
2590
+ ) : null;
2583
2591
  }
2584
2592
  function i(s, c, p) {
2585
- return o.value ? Object.assign(
2586
- wt(
2587
- He().domain(c.map((r, h) => h)).range([0, p.height]),
2593
+ return c.length ? o.value ? Object.assign(
2594
+ It(
2595
+ He().domain(c.map((r, m) => m)).range([0, p.height]),
2588
2596
  n.value,
2589
2597
  t.value
2590
2598
  ),
2591
2599
  { labels: c }
2592
- ) : Me().domain([u.value, l.value]).range([0, p.height]);
2600
+ ) : Me().domain([u.value, l.value]).range([0, p.height]) : null;
2593
2601
  }
2594
2602
  return { stackedXScaleGenerator: a, stackedYScaleGenerator: i };
2595
2603
  }
2596
- function sl(e, n, t, o, l, u) {
2604
+ function sa(e, n, t, o, l, u) {
2597
2605
  const a = v(
2598
2606
  () => o.value === D.HORIZONTAL
2599
2607
  ), i = v(
2600
2608
  () => a.value ? t.value.domain() : n.value.domain()
2601
2609
  ), s = v(
2602
- () => e.value.map((T) => T.values.map((f) => f == null ? void 0 : f.value))
2610
+ () => e.value.map((k) => k.values.map((h) => h == null ? void 0 : h.value))
2603
2611
  );
2604
- function c(T, f, O) {
2605
- let N, E;
2606
- return a.value ? (N = n.value(T >= 0 ? 0 + O : T + O), E = t.value(i.value[f])) : (N = n.value(i.value[f]), E = t.value(T >= 0 ? T + O : 0 + O)), { x: N, y: E };
2612
+ function c(k, h, x) {
2613
+ let E, N;
2614
+ return a.value ? (E = n.value(k >= 0 ? 0 + x : k + x), N = t.value(i.value[h])) : (E = n.value(i.value[h]), N = t.value(k >= 0 ? k + x : 0 + x)), { x: E, y: N };
2607
2615
  }
2608
- function p(T) {
2609
- return a.value ? n.value(T) - n.value(0) : n.value.bandwidth();
2616
+ function p(k) {
2617
+ return a.value ? n.value(k) - n.value(0) : n.value.bandwidth();
2610
2618
  }
2611
- function r(T) {
2612
- return a.value ? n.value(0) - n.value(T) : n.value.bandwidth();
2619
+ function r(k) {
2620
+ return a.value ? n.value(0) - n.value(k) : n.value.bandwidth();
2613
2621
  }
2614
- function h(T) {
2615
- return a.value ? t.value.bandwidth() : t.value(0) - t.value(T);
2622
+ function m(k) {
2623
+ return a.value ? t.value.bandwidth() : t.value(0) - t.value(k);
2616
2624
  }
2617
- function g(T) {
2618
- return a.value ? t.value.bandwidth() : t.value(T) - t.value(0);
2625
+ function g(k) {
2626
+ return a.value ? t.value.bandwidth() : t.value(k) - t.value(0);
2619
2627
  }
2620
- function m(T, f) {
2621
- return T ? s.value.reduce((O, N, E) => (E < T && N[f] >= 0 && (O += N[f]), O), 0) : 0;
2628
+ function f(k, h) {
2629
+ return k ? s.value.reduce((x, E, N) => (N < k && E[h] >= 0 && (x += E[h]), x), 0) : 0;
2622
2630
  }
2623
- function A(T, f) {
2624
- return T ? s.value.reduce((O, N, E) => (E < T && N[f] < 0 && (O += N[f]), O), 0) : 0;
2631
+ function A(k, h) {
2632
+ return k ? s.value.reduce((x, E, N) => (N < k && E[h] < 0 && (x += E[h]), x), 0) : 0;
2625
2633
  }
2626
- function x(T, f, O) {
2627
- const { value: N, color: E } = T, F = N >= 0 ? p(N) : r(N), w = N >= 0 ? h(N) : g(N), C = N >= 0 ? m(f, O) : A(f, O), { x: U, y: X } = c(N, O, C);
2634
+ function L(k, h, x) {
2635
+ const { value: E, color: N } = k, F = E >= 0 ? p(E) : r(E), w = E >= 0 ? m(E) : g(E), C = E >= 0 ? f(h, x) : A(h, x), { x: U, y: X } = c(E, x, C);
2628
2636
  return {
2629
- classList: [`lume-fill--${E ?? e.value[f].color ?? Object.values(ce)[f]}`, ...u],
2637
+ classList: [`lume-fill--${N ?? e.value[h].color ?? Object.values(ce)[h]}`, ...u],
2630
2638
  width: F,
2631
2639
  height: w,
2632
2640
  x: U,
2633
2641
  y: X,
2634
- isFaded: l.value !== -1 && l.value !== O,
2635
- isNegative: N < 0
2642
+ isFaded: l.value !== -1 && l.value !== x,
2643
+ isNegative: E < 0
2636
2644
  };
2637
2645
  }
2638
- return { barAttributeGenerator: x };
2646
+ return { barAttributeGenerator: L };
2639
2647
  }
2640
- const cl = {
2648
+ const ca = {
2641
2649
  class: "lume-bar-group",
2642
2650
  "data-j-bars-group": ""
2643
- }, dl = ["onMouseenter"], vl = {
2644
- single: ul,
2645
- grouped: rl,
2646
- stacked: sl
2647
- }, pt = /* @__PURE__ */ Z({
2651
+ }, da = ["onMouseenter"], va = {
2652
+ single: ua,
2653
+ grouped: ra,
2654
+ stacked: sa
2655
+ }, ft = /* @__PURE__ */ Z({
2648
2656
  __name: "lume-bar-group",
2649
2657
  props: {
2650
2658
  ...ze(),
@@ -2652,7 +2660,7 @@ const cl = {
2652
2660
  type: [String, Array],
2653
2661
  default: () => []
2654
2662
  },
2655
- ...ol(!0),
2663
+ ...oa(!0),
2656
2664
  transition: {
2657
2665
  type: Boolean,
2658
2666
  default: !0
@@ -2669,34 +2677,34 @@ const cl = {
2669
2677
  xScale: c,
2670
2678
  yScale: p,
2671
2679
  classList: r,
2672
- labels: h
2680
+ labels: m
2673
2681
  } = ne(t);
2674
- Be("chartID");
2675
- const { emitInternalEvent: g } = ke(), { groupedData: m } = nn(l, h), { barXScale: A, barYScale: x } = ll(c, p, a), T = v(() => typeof r.value == "string" ? [r.value] : r.value), f = v(() => {
2676
- const E = al(l, s), { barAttributeGenerator: F } = vl[E](
2682
+ Ve("chartID");
2683
+ const { emitInternalEvent: g } = ke(), { groupedData: f } = nn(l, m), { barXScale: A, barYScale: L } = aa(c, p, a), k = v(() => typeof r.value == "string" ? [r.value] : r.value), h = v(() => {
2684
+ const N = la(l, s), { barAttributeGenerator: F } = va[N](
2677
2685
  l,
2678
2686
  A,
2679
- x,
2687
+ L,
2680
2688
  a,
2681
2689
  u,
2682
- T.value
2690
+ k.value
2683
2691
  );
2684
2692
  return F;
2685
- }), O = v(() => {
2693
+ }), x = v(() => {
2686
2694
  if (i.value)
2687
2695
  return a.value === D.HORIZONTAL ? "width" : "height";
2688
2696
  });
2689
- async function N(E) {
2690
- o("lume__internal--hover", E), g("lume__internal--hover", E);
2697
+ async function E(N) {
2698
+ o("lume__internal--hover", N), g("lume__internal--hover", N);
2691
2699
  }
2692
- return (E, F) => (_(), $("g", cl, [
2693
- (_(!0), $(ee, null, W(d(m), (w, C) => (_(), $("g", {
2700
+ return (N, F) => (_(), $("g", ca, [
2701
+ (_(!0), $(ee, null, z(d(f), (w, C) => (_(), $("g", {
2694
2702
  key: C,
2695
- onMouseenter: (U) => N(C)
2703
+ onMouseenter: (U) => E(C)
2696
2704
  }, [
2697
- (_(!0), $(ee, null, W(w, (U, X) => (_(), J(d(dt), j(f.value(U, X, C, w), {
2705
+ (_(!0), $(ee, null, z(w, (U, X) => (_(), J(d(dt), j(h.value(U, X, C, w), {
2698
2706
  key: `bar-${X}`,
2699
- transition: O.value,
2707
+ transition: x.value,
2700
2708
  "data-j-lume-bar": "",
2701
2709
  onClick: (q) => o("bar-click", {
2702
2710
  index: C,
@@ -2704,10 +2712,10 @@ const cl = {
2704
2712
  event: q
2705
2713
  })
2706
2714
  }), null, 16, ["transition", "onClick"]))), 128))
2707
- ], 40, dl))), 128))
2715
+ ], 40, da))), 128))
2708
2716
  ]));
2709
2717
  }
2710
- }), ml = {
2718
+ }), ma = {
2711
2719
  [D.VERTICAL]: {
2712
2720
  withTooltip: !0,
2713
2721
  xAxisOptions: {},
@@ -2720,35 +2728,35 @@ const cl = {
2720
2728
  yAxisOptions: { gridLines: !1 },
2721
2729
  margins: Le.HORIZONTAL
2722
2730
  }
2723
- }, Fl = /* @__PURE__ */ Z({
2731
+ }, Fa = /* @__PURE__ */ Z({
2724
2732
  __name: "lume-single-bar-chart",
2725
2733
  props: {
2726
2734
  ...Ne(ut)
2727
2735
  },
2728
2736
  setup(e, { emit: n }) {
2729
2737
  const t = e, { componentEventPropagator: o } = ke(), l = Oe(ie()), { orientation: u, options: a } = ne(t), i = v(
2730
- () => ml[u.value || D.VERTICAL]
2738
+ () => ma[u.value || D.VERTICAL]
2731
2739
  // needs to be computed so that default options are reactive
2732
- ), { allOptions: s } = pe(a, i);
2740
+ ), { allOptions: s } = fe(a, i);
2733
2741
  return (c, p) => (_(), J(d(De), j(t, {
2734
2742
  "chart-type": "single-bar",
2735
2743
  options: d(s),
2736
2744
  "data-j-single-bar-chart": ""
2737
- }, le(d(o))), de({
2745
+ }, ae(d(o))), de({
2738
2746
  groups: V((r) => [
2739
- se(d(pt), j(r, { orientation: d(u) }, le(d(o))), null, 16, ["orientation"])
2747
+ se(d(ft), j(r, { orientation: d(u) }, ae(d(o))), null, 16, ["orientation"])
2740
2748
  ]),
2741
2749
  _: 2
2742
2750
  }, [
2743
- W(d(l), (r, h) => ({
2744
- name: h,
2751
+ z(d(l), (r, m) => ({
2752
+ name: m,
2745
2753
  fn: V((g) => [
2746
- S(c.$slots, h, he(ge(g || {})))
2754
+ S(c.$slots, m, he(ge(g || {})))
2747
2755
  ])
2748
2756
  }))
2749
2757
  ]), 1040, ["options"]));
2750
2758
  }
2751
- }), pl = {
2759
+ }), fa = {
2752
2760
  [D.VERTICAL]: {
2753
2761
  withTooltip: !0,
2754
2762
  xAxisOptions: {},
@@ -2762,16 +2770,16 @@ const cl = {
2762
2770
  margins: Le.HORIZONTAL,
2763
2771
  tooltipOptions: { position: "right" }
2764
2772
  }
2765
- }, zl = /* @__PURE__ */ Z({
2773
+ }, za = /* @__PURE__ */ Z({
2766
2774
  __name: "lume-grouped-bar-chart",
2767
2775
  props: {
2768
2776
  ...Ne()
2769
2777
  },
2770
2778
  setup(e, { emit: n }) {
2771
2779
  const t = e, { componentEventPropagator: o } = ke(), l = Oe(ie()), { orientation: u, options: a } = ne(t), i = v(
2772
- () => pl[u.value || D.VERTICAL]
2780
+ () => fa[u.value || D.VERTICAL]
2773
2781
  // needs to be computed so that default options are reactive
2774
- ), { allOptions: s } = pe(
2782
+ ), { allOptions: s } = fe(
2775
2783
  a,
2776
2784
  i
2777
2785
  );
@@ -2779,21 +2787,21 @@ const cl = {
2779
2787
  "chart-type": "grouped-bar",
2780
2788
  options: d(s),
2781
2789
  "data-j-grouped-bar-chart": ""
2782
- }, le(d(o))), de({
2790
+ }, ae(d(o))), de({
2783
2791
  groups: V((r) => [
2784
- se(d(pt), j(r, { type: "grouped" }, le(d(o))), null, 16)
2792
+ se(d(ft), j(r, { type: "grouped" }, ae(d(o))), null, 16)
2785
2793
  ]),
2786
2794
  _: 2
2787
2795
  }, [
2788
- W(d(l), (r, h) => ({
2789
- name: h,
2796
+ z(d(l), (r, m) => ({
2797
+ name: m,
2790
2798
  fn: V((g) => [
2791
- S(c.$slots, h, he(ge(g || {})))
2799
+ S(c.$slots, m, he(ge(g || {})))
2792
2800
  ])
2793
2801
  }))
2794
2802
  ]), 1040, ["options"]));
2795
2803
  }
2796
- }), fl = {
2804
+ }), pa = {
2797
2805
  [D.VERTICAL]: {
2798
2806
  withTooltip: !0,
2799
2807
  xAxisOptions: {},
@@ -2807,44 +2815,44 @@ const cl = {
2807
2815
  margins: Le.HORIZONTAL,
2808
2816
  tooltipOptions: { position: "right" }
2809
2817
  }
2810
- }, Wl = /* @__PURE__ */ Z({
2818
+ }, Wa = /* @__PURE__ */ Z({
2811
2819
  __name: "lume-stacked-bar-chart",
2812
2820
  props: {
2813
2821
  ...Ne()
2814
2822
  },
2815
2823
  setup(e, { emit: n }) {
2816
2824
  const t = e, { componentEventPropagator: o } = ke(), l = Oe(ie()), { data: u, orientation: a, options: i, labels: s } = ne(t), c = v(
2817
- () => fl[a.value || D.VERTICAL]
2825
+ () => pa[a.value || D.VERTICAL]
2818
2826
  // needs to be computed so that default options are reactive
2819
- ), { allOptions: p } = pe(
2827
+ ), { allOptions: p } = fe(
2820
2828
  i,
2821
2829
  c
2822
- ), { internalData: r } = mt(u), { groupedData: h } = nn(r, s), { stackedXScaleGenerator: g, stackedYScaleGenerator: m } = il(
2823
- h,
2830
+ ), { internalData: r } = mt(u), { groupedData: m } = nn(r, s), { stackedXScaleGenerator: g, stackedYScaleGenerator: f } = ia(
2831
+ m,
2824
2832
  a,
2825
2833
  i
2826
- );
2827
- return (A, x) => (_(), J(d(De), j(t, {
2834
+ ), A = v(() => t.xScale || g), L = v(() => t.yScale || f);
2835
+ return (k, h) => (_(), J(d(De), j(t, {
2828
2836
  "chart-type": "stacked-bar",
2829
2837
  options: d(p),
2830
- "x-scale": d(g),
2831
- "y-scale": d(m),
2838
+ "x-scale": A.value,
2839
+ "y-scale": L.value,
2832
2840
  "data-j-stacked-bar-chart": ""
2833
- }, le(d(o))), de({
2834
- groups: V((T) => [
2835
- se(d(pt), j(T, { type: "stacked" }, le(d(o))), null, 16)
2841
+ }, ae(d(o))), de({
2842
+ groups: V((x) => [
2843
+ se(d(ft), j(x, { type: "stacked" }, ae(d(o))), null, 16)
2836
2844
  ]),
2837
2845
  _: 2
2838
2846
  }, [
2839
- W(d(l), (T, f) => ({
2840
- name: f,
2841
- fn: V((O) => [
2842
- S(A.$slots, f, he(ge(O || {})))
2847
+ z(d(l), (x, E) => ({
2848
+ name: E,
2849
+ fn: V((N) => [
2850
+ S(k.$slots, E, he(ge(N || {})))
2843
2851
  ])
2844
2852
  }))
2845
2853
  ]), 1040, ["options", "x-scale", "y-scale"]));
2846
2854
  }
2847
- }), hl = ["d", "stroke-width"], gl = 2, _l = /* @__PURE__ */ Z({
2855
+ }), ha = ["d", "stroke-width"], ga = 2, _a = /* @__PURE__ */ Z({
2848
2856
  __name: "lume-line",
2849
2857
  props: {
2850
2858
  pathDefinition: {
@@ -2853,7 +2861,7 @@ const cl = {
2853
2861
  },
2854
2862
  width: {
2855
2863
  type: Number,
2856
- default: gl
2864
+ default: ga
2857
2865
  },
2858
2866
  color: {
2859
2867
  type: String,
@@ -2878,7 +2886,7 @@ const cl = {
2878
2886
  },
2879
2887
  emits: ["click"],
2880
2888
  setup(e, { emit: n }) {
2881
- const t = n, o = M(null);
2889
+ const t = n, o = B(null);
2882
2890
  return ye(() => Fe(o.value)), (l, u) => (_(), $("path", {
2883
2891
  ref_key: "root",
2884
2892
  ref: o,
@@ -2889,16 +2897,16 @@ const cl = {
2889
2897
  }]),
2890
2898
  d: e.pathDefinition,
2891
2899
  "stroke-width": e.width,
2892
- style: St({
2900
+ style: Rt({
2893
2901
  animationDelay: e.transition && e.animationDelay + "s",
2894
2902
  animationDuration: e.transition && e.animationDuration + "s"
2895
2903
  }),
2896
2904
  "data-j-line": "",
2897
2905
  onClick: u[0] || (u[0] = (a) => t("click", a))
2898
- }, null, 14, hl));
2906
+ }, null, 14, ha));
2899
2907
  }
2900
2908
  });
2901
- const yl = /* @__PURE__ */ te(_l, [["__scopeId", "data-v-08896455"]]), kl = ["cx", "cy", "r", "stroke-width"], bl = 4, Al = /* @__PURE__ */ Z({
2909
+ const ya = /* @__PURE__ */ te(_a, [["__scopeId", "data-v-08896455"]]), ka = ["cx", "cy", "r", "stroke-width"], ba = 4, Aa = /* @__PURE__ */ Z({
2902
2910
  __name: "lume-point",
2903
2911
  props: {
2904
2912
  x: { type: Number, required: !0 },
@@ -2909,7 +2917,7 @@ const yl = /* @__PURE__ */ te(_l, [["__scopeId", "data-v-08896455"]]), kl = ["cx
2909
2917
  },
2910
2918
  radius: {
2911
2919
  type: Number,
2912
- default: bl
2920
+ default: ba
2913
2921
  },
2914
2922
  active: {
2915
2923
  type: Boolean,
@@ -2918,7 +2926,7 @@ const yl = /* @__PURE__ */ te(_l, [["__scopeId", "data-v-08896455"]]), kl = ["cx
2918
2926
  },
2919
2927
  emits: ["click"],
2920
2928
  setup(e, { emit: n }) {
2921
- const t = e, o = n, l = M(null), u = v(() => t.radius / 2);
2929
+ const t = e, o = n, l = B(null), u = v(() => t.radius / 2);
2922
2930
  return ye(() => Fe(l.value)), (a, i) => (_(), $("circle", {
2923
2931
  ref_key: "root",
2924
2932
  ref: l,
@@ -2929,10 +2937,10 @@ const yl = /* @__PURE__ */ te(_l, [["__scopeId", "data-v-08896455"]]), kl = ["cx
2929
2937
  "stroke-width": u.value,
2930
2938
  "data-j-point": "",
2931
2939
  onClick: i[0] || (i[0] = (s) => o("click", s))
2932
- }, null, 10, kl));
2940
+ }, null, 10, ka));
2933
2941
  }
2934
2942
  });
2935
- const Tl = /* @__PURE__ */ te(Al, [["__scopeId", "data-v-b6745177"]]);
2943
+ const Ta = /* @__PURE__ */ te(Aa, [["__scopeId", "data-v-b6745177"]]);
2936
2944
  function on(e) {
2937
2945
  function n(u) {
2938
2946
  let a = null;
@@ -2957,14 +2965,14 @@ function on(e) {
2957
2965
  values: u.values.map((i, s) => {
2958
2966
  var p, r;
2959
2967
  const c = a.find(
2960
- (h) => h.includes(s)
2968
+ (m) => m.includes(s)
2961
2969
  );
2962
2970
  if (c) {
2963
- const h = c[0] - 1, g = c[c.length - 1] + 1;
2964
- let m = (p = u.values[h]) == null ? void 0 : p.value, A = (r = u.values[g]) == null ? void 0 : r.value;
2965
- return m == null && (m = A), A == null && (A = m), {
2971
+ const m = c[0] - 1, g = c[c.length - 1] + 1;
2972
+ let f = (p = u.values[m]) == null ? void 0 : p.value, A = (r = u.values[g]) == null ? void 0 : r.value;
2973
+ return f == null && (f = A), A == null && (A = f), {
2966
2974
  value: t(
2967
- m,
2975
+ f,
2968
2976
  A,
2969
2977
  c.length,
2970
2978
  c.indexOf(s)
@@ -2977,27 +2985,27 @@ function on(e) {
2977
2985
  };
2978
2986
  })) };
2979
2987
  }
2980
- function Ll(e, n) {
2988
+ function La(e, n) {
2981
2989
  const t = e.bandwidth() / 2;
2982
2990
  return (o, l) => e(e.domain()[n + (l - 1)]) + t;
2983
2991
  }
2984
- function Ol(e, n) {
2992
+ function Oa(e, n) {
2985
2993
  return (t, o) => e(n + (o - 1));
2986
2994
  }
2987
- function xl(e, n, t, o) {
2995
+ function xa(e, n, t, o) {
2988
2996
  const l = hn().x(
2989
- ve(t) ? Ll(t, e) : Ol(t, e)
2997
+ ve(t) ? La(t, e) : Oa(t, e)
2990
2998
  ).y((u) => o(u));
2991
2999
  return n.every((u) => u == null) ? null : l(n);
2992
3000
  }
2993
- const $l = {
3001
+ const $a = {
2994
3002
  class: "lume-line-group",
2995
3003
  "data-j-lume-line-group": ""
2996
- }, Il = { class: "lume-line-group__lines" }, wl = {
3004
+ }, Ia = { class: "lume-line-group__lines" }, wa = {
2997
3005
  key: 0,
2998
3006
  class: "lume-line-group__points",
2999
3007
  "data-j-lume-line-group__points": ""
3000
- }, El = 1, Nl = /* @__PURE__ */ Z({
3008
+ }, Ea = 1, Na = /* @__PURE__ */ Z({
3001
3009
  __name: "lume-line-group",
3002
3010
  props: {
3003
3011
  ...ze(),
@@ -3012,7 +3020,7 @@ const $l = {
3012
3020
  },
3013
3021
  emits: ["line-click", "point-click", "lume__internal--hover"],
3014
3022
  setup(e, { emit: n }) {
3015
- const t = e, o = n, { data: l, options: u, xScale: a, yScale: i, labels: s } = ne(t), c = Be(
3023
+ const t = e, o = n, { data: l, options: u, xScale: a, yScale: i, labels: s } = ne(t), c = Ve(
3016
3024
  "tooltipAnchorAttributes",
3017
3025
  null
3018
3026
  ), { updateTooltipAnchorAttributes: p } = Qt(
@@ -3026,7 +3034,7 @@ const $l = {
3026
3034
  return l.value;
3027
3035
  const { computedLineData: w } = on(l);
3028
3036
  return u.value.withTooltip !== !1 && (c != null && c.value) && p(w.value), w.value;
3029
- }), h = v(() => {
3037
+ }), m = v(() => {
3030
3038
  if (t.hoveredIndex === -1)
3031
3039
  return;
3032
3040
  const w = wn(
@@ -3039,9 +3047,9 @@ const $l = {
3039
3047
  // Move to X index, Vertical line to the highest point
3040
3048
  };
3041
3049
  }), g = v(
3042
- () => a.value && El / (En(a.value) - 1)
3050
+ () => a.value && Ea / (En(a.value) - 1)
3043
3051
  // Subtracting the first line (read below)
3044
- ), m = v(
3052
+ ), f = v(
3045
3053
  () => {
3046
3054
  var w;
3047
3055
  return ((w = u.value) == null ? void 0 : w.lineWidth) * 2 || void 0;
@@ -3049,100 +3057,100 @@ const $l = {
3049
3057
  // If no `lineWidth`, returns NaN which needs to be undefined
3050
3058
  ), A = v(
3051
3059
  () => a.value.bandwidth() / 2
3052
- ), x = v(() => a.value.domain()), T = v(
3060
+ ), L = v(() => a.value.domain()), k = v(
3053
3061
  () => u.value.withPoints ?? t.withPoints
3054
3062
  );
3055
- function f(w) {
3063
+ function h(w) {
3056
3064
  return r.value[w].values;
3057
3065
  }
3058
- function O(w, C) {
3066
+ function x(w, C) {
3059
3067
  var X, q;
3060
3068
  const U = w === 0 ? [] : [
3061
- (X = f(C)[w - 1]) == null ? void 0 : X.value,
3062
- (q = f(C)[w]) == null ? void 0 : q.value
3069
+ (X = h(C)[w - 1]) == null ? void 0 : X.value,
3070
+ (q = h(C)[w]) == null ? void 0 : q.value
3063
3071
  ];
3064
- return xl(
3072
+ return xa(
3065
3073
  w,
3066
3074
  U,
3067
3075
  a.value,
3068
3076
  i.value
3069
3077
  ) || "";
3070
3078
  }
3071
- function N(w) {
3079
+ function E(w) {
3072
3080
  return {
3073
3081
  animationDelay: w < 2 ? 0 : (w - 1) * g.value,
3074
3082
  animationDuration: g.value
3075
3083
  };
3076
3084
  }
3077
- function E(w, C) {
3085
+ function N(w, C) {
3078
3086
  var X;
3079
- const U = (X = f(C)[w]) == null ? void 0 : X.value;
3087
+ const U = (X = h(C)[w]) == null ? void 0 : X.value;
3080
3088
  return {
3081
- x: ve(a.value) ? t.xScale(x.value[w]) + A.value : t.xScale(w),
3089
+ x: ve(a.value) ? t.xScale(L.value[w]) + A.value : t.xScale(w),
3082
3090
  y: U === null ? i.value(i.value.domain()[1]) : i.value(U)
3083
3091
  };
3084
3092
  }
3085
3093
  function F(w) {
3086
3094
  return t.hoveredIndex === w;
3087
3095
  }
3088
- return (w, C) => (_(), $("g", $l, [
3089
- G("path", j(h.value, {
3096
+ return (w, C) => (_(), $("g", $a, [
3097
+ G("path", j(m.value, {
3090
3098
  class: "lume-line-group__overlay-line",
3091
3099
  "data-j-lume-line-group__overlay-line": ""
3092
3100
  }), null, 16),
3093
- (_(!0), $(ee, null, W(r.value, (U, X) => (_(), $("g", {
3101
+ (_(!0), $(ee, null, z(r.value, (U, X) => (_(), $("g", {
3094
3102
  key: U.label,
3095
3103
  class: "lume-line-group__group"
3096
3104
  }, [
3097
- G("g", Il, [
3098
- (_(!0), $(ee, null, W(U.values, (q, P) => (_(), J(d(yl), j(N(P), {
3105
+ G("g", Ia, [
3106
+ (_(!0), $(ee, null, z(U.values, (q, P) => (_(), J(d(ya), j(E(P), {
3099
3107
  key: `line-${P}`,
3100
3108
  color: U.color,
3101
3109
  dashed: U.isDashed(P),
3102
- "path-definition": O(P, X),
3110
+ "path-definition": x(P, X),
3103
3111
  transition: e.transition,
3104
3112
  width: d(u).lineWidth,
3105
3113
  onClick: (re) => o("line-click", { index: P, datasetIndex: X, event: re })
3106
3114
  }), null, 16, ["color", "dashed", "path-definition", "transition", "width", "onClick"]))), 128))
3107
3115
  ]),
3108
- T.value ? (_(), $("g", wl, [
3109
- (_(!0), $(ee, null, W(U.values, (q, P) => (_(), J(d(Tl), j(E(P, X), {
3116
+ k.value ? (_(), $("g", wa, [
3117
+ (_(!0), $(ee, null, z(U.values, (q, P) => (_(), J(d(Ta), j(N(P, X), {
3110
3118
  key: `point-${P}`,
3111
3119
  active: F(P),
3112
3120
  color: U.color,
3113
3121
  index: P,
3114
- radius: m.value,
3122
+ radius: f.value,
3115
3123
  onClick: (re) => o("point-click", { index: P, datasetIndex: X, event: re })
3116
3124
  }), null, 16, ["active", "color", "index", "radius", "onClick"]))), 128))
3117
- ])) : z("", !0)
3125
+ ])) : W("", !0)
3118
3126
  ]))), 128))
3119
3127
  ]));
3120
3128
  }
3121
3129
  });
3122
- const an = /* @__PURE__ */ te(Nl, [["__scopeId", "data-v-44ba7be1"]]), Dl = {
3130
+ const ln = /* @__PURE__ */ te(Na, [["__scopeId", "data-v-44ba7be1"]]), Da = {
3123
3131
  margins: Le.VERTICAL,
3124
3132
  startOnZero: !0,
3125
3133
  withTooltip: !0,
3126
3134
  xAxisOptions: {},
3127
3135
  yAxisOptions: { gridLines: !0 }
3128
- }, Zl = /* @__PURE__ */ Z({
3136
+ }, Za = /* @__PURE__ */ Z({
3129
3137
  __name: "lume-line-chart",
3130
3138
  props: {
3131
3139
  ...Ne(null, !1)
3132
3140
  },
3133
3141
  setup(e, { emit: n }) {
3134
- const t = e, { componentEventPropagator: o } = ke(), l = Oe(ie()), { options: u } = ne(t), { allOptions: a } = pe(u, Dl);
3142
+ const t = e, { componentEventPropagator: o } = ke(), l = Oe(ie()), { options: u } = ne(t), { allOptions: a } = fe(u, Da);
3135
3143
  return (i, s) => (_(), J(d(De), j(t, {
3136
3144
  "chart-type": "line",
3137
3145
  options: d(a),
3138
3146
  "data-j-lume-line-chart": ""
3139
- }, le(d(o))), de({
3147
+ }, ae(d(o))), de({
3140
3148
  groups: V((c) => [
3141
- se(d(an), j(c, le(d(o))), null, 16)
3149
+ se(d(ln), j(c, ae(d(o))), null, 16)
3142
3150
  ]),
3143
3151
  _: 2
3144
3152
  }, [
3145
- W(d(l), (c, p) => ({
3153
+ z(d(l), (c, p) => ({
3146
3154
  name: p,
3147
3155
  fn: V((r) => [
3148
3156
  S(i.$slots, p, he(ge(r || {})))
@@ -3151,7 +3159,7 @@ const an = /* @__PURE__ */ te(Nl, [["__scopeId", "data-v-44ba7be1"]]), Dl = {
3151
3159
  ]), 1040, ["options"]));
3152
3160
  }
3153
3161
  });
3154
- function Hl(e) {
3162
+ function Ha(e) {
3155
3163
  return { areaPathDefinition: v(
3156
3164
  () => function(t, o) {
3157
3165
  if (!t || !o || ve(t) || ve(o))
@@ -3161,7 +3169,7 @@ function Hl(e) {
3161
3169
  }
3162
3170
  ) };
3163
3171
  }
3164
- const Ml = {
3172
+ const Ma = {
3165
3173
  margins: {
3166
3174
  top: 0,
3167
3175
  right: 0,
@@ -3175,79 +3183,86 @@ const Ml = {
3175
3183
  tooltipOptions: {
3176
3184
  showTitle: !1
3177
3185
  }
3178
- }, Bl = ["d"], Rl = /* @__PURE__ */ Z({
3186
+ }, Ba = ["d"], Ra = /* @__PURE__ */ Z({
3179
3187
  __name: "lume-sparkline-chart",
3180
3188
  props: {
3181
3189
  ...vt(null),
3182
- ...Re()
3190
+ ...Be()
3183
3191
  },
3184
3192
  setup(e, { expose: n, emit: t }) {
3185
- const o = e, { componentEventPropagator: l } = ke(), u = Oe(ie()), { data: a, options: i } = ne(o), { internalData: s } = mt(a), { allOptions: c } = pe(i, Ml), { computedLineData: p } = on(s), { areaPathDefinition: r } = Hl(p), h = v(() => s.value[0].color), g = v(
3186
- () => a.value[0].areaColor || h.value
3193
+ const o = e, { componentEventPropagator: l } = ke(), u = Oe(ie()), { data: a, options: i } = ne(o), { internalData: s } = mt(a), { allOptions: c } = fe(i, Ma), { computedLineData: p } = on(s), { areaPathDefinition: r } = Ha(p), m = v(() => {
3194
+ var L, k;
3195
+ return (k = (L = s.value) == null ? void 0 : L[0]) == null ? void 0 : k.color;
3196
+ }), g = v(
3197
+ () => {
3198
+ var L, k;
3199
+ return ((k = (L = a.value) == null ? void 0 : L[0]) == null ? void 0 : k.areaColor) || m.value;
3200
+ }
3187
3201
  );
3188
- function m(x) {
3202
+ function f(L) {
3189
3203
  return {
3190
- ...x,
3204
+ ...L,
3191
3205
  noMinSize: !0
3192
3206
  };
3193
3207
  }
3194
- function A(x, T, f) {
3195
- return Me().range([0, f.width]).domain([0, x[0].values.length - 1]);
3208
+ function A(L, k, h) {
3209
+ if (L.length)
3210
+ return Me().range([0, h.width]).domain([0, L[0].values.length - 1]);
3196
3211
  }
3197
3212
  return n({
3198
3213
  areaPathDefinition: r
3199
- }), (x, T) => (_(), J(d(De), j(o, {
3214
+ }), (L, k) => (_(), J(d(De), j(o, {
3200
3215
  "chart-type": "line",
3201
- options: m(d(c)),
3216
+ options: f(d(c)),
3202
3217
  "x-scale": A
3203
- }, le(d(l))), de({
3204
- groups: V((f) => [
3218
+ }, ae(d(l))), de({
3219
+ groups: V((h) => [
3205
3220
  d(c).showArea ? (_(), $("path", {
3206
3221
  key: 0,
3207
3222
  class: oe([
3208
3223
  "sparkline-chart__area",
3209
3224
  d(i).withTransition !== !1 ? "sparkline-chart__area--transition" : "",
3210
- `lume-fill--${g.value || h.value}`,
3225
+ `lume-fill--${g.value || m.value}`,
3211
3226
  "lume-fill--faded"
3212
3227
  ]),
3213
- d: d(r)(f.xScale, f.yScale),
3228
+ d: d(r)(h.xScale, h.yScale),
3214
3229
  "data-j-sparkline__area": ""
3215
- }, null, 10, Bl)) : z("", !0),
3216
- se(d(an), j(f, { "with-points": !1 }, le(d(l))), null, 16)
3230
+ }, null, 10, Ba)) : W("", !0),
3231
+ se(d(ln), j(h, { "with-points": !1 }, ae(d(l))), null, 16)
3217
3232
  ]),
3218
3233
  _: 2
3219
3234
  }, [
3220
- W(d(u), (f, O) => ({
3221
- name: O,
3222
- fn: V((N) => [
3223
- S(x.$slots, O, he(ge(N || {})), void 0, !0)
3235
+ z(d(u), (h, x) => ({
3236
+ name: x,
3237
+ fn: V((E) => [
3238
+ S(L.$slots, x, he(ge(E || {})), void 0, !0)
3224
3239
  ])
3225
3240
  }))
3226
3241
  ]), 1040, ["options"]));
3227
3242
  }
3228
3243
  });
3229
- const Ul = /* @__PURE__ */ te(Rl, [["__scopeId", "data-v-c681fff6"]]);
3244
+ const Ua = /* @__PURE__ */ te(Ra, [["__scopeId", "data-v-bda226a1"]]);
3230
3245
  export {
3231
- Vl as LumeAlluvialDiagram,
3232
- qa as LumeAlluvialGroup,
3233
- _a as LumeAlluvialNodeLabel,
3234
- ba as LumeAlluvialNodeValue,
3235
- At as LumeAxis,
3246
+ Va as LumeAlluvialDiagram,
3247
+ ql as LumeAlluvialGroup,
3248
+ _l as LumeAlluvialNodeLabel,
3249
+ bl as LumeAlluvialNodeValue,
3250
+ bt as LumeAxis,
3236
3251
  dt as LumeBar,
3237
- Pl as LumeBarChart,
3238
- pt as LumeBarGroup,
3252
+ Pa as LumeBarChart,
3253
+ ft as LumeBarGroup,
3239
3254
  De as LumeChart,
3240
3255
  uo as LumeChartContainer,
3241
- Tt as LumeChartLegend,
3242
- zl as LumeGroupedBarChart,
3243
- yl as LumeLine,
3244
- Zl as LumeLineChart,
3245
- an as LumeLineGroup,
3256
+ At as LumeChartLegend,
3257
+ za as LumeGroupedBarChart,
3258
+ ya as LumeLine,
3259
+ Za as LumeLineChart,
3260
+ ln as LumeLineGroup,
3246
3261
  Wo as LumeOverlayGroup,
3247
- Tl as LumePoint,
3248
- Fl as LumeSingleBarChart,
3249
- Ul as LumeSparklineChart,
3250
- Wl as LumeStackedBarChart,
3262
+ Ta as LumePoint,
3263
+ Fa as LumeSingleBarChart,
3264
+ Ua as LumeSparklineChart,
3265
+ Wa as LumeStackedBarChart,
3251
3266
  Eo as LumeTooltip,
3252
3267
  To as LumeTooltipItem,
3253
3268
  _o as LumeTooltipSummary,