@adyen/lume-vue3 1.0.0 → 1.2.0

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,12 +1,12 @@
1
- import { defineComponent as Z, ref as S, openBlock as h, createElementBlock as T, mergeProps as C, createElementVNode as j, toDisplayString as q, createCommentVNode as P, isRef as At, computed as p, watch as U, toRefs as Q, inject as He, reactive as Be, onMounted as pe, unref as l, Fragment as K, renderList as z, createBlock as W, normalizeClass as ee, normalizeStyle as Tt, onBeforeUnmount as Lt, watchEffect as Ot, renderSlot as R, createTextVNode as de, useSlots as ne, withDirectives as Kt, withCtx as V, createSlots as le, vShow as Jt, pushScopeId as Qt, popScopeId as qt, provide as Ce, createVNode as oe, normalizeProps as ue, guardReactiveProps as ie, defineAsyncComponent as je, resolveDynamicComponent as en } from "vue";
2
- import { format as tn, ticks as nn, scaleBand as Le, scaleLinear as Oe, link as on, line as an, area as rn } from "d3";
3
- import { createPopper as ln } from "@popperjs/core";
4
- import { sankeyLinkHorizontal as un, sankey as sn, sankeyJustify as cn } from "d3-sankey";
5
- const dn = {
1
+ import { defineComponent as Z, ref as R, openBlock as _, createElementBlock as L, mergeProps as C, createElementVNode as G, toDisplayString as te, createCommentVNode as F, isRef as Ot, computed as p, watch as X, toRefs as q, inject as Be, reactive as Re, onMounted as pe, unref as l, Fragment as J, renderList as z, createBlock as W, normalizeClass as ee, normalizeStyle as $t, onBeforeUnmount as xt, watchEffect as wt, renderSlot as M, createTextVNode as de, useSlots as oe, withDirectives as en, withCtx as V, createSlots as ue, vShow as tn, pushScopeId as nn, popScopeId as on, provide as Ge, createVNode as ae, normalizeProps as ie, guardReactiveProps as se, defineAsyncComponent as je, resolveDynamicComponent as an } from "vue";
2
+ import { format as rn, ticks as ln, scaleBand as $e, scaleLinear as xe, link as un, line as sn, area as cn } from "d3";
3
+ import { createPopper as dn } from "@popperjs/core";
4
+ import { sankeyLinkHorizontal as vn, sankey as pn, sankeyJustify as fn } from "d3-sankey";
5
+ const mn = {
6
6
  class: "axis__tick-label lume-typography--axis",
7
7
  "pointer-events": "all",
8
8
  "data-j-axis__tick-label": ""
9
- }, vn = /* @__PURE__ */ Z({
9
+ }, hn = /* @__PURE__ */ Z({
10
10
  __name: "lume-tick",
11
11
  props: {
12
12
  value: {
@@ -44,8 +44,8 @@ const dn = {
44
44
  },
45
45
  emits: ["click", "mouseenter"],
46
46
  setup(e, { expose: t, emit: n }) {
47
- const o = S(null);
48
- return t({ ref: o }), (r, a) => (h(), T("g", C(e.group, {
47
+ const o = R(null);
48
+ return t({ ref: o }), (r, a) => (_(), L("g", C(e.group, {
49
49
  class: ["axis__tick", {
50
50
  "axis__tick--hovered": e.isHovered,
51
51
  "axis__tick--hidden": e.isHidden
@@ -54,27 +54,27 @@ const dn = {
54
54
  onMouseenter: a[0] || (a[0] = (u) => n("mouseenter", u)),
55
55
  onClick: a[1] || (a[1] = (u) => n("click", u))
56
56
  }), [
57
- j("g", dn, [
58
- j("rect", C(e.ghost, {
57
+ G("g", mn, [
58
+ G("rect", C(e.ghost, {
59
59
  class: "axis__ghost",
60
60
  fill: "url(#lume-tick-gradient)"
61
61
  }), null, 16),
62
- j("text", C(e.label, {
62
+ G("text", C(e.label, {
63
63
  ref_key: "labelRef",
64
64
  ref: o,
65
65
  class: "axis__label"
66
- }), q(e.value), 17)
66
+ }), te(e.value), 17)
67
67
  ]),
68
- e.withGridlines ? (h(), T("line", C({ key: 0 }, e.gridline, { class: "axis__grid-line" }), null, 16)) : P("", !0)
68
+ e.withGridlines ? (_(), L("line", C({ key: 0 }, e.gridline, { class: "axis__grid-line" }), null, 16)) : F("", !0)
69
69
  ], 16));
70
70
  }
71
71
  });
72
- const J = (e, t) => {
72
+ const Q = (e, t) => {
73
73
  const n = e.__vccOpts || e;
74
74
  for (const [o, r] of t)
75
75
  n[o] = r;
76
76
  return n;
77
- }, it = /* @__PURE__ */ J(vn, [["__scopeId", "data-v-59ddc0a6"]]), pn = [
77
+ }, ct = /* @__PURE__ */ Q(hn, [["__scopeId", "data-v-59ddc0a6"]]), gn = [
78
78
  "controls",
79
79
  "legend",
80
80
  "axes",
@@ -82,41 +82,41 @@ const J = (e, t) => {
82
82
  "tooltip",
83
83
  "tooltip-content"
84
84
  ];
85
- function $t() {
85
+ function It() {
86
86
  return process.env.NODE_ENV === "production";
87
87
  }
88
- function xt(e) {
88
+ function Et(e) {
89
89
  return (e == null ? void 0 : e.map(
90
90
  (t) => t.values.map((n) => n == null ? void 0 : n.value).flat()
91
91
  ).flat()) || [];
92
92
  }
93
- function Ke(e) {
93
+ function Je(e) {
94
94
  return e.length === 1;
95
95
  }
96
- function fn(e) {
96
+ function _n(e) {
97
97
  return !!e && e.every(
98
98
  (t) => "color" in t
99
99
  );
100
100
  }
101
- function Ge(e) {
101
+ function Ve(e) {
102
102
  return !!e && typeof e == "object" && !Array.isArray(e);
103
103
  }
104
- function wt(e, t) {
104
+ function Nt(e, t) {
105
105
  const n = { ...e };
106
106
  return Object.entries(t).forEach(([o, r]) => {
107
- n[o] = Ge(e[o]) && Ge(r) ? wt(e[o], r) : r;
107
+ n[o] = Ve(e[o]) && Ve(r) ? Nt(e[o], r) : r;
108
108
  }), n;
109
109
  }
110
- function hn(e) {
111
- return e != null && Ge(e) && "value" in e;
110
+ function yn(e) {
111
+ return e != null && Ve(e) && "value" in e;
112
112
  }
113
- function ge(e) {
113
+ function _e(e) {
114
114
  return (e == null ? void 0 : e.bandwidth) !== void 0;
115
115
  }
116
- function mn(e) {
117
- return ge(e) ? e.step() : Math.max(...e.range()) / Math.max(...e.domain());
116
+ function kn(e) {
117
+ return _e(e) ? e.step() : Math.max(...e.range()) / Math.max(...e.domain());
118
118
  }
119
- const gn = (e, t) => {
119
+ const bn = (e, t) => {
120
120
  if (!e)
121
121
  throw new Error("Data is not a valid array");
122
122
  if (e.length === 0)
@@ -126,17 +126,17 @@ const gn = (e, t) => {
126
126
  throw new Error("Index exceeds length of at least one of the datasets");
127
127
  });
128
128
  };
129
- function _n(e, t) {
129
+ function An(e, t) {
130
130
  var n;
131
- return gn(e, t), ((n = e.reduce(
131
+ return bn(e, t), ((n = e.reduce(
132
132
  (o, r) => {
133
133
  var a, u;
134
134
  return (((a = o.values[t]) == null ? void 0 : a.value) ?? 0) > (((u = r.values[t]) == null ? void 0 : u.value) ?? 0) ? o : r;
135
135
  }
136
136
  ).values[t]) == null ? void 0 : n.value) || 0;
137
137
  }
138
- function Ve(e) {
139
- const t = At(e) ? e.value : e;
138
+ function Pe(e) {
139
+ const t = Ot(e) ? e.value : e;
140
140
  if (!t)
141
141
  throw new Error("No empty array can be created from specified data value");
142
142
  const n = Math.max(
@@ -145,17 +145,17 @@ function Ve(e) {
145
145
  );
146
146
  return Array(n).fill(null);
147
147
  }
148
- function yn(e) {
149
- return ge(e) ? e.domain().length : Math.max(...e.domain());
148
+ function Tn(e) {
149
+ return _e(e) ? e.domain().length : Math.max(...e.domain());
150
150
  }
151
- function kn(e, t) {
151
+ function Ln(e, t) {
152
152
  return (n) => Math.round(e * (1 - n) + t * n);
153
153
  }
154
- function bn(e, t, n) {
154
+ function On(e, t, n) {
155
155
  const o = n ? e.length - t : t, r = e.slice(0, o);
156
156
  return e.slice(o).concat(r);
157
157
  }
158
- function _e(e) {
158
+ function ye(e) {
159
159
  if (e.groups) {
160
160
  const t = Object.keys(e);
161
161
  return Object.assign(
@@ -165,30 +165,30 @@ function _e(e) {
165
165
  }
166
166
  return e;
167
167
  }
168
- function An(e) {
168
+ function $n(e) {
169
169
  return Object.assign(
170
170
  {},
171
171
  ...Object.keys(e).map(
172
- (t) => pn.includes(t) ? {} : { [t]: e[t] }
172
+ (t) => gn.includes(t) ? {} : { [t]: e[t] }
173
173
  )
174
174
  );
175
175
  }
176
- const Tn = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce(
176
+ const xn = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce(
177
177
  (t, n) => t += (n &= 63) < 36 ? n.toString(36) : n < 62 ? (n - 26).toString(36).toUpperCase() : n > 62 ? "-" : "_",
178
178
  ""
179
179
  );
180
180
  var ve = /* @__PURE__ */ ((e) => (e.DatasetLength = `Our guidelines highly recommend not having more than 5 datasets in one chart.
181
181
  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))(ve || {});
182
- const Ln = "[lume] ";
182
+ const wn = "[lume] ";
183
183
  function he(e, t = !0) {
184
- t && $t() || console.warn(Ln + "Warning: " + e);
184
+ t && It() || console.warn(wn + "Warning: " + e);
185
185
  }
186
- const De = (e) => {
186
+ const He = (e) => {
187
187
  let t = null;
188
188
  switch (typeof e) {
189
189
  case "string":
190
190
  try {
191
- t = tn(e);
191
+ t = rn(e);
192
192
  } catch {
193
193
  he(ve.InvalidFormat), t = null;
194
194
  }
@@ -203,29 +203,29 @@ const De = (e) => {
203
203
  return t ? t(...o) : o[0];
204
204
  }
205
205
  return n;
206
- }, $e = () => ({
206
+ }, we = () => ({
207
207
  options: {
208
208
  type: Object,
209
209
  default: () => ({})
210
210
  }
211
211
  });
212
- function se(e, t) {
212
+ function ce(e, t) {
213
213
  return { allOptions: p(() => {
214
- const o = At(t) ? t == null ? void 0 : t.value : t;
215
- return o ? wt(o, e.value) : e.value;
214
+ const o = Ot(t) ? t == null ? void 0 : t.value : t;
215
+ return o ? Nt(o, e.value) : e.value;
216
216
  }) };
217
217
  }
218
- const On = 0.15;
219
- function $n(e, t, n) {
220
- const o = S(), r = p(() => Math.max(...e.value.range())), a = p(() => t.value.length);
218
+ const In = 0.15;
219
+ function En(e, t, n) {
220
+ const o = R(), r = p(() => Math.max(...e.value.range())), a = p(() => t.value.length);
221
221
  function u() {
222
222
  if (!t.value)
223
223
  return;
224
224
  const i = t.value.reduce(
225
- (d, v) => d + v.ref.getBoundingClientRect().width,
225
+ (v, d) => v + d.ref.getBoundingClientRect().width,
226
226
  0
227
227
  ), c = Math.ceil(i / a.value);
228
- o.value = c + c * On;
228
+ o.value = c + c * In;
229
229
  }
230
230
  function s(i) {
231
231
  if (!t.value)
@@ -233,20 +233,20 @@ function $n(e, t, n) {
233
233
  const c = t.value.length;
234
234
  if (i === 0)
235
235
  return !0;
236
- const d = r.value / c, v = typeof n == "number" && n > 0 && n + 1 || Math.ceil(o.value / d);
237
- return i % v === 0;
236
+ const v = r.value / c, d = typeof n == "number" && n > 0 && n + 1 || Math.ceil(o.value / v);
237
+ return i % d === 0;
238
238
  }
239
- return U(t, u), { showTick: s };
239
+ return X(t, u), { showTick: s };
240
240
  }
241
- var ae = /* @__PURE__ */ ((e) => (e.Skyblue = "skyblue", e.Royalblue = "royalblue", e.Violet = "violet", e.Darkteal = "darkteal", e.Gold = "gold", e))(ae || {}), It = /* @__PURE__ */ ((e) => (e.Skyblue10 = "skyblue-10", e.Skyblue20 = "skyblue-20", e.Skyblue30 = "skyblue-30", e.Skyblue40 = "skyblue-40", e.Skyblue50 = "skyblue-50", e.Skyblue60 = "skyblue-60", e.Skyblue70 = "skyblue-70", e.Skyblue80 = "skyblue-80", e.Skyblue90 = "skyblue-90", e.Skyblue100 = "skyblue-100", e.Royalblue10 = "royalblue-10", e.Royalblue20 = "royalblue-20", e.Royalblue30 = "royalblue-30", e.Royalblue40 = "royalblue-40", e.Royalblue50 = "royalblue-50", e.Royalblue60 = "royalblue-60", e.Royalblue70 = "royalblue-70", e.Royalblue80 = "royalblue-80", e.Royalblue90 = "royalblue-90", e.Royalblue100 = "royalblue-100", e.Violet10 = "violet-10", e.Violet20 = "violet-20", e.Violet30 = "violet-30", e.Violet40 = "violet-40", e.Violet50 = "violet-50", e.Violet60 = "violet-60", e.Violet70 = "violet-70", e.Violet80 = "violet-80", e.Violet90 = "violet-90", e.Violet100 = "violet-100", e.Darkteal10 = "darkteal-10", e.Darkteal20 = "darkteal-20", e.Darkteal30 = "darkteal-30", e.Darkteal40 = "darkteal-40", e.Darkteal50 = "darkteal-50", e.Darkteal60 = "darkteal-60", e.Darkteal70 = "darkteal-70", e.Darkteal80 = "darkteal-80", e.Darkteal90 = "darkteal-90", e.Darkteal100 = "darkteal-100", e.Gold10 = "gold-10", e.Gold20 = "gold-20", e.Gold30 = "gold-30", e.Gold40 = "gold-40", e.Gold50 = "gold-50", e.Gold60 = "gold-60", e.Gold70 = "gold-70", e.Gold80 = "gold-80", e.Gold90 = "gold-90", e.Gold100 = "gold-100", e))(It || {}), Je = /* @__PURE__ */ ((e) => (e.SkyTeal = "skyblue-darkteal", e.VioletRoyal = "violet-royalblue", e.VioletTeal = "violet-darkteal", e.GoldTeal = "gold-darkteal", e.GoldRoyal = "gold-royalblue", e))(Je || {}), Et = /* @__PURE__ */ ((e) => (e.Grey = "grey", e.Green = "green", e.Orange = "orange", e.Red = "red", e))(Et || {}), Qe = /* @__PURE__ */ ((e) => (e["01"] = "01", e["02"] = "02", e["03"] = "03", e["04"] = "04", e["05"] = "05", e["06"] = "06", e["07"] = "07", e["08"] = "08", e["09"] = "09", e))(Qe || {});
242
- const D = {
241
+ var re = /* @__PURE__ */ ((e) => (e.Skyblue = "skyblue", e.Royalblue = "royalblue", e.Violet = "violet", e.Darkteal = "darkteal", e.Gold = "gold", e))(re || {}), Dt = /* @__PURE__ */ ((e) => (e.Skyblue10 = "skyblue-10", e.Skyblue20 = "skyblue-20", e.Skyblue30 = "skyblue-30", e.Skyblue40 = "skyblue-40", e.Skyblue50 = "skyblue-50", e.Skyblue60 = "skyblue-60", e.Skyblue70 = "skyblue-70", e.Skyblue80 = "skyblue-80", e.Skyblue90 = "skyblue-90", e.Skyblue100 = "skyblue-100", e.Royalblue10 = "royalblue-10", e.Royalblue20 = "royalblue-20", e.Royalblue30 = "royalblue-30", e.Royalblue40 = "royalblue-40", e.Royalblue50 = "royalblue-50", e.Royalblue60 = "royalblue-60", e.Royalblue70 = "royalblue-70", e.Royalblue80 = "royalblue-80", e.Royalblue90 = "royalblue-90", e.Royalblue100 = "royalblue-100", e.Violet10 = "violet-10", e.Violet20 = "violet-20", e.Violet30 = "violet-30", e.Violet40 = "violet-40", e.Violet50 = "violet-50", e.Violet60 = "violet-60", e.Violet70 = "violet-70", e.Violet80 = "violet-80", e.Violet90 = "violet-90", e.Violet100 = "violet-100", e.Darkteal10 = "darkteal-10", e.Darkteal20 = "darkteal-20", e.Darkteal30 = "darkteal-30", e.Darkteal40 = "darkteal-40", e.Darkteal50 = "darkteal-50", e.Darkteal60 = "darkteal-60", e.Darkteal70 = "darkteal-70", e.Darkteal80 = "darkteal-80", e.Darkteal90 = "darkteal-90", e.Darkteal100 = "darkteal-100", e.Gold10 = "gold-10", e.Gold20 = "gold-20", e.Gold30 = "gold-30", e.Gold40 = "gold-40", e.Gold50 = "gold-50", e.Gold60 = "gold-60", e.Gold70 = "gold-70", e.Gold80 = "gold-80", e.Gold90 = "gold-90", e.Gold100 = "gold-100", e))(Dt || {}), Qe = /* @__PURE__ */ ((e) => (e.SkyTeal = "skyblue-darkteal", e.VioletRoyal = "violet-royalblue", e.VioletTeal = "violet-darkteal", e.GoldTeal = "gold-darkteal", e.GoldRoyal = "gold-royalblue", e))(Qe || {}), Ht = /* @__PURE__ */ ((e) => (e.Grey = "grey", e.Green = "green", e.Orange = "orange", e.Red = "red", e))(Ht || {}), qe = /* @__PURE__ */ ((e) => (e["01"] = "01", e["02"] = "02", e["03"] = "03", e["04"] = "04", e["05"] = "05", e["06"] = "06", e["07"] = "07", e["08"] = "08", e["09"] = "09", e))(qe || {});
242
+ const H = {
243
243
  HORIZONTAL: "horizontal",
244
244
  VERTICAL: "vertical"
245
- }, xn = {
245
+ }, Nn = {
246
246
  SINGLE: "single",
247
247
  GROUPED: "grouped",
248
248
  STACKED: "stacked"
249
- }, Nt = "No data", st = 20, Dt = 0.33, Ht = 0.5, Bt = 12, xe = 8, wn = 1, In = [
249
+ }, Bt = "No data", dt = 20, Rt = 0.33, Mt = 0.5, St = 12, Ie = 8, Dn = 1, Hn = [
250
250
  "auto",
251
251
  "auto-start",
252
252
  "auto-end",
@@ -263,10 +263,10 @@ const D = {
263
263
  "left-start",
264
264
  "left-end"
265
265
  ];
266
- function Re(e) {
266
+ function Me(e) {
267
267
  e != null && e.closest("svg") || he(ve.NotContainedInSvg);
268
268
  }
269
- const Rt = {
269
+ const Ct = {
270
270
  /** Displays a line for each tick. */
271
271
  gridLines: !1,
272
272
  /** Displays the axis title. */
@@ -282,14 +282,14 @@ const Rt = {
282
282
  tickFormat: null,
283
283
  /** Space between the tick label and the axis line. */
284
284
  tickPadding: 8
285
- }, En = {
286
- ...Rt,
285
+ }, Bn = {
286
+ ...Ct,
287
287
  withTitle: !1,
288
288
  skip: !0
289
- }, Nn = {
290
- ...Rt,
289
+ }, Rn = {
290
+ ...Ct,
291
291
  gridLines: !0
292
- }, Dn = function(e, t, n) {
292
+ }, Mn = function(e, t, n) {
293
293
  const o = p(() => e.value.step() * e.value.paddingInner() / 2);
294
294
  function r(i, c) {
295
295
  return {
@@ -297,15 +297,15 @@ const Rt = {
297
297
  };
298
298
  }
299
299
  function a(i) {
300
- var d;
300
+ var v;
301
301
  const c = Math.max(
302
302
  e.value.step(),
303
- (i ? (d = i.getComputedTextLength) == null ? void 0 : d.call(i) : e.value.step()) + 20
303
+ (i ? (v = i.getComputedTextLength) == null ? void 0 : v.call(i) : e.value.step()) + 20
304
304
  );
305
305
  return {
306
306
  x: -(c - e.value.step()) / 2,
307
307
  width: c,
308
- height: n.value.tickPadding + Bt + xe
308
+ height: n.value.tickPadding + St + Ie
309
309
  };
310
310
  }
311
311
  function u() {
@@ -331,7 +331,7 @@ const Rt = {
331
331
  getTickGroupAttributes: r,
332
332
  getTickLabelAttributes: s
333
333
  };
334
- }, Hn = function(e, t, n) {
334
+ }, Sn = function(e, t, n) {
335
335
  const o = p(() => e.value.step() * e.value.paddingInner() / 2);
336
336
  function r(i, c) {
337
337
  return {
@@ -339,8 +339,8 @@ const Rt = {
339
339
  };
340
340
  }
341
341
  function a(i) {
342
- var d;
343
- const c = (i ? (d = i.getComputedTextLength) == null ? void 0 : d.call(i) : 42) + n.value.tickPadding + xe;
342
+ var v;
343
+ const c = (i ? (v = i.getComputedTextLength) == null ? void 0 : v.call(i) : 42) + n.value.tickPadding + Ie;
344
344
  return {
345
345
  x: -c,
346
346
  width: c,
@@ -369,7 +369,7 @@ const Rt = {
369
369
  getTickGroupAttributes: r,
370
370
  getTickLabelAttributes: s
371
371
  };
372
- }, Bn = function(e, t, n) {
372
+ }, Cn = function(e, t, n) {
373
373
  const o = p(() => {
374
374
  const i = e.value.ticks();
375
375
  return i.length > 1 ? e.value(i[1]) - e.value(i[0]) : 0;
@@ -381,7 +381,7 @@ const Rt = {
381
381
  }
382
382
  function a() {
383
383
  return {
384
- height: n.value.tickPadding + Bt + xe,
384
+ height: n.value.tickPadding + St + Ie,
385
385
  width: o.value,
386
386
  x: -(o.value / 2)
387
387
  };
@@ -404,7 +404,7 @@ const Rt = {
404
404
  getTickGroupAttributes: r,
405
405
  getTickLabelAttributes: s
406
406
  };
407
- }, Rn = function(e, t, n) {
407
+ }, Gn = function(e, t, n) {
408
408
  const o = p(() => {
409
409
  const i = e.value.ticks();
410
410
  return i.length > 1 ? e.value(i[1]) - e.value(i[0]) : 0;
@@ -415,8 +415,8 @@ const Rt = {
415
415
  };
416
416
  }
417
417
  function a(i) {
418
- var d;
419
- const c = (((d = i == null ? void 0 : i.getComputedTextLength) == null ? void 0 : d.call(i)) || 0) + n.value.tickPadding + xe;
418
+ var v;
419
+ const c = (((v = i == null ? void 0 : i.getComputedTextLength) == null ? void 0 : v.call(i)) || 0) + n.value.tickPadding + Ie;
420
420
  return {
421
421
  width: c,
422
422
  height: o.value,
@@ -442,33 +442,33 @@ const Rt = {
442
442
  getTickGroupAttributes: r,
443
443
  getTickLabelAttributes: s
444
444
  };
445
- }, Mn = {
446
- "x-band-scale-axis": Dn,
447
- "y-band-scale-axis": Hn,
448
- "x-linear-scale-axis": Bn,
449
- "y-linear-scale-axis": Rn
450
- }, Sn = ["transform"], Cn = { key: 0 }, jn = /* @__PURE__ */ j("linearGradient", { id: "lume-tick-gradient" }, [
451
- /* @__PURE__ */ j("stop", {
445
+ }, jn = {
446
+ "x-band-scale-axis": Mn,
447
+ "y-band-scale-axis": Sn,
448
+ "x-linear-scale-axis": Cn,
449
+ "y-linear-scale-axis": Gn
450
+ }, Vn = ["transform"], Pn = { key: 0 }, Fn = /* @__PURE__ */ G("linearGradient", { id: "lume-tick-gradient" }, [
451
+ /* @__PURE__ */ G("stop", {
452
452
  offset: "0%",
453
453
  "stop-color": "rgba(255,255,255,0)"
454
454
  }),
455
- /* @__PURE__ */ j("stop", {
455
+ /* @__PURE__ */ G("stop", {
456
456
  offset: "10%",
457
457
  "stop-color": "var(--lume-chart-background-color)"
458
458
  }),
459
- /* @__PURE__ */ j("stop", {
459
+ /* @__PURE__ */ G("stop", {
460
460
  offset: "90%",
461
461
  "stop-color": "var(--lume-chart-background-color)"
462
462
  }),
463
- /* @__PURE__ */ j("stop", {
463
+ /* @__PURE__ */ G("stop", {
464
464
  offset: "100%",
465
465
  "stop-color": "rgba(255,255,255,0)"
466
466
  })
467
- ], -1), Gn = [
468
- jn
467
+ ], -1), zn = [
468
+ Fn
469
469
  ];
470
- var Mt = /* @__PURE__ */ ((e) => (e.bandScale = "band-scale-axis", e.linearScale = "linear-scale-axis", e))(Mt || {}), St = /* @__PURE__ */ ((e) => (e.left = "left", e.bottom = "bottom", e))(St || {}), Fe = /* @__PURE__ */ ((e) => (e.x = "bottom", e.y = "left", e))(Fe || {});
471
- const ct = /* @__PURE__ */ Z({
470
+ var Gt = /* @__PURE__ */ ((e) => (e.bandScale = "band-scale-axis", e.linearScale = "linear-scale-axis", e))(Gt || {}), jt = /* @__PURE__ */ ((e) => (e.left = "left", e.bottom = "bottom", e))(jt || {}), Fe = /* @__PURE__ */ ((e) => (e.x = "bottom", e.y = "left", e))(Fe || {});
471
+ const vt = /* @__PURE__ */ Z({
472
472
  __name: "lume-axis",
473
473
  props: {
474
474
  scale: {
@@ -483,7 +483,7 @@ const ct = /* @__PURE__ */ Z({
483
483
  position: {
484
484
  type: String,
485
485
  default: void 0,
486
- validator: (e) => e in St
486
+ validator: (e) => e in jt
487
487
  },
488
488
  containerSize: {
489
489
  type: Object,
@@ -495,125 +495,125 @@ const ct = /* @__PURE__ */ Z({
495
495
  },
496
496
  orientation: {
497
497
  type: String,
498
- default: D.VERTICAL
498
+ default: H.VERTICAL
499
499
  },
500
- ...$e()
500
+ ...we()
501
501
  },
502
502
  emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
503
503
  setup(e, { emit: t }) {
504
- const n = e, o = 16, { scale: r, containerSize: a, hoveredIndex: u, options: s, orientation: i } = Q(n), c = He("isEmpty", S(!1)), d = Be({}), v = S(null), y = S(null), $ = S(null), k = p(
504
+ const n = e, o = 16, { scale: r, containerSize: a, hoveredIndex: u, options: s, orientation: i } = q(n), c = Be("isEmpty", R(!1)), v = Re({}), d = R(null), m = R(null), y = R(null), h = p(
505
505
  () => n.type ? Fe[n.type] : n.position
506
506
  ), A = p(
507
- () => n.type || (k.value === "left" ? "y" : "x")
508
- ), m = p(
509
- () => A.value === "x" && i.value === D.VERTICAL || A.value === "y" && i.value === D.HORIZONTAL
510
- ), { allOptions: _ } = se(
507
+ () => n.type || (h.value === "left" ? "y" : "x")
508
+ ), O = p(
509
+ () => A.value === "x" && i.value === H.VERTICAL || A.value === "y" && i.value === H.HORIZONTAL
510
+ ), { allOptions: f } = ce(
511
511
  s,
512
- A.value === "x" ? En : Nn
513
- ), { showTick: E } = $n(r, v, _.value.skip), N = p(() => {
514
- var g, L, f, B;
515
- return A.value === "y" && c.value ? `translate(0, ${((g = a.value) == null ? void 0 : g.height) / 2})` : A.value === "x" && c.value ? `translate(-${((L = a.value) == null ? void 0 : L.width) / 2}, ${(f = a.value) == null ? void 0 : f.height})` : `translate(0, ${A.value === "x" ? (B = a.value) == null ? void 0 : B.height : 0})`;
516
- }), I = p(() => {
517
- if (ge(r.value))
512
+ A.value === "x" ? Bn : Rn
513
+ ), { showTick: x } = En(r, d, f.value.skip), N = p(() => {
514
+ var B, k, E, g;
515
+ return A.value === "y" && c.value ? `translate(0, ${((B = a.value) == null ? void 0 : B.height) / 2})` : A.value === "x" && c.value ? `translate(-${((k = a.value) == null ? void 0 : k.width) / 2}, ${(E = a.value) == null ? void 0 : E.height})` : `translate(0, ${A.value === "x" ? (g = a.value) == null ? void 0 : g.height : 0})`;
516
+ }), $ = p(() => {
517
+ if (_e(r.value))
518
518
  return r.value.labels || r.value.domain();
519
- const { tickCount: g } = _.value, [L, f] = r.value.domain();
520
- return nn(L, f, g);
521
- }), x = p(() => {
522
- const { tickFormat: g } = _.value;
523
- return De(g);
524
- }), H = p(
525
- () => _.value.withHover && m.value && u.value > -1
526
- ), M = p(
527
- () => _.value.tickPadding + xe || o
528
- ), X = p(() => A.value === "x" ? (
519
+ const { tickCount: B } = f.value, [k, E] = r.value.domain();
520
+ return ln(k, E, B);
521
+ }), w = p(() => {
522
+ const { tickFormat: B } = f.value;
523
+ return He(B);
524
+ }), D = p(
525
+ () => f.value.withHover && O.value && u.value > -1
526
+ ), S = p(
527
+ () => f.value.tickPadding + Ie || o
528
+ ), Y = p(() => A.value === "x" ? (
529
529
  // If x axis, get the tick height
530
530
  Math.max(
531
- ...(v.value || []).map(
532
- (g) => {
533
- var L, f;
534
- return ((f = (L = g.ref).getBBox) == null ? void 0 : f.call(L).height) + M.value;
531
+ ...(d.value || []).map(
532
+ (B) => {
533
+ var k, E;
534
+ return ((E = (k = B.ref).getBBox) == null ? void 0 : E.call(k).height) + S.value;
535
535
  }
536
536
  )
537
537
  )
538
538
  ) : (
539
539
  // If y axis, get the tick width
540
540
  Math.max(
541
- ...(v.value || []).map(
542
- (g) => {
543
- var L, f;
544
- return ((f = (L = g.ref).getBBox) == null ? void 0 : f.call(L).width) + M.value;
541
+ ...(d.value || []).map(
542
+ (B) => {
543
+ var k, E;
544
+ return ((E = (k = B.ref).getBBox) == null ? void 0 : E.call(k).width) + S.value;
545
545
  }
546
546
  )
547
547
  )
548
548
  ));
549
- function Y(g) {
550
- const { showTicks: L } = _.value;
551
- return L === !1 ? "" : x.value(g);
549
+ function ne(B) {
550
+ const { showTicks: k } = f.value;
551
+ return k === !1 ? "" : w.value(B);
552
552
  }
553
- function G(g, L, f) {
554
- t("mouseenter", { index: m.value ? g : null, value: L, event: f });
553
+ function P(B, k, E) {
554
+ t("mouseenter", { index: O.value ? B : null, value: k, event: E });
555
555
  }
556
- function te(g, L, f) {
557
- t("click", { index: g, value: L, event: f });
556
+ function K(B, k, E) {
557
+ t("click", { index: B, value: k, event: E });
558
558
  }
559
- function Te(g) {
560
- var L;
561
- if (!(!v.value || !v.value.length))
562
- return (L = v.value[g]) == null ? void 0 : L.ref;
559
+ function ke(B) {
560
+ var k;
561
+ if (!(!d.value || !d.value.length))
562
+ return (k = d.value[B]) == null ? void 0 : k.ref;
563
563
  }
564
- function ce() {
565
- $.value = I.value.map(
566
- (g, L) => ({
567
- value: Y(g),
568
- group: d.getTickGroupAttributes(g, L),
569
- ghost: d.getTickGhostAttributes(Te(L)),
570
- label: d.getTickLabelAttributes(),
571
- gridline: d.getGridLinesAttributes()
564
+ function be() {
565
+ y.value = $.value.map(
566
+ (B, k) => ({
567
+ value: ne(B),
568
+ group: v.getTickGroupAttributes(B, k),
569
+ ghost: v.getTickGhostAttributes(ke(k)),
570
+ label: v.getTickLabelAttributes(),
571
+ gridline: v.getGridLinesAttributes()
572
572
  })
573
573
  );
574
574
  }
575
- function ye() {
576
- const g = r.value.step ? "bandScale" : "linearScale", L = Mn[`${A.value}-${Mt[g]}`];
577
- Object.entries(L(r, a, _) || []).forEach(
578
- ([f, B]) => {
579
- d[f] = B;
575
+ function fe() {
576
+ const B = r.value.step ? "bandScale" : "linearScale", k = jn[`${A.value}-${Gt[B]}`];
577
+ Object.entries(k(r, a, f) || []).forEach(
578
+ ([E, g]) => {
579
+ v[E] = g;
580
580
  }
581
581
  );
582
582
  }
583
- return U(r, ye, { flush: "sync", immediate: !0 }), U(r, ce, { immediate: !0 }), U(v, ce), U(X, (g) => t("lume__internal--axis-size", g)), pe(() => Re(y.value)), (g, L) => l(r) ? (h(), T("g", {
583
+ return X(r, fe, { flush: "sync", immediate: !0 }), X(r, be, { immediate: !0 }), X(d, be), X(Y, (B) => t("lume__internal--axis-size", B)), pe(() => Me(m.value)), (B, k) => l(r) ? (_(), L("g", {
584
584
  key: 0,
585
585
  ref_key: "root",
586
- ref: y,
586
+ ref: m,
587
587
  class: "axis",
588
588
  transform: l(N),
589
589
  "data-j-axis": "",
590
- onMouseleave: L[1] || (L[1] = (f) => t("mouseleave", f))
590
+ onMouseleave: k[1] || (k[1] = (E) => t("mouseleave", E))
591
591
  }, [
592
- l(A) === "x" ? (h(), T("defs", Cn, Gn)) : P("", !0),
593
- (h(!0), T(K, null, z($.value, (f, B) => (h(), W(l(it), C({
594
- key: `${f.value}_${B}`,
592
+ l(A) === "x" ? (_(), L("defs", Pn, zn)) : F("", !0),
593
+ (_(!0), L(J, null, z(y.value, (E, g) => (_(), W(l(ct), C({
594
+ key: `${E.value}_${g}`,
595
595
  ref_for: !0,
596
596
  ref_key: "tickRefs",
597
- ref: v
598
- }, f, {
599
- "is-hidden": l(_).skip && !l(E)(B),
600
- "with-gridlines": l(_).gridLines,
601
- onMouseenter: (F) => G(B, f.value, F),
602
- onClick: (F) => te(B, f.value, F)
597
+ ref: d
598
+ }, E, {
599
+ "is-hidden": l(f).skip && !l(x)(g),
600
+ "with-gridlines": l(f).gridLines,
601
+ onMouseenter: (j) => P(g, E.value, j),
602
+ onClick: (j) => K(g, E.value, j)
603
603
  }), null, 16, ["is-hidden", "with-gridlines", "onMouseenter", "onClick"]))), 128)),
604
- l(H) ? (h(), W(l(it), C({ key: 1 }, $.value[l(u)], {
604
+ l(D) ? (_(), W(l(ct), C({ key: 1 }, y.value[l(u)], {
605
605
  "with-gridlines": !1,
606
606
  "is-hovered": "",
607
- onClick: L[0] || (L[0] = (f) => te(
607
+ onClick: k[0] || (k[0] = (E) => K(
608
608
  l(u),
609
- $.value[l(u)].value,
610
- f
609
+ y.value[l(u)].value,
610
+ E
611
611
  ))
612
- }), null, 16)) : P("", !0)
613
- ], 40, Sn)) : P("", !0);
612
+ }), null, 16)) : F("", !0)
613
+ ], 40, Vn)) : F("", !0);
614
614
  }
615
615
  });
616
- function Vn(e, t, n, o) {
616
+ function Zn(e, t, n, o) {
617
617
  const r = p(() => n.value > 0 && n.value < 1), a = p(
618
618
  () => o.value > 0 && o.value < 1
619
619
  ), u = p(
@@ -625,13 +625,13 @@ function Vn(e, t, n, o) {
625
625
  );
626
626
  return { computedX: u, computedY: s, shouldHaveMinWidth: r, shouldHaveMinHeight: a };
627
627
  }
628
- function Fn(e, t, n, o) {
629
- const r = S(0), a = S(0), u = p(() => `${e.value + n.value / 2}px ${t.value + o.value / 2}px`);
628
+ function Wn(e, t, n, o) {
629
+ const r = R(0), a = R(0), u = p(() => `${e.value + n.value / 2}px ${t.value + o.value / 2}px`);
630
630
  return pe(() => {
631
631
  r.value = n.value, a.value = o.value;
632
- }), U(n, (s) => r.value = s), U(o, (s) => a.value = s), { computedWidth: r, computedHeight: a, transformOrigin: u };
632
+ }), X(n, (s) => r.value = s), X(o, (s) => a.value = s), { computedWidth: r, computedHeight: a, transformOrigin: u };
633
633
  }
634
- const Pn = ["x", "y", "width", "height"], zn = /* @__PURE__ */ Z({
634
+ const Un = ["x", "y", "width", "height"], Xn = /* @__PURE__ */ Z({
635
635
  __name: "lume-bar",
636
636
  props: {
637
637
  x: {
@@ -669,36 +669,36 @@ const Pn = ["x", "y", "width", "height"], zn = /* @__PURE__ */ Z({
669
669
  },
670
670
  emits: ["click", "mouseover", "mouseleave"],
671
671
  setup(e, { emit: t }) {
672
- const n = e, { x: o, y: r, width: a, height: u, transition: s, classList: i } = Q(n), c = S(null), d = p(
672
+ const n = e, { x: o, y: r, width: a, height: u, transition: s, classList: i } = q(n), c = R(null), v = p(
673
673
  () => typeof i.value == "string" ? [i.value] : i.value
674
- ), v = p(() => s.value === "width"), y = p(() => s.value === "height"), $ = Fn(o, r, a, u), { computedX: k, computedY: A, shouldHaveMinWidth: m, shouldHaveMinHeight: _ } = Vn(o, r, a, u), E = p(() => m.value ? 1 : (v.value ? $.computedWidth : a).value), N = p(() => _.value ? 1 : (y.value ? $.computedHeight : u).value), I = v.value || y.value ? $.transformOrigin : null;
675
- return pe(() => Re(c.value)), (x, H) => (h(), T("rect", {
674
+ ), d = p(() => s.value === "width"), m = p(() => s.value === "height"), y = Wn(o, r, a, u), { computedX: h, computedY: A, shouldHaveMinWidth: O, shouldHaveMinHeight: f } = Zn(o, r, a, u), x = p(() => O.value ? 1 : (d.value ? y.computedWidth : a).value), N = p(() => f.value ? 1 : (m.value ? y.computedHeight : u).value), $ = d.value || m.value ? y.transformOrigin : null;
675
+ return pe(() => Me(c.value)), (w, D) => (_(), L("rect", {
676
676
  ref_key: "root",
677
677
  ref: c,
678
678
  class: ee(["lume-bar", [
679
679
  {
680
680
  "lume-fill--faded": e.isFaded,
681
681
  "lume-bar--negative": e.isNegative,
682
- "lume-bar--transition-width": l(v),
683
- "lume-bar--transition-height": l(y)
682
+ "lume-bar--transition-width": l(d),
683
+ "lume-bar--transition-height": l(m)
684
684
  },
685
- ...l(d)
685
+ ...l(v)
686
686
  ]]),
687
- style: Tt({ transformOrigin: l(I) }),
688
- x: l(k),
687
+ style: $t({ transformOrigin: l($) }),
688
+ x: l(h),
689
689
  y: l(A),
690
- width: l(E),
690
+ width: l(x),
691
691
  height: l(N),
692
692
  "data-j-bar": "",
693
- onClick: H[0] || (H[0] = (M) => t("click", M)),
694
- onMouseover: H[1] || (H[1] = (M) => t("mouseover", M)),
695
- onMouseleave: H[2] || (H[2] = (M) => t("mouseleave", M))
696
- }, null, 46, Pn));
693
+ onClick: D[0] || (D[0] = (S) => t("click", S)),
694
+ onMouseover: D[1] || (D[1] = (S) => t("mouseover", S)),
695
+ onMouseleave: D[2] || (D[2] = (S) => t("mouseleave", S))
696
+ }, null, 46, Un));
697
697
  }
698
698
  });
699
- const qe = /* @__PURE__ */ J(zn, [["__scopeId", "data-v-8e8f732a"]]);
700
- function Zn() {
701
- const e = S(), t = Be({
699
+ const et = /* @__PURE__ */ Q(Xn, [["__scopeId", "data-v-8e8f732a"]]);
700
+ function Yn() {
701
+ const e = R(), t = Re({
702
702
  dimensions: {}
703
703
  }), n = new ResizeObserver((o) => {
704
704
  o.forEach((r) => {
@@ -707,11 +707,11 @@ function Zn() {
707
707
  });
708
708
  return pe(() => {
709
709
  n.observe(e.value);
710
- }), Lt(() => {
710
+ }), xt(() => {
711
711
  n.unobserve(e.value);
712
712
  }), { resizeState: t, resizeRef: e };
713
713
  }
714
- const Wn = ["height"], Un = ["transform"], Xn = /* @__PURE__ */ Z({
714
+ const Kn = ["height"], Jn = ["transform"], Qn = /* @__PURE__ */ Z({
715
715
  __name: "lume-chart-container",
716
716
  props: {
717
717
  margins: {
@@ -733,23 +733,23 @@ const Wn = ["height"], Un = ["transform"], Xn = /* @__PURE__ */ Z({
733
733
  },
734
734
  emits: ["click", "mouseenter", "mouseleave", "resize"],
735
735
  setup(e, { emit: t }) {
736
- const n = e, { margins: o, containerSize: r } = Q(n), a = S(null), { resizeRef: u, resizeState: s } = Zn(), i = p(
736
+ const n = e, { margins: o, containerSize: r } = q(n), a = R(null), { resizeRef: u, resizeState: s } = Yn(), i = p(
737
737
  () => r.value.height + o.value.top + o.value.bottom
738
738
  );
739
- return Ot(() => {
739
+ return wt(() => {
740
740
  if (!a.value)
741
741
  return;
742
- const { width: c } = s.dimensions, { height: d } = a.value.getBoundingClientRect();
743
- if (!c || !d)
742
+ const { width: c } = s.dimensions, { height: v } = a.value.getBoundingClientRect();
743
+ if (!c || !v)
744
744
  return;
745
- const v = c - o.value.left - o.value.right, y = d - o.value.top - o.value.bottom, $ = {
746
- width: v > 0 ? v : 0,
747
- height: y > 0 ? y : 0,
745
+ const d = c - o.value.left - o.value.right, m = v - o.value.top - o.value.bottom, y = {
746
+ width: d > 0 ? d : 0,
747
+ height: m > 0 ? m : 0,
748
748
  outerWidth: c,
749
- outerHeight: d
749
+ outerHeight: v
750
750
  };
751
- t("resize", $);
752
- }), (c, d) => (h(), T("div", {
751
+ t("resize", y);
752
+ }), (c, v) => (_(), L("div", {
753
753
  ref_key: "resizeRef",
754
754
  ref: u,
755
755
  class: ee(["lume-chart-container", {
@@ -757,8 +757,8 @@ const Wn = ["height"], Un = ["transform"], Xn = /* @__PURE__ */ Z({
757
757
  }]),
758
758
  "data-j-chart-container": ""
759
759
  }, [
760
- R(c.$slots, "header", {}, void 0, !0),
761
- (h(), T("svg", {
760
+ M(c.$slots, "header", {}, void 0, !0),
761
+ (_(), L("svg", {
762
762
  ref_key: "root",
763
763
  ref: a,
764
764
  class: ee(["lume-chart-container__svg", {
@@ -766,42 +766,42 @@ const Wn = ["height"], Un = ["transform"], Xn = /* @__PURE__ */ Z({
766
766
  }]),
767
767
  height: l(i),
768
768
  "data-j-chart-container__root": "",
769
- onClick: d[0] || (d[0] = (v) => t("click", v)),
770
- onMouseenter: d[1] || (d[1] = (v) => t("mouseenter", v)),
771
- onMouseleave: d[2] || (d[2] = (v) => t("mouseleave", v))
769
+ onClick: v[0] || (v[0] = (d) => t("click", d)),
770
+ onMouseenter: v[1] || (v[1] = (d) => t("mouseenter", d)),
771
+ onMouseleave: v[2] || (v[2] = (d) => t("mouseleave", d))
772
772
  }, [
773
- j("g", {
773
+ G("g", {
774
774
  transform: `translate(${l(o).left}, ${l(o).top})`,
775
775
  class: "lume-chart-container__group",
776
776
  "data-j-chart-container__group": ""
777
777
  }, [
778
- R(c.$slots, "default", {}, void 0, !0)
779
- ], 8, Un)
780
- ], 42, Wn)),
781
- R(c.$slots, "footer", {}, void 0, !0),
782
- R(c.$slots, "extra", {}, void 0, !0)
778
+ M(c.$slots, "default", {}, void 0, !0)
779
+ ], 8, Jn)
780
+ ], 42, Kn)),
781
+ M(c.$slots, "footer", {}, void 0, !0),
782
+ M(c.$slots, "extra", {}, void 0, !0)
783
783
  ], 2));
784
784
  }
785
785
  });
786
- const Yn = /* @__PURE__ */ J(Xn, [["__scopeId", "data-v-36870bc4"]]), Kn = ["onClick", "onMouseenter"], Jn = /* @__PURE__ */ Z({
786
+ const qn = /* @__PURE__ */ Q(Qn, [["__scopeId", "data-v-36870bc4"]]), eo = ["onClick", "onMouseenter"], to = /* @__PURE__ */ Z({
787
787
  __name: "lume-chart-legend",
788
788
  props: {
789
789
  data: {
790
790
  type: Array,
791
- validator: fn,
791
+ validator: _n,
792
792
  required: !0
793
793
  }
794
794
  },
795
795
  emits: ["click", "mouseenter", "mouseleave"],
796
796
  setup(e, { emit: t }) {
797
- const n = He("isEmpty");
798
- return (o, r) => l(n) ? P("", !0) : (h(), T("div", {
797
+ const n = Be("isEmpty");
798
+ return (o, r) => l(n) ? F("", !0) : (_(), L("div", {
799
799
  key: 0,
800
800
  class: "lume-chart-legend",
801
801
  "data-j-chart-legend": "",
802
802
  onMouseleave: r[0] || (r[0] = (a) => t("mouseleave"))
803
803
  }, [
804
- (h(!0), T(K, null, z(e.data, (a, u) => (h(), T("div", {
804
+ (_(!0), L(J, null, z(e.data, (a, u) => (_(), L("div", {
805
805
  key: `legend-item-${u}`,
806
806
  class: "lume-chart-legend__item lume-typography--body",
807
807
  tabindex: "0",
@@ -809,47 +809,47 @@ const Yn = /* @__PURE__ */ J(Xn, [["__scopeId", "data-v-36870bc4"]]), Kn = ["onC
809
809
  onClick: (s) => t("click", { index: u, dataset: a, event: s }),
810
810
  onMouseenter: (s) => t("mouseenter", { index: u, dataset: a, event: s })
811
811
  }, [
812
- j("span", {
812
+ G("span", {
813
813
  class: ee(["lume-chart-legend__symbol", `lume-background-color--${a.color}`]),
814
814
  "data-j-chart-legend__symbol": ""
815
815
  }, null, 2),
816
- de(" " + q(a.label || u), 1)
817
- ], 40, Kn))), 128))
816
+ de(" " + te(a.label || u), 1)
817
+ ], 40, eo))), 128))
818
818
  ], 32));
819
819
  }
820
820
  });
821
- const dt = /* @__PURE__ */ J(Jn, [["__scopeId", "data-v-4710298b"]]);
822
- const Qn = {}, qn = {
821
+ const pt = /* @__PURE__ */ Q(to, [["__scopeId", "data-v-4710298b"]]);
822
+ const no = {}, oo = {
823
823
  class: "lume-tooltip__title",
824
824
  "data-j-tooltip__title": ""
825
825
  };
826
- function eo(e, t) {
827
- return h(), T("div", qn, [
828
- R(e.$slots, "default", {}, void 0, !0)
826
+ function ao(e, t) {
827
+ return _(), L("div", oo, [
828
+ M(e.$slots, "default", {}, void 0, !0)
829
829
  ]);
830
830
  }
831
- const to = /* @__PURE__ */ J(Qn, [["render", eo], ["__scopeId", "data-v-8af3fac6"]]);
832
- const no = {}, oo = {
831
+ const ro = /* @__PURE__ */ Q(no, [["render", ao], ["__scopeId", "data-v-8af3fac6"]]);
832
+ const lo = {}, uo = {
833
833
  class: "lume-tooltip__item",
834
834
  "data-j-tooltip__summary-item": ""
835
- }, ao = { class: "lume-tooltip__value" };
836
- function ro(e, t) {
837
- return h(), T("li", oo, [
838
- j("span", null, [
839
- R(e.$slots, "default", {}, void 0, !0)
835
+ }, io = { class: "lume-tooltip__value" };
836
+ function so(e, t) {
837
+ return _(), L("li", uo, [
838
+ G("span", null, [
839
+ M(e.$slots, "default", {}, void 0, !0)
840
840
  ]),
841
- j("strong", ao, [
842
- R(e.$slots, "value", {}, void 0, !0)
841
+ G("strong", io, [
842
+ M(e.$slots, "value", {}, void 0, !0)
843
843
  ])
844
844
  ]);
845
845
  }
846
- const lo = /* @__PURE__ */ J(no, [["render", ro], ["__scopeId", "data-v-4ed7ec1b"]]), uo = {
846
+ const co = /* @__PURE__ */ Q(lo, [["render", so], ["__scopeId", "data-v-4ed7ec1b"]]), vo = {
847
847
  class: "lume-tooltip__item",
848
848
  "data-j-tooltip__item": ""
849
- }, io = { "data-j-tooltip__item__label": "" }, so = {
849
+ }, po = { "data-j-tooltip__item__label": "" }, fo = {
850
850
  class: "lume-tooltip__value",
851
851
  "data-j-tooltip__item__value": ""
852
- }, co = /* @__PURE__ */ Z({
852
+ }, mo = /* @__PURE__ */ Z({
853
853
  __name: "lume-tooltip-item",
854
854
  props: {
855
855
  color: {
@@ -858,27 +858,27 @@ const lo = /* @__PURE__ */ J(no, [["render", ro], ["__scopeId", "data-v-4ed7ec1b
858
858
  }
859
859
  },
860
860
  setup(e) {
861
- return (t, n) => (h(), T("li", uo, [
862
- e.color ? (h(), T("span", {
861
+ return (t, n) => (_(), L("li", vo, [
862
+ e.color ? (_(), L("span", {
863
863
  key: 0,
864
864
  class: ee([[`lume-background-color--${e.color}`], "lume-tooltip__symbol"]),
865
865
  "data-j-tooltip__item__symbol": ""
866
- }, null, 2)) : P("", !0),
867
- j("span", io, [
868
- R(t.$slots, "label", {}, void 0, !0)
866
+ }, null, 2)) : F("", !0),
867
+ G("span", po, [
868
+ M(t.$slots, "label", {}, void 0, !0)
869
869
  ]),
870
- j("strong", so, [
871
- R(t.$slots, "value", {}, void 0, !0)
870
+ G("strong", fo, [
871
+ M(t.$slots, "value", {}, void 0, !0)
872
872
  ])
873
873
  ]));
874
874
  }
875
875
  });
876
- const vo = /* @__PURE__ */ J(co, [["__scopeId", "data-v-4f995c3c"]]), po = (e) => (Qt("data-v-57f370fa"), e = e(), qt(), e), fo = { class: "lume-tooltip__items" }, ho = {
876
+ const ho = /* @__PURE__ */ Q(mo, [["__scopeId", "data-v-4f995c3c"]]), go = (e) => (nn("data-v-8ec11304"), e = e(), on(), e), _o = { class: "lume-tooltip__items" }, yo = {
877
877
  key: 0,
878
878
  class: "lume-tooltip__break"
879
- }, mo = /* @__PURE__ */ po(() => /* @__PURE__ */ j("hr", null, null, -1)), go = [
880
- mo
881
- ], _o = /* @__PURE__ */ Z({
879
+ }, ko = /* @__PURE__ */ go(() => /* @__PURE__ */ G("hr", null, null, -1)), bo = [
880
+ ko
881
+ ], Ao = /* @__PURE__ */ Z({
882
882
  __name: "lume-tooltip",
883
883
  props: {
884
884
  targetElement: {
@@ -892,7 +892,7 @@ const vo = /* @__PURE__ */ J(co, [["__scopeId", "data-v-4f995c3c"]]), po = (e) =
892
892
  position: {
893
893
  type: String,
894
894
  default: "auto",
895
- validator: (e) => In.includes(e)
895
+ validator: (e) => Hn.includes(e)
896
896
  },
897
897
  fixedPositioning: {
898
898
  type: Boolean,
@@ -910,15 +910,15 @@ const vo = /* @__PURE__ */ J(co, [["__scopeId", "data-v-4f995c3c"]]), po = (e) =
910
910
  type: String,
911
911
  default: null
912
912
  },
913
- ...$e()
913
+ ...we()
914
914
  },
915
- emits: ["opened", "moved", "closed"],
915
+ emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
916
916
  setup(e, { emit: t }) {
917
- const n = e, o = S(null), { items: r, options: a } = Q(n), u = ne(), s = S(null), { allOptions: i } = se(a), c = p(
917
+ const n = e, o = R(null), { items: r, options: a } = q(n), u = oe(), s = R(null), { allOptions: i } = ce(a), c = p(
918
918
  () => i.value.fixedPositioning ?? n.fixedPositioning
919
- ), d = p(
919
+ ), v = p(
920
920
  () => c.value ? "fixed" : "absolute"
921
- ), v = p(() => [
921
+ ), d = p(() => [
922
922
  {
923
923
  name: "computeStyles",
924
924
  options: {
@@ -931,140 +931,144 @@ const vo = /* @__PURE__ */ J(co, [["__scopeId", "data-v-4f995c3c"]]), po = (e) =
931
931
  options: { offset: [0, i.value.offset || 8] }
932
932
  },
933
933
  ...n.modifiers || []
934
- ]), y = p(
934
+ ]), m = p(
935
935
  () => i.value.showTitle !== !1 && n.title != null
936
- ), $ = p(() => De(i.value.valueFormat)), k = p(() => De(i.value.titleFormat)), A = p(
936
+ ), y = p(() => He(i.value.valueFormat)), h = p(() => He(i.value.titleFormat)), A = p(
937
937
  () => {
938
- var I;
939
- return ((I = r.value) == null ? void 0 : I.find((x) => x.isSummary)) || {
938
+ var $;
939
+ return (($ = r.value) == null ? void 0 : $.find((w) => w.isSummary)) || {
940
940
  label: i.value.summary ?? n.summary
941
941
  };
942
942
  }
943
- ), m = p(() => u.summary || A.value.label);
944
- function _() {
945
- n.targetElement && o.value && (s.value = ln(n.targetElement, o.value, {
943
+ ), O = p(() => u.summary || A.value.label);
944
+ function f() {
945
+ n.targetElement && o.value && (s.value = dn(n.targetElement, o.value, {
946
946
  placement: n.position,
947
- strategy: d.value,
948
- modifiers: v.value
947
+ strategy: v.value,
948
+ modifiers: d.value
949
949
  }), t("opened", n.targetElement));
950
950
  }
951
- function E() {
951
+ function x() {
952
952
  s.value && (s.value.destroy(), t("closed"));
953
953
  }
954
954
  function N() {
955
- s.value && (o.value.classList.add("lume-tooltip--animated"), n.targetElement ? function() {
955
+ s.value && (i.value.withAnimation !== !1 && o.value.classList.add("lume-tooltip--animated"), n.targetElement ? function() {
956
956
  s.value.state.elements.reference = n.targetElement, s.value.update(), t("moved", n.targetElement);
957
- }() : E());
957
+ }() : x());
958
958
  }
959
- return U(
959
+ return X(
960
960
  () => n.targetElement,
961
- (I, x) => {
962
- !x && I ? _() : N();
961
+ ($, w) => {
962
+ !w && $ ? f() : N();
963
963
  }
964
- ), pe(_), Lt(E), (I, x) => Kt((h(), T("div", {
964
+ ), pe(f), xt(x), ($, w) => en((_(), L("div", {
965
965
  ref_key: "root",
966
966
  ref: o,
967
- class: "lume-tooltip lume-typography--caption",
968
- "data-j-tooltip": ""
967
+ class: ee(["lume-tooltip lume-typography--caption", {
968
+ "lume-tooltip--pointer-events": l(a).withPointerEvents
969
+ }]),
970
+ "data-j-tooltip": "",
971
+ onMouseenter: w[0] || (w[0] = (D) => t("tooltip-mouseenter")),
972
+ onMouseleave: w[1] || (w[1] = (D) => t("tooltip-mouseleave"))
969
973
  }, [
970
- R(I.$slots, "default", {}, () => [
971
- R(I.$slots, "title", {}, () => [
972
- l(y) ? (h(), W(l(to), { key: 0 }, {
974
+ M($.$slots, "default", {}, () => [
975
+ M($.$slots, "title", {}, () => [
976
+ l(m) ? (_(), W(l(ro), { key: 0 }, {
973
977
  default: V(() => [
974
- de(q(l(k)(e.title)), 1)
978
+ de(te(l(h)(e.title)), 1)
975
979
  ]),
976
980
  _: 1
977
- })) : P("", !0)
981
+ })) : F("", !0)
978
982
  ], !0),
979
- j("ul", fo, [
980
- R(I.$slots, "summary", {}, () => [
981
- l(m) ? (h(), W(l(lo), { key: 0 }, le({
983
+ G("ul", _o, [
984
+ M($.$slots, "summary", {}, () => [
985
+ l(O) ? (_(), W(l(co), { key: 0 }, ue({
982
986
  default: V(() => [
983
- de(q(l(A).label) + " ", 1)
987
+ de(te(l(A).label) + " ", 1)
984
988
  ]),
985
989
  _: 2
986
990
  }, [
987
991
  l(A).value ? {
988
992
  name: "value",
989
993
  fn: V(() => [
990
- de(q(l($)(l(A).value)), 1)
994
+ de(te(l(y)(l(A).value)), 1)
991
995
  ]),
992
996
  key: "0"
993
997
  } : void 0
994
- ]), 1024)) : P("", !0)
998
+ ]), 1024)) : F("", !0)
995
999
  ], !0),
996
- l(m) ? (h(), T("li", ho, go)) : P("", !0),
997
- R(I.$slots, "items", {}, () => [
998
- (h(!0), T(K, null, z(l(r), (H) => (h(), W(l(vo), {
999
- key: H.label,
1000
- color: H.color
1000
+ l(O) ? (_(), L("li", yo, bo)) : F("", !0),
1001
+ M($.$slots, "items", {}, () => [
1002
+ (_(!0), L(J, null, z(l(r), (D) => (_(), W(l(ho), {
1003
+ key: D.label,
1004
+ color: D.color
1001
1005
  }, {
1002
1006
  label: V(() => [
1003
- de(q(H.label), 1)
1007
+ de(te(D.label), 1)
1004
1008
  ]),
1005
1009
  value: V(() => [
1006
- de(q(l($)(H.value)), 1)
1010
+ de(te(l(y)(D.value)), 1)
1007
1011
  ]),
1008
1012
  _: 2
1009
1013
  }, 1032, ["color"]))), 128))
1010
1014
  ], !0)
1011
1015
  ])
1012
1016
  ], !0)
1013
- ], 512)), [
1014
- [Jt, e.targetElement]
1017
+ ], 34)), [
1018
+ [tn, e.targetElement]
1015
1019
  ]);
1016
1020
  }
1017
1021
  });
1018
- const yo = /* @__PURE__ */ J(_o, [["__scopeId", "data-v-57f370fa"]]);
1019
- var fe = /* @__PURE__ */ ((e) => (e.Categorical = "categorical", e.Sequential = "sequential", e.Divergent = "divergent", e))(fe || {});
1020
- const ko = fe.Categorical, we = ae.Skyblue, bo = Je.SkyTeal;
1021
- function Ao(e) {
1022
- return e === fe.Divergent ? bo : we;
1023
- }
1024
- function To(e) {
1025
- return Object.values(Qe).includes(e);
1026
- }
1027
- function vt(e, t) {
1028
- return t === fe.Divergent ? Object.values(Je).includes(e) : Object.values({
1029
- ...ae,
1030
- ...It,
1031
- ...Et,
1032
- ...Qe
1022
+ const To = /* @__PURE__ */ Q(Ao, [["__scopeId", "data-v-8ec11304"]]);
1023
+ var me = /* @__PURE__ */ ((e) => (e.Categorical = "categorical", e.Sequential = "sequential", e.Divergent = "divergent", e))(me || {});
1024
+ const Lo = me.Categorical, Ee = re.Skyblue, Oo = Qe.SkyTeal;
1025
+ function $o(e) {
1026
+ return e === me.Divergent ? Oo : Ee;
1027
+ }
1028
+ function xo(e) {
1029
+ return Object.values(qe).includes(e);
1030
+ }
1031
+ function ft(e, t) {
1032
+ return t === me.Divergent ? Object.values(Qe).includes(e) : Object.values({
1033
+ ...re,
1034
+ ...Dt,
1035
+ ...Ht,
1036
+ ...qe
1033
1037
  }).includes(e);
1034
1038
  }
1035
- function Lo(e, t) {
1036
- const n = Object.values(ae).indexOf(e);
1037
- return bn(Object.values(ae), n > -1 ? n : 0)[t];
1039
+ function wo(e, t) {
1040
+ const n = Object.values(re).indexOf(e);
1041
+ return On(Object.values(re), n > -1 ? n : 0)[t];
1038
1042
  }
1039
- function Oo(e, t) {
1043
+ function Io(e, t) {
1040
1044
  const n = 50 + t * 10;
1041
1045
  return `${e}-${n}`;
1042
1046
  }
1043
- function $o(e, t) {
1047
+ function Eo(e, t) {
1044
1048
  const n = (t + 1) * 10;
1045
1049
  return `${e}-${n}`;
1046
1050
  }
1047
- function pt(e, t, n) {
1051
+ function mt(e, t, n) {
1048
1052
  switch (t) {
1049
1053
  default:
1050
- case fe.Categorical:
1051
- return To(e) ? e : Lo(e, n);
1052
- case fe.Sequential:
1053
- return Oo(e, n);
1054
- case fe.Divergent:
1055
- return $o(e, n);
1054
+ case me.Categorical:
1055
+ return xo(e) ? e : wo(e, n);
1056
+ case me.Sequential:
1057
+ return Io(e, n);
1058
+ case me.Divergent:
1059
+ return Eo(e, n);
1056
1060
  }
1057
1061
  }
1058
- function xo(e, t, n = ko, o) {
1059
- return vt(e, n) ? e : (o > 4 && (he(ve.ColorLoop), o = o % 5), vt(t, n) ? pt(t, n, o) : pt(Ao(n), n, o));
1062
+ function No(e, t, n = Lo, o) {
1063
+ return ft(e, n) ? e : (o > 4 && (he(ve.ColorLoop), o = o % 5), ft(t, n) ? mt(t, n, o) : mt($o(n), n, o));
1060
1064
  }
1061
- function wo(e) {
1062
- return e.map((t) => hn(t) ? t : { value: t });
1065
+ function Do(e) {
1066
+ return e.map((t) => yn(t) ? t : { value: t });
1063
1067
  }
1064
- function Io(e) {
1068
+ function Ho(e) {
1065
1069
  return e.__internal === !0;
1066
1070
  }
1067
- const et = (e = null) => ({
1071
+ const tt = (e = null) => ({
1068
1072
  data: {
1069
1073
  type: Array,
1070
1074
  required: !0,
@@ -1076,41 +1080,41 @@ const et = (e = null) => ({
1076
1080
  },
1077
1081
  color: {
1078
1082
  type: String,
1079
- default: ae.Skyblue
1083
+ default: re.Skyblue
1080
1084
  },
1081
1085
  title: {
1082
1086
  type: String,
1083
1087
  default: null
1084
1088
  }
1085
1089
  });
1086
- function tt(e, t, n, o, r) {
1087
- const a = Be({
1090
+ function nt(e, t, n, o, r) {
1091
+ const a = Re({
1088
1092
  width: 0,
1089
1093
  height: 0
1090
- }), u = Tn(12), s = p(() => {
1091
- var d;
1092
- return e.value.length > 5 && he(ve.DatasetLength), (d = e.value) == null ? void 0 : d.map(
1093
- (v, y) => {
1094
- if (Io(v))
1095
- return v;
1096
- const $ = wo(v.values), k = xo(
1097
- v.color,
1094
+ }), u = xn(12), s = p(() => {
1095
+ var v;
1096
+ return e.value.length > 5 && he(ve.DatasetLength), (v = e.value) == null ? void 0 : v.map(
1097
+ (d, m) => {
1098
+ if (Ho(d))
1099
+ return d;
1100
+ const y = Do(d.values), h = No(
1101
+ d.color,
1098
1102
  n == null ? void 0 : n.value,
1099
1103
  o == null ? void 0 : o.value.colorPalette,
1100
- y
1104
+ m
1101
1105
  );
1102
1106
  return {
1103
- ...v,
1104
- values: $,
1105
- color: k,
1107
+ ...d,
1108
+ values: y,
1109
+ color: h,
1106
1110
  __internal: !0
1107
1111
  };
1108
1112
  }
1109
1113
  );
1110
- }), i = p(() => Array.isArray(t.value) ? t.value : Ve(e.value).map((d, v) => v));
1111
- function c(d) {
1112
- const v = (r == null ? void 0 : r.value) === D.HORIZONTAL && Ve(e).length * (((o == null ? void 0 : o.value.barHeight) || st) * 2) + ((o == null ? void 0 : o.value.barHeight) || st) || d.height;
1113
- a.width = d.width, a.height = v;
1114
+ }), i = p(() => Array.isArray(t.value) ? t.value : Pe(e.value).map((v, d) => d));
1115
+ function c(v) {
1116
+ const d = (r == null ? void 0 : r.value) === H.HORIZONTAL && Pe(e).length * (((o == null ? void 0 : o.value.barHeight) || dt) * 2) + ((o == null ? void 0 : o.value.barHeight) || dt) || v.height;
1117
+ a.width = v.width, a.height = d;
1114
1118
  }
1115
1119
  return {
1116
1120
  chartID: u,
@@ -1120,7 +1124,7 @@ function tt(e, t, n, o, r) {
1120
1124
  updateSize: c
1121
1125
  };
1122
1126
  }
1123
- const Eo = () => ({
1127
+ const Bo = () => ({
1124
1128
  xScale: {
1125
1129
  type: Function,
1126
1130
  default: null
@@ -1130,69 +1134,69 @@ const Eo = () => ({
1130
1134
  default: null
1131
1135
  }
1132
1136
  });
1133
- function No(e, t, n, o, r) {
1134
- const a = S(null), u = S(null);
1137
+ function Ro(e, t, n, o, r) {
1138
+ const a = R(null), u = R(null);
1135
1139
  function s() {
1136
1140
  const { width: i, height: c } = n;
1137
- !i && !c || !t.value || !e.value || (o.value === D.HORIZONTAL ? (a.value = ht(
1141
+ !i && !c || !t.value || !e.value || (o.value === H.HORIZONTAL ? (a.value = gt(
1138
1142
  e.value,
1139
1143
  i,
1140
1144
  o.value,
1141
1145
  r.value.startOnZero
1142
- ), u.value = ft(
1146
+ ), u.value = ht(
1143
1147
  t.value,
1144
1148
  c,
1145
1149
  o.value,
1146
1150
  r.value
1147
- )) : (a.value = ft(
1151
+ )) : (a.value = ht(
1148
1152
  t.value,
1149
1153
  i,
1150
1154
  o.value,
1151
1155
  r.value
1152
- ), u.value = ht(
1156
+ ), u.value = gt(
1153
1157
  e.value,
1154
1158
  c,
1155
1159
  o.value,
1156
1160
  r.value.startOnZero
1157
1161
  )));
1158
1162
  }
1159
- return Ot(s), { xScale: a, yScale: u };
1163
+ return wt(s), { xScale: a, yScale: u };
1160
1164
  }
1161
- function ft(e, t, n, o) {
1162
- const r = [0, t], { padding: a, paddingInner: u, paddingOuter: s } = o, i = a ?? (n === D.HORIZONTAL ? Ht : Dt);
1165
+ function ht(e, t, n, o) {
1166
+ const r = [0, t], { padding: a, paddingInner: u, paddingOuter: s } = o, i = a ?? (n === H.HORIZONTAL ? Mt : Rt);
1163
1167
  return Object.assign(
1164
- Le().range(r).paddingInner(u ?? i).paddingOuter(s ?? i).domain(e.map((c, d) => d)),
1168
+ $e().range(r).paddingInner(u ?? i).paddingOuter(s ?? i).domain(e.map((c, v) => v)),
1165
1169
  { labels: e }
1166
1170
  );
1167
1171
  }
1168
- function ht(e, t, n, o) {
1169
- const r = xt(e).filter((d) => d != null), a = [0, t];
1172
+ function gt(e, t, n, o) {
1173
+ const r = Et(e).filter((v) => v != null), a = [0, t];
1170
1174
  if (r.length === 0)
1171
- return Oe().range(a).domain([0, 0]).nice();
1172
- const u = Math.min(...r), s = o && u > 0 ? 0 : u, i = Math.max(...r), c = n === D.HORIZONTAL ? [s, i] : [i, s];
1173
- return Oe().range(a).domain(c).nice();
1175
+ return xe().range(a).domain([0, 0]).nice();
1176
+ const u = Math.min(...r), s = o && u > 0 ? 0 : u, i = Math.max(...r), c = n === H.HORIZONTAL ? [s, i] : [i, s];
1177
+ return xe().range(a).domain(c).nice();
1174
1178
  }
1175
- function mt(e) {
1179
+ function _t(e) {
1176
1180
  return (e == null ? void 0 : e.range) !== void 0 || (e == null ? void 0 : e.copy) !== void 0;
1177
1181
  }
1178
- function Pe(e, t) {
1179
- return ge(e) ? e.bandwidth() / 2 + e(e.domain()[t]) : e(t);
1182
+ function ze(e, t) {
1183
+ return _e(e) ? e.bandwidth() / 2 + e(e.domain()[t]) : e(t);
1180
1184
  }
1181
- function gt(e, t, {
1185
+ function yt(e, t, {
1182
1186
  padding: n,
1183
1187
  paddingInner: o,
1184
1188
  paddingOuter: r
1185
1189
  } = {}) {
1186
- const a = n ?? (t === D.HORIZONTAL ? Ht : Dt);
1190
+ const a = n ?? (t === H.HORIZONTAL ? Mt : Rt);
1187
1191
  return e.copy().paddingInner(o ?? a).paddingOuter(r ?? a);
1188
1192
  }
1189
- function Ct(e) {
1190
- return Object.values(D).includes(e);
1193
+ function Vt(e) {
1194
+ return Object.values(H).includes(e);
1191
1195
  }
1192
- const be = (e, t = !0) => ({
1193
- ...et(e),
1194
- ...Eo(),
1195
- ...$e(),
1196
+ const Le = (e, t = !0) => ({
1197
+ ...tt(e),
1198
+ ...Bo(),
1199
+ ...we(),
1196
1200
  classList: {
1197
1201
  type: [String, Array],
1198
1202
  default: () => []
@@ -1204,18 +1208,18 @@ const be = (e, t = !0) => ({
1204
1208
  ...t ? {
1205
1209
  orientation: {
1206
1210
  type: String,
1207
- default: D.VERTICAL,
1208
- validator: Ct
1211
+ default: H.VERTICAL,
1212
+ validator: Vt
1209
1213
  }
1210
1214
  } : {}
1211
- }), Do = (e) => ({
1212
- ...et(e),
1213
- ...$e(),
1215
+ }), Mo = (e) => ({
1216
+ ...tt(e),
1217
+ ...we(),
1214
1218
  hoveredElement: {
1215
1219
  type: [Number, String],
1216
1220
  default: null
1217
1221
  }
1218
- }), Me = () => ({
1222
+ }), Se = () => ({
1219
1223
  data: {
1220
1224
  type: Array,
1221
1225
  required: !0
@@ -1230,8 +1234,8 @@ const be = (e, t = !0) => ({
1230
1234
  },
1231
1235
  orientation: {
1232
1236
  type: String,
1233
- default: D.VERTICAL,
1234
- validator: Ct
1237
+ default: H.VERTICAL,
1238
+ validator: Vt
1235
1239
  },
1236
1240
  xScale: {
1237
1241
  type: Function,
@@ -1257,51 +1261,51 @@ const be = (e, t = !0) => ({
1257
1261
  type: [String, Array],
1258
1262
  default: () => []
1259
1263
  }
1260
- }), Ho = { class: "lume-overlay-group" }, Bo = /* @__PURE__ */ Z({
1264
+ }), So = { class: "lume-overlay-group" }, Co = /* @__PURE__ */ Z({
1261
1265
  __name: "lume-overlay-group",
1262
1266
  props: {
1263
- ...Me(),
1267
+ ...Se(),
1264
1268
  orientation: {
1265
1269
  type: String,
1266
- default: D.VERTICAL
1270
+ default: H.VERTICAL
1267
1271
  }
1268
1272
  },
1269
1273
  emits: ["click", "lume__internal--hover", "mouseover"],
1270
1274
  setup(e, { emit: t }) {
1271
- const n = e, { data: o, orientation: r, xScale: a, yScale: u } = Q(n), s = p(() => Ve(o));
1275
+ const n = e, { data: o, orientation: r, xScale: a, yScale: u } = q(n), s = p(() => Pe(o));
1272
1276
  function i(c) {
1273
- var m;
1274
- const d = r.value === D.HORIZONTAL ? u.value : a.value, v = d.domain(), y = mn(d), $ = ((m = d.paddingInner) == null ? void 0 : m.call(d)) ?? 0, k = y * $, A = ge(d) ? d(v[c]) - k / 2 : d(c) - y / 2;
1275
- return r.value === D.HORIZONTAL ? {
1277
+ var O;
1278
+ const v = r.value === H.HORIZONTAL ? u.value : a.value, d = v.domain(), m = kn(v), y = ((O = v.paddingInner) == null ? void 0 : O.call(v)) ?? 0, h = m * y, A = _e(v) ? v(d[c]) - h / 2 : v(c) - m / 2;
1279
+ return r.value === H.HORIZONTAL ? {
1276
1280
  width: Math.max(...a.value.range()),
1277
- height: y,
1281
+ height: m,
1278
1282
  transform: `translate(0, ${A})`
1279
1283
  } : {
1280
- width: y,
1284
+ width: m,
1281
1285
  height: Math.max(...u.value.range()),
1282
1286
  transform: `translate(${A}, 0)`
1283
1287
  };
1284
1288
  }
1285
- return (c, d) => (h(), T("g", Ho, [
1286
- (h(!0), T(K, null, z(l(s), (v, y) => (h(), W(l(qe), C(i(y), {
1287
- key: `overlay-${y}`,
1288
- "data-j-lume-overlay-group": y,
1289
+ return (c, v) => (_(), L("g", So, [
1290
+ (_(!0), L(J, null, z(l(s), (d, m) => (_(), W(l(et), C(i(m), {
1291
+ key: `overlay-${m}`,
1292
+ "data-j-lume-overlay-group": m,
1289
1293
  transition: !1,
1290
1294
  "class-list": "lume-fill--transparent",
1291
- onMouseover: ($) => t("lume__internal--hover", y),
1292
- onClick: ($) => t("click", { index: y, event: $ })
1295
+ onMouseover: (y) => t("lume__internal--hover", m),
1296
+ onClick: (y) => t("click", { index: m, event: y })
1293
1297
  }), null, 16, ["data-j-lume-overlay-group", "onMouseover", "onClick"]))), 128))
1294
1298
  ]));
1295
1299
  }
1296
1300
  });
1297
- function Ro(e) {
1301
+ function Go(e) {
1298
1302
  return { hasNegativeValues: p(
1299
- () => xt(e.value).some((n) => n < 0)
1303
+ () => Et(e.value).some((n) => n < 0)
1300
1304
  ) };
1301
1305
  }
1302
- function Mo(e, t, n, o) {
1306
+ function jo(e, t, n, o) {
1303
1307
  const r = p(
1304
- () => o.value === D.HORIZONTAL
1308
+ () => o.value === H.HORIZONTAL
1305
1309
  ), a = p(
1306
1310
  () => {
1307
1311
  var c;
@@ -1324,19 +1328,19 @@ function Mo(e, t, n, o) {
1324
1328
  transform: s.value
1325
1329
  })) };
1326
1330
  }
1327
- function So(e) {
1331
+ function Vo(e) {
1328
1332
  return e.reduce((t, n) => n.values.map((o, r) => t[r] ? o.value > t[r] ? o.value : t[r] : o.value ?? 0), []);
1329
1333
  }
1330
- function Co(e) {
1334
+ function Po(e) {
1331
1335
  return e.reduce((t, n) => n.values.map((o, r) => {
1332
1336
  const a = o.value == null || o.value < 0 ? 0 : o.value;
1333
1337
  return t[r] ? t[r] + a : a;
1334
1338
  }), []);
1335
1339
  }
1336
- const _t = {
1337
- "stacked-bar": Co
1340
+ const kt = {
1341
+ "stacked-bar": Po
1338
1342
  };
1339
- function jt(e, t, n, o, r, a, u) {
1343
+ function Pt(e, t, n, o, r, a, u) {
1340
1344
  const s = p(
1341
1345
  () => {
1342
1346
  var c;
@@ -1344,13 +1348,13 @@ function jt(e, t, n, o, r, a, u) {
1344
1348
  }
1345
1349
  );
1346
1350
  function i(c) {
1347
- const d = u != null && u.value && _t[u.value] ? _t[u.value](c) : So(c);
1348
- e.value = d.map((v, y) => ({
1349
- cx: (r == null ? void 0 : r.value) === D.HORIZONTAL ? n.value(v) : Pe(n.value, y),
1350
- cy: (r == null ? void 0 : r.value) === D.HORIZONTAL ? Pe(o.value, y) : o.value(v)
1351
+ const v = u != null && u.value && kt[u.value] ? kt[u.value](c) : Vo(c);
1352
+ e.value = v.map((d, m) => ({
1353
+ cx: (r == null ? void 0 : r.value) === H.HORIZONTAL ? n.value(d) : ze(n.value, m),
1354
+ cy: (r == null ? void 0 : r.value) === H.HORIZONTAL ? ze(o.value, m) : o.value(d)
1351
1355
  }));
1352
1356
  }
1353
- return U(
1357
+ return X(
1354
1358
  [n, o],
1355
1359
  () => {
1356
1360
  n.value && o.value && (a != null && a.value) && s.value && i(a.value);
@@ -1358,8 +1362,8 @@ function jt(e, t, n, o, r, a, u) {
1358
1362
  { immediate: !0 }
1359
1363
  ), { shouldGenerateTooltipAnchors: s, updateTooltipAnchorAttributes: i };
1360
1364
  }
1361
- function jo() {
1362
- const e = Be({
1365
+ function Fo() {
1366
+ const e = Re({
1363
1367
  opened: !1,
1364
1368
  targetElement: null
1365
1369
  });
@@ -1369,368 +1373,383 @@ function jo() {
1369
1373
  e.opened = !1, e.targetElement = null;
1370
1374
  } };
1371
1375
  }
1372
- function Go(e) {
1376
+ function zo(e) {
1373
1377
  return { getTooltipItems: p(
1374
1378
  () => (n) => e.value.map(({ color: o, label: r, values: a }) => {
1375
1379
  var u, s, i;
1376
1380
  return {
1377
1381
  color: ((u = a[n]) == null ? void 0 : u.color) || o,
1378
1382
  label: r,
1379
- value: ((s = a[n]) == null ? void 0 : s.label) ?? ((i = a[n]) == null ? void 0 : i.value) ?? Nt
1383
+ value: ((s = a[n]) == null ? void 0 : s.label) ?? ((i = a[n]) == null ? void 0 : i.value) ?? Bt
1380
1384
  };
1381
1385
  })
1382
1386
  ) };
1383
1387
  }
1384
- const ze = 16, Ze = 8, We = 28, Ue = 24, me = {
1388
+ const Ze = 16, We = 8, Ue = 28, Xe = 24, ge = {
1385
1389
  VERTICAL: {
1386
- top: ze,
1387
- right: Ze,
1388
- bottom: We,
1389
- left: Ue
1390
+ top: Ze,
1391
+ right: We,
1392
+ bottom: Ue,
1393
+ left: Xe
1390
1394
  },
1391
1395
  HORIZONTAL: {
1392
- top: ze,
1393
- right: Ze,
1394
- bottom: We,
1395
- left: Ue
1396
+ top: Ze,
1397
+ right: We,
1398
+ bottom: Ue,
1399
+ left: Xe
1396
1400
  }
1397
1401
  };
1398
- function Vo(e) {
1399
- return !e || e === "auto" || e.top == null || e.top === "auto" ? ze : e.top;
1402
+ function Zo(e) {
1403
+ return !e || e === "auto" || e.top == null || e.top === "auto" ? Ze : e.top;
1400
1404
  }
1401
- function Fo(e) {
1402
- return !e || e === "auto" || e.right == null || e.right === "auto" ? Ze : e.right;
1405
+ function Wo(e) {
1406
+ return !e || e === "auto" || e.right == null || e.right === "auto" ? We : e.right;
1403
1407
  }
1404
- function Po(e, t) {
1405
- return !e || e === "auto" || e.bottom == null || e.bottom === "auto" ? t || We : e.bottom;
1408
+ function Uo(e, t) {
1409
+ return !e || e === "auto" || e.bottom == null || e.bottom === "auto" ? t || Ue : e.bottom;
1406
1410
  }
1407
- function zo(e, t) {
1408
- return !e || e === "auto" || e.left == null || e.left === "auto" ? t || Ue : e.left;
1411
+ function Xo(e, t) {
1412
+ return !e || e === "auto" || e.left == null || e.left === "auto" ? t || Xe : e.left;
1409
1413
  }
1410
- const Zo = { class: "lume-chart__header" }, Wo = { class: "lume-chart__header-section" }, Uo = {
1414
+ const Yo = { class: "lume-chart__header" }, Ko = { class: "lume-chart__header-section" }, Jo = {
1411
1415
  key: 0,
1412
1416
  class: "lume-chart__title lume-chart-title lume-typography--display"
1413
- }, Xo = { class: "lume-chart__controls" }, Yo = { class: "lume-chart__header-section" }, Ko = {
1417
+ }, Qo = { class: "lume-chart__controls" }, qo = { class: "lume-chart__header-section" }, ea = {
1414
1418
  key: 0,
1415
1419
  class: "lume-chart__axis-title lume-axis-title lume-typography--body"
1416
- }, Jo = { key: 3 }, Qo = ["r"], qo = {
1420
+ }, ta = { key: 3 }, na = ["r"], oa = {
1417
1421
  key: 0,
1418
1422
  class: "lume-chart__axis-title lume-chart__axis-title--centered lume-axis-title lume-typography--body"
1419
- }, ea = /* @__PURE__ */ Z({
1423
+ }, aa = /* @__PURE__ */ Z({
1420
1424
  __name: "lume-chart",
1421
1425
  props: {
1422
- ...be(),
1426
+ ...Le(),
1423
1427
  chartType: {
1424
1428
  type: String,
1425
1429
  default: null
1426
1430
  }
1427
1431
  },
1428
1432
  setup(e, { emit: t }) {
1429
- const n = e, o = ne(), { data: r, labels: a, color: u, options: s, orientation: i, chartType: c } = Q(n), d = S(-1), v = S(null), y = S(null), $ = S([]), k = S(0), A = S(0), { allOptions: m } = se(s), { internalData: _, computedLabels: E, containerSize: N, updateSize: I, chartID: x } = tt(r, a, u, m, i), { xScale: H, yScale: M } = No(
1430
- _,
1431
- E,
1433
+ const n = e, o = oe(), { data: r, labels: a, color: u, options: s, orientation: i, chartType: c } = q(n), v = R(-1), d = R(null), m = R(null), y = R([]), h = R(null), A = R(0), O = R(0), { allOptions: f } = ce(s), { internalData: x, computedLabels: N, containerSize: $, updateSize: w, chartID: D } = nt(r, a, u, f, i), { xScale: S, yScale: Y } = Ro(
1434
+ x,
1432
1435
  N,
1436
+ $,
1433
1437
  i,
1434
- m
1435
- ), X = p(() => ({
1436
- top: Vo(m.value.margins),
1437
- right: Fo(m.value.margins),
1438
- bottom: Po(m.value.margins, k.value),
1439
- left: zo(m.value.margins, A.value)
1440
- })), Y = p(() => {
1441
- var O;
1442
- return n.xScale ? mt(n.xScale) ? n.xScale : (O = n.xScale) == null ? void 0 : O.call(n, _.value, a.value, N) : H.value;
1443
- }), G = p(() => {
1444
- var O;
1445
- return n.yScale ? mt(n.yScale) ? n.yScale : (O = n.yScale) == null ? void 0 : O.call(n, _.value, a.value, N) : M.value;
1446
- }), te = p(() => ({
1447
- ...m.value.xAxisOptions,
1448
- withHover: i.value === D.VERTICAL
1449
- })), Te = p(() => ({
1450
- ...m.value.yAxisOptions,
1451
- withHover: i.value === D.HORIZONTAL
1452
- })), ce = p(() => {
1453
- var O;
1454
- return (O = m.value.xAxisOptions) == null ? void 0 : O.title;
1455
- }), ye = p(() => {
1456
- var O;
1457
- return (O = m.value.yAxisOptions) == null ? void 0 : O.title;
1458
- }), g = p(() => {
1459
- var O;
1460
- return ((O = m.value.xAxisOptions) == null ? void 0 : O.withTitle) !== !1 && ce.value;
1461
- }), L = p(() => {
1462
- var O;
1463
- return ((O = m.value.yAxisOptions) == null ? void 0 : O.withTitle) !== !1 && ye.value;
1464
- }), f = p(
1465
- () => r.value.every((O) => !O.values.length)
1466
- ), B = p(() => {
1467
- const O = [], { noBaseScales: b } = m.value;
1468
- return b || O.push(() => !!(Y.value && G.value)), O.every((w) => w() === !0);
1469
- }), { hasNegativeValues: F } = Ro(_), { negativeBarAttributes: re } = Mo(
1470
- N,
1471
- Y,
1472
- G,
1473
- i
1474
- ), { shouldGenerateTooltipAnchors: Se } = jt(
1438
+ f
1439
+ ), ne = p(() => ({
1440
+ top: Zo(f.value.margins),
1441
+ right: Wo(f.value.margins),
1442
+ bottom: Uo(f.value.margins, A.value),
1443
+ left: Xo(f.value.margins, O.value)
1444
+ })), P = p(() => {
1445
+ var T;
1446
+ return n.xScale ? _t(n.xScale) ? n.xScale : (T = n.xScale) == null ? void 0 : T.call(n, x.value, a.value, $) : S.value;
1447
+ }), K = p(() => {
1448
+ var T;
1449
+ return n.yScale ? _t(n.yScale) ? n.yScale : (T = n.yScale) == null ? void 0 : T.call(n, x.value, a.value, $) : Y.value;
1450
+ }), ke = p(() => ({
1451
+ ...f.value.xAxisOptions,
1452
+ withHover: i.value === H.VERTICAL
1453
+ })), be = p(() => ({
1454
+ ...f.value.yAxisOptions,
1455
+ withHover: i.value === H.HORIZONTAL
1456
+ })), fe = p(() => {
1457
+ var T;
1458
+ return (T = f.value.xAxisOptions) == null ? void 0 : T.title;
1459
+ }), B = p(() => {
1460
+ var T;
1461
+ return (T = f.value.yAxisOptions) == null ? void 0 : T.title;
1462
+ }), k = p(() => {
1463
+ var T;
1464
+ return ((T = f.value.xAxisOptions) == null ? void 0 : T.withTitle) !== !1 && fe.value;
1465
+ }), E = p(() => {
1466
+ var T;
1467
+ return ((T = f.value.yAxisOptions) == null ? void 0 : T.withTitle) !== !1 && B.value;
1468
+ }), g = p(
1469
+ () => r.value.every((T) => !T.values.length)
1470
+ ), j = p(() => {
1471
+ const T = [], { noBaseScales: b } = f.value;
1472
+ return b || T.push(() => !!(P.value && K.value)), T.every((I) => I() === !0);
1473
+ }), { hasNegativeValues: U } = Go(x), { negativeBarAttributes: le } = jo(
1475
1474
  $,
1476
- m,
1477
- Y,
1478
- G,
1475
+ P,
1476
+ K,
1477
+ i
1478
+ ), { shouldGenerateTooltipAnchors: Ce } = Pt(
1479
+ y,
1480
+ f,
1481
+ P,
1482
+ K,
1479
1483
  i,
1480
- _,
1484
+ x,
1481
1485
  c
1482
- ), { tooltipConfig: Ie, showTooltip: Ee, hideTooltip: Wt } = jo(), { getTooltipItems: ot } = Go(_), Ut = p(
1483
- () => m.value.withTooltip !== !1 && Ie.opened
1484
- ), at = p(
1486
+ ), { tooltipConfig: Ae, showTooltip: Ne, hideTooltip: Yt } = Fo(), { getTooltipItems: at } = zo(x), Kt = p(
1487
+ () => f.value.withTooltip !== !1 && Ae.opened
1488
+ ), rt = p(
1485
1489
  () => {
1486
- var O;
1487
- return ((O = m.value.tooltipOptions) == null ? void 0 : O.position) || "top";
1490
+ var T;
1491
+ return ((T = f.value.tooltipOptions) == null ? void 0 : T.position) || "top";
1488
1492
  }
1489
- );
1490
- function Ne(O) {
1493
+ ), Jt = p(() => {
1491
1494
  var b;
1492
- if (O !== d.value && (m.value.withHover !== !1 && (d.value = O), m.value.withTooltip !== !1)) {
1493
- const w = (b = m.value.tooltipOptions) != null && b.targetElement ? m.value.tooltipOptions.targetElement === "self" ? y.value.$el : m.value.tooltipOptions.targetElement : v.value[O];
1494
- Ee(w);
1495
+ const T = (b = f.value.tooltipOptions) == null ? void 0 : b.withPointerEvents;
1496
+ return Ae.opened && (!T || T && h.value === !1);
1497
+ });
1498
+ function De(T) {
1499
+ var b;
1500
+ if (T !== v.value && (f.value.withHover !== !1 && (v.value = T), f.value.withTooltip !== !1)) {
1501
+ const I = (b = f.value.tooltipOptions) != null && b.targetElement ? f.value.tooltipOptions.targetElement === "self" ? m.value.$el : f.value.tooltipOptions.targetElement : d.value[T];
1502
+ Ne(I);
1495
1503
  }
1496
1504
  }
1497
- function rt(O) {
1498
- if (O > r.value[0].values.length - 1) {
1505
+ function lt() {
1506
+ Yt(), v.value = -1;
1507
+ }
1508
+ function ut(T) {
1509
+ if (T > r.value[0].values.length - 1) {
1499
1510
  he(ve.InvalidHoveredIndex);
1500
1511
  return;
1501
1512
  }
1502
- Ne(O);
1513
+ De(T);
1503
1514
  }
1504
- function Xt() {
1505
- Wt(), d.value = -1, t("chart-mouseleave");
1515
+ function Qt() {
1516
+ setTimeout(() => {
1517
+ Jt.value && lt(), t("chart-mouseleave");
1518
+ }, 0);
1506
1519
  }
1507
- function lt({ index: O, value: b, event: w }) {
1508
- O !== null && Ne(O), t("axis-mouseenter", { index: O, value: b, event: w });
1520
+ function it({ index: T, value: b, event: I }) {
1521
+ T !== null && De(T), t("axis-mouseenter", { index: T, value: b, event: I });
1509
1522
  }
1510
- function ut({ index: O, value: b, event: w }) {
1511
- t("axis-click", { index: O, value: b, event: w });
1523
+ function st({ index: T, value: b, event: I }) {
1524
+ t("axis-click", { index: T, value: b, event: I });
1512
1525
  }
1513
- return U(
1526
+ return X(
1514
1527
  r,
1515
- (O, b) => t("data-changed", { newValue: O, oldValue: b })
1516
- ), U(
1528
+ (T, b) => t("data-changed", { newValue: T, oldValue: b })
1529
+ ), X(
1517
1530
  a,
1518
- (O, b) => t("labels-changed", { newValue: O, oldValue: b })
1519
- ), U(f, (O) => O && he(ve.Empty), { immediate: !0 }), U(() => n.hoveredIndex, rt), U(
1520
- $,
1521
- (O) => {
1522
- O && n.hoveredIndex != null && d.value === -1 && rt(n.hoveredIndex);
1531
+ (T, b) => t("labels-changed", { newValue: T, oldValue: b })
1532
+ ), X(g, (T) => T && he(ve.Empty), { immediate: !0 }), X(() => n.hoveredIndex, ut), X(
1533
+ y,
1534
+ (T) => {
1535
+ T && n.hoveredIndex != null && v.value === -1 && ut(n.hoveredIndex);
1523
1536
  },
1524
1537
  { flush: "post" }
1525
- ), pe(() => {
1538
+ ), X(h, (T) => {
1539
+ T === !1 && Ae.opened && lt();
1540
+ }), pe(() => {
1526
1541
  t("rendered"), o.groups || console.error('"groups" `<slot>` must have content.');
1527
- }), Ce("chartID", x), Ce("isEmpty", f), Ce("tooltipAnchorAttributes", $), (O, b) => (h(), W(l(Yn), {
1528
- id: `lume-chart_${l(x)}`,
1542
+ }), Ge("chartID", D), Ge("isEmpty", g), Ge("tooltipAnchorAttributes", y), (T, b) => (_(), W(l(qn), {
1543
+ id: `lume-chart_${l(D)}`,
1529
1544
  ref_key: "chartContainer",
1530
- ref: y,
1531
- margins: l(X),
1532
- "container-size": l(N),
1533
- "no-min-size": l(m).noMinSize,
1534
- "transparent-background": l(m).transparentBackground,
1545
+ ref: m,
1546
+ margins: l(ne),
1547
+ "container-size": l($),
1548
+ "no-min-size": l(f).noMinSize,
1549
+ "transparent-background": l(f).transparentBackground,
1535
1550
  "data-j-lume-chart": "",
1536
- onResize: l(I),
1537
- onClick: b[22] || (b[22] = (w) => t("chart-click", w)),
1538
- onMouseenter: b[23] || (b[23] = (w) => t("chart-mouseenter", w)),
1539
- onMouseleave: Xt
1551
+ onResize: l(w),
1552
+ onClick: b[24] || (b[24] = (I) => t("chart-click", I)),
1553
+ onMouseenter: b[25] || (b[25] = (I) => t("chart-mouseenter", I)),
1554
+ onMouseleave: Qt
1540
1555
  }, {
1541
1556
  header: V(() => [
1542
- j("div", Zo, [
1543
- j("div", Wo, [
1544
- O.title ? (h(), T("h1", Uo, q(O.title), 1)) : P("", !0),
1545
- j("div", Xo, [
1546
- R(O.$slots, "controls", {}, void 0, !0)
1557
+ G("div", Yo, [
1558
+ G("div", Ko, [
1559
+ T.title ? (_(), L("h1", Jo, te(T.title), 1)) : F("", !0),
1560
+ G("div", Qo, [
1561
+ M(T.$slots, "controls", {}, void 0, !0)
1547
1562
  ])
1548
1563
  ]),
1549
- j("div", Yo, [
1550
- l(L) ? (h(), T("h3", Ko, q(l(ye)), 1)) : P("", !0),
1551
- R(O.$slots, "legend", { data: l(_) }, () => [
1552
- l(m).withLegend !== !1 && l(m).legendPosition !== "bottom" ? (h(), W(l(dt), {
1564
+ G("div", qo, [
1565
+ l(E) ? (_(), L("h3", ea, te(l(B)), 1)) : F("", !0),
1566
+ M(T.$slots, "legend", { data: l(x) }, () => [
1567
+ l(f).withLegend !== !1 && l(f).legendPosition !== "bottom" ? (_(), W(l(pt), {
1553
1568
  key: 0,
1554
- data: l(_),
1569
+ data: l(x),
1555
1570
  class: "lume-chart__legend",
1556
1571
  "data-j-lume-chart__legend": "",
1557
- onClick: b[0] || (b[0] = (w) => t("legend-click", w)),
1558
- onMouseenter: b[1] || (b[1] = (w) => t("legend-mouseenter", w)),
1559
- onMouseleave: b[2] || (b[2] = (w) => t("legend-mouseleave"))
1560
- }, null, 8, ["data"])) : P("", !0)
1572
+ onClick: b[0] || (b[0] = (I) => t("legend-click", I)),
1573
+ onMouseenter: b[1] || (b[1] = (I) => t("legend-mouseenter", I)),
1574
+ onMouseleave: b[2] || (b[2] = (I) => t("legend-mouseleave"))
1575
+ }, null, 8, ["data"])) : F("", !0)
1561
1576
  ], !0)
1562
1577
  ])
1563
1578
  ])
1564
1579
  ]),
1565
1580
  footer: V(() => [
1566
- l(g) ? (h(), T("h3", qo, q(l(ce)), 1)) : P("", !0),
1567
- l(m).withLegend !== !1 && l(m).legendPosition == "bottom" ? (h(), W(l(dt), {
1581
+ l(k) ? (_(), L("h3", oa, te(l(fe)), 1)) : F("", !0),
1582
+ l(f).withLegend !== !1 && l(f).legendPosition == "bottom" ? (_(), W(l(pt), {
1568
1583
  key: 1,
1569
- data: l(_),
1584
+ data: l(x),
1570
1585
  class: "lume-chart__legend lume-chart__legend--bottom",
1571
1586
  "data-j-lume-chart__legend": "",
1572
- onClick: b[16] || (b[16] = (w) => t("legend-click", w)),
1573
- onMouseenter: b[17] || (b[17] = (w) => t("legend-mouseenter", w)),
1574
- onMouseleave: b[18] || (b[18] = (w) => t("legend-mouseleave"))
1575
- }, null, 8, ["data"])) : P("", !0)
1587
+ onClick: b[16] || (b[16] = (I) => t("legend-click", I)),
1588
+ onMouseenter: b[17] || (b[17] = (I) => t("legend-mouseenter", I)),
1589
+ onMouseleave: b[18] || (b[18] = (I) => t("legend-mouseleave"))
1590
+ }, null, 8, ["data"])) : F("", !0)
1576
1591
  ]),
1577
1592
  extra: V(() => [
1578
- R(O.$slots, "tooltip", C(l(Ie), {
1579
- data: l(_),
1580
- labels: l(E),
1581
- title: l(E)[d.value],
1582
- items: l(ot)(d.value),
1583
- position: l(at),
1584
- withTooltip: l(m).withTooltip !== !1,
1585
- hoveredIndex: d.value,
1586
- options: l(m).tooltipOptions
1593
+ M(T.$slots, "tooltip", C(l(Ae), {
1594
+ data: l(x),
1595
+ labels: l(N),
1596
+ title: l(N)[v.value],
1597
+ items: l(at)(v.value),
1598
+ position: l(rt),
1599
+ withTooltip: l(f).withTooltip !== !1,
1600
+ hoveredIndex: v.value,
1601
+ handleMouseEnter: () => h.value = !0,
1602
+ handleMouseLeave: () => h.value = !1,
1603
+ options: l(f).tooltipOptions
1587
1604
  }), () => [
1588
- l(Ut) ? (h(), W(l(yo), C({ key: 0 }, l(Ie), {
1589
- position: l(at),
1590
- title: l(E)[d.value],
1591
- items: l(ot)(d.value),
1592
- options: l(m).tooltipOptions,
1605
+ l(Kt) ? (_(), W(l(To), C({ key: 0 }, l(Ae), {
1606
+ position: l(rt),
1607
+ title: l(N)[v.value],
1608
+ items: l(at)(v.value),
1609
+ options: l(f).tooltipOptions,
1593
1610
  "data-j-lume-chart__tooltip": "",
1594
- onOpened: b[19] || (b[19] = (w) => t("tooltip-opened", {
1595
- index: d.value,
1596
- targetElement: w
1611
+ onOpened: b[19] || (b[19] = (I) => t("tooltip-opened", {
1612
+ index: v.value,
1613
+ targetElement: I
1597
1614
  })),
1598
- onMoved: b[20] || (b[20] = (w) => t("tooltip-moved", {
1599
- index: d.value,
1600
- targetElement: w
1615
+ onMoved: b[20] || (b[20] = (I) => t("tooltip-moved", {
1616
+ index: v.value,
1617
+ targetElement: I
1601
1618
  })),
1602
- onClosed: b[21] || (b[21] = (w) => t("tooltip-closed"))
1619
+ onClosed: b[21] || (b[21] = (I) => t("tooltip-closed")),
1620
+ onTooltipMouseenter: b[22] || (b[22] = (I) => h.value = !0),
1621
+ onTooltipMouseleave: b[23] || (b[23] = (I) => h.value = !1)
1603
1622
  }), {
1604
1623
  default: V(() => [
1605
- R(O.$slots, "tooltip-content", {
1606
- data: l(_),
1607
- labels: l(E),
1608
- hoveredIndex: d.value
1624
+ M(T.$slots, "tooltip-content", {
1625
+ data: l(x),
1626
+ labels: l(N),
1627
+ hoveredIndex: v.value
1609
1628
  }, void 0, !0)
1610
1629
  ]),
1611
1630
  _: 3
1612
- }, 16, ["position", "title", "items", "options"])) : P("", !0)
1631
+ }, 16, ["position", "title", "items", "options"])) : F("", !0)
1613
1632
  ], !0)
1614
1633
  ]),
1615
1634
  default: V(() => [
1616
- l(B) ? (h(), T(K, { key: 0 }, [
1617
- l(F) ? (h(), W(l(qe), C({ key: 0 }, l(re), {
1635
+ l(j) ? (_(), L(J, { key: 0 }, [
1636
+ l(U) ? (_(), W(l(et), C({ key: 0 }, l(le), {
1618
1637
  "class-list": "lume-fill--negative",
1619
1638
  transition: !1,
1620
1639
  "data-j-lume-chart__negative-values": ""
1621
- }), null, 16)) : P("", !0),
1622
- l(m).withAxes !== !1 ? R(O.$slots, "axes", {
1640
+ }), null, 16)) : F("", !0),
1641
+ l(f).withAxes !== !1 ? M(T.$slots, "axes", {
1623
1642
  key: 1,
1624
- xScale: l(Y),
1625
- yScale: l(G),
1626
- containerSize: l(N),
1627
- options: l(m),
1628
- hoveredIndex: d.value
1643
+ xScale: l(P),
1644
+ yScale: l(K),
1645
+ containerSize: l($),
1646
+ options: l(f),
1647
+ hoveredIndex: v.value
1629
1648
  }, () => [
1630
- oe(l(ct), {
1649
+ ae(l(vt), {
1631
1650
  type: "x",
1632
- scale: l(Y),
1633
- "container-size": l(N),
1634
- options: l(te),
1635
- "hovered-index": d.value,
1651
+ scale: l(P),
1652
+ "container-size": l($),
1653
+ options: l(ke),
1654
+ "hovered-index": v.value,
1636
1655
  orientation: l(i),
1637
1656
  "data-j-lume-chart__x-axis": "",
1638
- onClick: ut,
1639
- onMouseenter: lt,
1640
- onMouseleave: b[3] || (b[3] = (w) => t("axis-mouseleave")),
1641
- "onLume__internal-AxisSize": b[4] || (b[4] = (w) => k.value = w)
1657
+ onClick: st,
1658
+ onMouseenter: it,
1659
+ onMouseleave: b[3] || (b[3] = (I) => t("axis-mouseleave")),
1660
+ "onLume__internal-AxisSize": b[4] || (b[4] = (I) => A.value = I)
1642
1661
  }, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"]),
1643
- oe(l(ct), {
1662
+ ae(l(vt), {
1644
1663
  type: "y",
1645
- scale: l(G),
1646
- "container-size": l(N),
1647
- options: l(Te),
1648
- "hovered-index": d.value,
1664
+ scale: l(K),
1665
+ "container-size": l($),
1666
+ options: l(be),
1667
+ "hovered-index": v.value,
1649
1668
  orientation: l(i),
1650
1669
  "data-j-lume-chart__y-axis": "",
1651
- onClick: ut,
1652
- onMouseenter: lt,
1653
- onMouseleave: b[5] || (b[5] = (w) => t("axis-mouseleave")),
1654
- "onLume__internal-AxisSize": b[6] || (b[6] = (w) => A.value = w)
1670
+ onClick: st,
1671
+ onMouseenter: it,
1672
+ onMouseleave: b[5] || (b[5] = (I) => t("axis-mouseleave")),
1673
+ "onLume__internal-AxisSize": b[6] || (b[6] = (I) => O.value = I)
1655
1674
  }, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"])
1656
- ], !0) : P("", !0),
1657
- l(m).withHover !== !1 ? (h(), W(l(Bo), {
1675
+ ], !0) : F("", !0),
1676
+ l(f).withHover !== !1 ? (_(), W(l(Co), {
1658
1677
  key: 2,
1659
- data: l(_),
1678
+ data: l(x),
1660
1679
  orientation: l(i),
1661
- "x-scale": l(Y),
1662
- "y-scale": l(G),
1680
+ "x-scale": l(P),
1681
+ "y-scale": l(K),
1663
1682
  "data-j-lume-chart__overlay-group": "",
1664
- "onLume__internal-Hover": Ne
1665
- }, null, 8, ["data", "orientation", "x-scale", "y-scale"])) : P("", !0),
1666
- l(Se) ? (h(), T("g", Jo, [
1667
- (h(!0), T(K, null, z($.value, (w, Yt) => (h(), T("circle", C(w, {
1683
+ "onLume__internal-Hover": De
1684
+ }, null, 8, ["data", "orientation", "x-scale", "y-scale"])) : F("", !0),
1685
+ l(Ce) ? (_(), L("g", ta, [
1686
+ (_(!0), L(J, null, z(y.value, (I, qt) => (_(), L("circle", C(I, {
1668
1687
  ref_for: !0,
1669
1688
  ref_key: "tooltipAnchor",
1670
- ref: v,
1671
- key: `anchor_${Yt}`,
1672
- r: l(wn),
1689
+ ref: d,
1690
+ key: `anchor_${qt}`,
1691
+ r: l(Dn),
1673
1692
  class: "lume-fill--transparent"
1674
- }), null, 16, Qo))), 128))
1675
- ])) : P("", !0),
1676
- R(O.$slots, "groups", {
1677
- data: l(_),
1678
- labels: l(E),
1679
- options: l(m),
1693
+ }), null, 16, na))), 128))
1694
+ ])) : F("", !0),
1695
+ M(T.$slots, "groups", {
1696
+ data: l(x),
1697
+ labels: l(N),
1698
+ options: l(f),
1680
1699
  orientation: l(i),
1681
- xScale: l(Y),
1682
- yScale: l(G),
1683
- hoveredIndex: d.value,
1684
- containerSize: l(N),
1685
- transition: l(m).withTransition !== !1,
1686
- classList: O.classList,
1687
- onNodeClick: b[7] || (b[7] = (w) => t("node-click", w)),
1688
- onNodeMouseenter: b[8] || (b[8] = (w) => t("node-mouseenter", w)),
1689
- onNodeMouseleave: b[9] || (b[9] = (w) => t("node-mouseleave", w)),
1690
- onLinkClick: b[10] || (b[10] = (w) => t("link-click", w)),
1691
- onLinkMouseenter: b[11] || (b[11] = (w) => t("link-mouseenter", w)),
1692
- onLinkMouseleave: b[12] || (b[12] = (w) => t("link-mouseleave", w)),
1693
- onBarClick: b[13] || (b[13] = (w) => t("bar-click", w)),
1694
- onLineClick: b[14] || (b[14] = (w) => t("line-click", w)),
1695
- onPointClick: b[15] || (b[15] = (w) => t("point-click", w)),
1696
- "onLume__internal-Hover": Ne
1700
+ xScale: l(P),
1701
+ yScale: l(K),
1702
+ hoveredIndex: v.value,
1703
+ containerSize: l($),
1704
+ transition: l(f).withTransition !== !1,
1705
+ classList: T.classList,
1706
+ onNodeClick: b[7] || (b[7] = (I) => t("node-click", I)),
1707
+ onNodeMouseenter: b[8] || (b[8] = (I) => t("node-mouseenter", I)),
1708
+ onNodeMouseleave: b[9] || (b[9] = (I) => t("node-mouseleave", I)),
1709
+ onLinkClick: b[10] || (b[10] = (I) => t("link-click", I)),
1710
+ onLinkMouseenter: b[11] || (b[11] = (I) => t("link-mouseenter", I)),
1711
+ onLinkMouseleave: b[12] || (b[12] = (I) => t("link-mouseleave", I)),
1712
+ onBarClick: b[13] || (b[13] = (I) => t("bar-click", I)),
1713
+ onLineClick: b[14] || (b[14] = (I) => t("line-click", I)),
1714
+ onPointClick: b[15] || (b[15] = (I) => t("point-click", I)),
1715
+ "onLume__internal-Hover": De
1697
1716
  }, void 0, !0)
1698
- ], 64)) : P("", !0)
1717
+ ], 64)) : F("", !0)
1699
1718
  ]),
1700
1719
  _: 3
1701
1720
  }, 8, ["id", "margins", "container-size", "no-min-size", "transparent-background", "onResize"]));
1702
1721
  }
1703
1722
  });
1704
- const Ae = /* @__PURE__ */ J(ea, [["__scopeId", "data-v-c4b73860"]]), ta = ["dy"], na = /* @__PURE__ */ Z({
1723
+ const Oe = /* @__PURE__ */ Q(aa, [["__scopeId", "data-v-71e133df"]]), ra = ["dy"], la = /* @__PURE__ */ Z({
1705
1724
  __name: "lume-alluvial-node-label",
1706
1725
  props: {
1707
1726
  bottom: { type: Boolean, default: !1 }
1708
1727
  },
1709
1728
  setup(e) {
1710
- return (t, n) => (h(), T("text", {
1729
+ return (t, n) => (_(), L("text", {
1711
1730
  class: "lume-alluvial-group__node-label",
1712
1731
  dy: e.bottom ? "1.2em" : ""
1713
1732
  }, [
1714
- R(t.$slots, "default", {}, void 0, !0)
1715
- ], 8, ta));
1733
+ M(t.$slots, "default", {}, void 0, !0)
1734
+ ], 8, ra));
1716
1735
  }
1717
1736
  });
1718
- const oa = /* @__PURE__ */ J(na, [["__scopeId", "data-v-d2a7cb8e"]]), aa = ["dy"], ra = /* @__PURE__ */ Z({
1737
+ const ua = /* @__PURE__ */ Q(la, [["__scopeId", "data-v-d2a7cb8e"]]), ia = ["dy"], sa = /* @__PURE__ */ Z({
1719
1738
  __name: "lume-alluvial-node-value",
1720
1739
  props: {
1721
1740
  bottom: { type: Boolean, default: !0 }
1722
1741
  },
1723
1742
  setup(e) {
1724
- return (t, n) => (h(), T("text", {
1743
+ return (t, n) => (_(), L("text", {
1725
1744
  class: "lume-alluvial-group__node-value",
1726
1745
  dy: e.bottom ? "1.2em" : ""
1727
1746
  }, [
1728
- R(t.$slots, "default", {}, void 0, !0)
1729
- ], 8, aa));
1747
+ M(t.$slots, "default", {}, void 0, !0)
1748
+ ], 8, ia));
1730
1749
  }
1731
1750
  });
1732
- const la = /* @__PURE__ */ J(ra, [["__scopeId", "data-v-002e2887"]]);
1733
- function yt(e, t) {
1751
+ const ca = /* @__PURE__ */ Q(sa, [["__scopeId", "data-v-002e2887"]]);
1752
+ function bt(e, t) {
1734
1753
  return {
1735
1754
  x0: 0 + (t ? t.left : 0),
1736
1755
  y0: 0 + (t ? t.top : 0),
@@ -1738,32 +1757,32 @@ function yt(e, t) {
1738
1757
  y1: e.height - (t ? t.bottom : 0)
1739
1758
  };
1740
1759
  }
1741
- function ua(e) {
1742
- const t = S(yt(e));
1760
+ function da(e) {
1761
+ const t = R(bt(e));
1743
1762
  function n(o) {
1744
- t.value = yt(e, o);
1763
+ t.value = bt(e, o);
1745
1764
  }
1746
1765
  return { extents: t, updateExtents: n };
1747
1766
  }
1748
- var Gt = /* @__PURE__ */ ((e) => (e.GraphProblem = "There was an issue generating your alluvial graph.", e))(Gt || {});
1749
- const ia = "[lume] ";
1750
- function sa(e, t, n = !0) {
1751
- n && $t() || console.error(ia + "Error: " + e, t);
1767
+ var Ft = /* @__PURE__ */ ((e) => (e.GraphProblem = "There was an issue generating your alluvial graph.", e))(Ft || {});
1768
+ const va = "[lume] ";
1769
+ function pa(e, t, n = !0) {
1770
+ n && It() || console.error(va + "Error: " + e, t);
1752
1771
  }
1753
- const kt = 8, ca = 8, da = 20, va = 200;
1754
- function ke(e) {
1772
+ const At = 8, fa = 8, ma = 20, ha = 200;
1773
+ function Te(e) {
1755
1774
  return typeof e == "string" || typeof e == "number" ? e : e.id ?? e.label;
1756
1775
  }
1757
- function pa(e, t) {
1776
+ function ga(e, t) {
1758
1777
  return t.nodes.find((n) => n.id === e);
1759
1778
  }
1760
- function fa(e, t) {
1779
+ function _a(e, t) {
1761
1780
  return t.links.find((n) => n.id === e);
1762
1781
  }
1763
- function Vt(e) {
1782
+ function zt(e) {
1764
1783
  return !!(e.sourceLinks && e.targetLinks);
1765
1784
  }
1766
- function ha(e, t) {
1785
+ function ya(e, t) {
1767
1786
  if (!t)
1768
1787
  return;
1769
1788
  const n = e.nodes.filter((u) => u.targetLinks.length === 0).map((u) => `${u.id}`), o = e.nodes.filter((u) => u.sourceLinks.length === 0).map((u) => `${u.id}`), r = t.filter((u) => n.includes(u.dataset.id)).reduce(
@@ -1780,41 +1799,41 @@ function ha(e, t) {
1780
1799
  bottom: 0
1781
1800
  };
1782
1801
  }
1783
- function ma(e) {
1802
+ function ka(e) {
1784
1803
  return e.map((t) => ({
1785
1804
  x: t.x0,
1786
1805
  y: t.y0,
1787
1806
  width: t.x1 - t.x0,
1788
1807
  height: t.y1 - t.y0,
1789
1808
  textTransform: {
1790
- x: t.depth > 0 ? t.x1 + kt : t.x0 - kt,
1809
+ x: t.depth > 0 ? t.x1 + At : t.x0 - At,
1791
1810
  y: (t.y1 + t.y0) / 2
1792
1811
  },
1793
1812
  node: t
1794
1813
  }));
1795
1814
  }
1796
- function ga(e) {
1815
+ function ba(e) {
1797
1816
  return [e.source.x1, e.y0];
1798
1817
  }
1799
- function _a(e) {
1818
+ function Aa(e) {
1800
1819
  return [e.target.x0, e.y1];
1801
1820
  }
1802
- function ya(e) {
1803
- return e.curveFunction ? on(e.curveFunction).source(ga).target(_a) : un();
1821
+ function Ta(e) {
1822
+ return e.curveFunction ? un(e.curveFunction).source(ba).target(Aa) : vn();
1804
1823
  }
1805
- function ka(e) {
1824
+ function La(e) {
1806
1825
  return e.map((t) => {
1807
1826
  var n;
1808
1827
  return {
1809
1828
  id: t.id,
1810
- color: t.color || ((n = t.source) == null ? void 0 : n.color) || we,
1811
- d: ya(t)(t),
1829
+ color: t.color || ((n = t.source) == null ? void 0 : n.color) || Ee,
1830
+ d: Ta(t)(t),
1812
1831
  strokeWidth: Math.max(1, t.width),
1813
1832
  link: t
1814
1833
  };
1815
1834
  });
1816
1835
  }
1817
- function bt(e, t, n, o, r) {
1836
+ function Tt(e, t, n, o, r) {
1818
1837
  if (o === !1) {
1819
1838
  e.node = {
1820
1839
  ...e.node,
@@ -1822,8 +1841,8 @@ function bt(e, t, n, o, r) {
1822
1841
  };
1823
1842
  return;
1824
1843
  }
1825
- const a = Date.now(), u = kn(t, n), s = () => {
1826
- let c = (Date.now() - a) / va;
1844
+ const a = Date.now(), u = Ln(t, n), s = () => {
1845
+ let c = (Date.now() - a) / ha;
1827
1846
  c > 1 && (c = 1), e.node = {
1828
1847
  ...e.node,
1829
1848
  transitionValue: r && c === 1 ? void 0 : u(c)
@@ -1831,115 +1850,146 @@ function bt(e, t, n, o, r) {
1831
1850
  };
1832
1851
  requestAnimationFrame(s);
1833
1852
  }
1834
- const ba = {
1853
+ const Oa = {
1835
1854
  nodes: [],
1836
1855
  links: []
1837
1856
  };
1838
- function Aa(e, t, n) {
1839
- const o = S(null), r = p(() => {
1840
- var s;
1841
- return (s = e.value) == null ? void 0 : s[0].values.map(
1842
- ({ label: i, color: c, value: d, deriveColorFromIncomingLinks: v }) => ({
1843
- label: i || d.toString(),
1844
- color: c,
1845
- fallbackColor: c || we,
1846
- id: d,
1847
- deriveColorFromIncomingLinks: v
1857
+ function Lt(e, t) {
1858
+ return t.find((n) => n.every((o) => o.x0 === e.x0));
1859
+ }
1860
+ function $a(e, t, n) {
1861
+ const o = R(null), r = p(() => {
1862
+ var d;
1863
+ return (d = e.value) == null ? void 0 : d[0].values.map(
1864
+ ({ label: m, color: y, value: h, deriveColorFromIncomingLinks: A, offset: O }) => ({
1865
+ label: m || h.toString(),
1866
+ color: y,
1867
+ fallbackColor: y || Ee,
1868
+ id: h,
1869
+ deriveColorFromIncomingLinks: A,
1870
+ offset: O
1848
1871
  })
1849
1872
  );
1850
1873
  }), a = p(
1851
1874
  () => {
1852
- var s;
1853
- return (s = e.value) == null ? void 0 : s[0].values.map(
1854
- (i) => {
1855
- var c;
1856
- return (c = i.targets) == null ? void 0 : c.map(
1857
- ({ node: d, value: v, color: y, curveFunction: $ }) => ({
1858
- id: `${i.value}:${d}`,
1859
- color: y,
1860
- curveFunction: $,
1861
- source: i.value ?? i.label,
1862
- target: d,
1863
- value: v
1875
+ var d;
1876
+ return (d = e.value) == null ? void 0 : d[0].values.map(
1877
+ (m) => {
1878
+ var y;
1879
+ return (y = m.targets) == null ? void 0 : y.map(
1880
+ ({ node: h, value: A, color: O, curveFunction: f }) => ({
1881
+ id: `${m.value}:${h}`,
1882
+ color: O,
1883
+ curveFunction: f,
1884
+ source: m.value ?? m.label,
1885
+ target: h,
1886
+ value: A
1864
1887
  })
1865
1888
  );
1866
1889
  }
1867
1890
  ).filter(Boolean).flat();
1868
1891
  }
1869
- ), u = p(() => sn().nodeId(ke).nodeAlign(t.value.nodeAlign).nodePadding(t.value.nodePadding).nodeSort(t.value.nodeSort).nodeWidth(t.value.nodeWidth).linkSort(t.value.linkSort).iterations(t.value.iterations));
1870
- return U([u, n], () => {
1892
+ ), u = p(() => pn().nodeId(Te).nodeAlign(t.value.nodeAlign).nodePadding(t.value.nodePadding).nodeSort(t.value.nodeSort).nodeWidth(t.value.nodeWidth).linkSort(t.value.linkSort).iterations(t.value.iterations)), s = p(() => {
1893
+ var d;
1894
+ return (d = o.value) == null ? void 0 : d.nodes.reduce(
1895
+ (m, y) => {
1896
+ const h = Lt(y, m);
1897
+ return h ? (h.push(y), h.sort((A, O) => (A._y0 || A.y0) - (O._y0 || O.y0))) : m.push([y]), m;
1898
+ },
1899
+ []
1900
+ );
1901
+ });
1902
+ function i(d) {
1903
+ const { offset: m } = d, y = Lt(d, s.value);
1904
+ if (!y)
1905
+ return;
1906
+ const h = y[y.findIndex((O) => O.id === d.id) - 1], A = h && y.length !== 1 ? h.y1 + m : m;
1907
+ d._y0 = d.y0, d._y1 = d.y1, d.y0 = A, d.y1 = d.y0 + (d._y1 - d._y0);
1908
+ }
1909
+ function c(d, m) {
1910
+ const { id: y, _y0: h, y0: A } = d, O = m.links.filter(
1911
+ (N) => N.source.id === y
1912
+ ), f = m.links.filter(
1913
+ (N) => N.target.id === y
1914
+ ), x = A - h;
1915
+ O.forEach((N) => N.y0 += x), f.forEach((N) => N.y1 += x);
1916
+ }
1917
+ const v = p(() => (o.value && r.value.forEach((d) => {
1918
+ typeof d.offset == "number" && (i(d), c(d, o.value));
1919
+ }), o.value));
1920
+ return X([u, n], () => {
1871
1921
  try {
1872
- const { x0: s, y0: i, x1: c, y1: d } = n.value;
1922
+ const { x0: d, y0: m, x1: y, y1: h } = n.value;
1873
1923
  o.value = u.value.extent([
1874
- [s, i],
1875
- [c, d]
1924
+ [d, m],
1925
+ [y, h]
1876
1926
  ])({ nodes: r.value, links: a.value });
1877
- } catch (s) {
1878
- sa(Gt.GraphProblem, s), o.value = ba;
1927
+ } catch (d) {
1928
+ pa(Ft.GraphProblem, d), o.value = Oa;
1879
1929
  }
1880
- }), { graph: o };
1930
+ }), { columns: s, graph: v };
1881
1931
  }
1882
- function Xe(e, t) {
1932
+ function Ye(e, t) {
1883
1933
  return t || (t = {}), e.targetLinks && e.targetLinks.forEach(({ source: n, value: o }) => {
1884
- t[n.id] = o, Xe(
1934
+ t[n.id] = o, Ye(
1885
1935
  n,
1886
1936
  t
1887
1937
  );
1888
1938
  }), t;
1889
1939
  }
1890
- function Ye(e, t) {
1940
+ function Ke(e, t) {
1891
1941
  return t || (t = {}), e.sourceLinks && e.sourceLinks.forEach(({ target: n, value: o }) => {
1892
- t[n.id] = o, Ye(
1942
+ t[n.id] = o, Ke(
1893
1943
  n,
1894
1944
  t
1895
1945
  );
1896
1946
  }), t;
1897
1947
  }
1898
- function Ta(e, t) {
1948
+ function xa(e, t) {
1899
1949
  return t.links.reduce((n, o) => (o.source.id in e && o.target.id in e && n.push(o.id), n), []);
1900
1950
  }
1901
- const La = (e, t) => {
1951
+ const wa = (e, t) => {
1902
1952
  let n;
1903
- Vt(e) ? n = {
1953
+ zt(e) ? n = {
1904
1954
  [e.id]: e.value,
1905
- ...Xe(e),
1906
- ...Ye(e)
1955
+ ...Ye(e),
1956
+ ...Ke(e)
1907
1957
  } : n = {
1908
1958
  [e.source.id]: e.source.value,
1909
1959
  [e.target.id]: e.target.value,
1910
- ...Xe(e.source),
1911
- ...Ye(e.target)
1960
+ ...Ye(e.source),
1961
+ ...Ke(e.target)
1912
1962
  };
1913
- const o = Ta(n, t);
1963
+ const o = xa(n, t);
1914
1964
  return { nodes: n, links: o };
1915
- }, Oa = (e) => {
1916
- if (Vt(e)) {
1965
+ }, Ia = (e) => {
1966
+ if (zt(e)) {
1917
1967
  const t = [...e.sourceLinks, ...e.targetLinks];
1918
1968
  return {
1919
1969
  nodes: t.reduce(
1920
- (n, { source: o, target: r, value: a }) => o === e ? { ...n, [ke(r)]: a } : { ...n, [ke(o)]: a },
1921
- { [ke(e)]: e.value }
1970
+ (n, { source: o, target: r, value: a }) => o === e ? { ...n, [Te(r)]: a } : { ...n, [Te(o)]: a },
1971
+ { [Te(e)]: e.value }
1922
1972
  ),
1923
1973
  links: t.map(({ id: n }) => n)
1924
1974
  };
1925
1975
  }
1926
1976
  return {
1927
1977
  nodes: {
1928
- [ke(e.target)]: e.value,
1929
- [ke(e.source)]: e.source.value
1978
+ [Te(e.target)]: e.value,
1979
+ [Te(e.source)]: e.source.value
1930
1980
  },
1931
1981
  links: [e.id]
1932
1982
  };
1933
1983
  };
1934
- function $a(e, t, n) {
1935
- const o = S(null), r = p(() => o.value ? typeof t.value.highlightedElements == "function" ? t.value.highlightedElements(
1984
+ function Ea(e, t, n) {
1985
+ const o = R(null), r = p(() => o.value ? typeof t.value.highlightedElements == "function" ? t.value.highlightedElements(
1936
1986
  o.value,
1937
1987
  n.value
1938
- ) : t.value.highlightedElements === "closest" ? Oa(o.value, n.value) : La(o.value, n.value) : { nodes: {}, links: [] });
1939
- return U(r, (a, u) => {
1988
+ ) : t.value.highlightedElements === "closest" ? Ia(o.value, n.value) : wa(o.value, n.value) : { nodes: {}, links: [] });
1989
+ return X(r, (a, u) => {
1940
1990
  if (a.links.length === 0 && Object.keys(a.nodes).length === 0) {
1941
1991
  e.value.forEach((s) => {
1942
- s.node.id in u.nodes && bt(
1992
+ s.node.id in u.nodes && Tt(
1943
1993
  s,
1944
1994
  u.nodes[s.node.id],
1945
1995
  s.node.value,
@@ -1950,7 +2000,7 @@ function $a(e, t, n) {
1950
2000
  return;
1951
2001
  }
1952
2002
  e.value.forEach((s) => {
1953
- s.node.id in a.nodes && bt(
2003
+ s.node.id in a.nodes && Tt(
1954
2004
  s,
1955
2005
  s.node.value,
1956
2006
  a.nodes[s.node.id],
@@ -1959,13 +2009,13 @@ function $a(e, t, n) {
1959
2009
  });
1960
2010
  }), { highlightedElements: r, hoveredElement: o };
1961
2011
  }
1962
- const xa = {
2012
+ const Na = {
1963
2013
  class: "lume-alluvial-group",
1964
2014
  "data-j-alluvial-group": ""
1965
- }, wa = { key: 0 }, Ia = ["x", "y"], Ea = { key: 0 }, Na = ["id", "x1", "x2"], Da = ["stop-color"], Ha = ["stop-color"], Ba = ["d", "stroke-width", "onClick", "onMouseover"], Ra = ["d", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-width", "data-id", "onClick", "onMouseover"], Ma = ["onClick", "onMouseenter", "onMouseleave", "onMouseover"], Sa = ["x", "y", "height", "width"], Ca = ["transform", "data-id"], ja = /* @__PURE__ */ Z({
2015
+ }, Da = { key: 0 }, Ha = ["x", "y"], Ba = { key: 0 }, Ra = ["id", "x1", "x2"], Ma = ["stop-color"], Sa = ["stop-color"], Ca = ["d", "stroke-width", "onClick", "onMouseover"], Ga = ["d", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-width", "data-id", "onClick", "onMouseover"], ja = ["onClick", "onMouseenter", "onMouseleave", "onMouseover"], Va = ["x", "y", "height", "width"], Pa = ["transform", "data-id"], Fa = /* @__PURE__ */ Z({
1966
2016
  __name: "lume-alluvial-group",
1967
2017
  props: {
1968
- ...Me(),
2018
+ ...Se(),
1969
2019
  hoveredElementId: {
1970
2020
  type: [Number, String],
1971
2021
  default: null
@@ -1973,240 +2023,236 @@ const xa = {
1973
2023
  },
1974
2024
  emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
1975
2025
  setup(e, { emit: t }) {
1976
- const n = e, o = He("chartID"), { data: r, options: a } = Q(n), u = S([]), s = S([]), i = S(null), { extents: c, updateExtents: d } = ua(n.containerSize), { graph: v } = Aa(r, a, c), { hoveredElement: y, highlightedElements: $ } = $a(
2026
+ const n = e, o = Be("chartID"), { data: r, options: a } = q(n), u = R([]), s = R([]), i = R(null), { extents: c, updateExtents: v } = da(n.containerSize), { columns: d, graph: m } = $a(r, a, c), { hoveredElement: y, highlightedElements: h } = Ea(
1977
2027
  u,
1978
2028
  a,
1979
- v
1980
- ), k = p(() => De(a.value.valueFormat)), A = p(
1981
- () => Object.keys($.value.nodes)
1982
- ), m = p(
1983
- () => u.value.reduce((g, L) => {
1984
- const f = L.x + a.value.nodeWidth / 2;
1985
- return g.includes(f) ? g : [...g, f];
1986
- }, []).sort((g, L) => g - L)
1987
- // Make sure positions are sorted in ascending order
1988
- ), _ = p(() => {
2029
+ m
2030
+ ), A = p(() => He(a.value.valueFormat)), O = p(
2031
+ () => Object.keys(h.value.nodes)
2032
+ ), f = p(() => d.value ? d.value.map(
2033
+ (k) => k[0].x0 + a.value.nodeWidth / 2
2034
+ ) : []), x = p(() => {
1989
2035
  if (!(!a.value.nodeHeaders || !a.value.nodeHeaders.length))
1990
- return a.value.nodeHeaders.slice(0, m.value.length).map((g, L) => ({
1991
- label: g,
1992
- x: m.value[L]
2036
+ return a.value.nodeHeaders.slice(0, f.value.length).map((k, E) => ({
2037
+ label: k,
2038
+ x: f.value[E]
1993
2039
  }));
1994
- }), E = p(
1995
- () => a.value.nodeHeaderPadding ?? da
1996
- ), N = p(() => {
1997
- if (!(!a.value.gradient || !v.value))
1998
- return v.value.links.reduce((g, L) => {
1999
- const { source: f, target: B } = L, F = f.color || f.fallbackColor, re = B.deriveColorFromIncomingLinks ? F : B.color || B.fallbackColor;
2000
- return g[L.id] = {
2001
- source: F,
2002
- target: re,
2003
- x1: f.x1,
2004
- x2: B.x0
2005
- }, g;
2040
+ }), N = p(
2041
+ () => a.value.nodeHeaderPadding ?? ma
2042
+ ), $ = p(() => {
2043
+ if (!(!a.value.gradient || !m.value))
2044
+ return m.value.links.reduce((k, E) => {
2045
+ const { source: g, target: j } = E, U = g.color || g.fallbackColor, le = j.deriveColorFromIncomingLinks ? U : j.color || j.fallbackColor;
2046
+ return k[E.id] = {
2047
+ source: U,
2048
+ target: le,
2049
+ x1: g.x1,
2050
+ x2: j.x0
2051
+ }, k;
2006
2052
  }, {});
2007
- }), I = p(() => {
2008
- const g = u.value.filter(
2009
- (f) => G(f)
2010
- ), L = [];
2011
- return g.forEach((f) => {
2012
- const B = [];
2013
- s.value.filter(({ link: F }) => F.target.id === f.node.id).reverse().reduce((F, re) => {
2014
- const Se = re.link.target.y1 - re.link.target.y0, Ee = re.link.value / f.node.value * Se;
2015
- return B.push({
2016
- x: f.x,
2017
- y: f.y + F,
2018
- height: Ee,
2019
- width: f.width,
2020
- key: `node-block-${f.node.id}-source-link-${re.link.source.id}`,
2021
- class: `lume-alluvial-group__node-block lume-fill--${re.link.source.color || we}`
2022
- }), F + Ee;
2023
- }, 0), L.push({
2024
- id: f.node.id,
2025
- subNodes: B
2053
+ }), w = p(() => {
2054
+ const k = u.value.filter(
2055
+ (g) => K(g)
2056
+ ), E = [];
2057
+ return k.forEach((g) => {
2058
+ const j = [];
2059
+ s.value.filter(({ link: U }) => U.target.id === g.node.id).reverse().reduce((U, le) => {
2060
+ const Ce = le.link.target.y1 - le.link.target.y0, Ne = le.link.value / g.node.value * Ce;
2061
+ return j.push({
2062
+ x: g.x,
2063
+ y: g.y + U,
2064
+ height: Ne,
2065
+ width: g.width,
2066
+ key: `node-block-${g.node.id}-source-link-${le.link.source.id}`,
2067
+ class: `lume-alluvial-group__node-block lume-fill--${le.link.source.color || Ee}`
2068
+ }), U + Ne;
2069
+ }, 0), E.push({
2070
+ id: g.node.id,
2071
+ subNodes: j
2026
2072
  });
2027
- }), L;
2073
+ }), E;
2028
2074
  });
2029
- function x(g) {
2030
- return a.value.gradient && `url('#${o}_${g.id}')`;
2075
+ function D(k) {
2076
+ return a.value.gradient && `url('#${o}_${k.id}')`;
2031
2077
  }
2032
- function H(g) {
2033
- return A.value.length > 0 && !A.value.includes(g.toString());
2078
+ function S(k) {
2079
+ return O.value.length > 0 && !O.value.includes(k.toString());
2034
2080
  }
2035
- function M(g) {
2036
- return A.value.length > 0 && A.value.includes(g.toString());
2081
+ function Y(k) {
2082
+ return O.value.length > 0 && O.value.includes(k.toString());
2037
2083
  }
2038
- function X(g) {
2039
- return $.value.links.length > 0 && !$.value.links.includes(g);
2084
+ function ne(k) {
2085
+ return h.value.links.length > 0 && !h.value.links.includes(k);
2040
2086
  }
2041
- function Y(g) {
2042
- return $.value.links.length > 0 && $.value.links.includes(g);
2087
+ function P(k) {
2088
+ return h.value.links.length > 0 && h.value.links.includes(k);
2043
2089
  }
2044
- function G(g) {
2045
- return !g.node.color && g.node.deriveColorFromIncomingLinks;
2090
+ function K(k) {
2091
+ return !k.node.color && k.node.deriveColorFromIncomingLinks;
2046
2092
  }
2047
- function te(g, L) {
2048
- g !== y.value && (y.value = g, t("link-mouseenter", { link: g, event: L }));
2093
+ function ke(k, E) {
2094
+ k !== y.value && (y.value = k, t("link-mouseenter", { link: k, event: E }));
2049
2095
  }
2050
- function Te(g) {
2051
- const L = y.value;
2052
- y.value = null, t("link-mouseleave", { link: L, event: g });
2096
+ function be(k) {
2097
+ const E = y.value;
2098
+ y.value = null, t("link-mouseleave", { link: E, event: k });
2053
2099
  }
2054
- function ce(g) {
2055
- if (g == null) {
2100
+ function fe(k) {
2101
+ if (k == null) {
2056
2102
  y.value = null;
2057
2103
  return;
2058
2104
  }
2059
- const L = pa(g, v.value) || fa(g, v.value);
2060
- if (!L) {
2105
+ const E = ga(k, m.value) || _a(k, m.value);
2106
+ if (!E) {
2061
2107
  he(ve.InvalidHoveredElement);
2062
2108
  return;
2063
2109
  }
2064
- y.value = L;
2110
+ y.value = E;
2065
2111
  }
2066
- function ye(g) {
2067
- var L;
2068
- return ((L = I.value.find(({ id: f }) => g === f)) == null ? void 0 : L.subNodes) ?? [];
2112
+ function B(k) {
2113
+ var E;
2114
+ return ((E = w.value.find(({ id: g }) => k === g)) == null ? void 0 : E.subNodes) ?? [];
2069
2115
  }
2070
- return U(v, (g) => {
2071
- u.value = ma(g.nodes), s.value = ka(g.links).reverse(), y.value == null && n.hoveredElementId != null && ce(n.hoveredElementId);
2072
- }), U([n.containerSize, i], () => {
2116
+ return X(m, (k) => {
2117
+ u.value = ka(k.nodes), s.value = La(k.links).reverse(), y.value == null && n.hoveredElementId != null && fe(n.hoveredElementId);
2118
+ }), X([n.containerSize, i], () => {
2073
2119
  if (n.containerSize.width && n.containerSize.height) {
2074
- const g = ha(v.value, i.value);
2075
- d(g);
2120
+ const k = ya(m.value, i.value);
2121
+ v(k);
2076
2122
  }
2077
- }), U(() => n.hoveredElementId, ce), (g, L) => (h(), T("g", xa, [
2078
- l(_) ? (h(), T("g", wa, [
2079
- (h(!0), T(K, null, z(l(_), (f) => (h(), T("text", {
2080
- key: `header_${f.x}`,
2081
- x: f.x,
2082
- y: -l(E),
2123
+ }), X(() => n.hoveredElementId, fe), (k, E) => (_(), L("g", Na, [
2124
+ l(x) ? (_(), L("g", Da, [
2125
+ (_(!0), L(J, null, z(l(x), (g) => (_(), L("text", {
2126
+ key: `header_${g.x}`,
2127
+ x: g.x,
2128
+ y: -l(N),
2083
2129
  class: "lume-alluvial-group__node-header lume-typography--caption"
2084
- }, q(f.label), 9, Ia))), 128))
2085
- ])) : P("", !0),
2086
- j("g", {
2130
+ }, te(g.label), 9, Ha))), 128))
2131
+ ])) : F("", !0),
2132
+ G("g", {
2087
2133
  class: "lume-alluvial-link-group",
2088
- onMouseleave: Te
2134
+ onMouseleave: be
2089
2135
  }, [
2090
- l(a).gradient ? (h(), T("defs", Ea, [
2091
- (h(!0), T(K, null, z(l(N), (f, B) => (h(), T("linearGradient", {
2092
- id: `${l(o)}_${B}`,
2093
- key: B,
2136
+ l(a).gradient ? (_(), L("defs", Ba, [
2137
+ (_(!0), L(J, null, z(l($), (g, j) => (_(), L("linearGradient", {
2138
+ id: `${l(o)}_${j}`,
2139
+ key: j,
2094
2140
  gradientUnits: "userSpaceOnUse",
2095
- x1: f.x1,
2096
- x2: f.x2
2141
+ x1: g.x1,
2142
+ x2: g.x2
2097
2143
  }, [
2098
- j("stop", {
2144
+ G("stop", {
2099
2145
  offset: "0%",
2100
- "stop-color": `var(--lume-color--${f.source})`
2101
- }, null, 8, Da),
2102
- j("stop", {
2146
+ "stop-color": `var(--lume-color--${g.source})`
2147
+ }, null, 8, Ma),
2148
+ G("stop", {
2103
2149
  offset: "100%",
2104
- "stop-color": `var(--lume-color--${f.target})`
2105
- }, null, 8, Ha)
2106
- ], 8, Na))), 128))
2107
- ])) : P("", !0),
2108
- (h(!0), T(K, null, z(s.value, (f) => (h(), T("path", {
2109
- key: `link-ghost_${f.id}`,
2150
+ "stop-color": `var(--lume-color--${g.target})`
2151
+ }, null, 8, Sa)
2152
+ ], 8, Ra))), 128))
2153
+ ])) : F("", !0),
2154
+ (_(!0), L(J, null, z(s.value, (g) => (_(), L("path", {
2155
+ key: `link-ghost_${g.id}`,
2110
2156
  class: ee(["lume-alluvial-group__link", [
2111
2157
  "lume-stroke--transparent",
2112
2158
  "lume-alluvial-group__link--ghost"
2113
2159
  ]]),
2114
- d: f.d,
2115
- "stroke-width": f.strokeWidth + l(ca),
2160
+ d: g.d,
2161
+ "stroke-width": g.strokeWidth + l(fa),
2116
2162
  "data-j-alluvial-ghost": "",
2117
- onClick: (B) => t("link-click", { link: f.link, event: B }),
2118
- onMouseover: (B) => te(f.link, B)
2119
- }, null, 40, Ba))), 128)),
2120
- (h(!0), T(K, null, z(s.value, (f) => (h(), T("path", {
2121
- key: `link_${f.id}`,
2163
+ onClick: (j) => t("link-click", { link: g.link, event: j }),
2164
+ onMouseover: (j) => ke(g.link, j)
2165
+ }, null, 40, Ca))), 128)),
2166
+ (_(!0), L(J, null, z(s.value, (g) => (_(), L("path", {
2167
+ key: `link_${g.id}`,
2122
2168
  class: ee(["lume-alluvial-group__link", {
2123
- [`lume-stroke--${f.color}`]: !l(a).gradient && f.color,
2124
- "lume-alluvial-group__link--faded": X(f.id),
2125
- "lume-alluvial-group__link--focused": Y(f.id)
2169
+ [`lume-stroke--${g.color}`]: !l(a).gradient && g.color,
2170
+ "lume-alluvial-group__link--faded": ne(g.id),
2171
+ "lume-alluvial-group__link--focused": P(g.id)
2126
2172
  }]),
2127
- d: f.d,
2128
- stroke: x(f.link),
2129
- "stroke-dasharray": g.containerSize.width,
2130
- "stroke-dashoffset": g.containerSize.width,
2131
- "stroke-width": f.strokeWidth,
2173
+ d: g.d,
2174
+ stroke: D(g.link),
2175
+ "stroke-dasharray": k.containerSize.width,
2176
+ "stroke-dashoffset": k.containerSize.width,
2177
+ "stroke-width": g.strokeWidth,
2132
2178
  "data-j-alluvial-path": "",
2133
- "data-id": f.id,
2134
- onClick: (B) => t("link-click", { link: f.link, event: B }),
2135
- onMouseover: (B) => te(f.link, B)
2136
- }, null, 42, Ra))), 128))
2179
+ "data-id": g.id,
2180
+ onClick: (j) => t("link-click", { link: g.link, event: j }),
2181
+ onMouseover: (j) => ke(g.link, j)
2182
+ }, null, 42, Ga))), 128))
2137
2183
  ], 32),
2138
- (h(!0), T(K, null, z(u.value, (f, B) => (h(), T("g", {
2139
- key: `node-block_${B}`,
2184
+ (_(!0), L(J, null, z(u.value, (g, j) => (_(), L("g", {
2185
+ key: `node-block_${j}`,
2140
2186
  class: ee(["lume-alluvial-group__node", {
2141
- "lume-alluvial-group__node--faded": H(f.node.id),
2142
- "lume-alluvial-group__node--focused": M(f.node.id)
2187
+ "lume-alluvial-group__node--faded": S(g.node.id),
2188
+ "lume-alluvial-group__node--focused": Y(g.node.id)
2143
2189
  }]),
2144
2190
  "data-j-alluvial-group__node-block": ""
2145
2191
  }, [
2146
- j("g", {
2147
- onClick: (F) => t("node-click", { node: f.node, event: F }),
2148
- onMouseenter: (F) => t("node-mouseenter", { node: f.node, event: F }),
2149
- onMouseleave: (F) => t("node-mouseleave", { node: f.node, event: F }),
2150
- onMouseover: (F) => y.value = f.node,
2151
- onMouseout: L[0] || (L[0] = (F) => y.value = null)
2192
+ G("g", {
2193
+ onClick: (U) => t("node-click", { node: g.node, event: U }),
2194
+ onMouseenter: (U) => t("node-mouseenter", { node: g.node, event: U }),
2195
+ onMouseleave: (U) => t("node-mouseleave", { node: g.node, event: U }),
2196
+ onMouseover: (U) => y.value = g.node,
2197
+ onMouseout: E[0] || (E[0] = (U) => y.value = null)
2152
2198
  }, [
2153
- G(f) ? (h(!0), T(K, { key: 0 }, z(ye(
2154
- f.node.id
2155
- ), (F) => (h(), T("rect", C(F, {
2156
- key: F.key,
2199
+ K(g) ? (_(!0), L(J, { key: 0 }, z(B(
2200
+ g.node.id
2201
+ ), (U) => (_(), L("rect", C(U, {
2202
+ key: U.key,
2157
2203
  "data-j-alluvial-sub-nodes": ""
2158
- }), null, 16))), 128)) : (h(), T("rect", {
2204
+ }), null, 16))), 128)) : (_(), L("rect", {
2159
2205
  key: 1,
2160
- class: ee(["lume-alluvial-group__node-block", `lume-fill--${f.node.color || f.node.fallbackColor}`]),
2161
- x: f.x,
2162
- y: f.y,
2163
- height: f.height,
2164
- width: f.width
2165
- }, null, 10, Sa)),
2166
- j("g", {
2206
+ class: ee(["lume-alluvial-group__node-block", `lume-fill--${g.node.color || g.node.fallbackColor}`]),
2207
+ x: g.x,
2208
+ y: g.y,
2209
+ height: g.height,
2210
+ width: g.width
2211
+ }, null, 10, Va)),
2212
+ G("g", {
2167
2213
  ref_for: !0,
2168
2214
  ref_key: "nodeTextRefs",
2169
2215
  ref: i,
2170
2216
  class: ee(["lume-alluvial-group__node-text lume-typography--caption", {
2171
- "lume-alluvial-group__node-text--left": f.node.depth === 0
2217
+ "lume-alluvial-group__node-text--left": g.node.depth === 0
2172
2218
  }]),
2173
- transform: `translate(${f.textTransform.x},${f.textTransform.y})`,
2174
- "data-id": f.node.id
2219
+ transform: `translate(${g.textTransform.x},${g.textTransform.y})`,
2220
+ "data-id": g.node.id
2175
2221
  }, [
2176
- R(g.$slots, `node-text-${f.node.id}`, {
2177
- node: f.node,
2178
- value: l(k)(
2179
- f.node.transitionValue || f.node.value,
2180
- f.node.value
2222
+ M(k.$slots, `node-text-${g.node.id}`, {
2223
+ node: g.node,
2224
+ value: l(A)(
2225
+ g.node.transitionValue || g.node.value,
2226
+ g.node.value
2181
2227
  )
2182
2228
  }, () => [
2183
- oe(l(oa), {
2229
+ ae(l(ua), {
2184
2230
  bottom: l(a).switchText
2185
2231
  }, {
2186
2232
  default: V(() => [
2187
- de(q(f.node.label), 1)
2233
+ de(te(g.node.label), 1)
2188
2234
  ]),
2189
2235
  _: 2
2190
2236
  }, 1032, ["bottom"]),
2191
- oe(l(la), {
2237
+ ae(l(ca), {
2192
2238
  bottom: !l(a).switchText
2193
2239
  }, {
2194
2240
  default: V(() => [
2195
- de(q(l(k)(
2196
- f.node.transitionValue || f.node.value,
2197
- f.node.value
2241
+ de(te(l(A)(
2242
+ g.node.transitionValue || g.node.value,
2243
+ g.node.value
2198
2244
  )), 1)
2199
2245
  ]),
2200
2246
  _: 2
2201
2247
  }, 1032, ["bottom"])
2202
2248
  ], !0)
2203
- ], 10, Ca)
2204
- ], 40, Ma)
2249
+ ], 10, Pa)
2250
+ ], 40, ja)
2205
2251
  ], 2))), 128))
2206
2252
  ]));
2207
2253
  }
2208
2254
  });
2209
- const Ga = /* @__PURE__ */ J(ja, [["__scopeId", "data-v-1b46bc35"]]), Va = {
2255
+ const za = /* @__PURE__ */ Q(Fa, [["__scopeId", "data-v-6fe8c153"]]), Za = {
2210
2256
  margins: {
2211
2257
  top: 0,
2212
2258
  right: 0,
@@ -2222,16 +2268,16 @@ const Ga = /* @__PURE__ */ J(ja, [["__scopeId", "data-v-1b46bc35"]]), Va = {
2222
2268
  highlightedElements: "closest",
2223
2269
  nodePadding: 16,
2224
2270
  nodeWidth: 16,
2225
- nodeAlign: cn,
2271
+ nodeAlign: fn,
2226
2272
  valueFormat: (e) => String(e),
2227
2273
  iterations: 6
2228
- }, wr = /* @__PURE__ */ Z({
2274
+ }, Dr = /* @__PURE__ */ Z({
2229
2275
  __name: "lume-alluvial-diagram",
2230
2276
  props: {
2231
- ...Do(Ke)
2277
+ ...Mo(Je)
2232
2278
  },
2233
2279
  setup(e) {
2234
- const t = e, n = _e(ne()), o = An(ne()), { options: r } = Q(t), { allOptions: a } = se(r, Va);
2280
+ const t = e, n = ye(oe()), o = $n(oe()), { options: r } = q(t), { allOptions: a } = ce(r, Za);
2235
2281
  function u(s) {
2236
2282
  return {
2237
2283
  ...s,
@@ -2239,40 +2285,40 @@ const Ga = /* @__PURE__ */ J(ja, [["__scopeId", "data-v-1b46bc35"]]), Va = {
2239
2285
  // Alluvial chart never uses base scales
2240
2286
  };
2241
2287
  }
2242
- return (s, i) => (h(), W(l(Ae), C(t, {
2288
+ return (s, i) => (_(), W(l(Oe), C(t, {
2243
2289
  options: u(l(a)),
2244
2290
  "data-j-alluvial-diagram": ""
2245
- }), le({
2291
+ }), ue({
2246
2292
  groups: V((c) => [
2247
- oe(l(Ga), C(c, { "hovered-element-id": s.hoveredElement }), le({ _: 2 }, [
2248
- z(l(o), (d, v) => ({
2249
- name: v,
2250
- fn: V((y) => [
2251
- R(s.$slots, v, ue(ie(y || {})))
2293
+ ae(l(za), C(c, { "hovered-element-id": s.hoveredElement }), ue({ _: 2 }, [
2294
+ z(l(o), (v, d) => ({
2295
+ name: d,
2296
+ fn: V((m) => [
2297
+ M(s.$slots, d, ie(se(m || {})))
2252
2298
  ])
2253
2299
  }))
2254
2300
  ]), 1040, ["hovered-element-id"])
2255
2301
  ]),
2256
2302
  _: 2
2257
2303
  }, [
2258
- z(l(n), (c, d) => ({
2259
- name: d,
2260
- fn: V((v) => [
2261
- R(s.$slots, d, ue(ie(v || {})))
2304
+ z(l(n), (c, v) => ({
2305
+ name: v,
2306
+ fn: V((d) => [
2307
+ M(s.$slots, v, ie(se(d || {})))
2262
2308
  ])
2263
2309
  }))
2264
2310
  ]), 1040, ["options"]));
2265
2311
  }
2266
2312
  });
2267
- var Ft = /* @__PURE__ */ ((e) => (e.grouped = "grouped", e.stacked = "stacked", e))(Ft || {});
2268
- const Ir = /* @__PURE__ */ Z({
2313
+ var Zt = /* @__PURE__ */ ((e) => (e.grouped = "grouped", e.stacked = "stacked", e))(Zt || {});
2314
+ const Hr = /* @__PURE__ */ Z({
2269
2315
  __name: "lume-bar-chart",
2270
2316
  props: {
2271
- ...be(),
2317
+ ...Le(),
2272
2318
  type: {
2273
2319
  type: String,
2274
2320
  default: null,
2275
- validator: (e) => e in Ft || e == null
2321
+ validator: (e) => e in Zt || e == null
2276
2322
  }
2277
2323
  },
2278
2324
  setup(e) {
@@ -2286,7 +2332,7 @@ const Ir = /* @__PURE__ */ Z({
2286
2332
  ["single", n],
2287
2333
  ["grouped", o],
2288
2334
  ["stacked", r]
2289
- ]), u = _e(ne());
2335
+ ]), u = ye(oe());
2290
2336
  function s(c) {
2291
2337
  return {
2292
2338
  ...c,
@@ -2294,52 +2340,52 @@ const Ir = /* @__PURE__ */ Z({
2294
2340
  // Bar chart always starts on zero,
2295
2341
  tooltipOptions: {
2296
2342
  ...(c == null ? void 0 : c.tooltipOptions) || {},
2297
- position: t.orientation === D.HORIZONTAL && "right"
2343
+ position: t.orientation === H.HORIZONTAL && "right"
2298
2344
  }
2299
2345
  };
2300
2346
  }
2301
2347
  const i = p(() => {
2302
2348
  if (t.data) {
2303
- if (Ke(t.data))
2349
+ if (Je(t.data))
2304
2350
  return a.get("single");
2305
2351
  if (!t.type)
2306
2352
  throw new Error("Bar chart needs a type when there's multiple datasets.");
2307
2353
  return a.get(t.type);
2308
2354
  }
2309
2355
  });
2310
- return (c, d) => (h(), W(en(l(i)), C({ ...t, ...c.$attrs }, {
2356
+ return (c, v) => (_(), W(an(l(i)), C({ ...t, ...c.$attrs }, {
2311
2357
  options: s(c.options)
2312
- }), le({ _: 2 }, [
2313
- z(l(u), (v, y) => ({
2314
- name: y,
2315
- fn: V(($) => [
2316
- R(c.$slots, y, ue(ie($ || {})))
2358
+ }), ue({ _: 2 }, [
2359
+ z(l(u), (d, m) => ({
2360
+ name: m,
2361
+ fn: V((y) => [
2362
+ M(c.$slots, m, ie(se(y || {})))
2317
2363
  ])
2318
2364
  }))
2319
2365
  ]), 1040, ["options"]));
2320
2366
  }
2321
2367
  });
2322
- function Fa(e) {
2323
- return Object.values(xn).includes(e) || e == null;
2368
+ function Wa(e) {
2369
+ return Object.values(Nn).includes(e) || e == null;
2324
2370
  }
2325
- function Pa(e) {
2326
- return Object.values(D).includes(e);
2371
+ function Ua(e) {
2372
+ return Object.values(H).includes(e);
2327
2373
  }
2328
- const za = (e = !1) => ({
2374
+ const Xa = (e = !1) => ({
2329
2375
  type: {
2330
2376
  type: String,
2331
2377
  default: null,
2332
- validator: Fa
2378
+ validator: Wa
2333
2379
  },
2334
2380
  ...e ? {
2335
2381
  orientation: {
2336
2382
  type: String,
2337
- default: D.VERTICAL,
2338
- validator: Pa
2383
+ default: H.VERTICAL,
2384
+ validator: Ua
2339
2385
  }
2340
2386
  } : {}
2341
2387
  });
2342
- function Pt(e) {
2388
+ function Wt(e) {
2343
2389
  const t = p(() => e.value.map((o) => ({
2344
2390
  ...o,
2345
2391
  values: o.values.map((r) => ({
@@ -2354,12 +2400,12 @@ function Pt(e) {
2354
2400
  });
2355
2401
  return { multiBarData: t, groupedData: n };
2356
2402
  }
2357
- function Za(e, t) {
2403
+ function Ya(e, t) {
2358
2404
  return e.value.length === 1 ? "single" : t.value;
2359
2405
  }
2360
- function Wa(e, t, n) {
2406
+ function Ka(e, t, n) {
2361
2407
  const o = p(
2362
- () => n.value === D.HORIZONTAL
2408
+ () => n.value === H.HORIZONTAL
2363
2409
  );
2364
2410
  function r(s) {
2365
2411
  Math.min(...s.domain()) > 0 && console.error("Bar linear scale domain cannot start above 0!");
@@ -2367,170 +2413,170 @@ function Wa(e, t, n) {
2367
2413
  const a = p(() => o.value ? (() => (r(e.value), e.value))() : e.value), u = p(() => o.value ? t.value : (() => (r(t.value), t.value))());
2368
2414
  return { barXScale: a, barYScale: u };
2369
2415
  }
2370
- function Ua(e, t, n, o, r, a) {
2416
+ function Ja(e, t, n, o, r, a) {
2371
2417
  const u = p(
2372
- () => o.value === D.HORIZONTAL
2418
+ () => o.value === H.HORIZONTAL
2373
2419
  );
2374
- function s(v, y) {
2375
- let $, k;
2376
- return u.value ? ($ = v >= 0 ? t.value(0) : t.value(v), k = n.value(n.value.domain()[y])) : ($ = t.value(t.value.domain()[y]), k = v < 0 ? n.value(0) : n.value(v)), { x: $, y: k };
2420
+ function s(d, m) {
2421
+ let y, h;
2422
+ return u.value ? (y = d >= 0 ? t.value(0) : t.value(d), h = n.value(n.value.domain()[m])) : (y = t.value(t.value.domain()[m]), h = d < 0 ? n.value(0) : n.value(d)), { x: y, y: h };
2377
2423
  }
2378
- function i(v) {
2379
- return u.value ? v < 0 ? t.value(0) - t.value(v) : t.value(v) - t.value(0) : t.value.bandwidth();
2424
+ function i(d) {
2425
+ return u.value ? d < 0 ? t.value(0) - t.value(d) : t.value(d) - t.value(0) : t.value.bandwidth();
2380
2426
  }
2381
- function c(v) {
2382
- return u.value ? n.value.bandwidth() : v < 0 ? n.value(v) - n.value(0) : n.value(0) - n.value(v);
2427
+ function c(d) {
2428
+ return u.value ? n.value.bandwidth() : d < 0 ? n.value(d) - n.value(0) : n.value(0) - n.value(d);
2383
2429
  }
2384
- function d(v, y, $) {
2385
- const { value: k, color: A } = v, m = A ?? e.value[y].color ?? we, { x: _, y: E } = s(k, $), N = i(k), I = c(k);
2430
+ function v(d, m, y) {
2431
+ const { value: h, color: A } = d, O = A ?? e.value[m].color ?? Ee, { x: f, y: x } = s(h, y), N = i(h), $ = c(h);
2386
2432
  return {
2387
- classList: [`lume-fill--${m}`, ...a],
2388
- x: _,
2389
- y: E,
2433
+ classList: [`lume-fill--${O}`, ...a],
2434
+ x: f,
2435
+ y: x,
2390
2436
  width: N,
2391
- height: I,
2392
- isFaded: r.value !== -1 && r.value !== $,
2393
- isNegative: k < 0
2437
+ height: $,
2438
+ isFaded: r.value !== -1 && r.value !== y,
2439
+ isNegative: h < 0
2394
2440
  };
2395
2441
  }
2396
- return { barAttributeGenerator: d };
2442
+ return { barAttributeGenerator: v };
2397
2443
  }
2398
- function Xa(e, t, n, o, r, a) {
2444
+ function Qa(e, t, n, o, r, a) {
2399
2445
  const u = p(
2400
- () => o.value === D.HORIZONTAL
2401
- ), s = p(() => Le().domain(e.value.map((k, A) => A)).range([0, t.value.bandwidth()]).padding(0)), i = p(() => Le().domain(e.value.map((k, A) => A)).range([0, n.value.bandwidth()]).padding(0));
2402
- function c(k, A, m) {
2446
+ () => o.value === H.HORIZONTAL
2447
+ ), s = p(() => $e().domain(e.value.map((h, A) => A)).range([0, t.value.bandwidth()]).padding(0)), i = p(() => $e().domain(e.value.map((h, A) => A)).range([0, n.value.bandwidth()]).padding(0));
2448
+ function c(h, A, O) {
2403
2449
  if (u.value)
2404
- return k >= 0 ? t.value(0) : t.value(k);
2405
- const _ = t.value.domain();
2406
- return t.value(_[A]) + s.value(m);
2450
+ return h >= 0 ? t.value(0) : t.value(h);
2451
+ const f = t.value.domain();
2452
+ return t.value(f[A]) + s.value(O);
2407
2453
  }
2408
- function d(k, A, m) {
2454
+ function v(h, A, O) {
2409
2455
  if (u.value) {
2410
- const _ = n.value.domain();
2411
- return n.value(_[A]) + i.value(m);
2456
+ const f = n.value.domain();
2457
+ return n.value(f[A]) + i.value(O);
2412
2458
  }
2413
- return k < 0 ? n.value(0) : n.value(k);
2459
+ return h < 0 ? n.value(0) : n.value(h);
2414
2460
  }
2415
- function v(k) {
2416
- return u.value ? k < 0 ? t.value(0) - t.value(k) : t.value(k) - t.value(0) : s.value.bandwidth();
2461
+ function d(h) {
2462
+ return u.value ? h < 0 ? t.value(0) - t.value(h) : t.value(h) - t.value(0) : s.value.bandwidth();
2417
2463
  }
2418
- function y(k) {
2419
- return u.value ? i.value.bandwidth() : k < 0 ? n.value(k) - n.value(0) : n.value(0) - n.value(k);
2464
+ function m(h) {
2465
+ return u.value ? i.value.bandwidth() : h < 0 ? n.value(h) - n.value(0) : n.value(0) - n.value(h);
2420
2466
  }
2421
- function $(k, A, m) {
2422
- const { value: _, color: E } = k, N = E ?? e.value[A].color ?? Object.values(ae)[A], I = c(_, m, A), x = d(_, m, A), H = v(_), M = y(_);
2467
+ function y(h, A, O) {
2468
+ const { value: f, color: x } = h, N = x ?? e.value[A].color ?? Object.values(re)[A], $ = c(f, O, A), w = v(f, O, A), D = d(f), S = m(f);
2423
2469
  return {
2424
2470
  classList: [`lume-fill--${N}`, ...a],
2425
- x: I,
2426
- y: x,
2427
- width: H,
2428
- height: M,
2429
- isFaded: r.value !== -1 && r.value !== m,
2430
- isNegative: _ < 0
2471
+ x: $,
2472
+ y: w,
2473
+ width: D,
2474
+ height: S,
2475
+ isFaded: r.value !== -1 && r.value !== O,
2476
+ isNegative: f < 0
2431
2477
  };
2432
2478
  }
2433
- return { barAttributeGenerator: $ };
2479
+ return { barAttributeGenerator: y };
2434
2480
  }
2435
- function Ya(e, t, n) {
2481
+ function qa(e, t, n) {
2436
2482
  const o = p(
2437
- () => t.value === D.HORIZONTAL
2483
+ () => t.value === H.HORIZONTAL
2438
2484
  ), r = p(() => {
2439
2485
  const i = e.value.map(
2440
- (c) => c.filter((d) => d.value < 0).reduce((d, v) => d + v.value, 0)
2486
+ (c) => c.filter((v) => v.value < 0).reduce((v, d) => v + d.value, 0)
2441
2487
  );
2442
2488
  return Math.min(...i);
2443
2489
  }), a = p(() => {
2444
2490
  const i = e.value.map(
2445
2491
  (c) => c.reduce(
2446
- (d, v) => v.value >= 0 ? d + v.value : d,
2492
+ (v, d) => d.value >= 0 ? v + d.value : v,
2447
2493
  0
2448
2494
  )
2449
2495
  );
2450
2496
  return Math.max(...i);
2451
2497
  });
2452
- function u(i, c, d) {
2453
- return o.value ? Oe().domain([r.value, a.value]).range([0, d.width]) : Object.assign(
2454
- gt(
2455
- Le().domain(c.map((v, y) => y)).range([0, d.width]),
2498
+ function u(i, c, v) {
2499
+ return o.value ? xe().domain([r.value, a.value]).range([0, v.width]) : Object.assign(
2500
+ yt(
2501
+ $e().domain(c.map((d, m) => m)).range([0, v.width]),
2456
2502
  t.value,
2457
2503
  n.value
2458
2504
  ),
2459
2505
  { labels: c }
2460
2506
  );
2461
2507
  }
2462
- function s(i, c, d) {
2508
+ function s(i, c, v) {
2463
2509
  return o.value ? Object.assign(
2464
- gt(
2465
- Le().domain(c.map((v, y) => y)).range([0, d.height]),
2510
+ yt(
2511
+ $e().domain(c.map((d, m) => m)).range([0, v.height]),
2466
2512
  t.value,
2467
2513
  n.value
2468
2514
  ),
2469
2515
  { labels: c }
2470
- ) : Oe().domain([a.value, r.value]).range([0, d.height]);
2516
+ ) : xe().domain([a.value, r.value]).range([0, v.height]);
2471
2517
  }
2472
2518
  return { stackedXScaleGenerator: u, stackedYScaleGenerator: s };
2473
2519
  }
2474
- function Ka(e, t, n, o, r, a) {
2520
+ function er(e, t, n, o, r, a) {
2475
2521
  const u = p(
2476
- () => o.value === D.HORIZONTAL
2522
+ () => o.value === H.HORIZONTAL
2477
2523
  ), s = p(
2478
2524
  () => u.value ? n.value.domain() : t.value.domain()
2479
2525
  ), i = p(
2480
- () => e.value.map((_) => _.values.map((E) => E == null ? void 0 : E.value))
2526
+ () => e.value.map((f) => f.values.map((x) => x == null ? void 0 : x.value))
2481
2527
  );
2482
- function c(_, E, N) {
2483
- let I, x;
2484
- return u.value ? (I = t.value(_ >= 0 ? 0 + N : _ + N), x = n.value(s.value[E])) : (I = t.value(s.value[E]), x = n.value(_ >= 0 ? _ + N : 0 + N)), { x: I, y: x };
2528
+ function c(f, x, N) {
2529
+ let $, w;
2530
+ return u.value ? ($ = t.value(f >= 0 ? 0 + N : f + N), w = n.value(s.value[x])) : ($ = t.value(s.value[x]), w = n.value(f >= 0 ? f + N : 0 + N)), { x: $, y: w };
2485
2531
  }
2486
- function d(_) {
2487
- return u.value ? t.value(_) - t.value(0) : t.value.bandwidth();
2532
+ function v(f) {
2533
+ return u.value ? t.value(f) - t.value(0) : t.value.bandwidth();
2488
2534
  }
2489
- function v(_) {
2490
- return u.value ? t.value(0) - t.value(_) : t.value.bandwidth();
2535
+ function d(f) {
2536
+ return u.value ? t.value(0) - t.value(f) : t.value.bandwidth();
2491
2537
  }
2492
- function y(_) {
2493
- return u.value ? n.value.bandwidth() : n.value(0) - n.value(_);
2538
+ function m(f) {
2539
+ return u.value ? n.value.bandwidth() : n.value(0) - n.value(f);
2494
2540
  }
2495
- function $(_) {
2496
- return u.value ? n.value.bandwidth() : n.value(_) - n.value(0);
2541
+ function y(f) {
2542
+ return u.value ? n.value.bandwidth() : n.value(f) - n.value(0);
2497
2543
  }
2498
- function k(_, E) {
2499
- return _ ? i.value.reduce((N, I, x) => (x < _ && I[E] >= 0 && (N += I[E]), N), 0) : 0;
2544
+ function h(f, x) {
2545
+ return f ? i.value.reduce((N, $, w) => (w < f && $[x] >= 0 && (N += $[x]), N), 0) : 0;
2500
2546
  }
2501
- function A(_, E) {
2502
- return _ ? i.value.reduce((N, I, x) => (x < _ && I[E] < 0 && (N += I[E]), N), 0) : 0;
2547
+ function A(f, x) {
2548
+ return f ? i.value.reduce((N, $, w) => (w < f && $[x] < 0 && (N += $[x]), N), 0) : 0;
2503
2549
  }
2504
- function m(_, E, N) {
2505
- const { value: I, color: x } = _, H = I >= 0 ? d(I) : v(I), M = I >= 0 ? y(I) : $(I), X = I >= 0 ? k(E, N) : A(E, N), { x: Y, y: G } = c(I, N, X);
2550
+ function O(f, x, N) {
2551
+ const { value: $, color: w } = f, D = $ >= 0 ? v($) : d($), S = $ >= 0 ? m($) : y($), Y = $ >= 0 ? h(x, N) : A(x, N), { x: ne, y: P } = c($, N, Y);
2506
2552
  return {
2507
- classList: [`lume-fill--${x ?? e.value[E].color ?? Object.values(ae)[E]}`, ...a],
2508
- width: H,
2509
- height: M,
2510
- x: Y,
2511
- y: G,
2553
+ classList: [`lume-fill--${w ?? e.value[x].color ?? Object.values(re)[x]}`, ...a],
2554
+ width: D,
2555
+ height: S,
2556
+ x: ne,
2557
+ y: P,
2512
2558
  isFaded: r.value !== -1 && r.value !== N,
2513
- isNegative: I < 0
2559
+ isNegative: $ < 0
2514
2560
  };
2515
2561
  }
2516
- return { barAttributeGenerator: m };
2562
+ return { barAttributeGenerator: O };
2517
2563
  }
2518
- const Ja = {
2564
+ const tr = {
2519
2565
  class: "lume-bar-group",
2520
2566
  "data-j-bars-group": ""
2521
- }, Qa = ["onMouseenter"], qa = {
2522
- single: Ua,
2523
- grouped: Xa,
2524
- stacked: Ka
2525
- }, nt = /* @__PURE__ */ Z({
2567
+ }, nr = ["onMouseenter"], or = {
2568
+ single: Ja,
2569
+ grouped: Qa,
2570
+ stacked: er
2571
+ }, ot = /* @__PURE__ */ Z({
2526
2572
  __name: "lume-bar-group",
2527
2573
  props: {
2528
- ...Me(),
2574
+ ...Se(),
2529
2575
  classList: {
2530
2576
  type: [String, Array],
2531
2577
  default: () => []
2532
2578
  },
2533
- ...za(!0),
2579
+ ...Xa(!0),
2534
2580
  transition: {
2535
2581
  type: Boolean,
2536
2582
  default: !0
@@ -2546,177 +2592,177 @@ const Ja = {
2546
2592
  type: s,
2547
2593
  xScale: i,
2548
2594
  yScale: c,
2549
- classList: d
2550
- } = Q(n), { groupedData: v } = Pt(o), { barXScale: y, barYScale: $ } = Wa(i, c, a), k = p(() => typeof d.value == "string" ? [d.value] : d.value), A = p(() => {
2551
- const _ = Za(o, s), { barAttributeGenerator: E } = qa[_](
2595
+ classList: v
2596
+ } = q(n), { groupedData: d } = Wt(o), { barXScale: m, barYScale: y } = Ka(i, c, a), h = p(() => typeof v.value == "string" ? [v.value] : v.value), A = p(() => {
2597
+ const f = Ya(o, s), { barAttributeGenerator: x } = or[f](
2552
2598
  o,
2599
+ m,
2553
2600
  y,
2554
- $,
2555
2601
  a,
2556
2602
  r,
2557
- k.value
2603
+ h.value
2558
2604
  );
2559
- return E;
2560
- }), m = p(() => {
2605
+ return x;
2606
+ }), O = p(() => {
2561
2607
  if (u.value)
2562
- return a.value === D.HORIZONTAL ? "width" : "height";
2608
+ return a.value === H.HORIZONTAL ? "width" : "height";
2563
2609
  });
2564
- return (_, E) => (h(), T("g", Ja, [
2565
- (h(!0), T(K, null, z(l(v), (N, I) => (h(), T("g", {
2566
- key: I,
2567
- onMouseenter: (x) => t("lume__internal--hover", I)
2610
+ return (f, x) => (_(), L("g", tr, [
2611
+ (_(!0), L(J, null, z(l(d), (N, $) => (_(), L("g", {
2612
+ key: $,
2613
+ onMouseenter: (w) => t("lume__internal--hover", $)
2568
2614
  }, [
2569
- (h(!0), T(K, null, z(N, (x, H) => (h(), W(l(qe), C(l(A)(x, H, I, N), {
2570
- key: `bar-${H}`,
2571
- transition: l(m),
2615
+ (_(!0), L(J, null, z(N, (w, D) => (_(), W(l(et), C(l(A)(w, D, $, N), {
2616
+ key: `bar-${D}`,
2617
+ transition: l(O),
2572
2618
  "data-j-lume-bar": "",
2573
- onClick: (M) => t("bar-click", {
2574
- index: I,
2575
- datasetIndex: H,
2576
- event: M
2619
+ onClick: (S) => t("bar-click", {
2620
+ index: $,
2621
+ datasetIndex: D,
2622
+ event: S
2577
2623
  })
2578
2624
  }), null, 16, ["transition", "onClick"]))), 128))
2579
- ], 40, Qa))), 128))
2625
+ ], 40, nr))), 128))
2580
2626
  ]));
2581
2627
  }
2582
- }), er = {
2583
- [D.VERTICAL]: {
2628
+ }), ar = {
2629
+ [H.VERTICAL]: {
2584
2630
  withTooltip: !0,
2585
2631
  xAxisOptions: {},
2586
2632
  yAxisOptions: { gridLines: !0 },
2587
- margins: me.VERTICAL
2633
+ margins: ge.VERTICAL
2588
2634
  },
2589
- [D.HORIZONTAL]: {
2635
+ [H.HORIZONTAL]: {
2590
2636
  withTooltip: !0,
2591
2637
  xAxisOptions: { gridLines: !0 },
2592
2638
  yAxisOptions: { gridLines: !1 },
2593
- margins: me.HORIZONTAL
2639
+ margins: ge.HORIZONTAL
2594
2640
  }
2595
- }, Er = /* @__PURE__ */ Z({
2641
+ }, Br = /* @__PURE__ */ Z({
2596
2642
  __name: "lume-single-bar-chart",
2597
2643
  props: {
2598
- ...be(Ke)
2644
+ ...Le(Je)
2599
2645
  },
2600
2646
  setup(e) {
2601
- const t = e, n = _e(ne()), { orientation: o, options: r } = Q(t), a = p(
2602
- () => er[o.value || D.VERTICAL]
2647
+ const t = e, n = ye(oe()), { orientation: o, options: r } = q(t), a = p(
2648
+ () => ar[o.value || H.VERTICAL]
2603
2649
  // needs to be computed so that default options are reactive
2604
- ), { allOptions: u } = se(r, a);
2605
- return (s, i) => (h(), W(l(Ae), C(t, {
2650
+ ), { allOptions: u } = ce(r, a);
2651
+ return (s, i) => (_(), W(l(Oe), C(t, {
2606
2652
  "chart-type": "single-bar",
2607
2653
  options: l(u),
2608
2654
  "data-j-single-bar-chart": ""
2609
- }), le({
2655
+ }), ue({
2610
2656
  groups: V((c) => [
2611
- oe(l(nt), C(c, { orientation: l(o) }), null, 16, ["orientation"])
2657
+ ae(l(ot), C(c, { orientation: l(o) }), null, 16, ["orientation"])
2612
2658
  ]),
2613
2659
  _: 2
2614
2660
  }, [
2615
- z(l(n), (c, d) => ({
2616
- name: d,
2617
- fn: V((v) => [
2618
- R(s.$slots, d, ue(ie(v || {})))
2661
+ z(l(n), (c, v) => ({
2662
+ name: v,
2663
+ fn: V((d) => [
2664
+ M(s.$slots, v, ie(se(d || {})))
2619
2665
  ])
2620
2666
  }))
2621
2667
  ]), 1040, ["options"]));
2622
2668
  }
2623
- }), tr = {
2624
- [D.VERTICAL]: {
2669
+ }), rr = {
2670
+ [H.VERTICAL]: {
2625
2671
  withTooltip: !0,
2626
2672
  xAxisOptions: {},
2627
2673
  yAxisOptions: { gridLines: !0 },
2628
- margins: me.VERTICAL
2674
+ margins: ge.VERTICAL
2629
2675
  },
2630
- [D.HORIZONTAL]: {
2676
+ [H.HORIZONTAL]: {
2631
2677
  withTooltip: !0,
2632
2678
  xAxisOptions: { gridLines: !0 },
2633
2679
  yAxisOptions: { gridLines: !1 },
2634
- margins: me.HORIZONTAL,
2680
+ margins: ge.HORIZONTAL,
2635
2681
  tooltipOptions: { position: "right" }
2636
2682
  }
2637
- }, Nr = /* @__PURE__ */ Z({
2683
+ }, Rr = /* @__PURE__ */ Z({
2638
2684
  __name: "lume-grouped-bar-chart",
2639
2685
  props: {
2640
- ...be()
2686
+ ...Le()
2641
2687
  },
2642
2688
  setup(e) {
2643
- const t = e, n = _e(ne()), { orientation: o, options: r } = Q(t), a = p(
2644
- () => tr[o.value || D.VERTICAL]
2689
+ const t = e, n = ye(oe()), { orientation: o, options: r } = q(t), a = p(
2690
+ () => rr[o.value || H.VERTICAL]
2645
2691
  // needs to be computed so that default options are reactive
2646
- ), { allOptions: u } = se(
2692
+ ), { allOptions: u } = ce(
2647
2693
  r,
2648
2694
  a
2649
2695
  );
2650
- return (s, i) => (h(), W(l(Ae), C(t, {
2696
+ return (s, i) => (_(), W(l(Oe), C(t, {
2651
2697
  "chart-type": "grouped-bar",
2652
2698
  options: l(u),
2653
2699
  "data-j-grouped-bar-chart": ""
2654
- }), le({
2700
+ }), ue({
2655
2701
  groups: V((c) => [
2656
- oe(l(nt), C(c, { type: "grouped" }), null, 16)
2702
+ ae(l(ot), C(c, { type: "grouped" }), null, 16)
2657
2703
  ]),
2658
2704
  _: 2
2659
2705
  }, [
2660
- z(l(n), (c, d) => ({
2661
- name: d,
2662
- fn: V((v) => [
2663
- R(s.$slots, d, ue(ie(v || {})))
2706
+ z(l(n), (c, v) => ({
2707
+ name: v,
2708
+ fn: V((d) => [
2709
+ M(s.$slots, v, ie(se(d || {})))
2664
2710
  ])
2665
2711
  }))
2666
2712
  ]), 1040, ["options"]));
2667
2713
  }
2668
- }), nr = {
2669
- [D.VERTICAL]: {
2714
+ }), lr = {
2715
+ [H.VERTICAL]: {
2670
2716
  withTooltip: !0,
2671
2717
  xAxisOptions: {},
2672
2718
  yAxisOptions: { gridLines: !0 },
2673
- margins: me.VERTICAL
2719
+ margins: ge.VERTICAL
2674
2720
  },
2675
- [D.HORIZONTAL]: {
2721
+ [H.HORIZONTAL]: {
2676
2722
  withTooltip: !0,
2677
2723
  xAxisOptions: { gridLines: !0 },
2678
2724
  yAxisOptions: { gridLines: !1 },
2679
- margins: me.HORIZONTAL,
2725
+ margins: ge.HORIZONTAL,
2680
2726
  tooltipOptions: { position: "right" }
2681
2727
  }
2682
- }, Dr = /* @__PURE__ */ Z({
2728
+ }, Mr = /* @__PURE__ */ Z({
2683
2729
  __name: "lume-stacked-bar-chart",
2684
2730
  props: {
2685
- ...be()
2731
+ ...Le()
2686
2732
  },
2687
2733
  setup(e) {
2688
- const t = e, n = _e(ne()), { data: o, orientation: r, options: a } = Q(t), u = p(
2689
- () => nr[r.value || D.VERTICAL]
2734
+ const t = e, n = ye(oe()), { data: o, orientation: r, options: a } = q(t), u = p(
2735
+ () => lr[r.value || H.VERTICAL]
2690
2736
  // needs to be computed so that default options are reactive
2691
- ), { allOptions: s } = se(
2737
+ ), { allOptions: s } = ce(
2692
2738
  a,
2693
2739
  u
2694
- ), { internalData: i } = tt(o), { groupedData: c } = Pt(i), { stackedXScaleGenerator: d, stackedYScaleGenerator: v } = Ya(
2740
+ ), { internalData: i } = nt(o), { groupedData: c } = Wt(i), { stackedXScaleGenerator: v, stackedYScaleGenerator: d } = qa(
2695
2741
  c,
2696
2742
  r,
2697
2743
  a
2698
2744
  );
2699
- return (y, $) => (h(), W(l(Ae), C(t, {
2745
+ return (m, y) => (_(), W(l(Oe), C(t, {
2700
2746
  "chart-type": "stacked-bar",
2701
2747
  options: l(s),
2702
- "x-scale": l(d),
2703
- "y-scale": l(v),
2748
+ "x-scale": l(v),
2749
+ "y-scale": l(d),
2704
2750
  "data-j-stacked-bar-chart": ""
2705
- }), le({
2706
- groups: V((k) => [
2707
- oe(l(nt), C(k, { type: "stacked" }), null, 16)
2751
+ }), ue({
2752
+ groups: V((h) => [
2753
+ ae(l(ot), C(h, { type: "stacked" }), null, 16)
2708
2754
  ]),
2709
2755
  _: 2
2710
2756
  }, [
2711
- z(l(n), (k, A) => ({
2757
+ z(l(n), (h, A) => ({
2712
2758
  name: A,
2713
- fn: V((m) => [
2714
- R(y.$slots, A, ue(ie(m || {})))
2759
+ fn: V((O) => [
2760
+ M(m.$slots, A, ie(se(O || {})))
2715
2761
  ])
2716
2762
  }))
2717
2763
  ]), 1040, ["options", "x-scale", "y-scale"]));
2718
2764
  }
2719
- }), or = ["d", "stroke-width"], ar = 2, rr = /* @__PURE__ */ Z({
2765
+ }), ur = ["d", "stroke-width"], ir = 2, sr = /* @__PURE__ */ Z({
2720
2766
  __name: "lume-line",
2721
2767
  props: {
2722
2768
  pathDefinition: {
@@ -2725,11 +2771,11 @@ const Ja = {
2725
2771
  },
2726
2772
  width: {
2727
2773
  type: Number,
2728
- default: ar
2774
+ default: ir
2729
2775
  },
2730
2776
  color: {
2731
2777
  type: String,
2732
- default: ae.Skyblue
2778
+ default: re.Skyblue
2733
2779
  },
2734
2780
  dashed: {
2735
2781
  type: Boolean,
@@ -2750,8 +2796,8 @@ const Ja = {
2750
2796
  },
2751
2797
  emits: ["click"],
2752
2798
  setup(e, { emit: t }) {
2753
- const n = S(null);
2754
- return pe(() => Re(n.value)), (o, r) => (h(), T("path", {
2799
+ const n = R(null);
2800
+ return pe(() => Me(n.value)), (o, r) => (_(), L("path", {
2755
2801
  ref_key: "root",
2756
2802
  ref: n,
2757
2803
  class: ee(["lume-line", {
@@ -2761,27 +2807,27 @@ const Ja = {
2761
2807
  }]),
2762
2808
  d: e.pathDefinition,
2763
2809
  "stroke-width": e.width,
2764
- style: Tt({
2810
+ style: $t({
2765
2811
  animationDelay: e.transition && e.animationDelay + "s",
2766
2812
  animationDuration: e.transition && e.animationDuration + "s"
2767
2813
  }),
2768
2814
  "data-j-line": "",
2769
2815
  onClick: r[0] || (r[0] = (a) => t("click", a))
2770
- }, null, 14, or));
2816
+ }, null, 14, ur));
2771
2817
  }
2772
2818
  });
2773
- const lr = /* @__PURE__ */ J(rr, [["__scopeId", "data-v-08896455"]]), ur = ["cx", "cy", "r", "stroke-width"], ir = 4, sr = /* @__PURE__ */ Z({
2819
+ const cr = /* @__PURE__ */ Q(sr, [["__scopeId", "data-v-08896455"]]), dr = ["cx", "cy", "r", "stroke-width"], vr = 4, pr = /* @__PURE__ */ Z({
2774
2820
  __name: "lume-point",
2775
2821
  props: {
2776
2822
  x: { type: Number, required: !0 },
2777
2823
  y: { type: Number, required: !0 },
2778
2824
  color: {
2779
2825
  type: String,
2780
- default: ae.Skyblue
2826
+ default: re.Skyblue
2781
2827
  },
2782
2828
  radius: {
2783
2829
  type: Number,
2784
- default: ir
2830
+ default: vr
2785
2831
  },
2786
2832
  active: {
2787
2833
  type: Boolean,
@@ -2790,8 +2836,8 @@ const lr = /* @__PURE__ */ J(rr, [["__scopeId", "data-v-08896455"]]), ur = ["cx"
2790
2836
  },
2791
2837
  emits: ["click"],
2792
2838
  setup(e, { emit: t }) {
2793
- const n = e, o = S(null), r = p(() => n.radius / 2);
2794
- return pe(() => Re(o.value)), (a, u) => (h(), T("circle", {
2839
+ const n = e, o = R(null), r = p(() => n.radius / 2);
2840
+ return pe(() => Me(o.value)), (a, u) => (_(), L("circle", {
2795
2841
  ref_key: "root",
2796
2842
  ref: o,
2797
2843
  class: ee(["lume-point", `lume-stroke--${e.color}`]),
@@ -2801,18 +2847,18 @@ const lr = /* @__PURE__ */ J(rr, [["__scopeId", "data-v-08896455"]]), ur = ["cx"
2801
2847
  "stroke-width": l(r),
2802
2848
  "data-j-point": "",
2803
2849
  onClick: u[0] || (u[0] = (s) => t("click", s))
2804
- }, null, 10, ur));
2850
+ }, null, 10, dr));
2805
2851
  }
2806
2852
  });
2807
- const cr = /* @__PURE__ */ J(sr, [["__scopeId", "data-v-9bacbd7d"]]);
2808
- function zt(e) {
2853
+ const fr = /* @__PURE__ */ Q(pr, [["__scopeId", "data-v-9bacbd7d"]]);
2854
+ function Ut(e) {
2809
2855
  function t(a) {
2810
2856
  let u = null;
2811
2857
  return a == null ? void 0 : a.reduce((s, i, c) => (i == null || i.value == null ? (u ? u.push(c) : u = [c], c === (a == null ? void 0 : a.length) - 1 && s.push(u)) : u && (s.push(u), u = null), s), []);
2812
2858
  }
2813
2859
  function n(a, u, s, i) {
2814
- const v = Math.abs(a - u) / (s + 1) * (i + 1);
2815
- return a > u ? a - v : a + v;
2860
+ const d = Math.abs(a - u) / (s + 1) * (i + 1);
2861
+ return a > u ? a - d : a + d;
2816
2862
  }
2817
2863
  function o(a) {
2818
2864
  return function(s) {
@@ -2827,21 +2873,21 @@ function zt(e) {
2827
2873
  ...a,
2828
2874
  isDashed: o(u),
2829
2875
  values: a.values.map((s, i) => {
2830
- var d, v;
2876
+ var v, d;
2831
2877
  const c = u.find(
2832
- (y) => y.includes(i)
2878
+ (m) => m.includes(i)
2833
2879
  );
2834
2880
  if (c) {
2835
- const y = c[0] - 1, $ = c[c.length - 1] + 1;
2836
- let k = (d = a.values[y]) == null ? void 0 : d.value, A = (v = a.values[$]) == null ? void 0 : v.value;
2837
- return k == null && (k = A), A == null && (A = k), {
2881
+ const m = c[0] - 1, y = c[c.length - 1] + 1;
2882
+ let h = (v = a.values[m]) == null ? void 0 : v.value, A = (d = a.values[y]) == null ? void 0 : d.value;
2883
+ return h == null && (h = A), A == null && (A = h), {
2838
2884
  value: n(
2839
- k,
2885
+ h,
2840
2886
  A,
2841
2887
  c.length,
2842
2888
  c.indexOf(i)
2843
2889
  ),
2844
- label: Nt
2890
+ label: Bt
2845
2891
  };
2846
2892
  }
2847
2893
  return s;
@@ -2849,29 +2895,29 @@ function zt(e) {
2849
2895
  };
2850
2896
  })) };
2851
2897
  }
2852
- function dr(e, t) {
2898
+ function mr(e, t) {
2853
2899
  const n = e.bandwidth() / 2;
2854
2900
  return (o, r) => e(e.domain()[t + (r - 1)]) + n;
2855
2901
  }
2856
- function vr(e, t) {
2902
+ function hr(e, t) {
2857
2903
  return (n, o) => e(t + (o - 1));
2858
2904
  }
2859
- function pr(e, t, n, o) {
2860
- return an().x(
2861
- ge(n) ? dr(n, e) : vr(n, e)
2905
+ function gr(e, t, n, o) {
2906
+ return sn().x(
2907
+ _e(n) ? mr(n, e) : hr(n, e)
2862
2908
  ).y((a) => o(a))(t);
2863
2909
  }
2864
- const fr = {
2910
+ const _r = {
2865
2911
  class: "lume-line-group",
2866
2912
  "data-j-lume-line-group": ""
2867
- }, hr = { class: "lume-line-group__lines" }, mr = {
2913
+ }, yr = { class: "lume-line-group__lines" }, kr = {
2868
2914
  key: 0,
2869
2915
  class: "lume-line-group__points",
2870
2916
  "data-j-lume-line-group__points": ""
2871
- }, gr = 1, _r = /* @__PURE__ */ Z({
2917
+ }, br = 1, Ar = /* @__PURE__ */ Z({
2872
2918
  __name: "lume-line-group",
2873
2919
  props: {
2874
- ...Me(),
2920
+ ...Se(),
2875
2921
  withPoints: {
2876
2922
  type: Boolean,
2877
2923
  default: !0
@@ -2883,155 +2929,155 @@ const fr = {
2883
2929
  },
2884
2930
  emits: ["line-click", "point-click", "lume__internal--hover"],
2885
2931
  setup(e, { emit: t }) {
2886
- const n = e, { data: o, options: r, xScale: a, yScale: u } = Q(n), s = He(
2932
+ const n = e, { data: o, options: r, xScale: a, yScale: u } = q(n), s = Be(
2887
2933
  "tooltipAnchorAttributes",
2888
2934
  null
2889
- ), { updateTooltipAnchorAttributes: i } = jt(
2935
+ ), { updateTooltipAnchorAttributes: i } = Pt(
2890
2936
  s,
2891
2937
  r,
2892
2938
  a,
2893
2939
  u
2894
2940
  ), c = p(() => {
2895
- if (o.value.every((H) => H.isDashed))
2941
+ if (o.value.every((D) => D.isDashed))
2896
2942
  return o.value;
2897
- const { computedLineData: x } = zt(o);
2898
- return r.value.withTooltip !== !1 && (s != null && s.value) && i(x.value), x.value;
2899
- }), d = p(() => {
2943
+ const { computedLineData: w } = Ut(o);
2944
+ return r.value.withTooltip !== !1 && (s != null && s.value) && i(w.value), w.value;
2945
+ }), v = p(() => {
2900
2946
  if (n.hoveredIndex === -1)
2901
2947
  return;
2902
- const x = _n(
2948
+ const w = An(
2903
2949
  c.value,
2904
2950
  n.hoveredIndex
2905
2951
  );
2906
2952
  return {
2907
- d: `M ${Pe(a.value, n.hoveredIndex)},${u.value.range()[1]}
2908
- V ${u.value(x)}`
2953
+ d: `M ${ze(a.value, n.hoveredIndex)},${u.value.range()[1]}
2954
+ V ${u.value(w)}`
2909
2955
  // Move to X index, Vertical line to the highest point
2910
2956
  };
2911
- }), v = p(
2912
- () => a.value && gr / (yn(a.value) - 1)
2957
+ }), d = p(
2958
+ () => a.value && br / (Tn(a.value) - 1)
2913
2959
  // Subtracting the first line (read below)
2914
- ), y = p(
2960
+ ), m = p(
2915
2961
  () => {
2916
- var x;
2917
- return ((x = r.value) == null ? void 0 : x.lineWidth) * 2 || void 0;
2962
+ var w;
2963
+ return ((w = r.value) == null ? void 0 : w.lineWidth) * 2 || void 0;
2918
2964
  }
2919
2965
  // If no `lineWidth`, returns NaN which needs to be undefined
2920
- ), $ = p(
2966
+ ), y = p(
2921
2967
  () => a.value.bandwidth() / 2
2922
- ), k = p(() => a.value.domain()), A = p(
2968
+ ), h = p(() => a.value.domain()), A = p(
2923
2969
  () => r.value.withPoints ?? n.withPoints
2924
2970
  );
2925
- function m(x) {
2926
- return c.value[x].values;
2971
+ function O(w) {
2972
+ return c.value[w].values;
2927
2973
  }
2928
- function _(x, H) {
2929
- var X, Y;
2930
- const M = x === 0 ? [] : [
2931
- (X = m(H)[x - 1]) == null ? void 0 : X.value,
2932
- (Y = m(H)[x]) == null ? void 0 : Y.value
2974
+ function f(w, D) {
2975
+ var Y, ne;
2976
+ const S = w === 0 ? [] : [
2977
+ (Y = O(D)[w - 1]) == null ? void 0 : Y.value,
2978
+ (ne = O(D)[w]) == null ? void 0 : ne.value
2933
2979
  ];
2934
- return pr(
2935
- x,
2936
- M,
2980
+ return gr(
2981
+ w,
2982
+ S,
2937
2983
  a.value,
2938
2984
  u.value
2939
2985
  ) || "";
2940
2986
  }
2941
- function E(x) {
2987
+ function x(w) {
2942
2988
  return {
2943
- animationDelay: x < 2 ? 0 : (x - 1) * v.value,
2944
- animationDuration: v.value
2989
+ animationDelay: w < 2 ? 0 : (w - 1) * d.value,
2990
+ animationDuration: d.value
2945
2991
  };
2946
2992
  }
2947
- function N(x, H) {
2948
- var X;
2949
- const M = (X = m(H)[x]) == null ? void 0 : X.value;
2993
+ function N(w, D) {
2994
+ var Y;
2995
+ const S = (Y = O(D)[w]) == null ? void 0 : Y.value;
2950
2996
  return {
2951
- x: ge(a.value) ? n.xScale(k.value[x]) + $.value : n.xScale(x),
2952
- y: u.value(M)
2997
+ x: _e(a.value) ? n.xScale(h.value[w]) + y.value : n.xScale(w),
2998
+ y: u.value(S)
2953
2999
  };
2954
3000
  }
2955
- function I(x) {
2956
- return n.hoveredIndex === x;
3001
+ function $(w) {
3002
+ return n.hoveredIndex === w;
2957
3003
  }
2958
- return (x, H) => (h(), T("g", fr, [
2959
- j("path", C(l(d), {
3004
+ return (w, D) => (_(), L("g", _r, [
3005
+ G("path", C(l(v), {
2960
3006
  class: "lume-line-group__overlay-line",
2961
3007
  "data-j-lume-line-group__overlay-line": ""
2962
3008
  }), null, 16),
2963
- (h(!0), T(K, null, z(l(c), (M, X) => (h(), T("g", {
2964
- key: M.label,
3009
+ (_(!0), L(J, null, z(l(c), (S, Y) => (_(), L("g", {
3010
+ key: S.label,
2965
3011
  class: "lume-line-group__group"
2966
3012
  }, [
2967
- j("g", hr, [
2968
- (h(!0), T(K, null, z(M.values, (Y, G) => (h(), W(l(lr), C(E(G), {
2969
- key: `line-${G}`,
2970
- color: M.color,
2971
- dashed: M.isDashed(G),
2972
- "path-definition": _(G, X),
3013
+ G("g", yr, [
3014
+ (_(!0), L(J, null, z(S.values, (ne, P) => (_(), W(l(cr), C(x(P), {
3015
+ key: `line-${P}`,
3016
+ color: S.color,
3017
+ dashed: S.isDashed(P),
3018
+ "path-definition": f(P, Y),
2973
3019
  transition: e.transition,
2974
3020
  width: l(r).lineWidth,
2975
- onClick: (te) => t("line-click", { index: G, datasetIndex: X, event: te })
3021
+ onClick: (K) => t("line-click", { index: P, datasetIndex: Y, event: K })
2976
3022
  }), null, 16, ["color", "dashed", "path-definition", "transition", "width", "onClick"]))), 128))
2977
3023
  ]),
2978
- l(A) ? (h(), T("g", mr, [
2979
- (h(!0), T(K, null, z(M.values, (Y, G) => (h(), W(l(cr), C(N(G, X), {
2980
- key: `point-${G}`,
2981
- active: I(G),
2982
- color: M.color,
2983
- index: G,
2984
- radius: l(y),
2985
- onClick: (te) => t("point-click", { index: G, datasetIndex: X, event: te })
3024
+ l(A) ? (_(), L("g", kr, [
3025
+ (_(!0), L(J, null, z(S.values, (ne, P) => (_(), W(l(fr), C(N(P, Y), {
3026
+ key: `point-${P}`,
3027
+ active: $(P),
3028
+ color: S.color,
3029
+ index: P,
3030
+ radius: l(m),
3031
+ onClick: (K) => t("point-click", { index: P, datasetIndex: Y, event: K })
2986
3032
  }), null, 16, ["active", "color", "index", "radius", "onClick"]))), 128))
2987
- ])) : P("", !0)
3033
+ ])) : F("", !0)
2988
3034
  ]))), 128))
2989
3035
  ]));
2990
3036
  }
2991
3037
  });
2992
- const Zt = /* @__PURE__ */ J(_r, [["__scopeId", "data-v-c4d7f0ca"]]), yr = {
2993
- margins: me.VERTICAL,
3038
+ const Xt = /* @__PURE__ */ Q(Ar, [["__scopeId", "data-v-c4d7f0ca"]]), Tr = {
3039
+ margins: ge.VERTICAL,
2994
3040
  startOnZero: !0,
2995
3041
  withTooltip: !0,
2996
3042
  xAxisOptions: {},
2997
3043
  yAxisOptions: { gridLines: !0 }
2998
- }, Hr = /* @__PURE__ */ Z({
3044
+ }, Sr = /* @__PURE__ */ Z({
2999
3045
  __name: "lume-line-chart",
3000
3046
  props: {
3001
- ...be(null, !1)
3047
+ ...Le(null, !1)
3002
3048
  },
3003
3049
  setup(e) {
3004
- const t = e, n = _e(ne()), { options: o } = Q(t), { allOptions: r } = se(o, yr);
3005
- return (a, u) => (h(), W(l(Ae), C(t, {
3050
+ const t = e, n = ye(oe()), { options: o } = q(t), { allOptions: r } = ce(o, Tr);
3051
+ return (a, u) => (_(), W(l(Oe), C(t, {
3006
3052
  "chart-type": "line",
3007
3053
  options: l(r),
3008
3054
  "data-j-lume-line-chart": ""
3009
- }), le({
3055
+ }), ue({
3010
3056
  groups: V((s) => [
3011
- oe(l(Zt), ue(ie(s)), null, 16)
3057
+ ae(l(Xt), ie(se(s)), null, 16)
3012
3058
  ]),
3013
3059
  _: 2
3014
3060
  }, [
3015
3061
  z(l(n), (s, i) => ({
3016
3062
  name: i,
3017
3063
  fn: V((c) => [
3018
- R(a.$slots, i, ue(ie(c || {})))
3064
+ M(a.$slots, i, ie(se(c || {})))
3019
3065
  ])
3020
3066
  }))
3021
3067
  ]), 1040, ["options"]));
3022
3068
  }
3023
3069
  });
3024
- function kr(e) {
3070
+ function Lr(e) {
3025
3071
  return { areaPathDefinition: p(
3026
3072
  () => function(n, o) {
3027
3073
  if (!n || !o)
3028
3074
  return;
3029
3075
  const r = e.value[0].values;
3030
- return rn().x((a, u) => n(u)).y0(o(Math.min(...o.domain()))).y1((a) => o(a.value))(r);
3076
+ return cn().x((a, u) => n(u)).y0(o(Math.min(...o.domain()))).y1((a) => o(a.value))(r);
3031
3077
  }
3032
3078
  ) };
3033
3079
  }
3034
- const br = {
3080
+ const Or = {
3035
3081
  margins: {
3036
3082
  top: 0,
3037
3083
  right: 0,
@@ -3045,82 +3091,82 @@ const br = {
3045
3091
  tooltipOptions: {
3046
3092
  showTitle: !1
3047
3093
  }
3048
- }, Ar = ["d"], Tr = /* @__PURE__ */ Z({
3094
+ }, $r = ["d"], xr = /* @__PURE__ */ Z({
3049
3095
  __name: "lume-sparkline-chart",
3050
3096
  props: {
3051
- ...et(null),
3052
- ...$e()
3097
+ ...tt(null),
3098
+ ...we()
3053
3099
  },
3054
3100
  setup(e, { expose: t }) {
3055
- const n = e, o = _e(ne()), { data: r, options: a } = Q(n), { internalData: u } = tt(r), { allOptions: s } = se(a, br), { computedLineData: i } = zt(u), { areaPathDefinition: c } = kr(i), d = p(() => u.value[0].color), v = p(
3056
- () => r.value[0].areaColor || d.value
3101
+ const n = e, o = ye(oe()), { data: r, options: a } = q(n), { internalData: u } = nt(r), { allOptions: s } = ce(a, Or), { computedLineData: i } = Ut(u), { areaPathDefinition: c } = Lr(i), v = p(() => u.value[0].color), d = p(
3102
+ () => r.value[0].areaColor || v.value
3057
3103
  );
3058
- function y(k) {
3104
+ function m(h) {
3059
3105
  return {
3060
- ...k,
3106
+ ...h,
3061
3107
  noMinSize: !0
3062
3108
  };
3063
3109
  }
3064
- function $(k, A, m) {
3065
- return Oe().range([0, m.width]).domain([0, k[0].values.length - 1]);
3110
+ function y(h, A, O) {
3111
+ return xe().range([0, O.width]).domain([0, h[0].values.length - 1]);
3066
3112
  }
3067
3113
  return t({
3068
3114
  areaPathDefinition: c
3069
- }), (k, A) => (h(), W(l(Ae), C(n, {
3115
+ }), (h, A) => (_(), W(l(Oe), C(n, {
3070
3116
  "chart-type": "line",
3071
- options: y(l(s)),
3072
- "x-scale": $
3073
- }), le({
3074
- groups: V((m) => [
3075
- l(s).showArea ? (h(), T("path", {
3117
+ options: m(l(s)),
3118
+ "x-scale": y
3119
+ }), ue({
3120
+ groups: V((O) => [
3121
+ l(s).showArea ? (_(), L("path", {
3076
3122
  key: 0,
3077
3123
  class: ee([
3078
3124
  "sparkline-chart__area",
3079
3125
  l(a).withTransition !== !1 ? "sparkline-chart__area--transition" : "",
3080
- `lume-fill--${l(v) || l(d)}`,
3126
+ `lume-fill--${l(d) || l(v)}`,
3081
3127
  "lume-fill--faded"
3082
3128
  ]),
3083
- d: l(c)(m.xScale, m.yScale),
3129
+ d: l(c)(O.xScale, O.yScale),
3084
3130
  "data-j-sparkline__area": ""
3085
- }, null, 10, Ar)) : P("", !0),
3086
- oe(l(Zt), C(m, { "with-points": !1 }), null, 16)
3131
+ }, null, 10, $r)) : F("", !0),
3132
+ ae(l(Xt), C(O, { "with-points": !1 }), null, 16)
3087
3133
  ]),
3088
3134
  _: 2
3089
3135
  }, [
3090
- z(l(o), (m, _) => ({
3091
- name: _,
3092
- fn: V((E) => [
3093
- R(k.$slots, _, ue(ie(E || {})), void 0, !0)
3136
+ z(l(o), (O, f) => ({
3137
+ name: f,
3138
+ fn: V((x) => [
3139
+ M(h.$slots, f, ie(se(x || {})), void 0, !0)
3094
3140
  ])
3095
3141
  }))
3096
3142
  ]), 1040, ["options"]));
3097
3143
  }
3098
3144
  });
3099
- const Br = /* @__PURE__ */ J(Tr, [["__scopeId", "data-v-9fc2cb6e"]]);
3145
+ const Cr = /* @__PURE__ */ Q(xr, [["__scopeId", "data-v-9fc2cb6e"]]);
3100
3146
  export {
3101
- wr as LumeAlluvialDiagram,
3102
- Ga as LumeAlluvialGroup,
3103
- oa as LumeAlluvialNodeLabel,
3104
- la as LumeAlluvialNodeValue,
3105
- ct as LumeAxis,
3106
- qe as LumeBar,
3107
- Ir as LumeBarChart,
3108
- nt as LumeBarGroup,
3109
- Ae as LumeChart,
3110
- Yn as LumeChartContainer,
3111
- dt as LumeChartLegend,
3112
- Nr as LumeGroupedBarChart,
3113
- lr as LumeLine,
3114
- Hr as LumeLineChart,
3115
- Zt as LumeLineGroup,
3116
- Bo as LumeOverlayGroup,
3117
- cr as LumePoint,
3118
- Er as LumeSingleBarChart,
3119
- Br as LumeSparklineChart,
3120
- Dr as LumeStackedBarChart,
3121
- yo as LumeTooltip,
3122
- vo as LumeTooltipItem,
3123
- lo as LumeTooltipSummary,
3124
- to as LumeTooltipTitle
3147
+ Dr as LumeAlluvialDiagram,
3148
+ za as LumeAlluvialGroup,
3149
+ ua as LumeAlluvialNodeLabel,
3150
+ ca as LumeAlluvialNodeValue,
3151
+ vt as LumeAxis,
3152
+ et as LumeBar,
3153
+ Hr as LumeBarChart,
3154
+ ot as LumeBarGroup,
3155
+ Oe as LumeChart,
3156
+ qn as LumeChartContainer,
3157
+ pt as LumeChartLegend,
3158
+ Rr as LumeGroupedBarChart,
3159
+ cr as LumeLine,
3160
+ Sr as LumeLineChart,
3161
+ Xt as LumeLineGroup,
3162
+ Co as LumeOverlayGroup,
3163
+ fr as LumePoint,
3164
+ Br as LumeSingleBarChart,
3165
+ Cr as LumeSparklineChart,
3166
+ Mr as LumeStackedBarChart,
3167
+ To as LumeTooltip,
3168
+ ho as LumeTooltipItem,
3169
+ co as LumeTooltipSummary,
3170
+ ro as LumeTooltipTitle
3125
3171
  };
3126
3172
  //# sourceMappingURL=index.js.map