@adyen/lume 0.6.0 → 0.7.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,8 +1,8 @@
1
- import { defineComponent as D, ref as x, isRef as Ye, computed as d, watch as C, toRefs as N, inject as Oe, reactive as ie, onMounted as M, onBeforeUnmount as Ke, watchEffect as Je, useSlots as G, provide as pe, defineAsyncComponent as fe } from "vue";
2
- import { format as Tt, ticks as Ot, scaleBand as te, scaleLinear as ne, line as Lt, area as xt } from "d3";
3
- import { createPopper as $t } from "@popperjs/core";
4
- import { sankeyLinkHorizontal as wt, sankey as It, sankeyJustify as Et } from "d3-sankey";
5
- const Dt = /* @__PURE__ */ D({
1
+ import { defineComponent as C, ref as $, isRef as qe, computed as c, watch as D, toRefs as B, inject as pe, reactive as me, onMounted as U, onBeforeUnmount as et, watchEffect as tt, useSlots as V, provide as ke, defineAsyncComponent as Ae } from "vue";
2
+ import { format as Lt, ticks as Ot, scaleBand as le, scaleLinear as ue, link as xt, line as $t, area as It } from "d3";
3
+ import { createPopper as wt } from "@popperjs/core";
4
+ import { sankeyLinkHorizontal as Et, sankey as Nt, sankeyJustify as Ct } from "d3-sankey";
5
+ const Dt = /* @__PURE__ */ C({
6
6
  __name: "lume-tick",
7
7
  props: {
8
8
  value: {
@@ -40,7 +40,7 @@ const Dt = /* @__PURE__ */ D({
40
40
  },
41
41
  emits: ["click", "mouseenter"],
42
42
  setup(t, { expose: e, emit: r }) {
43
- const n = x(null);
43
+ const n = $(null);
44
44
  return e({ ref: n }), { __sfc: !0, emit: r, labelRef: n };
45
45
  }
46
46
  });
@@ -48,10 +48,10 @@ function I(t, e, r, n, a, o, l, i) {
48
48
  var u = typeof t == "function" ? t.options : t;
49
49
  e && (u.render = e, u.staticRenderFns = r, u._compiled = !0), n && (u.functional = !0), o && (u._scopeId = "data-v-" + o);
50
50
  var s;
51
- if (l ? (s = function(p) {
52
- p = p || // cached call
51
+ if (l ? (s = function(f) {
52
+ f = f || // cached call
53
53
  this.$vnode && this.$vnode.ssrContext || // stateful
54
- this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !p && typeof __VUE_SSR_CONTEXT__ < "u" && (p = __VUE_SSR_CONTEXT__), a && a.call(this, p), p && p._registeredComponents && p._registeredComponents.add(l);
54
+ this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !f && typeof __VUE_SSR_CONTEXT__ < "u" && (f = __VUE_SSR_CONTEXT__), a && a.call(this, f), f && f._registeredComponents && f._registeredComponents.add(l);
55
55
  }, u._ssrRegister = s) : a && (s = i ? function() {
56
56
  a.call(
57
57
  this,
@@ -60,9 +60,9 @@ function I(t, e, r, n, a, o, l, i) {
60
60
  } : a), s)
61
61
  if (u.functional) {
62
62
  u._injectStyles = s;
63
- var c = u.render;
63
+ var d = u.render;
64
64
  u.render = function(h, _) {
65
- return s.call(_), c(h, _);
65
+ return s.call(_), d(h, _);
66
66
  };
67
67
  } else {
68
68
  var v = u.beforeCreate;
@@ -73,7 +73,7 @@ function I(t, e, r, n, a, o, l, i) {
73
73
  options: u
74
74
  };
75
75
  }
76
- var Ct = function() {
76
+ var Rt = function() {
77
77
  var e = this, r = e._self._c, n = e._self._setupProxy;
78
78
  return r("g", e._b({ staticClass: "axis__tick", class: {
79
79
  "axis__tick--hovered": e.isHovered,
@@ -83,9 +83,9 @@ var Ct = function() {
83
83
  }, click: function(a) {
84
84
  return n.emit("click", a);
85
85
  } } }, "g", e.group, !1), [r("g", { staticClass: "axis__tick-label lume-typography--axis", attrs: { "pointer-events": "all", "data-j-axis__tick-label": "" } }, [r("rect", e._b({ staticClass: "axis__ghost", attrs: { fill: "url(#lume-tick-gradient)" } }, "rect", e.ghost, !1)), r("text", e._b({ ref: "labelRef", staticClass: "axis__label" }, "text", e.label, !1), [e._v(" " + e._s(e.value) + " ")])]), e.withGridlines ? r("line", e._b({ staticClass: "axis__grid-line" }, "line", e.gridline, !1)) : e._e()]);
86
- }, Ht = [], Nt = /* @__PURE__ */ I(
86
+ }, Ht = [], St = /* @__PURE__ */ I(
87
87
  Dt,
88
- Ct,
88
+ Rt,
89
89
  Ht,
90
90
  !1,
91
91
  null,
@@ -93,42 +93,49 @@ var Ct = function() {
93
93
  null,
94
94
  null
95
95
  );
96
- const Rt = Nt.exports;
97
- function Qe() {
96
+ const Bt = St.exports, Ft = [
97
+ "controls",
98
+ "legend",
99
+ "axes",
100
+ "groups",
101
+ "tooltip",
102
+ "tooltip-content"
103
+ ];
104
+ function nt() {
98
105
  return process.env.NODE_ENV === "production";
99
106
  }
100
- function qe(t) {
107
+ function rt(t) {
101
108
  return (t == null ? void 0 : t.map(
102
109
  (e) => e.values.map((r) => r == null ? void 0 : r.value).flat()
103
110
  ).flat()) || [];
104
111
  }
105
- function Le(t) {
112
+ function Ne(t) {
106
113
  return t.length === 1;
107
114
  }
108
- function St(t) {
115
+ function Pt(t) {
109
116
  return !!t && t.every(
110
117
  (e) => "color" in e
111
118
  );
112
119
  }
113
- function me(t) {
120
+ function Te(t) {
114
121
  return !!t && typeof t == "object" && !Array.isArray(t);
115
122
  }
116
- function et(t, e) {
123
+ function at(t, e) {
117
124
  const r = { ...t };
118
125
  return Object.entries(e).forEach(([n, a]) => {
119
- r[n] = me(t[n]) && me(a) ? et(t[n], a) : a;
126
+ r[n] = Te(t[n]) && Te(a) ? at(t[n], a) : a;
120
127
  }), r;
121
128
  }
122
- function Bt(t) {
123
- return t != null && me(t) && "value" in t;
129
+ function Gt(t) {
130
+ return t != null && Te(t) && "value" in t;
124
131
  }
125
- function U(t) {
132
+ function te(t) {
126
133
  return (t == null ? void 0 : t.bandwidth) !== void 0;
127
134
  }
128
- function xe(t) {
129
- return U(t) ? t.bandwidth() : Math.max(...t.range()) / Math.max(...t.domain());
135
+ function jt(t) {
136
+ return te(t) ? t.step() : Math.max(...t.range()) / Math.max(...t.domain());
130
137
  }
131
- const Pt = (t, e) => {
138
+ const Vt = (t, e) => {
132
139
  if (!t)
133
140
  throw new Error("Data is not a valid array");
134
141
  if (t.length === 0)
@@ -138,17 +145,17 @@ const Pt = (t, e) => {
138
145
  throw new Error("Index exceeds length of at least one of the datasets");
139
146
  });
140
147
  };
141
- function Gt(t, e) {
148
+ function Mt(t, e) {
142
149
  var r;
143
- return Pt(t, e), ((r = t.reduce(
150
+ return Vt(t, e), ((r = t.reduce(
144
151
  (n, a) => {
145
152
  var o, l;
146
153
  return (((o = n.values[e]) == null ? void 0 : o.value) ?? 0) > (((l = a.values[e]) == null ? void 0 : l.value) ?? 0) ? n : a;
147
154
  }
148
155
  ).values[e]) == null ? void 0 : r.value) || 0;
149
156
  }
150
- function he(t) {
151
- const e = Ye(t) ? t.value : t;
157
+ function Le(t) {
158
+ const e = qe(t) ? t.value : t;
152
159
  if (!e)
153
160
  throw new Error("No empty array can be created from specified data value");
154
161
  const r = Math.max(
@@ -157,17 +164,17 @@ function he(t) {
157
164
  );
158
165
  return Array(r).fill(null);
159
166
  }
160
- function jt(t) {
161
- return U(t) ? t.domain().length : Math.max(...t.domain());
167
+ function zt(t) {
168
+ return te(t) ? t.domain().length : Math.max(...t.domain());
162
169
  }
163
- function Ft(t, e) {
170
+ function Wt(t, e) {
164
171
  return (r) => Math.round(t * (1 - r) + e * r);
165
172
  }
166
- function Vt(t, e, r) {
173
+ function Zt(t, e, r) {
167
174
  const n = r ? t.length - e : e, a = t.slice(0, n);
168
175
  return t.slice(n).concat(a);
169
176
  }
170
- function Y(t) {
177
+ function ne(t) {
171
178
  if (t.groups) {
172
179
  const e = Object.keys(t);
173
180
  return Object.assign(
@@ -177,24 +184,32 @@ function Y(t) {
177
184
  }
178
185
  return t;
179
186
  }
180
- const Mt = (t = 21) => crypto.getRandomValues(new Uint8Array(t)).reduce(
187
+ function Xt(t) {
188
+ return Object.assign(
189
+ {},
190
+ ...Object.keys(t).map(
191
+ (e) => Ft.includes(e) ? {} : { [e]: t[e] }
192
+ )
193
+ );
194
+ }
195
+ const Ut = (t = 21) => crypto.getRandomValues(new Uint8Array(t)).reduce(
181
196
  (e, r) => e += (r &= 63) < 36 ? r.toString(36) : r < 62 ? (r - 26).toString(36).toUpperCase() : r > 62 ? "-" : "_",
182
197
  ""
183
198
  );
184
- var V = /* @__PURE__ */ ((t) => (t.DatasetLength = `Our guidelines highly recommend not having more than 5 datasets in one chart.
185
- Learn more: https://lume.design/guidelines/datasets`, t.ColorLoop = "Colors will loop around after the 5th dataset. You can prevent this by setting specific colors for your datasets.", t.Empty = "The dataset(s) provided are empty.", t.InvalidFormat = "The string provided to format is invalid. Please refer to https://github.com/d3/d3-format for valid arguments.", t.NotContainedInSvg = "This component is an `SVGElement`, thus it is required to be inside an `<svg>` container.", t.InvalidHoveredIndex = "The provided hovered index is not valid for the data of this chart.", t.InvalidHoveredElement = "The provided hovered element is not valid for the data of this diagram.", t))(V || {});
186
- const zt = "[lume] ";
187
- function Z(t, e = !0) {
188
- e && Qe() || console.warn(zt + "Warning: " + t);
199
+ var X = /* @__PURE__ */ ((t) => (t.DatasetLength = `Our guidelines highly recommend not having more than 5 datasets in one chart.
200
+ Learn more: https://lume.design/guidelines/datasets`, t.ColorLoop = "Colors will loop around after the 5th dataset. You can prevent this by setting specific colors for your datasets.", t.Empty = "The dataset(s) provided are empty.", t.InvalidFormat = "The string provided to format is invalid. Please refer to https://github.com/d3/d3-format for valid arguments.", t.NotContainedInSvg = "This component is an `SVGElement`, thus it is required to be inside an `<svg>` container.", t.InvalidHoveredIndex = "The provided hovered index is not valid for the data of this chart.", t.InvalidHoveredElement = "The provided hovered element is not valid for the data of this diagram.", t))(X || {});
201
+ const Yt = "[lume] ";
202
+ function Q(t, e = !0) {
203
+ e && nt() || console.warn(Yt + "Warning: " + t);
189
204
  }
190
- const le = (t) => {
205
+ const fe = (t) => {
191
206
  let e = null;
192
207
  switch (typeof t) {
193
208
  case "string":
194
209
  try {
195
- e = Tt(t);
210
+ e = Lt(t);
196
211
  } catch {
197
- Z(V.InvalidFormat), e = null;
212
+ Q(X.InvalidFormat), e = null;
198
213
  }
199
214
  break;
200
215
  case "function":
@@ -207,29 +222,29 @@ const le = (t) => {
207
222
  return e ? e(...n) : n[0];
208
223
  }
209
224
  return r;
210
- }, ae = () => ({
225
+ }, ie = () => ({
211
226
  options: {
212
227
  type: Object,
213
228
  default: () => ({})
214
229
  }
215
230
  });
216
- function j(t, e) {
217
- return { allOptions: d(() => {
218
- const n = Ye(e) ? e == null ? void 0 : e.value : e;
219
- return n ? et(n, t.value) : t.value;
231
+ function z(t, e) {
232
+ return { allOptions: c(() => {
233
+ const n = qe(e) ? e == null ? void 0 : e.value : e;
234
+ return n ? at(n, t.value) : t.value;
220
235
  }) };
221
236
  }
222
- const Wt = 0.15;
223
- function Zt(t, e, r) {
224
- const n = x(), a = d(() => Math.max(...t.value.range())), o = d(() => e.value.length);
237
+ const Kt = 0.15;
238
+ function Jt(t, e, r) {
239
+ const n = $(), a = c(() => Math.max(...t.value.range())), o = c(() => e.value.length);
225
240
  function l() {
226
241
  if (!e.value)
227
242
  return;
228
243
  const u = e.value.reduce(
229
- (c, v) => c + v.ref.getBoundingClientRect().width,
244
+ (d, v) => d + v.ref.getBoundingClientRect().width,
230
245
  0
231
246
  ), s = Math.ceil(u / o.value);
232
- n.value = s + s * Wt;
247
+ n.value = s + s * Kt;
233
248
  }
234
249
  function i(u) {
235
250
  if (!e.value)
@@ -237,20 +252,20 @@ function Zt(t, e, r) {
237
252
  const s = e.value.length;
238
253
  if (u === 0)
239
254
  return !0;
240
- const c = a.value / s, v = typeof r == "number" && r > 0 && r + 1 || Math.ceil(n.value / c);
255
+ const d = a.value / s, v = typeof r == "number" && r > 0 && r + 1 || Math.ceil(n.value / d);
241
256
  return u % v === 0;
242
257
  }
243
- return C(e, l), { showTick: i };
258
+ return D(e, l), { showTick: i };
244
259
  }
245
- var P = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(P || {}), tt = /* @__PURE__ */ ((t) => (t.Skyblue10 = "skyblue-10", t.Skyblue20 = "skyblue-20", t.Skyblue30 = "skyblue-30", t.Skyblue40 = "skyblue-40", t.Skyblue50 = "skyblue-50", t.Skyblue60 = "skyblue-60", t.Skyblue70 = "skyblue-70", t.Skyblue80 = "skyblue-80", t.Skyblue90 = "skyblue-90", t.Skyblue100 = "skyblue-100", t.Royalblue10 = "royalblue-10", t.Royalblue20 = "royalblue-20", t.Royalblue30 = "royalblue-30", t.Royalblue40 = "royalblue-40", t.Royalblue50 = "royalblue-50", t.Royalblue60 = "royalblue-60", t.Royalblue70 = "royalblue-70", t.Royalblue80 = "royalblue-80", t.Royalblue90 = "royalblue-90", t.Royalblue100 = "royalblue-100", t.Violet10 = "violet-10", t.Violet20 = "violet-20", t.Violet30 = "violet-30", t.Violet40 = "violet-40", t.Violet50 = "violet-50", t.Violet60 = "violet-60", t.Violet70 = "violet-70", t.Violet80 = "violet-80", t.Violet90 = "violet-90", t.Violet100 = "violet-100", t.Darkteal10 = "darkteal-10", t.Darkteal20 = "darkteal-20", t.Darkteal30 = "darkteal-30", t.Darkteal40 = "darkteal-40", t.Darkteal50 = "darkteal-50", t.Darkteal60 = "darkteal-60", t.Darkteal70 = "darkteal-70", t.Darkteal80 = "darkteal-80", t.Darkteal90 = "darkteal-90", t.Darkteal100 = "darkteal-100", t.Gold10 = "gold-10", t.Gold20 = "gold-20", t.Gold30 = "gold-30", t.Gold40 = "gold-40", t.Gold50 = "gold-50", t.Gold60 = "gold-60", t.Gold70 = "gold-70", t.Gold80 = "gold-80", t.Gold90 = "gold-90", t.Gold100 = "gold-100", t))(tt || {}), $e = /* @__PURE__ */ ((t) => (t.SkyTeal = "skyblue-darkteal", t.VioletRoyal = "violet-royalblue", t.VioletTeal = "violet-darkteal", t.GoldTeal = "gold-darkteal", t.GoldRoyal = "gold-royalblue", t))($e || {}), nt = /* @__PURE__ */ ((t) => (t.Grey = "grey", t.Green = "green", t.Orange = "orange", t.Red = "red", t))(nt || {}), we = /* @__PURE__ */ ((t) => (t["01"] = "01", t["02"] = "02", t["03"] = "03", t["04"] = "04", t["05"] = "05", t["06"] = "06", t["07"] = "07", t["08"] = "08", t["09"] = "09", t))(we || {});
260
+ var M = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(M || {}), ot = /* @__PURE__ */ ((t) => (t.Skyblue10 = "skyblue-10", t.Skyblue20 = "skyblue-20", t.Skyblue30 = "skyblue-30", t.Skyblue40 = "skyblue-40", t.Skyblue50 = "skyblue-50", t.Skyblue60 = "skyblue-60", t.Skyblue70 = "skyblue-70", t.Skyblue80 = "skyblue-80", t.Skyblue90 = "skyblue-90", t.Skyblue100 = "skyblue-100", t.Royalblue10 = "royalblue-10", t.Royalblue20 = "royalblue-20", t.Royalblue30 = "royalblue-30", t.Royalblue40 = "royalblue-40", t.Royalblue50 = "royalblue-50", t.Royalblue60 = "royalblue-60", t.Royalblue70 = "royalblue-70", t.Royalblue80 = "royalblue-80", t.Royalblue90 = "royalblue-90", t.Royalblue100 = "royalblue-100", t.Violet10 = "violet-10", t.Violet20 = "violet-20", t.Violet30 = "violet-30", t.Violet40 = "violet-40", t.Violet50 = "violet-50", t.Violet60 = "violet-60", t.Violet70 = "violet-70", t.Violet80 = "violet-80", t.Violet90 = "violet-90", t.Violet100 = "violet-100", t.Darkteal10 = "darkteal-10", t.Darkteal20 = "darkteal-20", t.Darkteal30 = "darkteal-30", t.Darkteal40 = "darkteal-40", t.Darkteal50 = "darkteal-50", t.Darkteal60 = "darkteal-60", t.Darkteal70 = "darkteal-70", t.Darkteal80 = "darkteal-80", t.Darkteal90 = "darkteal-90", t.Darkteal100 = "darkteal-100", t.Gold10 = "gold-10", t.Gold20 = "gold-20", t.Gold30 = "gold-30", t.Gold40 = "gold-40", t.Gold50 = "gold-50", t.Gold60 = "gold-60", t.Gold70 = "gold-70", t.Gold80 = "gold-80", t.Gold90 = "gold-90", t.Gold100 = "gold-100", t))(ot || {}), Ce = /* @__PURE__ */ ((t) => (t.SkyTeal = "skyblue-darkteal", t.VioletRoyal = "violet-royalblue", t.VioletTeal = "violet-darkteal", t.GoldTeal = "gold-darkteal", t.GoldRoyal = "gold-royalblue", t))(Ce || {}), lt = /* @__PURE__ */ ((t) => (t.Grey = "grey", t.Green = "green", t.Orange = "orange", t.Red = "red", t))(lt || {}), De = /* @__PURE__ */ ((t) => (t["01"] = "01", t["02"] = "02", t["03"] = "03", t["04"] = "04", t["05"] = "05", t["06"] = "06", t["07"] = "07", t["08"] = "08", t["09"] = "09", t))(De || {});
246
261
  const L = {
247
262
  HORIZONTAL: "horizontal",
248
263
  VERTICAL: "vertical"
249
- }, Xt = {
264
+ }, Qt = {
250
265
  SINGLE: "single",
251
266
  GROUPED: "grouped",
252
267
  STACKED: "stacked"
253
- }, X = {
268
+ }, q = {
254
269
  VERTICAL: {
255
270
  top: 16,
256
271
  right: 0,
@@ -263,7 +278,7 @@ const L = {
263
278
  bottom: 28,
264
279
  left: 24
265
280
  }
266
- }, rt = "No data", Ut = 20, Yt = 0.33, Kt = 0.5, at = 12, ot = 8, Jt = 1, Qt = [
281
+ }, ut = "No data", qt = 20, it = 0.33, st = 0.5, ct = 12, dt = 8, en = 1, tn = [
267
282
  "auto",
268
283
  "auto-start",
269
284
  "auto-end",
@@ -280,10 +295,10 @@ const L = {
280
295
  "left-start",
281
296
  "left-end"
282
297
  ];
283
- function se(t) {
284
- t != null && t.closest("svg") || Z(V.NotContainedInSvg);
298
+ function he(t) {
299
+ t != null && t.closest("svg") || Q(X.NotContainedInSvg);
285
300
  }
286
- const lt = {
301
+ const vt = {
287
302
  /** Displays a line for each tick. */
288
303
  gridLines: !1,
289
304
  /** Displays the axis title. */
@@ -299,30 +314,30 @@ const lt = {
299
314
  tickFormat: null,
300
315
  /** Space between the tick label and the axis line. */
301
316
  tickPadding: 8
302
- }, qt = {
303
- ...lt,
317
+ }, nn = {
318
+ ...vt,
304
319
  withTitle: !1,
305
320
  skip: !0
306
- }, en = {
307
- ...lt,
321
+ }, rn = {
322
+ ...vt,
308
323
  gridLines: !0
309
- }, tn = function(t, e, r) {
310
- const n = d(() => t.value.step() * t.value.paddingInner() / 2);
324
+ }, an = function(t, e, r) {
325
+ const n = c(() => t.value.step() * t.value.paddingInner() / 2);
311
326
  function a(u, s) {
312
327
  return {
313
328
  transform: `translate(${(t.value(s) ?? t.value(u)) - n.value}, 0)`
314
329
  };
315
330
  }
316
331
  function o(u) {
317
- var c;
332
+ var d;
318
333
  const s = Math.max(
319
334
  t.value.step(),
320
- (u ? (c = u.getComputedTextLength) == null ? void 0 : c.call(u) : t.value.step()) + 20
335
+ (u ? (d = u.getComputedTextLength) == null ? void 0 : d.call(u) : t.value.step()) + 20
321
336
  );
322
337
  return {
323
338
  x: -(s - t.value.step()) / 2,
324
339
  width: s,
325
- height: r.value.tickPadding + at + ot
340
+ height: r.value.tickPadding + ct + dt
326
341
  };
327
342
  }
328
343
  function l() {
@@ -348,16 +363,16 @@ const lt = {
348
363
  getTickGroupAttributes: a,
349
364
  getTickLabelAttributes: i
350
365
  };
351
- }, nn = function(t, e, r) {
352
- const n = d(() => t.value.step() * t.value.paddingInner() / 2);
366
+ }, on = function(t, e, r) {
367
+ const n = c(() => t.value.step() * t.value.paddingInner() / 2);
353
368
  function a(u, s) {
354
369
  return {
355
370
  transform: `translate(0, ${(t.value(s) ?? t.value(u)) - n.value})`
356
371
  };
357
372
  }
358
373
  function o(u) {
359
- var c;
360
- const s = (u ? (c = u.getComputedTextLength) == null ? void 0 : c.call(u) : 42) + r.value.tickPadding * 2;
374
+ var d;
375
+ const s = (u ? (d = u.getComputedTextLength) == null ? void 0 : d.call(u) : 42) + r.value.tickPadding * 2;
361
376
  return {
362
377
  x: -s,
363
378
  width: s,
@@ -386,8 +401,8 @@ const lt = {
386
401
  getTickGroupAttributes: a,
387
402
  getTickLabelAttributes: i
388
403
  };
389
- }, rn = function(t, e, r) {
390
- const n = d(() => {
404
+ }, ln = function(t, e, r) {
405
+ const n = c(() => {
391
406
  const u = t.value.ticks();
392
407
  return u.length > 1 ? t.value(u[1]) - t.value(u[0]) : 0;
393
408
  });
@@ -398,7 +413,7 @@ const lt = {
398
413
  }
399
414
  function o() {
400
415
  return {
401
- height: r.value.tickPadding + at + ot,
416
+ height: r.value.tickPadding + ct + dt,
402
417
  width: n.value,
403
418
  x: -(n.value / 2)
404
419
  };
@@ -421,8 +436,8 @@ const lt = {
421
436
  getTickGroupAttributes: a,
422
437
  getTickLabelAttributes: i
423
438
  };
424
- }, an = function(t, e, r) {
425
- const n = d(() => {
439
+ }, un = function(t, e, r) {
440
+ const n = c(() => {
426
441
  const u = t.value.ticks();
427
442
  return u.length > 1 ? t.value(u[1]) - t.value(u[0]) : 0;
428
443
  });
@@ -432,8 +447,8 @@ const lt = {
432
447
  };
433
448
  }
434
449
  function o(u) {
435
- var c;
436
- const s = (((c = u == null ? void 0 : u.getComputedTextLength) == null ? void 0 : c.call(u)) || 0) + r.value.tickPadding * 2;
450
+ var d;
451
+ const s = (((d = u == null ? void 0 : u.getComputedTextLength) == null ? void 0 : d.call(u)) || 0) + r.value.tickPadding * 2;
437
452
  return {
438
453
  width: s,
439
454
  height: n.value,
@@ -459,14 +474,14 @@ const lt = {
459
474
  getTickGroupAttributes: a,
460
475
  getTickLabelAttributes: i
461
476
  };
462
- }, on = {
463
- "x-band-scale-axis": tn,
464
- "y-band-scale-axis": nn,
465
- "x-linear-scale-axis": rn,
466
- "y-linear-scale-axis": an
477
+ }, sn = {
478
+ "x-band-scale-axis": an,
479
+ "y-band-scale-axis": on,
480
+ "x-linear-scale-axis": ln,
481
+ "y-linear-scale-axis": un
467
482
  };
468
- var ge = /* @__PURE__ */ ((t) => (t.bandScale = "band-scale-axis", t.linearScale = "linear-scale-axis", t))(ge || {}), ye = /* @__PURE__ */ ((t) => (t.left = "left", t.bottom = "bottom", t))(ye || {}), oe = /* @__PURE__ */ ((t) => (t.x = "bottom", t.y = "left", t))(oe || {});
469
- const ln = /* @__PURE__ */ D({
483
+ var Oe = /* @__PURE__ */ ((t) => (t.bandScale = "band-scale-axis", t.linearScale = "linear-scale-axis", t))(Oe || {}), xe = /* @__PURE__ */ ((t) => (t.left = "left", t.bottom = "bottom", t))(xe || {}), _e = /* @__PURE__ */ ((t) => (t.x = "bottom", t.y = "left", t))(_e || {});
484
+ const cn = /* @__PURE__ */ C({
470
485
  __name: "lume-axis",
471
486
  props: {
472
487
  scale: {
@@ -476,12 +491,12 @@ const ln = /* @__PURE__ */ D({
476
491
  type: {
477
492
  type: String,
478
493
  default: void 0,
479
- validator: (t) => t in oe
494
+ validator: (t) => t in _e
480
495
  },
481
496
  position: {
482
497
  type: String,
483
498
  default: void 0,
484
- validator: (t) => t in ye
499
+ validator: (t) => t in xe
485
500
  },
486
501
  containerSize: {
487
502
  type: Object,
@@ -495,70 +510,70 @@ const ln = /* @__PURE__ */ D({
495
510
  type: String,
496
511
  default: L.VERTICAL
497
512
  },
498
- ...ae()
513
+ ...ie()
499
514
  },
500
515
  emits: ["mouseenter", "click", "mouseleave"],
501
516
  setup(t, { emit: e }) {
502
- const r = t, { scale: n, containerSize: a, hoveredIndex: o, options: l, orientation: i } = N(r), u = Oe("isEmpty", x(!1)), s = ie({}), c = x(null), v = x(null), p = x(null), h = d(
503
- () => r.type ? oe[r.type] : r.position
504
- ), _ = d(
517
+ const r = t, { scale: n, containerSize: a, hoveredIndex: o, options: l, orientation: i } = B(r), u = pe("isEmpty", $(!1)), s = me({}), d = $(null), v = $(null), f = $(null), h = c(
518
+ () => r.type ? _e[r.type] : r.position
519
+ ), _ = c(
505
520
  () => r.type || (h.value === "left" ? "y" : "x")
506
- ), m = d(
521
+ ), m = c(
507
522
  () => _.value === "x" && i.value === L.VERTICAL || _.value === "y" && i.value === L.HORIZONTAL
508
- ), { allOptions: A } = j(
523
+ ), { allOptions: k } = z(
509
524
  l,
510
- _.value === "x" ? qt : en
511
- ), { showTick: f } = Zt(n, c, A.value.skip), T = d(() => {
512
- var E, H, R, J;
513
- return _.value === "y" && u.value ? `translate(0, ${((E = a.value) == null ? void 0 : E.height) / 2})` : _.value === "x" && u.value ? `translate(-${((H = a.value) == null ? void 0 : H.width) / 2}, ${(R = a.value) == null ? void 0 : R.height})` : `translate(0, ${_.value === "x" ? (J = a.value) == null ? void 0 : J.height : 0})`;
514
- }), O = d(() => {
515
- if (U(n.value))
525
+ _.value === "x" ? nn : rn
526
+ ), { showTick: p } = Jt(n, d, k.value.skip), T = c(() => {
527
+ var w, N, H, g;
528
+ return _.value === "y" && u.value ? `translate(0, ${((w = a.value) == null ? void 0 : w.height) / 2})` : _.value === "x" && u.value ? `translate(-${((N = a.value) == null ? void 0 : N.width) / 2}, ${(H = a.value) == null ? void 0 : H.height})` : `translate(0, ${_.value === "x" ? (g = a.value) == null ? void 0 : g.height : 0})`;
529
+ }), O = c(() => {
530
+ if (te(n.value))
516
531
  return n.value.labels || n.value.domain();
517
- const { tickCount: E } = A.value, [H, R] = n.value.domain();
518
- return Ot(H, R, E);
519
- }), k = d(() => {
520
- const { tickFormat: E } = A.value;
521
- return le(E);
522
- }), g = d(
523
- () => A.value.withHover && m.value && o.value > -1
532
+ const { tickCount: w } = k.value, [N, H] = n.value.domain();
533
+ return Ot(N, H, w);
534
+ }), A = c(() => {
535
+ const { tickFormat: w } = k.value;
536
+ return fe(w);
537
+ }), y = c(
538
+ () => k.value.withHover && m.value && o.value > -1
524
539
  );
525
- function $(E) {
526
- const { showTicks: H } = A.value;
527
- return H === !1 ? "" : k.value(E);
540
+ function E(w) {
541
+ const { showTicks: N } = k.value;
542
+ return N === !1 ? "" : A.value(w);
528
543
  }
529
- function b(E, H, R) {
530
- e("mouseenter", { index: m.value ? E : null, value: H, event: R });
544
+ function R(w, N, H) {
545
+ e("mouseenter", { index: m.value ? w : null, value: N, event: H });
531
546
  }
532
- function w(E, H, R) {
533
- e("click", { index: E, value: H, event: R });
547
+ function F(w, N, H) {
548
+ e("click", { index: w, value: N, event: H });
534
549
  }
535
- function S(E) {
536
- if (!(!c.value || !c.value.length))
537
- return c.value[E].ref;
550
+ function G(w) {
551
+ if (!(!d.value || !d.value.length))
552
+ return d.value[w].ref;
538
553
  }
539
- function F() {
540
- p.value = O.value.map(
541
- (E, H) => ({
542
- value: $(E),
543
- group: s.getTickGroupAttributes(E, H),
544
- ghost: s.getTickGhostAttributes(S(H)),
554
+ function j() {
555
+ f.value = O.value.map(
556
+ (w, N) => ({
557
+ value: E(w),
558
+ group: s.getTickGroupAttributes(w, N),
559
+ ghost: s.getTickGhostAttributes(G(N)),
545
560
  label: s.getTickLabelAttributes(),
546
561
  gridline: s.getGridLinesAttributes()
547
562
  })
548
563
  );
549
564
  }
550
- function K() {
551
- const E = n.value.step ? "bandScale" : "linearScale", H = on[`${_.value}-${ge[E]}`];
552
- Object.entries(H(n, a, A) || []).forEach(
553
- ([R, J]) => {
554
- s[R] = J;
565
+ function W() {
566
+ const w = n.value.step ? "bandScale" : "linearScale", N = sn[`${_.value}-${Oe[w]}`];
567
+ Object.entries(N(n, a, k) || []).forEach(
568
+ ([H, g]) => {
569
+ s[H] = g;
555
570
  }
556
571
  );
557
572
  }
558
- return C(n, K, { flush: "sync", immediate: !0 }), C(n, F, { immediate: !0 }), C(c, F), M(() => se(v.value)), { __sfc: !0, SCALE_MIXIN_MAP: ge, POSITIONS: ye, TYPES: oe, props: r, emit: e, scale: n, containerSize: a, hoveredIndex: o, options: l, orientation: i, isEmpty: u, mixins: s, tickRefs: c, root: v, ticksWithAttributes: p, computedPosition: h, computedType: _, shouldHover: m, allOptions: A, showTick: f, axisTransform: T, ticks: O, tickFormatter: k, isHovering: g, formatTick: $, handleTickMouseenter: b, handleTickClick: w, getTextNode: S, setTicks: F, init: K, LumeTick: Rt };
573
+ return D(n, W, { flush: "sync", immediate: !0 }), D(n, j, { immediate: !0 }), D(d, j), U(() => he(v.value)), { __sfc: !0, SCALE_MIXIN_MAP: Oe, POSITIONS: xe, TYPES: _e, props: r, emit: e, scale: n, containerSize: a, hoveredIndex: o, options: l, orientation: i, isEmpty: u, mixins: s, tickRefs: d, root: v, ticksWithAttributes: f, computedPosition: h, computedType: _, shouldHover: m, allOptions: k, showTick: p, axisTransform: T, ticks: O, tickFormatter: A, isHovering: y, formatTick: E, handleTickMouseenter: R, handleTickClick: F, getTextNode: G, setTicks: j, init: W, LumeTick: Bt };
559
574
  }
560
575
  });
561
- var un = function() {
576
+ var dn = function() {
562
577
  var e = this, r = e._self._c, n = e._self._setupProxy;
563
578
  return n.scale ? r("g", { ref: "root", staticClass: "axis", attrs: { transform: n.axisTransform, "data-j-axis": "" }, on: { mouseleave: function(a) {
564
579
  return n.emit("mouseleave", a);
@@ -575,36 +590,36 @@ var un = function() {
575
590
  a
576
591
  );
577
592
  } } }, "lume-tick", n.ticksWithAttributes[n.hoveredIndex], !1)) : e._e()], 2) : e._e();
578
- }, sn = [], cn = /* @__PURE__ */ I(
579
- ln,
580
- un,
581
- sn,
593
+ }, vn = [], _n = /* @__PURE__ */ I(
594
+ cn,
595
+ dn,
596
+ vn,
582
597
  !1,
583
598
  null,
584
599
  null,
585
600
  null,
586
601
  null
587
602
  );
588
- const dn = cn.exports;
589
- function vn(t, e, r, n) {
590
- const a = d(() => r.value > 0 && r.value < 1), o = d(
603
+ const fn = _n.exports;
604
+ function pn(t, e, r, n) {
605
+ const a = c(() => r.value > 0 && r.value < 1), o = c(
591
606
  () => n.value > 0 && n.value < 1
592
- ), l = d(
607
+ ), l = c(
593
608
  () => a.value ? t.value - 0.5 : t.value
594
609
  // draws the 1px bar closer to the axis
595
- ), i = d(
610
+ ), i = c(
596
611
  () => o.value ? e.value - 0.5 : e.value
597
612
  // draws the 1px bar closer to the axis
598
613
  );
599
614
  return { computedX: l, computedY: i, shouldHaveMinWidth: a, shouldHaveMinHeight: o };
600
615
  }
601
- function _n(t, e, r, n) {
602
- const a = x(0), o = x(0), l = d(() => `${t.value + r.value / 2}px ${e.value + n.value / 2}px`);
603
- return M(() => {
616
+ function mn(t, e, r, n) {
617
+ const a = $(0), o = $(0), l = c(() => `${t.value + r.value / 2}px ${e.value + n.value / 2}px`);
618
+ return U(() => {
604
619
  a.value = r.value, o.value = n.value;
605
- }), C(r, (i) => a.value = i), C(n, (i) => o.value = i), { computedWidth: a, computedHeight: o, transformOrigin: l };
620
+ }), D(r, (i) => a.value = i), D(n, (i) => o.value = i), { computedWidth: a, computedHeight: o, transformOrigin: l };
606
621
  }
607
- const pn = /* @__PURE__ */ D({
622
+ const hn = /* @__PURE__ */ C({
608
623
  __name: "lume-bar",
609
624
  props: {
610
625
  x: {
@@ -642,13 +657,13 @@ const pn = /* @__PURE__ */ D({
642
657
  },
643
658
  emits: ["click", "mouseover", "mouseleave"],
644
659
  setup(t, { emit: e }) {
645
- const r = t, { x: n, y: a, width: o, height: l, transition: i, classList: u } = N(r), s = x(null), c = d(
660
+ const r = t, { x: n, y: a, width: o, height: l, transition: i, classList: u } = B(r), s = $(null), d = c(
646
661
  () => typeof u.value == "string" ? [u.value] : u.value
647
- ), v = d(() => i.value === "width"), p = d(() => i.value === "height"), h = _n(n, a, o, l), { computedX: _, computedY: m, shouldHaveMinWidth: A, shouldHaveMinHeight: f } = vn(n, a, o, l), T = d(() => A.value ? 1 : (v.value ? h.computedWidth : o).value), O = d(() => f.value ? 1 : (p.value ? h.computedHeight : l).value), k = v.value || p.value ? h.transformOrigin : null;
648
- return M(() => se(s.value)), { __sfc: !0, props: r, emit: e, x: n, y: a, width: o, height: l, transition: i, classList: u, root: s, computedClasses: c, shouldTransitionWidth: v, shouldTransitionHeight: p, transitionProps: h, computedX: _, computedY: m, shouldHaveMinWidth: A, shouldHaveMinHeight: f, computedWidth: T, computedHeight: O, transformOrigin: k };
662
+ ), v = c(() => i.value === "width"), f = c(() => i.value === "height"), h = mn(n, a, o, l), { computedX: _, computedY: m, shouldHaveMinWidth: k, shouldHaveMinHeight: p } = pn(n, a, o, l), T = c(() => k.value ? 1 : (v.value ? h.computedWidth : o).value), O = c(() => p.value ? 1 : (f.value ? h.computedHeight : l).value), A = v.value || f.value ? h.transformOrigin : null;
663
+ return U(() => he(s.value)), { __sfc: !0, props: r, emit: e, x: n, y: a, width: o, height: l, transition: i, classList: u, root: s, computedClasses: d, shouldTransitionWidth: v, shouldTransitionHeight: f, transitionProps: h, computedX: _, computedY: m, shouldHaveMinWidth: k, shouldHaveMinHeight: p, computedWidth: T, computedHeight: O, transformOrigin: A };
649
664
  }
650
665
  });
651
- var fn = function() {
666
+ var gn = function() {
652
667
  var e = this, r = e._self._c, n = e._self._setupProxy;
653
668
  return r("rect", { ref: "root", staticClass: "lume-bar", class: [
654
669
  {
@@ -665,32 +680,32 @@ var fn = function() {
665
680
  }, mouseleave: function(a) {
666
681
  return n.emit("mouseleave", a);
667
682
  } } });
668
- }, mn = [], hn = /* @__PURE__ */ I(
669
- pn,
670
- fn,
671
- mn,
683
+ }, yn = [], bn = /* @__PURE__ */ I(
684
+ hn,
685
+ gn,
686
+ yn,
672
687
  !1,
673
688
  null,
674
689
  "8e8f732a",
675
690
  null,
676
691
  null
677
692
  );
678
- const Ie = hn.exports;
679
- function gn() {
680
- const t = x(), e = ie({
693
+ const Re = bn.exports;
694
+ function kn() {
695
+ const t = $(), e = me({
681
696
  dimensions: {}
682
697
  }), r = new ResizeObserver((n) => {
683
698
  n.forEach((a) => {
684
699
  e.dimensions = a.contentRect;
685
700
  });
686
701
  });
687
- return M(() => {
702
+ return U(() => {
688
703
  r.observe(t.value);
689
- }), Ke(() => {
704
+ }), et(() => {
690
705
  r.unobserve(t.value);
691
706
  }), { resizeState: e, resizeRef: t };
692
707
  }
693
- const yn = /* @__PURE__ */ D({
708
+ const An = /* @__PURE__ */ C({
694
709
  __name: "lume-chart-container",
695
710
  props: {
696
711
  margins: {
@@ -717,31 +732,31 @@ const yn = /* @__PURE__ */ D({
717
732
  right: 0,
718
733
  top: 0,
719
734
  bottom: 0
720
- }, { margins: a, containerSize: o } = N(r), l = x(null), { resizeRef: i, resizeState: u } = gn(), s = d(() => ({
735
+ }, { margins: a, containerSize: o } = B(r), l = $(null), { resizeRef: i, resizeState: u } = kn(), s = c(() => ({
721
736
  ...n,
722
737
  // Default values
723
738
  ...a.value
724
739
  // Prop overrides
725
- })), c = d(
740
+ })), d = c(
726
741
  () => o.value.height + s.value.top + s.value.bottom
727
742
  );
728
- return Je(() => {
743
+ return tt(() => {
729
744
  if (!l.value)
730
745
  return;
731
- const { width: v } = u.dimensions, { height: p } = l.value.getBoundingClientRect();
732
- if (!v || !p)
746
+ const { width: v } = u.dimensions, { height: f } = l.value.getBoundingClientRect();
747
+ if (!v || !f)
733
748
  return;
734
- const h = v - s.value.left - s.value.right, _ = p - s.value.top - s.value.bottom, m = {
749
+ const h = v - s.value.left - s.value.right, _ = f - s.value.top - s.value.bottom, m = {
735
750
  width: h > 0 ? h : 0,
736
751
  height: _ > 0 ? _ : 0,
737
752
  outerWidth: v,
738
- outerHeight: p
753
+ outerHeight: f
739
754
  };
740
755
  e("resize", m);
741
- }), { __sfc: !0, BASE_MARGINS: n, props: r, emit: e, margins: a, containerSize: o, root: l, resizeRef: i, resizeState: u, computedMargins: s, svgHeight: c };
756
+ }), { __sfc: !0, BASE_MARGINS: n, props: r, emit: e, margins: a, containerSize: o, root: l, resizeRef: i, resizeState: u, computedMargins: s, svgHeight: d };
742
757
  }
743
758
  });
744
- var bn = function() {
759
+ var Tn = function() {
745
760
  var e = this, r = e._self._c, n = e._self._setupProxy;
746
761
  return r("div", { ref: "resizeRef", staticClass: "lume-chart-container", class: {
747
762
  "lume-chart-container--minimum": !e.noMinSize
@@ -754,32 +769,32 @@ var bn = function() {
754
769
  }, mouseleave: function(a) {
755
770
  return n.emit("mouseleave", a);
756
771
  } } }, [r("g", { staticClass: "lume-chart-container__group", attrs: { transform: `translate(${n.computedMargins.left}, ${n.computedMargins.top})`, "data-j-chart-container__group": "" } }, [e._t("default")], 2)]), e._t("footer"), e._t("extra")], 2);
757
- }, kn = [], An = /* @__PURE__ */ I(
758
- yn,
759
- bn,
760
- kn,
772
+ }, Ln = [], On = /* @__PURE__ */ I(
773
+ An,
774
+ Tn,
775
+ Ln,
761
776
  !1,
762
777
  null,
763
778
  "d53fd184",
764
779
  null,
765
780
  null
766
781
  );
767
- const Tn = An.exports, On = /* @__PURE__ */ D({
782
+ const xn = On.exports, $n = /* @__PURE__ */ C({
768
783
  __name: "lume-chart-legend",
769
784
  props: {
770
785
  data: {
771
786
  type: Array,
772
- validator: St,
787
+ validator: Pt,
773
788
  required: !0
774
789
  }
775
790
  },
776
791
  emits: ["click", "mouseenter", "mouseleave"],
777
792
  setup(t, { emit: e }) {
778
- const r = Oe("isEmpty");
793
+ const r = pe("isEmpty");
779
794
  return { __sfc: !0, emit: e, isEmpty: r };
780
795
  }
781
796
  });
782
- var Ln = function() {
797
+ var In = function() {
783
798
  var e = this, r = e._self._c, n = e._self._setupProxy;
784
799
  return n.isEmpty ? e._e() : r("div", { staticClass: "lume-chart-legend", attrs: { "data-j-chart-legend": "" }, on: { mouseleave: function(a) {
785
800
  return n.emit("mouseleave");
@@ -790,47 +805,47 @@ var Ln = function() {
790
805
  return n.emit("mouseenter", { index: o, dataset: a, event: l });
791
806
  } } }, [r("span", { staticClass: "lume-chart-legend__symbol", class: `lume-background-color--${a.color}`, attrs: { "data-j-chart-legend__symbol": "" } }), e._v(" " + e._s(a.label || o) + " ")]);
792
807
  }), 0);
793
- }, xn = [], $n = /* @__PURE__ */ I(
794
- On,
795
- Ln,
796
- xn,
808
+ }, wn = [], En = /* @__PURE__ */ I(
809
+ $n,
810
+ In,
811
+ wn,
797
812
  !1,
798
813
  null,
799
814
  "4710298b",
800
815
  null,
801
816
  null
802
817
  );
803
- const wn = $n.exports;
804
- const In = {};
805
- var En = function() {
818
+ const Nn = En.exports;
819
+ const Cn = {};
820
+ var Dn = function() {
806
821
  var e = this, r = e._self._c;
807
822
  return r("div", { staticClass: "lume-tooltip__title", attrs: { "data-j-tooltip__title": "" } }, [e._t("default")], 2);
808
- }, Dn = [], Cn = /* @__PURE__ */ I(
809
- In,
810
- En,
823
+ }, Rn = [], Hn = /* @__PURE__ */ I(
824
+ Cn,
811
825
  Dn,
826
+ Rn,
812
827
  !1,
813
828
  null,
814
- "64d83dca",
829
+ "8af3fac6",
815
830
  null,
816
831
  null
817
832
  );
818
- const Hn = Cn.exports;
819
- const Nn = {};
820
- var Rn = function() {
833
+ const Sn = Hn.exports;
834
+ const Bn = {};
835
+ var Fn = function() {
821
836
  var e = this, r = e._self._c;
822
837
  return r("li", { staticClass: "lume-tooltip__item", attrs: { "data-j-tooltip__summary-item": "" } }, [r("span", [e._t("default")], 2), r("strong", { staticClass: "lume-tooltip__value" }, [e._t("value")], 2)]);
823
- }, Sn = [], Bn = /* @__PURE__ */ I(
824
- Nn,
825
- Rn,
826
- Sn,
838
+ }, Pn = [], Gn = /* @__PURE__ */ I(
839
+ Bn,
840
+ Fn,
841
+ Pn,
827
842
  !1,
828
843
  null,
829
- "ff4ee04e",
844
+ "4ed7ec1b",
830
845
  null,
831
846
  null
832
847
  );
833
- const Pn = Bn.exports, Gn = /* @__PURE__ */ D({
848
+ const jn = Gn.exports, Vn = /* @__PURE__ */ C({
834
849
  __name: "lume-tooltip-item",
835
850
  props: {
836
851
  color: {
@@ -842,20 +857,20 @@ const Pn = Bn.exports, Gn = /* @__PURE__ */ D({
842
857
  return { __sfc: !0 };
843
858
  }
844
859
  });
845
- var jn = function() {
860
+ var Mn = function() {
846
861
  var e = this, r = e._self._c;
847
862
  return e._self._setupProxy, r("li", { staticClass: "lume-tooltip__item", attrs: { "data-j-tooltip__item": "" } }, [e.color ? r("span", { staticClass: "lume-tooltip__symbol", class: [`lume-background-color--${e.color}`], attrs: { "data-j-tooltip__item__symbol": "" } }) : e._e(), r("span", { attrs: { "data-j-tooltip__item__label": "" } }, [e._t("label")], 2), r("strong", { staticClass: "lume-tooltip__value", attrs: { "data-j-tooltip__item__value": "" } }, [e._t("value")], 2)]);
848
- }, Fn = [], Vn = /* @__PURE__ */ I(
849
- Gn,
850
- jn,
851
- Fn,
863
+ }, zn = [], Wn = /* @__PURE__ */ I(
864
+ Vn,
865
+ Mn,
866
+ zn,
852
867
  !1,
853
868
  null,
854
- "463bdfbf",
869
+ "4f995c3c",
855
870
  null,
856
871
  null
857
872
  );
858
- const Mn = Vn.exports, zn = /* @__PURE__ */ D({
873
+ const Zn = Wn.exports, Xn = /* @__PURE__ */ C({
859
874
  __name: "lume-tooltip",
860
875
  props: {
861
876
  targetElement: {
@@ -869,7 +884,7 @@ const Mn = Vn.exports, zn = /* @__PURE__ */ D({
869
884
  position: {
870
885
  type: String,
871
886
  default: "auto",
872
- validator: (t) => Qt.includes(t)
887
+ validator: (t) => tn.includes(t)
873
888
  },
874
889
  fixedPositioning: {
875
890
  type: Boolean,
@@ -887,15 +902,15 @@ const Mn = Vn.exports, zn = /* @__PURE__ */ D({
887
902
  type: String,
888
903
  default: null
889
904
  },
890
- ...ae()
905
+ ...ie()
891
906
  },
892
907
  emits: ["opened", "moved", "closed"],
893
908
  setup(t, { emit: e }) {
894
- const r = t, n = x(null), { items: a, options: o } = N(r), l = G(), i = x(null), { allOptions: u } = j(o), s = d(
909
+ const r = t, n = $(null), { items: a, options: o } = B(r), l = V(), i = $(null), { allOptions: u } = z(o), s = c(
895
910
  () => u.value.fixedPositioning ?? r.fixedPositioning
896
- ), c = d(
911
+ ), d = c(
897
912
  () => s.value ? "fixed" : "absolute"
898
- ), v = d(() => [
913
+ ), v = c(() => [
899
914
  {
900
915
  name: "computeStyles",
901
916
  options: {
@@ -908,20 +923,20 @@ const Mn = Vn.exports, zn = /* @__PURE__ */ D({
908
923
  options: { offset: [0, u.value.offset || 8] }
909
924
  },
910
925
  ...r.modifiers || []
911
- ]), p = d(
926
+ ]), f = c(
912
927
  () => u.value.showTitle !== !1 && r.title != null
913
- ), h = d(() => le(u.value.valueFormat)), _ = d(() => le(u.value.titleFormat)), m = d(
928
+ ), h = c(() => fe(u.value.valueFormat)), _ = c(() => fe(u.value.titleFormat)), m = c(
914
929
  () => {
915
- var k;
916
- return ((k = a.value) == null ? void 0 : k.find((g) => g.isSummary)) || {
930
+ var A;
931
+ return ((A = a.value) == null ? void 0 : A.find((y) => y.isSummary)) || {
917
932
  label: u.value.summary ?? r.summary
918
933
  };
919
934
  }
920
- ), A = d(() => l.summary || m.value.label);
921
- function f() {
922
- r.targetElement && n.value && (i.value = $t(r.targetElement, n.value, {
935
+ ), k = c(() => l.summary || m.value.label);
936
+ function p() {
937
+ r.targetElement && n.value && (i.value = wt(r.targetElement, n.value, {
923
938
  placement: r.position,
924
- strategy: c.value,
939
+ strategy: d.value,
925
940
  modifiers: v.value
926
941
  }), e("opened", r.targetElement));
927
942
  }
@@ -933,15 +948,15 @@ const Mn = Vn.exports, zn = /* @__PURE__ */ D({
933
948
  i.value.state.elements.reference = r.targetElement, i.value.update(), e("moved", r.targetElement);
934
949
  }() : T());
935
950
  }
936
- return C(
951
+ return D(
937
952
  () => r.targetElement,
938
- (k, g) => {
939
- !g && k ? f() : O();
953
+ (A, y) => {
954
+ !y && A ? p() : O();
940
955
  }
941
- ), M(f), Ke(T), { __sfc: !0, props: r, emit: e, root: n, items: a, options: o, slots: l, popper: i, allOptions: u, computedFixedPositioning: s, strategy: c, allModifiers: v, showTitle: p, formatValue: h, formatTitle: _, summaryItem: m, hasSummary: A, initPopper: f, destroyPopper: T, updatePopper: O, LumeTooltipTitle: Hn, LumeTooltipSummary: Pn, LumeTooltipItem: Mn };
956
+ ), U(p), et(T), { __sfc: !0, props: r, emit: e, root: n, items: a, options: o, slots: l, popper: i, allOptions: u, computedFixedPositioning: s, strategy: d, allModifiers: v, showTitle: f, formatValue: h, formatTitle: _, summaryItem: m, hasSummary: k, initPopper: p, destroyPopper: T, updatePopper: O, LumeTooltipTitle: Sn, LumeTooltipSummary: jn, LumeTooltipItem: Zn };
942
957
  }
943
958
  });
944
- var Wn = function() {
959
+ var Un = function() {
945
960
  var e = this, r = e._self._c, n = e._self._setupProxy;
946
961
  return r("div", { directives: [{ name: "show", rawName: "v-show", value: e.targetElement, expression: "targetElement" }], ref: "root", staticClass: "lume-tooltip lume-typography--caption", attrs: { "data-j-tooltip": "" } }, [e._t("default", function() {
947
962
  return [e._t("title", function() {
@@ -960,66 +975,66 @@ var Wn = function() {
960
975
  });
961
976
  })], 2)];
962
977
  })], 2);
963
- }, Zn = [], Xn = /* @__PURE__ */ I(
964
- zn,
965
- Wn,
966
- Zn,
978
+ }, Yn = [], Kn = /* @__PURE__ */ I(
979
+ Xn,
980
+ Un,
981
+ Yn,
967
982
  !1,
968
983
  null,
969
984
  "57f370fa",
970
985
  null,
971
986
  null
972
987
  );
973
- const Un = Xn.exports;
974
- var W = /* @__PURE__ */ ((t) => (t.Categorical = "categorical", t.Sequential = "sequential", t.Divergent = "divergent", t))(W || {});
975
- const Yn = W.Categorical, ce = P.Skyblue, Kn = $e.SkyTeal;
976
- function Jn(t) {
977
- return t === W.Divergent ? Kn : ce;
978
- }
979
- function Qn(t) {
980
- return Object.values(we).includes(t);
981
- }
982
- function Se(t, e) {
983
- return e === W.Divergent ? Object.values($e).includes(t) : Object.values({
984
- ...P,
985
- ...tt,
986
- ...nt,
987
- ...we
988
+ const Jn = Kn.exports;
989
+ var J = /* @__PURE__ */ ((t) => (t.Categorical = "categorical", t.Sequential = "sequential", t.Divergent = "divergent", t))(J || {});
990
+ const Qn = J.Categorical, se = M.Skyblue, qn = Ce.SkyTeal;
991
+ function er(t) {
992
+ return t === J.Divergent ? qn : se;
993
+ }
994
+ function tr(t) {
995
+ return Object.values(De).includes(t);
996
+ }
997
+ function Pe(t, e) {
998
+ return e === J.Divergent ? Object.values(Ce).includes(t) : Object.values({
999
+ ...M,
1000
+ ...ot,
1001
+ ...lt,
1002
+ ...De
988
1003
  }).includes(t);
989
1004
  }
990
- function qn(t, e) {
991
- const r = Object.values(P).indexOf(t);
992
- return Vt(Object.values(P), r > -1 ? r : 0)[e];
1005
+ function nr(t, e) {
1006
+ const r = Object.values(M).indexOf(t);
1007
+ return Zt(Object.values(M), r > -1 ? r : 0)[e];
993
1008
  }
994
- function er(t, e) {
1009
+ function rr(t, e) {
995
1010
  const r = 50 + e * 10;
996
1011
  return `${t}-${r}`;
997
1012
  }
998
- function tr(t, e) {
1013
+ function ar(t, e) {
999
1014
  const r = (e + 1) * 10;
1000
1015
  return `${t}-${r}`;
1001
1016
  }
1002
- function Be(t, e, r) {
1017
+ function Ge(t, e, r) {
1003
1018
  switch (e) {
1004
1019
  default:
1005
- case W.Categorical:
1006
- return Qn(t) ? t : qn(t, r);
1007
- case W.Sequential:
1008
- return er(t, r);
1009
- case W.Divergent:
1010
- return tr(t, r);
1020
+ case J.Categorical:
1021
+ return tr(t) ? t : nr(t, r);
1022
+ case J.Sequential:
1023
+ return rr(t, r);
1024
+ case J.Divergent:
1025
+ return ar(t, r);
1011
1026
  }
1012
1027
  }
1013
- function nr(t, e, r = Yn, n) {
1014
- return Se(t, r) ? t : (n > 4 && (Z(V.ColorLoop), n = n % 5), Se(e, r) ? Be(e, r, n) : Be(Jn(r), r, n));
1028
+ function or(t, e, r = Qn, n) {
1029
+ return Pe(t, r) ? t : (n > 4 && (Q(X.ColorLoop), n = n % 5), Pe(e, r) ? Ge(e, r, n) : Ge(er(r), r, n));
1015
1030
  }
1016
- function rr(t) {
1017
- return t.map((e) => Bt(e) ? e : { value: e });
1031
+ function lr(t) {
1032
+ return t.map((e) => Gt(e) ? e : { value: e });
1018
1033
  }
1019
- function ar(t) {
1034
+ function ur(t) {
1020
1035
  return t.__internal === !0;
1021
1036
  }
1022
- const Ee = (t = null) => ({
1037
+ const He = (t = null) => ({
1023
1038
  data: {
1024
1039
  type: Array,
1025
1040
  required: !0,
@@ -1031,28 +1046,28 @@ const Ee = (t = null) => ({
1031
1046
  },
1032
1047
  color: {
1033
1048
  type: String,
1034
- default: P.Skyblue
1049
+ default: M.Skyblue
1035
1050
  },
1036
1051
  title: {
1037
1052
  type: String,
1038
1053
  default: null
1039
1054
  }
1040
1055
  });
1041
- function De(t, e, r, n, a) {
1042
- const o = ie({
1056
+ function Se(t, e, r, n, a) {
1057
+ const o = me({
1043
1058
  width: 0,
1044
1059
  height: 0
1045
- }), l = Mt(12), i = d(() => {
1046
- var c;
1047
- return t.value.length > 5 && Z(V.DatasetLength), (c = t.value) == null ? void 0 : c.map(
1048
- (v, p) => {
1049
- if (ar(v))
1060
+ }), l = Ut(12), i = c(() => {
1061
+ var d;
1062
+ return t.value.length > 5 && Q(X.DatasetLength), (d = t.value) == null ? void 0 : d.map(
1063
+ (v, f) => {
1064
+ if (ur(v))
1050
1065
  return v;
1051
- const h = rr(v.values), _ = nr(
1066
+ const h = lr(v.values), _ = or(
1052
1067
  v.color,
1053
1068
  r == null ? void 0 : r.value,
1054
1069
  n == null ? void 0 : n.value.colorPalette,
1055
- p
1070
+ f
1056
1071
  );
1057
1072
  return {
1058
1073
  ...v,
@@ -1062,10 +1077,10 @@ function De(t, e, r, n, a) {
1062
1077
  };
1063
1078
  }
1064
1079
  );
1065
- }), u = d(() => Array.isArray(e.value) ? e.value : he(t.value).map((c, v) => v));
1066
- function s(c) {
1067
- const v = (a == null ? void 0 : a.value) === L.HORIZONTAL && he(t).length * (Ut * 2) || c.height;
1068
- o.width = c.width, o.height = v;
1080
+ }), u = c(() => Array.isArray(e.value) ? e.value : Le(t.value).map((d, v) => v));
1081
+ function s(d) {
1082
+ const v = (a == null ? void 0 : a.value) === L.HORIZONTAL && Le(t).length * (qt * 2) || d.height;
1083
+ o.width = d.width, o.height = v;
1069
1084
  }
1070
1085
  return {
1071
1086
  chartID: l,
@@ -1075,7 +1090,7 @@ function De(t, e, r, n, a) {
1075
1090
  updateSize: s
1076
1091
  };
1077
1092
  }
1078
- const or = () => ({
1093
+ const ir = () => ({
1079
1094
  xScale: {
1080
1095
  type: Function,
1081
1096
  default: null
@@ -1085,71 +1100,69 @@ const or = () => ({
1085
1100
  default: null
1086
1101
  }
1087
1102
  });
1088
- function lr(t, e, r, n, a) {
1089
- const o = x(null), l = x(null);
1103
+ function sr(t, e, r, n, a) {
1104
+ const o = $(null), l = $(null);
1090
1105
  function i() {
1091
- const { width: u, height: s } = r, c = a.value.padding || a.value.paddingOuter || 0;
1092
- !u && !s || !e.value || !t.value || (n.value === L.HORIZONTAL ? (o.value = Ge(
1106
+ const { width: u, height: s } = r;
1107
+ !u && !s || !e.value || !t.value || (n.value === L.HORIZONTAL ? (o.value = Ve(
1093
1108
  t.value,
1094
1109
  u,
1095
1110
  n.value,
1096
1111
  a.value.startOnZero
1097
- ), l.value = Pe({
1098
- domain: e.value,
1099
- size: s,
1100
- paddingOuter: c
1101
- })) : (o.value = Pe({
1102
- domain: e.value,
1103
- size: u,
1104
- paddingOuter: c
1105
- }), l.value = Ge(
1112
+ ), l.value = je(
1113
+ e.value,
1114
+ s,
1115
+ n.value,
1116
+ a.value
1117
+ )) : (o.value = je(
1118
+ e.value,
1119
+ u,
1120
+ n.value,
1121
+ a.value
1122
+ ), l.value = Ve(
1106
1123
  t.value,
1107
1124
  s,
1108
1125
  n.value,
1109
1126
  a.value.startOnZero
1110
1127
  )));
1111
1128
  }
1112
- return Je(i), { xScale: o, yScale: l };
1129
+ return tt(i), { xScale: o, yScale: l };
1113
1130
  }
1114
- function Pe({
1115
- domain: t,
1116
- size: e,
1117
- paddingOuter: r = 0
1118
- }) {
1119
- const n = [0, e];
1131
+ function je(t, e, r, n) {
1132
+ const a = [0, e], { padding: o, paddingInner: l, paddingOuter: i } = n, u = o ?? (r === L.HORIZONTAL ? st : it);
1120
1133
  return Object.assign(
1121
- te().range(n).paddingOuter(r).domain(t.map((a, o) => o)),
1134
+ le().range(a).paddingInner(l ?? u).paddingOuter(i ?? u).domain(t.map((s, d) => d)),
1122
1135
  { labels: t }
1123
1136
  );
1124
1137
  }
1125
- function Ge(t, e, r, n) {
1126
- const a = qe(t).filter((c) => c != null), o = [0, e];
1138
+ function Ve(t, e, r, n) {
1139
+ const a = rt(t).filter((d) => d != null), o = [0, e];
1127
1140
  if (a.length === 0)
1128
- return ne().range(o).domain([0, 0]).nice();
1141
+ return ue().range(o).domain([0, 0]).nice();
1129
1142
  const l = Math.min(...a), i = n && l > 0 ? 0 : l, u = Math.max(...a), s = r === L.HORIZONTAL ? [i, u] : [u, i];
1130
- return ne().range(o).domain(s).nice();
1143
+ return ue().range(o).domain(s).nice();
1131
1144
  }
1132
- function je(t) {
1145
+ function Me(t) {
1133
1146
  return (t == null ? void 0 : t.range) !== void 0 || (t == null ? void 0 : t.copy) !== void 0;
1134
1147
  }
1135
- function be(t, e) {
1136
- return U(t) ? t.bandwidth() / 2 + t(t.domain()[e]) : t(e);
1148
+ function $e(t, e) {
1149
+ return te(t) ? t.bandwidth() / 2 + t(t.domain()[e]) : t(e);
1137
1150
  }
1138
- function ue(t, e, {
1151
+ function ze(t, e, {
1139
1152
  padding: r,
1140
1153
  paddingInner: n,
1141
1154
  paddingOuter: a
1142
1155
  } = {}) {
1143
- const o = r ?? (e === L.HORIZONTAL ? Kt : Yt);
1156
+ const o = r ?? (e === L.HORIZONTAL ? st : it);
1144
1157
  return t.copy().paddingInner(n ?? o).paddingOuter(a ?? o / 2);
1145
1158
  }
1146
- function ut(t) {
1159
+ function _t(t) {
1147
1160
  return Object.values(L).includes(t);
1148
1161
  }
1149
- const q = (t, e = !0) => ({
1150
- ...Ee(t),
1151
- ...or(),
1152
- ...ae(),
1162
+ const ae = (t, e = !0) => ({
1163
+ ...He(t),
1164
+ ...ir(),
1165
+ ...ie(),
1153
1166
  classList: {
1154
1167
  type: [String, Array],
1155
1168
  default: () => []
@@ -1162,17 +1175,17 @@ const q = (t, e = !0) => ({
1162
1175
  orientation: {
1163
1176
  type: String,
1164
1177
  default: L.VERTICAL,
1165
- validator: ut
1178
+ validator: _t
1166
1179
  }
1167
1180
  } : {}
1168
- }), ur = (t) => ({
1169
- ...Ee(t),
1170
- ...ae(),
1181
+ }), cr = (t) => ({
1182
+ ...He(t),
1183
+ ...ie(),
1171
1184
  hoveredElement: {
1172
1185
  type: [Number, String],
1173
1186
  default: null
1174
1187
  }
1175
- }), de = () => ({
1188
+ }), ge = () => ({
1176
1189
  data: {
1177
1190
  type: Array,
1178
1191
  required: !0
@@ -1188,7 +1201,7 @@ const q = (t, e = !0) => ({
1188
1201
  orientation: {
1189
1202
  type: String,
1190
1203
  default: L.VERTICAL,
1191
- validator: ut
1204
+ validator: _t
1192
1205
  },
1193
1206
  xScale: {
1194
1207
  type: Function,
@@ -1214,10 +1227,10 @@ const q = (t, e = !0) => ({
1214
1227
  type: [String, Array],
1215
1228
  default: () => []
1216
1229
  }
1217
- }), ir = /* @__PURE__ */ D({
1230
+ }), dr = /* @__PURE__ */ C({
1218
1231
  __name: "lume-overlay-group",
1219
1232
  props: {
1220
- ...de(),
1233
+ ...ge(),
1221
1234
  orientation: {
1222
1235
  type: String,
1223
1236
  default: L.VERTICAL
@@ -1225,23 +1238,24 @@ const q = (t, e = !0) => ({
1225
1238
  },
1226
1239
  emits: ["click", "lume__internal--hover", "mouseover"],
1227
1240
  setup(t, { emit: e }) {
1228
- const r = t, { data: n, orientation: a, xScale: o, yScale: l } = N(r), i = d(() => he(n));
1241
+ const r = t, { data: n, orientation: a, xScale: o, yScale: l } = B(r), i = c(() => Le(n));
1229
1242
  function u(s) {
1230
- const c = a.value === L.HORIZONTAL ? l.value : o.value, v = c.domain(), p = xe(c), h = U(c) ? c(v[s]) : c(s) - p / 2;
1243
+ var k;
1244
+ const d = a.value === L.HORIZONTAL ? l.value : o.value, v = d.domain(), f = jt(d), h = ((k = d.paddingInner) == null ? void 0 : k.call(d)) ?? 0, _ = f * h, m = te(d) ? d(v[s]) - _ / 2 : d(s) - f / 2;
1231
1245
  return a.value === L.HORIZONTAL ? {
1232
1246
  width: Math.max(...o.value.range()),
1233
- height: p,
1234
- transform: `translate(0, ${h})`
1247
+ height: f,
1248
+ transform: `translate(0, ${m})`
1235
1249
  } : {
1236
- width: p,
1250
+ width: f,
1237
1251
  height: Math.max(...l.value.range()),
1238
- transform: `translate(${h}, 0)`
1252
+ transform: `translate(${m}, 0)`
1239
1253
  };
1240
1254
  }
1241
- return { __sfc: !0, props: r, emit: e, data: n, orientation: a, xScale: o, yScale: l, overlayData: i, getOverlayBarAttributes: u, LumeBar: Ie };
1255
+ return { __sfc: !0, props: r, emit: e, data: n, orientation: a, xScale: o, yScale: l, overlayData: i, getOverlayBarAttributes: u, LumeBar: Re };
1242
1256
  }
1243
1257
  });
1244
- var sr = function() {
1258
+ var vr = function() {
1245
1259
  var e = this, r = e._self._c, n = e._self._setupProxy;
1246
1260
  return r("g", { staticClass: "lume-overlay-group" }, e._l(n.overlayData, function(a, o) {
1247
1261
  return r(n.LumeBar, e._b({ key: `overlay-${o}`, attrs: { "data-j-lume-overlay-group": o, transition: !1, "class-list": "lume-fill--transparent" }, on: { mouseover: function(l) {
@@ -1250,74 +1264,74 @@ var sr = function() {
1250
1264
  return n.emit("click", { index: o, event: l });
1251
1265
  } } }, "lume-bar", n.getOverlayBarAttributes(o), !1));
1252
1266
  }), 1);
1253
- }, cr = [], dr = /* @__PURE__ */ I(
1254
- ir,
1255
- sr,
1256
- cr,
1267
+ }, _r = [], fr = /* @__PURE__ */ I(
1268
+ dr,
1269
+ vr,
1270
+ _r,
1257
1271
  !1,
1258
1272
  null,
1259
1273
  null,
1260
1274
  null,
1261
1275
  null
1262
1276
  );
1263
- const vr = dr.exports;
1264
- function _r(t) {
1265
- return { hasNegativeValues: d(
1266
- () => qe(t.value).some((r) => r < 0)
1277
+ const pr = fr.exports;
1278
+ function mr(t) {
1279
+ return { hasNegativeValues: c(
1280
+ () => rt(t.value).some((r) => r < 0)
1267
1281
  ) };
1268
1282
  }
1269
- function pr(t, e, r, n) {
1270
- const a = d(
1283
+ function hr(t, e, r, n) {
1284
+ const a = c(
1271
1285
  () => n.value === L.HORIZONTAL
1272
- ), o = d(
1286
+ ), o = c(
1273
1287
  () => {
1274
1288
  var s;
1275
1289
  return t.height - (a != null && a.value ? 0 : ((s = r.value) == null ? void 0 : s.call(r, 0)) || 0);
1276
1290
  }
1277
- ), l = d(
1291
+ ), l = c(
1278
1292
  () => {
1279
1293
  var s;
1280
1294
  return a != null && a.value ? ((s = e.value) == null ? void 0 : s.call(e, 0)) || 0 : t.width;
1281
1295
  }
1282
- ), i = d(
1296
+ ), i = c(
1283
1297
  () => {
1284
1298
  var s;
1285
1299
  return a != null && a.value ? "translate(0, 0)" : `translate(0, ${((s = r.value) == null ? void 0 : s.call(r, 0)) || 0})`;
1286
1300
  }
1287
1301
  );
1288
- return { negativeBarAttributes: d(() => ({
1302
+ return { negativeBarAttributes: c(() => ({
1289
1303
  width: l.value,
1290
1304
  height: o.value,
1291
1305
  transform: i.value
1292
1306
  })) };
1293
1307
  }
1294
- function fr(t) {
1308
+ function gr(t) {
1295
1309
  return t.reduce((e, r) => r.values.map((n, a) => e[a] ? n.value > e[a] ? n.value : e[a] : n.value ?? 0), []);
1296
1310
  }
1297
- function mr(t) {
1311
+ function yr(t) {
1298
1312
  return t.reduce((e, r) => r.values.map((n, a) => {
1299
1313
  const o = n.value == null || n.value < 0 ? 0 : n.value;
1300
1314
  return e[a] ? e[a] + o : o;
1301
1315
  }), []);
1302
1316
  }
1303
- const Fe = {
1304
- "stacked-bar": mr
1317
+ const We = {
1318
+ "stacked-bar": yr
1305
1319
  };
1306
- function it(t, e, r, n, a, o, l) {
1307
- const i = d(
1320
+ function ft(t, e, r, n, a, o, l) {
1321
+ const i = c(
1308
1322
  () => {
1309
1323
  var s;
1310
1324
  return e.value.withTooltip !== !1 && !((s = e.value.tooltipOptions) != null && s.targetElement);
1311
1325
  }
1312
1326
  );
1313
1327
  function u(s) {
1314
- const c = l != null && l.value && Fe[l.value] ? Fe[l.value](s) : fr(s);
1315
- t.value = c.map((v, p) => ({
1316
- cx: (a == null ? void 0 : a.value) === L.HORIZONTAL ? r.value(v) : be(r.value, p),
1317
- cy: (a == null ? void 0 : a.value) === L.HORIZONTAL ? be(n.value, p) : n.value(v)
1328
+ const d = l != null && l.value && We[l.value] ? We[l.value](s) : gr(s);
1329
+ t.value = d.map((v, f) => ({
1330
+ cx: (a == null ? void 0 : a.value) === L.HORIZONTAL ? r.value(v) : $e(r.value, f),
1331
+ cy: (a == null ? void 0 : a.value) === L.HORIZONTAL ? $e(n.value, f) : n.value(v)
1318
1332
  }));
1319
1333
  }
1320
- return C(
1334
+ return D(
1321
1335
  [r, n],
1322
1336
  () => {
1323
1337
  r.value && n.value && (o != null && o.value) && i.value && u(o.value);
@@ -1325,8 +1339,8 @@ function it(t, e, r, n, a, o, l) {
1325
1339
  { immediate: !0 }
1326
1340
  ), { shouldGenerateTooltipAnchors: i, updateTooltipAnchorAttributes: u };
1327
1341
  }
1328
- function hr() {
1329
- const t = ie({
1342
+ function br() {
1343
+ const t = me({
1330
1344
  opened: !1,
1331
1345
  targetElement: null
1332
1346
  });
@@ -1336,125 +1350,125 @@ function hr() {
1336
1350
  t.opened = !1, t.targetElement = null;
1337
1351
  } };
1338
1352
  }
1339
- function gr(t) {
1340
- return { getTooltipItems: d(
1353
+ function kr(t) {
1354
+ return { getTooltipItems: c(
1341
1355
  () => (r) => t.value.map(({ color: n, label: a, values: o }) => {
1342
1356
  var l, i, u;
1343
1357
  return {
1344
1358
  color: ((l = o[r]) == null ? void 0 : l.color) || n,
1345
1359
  label: a,
1346
- value: ((i = o[r]) == null ? void 0 : i.label) ?? ((u = o[r]) == null ? void 0 : u.value) ?? rt
1360
+ value: ((i = o[r]) == null ? void 0 : i.label) ?? ((u = o[r]) == null ? void 0 : u.value) ?? ut
1347
1361
  };
1348
1362
  })
1349
1363
  ) };
1350
1364
  }
1351
- const yr = /* @__PURE__ */ D({
1365
+ const Ar = /* @__PURE__ */ C({
1352
1366
  __name: "lume-chart",
1353
1367
  props: {
1354
- ...q(),
1368
+ ...ae(),
1355
1369
  chartType: {
1356
1370
  type: String,
1357
1371
  default: null
1358
1372
  }
1359
1373
  },
1360
1374
  setup(t, { emit: e }) {
1361
- const r = t, n = G(), { data: a, labels: o, color: l, options: i, orientation: u, chartType: s } = N(r), c = x(-1), v = x(null), p = x(null), h = x([]), { allOptions: _ } = j(i), { internalData: m, computedLabels: A, containerSize: f, updateSize: T, chartID: O } = De(a, o, l, _, u), { xScale: k, yScale: g } = lr(
1375
+ const r = t, n = V(), { data: a, labels: o, color: l, options: i, orientation: u, chartType: s } = B(r), d = $(-1), v = $(null), f = $(null), h = $([]), { allOptions: _ } = z(i), { internalData: m, computedLabels: k, containerSize: p, updateSize: T, chartID: O } = Se(a, o, l, _, u), { xScale: A, yScale: y } = sr(
1362
1376
  m,
1363
- A,
1364
- f,
1377
+ k,
1378
+ p,
1365
1379
  u,
1366
1380
  _
1367
- ), $ = d(() => {
1368
- var y;
1369
- return r.xScale ? je(r.xScale) ? r.xScale : (y = r.xScale) == null ? void 0 : y.call(r, m.value, o.value, f) : k.value;
1370
- }), b = d(() => {
1371
- var y;
1372
- return r.yScale ? je(r.yScale) ? r.yScale : (y = r.yScale) == null ? void 0 : y.call(r, m.value, o.value, f) : g.value;
1373
- }), w = d(() => ({
1381
+ ), E = c(() => {
1382
+ var b;
1383
+ return r.xScale ? Me(r.xScale) ? r.xScale : (b = r.xScale) == null ? void 0 : b.call(r, m.value, o.value, p) : A.value;
1384
+ }), R = c(() => {
1385
+ var b;
1386
+ return r.yScale ? Me(r.yScale) ? r.yScale : (b = r.yScale) == null ? void 0 : b.call(r, m.value, o.value, p) : y.value;
1387
+ }), F = c(() => ({
1374
1388
  ..._.value.xAxisOptions,
1375
1389
  withHover: u.value === L.VERTICAL
1376
- })), S = d(() => ({
1390
+ })), G = c(() => ({
1377
1391
  ..._.value.yAxisOptions,
1378
1392
  withHover: u.value === L.HORIZONTAL
1379
- })), F = d(() => {
1380
- var y;
1381
- return (y = _.value.xAxisOptions) == null ? void 0 : y.title;
1382
- }), K = d(() => {
1383
- var y;
1384
- return (y = _.value.yAxisOptions) == null ? void 0 : y.title;
1385
- }), E = d(() => {
1386
- var y;
1387
- return ((y = _.value.xAxisOptions) == null ? void 0 : y.withTitle) !== !1 && F.value;
1388
- }), H = d(() => {
1389
- var y;
1390
- return ((y = _.value.yAxisOptions) == null ? void 0 : y.withTitle) !== !1 && K.value;
1391
- }), R = d(
1392
- () => a.value.every((y) => !y.values.length)
1393
- ), J = d(() => {
1394
- const y = [], { noBaseScales: B } = _.value;
1395
- return B || y.push(() => !!($.value && b.value)), y.every((z) => z() === !0);
1396
- }), { hasNegativeValues: pt } = _r(m), { negativeBarAttributes: ft } = pr(
1397
- f,
1398
- $,
1399
- b,
1393
+ })), j = c(() => {
1394
+ var b;
1395
+ return (b = _.value.xAxisOptions) == null ? void 0 : b.title;
1396
+ }), W = c(() => {
1397
+ var b;
1398
+ return (b = _.value.yAxisOptions) == null ? void 0 : b.title;
1399
+ }), w = c(() => {
1400
+ var b;
1401
+ return ((b = _.value.xAxisOptions) == null ? void 0 : b.withTitle) !== !1 && j.value;
1402
+ }), N = c(() => {
1403
+ var b;
1404
+ return ((b = _.value.yAxisOptions) == null ? void 0 : b.withTitle) !== !1 && W.value;
1405
+ }), H = c(
1406
+ () => a.value.every((b) => !b.values.length)
1407
+ ), g = c(() => {
1408
+ const b = [], { noBaseScales: P } = _.value;
1409
+ return P || b.push(() => !!(E.value && R.value)), b.every((K) => K() === !0);
1410
+ }), { hasNegativeValues: x } = mr(m), { negativeBarAttributes: S } = hr(
1411
+ p,
1412
+ E,
1413
+ R,
1400
1414
  u
1401
- ), { shouldGenerateTooltipAnchors: mt } = it(
1415
+ ), { shouldGenerateTooltipAnchors: ce } = ft(
1402
1416
  h,
1403
1417
  _,
1404
- $,
1405
- b,
1418
+ E,
1419
+ R,
1406
1420
  u,
1407
1421
  m,
1408
1422
  s
1409
- ), { tooltipConfig: He, showTooltip: Ne, hideTooltip: Re } = hr(), { getTooltipItems: ht } = gr(m), gt = d(
1410
- () => _.value.withTooltip !== !1 && He.opened
1411
- ), yt = d(
1423
+ ), { tooltipConfig: Y, showTooltip: Z, hideTooltip: de } = br(), { getTooltipItems: Fe } = kr(m), ve = c(
1424
+ () => _.value.withTooltip !== !1 && Y.opened
1425
+ ), bt = c(
1412
1426
  () => {
1413
- var y;
1414
- return ((y = _.value.tooltipOptions) == null ? void 0 : y.position) || "top";
1427
+ var b;
1428
+ return ((b = _.value.tooltipOptions) == null ? void 0 : b.position) || "top";
1415
1429
  }
1416
1430
  );
1417
- function ve(y) {
1418
- var B;
1419
- if (y !== c.value && (_.value.withHover !== !1 && (c.value = y), _.value.withTooltip !== !1)) {
1420
- const z = (B = _.value.tooltipOptions) != null && B.targetElement ? _.value.tooltipOptions.targetElement === "self" ? p.value.$el : _.value.tooltipOptions.targetElement : v.value[y];
1421
- Ne(z);
1431
+ function ye(b) {
1432
+ var P;
1433
+ if (b !== d.value && (_.value.withHover !== !1 && (d.value = b), _.value.withTooltip !== !1)) {
1434
+ const K = (P = _.value.tooltipOptions) != null && P.targetElement ? _.value.tooltipOptions.targetElement === "self" ? f.value.$el : _.value.tooltipOptions.targetElement : v.value[b];
1435
+ Z(K);
1422
1436
  }
1423
1437
  }
1424
- function _e(y) {
1425
- if (y > a.value[0].values.length - 1) {
1426
- Z(V.InvalidHoveredIndex);
1438
+ function be(b) {
1439
+ if (b > a.value[0].values.length - 1) {
1440
+ Q(X.InvalidHoveredIndex);
1427
1441
  return;
1428
1442
  }
1429
- ve(y);
1443
+ ye(b);
1430
1444
  }
1431
- function bt() {
1432
- Re(), c.value = -1, e("chart-mouseleave");
1445
+ function kt() {
1446
+ de(), d.value = -1, e("chart-mouseleave");
1433
1447
  }
1434
- function kt({ index: y, value: B, event: z }) {
1435
- y !== null && ve(y), e("axis-mouseenter", { index: y, value: B, event: z });
1448
+ function At({ index: b, value: P, event: K }) {
1449
+ b !== null && ye(b), e("axis-mouseenter", { index: b, value: P, event: K });
1436
1450
  }
1437
- function At({ index: y, value: B, event: z }) {
1438
- e("axis-click", { index: y, value: B, event: z });
1451
+ function Tt({ index: b, value: P, event: K }) {
1452
+ e("axis-click", { index: b, value: P, event: K });
1439
1453
  }
1440
- return C(
1454
+ return D(
1441
1455
  a,
1442
- (y, B) => e("data-changed", { newValue: y, oldValue: B })
1443
- ), C(
1456
+ (b, P) => e("data-changed", { newValue: b, oldValue: P })
1457
+ ), D(
1444
1458
  o,
1445
- (y, B) => e("labels-changed", { newValue: y, oldValue: B })
1446
- ), C(R, (y) => y && Z(V.Empty), { immediate: !0 }), C(() => r.hoveredIndex, _e), C(
1459
+ (b, P) => e("labels-changed", { newValue: b, oldValue: P })
1460
+ ), D(H, (b) => b && Q(X.Empty), { immediate: !0 }), D(() => r.hoveredIndex, be), D(
1447
1461
  h,
1448
- (y) => {
1449
- y && r.hoveredIndex != null && c.value === -1 && _e(r.hoveredIndex);
1462
+ (b) => {
1463
+ b && r.hoveredIndex != null && d.value === -1 && be(r.hoveredIndex);
1450
1464
  },
1451
1465
  { flush: "post" }
1452
- ), M(() => {
1466
+ ), U(() => {
1453
1467
  e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.');
1454
- }), pe("chartID", O), pe("isEmpty", R), pe("tooltipAnchorAttributes", h), { __sfc: !0, props: r, slots: n, emit: e, data: a, labels: o, color: l, options: i, orientation: u, chartType: s, internalHoveredIndex: c, tooltipAnchor: v, chartContainer: p, tooltipAnchorAttributes: h, allOptions: _, internalData: m, computedLabels: A, containerSize: f, updateSize: T, chartID: O, xScale: k, yScale: g, computedXScale: $, computedYScale: b, computedXAxisOptions: w, computedYAxisOptions: S, xAxisTitle: F, yAxisTitle: K, showXAxisTitle: E, showYAxisTitle: H, isEmpty: R, isReady: J, hasNegativeValues: pt, negativeBarAttributes: ft, shouldGenerateTooltipAnchors: mt, tooltipConfig: He, showTooltip: Ne, hideTooltip: Re, getTooltipItems: ht, isTooltipOpened: gt, tooltipPosition: yt, handleInternalHover: ve, handleExternalHover: _e, handleMouseleave: bt, handleAxisMouseenter: kt, handleAxisClick: At, LumeAxis: dn, LumeBar: Ie, LumeChartContainer: Tn, LumeChartLegend: wn, LumeTooltip: Un, LumeOverlayGroup: vr, TOOLTIP_ANCHOR_RADIUS: Jt };
1468
+ }), ke("chartID", O), ke("isEmpty", H), ke("tooltipAnchorAttributes", h), { __sfc: !0, props: r, slots: n, emit: e, data: a, labels: o, color: l, options: i, orientation: u, chartType: s, internalHoveredIndex: d, tooltipAnchor: v, chartContainer: f, tooltipAnchorAttributes: h, allOptions: _, internalData: m, computedLabels: k, containerSize: p, updateSize: T, chartID: O, xScale: A, yScale: y, computedXScale: E, computedYScale: R, computedXAxisOptions: F, computedYAxisOptions: G, xAxisTitle: j, yAxisTitle: W, showXAxisTitle: w, showYAxisTitle: N, isEmpty: H, isReady: g, hasNegativeValues: x, negativeBarAttributes: S, shouldGenerateTooltipAnchors: ce, tooltipConfig: Y, showTooltip: Z, hideTooltip: de, getTooltipItems: Fe, isTooltipOpened: ve, tooltipPosition: bt, handleInternalHover: ye, handleExternalHover: be, handleMouseleave: kt, handleAxisMouseenter: At, handleAxisClick: Tt, LumeAxis: fn, LumeBar: Re, LumeChartContainer: xn, LumeChartLegend: Nn, LumeTooltip: Jn, LumeOverlayGroup: pr, TOOLTIP_ANCHOR_RADIUS: en };
1455
1469
  }
1456
1470
  });
1457
- var br = function() {
1471
+ var Tr = function() {
1458
1472
  var e = this, r = e._self._c, n = e._self._setupProxy;
1459
1473
  return r(n.LumeChartContainer, { ref: "chartContainer", attrs: { id: `lume-chart_${n.chartID}`, margins: n.allOptions.margins, "container-size": n.containerSize, "no-min-size": n.allOptions.noMinSize, "transparent-background": n.allOptions.transparentBackground, "data-j-lume-chart": "" }, on: { resize: n.updateSize, click: function(a) {
1460
1474
  return n.emit("chart-click", a);
@@ -1503,18 +1517,48 @@ var br = function() {
1503
1517
  }, { xScale: n.computedXScale, yScale: n.computedYScale, containerSize: n.containerSize, options: n.allOptions, hoveredIndex: n.internalHoveredIndex }) : e._e(), n.allOptions.withHover !== !1 ? r(n.LumeOverlayGroup, { attrs: { data: n.internalData, orientation: n.orientation, "x-scale": n.computedXScale, "y-scale": n.computedYScale, "data-j-lume-chart__overlay-group": "" }, on: { "lume__internal--hover": n.handleInternalHover } }) : e._e(), n.shouldGenerateTooltipAnchors ? r("g", e._l(n.tooltipAnchorAttributes, function(a, o) {
1504
1518
  return r("circle", e._b({ key: `anchor_${o}`, ref: "tooltipAnchor", refInFor: !0, staticClass: "lume-fill--transparent", attrs: { r: n.TOOLTIP_ANCHOR_RADIUS } }, "circle", a, !1));
1505
1519
  }), 0) : e._e(), e._t("groups", null, { data: n.internalData, labels: n.computedLabels, options: n.allOptions, orientation: n.orientation, xScale: n.computedXScale, yScale: n.computedYScale, hoveredIndex: n.internalHoveredIndex, containerSize: n.containerSize, transition: n.allOptions.withTransition !== !1, classList: e.classList })] : e._e()], 2);
1506
- }, kr = [], Ar = /* @__PURE__ */ I(
1507
- yr,
1508
- br,
1509
- kr,
1520
+ }, Lr = [], Or = /* @__PURE__ */ I(
1521
+ Ar,
1522
+ Tr,
1523
+ Lr,
1510
1524
  !1,
1511
1525
  null,
1512
1526
  "19d7190c",
1513
1527
  null,
1514
1528
  null
1515
1529
  );
1516
- const ee = Ar.exports;
1517
- function Ve(t, e) {
1530
+ const oe = Or.exports;
1531
+ const xr = {};
1532
+ var $r = function() {
1533
+ var e = this, r = e._self._c;
1534
+ return r("tspan", { staticClass: "lume-alluvial-group__node-label" }, [e._t("default")], 2);
1535
+ }, Ir = [], wr = /* @__PURE__ */ I(
1536
+ xr,
1537
+ $r,
1538
+ Ir,
1539
+ !1,
1540
+ null,
1541
+ "52386c1d",
1542
+ null,
1543
+ null
1544
+ );
1545
+ const Er = wr.exports;
1546
+ const Nr = {};
1547
+ var Cr = function() {
1548
+ var e = this, r = e._self._c;
1549
+ return r("tspan", { staticClass: "lume-alluvial-group__node-value", attrs: { x: "0", dy: "1.2em" } }, [e._t("default")], 2);
1550
+ }, Dr = [], Rr = /* @__PURE__ */ I(
1551
+ Nr,
1552
+ Cr,
1553
+ Dr,
1554
+ !1,
1555
+ null,
1556
+ "6def3380",
1557
+ null,
1558
+ null
1559
+ );
1560
+ const Hr = Rr.exports;
1561
+ function Ze(t, e) {
1518
1562
  return {
1519
1563
  x0: 0 + (e ? e.left : 0),
1520
1564
  y0: 0 + (e ? e.top : 0),
@@ -1522,35 +1566,35 @@ function Ve(t, e) {
1522
1566
  y1: t.height - (e ? e.bottom : 0)
1523
1567
  };
1524
1568
  }
1525
- function Tr(t) {
1526
- const e = x(Ve(t));
1569
+ function Sr(t) {
1570
+ const e = $(Ze(t));
1527
1571
  function r(n) {
1528
- e.value = Ve(t, n);
1572
+ e.value = Ze(t, n);
1529
1573
  }
1530
1574
  return { extents: e, updateExtents: r };
1531
1575
  }
1532
- var st = /* @__PURE__ */ ((t) => (t.GraphProblem = "There was an issue generating your alluvial graph.", t))(st || {});
1533
- const Or = "[lume] ";
1534
- function Lr(t, e, r = !0) {
1535
- r && Qe() || console.error(Or + "Error: " + t, e);
1576
+ var pt = /* @__PURE__ */ ((t) => (t.GraphProblem = "There was an issue generating your alluvial graph.", t))(pt || {});
1577
+ const Br = "[lume] ";
1578
+ function Fr(t, e, r = !0) {
1579
+ r && nt() || console.error(Br + "Error: " + t, e);
1536
1580
  }
1537
- const Me = 8, xr = 8, $r = 20, wr = 200;
1538
- function Q(t) {
1581
+ const Xe = 8, Pr = 8, Gr = 20, jr = 200;
1582
+ function re(t) {
1539
1583
  return typeof t == "string" || typeof t == "number" ? t : t.id ?? t.label;
1540
1584
  }
1541
- function re(t) {
1585
+ function ee(t) {
1542
1586
  return t.source.id + ":" + t.target.id;
1543
1587
  }
1544
- function Ir(t, e) {
1588
+ function Vr(t, e) {
1545
1589
  return e.nodes.find((r) => r.id === t);
1546
1590
  }
1547
- function Er(t, e) {
1548
- return e.links.find((r) => re(r) === t);
1591
+ function Mr(t, e) {
1592
+ return e.links.find((r) => ee(r) === t);
1549
1593
  }
1550
- function ct(t) {
1594
+ function mt(t) {
1551
1595
  return !!(t.sourceLinks && t.targetLinks);
1552
1596
  }
1553
- function Dr(t, e) {
1597
+ function zr(t, e) {
1554
1598
  if (!e)
1555
1599
  return;
1556
1600
  const r = t.nodes.filter((l) => l.targetLinks.length === 0).map((l) => `${l.id}`), n = t.nodes.filter((l) => l.sourceLinks.length === 0).map((l) => `${l.id}`), a = e.filter((l) => r.includes(l.dataset.id)).reduce(
@@ -1567,33 +1611,41 @@ function Dr(t, e) {
1567
1611
  bottom: 0
1568
1612
  };
1569
1613
  }
1570
- function Cr(t) {
1614
+ function Wr(t) {
1571
1615
  return t.map((e) => ({
1572
1616
  x: e.x0,
1573
1617
  y: e.y0,
1574
1618
  width: e.x1 - e.x0,
1575
1619
  height: e.y1 - e.y0,
1576
1620
  textTransform: {
1577
- x: e.depth > 0 ? e.x1 + Me : e.x0 - Me,
1621
+ x: e.depth > 0 ? e.x1 + Xe : e.x0 - Xe,
1578
1622
  y: (e.y1 + e.y0) / 2
1579
1623
  },
1580
1624
  node: e
1581
1625
  }));
1582
1626
  }
1583
- function Hr(t) {
1584
- const e = wt();
1585
- return t.map((r) => {
1586
- var n;
1627
+ function Zr(t) {
1628
+ return [t.source.x1, t.y0];
1629
+ }
1630
+ function Xr(t) {
1631
+ return [t.target.x0, t.y1];
1632
+ }
1633
+ function Ur(t) {
1634
+ return t.curveFunction ? xt(t.curveFunction).source(Zr).target(Xr) : Et();
1635
+ }
1636
+ function Yr(t) {
1637
+ return t.map((e) => {
1638
+ var r;
1587
1639
  return {
1588
- id: re(r),
1589
- color: r.color || ((n = r.source) == null ? void 0 : n.color) || ce,
1590
- d: e(r),
1591
- strokeWidth: Math.max(1, r.width),
1592
- link: r
1640
+ id: ee(e),
1641
+ color: e.color || ((r = e.source) == null ? void 0 : r.color) || se,
1642
+ d: Ur(e)(e),
1643
+ strokeWidth: Math.max(1, e.width),
1644
+ link: e
1593
1645
  };
1594
1646
  });
1595
1647
  }
1596
- function ze(t, e, r, n, a) {
1648
+ function Ue(t, e, r, n, a) {
1597
1649
  if (n === !1) {
1598
1650
  t.node = {
1599
1651
  ...t.node,
@@ -1601,8 +1653,8 @@ function ze(t, e, r, n, a) {
1601
1653
  };
1602
1654
  return;
1603
1655
  }
1604
- const o = Date.now(), l = Ft(e, r), i = () => {
1605
- let s = (Date.now() - o) / wr;
1656
+ const o = Date.now(), l = Wt(e, r), i = () => {
1657
+ let s = (Date.now() - o) / jr;
1606
1658
  s > 1 && (s = 1), t.node = {
1607
1659
  ...t.node,
1608
1660
  transitionValue: a && s === 1 ? void 0 : l(s)
@@ -1610,99 +1662,106 @@ function ze(t, e, r, n, a) {
1610
1662
  };
1611
1663
  requestAnimationFrame(i);
1612
1664
  }
1613
- const Nr = {
1665
+ const Kr = {
1614
1666
  nodes: [],
1615
1667
  links: []
1616
1668
  };
1617
- function Rr(t, e, r) {
1618
- const n = x(null), a = d(() => {
1669
+ function Jr(t, e, r) {
1670
+ const n = $(null), a = c(() => {
1619
1671
  var i;
1620
- return (i = t.value) == null ? void 0 : i[0].values.map(({ label: u, color: s, value: c }) => ({
1621
- label: u || c.toString(),
1622
- color: s,
1623
- id: c
1624
- }));
1625
- }), o = d(() => {
1672
+ return (i = t.value) == null ? void 0 : i[0].values.map(
1673
+ ({ label: u, color: s, value: d, deriveColorFromIncomingLinks: v }) => ({
1674
+ label: u || d.toString(),
1675
+ color: s,
1676
+ fallbackColor: s || se,
1677
+ id: d,
1678
+ deriveColorFromIncomingLinks: v
1679
+ })
1680
+ );
1681
+ }), o = c(() => {
1626
1682
  var i;
1627
1683
  return (i = t.value) == null ? void 0 : i[0].values.map(
1628
1684
  (u) => {
1629
1685
  var s;
1630
- return (s = u.targets) == null ? void 0 : s.map(({ node: c, value: v, color: p }) => ({
1631
- color: p,
1632
- source: u.value ?? u.label,
1633
- target: c,
1634
- value: v
1635
- }));
1686
+ return (s = u.targets) == null ? void 0 : s.map(
1687
+ ({ node: d, value: v, color: f, curveFunction: h }) => ({
1688
+ color: f,
1689
+ curveFunction: h,
1690
+ source: u.value ?? u.label,
1691
+ target: d,
1692
+ value: v
1693
+ })
1694
+ );
1636
1695
  }
1637
1696
  ).filter(Boolean).flat();
1638
- }), l = d(() => It().nodeId(Q).nodeAlign(e.value.nodeAlign).nodePadding(e.value.nodePadding).nodeSort(e.value.nodeSort).nodeWidth(e.value.nodeWidth).linkSort(e.value.linkSort));
1639
- return C([l, r], () => {
1697
+ }), l = c(() => Nt().nodeId(re).nodeAlign(e.value.nodeAlign).nodePadding(e.value.nodePadding).nodeSort(e.value.nodeSort).nodeWidth(e.value.nodeWidth).linkSort(e.value.linkSort));
1698
+ return D([l, r], () => {
1640
1699
  try {
1641
- const { x0: i, y0: u, x1: s, y1: c } = r.value;
1700
+ const { x0: i, y0: u, x1: s, y1: d } = r.value;
1642
1701
  n.value = l.value.extent([
1643
1702
  [i, u],
1644
- [s, c]
1703
+ [s, d]
1645
1704
  ])({ nodes: a.value, links: o.value });
1646
1705
  } catch (i) {
1647
- Lr(st.GraphProblem, i), n.value = Nr;
1706
+ Fr(pt.GraphProblem, i), n.value = Kr;
1648
1707
  }
1649
1708
  }), { graph: n };
1650
1709
  }
1651
- function ke(t, e) {
1710
+ function Ie(t, e) {
1652
1711
  return e || (e = {}), t.targetLinks && t.targetLinks.forEach(({ source: r, value: n }) => {
1653
- e[r.id] = n, ke(r, e);
1712
+ e[r.id] = n, Ie(r, e);
1654
1713
  }), e;
1655
1714
  }
1656
- function Ae(t, e) {
1715
+ function we(t, e) {
1657
1716
  return e || (e = {}), t.sourceLinks && t.sourceLinks.forEach(({ target: r, value: n }) => {
1658
- e[r.id] = n, Ae(r, e);
1717
+ e[r.id] = n, we(r, e);
1659
1718
  }), e;
1660
1719
  }
1661
- function Sr(t, e) {
1662
- return e.links.reduce((r, n) => (n.source.id in t && n.target.id in t && r.push(re(n)), r), []);
1720
+ function Qr(t, e) {
1721
+ return e.links.reduce((r, n) => (n.source.id in t && n.target.id in t && r.push(ee(n)), r), []);
1663
1722
  }
1664
- const Br = (t, e) => {
1723
+ const qr = (t, e) => {
1665
1724
  let r;
1666
- ct(t) ? r = {
1725
+ mt(t) ? r = {
1667
1726
  [t.id]: t.value,
1668
- ...ke(t),
1669
- ...Ae(t)
1727
+ ...Ie(t),
1728
+ ...we(t)
1670
1729
  } : r = {
1671
1730
  [t.source.id]: t.source.value,
1672
1731
  [t.target.id]: t.target.value,
1673
- ...ke(t.source),
1674
- ...Ae(t.target)
1732
+ ...Ie(t.source),
1733
+ ...we(t.target)
1675
1734
  };
1676
- const n = Sr(r, e);
1735
+ const n = Qr(r, e);
1677
1736
  return { nodes: r, links: n };
1678
- }, Pr = (t) => {
1679
- if (ct(t)) {
1737
+ }, ea = (t) => {
1738
+ if (mt(t)) {
1680
1739
  const e = [...t.sourceLinks, ...t.targetLinks];
1681
1740
  return {
1682
1741
  nodes: e.reduce(
1683
- (r, { source: n, target: a, value: o }) => n === t ? { ...r, [Q(a)]: o } : { ...r, [Q(n)]: o },
1684
- { [Q(t)]: t.value }
1742
+ (r, { source: n, target: a, value: o }) => n === t ? { ...r, [re(a)]: o } : { ...r, [re(n)]: o },
1743
+ { [re(t)]: t.value }
1685
1744
  ),
1686
- links: e.map((r) => re(r))
1745
+ links: e.map((r) => ee(r))
1687
1746
  };
1688
1747
  }
1689
1748
  return {
1690
1749
  nodes: {
1691
- [Q(t.target)]: t.value,
1692
- [Q(t.source)]: t.source.value
1750
+ [re(t.target)]: t.value,
1751
+ [re(t.source)]: t.source.value
1693
1752
  },
1694
- links: [re(t)]
1753
+ links: [ee(t)]
1695
1754
  };
1696
1755
  };
1697
- function Gr(t, e, r) {
1698
- const n = x(null), a = d(() => n.value ? typeof e.value.highlightedElements == "function" ? e.value.highlightedElements(
1756
+ function ta(t, e, r) {
1757
+ const n = $(null), a = c(() => n.value ? typeof e.value.highlightedElements == "function" ? e.value.highlightedElements(
1699
1758
  n.value,
1700
1759
  r.value
1701
- ) : e.value.highlightedElements === "closest" ? Pr(n.value, r.value) : Br(n.value, r.value) : { nodes: {}, links: [] });
1702
- return C(a, (o, l) => {
1760
+ ) : e.value.highlightedElements === "closest" ? ea(n.value, r.value) : qr(n.value, r.value) : { nodes: {}, links: [] });
1761
+ return D(a, (o, l) => {
1703
1762
  if (o.links.length === 0 && Object.keys(o.nodes).length === 0) {
1704
1763
  t.value.forEach((i) => {
1705
- i.node.id in l.nodes && ze(
1764
+ i.node.id in l.nodes && Ue(
1706
1765
  i,
1707
1766
  l.nodes[i.node.id],
1708
1767
  i.node.value,
@@ -1713,7 +1772,7 @@ function Gr(t, e, r) {
1713
1772
  return;
1714
1773
  }
1715
1774
  t.value.forEach((i) => {
1716
- i.node.id in o.nodes && ze(
1775
+ i.node.id in o.nodes && Ue(
1717
1776
  i,
1718
1777
  i.node.value,
1719
1778
  o.nodes[i.node.id],
@@ -1722,10 +1781,10 @@ function Gr(t, e, r) {
1722
1781
  });
1723
1782
  }), { highlightedElements: a, hoveredElement: n };
1724
1783
  }
1725
- const jr = /* @__PURE__ */ D({
1784
+ const na = /* @__PURE__ */ C({
1726
1785
  __name: "lume-alluvial-group",
1727
1786
  props: {
1728
- ...de(),
1787
+ ...ge(),
1729
1788
  hoveredElementId: {
1730
1789
  type: [Number, String],
1731
1790
  default: null
@@ -1733,67 +1792,114 @@ const jr = /* @__PURE__ */ D({
1733
1792
  },
1734
1793
  emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
1735
1794
  setup(t, { emit: e }) {
1736
- const r = t, { data: n, options: a } = N(r), o = x([]), l = x([]), i = x(null), { extents: u, updateExtents: s } = Tr(r.containerSize), { graph: c } = Rr(n, a, u), { hoveredElement: v, highlightedElements: p } = Gr(
1795
+ const r = t, n = pe("chartID"), { data: a, options: o } = B(r), l = $([]), i = $([]), u = $(null), { extents: s, updateExtents: d } = Sr(r.containerSize), { graph: v } = Jr(a, o, s), { hoveredElement: f, highlightedElements: h } = ta(
1796
+ l,
1737
1797
  o,
1738
- a,
1739
- c
1740
- ), h = d(() => le(a.value.valueFormat)), _ = d(
1741
- () => Object.keys(p.value.nodes)
1742
- ), m = d(
1743
- () => o.value.reduce((b, w) => {
1744
- const S = w.x + a.value.nodeWidth / 2;
1745
- return b.includes(S) ? b : [...b, S];
1746
- }, []).sort((b, w) => b - w)
1798
+ v
1799
+ ), _ = c(() => fe(o.value.valueFormat)), m = c(
1800
+ () => Object.keys(h.value.nodes)
1801
+ ), k = c(
1802
+ () => l.value.reduce((g, x) => {
1803
+ const S = x.x + o.value.nodeWidth / 2;
1804
+ return g.includes(S) ? g : [...g, S];
1805
+ }, []).sort((g, x) => g - x)
1747
1806
  // Make sure positions are sorted in ascending order
1748
- ), A = d(() => {
1749
- if (!(!a.value.nodeHeaders || !a.value.nodeHeaders.length))
1750
- return a.value.nodeHeaders.slice(0, m.value.length).map((b, w) => ({
1751
- label: b,
1752
- x: m.value[w]
1807
+ ), p = c(() => {
1808
+ if (!(!o.value.nodeHeaders || !o.value.nodeHeaders.length))
1809
+ return o.value.nodeHeaders.slice(0, k.value.length).map((g, x) => ({
1810
+ label: g,
1811
+ x: k.value[x]
1753
1812
  }));
1754
- }), f = d(
1755
- () => a.value.nodeHeaderPadding ?? $r
1756
- );
1757
- function T(b) {
1758
- return _.value.length > 0 && !_.value.includes(b.toString());
1813
+ }), T = c(
1814
+ () => o.value.nodeHeaderPadding ?? Gr
1815
+ ), O = c(() => {
1816
+ if (!(!o.value.gradient || !v.value))
1817
+ return v.value.links.reduce((g, x) => (g[ee(x)] = {
1818
+ source: x.source.color || x.source.fallbackColor,
1819
+ target: x.target.color || x.target.fallbackColor,
1820
+ x1: x.source.x1,
1821
+ x2: x.target.x0
1822
+ }, g), {});
1823
+ }), A = c(() => {
1824
+ const g = l.value.filter(
1825
+ (S) => j(S)
1826
+ ), x = [];
1827
+ return g.forEach((S) => {
1828
+ const ce = [];
1829
+ i.value.filter(({ link: Y }) => Y.target.id === S.node.id).reverse().reduce((Y, Z) => {
1830
+ const de = Z.link.target.y1 - Z.link.target.y0, ve = Z.link.value / S.node.value * de;
1831
+ return ce.push({
1832
+ x: S.x,
1833
+ y: S.y + Y,
1834
+ height: ve,
1835
+ width: S.width,
1836
+ key: `node-block-${S.node.id}-source-link-${Z.link.source.id}`,
1837
+ class: `lume-alluvial-group__node-block lume-fill--${Z.link.source.color || se}`
1838
+ }), Y + ve;
1839
+ }, 0), x.push({
1840
+ id: S.node.id,
1841
+ subNodes: ce
1842
+ });
1843
+ }), x;
1844
+ });
1845
+ function y(g) {
1846
+ return o.value.gradient && `url('#${n}_${ee(g)}')`;
1847
+ }
1848
+ function E(g) {
1849
+ return m.value.length > 0 && !m.value.includes(g.toString());
1850
+ }
1851
+ function R(g) {
1852
+ return m.value.length > 0 && m.value.includes(g.toString());
1759
1853
  }
1760
- function O(b) {
1761
- return p.value.links.length > 0 && !p.value.links.includes(b);
1854
+ function F(g) {
1855
+ return h.value.links.length > 0 && !h.value.links.includes(g);
1762
1856
  }
1763
- function k(b, w) {
1764
- b !== v.value && (v.value = b, e("link-mouseenter", { link: b, event: w }));
1857
+ function G(g) {
1858
+ return h.value.links.length > 0 && h.value.links.includes(g);
1765
1859
  }
1766
- function g(b) {
1767
- const w = v.value;
1768
- v.value = null, e("link-mouseleave", { link: w, event: b });
1860
+ function j(g) {
1861
+ return !g.node.color && g.node.deriveColorFromIncomingLinks;
1769
1862
  }
1770
- function $(b) {
1771
- if (b == null) {
1772
- v.value = null;
1863
+ function W(g, x) {
1864
+ g !== f.value && (f.value = g, e("link-mouseenter", { link: g, event: x }));
1865
+ }
1866
+ function w(g) {
1867
+ const x = f.value;
1868
+ f.value = null, e("link-mouseleave", { link: x, event: g });
1869
+ }
1870
+ function N(g) {
1871
+ if (g == null) {
1872
+ f.value = null;
1773
1873
  return;
1774
1874
  }
1775
- const w = Ir(b, c.value) || Er(b, c.value);
1776
- if (!w) {
1777
- Z(V.InvalidHoveredElement);
1875
+ const x = Vr(g, v.value) || Mr(g, v.value);
1876
+ if (!x) {
1877
+ Q(X.InvalidHoveredElement);
1778
1878
  return;
1779
1879
  }
1780
- v.value = w;
1880
+ f.value = x;
1881
+ }
1882
+ function H(g) {
1883
+ var x;
1884
+ return ((x = A.value.find(({ id: S }) => g === S)) == null ? void 0 : x.subNodes) ?? [];
1781
1885
  }
1782
- return C(c, (b) => {
1783
- o.value = Cr(b.nodes), l.value = Hr(b.links).reverse(), v.value == null && r.hoveredElementId != null && $(r.hoveredElementId);
1784
- }), C([r.containerSize, i], () => {
1886
+ return D(v, (g) => {
1887
+ l.value = Wr(g.nodes), i.value = Yr(g.links).reverse(), f.value == null && r.hoveredElementId != null && N(r.hoveredElementId);
1888
+ }), D([r.containerSize, u], () => {
1785
1889
  if (r.containerSize.width && r.containerSize.height) {
1786
- const b = Dr(c.value, i.value);
1787
- s(b);
1890
+ const g = zr(v.value, u.value);
1891
+ d(g);
1788
1892
  }
1789
- }), C(() => r.hoveredElementId, $), { __sfc: !0, props: r, emit: e, data: n, options: a, nodeBlocks: o, linkPaths: l, nodeTextRefs: i, extents: u, updateExtents: s, graph: c, hoveredElement: v, highlightedElements: p, formatValue: h, hoveredNodeIds: _, nodeColumnPositions: m, nodeHeaders: A, computedNodeHeaderPadding: f, isNodeFaded: T, isLinkFaded: O, handleLinkMouseover: k, handleLinkMouseleave: g, handleExternalHover: $, DEFAULT_COLOR: ce, GHOST_STROKE_WIDTH_OFFSET: xr };
1893
+ }), D(() => r.hoveredElementId, N), { __sfc: !0, props: r, emit: e, chartID: n, data: a, options: o, nodeBlocks: l, linkPaths: i, nodeTextRefs: u, extents: s, updateExtents: d, graph: v, hoveredElement: f, highlightedElements: h, formatValue: _, hoveredNodeIds: m, nodeColumnPositions: k, nodeHeaders: p, computedNodeHeaderPadding: T, gradients: O, nodesDerivingColorFromIncomingLinks: A, getLinkStroke: y, isNodeFaded: E, isNodeFocused: R, isLinkFaded: F, isLinkFocused: G, shouldDeriveNodeColorFromIncomingLinks: j, handleLinkMouseover: W, handleLinkMouseleave: w, handleExternalHover: N, getSubNodesDerivingColorFromIncomingLinks: H, LumeAlluvialNodeLabel: Er, LumeAlluvialNodeValue: Hr, GHOST_STROKE_WIDTH_OFFSET: Pr };
1790
1894
  }
1791
1895
  });
1792
- var Fr = function() {
1896
+ var ra = function() {
1793
1897
  var e = this, r = e._self._c, n = e._self._setupProxy;
1794
1898
  return r("g", { staticClass: "lume-alluvial-group", attrs: { "data-j-alluvial-group": "" } }, [n.nodeHeaders ? r("g", e._l(n.nodeHeaders, function(a) {
1795
1899
  return r("text", { key: `header_${a.x}`, staticClass: "lume-alluvial-group__node-header lume-typography--caption", attrs: { x: a.x, y: -n.computedNodeHeaderPadding } }, [e._v(" " + e._s(a.label) + " ")]);
1796
- }), 0) : e._e(), r("g", { staticClass: "lume-alluvial-link-group", on: { mouseleave: n.handleLinkMouseleave } }, [e._l(n.linkPaths, function(a) {
1900
+ }), 0) : e._e(), r("g", { staticClass: "lume-alluvial-link-group", on: { mouseleave: n.handleLinkMouseleave } }, [n.options.gradient ? r("defs", e._l(n.gradients, function(a, o) {
1901
+ return r("linearGradient", { key: o, attrs: { id: `${n.chartID}_${o}`, gradientUnits: "userSpaceOnUse", x1: a.x1, x2: a.x2 } }, [r("stop", { attrs: { offset: "0%", "stop-color": `var(--lume-color--${a.source})` } }), r("stop", { attrs: { offset: "100%", "stop-color": `var(--lume-color--${a.target})` } })], 1);
1902
+ }), 1) : e._e(), e._l(n.linkPaths, function(a) {
1797
1903
  return r("path", { key: `link-ghost_${a.id}`, staticClass: "lume-alluvial-group__link", class: [
1798
1904
  "lume-stroke--transparent",
1799
1905
  "lume-alluvial-group__link--ghost"
@@ -1804,16 +1910,18 @@ var Fr = function() {
1804
1910
  } } });
1805
1911
  }), e._l(n.linkPaths, function(a) {
1806
1912
  return r("path", { key: `link_${a.id}`, staticClass: "lume-alluvial-group__link", class: {
1807
- [`lume-stroke--${a.color}`]: a.color,
1808
- "lume-alluvial-group__link--faded": n.isLinkFaded(a.id)
1809
- }, attrs: { d: a.d, "stroke-dasharray": e.containerSize.width, "stroke-dashoffset": e.containerSize.width, "stroke-width": a.strokeWidth, "data-j-alluvial-path": "", "data-id": a.id }, on: { click: function(o) {
1913
+ [`lume-stroke--${a.color}`]: !n.options.gradient && a.color,
1914
+ "lume-alluvial-group__link--faded": n.isLinkFaded(a.id),
1915
+ "lume-alluvial-group__link--focused": n.isLinkFocused(a.id)
1916
+ }, attrs: { d: a.d, stroke: n.getLinkStroke(a.link), "stroke-dasharray": e.containerSize.width, "stroke-dashoffset": e.containerSize.width, "stroke-width": a.strokeWidth, "data-j-alluvial-path": "", "data-id": a.id }, on: { click: function(o) {
1810
1917
  return n.emit("link-click", { link: a.link, event: o });
1811
1918
  }, mouseover: function(o) {
1812
1919
  return n.handleLinkMouseover(a.link, o);
1813
1920
  } } });
1814
1921
  })], 2), e._l(n.nodeBlocks, function(a, o) {
1815
1922
  return r("g", { key: `node-block_${o}`, staticClass: "lume-alluvial-group__node", class: {
1816
- "lume-alluvial-group__node--faded": n.isNodeFaded(a.node.id)
1923
+ "lume-alluvial-group__node--faded": n.isNodeFaded(a.node.id),
1924
+ "lume-alluvial-group__node--focused": n.isNodeFocused(a.node.id)
1817
1925
  }, attrs: { "data-j-alluvial-group__node-block": "" } }, [r("g", { on: { click: function(l) {
1818
1926
  return n.emit("node-click", { node: a.node, event: l });
1819
1927
  }, mouseenter: function(l) {
@@ -1824,26 +1932,27 @@ var Fr = function() {
1824
1932
  n.hoveredElement = a.node;
1825
1933
  }, mouseout: function(l) {
1826
1934
  n.hoveredElement = null;
1827
- } } }, [r("rect", { class: `lume-alluvial-group__node-block--${a.node.color || n.DEFAULT_COLOR}`, attrs: { x: a.x, y: a.y, height: a.height, width: a.width } }), r("text", { ref: "nodeTextRefs", refInFor: !0, staticClass: "lume-alluvial-group__node-text lume-typography--caption", class: {
1828
- "lume-alluvial-group__node-text--right": a.node.depth === 0
1829
- }, attrs: { transform: `translate(${a.textTransform.x},${a.textTransform.y})`, "data-id": a.node.id } }, [r("tspan", { staticClass: "lume-alluvial-group__node-title", domProps: { textContent: e._s(a.node.label) } }), r("tspan", { staticClass: "lume-alluvial-group__node-value", attrs: { x: "0", dy: "1.2em" }, domProps: { textContent: e._s(
1830
- n.formatValue(
1831
- a.node.transitionValue || a.node.value,
1832
- a.node.value
1833
- )
1834
- ) } })])])]);
1935
+ } } }, [n.shouldDeriveNodeColorFromIncomingLinks(a) ? e._l(n.getSubNodesDerivingColorFromIncomingLinks(
1936
+ a.node.id
1937
+ ), function(l) {
1938
+ return r("rect", e._b({ key: l.key, attrs: { "data-j-alluvial-sub-nodes": "" } }, "rect", l, !1));
1939
+ }) : r("rect", { staticClass: "lume-alluvial-group__node-block", class: `lume-fill--${a.node.color || a.node.fallbackColor}`, attrs: { x: a.x, y: a.y, height: a.height, width: a.width } }), r("text", { ref: "nodeTextRefs", refInFor: !0, staticClass: "lume-alluvial-group__node-text lume-typography--caption", class: {
1940
+ "lume-alluvial-group__node-text--left": a.node.depth === 0
1941
+ }, attrs: { transform: `translate(${a.textTransform.x},${a.textTransform.y})`, "data-id": a.node.id } }, [e._t(`node-text-${a.node.id}`, function() {
1942
+ return [r(n.LumeAlluvialNodeLabel, [e._v(" " + e._s(a.node.label) + " ")]), r(n.LumeAlluvialNodeValue, [e._v(" " + e._s(n.formatValue(a.node.transitionValue || a.node.value, a.node.value)) + " ")])];
1943
+ }, { node: a.node })], 2)], 2)]);
1835
1944
  })], 2);
1836
- }, Vr = [], Mr = /* @__PURE__ */ I(
1837
- jr,
1838
- Fr,
1839
- Vr,
1945
+ }, aa = [], oa = /* @__PURE__ */ I(
1946
+ na,
1947
+ ra,
1948
+ aa,
1840
1949
  !1,
1841
1950
  null,
1842
- "8ba64716",
1951
+ "50550419",
1843
1952
  null,
1844
1953
  null
1845
1954
  );
1846
- const zr = Mr.exports, Wr = {
1955
+ const la = oa.exports, ua = {
1847
1956
  margins: {
1848
1957
  top: 0,
1849
1958
  right: 0,
@@ -1855,71 +1964,76 @@ const zr = Mr.exports, Wr = {
1855
1964
  withHover: !1,
1856
1965
  withLegend: !1,
1857
1966
  // Alluvial options
1967
+ gradient: !1,
1858
1968
  highlightedElements: "full",
1859
1969
  nodePadding: 16,
1860
1970
  nodeWidth: 16,
1861
- nodeAlign: Et,
1971
+ nodeAlign: Ct,
1862
1972
  valueFormat: (t) => String(t)
1863
- }, Zr = /* @__PURE__ */ D({
1973
+ }, ia = /* @__PURE__ */ C({
1864
1974
  __name: "lume-alluvial-diagram",
1865
1975
  props: {
1866
- ...ur(Le)
1976
+ ...cr(Ne)
1867
1977
  },
1868
1978
  setup(t) {
1869
- const e = t, r = Y(G()), { options: n } = N(e), { allOptions: a } = j(n, Wr);
1870
- function o(l) {
1979
+ const e = t, r = ne(V()), n = Xt(V()), { options: a } = B(e), { allOptions: o } = z(a, ua);
1980
+ function l(i) {
1871
1981
  return {
1872
- ...l,
1982
+ ...i,
1873
1983
  noBaseScales: !0
1874
1984
  // Alluvial chart never uses base scales
1875
1985
  };
1876
1986
  }
1877
- return { __sfc: !0, props: e, slots: r, options: n, allOptions: a, getAlluvialDiagramOptions: o, LumeChart: ee, LumeAlluvialGroup: zr };
1987
+ return { __sfc: !0, props: e, slots: r, groupSlots: n, options: a, allOptions: o, getAlluvialDiagramOptions: l, LumeChart: oe, LumeAlluvialGroup: la };
1878
1988
  }
1879
1989
  });
1880
- var Xr = function() {
1990
+ var sa = function() {
1881
1991
  var e = this, r = e._self._c, n = e._self._setupProxy;
1882
1992
  return r(n.LumeChart, e._b({ attrs: { options: n.getAlluvialDiagramOptions(n.allOptions), "data-j-alluvial-diagram": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
1883
- return [r(n.LumeAlluvialGroup, e._b({ attrs: { "hovered-element-id": e.hoveredElement } }, "lume-alluvial-group", a, !1))];
1993
+ return [r(n.LumeAlluvialGroup, e._b({ attrs: { "hovered-element-id": e.hoveredElement }, scopedSlots: e._u([e._l(n.groupSlots, function(o, l) {
1994
+ return { key: l, fn: function(i) {
1995
+ return [e._t(l, null, null, i || {})];
1996
+ } };
1997
+ })], null, !0) }, "lume-alluvial-group", a, !1))];
1884
1998
  } }, e._l(n.slots, function(a, o) {
1885
1999
  return { key: o, fn: function(l) {
1886
2000
  return [e._t(o, null, null, l || {})];
1887
2001
  } };
1888
2002
  })], null, !0) }, "lume-chart", n.props, !1));
1889
- }, Ur = [], Yr = /* @__PURE__ */ I(
1890
- Zr,
1891
- Xr,
1892
- Ur,
2003
+ }, ca = [], da = /* @__PURE__ */ I(
2004
+ ia,
2005
+ sa,
2006
+ ca,
1893
2007
  !1,
1894
2008
  null,
1895
2009
  null,
1896
2010
  null,
1897
2011
  null
1898
2012
  );
1899
- const lo = Yr.exports;
1900
- var Te = /* @__PURE__ */ ((t) => (t.grouped = "grouped", t.stacked = "stacked", t))(Te || {});
1901
- const Kr = /* @__PURE__ */ D({
2013
+ const To = da.exports;
2014
+ var Ee = /* @__PURE__ */ ((t) => (t.grouped = "grouped", t.stacked = "stacked", t))(Ee || {});
2015
+ const va = /* @__PURE__ */ C({
1902
2016
  __name: "lume-bar-chart",
1903
2017
  props: {
1904
- ...q(),
2018
+ ...ae(),
1905
2019
  type: {
1906
2020
  type: String,
1907
2021
  default: null,
1908
- validator: (t) => t in Te || t == null
2022
+ validator: (t) => t in Ee || t == null
1909
2023
  }
1910
2024
  },
1911
2025
  setup(t) {
1912
- const e = t, r = fe(
2026
+ const e = t, r = Ae(
1913
2027
  () => import("./common/42f5d2fc.js")
1914
- ), n = fe(
2028
+ ), n = Ae(
1915
2029
  () => import("./common/abc9d23d.js")
1916
- ), a = fe(
2030
+ ), a = Ae(
1917
2031
  () => import("./common/0664fd4d.js")
1918
2032
  ), o = /* @__PURE__ */ new Map([
1919
2033
  ["single", r],
1920
2034
  ["grouped", n],
1921
2035
  ["stacked", a]
1922
- ]), l = Y(G());
2036
+ ]), l = ne(V());
1923
2037
  function i(s) {
1924
2038
  return {
1925
2039
  ...s,
@@ -1931,64 +2045,64 @@ const Kr = /* @__PURE__ */ D({
1931
2045
  }
1932
2046
  };
1933
2047
  }
1934
- const u = d(() => {
2048
+ const u = c(() => {
1935
2049
  if (e.data) {
1936
- if (Le(e.data))
2050
+ if (Ne(e.data))
1937
2051
  return o.get("single");
1938
2052
  if (!e.type)
1939
2053
  throw new Error("Bar chart needs a type when there's multiple datasets.");
1940
2054
  return o.get(e.type);
1941
2055
  }
1942
2056
  });
1943
- return { __sfc: !0, TYPES: Te, LumeSingleBarChart: r, LumeGroupedBarChart: n, LumeStackedBarChart: a, COMPONENT_MAP: o, props: e, slots: l, getBarChartOptions: i, component: u };
2057
+ return { __sfc: !0, TYPES: Ee, LumeSingleBarChart: r, LumeGroupedBarChart: n, LumeStackedBarChart: a, COMPONENT_MAP: o, props: e, slots: l, getBarChartOptions: i, component: u };
1944
2058
  }
1945
2059
  });
1946
- var Jr = function() {
2060
+ var _a = function() {
1947
2061
  var e = this, r = e._self._c, n = e._self._setupProxy;
1948
2062
  return r(n.component, e._b({ tag: "component", attrs: { options: n.getBarChartOptions(e.options) }, scopedSlots: e._u([e._l(n.slots, function(a, o) {
1949
2063
  return { key: o, fn: function(l) {
1950
2064
  return [e._t(o, null, null, l || {})];
1951
2065
  } };
1952
2066
  })], null, !0) }, "component", { ...n.props, ...e.$attrs }, !1));
1953
- }, Qr = [], qr = /* @__PURE__ */ I(
1954
- Kr,
1955
- Jr,
1956
- Qr,
2067
+ }, fa = [], pa = /* @__PURE__ */ I(
2068
+ va,
2069
+ _a,
2070
+ fa,
1957
2071
  !1,
1958
2072
  null,
1959
2073
  null,
1960
2074
  null,
1961
2075
  null
1962
2076
  );
1963
- const uo = qr.exports;
1964
- function ea(t) {
1965
- return Object.values(Xt).includes(t) || t == null;
2077
+ const Lo = pa.exports;
2078
+ function ma(t) {
2079
+ return Object.values(Qt).includes(t) || t == null;
1966
2080
  }
1967
- function ta(t) {
2081
+ function ha(t) {
1968
2082
  return Object.values(L).includes(t);
1969
2083
  }
1970
- const na = (t = !1) => ({
2084
+ const ga = (t = !1) => ({
1971
2085
  type: {
1972
2086
  type: String,
1973
2087
  default: null,
1974
- validator: ea
2088
+ validator: ma
1975
2089
  },
1976
2090
  ...t ? {
1977
2091
  orientation: {
1978
2092
  type: String,
1979
2093
  default: L.VERTICAL,
1980
- validator: ta
2094
+ validator: ha
1981
2095
  }
1982
2096
  } : {}
1983
2097
  });
1984
- function dt(t) {
1985
- const e = d(() => t.value.map((n) => ({
2098
+ function ht(t) {
2099
+ const e = c(() => t.value.map((n) => ({
1986
2100
  ...n,
1987
2101
  values: n.values.map((a) => ({
1988
2102
  ...a,
1989
2103
  value: (a == null ? void 0 : a.value) || 0
1990
2104
  }))
1991
- }))), r = d(() => {
2105
+ }))), r = c(() => {
1992
2106
  var n;
1993
2107
  return (n = e.value) == null ? void 0 : n.reduce((a, o) => (o.values.forEach((l, i) => {
1994
2108
  a[i] ? a[i].push(l) : a[i] = [l];
@@ -1996,40 +2110,26 @@ function dt(t) {
1996
2110
  });
1997
2111
  return { multiBarData: e, groupedData: r };
1998
2112
  }
1999
- function ra(t, e) {
2113
+ function ya(t, e) {
2000
2114
  return t.value.length === 1 ? "single" : e.value;
2001
2115
  }
2002
- function aa(t, e, r, n) {
2003
- const a = d(
2004
- () => n.value === L.HORIZONTAL
2116
+ function ba(t, e, r) {
2117
+ const n = c(
2118
+ () => r.value === L.HORIZONTAL
2005
2119
  );
2006
- function o(u) {
2007
- Math.min(...u.domain()) > 0 && console.error("Bar linear scale domain cannot start above 0!");
2120
+ function a(i) {
2121
+ Math.min(...i.domain()) > 0 && console.error("Bar linear scale domain cannot start above 0!");
2008
2122
  }
2009
- const l = d(() => {
2010
- const { padding: u, paddingInner: s, paddingOuter: c } = r.value;
2011
- return a.value ? (() => (o(t.value), t.value))() : ue(
2012
- t.value,
2013
- n.value,
2014
- { padding: u, paddingInner: s, paddingOuter: c }
2015
- );
2016
- }), i = d(() => {
2017
- const { padding: u, paddingInner: s, paddingOuter: c } = r.value;
2018
- return a.value ? ue(
2019
- e.value,
2020
- n.value,
2021
- { padding: u, paddingInner: s, paddingOuter: c }
2022
- ) : (() => (o(e.value), e.value))();
2023
- });
2024
- return { barXScale: l, barYScale: i };
2123
+ const o = c(() => n.value ? (() => (a(t.value), t.value))() : t.value), l = c(() => n.value ? e.value : (() => (a(e.value), e.value))());
2124
+ return { barXScale: o, barYScale: l };
2025
2125
  }
2026
- function oa(t, e, r, n, a, o) {
2027
- const l = d(
2126
+ function ka(t, e, r, n, a, o) {
2127
+ const l = c(
2028
2128
  () => n.value === L.HORIZONTAL
2029
2129
  );
2030
- function i(v, p) {
2130
+ function i(v, f) {
2031
2131
  let h, _;
2032
- return l.value ? (h = v >= 0 ? e.value(0) : e.value(v), _ = r.value(r.value.domain()[p])) : (h = e.value(e.value.domain()[p]), _ = v < 0 ? r.value(0) : r.value(v)), { x: h, y: _ };
2132
+ return l.value ? (h = v >= 0 ? e.value(0) : e.value(v), _ = r.value(r.value.domain()[f])) : (h = e.value(e.value.domain()[f]), _ = v < 0 ? r.value(0) : r.value(v)), { x: h, y: _ };
2033
2133
  }
2034
2134
  function u(v) {
2035
2135
  return l.value ? v < 0 ? e.value(0) - e.value(v) : e.value(v) - e.value(0) : e.value.bandwidth();
@@ -2037,149 +2137,149 @@ function oa(t, e, r, n, a, o) {
2037
2137
  function s(v) {
2038
2138
  return l.value ? r.value.bandwidth() : v < 0 ? r.value(v) - r.value(0) : r.value(0) - r.value(v);
2039
2139
  }
2040
- function c(v, p, h) {
2041
- const { value: _, color: m } = v, A = m ?? t.value[p].color ?? ce, { x: f, y: T } = i(_, h), O = u(_), k = s(_);
2140
+ function d(v, f, h) {
2141
+ const { value: _, color: m } = v, k = m ?? t.value[f].color ?? se, { x: p, y: T } = i(_, h), O = u(_), A = s(_);
2042
2142
  return {
2043
- classList: [`lume-fill--${A}`, ...o],
2044
- x: f,
2143
+ classList: [`lume-fill--${k}`, ...o],
2144
+ x: p,
2045
2145
  y: T,
2046
2146
  width: O,
2047
- height: k,
2147
+ height: A,
2048
2148
  isFaded: a.value !== -1 && a.value !== h,
2049
2149
  isNegative: _ < 0
2050
2150
  };
2051
2151
  }
2052
- return { barAttributeGenerator: c };
2152
+ return { barAttributeGenerator: d };
2053
2153
  }
2054
- function la(t, e, r, n, a, o) {
2055
- const l = d(
2154
+ function Aa(t, e, r, n, a, o) {
2155
+ const l = c(
2056
2156
  () => n.value === L.HORIZONTAL
2057
- ), i = d(() => te().domain(t.value.map((_, m) => m)).range([0, e.value.bandwidth()]).padding(0)), u = d(() => te().domain(t.value.map((_, m) => m)).range([0, r.value.bandwidth()]).padding(0));
2058
- function s(_, m, A) {
2157
+ ), i = c(() => le().domain(t.value.map((_, m) => m)).range([0, e.value.bandwidth()]).padding(0)), u = c(() => le().domain(t.value.map((_, m) => m)).range([0, r.value.bandwidth()]).padding(0));
2158
+ function s(_, m, k) {
2059
2159
  if (l.value)
2060
2160
  return _ >= 0 ? e.value(0) : e.value(_);
2061
- const f = e.value.domain();
2062
- return e.value(f[m]) + i.value(A);
2161
+ const p = e.value.domain();
2162
+ return e.value(p[m]) + i.value(k);
2063
2163
  }
2064
- function c(_, m, A) {
2164
+ function d(_, m, k) {
2065
2165
  if (l.value) {
2066
- const f = r.value.domain();
2067
- return r.value(f[m]) + u.value(A);
2166
+ const p = r.value.domain();
2167
+ return r.value(p[m]) + u.value(k);
2068
2168
  }
2069
2169
  return _ < 0 ? r.value(0) : r.value(_);
2070
2170
  }
2071
2171
  function v(_) {
2072
2172
  return l.value ? _ < 0 ? e.value(0) - e.value(_) : e.value(_) - e.value(0) : i.value.bandwidth();
2073
2173
  }
2074
- function p(_) {
2174
+ function f(_) {
2075
2175
  return l.value ? u.value.bandwidth() : _ < 0 ? r.value(_) - r.value(0) : r.value(0) - r.value(_);
2076
2176
  }
2077
- function h(_, m, A) {
2078
- const { value: f, color: T } = _, O = T ?? t.value[m].color ?? Object.values(P)[m], k = s(f, A, m), g = c(f, A, m), $ = v(f), b = p(f);
2177
+ function h(_, m, k) {
2178
+ const { value: p, color: T } = _, O = T ?? t.value[m].color ?? Object.values(M)[m], A = s(p, k, m), y = d(p, k, m), E = v(p), R = f(p);
2079
2179
  return {
2080
2180
  classList: [`lume-fill--${O}`, ...o],
2081
- x: k,
2082
- y: g,
2083
- width: $,
2084
- height: b,
2085
- isFaded: a.value !== -1 && a.value !== A,
2086
- isNegative: f < 0
2181
+ x: A,
2182
+ y,
2183
+ width: E,
2184
+ height: R,
2185
+ isFaded: a.value !== -1 && a.value !== k,
2186
+ isNegative: p < 0
2087
2187
  };
2088
2188
  }
2089
2189
  return { barAttributeGenerator: h };
2090
2190
  }
2091
- function ua(t, e) {
2092
- const r = d(
2191
+ function Ta(t, e) {
2192
+ const r = c(
2093
2193
  () => e.value === L.HORIZONTAL
2094
- ), n = d(() => {
2194
+ ), n = c(() => {
2095
2195
  const i = t.value.map(
2096
- (u) => u.filter((s) => s.value < 0).reduce((s, c) => s + c.value, 0)
2196
+ (u) => u.filter((s) => s.value < 0).reduce((s, d) => s + d.value, 0)
2097
2197
  );
2098
2198
  return Math.min(...i);
2099
- }), a = d(() => {
2199
+ }), a = c(() => {
2100
2200
  const i = t.value.map(
2101
2201
  (u) => u.reduce(
2102
- (s, c) => c.value >= 0 ? s + c.value : s,
2202
+ (s, d) => d.value >= 0 ? s + d.value : s,
2103
2203
  0
2104
2204
  )
2105
2205
  );
2106
2206
  return Math.max(...i);
2107
2207
  });
2108
2208
  function o(i, u, s) {
2109
- return r.value ? ne().domain([n.value, a.value]).range([0, s.width]) : Object.assign(
2110
- ue(
2111
- te().domain(u.map((c, v) => v)).range([0, s.width])
2209
+ return r.value ? ue().domain([n.value, a.value]).range([0, s.width]) : Object.assign(
2210
+ ze(
2211
+ le().domain(u.map((d, v) => v)).range([0, s.width])
2112
2212
  ),
2113
2213
  { labels: u }
2114
2214
  );
2115
2215
  }
2116
2216
  function l(i, u, s) {
2117
2217
  return r.value ? Object.assign(
2118
- ue(
2119
- te().domain(u.map((c, v) => v)).range([0, s.height])
2218
+ ze(
2219
+ le().domain(u.map((d, v) => v)).range([0, s.height])
2120
2220
  ),
2121
2221
  { labels: u }
2122
- ) : ne().domain([a.value, n.value]).range([0, s.height]);
2222
+ ) : ue().domain([a.value, n.value]).range([0, s.height]);
2123
2223
  }
2124
2224
  return { stackedXScaleGenerator: o, stackedYScaleGenerator: l };
2125
2225
  }
2126
- function ia(t, e, r, n, a, o) {
2127
- const l = d(
2226
+ function La(t, e, r, n, a, o) {
2227
+ const l = c(
2128
2228
  () => n.value === L.HORIZONTAL
2129
- ), i = d(
2229
+ ), i = c(
2130
2230
  () => l.value ? r.value.domain() : e.value.domain()
2131
- ), u = d(
2132
- () => t.value.map((f) => f.values.map((T) => T == null ? void 0 : T.value))
2231
+ ), u = c(
2232
+ () => t.value.map((p) => p.values.map((T) => T == null ? void 0 : T.value))
2133
2233
  );
2134
- function s(f, T, O) {
2135
- let k, g;
2136
- return l.value ? (k = e.value(f >= 0 ? 0 + O : f + O), g = r.value(i.value[T])) : (k = e.value(i.value[T]), g = r.value(f >= 0 ? f + O : 0 + O)), { x: k, y: g };
2234
+ function s(p, T, O) {
2235
+ let A, y;
2236
+ return l.value ? (A = e.value(p >= 0 ? 0 + O : p + O), y = r.value(i.value[T])) : (A = e.value(i.value[T]), y = r.value(p >= 0 ? p + O : 0 + O)), { x: A, y };
2137
2237
  }
2138
- function c(f) {
2139
- return l.value ? e.value(f) - e.value(0) : e.value.bandwidth();
2238
+ function d(p) {
2239
+ return l.value ? e.value(p) - e.value(0) : e.value.bandwidth();
2140
2240
  }
2141
- function v(f) {
2142
- return l.value ? e.value(0) - e.value(f) : e.value.bandwidth();
2241
+ function v(p) {
2242
+ return l.value ? e.value(0) - e.value(p) : e.value.bandwidth();
2143
2243
  }
2144
- function p(f) {
2145
- return l.value ? r.value.bandwidth() : r.value(0) - r.value(f);
2244
+ function f(p) {
2245
+ return l.value ? r.value.bandwidth() : r.value(0) - r.value(p);
2146
2246
  }
2147
- function h(f) {
2148
- return l.value ? r.value.bandwidth() : r.value(f) - r.value(0);
2247
+ function h(p) {
2248
+ return l.value ? r.value.bandwidth() : r.value(p) - r.value(0);
2149
2249
  }
2150
- function _(f, T) {
2151
- return f ? u.value.reduce((O, k, g) => (g < f && k[T] >= 0 && (O += k[T]), O), 0) : 0;
2250
+ function _(p, T) {
2251
+ return p ? u.value.reduce((O, A, y) => (y < p && A[T] >= 0 && (O += A[T]), O), 0) : 0;
2152
2252
  }
2153
- function m(f, T) {
2154
- return f ? u.value.reduce((O, k, g) => (g < f && k[T] < 0 && (O += k[T]), O), 0) : 0;
2253
+ function m(p, T) {
2254
+ return p ? u.value.reduce((O, A, y) => (y < p && A[T] < 0 && (O += A[T]), O), 0) : 0;
2155
2255
  }
2156
- function A(f, T, O) {
2157
- const { value: k, color: g } = f, $ = k >= 0 ? c(k) : v(k), b = k >= 0 ? p(k) : h(k), w = k >= 0 ? _(T, O) : m(T, O), { x: S, y: F } = s(k, O, w);
2256
+ function k(p, T, O) {
2257
+ const { value: A, color: y } = p, E = A >= 0 ? d(A) : v(A), R = A >= 0 ? f(A) : h(A), F = A >= 0 ? _(T, O) : m(T, O), { x: G, y: j } = s(A, O, F);
2158
2258
  return {
2159
- classList: [`lume-fill--${g ?? t.value[T].color ?? Object.values(P)[T]}`, ...o],
2160
- width: $,
2161
- height: b,
2162
- x: S,
2163
- y: F,
2259
+ classList: [`lume-fill--${y ?? t.value[T].color ?? Object.values(M)[T]}`, ...o],
2260
+ width: E,
2261
+ height: R,
2262
+ x: G,
2263
+ y: j,
2164
2264
  isFaded: a.value !== -1 && a.value !== O,
2165
- isNegative: k < 0
2265
+ isNegative: A < 0
2166
2266
  };
2167
2267
  }
2168
- return { barAttributeGenerator: A };
2268
+ return { barAttributeGenerator: k };
2169
2269
  }
2170
- const We = {
2171
- single: oa,
2172
- grouped: la,
2173
- stacked: ia
2174
- }, sa = /* @__PURE__ */ D({
2270
+ const Ye = {
2271
+ single: ka,
2272
+ grouped: Aa,
2273
+ stacked: La
2274
+ }, Oa = /* @__PURE__ */ C({
2175
2275
  __name: "lume-bar-group",
2176
2276
  props: {
2177
- ...de(),
2277
+ ...ge(),
2178
2278
  classList: {
2179
2279
  type: [String, Array],
2180
2280
  default: () => []
2181
2281
  },
2182
- ...na(!0),
2282
+ ...ga(!0),
2183
2283
  transition: {
2184
2284
  type: Boolean,
2185
2285
  default: !0
@@ -2190,36 +2290,30 @@ const We = {
2190
2290
  const r = t, {
2191
2291
  data: n,
2192
2292
  hoveredIndex: a,
2193
- options: o,
2194
- orientation: l,
2195
- transition: i,
2196
- type: u,
2197
- xScale: s,
2198
- yScale: c,
2199
- classList: v
2200
- } = N(r), { groupedData: p } = dt(n), { barXScale: h, barYScale: _ } = aa(
2201
- s,
2202
- c,
2203
- o,
2204
- l
2205
- ), m = d(() => typeof v.value == "string" ? [v.value] : v.value), A = d(() => {
2206
- const T = ra(n, u), { barAttributeGenerator: O } = We[T](
2293
+ orientation: o,
2294
+ transition: l,
2295
+ type: i,
2296
+ xScale: u,
2297
+ yScale: s,
2298
+ classList: d
2299
+ } = B(r), { groupedData: v } = ht(n), { barXScale: f, barYScale: h } = ba(u, s, o), _ = c(() => typeof d.value == "string" ? [d.value] : d.value), m = c(() => {
2300
+ const p = ya(n, i), { barAttributeGenerator: T } = Ye[p](
2207
2301
  n,
2302
+ f,
2208
2303
  h,
2209
- _,
2210
- l,
2304
+ o,
2211
2305
  a,
2212
- m.value
2306
+ _.value
2213
2307
  );
2214
- return O;
2215
- }), f = d(() => {
2216
- if (i.value)
2217
- return l.value === L.HORIZONTAL ? "width" : "height";
2308
+ return T;
2309
+ }), k = c(() => {
2310
+ if (l.value)
2311
+ return o.value === L.HORIZONTAL ? "width" : "height";
2218
2312
  });
2219
- return { __sfc: !0, MIXIN_MAP: We, props: r, emit: e, data: n, hoveredIndex: a, options: o, orientation: l, transition: i, type: u, xScale: s, yScale: c, classList: v, groupedData: p, barXScale: h, barYScale: _, computedClasses: m, getBarAttributes: A, computedTransition: f, LumeBar: Ie };
2313
+ return { __sfc: !0, MIXIN_MAP: Ye, props: r, emit: e, data: n, hoveredIndex: a, orientation: o, transition: l, type: i, xScale: u, yScale: s, classList: d, groupedData: v, barXScale: f, barYScale: h, computedClasses: _, getBarAttributes: m, computedTransition: k, LumeBar: Re };
2220
2314
  }
2221
2315
  });
2222
- var ca = function() {
2316
+ var xa = function() {
2223
2317
  var e = this, r = e._self._c, n = e._self._setupProxy;
2224
2318
  return r("g", { staticClass: "lume-bar-group", attrs: { "data-j-bars-group": "" } }, e._l(n.groupedData, function(a, o) {
2225
2319
  return r("g", { key: o, on: { mouseenter: function(l) {
@@ -2234,43 +2328,43 @@ var ca = function() {
2234
2328
  } } }, "lume-bar", n.getBarAttributes(l, i, o, a), !1));
2235
2329
  }), 1);
2236
2330
  }), 0);
2237
- }, da = [], va = /* @__PURE__ */ I(
2238
- sa,
2239
- ca,
2240
- da,
2331
+ }, $a = [], Ia = /* @__PURE__ */ I(
2332
+ Oa,
2333
+ xa,
2334
+ $a,
2241
2335
  !1,
2242
2336
  null,
2243
2337
  null,
2244
2338
  null,
2245
2339
  null
2246
2340
  );
2247
- const Ce = va.exports, _a = {
2341
+ const Be = Ia.exports, wa = {
2248
2342
  [L.VERTICAL]: {
2249
2343
  withTooltip: !0,
2250
2344
  xAxisOptions: {},
2251
2345
  yAxisOptions: { gridLines: !0 },
2252
- margins: X.VERTICAL
2346
+ margins: q.VERTICAL
2253
2347
  },
2254
2348
  [L.HORIZONTAL]: {
2255
2349
  withTooltip: !0,
2256
2350
  xAxisOptions: { gridLines: !0 },
2257
2351
  yAxisOptions: { gridLines: !1 },
2258
- margins: X.HORIZONTAL
2352
+ margins: q.HORIZONTAL
2259
2353
  }
2260
- }, pa = /* @__PURE__ */ D({
2354
+ }, Ea = /* @__PURE__ */ C({
2261
2355
  __name: "lume-single-bar-chart",
2262
2356
  props: {
2263
- ...q(Le)
2357
+ ...ae(Ne)
2264
2358
  },
2265
2359
  setup(t) {
2266
- const e = t, r = Y(G()), { orientation: n, options: a } = N(e), o = d(
2267
- () => _a[n.value || L.VERTICAL]
2360
+ const e = t, r = ne(V()), { orientation: n, options: a } = B(e), o = c(
2361
+ () => wa[n.value || L.VERTICAL]
2268
2362
  // needs to be computed so that default options are reactive
2269
- ), { allOptions: l } = j(a, o);
2270
- return { __sfc: !0, props: e, slots: r, orientation: n, options: a, baseOptions: o, allOptions: l, LumeChart: ee, LumeBarGroup: Ce };
2363
+ ), { allOptions: l } = z(a, o);
2364
+ return { __sfc: !0, props: e, slots: r, orientation: n, options: a, baseOptions: o, allOptions: l, LumeChart: oe, LumeBarGroup: Be };
2271
2365
  }
2272
2366
  });
2273
- var fa = function() {
2367
+ var Na = function() {
2274
2368
  var e = this, r = e._self._c, n = e._self._setupProxy;
2275
2369
  return r(n.LumeChart, e._b({ attrs: { "chart-type": "single-bar", options: n.allOptions, "data-j-single-bar-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
2276
2370
  return [r(n.LumeBarGroup, e._b({ attrs: { orientation: n.orientation } }, "lume-bar-group", a, !1))];
@@ -2279,44 +2373,47 @@ var fa = function() {
2279
2373
  return [e._t(o, null, null, l || {})];
2280
2374
  } };
2281
2375
  })], null, !0) }, "lume-chart", n.props, !1));
2282
- }, ma = [], ha = /* @__PURE__ */ I(
2283
- pa,
2284
- fa,
2285
- ma,
2376
+ }, Ca = [], Da = /* @__PURE__ */ I(
2377
+ Ea,
2378
+ Na,
2379
+ Ca,
2286
2380
  !1,
2287
2381
  null,
2288
2382
  null,
2289
2383
  null,
2290
2384
  null
2291
2385
  );
2292
- const io = ha.exports, ga = {
2386
+ const Oo = Da.exports, Ra = {
2293
2387
  [L.VERTICAL]: {
2294
2388
  withTooltip: !0,
2295
2389
  xAxisOptions: {},
2296
2390
  yAxisOptions: { gridLines: !0 },
2297
- margins: X.VERTICAL
2391
+ margins: q.VERTICAL
2298
2392
  },
2299
2393
  [L.HORIZONTAL]: {
2300
2394
  withTooltip: !0,
2301
2395
  xAxisOptions: { gridLines: !0 },
2302
2396
  yAxisOptions: { gridLines: !1 },
2303
- margins: X.HORIZONTAL,
2397
+ margins: q.HORIZONTAL,
2304
2398
  tooltipOptions: { position: "right" }
2305
2399
  }
2306
- }, ya = /* @__PURE__ */ D({
2400
+ }, Ha = /* @__PURE__ */ C({
2307
2401
  __name: "lume-grouped-bar-chart",
2308
2402
  props: {
2309
- ...q()
2403
+ ...ae()
2310
2404
  },
2311
2405
  setup(t) {
2312
- const e = t, r = Y(G()), { orientation: n, options: a } = N(e), o = d(
2313
- () => ga[n.value || L.VERTICAL]
2406
+ const e = t, r = ne(V()), { orientation: n, options: a } = B(e), o = c(
2407
+ () => Ra[n.value || L.VERTICAL]
2314
2408
  // needs to be computed so that default options are reactive
2315
- ), { allOptions: l } = j(a, o);
2316
- return { __sfc: !0, props: e, slots: r, orientation: n, options: a, baseOptions: o, allOptions: l, LumeChart: ee, LumeBarGroup: Ce };
2409
+ ), { allOptions: l } = z(
2410
+ a,
2411
+ o
2412
+ );
2413
+ return { __sfc: !0, props: e, slots: r, orientation: n, options: a, baseOptions: o, allOptions: l, LumeChart: oe, LumeBarGroup: Be };
2317
2414
  }
2318
2415
  });
2319
- var ba = function() {
2416
+ var Sa = function() {
2320
2417
  var e = this, r = e._self._c, n = e._self._setupProxy;
2321
2418
  return r(n.LumeChart, e._b({ attrs: { "chart-type": "grouped-bar", options: n.allOptions, "data-j-grouped-bar-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
2322
2419
  return [r(n.LumeBarGroup, e._b({ attrs: { type: "grouped" } }, "lume-bar-group", a, !1))];
@@ -2325,47 +2422,50 @@ var ba = function() {
2325
2422
  return [e._t(o, null, null, l || {})];
2326
2423
  } };
2327
2424
  })], null, !0) }, "lume-chart", n.props, !1));
2328
- }, ka = [], Aa = /* @__PURE__ */ I(
2329
- ya,
2330
- ba,
2331
- ka,
2425
+ }, Ba = [], Fa = /* @__PURE__ */ I(
2426
+ Ha,
2427
+ Sa,
2428
+ Ba,
2332
2429
  !1,
2333
2430
  null,
2334
2431
  null,
2335
2432
  null,
2336
2433
  null
2337
2434
  );
2338
- const so = Aa.exports, Ta = {
2435
+ const xo = Fa.exports, Pa = {
2339
2436
  [L.VERTICAL]: {
2340
2437
  withTooltip: !0,
2341
2438
  xAxisOptions: {},
2342
2439
  yAxisOptions: { gridLines: !0 },
2343
- margins: X.VERTICAL
2440
+ margins: q.VERTICAL
2344
2441
  },
2345
2442
  [L.HORIZONTAL]: {
2346
2443
  withTooltip: !0,
2347
2444
  xAxisOptions: { gridLines: !0 },
2348
2445
  yAxisOptions: { gridLines: !1 },
2349
- margins: X.HORIZONTAL,
2446
+ margins: q.HORIZONTAL,
2350
2447
  tooltipOptions: { position: "right" }
2351
2448
  }
2352
- }, Oa = /* @__PURE__ */ D({
2449
+ }, Ga = /* @__PURE__ */ C({
2353
2450
  __name: "lume-stacked-bar-chart",
2354
2451
  props: {
2355
- ...q()
2452
+ ...ae()
2356
2453
  },
2357
2454
  setup(t) {
2358
- const e = t, r = Y(G()), { data: n, orientation: a, options: o } = N(e), l = d(
2359
- () => Ta[a.value || L.VERTICAL]
2455
+ const e = t, r = ne(V()), { data: n, orientation: a, options: o } = B(e), l = c(
2456
+ () => Pa[a.value || L.VERTICAL]
2360
2457
  // needs to be computed so that default options are reactive
2361
- ), { allOptions: i } = j(o, l), { internalData: u } = De(n), { groupedData: s } = dt(u), { stackedXScaleGenerator: c, stackedYScaleGenerator: v } = ua(
2458
+ ), { allOptions: i } = z(
2459
+ o,
2460
+ l
2461
+ ), { internalData: u } = Se(n), { groupedData: s } = ht(u), { stackedXScaleGenerator: d, stackedYScaleGenerator: v } = Ta(
2362
2462
  s,
2363
2463
  a
2364
2464
  );
2365
- return { __sfc: !0, props: e, slots: r, data: n, orientation: a, options: o, baseOptions: l, allOptions: i, internalData: u, groupedData: s, stackedXScaleGenerator: c, stackedYScaleGenerator: v, LumeChart: ee, LumeBarGroup: Ce };
2465
+ return { __sfc: !0, props: e, slots: r, data: n, orientation: a, options: o, baseOptions: l, allOptions: i, internalData: u, groupedData: s, stackedXScaleGenerator: d, stackedYScaleGenerator: v, LumeChart: oe, LumeBarGroup: Be };
2366
2466
  }
2367
2467
  });
2368
- var La = function() {
2468
+ var ja = function() {
2369
2469
  var e = this, r = e._self._c, n = e._self._setupProxy;
2370
2470
  return r(n.LumeChart, e._b({ attrs: { "chart-type": "stacked-bar", options: n.allOptions, "x-scale": n.stackedXScaleGenerator, "y-scale": n.stackedYScaleGenerator, "data-j-stacked-bar-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
2371
2471
  return [r(n.LumeBarGroup, e._b({ attrs: { type: "stacked" } }, "lume-bar-group", a, !1))];
@@ -2374,17 +2474,17 @@ var La = function() {
2374
2474
  return [e._t(o, null, null, l || {})];
2375
2475
  } };
2376
2476
  })], null, !0) }, "lume-chart", n.props, !1));
2377
- }, xa = [], $a = /* @__PURE__ */ I(
2378
- Oa,
2379
- La,
2380
- xa,
2477
+ }, Va = [], Ma = /* @__PURE__ */ I(
2478
+ Ga,
2479
+ ja,
2480
+ Va,
2381
2481
  !1,
2382
2482
  null,
2383
2483
  null,
2384
2484
  null,
2385
2485
  null
2386
2486
  );
2387
- const co = $a.exports, Ze = 2, wa = /* @__PURE__ */ D({
2487
+ const $o = Ma.exports, Ke = 2, za = /* @__PURE__ */ C({
2388
2488
  __name: "lume-line",
2389
2489
  props: {
2390
2490
  pathDefinition: {
@@ -2393,11 +2493,11 @@ const co = $a.exports, Ze = 2, wa = /* @__PURE__ */ D({
2393
2493
  },
2394
2494
  width: {
2395
2495
  type: Number,
2396
- default: Ze
2496
+ default: Ke
2397
2497
  },
2398
2498
  color: {
2399
2499
  type: String,
2400
- default: P.Skyblue
2500
+ default: M.Skyblue
2401
2501
  },
2402
2502
  dashed: {
2403
2503
  type: Boolean,
@@ -2418,11 +2518,11 @@ const co = $a.exports, Ze = 2, wa = /* @__PURE__ */ D({
2418
2518
  },
2419
2519
  emits: ["click"],
2420
2520
  setup(t, { emit: e }) {
2421
- const r = x(null);
2422
- return M(() => se(r.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: Ze, emit: e, root: r };
2521
+ const r = $(null);
2522
+ return U(() => he(r.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: Ke, emit: e, root: r };
2423
2523
  }
2424
2524
  });
2425
- var Ia = function() {
2525
+ var Wa = function() {
2426
2526
  var e = this, r = e._self._c, n = e._self._setupProxy;
2427
2527
  return r("path", { ref: "root", staticClass: "lume-line", class: {
2428
2528
  [`lume-stroke--${e.color}`]: !0,
@@ -2434,28 +2534,28 @@ var Ia = function() {
2434
2534
  }, attrs: { d: e.pathDefinition, "stroke-width": e.width, "data-j-line": "" }, on: { click: function(a) {
2435
2535
  return n.emit("click", a);
2436
2536
  } } });
2437
- }, Ea = [], Da = /* @__PURE__ */ I(
2438
- wa,
2439
- Ia,
2440
- Ea,
2537
+ }, Za = [], Xa = /* @__PURE__ */ I(
2538
+ za,
2539
+ Wa,
2540
+ Za,
2441
2541
  !1,
2442
2542
  null,
2443
2543
  "08896455",
2444
2544
  null,
2445
2545
  null
2446
2546
  );
2447
- const Ca = Da.exports, Xe = 4, Ha = /* @__PURE__ */ D({
2547
+ const Ua = Xa.exports, Je = 4, Ya = /* @__PURE__ */ C({
2448
2548
  __name: "lume-point",
2449
2549
  props: {
2450
2550
  x: { type: Number, required: !0 },
2451
2551
  y: { type: Number, required: !0 },
2452
2552
  color: {
2453
2553
  type: String,
2454
- default: P.Skyblue
2554
+ default: M.Skyblue
2455
2555
  },
2456
2556
  radius: {
2457
2557
  type: Number,
2458
- default: Xe
2558
+ default: Je
2459
2559
  },
2460
2560
  active: {
2461
2561
  type: Boolean,
@@ -2464,27 +2564,27 @@ const Ca = Da.exports, Xe = 4, Ha = /* @__PURE__ */ D({
2464
2564
  },
2465
2565
  emits: ["click"],
2466
2566
  setup(t, { emit: e }) {
2467
- const r = t, n = x(null), a = d(() => r.radius / 2);
2468
- return M(() => se(n.value)), { __sfc: !0, DEFAULT_RADIUS: Xe, props: r, emit: e, root: n, strokeWidth: a };
2567
+ const r = t, n = $(null), a = c(() => r.radius / 2);
2568
+ return U(() => he(n.value)), { __sfc: !0, DEFAULT_RADIUS: Je, props: r, emit: e, root: n, strokeWidth: a };
2469
2569
  }
2470
2570
  });
2471
- var Na = function() {
2571
+ var Ka = function() {
2472
2572
  var e = this, r = e._self._c, n = e._self._setupProxy;
2473
2573
  return r("circle", { ref: "root", staticClass: "lume-point", class: `lume-stroke--${e.color}`, attrs: { cx: e.x, cy: e.y, r: e.active ? e.radius : 0, "stroke-width": n.strokeWidth, "data-j-point": "" }, on: { click: function(a) {
2474
2574
  return n.emit("click", a);
2475
2575
  } } });
2476
- }, Ra = [], Sa = /* @__PURE__ */ I(
2477
- Ha,
2478
- Na,
2479
- Ra,
2576
+ }, Ja = [], Qa = /* @__PURE__ */ I(
2577
+ Ya,
2578
+ Ka,
2579
+ Ja,
2480
2580
  !1,
2481
2581
  null,
2482
2582
  "9bacbd7d",
2483
2583
  null,
2484
2584
  null
2485
2585
  );
2486
- const Ba = Sa.exports;
2487
- function vt(t) {
2586
+ const qa = Qa.exports;
2587
+ function gt(t) {
2488
2588
  function e(o) {
2489
2589
  let l = null;
2490
2590
  return o == null ? void 0 : o.reduce((i, u, s) => (u == null || u.value == null ? (l ? l.push(s) : l = [s], s === (o == null ? void 0 : o.length) - 1 && i.push(l)) : l && (i.push(l), l = null), i), []);
@@ -2500,19 +2600,19 @@ function vt(t) {
2500
2600
  );
2501
2601
  };
2502
2602
  }
2503
- return { computedLineData: d(() => t.value.map((o) => {
2603
+ return { computedLineData: c(() => t.value.map((o) => {
2504
2604
  const l = e(o.values);
2505
2605
  return {
2506
2606
  ...o,
2507
2607
  isDashed: n(l),
2508
2608
  values: o.values.map((i, u) => {
2509
- var c, v;
2609
+ var d, v;
2510
2610
  const s = l.find(
2511
- (p) => p.includes(u)
2611
+ (f) => f.includes(u)
2512
2612
  );
2513
2613
  if (s) {
2514
- const p = s[0] - 1, h = s[s.length - 1] + 1;
2515
- let _ = (c = o.values[p]) == null ? void 0 : c.value, m = (v = o.values[h]) == null ? void 0 : v.value;
2614
+ const f = s[0] - 1, h = s[s.length - 1] + 1;
2615
+ let _ = (d = o.values[f]) == null ? void 0 : d.value, m = (v = o.values[h]) == null ? void 0 : v.value;
2516
2616
  return _ == null && (_ = m), m == null && (m = _), {
2517
2617
  value: r(
2518
2618
  _,
@@ -2520,7 +2620,7 @@ function vt(t) {
2520
2620
  s.length,
2521
2621
  s.indexOf(u)
2522
2622
  ),
2523
- label: rt
2623
+ label: ut
2524
2624
  };
2525
2625
  }
2526
2626
  return i;
@@ -2528,22 +2628,22 @@ function vt(t) {
2528
2628
  };
2529
2629
  })) };
2530
2630
  }
2531
- function Pa(t, e) {
2532
- const r = xe(t) / 2;
2631
+ function eo(t, e) {
2632
+ const r = t.bandwidth() / 2;
2533
2633
  return (n, a) => t(t.domain()[e + (a - 1)]) + r;
2534
2634
  }
2535
- function Ga(t, e) {
2635
+ function to(t, e) {
2536
2636
  return (r, n) => t(e + (n - 1));
2537
2637
  }
2538
- function ja(t, e, r, n) {
2539
- return Lt().x(
2540
- U(r) ? Pa(r, t) : Ga(r, t)
2638
+ function no(t, e, r, n) {
2639
+ return $t().x(
2640
+ te(r) ? eo(r, t) : to(r, t)
2541
2641
  ).y((o) => n(o))(e);
2542
2642
  }
2543
- const Ue = 1, Fa = /* @__PURE__ */ D({
2643
+ const Qe = 1, ro = /* @__PURE__ */ C({
2544
2644
  __name: "lume-line-group",
2545
2645
  props: {
2546
- ...de(),
2646
+ ...ge(),
2547
2647
  withPoints: {
2548
2648
  type: Boolean,
2549
2649
  default: !0
@@ -2555,80 +2655,82 @@ const Ue = 1, Fa = /* @__PURE__ */ D({
2555
2655
  },
2556
2656
  emits: ["line-click", "point-click", "lume__internal--hover"],
2557
2657
  setup(t, { emit: e }) {
2558
- const r = t, { data: n, options: a, xScale: o, yScale: l } = N(r), i = Oe(
2658
+ const r = t, { data: n, options: a, xScale: o, yScale: l } = B(r), i = pe(
2559
2659
  "tooltipAnchorAttributes",
2560
2660
  null
2561
- ), { updateTooltipAnchorAttributes: u } = it(
2661
+ ), { updateTooltipAnchorAttributes: u } = ft(
2562
2662
  i,
2563
2663
  a,
2564
2664
  o,
2565
2665
  l
2566
- ), s = d(() => {
2567
- if (n.value.every(($) => $.isDashed))
2666
+ ), s = c(() => {
2667
+ if (n.value.every((E) => E.isDashed))
2568
2668
  return n.value;
2569
- const { computedLineData: g } = vt(n);
2570
- return a.value.withTooltip !== !1 && (i != null && i.value) && u(g.value), g.value;
2571
- }), c = d(() => {
2669
+ const { computedLineData: y } = gt(n);
2670
+ return a.value.withTooltip !== !1 && (i != null && i.value) && u(y.value), y.value;
2671
+ }), d = c(() => {
2572
2672
  if (r.hoveredIndex === -1)
2573
2673
  return;
2574
- const g = Gt(
2674
+ const y = Mt(
2575
2675
  s.value,
2576
2676
  r.hoveredIndex
2577
2677
  );
2578
2678
  return {
2579
- d: `M ${be(o.value, r.hoveredIndex)},${l.value.range()[1]}
2580
- V ${l.value(g)}`
2679
+ d: `M ${$e(o.value, r.hoveredIndex)},${l.value.range()[1]}
2680
+ V ${l.value(y)}`
2581
2681
  // Move to X index, Vertical line to the highest point
2582
2682
  };
2583
- }), v = d(
2584
- () => o.value && Ue / (jt(o.value) - 1)
2683
+ }), v = c(
2684
+ () => o.value && Qe / (zt(o.value) - 1)
2585
2685
  // Subtracting the first line (read below)
2586
- ), p = d(
2686
+ ), f = c(
2587
2687
  () => {
2588
- var g;
2589
- return ((g = a.value) == null ? void 0 : g.lineWidth) * 2 || void 0;
2688
+ var y;
2689
+ return ((y = a.value) == null ? void 0 : y.lineWidth) * 2 || void 0;
2590
2690
  }
2591
2691
  // If no `lineWidth`, returns NaN which needs to be undefined
2592
- ), h = d(() => xe(o.value) / 2), _ = d(() => o.value.domain()), m = d(
2692
+ ), h = c(
2693
+ () => o.value.bandwidth() / 2
2694
+ ), _ = c(() => o.value.domain()), m = c(
2593
2695
  () => a.value.withPoints ?? r.withPoints
2594
2696
  );
2595
- function A(g) {
2596
- return s.value[g].values;
2697
+ function k(y) {
2698
+ return s.value[y].values;
2597
2699
  }
2598
- function f(g, $) {
2599
- var w, S;
2600
- const b = g === 0 ? [] : [
2601
- (w = A($)[g - 1]) == null ? void 0 : w.value,
2602
- (S = A($)[g]) == null ? void 0 : S.value
2700
+ function p(y, E) {
2701
+ var F, G;
2702
+ const R = y === 0 ? [] : [
2703
+ (F = k(E)[y - 1]) == null ? void 0 : F.value,
2704
+ (G = k(E)[y]) == null ? void 0 : G.value
2603
2705
  ];
2604
- return ja(
2605
- g,
2606
- b,
2706
+ return no(
2707
+ y,
2708
+ R,
2607
2709
  o.value,
2608
2710
  l.value
2609
2711
  ) || "";
2610
2712
  }
2611
- function T(g) {
2713
+ function T(y) {
2612
2714
  return {
2613
- animationDelay: g < 2 ? 0 : (g - 1) * v.value,
2715
+ animationDelay: y < 2 ? 0 : (y - 1) * v.value,
2614
2716
  animationDuration: v.value
2615
2717
  };
2616
2718
  }
2617
- function O(g, $) {
2618
- var w;
2619
- const b = (w = A($)[g]) == null ? void 0 : w.value;
2719
+ function O(y, E) {
2720
+ var F;
2721
+ const R = (F = k(E)[y]) == null ? void 0 : F.value;
2620
2722
  return {
2621
- x: U(o.value) ? r.xScale(_.value[g]) + h.value : r.xScale(g),
2622
- y: l.value(b)
2723
+ x: te(o.value) ? r.xScale(_.value[y]) + h.value : r.xScale(y),
2724
+ y: l.value(R)
2623
2725
  };
2624
2726
  }
2625
- function k(g) {
2626
- return r.hoveredIndex === g;
2727
+ function A(y) {
2728
+ return r.hoveredIndex === y;
2627
2729
  }
2628
- return { __sfc: !0, LUME_TRANSITION_TIME_FULL: Ue, props: r, emit: e, data: n, options: a, xScale: o, yScale: l, tooltipAnchorAttributes: i, updateTooltipAnchorAttributes: u, computedGroupData: s, overlayLineAttributes: c, animationDuration: v, pointRadius: p, xAxisOffset: h, domain: _, computedWithPoints: m, getValuesFromDataset: A, getPathDefinition: f, getLineTransitionParams: T, getPointPosition: O, isPointActive: k, LumeLine: Ca, LumePoint: Ba };
2730
+ return { __sfc: !0, LUME_TRANSITION_TIME_FULL: Qe, props: r, emit: e, data: n, options: a, xScale: o, yScale: l, tooltipAnchorAttributes: i, updateTooltipAnchorAttributes: u, computedGroupData: s, overlayLineAttributes: d, animationDuration: v, pointRadius: f, xAxisOffset: h, domain: _, computedWithPoints: m, getValuesFromDataset: k, getPathDefinition: p, getLineTransitionParams: T, getPointPosition: O, isPointActive: A, LumeLine: Ua, LumePoint: qa };
2629
2731
  }
2630
2732
  });
2631
- var Va = function() {
2733
+ var ao = function() {
2632
2734
  var e = this, r = e._self._c, n = e._self._setupProxy;
2633
2735
  return r("g", { staticClass: "lume-line-group", attrs: { "data-j-lume-line-group": "" } }, [r("path", e._b({ staticClass: "lume-line-group__overlay-line", attrs: { "data-j-lume-line-group__overlay-line": "" } }, "path", n.overlayLineAttributes, !1)), e._l(n.computedGroupData, function(a, o) {
2634
2736
  return r("g", { key: a.label, staticClass: "lume-line-group__group" }, [r("g", { staticClass: "lume-line-group__lines" }, e._l(a.values, function(l, i) {
@@ -2641,33 +2743,33 @@ var Va = function() {
2641
2743
  } } }, "lume-point", n.getPointPosition(i, o), !1));
2642
2744
  }), 1) : e._e()]);
2643
2745
  })], 2);
2644
- }, Ma = [], za = /* @__PURE__ */ I(
2645
- Fa,
2646
- Va,
2647
- Ma,
2746
+ }, oo = [], lo = /* @__PURE__ */ I(
2747
+ ro,
2748
+ ao,
2749
+ oo,
2648
2750
  !1,
2649
2751
  null,
2650
- "299f46e4",
2752
+ "c4d7f0ca",
2651
2753
  null,
2652
2754
  null
2653
2755
  );
2654
- const _t = za.exports, Wa = {
2655
- margins: X.VERTICAL,
2756
+ const yt = lo.exports, uo = {
2757
+ margins: q.VERTICAL,
2656
2758
  startOnZero: !0,
2657
2759
  withTooltip: !0,
2658
2760
  xAxisOptions: {},
2659
2761
  yAxisOptions: { gridLines: !0 }
2660
- }, Za = /* @__PURE__ */ D({
2762
+ }, io = /* @__PURE__ */ C({
2661
2763
  __name: "lume-line-chart",
2662
2764
  props: {
2663
- ...q(null, !1)
2765
+ ...ae(null, !1)
2664
2766
  },
2665
2767
  setup(t) {
2666
- const e = t, r = Y(G()), { options: n } = N(e), { allOptions: a } = j(n, Wa);
2667
- return { __sfc: !0, props: e, slots: r, options: n, allOptions: a, LumeChart: ee, LumeLineGroup: _t };
2768
+ const e = t, r = ne(V()), { options: n } = B(e), { allOptions: a } = z(n, uo);
2769
+ return { __sfc: !0, props: e, slots: r, options: n, allOptions: a, LumeChart: oe, LumeLineGroup: yt };
2668
2770
  }
2669
2771
  });
2670
- var Xa = function() {
2772
+ var so = function() {
2671
2773
  var e = this, r = e._self._c, n = e._self._setupProxy;
2672
2774
  return r(n.LumeChart, e._b({ attrs: { "chart-type": "line", options: n.allOptions, "data-j-lume-line-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
2673
2775
  return [r(n.LumeLineGroup, e._b({}, "lume-line-group", a, !1))];
@@ -2676,28 +2778,28 @@ var Xa = function() {
2676
2778
  return [e._t(o, null, null, l || {})];
2677
2779
  } };
2678
2780
  })], null, !0) }, "lume-chart", n.props, !1));
2679
- }, Ua = [], Ya = /* @__PURE__ */ I(
2680
- Za,
2681
- Xa,
2682
- Ua,
2781
+ }, co = [], vo = /* @__PURE__ */ I(
2782
+ io,
2783
+ so,
2784
+ co,
2683
2785
  !1,
2684
2786
  null,
2685
2787
  null,
2686
2788
  null,
2687
2789
  null
2688
2790
  );
2689
- const vo = Ya.exports;
2690
- function Ka(t) {
2691
- return { areaPathDefinition: d(
2791
+ const Io = vo.exports;
2792
+ function _o(t) {
2793
+ return { areaPathDefinition: c(
2692
2794
  () => function(r, n) {
2693
2795
  if (!r || !n)
2694
2796
  return;
2695
2797
  const a = t.value[0].values;
2696
- return xt().x((o, l) => r(l)).y0(n(Math.min(...n.domain()))).y1((o) => n(o.value))(a);
2798
+ return It().x((o, l) => r(l)).y0(n(Math.min(...n.domain()))).y1((o) => n(o.value))(a);
2697
2799
  }
2698
2800
  ) };
2699
2801
  }
2700
- const Ja = {
2802
+ const fo = {
2701
2803
  margins: {
2702
2804
  top: 0,
2703
2805
  right: 0,
@@ -2711,35 +2813,36 @@ const Ja = {
2711
2813
  tooltipOptions: {
2712
2814
  showTitle: !1
2713
2815
  }
2714
- }, Qa = /* @__PURE__ */ D({
2816
+ }, po = /* @__PURE__ */ C({
2715
2817
  __name: "lume-sparkline-chart",
2716
2818
  props: {
2717
- ...Ee(null),
2718
- ...ae()
2819
+ ...He(null),
2820
+ ...ie()
2719
2821
  },
2720
2822
  setup(t, { expose: e }) {
2721
- const r = t, n = Y(G()), { data: a, options: o } = N(r), { internalData: l } = De(a), { allOptions: i } = j(o, Ja), { computedLineData: u } = vt(l), { areaPathDefinition: s } = Ka(u), c = d(() => l.value[0].color), v = d(
2722
- () => a.value[0].areaColor || c.value
2823
+ const r = t, n = ne(V()), { data: a, options: o } = B(r), { internalData: l } = Se(a), { allOptions: i } = z(o, fo), { computedLineData: u } = gt(l), { areaPathDefinition: s } = _o(u), d = c(() => l.value[0].color), v = c(
2824
+ () => a.value[0].areaColor || d.value
2723
2825
  );
2724
- function p(_) {
2826
+ function f(_) {
2725
2827
  return {
2726
2828
  ..._,
2727
2829
  noMinSize: !0
2728
2830
  };
2729
2831
  }
2730
- function h(_, m, A) {
2731
- return ne().range([0, A.width]).domain([0, _[0].values.length - 1]);
2832
+ function h(_, m, k) {
2833
+ return ue().range([0, k.width]).domain([0, _[0].values.length - 1]);
2732
2834
  }
2733
2835
  return e({
2734
2836
  areaPathDefinition: s
2735
- }), { __sfc: !0, props: r, slots: n, data: a, options: o, internalData: l, allOptions: i, computedLineData: u, areaPathDefinition: s, computedColor: c, areaColor: v, getSparklineOptions: p, xScaleGenerator: h, LumeChart: ee, LumeLineGroup: _t };
2837
+ }), { __sfc: !0, props: r, slots: n, data: a, options: o, internalData: l, allOptions: i, computedLineData: u, areaPathDefinition: s, computedColor: d, areaColor: v, getSparklineOptions: f, xScaleGenerator: h, LumeChart: oe, LumeLineGroup: yt };
2736
2838
  }
2737
2839
  });
2738
- var qa = function() {
2840
+ var mo = function() {
2739
2841
  var e = this, r = e._self._c, n = e._self._setupProxy;
2740
2842
  return r(n.LumeChart, e._b({ attrs: { "chart-type": "line", options: n.getSparklineOptions(n.allOptions), "x-scale": n.xScaleGenerator }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
2741
2843
  return [n.allOptions.showArea ? r("path", { class: [
2742
2844
  "sparkline-chart__area",
2845
+ n.options.withTransition !== !1 ? "sparkline-chart__area--transition" : "",
2743
2846
  `lume-fill--${n.areaColor || n.computedColor}`,
2744
2847
  "lume-fill--faded"
2745
2848
  ], attrs: { d: n.areaPathDefinition(a.xScale, a.yScale), "data-j-sparkline__area": "" } }) : e._e(), r(n.LumeLineGroup, e._b({ attrs: { "with-points": !1 } }, "lume-line-group", a, !1))];
@@ -2748,36 +2851,41 @@ var qa = function() {
2748
2851
  return [e._t(o, null, null, l || {})];
2749
2852
  } };
2750
2853
  })], null, !0) }, "lume-chart", n.props, !1));
2751
- }, eo = [], to = /* @__PURE__ */ I(
2752
- Qa,
2753
- qa,
2754
- eo,
2854
+ }, ho = [], go = /* @__PURE__ */ I(
2855
+ po,
2856
+ mo,
2857
+ ho,
2755
2858
  !1,
2756
2859
  null,
2757
- "60a59b77",
2860
+ "9fc2cb6e",
2758
2861
  null,
2759
2862
  null
2760
2863
  );
2761
- const _o = to.exports;
2864
+ const wo = go.exports;
2762
2865
  export {
2763
- lo as LumeAlluvialDiagram,
2764
- zr as LumeAlluvialGroup,
2765
- dn as LumeAxis,
2766
- Ie as LumeBar,
2767
- uo as LumeBarChart,
2768
- Ce as LumeBarGroup,
2769
- ee as LumeChart,
2770
- Tn as LumeChartContainer,
2771
- wn as LumeChartLegend,
2772
- so as LumeGroupedBarChart,
2773
- Ca as LumeLine,
2774
- vo as LumeLineChart,
2775
- _t as LumeLineGroup,
2776
- vr as LumeOverlayGroup,
2777
- Ba as LumePoint,
2778
- io as LumeSingleBarChart,
2779
- _o as LumeSparklineChart,
2780
- co as LumeStackedBarChart,
2781
- Un as LumeTooltip
2866
+ To as LumeAlluvialDiagram,
2867
+ la as LumeAlluvialGroup,
2868
+ Er as LumeAlluvialNodeLabel,
2869
+ Hr as LumeAlluvialNodeValue,
2870
+ fn as LumeAxis,
2871
+ Re as LumeBar,
2872
+ Lo as LumeBarChart,
2873
+ Be as LumeBarGroup,
2874
+ oe as LumeChart,
2875
+ xn as LumeChartContainer,
2876
+ Nn as LumeChartLegend,
2877
+ xo as LumeGroupedBarChart,
2878
+ Ua as LumeLine,
2879
+ Io as LumeLineChart,
2880
+ yt as LumeLineGroup,
2881
+ pr as LumeOverlayGroup,
2882
+ qa as LumePoint,
2883
+ Oo as LumeSingleBarChart,
2884
+ wo as LumeSparklineChart,
2885
+ $o as LumeStackedBarChart,
2886
+ Jn as LumeTooltip,
2887
+ Zn as LumeTooltipItem,
2888
+ jn as LumeTooltipSummary,
2889
+ Sn as LumeTooltipTitle
2782
2890
  };
2783
2891
  //# sourceMappingURL=index.js.map