@adyen/lume 0.6.1 → 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 Ue, computed as d, watch as C, toRefs as N, inject as Te, reactive as ue, onMounted as M, onBeforeUnmount as Ye, watchEffect as Ke, useSlots as G, provide as _e, defineAsyncComponent as pe } from "vue";
2
- import { format as Ot, ticks as Lt, scaleBand as te, scaleLinear as ne, line as xt, area as $t } from "d3";
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
3
  import { createPopper as wt } from "@popperjs/core";
4
- import { sankeyLinkHorizontal as It, sankey as Et, sankeyJustify as Dt } from "d3-sankey";
5
- const Ct = /* @__PURE__ */ D({
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 Ct = /* @__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,20 +60,20 @@ 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;
64
- u.render = function(h, v) {
65
- return s.call(v), c(h, v);
63
+ var d = u.render;
64
+ u.render = function(h, _) {
65
+ return s.call(_), d(h, _);
66
66
  };
67
67
  } else {
68
- var _ = u.beforeCreate;
69
- u.beforeCreate = _ ? [].concat(_, s) : [s];
68
+ var v = u.beforeCreate;
69
+ u.beforeCreate = v ? [].concat(v, s) : [s];
70
70
  }
71
71
  return {
72
72
  exports: t,
73
73
  options: u
74
74
  };
75
75
  }
76
- var Ht = 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,52 +83,59 @@ var Ht = 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
- }, Nt = [], Rt = /* @__PURE__ */ I(
87
- Ct,
86
+ }, Ht = [], St = /* @__PURE__ */ I(
87
+ Dt,
88
+ Rt,
88
89
  Ht,
89
- Nt,
90
90
  !1,
91
91
  null,
92
92
  "59ddc0a6",
93
93
  null,
94
94
  null
95
95
  );
96
- const Bt = Rt.exports;
97
- function Je() {
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 Oe(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 fe(t) {
120
+ function Te(t) {
114
121
  return !!t && typeof t == "object" && !Array.isArray(t);
115
122
  }
116
- function qe(t, e) {
123
+ function at(t, e) {
117
124
  const r = { ...t };
118
125
  return Object.entries(e).forEach(([n, a]) => {
119
- r[n] = fe(t[n]) && fe(a) ? qe(t[n], a) : a;
126
+ r[n] = Te(t[n]) && Te(a) ? at(t[n], a) : a;
120
127
  }), r;
121
128
  }
122
- function Pt(t) {
123
- return t != null && fe(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 Gt(t) {
129
- return U(t) ? t.step() : 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 jt = (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 jt = (t, e) => {
138
145
  throw new Error("Index exceeds length of at least one of the datasets");
139
146
  });
140
147
  };
141
- function Ft(t, e) {
148
+ function Mt(t, e) {
142
149
  var r;
143
- return jt(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 me(t) {
151
- const e = Ue(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 me(t) {
157
164
  );
158
165
  return Array(r).fill(null);
159
166
  }
160
- function Vt(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 Mt(t, e) {
170
+ function Wt(t, e) {
164
171
  return (r) => Math.round(t * (1 - r) + e * r);
165
172
  }
166
- function zt(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 Wt = (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 && Je() || 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 = Ot(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 = Ue(e) ? e == null ? void 0 : e.value : e;
219
- return n ? qe(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 Xt = 0.15;
223
- function Ut(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, _) => c + _.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 * Xt;
247
+ n.value = s + s * Kt;
233
248
  }
234
249
  function i(u) {
235
250
  if (!e.value)
@@ -237,20 +252,20 @@ function Ut(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, _ = typeof r == "number" && r > 0 && r + 1 || Math.ceil(n.value / c);
241
- return u % _ === 0;
255
+ const d = a.value / s, v = typeof r == "number" && r > 0 && r + 1 || Math.ceil(n.value / d);
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 || {}), et = /* @__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))(et || {}), Le = /* @__PURE__ */ ((t) => (t.SkyTeal = "skyblue-darkteal", t.VioletRoyal = "violet-royalblue", t.VioletTeal = "violet-darkteal", t.GoldTeal = "gold-darkteal", t.GoldRoyal = "gold-royalblue", t))(Le || {}), tt = /* @__PURE__ */ ((t) => (t.Grey = "grey", t.Green = "green", t.Orange = "orange", t.Red = "red", t))(tt || {}), xe = /* @__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))(xe || {});
246
- const O = {
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 || {});
261
+ const L = {
247
262
  HORIZONTAL: "horizontal",
248
263
  VERTICAL: "vertical"
249
- }, Yt = {
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 O = {
263
278
  bottom: 28,
264
279
  left: 24
265
280
  }
266
- }, nt = "No data", Kt = 20, rt = 0.33, at = 0.5, ot = 12, lt = 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 O = {
280
295
  "left-start",
281
296
  "left-end"
282
297
  ];
283
- function ie(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 ut = {
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 ut = {
299
314
  tickFormat: null,
300
315
  /** Space between the tick label and the axis line. */
301
316
  tickPadding: 8
302
- }, qt = {
303
- ...ut,
317
+ }, nn = {
318
+ ...vt,
304
319
  withTitle: !1,
305
320
  skip: !0
306
- }, en = {
307
- ...ut,
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 + ot + lt
340
+ height: r.value.tickPadding + ct + dt
326
341
  };
327
342
  }
328
343
  function l() {
@@ -348,16 +363,16 @@ const ut = {
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 ut = {
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 ut = {
398
413
  }
399
414
  function o() {
400
415
  return {
401
- height: r.value.tickPadding + ot + lt,
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 ut = {
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 ut = {
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 ut = {
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 he = /* @__PURE__ */ ((t) => (t.bandScale = "band-scale-axis", t.linearScale = "linear-scale-axis", t))(he || {}), ge = /* @__PURE__ */ ((t) => (t.left = "left", t.bottom = "bottom", t))(ge || {}), 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 ge
499
+ validator: (t) => t in xe
485
500
  },
486
501
  containerSize: {
487
502
  type: Object,
@@ -493,72 +508,72 @@ const ln = /* @__PURE__ */ D({
493
508
  },
494
509
  orientation: {
495
510
  type: String,
496
- default: O.VERTICAL
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 = Te("isEmpty", x(!1)), s = ue({}), c = x(null), _ = x(null), p = x(null), h = d(
503
- () => r.type ? oe[r.type] : r.position
504
- ), v = 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(
507
- () => v.value === "x" && i.value === O.VERTICAL || v.value === "y" && i.value === O.HORIZONTAL
508
- ), { allOptions: b } = j(
521
+ ), m = c(
522
+ () => _.value === "x" && i.value === L.VERTICAL || _.value === "y" && i.value === L.HORIZONTAL
523
+ ), { allOptions: k } = z(
509
524
  l,
510
- v.value === "x" ? qt : en
511
- ), { showTick: f } = Ut(n, c, b.value.skip), T = d(() => {
512
- var E, H, R, J;
513
- return v.value === "y" && u.value ? `translate(0, ${((E = a.value) == null ? void 0 : E.height) / 2})` : v.value === "x" && u.value ? `translate(-${((H = a.value) == null ? void 0 : H.width) / 2}, ${(R = a.value) == null ? void 0 : R.height})` : `translate(0, ${v.value === "x" ? (J = a.value) == null ? void 0 : J.height : 0})`;
514
- }), L = 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 } = b.value, [H, R] = n.value.domain();
518
- return Lt(H, R, E);
519
- }), A = d(() => {
520
- const { tickFormat: E } = b.value;
521
- return le(E);
522
- }), g = d(
523
- () => b.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 } = b.value;
527
- return H === !1 ? "" : A.value(E);
540
+ function E(w) {
541
+ const { showTicks: N } = k.value;
542
+ return N === !1 ? "" : A.value(w);
528
543
  }
529
- function k(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 B(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 = L.value.map(
541
- (E, H) => ({
542
- value: $(E),
543
- group: s.getTickGroupAttributes(E, H),
544
- ghost: s.getTickGhostAttributes(B(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[`${v.value}-${he[E]}`];
552
- Object.entries(H(n, a, b) || []).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(() => ie(_.value)), { __sfc: !0, SCALE_MIXIN_MAP: he, POSITIONS: ge, TYPES: oe, props: r, emit: e, scale: n, containerSize: a, hoveredIndex: o, options: l, orientation: i, isEmpty: u, mixins: s, tickRefs: c, root: _, ticksWithAttributes: p, computedPosition: h, computedType: v, shouldHover: m, allOptions: b, showTick: f, axisTransform: T, ticks: L, tickFormatter: A, isHovering: g, formatTick: $, handleTickMouseenter: k, handleTickClick: w, getTextNode: B, setTicks: F, init: K, LumeTick: Bt };
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
- ), _ = d(() => i.value === "width"), p = d(() => i.value === "height"), h = _n(n, a, o, l), { computedX: v, computedY: m, shouldHaveMinWidth: b, shouldHaveMinHeight: f } = vn(n, a, o, l), T = d(() => b.value ? 1 : (_.value ? h.computedWidth : o).value), L = d(() => f.value ? 1 : (p.value ? h.computedHeight : l).value), A = _.value || p.value ? h.transformOrigin : null;
648
- return M(() => ie(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: _, shouldTransitionHeight: p, transitionProps: h, computedX: v, computedY: m, shouldHaveMinWidth: b, shouldHaveMinHeight: f, computedWidth: T, computedHeight: L, transformOrigin: A };
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 $e = hn.exports;
679
- function gn() {
680
- const t = x(), e = ue({
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
- }), Ye(() => {
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 Ke(() => {
743
+ return tt(() => {
729
744
  if (!l.value)
730
745
  return;
731
- const { width: _ } = u.dimensions, { height: p } = l.value.getBoundingClientRect();
732
- if (!_ || !p)
746
+ const { width: v } = u.dimensions, { height: f } = l.value.getBoundingClientRect();
747
+ if (!v || !f)
733
748
  return;
734
- const h = _ - s.value.left - s.value.right, v = 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
- height: v > 0 ? v : 0,
737
- outerWidth: _,
738
- outerHeight: p
751
+ height: _ > 0 ? _ : 0,
752
+ outerWidth: v,
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 = Te("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
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
- }, Bn = [], Sn = /* @__PURE__ */ I(
824
- Nn,
825
- Rn,
838
+ }, Pn = [], Gn = /* @__PURE__ */ I(
826
839
  Bn,
840
+ Fn,
841
+ Pn,
827
842
  !1,
828
843
  null,
829
844
  "4ed7ec1b",
830
845
  null,
831
846
  null
832
847
  );
833
- const Pn = Sn.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 = Sn.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
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
- ), _ = d(() => [
913
+ ), v = c(() => [
899
914
  {
900
915
  name: "computeStyles",
901
916
  options: {
@@ -908,40 +923,40 @@ 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)), v = d(() => le(u.value.titleFormat)), m = d(
928
+ ), h = c(() => fe(u.value.valueFormat)), _ = c(() => fe(u.value.titleFormat)), m = c(
914
929
  () => {
915
930
  var A;
916
- return ((A = a.value) == null ? void 0 : A.find((g) => g.isSummary)) || {
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
- ), b = d(() => l.summary || m.value.label);
921
- function f() {
935
+ ), k = c(() => l.summary || m.value.label);
936
+ function p() {
922
937
  r.targetElement && n.value && (i.value = wt(r.targetElement, n.value, {
923
938
  placement: r.position,
924
- strategy: c.value,
925
- modifiers: _.value
939
+ strategy: d.value,
940
+ modifiers: v.value
926
941
  }), e("opened", r.targetElement));
927
942
  }
928
943
  function T() {
929
944
  i.value && (i.value.destroy(), e("closed"));
930
945
  }
931
- function L() {
946
+ function O() {
932
947
  i.value && (n.value.classList.add("lume-tooltip--animated"), r.targetElement ? function() {
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
- (A, g) => {
939
- !g && A ? f() : L();
953
+ (A, y) => {
954
+ !y && A ? p() : O();
940
955
  }
941
- ), M(f), Ye(T), { __sfc: !0, props: r, emit: e, root: n, items: a, options: o, slots: l, popper: i, allOptions: u, computedFixedPositioning: s, strategy: c, allModifiers: _, showTitle: p, formatValue: h, formatTitle: v, summaryItem: m, hasSummary: b, initPopper: f, destroyPopper: T, updatePopper: L, 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, se = P.Skyblue, Kn = Le.SkyTeal;
976
- function Jn(t) {
977
- return t === W.Divergent ? Kn : se;
978
- }
979
- function Qn(t) {
980
- return Object.values(xe).includes(t);
981
- }
982
- function Ne(t, e) {
983
- return e === W.Divergent ? Object.values(Le).includes(t) : Object.values({
984
- ...P,
985
- ...et,
986
- ...tt,
987
- ...xe
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 zt(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 Re(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 Ne(t, r) ? t : (n > 4 && (Z(V.ColorLoop), n = n % 5), Ne(e, r) ? Re(e, r, n) : Re(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) => Pt(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 we = (t = null) => ({
1037
+ const He = (t = null) => ({
1023
1038
  data: {
1024
1039
  type: Array,
1025
1040
  required: !0,
@@ -1031,41 +1046,41 @@ const we = (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 Ie(t, e, r, n, a) {
1042
- const o = ue({
1056
+ function Se(t, e, r, n, a) {
1057
+ const o = me({
1043
1058
  width: 0,
1044
1059
  height: 0
1045
- }), l = Wt(12), i = d(() => {
1046
- var c;
1047
- return t.value.length > 5 && Z(V.DatasetLength), (c = t.value) == null ? void 0 : c.map(
1048
- (_, p) => {
1049
- if (ar(_))
1050
- return _;
1051
- const h = rr(_.values), v = nr(
1052
- _.color,
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))
1065
+ return v;
1066
+ const h = lr(v.values), _ = or(
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,
1059
1074
  values: h,
1060
- color: v,
1075
+ color: _,
1061
1076
  __internal: !0
1062
1077
  };
1063
1078
  }
1064
1079
  );
1065
- }), u = d(() => Array.isArray(e.value) ? e.value : me(t.value).map((c, _) => _));
1066
- function s(c) {
1067
- const _ = (a == null ? void 0 : a.value) === O.HORIZONTAL && me(t).length * (Kt * 2) || c.height;
1068
- o.width = c.width, o.height = _;
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 Ie(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,69 +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
1106
  const { width: u, height: s } = r;
1092
- !u && !s || !e.value || !t.value || (n.value === O.HORIZONTAL ? (o.value = Se(
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 = Be(
1112
+ ), l.value = je(
1098
1113
  e.value,
1099
1114
  s,
1100
1115
  n.value,
1101
1116
  a.value
1102
- )) : (o.value = Be(
1117
+ )) : (o.value = je(
1103
1118
  e.value,
1104
1119
  u,
1105
1120
  n.value,
1106
1121
  a.value
1107
- ), l.value = Se(
1122
+ ), l.value = Ve(
1108
1123
  t.value,
1109
1124
  s,
1110
1125
  n.value,
1111
1126
  a.value.startOnZero
1112
1127
  )));
1113
1128
  }
1114
- return Ke(i), { xScale: o, yScale: l };
1129
+ return tt(i), { xScale: o, yScale: l };
1115
1130
  }
1116
- function Be(t, e, r, n) {
1117
- const a = [0, e], { padding: o, paddingInner: l, paddingOuter: i } = n, u = o ?? (r === O.HORIZONTAL ? at : rt);
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);
1118
1133
  return Object.assign(
1119
- te().range(a).paddingInner(l ?? u).paddingOuter(i ?? u).domain(t.map((s, c) => c)),
1134
+ le().range(a).paddingInner(l ?? u).paddingOuter(i ?? u).domain(t.map((s, d) => d)),
1120
1135
  { labels: t }
1121
1136
  );
1122
1137
  }
1123
- function Se(t, e, r, n) {
1124
- 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];
1125
1140
  if (a.length === 0)
1126
- return ne().range(o).domain([0, 0]).nice();
1127
- const l = Math.min(...a), i = n && l > 0 ? 0 : l, u = Math.max(...a), s = r === O.HORIZONTAL ? [i, u] : [u, i];
1128
- return ne().range(o).domain(s).nice();
1141
+ return ue().range(o).domain([0, 0]).nice();
1142
+ const l = Math.min(...a), i = n && l > 0 ? 0 : l, u = Math.max(...a), s = r === L.HORIZONTAL ? [i, u] : [u, i];
1143
+ return ue().range(o).domain(s).nice();
1129
1144
  }
1130
- function Pe(t) {
1145
+ function Me(t) {
1131
1146
  return (t == null ? void 0 : t.range) !== void 0 || (t == null ? void 0 : t.copy) !== void 0;
1132
1147
  }
1133
- function ye(t, e) {
1134
- 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);
1135
1150
  }
1136
- function Ge(t, e, {
1151
+ function ze(t, e, {
1137
1152
  padding: r,
1138
1153
  paddingInner: n,
1139
1154
  paddingOuter: a
1140
1155
  } = {}) {
1141
- const o = r ?? (e === O.HORIZONTAL ? at : rt);
1156
+ const o = r ?? (e === L.HORIZONTAL ? st : it);
1142
1157
  return t.copy().paddingInner(n ?? o).paddingOuter(a ?? o / 2);
1143
1158
  }
1144
- function it(t) {
1145
- return Object.values(O).includes(t);
1159
+ function _t(t) {
1160
+ return Object.values(L).includes(t);
1146
1161
  }
1147
- const q = (t, e = !0) => ({
1148
- ...we(t),
1149
- ...or(),
1150
- ...ae(),
1162
+ const ae = (t, e = !0) => ({
1163
+ ...He(t),
1164
+ ...ir(),
1165
+ ...ie(),
1151
1166
  classList: {
1152
1167
  type: [String, Array],
1153
1168
  default: () => []
@@ -1159,18 +1174,18 @@ const q = (t, e = !0) => ({
1159
1174
  ...e ? {
1160
1175
  orientation: {
1161
1176
  type: String,
1162
- default: O.VERTICAL,
1163
- validator: it
1177
+ default: L.VERTICAL,
1178
+ validator: _t
1164
1179
  }
1165
1180
  } : {}
1166
- }), ur = (t) => ({
1167
- ...we(t),
1168
- ...ae(),
1181
+ }), cr = (t) => ({
1182
+ ...He(t),
1183
+ ...ie(),
1169
1184
  hoveredElement: {
1170
1185
  type: [Number, String],
1171
1186
  default: null
1172
1187
  }
1173
- }), ce = () => ({
1188
+ }), ge = () => ({
1174
1189
  data: {
1175
1190
  type: Array,
1176
1191
  required: !0
@@ -1185,8 +1200,8 @@ const q = (t, e = !0) => ({
1185
1200
  },
1186
1201
  orientation: {
1187
1202
  type: String,
1188
- default: O.VERTICAL,
1189
- validator: it
1203
+ default: L.VERTICAL,
1204
+ validator: _t
1190
1205
  },
1191
1206
  xScale: {
1192
1207
  type: Function,
@@ -1212,35 +1227,35 @@ const q = (t, e = !0) => ({
1212
1227
  type: [String, Array],
1213
1228
  default: () => []
1214
1229
  }
1215
- }), ir = /* @__PURE__ */ D({
1230
+ }), dr = /* @__PURE__ */ C({
1216
1231
  __name: "lume-overlay-group",
1217
1232
  props: {
1218
- ...ce(),
1233
+ ...ge(),
1219
1234
  orientation: {
1220
1235
  type: String,
1221
- default: O.VERTICAL
1236
+ default: L.VERTICAL
1222
1237
  }
1223
1238
  },
1224
1239
  emits: ["click", "lume__internal--hover", "mouseover"],
1225
1240
  setup(t, { emit: e }) {
1226
- const r = t, { data: n, orientation: a, xScale: o, yScale: l } = N(r), i = d(() => me(n));
1241
+ const r = t, { data: n, orientation: a, xScale: o, yScale: l } = B(r), i = c(() => Le(n));
1227
1242
  function u(s) {
1228
- var b;
1229
- const c = a.value === O.HORIZONTAL ? l.value : o.value, _ = c.domain(), p = Gt(c), h = ((b = c.paddingInner) == null ? void 0 : b.call(c)) ?? 0, v = p * h, m = U(c) ? c(_[s]) - v / 2 : c(s) - p / 2;
1230
- return a.value === O.HORIZONTAL ? {
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;
1245
+ return a.value === L.HORIZONTAL ? {
1231
1246
  width: Math.max(...o.value.range()),
1232
- height: p,
1247
+ height: f,
1233
1248
  transform: `translate(0, ${m})`
1234
1249
  } : {
1235
- width: p,
1250
+ width: f,
1236
1251
  height: Math.max(...l.value.range()),
1237
1252
  transform: `translate(${m}, 0)`
1238
1253
  };
1239
1254
  }
1240
- return { __sfc: !0, props: r, emit: e, data: n, orientation: a, xScale: o, yScale: l, overlayData: i, getOverlayBarAttributes: u, LumeBar: $e };
1255
+ return { __sfc: !0, props: r, emit: e, data: n, orientation: a, xScale: o, yScale: l, overlayData: i, getOverlayBarAttributes: u, LumeBar: Re };
1241
1256
  }
1242
1257
  });
1243
- var sr = function() {
1258
+ var vr = function() {
1244
1259
  var e = this, r = e._self._c, n = e._self._setupProxy;
1245
1260
  return r("g", { staticClass: "lume-overlay-group" }, e._l(n.overlayData, function(a, o) {
1246
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) {
@@ -1249,74 +1264,74 @@ var sr = function() {
1249
1264
  return n.emit("click", { index: o, event: l });
1250
1265
  } } }, "lume-bar", n.getOverlayBarAttributes(o), !1));
1251
1266
  }), 1);
1252
- }, cr = [], dr = /* @__PURE__ */ I(
1253
- ir,
1254
- sr,
1255
- cr,
1267
+ }, _r = [], fr = /* @__PURE__ */ I(
1268
+ dr,
1269
+ vr,
1270
+ _r,
1256
1271
  !1,
1257
1272
  null,
1258
1273
  null,
1259
1274
  null,
1260
1275
  null
1261
1276
  );
1262
- const vr = dr.exports;
1263
- function _r(t) {
1264
- return { hasNegativeValues: d(
1265
- () => 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)
1266
1281
  ) };
1267
1282
  }
1268
- function pr(t, e, r, n) {
1269
- const a = d(
1270
- () => n.value === O.HORIZONTAL
1271
- ), o = d(
1283
+ function hr(t, e, r, n) {
1284
+ const a = c(
1285
+ () => n.value === L.HORIZONTAL
1286
+ ), o = c(
1272
1287
  () => {
1273
1288
  var s;
1274
1289
  return t.height - (a != null && a.value ? 0 : ((s = r.value) == null ? void 0 : s.call(r, 0)) || 0);
1275
1290
  }
1276
- ), l = d(
1291
+ ), l = c(
1277
1292
  () => {
1278
1293
  var s;
1279
1294
  return a != null && a.value ? ((s = e.value) == null ? void 0 : s.call(e, 0)) || 0 : t.width;
1280
1295
  }
1281
- ), i = d(
1296
+ ), i = c(
1282
1297
  () => {
1283
1298
  var s;
1284
1299
  return a != null && a.value ? "translate(0, 0)" : `translate(0, ${((s = r.value) == null ? void 0 : s.call(r, 0)) || 0})`;
1285
1300
  }
1286
1301
  );
1287
- return { negativeBarAttributes: d(() => ({
1302
+ return { negativeBarAttributes: c(() => ({
1288
1303
  width: l.value,
1289
1304
  height: o.value,
1290
1305
  transform: i.value
1291
1306
  })) };
1292
1307
  }
1293
- function fr(t) {
1308
+ function gr(t) {
1294
1309
  return t.reduce((e, r) => r.values.map((n, a) => e[a] ? n.value > e[a] ? n.value : e[a] : n.value ?? 0), []);
1295
1310
  }
1296
- function mr(t) {
1311
+ function yr(t) {
1297
1312
  return t.reduce((e, r) => r.values.map((n, a) => {
1298
1313
  const o = n.value == null || n.value < 0 ? 0 : n.value;
1299
1314
  return e[a] ? e[a] + o : o;
1300
1315
  }), []);
1301
1316
  }
1302
- const je = {
1303
- "stacked-bar": mr
1317
+ const We = {
1318
+ "stacked-bar": yr
1304
1319
  };
1305
- function st(t, e, r, n, a, o, l) {
1306
- const i = d(
1320
+ function ft(t, e, r, n, a, o, l) {
1321
+ const i = c(
1307
1322
  () => {
1308
1323
  var s;
1309
1324
  return e.value.withTooltip !== !1 && !((s = e.value.tooltipOptions) != null && s.targetElement);
1310
1325
  }
1311
1326
  );
1312
1327
  function u(s) {
1313
- const c = l != null && l.value && je[l.value] ? je[l.value](s) : fr(s);
1314
- t.value = c.map((_, p) => ({
1315
- cx: (a == null ? void 0 : a.value) === O.HORIZONTAL ? r.value(_) : ye(r.value, p),
1316
- cy: (a == null ? void 0 : a.value) === O.HORIZONTAL ? ye(n.value, p) : n.value(_)
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)
1317
1332
  }));
1318
1333
  }
1319
- return C(
1334
+ return D(
1320
1335
  [r, n],
1321
1336
  () => {
1322
1337
  r.value && n.value && (o != null && o.value) && i.value && u(o.value);
@@ -1324,8 +1339,8 @@ function st(t, e, r, n, a, o, l) {
1324
1339
  { immediate: !0 }
1325
1340
  ), { shouldGenerateTooltipAnchors: i, updateTooltipAnchorAttributes: u };
1326
1341
  }
1327
- function hr() {
1328
- const t = ue({
1342
+ function br() {
1343
+ const t = me({
1329
1344
  opened: !1,
1330
1345
  targetElement: null
1331
1346
  });
@@ -1335,125 +1350,125 @@ function hr() {
1335
1350
  t.opened = !1, t.targetElement = null;
1336
1351
  } };
1337
1352
  }
1338
- function gr(t) {
1339
- return { getTooltipItems: d(
1353
+ function kr(t) {
1354
+ return { getTooltipItems: c(
1340
1355
  () => (r) => t.value.map(({ color: n, label: a, values: o }) => {
1341
1356
  var l, i, u;
1342
1357
  return {
1343
1358
  color: ((l = o[r]) == null ? void 0 : l.color) || n,
1344
1359
  label: a,
1345
- value: ((i = o[r]) == null ? void 0 : i.label) ?? ((u = o[r]) == null ? void 0 : u.value) ?? nt
1360
+ value: ((i = o[r]) == null ? void 0 : i.label) ?? ((u = o[r]) == null ? void 0 : u.value) ?? ut
1346
1361
  };
1347
1362
  })
1348
1363
  ) };
1349
1364
  }
1350
- const yr = /* @__PURE__ */ D({
1365
+ const Ar = /* @__PURE__ */ C({
1351
1366
  __name: "lume-chart",
1352
1367
  props: {
1353
- ...q(),
1368
+ ...ae(),
1354
1369
  chartType: {
1355
1370
  type: String,
1356
1371
  default: null
1357
1372
  }
1358
1373
  },
1359
1374
  setup(t, { emit: e }) {
1360
- const r = t, n = G(), { data: a, labels: o, color: l, options: i, orientation: u, chartType: s } = N(r), c = x(-1), _ = x(null), p = x(null), h = x([]), { allOptions: v } = j(i), { internalData: m, computedLabels: b, containerSize: f, updateSize: T, chartID: L } = Ie(a, o, l, v, u), { xScale: A, 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(
1361
1376
  m,
1362
- b,
1363
- f,
1364
- u,
1365
- v
1366
- ), $ = d(() => {
1367
- var y;
1368
- return r.xScale ? Pe(r.xScale) ? r.xScale : (y = r.xScale) == null ? void 0 : y.call(r, m.value, o.value, f) : A.value;
1369
- }), k = d(() => {
1370
- var y;
1371
- return r.yScale ? Pe(r.yScale) ? r.yScale : (y = r.yScale) == null ? void 0 : y.call(r, m.value, o.value, f) : g.value;
1372
- }), w = d(() => ({
1373
- ...v.value.xAxisOptions,
1374
- withHover: u.value === O.VERTICAL
1375
- })), B = d(() => ({
1376
- ...v.value.yAxisOptions,
1377
- withHover: u.value === O.HORIZONTAL
1378
- })), F = d(() => {
1379
- var y;
1380
- return (y = v.value.xAxisOptions) == null ? void 0 : y.title;
1381
- }), K = d(() => {
1382
- var y;
1383
- return (y = v.value.yAxisOptions) == null ? void 0 : y.title;
1384
- }), E = d(() => {
1385
- var y;
1386
- return ((y = v.value.xAxisOptions) == null ? void 0 : y.withTitle) !== !1 && F.value;
1387
- }), H = d(() => {
1388
- var y;
1389
- return ((y = v.value.yAxisOptions) == null ? void 0 : y.withTitle) !== !1 && K.value;
1390
- }), R = d(
1391
- () => a.value.every((y) => !y.values.length)
1392
- ), J = d(() => {
1393
- const y = [], { noBaseScales: S } = v.value;
1394
- return S || y.push(() => !!($.value && k.value)), y.every((z) => z() === !0);
1395
- }), { hasNegativeValues: ft } = _r(m), { negativeBarAttributes: mt } = pr(
1396
- f,
1397
- $,
1398
1377
  k,
1378
+ p,
1379
+ u,
1380
+ _
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(() => ({
1388
+ ..._.value.xAxisOptions,
1389
+ withHover: u.value === L.VERTICAL
1390
+ })), G = c(() => ({
1391
+ ..._.value.yAxisOptions,
1392
+ withHover: u.value === L.HORIZONTAL
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,
1399
1414
  u
1400
- ), { shouldGenerateTooltipAnchors: ht } = st(
1415
+ ), { shouldGenerateTooltipAnchors: ce } = ft(
1401
1416
  h,
1402
- v,
1403
- $,
1404
- k,
1417
+ _,
1418
+ E,
1419
+ R,
1405
1420
  u,
1406
1421
  m,
1407
1422
  s
1408
- ), { tooltipConfig: De, showTooltip: Ce, hideTooltip: He } = hr(), { getTooltipItems: gt } = gr(m), yt = d(
1409
- () => v.value.withTooltip !== !1 && De.opened
1410
- ), bt = d(
1423
+ ), { tooltipConfig: Y, showTooltip: Z, hideTooltip: de } = br(), { getTooltipItems: Fe } = kr(m), ve = c(
1424
+ () => _.value.withTooltip !== !1 && Y.opened
1425
+ ), bt = c(
1411
1426
  () => {
1412
- var y;
1413
- return ((y = v.value.tooltipOptions) == null ? void 0 : y.position) || "top";
1427
+ var b;
1428
+ return ((b = _.value.tooltipOptions) == null ? void 0 : b.position) || "top";
1414
1429
  }
1415
1430
  );
1416
- function de(y) {
1417
- var S;
1418
- if (y !== c.value && (v.value.withHover !== !1 && (c.value = y), v.value.withTooltip !== !1)) {
1419
- const z = (S = v.value.tooltipOptions) != null && S.targetElement ? v.value.tooltipOptions.targetElement === "self" ? p.value.$el : v.value.tooltipOptions.targetElement : _.value[y];
1420
- Ce(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);
1421
1436
  }
1422
1437
  }
1423
- function ve(y) {
1424
- if (y > a.value[0].values.length - 1) {
1425
- Z(V.InvalidHoveredIndex);
1438
+ function be(b) {
1439
+ if (b > a.value[0].values.length - 1) {
1440
+ Q(X.InvalidHoveredIndex);
1426
1441
  return;
1427
1442
  }
1428
- de(y);
1443
+ ye(b);
1429
1444
  }
1430
1445
  function kt() {
1431
- He(), c.value = -1, e("chart-mouseleave");
1446
+ de(), d.value = -1, e("chart-mouseleave");
1432
1447
  }
1433
- function At({ index: y, value: S, event: z }) {
1434
- y !== null && de(y), e("axis-mouseenter", { index: y, value: S, 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 });
1435
1450
  }
1436
- function Tt({ index: y, value: S, event: z }) {
1437
- e("axis-click", { index: y, value: S, event: z });
1451
+ function Tt({ index: b, value: P, event: K }) {
1452
+ e("axis-click", { index: b, value: P, event: K });
1438
1453
  }
1439
- return C(
1454
+ return D(
1440
1455
  a,
1441
- (y, S) => e("data-changed", { newValue: y, oldValue: S })
1442
- ), C(
1456
+ (b, P) => e("data-changed", { newValue: b, oldValue: P })
1457
+ ), D(
1443
1458
  o,
1444
- (y, S) => e("labels-changed", { newValue: y, oldValue: S })
1445
- ), C(R, (y) => y && Z(V.Empty), { immediate: !0 }), C(() => r.hoveredIndex, ve), 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(
1446
1461
  h,
1447
- (y) => {
1448
- y && r.hoveredIndex != null && c.value === -1 && ve(r.hoveredIndex);
1462
+ (b) => {
1463
+ b && r.hoveredIndex != null && d.value === -1 && be(r.hoveredIndex);
1449
1464
  },
1450
1465
  { flush: "post" }
1451
- ), M(() => {
1466
+ ), U(() => {
1452
1467
  e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.');
1453
- }), _e("chartID", L), _e("isEmpty", R), _e("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: _, chartContainer: p, tooltipAnchorAttributes: h, allOptions: v, internalData: m, computedLabels: b, containerSize: f, updateSize: T, chartID: L, xScale: A, yScale: g, computedXScale: $, computedYScale: k, computedXAxisOptions: w, computedYAxisOptions: B, xAxisTitle: F, yAxisTitle: K, showXAxisTitle: E, showYAxisTitle: H, isEmpty: R, isReady: J, hasNegativeValues: ft, negativeBarAttributes: mt, shouldGenerateTooltipAnchors: ht, tooltipConfig: De, showTooltip: Ce, hideTooltip: He, getTooltipItems: gt, isTooltipOpened: yt, tooltipPosition: bt, handleInternalHover: de, handleExternalHover: ve, handleMouseleave: kt, handleAxisMouseenter: At, handleAxisClick: Tt, LumeAxis: dn, LumeBar: $e, 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 };
1454
1469
  }
1455
1470
  });
1456
- var br = function() {
1471
+ var Tr = function() {
1457
1472
  var e = this, r = e._self._c, n = e._self._setupProxy;
1458
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) {
1459
1474
  return n.emit("chart-click", a);
@@ -1502,18 +1517,48 @@ var br = function() {
1502
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) {
1503
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));
1504
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);
1505
- }, kr = [], Ar = /* @__PURE__ */ I(
1506
- yr,
1507
- br,
1508
- kr,
1520
+ }, Lr = [], Or = /* @__PURE__ */ I(
1521
+ Ar,
1522
+ Tr,
1523
+ Lr,
1509
1524
  !1,
1510
1525
  null,
1511
1526
  "19d7190c",
1512
1527
  null,
1513
1528
  null
1514
1529
  );
1515
- const ee = Ar.exports;
1516
- function Fe(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) {
1517
1562
  return {
1518
1563
  x0: 0 + (e ? e.left : 0),
1519
1564
  y0: 0 + (e ? e.top : 0),
@@ -1521,35 +1566,35 @@ function Fe(t, e) {
1521
1566
  y1: t.height - (e ? e.bottom : 0)
1522
1567
  };
1523
1568
  }
1524
- function Tr(t) {
1525
- const e = x(Fe(t));
1569
+ function Sr(t) {
1570
+ const e = $(Ze(t));
1526
1571
  function r(n) {
1527
- e.value = Fe(t, n);
1572
+ e.value = Ze(t, n);
1528
1573
  }
1529
1574
  return { extents: e, updateExtents: r };
1530
1575
  }
1531
- var ct = /* @__PURE__ */ ((t) => (t.GraphProblem = "There was an issue generating your alluvial graph.", t))(ct || {});
1532
- const Or = "[lume] ";
1533
- function Lr(t, e, r = !0) {
1534
- r && Je() || 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);
1535
1580
  }
1536
- const Ve = 8, xr = 8, $r = 20, wr = 200;
1537
- function Q(t) {
1581
+ const Xe = 8, Pr = 8, Gr = 20, jr = 200;
1582
+ function re(t) {
1538
1583
  return typeof t == "string" || typeof t == "number" ? t : t.id ?? t.label;
1539
1584
  }
1540
- function re(t) {
1585
+ function ee(t) {
1541
1586
  return t.source.id + ":" + t.target.id;
1542
1587
  }
1543
- function Ir(t, e) {
1588
+ function Vr(t, e) {
1544
1589
  return e.nodes.find((r) => r.id === t);
1545
1590
  }
1546
- function Er(t, e) {
1547
- return e.links.find((r) => re(r) === t);
1591
+ function Mr(t, e) {
1592
+ return e.links.find((r) => ee(r) === t);
1548
1593
  }
1549
- function dt(t) {
1594
+ function mt(t) {
1550
1595
  return !!(t.sourceLinks && t.targetLinks);
1551
1596
  }
1552
- function Dr(t, e) {
1597
+ function zr(t, e) {
1553
1598
  if (!e)
1554
1599
  return;
1555
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(
@@ -1566,33 +1611,41 @@ function Dr(t, e) {
1566
1611
  bottom: 0
1567
1612
  };
1568
1613
  }
1569
- function Cr(t) {
1614
+ function Wr(t) {
1570
1615
  return t.map((e) => ({
1571
1616
  x: e.x0,
1572
1617
  y: e.y0,
1573
1618
  width: e.x1 - e.x0,
1574
1619
  height: e.y1 - e.y0,
1575
1620
  textTransform: {
1576
- x: e.depth > 0 ? e.x1 + Ve : e.x0 - Ve,
1621
+ x: e.depth > 0 ? e.x1 + Xe : e.x0 - Xe,
1577
1622
  y: (e.y1 + e.y0) / 2
1578
1623
  },
1579
1624
  node: e
1580
1625
  }));
1581
1626
  }
1582
- function Hr(t) {
1583
- const e = It();
1584
- return t.map((r) => {
1585
- 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;
1586
1639
  return {
1587
- id: re(r),
1588
- color: r.color || ((n = r.source) == null ? void 0 : n.color) || se,
1589
- d: e(r),
1590
- strokeWidth: Math.max(1, r.width),
1591
- 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
1592
1645
  };
1593
1646
  });
1594
1647
  }
1595
- function Me(t, e, r, n, a) {
1648
+ function Ue(t, e, r, n, a) {
1596
1649
  if (n === !1) {
1597
1650
  t.node = {
1598
1651
  ...t.node,
@@ -1600,8 +1653,8 @@ function Me(t, e, r, n, a) {
1600
1653
  };
1601
1654
  return;
1602
1655
  }
1603
- const o = Date.now(), l = Mt(e, r), i = () => {
1604
- let s = (Date.now() - o) / wr;
1656
+ const o = Date.now(), l = Wt(e, r), i = () => {
1657
+ let s = (Date.now() - o) / jr;
1605
1658
  s > 1 && (s = 1), t.node = {
1606
1659
  ...t.node,
1607
1660
  transitionValue: a && s === 1 ? void 0 : l(s)
@@ -1609,99 +1662,106 @@ function Me(t, e, r, n, a) {
1609
1662
  };
1610
1663
  requestAnimationFrame(i);
1611
1664
  }
1612
- const Nr = {
1665
+ const Kr = {
1613
1666
  nodes: [],
1614
1667
  links: []
1615
1668
  };
1616
- function Rr(t, e, r) {
1617
- const n = x(null), a = d(() => {
1669
+ function Jr(t, e, r) {
1670
+ const n = $(null), a = c(() => {
1618
1671
  var i;
1619
- return (i = t.value) == null ? void 0 : i[0].values.map(({ label: u, color: s, value: c }) => ({
1620
- label: u || c.toString(),
1621
- color: s,
1622
- id: c
1623
- }));
1624
- }), 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(() => {
1625
1682
  var i;
1626
1683
  return (i = t.value) == null ? void 0 : i[0].values.map(
1627
1684
  (u) => {
1628
1685
  var s;
1629
- return (s = u.targets) == null ? void 0 : s.map(({ node: c, value: _, color: p }) => ({
1630
- color: p,
1631
- source: u.value ?? u.label,
1632
- target: c,
1633
- value: _
1634
- }));
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
+ );
1635
1695
  }
1636
1696
  ).filter(Boolean).flat();
1637
- }), l = d(() => Et().nodeId(Q).nodeAlign(e.value.nodeAlign).nodePadding(e.value.nodePadding).nodeSort(e.value.nodeSort).nodeWidth(e.value.nodeWidth).linkSort(e.value.linkSort));
1638
- 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], () => {
1639
1699
  try {
1640
- const { x0: i, y0: u, x1: s, y1: c } = r.value;
1700
+ const { x0: i, y0: u, x1: s, y1: d } = r.value;
1641
1701
  n.value = l.value.extent([
1642
1702
  [i, u],
1643
- [s, c]
1703
+ [s, d]
1644
1704
  ])({ nodes: a.value, links: o.value });
1645
1705
  } catch (i) {
1646
- Lr(ct.GraphProblem, i), n.value = Nr;
1706
+ Fr(pt.GraphProblem, i), n.value = Kr;
1647
1707
  }
1648
1708
  }), { graph: n };
1649
1709
  }
1650
- function be(t, e) {
1710
+ function Ie(t, e) {
1651
1711
  return e || (e = {}), t.targetLinks && t.targetLinks.forEach(({ source: r, value: n }) => {
1652
- e[r.id] = n, be(r, e);
1712
+ e[r.id] = n, Ie(r, e);
1653
1713
  }), e;
1654
1714
  }
1655
- function ke(t, e) {
1715
+ function we(t, e) {
1656
1716
  return e || (e = {}), t.sourceLinks && t.sourceLinks.forEach(({ target: r, value: n }) => {
1657
- e[r.id] = n, ke(r, e);
1717
+ e[r.id] = n, we(r, e);
1658
1718
  }), e;
1659
1719
  }
1660
- function Br(t, e) {
1661
- 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), []);
1662
1722
  }
1663
- const Sr = (t, e) => {
1723
+ const qr = (t, e) => {
1664
1724
  let r;
1665
- dt(t) ? r = {
1725
+ mt(t) ? r = {
1666
1726
  [t.id]: t.value,
1667
- ...be(t),
1668
- ...ke(t)
1727
+ ...Ie(t),
1728
+ ...we(t)
1669
1729
  } : r = {
1670
1730
  [t.source.id]: t.source.value,
1671
1731
  [t.target.id]: t.target.value,
1672
- ...be(t.source),
1673
- ...ke(t.target)
1732
+ ...Ie(t.source),
1733
+ ...we(t.target)
1674
1734
  };
1675
- const n = Br(r, e);
1735
+ const n = Qr(r, e);
1676
1736
  return { nodes: r, links: n };
1677
- }, Pr = (t) => {
1678
- if (dt(t)) {
1737
+ }, ea = (t) => {
1738
+ if (mt(t)) {
1679
1739
  const e = [...t.sourceLinks, ...t.targetLinks];
1680
1740
  return {
1681
1741
  nodes: e.reduce(
1682
- (r, { source: n, target: a, value: o }) => n === t ? { ...r, [Q(a)]: o } : { ...r, [Q(n)]: o },
1683
- { [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 }
1684
1744
  ),
1685
- links: e.map((r) => re(r))
1745
+ links: e.map((r) => ee(r))
1686
1746
  };
1687
1747
  }
1688
1748
  return {
1689
1749
  nodes: {
1690
- [Q(t.target)]: t.value,
1691
- [Q(t.source)]: t.source.value
1750
+ [re(t.target)]: t.value,
1751
+ [re(t.source)]: t.source.value
1692
1752
  },
1693
- links: [re(t)]
1753
+ links: [ee(t)]
1694
1754
  };
1695
1755
  };
1696
- function Gr(t, e, r) {
1697
- 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(
1698
1758
  n.value,
1699
1759
  r.value
1700
- ) : e.value.highlightedElements === "closest" ? Pr(n.value, r.value) : Sr(n.value, r.value) : { nodes: {}, links: [] });
1701
- 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) => {
1702
1762
  if (o.links.length === 0 && Object.keys(o.nodes).length === 0) {
1703
1763
  t.value.forEach((i) => {
1704
- i.node.id in l.nodes && Me(
1764
+ i.node.id in l.nodes && Ue(
1705
1765
  i,
1706
1766
  l.nodes[i.node.id],
1707
1767
  i.node.value,
@@ -1712,7 +1772,7 @@ function Gr(t, e, r) {
1712
1772
  return;
1713
1773
  }
1714
1774
  t.value.forEach((i) => {
1715
- i.node.id in o.nodes && Me(
1775
+ i.node.id in o.nodes && Ue(
1716
1776
  i,
1717
1777
  i.node.value,
1718
1778
  o.nodes[i.node.id],
@@ -1721,10 +1781,10 @@ function Gr(t, e, r) {
1721
1781
  });
1722
1782
  }), { highlightedElements: a, hoveredElement: n };
1723
1783
  }
1724
- const jr = /* @__PURE__ */ D({
1784
+ const na = /* @__PURE__ */ C({
1725
1785
  __name: "lume-alluvial-group",
1726
1786
  props: {
1727
- ...ce(),
1787
+ ...ge(),
1728
1788
  hoveredElementId: {
1729
1789
  type: [Number, String],
1730
1790
  default: null
@@ -1732,67 +1792,114 @@ const jr = /* @__PURE__ */ D({
1732
1792
  },
1733
1793
  emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
1734
1794
  setup(t, { emit: e }) {
1735
- 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: _, 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,
1736
1797
  o,
1737
- a,
1738
- c
1739
- ), h = d(() => le(a.value.valueFormat)), v = d(
1740
- () => Object.keys(p.value.nodes)
1741
- ), m = d(
1742
- () => o.value.reduce((k, w) => {
1743
- const B = w.x + a.value.nodeWidth / 2;
1744
- return k.includes(B) ? k : [...k, B];
1745
- }, []).sort((k, w) => k - 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)
1746
1806
  // Make sure positions are sorted in ascending order
1747
- ), b = d(() => {
1748
- if (!(!a.value.nodeHeaders || !a.value.nodeHeaders.length))
1749
- return a.value.nodeHeaders.slice(0, m.value.length).map((k, w) => ({
1750
- label: k,
1751
- 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]
1752
1812
  }));
1753
- }), f = d(
1754
- () => a.value.nodeHeaderPadding ?? $r
1755
- );
1756
- function T(k) {
1757
- return v.value.length > 0 && !v.value.includes(k.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());
1758
1850
  }
1759
- function L(k) {
1760
- return p.value.links.length > 0 && !p.value.links.includes(k);
1851
+ function R(g) {
1852
+ return m.value.length > 0 && m.value.includes(g.toString());
1761
1853
  }
1762
- function A(k, w) {
1763
- k !== _.value && (_.value = k, e("link-mouseenter", { link: k, event: w }));
1854
+ function F(g) {
1855
+ return h.value.links.length > 0 && !h.value.links.includes(g);
1764
1856
  }
1765
- function g(k) {
1766
- const w = _.value;
1767
- _.value = null, e("link-mouseleave", { link: w, event: k });
1857
+ function G(g) {
1858
+ return h.value.links.length > 0 && h.value.links.includes(g);
1768
1859
  }
1769
- function $(k) {
1770
- if (k == null) {
1771
- _.value = null;
1860
+ function j(g) {
1861
+ return !g.node.color && g.node.deriveColorFromIncomingLinks;
1862
+ }
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;
1772
1873
  return;
1773
1874
  }
1774
- const w = Ir(k, c.value) || Er(k, c.value);
1775
- if (!w) {
1776
- Z(V.InvalidHoveredElement);
1875
+ const x = Vr(g, v.value) || Mr(g, v.value);
1876
+ if (!x) {
1877
+ Q(X.InvalidHoveredElement);
1777
1878
  return;
1778
1879
  }
1779
- _.value = w;
1880
+ f.value = x;
1780
1881
  }
1781
- return C(c, (k) => {
1782
- o.value = Cr(k.nodes), l.value = Hr(k.links).reverse(), _.value == null && r.hoveredElementId != null && $(r.hoveredElementId);
1783
- }), C([r.containerSize, i], () => {
1882
+ function H(g) {
1883
+ var x;
1884
+ return ((x = A.value.find(({ id: S }) => g === S)) == null ? void 0 : x.subNodes) ?? [];
1885
+ }
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], () => {
1784
1889
  if (r.containerSize.width && r.containerSize.height) {
1785
- const k = Dr(c.value, i.value);
1786
- s(k);
1890
+ const g = zr(v.value, u.value);
1891
+ d(g);
1787
1892
  }
1788
- }), 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: _, highlightedElements: p, formatValue: h, hoveredNodeIds: v, nodeColumnPositions: m, nodeHeaders: b, computedNodeHeaderPadding: f, isNodeFaded: T, isLinkFaded: L, handleLinkMouseover: A, handleLinkMouseleave: g, handleExternalHover: $, DEFAULT_COLOR: se, 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 };
1789
1894
  }
1790
1895
  });
1791
- var Fr = function() {
1896
+ var ra = function() {
1792
1897
  var e = this, r = e._self._c, n = e._self._setupProxy;
1793
1898
  return r("g", { staticClass: "lume-alluvial-group", attrs: { "data-j-alluvial-group": "" } }, [n.nodeHeaders ? r("g", e._l(n.nodeHeaders, function(a) {
1794
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) + " ")]);
1795
- }), 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) {
1796
1903
  return r("path", { key: `link-ghost_${a.id}`, staticClass: "lume-alluvial-group__link", class: [
1797
1904
  "lume-stroke--transparent",
1798
1905
  "lume-alluvial-group__link--ghost"
@@ -1803,16 +1910,18 @@ var Fr = function() {
1803
1910
  } } });
1804
1911
  }), e._l(n.linkPaths, function(a) {
1805
1912
  return r("path", { key: `link_${a.id}`, staticClass: "lume-alluvial-group__link", class: {
1806
- [`lume-stroke--${a.color}`]: a.color,
1807
- "lume-alluvial-group__link--faded": n.isLinkFaded(a.id)
1808
- }, 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) {
1809
1917
  return n.emit("link-click", { link: a.link, event: o });
1810
1918
  }, mouseover: function(o) {
1811
1919
  return n.handleLinkMouseover(a.link, o);
1812
1920
  } } });
1813
1921
  })], 2), e._l(n.nodeBlocks, function(a, o) {
1814
1922
  return r("g", { key: `node-block_${o}`, staticClass: "lume-alluvial-group__node", class: {
1815
- "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)
1816
1925
  }, attrs: { "data-j-alluvial-group__node-block": "" } }, [r("g", { on: { click: function(l) {
1817
1926
  return n.emit("node-click", { node: a.node, event: l });
1818
1927
  }, mouseenter: function(l) {
@@ -1823,26 +1932,27 @@ var Fr = function() {
1823
1932
  n.hoveredElement = a.node;
1824
1933
  }, mouseout: function(l) {
1825
1934
  n.hoveredElement = null;
1826
- } } }, [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: {
1827
- "lume-alluvial-group__node-text--right": a.node.depth === 0
1828
- }, 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(
1829
- n.formatValue(
1830
- a.node.transitionValue || a.node.value,
1831
- a.node.value
1832
- )
1833
- ) } })])])]);
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)]);
1834
1944
  })], 2);
1835
- }, Vr = [], Mr = /* @__PURE__ */ I(
1836
- jr,
1837
- Fr,
1838
- Vr,
1945
+ }, aa = [], oa = /* @__PURE__ */ I(
1946
+ na,
1947
+ ra,
1948
+ aa,
1839
1949
  !1,
1840
1950
  null,
1841
- "8ba64716",
1951
+ "50550419",
1842
1952
  null,
1843
1953
  null
1844
1954
  );
1845
- const zr = Mr.exports, Wr = {
1955
+ const la = oa.exports, ua = {
1846
1956
  margins: {
1847
1957
  top: 0,
1848
1958
  right: 0,
@@ -1854,71 +1964,76 @@ const zr = Mr.exports, Wr = {
1854
1964
  withHover: !1,
1855
1965
  withLegend: !1,
1856
1966
  // Alluvial options
1967
+ gradient: !1,
1857
1968
  highlightedElements: "full",
1858
1969
  nodePadding: 16,
1859
1970
  nodeWidth: 16,
1860
- nodeAlign: Dt,
1971
+ nodeAlign: Ct,
1861
1972
  valueFormat: (t) => String(t)
1862
- }, Zr = /* @__PURE__ */ D({
1973
+ }, ia = /* @__PURE__ */ C({
1863
1974
  __name: "lume-alluvial-diagram",
1864
1975
  props: {
1865
- ...ur(Oe)
1976
+ ...cr(Ne)
1866
1977
  },
1867
1978
  setup(t) {
1868
- const e = t, r = Y(G()), { options: n } = N(e), { allOptions: a } = j(n, Wr);
1869
- 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) {
1870
1981
  return {
1871
- ...l,
1982
+ ...i,
1872
1983
  noBaseScales: !0
1873
1984
  // Alluvial chart never uses base scales
1874
1985
  };
1875
1986
  }
1876
- 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 };
1877
1988
  }
1878
1989
  });
1879
- var Xr = function() {
1990
+ var sa = function() {
1880
1991
  var e = this, r = e._self._c, n = e._self._setupProxy;
1881
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) {
1882
- 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))];
1883
1998
  } }, e._l(n.slots, function(a, o) {
1884
1999
  return { key: o, fn: function(l) {
1885
2000
  return [e._t(o, null, null, l || {})];
1886
2001
  } };
1887
2002
  })], null, !0) }, "lume-chart", n.props, !1));
1888
- }, Ur = [], Yr = /* @__PURE__ */ I(
1889
- Zr,
1890
- Xr,
1891
- Ur,
2003
+ }, ca = [], da = /* @__PURE__ */ I(
2004
+ ia,
2005
+ sa,
2006
+ ca,
1892
2007
  !1,
1893
2008
  null,
1894
2009
  null,
1895
2010
  null,
1896
2011
  null
1897
2012
  );
1898
- const lo = Yr.exports;
1899
- var Ae = /* @__PURE__ */ ((t) => (t.grouped = "grouped", t.stacked = "stacked", t))(Ae || {});
1900
- 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({
1901
2016
  __name: "lume-bar-chart",
1902
2017
  props: {
1903
- ...q(),
2018
+ ...ae(),
1904
2019
  type: {
1905
2020
  type: String,
1906
2021
  default: null,
1907
- validator: (t) => t in Ae || t == null
2022
+ validator: (t) => t in Ee || t == null
1908
2023
  }
1909
2024
  },
1910
2025
  setup(t) {
1911
- const e = t, r = pe(
2026
+ const e = t, r = Ae(
1912
2027
  () => import("./common/42f5d2fc.js")
1913
- ), n = pe(
2028
+ ), n = Ae(
1914
2029
  () => import("./common/abc9d23d.js")
1915
- ), a = pe(
2030
+ ), a = Ae(
1916
2031
  () => import("./common/0664fd4d.js")
1917
2032
  ), o = /* @__PURE__ */ new Map([
1918
2033
  ["single", r],
1919
2034
  ["grouped", n],
1920
2035
  ["stacked", a]
1921
- ]), l = Y(G());
2036
+ ]), l = ne(V());
1922
2037
  function i(s) {
1923
2038
  return {
1924
2039
  ...s,
@@ -1926,68 +2041,68 @@ const Kr = /* @__PURE__ */ D({
1926
2041
  // Bar chart always starts on zero,
1927
2042
  tooltipOptions: {
1928
2043
  ...(s == null ? void 0 : s.tooltipOptions) || {},
1929
- position: e.orientation === O.HORIZONTAL && "right"
2044
+ position: e.orientation === L.HORIZONTAL && "right"
1930
2045
  }
1931
2046
  };
1932
2047
  }
1933
- const u = d(() => {
2048
+ const u = c(() => {
1934
2049
  if (e.data) {
1935
- if (Oe(e.data))
2050
+ if (Ne(e.data))
1936
2051
  return o.get("single");
1937
2052
  if (!e.type)
1938
2053
  throw new Error("Bar chart needs a type when there's multiple datasets.");
1939
2054
  return o.get(e.type);
1940
2055
  }
1941
2056
  });
1942
- return { __sfc: !0, TYPES: Ae, 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 };
1943
2058
  }
1944
2059
  });
1945
- var Jr = function() {
2060
+ var _a = function() {
1946
2061
  var e = this, r = e._self._c, n = e._self._setupProxy;
1947
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) {
1948
2063
  return { key: o, fn: function(l) {
1949
2064
  return [e._t(o, null, null, l || {})];
1950
2065
  } };
1951
2066
  })], null, !0) }, "component", { ...n.props, ...e.$attrs }, !1));
1952
- }, Qr = [], qr = /* @__PURE__ */ I(
1953
- Kr,
1954
- Jr,
1955
- Qr,
2067
+ }, fa = [], pa = /* @__PURE__ */ I(
2068
+ va,
2069
+ _a,
2070
+ fa,
1956
2071
  !1,
1957
2072
  null,
1958
2073
  null,
1959
2074
  null,
1960
2075
  null
1961
2076
  );
1962
- const uo = qr.exports;
1963
- function ea(t) {
1964
- return Object.values(Yt).includes(t) || t == null;
2077
+ const Lo = pa.exports;
2078
+ function ma(t) {
2079
+ return Object.values(Qt).includes(t) || t == null;
1965
2080
  }
1966
- function ta(t) {
1967
- return Object.values(O).includes(t);
2081
+ function ha(t) {
2082
+ return Object.values(L).includes(t);
1968
2083
  }
1969
- const na = (t = !1) => ({
2084
+ const ga = (t = !1) => ({
1970
2085
  type: {
1971
2086
  type: String,
1972
2087
  default: null,
1973
- validator: ea
2088
+ validator: ma
1974
2089
  },
1975
2090
  ...t ? {
1976
2091
  orientation: {
1977
2092
  type: String,
1978
- default: O.VERTICAL,
1979
- validator: ta
2093
+ default: L.VERTICAL,
2094
+ validator: ha
1980
2095
  }
1981
2096
  } : {}
1982
2097
  });
1983
- function vt(t) {
1984
- const e = d(() => t.value.map((n) => ({
2098
+ function ht(t) {
2099
+ const e = c(() => t.value.map((n) => ({
1985
2100
  ...n,
1986
2101
  values: n.values.map((a) => ({
1987
2102
  ...a,
1988
2103
  value: (a == null ? void 0 : a.value) || 0
1989
2104
  }))
1990
- }))), r = d(() => {
2105
+ }))), r = c(() => {
1991
2106
  var n;
1992
2107
  return (n = e.value) == null ? void 0 : n.reduce((a, o) => (o.values.forEach((l, i) => {
1993
2108
  a[i] ? a[i].push(l) : a[i] = [l];
@@ -1995,176 +2110,176 @@ function vt(t) {
1995
2110
  });
1996
2111
  return { multiBarData: e, groupedData: r };
1997
2112
  }
1998
- function ra(t, e) {
2113
+ function ya(t, e) {
1999
2114
  return t.value.length === 1 ? "single" : e.value;
2000
2115
  }
2001
- function aa(t, e, r) {
2002
- const n = d(
2003
- () => r.value === O.HORIZONTAL
2116
+ function ba(t, e, r) {
2117
+ const n = c(
2118
+ () => r.value === L.HORIZONTAL
2004
2119
  );
2005
2120
  function a(i) {
2006
2121
  Math.min(...i.domain()) > 0 && console.error("Bar linear scale domain cannot start above 0!");
2007
2122
  }
2008
- const o = d(() => n.value ? (() => (a(t.value), t.value))() : t.value), l = d(() => n.value ? e.value : (() => (a(e.value), e.value))());
2123
+ const o = c(() => n.value ? (() => (a(t.value), t.value))() : t.value), l = c(() => n.value ? e.value : (() => (a(e.value), e.value))());
2009
2124
  return { barXScale: o, barYScale: l };
2010
2125
  }
2011
- function oa(t, e, r, n, a, o) {
2012
- const l = d(
2013
- () => n.value === O.HORIZONTAL
2126
+ function ka(t, e, r, n, a, o) {
2127
+ const l = c(
2128
+ () => n.value === L.HORIZONTAL
2014
2129
  );
2015
- function i(_, p) {
2016
- let h, v;
2017
- return l.value ? (h = _ >= 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(_)), { x: h, y: v };
2130
+ function i(v, f) {
2131
+ let h, _;
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: _ };
2018
2133
  }
2019
- function u(_) {
2020
- return l.value ? _ < 0 ? e.value(0) - e.value(_) : e.value(_) - e.value(0) : e.value.bandwidth();
2134
+ function u(v) {
2135
+ return l.value ? v < 0 ? e.value(0) - e.value(v) : e.value(v) - e.value(0) : e.value.bandwidth();
2021
2136
  }
2022
- function s(_) {
2023
- return l.value ? r.value.bandwidth() : _ < 0 ? r.value(_) - r.value(0) : r.value(0) - r.value(_);
2137
+ function s(v) {
2138
+ return l.value ? r.value.bandwidth() : v < 0 ? r.value(v) - r.value(0) : r.value(0) - r.value(v);
2024
2139
  }
2025
- function c(_, p, h) {
2026
- const { value: v, color: m } = _, b = m ?? t.value[p].color ?? se, { x: f, y: T } = i(v, h), L = u(v), A = s(v);
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(_);
2027
2142
  return {
2028
- classList: [`lume-fill--${b}`, ...o],
2029
- x: f,
2143
+ classList: [`lume-fill--${k}`, ...o],
2144
+ x: p,
2030
2145
  y: T,
2031
- width: L,
2146
+ width: O,
2032
2147
  height: A,
2033
2148
  isFaded: a.value !== -1 && a.value !== h,
2034
- isNegative: v < 0
2149
+ isNegative: _ < 0
2035
2150
  };
2036
2151
  }
2037
- return { barAttributeGenerator: c };
2152
+ return { barAttributeGenerator: d };
2038
2153
  }
2039
- function la(t, e, r, n, a, o) {
2040
- const l = d(
2041
- () => n.value === O.HORIZONTAL
2042
- ), i = d(() => te().domain(t.value.map((v, m) => m)).range([0, e.value.bandwidth()]).padding(0)), u = d(() => te().domain(t.value.map((v, m) => m)).range([0, r.value.bandwidth()]).padding(0));
2043
- function s(v, m, b) {
2154
+ function Aa(t, e, r, n, a, o) {
2155
+ const l = c(
2156
+ () => n.value === L.HORIZONTAL
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) {
2044
2159
  if (l.value)
2045
- return v >= 0 ? e.value(0) : e.value(v);
2046
- const f = e.value.domain();
2047
- return e.value(f[m]) + i.value(b);
2160
+ return _ >= 0 ? e.value(0) : e.value(_);
2161
+ const p = e.value.domain();
2162
+ return e.value(p[m]) + i.value(k);
2048
2163
  }
2049
- function c(v, m, b) {
2164
+ function d(_, m, k) {
2050
2165
  if (l.value) {
2051
- const f = r.value.domain();
2052
- return r.value(f[m]) + u.value(b);
2166
+ const p = r.value.domain();
2167
+ return r.value(p[m]) + u.value(k);
2053
2168
  }
2054
- return v < 0 ? r.value(0) : r.value(v);
2169
+ return _ < 0 ? r.value(0) : r.value(_);
2055
2170
  }
2056
- function _(v) {
2057
- return l.value ? v < 0 ? e.value(0) - e.value(v) : e.value(v) - e.value(0) : i.value.bandwidth();
2171
+ function v(_) {
2172
+ return l.value ? _ < 0 ? e.value(0) - e.value(_) : e.value(_) - e.value(0) : i.value.bandwidth();
2058
2173
  }
2059
- function p(v) {
2060
- return l.value ? u.value.bandwidth() : v < 0 ? r.value(v) - r.value(0) : r.value(0) - r.value(v);
2174
+ function f(_) {
2175
+ return l.value ? u.value.bandwidth() : _ < 0 ? r.value(_) - r.value(0) : r.value(0) - r.value(_);
2061
2176
  }
2062
- function h(v, m, b) {
2063
- const { value: f, color: T } = v, L = T ?? t.value[m].color ?? Object.values(P)[m], A = s(f, b, m), g = c(f, b, m), $ = _(f), k = 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);
2064
2179
  return {
2065
- classList: [`lume-fill--${L}`, ...o],
2180
+ classList: [`lume-fill--${O}`, ...o],
2066
2181
  x: A,
2067
- y: g,
2068
- width: $,
2069
- height: k,
2070
- isFaded: a.value !== -1 && a.value !== b,
2071
- isNegative: f < 0
2182
+ y,
2183
+ width: E,
2184
+ height: R,
2185
+ isFaded: a.value !== -1 && a.value !== k,
2186
+ isNegative: p < 0
2072
2187
  };
2073
2188
  }
2074
2189
  return { barAttributeGenerator: h };
2075
2190
  }
2076
- function ua(t, e) {
2077
- const r = d(
2078
- () => e.value === O.HORIZONTAL
2079
- ), n = d(() => {
2191
+ function Ta(t, e) {
2192
+ const r = c(
2193
+ () => e.value === L.HORIZONTAL
2194
+ ), n = c(() => {
2080
2195
  const i = t.value.map(
2081
- (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)
2082
2197
  );
2083
2198
  return Math.min(...i);
2084
- }), a = d(() => {
2199
+ }), a = c(() => {
2085
2200
  const i = t.value.map(
2086
2201
  (u) => u.reduce(
2087
- (s, c) => c.value >= 0 ? s + c.value : s,
2202
+ (s, d) => d.value >= 0 ? s + d.value : s,
2088
2203
  0
2089
2204
  )
2090
2205
  );
2091
2206
  return Math.max(...i);
2092
2207
  });
2093
2208
  function o(i, u, s) {
2094
- return r.value ? ne().domain([n.value, a.value]).range([0, s.width]) : Object.assign(
2095
- Ge(
2096
- te().domain(u.map((c, _) => _)).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])
2097
2212
  ),
2098
2213
  { labels: u }
2099
2214
  );
2100
2215
  }
2101
2216
  function l(i, u, s) {
2102
2217
  return r.value ? Object.assign(
2103
- Ge(
2104
- te().domain(u.map((c, _) => _)).range([0, s.height])
2218
+ ze(
2219
+ le().domain(u.map((d, v) => v)).range([0, s.height])
2105
2220
  ),
2106
2221
  { labels: u }
2107
- ) : ne().domain([a.value, n.value]).range([0, s.height]);
2222
+ ) : ue().domain([a.value, n.value]).range([0, s.height]);
2108
2223
  }
2109
2224
  return { stackedXScaleGenerator: o, stackedYScaleGenerator: l };
2110
2225
  }
2111
- function ia(t, e, r, n, a, o) {
2112
- const l = d(
2113
- () => n.value === O.HORIZONTAL
2114
- ), i = d(
2226
+ function La(t, e, r, n, a, o) {
2227
+ const l = c(
2228
+ () => n.value === L.HORIZONTAL
2229
+ ), i = c(
2115
2230
  () => l.value ? r.value.domain() : e.value.domain()
2116
- ), u = d(
2117
- () => 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))
2118
2233
  );
2119
- function s(f, T, L) {
2120
- let A, g;
2121
- return l.value ? (A = e.value(f >= 0 ? 0 + L : f + L), g = r.value(i.value[T])) : (A = e.value(i.value[T]), g = r.value(f >= 0 ? f + L : 0 + L)), { x: A, 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 };
2122
2237
  }
2123
- function c(f) {
2124
- 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();
2125
2240
  }
2126
- function _(f) {
2127
- 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();
2128
2243
  }
2129
- function p(f) {
2130
- 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);
2131
2246
  }
2132
- function h(f) {
2133
- 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);
2134
2249
  }
2135
- function v(f, T) {
2136
- return f ? u.value.reduce((L, A, g) => (g < f && A[T] >= 0 && (L += A[T]), L), 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;
2137
2252
  }
2138
- function m(f, T) {
2139
- return f ? u.value.reduce((L, A, g) => (g < f && A[T] < 0 && (L += A[T]), L), 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;
2140
2255
  }
2141
- function b(f, T, L) {
2142
- const { value: A, color: g } = f, $ = A >= 0 ? c(A) : _(A), k = A >= 0 ? p(A) : h(A), w = A >= 0 ? v(T, L) : m(T, L), { x: B, y: F } = s(A, L, 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);
2143
2258
  return {
2144
- classList: [`lume-fill--${g ?? t.value[T].color ?? Object.values(P)[T]}`, ...o],
2145
- width: $,
2146
- height: k,
2147
- x: B,
2148
- y: F,
2149
- isFaded: a.value !== -1 && a.value !== L,
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,
2264
+ isFaded: a.value !== -1 && a.value !== O,
2150
2265
  isNegative: A < 0
2151
2266
  };
2152
2267
  }
2153
- return { barAttributeGenerator: b };
2268
+ return { barAttributeGenerator: k };
2154
2269
  }
2155
- const ze = {
2156
- single: oa,
2157
- grouped: la,
2158
- stacked: ia
2159
- }, sa = /* @__PURE__ */ D({
2270
+ const Ye = {
2271
+ single: ka,
2272
+ grouped: Aa,
2273
+ stacked: La
2274
+ }, Oa = /* @__PURE__ */ C({
2160
2275
  __name: "lume-bar-group",
2161
2276
  props: {
2162
- ...ce(),
2277
+ ...ge(),
2163
2278
  classList: {
2164
2279
  type: [String, Array],
2165
2280
  default: () => []
2166
2281
  },
2167
- ...na(!0),
2282
+ ...ga(!0),
2168
2283
  transition: {
2169
2284
  type: Boolean,
2170
2285
  default: !0
@@ -2180,25 +2295,25 @@ const ze = {
2180
2295
  type: i,
2181
2296
  xScale: u,
2182
2297
  yScale: s,
2183
- classList: c
2184
- } = N(r), { groupedData: _ } = vt(n), { barXScale: p, barYScale: h } = aa(u, s, o), v = d(() => typeof c.value == "string" ? [c.value] : c.value), m = d(() => {
2185
- const f = ra(n, i), { barAttributeGenerator: T } = ze[f](
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](
2186
2301
  n,
2187
- p,
2302
+ f,
2188
2303
  h,
2189
2304
  o,
2190
2305
  a,
2191
- v.value
2306
+ _.value
2192
2307
  );
2193
2308
  return T;
2194
- }), b = d(() => {
2309
+ }), k = c(() => {
2195
2310
  if (l.value)
2196
- return o.value === O.HORIZONTAL ? "width" : "height";
2311
+ return o.value === L.HORIZONTAL ? "width" : "height";
2197
2312
  });
2198
- return { __sfc: !0, MIXIN_MAP: ze, props: r, emit: e, data: n, hoveredIndex: a, orientation: o, transition: l, type: i, xScale: u, yScale: s, classList: c, groupedData: _, barXScale: p, barYScale: h, computedClasses: v, getBarAttributes: m, computedTransition: b, LumeBar: $e };
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 };
2199
2314
  }
2200
2315
  });
2201
- var ca = function() {
2316
+ var xa = function() {
2202
2317
  var e = this, r = e._self._c, n = e._self._setupProxy;
2203
2318
  return r("g", { staticClass: "lume-bar-group", attrs: { "data-j-bars-group": "" } }, e._l(n.groupedData, function(a, o) {
2204
2319
  return r("g", { key: o, on: { mouseenter: function(l) {
@@ -2213,43 +2328,43 @@ var ca = function() {
2213
2328
  } } }, "lume-bar", n.getBarAttributes(l, i, o, a), !1));
2214
2329
  }), 1);
2215
2330
  }), 0);
2216
- }, da = [], va = /* @__PURE__ */ I(
2217
- sa,
2218
- ca,
2219
- da,
2331
+ }, $a = [], Ia = /* @__PURE__ */ I(
2332
+ Oa,
2333
+ xa,
2334
+ $a,
2220
2335
  !1,
2221
2336
  null,
2222
2337
  null,
2223
2338
  null,
2224
2339
  null
2225
2340
  );
2226
- const Ee = va.exports, _a = {
2227
- [O.VERTICAL]: {
2341
+ const Be = Ia.exports, wa = {
2342
+ [L.VERTICAL]: {
2228
2343
  withTooltip: !0,
2229
2344
  xAxisOptions: {},
2230
2345
  yAxisOptions: { gridLines: !0 },
2231
- margins: X.VERTICAL
2346
+ margins: q.VERTICAL
2232
2347
  },
2233
- [O.HORIZONTAL]: {
2348
+ [L.HORIZONTAL]: {
2234
2349
  withTooltip: !0,
2235
2350
  xAxisOptions: { gridLines: !0 },
2236
2351
  yAxisOptions: { gridLines: !1 },
2237
- margins: X.HORIZONTAL
2352
+ margins: q.HORIZONTAL
2238
2353
  }
2239
- }, pa = /* @__PURE__ */ D({
2354
+ }, Ea = /* @__PURE__ */ C({
2240
2355
  __name: "lume-single-bar-chart",
2241
2356
  props: {
2242
- ...q(Oe)
2357
+ ...ae(Ne)
2243
2358
  },
2244
2359
  setup(t) {
2245
- const e = t, r = Y(G()), { orientation: n, options: a } = N(e), o = d(
2246
- () => _a[n.value || O.VERTICAL]
2360
+ const e = t, r = ne(V()), { orientation: n, options: a } = B(e), o = c(
2361
+ () => wa[n.value || L.VERTICAL]
2247
2362
  // needs to be computed so that default options are reactive
2248
- ), { allOptions: l } = j(a, o);
2249
- return { __sfc: !0, props: e, slots: r, orientation: n, options: a, baseOptions: o, allOptions: l, LumeChart: ee, LumeBarGroup: Ee };
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 };
2250
2365
  }
2251
2366
  });
2252
- var fa = function() {
2367
+ var Na = function() {
2253
2368
  var e = this, r = e._self._c, n = e._self._setupProxy;
2254
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) {
2255
2370
  return [r(n.LumeBarGroup, e._b({ attrs: { orientation: n.orientation } }, "lume-bar-group", a, !1))];
@@ -2258,47 +2373,47 @@ var fa = function() {
2258
2373
  return [e._t(o, null, null, l || {})];
2259
2374
  } };
2260
2375
  })], null, !0) }, "lume-chart", n.props, !1));
2261
- }, ma = [], ha = /* @__PURE__ */ I(
2262
- pa,
2263
- fa,
2264
- ma,
2376
+ }, Ca = [], Da = /* @__PURE__ */ I(
2377
+ Ea,
2378
+ Na,
2379
+ Ca,
2265
2380
  !1,
2266
2381
  null,
2267
2382
  null,
2268
2383
  null,
2269
2384
  null
2270
2385
  );
2271
- const io = ha.exports, ga = {
2272
- [O.VERTICAL]: {
2386
+ const Oo = Da.exports, Ra = {
2387
+ [L.VERTICAL]: {
2273
2388
  withTooltip: !0,
2274
2389
  xAxisOptions: {},
2275
2390
  yAxisOptions: { gridLines: !0 },
2276
- margins: X.VERTICAL
2391
+ margins: q.VERTICAL
2277
2392
  },
2278
- [O.HORIZONTAL]: {
2393
+ [L.HORIZONTAL]: {
2279
2394
  withTooltip: !0,
2280
2395
  xAxisOptions: { gridLines: !0 },
2281
2396
  yAxisOptions: { gridLines: !1 },
2282
- margins: X.HORIZONTAL,
2397
+ margins: q.HORIZONTAL,
2283
2398
  tooltipOptions: { position: "right" }
2284
2399
  }
2285
- }, ya = /* @__PURE__ */ D({
2400
+ }, Ha = /* @__PURE__ */ C({
2286
2401
  __name: "lume-grouped-bar-chart",
2287
2402
  props: {
2288
- ...q()
2403
+ ...ae()
2289
2404
  },
2290
2405
  setup(t) {
2291
- const e = t, r = Y(G()), { orientation: n, options: a } = N(e), o = d(
2292
- () => ga[n.value || O.VERTICAL]
2406
+ const e = t, r = ne(V()), { orientation: n, options: a } = B(e), o = c(
2407
+ () => Ra[n.value || L.VERTICAL]
2293
2408
  // needs to be computed so that default options are reactive
2294
- ), { allOptions: l } = j(
2409
+ ), { allOptions: l } = z(
2295
2410
  a,
2296
2411
  o
2297
2412
  );
2298
- return { __sfc: !0, props: e, slots: r, orientation: n, options: a, baseOptions: o, allOptions: l, LumeChart: ee, LumeBarGroup: Ee };
2413
+ return { __sfc: !0, props: e, slots: r, orientation: n, options: a, baseOptions: o, allOptions: l, LumeChart: oe, LumeBarGroup: Be };
2299
2414
  }
2300
2415
  });
2301
- var ba = function() {
2416
+ var Sa = function() {
2302
2417
  var e = this, r = e._self._c, n = e._self._setupProxy;
2303
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) {
2304
2419
  return [r(n.LumeBarGroup, e._b({ attrs: { type: "grouped" } }, "lume-bar-group", a, !1))];
@@ -2307,50 +2422,50 @@ var ba = function() {
2307
2422
  return [e._t(o, null, null, l || {})];
2308
2423
  } };
2309
2424
  })], null, !0) }, "lume-chart", n.props, !1));
2310
- }, ka = [], Aa = /* @__PURE__ */ I(
2311
- ya,
2312
- ba,
2313
- ka,
2425
+ }, Ba = [], Fa = /* @__PURE__ */ I(
2426
+ Ha,
2427
+ Sa,
2428
+ Ba,
2314
2429
  !1,
2315
2430
  null,
2316
2431
  null,
2317
2432
  null,
2318
2433
  null
2319
2434
  );
2320
- const so = Aa.exports, Ta = {
2321
- [O.VERTICAL]: {
2435
+ const xo = Fa.exports, Pa = {
2436
+ [L.VERTICAL]: {
2322
2437
  withTooltip: !0,
2323
2438
  xAxisOptions: {},
2324
2439
  yAxisOptions: { gridLines: !0 },
2325
- margins: X.VERTICAL
2440
+ margins: q.VERTICAL
2326
2441
  },
2327
- [O.HORIZONTAL]: {
2442
+ [L.HORIZONTAL]: {
2328
2443
  withTooltip: !0,
2329
2444
  xAxisOptions: { gridLines: !0 },
2330
2445
  yAxisOptions: { gridLines: !1 },
2331
- margins: X.HORIZONTAL,
2446
+ margins: q.HORIZONTAL,
2332
2447
  tooltipOptions: { position: "right" }
2333
2448
  }
2334
- }, Oa = /* @__PURE__ */ D({
2449
+ }, Ga = /* @__PURE__ */ C({
2335
2450
  __name: "lume-stacked-bar-chart",
2336
2451
  props: {
2337
- ...q()
2452
+ ...ae()
2338
2453
  },
2339
2454
  setup(t) {
2340
- const e = t, r = Y(G()), { data: n, orientation: a, options: o } = N(e), l = d(
2341
- () => Ta[a.value || O.VERTICAL]
2455
+ const e = t, r = ne(V()), { data: n, orientation: a, options: o } = B(e), l = c(
2456
+ () => Pa[a.value || L.VERTICAL]
2342
2457
  // needs to be computed so that default options are reactive
2343
- ), { allOptions: i } = j(
2458
+ ), { allOptions: i } = z(
2344
2459
  o,
2345
2460
  l
2346
- ), { internalData: u } = Ie(n), { groupedData: s } = vt(u), { stackedXScaleGenerator: c, stackedYScaleGenerator: _ } = ua(
2461
+ ), { internalData: u } = Se(n), { groupedData: s } = ht(u), { stackedXScaleGenerator: d, stackedYScaleGenerator: v } = Ta(
2347
2462
  s,
2348
2463
  a
2349
2464
  );
2350
- return { __sfc: !0, props: e, slots: r, data: n, orientation: a, options: o, baseOptions: l, allOptions: i, internalData: u, groupedData: s, stackedXScaleGenerator: c, stackedYScaleGenerator: _, LumeChart: ee, LumeBarGroup: Ee };
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 };
2351
2466
  }
2352
2467
  });
2353
- var La = function() {
2468
+ var ja = function() {
2354
2469
  var e = this, r = e._self._c, n = e._self._setupProxy;
2355
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) {
2356
2471
  return [r(n.LumeBarGroup, e._b({ attrs: { type: "stacked" } }, "lume-bar-group", a, !1))];
@@ -2359,17 +2474,17 @@ var La = function() {
2359
2474
  return [e._t(o, null, null, l || {})];
2360
2475
  } };
2361
2476
  })], null, !0) }, "lume-chart", n.props, !1));
2362
- }, xa = [], $a = /* @__PURE__ */ I(
2363
- Oa,
2364
- La,
2365
- xa,
2477
+ }, Va = [], Ma = /* @__PURE__ */ I(
2478
+ Ga,
2479
+ ja,
2480
+ Va,
2366
2481
  !1,
2367
2482
  null,
2368
2483
  null,
2369
2484
  null,
2370
2485
  null
2371
2486
  );
2372
- const co = $a.exports, We = 2, wa = /* @__PURE__ */ D({
2487
+ const $o = Ma.exports, Ke = 2, za = /* @__PURE__ */ C({
2373
2488
  __name: "lume-line",
2374
2489
  props: {
2375
2490
  pathDefinition: {
@@ -2378,11 +2493,11 @@ const co = $a.exports, We = 2, wa = /* @__PURE__ */ D({
2378
2493
  },
2379
2494
  width: {
2380
2495
  type: Number,
2381
- default: We
2496
+ default: Ke
2382
2497
  },
2383
2498
  color: {
2384
2499
  type: String,
2385
- default: P.Skyblue
2500
+ default: M.Skyblue
2386
2501
  },
2387
2502
  dashed: {
2388
2503
  type: Boolean,
@@ -2403,11 +2518,11 @@ const co = $a.exports, We = 2, wa = /* @__PURE__ */ D({
2403
2518
  },
2404
2519
  emits: ["click"],
2405
2520
  setup(t, { emit: e }) {
2406
- const r = x(null);
2407
- return M(() => ie(r.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: We, emit: e, root: r };
2521
+ const r = $(null);
2522
+ return U(() => he(r.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: Ke, emit: e, root: r };
2408
2523
  }
2409
2524
  });
2410
- var Ia = function() {
2525
+ var Wa = function() {
2411
2526
  var e = this, r = e._self._c, n = e._self._setupProxy;
2412
2527
  return r("path", { ref: "root", staticClass: "lume-line", class: {
2413
2528
  [`lume-stroke--${e.color}`]: !0,
@@ -2419,28 +2534,28 @@ var Ia = function() {
2419
2534
  }, attrs: { d: e.pathDefinition, "stroke-width": e.width, "data-j-line": "" }, on: { click: function(a) {
2420
2535
  return n.emit("click", a);
2421
2536
  } } });
2422
- }, Ea = [], Da = /* @__PURE__ */ I(
2423
- wa,
2424
- Ia,
2425
- Ea,
2537
+ }, Za = [], Xa = /* @__PURE__ */ I(
2538
+ za,
2539
+ Wa,
2540
+ Za,
2426
2541
  !1,
2427
2542
  null,
2428
2543
  "08896455",
2429
2544
  null,
2430
2545
  null
2431
2546
  );
2432
- const Ca = Da.exports, Ze = 4, Ha = /* @__PURE__ */ D({
2547
+ const Ua = Xa.exports, Je = 4, Ya = /* @__PURE__ */ C({
2433
2548
  __name: "lume-point",
2434
2549
  props: {
2435
2550
  x: { type: Number, required: !0 },
2436
2551
  y: { type: Number, required: !0 },
2437
2552
  color: {
2438
2553
  type: String,
2439
- default: P.Skyblue
2554
+ default: M.Skyblue
2440
2555
  },
2441
2556
  radius: {
2442
2557
  type: Number,
2443
- default: Ze
2558
+ default: Je
2444
2559
  },
2445
2560
  active: {
2446
2561
  type: Boolean,
@@ -2449,34 +2564,34 @@ const Ca = Da.exports, Ze = 4, Ha = /* @__PURE__ */ D({
2449
2564
  },
2450
2565
  emits: ["click"],
2451
2566
  setup(t, { emit: e }) {
2452
- const r = t, n = x(null), a = d(() => r.radius / 2);
2453
- return M(() => ie(n.value)), { __sfc: !0, DEFAULT_RADIUS: Ze, 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 };
2454
2569
  }
2455
2570
  });
2456
- var Na = function() {
2571
+ var Ka = function() {
2457
2572
  var e = this, r = e._self._c, n = e._self._setupProxy;
2458
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) {
2459
2574
  return n.emit("click", a);
2460
2575
  } } });
2461
- }, Ra = [], Ba = /* @__PURE__ */ I(
2462
- Ha,
2463
- Na,
2464
- Ra,
2576
+ }, Ja = [], Qa = /* @__PURE__ */ I(
2577
+ Ya,
2578
+ Ka,
2579
+ Ja,
2465
2580
  !1,
2466
2581
  null,
2467
2582
  "9bacbd7d",
2468
2583
  null,
2469
2584
  null
2470
2585
  );
2471
- const Sa = Ba.exports;
2472
- function _t(t) {
2586
+ const qa = Qa.exports;
2587
+ function gt(t) {
2473
2588
  function e(o) {
2474
2589
  let l = null;
2475
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), []);
2476
2591
  }
2477
2592
  function r(o, l, i, u) {
2478
- const _ = Math.abs(o - l) / (i + 1) * (u + 1);
2479
- return o > l ? o - _ : o + _;
2593
+ const v = Math.abs(o - l) / (i + 1) * (u + 1);
2594
+ return o > l ? o - v : o + v;
2480
2595
  }
2481
2596
  function n(o) {
2482
2597
  return function(i) {
@@ -2485,27 +2600,27 @@ function _t(t) {
2485
2600
  );
2486
2601
  };
2487
2602
  }
2488
- return { computedLineData: d(() => t.value.map((o) => {
2603
+ return { computedLineData: c(() => t.value.map((o) => {
2489
2604
  const l = e(o.values);
2490
2605
  return {
2491
2606
  ...o,
2492
2607
  isDashed: n(l),
2493
2608
  values: o.values.map((i, u) => {
2494
- var c, _;
2609
+ var d, v;
2495
2610
  const s = l.find(
2496
- (p) => p.includes(u)
2611
+ (f) => f.includes(u)
2497
2612
  );
2498
2613
  if (s) {
2499
- const p = s[0] - 1, h = s[s.length - 1] + 1;
2500
- let v = (c = o.values[p]) == null ? void 0 : c.value, m = (_ = o.values[h]) == null ? void 0 : _.value;
2501
- return v == null && (v = m), m == null && (m = v), {
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;
2616
+ return _ == null && (_ = m), m == null && (m = _), {
2502
2617
  value: r(
2503
- v,
2618
+ _,
2504
2619
  m,
2505
2620
  s.length,
2506
2621
  s.indexOf(u)
2507
2622
  ),
2508
- label: nt
2623
+ label: ut
2509
2624
  };
2510
2625
  }
2511
2626
  return i;
@@ -2513,22 +2628,22 @@ function _t(t) {
2513
2628
  };
2514
2629
  })) };
2515
2630
  }
2516
- function Pa(t, e) {
2631
+ function eo(t, e) {
2517
2632
  const r = t.bandwidth() / 2;
2518
2633
  return (n, a) => t(t.domain()[e + (a - 1)]) + r;
2519
2634
  }
2520
- function Ga(t, e) {
2635
+ function to(t, e) {
2521
2636
  return (r, n) => t(e + (n - 1));
2522
2637
  }
2523
- function ja(t, e, r, n) {
2524
- return xt().x(
2525
- 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)
2526
2641
  ).y((o) => n(o))(e);
2527
2642
  }
2528
- const Xe = 1, Fa = /* @__PURE__ */ D({
2643
+ const Qe = 1, ro = /* @__PURE__ */ C({
2529
2644
  __name: "lume-line-group",
2530
2645
  props: {
2531
- ...ce(),
2646
+ ...ge(),
2532
2647
  withPoints: {
2533
2648
  type: Boolean,
2534
2649
  default: !0
@@ -2540,82 +2655,82 @@ const Xe = 1, Fa = /* @__PURE__ */ D({
2540
2655
  },
2541
2656
  emits: ["line-click", "point-click", "lume__internal--hover"],
2542
2657
  setup(t, { emit: e }) {
2543
- const r = t, { data: n, options: a, xScale: o, yScale: l } = N(r), i = Te(
2658
+ const r = t, { data: n, options: a, xScale: o, yScale: l } = B(r), i = pe(
2544
2659
  "tooltipAnchorAttributes",
2545
2660
  null
2546
- ), { updateTooltipAnchorAttributes: u } = st(
2661
+ ), { updateTooltipAnchorAttributes: u } = ft(
2547
2662
  i,
2548
2663
  a,
2549
2664
  o,
2550
2665
  l
2551
- ), s = d(() => {
2552
- if (n.value.every(($) => $.isDashed))
2666
+ ), s = c(() => {
2667
+ if (n.value.every((E) => E.isDashed))
2553
2668
  return n.value;
2554
- const { computedLineData: g } = _t(n);
2555
- return a.value.withTooltip !== !1 && (i != null && i.value) && u(g.value), g.value;
2556
- }), 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(() => {
2557
2672
  if (r.hoveredIndex === -1)
2558
2673
  return;
2559
- const g = Ft(
2674
+ const y = Mt(
2560
2675
  s.value,
2561
2676
  r.hoveredIndex
2562
2677
  );
2563
2678
  return {
2564
- d: `M ${ye(o.value, r.hoveredIndex)},${l.value.range()[1]}
2565
- V ${l.value(g)}`
2679
+ d: `M ${$e(o.value, r.hoveredIndex)},${l.value.range()[1]}
2680
+ V ${l.value(y)}`
2566
2681
  // Move to X index, Vertical line to the highest point
2567
2682
  };
2568
- }), _ = d(
2569
- () => o.value && Xe / (Vt(o.value) - 1)
2683
+ }), v = c(
2684
+ () => o.value && Qe / (zt(o.value) - 1)
2570
2685
  // Subtracting the first line (read below)
2571
- ), p = d(
2686
+ ), f = c(
2572
2687
  () => {
2573
- var g;
2574
- 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;
2575
2690
  }
2576
2691
  // If no `lineWidth`, returns NaN which needs to be undefined
2577
- ), h = d(
2692
+ ), h = c(
2578
2693
  () => o.value.bandwidth() / 2
2579
- ), v = d(() => o.value.domain()), m = d(
2694
+ ), _ = c(() => o.value.domain()), m = c(
2580
2695
  () => a.value.withPoints ?? r.withPoints
2581
2696
  );
2582
- function b(g) {
2583
- return s.value[g].values;
2697
+ function k(y) {
2698
+ return s.value[y].values;
2584
2699
  }
2585
- function f(g, $) {
2586
- var w, B;
2587
- const k = g === 0 ? [] : [
2588
- (w = b($)[g - 1]) == null ? void 0 : w.value,
2589
- (B = b($)[g]) == null ? void 0 : B.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
2590
2705
  ];
2591
- return ja(
2592
- g,
2593
- k,
2706
+ return no(
2707
+ y,
2708
+ R,
2594
2709
  o.value,
2595
2710
  l.value
2596
2711
  ) || "";
2597
2712
  }
2598
- function T(g) {
2713
+ function T(y) {
2599
2714
  return {
2600
- animationDelay: g < 2 ? 0 : (g - 1) * _.value,
2601
- animationDuration: _.value
2715
+ animationDelay: y < 2 ? 0 : (y - 1) * v.value,
2716
+ animationDuration: v.value
2602
2717
  };
2603
2718
  }
2604
- function L(g, $) {
2605
- var w;
2606
- const k = (w = b($)[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;
2607
2722
  return {
2608
- x: U(o.value) ? r.xScale(v.value[g]) + h.value : r.xScale(g),
2609
- y: l.value(k)
2723
+ x: te(o.value) ? r.xScale(_.value[y]) + h.value : r.xScale(y),
2724
+ y: l.value(R)
2610
2725
  };
2611
2726
  }
2612
- function A(g) {
2613
- return r.hoveredIndex === g;
2727
+ function A(y) {
2728
+ return r.hoveredIndex === y;
2614
2729
  }
2615
- return { __sfc: !0, LUME_TRANSITION_TIME_FULL: Xe, props: r, emit: e, data: n, options: a, xScale: o, yScale: l, tooltipAnchorAttributes: i, updateTooltipAnchorAttributes: u, computedGroupData: s, overlayLineAttributes: c, animationDuration: _, pointRadius: p, xAxisOffset: h, domain: v, computedWithPoints: m, getValuesFromDataset: b, getPathDefinition: f, getLineTransitionParams: T, getPointPosition: L, isPointActive: A, LumeLine: Ca, LumePoint: Sa };
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 };
2616
2731
  }
2617
2732
  });
2618
- var Va = function() {
2733
+ var ao = function() {
2619
2734
  var e = this, r = e._self._c, n = e._self._setupProxy;
2620
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) {
2621
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) {
@@ -2628,33 +2743,33 @@ var Va = function() {
2628
2743
  } } }, "lume-point", n.getPointPosition(i, o), !1));
2629
2744
  }), 1) : e._e()]);
2630
2745
  })], 2);
2631
- }, Ma = [], za = /* @__PURE__ */ I(
2632
- Fa,
2633
- Va,
2634
- Ma,
2746
+ }, oo = [], lo = /* @__PURE__ */ I(
2747
+ ro,
2748
+ ao,
2749
+ oo,
2635
2750
  !1,
2636
2751
  null,
2637
2752
  "c4d7f0ca",
2638
2753
  null,
2639
2754
  null
2640
2755
  );
2641
- const pt = za.exports, Wa = {
2642
- margins: X.VERTICAL,
2756
+ const yt = lo.exports, uo = {
2757
+ margins: q.VERTICAL,
2643
2758
  startOnZero: !0,
2644
2759
  withTooltip: !0,
2645
2760
  xAxisOptions: {},
2646
2761
  yAxisOptions: { gridLines: !0 }
2647
- }, Za = /* @__PURE__ */ D({
2762
+ }, io = /* @__PURE__ */ C({
2648
2763
  __name: "lume-line-chart",
2649
2764
  props: {
2650
- ...q(null, !1)
2765
+ ...ae(null, !1)
2651
2766
  },
2652
2767
  setup(t) {
2653
- const e = t, r = Y(G()), { options: n } = N(e), { allOptions: a } = j(n, Wa);
2654
- return { __sfc: !0, props: e, slots: r, options: n, allOptions: a, LumeChart: ee, LumeLineGroup: pt };
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 };
2655
2770
  }
2656
2771
  });
2657
- var Xa = function() {
2772
+ var so = function() {
2658
2773
  var e = this, r = e._self._c, n = e._self._setupProxy;
2659
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) {
2660
2775
  return [r(n.LumeLineGroup, e._b({}, "lume-line-group", a, !1))];
@@ -2663,28 +2778,28 @@ var Xa = function() {
2663
2778
  return [e._t(o, null, null, l || {})];
2664
2779
  } };
2665
2780
  })], null, !0) }, "lume-chart", n.props, !1));
2666
- }, Ua = [], Ya = /* @__PURE__ */ I(
2667
- Za,
2668
- Xa,
2669
- Ua,
2781
+ }, co = [], vo = /* @__PURE__ */ I(
2782
+ io,
2783
+ so,
2784
+ co,
2670
2785
  !1,
2671
2786
  null,
2672
2787
  null,
2673
2788
  null,
2674
2789
  null
2675
2790
  );
2676
- const vo = Ya.exports;
2677
- function Ka(t) {
2678
- return { areaPathDefinition: d(
2791
+ const Io = vo.exports;
2792
+ function _o(t) {
2793
+ return { areaPathDefinition: c(
2679
2794
  () => function(r, n) {
2680
2795
  if (!r || !n)
2681
2796
  return;
2682
2797
  const a = t.value[0].values;
2683
- return $t().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);
2684
2799
  }
2685
2800
  ) };
2686
2801
  }
2687
- const Ja = {
2802
+ const fo = {
2688
2803
  margins: {
2689
2804
  top: 0,
2690
2805
  right: 0,
@@ -2698,35 +2813,36 @@ const Ja = {
2698
2813
  tooltipOptions: {
2699
2814
  showTitle: !1
2700
2815
  }
2701
- }, Qa = /* @__PURE__ */ D({
2816
+ }, po = /* @__PURE__ */ C({
2702
2817
  __name: "lume-sparkline-chart",
2703
2818
  props: {
2704
- ...we(null),
2705
- ...ae()
2819
+ ...He(null),
2820
+ ...ie()
2706
2821
  },
2707
2822
  setup(t, { expose: e }) {
2708
- const r = t, n = Y(G()), { data: a, options: o } = N(r), { internalData: l } = Ie(a), { allOptions: i } = j(o, Ja), { computedLineData: u } = _t(l), { areaPathDefinition: s } = Ka(u), c = d(() => l.value[0].color), _ = d(
2709
- () => 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
2710
2825
  );
2711
- function p(v) {
2826
+ function f(_) {
2712
2827
  return {
2713
- ...v,
2828
+ ..._,
2714
2829
  noMinSize: !0
2715
2830
  };
2716
2831
  }
2717
- function h(v, m, b) {
2718
- return ne().range([0, b.width]).domain([0, v[0].values.length - 1]);
2832
+ function h(_, m, k) {
2833
+ return ue().range([0, k.width]).domain([0, _[0].values.length - 1]);
2719
2834
  }
2720
2835
  return e({
2721
2836
  areaPathDefinition: s
2722
- }), { __sfc: !0, props: r, slots: n, data: a, options: o, internalData: l, allOptions: i, computedLineData: u, areaPathDefinition: s, computedColor: c, areaColor: _, getSparklineOptions: p, xScaleGenerator: h, LumeChart: ee, LumeLineGroup: pt };
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 };
2723
2838
  }
2724
2839
  });
2725
- var qa = function() {
2840
+ var mo = function() {
2726
2841
  var e = this, r = e._self._c, n = e._self._setupProxy;
2727
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) {
2728
2843
  return [n.allOptions.showArea ? r("path", { class: [
2729
2844
  "sparkline-chart__area",
2845
+ n.options.withTransition !== !1 ? "sparkline-chart__area--transition" : "",
2730
2846
  `lume-fill--${n.areaColor || n.computedColor}`,
2731
2847
  "lume-fill--faded"
2732
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))];
@@ -2735,39 +2851,41 @@ var qa = function() {
2735
2851
  return [e._t(o, null, null, l || {})];
2736
2852
  } };
2737
2853
  })], null, !0) }, "lume-chart", n.props, !1));
2738
- }, eo = [], to = /* @__PURE__ */ I(
2739
- Qa,
2740
- qa,
2741
- eo,
2854
+ }, ho = [], go = /* @__PURE__ */ I(
2855
+ po,
2856
+ mo,
2857
+ ho,
2742
2858
  !1,
2743
2859
  null,
2744
- "60a59b77",
2860
+ "9fc2cb6e",
2745
2861
  null,
2746
2862
  null
2747
2863
  );
2748
- const _o = to.exports;
2864
+ const wo = go.exports;
2749
2865
  export {
2750
- lo as LumeAlluvialDiagram,
2751
- zr as LumeAlluvialGroup,
2752
- dn as LumeAxis,
2753
- $e as LumeBar,
2754
- uo as LumeBarChart,
2755
- Ee as LumeBarGroup,
2756
- ee as LumeChart,
2757
- Tn as LumeChartContainer,
2758
- wn as LumeChartLegend,
2759
- so as LumeGroupedBarChart,
2760
- Ca as LumeLine,
2761
- vo as LumeLineChart,
2762
- pt as LumeLineGroup,
2763
- vr as LumeOverlayGroup,
2764
- Sa as LumePoint,
2765
- io as LumeSingleBarChart,
2766
- _o as LumeSparklineChart,
2767
- co as LumeStackedBarChart,
2768
- Un as LumeTooltip,
2769
- Mn as LumeTooltipItem,
2770
- Pn as LumeTooltipSummary,
2771
- Hn as LumeTooltipTitle
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
2772
2890
  };
2773
2891
  //# sourceMappingURL=index.js.map