@adyen/lume 1.16.0 → 1.16.2

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.
Files changed (37) hide show
  1. package/dist/@types/components/core/lume-axis/composables/y-band-scale-axis.d.ts.map +1 -1
  2. package/dist/@types/components/core/lume-axis/composables/y-linear-scale-axis.d.ts.map +1 -1
  3. package/dist/@types/components/core/lume-axis/defaults.d.ts.map +1 -1
  4. package/dist/@types/components/core/lume-axis/helpers.d.ts +3 -0
  5. package/dist/@types/components/core/lume-axis/helpers.d.ts.map +1 -0
  6. package/dist/@types/components/core/lume-axis/lume-axis.vue.d.ts +2 -0
  7. package/dist/@types/components/core/lume-axis/lume-axis.vue.d.ts.map +1 -1
  8. package/dist/@types/components/core/lume-axis/types.d.ts +1 -1
  9. package/dist/@types/components/core/lume-axis/types.d.ts.map +1 -1
  10. package/dist/@types/components/core/lume-chart/lume-chart.vue.d.ts.map +1 -1
  11. package/dist/@types/components/groups/lume-line-group/lume-line-group.vue.d.ts.map +1 -1
  12. package/dist/@types/types/options.d.ts +1 -0
  13. package/dist/@types/types/options.d.ts.map +1 -1
  14. package/dist/@types/utils/margins.d.ts +1 -1
  15. package/dist/@types/utils/margins.d.ts.map +1 -1
  16. package/dist/common/191jEFi1.js +5 -0
  17. package/dist/common/191jEFi1.js.map +1 -0
  18. package/dist/common/7K7lDbsA.js +5 -0
  19. package/dist/common/7K7lDbsA.js.map +1 -0
  20. package/dist/common/CQvJ9XFA.js +5 -0
  21. package/dist/common/CQvJ9XFA.js.map +1 -0
  22. package/dist/common/{AquR79cs.js → DtYmG1uv.js} +1301 -1258
  23. package/dist/common/DtYmG1uv.js.map +1 -0
  24. package/dist/index.js +1 -1
  25. package/dist/plugin.js +1 -1
  26. package/dist/scss/components/lume-chart-legend.scss +32 -0
  27. package/dist/scss/components/lume-chart.scss +2 -1
  28. package/dist/scss/main.scss +1 -1
  29. package/dist/styles/main.css +1 -1
  30. package/package.json +1 -1
  31. package/dist/common/AquR79cs.js.map +0 -1
  32. package/dist/common/Bq_jPnF9.js +0 -5
  33. package/dist/common/Bq_jPnF9.js.map +0 -1
  34. package/dist/common/C0MIMWja.js +0 -5
  35. package/dist/common/C0MIMWja.js.map +0 -1
  36. package/dist/common/CduLx8z6.js +0 -5
  37. package/dist/common/CduLx8z6.js.map +0 -1
@@ -1,8 +1,8 @@
1
- import { defineComponent as R, ref as I, isRef as Nt, computed as v, watch as H, toRefs as V, inject as Oe, reactive as Ie, onMounted as re, watchEffect as Et, onBeforeUnmount as $t, useSlots as X, nextTick as Be, provide as Pe, defineAsyncComponent as Re } from "vue";
2
- import { sankeyLinkHorizontal as Jt, sankey as Qt, sankeyJustify as qt } from "d3-sankey";
3
- import { format as en, ticks as tn, scaleLinear as ge, scaleBand as he, link as nn, line as rn, area as an } from "d3";
4
- import { createPopper as on } from "@popperjs/core";
5
- const ln = /* @__PURE__ */ R({
1
+ import { defineComponent as S, ref as N, isRef as $t, computed as v, watch as R, toRefs as z, inject as we, reactive as De, onMounted as ue, watchEffect as wt, onBeforeUnmount as Dt, useSlots as Q, nextTick as Fe, provide as Be, defineAsyncComponent as Ce } from "vue";
2
+ import { sankeyLinkHorizontal as qt, sankey as en, sankeyJustify as tn } from "d3-sankey";
3
+ import { format as nn, ticks as rn, scaleLinear as ke, scaleBand as xe, link as an, line as on, area as ln } from "d3";
4
+ import { createPopper as un } from "@popperjs/core";
5
+ const sn = /* @__PURE__ */ S({
6
6
  __name: "lume-tick",
7
7
  props: {
8
8
  value: {
@@ -40,18 +40,18 @@ const ln = /* @__PURE__ */ R({
40
40
  },
41
41
  emits: ["click", "mouseenter"],
42
42
  setup(t, { expose: e, emit: r }) {
43
- const n = I(null);
43
+ const n = N(null);
44
44
  return e({ ref: n }), { __sfc: !0, emit: r, labelRef: n };
45
45
  }
46
46
  });
47
- function S(t, e, r, n, a, o, l, i) {
47
+ function H(t, e, r, n, a, o, l, i) {
48
48
  var u = typeof t == "function" ? t.options : t;
49
49
  return e && (u.render = e, u.staticRenderFns = r, u._compiled = !0), o && (u._scopeId = "data-v-" + o), {
50
50
  exports: t,
51
51
  options: u
52
52
  };
53
53
  }
54
- var un = function() {
54
+ var cn = function() {
55
55
  var e = this, r = e._self._c, n = e._self._setupProxy;
56
56
  return r("g", e._b({ staticClass: "axis__tick", class: {
57
57
  "axis__tick--hovered": e.isHovered,
@@ -61,15 +61,15 @@ var un = function() {
61
61
  }, click: function(a) {
62
62
  return n.emit("click", a);
63
63
  } } }, "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()]);
64
- }, sn = [], cn = /* @__PURE__ */ S(
65
- ln,
66
- un,
64
+ }, dn = [], vn = /* @__PURE__ */ H(
67
65
  sn,
66
+ cn,
67
+ dn,
68
68
  !1,
69
69
  null,
70
70
  "59ddc0a6"
71
71
  );
72
- const dn = cn.exports, vn = [
72
+ const fn = vn.exports, pn = [
73
73
  "controls",
74
74
  "legend",
75
75
  "axes",
@@ -77,64 +77,64 @@ const dn = cn.exports, vn = [
77
77
  "tooltip",
78
78
  "tooltip-content"
79
79
  ];
80
- function wt() {
80
+ function Rt() {
81
81
  return process.env.NODE_ENV === "production";
82
82
  }
83
- function Dt(t) {
83
+ function Ht(t) {
84
84
  return (t == null ? void 0 : t.map(
85
85
  (e) => e.values.map((r) => r == null ? void 0 : r.value).flat()
86
86
  ).flat()) || [];
87
87
  }
88
- function Ke(t) {
88
+ function Qe(t) {
89
89
  return t.length === 1;
90
90
  }
91
- function fn(t) {
91
+ function _n(t) {
92
92
  return !!t && t.every(
93
93
  (e) => "color" in e
94
94
  );
95
95
  }
96
- function Ce(t) {
96
+ function Ge(t) {
97
97
  return !!t && typeof t == "object" && !Array.isArray(t);
98
98
  }
99
- function Ht(t, e) {
99
+ function St(t, e) {
100
100
  const r = { ...t };
101
101
  return Object.entries(e).forEach(([n, a]) => {
102
- r[n] = Ce(t[n]) && Ce(a) ? Ht(t[n], a) : a;
102
+ r[n] = Ge(t[n]) && Ge(a) ? St(t[n], a) : a;
103
103
  }), r;
104
104
  }
105
- function pn(t) {
106
- return t != null && Ce(t) && "value" in t;
105
+ function mn(t) {
106
+ return t != null && Ge(t) && "value" in t;
107
107
  }
108
- function K(t) {
108
+ function q(t) {
109
109
  return (t == null ? void 0 : t.bandwidth) !== void 0;
110
110
  }
111
- function mn(t) {
112
- return K(t) ? t.step() : Math.max(...t.range()) / Math.max(...t.domain());
111
+ function gn(t) {
112
+ return q(t) ? t.step() : Math.max(...t.range()) / Math.max(...t.domain());
113
113
  }
114
- function _n(t) {
114
+ function hn(t) {
115
115
  const [e, r] = t.domain();
116
116
  return e == null || r == null || e === 0 && r === 0;
117
117
  }
118
- const gn = (t, e) => {
118
+ const yn = (t, e) => {
119
119
  if (!t)
120
120
  throw new Error("Data is not a valid array");
121
121
  if (t.length === 0)
122
122
  throw new Error("Cannot get highest value from empty array");
123
123
  t.some(
124
124
  ({ values: n }) => n.length - 1 >= e
125
- ) || ne(J.IndexExceedsLengthOfDataSets);
125
+ ) || le(ne.IndexExceedsLengthOfDataSets);
126
126
  };
127
- function hn(t, e) {
127
+ function bn(t, e) {
128
128
  var r;
129
- return gn(t, e), ((r = t.reduce(
129
+ return yn(t, e), ((r = t.reduce(
130
130
  (n, a) => {
131
131
  var o, l;
132
132
  return (((o = n.values[e]) == null ? void 0 : o.value) ?? 0) > (((l = a.values[e]) == null ? void 0 : l.value) ?? 0) ? n : a;
133
133
  }
134
134
  ).values[e]) == null ? void 0 : r.value) || 0;
135
135
  }
136
- function St(t) {
137
- const e = Nt(t) ? t.value : t;
136
+ function Pt(t) {
137
+ const e = $t(t) ? t.value : t;
138
138
  if (!e)
139
139
  throw new Error("No empty array can be created from specified data value");
140
140
  const r = Math.max(
@@ -143,17 +143,17 @@ function St(t) {
143
143
  );
144
144
  return Array(r).fill(null);
145
145
  }
146
- function yn(t) {
147
- return K(t) ? t.domain().length : Math.max(...t.domain());
146
+ function kn(t) {
147
+ return q(t) ? t.domain().length : Math.max(...t.domain());
148
148
  }
149
- function bn(t, e) {
149
+ function xn(t, e) {
150
150
  return (r) => Math.round(t * (1 - r) + e * r);
151
151
  }
152
- function kn(t, e, r) {
152
+ function Ln(t, e, r) {
153
153
  const n = e, a = t.slice(0, n);
154
154
  return t.slice(n).concat(a);
155
155
  }
156
- function se(t) {
156
+ function fe(t) {
157
157
  if (t.groups) {
158
158
  const e = Object.keys(t);
159
159
  return Object.assign(
@@ -163,32 +163,32 @@ function se(t) {
163
163
  }
164
164
  return t;
165
165
  }
166
- function xn(t) {
166
+ function An(t) {
167
167
  return Object.assign(
168
168
  {},
169
169
  ...Object.keys(t).map(
170
- (e) => vn.includes(e) ? {} : { [e]: t[e] }
170
+ (e) => pn.includes(e) ? {} : { [e]: t[e] }
171
171
  )
172
172
  );
173
173
  }
174
- function Je(t, e) {
174
+ function qe(t, e) {
175
175
  const r = e - t.length;
176
176
  return r > 0 ? [...t, ...Array(r).fill({ value: null })] : t;
177
177
  }
178
- var J = /* @__PURE__ */ ((t) => (t.DatasetLength = `Our guidelines highly recommend not having more than 5 datasets in one chart.
179
- 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.IndexExceedsLengthOfDataSets = "Index exceeds length of all of the datasets", t))(J || {});
180
- const Ln = "[lume] ";
181
- function ne(t, e = !0) {
182
- e && wt() || console.warn(Ln + "Warning: " + t);
178
+ var ne = /* @__PURE__ */ ((t) => (t.DatasetLength = `Our guidelines highly recommend not having more than 5 datasets in one chart.
179
+ 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.IndexExceedsLengthOfDataSets = "Index exceeds length of all of the datasets", t))(ne || {});
180
+ const Tn = "[lume] ";
181
+ function le(t, e = !0) {
182
+ e && Rt() || console.warn(Tn + "Warning: " + t);
183
183
  }
184
- const Te = (t) => {
184
+ const Ne = (t) => {
185
185
  let e = null;
186
186
  switch (typeof t) {
187
187
  case "string":
188
188
  try {
189
- e = en(t);
189
+ e = nn(t);
190
190
  } catch {
191
- ne(J.InvalidFormat), e = null;
191
+ le(ne.InvalidFormat), e = null;
192
192
  }
193
193
  break;
194
194
  case "function":
@@ -201,46 +201,46 @@ const Te = (t) => {
201
201
  return e ? e(...n) : n[0];
202
202
  }
203
203
  return r;
204
- }, ye = () => ({
204
+ }, Le = () => ({
205
205
  options: {
206
206
  type: Object,
207
207
  default: () => ({})
208
208
  }
209
209
  });
210
- function Q(t, e) {
210
+ function re(t, e) {
211
211
  return { allOptions: v(() => {
212
- const n = Nt(e) ? e == null ? void 0 : e.value : e;
213
- return n ? Ht(n, t.value) : t.value;
212
+ const n = $t(e) ? e == null ? void 0 : e.value : e;
213
+ return n ? St(n, t.value) : t.value;
214
214
  }) };
215
215
  }
216
- const Tn = 0.2;
217
- function An(t, e, r) {
218
- const n = I(), a = v(() => Math.max(...t.value.range())), o = v(() => e.value.length);
216
+ const On = 0.2;
217
+ function In(t, e, r) {
218
+ const n = N(), a = v(() => Math.max(...t.value.range())), o = v(() => e.value.length);
219
219
  function l() {
220
220
  if (!e.value) return;
221
221
  const u = e.value.reduce(
222
- (s, f) => s + f.ref.getBoundingClientRect().width,
222
+ (c, d) => c + d.ref.getBoundingClientRect().width,
223
223
  0
224
- ), c = Math.ceil(u / o.value);
225
- n.value = c + c * Tn;
224
+ ), s = Math.ceil(u / o.value);
225
+ n.value = s + s * On;
226
226
  }
227
227
  function i(u) {
228
228
  if (!e.value) return !0;
229
- const c = r.value.skip, s = e.value.length;
229
+ const s = r.value.skip, c = e.value.length;
230
230
  if (u === 0) return !0;
231
- const f = a.value / s, m = typeof c == "number" && c > 0 && c + 1 || Math.ceil(n.value / f);
232
- return u % m === 0;
231
+ const d = a.value / c, _ = typeof s == "number" && s > 0 && s + 1 || Math.ceil(n.value / d);
232
+ return u % _ === 0;
233
233
  }
234
- return H(e, l), { showTick: i };
234
+ return R(e, l), { showTick: i };
235
235
  }
236
- const O = {
236
+ const I = {
237
237
  HORIZONTAL: "horizontal",
238
238
  VERTICAL: "vertical"
239
- }, On = {
239
+ }, Nn = {
240
240
  SINGLE: "single",
241
241
  GROUPED: "grouped",
242
242
  STACKED: "stacked"
243
- }, Pt = "No data", st = 20, Rt = 0.33, Bt = 0.5, Ct = 12, be = 8, In = 1, Nn = [
243
+ }, Bt = "No data", dt = 20, Ct = 0.33, Ft = 0.5, Gt = 12, Ae = 8, En = 1, $n = [
244
244
  "auto",
245
245
  "auto-start",
246
246
  "auto-end",
@@ -257,10 +257,10 @@ const O = {
257
257
  "left-start",
258
258
  "left-end"
259
259
  ];
260
- function Ne(t) {
261
- t != null && t.closest("svg") || ne(J.NotContainedInSvg);
260
+ function Re(t) {
261
+ t != null && t.closest("svg") || le(ne.NotContainedInSvg);
262
262
  }
263
- const Ft = {
263
+ const jt = {
264
264
  /** Displays a line for each tick. */
265
265
  gridLines: !1,
266
266
  /** Displays the axis title. */
@@ -275,31 +275,33 @@ const Ft = {
275
275
  /** Formatting string/function for the tick label. */
276
276
  tickFormat: null,
277
277
  /** Space between the tick label and the axis line. */
278
- tickPadding: 12
279
- }, En = {
280
- ...Ft,
278
+ tickPadding: 12,
279
+ /** Horizontal alignment of the tick labels. Only applies to y axes. */
280
+ tickAlign: "end"
281
+ }, wn = {
282
+ ...jt,
281
283
  withTitle: !1,
282
284
  skip: !0
283
- }, $n = {
284
- ...Ft,
285
+ }, Dn = {
286
+ ...jt,
285
287
  gridLines: !0
286
- }, wn = function(t, e, r) {
288
+ }, Rn = function(t, e, r) {
287
289
  const n = v(() => t.value.step() * t.value.paddingInner() / 2);
288
- function a(u, c) {
290
+ function a(u, s) {
289
291
  return {
290
- transform: `translate(${(t.value(c) ?? t.value(u)) - n.value}, 0)`
292
+ transform: `translate(${(t.value(s) ?? t.value(u)) - n.value}, 0)`
291
293
  };
292
294
  }
293
295
  function o(u) {
294
- var s;
295
- const c = Math.max(
296
+ var c;
297
+ const s = Math.max(
296
298
  t.value.step(),
297
- (u ? (s = u.getComputedTextLength) == null ? void 0 : s.call(u) : t.value.step()) + 20
299
+ (u ? (c = u.getComputedTextLength) == null ? void 0 : c.call(u) : t.value.step()) + 20
298
300
  );
299
301
  return {
300
- x: -(c - t.value.step()) / 2,
301
- width: c,
302
- height: r.value.tickPadding + Ct + be
302
+ x: -(s - t.value.step()) / 2,
303
+ width: s,
304
+ height: r.value.tickPadding + Gt + Ae
303
305
  };
304
306
  }
305
307
  function l() {
@@ -325,19 +327,23 @@ const Ft = {
325
327
  getTickGroupAttributes: a,
326
328
  getTickLabelAttributes: i
327
329
  };
328
- }, Dn = function(t, e, r) {
330
+ };
331
+ function Ee(t, e) {
332
+ return t.tickAlign === "start" && e != null;
333
+ }
334
+ const Hn = function(t, e, r) {
329
335
  const n = v(() => t.value.step() * t.value.paddingInner() / 2);
330
- function a(u, c) {
336
+ function a(u, s) {
331
337
  return {
332
- transform: `translate(0, ${(t.value(c) ?? t.value(u)) - n.value})`
338
+ transform: `translate(0, ${(t.value(s) ?? t.value(u)) - n.value})`
333
339
  };
334
340
  }
335
- function o(u) {
336
- var s;
337
- const c = (u ? (s = u.getComputedTextLength) == null ? void 0 : s.call(u) : 42) + r.value.tickPadding + be;
341
+ function o(u, s) {
342
+ var g;
343
+ const c = u ? (g = u.getComputedTextLength) == null ? void 0 : g.call(u) : 42, _ = (Ee(r.value, s) ? s : c) + r.value.tickPadding + Ae;
338
344
  return {
339
- x: -c,
340
- width: c,
345
+ x: -_,
346
+ width: _,
341
347
  height: t.value.step()
342
348
  };
343
349
  }
@@ -349,11 +355,12 @@ const Ft = {
349
355
  x1: e.value.width
350
356
  };
351
357
  }
352
- function i() {
358
+ function i(u) {
359
+ const s = Ee(r.value, u);
353
360
  return {
354
- x: -r.value.tickPadding,
361
+ x: -(r.value.tickPadding + (s ? u : 0)),
355
362
  y: t.value.step() / 2,
356
- "text-anchor": "end",
363
+ "text-anchor": s ? "start" : "end",
357
364
  "alignment-baseline": "middle"
358
365
  };
359
366
  }
@@ -363,7 +370,7 @@ const Ft = {
363
370
  getTickGroupAttributes: a,
364
371
  getTickLabelAttributes: i
365
372
  };
366
- }, Hn = function(t, e, r) {
373
+ }, Sn = function(t, e, r) {
367
374
  const n = v(() => {
368
375
  const u = t.value.ticks();
369
376
  return u.length > 1 ? t.value(u[1]) - t.value(u[0]) : 0;
@@ -375,7 +382,7 @@ const Ft = {
375
382
  }
376
383
  function o() {
377
384
  return {
378
- height: r.value.tickPadding + Ct + be,
385
+ height: r.value.tickPadding + Gt + Ae,
379
386
  width: n.value,
380
387
  x: -(n.value / 2)
381
388
  };
@@ -398,7 +405,7 @@ const Ft = {
398
405
  getTickGroupAttributes: a,
399
406
  getTickLabelAttributes: i
400
407
  };
401
- }, Sn = function(t, e, r) {
408
+ }, Pn = function(t, e, r) {
402
409
  const n = v(() => {
403
410
  const u = t.value.ticks();
404
411
  return u.length > 1 ? t.value(u[1]) - t.value(u[0]) : 0;
@@ -408,13 +415,13 @@ const Ft = {
408
415
  transform: `translate(0, ${t.value(u)})`
409
416
  };
410
417
  }
411
- function o(u) {
412
- var s;
413
- const c = (((s = u == null ? void 0 : u.getComputedTextLength) == null ? void 0 : s.call(u)) || 0) + r.value.tickPadding + be;
418
+ function o(u, s) {
419
+ var _;
420
+ const d = (Ee(r.value, s) ? s : ((_ = u == null ? void 0 : u.getComputedTextLength) == null ? void 0 : _.call(u)) || 0) + r.value.tickPadding + Ae;
414
421
  return {
415
- width: c,
422
+ width: d,
416
423
  height: n.value,
417
- x: -c,
424
+ x: -d,
418
425
  y: -(n.value / 2)
419
426
  };
420
427
  }
@@ -423,11 +430,12 @@ const Ft = {
423
430
  x1: e.value.width
424
431
  };
425
432
  }
426
- function i() {
433
+ function i(u) {
434
+ const s = Ee(r.value, u);
427
435
  return {
428
- x: -r.value.tickPadding,
436
+ x: -(r.value.tickPadding + (s ? u : 0)),
429
437
  dy: "0.4em",
430
- "text-anchor": "end"
438
+ "text-anchor": s ? "start" : "end"
431
439
  };
432
440
  }
433
441
  return {
@@ -436,14 +444,14 @@ const Ft = {
436
444
  getTickGroupAttributes: a,
437
445
  getTickLabelAttributes: i
438
446
  };
439
- }, Pn = {
440
- "x-band-scale-axis": wn,
441
- "y-band-scale-axis": Dn,
442
- "x-linear-scale-axis": Hn,
443
- "y-linear-scale-axis": Sn
447
+ }, Bn = {
448
+ "x-band-scale-axis": Rn,
449
+ "y-band-scale-axis": Hn,
450
+ "x-linear-scale-axis": Sn,
451
+ "y-linear-scale-axis": Pn
444
452
  };
445
- var Fe = /* @__PURE__ */ ((t) => (t.bandScale = "band-scale-axis", t.linearScale = "linear-scale-axis", t))(Fe || {}), Ge = /* @__PURE__ */ ((t) => (t.left = "left", t.bottom = "bottom", t))(Ge || {}), Le = /* @__PURE__ */ ((t) => (t.x = "bottom", t.y = "left", t))(Le || {});
446
- const Rn = /* @__PURE__ */ R({
453
+ var je = /* @__PURE__ */ ((t) => (t.bandScale = "band-scale-axis", t.linearScale = "linear-scale-axis", t))(je || {}), Ve = /* @__PURE__ */ ((t) => (t.left = "left", t.bottom = "bottom", t))(Ve || {}), Ie = /* @__PURE__ */ ((t) => (t.x = "bottom", t.y = "left", t))(Ie || {});
454
+ const Cn = /* @__PURE__ */ S({
447
455
  __name: "lume-axis",
448
456
  props: {
449
457
  scale: {
@@ -453,12 +461,12 @@ const Rn = /* @__PURE__ */ R({
453
461
  type: {
454
462
  type: String,
455
463
  default: void 0,
456
- validator: (t) => t in Le
464
+ validator: (t) => t in Ie
457
465
  },
458
466
  position: {
459
467
  type: String,
460
468
  default: void 0,
461
- validator: (t) => t in Ge
469
+ validator: (t) => t in Ve
462
470
  },
463
471
  containerSize: {
464
472
  type: Object,
@@ -470,102 +478,123 @@ const Rn = /* @__PURE__ */ R({
470
478
  },
471
479
  orientation: {
472
480
  type: String,
473
- default: O.VERTICAL
481
+ default: I.VERTICAL
474
482
  },
475
- ...ye()
483
+ ...Le()
476
484
  },
477
- emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
485
+ emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size", "lume__internal--axis-overflow"],
478
486
  setup(t, { emit: e }) {
479
- const r = t, n = 16, { scale: a, containerSize: o, hoveredIndex: l, options: i, orientation: u } = V(r), c = Oe("isEmpty", I(!1)), s = Ie({}), f = I(null), m = I(null), h = I(null), g = v(
480
- () => r.type ? Le[r.type] : r.position
481
- ), _ = v(
482
- () => r.type || (g.value === "left" ? "y" : "x")
483
- ), x = v(
484
- () => _.value === "x" && u.value === O.VERTICAL || _.value === "y" && u.value === O.HORIZONTAL
485
- ), { allOptions: d } = Q(
486
- i,
487
- _.value === "x" ? En : $n
488
- ), { showTick: p } = An(a, f, d), y = v(
489
- () => c.value || !a.value || _n(a.value)
490
- ), k = v(() => {
491
- var E, w, P, te;
492
- return _.value === "y" && y.value ? `translate(0, ${((E = o.value) == null ? void 0 : E.height) / 2})` : _.value === "x" && y.value ? `translate(-${((w = o.value) == null ? void 0 : w.width) / 2}, ${(P = o.value) == null ? void 0 : P.height})` : `translate(0, ${_.value === "x" ? (te = o.value) == null ? void 0 : te.height : 0})`;
493
- }), T = v(() => {
494
- if (!a.value) return [];
495
- if (K(a.value))
496
- return a.value.labels || a.value.domain();
497
- const { tickCount: E } = d.value, [w, P] = a.value.domain();
498
- return tn(w, P, E);
499
- }), N = v(() => {
500
- const { tickFormat: E } = d.value;
501
- return Te(E);
502
- }), A = v(
503
- () => d.value.withHover && x.value && l.value > -1
504
- ), D = v(
505
- () => d.value.tickPadding + be || n
506
- ), C = v(() => _.value === "x" ? (
487
+ const r = t, n = 16, a = 2, { scale: o, containerSize: l, hoveredIndex: i, options: u, orientation: s } = z(r), c = we("isEmpty", N(!1)), d = De({}), _ = N(null), g = N(null), m = N(null), h = v(
488
+ () => r.type ? Ie[r.type] : r.position
489
+ ), b = v(
490
+ () => r.type || (h.value === "left" ? "y" : "x")
491
+ ), p = v(
492
+ () => b.value === "x" && s.value === I.VERTICAL || b.value === "y" && s.value === I.HORIZONTAL
493
+ ), { allOptions: f } = re(
494
+ u,
495
+ b.value === "x" ? wn : Dn
496
+ ), { showTick: y } = In(o, _, f), x = v(
497
+ () => c.value || !o.value || hn(o.value)
498
+ ), A = v(() => {
499
+ var O, $, w, W;
500
+ return b.value === "y" && x.value ? `translate(0, ${((O = l.value) == null ? void 0 : O.height) / 2})` : b.value === "x" && x.value ? `translate(-${(($ = l.value) == null ? void 0 : $.width) / 2}, ${(w = l.value) == null ? void 0 : w.height})` : `translate(0, ${b.value === "x" ? (W = l.value) == null ? void 0 : W.height : 0})`;
501
+ }), E = v(() => {
502
+ if (!o.value) return [];
503
+ if (q(o.value))
504
+ return o.value.labels || o.value.domain();
505
+ const { tickCount: O } = f.value, [$, w] = o.value.domain();
506
+ return rn($, w, O);
507
+ }), B = v(() => {
508
+ const { tickFormat: O } = f.value;
509
+ return Ne(O);
510
+ }), G = v(
511
+ () => f.value.withHover && p.value && i.value > -1
512
+ ), T = v(
513
+ () => f.value.tickPadding + Ae || n
514
+ ), P = v(() => b.value === "x" ? (
507
515
  // If x axis, get the tick height
508
516
  Math.max(
509
- ...(f.value || []).map(
510
- (E) => {
511
- var w, P;
512
- return ((P = (w = E.ref).getBBox) == null ? void 0 : P.call(w).height) + D.value;
517
+ ...(_.value || []).map(
518
+ (O) => {
519
+ var $, w;
520
+ return ((w = ($ = O.ref).getBBox) == null ? void 0 : w.call($).height) + T.value;
513
521
  }
514
522
  )
515
523
  )
516
524
  ) : (
517
525
  // If y axis, get the tick width
518
526
  Math.max(
519
- ...(f.value || []).map(
520
- (E) => {
521
- var w, P;
522
- return ((P = (w = E.ref).getBBox) == null ? void 0 : P.call(w).width) + D.value;
527
+ ...(_.value || []).map(
528
+ (O) => {
529
+ var $, w;
530
+ return ((w = ($ = O.ref).getBBox) == null ? void 0 : w.call($).width) + T.value;
523
531
  }
524
532
  )
525
533
  )
526
- ));
527
- function M(E) {
528
- const { showTicks: w } = d.value;
529
- return w === !1 ? "" : N.value(E);
530
- }
531
- function z(E, w, P) {
532
- e("mouseenter", { index: x.value ? E : null, value: w, event: P });
533
- }
534
- function ee(E, w, P) {
535
- e("click", { index: E, value: w, event: P });
536
- }
537
- function ce(E) {
538
- var w;
539
- if (!(!f.value || !f.value.length))
540
- return (w = f.value[E]) == null ? void 0 : w.ref;
541
- }
542
- function ae() {
543
- h.value = T.value.map(
544
- (E, w) => ({
545
- value: M(E),
546
- group: s.getTickGroupAttributes(E, w),
547
- ghost: s.getTickGhostAttributes(ce(w)),
548
- label: s.getTickLabelAttributes(),
549
- gridline: s.getGridLinesAttributes()
550
- })
534
+ )), j = v(() => {
535
+ var W, _e, Z, ce;
536
+ if (b.value !== "x" || !o.value || !E.value.length)
537
+ return 0;
538
+ const O = E.value.length - 1, $ = (ce = (Z = (_e = (W = _.value) == null ? void 0 : W[O]) == null ? void 0 : _e.ref) == null ? void 0 : Z.getBBox) == null ? void 0 : ce.call(Z).width;
539
+ if (!$) return 0;
540
+ const w = q(o.value) ? (o.value(O) ?? o.value(E.value[O])) + o.value.bandwidth() / 2 : o.value(E.value[O]);
541
+ return Math.max(
542
+ 0,
543
+ Math.ceil(
544
+ w + $ / 2 + a - l.value.width
545
+ )
551
546
  );
547
+ });
548
+ function V(O) {
549
+ const { showTicks: $ } = f.value;
550
+ return $ === !1 ? "" : B.value(O);
551
+ }
552
+ function K(O, $, w) {
553
+ e("mouseenter", { index: p.value ? O : null, value: $, event: w });
554
+ }
555
+ function ye(O, $, w) {
556
+ e("click", { index: O, value: $, event: w });
557
+ }
558
+ function pe(O) {
559
+ var $;
560
+ if (!(!_.value || !_.value.length))
561
+ return ($ = _.value[O]) == null ? void 0 : $.ref;
562
+ }
563
+ function ie() {
564
+ const O = (_.value || []).map(($) => {
565
+ var w, W;
566
+ return (W = (w = $.ref) == null ? void 0 : w.getComputedTextLength) == null ? void 0 : W.call(w);
567
+ }).filter(($) => $ != null);
568
+ return O.length ? Math.max(...O) : void 0;
552
569
  }
553
570
  function oe() {
554
- h.value && h.value.map((E) => (E.gridline = s.getGridLinesAttributes(), E));
555
- }
556
- function le() {
557
- if (!a.value) return;
558
- const E = a.value.step ? "bandScale" : "linearScale", w = Pn[`${_.value}-${Fe[E]}`];
559
- Object.entries(w(a, o, d) || []).forEach(
560
- ([P, te]) => {
561
- s[P] = te;
571
+ const O = ie();
572
+ m.value = E.value.map(
573
+ ($, w) => ({
574
+ value: V($),
575
+ group: d.getTickGroupAttributes($, w),
576
+ ghost: d.getTickGhostAttributes(pe(w), O),
577
+ label: d.getTickLabelAttributes(O),
578
+ gridline: d.getGridLinesAttributes()
579
+ })
580
+ );
581
+ }
582
+ function se() {
583
+ m.value && m.value.map((O) => (O.gridline = d.getGridLinesAttributes(), O));
584
+ }
585
+ function te() {
586
+ if (!o.value) return;
587
+ const O = o.value.step ? "bandScale" : "linearScale", $ = Bn[`${b.value}-${je[O]}`];
588
+ Object.entries($(o, l, f) || []).forEach(
589
+ ([w, W]) => {
590
+ d[w] = W;
562
591
  }
563
592
  );
564
593
  }
565
- return H(a, le, { flush: "sync", immediate: !0 }), H(a, ae, { immediate: !0 }), H(f, ae), H(C, (E) => e("lume__internal--axis-size", E)), H(r.containerSize, oe), re(() => Ne(m.value)), { __sfc: !0, SCALE_MIXIN_MAP: Fe, POSITIONS: Ge, TYPES: Le, AXIS_LABEL_OFFSET: n, props: r, emit: e, scale: a, containerSize: o, hoveredIndex: l, options: i, orientation: u, isEmpty: c, mixins: s, tickRefs: f, root: m, ticksWithAttributes: h, computedPosition: g, computedType: _, shouldHover: x, allOptions: d, showTick: p, alignAxisBaseline: y, axisTransform: k, ticks: T, tickFormatter: N, isHovering: A, axisLabelOffset: D, axisSize: C, formatTick: M, handleTickMouseenter: z, handleTickClick: ee, getTextNode: ce, setTicks: ae, updateGridlines: oe, init: le, LumeTick: dn };
594
+ return R(o, te, { flush: "sync", immediate: !0 }), R(o, oe, { immediate: !0 }), R(_, oe), R(P, (O) => e("lume__internal--axis-size", O)), R(j, (O) => e("lume__internal--axis-overflow", O)), R(r.containerSize, se), ue(() => Re(g.value)), { __sfc: !0, SCALE_MIXIN_MAP: je, POSITIONS: Ve, TYPES: Ie, AXIS_LABEL_OFFSET: n, AXIS_LABEL_RIGHT_LEEWAY: a, props: r, emit: e, scale: o, containerSize: l, hoveredIndex: i, options: u, orientation: s, isEmpty: c, mixins: d, tickRefs: _, root: g, ticksWithAttributes: m, computedPosition: h, computedType: b, shouldHover: p, allOptions: f, showTick: y, alignAxisBaseline: x, axisTransform: A, ticks: E, tickFormatter: B, isHovering: G, axisLabelOffset: T, axisSize: P, rightOverflow: j, formatTick: V, handleTickMouseenter: K, handleTickClick: ye, getTextNode: pe, getMaxLabelWidth: ie, setTicks: oe, updateGridlines: se, init: te, LumeTick: fn };
566
595
  }
567
596
  });
568
- var Bn = function() {
597
+ var Fn = function() {
569
598
  var e = this, r = e._self._c, n = e._self._setupProxy;
570
599
  return n.scale ? r("g", { ref: "root", staticClass: "axis", attrs: { transform: n.axisTransform, "data-j-axis": "" }, on: { mouseleave: function(a) {
571
600
  return n.emit("mouseleave", a);
@@ -582,16 +611,16 @@ var Bn = function() {
582
611
  a
583
612
  );
584
613
  } } }, "lume-tick", n.ticksWithAttributes[n.hoveredIndex], !1)) : e._e()], 2) : e._e();
585
- }, Cn = [], Fn = /* @__PURE__ */ S(
586
- Rn,
587
- Bn,
614
+ }, Gn = [], jn = /* @__PURE__ */ H(
588
615
  Cn,
616
+ Fn,
617
+ Gn,
589
618
  !1,
590
619
  null,
591
620
  null
592
621
  );
593
- const Gn = Fn.exports;
594
- function jn(t, e, r, n) {
622
+ const Vn = jn.exports;
623
+ function Mn(t, e, r, n) {
595
624
  const a = v(() => r.value > 0 && r.value < 1), o = v(
596
625
  () => n.value > 0 && n.value < 1
597
626
  ), l = v(
@@ -603,13 +632,13 @@ function jn(t, e, r, n) {
603
632
  );
604
633
  return { computedX: l, computedY: i, shouldHaveMinWidth: a, shouldHaveMinHeight: o };
605
634
  }
606
- function Vn(t, e, r, n) {
607
- const a = I(0), o = I(0), l = v(() => `${t.value + r.value / 2}px ${e.value + n.value / 2}px`);
608
- return re(() => {
635
+ function zn(t, e, r, n) {
636
+ const a = N(0), o = N(0), l = v(() => `${t.value + r.value / 2}px ${e.value + n.value / 2}px`);
637
+ return ue(() => {
609
638
  a.value = r.value, o.value = n.value;
610
- }), H(r, (i) => a.value = i), H(n, (i) => o.value = i), { computedWidth: a, computedHeight: o, transformOrigin: l };
639
+ }), R(r, (i) => a.value = i), R(n, (i) => o.value = i), { computedWidth: a, computedHeight: o, transformOrigin: l };
611
640
  }
612
- const Mn = /* @__PURE__ */ R({
641
+ const Wn = /* @__PURE__ */ S({
613
642
  __name: "lume-bar",
614
643
  props: {
615
644
  x: {
@@ -647,13 +676,13 @@ const Mn = /* @__PURE__ */ R({
647
676
  },
648
677
  emits: ["click", "mouseover", "mouseleave"],
649
678
  setup(t, { emit: e }) {
650
- const r = t, { x: n, y: a, width: o, height: l, transition: i, classList: u } = V(r), c = I(null), s = v(
679
+ const r = t, { x: n, y: a, width: o, height: l, transition: i, classList: u } = z(r), s = N(null), c = v(
651
680
  () => typeof u.value == "string" ? [u.value] : u.value
652
- ), f = v(() => i.value === "width"), m = v(() => i.value === "height"), h = Vn(n, a, o, l), { computedX: g, computedY: _, shouldHaveMinWidth: x, shouldHaveMinHeight: d } = jn(n, a, o, l), p = v(() => x.value ? 1 : (f.value ? h.computedWidth : o).value), y = v(() => d.value ? 1 : (m.value ? h.computedHeight : l).value), k = f.value || m.value ? h.transformOrigin : null;
653
- return re(() => Ne(c.value)), { __sfc: !0, props: r, emit: e, x: n, y: a, width: o, height: l, transition: i, classList: u, root: c, computedClasses: s, shouldTransitionWidth: f, shouldTransitionHeight: m, transitionProps: h, computedX: g, computedY: _, shouldHaveMinWidth: x, shouldHaveMinHeight: d, computedWidth: p, computedHeight: y, transformOrigin: k };
681
+ ), d = v(() => i.value === "width"), _ = v(() => i.value === "height"), g = zn(n, a, o, l), { computedX: m, computedY: h, shouldHaveMinWidth: b, shouldHaveMinHeight: p } = Mn(n, a, o, l), f = v(() => b.value ? 1 : (d.value ? g.computedWidth : o).value), y = v(() => p.value ? 1 : (_.value ? g.computedHeight : l).value), x = d.value || _.value ? g.transformOrigin : null;
682
+ return ue(() => Re(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: d, shouldTransitionHeight: _, transitionProps: g, computedX: m, computedY: h, shouldHaveMinWidth: b, shouldHaveMinHeight: p, computedWidth: f, computedHeight: y, transformOrigin: x };
654
683
  }
655
684
  });
656
- var zn = function() {
685
+ var Un = function() {
657
686
  var e = this, r = e._self._c, n = e._self._setupProxy;
658
687
  return r("rect", { ref: "root", staticClass: "lume-bar", class: [
659
688
  {
@@ -670,64 +699,64 @@ var zn = function() {
670
699
  }, mouseleave: function(a) {
671
700
  return n.emit("mouseleave", a);
672
701
  } } });
673
- }, Wn = [], Un = /* @__PURE__ */ S(
674
- Mn,
675
- zn,
702
+ }, Zn = [], Xn = /* @__PURE__ */ H(
676
703
  Wn,
704
+ Un,
705
+ Zn,
677
706
  !1,
678
707
  null,
679
708
  "8e8f732a"
680
709
  );
681
- const Qe = Un.exports;
682
- var ue = /* @__PURE__ */ ((t) => (t.Categorical = "categorical", t.Sequential = "sequential", t.Divergent = "divergent", t))(ue || {}), Y = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(Y || {}), Gt = /* @__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))(Gt || {}), qe = /* @__PURE__ */ ((t) => (t.SkyTeal = "skyblue-darkteal", t.VioletRoyal = "violet-royalblue", t.VioletTeal = "violet-darkteal", t.GoldTeal = "gold-darkteal", t.GoldRoyal = "gold-royalblue", t))(qe || {}), et = /* @__PURE__ */ ((t) => (t.White = "white", t.Black = "black", t.Green = "green", t.Yellow = "yellow", t.Orange = "orange", t.Red = "red", t.Grey = "grey", t.Grey10 = "grey-10", t.Grey20 = "grey-20", t.Grey30 = "grey-30", t.Grey40 = "grey-40", t.Grey50 = "grey-50", t.Grey60 = "grey-60", t.Grey70 = "grey-70", t.Grey80 = "grey-80", t.Grey90 = "grey-90", t.Grey100 = "grey-100", t))(et || {}), tt = /* @__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))(tt || {});
683
- const Zn = ue.Categorical, ke = Y.Skyblue, Xn = qe.SkyTeal;
684
- function Yn(t) {
685
- return t === ue.Divergent ? Xn : ke;
686
- }
687
- function Kn(t) {
688
- return Object.values(tt).includes(t);
689
- }
690
- function ct(t, e) {
691
- return e === ue.Divergent ? Object.values(qe).includes(t) : Object.values({
692
- ...Y,
693
- ...Gt,
694
- ...et,
695
- ...tt
710
+ const et = Xn.exports;
711
+ var de = /* @__PURE__ */ ((t) => (t.Categorical = "categorical", t.Sequential = "sequential", t.Divergent = "divergent", t))(de || {}), ee = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(ee || {}), Vt = /* @__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))(Vt || {}), tt = /* @__PURE__ */ ((t) => (t.SkyTeal = "skyblue-darkteal", t.VioletRoyal = "violet-royalblue", t.VioletTeal = "violet-darkteal", t.GoldTeal = "gold-darkteal", t.GoldRoyal = "gold-royalblue", t))(tt || {}), nt = /* @__PURE__ */ ((t) => (t.White = "white", t.Black = "black", t.Green = "green", t.Yellow = "yellow", t.Orange = "orange", t.Red = "red", t.Grey = "grey", t.Grey10 = "grey-10", t.Grey20 = "grey-20", t.Grey30 = "grey-30", t.Grey40 = "grey-40", t.Grey50 = "grey-50", t.Grey60 = "grey-60", t.Grey70 = "grey-70", t.Grey80 = "grey-80", t.Grey90 = "grey-90", t.Grey100 = "grey-100", t))(nt || {}), rt = /* @__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))(rt || {});
712
+ const Yn = de.Categorical, Te = ee.Skyblue, Kn = tt.SkyTeal;
713
+ function Jn(t) {
714
+ return t === de.Divergent ? Kn : Te;
715
+ }
716
+ function Qn(t) {
717
+ return Object.values(rt).includes(t);
718
+ }
719
+ function vt(t, e) {
720
+ return e === de.Divergent ? Object.values(tt).includes(t) : Object.values({
721
+ ...ee,
722
+ ...Vt,
723
+ ...nt,
724
+ ...rt
696
725
  }).includes(t);
697
726
  }
698
- function Jn(t, e) {
699
- const r = Object.values(Y).indexOf(t);
700
- return kn(Object.values(Y), r > -1 ? r : 0)[e];
727
+ function qn(t, e) {
728
+ const r = Object.values(ee).indexOf(t);
729
+ return Ln(Object.values(ee), r > -1 ? r : 0)[e];
701
730
  }
702
- function Qn(t, e) {
731
+ function er(t, e) {
703
732
  const r = 50 + e * 10;
704
733
  return `${t}-${r}`;
705
734
  }
706
- function qn(t, e) {
735
+ function tr(t, e) {
707
736
  const r = (e + 1) * 10;
708
737
  return `${t}-${r}`;
709
738
  }
710
- function dt(t, e, r) {
739
+ function ft(t, e, r) {
711
740
  switch (e) {
712
741
  default:
713
- case ue.Categorical:
714
- return Kn(t) ? t : Jn(t, r);
715
- case ue.Sequential:
716
- return Qn(t, r);
717
- case ue.Divergent:
718
- return qn(t, r);
742
+ case de.Categorical:
743
+ return Qn(t) ? t : qn(t, r);
744
+ case de.Sequential:
745
+ return er(t, r);
746
+ case de.Divergent:
747
+ return tr(t, r);
719
748
  }
720
749
  }
721
- function er(t, e, r = Zn, n) {
722
- return ct(t, r) ? t : (n > 4 && (ne(J.ColorLoop), n = n % 5), ct(e, r) ? dt(e, r, n) : dt(Yn(r), r, n));
750
+ function nr(t, e, r = Yn, n) {
751
+ return vt(t, r) ? t : (n > 4 && (le(ne.ColorLoop), n = n % 5), vt(e, r) ? ft(e, r, n) : ft(Jn(r), r, n));
723
752
  }
724
- function tr(t) {
725
- return t.map((e) => pn(e) ? e : { value: e });
753
+ function rr(t) {
754
+ return t.map((e) => mn(e) ? e : { value: e });
726
755
  }
727
- function nr(t) {
756
+ function ar(t) {
728
757
  return t.__internal === !0;
729
758
  }
730
- const nt = (t = null) => ({
759
+ const at = (t = null) => ({
731
760
  data: {
732
761
  type: Array,
733
762
  required: !0,
@@ -739,50 +768,50 @@ const nt = (t = null) => ({
739
768
  },
740
769
  color: {
741
770
  type: String,
742
- default: Y.Skyblue
771
+ default: ee.Skyblue
743
772
  },
744
773
  title: {
745
774
  type: String,
746
775
  default: null
747
776
  }
748
777
  });
749
- function rt(t, e, r, n, a) {
750
- const o = Ie({
778
+ function ot(t, e, r, n, a) {
779
+ const o = De({
751
780
  width: 0,
752
781
  height: 0
753
782
  }), l = crypto.randomUUID(), i = v(() => {
754
- var s;
755
- return t.value.length > 5 && ne(J.DatasetLength), (s = t.value) == null ? void 0 : s.map(
756
- (f, m) => {
757
- if (nr(f)) return f;
758
- const h = tr(f.values), g = er(
759
- f.color,
783
+ var c;
784
+ return t.value.length > 5 && le(ne.DatasetLength), (c = t.value) == null ? void 0 : c.map(
785
+ (d, _) => {
786
+ if (ar(d)) return d;
787
+ const g = rr(d.values), m = nr(
788
+ d.color,
760
789
  r == null ? void 0 : r.value,
761
790
  n == null ? void 0 : n.value.colorPalette,
762
- m
791
+ _
763
792
  );
764
793
  return {
765
- ...f,
766
- values: h,
767
- color: g,
794
+ ...d,
795
+ values: g,
796
+ color: m,
768
797
  __internal: !0
769
798
  };
770
799
  }
771
800
  );
772
- }), u = v(() => Array.isArray(e.value) ? e.value : St(t.value).map((s, f) => f));
773
- function c(s) {
774
- const f = (a == null ? void 0 : a.value) === O.HORIZONTAL && u.value.length * (((n == null ? void 0 : n.value.barHeight) || st) * 2) + ((n == null ? void 0 : n.value.barHeight) || st) || s.height;
775
- o.width = s.width, o.height = f;
801
+ }), u = v(() => Array.isArray(e.value) ? e.value : Pt(t.value).map((c, d) => d));
802
+ function s(c) {
803
+ const d = (a == null ? void 0 : a.value) === I.HORIZONTAL && u.value.length * (((n == null ? void 0 : n.value.barHeight) || dt) * 2) + ((n == null ? void 0 : n.value.barHeight) || dt) || c.height;
804
+ o.width = c.width, o.height = d;
776
805
  }
777
806
  return {
778
807
  chartID: l,
779
808
  computedLabels: u,
780
809
  containerSize: o,
781
810
  internalData: i,
782
- updateSize: c
811
+ updateSize: s
783
812
  };
784
813
  }
785
- const rr = () => ({
814
+ const or = () => ({
786
815
  xScale: {
787
816
  type: Function,
788
817
  default: null
@@ -792,73 +821,73 @@ const rr = () => ({
792
821
  default: null
793
822
  }
794
823
  });
795
- function ar(t, e, r, n, a) {
796
- const o = I(null), l = I(null);
824
+ function lr(t, e, r, n, a) {
825
+ const o = N(null), l = N(null);
797
826
  function i() {
798
- var s, f, m, h;
799
- const { width: u, height: c } = r;
800
- !u && !c || (n.value === O.HORIZONTAL ? (o.value = (s = t.value) != null && s.length ? ft(
827
+ var c, d, _, g;
828
+ const { width: u, height: s } = r;
829
+ !u && !s || (n.value === I.HORIZONTAL ? (o.value = (c = t.value) != null && c.length ? _t(
801
830
  t.value,
802
831
  u,
803
832
  n.value,
804
833
  a.value.startOnZero
805
- ) : null, l.value = (f = e.value) != null && f.length ? vt(
834
+ ) : null, l.value = (d = e.value) != null && d.length ? pt(
806
835
  e.value,
807
- c,
836
+ s,
808
837
  n.value,
809
838
  a.value
810
- ) : null) : (o.value = (m = e.value) != null && m.length ? vt(
839
+ ) : null) : (o.value = (_ = e.value) != null && _.length ? pt(
811
840
  e.value,
812
841
  u,
813
842
  n.value,
814
843
  a.value
815
- ) : null, l.value = (h = t.value) != null && h.length ? ft(
844
+ ) : null, l.value = (g = t.value) != null && g.length ? _t(
816
845
  t.value,
817
- c,
846
+ s,
818
847
  n.value,
819
848
  a.value.startOnZero
820
849
  ) : null));
821
850
  }
822
- return Et(i), { xScale: o, yScale: l };
851
+ return wt(i), { xScale: o, yScale: l };
823
852
  }
824
- function vt(t, e, r, n) {
825
- const a = [0, e], { padding: o, paddingInner: l, paddingOuter: i } = n, u = o ?? (r === O.HORIZONTAL ? Bt : Rt);
853
+ function pt(t, e, r, n) {
854
+ const a = [0, e], { padding: o, paddingInner: l, paddingOuter: i } = n, u = o ?? (r === I.HORIZONTAL ? Ft : Ct);
826
855
  return Object.assign(
827
- he().range(a).paddingInner(l ?? u).paddingOuter(i ?? u).domain(t.map((c, s) => s)),
856
+ xe().range(a).paddingInner(l ?? u).paddingOuter(i ?? u).domain(t.map((s, c) => c)),
828
857
  { labels: t }
829
858
  );
830
859
  }
831
- function ft(t, e, r, n) {
832
- const a = Dt(t).filter((s) => s != null), o = [0, e];
860
+ function _t(t, e, r, n) {
861
+ const a = Ht(t).filter((c) => c != null), o = [0, e];
833
862
  if (a.length === 0)
834
- return ge().range(o).domain([0, 0]).nice();
863
+ return ke().range(o).domain([0, 0]).nice();
835
864
  const l = Math.min(...a), i = n && l > 0 ? 0 : l;
836
865
  let u = Math.max(...a);
837
866
  n && u < 0 && (u = 0);
838
- const c = r === O.HORIZONTAL ? [i, u] : [u, i];
839
- return ge().range(o).domain(c).nice();
867
+ const s = r === I.HORIZONTAL ? [i, u] : [u, i];
868
+ return ke().range(o).domain(s).nice();
840
869
  }
841
- function pt(t) {
870
+ function mt(t) {
842
871
  return (t == null ? void 0 : t.range) !== void 0 || (t == null ? void 0 : t.copy) !== void 0;
843
872
  }
844
- function je(t, e) {
845
- return K(t) ? t.bandwidth() / 2 + t(t.domain()[e]) : t(e);
873
+ function Me(t, e) {
874
+ return q(t) ? t.bandwidth() / 2 + t(t.domain()[e]) : t(e);
846
875
  }
847
- function mt(t, e, {
876
+ function gt(t, e, {
848
877
  padding: r,
849
878
  paddingInner: n,
850
879
  paddingOuter: a
851
880
  } = {}) {
852
- const o = r ?? (e === O.HORIZONTAL ? Bt : Rt);
881
+ const o = r ?? (e === I.HORIZONTAL ? Ft : Ct);
853
882
  return t.copy().paddingInner(n ?? o).paddingOuter(a ?? o);
854
883
  }
855
- function at(t) {
856
- return Object.values(O).includes(t);
884
+ function lt(t) {
885
+ return Object.values(I).includes(t);
857
886
  }
858
- const ve = (t, e = !0) => ({
859
- ...nt(t),
860
- ...rr(),
861
- ...ye(),
887
+ const ge = (t, e = !0) => ({
888
+ ...at(t),
889
+ ...or(),
890
+ ...Le(),
862
891
  classList: {
863
892
  type: [String, Array],
864
893
  default: () => []
@@ -870,33 +899,33 @@ const ve = (t, e = !0) => ({
870
899
  ...e ? {
871
900
  orientation: {
872
901
  type: String,
873
- default: O.VERTICAL,
874
- validator: at
902
+ default: I.VERTICAL,
903
+ validator: lt
875
904
  }
876
905
  } : {}
877
- }), or = (t) => ({
878
- ...nt(t),
879
- ...ye(),
906
+ }), ur = (t) => ({
907
+ ...at(t),
908
+ ...Le(),
880
909
  hoveredElement: {
881
910
  type: [Number, String],
882
911
  default: null
883
912
  }
884
913
  });
885
- function lr() {
886
- const t = I(), e = Ie({
914
+ function ir() {
915
+ const t = N(), e = De({
887
916
  dimensions: {}
888
917
  }), r = new ResizeObserver((n) => {
889
918
  n.forEach((a) => {
890
919
  e.dimensions = a.contentRect;
891
920
  });
892
921
  });
893
- return re(() => {
922
+ return ue(() => {
894
923
  r.observe(t.value);
895
- }), $t(() => {
924
+ }), Dt(() => {
896
925
  r.unobserve(t.value);
897
926
  }), { resizeState: e, resizeRef: t };
898
927
  }
899
- const ur = /* @__PURE__ */ R({
928
+ const sr = /* @__PURE__ */ S({
900
929
  __name: "lume-chart-container",
901
930
  props: {
902
931
  margins: {
@@ -917,31 +946,31 @@ const ur = /* @__PURE__ */ R({
917
946
  },
918
947
  orientation: {
919
948
  type: String,
920
- default: O.VERTICAL,
921
- validator: at
949
+ default: I.VERTICAL,
950
+ validator: lt
922
951
  }
923
952
  },
924
953
  emits: ["click", "mouseenter", "mouseleave", "resize"],
925
954
  setup(t, { emit: e }) {
926
- const r = t, { margins: n, containerSize: a } = V(r), o = I(null), { resizeRef: l, resizeState: i } = lr(), u = v(
955
+ const r = t, { margins: n, containerSize: a } = z(r), o = N(null), { resizeRef: l, resizeState: i } = ir(), u = v(
927
956
  () => a.value.height + n.value.top + n.value.bottom
928
957
  );
929
- return Et(() => {
958
+ return wt(() => {
930
959
  if (!o.value) return;
931
- const { width: c } = i.dimensions, { height: s } = o.value.getBoundingClientRect();
932
- if (!c || r.orientation === O.VERTICAL && !s)
960
+ const { width: s } = i.dimensions, { height: c } = o.value.getBoundingClientRect();
961
+ if (!s || r.orientation === I.VERTICAL && !c)
933
962
  return;
934
- const f = c - n.value.left - n.value.right, m = s - n.value.top - n.value.bottom, h = {
935
- width: f > 0 ? f : 0,
936
- height: m > 0 ? m : 0,
937
- outerWidth: c,
938
- outerHeight: s
963
+ const d = s - n.value.left - n.value.right, _ = c - n.value.top - n.value.bottom, g = {
964
+ width: d > 0 ? d : 0,
965
+ height: _ > 0 ? _ : 0,
966
+ outerWidth: s,
967
+ outerHeight: c
939
968
  };
940
- e("resize", h);
969
+ e("resize", g);
941
970
  }), { __sfc: !0, props: r, emit: e, margins: n, containerSize: a, root: o, resizeRef: l, resizeState: i, svgHeight: u };
942
971
  }
943
972
  });
944
- var ir = function() {
973
+ var cr = function() {
945
974
  var e = this, r = e._self._c, n = e._self._setupProxy;
946
975
  return r("div", { ref: "resizeRef", staticClass: "lume-chart-container", class: {
947
976
  "lume-chart-container--minimum": !e.noMinSize
@@ -954,20 +983,20 @@ var ir = function() {
954
983
  }, mouseleave: function(a) {
955
984
  return n.emit("mouseleave", a);
956
985
  } } }, [r("g", { staticClass: "lume-chart-container__group", attrs: { transform: `translate(${n.margins.left}, ${n.margins.top})`, "data-j-chart-container__group": "" } }, [e._t("default")], 2)]), e._t("footer"), e._t("extra")], 2);
957
- }, sr = [], cr = /* @__PURE__ */ S(
958
- ur,
959
- ir,
986
+ }, dr = [], vr = /* @__PURE__ */ H(
960
987
  sr,
988
+ cr,
989
+ dr,
961
990
  !1,
962
991
  null,
963
992
  "d53cdc3e"
964
993
  );
965
- const dr = cr.exports, vr = /* @__PURE__ */ R({
994
+ const fr = vr.exports, pr = /* @__PURE__ */ S({
966
995
  __name: "lume-chart-legend",
967
996
  props: {
968
997
  data: {
969
998
  type: Array,
970
- validator: fn,
999
+ validator: _n,
971
1000
  required: !0
972
1001
  }
973
1002
  },
@@ -976,7 +1005,7 @@ const dr = cr.exports, vr = /* @__PURE__ */ R({
976
1005
  return { __sfc: !0, emit: e };
977
1006
  }
978
1007
  });
979
- var fr = function() {
1008
+ var _r = function() {
980
1009
  var e = this, r = e._self._c, n = e._self._setupProxy;
981
1010
  return r("div", { staticClass: "lume-chart-legend", attrs: { "data-j-chart-legend": "" }, on: { mouseleave: function(a) {
982
1011
  return n.emit("mouseleave");
@@ -987,39 +1016,39 @@ var fr = function() {
987
1016
  return n.emit("mouseenter", { index: o, dataset: a, event: l });
988
1017
  } } }, [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) + " ")]);
989
1018
  }), 0);
990
- }, pr = [], mr = /* @__PURE__ */ S(
991
- vr,
992
- fr,
1019
+ }, mr = [], gr = /* @__PURE__ */ H(
993
1020
  pr,
1021
+ _r,
1022
+ mr,
994
1023
  !1,
995
1024
  null,
996
1025
  "6f1d1c44"
997
1026
  );
998
- const _r = mr.exports, gr = {};
999
- var hr = function() {
1027
+ const hr = gr.exports, yr = {};
1028
+ var br = function() {
1000
1029
  var e = this, r = e._self._c;
1001
1030
  return r("div", { staticClass: "lume-tooltip__title", attrs: { "data-j-tooltip__title": "" } }, [e._t("default")], 2);
1002
- }, yr = [], br = /* @__PURE__ */ S(
1003
- gr,
1004
- hr,
1031
+ }, kr = [], xr = /* @__PURE__ */ H(
1005
1032
  yr,
1033
+ br,
1034
+ kr,
1006
1035
  !1,
1007
1036
  null,
1008
1037
  "8af3fac6"
1009
1038
  );
1010
- const kr = br.exports, xr = {};
1011
- var Lr = function() {
1039
+ const Lr = xr.exports, Ar = {};
1040
+ var Tr = function() {
1012
1041
  var e = this, r = e._self._c;
1013
1042
  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)]);
1014
- }, Tr = [], Ar = /* @__PURE__ */ S(
1015
- xr,
1016
- Lr,
1043
+ }, Or = [], Ir = /* @__PURE__ */ H(
1044
+ Ar,
1017
1045
  Tr,
1046
+ Or,
1018
1047
  !1,
1019
1048
  null,
1020
1049
  "4ed7ec1b"
1021
1050
  );
1022
- const Or = Ar.exports, Ir = /* @__PURE__ */ R({
1051
+ const Nr = Ir.exports, Er = /* @__PURE__ */ S({
1023
1052
  __name: "lume-tooltip-item",
1024
1053
  props: {
1025
1054
  color: {
@@ -1031,18 +1060,18 @@ const Or = Ar.exports, Ir = /* @__PURE__ */ R({
1031
1060
  return { __sfc: !0 };
1032
1061
  }
1033
1062
  });
1034
- var Nr = function() {
1063
+ var $r = function() {
1035
1064
  var e = this, r = e._self._c;
1036
1065
  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)]);
1037
- }, Er = [], $r = /* @__PURE__ */ S(
1038
- Ir,
1039
- Nr,
1066
+ }, wr = [], Dr = /* @__PURE__ */ H(
1040
1067
  Er,
1068
+ $r,
1069
+ wr,
1041
1070
  !1,
1042
1071
  null,
1043
1072
  "4f995c3c"
1044
1073
  );
1045
- const wr = $r.exports, Dr = /* @__PURE__ */ R({
1074
+ const Rr = Dr.exports, Hr = /* @__PURE__ */ S({
1046
1075
  __name: "lume-tooltip",
1047
1076
  props: {
1048
1077
  opened: {
@@ -1060,7 +1089,7 @@ const wr = $r.exports, Dr = /* @__PURE__ */ R({
1060
1089
  position: {
1061
1090
  type: String,
1062
1091
  default: "auto",
1063
- validator: (t) => Nn.includes(t)
1092
+ validator: (t) => $n.includes(t)
1064
1093
  },
1065
1094
  fixedPositioning: {
1066
1095
  type: Boolean,
@@ -1082,15 +1111,15 @@ const wr = $r.exports, Dr = /* @__PURE__ */ R({
1082
1111
  type: String,
1083
1112
  default: null
1084
1113
  },
1085
- ...ye()
1114
+ ...Le()
1086
1115
  },
1087
1116
  emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
1088
1117
  setup(t, { emit: e }) {
1089
- const r = t, n = I(null), { items: a, options: o } = V(r), l = X(), i = I(null), { allOptions: u } = Q(o), c = v(
1118
+ const r = t, n = N(null), { items: a, options: o } = z(r), l = Q(), i = N(null), { allOptions: u } = re(o), s = v(
1090
1119
  () => u.value.fixedPositioning ?? r.fixedPositioning
1091
- ), s = v(
1092
- () => c.value ? "fixed" : "absolute"
1093
- ), f = v(() => [
1120
+ ), c = v(
1121
+ () => s.value ? "fixed" : "absolute"
1122
+ ), d = v(() => [
1094
1123
  {
1095
1124
  name: "computeStyles",
1096
1125
  options: {
@@ -1103,40 +1132,40 @@ const wr = $r.exports, Dr = /* @__PURE__ */ R({
1103
1132
  options: { offset: [0, u.value.offset || 8] }
1104
1133
  },
1105
1134
  ...r.modifiers || []
1106
- ]), m = v(
1135
+ ]), _ = v(
1107
1136
  () => u.value.showTitle !== !1 && r.title != null
1108
- ), h = v(() => Te(u.value.valueFormat)), g = v(() => Te(u.value.titleFormat)), _ = v(
1137
+ ), g = v(() => Ne(u.value.valueFormat)), m = v(() => Ne(u.value.titleFormat)), h = v(
1109
1138
  () => {
1110
- var T;
1111
- return ((T = a.value) == null ? void 0 : T.find((N) => N.isSummary)) || {
1139
+ var A;
1140
+ return ((A = a.value) == null ? void 0 : A.find((E) => E.isSummary)) || {
1112
1141
  label: u.value.summary ?? r.summary
1113
1142
  };
1114
1143
  }
1115
- ), x = v(() => l.summary || _.value.label), d = v(() => r.inverse || u.value.inverse ? [...a.value].reverse() : a.value);
1116
- function p() {
1117
- r.targetElement && n.value && (i.value = on(r.targetElement, n.value, {
1144
+ ), b = v(() => l.summary || h.value.label), p = v(() => r.inverse || u.value.inverse ? [...a.value].reverse() : a.value);
1145
+ function f() {
1146
+ r.targetElement && n.value && (i.value = un(r.targetElement, n.value, {
1118
1147
  placement: r.position,
1119
- strategy: s.value,
1120
- modifiers: f.value
1148
+ strategy: c.value,
1149
+ modifiers: d.value
1121
1150
  }), e("opened", r.targetElement));
1122
1151
  }
1123
1152
  function y() {
1124
1153
  i.value && (i.value.destroy(), e("closed"), n.value && n.value.classList.remove("lume-tooltip--animated"));
1125
1154
  }
1126
- function k() {
1155
+ function x() {
1127
1156
  i.value && (u.value.withAnimation !== !1 && n.value && n.value.classList.add("lume-tooltip--animated"), r.targetElement ? (function() {
1128
1157
  i.value.state.elements.reference = r.targetElement, i.value.update(), e("moved", r.targetElement);
1129
1158
  })() : y());
1130
1159
  }
1131
- return H(
1160
+ return R(
1132
1161
  () => r.targetElement,
1133
- async (T, N) => {
1134
- !N && T ? (await Be(), p()) : k();
1162
+ async (A, E) => {
1163
+ !E && A ? (await Fe(), f()) : x();
1135
1164
  }
1136
- ), re(p), $t(y), { __sfc: !0, props: r, emit: e, root: n, items: a, options: o, slots: l, popper: i, allOptions: u, computedFixedPositioning: c, strategy: s, allModifiers: f, showTitle: m, formatValue: h, formatTitle: g, summaryItem: _, hasSummary: x, computedItems: d, initPopper: p, destroyPopper: y, updatePopper: k, LumeTooltipTitle: kr, LumeTooltipSummary: Or, LumeTooltipItem: wr };
1165
+ ), ue(f), Dt(y), { __sfc: !0, props: r, emit: e, root: n, items: a, options: o, slots: l, popper: i, allOptions: u, computedFixedPositioning: s, strategy: c, allModifiers: d, showTitle: _, formatValue: g, formatTitle: m, summaryItem: h, hasSummary: b, computedItems: p, initPopper: f, destroyPopper: y, updatePopper: x, LumeTooltipTitle: Lr, LumeTooltipSummary: Nr, LumeTooltipItem: Rr };
1137
1166
  }
1138
1167
  });
1139
- var Hr = function() {
1168
+ var Sr = function() {
1140
1169
  var e = this, r = e._self._c, n = e._self._setupProxy;
1141
1170
  return e.opened && e.targetElement ? r("div", { ref: "root", staticClass: "lume-tooltip lume-typography--caption", class: {
1142
1171
  "lume-tooltip--pointer-events": n.options.withPointerEvents
@@ -1161,15 +1190,15 @@ var Hr = function() {
1161
1190
  });
1162
1191
  })], 2)];
1163
1192
  })], 2) : e._e();
1164
- }, Sr = [], Pr = /* @__PURE__ */ S(
1165
- Dr,
1193
+ }, Pr = [], Br = /* @__PURE__ */ H(
1166
1194
  Hr,
1167
1195
  Sr,
1196
+ Pr,
1168
1197
  !1,
1169
1198
  null,
1170
1199
  "6f13599d"
1171
1200
  );
1172
- const Rr = Pr.exports, Ee = () => ({
1201
+ const Cr = Br.exports, He = () => ({
1173
1202
  data: {
1174
1203
  type: Array,
1175
1204
  required: !0
@@ -1184,8 +1213,8 @@ const Rr = Pr.exports, Ee = () => ({
1184
1213
  },
1185
1214
  orientation: {
1186
1215
  type: String,
1187
- default: O.VERTICAL,
1188
- validator: at
1216
+ default: I.VERTICAL,
1217
+ validator: lt
1189
1218
  },
1190
1219
  xScale: {
1191
1220
  type: Function,
@@ -1211,35 +1240,35 @@ const Rr = Pr.exports, Ee = () => ({
1211
1240
  type: [String, Array],
1212
1241
  default: () => []
1213
1242
  }
1214
- }), Br = /* @__PURE__ */ R({
1243
+ }), Fr = /* @__PURE__ */ S({
1215
1244
  __name: "lume-overlay-group",
1216
1245
  props: {
1217
- ...Ee(),
1246
+ ...He(),
1218
1247
  orientation: {
1219
1248
  type: String,
1220
- default: O.VERTICAL
1249
+ default: I.VERTICAL
1221
1250
  }
1222
1251
  },
1223
1252
  emits: ["click", "lume__internal--hover", "mouseover"],
1224
1253
  setup(t, { emit: e }) {
1225
- const r = t, { data: n, orientation: a, xScale: o, yScale: l } = V(r), i = v(() => St(n));
1226
- function u(c) {
1227
- var x;
1228
- const s = a.value === O.HORIZONTAL ? l.value : o.value, f = s.domain(), m = mn(s), h = ((x = s.paddingInner) == null ? void 0 : x.call(s)) ?? 0, g = m * h, _ = K(s) ? s(f[c]) - g / 2 : s(c) - m / 2;
1229
- return a.value === O.HORIZONTAL ? {
1254
+ const r = t, { data: n, orientation: a, xScale: o, yScale: l } = z(r), i = v(() => Pt(n));
1255
+ function u(s) {
1256
+ var b;
1257
+ const c = a.value === I.HORIZONTAL ? l.value : o.value, d = c.domain(), _ = gn(c), g = ((b = c.paddingInner) == null ? void 0 : b.call(c)) ?? 0, m = _ * g, h = q(c) ? c(d[s]) - m / 2 : c(s) - _ / 2;
1258
+ return a.value === I.HORIZONTAL ? {
1230
1259
  width: Math.max(...o.value.range()),
1231
- height: m,
1232
- transform: `translate(0, ${_})`
1260
+ height: _,
1261
+ transform: `translate(0, ${h})`
1233
1262
  } : {
1234
- width: m,
1263
+ width: _,
1235
1264
  height: Math.max(...l.value.range()),
1236
- transform: `translate(${_}, 0)`
1265
+ transform: `translate(${h}, 0)`
1237
1266
  };
1238
1267
  }
1239
- return { __sfc: !0, props: r, emit: e, data: n, orientation: a, xScale: o, yScale: l, overlayData: i, getOverlayBarAttributes: u, LumeBar: Qe };
1268
+ return { __sfc: !0, props: r, emit: e, data: n, orientation: a, xScale: o, yScale: l, overlayData: i, getOverlayBarAttributes: u, LumeBar: et };
1240
1269
  }
1241
1270
  });
1242
- var Cr = function() {
1271
+ var Gr = function() {
1243
1272
  var e = this, r = e._self._c, n = e._self._setupProxy;
1244
1273
  return r("g", { staticClass: "lume-overlay-group" }, e._l(n.overlayData, function(a, o) {
1245
1274
  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) {
@@ -1248,15 +1277,15 @@ var Cr = function() {
1248
1277
  return n.emit("click", { index: o, event: l });
1249
1278
  } } }, "lume-bar", n.getOverlayBarAttributes(o), !1));
1250
1279
  }), 1);
1251
- }, Fr = [], Gr = /* @__PURE__ */ S(
1252
- Br,
1253
- Cr,
1280
+ }, jr = [], Vr = /* @__PURE__ */ H(
1254
1281
  Fr,
1282
+ Gr,
1283
+ jr,
1255
1284
  !1,
1256
1285
  null,
1257
1286
  null
1258
1287
  );
1259
- const jr = Gr.exports, Vr = [
1288
+ const Mr = Vr.exports, zr = [
1260
1289
  "axis-click",
1261
1290
  "axis-mouseenter",
1262
1291
  "axis-mouseleave",
@@ -1284,7 +1313,7 @@ const jr = Gr.exports, Vr = [
1284
1313
  "tooltip-closed",
1285
1314
  "hovered-index-changed",
1286
1315
  "update:hoveredIndex"
1287
- ], q = (t, e) => {
1316
+ ], ae = (t, e) => {
1288
1317
  function r(o, ...l) {
1289
1318
  document.dispatchEvent(
1290
1319
  new CustomEvent(`${e}_${o}`, {
@@ -1298,30 +1327,30 @@ const jr = Gr.exports, Vr = [
1298
1327
  (i) => l(...i.detail)
1299
1328
  );
1300
1329
  }
1301
- return { componentEventPropagator: Vr.reduce((o, l) => (o[l] = (i) => t(l, i), o), {}), emitInternalEvent: r, listenInternalEvent: n };
1330
+ return { componentEventPropagator: zr.reduce((o, l) => (o[l] = (i) => t(l, i), o), {}), emitInternalEvent: r, listenInternalEvent: n };
1302
1331
  };
1303
- function Mr(t) {
1332
+ function Wr(t) {
1304
1333
  return { hasNegativeValues: v(
1305
- () => Dt(t.value).some((r) => r < 0)
1334
+ () => Ht(t.value).some((r) => r < 0)
1306
1335
  ) };
1307
1336
  }
1308
- function zr(t, e, r, n) {
1337
+ function Ur(t, e, r, n) {
1309
1338
  const a = v(
1310
- () => n.value === O.HORIZONTAL
1339
+ () => n.value === I.HORIZONTAL
1311
1340
  ), o = v(
1312
1341
  () => {
1313
- var c;
1314
- return t.height - (a != null && a.value ? 0 : ((c = r.value) == null ? void 0 : c.call(r, 0)) || 0);
1342
+ var s;
1343
+ return t.height - (a != null && a.value ? 0 : ((s = r.value) == null ? void 0 : s.call(r, 0)) || 0);
1315
1344
  }
1316
1345
  ), l = v(
1317
1346
  () => {
1318
- var c;
1319
- return a != null && a.value ? ((c = e.value) == null ? void 0 : c.call(e, 0)) || 0 : t.width;
1347
+ var s;
1348
+ return a != null && a.value ? ((s = e.value) == null ? void 0 : s.call(e, 0)) || 0 : t.width;
1320
1349
  }
1321
1350
  ), i = v(
1322
1351
  () => {
1323
- var c;
1324
- return a != null && a.value ? "translate(0, 0)" : `translate(0, ${((c = r.value) == null ? void 0 : c.call(r, 0)) || 0})`;
1352
+ var s;
1353
+ return a != null && a.value ? "translate(0, 0)" : `translate(0, ${((s = r.value) == null ? void 0 : s.call(r, 0)) || 0})`;
1325
1354
  }
1326
1355
  );
1327
1356
  return { negativeBarAttributes: v(() => ({
@@ -1330,50 +1359,50 @@ function zr(t, e, r, n) {
1330
1359
  transform: i.value
1331
1360
  })) };
1332
1361
  }
1333
- function Wr(t, e) {
1334
- return t.reduce((r, n) => Je(n.values, e).map(
1362
+ function Zr(t, e) {
1363
+ return t.reduce((r, n) => qe(n.values, e).map(
1335
1364
  (a, o) => r[o] ? a.value > r[o] ? a.value : r[o] : a.value ?? 0
1336
1365
  ), []);
1337
1366
  }
1338
- function Ur(t, e) {
1339
- return t.reduce((r, n) => Je(n.values, e).map(
1367
+ function Xr(t, e) {
1368
+ return t.reduce((r, n) => qe(n.values, e).map(
1340
1369
  (a, o) => {
1341
1370
  const l = a.value == null || a.value < 0 ? 0 : a.value;
1342
1371
  return r[o] ? r[o] + l : l;
1343
1372
  }
1344
1373
  ), []);
1345
1374
  }
1346
- const _t = {
1347
- "stacked-bar": Ur
1375
+ const ht = {
1376
+ "stacked-bar": Xr
1348
1377
  };
1349
- function jt(t, e, r, n, a, o, l, i) {
1378
+ function Mt(t, e, r, n, a, o, l, i) {
1350
1379
  const u = v(
1351
1380
  () => {
1352
- var s;
1353
- return e.value.withTooltip !== !1 && !((s = e.value.tooltipOptions) != null && s.targetElement);
1381
+ var c;
1382
+ return e.value.withTooltip !== !1 && !((c = e.value.tooltipOptions) != null && c.targetElement);
1354
1383
  }
1355
1384
  );
1356
- function c(s) {
1357
- var h;
1358
- const f = ((h = a == null ? void 0 : a.value) == null ? void 0 : h.length) ?? 0, m = i != null && i.value && _t[i.value] ? _t[i.value](
1359
- s,
1360
- f
1361
- ) : Wr(s, f);
1362
- t.value = m.map((g, _) => ({
1363
- cx: (o == null ? void 0 : o.value) === O.HORIZONTAL ? r.value(g) : je(r.value, _),
1364
- cy: (o == null ? void 0 : o.value) === O.HORIZONTAL ? je(n.value, _) : n.value(g)
1385
+ function s(c) {
1386
+ var g;
1387
+ const d = ((g = a == null ? void 0 : a.value) == null ? void 0 : g.length) ?? 0, _ = i != null && i.value && ht[i.value] ? ht[i.value](
1388
+ c,
1389
+ d
1390
+ ) : Zr(c, d);
1391
+ t.value = _.map((m, h) => ({
1392
+ cx: (o == null ? void 0 : o.value) === I.HORIZONTAL ? r.value(m) : Me(r.value, h),
1393
+ cy: (o == null ? void 0 : o.value) === I.HORIZONTAL ? Me(n.value, h) : n.value(m)
1365
1394
  }));
1366
1395
  }
1367
- return H(
1396
+ return R(
1368
1397
  [r, n],
1369
1398
  () => {
1370
- r.value && n.value && (l != null && l.value) && u.value && c(l.value);
1399
+ r.value && n.value && (l != null && l.value) && u.value && s(l.value);
1371
1400
  },
1372
1401
  { immediate: !0 }
1373
- ), { shouldGenerateTooltipAnchors: u, updateTooltipAnchorAttributes: c };
1402
+ ), { shouldGenerateTooltipAnchors: u, updateTooltipAnchorAttributes: s };
1374
1403
  }
1375
- function Zr() {
1376
- const t = Ie({
1404
+ function Yr() {
1405
+ const t = De({
1377
1406
  opened: !1,
1378
1407
  targetElement: null
1379
1408
  });
@@ -1383,174 +1412,177 @@ function Zr() {
1383
1412
  t.opened = !1, t.targetElement = null;
1384
1413
  } };
1385
1414
  }
1386
- function Xr(t) {
1415
+ function Kr(t) {
1387
1416
  return { getTooltipItems: v(
1388
1417
  () => (r) => t.value.map(({ color: n, label: a, values: o }) => {
1389
1418
  var l, i, u;
1390
1419
  return {
1391
1420
  color: ((l = o[r]) == null ? void 0 : l.color) || n,
1392
1421
  label: a,
1393
- value: ((i = o[r]) == null ? void 0 : i.label) ?? ((u = o[r]) == null ? void 0 : u.value) ?? Pt
1422
+ value: ((i = o[r]) == null ? void 0 : i.label) ?? ((u = o[r]) == null ? void 0 : u.value) ?? Bt
1394
1423
  };
1395
1424
  })
1396
1425
  ) };
1397
1426
  }
1398
- const Ve = 16, Me = 8, ze = 28, We = 24, ie = {
1427
+ const ze = 16, We = 8, Ue = 28, Ze = 24, ve = {
1399
1428
  VERTICAL: {
1400
- top: Ve,
1401
- right: Me,
1402
- bottom: ze,
1403
- left: We
1429
+ top: ze,
1430
+ right: We,
1431
+ bottom: Ue,
1432
+ left: Ze
1404
1433
  },
1405
1434
  HORIZONTAL: {
1406
- top: Ve,
1407
- right: Me,
1408
- bottom: ze,
1409
- left: We
1435
+ top: ze,
1436
+ right: We,
1437
+ bottom: Ue,
1438
+ left: Ze
1410
1439
  }
1411
1440
  };
1412
- function Yr(t) {
1413
- return !t || t === "auto" || t.top == null || t.top === "auto" ? Ve : t.top;
1441
+ function Jr(t) {
1442
+ return !t || t === "auto" || t.top == null || t.top === "auto" ? ze : t.top;
1414
1443
  }
1415
- function Kr(t) {
1416
- return !t || t === "auto" || t.right == null || t.right === "auto" ? Me : t.right;
1444
+ function Qr(t, e) {
1445
+ return !t || t === "auto" || t.right == null || t.right === "auto" ? Math.max(We, e || 0) : t.right;
1417
1446
  }
1418
- function Jr(t, e) {
1419
- return !t || t === "auto" || t.bottom == null || t.bottom === "auto" ? e || ze : t.bottom;
1447
+ function qr(t, e) {
1448
+ return !t || t === "auto" || t.bottom == null || t.bottom === "auto" ? e || Ue : t.bottom;
1420
1449
  }
1421
- function Qr(t, e) {
1422
- return !t || t === "auto" || t.left == null || t.left === "auto" ? e || We : t.left;
1450
+ function ea(t, e) {
1451
+ return !t || t === "auto" || t.left == null || t.left === "auto" ? e || Ze : t.left;
1423
1452
  }
1424
- const qr = /* @__PURE__ */ R({
1453
+ const ta = /* @__PURE__ */ S({
1425
1454
  __name: "lume-chart",
1426
1455
  props: {
1427
- ...ve(),
1456
+ ...ge(),
1428
1457
  chartType: {
1429
1458
  type: String,
1430
1459
  default: null
1431
1460
  }
1432
1461
  },
1433
1462
  setup(t, { emit: e }) {
1434
- const r = t, n = X(), { data: a, labels: o, color: l, options: i, orientation: u, chartType: c } = V(r), s = I(-1), f = I(null), m = I(null), h = I([]), g = I(null), _ = I(0), x = I(0), { allOptions: d } = Q(i), { internalData: p, computedLabels: y, containerSize: k, updateSize: T, chartID: N } = rt(a, o, l, d, u), { listenInternalEvent: A } = q(e, N), { xScale: D, yScale: C } = ar(
1435
- p,
1463
+ const r = t, n = Q(), { data: a, labels: o, color: l, options: i, orientation: u, chartType: s } = z(r), c = N(-1), d = N(null), _ = N(null), g = N([]), m = N(null), h = N(0), b = N(0), p = N(0), { allOptions: f } = re(i), { internalData: y, computedLabels: x, containerSize: A, updateSize: E, chartID: B } = ot(a, o, l, f, u), { listenInternalEvent: G } = ae(e, B), { xScale: T, yScale: P } = lr(
1436
1464
  y,
1437
- k,
1465
+ x,
1466
+ A,
1438
1467
  u,
1439
- d
1440
- ), M = v(() => ({
1441
- top: Yr(d.value.margins),
1442
- right: Kr(d.value.margins),
1443
- bottom: Jr(d.value.margins, _.value),
1444
- left: Qr(d.value.margins, x.value)
1445
- })), z = v(() => {
1446
- var b;
1447
- return r.xScale ? pt(r.xScale) ? r.xScale : (b = r.xScale) == null ? void 0 : b.call(r, p.value, o.value, k) : D.value;
1448
- }), ee = v(() => {
1449
- var b;
1450
- return r.yScale ? pt(r.yScale) ? r.yScale : (b = r.yScale) == null ? void 0 : b.call(r, p.value, o.value, k) : C.value;
1451
- }), ce = v(() => ({
1452
- ...d.value.xAxisOptions,
1453
- withHover: u.value === O.VERTICAL
1454
- })), ae = v(() => ({
1455
- ...d.value.yAxisOptions,
1456
- withHover: u.value === O.HORIZONTAL
1457
- })), oe = v(() => {
1458
- var b;
1459
- return (b = d.value.xAxisOptions) == null ? void 0 : b.title;
1460
- }), le = v(() => {
1461
- var b;
1462
- return (b = d.value.yAxisOptions) == null ? void 0 : b.title;
1463
- }), E = v(() => {
1464
- var b;
1465
- return ((b = d.value.xAxisOptions) == null ? void 0 : b.withTitle) !== !1 && oe.value;
1466
- }), w = v(() => {
1467
- var b;
1468
- return ((b = d.value.yAxisOptions) == null ? void 0 : b.withTitle) !== !1 && le.value;
1469
- }), P = v(
1470
- () => a.value.every((b) => !b.values.length) || a.value.every((b) => b.values.every((F) => F === null))
1471
- ), te = v(() => {
1472
- const b = [], { noBaseScales: F } = d.value;
1473
- return F || b.push(() => !!(z.value && ee.value)), b.every((j) => j() === !0);
1474
- }), { hasNegativeValues: $e } = Mr(p), { negativeBarAttributes: we } = zr(
1475
- k,
1476
- z,
1477
- ee,
1468
+ f
1469
+ ), j = v(() => ({
1470
+ top: Jr(f.value.margins),
1471
+ right: Qr(
1472
+ f.value.margins,
1473
+ p.value
1474
+ ),
1475
+ bottom: qr(f.value.margins, h.value),
1476
+ left: ea(f.value.margins, b.value)
1477
+ })), V = v(() => {
1478
+ var k;
1479
+ return r.xScale ? mt(r.xScale) ? r.xScale : (k = r.xScale) == null ? void 0 : k.call(r, y.value, o.value, A) : T.value;
1480
+ }), K = v(() => {
1481
+ var k;
1482
+ return r.yScale ? mt(r.yScale) ? r.yScale : (k = r.yScale) == null ? void 0 : k.call(r, y.value, o.value, A) : P.value;
1483
+ }), ye = v(() => ({
1484
+ ...f.value.xAxisOptions,
1485
+ withHover: u.value === I.VERTICAL
1486
+ })), pe = v(() => ({
1487
+ ...f.value.yAxisOptions,
1488
+ withHover: u.value === I.HORIZONTAL
1489
+ })), ie = v(() => {
1490
+ var k;
1491
+ return (k = f.value.xAxisOptions) == null ? void 0 : k.title;
1492
+ }), oe = v(() => {
1493
+ var k;
1494
+ return (k = f.value.yAxisOptions) == null ? void 0 : k.title;
1495
+ }), se = v(() => {
1496
+ var k;
1497
+ return ((k = f.value.xAxisOptions) == null ? void 0 : k.withTitle) !== !1 && ie.value;
1498
+ }), te = v(() => {
1499
+ var k;
1500
+ return ((k = f.value.yAxisOptions) == null ? void 0 : k.withTitle) !== !1 && oe.value;
1501
+ }), O = v(
1502
+ () => a.value.every((k) => !k.values.length) || a.value.every((k) => k.values.every((C) => C === null))
1503
+ ), $ = v(() => {
1504
+ const k = [], { noBaseScales: C } = f.value;
1505
+ return C || k.push(() => !!(V.value && K.value)), k.every((J) => J() === !0);
1506
+ }), { hasNegativeValues: w } = Wr(y), { negativeBarAttributes: W } = Ur(
1507
+ A,
1508
+ V,
1509
+ K,
1478
1510
  u
1479
- ), { shouldGenerateTooltipAnchors: De } = jt(
1480
- h,
1481
- d,
1482
- z,
1483
- ee,
1511
+ ), { shouldGenerateTooltipAnchors: _e } = Mt(
1512
+ g,
1513
+ f,
1514
+ V,
1515
+ K,
1484
1516
  o,
1485
1517
  u,
1486
- p,
1487
- c
1488
- ), { tooltipConfig: pe, showTooltip: de, hideTooltip: xe } = Zr(), { getTooltipItems: me } = Xr(p), L = v(
1518
+ y,
1519
+ s
1520
+ ), { tooltipConfig: Z, showTooltip: ce, hideTooltip: me } = Yr(), { getTooltipItems: L } = Kr(y), D = v(
1489
1521
  () => {
1490
- var b;
1491
- return ((b = d.value.tooltipOptions) == null ? void 0 : b.position) || "top";
1522
+ var k;
1523
+ return ((k = f.value.tooltipOptions) == null ? void 0 : k.position) || "top";
1492
1524
  }
1493
- ), $ = v(() => {
1494
- var F;
1495
- const b = (F = d.value.tooltipOptions) == null ? void 0 : F.withPointerEvents;
1496
- return pe.opened && (!b || b && g.value === !1);
1525
+ ), F = v(() => {
1526
+ var C;
1527
+ const k = (C = f.value.tooltipOptions) == null ? void 0 : C.withPointerEvents;
1528
+ return Z.opened && (!k || k && m.value === !1);
1497
1529
  });
1498
- function B(b) {
1499
- var j;
1500
- if (d.value.withHover === !1 || b === s.value) return;
1501
- const F = s.value;
1502
- if (s.value = b, d.value.withTooltip !== !1) {
1503
- const Kt = (j = d.value.tooltipOptions) != null && j.targetElement ? d.value.tooltipOptions.targetElement === "self" ? m.value.$el : d.value.tooltipOptions.targetElement : f.value[b];
1504
- de(Kt);
1530
+ function M(k) {
1531
+ var J;
1532
+ if (f.value.withHover === !1 || k === c.value) return;
1533
+ const C = c.value;
1534
+ if (c.value = k, f.value.withTooltip !== !1) {
1535
+ const Qt = (J = f.value.tooltipOptions) != null && J.targetElement ? f.value.tooltipOptions.targetElement === "self" ? _.value.$el : f.value.tooltipOptions.targetElement : d.value[k];
1536
+ ce(Qt);
1505
1537
  }
1506
- e("hovered-index-changed", { newIndex: b, oldIndex: F }), e("update:hoveredIndex", b);
1538
+ e("hovered-index-changed", { newIndex: k, oldIndex: C }), e("update:hoveredIndex", k);
1507
1539
  }
1508
- function G() {
1509
- xe(), s.value = -1, e("update:hoveredIndex", -1);
1540
+ function X() {
1541
+ me(), c.value = -1, e("update:hoveredIndex", -1);
1510
1542
  }
1511
- function U(b) {
1543
+ function U(k) {
1512
1544
  if (!a.value.some(
1513
- ({ values: j }) => b <= j.length - 1
1545
+ ({ values: J }) => k <= J.length - 1
1514
1546
  )) {
1515
- ne(J.InvalidHoveredIndex);
1547
+ le(ne.InvalidHoveredIndex);
1516
1548
  return;
1517
1549
  }
1518
- b == null || b === -1 ? G() : B(b);
1550
+ k == null || k === -1 ? X() : M(k);
1519
1551
  }
1520
- function Z() {
1552
+ function ct() {
1521
1553
  setTimeout(() => {
1522
- $.value && G(), e("chart-mouseleave");
1554
+ F.value && X(), e("chart-mouseleave");
1523
1555
  }, 0);
1524
1556
  }
1525
- function it(b) {
1526
- T(b), e("resize", b);
1557
+ function Se(k) {
1558
+ E(k), e("resize", k);
1527
1559
  }
1528
- function He({ index: b, value: F, event: j }) {
1529
- b !== null && B(b), e("axis-mouseenter", { index: b, value: F, event: j });
1560
+ function Pe({ index: k, value: C, event: J }) {
1561
+ k !== null && M(k), e("axis-mouseenter", { index: k, value: C, event: J });
1530
1562
  }
1531
- function Se({ index: b, value: F, event: j }) {
1532
- e("axis-click", { index: b, value: F, event: j });
1563
+ function Oe({ index: k, value: C, event: J }) {
1564
+ e("axis-click", { index: k, value: C, event: J });
1533
1565
  }
1534
- return H(
1566
+ return R(
1535
1567
  a,
1536
- (b, F) => e("data-changed", { newValue: b, oldValue: F })
1537
- ), H(
1568
+ (k, C) => e("data-changed", { newValue: k, oldValue: C })
1569
+ ), R(
1538
1570
  o,
1539
- (b, F) => e("labels-changed", { newValue: b, oldValue: F })
1540
- ), H(P, (b) => b && ne(J.Empty), { immediate: !0 }), H(() => r.hoveredIndex, U), H(
1541
- h,
1542
- (b) => {
1543
- b && r.hoveredIndex != null && s.value === -1 && U(r.hoveredIndex);
1571
+ (k, C) => e("labels-changed", { newValue: k, oldValue: C })
1572
+ ), R(O, (k) => k && le(ne.Empty), { immediate: !0 }), R(() => r.hoveredIndex, U), R(
1573
+ g,
1574
+ (k) => {
1575
+ k && r.hoveredIndex != null && c.value === -1 && U(r.hoveredIndex);
1544
1576
  },
1545
1577
  { flush: "post" }
1546
- ), H(g, (b) => {
1547
- b === !1 && pe.opened && G();
1548
- }), re(async () => {
1549
- e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'), A("lume__internal--hover", B);
1550
- }), Pe("chartID", N), Pe("isEmpty", P), Pe("tooltipAnchorAttributes", h), { __sfc: !0, props: r, slots: n, emit: e, data: a, labels: o, color: l, options: i, orientation: u, chartType: c, internalHoveredIndex: s, tooltipAnchor: f, chartContainer: m, tooltipAnchorAttributes: h, isHoveringTooltip: g, xAxisHeight: _, yAxisWidth: x, allOptions: d, internalData: p, computedLabels: y, containerSize: k, updateSize: T, chartID: N, listenInternalEvent: A, xScale: D, yScale: C, computedMargins: M, computedXScale: z, computedYScale: ee, computedXAxisOptions: ce, computedYAxisOptions: ae, xAxisTitle: oe, yAxisTitle: le, showXAxisTitle: E, showYAxisTitle: w, isEmpty: P, isReady: te, hasNegativeValues: $e, negativeBarAttributes: we, shouldGenerateTooltipAnchors: De, tooltipConfig: pe, showTooltip: de, hideTooltip: xe, getTooltipItems: me, tooltipPosition: L, shouldHideTooltip: $, handleInternalHover: B, handleHideTooltip: G, handleExternalHover: U, handleMouseleave: Z, handleResize: it, handleAxisMouseenter: He, handleAxisClick: Se, LumeAxis: Gn, LumeBar: Qe, LumeChartContainer: dr, LumeChartLegend: _r, LumeTooltip: Rr, LumeOverlayGroup: jr, TOOLTIP_ANCHOR_RADIUS: In };
1578
+ ), R(m, (k) => {
1579
+ k === !1 && Z.opened && X();
1580
+ }), ue(async () => {
1581
+ e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'), G("lume__internal--hover", M);
1582
+ }), Be("chartID", B), Be("isEmpty", O), Be("tooltipAnchorAttributes", g), { __sfc: !0, props: r, slots: n, emit: e, data: a, labels: o, color: l, options: i, orientation: u, chartType: s, internalHoveredIndex: c, tooltipAnchor: d, chartContainer: _, tooltipAnchorAttributes: g, isHoveringTooltip: m, xAxisHeight: h, yAxisWidth: b, xAxisOverflowRight: p, allOptions: f, internalData: y, computedLabels: x, containerSize: A, updateSize: E, chartID: B, listenInternalEvent: G, xScale: T, yScale: P, computedMargins: j, computedXScale: V, computedYScale: K, computedXAxisOptions: ye, computedYAxisOptions: pe, xAxisTitle: ie, yAxisTitle: oe, showXAxisTitle: se, showYAxisTitle: te, isEmpty: O, isReady: $, hasNegativeValues: w, negativeBarAttributes: W, shouldGenerateTooltipAnchors: _e, tooltipConfig: Z, showTooltip: ce, hideTooltip: me, getTooltipItems: L, tooltipPosition: D, shouldHideTooltip: F, handleInternalHover: M, handleHideTooltip: X, handleExternalHover: U, handleMouseleave: ct, handleResize: Se, handleAxisMouseenter: Pe, handleAxisClick: Oe, LumeAxis: Vn, LumeBar: et, LumeChartContainer: fr, LumeChartLegend: hr, LumeTooltip: Cr, LumeOverlayGroup: Mr, TOOLTIP_ANCHOR_RADIUS: En };
1551
1583
  }
1552
1584
  });
1553
- var ea = function() {
1585
+ var na = function() {
1554
1586
  var e = this, r = e._self._c, n = e._self._setupProxy;
1555
1587
  return r(n.LumeChartContainer, { ref: "chartContainer", attrs: { id: `lume-chart_${n.chartID}`, margins: n.computedMargins, "container-size": n.containerSize, "no-min-size": n.allOptions.noMinSize, "transparent-background": n.allOptions.transparentBackground, orientation: n.orientation, "data-j-lume-chart": "" }, on: { resize: n.handleResize, click: function(a) {
1556
1588
  return n.emit("chart-click", a);
@@ -1599,6 +1631,8 @@ var ea = function() {
1599
1631
  return n.emit("axis-mouseleave");
1600
1632
  }, "lume__internal--axis-size": function(a) {
1601
1633
  n.xAxisHeight = a;
1634
+ }, "lume__internal--axis-overflow": function(a) {
1635
+ n.xAxisOverflowRight = a;
1602
1636
  } } }), r(n.LumeAxis, { attrs: { type: "y", scale: n.computedYScale, "container-size": n.containerSize, options: n.computedYAxisOptions, "hovered-index": n.internalHoveredIndex, orientation: n.orientation, "data-j-lume-chart__y-axis": "" }, on: { click: n.handleAxisClick, mouseenter: n.handleAxisMouseenter, mouseleave: function(a) {
1603
1637
  return n.emit("axis-mouseleave");
1604
1638
  }, "lume__internal--axis-size": function(a) {
@@ -1607,15 +1641,15 @@ var ea = function() {
1607
1641
  }, { 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) {
1608
1642
  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));
1609
1643
  }), 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);
1610
- }, ta = [], na = /* @__PURE__ */ S(
1611
- qr,
1612
- ea,
1644
+ }, ra = [], aa = /* @__PURE__ */ H(
1613
1645
  ta,
1646
+ na,
1647
+ ra,
1614
1648
  !1,
1615
1649
  null,
1616
- "17c48844"
1650
+ "47313de1"
1617
1651
  );
1618
- const fe = na.exports, gt = 8, ra = 8, aa = 20, _e = 2, oa = 3, la = 4, ht = 2, ua = /* @__PURE__ */ R({
1652
+ const he = aa.exports, yt = 8, oa = 8, la = 20, be = 2, ua = 3, ia = 4, bt = 2, sa = /* @__PURE__ */ S({
1619
1653
  __name: "lume-alluvial-node-label",
1620
1654
  props: {
1621
1655
  bottom: { type: Boolean, default: !1 },
@@ -1624,34 +1658,34 @@ const fe = na.exports, gt = 8, ra = 8, aa = 20, _e = 2, oa = 3, la = 4, ht = 2,
1624
1658
  },
1625
1659
  emits: ["lume__internal--node-resize"],
1626
1660
  setup(t, { emit: e }) {
1627
- const r = t, n = I(null), a = I(r.maxWidth), o = I(1);
1628
- return H(
1661
+ const r = t, n = N(null), a = N(r.maxWidth), o = N(1);
1662
+ return R(
1629
1663
  [n, () => r.maxWidth],
1630
1664
  async ([l, i]) => {
1631
1665
  if (l && i) {
1632
- a.value = i, await Be();
1633
- const { width: u, height: c } = l.getBoundingClientRect();
1634
- a.value = u + ht > i ? i : u + ht, o.value = Math.ceil(c);
1666
+ a.value = i, await Fe();
1667
+ const { width: u, height: s } = l.getBoundingClientRect();
1668
+ a.value = u + bt > i ? i : u + bt, o.value = Math.ceil(s);
1635
1669
  }
1636
1670
  },
1637
1671
  { immediate: !0 }
1638
- ), H(a, async (l) => {
1639
- l !== r.maxWidth && (await Be(), e("lume__internal--node-resize"));
1672
+ ), R(a, async (l) => {
1673
+ l !== r.maxWidth && (await Fe(), e("lume__internal--node-resize"));
1640
1674
  }), { __sfc: !0, props: r, emit: e, text: n, foreignObjectWidth: a, foreignObjectHeight: o };
1641
1675
  }
1642
1676
  });
1643
- var ia = function() {
1677
+ var ca = function() {
1644
1678
  var e = this, r = e._self._c, n = e._self._setupProxy;
1645
1679
  return e.maxWidth ? r("foreignObject", { staticClass: "lume-alluvial-group__node-foreign", attrs: { y: e.bottom ? "0.1em" : -n.foreignObjectHeight + 1, x: e.left ? -n.foreignObjectWidth : 0, width: n.foreignObjectWidth, height: n.foreignObjectHeight } }, [r("div", { staticClass: "lume-alluvial-group__label-wrapper" }, [r("span", { ref: "text", staticClass: "lume-alluvial-group__node-label" }, [e._t("default")], 2)])]) : r("text", { staticClass: "lume-alluvial-group__node-label", attrs: { dy: e.bottom ? ".2em" : "-.2em", "dominant-baseline": e.bottom ? "hanging" : "auto" } }, [e._t("default")], 2);
1646
- }, sa = [], ca = /* @__PURE__ */ S(
1647
- ua,
1648
- ia,
1680
+ }, da = [], va = /* @__PURE__ */ H(
1649
1681
  sa,
1682
+ ca,
1683
+ da,
1650
1684
  !1,
1651
1685
  null,
1652
1686
  "7126dfdb"
1653
1687
  );
1654
- const da = ca.exports, va = /* @__PURE__ */ R({
1688
+ const fa = va.exports, pa = /* @__PURE__ */ S({
1655
1689
  __name: "lume-alluvial-node-value",
1656
1690
  props: {
1657
1691
  bottom: { type: Boolean, default: !0 }
@@ -1660,18 +1694,18 @@ const da = ca.exports, va = /* @__PURE__ */ R({
1660
1694
  return { __sfc: !0 };
1661
1695
  }
1662
1696
  });
1663
- var fa = function() {
1697
+ var _a = function() {
1664
1698
  var e = this, r = e._self._c;
1665
1699
  return e._self._setupProxy, r("text", { staticClass: "lume-alluvial-group__node-value", attrs: { y: e.bottom ? ".2em" : "-.2em", "dominant-baseline": e.bottom ? "hanging" : "auto" } }, [e._t("default")], 2);
1666
- }, pa = [], ma = /* @__PURE__ */ S(
1667
- va,
1668
- fa,
1700
+ }, ma = [], ga = /* @__PURE__ */ H(
1669
1701
  pa,
1702
+ _a,
1703
+ ma,
1670
1704
  !1,
1671
1705
  null,
1672
1706
  "b4fc758b"
1673
1707
  );
1674
- const _a = ma.exports, ga = /* @__PURE__ */ R({
1708
+ const ha = ga.exports, ya = /* @__PURE__ */ S({
1675
1709
  __name: "lume-alluvial-node-header",
1676
1710
  props: {
1677
1711
  align: {
@@ -1682,7 +1716,7 @@ const _a = ma.exports, ga = /* @__PURE__ */ R({
1682
1716
  y: { type: Number, required: !0 }
1683
1717
  },
1684
1718
  setup(t) {
1685
- const e = t, r = I(null), n = v(() => {
1719
+ const e = t, r = N(null), n = v(() => {
1686
1720
  var i;
1687
1721
  return ((i = r.value) == null ? void 0 : i.getBBox().width) ?? 0;
1688
1722
  }), a = v(() => e.align === "left" ? 0 : e.align === "right" ? -n.value : -n.value / 2), o = v(
@@ -1693,21 +1727,21 @@ const _a = ma.exports, ga = /* @__PURE__ */ R({
1693
1727
  return { __sfc: !0, props: e, textRef: r, textWidth: n, textStart: a, beforeTransform: o, afterTransform: l };
1694
1728
  }
1695
1729
  });
1696
- var ha = function() {
1730
+ var ba = function() {
1697
1731
  var e = this, r = e._self._c, n = e._self._setupProxy;
1698
1732
  return r("g", { attrs: { transform: `translate(${e.x}, ${e.y})` } }, [r("g", { attrs: { transform: n.beforeTransform } }, [e._t("before")], 2), r("text", { ref: "textRef", staticClass: "lume-alluvial-group__node-header lume-typography--caption", class: {
1699
1733
  [`lume-alluvial-group__node-header--${e.align}`]: e.align !== "center"
1700
1734
  } }, [e._t("default")], 2), r("g", { attrs: { transform: n.afterTransform } }, [e._t("after")], 2)]);
1701
- }, ya = [], ba = /* @__PURE__ */ S(
1702
- ga,
1703
- ha,
1735
+ }, ka = [], xa = /* @__PURE__ */ H(
1704
1736
  ya,
1737
+ ba,
1738
+ ka,
1705
1739
  !1,
1706
1740
  null,
1707
1741
  "ee436a8d"
1708
1742
  );
1709
- const ka = ba.exports;
1710
- function yt(t, e) {
1743
+ const La = xa.exports;
1744
+ function kt(t, e) {
1711
1745
  return {
1712
1746
  x0: 0 + (e ? e.left : 0),
1713
1747
  y0: 0 + (e ? e.top : 0),
@@ -1715,52 +1749,52 @@ function yt(t, e) {
1715
1749
  y1: t.height - (e ? e.bottom : 0)
1716
1750
  };
1717
1751
  }
1718
- function xa(t) {
1719
- const e = I(yt(t));
1752
+ function Aa(t) {
1753
+ const e = N(kt(t));
1720
1754
  function r(n) {
1721
- e.value = yt(t, n);
1755
+ e.value = kt(t, n);
1722
1756
  }
1723
1757
  return { extents: e, updateExtents: r };
1724
1758
  }
1725
- var Ae = /* @__PURE__ */ ((t) => (t.GraphProblem = "There was an issue generating your alluvial graph.", t.BarScaleDomainAbove0 = "Bar linear scale domain cannot start above 0!", t.BarScaleNull = "Bar linear scale cannot be `null`", t))(Ae || {});
1726
- const La = "[lume] ";
1727
- function Ue(t, e, r = !0) {
1728
- r && wt() || console.error(La + "Error: " + t, e);
1759
+ var $e = /* @__PURE__ */ ((t) => (t.GraphProblem = "There was an issue generating your alluvial graph.", t.BarScaleDomainAbove0 = "Bar linear scale domain cannot start above 0!", t.BarScaleNull = "Bar linear scale cannot be `null`", t))($e || {});
1760
+ const Ta = "[lume] ";
1761
+ function Xe(t, e, r = !0) {
1762
+ r && Rt() || console.error(Ta + "Error: " + t, e);
1729
1763
  }
1730
- const Ta = 200;
1731
- function W(t) {
1764
+ const Oa = 200;
1765
+ function Y(t) {
1732
1766
  return typeof t == "string" || typeof t == "number" ? t : t.id ?? t.label;
1733
1767
  }
1734
- function Aa(t, e) {
1768
+ function Ia(t, e) {
1735
1769
  return e.nodes.find((r) => r.id === t);
1736
1770
  }
1737
- function Oa(t, e) {
1771
+ function Na(t, e) {
1738
1772
  return e.links.find((r) => r.id === t);
1739
1773
  }
1740
- function Vt(t) {
1774
+ function zt(t) {
1741
1775
  return !!(t.sourceLinks && t.targetLinks);
1742
1776
  }
1743
- function ot(t) {
1777
+ function ut(t) {
1744
1778
  return Math.max(
1745
1779
  ...t.filter((e) => e.parentNodeId == null).map(({ layer: e }) => e)
1746
1780
  );
1747
1781
  }
1748
- function Mt(t) {
1782
+ function Wt(t) {
1749
1783
  return t.layer === 0;
1750
1784
  }
1751
- function zt(t, e) {
1785
+ function Ut(t, e) {
1752
1786
  return t.parentNodeId == null && t.layer === e;
1753
1787
  }
1754
- function Wt(t, e, r) {
1755
- return Mt(t) ? e.alignFirstNodeLabels !== "right" : zt(t, r) ? e.alignLastNodeLabels === "left" : !1;
1788
+ function Zt(t, e, r) {
1789
+ return Wt(t) ? e.alignFirstNodeLabels !== "right" : Ut(t, r) ? e.alignLastNodeLabels === "left" : !1;
1756
1790
  }
1757
- function Ia(t, e, r) {
1791
+ function Ea(t, e, r) {
1758
1792
  if (!e) return;
1759
- const n = ot(t.nodes), a = t.nodes.filter((u) => Mt(u)).map((u) => `${u.id}`), o = t.nodes.filter((u) => zt(u, n)).map((u) => `${u.id}`), l = e.filter((u) => a.includes(u.dataset.id)).reduce(
1760
- (u, c) => Math.max(u, c.getBBox().width),
1793
+ const n = ut(t.nodes), a = t.nodes.filter((u) => Wt(u)).map((u) => `${u.id}`), o = t.nodes.filter((u) => Ut(u, n)).map((u) => `${u.id}`), l = e.filter((u) => a.includes(u.dataset.id)).reduce(
1794
+ (u, s) => Math.max(u, s.getBBox().width),
1761
1795
  -1 / 0
1762
1796
  ), i = e.filter((u) => o.includes(u.dataset.id)).reduce(
1763
- (u, c) => Math.max(u, c.getBBox().width),
1797
+ (u, s) => Math.max(u, s.getBBox().width),
1764
1798
  -1 / 0
1765
1799
  );
1766
1800
  return {
@@ -1770,46 +1804,46 @@ function Ia(t, e, r) {
1770
1804
  bottom: 0
1771
1805
  };
1772
1806
  }
1773
- function Na(t, e) {
1774
- const r = ot(t);
1807
+ function $a(t, e) {
1808
+ const r = ut(t);
1775
1809
  return t.map((n) => {
1776
- const a = n.y1 - n.y0 < _e;
1810
+ const a = n.y1 - n.y0 < be;
1777
1811
  return {
1778
1812
  x: n.x0,
1779
- y: n.y0 - (a ? _e / 2 : 0),
1813
+ y: n.y0 - (a ? be / 2 : 0),
1780
1814
  // Negative offset to account for the min. height
1781
1815
  width: n.x1 - n.x0,
1782
- height: a ? _e : n.y1 - n.y0,
1816
+ height: a ? be : n.y1 - n.y0,
1783
1817
  textTransform: {
1784
- x: Wt(n, e, r) ? n.x0 - gt : n.x1 + gt,
1818
+ x: Zt(n, e, r) ? n.x0 - yt : n.x1 + yt,
1785
1819
  y: (n.y1 + n.y0) / 2
1786
1820
  },
1787
1821
  node: n
1788
1822
  };
1789
1823
  });
1790
1824
  }
1791
- function Ea(t) {
1825
+ function wa(t) {
1792
1826
  return [t.source.x1, t.y0];
1793
1827
  }
1794
- function $a(t) {
1828
+ function Da(t) {
1795
1829
  return [t.target.x0, t.y1];
1796
1830
  }
1797
- function wa(t) {
1798
- return t.curveFunction ? nn(t.curveFunction).source(Ea).target($a) : Jt();
1831
+ function Ra(t) {
1832
+ return t.curveFunction ? an(t.curveFunction).source(wa).target(Da) : qt();
1799
1833
  }
1800
- function Da(t) {
1834
+ function Ha(t) {
1801
1835
  return t.map((e) => {
1802
1836
  var r;
1803
1837
  return {
1804
1838
  id: e.id,
1805
- color: e.color || ((r = e.source) == null ? void 0 : r.color) || ke,
1806
- d: wa(e)(e),
1839
+ color: e.color || ((r = e.source) == null ? void 0 : r.color) || Te,
1840
+ d: Ra(e)(e),
1807
1841
  strokeWidth: Math.max(1, e.width),
1808
1842
  link: e
1809
1843
  };
1810
1844
  });
1811
1845
  }
1812
- function bt(t, e, r, n, a) {
1846
+ function xt(t, e, r, n, a) {
1813
1847
  if (n === !1) {
1814
1848
  t.node = {
1815
1849
  ...t.node,
@@ -1817,28 +1851,28 @@ function bt(t, e, r, n, a) {
1817
1851
  };
1818
1852
  return;
1819
1853
  }
1820
- const o = Date.now(), l = bn(e, r), i = () => {
1821
- let c = (Date.now() - o) / Ta;
1822
- c > 1 && (c = 1), t.node = {
1854
+ const o = Date.now(), l = xn(e, r), i = () => {
1855
+ let s = (Date.now() - o) / Oa;
1856
+ s > 1 && (s = 1), t.node = {
1823
1857
  ...t.node,
1824
- transitionValue: a && c === 1 ? void 0 : l(c)
1825
- }, c < 1 && requestAnimationFrame(i);
1858
+ transitionValue: a && s === 1 ? void 0 : l(s)
1859
+ }, s < 1 && requestAnimationFrame(i);
1826
1860
  };
1827
1861
  requestAnimationFrame(i);
1828
1862
  }
1829
- const Ha = ":aggregated";
1830
- function Sa(t) {
1831
- const e = I([]), r = v(() => {
1832
- var c, s;
1863
+ const Sa = ":aggregated";
1864
+ function Pa(t) {
1865
+ const e = N([]), r = v(() => {
1866
+ var s, c;
1833
1867
  const u = /* @__PURE__ */ new Map();
1834
- return (s = (c = t.value) == null ? void 0 : c[0]) == null || s.values.forEach(({ value: f, expandableNodes: m }) => {
1835
- m != null && m.length && u.set(f, [...m]);
1868
+ return (c = (s = t.value) == null ? void 0 : s[0]) == null || c.values.forEach(({ value: d, expandableNodes: _ }) => {
1869
+ _ != null && _.length && u.set(d, [..._]);
1836
1870
  }), u;
1837
1871
  }), n = v(
1838
1872
  () => {
1839
1873
  const u = /* @__PURE__ */ new Map();
1840
- return r.value.forEach((c, s) => {
1841
- c.forEach((f) => u.set(f, s));
1874
+ return r.value.forEach((s, c) => {
1875
+ s.forEach((d) => u.set(d, c));
1842
1876
  }), u;
1843
1877
  }
1844
1878
  );
@@ -1852,9 +1886,9 @@ function Sa(t) {
1852
1886
  return e.value.includes(u);
1853
1887
  }
1854
1888
  function i(u) {
1855
- a(u) && (e.value = l(u) ? e.value.filter((c) => c !== u) : [...e.value, u]);
1889
+ a(u) && (e.value = l(u) ? e.value.filter((s) => s !== u) : [...e.value, u]);
1856
1890
  }
1857
- return H(t, () => e.value = []), {
1891
+ return R(t, () => e.value = []), {
1858
1892
  childIdsByParentId: r,
1859
1893
  expandedNodeIds: e,
1860
1894
  isExpandableNode: a,
@@ -1864,30 +1898,30 @@ function Sa(t) {
1864
1898
  toggleNodeExpansion: i
1865
1899
  };
1866
1900
  }
1867
- function Pa(t, e, r, n) {
1901
+ function Ba(t, e, r, n) {
1868
1902
  if (!t || !e || n.size === 0)
1869
1903
  return { nodes: t, links: e };
1870
1904
  const a = e.filter(
1871
- (l) => !n.has(W(l.source)) && !n.has(W(l.target))
1905
+ (l) => !n.has(Y(l.source)) && !n.has(Y(l.target))
1872
1906
  ), o = new Set(a.map(({ id: l }) => l));
1873
1907
  return r.forEach((l, i) => {
1874
1908
  const u = /* @__PURE__ */ new Map();
1875
- l.forEach((c) => {
1876
- Ut(e, c).forEach((s) => {
1877
- const f = W(s.target), m = u.get(f);
1878
- if (m) {
1879
- m.value += s.value;
1909
+ l.forEach((s) => {
1910
+ Xt(e, s).forEach((c) => {
1911
+ const d = Y(c.target), _ = u.get(d);
1912
+ if (_) {
1913
+ _.value += c.value;
1880
1914
  return;
1881
1915
  }
1882
- const h = `${i}:${f}`;
1883
- u.set(f, {
1884
- id: o.has(h) ? `${h}${Ha}` : h,
1916
+ const g = `${i}:${d}`;
1917
+ u.set(d, {
1918
+ id: o.has(g) ? `${g}${Sa}` : g,
1885
1919
  aggregatedFrom: i,
1886
- color: s.color,
1887
- curveFunction: s.curveFunction,
1920
+ color: c.color,
1921
+ curveFunction: c.curveFunction,
1888
1922
  source: i,
1889
- target: f,
1890
- value: s.value
1923
+ target: d,
1924
+ value: c.value
1891
1925
  });
1892
1926
  });
1893
1927
  }), a.push(...u.values());
@@ -1896,7 +1930,7 @@ function Pa(t, e, r, n) {
1896
1930
  links: a
1897
1931
  };
1898
1932
  }
1899
- function Ra({
1933
+ function Ca({
1900
1934
  graph: t,
1901
1935
  nodes: e,
1902
1936
  linkDefinitions: r,
@@ -1907,11 +1941,11 @@ function Ra({
1907
1941
  }) {
1908
1942
  var i;
1909
1943
  (i = t == null ? void 0 : t.nodes) != null && i.length && n.forEach((u) => {
1910
- const c = t.nodes.find((f) => f.id === u), s = (a.get(u) ?? []).map((f) => e.find((m) => m.id === f)).filter(Boolean);
1911
- !c || !s.length || Ba({ graph: t, parent: c, children: s, linkDefinitions: r, options: o, extents: l });
1944
+ const s = t.nodes.find((d) => d.id === u), c = (a.get(u) ?? []).map((d) => e.find((_) => _.id === d)).filter(Boolean);
1945
+ !s || !c.length || Fa({ graph: t, parent: s, children: c, linkDefinitions: r, options: o, extents: l });
1912
1946
  });
1913
1947
  }
1914
- function Ba({
1948
+ function Fa({
1915
1949
  graph: t,
1916
1950
  parent: e,
1917
1951
  children: r,
@@ -1920,11 +1954,11 @@ function Ba({
1920
1954
  extents: o
1921
1955
  }) {
1922
1956
  const l = r.map(
1923
- (s) => za(n, e, s)
1924
- ), i = l.reduce((s, f) => s + f, 0);
1957
+ (c) => Ua(n, e, c)
1958
+ ), i = l.reduce((c, d) => c + d, 0);
1925
1959
  if (!i) return;
1926
1960
  const u = (e.y1 - e.y0) / i;
1927
- Ca({
1961
+ Ga({
1928
1962
  parent: e,
1929
1963
  children: r,
1930
1964
  childValues: l,
@@ -1933,33 +1967,33 @@ function Ba({
1933
1967
  options: a,
1934
1968
  extents: o
1935
1969
  });
1936
- const c = ja({
1970
+ const s = Ma({
1937
1971
  parent: e,
1938
1972
  children: r,
1939
1973
  childValues: l,
1940
1974
  scale: u,
1941
1975
  linkDefinitions: n
1942
1976
  });
1943
- Ma(t, e).forEach((s) => {
1944
- const f = Va({
1977
+ Wa(t, e).forEach((c) => {
1978
+ const d = za({
1945
1979
  children: r,
1946
- aggregatedLink: s,
1980
+ aggregatedLink: c,
1947
1981
  scale: u,
1948
1982
  linkDefinitions: n
1949
1983
  });
1950
- kt(t.links, s, f), kt(
1951
- s.target.targetLinks,
1952
- s,
1953
- f
1984
+ Lt(t.links, c, d), Lt(
1985
+ c.target.targetLinks,
1986
+ c,
1987
+ d
1954
1988
  );
1955
1989
  }), e.sourceLinks = [
1956
1990
  ...e.sourceLinks.filter(
1957
- (s) => s.aggregatedFrom !== e.id
1991
+ (c) => c.aggregatedFrom !== e.id
1958
1992
  ),
1959
- ...c
1960
- ], t.links.push(...c), t.nodes.push(...r);
1993
+ ...s
1994
+ ], t.links.push(...s), t.nodes.push(...r);
1961
1995
  }
1962
- function Ca({
1996
+ function Ga({
1963
1997
  parent: t,
1964
1998
  children: e,
1965
1999
  childValues: r,
@@ -1968,32 +2002,32 @@ function Ca({
1968
2002
  options: o,
1969
2003
  extents: l
1970
2004
  }) {
1971
- const i = t.x1 - t.x0, u = t.x1, c = Wa(a, t) ?? l.x1, s = Math.max(u, u + (c - u - i) / 2), f = r.map((_) => _ * n), m = Fa(e, o.nodePadding ?? 0), h = [...f, ...m].reduce(
1972
- (_, x) => _ + x,
2005
+ const i = t.x1 - t.x0, u = t.x1, s = Za(a, t) ?? l.x1, c = Math.max(u, u + (s - u - i) / 2), d = r.map((h) => h * n), _ = ja(e, o.nodePadding ?? 0), g = [...d, ..._].reduce(
2006
+ (h, b) => h + b,
1973
2007
  0
1974
2008
  );
1975
- let g = Ga({ parent: t, children: e, totalHeight: h, extents: l });
1976
- e.forEach((_, x) => {
1977
- g += m[x], _.x0 = s, _.x1 = s + i, _.y0 = g, _.y1 = g + f[x], _.depth = t.depth + 0.5, _.layer = t.layer + 0.5, _.parentNodeId = t.id, _.value = r[x], _.sourceLinks = [], _.targetLinks = [], g = _.y1;
2009
+ let m = Va({ parent: t, children: e, totalHeight: g, extents: l });
2010
+ e.forEach((h, b) => {
2011
+ m += _[b], h.x0 = c, h.x1 = c + i, h.y0 = m, h.y1 = m + d[b], h.depth = t.depth + 0.5, h.layer = t.layer + 0.5, h.parentNodeId = t.id, h.value = r[b], h.sourceLinks = [], h.targetLinks = [], m = h.y1;
1978
2012
  });
1979
2013
  }
1980
- function Fa(t, e) {
2014
+ function ja(t, e) {
1981
2015
  return t.map(({ offset: r }, n) => n === 0 ? 0 : typeof r == "number" ? r : e);
1982
2016
  }
1983
- function Ga({
2017
+ function Va({
1984
2018
  parent: t,
1985
2019
  children: e,
1986
2020
  totalHeight: r,
1987
2021
  extents: n
1988
2022
  }) {
1989
2023
  const { offset: a } = e[0];
1990
- return typeof a == "number" ? t.y0 + a : Ua(
2024
+ return typeof a == "number" ? t.y0 + a : Xa(
1991
2025
  (t.y0 + t.y1) / 2 - r / 2,
1992
2026
  n.y0,
1993
2027
  Math.max(n.y0, n.y1 - r)
1994
2028
  );
1995
2029
  }
1996
- function ja({
2030
+ function Ma({
1997
2031
  parent: t,
1998
2032
  children: e,
1999
2033
  childValues: r,
@@ -2002,21 +2036,21 @@ function ja({
2002
2036
  }) {
2003
2037
  let o = t.y0;
2004
2038
  return e.map((l, i) => {
2005
- const u = lt(a, t.id, l.id), c = r[i] * n, s = {
2039
+ const u = it(a, t.id, l.id), s = r[i] * n, c = {
2006
2040
  id: (u == null ? void 0 : u.id) ?? `${t.id}:${l.id}`,
2007
2041
  color: u == null ? void 0 : u.color,
2008
2042
  curveFunction: u == null ? void 0 : u.curveFunction,
2009
2043
  source: t,
2010
2044
  target: l,
2011
2045
  value: r[i],
2012
- width: c,
2013
- y0: o + c / 2,
2046
+ width: s,
2047
+ y0: o + s / 2,
2014
2048
  y1: (l.y0 + l.y1) / 2
2015
2049
  };
2016
- return o += c, l.targetLinks.push(s), s;
2050
+ return o += s, l.targetLinks.push(c), c;
2017
2051
  });
2018
2052
  }
2019
- function Va({
2053
+ function za({
2020
2054
  children: t,
2021
2055
  aggregatedLink: e,
2022
2056
  scale: r,
@@ -2025,54 +2059,54 @@ function Va({
2025
2059
  const a = e.target;
2026
2060
  let o = e.y1 - e.width / 2;
2027
2061
  return t.reduce((l, i) => {
2028
- const u = lt(n, i.id, a.id);
2062
+ const u = it(n, i.id, a.id);
2029
2063
  if (!u) return l;
2030
- const c = u.value * r, s = i.sourceLinks.reduce(
2031
- (m, { width: h }) => m + h,
2064
+ const s = u.value * r, c = i.sourceLinks.reduce(
2065
+ (_, { width: g }) => _ + g,
2032
2066
  i.y0
2033
- ), f = {
2067
+ ), d = {
2034
2068
  id: u.id,
2035
2069
  color: u.color,
2036
2070
  curveFunction: u.curveFunction,
2037
2071
  source: i,
2038
2072
  target: a,
2039
2073
  value: u.value,
2040
- width: c,
2041
- y0: s + c / 2,
2042
- y1: o + c / 2
2074
+ width: s,
2075
+ y0: c + s / 2,
2076
+ y1: o + s / 2
2043
2077
  };
2044
- return o += c, i.sourceLinks.push(f), l.push(f), l;
2078
+ return o += s, i.sourceLinks.push(d), l.push(d), l;
2045
2079
  }, []);
2046
2080
  }
2047
- function Ma(t, e) {
2081
+ function Wa(t, e) {
2048
2082
  return t.links.filter(
2049
2083
  (r) => r.aggregatedFrom === e.id
2050
2084
  );
2051
2085
  }
2052
- function Ut(t, e) {
2086
+ function Xt(t, e) {
2053
2087
  return t.filter(
2054
- (r) => W(r.source) === e
2088
+ (r) => Y(r.source) === e
2055
2089
  );
2056
2090
  }
2057
- function lt(t, e, r) {
2091
+ function it(t, e, r) {
2058
2092
  return t.find(
2059
- (n) => W(n.source) === e && W(n.target) === r
2093
+ (n) => Y(n.source) === e && Y(n.target) === r
2060
2094
  );
2061
2095
  }
2062
- function za(t, e, r) {
2063
- const n = lt(t, e.id, r.id);
2064
- return n ? n.value : Ut(t, r.id).reduce(
2096
+ function Ua(t, e, r) {
2097
+ const n = it(t, e.id, r.id);
2098
+ return n ? n.value : Xt(t, r.id).reduce(
2065
2099
  (a, { value: o }) => a + o,
2066
2100
  0
2067
2101
  );
2068
2102
  }
2069
- function Wa(t, e) {
2103
+ function Za(t, e) {
2070
2104
  const r = t.nodes.filter(
2071
2105
  (n) => n.layer === e.layer + 1
2072
2106
  );
2073
2107
  return r.length ? Math.min(...r.map(({ x0: n }) => n)) : null;
2074
2108
  }
2075
- function kt(t, e, r) {
2109
+ function Lt(t, e, r) {
2076
2110
  const n = t.indexOf(e);
2077
2111
  if (n === -1) {
2078
2112
  t.push(...r);
@@ -2080,178 +2114,178 @@ function kt(t, e, r) {
2080
2114
  }
2081
2115
  t.splice(n, 1, ...r);
2082
2116
  }
2083
- function Ua(t, e, r) {
2117
+ function Xa(t, e, r) {
2084
2118
  return Math.max(e, Math.min(t, r));
2085
2119
  }
2086
- const Za = {
2120
+ const Ya = {
2087
2121
  nodes: [],
2088
2122
  links: []
2089
2123
  };
2090
- function xt(t, e) {
2124
+ function At(t, e) {
2091
2125
  return e.find((r) => r.every((n) => n.layer === t.layer));
2092
2126
  }
2093
- function Xa(t, e, r) {
2094
- const n = I(null), {
2127
+ function Ka(t, e, r) {
2128
+ const n = N(null), {
2095
2129
  childIdsByParentId: a,
2096
2130
  expandedNodeIds: o,
2097
2131
  isExpandableNode: l,
2098
2132
  isSubNode: i,
2099
2133
  parentIdByChildId: u,
2100
- toggleNodeExpansion: c
2101
- } = Sa(t), s = v(() => {
2102
- var d, p;
2103
- return (p = (d = t.value) == null ? void 0 : d[0]) == null ? void 0 : p.values.map(
2134
+ toggleNodeExpansion: s
2135
+ } = Pa(t), c = v(() => {
2136
+ var p, f;
2137
+ return (f = (p = t.value) == null ? void 0 : p[0]) == null ? void 0 : f.values.map(
2104
2138
  ({
2105
2139
  label: y,
2106
- color: k,
2107
- value: T,
2108
- deriveColorFromIncomingLinks: N,
2109
- expandableNodes: A,
2110
- offset: D
2140
+ color: x,
2141
+ value: A,
2142
+ deriveColorFromIncomingLinks: E,
2143
+ expandableNodes: B,
2144
+ offset: G
2111
2145
  }) => ({
2112
- label: y || T.toString(),
2113
- color: k,
2114
- fallbackColor: k || ke,
2115
- id: T,
2116
- deriveColorFromIncomingLinks: N,
2117
- expandableNodes: A,
2118
- offset: D
2146
+ label: y || A.toString(),
2147
+ color: x,
2148
+ fallbackColor: x || Te,
2149
+ id: A,
2150
+ deriveColorFromIncomingLinks: E,
2151
+ expandableNodes: B,
2152
+ offset: G
2119
2153
  })
2120
2154
  );
2121
- }), f = v(
2155
+ }), d = v(
2122
2156
  () => {
2123
- var d, p;
2124
- return (p = (d = t.value) == null ? void 0 : d[0]) == null ? void 0 : p.values.map(
2157
+ var p, f;
2158
+ return (f = (p = t.value) == null ? void 0 : p[0]) == null ? void 0 : f.values.map(
2125
2159
  (y) => {
2126
- var k;
2127
- return (k = y.targets) == null ? void 0 : k.map(
2128
- ({ node: T, value: N, color: A, curveFunction: D }) => ({
2129
- id: `${y.value}:${T}`,
2130
- color: A,
2131
- curveFunction: D,
2160
+ var x;
2161
+ return (x = y.targets) == null ? void 0 : x.map(
2162
+ ({ node: A, value: E, color: B, curveFunction: G }) => ({
2163
+ id: `${y.value}:${A}`,
2164
+ color: B,
2165
+ curveFunction: G,
2132
2166
  source: y.value ?? y.label,
2133
- target: T,
2134
- value: N
2167
+ target: A,
2168
+ value: E
2135
2169
  })
2136
2170
  );
2137
2171
  }
2138
2172
  ).filter(Boolean).flat();
2139
2173
  }
2140
- ), m = v(() => Qt().nodeId(W).nodeAlign(e.value.nodeAlign).nodePadding(e.value.nodePadding).nodeSort(e.value.nodeSort).nodeWidth(e.value.nodeWidth).linkSort(e.value.linkSort).iterations(e.value.iterations)), h = v(() => {
2141
- var d;
2142
- return (d = n.value) == null ? void 0 : d.nodes.filter((p) => p.parentNodeId == null).reduce((p, y) => {
2143
- const k = xt(y, p);
2144
- return k ? (k.push(y), k.sort((T, N) => (T._y0 || T.y0) - (N._y0 || N.y0))) : p.push([y]), p;
2145
- }, []).sort((p, y) => p[0].layer - y[0].layer);
2174
+ ), _ = v(() => en().nodeId(Y).nodeAlign(e.value.nodeAlign).nodePadding(e.value.nodePadding).nodeSort(e.value.nodeSort).nodeWidth(e.value.nodeWidth).linkSort(e.value.linkSort).iterations(e.value.iterations)), g = v(() => {
2175
+ var p;
2176
+ return (p = n.value) == null ? void 0 : p.nodes.filter((f) => f.parentNodeId == null).reduce((f, y) => {
2177
+ const x = At(y, f);
2178
+ return x ? (x.push(y), x.sort((A, E) => (A._y0 || A.y0) - (E._y0 || E.y0))) : f.push([y]), f;
2179
+ }, []).sort((f, y) => f[0].layer - y[0].layer);
2146
2180
  });
2147
- function g(d) {
2148
- const { offset: p } = d, y = xt(d, h.value);
2181
+ function m(p) {
2182
+ const { offset: f } = p, y = At(p, g.value);
2149
2183
  if (!y) return;
2150
- const k = y[y.findIndex((N) => N.id === d.id) - 1], T = k && y.length !== 1 ? k.y1 + p : p;
2151
- d._y0 = d.y0, d._y1 = d.y1, d.y0 = T, d.y1 = d.y0 + (d._y1 - d._y0);
2152
- }
2153
- function _(d, p) {
2154
- const { id: y, _y0: k, y0: T } = d, N = p.links.filter(
2155
- (C) => C.source.id === y
2156
- ), A = p.links.filter(
2157
- (C) => C.target.id === y
2158
- ), D = T - k;
2159
- N.forEach((C) => C.y0 += D), A.forEach((C) => C.y1 += D);
2160
- }
2161
- const x = v(() => {
2162
- var d;
2163
- return n.value && ((d = s.value) == null || d.forEach((p) => {
2164
- p.value === 0 && (p.fallbackColor = et.Grey), typeof p.offset == "number" && !i(p.id) && (g(p), _(p, n.value));
2184
+ const x = y[y.findIndex((E) => E.id === p.id) - 1], A = x && y.length !== 1 ? x.y1 + f : f;
2185
+ p._y0 = p.y0, p._y1 = p.y1, p.y0 = A, p.y1 = p.y0 + (p._y1 - p._y0);
2186
+ }
2187
+ function h(p, f) {
2188
+ const { id: y, _y0: x, y0: A } = p, E = f.links.filter(
2189
+ (T) => T.source.id === y
2190
+ ), B = f.links.filter(
2191
+ (T) => T.target.id === y
2192
+ ), G = A - x;
2193
+ E.forEach((T) => T.y0 += G), B.forEach((T) => T.y1 += G);
2194
+ }
2195
+ const b = v(() => {
2196
+ var p;
2197
+ return n.value && ((p = c.value) == null || p.forEach((f) => {
2198
+ f.value === 0 && (f.fallbackColor = nt.Grey), typeof f.offset == "number" && !i(f.id) && (m(f), h(f, n.value));
2165
2199
  })), n.value;
2166
2200
  });
2167
- return H([m, r, o], () => {
2201
+ return R([_, r, o], () => {
2168
2202
  try {
2169
- const { x0: d, y0: p, x1: y, y1: k } = r.value, T = m.value.extent([
2170
- [d, p],
2171
- [y, k]
2203
+ const { x0: p, y0: f, x1: y, y1: x } = r.value, A = _.value.extent([
2204
+ [p, f],
2205
+ [y, x]
2172
2206
  ])(
2173
- Pa(
2174
- s.value,
2175
- f.value,
2207
+ Ba(
2208
+ c.value,
2209
+ d.value,
2176
2210
  a.value,
2177
2211
  u.value
2178
2212
  )
2179
2213
  );
2180
- Ra({
2181
- graph: T,
2182
- nodes: s.value,
2183
- linkDefinitions: f.value,
2214
+ Ca({
2215
+ graph: A,
2216
+ nodes: c.value,
2217
+ linkDefinitions: d.value,
2184
2218
  expandedNodeIds: o.value,
2185
2219
  childIdsByParentId: a.value,
2186
2220
  options: e.value,
2187
2221
  extents: r.value
2188
- }), n.value = T;
2189
- } catch (d) {
2190
- Ue(Ae.GraphProblem, d), n.value = Za;
2222
+ }), n.value = A;
2223
+ } catch (p) {
2224
+ Xe($e.GraphProblem, p), n.value = Ya;
2191
2225
  }
2192
- }), { columns: h, graph: x, isExpandableNode: l, toggleNodeExpansion: c };
2226
+ }), { columns: g, graph: b, isExpandableNode: l, toggleNodeExpansion: s };
2193
2227
  }
2194
- function Ze(t, e) {
2228
+ function Ye(t, e) {
2195
2229
  return e || (e = {}), t.targetLinks && t.targetLinks.forEach(({ source: r, value: n }) => {
2196
- e[r.id] = n, Ze(
2230
+ e[r.id] = n, Ye(
2197
2231
  r,
2198
2232
  e
2199
2233
  );
2200
2234
  }), e;
2201
2235
  }
2202
- function Xe(t, e) {
2236
+ function Ke(t, e) {
2203
2237
  return e || (e = {}), t.sourceLinks && t.sourceLinks.forEach(({ target: r, value: n }) => {
2204
- e[r.id] = n, Xe(
2238
+ e[r.id] = n, Ke(
2205
2239
  r,
2206
2240
  e
2207
2241
  );
2208
2242
  }), e;
2209
2243
  }
2210
- function Ya(t, e) {
2244
+ function Ja(t, e) {
2211
2245
  return e.links.reduce((r, n) => (n.source.id in t && n.target.id in t && r.push(n.id), r), []);
2212
2246
  }
2213
- const Ka = (t, e) => {
2247
+ const Qa = (t, e) => {
2214
2248
  let r;
2215
- Vt(t) ? r = {
2249
+ zt(t) ? r = {
2216
2250
  [t.id]: t.value,
2217
- ...Ze(t),
2218
- ...Xe(t)
2251
+ ...Ye(t),
2252
+ ...Ke(t)
2219
2253
  } : r = {
2220
2254
  [t.source.id]: t.source.value,
2221
2255
  [t.target.id]: t.target.value,
2222
- ...Ze(t.source),
2223
- ...Xe(t.target)
2256
+ ...Ye(t.source),
2257
+ ...Ke(t.target)
2224
2258
  };
2225
- const n = Ya(r, e);
2259
+ const n = Ja(r, e);
2226
2260
  return { nodes: r, links: n };
2227
- }, Ja = (t) => {
2228
- if (Vt(t)) {
2261
+ }, qa = (t) => {
2262
+ if (zt(t)) {
2229
2263
  const e = [...t.sourceLinks, ...t.targetLinks];
2230
2264
  return {
2231
2265
  nodes: e.reduce(
2232
- (r, { source: n, target: a, value: o }) => n === t ? { ...r, [W(a)]: o } : { ...r, [W(n)]: o },
2233
- { [W(t)]: t.value }
2266
+ (r, { source: n, target: a, value: o }) => n === t ? { ...r, [Y(a)]: o } : { ...r, [Y(n)]: o },
2267
+ { [Y(t)]: t.value }
2234
2268
  ),
2235
2269
  links: e.map(({ id: r }) => r)
2236
2270
  };
2237
2271
  }
2238
2272
  return {
2239
2273
  nodes: {
2240
- [W(t.target)]: t.value,
2241
- [W(t.source)]: t.source.value
2274
+ [Y(t.target)]: t.value,
2275
+ [Y(t.source)]: t.source.value
2242
2276
  },
2243
2277
  links: [t.id]
2244
2278
  };
2245
2279
  };
2246
- function Qa(t, e, r) {
2247
- const n = I(null), a = v(() => n.value ? typeof e.value.highlightedElements == "function" ? e.value.highlightedElements(
2280
+ function eo(t, e, r) {
2281
+ const n = N(null), a = v(() => n.value ? typeof e.value.highlightedElements == "function" ? e.value.highlightedElements(
2248
2282
  n.value,
2249
2283
  r.value
2250
- ) : e.value.highlightedElements === "closest" ? Ja(n.value, r.value) : Ka(n.value, r.value) : { nodes: {}, links: [] });
2251
- return H(a, (o, l) => {
2284
+ ) : e.value.highlightedElements === "closest" ? qa(n.value, r.value) : Qa(n.value, r.value) : { nodes: {}, links: [] });
2285
+ return R(a, (o, l) => {
2252
2286
  if (o.links.length === 0 && Object.keys(o.nodes).length === 0) {
2253
2287
  t.value.forEach((i) => {
2254
- i.node.id in l.nodes && bt(
2288
+ i.node.id in l.nodes && xt(
2255
2289
  i,
2256
2290
  l.nodes[i.node.id],
2257
2291
  i.node.value,
@@ -2262,7 +2296,7 @@ function Qa(t, e, r) {
2262
2296
  return;
2263
2297
  }
2264
2298
  t.value.forEach((i) => {
2265
- i.node.id in o.nodes && bt(
2299
+ i.node.id in o.nodes && xt(
2266
2300
  i,
2267
2301
  i.node.value,
2268
2302
  o.nodes[i.node.id],
@@ -2271,10 +2305,10 @@ function Qa(t, e, r) {
2271
2305
  });
2272
2306
  }), { highlightedElements: a, hoveredElement: n };
2273
2307
  }
2274
- const qa = /* @__PURE__ */ R({
2308
+ const to = /* @__PURE__ */ S({
2275
2309
  __name: "lume-alluvial-group",
2276
2310
  props: {
2277
- ...Ee(),
2311
+ ...He(),
2278
2312
  hoveredElementId: {
2279
2313
  type: [Number, String],
2280
2314
  default: null
@@ -2282,142 +2316,142 @@ const qa = /* @__PURE__ */ R({
2282
2316
  },
2283
2317
  emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
2284
2318
  setup(t, { emit: e }) {
2285
- const r = t, n = Oe("chartID"), { data: a, options: o } = V(r), l = I([]), i = I([]), u = I(null), c = I(null), s = I(null), { extents: f, updateExtents: m } = xa(r.containerSize), { columns: h, graph: g, isExpandableNode: _, toggleNodeExpansion: x } = Xa(a, o, f), { hoveredElement: d, highlightedElements: p } = Qa(
2319
+ const r = t, n = we("chartID"), { data: a, options: o } = z(r), l = N([]), i = N([]), u = N(null), s = N(null), c = N(null), { extents: d, updateExtents: _ } = Aa(r.containerSize), { columns: g, graph: m, isExpandableNode: h, toggleNodeExpansion: b } = Ka(a, o, d), { hoveredElement: p, highlightedElements: f } = eo(
2286
2320
  l,
2287
2321
  o,
2288
- g
2289
- ), y = v(() => Te(o.value.valueFormat)), k = v(
2322
+ m
2323
+ ), y = v(() => Ne(o.value.valueFormat)), x = v(
2290
2324
  () => o.value.nodeExpansionTrigger === "block"
2291
- ), T = v(
2292
- () => Object.keys(p.value.nodes)
2293
- ), N = v(
2325
+ ), A = v(
2326
+ () => Object.keys(f.value.nodes)
2327
+ ), E = v(
2294
2328
  () => {
2295
- var L, $;
2296
- return ($ = (L = g.value) == null ? void 0 : L.nodes) != null && $.length ? ot(g.value.nodes) : 0;
2329
+ var L, D;
2330
+ return (D = (L = m.value) == null ? void 0 : L.nodes) != null && D.length ? ut(m.value.nodes) : 0;
2297
2331
  }
2298
- ), A = v(() => {
2299
- if (!h.value) return [];
2300
- const L = h.value.length - 1;
2301
- return h.value.map(([{ x0: $, x1: B }], G) => G === 0 && o.value.alignFirstNodeLabels === "right" ? { x: $, align: "left" } : G === L && o.value.alignLastNodeLabels === "left" ? { x: B, align: "right" } : { x: ($ + B) / 2, align: "center" });
2302
- }), D = v(() => {
2332
+ ), B = v(() => {
2333
+ if (!g.value) return [];
2334
+ const L = g.value.length - 1;
2335
+ return g.value.map(([{ x0: D, x1: F }], M) => M === 0 && o.value.alignFirstNodeLabels === "right" ? { x: D, align: "left" } : M === L && o.value.alignLastNodeLabels === "left" ? { x: F, align: "right" } : { x: (D + F) / 2, align: "center" });
2336
+ }), G = v(() => {
2303
2337
  if (!(!o.value.nodeHeaders || !o.value.nodeHeaders.length))
2304
- return o.value.nodeHeaders.slice(0, A.value.length).map((L, $) => ({
2338
+ return o.value.nodeHeaders.slice(0, B.value.length).map((L, D) => ({
2305
2339
  label: L,
2306
- ...A.value[$]
2340
+ ...B.value[D]
2307
2341
  }));
2308
- }), C = v(
2309
- () => o.value.nodeHeaderPadding ?? aa
2310
- ), M = v(() => {
2311
- if (!(!o.value.gradient || !g.value))
2312
- return g.value.links.reduce((L, $) => {
2313
- const { source: B, target: G } = $, U = B.color || B.fallbackColor, Z = G.deriveColorFromIncomingLinks ? U : G.color || G.fallbackColor;
2314
- return L[$.id] = {
2315
- source: U,
2316
- target: Z,
2317
- x1: B.x1,
2318
- x2: G.x0
2342
+ }), T = v(
2343
+ () => o.value.nodeHeaderPadding ?? la
2344
+ ), P = v(() => {
2345
+ if (!(!o.value.gradient || !m.value))
2346
+ return m.value.links.reduce((L, D) => {
2347
+ const { source: F, target: M } = D, X = F.color || F.fallbackColor, U = M.deriveColorFromIncomingLinks ? X : M.color || M.fallbackColor;
2348
+ return L[D.id] = {
2349
+ source: X,
2350
+ target: U,
2351
+ x1: F.x1,
2352
+ x2: M.x0
2319
2353
  }, L;
2320
2354
  }, {});
2321
- }), z = v(() => {
2355
+ }), j = v(() => {
2322
2356
  const L = l.value.filter(
2323
- (B) => w(B)
2324
- ), $ = [];
2325
- return L.forEach((B) => {
2326
- const G = [];
2327
- i.value.filter(({ link: U }) => U.target.id === B.node.id).reverse().reduce((U, Z, it, He) => {
2328
- const Se = Z.link.target.y1 - Z.link.target.y0 > _e;
2329
- let b, F, j;
2330
- return Se ? (b = Z.link.target.y1 - Z.link.target.y0, F = Z.link.value / B.node.value, j = F * b) : j = _e / He.length, G.push({
2331
- x: B.x,
2332
- y: B.y + U,
2333
- height: j,
2334
- width: B.width,
2335
- key: `node-block-${B.node.id}-source-link-${Z.link.source.id}`,
2336
- class: `lume-alluvial-group__node-block lume-fill--${Z.link.source.color || ke}`
2337
- }), U + j;
2338
- }, 0), $.push({
2339
- id: B.node.id,
2340
- subNodes: G
2357
+ (F) => se(F)
2358
+ ), D = [];
2359
+ return L.forEach((F) => {
2360
+ const M = [];
2361
+ i.value.filter(({ link: X }) => X.target.id === F.node.id).reverse().reduce((X, U, ct, Se) => {
2362
+ const Pe = U.link.target.y1 - U.link.target.y0 > be;
2363
+ let Oe, k, C;
2364
+ return Pe ? (Oe = U.link.target.y1 - U.link.target.y0, k = U.link.value / F.node.value, C = k * Oe) : C = be / Se.length, M.push({
2365
+ x: F.x,
2366
+ y: F.y + X,
2367
+ height: C,
2368
+ width: F.width,
2369
+ key: `node-block-${F.node.id}-source-link-${U.link.source.id}`,
2370
+ class: `lume-alluvial-group__node-block lume-fill--${U.link.source.color || Te}`
2371
+ }), X + C;
2372
+ }, 0), D.push({
2373
+ id: F.node.id,
2374
+ subNodes: M
2341
2375
  });
2342
- }), $;
2376
+ }), D;
2343
2377
  });
2344
- function ee(L) {
2378
+ function V(L) {
2345
2379
  return o.value.gradient && `url('#${n}_${L.id}')`;
2346
2380
  }
2347
- function ce(L) {
2348
- return T.value.length > 0 && !T.value.includes(L.toString());
2381
+ function K(L) {
2382
+ return A.value.length > 0 && !A.value.includes(L.toString());
2349
2383
  }
2350
- function ae(L) {
2351
- return T.value.length > 0 && T.value.includes(L.toString());
2384
+ function ye(L) {
2385
+ return A.value.length > 0 && A.value.includes(L.toString());
2352
2386
  }
2353
- function oe(L) {
2354
- return p.value.links.length > 0 && !p.value.links.includes(L);
2387
+ function pe(L) {
2388
+ return f.value.links.length > 0 && !f.value.links.includes(L);
2355
2389
  }
2356
- function le(L) {
2357
- return p.value.links.length > 0 && p.value.links.includes(L);
2390
+ function ie(L) {
2391
+ return f.value.links.length > 0 && f.value.links.includes(L);
2358
2392
  }
2359
- function E(L) {
2360
- return Wt(L, o.value, N.value);
2393
+ function oe(L) {
2394
+ return Zt(L, o.value, E.value);
2361
2395
  }
2362
- function w(L) {
2396
+ function se(L) {
2363
2397
  return !L.node.color && L.node.deriveColorFromIncomingLinks;
2364
2398
  }
2365
- function P(L) {
2366
- _(L.id) && x(L.id);
2399
+ function te(L) {
2400
+ h(L.id) && b(L.id);
2367
2401
  }
2368
- function te(L, $) {
2369
- k.value || P(L), e("node-click", { node: L, event: $ });
2402
+ function O(L, D) {
2403
+ x.value || te(L), e("node-click", { node: L, event: D });
2370
2404
  }
2371
- function $e(L, $) {
2372
- P(L), e("node-click", { node: L, event: $ });
2405
+ function $(L, D) {
2406
+ te(L), e("node-click", { node: L, event: D });
2373
2407
  }
2374
- function we(L) {
2375
- k.value && P(L);
2408
+ function w(L) {
2409
+ x.value && te(L);
2376
2410
  }
2377
- function De(L, $) {
2378
- L !== d.value && (d.value = L, e("link-mouseenter", { link: L, event: $ }));
2411
+ function W(L, D) {
2412
+ L !== p.value && (p.value = L, e("link-mouseenter", { link: L, event: D }));
2379
2413
  }
2380
- function pe(L) {
2381
- const $ = d.value;
2382
- d.value = null, e("link-mouseleave", { link: $, event: L });
2414
+ function _e(L) {
2415
+ const D = p.value;
2416
+ p.value = null, e("link-mouseleave", { link: D, event: L });
2383
2417
  }
2384
- function de(L) {
2418
+ function Z(L) {
2385
2419
  if (L == null) {
2386
- d.value = null;
2420
+ p.value = null;
2387
2421
  return;
2388
2422
  }
2389
- const $ = Aa(L, g.value) || Oa(L, g.value);
2390
- if (!$) {
2391
- ne(J.InvalidHoveredElement);
2423
+ const D = Ia(L, m.value) || Na(L, m.value);
2424
+ if (!D) {
2425
+ le(ne.InvalidHoveredElement);
2392
2426
  return;
2393
2427
  }
2394
- d.value = $;
2428
+ p.value = D;
2395
2429
  }
2396
- function xe(L) {
2397
- var $;
2398
- return (($ = z.value.find(({ id: B }) => L === B)) == null ? void 0 : $.subNodes) ?? [];
2430
+ function ce(L) {
2431
+ var D;
2432
+ return ((D = j.value.find(({ id: F }) => L === F)) == null ? void 0 : D.subNodes) ?? [];
2399
2433
  }
2400
2434
  function me() {
2401
- const L = Ia(
2402
- g.value,
2435
+ const L = Ea(
2436
+ m.value,
2403
2437
  u.value,
2404
2438
  o.value
2405
2439
  );
2406
- m(L);
2440
+ _(L);
2407
2441
  }
2408
- return H(g, (L) => {
2409
- l.value = Na(L.nodes, o.value), i.value = Da(L.links).reverse(), d.value == null && r.hoveredElementId != null && de(r.hoveredElementId);
2410
- }), H([c, s], () => {
2411
- d.value = c.value ?? s.value;
2412
- }), H([r.containerSize, u], () => {
2442
+ return R(m, (L) => {
2443
+ l.value = $a(L.nodes, o.value), i.value = Ha(L.links).reverse(), p.value == null && r.hoveredElementId != null && Z(r.hoveredElementId);
2444
+ }), R([s, c], () => {
2445
+ p.value = s.value ?? c.value;
2446
+ }), R([r.containerSize, u], () => {
2413
2447
  r.containerSize.width && r.containerSize.height && me();
2414
- }), H(
2448
+ }), R(
2415
2449
  () => [o.value.alignFirstNodeLabels, o.value.alignLastNodeLabels],
2416
2450
  me
2417
- ), H(() => r.hoveredElementId, de), { __sfc: !0, props: r, emit: e, chartID: n, data: a, options: o, nodeBlocks: l, linkPaths: i, nodeTextRefs: u, pointedNode: c, focusedNode: s, extents: f, updateExtents: m, columns: h, graph: g, isExpandableNode: _, toggleNodeExpansion: x, hoveredElement: d, highlightedElements: p, formatValue: y, isBlockExpansionTrigger: k, hoveredNodeIds: T, lastNodeLayer: N, nodeColumnPositions: A, nodeHeaders: D, computedNodeHeaderPadding: C, gradients: M, nodesDerivingColorFromIncomingLinks: z, getLinkStroke: ee, isNodeFaded: ce, isNodeFocused: ae, isLinkFaded: oe, isLinkFocused: le, isLabelBeforeNode: E, shouldDeriveNodeColorFromIncomingLinks: w, toggleExpansion: P, handleNodeClick: te, handleNodeKeydown: $e, handleNodeBlockClick: we, handleLinkMouseover: De, handleLinkMouseleave: pe, handleExternalHover: de, getSubNodesDerivingColorFromIncomingLinks: xe, updateMargins: me, LumeAlluvialNodeLabel: da, LumeAlluvialNodeValue: _a, LumeAlluvialNodeHeader: ka, GHOST_STROKE_WIDTH_OFFSET: ra, NODE_OUTLINE_PADDING: oa, NODE_OUTLINE_RADIUS: la };
2451
+ ), R(() => r.hoveredElementId, Z), { __sfc: !0, props: r, emit: e, chartID: n, data: a, options: o, nodeBlocks: l, linkPaths: i, nodeTextRefs: u, pointedNode: s, focusedNode: c, extents: d, updateExtents: _, columns: g, graph: m, isExpandableNode: h, toggleNodeExpansion: b, hoveredElement: p, highlightedElements: f, formatValue: y, isBlockExpansionTrigger: x, hoveredNodeIds: A, lastNodeLayer: E, nodeColumnPositions: B, nodeHeaders: G, computedNodeHeaderPadding: T, gradients: P, nodesDerivingColorFromIncomingLinks: j, getLinkStroke: V, isNodeFaded: K, isNodeFocused: ye, isLinkFaded: pe, isLinkFocused: ie, isLabelBeforeNode: oe, shouldDeriveNodeColorFromIncomingLinks: se, toggleExpansion: te, handleNodeClick: O, handleNodeKeydown: $, handleNodeBlockClick: w, handleLinkMouseover: W, handleLinkMouseleave: _e, handleExternalHover: Z, getSubNodesDerivingColorFromIncomingLinks: ce, updateMargins: me, LumeAlluvialNodeLabel: fa, LumeAlluvialNodeValue: ha, LumeAlluvialNodeHeader: La, GHOST_STROKE_WIDTH_OFFSET: oa, NODE_OUTLINE_PADDING: ua, NODE_OUTLINE_RADIUS: ia };
2418
2452
  }
2419
2453
  });
2420
- var eo = function() {
2454
+ var no = function() {
2421
2455
  var e = this, r = e._self._c, n = e._self._setupProxy;
2422
2456
  return r("g", { staticClass: "lume-alluvial-group", attrs: { "data-j-alluvial-group": "" } }, [n.nodeHeaders ? r("g", [e._l(n.nodeHeaders, function(a, o) {
2423
2457
  return [e._t(`node-header-${o}`, function() {
@@ -2491,15 +2525,15 @@ var eo = function() {
2491
2525
  a.node.value
2492
2526
  ) })], 2)], 2)]);
2493
2527
  })], 2);
2494
- }, to = [], no = /* @__PURE__ */ S(
2495
- qa,
2496
- eo,
2528
+ }, ro = [], ao = /* @__PURE__ */ H(
2497
2529
  to,
2530
+ no,
2531
+ ro,
2498
2532
  !1,
2499
2533
  null,
2500
2534
  "0f56c6f5"
2501
2535
  );
2502
- const ro = no.exports, ao = {
2536
+ const oo = ao.exports, lo = {
2503
2537
  margins: {
2504
2538
  top: 0,
2505
2539
  right: 0,
@@ -2517,28 +2551,28 @@ const ro = no.exports, ao = {
2517
2551
  highlightedElements: "closest",
2518
2552
  nodePadding: 16,
2519
2553
  nodeWidth: 16,
2520
- nodeAlign: qt,
2554
+ nodeAlign: tn,
2521
2555
  nodeExpansionTrigger: "node",
2522
2556
  valueFormat: (t) => String(t),
2523
2557
  iterations: 6
2524
- }, oo = /* @__PURE__ */ R({
2558
+ }, uo = /* @__PURE__ */ S({
2525
2559
  __name: "lume-alluvial-diagram",
2526
2560
  props: {
2527
- ...or(Ke)
2561
+ ...ur(Qe)
2528
2562
  },
2529
2563
  setup(t, { emit: e }) {
2530
- const r = t, { componentEventPropagator: n } = q(e), a = se(X()), o = xn(X()), { options: l } = V(r), { allOptions: i } = Q(l, ao);
2531
- function u(c) {
2564
+ const r = t, { componentEventPropagator: n } = ae(e), a = fe(Q()), o = An(Q()), { options: l } = z(r), { allOptions: i } = re(l, lo);
2565
+ function u(s) {
2532
2566
  return {
2533
- ...c,
2567
+ ...s,
2534
2568
  noBaseScales: !0
2535
2569
  // Alluvial chart never uses base scales
2536
2570
  };
2537
2571
  }
2538
- return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, groupSlots: o, options: l, allOptions: i, getAlluvialDiagramOptions: u, LumeChart: fe, LumeAlluvialGroup: ro };
2572
+ return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, groupSlots: o, options: l, allOptions: i, getAlluvialDiagramOptions: u, LumeChart: he, LumeAlluvialGroup: oo };
2539
2573
  }
2540
2574
  });
2541
- var lo = function() {
2575
+ var io = function() {
2542
2576
  var e = this, r = e._self._c, n = e._self._setupProxy;
2543
2577
  return r(n.LumeChart, e._g(e._b({ attrs: { options: n.getAlluvialDiagramOptions(n.allOptions), "data-j-alluvial-diagram": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
2544
2578
  return [r(n.LumeAlluvialGroup, e._g(e._b({ attrs: { "hovered-element-id": e.hoveredElement }, scopedSlots: e._u([e._l(n.groupSlots, function(o, l) {
@@ -2551,100 +2585,100 @@ var lo = function() {
2551
2585
  return [e._t(o, null, null, l || {})];
2552
2586
  } };
2553
2587
  })], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
2554
- }, uo = [], io = /* @__PURE__ */ S(
2555
- oo,
2556
- lo,
2588
+ }, so = [], co = /* @__PURE__ */ H(
2557
2589
  uo,
2590
+ io,
2591
+ so,
2558
2592
  !1,
2559
2593
  null,
2560
2594
  null
2561
2595
  );
2562
- const xl = io.exports;
2563
- var Ye = /* @__PURE__ */ ((t) => (t.grouped = "grouped", t.stacked = "stacked", t))(Ye || {});
2564
- const so = /* @__PURE__ */ R({
2596
+ const Al = co.exports;
2597
+ var Je = /* @__PURE__ */ ((t) => (t.grouped = "grouped", t.stacked = "stacked", t))(Je || {});
2598
+ const vo = /* @__PURE__ */ S({
2565
2599
  __name: "lume-bar-chart",
2566
2600
  props: {
2567
- ...ve(),
2601
+ ...ge(),
2568
2602
  type: {
2569
2603
  type: String,
2570
2604
  default: null,
2571
- validator: (t) => t in Ye || t == null
2605
+ validator: (t) => t in Je || t == null
2572
2606
  }
2573
2607
  },
2574
2608
  setup(t, { emit: e }) {
2575
- const r = t, n = Re(
2576
- () => import("./Bq_jPnF9.js")
2577
- ), a = Re(
2578
- () => import("./CduLx8z6.js")
2579
- ), o = Re(
2580
- () => import("./C0MIMWja.js")
2609
+ const r = t, n = Ce(
2610
+ () => import("./CQvJ9XFA.js")
2611
+ ), a = Ce(
2612
+ () => import("./191jEFi1.js")
2613
+ ), o = Ce(
2614
+ () => import("./7K7lDbsA.js")
2581
2615
  ), l = /* @__PURE__ */ new Map([
2582
2616
  ["single", n],
2583
2617
  ["grouped", a],
2584
2618
  ["stacked", o]
2585
- ]), { componentEventPropagator: i } = q(e), u = se(X());
2586
- function c(f) {
2619
+ ]), { componentEventPropagator: i } = ae(e), u = fe(Q());
2620
+ function s(d) {
2587
2621
  return {
2588
- ...f,
2622
+ ...d,
2589
2623
  startOnZero: !0,
2590
2624
  // Bar chart always starts on zero,
2591
2625
  tooltipOptions: {
2592
- ...(f == null ? void 0 : f.tooltipOptions) || {},
2593
- position: r.orientation === O.HORIZONTAL ? "right" : void 0
2626
+ ...(d == null ? void 0 : d.tooltipOptions) || {},
2627
+ position: r.orientation === I.HORIZONTAL ? "right" : void 0
2594
2628
  }
2595
2629
  };
2596
2630
  }
2597
- const s = v(() => {
2598
- if (Ke(r.data)) return l.get("single");
2631
+ const c = v(() => {
2632
+ if (Qe(r.data)) return l.get("single");
2599
2633
  if (!r.type)
2600
2634
  throw new Error("Bar chart needs a type when there's multiple datasets.");
2601
2635
  return l.get(r.type);
2602
2636
  });
2603
- return { __sfc: !0, TYPES: Ye, LumeSingleBarChart: n, LumeGroupedBarChart: a, LumeStackedBarChart: o, COMPONENT_MAP: l, props: r, emit: e, componentEventPropagator: i, slots: u, getBarChartOptions: c, component: s };
2637
+ return { __sfc: !0, TYPES: Je, LumeSingleBarChart: n, LumeGroupedBarChart: a, LumeStackedBarChart: o, COMPONENT_MAP: l, props: r, emit: e, componentEventPropagator: i, slots: u, getBarChartOptions: s, component: c };
2604
2638
  }
2605
2639
  });
2606
- var co = function() {
2640
+ var fo = function() {
2607
2641
  var e = this, r = e._self._c, n = e._self._setupProxy;
2608
2642
  return r(n.component, e._g(e._b({ tag: "component", attrs: { options: n.getBarChartOptions(e.options) }, scopedSlots: e._u([e._l(n.slots, function(a, o) {
2609
2643
  return { key: o, fn: function(l) {
2610
2644
  return [e._t(o, null, null, l || {})];
2611
2645
  } };
2612
2646
  })], null, !0) }, "component", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
2613
- }, vo = [], fo = /* @__PURE__ */ S(
2614
- so,
2615
- co,
2647
+ }, po = [], _o = /* @__PURE__ */ H(
2616
2648
  vo,
2649
+ fo,
2650
+ po,
2617
2651
  !1,
2618
2652
  null,
2619
2653
  null
2620
2654
  );
2621
- const Ll = fo.exports;
2622
- function po(t) {
2623
- return Object.values(On).includes(t) || t == null;
2624
- }
2655
+ const Tl = _o.exports;
2625
2656
  function mo(t) {
2626
- return Object.values(O).includes(t);
2657
+ return Object.values(Nn).includes(t) || t == null;
2658
+ }
2659
+ function go(t) {
2660
+ return Object.values(I).includes(t);
2627
2661
  }
2628
- const _o = (t = !1) => ({
2662
+ const ho = (t = !1) => ({
2629
2663
  type: {
2630
2664
  type: String,
2631
2665
  default: null,
2632
- validator: po
2666
+ validator: mo
2633
2667
  },
2634
2668
  ...t ? {
2635
2669
  orientation: {
2636
2670
  type: String,
2637
- default: O.VERTICAL,
2638
- validator: mo
2671
+ default: I.VERTICAL,
2672
+ validator: go
2639
2673
  }
2640
2674
  } : {}
2641
2675
  });
2642
- function Zt(t, e) {
2676
+ function Yt(t, e) {
2643
2677
  const r = v(() => t.value.map((a) => {
2644
2678
  var o;
2645
2679
  return {
2646
2680
  ...a,
2647
- values: Je(
2681
+ values: qe(
2648
2682
  a.values,
2649
2683
  ((o = e == null ? void 0 : e.value) == null ? void 0 : o.length) ?? 0
2650
2684
  ).map((l) => ({
@@ -2660,194 +2694,194 @@ function Zt(t, e) {
2660
2694
  });
2661
2695
  return { multiBarData: r, groupedData: n };
2662
2696
  }
2663
- function go(t, e) {
2697
+ function yo(t, e) {
2664
2698
  return t.value.length === 1 ? "single" : e.value;
2665
2699
  }
2666
- function ho(t, e, r) {
2700
+ function bo(t, e, r) {
2667
2701
  const n = v(
2668
- () => r.value === O.HORIZONTAL
2702
+ () => r.value === I.HORIZONTAL
2669
2703
  );
2670
2704
  function a(i) {
2671
- i || Ue(Ae.BarScaleNull), Math.min(...i.domain()) > 0 && Ue(Ae.BarScaleDomainAbove0);
2705
+ i || Xe($e.BarScaleNull), Math.min(...i.domain()) > 0 && Xe($e.BarScaleDomainAbove0);
2672
2706
  }
2673
2707
  const o = v(() => n.value ? (a(t.value), t.value) : t.value), l = v(() => n.value ? e.value : (a(e.value), e.value));
2674
2708
  return { barXScale: o, barYScale: l };
2675
2709
  }
2676
- const yo = {
2710
+ const ko = {
2677
2711
  x: 0,
2678
2712
  y: 0,
2679
2713
  width: 0,
2680
2714
  height: 0
2681
2715
  };
2682
- function bo(t, e, r, n, a, o) {
2716
+ function xo(t, e, r, n, a, o) {
2683
2717
  const l = v(
2684
- () => n.value === O.HORIZONTAL
2718
+ () => n.value === I.HORIZONTAL
2685
2719
  );
2686
- function i(f, m) {
2687
- let h, g;
2688
- return l.value ? (h = f >= 0 ? e.value(0) : e.value(f), g = r.value(r.value.domain()[m])) : (h = e.value(e.value.domain()[m]), g = f < 0 ? r.value(0) : r.value(f)), { x: h, y: g };
2720
+ function i(d, _) {
2721
+ let g, m;
2722
+ return l.value ? (g = d >= 0 ? e.value(0) : e.value(d), m = r.value(r.value.domain()[_])) : (g = e.value(e.value.domain()[_]), m = d < 0 ? r.value(0) : r.value(d)), { x: g, y: m };
2689
2723
  }
2690
- function u(f) {
2691
- return l.value ? f < 0 ? e.value(0) - e.value(f) : e.value(f) - e.value(0) : e.value.bandwidth();
2724
+ function u(d) {
2725
+ return l.value ? d < 0 ? e.value(0) - e.value(d) : e.value(d) - e.value(0) : e.value.bandwidth();
2692
2726
  }
2693
- function c(f) {
2694
- return l.value ? r.value.bandwidth() : f < 0 ? r.value(f) - r.value(0) : r.value(0) - r.value(f);
2727
+ function s(d) {
2728
+ return l.value ? r.value.bandwidth() : d < 0 ? r.value(d) - r.value(0) : r.value(0) - r.value(d);
2695
2729
  }
2696
- function s(f, m, h) {
2697
- if (!(e.value && r.value)) return yo;
2698
- const { value: _, color: x } = f, d = x ?? t.value[m].color ?? ke, { x: p, y } = i(_, h), k = u(_), T = c(_);
2730
+ function c(d, _, g) {
2731
+ if (!(e.value && r.value)) return ko;
2732
+ const { value: h, color: b } = d, p = b ?? t.value[_].color ?? Te, { x: f, y } = i(h, g), x = u(h), A = s(h);
2699
2733
  return {
2700
- classList: [`lume-fill--${d}`, ...o],
2701
- x: p,
2734
+ classList: [`lume-fill--${p}`, ...o],
2735
+ x: f,
2702
2736
  y,
2703
- width: k,
2704
- height: T,
2705
- isFaded: a.value !== -1 && a.value !== h,
2706
- isNegative: _ < 0
2737
+ width: x,
2738
+ height: A,
2739
+ isFaded: a.value !== -1 && a.value !== g,
2740
+ isNegative: h < 0
2707
2741
  };
2708
2742
  }
2709
- return { barAttributeGenerator: s };
2743
+ return { barAttributeGenerator: c };
2710
2744
  }
2711
- const ko = {
2745
+ const Lo = {
2712
2746
  x: 0,
2713
2747
  y: 0,
2714
2748
  width: 0,
2715
2749
  height: 0
2716
2750
  };
2717
- function xo(t, e, r, n, a, o) {
2751
+ function Ao(t, e, r, n, a, o) {
2718
2752
  const l = v(
2719
- () => n.value === O.HORIZONTAL
2720
- ), i = v(() => he().domain(t.value.map((g, _) => _)).range([0, e.value.bandwidth()]).padding(0)), u = v(() => he().domain(t.value.map((g, _) => _)).range([0, r.value.bandwidth()]).padding(0));
2721
- function c(g, _, x) {
2753
+ () => n.value === I.HORIZONTAL
2754
+ ), i = v(() => xe().domain(t.value.map((m, h) => h)).range([0, e.value.bandwidth()]).padding(0)), u = v(() => xe().domain(t.value.map((m, h) => h)).range([0, r.value.bandwidth()]).padding(0));
2755
+ function s(m, h, b) {
2722
2756
  if (l.value)
2723
- return g >= 0 ? e.value(0) : e.value(g);
2724
- const d = e.value.domain();
2725
- return e.value(d[_]) + i.value(x);
2757
+ return m >= 0 ? e.value(0) : e.value(m);
2758
+ const p = e.value.domain();
2759
+ return e.value(p[h]) + i.value(b);
2726
2760
  }
2727
- function s(g, _, x) {
2761
+ function c(m, h, b) {
2728
2762
  if (l.value) {
2729
- const d = r.value.domain();
2730
- return r.value(d[_]) + u.value(x);
2763
+ const p = r.value.domain();
2764
+ return r.value(p[h]) + u.value(b);
2731
2765
  }
2732
- return g < 0 ? r.value(0) : r.value(g);
2766
+ return m < 0 ? r.value(0) : r.value(m);
2733
2767
  }
2734
- function f(g) {
2735
- return l.value ? g < 0 ? e.value(0) - e.value(g) : e.value(g) - e.value(0) : i.value.bandwidth();
2768
+ function d(m) {
2769
+ return l.value ? m < 0 ? e.value(0) - e.value(m) : e.value(m) - e.value(0) : i.value.bandwidth();
2736
2770
  }
2737
- function m(g) {
2738
- return l.value ? u.value.bandwidth() : g < 0 ? r.value(g) - r.value(0) : r.value(0) - r.value(g);
2771
+ function _(m) {
2772
+ return l.value ? u.value.bandwidth() : m < 0 ? r.value(m) - r.value(0) : r.value(0) - r.value(m);
2739
2773
  }
2740
- function h(g, _, x) {
2741
- if (!(e.value && r.value)) return ko;
2742
- const { value: p, color: y } = g, k = y ?? t.value[_].color ?? Object.values(Y)[_], T = c(p, x, _), N = s(p, x, _), A = f(p), D = m(p);
2774
+ function g(m, h, b) {
2775
+ if (!(e.value && r.value)) return Lo;
2776
+ const { value: f, color: y } = m, x = y ?? t.value[h].color ?? Object.values(ee)[h], A = s(f, b, h), E = c(f, b, h), B = d(f), G = _(f);
2743
2777
  return {
2744
- classList: [`lume-fill--${k}`, ...o],
2745
- x: T,
2746
- y: N,
2747
- width: A,
2748
- height: D,
2749
- isFaded: a.value !== -1 && a.value !== x,
2750
- isNegative: p < 0
2778
+ classList: [`lume-fill--${x}`, ...o],
2779
+ x: A,
2780
+ y: E,
2781
+ width: B,
2782
+ height: G,
2783
+ isFaded: a.value !== -1 && a.value !== b,
2784
+ isNegative: f < 0
2751
2785
  };
2752
2786
  }
2753
- return { barAttributeGenerator: h };
2787
+ return { barAttributeGenerator: g };
2754
2788
  }
2755
- function Lo(t, e, r) {
2789
+ function To(t, e, r) {
2756
2790
  const n = v(
2757
- () => e.value === O.HORIZONTAL
2791
+ () => e.value === I.HORIZONTAL
2758
2792
  ), a = v(() => {
2759
2793
  const u = t.value.map(
2760
- (c) => c.filter((s) => s.value < 0).reduce((s, f) => s + f.value, 0)
2794
+ (s) => s.filter((c) => c.value < 0).reduce((c, d) => c + d.value, 0)
2761
2795
  );
2762
2796
  return Math.min(...u);
2763
2797
  }), o = v(() => {
2764
2798
  const u = t.value.map(
2765
- (c) => c.reduce(
2766
- (s, f) => f.value >= 0 ? s + f.value : s,
2799
+ (s) => s.reduce(
2800
+ (c, d) => d.value >= 0 ? c + d.value : c,
2767
2801
  0
2768
2802
  )
2769
2803
  );
2770
2804
  return Math.max(...u);
2771
2805
  });
2772
- function l(u, c, s) {
2773
- return c.length ? n.value ? ge().domain([a.value, o.value]).range([0, s.width]) : Object.assign(
2774
- mt(
2775
- he().domain(c.map((f, m) => m)).range([0, s.width]),
2806
+ function l(u, s, c) {
2807
+ return s.length ? n.value ? ke().domain([a.value, o.value]).range([0, c.width]) : Object.assign(
2808
+ gt(
2809
+ xe().domain(s.map((d, _) => _)).range([0, c.width]),
2776
2810
  e.value,
2777
2811
  r.value
2778
2812
  ),
2779
- { labels: c }
2813
+ { labels: s }
2780
2814
  ) : null;
2781
2815
  }
2782
- function i(u, c, s) {
2783
- return c.length ? n.value ? Object.assign(
2784
- mt(
2785
- he().domain(c.map((f, m) => m)).range([0, s.height]),
2816
+ function i(u, s, c) {
2817
+ return s.length ? n.value ? Object.assign(
2818
+ gt(
2819
+ xe().domain(s.map((d, _) => _)).range([0, c.height]),
2786
2820
  e.value,
2787
2821
  r.value
2788
2822
  ),
2789
- { labels: c }
2790
- ) : ge().domain([o.value, a.value]).range([0, s.height]) : null;
2823
+ { labels: s }
2824
+ ) : ke().domain([o.value, a.value]).range([0, c.height]) : null;
2791
2825
  }
2792
2826
  return { stackedXScaleGenerator: l, stackedYScaleGenerator: i };
2793
2827
  }
2794
- function To(t, e, r, n, a, o) {
2828
+ function Oo(t, e, r, n, a, o) {
2795
2829
  const l = v(
2796
- () => n.value === O.HORIZONTAL
2830
+ () => n.value === I.HORIZONTAL
2797
2831
  ), i = v(
2798
2832
  () => l.value ? r.value.domain() : e.value.domain()
2799
2833
  ), u = v(
2800
- () => t.value.map((d) => d.values.map((p) => p == null ? void 0 : p.value))
2834
+ () => t.value.map((p) => p.values.map((f) => f == null ? void 0 : f.value))
2801
2835
  );
2802
- function c(d, p, y) {
2803
- let k, T;
2804
- return l.value ? (k = e.value(d >= 0 ? 0 + y : d + y), T = r.value(i.value[p])) : (k = e.value(i.value[p]), T = r.value(d >= 0 ? d + y : 0 + y)), { x: k, y: T };
2836
+ function s(p, f, y) {
2837
+ let x, A;
2838
+ return l.value ? (x = e.value(p >= 0 ? 0 + y : p + y), A = r.value(i.value[f])) : (x = e.value(i.value[f]), A = r.value(p >= 0 ? p + y : 0 + y)), { x, y: A };
2805
2839
  }
2806
- function s(d) {
2807
- return l.value ? e.value(d) - e.value(0) : e.value.bandwidth();
2840
+ function c(p) {
2841
+ return l.value ? e.value(p) - e.value(0) : e.value.bandwidth();
2808
2842
  }
2809
- function f(d) {
2810
- return l.value ? e.value(0) - e.value(d) : e.value.bandwidth();
2843
+ function d(p) {
2844
+ return l.value ? e.value(0) - e.value(p) : e.value.bandwidth();
2811
2845
  }
2812
- function m(d) {
2813
- return l.value ? r.value.bandwidth() : r.value(0) - r.value(d);
2846
+ function _(p) {
2847
+ return l.value ? r.value.bandwidth() : r.value(0) - r.value(p);
2814
2848
  }
2815
- function h(d) {
2816
- return l.value ? r.value.bandwidth() : r.value(d) - r.value(0);
2849
+ function g(p) {
2850
+ return l.value ? r.value.bandwidth() : r.value(p) - r.value(0);
2817
2851
  }
2818
- function g(d, p) {
2819
- return d ? u.value.reduce((y, k, T) => (T < d && k[p] >= 0 && (y += k[p]), y), 0) : 0;
2852
+ function m(p, f) {
2853
+ return p ? u.value.reduce((y, x, A) => (A < p && x[f] >= 0 && (y += x[f]), y), 0) : 0;
2820
2854
  }
2821
- function _(d, p) {
2822
- return d ? u.value.reduce((y, k, T) => (T < d && k[p] < 0 && (y += k[p]), y), 0) : 0;
2855
+ function h(p, f) {
2856
+ return p ? u.value.reduce((y, x, A) => (A < p && x[f] < 0 && (y += x[f]), y), 0) : 0;
2823
2857
  }
2824
- function x(d, p, y) {
2825
- const { value: k, color: T } = d, N = k >= 0 ? s(k) : f(k), A = k >= 0 ? m(k) : h(k), D = k >= 0 ? g(p, y) : _(p, y), { x: C, y: M } = c(k, y, D);
2858
+ function b(p, f, y) {
2859
+ const { value: x, color: A } = p, E = x >= 0 ? c(x) : d(x), B = x >= 0 ? _(x) : g(x), G = x >= 0 ? m(f, y) : h(f, y), { x: T, y: P } = s(x, y, G);
2826
2860
  return {
2827
- classList: [`lume-fill--${T ?? t.value[p].color ?? Object.values(Y)[p]}`, ...o],
2828
- width: N,
2829
- height: A,
2830
- x: C,
2831
- y: M,
2861
+ classList: [`lume-fill--${A ?? t.value[f].color ?? Object.values(ee)[f]}`, ...o],
2862
+ width: E,
2863
+ height: B,
2864
+ x: T,
2865
+ y: P,
2832
2866
  isFaded: a.value !== -1 && a.value !== y,
2833
- isNegative: k < 0
2867
+ isNegative: x < 0
2834
2868
  };
2835
2869
  }
2836
- return { barAttributeGenerator: x };
2870
+ return { barAttributeGenerator: b };
2837
2871
  }
2838
- const Lt = {
2839
- single: bo,
2840
- grouped: xo,
2841
- stacked: To
2842
- }, Ao = /* @__PURE__ */ R({
2872
+ const Tt = {
2873
+ single: xo,
2874
+ grouped: Ao,
2875
+ stacked: Oo
2876
+ }, Io = /* @__PURE__ */ S({
2843
2877
  __name: "lume-bar-group",
2844
2878
  props: {
2845
- ...Ee(),
2879
+ ...He(),
2846
2880
  classList: {
2847
2881
  type: [String, Array],
2848
2882
  default: () => []
2849
2883
  },
2850
- ..._o(!0),
2884
+ ...ho(!0),
2851
2885
  transition: {
2852
2886
  type: Boolean,
2853
2887
  default: !0
@@ -2862,30 +2896,30 @@ const Lt = {
2862
2896
  transition: l,
2863
2897
  type: i,
2864
2898
  xScale: u,
2865
- yScale: c,
2866
- classList: s,
2867
- labels: f
2868
- } = V(r), m = Oe("chartID"), { emitInternalEvent: h } = q(e, m), { groupedData: g } = Zt(n, f), { barXScale: _, barYScale: x } = ho(u, c, o), d = v(() => typeof s.value == "string" ? [s.value] : s.value), p = v(() => {
2869
- const T = go(n, i), { barAttributeGenerator: N } = Lt[T](
2899
+ yScale: s,
2900
+ classList: c,
2901
+ labels: d
2902
+ } = z(r), _ = we("chartID"), { emitInternalEvent: g } = ae(e, _), { groupedData: m } = Yt(n, d), { barXScale: h, barYScale: b } = bo(u, s, o), p = v(() => typeof c.value == "string" ? [c.value] : c.value), f = v(() => {
2903
+ const A = yo(n, i), { barAttributeGenerator: E } = Tt[A](
2870
2904
  n,
2871
- _,
2872
- x,
2905
+ h,
2906
+ b,
2873
2907
  o,
2874
2908
  a,
2875
- d.value
2909
+ p.value
2876
2910
  );
2877
- return N;
2911
+ return E;
2878
2912
  }), y = v(() => {
2879
2913
  if (l.value)
2880
- return o.value === O.HORIZONTAL ? "width" : "height";
2914
+ return o.value === I.HORIZONTAL ? "width" : "height";
2881
2915
  });
2882
- async function k(T) {
2883
- e("lume__internal--hover", T), h("lume__internal--hover", T);
2916
+ async function x(A) {
2917
+ e("lume__internal--hover", A), g("lume__internal--hover", A);
2884
2918
  }
2885
- return { __sfc: !0, MIXIN_MAP: Lt, props: r, emit: e, data: n, hoveredIndex: a, orientation: o, transition: l, type: i, xScale: u, yScale: c, classList: s, labels: f, chartID: m, emitInternalEvent: h, groupedData: g, barXScale: _, barYScale: x, computedClasses: d, getBarAttributes: p, computedTransition: y, handleInternalHover: k, LumeBar: Qe };
2919
+ return { __sfc: !0, MIXIN_MAP: Tt, props: r, emit: e, data: n, hoveredIndex: a, orientation: o, transition: l, type: i, xScale: u, yScale: s, classList: c, labels: d, chartID: _, emitInternalEvent: g, groupedData: m, barXScale: h, barYScale: b, computedClasses: p, getBarAttributes: f, computedTransition: y, handleInternalHover: x, LumeBar: et };
2886
2920
  }
2887
2921
  });
2888
- var Oo = function() {
2922
+ var No = function() {
2889
2923
  var e = this, r = e._self._c, n = e._self._setupProxy;
2890
2924
  return r("g", { staticClass: "lume-bar-group", attrs: { "data-j-bars-group": "" } }, e._l(n.groupedData, function(a, o) {
2891
2925
  return r("g", { key: o, on: { mouseenter: function(l) {
@@ -2900,41 +2934,41 @@ var Oo = function() {
2900
2934
  } } }, "lume-bar", n.getBarAttributes(l, i, o, a), !1));
2901
2935
  }), 1);
2902
2936
  }), 0);
2903
- }, Io = [], No = /* @__PURE__ */ S(
2904
- Ao,
2905
- Oo,
2937
+ }, Eo = [], $o = /* @__PURE__ */ H(
2906
2938
  Io,
2939
+ No,
2940
+ Eo,
2907
2941
  !1,
2908
2942
  null,
2909
2943
  null
2910
2944
  );
2911
- const ut = No.exports, Eo = {
2912
- [O.VERTICAL]: {
2945
+ const st = $o.exports, wo = {
2946
+ [I.VERTICAL]: {
2913
2947
  withTooltip: !0,
2914
2948
  xAxisOptions: {},
2915
2949
  yAxisOptions: { gridLines: !0 },
2916
- margins: ie.VERTICAL
2950
+ margins: ve.VERTICAL
2917
2951
  },
2918
- [O.HORIZONTAL]: {
2952
+ [I.HORIZONTAL]: {
2919
2953
  withTooltip: !0,
2920
2954
  xAxisOptions: { gridLines: !0 },
2921
2955
  yAxisOptions: { gridLines: !1 },
2922
- margins: ie.HORIZONTAL
2956
+ margins: ve.HORIZONTAL
2923
2957
  }
2924
- }, $o = /* @__PURE__ */ R({
2958
+ }, Do = /* @__PURE__ */ S({
2925
2959
  __name: "lume-single-bar-chart",
2926
2960
  props: {
2927
- ...ve(Ke)
2961
+ ...ge(Qe)
2928
2962
  },
2929
2963
  setup(t, { emit: e }) {
2930
- const r = t, { componentEventPropagator: n } = q(e), a = se(X()), { orientation: o, options: l } = V(r), i = v(
2931
- () => Eo[o.value || O.VERTICAL]
2964
+ const r = t, { componentEventPropagator: n } = ae(e), a = fe(Q()), { orientation: o, options: l } = z(r), i = v(
2965
+ () => wo[o.value || I.VERTICAL]
2932
2966
  // needs to be computed so that default options are reactive
2933
- ), { allOptions: u } = Q(l, i);
2934
- return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: i, allOptions: u, LumeChart: fe, LumeBarGroup: ut };
2967
+ ), { allOptions: u } = re(l, i);
2968
+ return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: i, allOptions: u, LumeChart: he, LumeBarGroup: st };
2935
2969
  }
2936
2970
  });
2937
- var wo = function() {
2971
+ var Ro = function() {
2938
2972
  var e = this, r = e._self._c, n = e._self._setupProxy;
2939
2973
  return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "single-bar", options: n.allOptions, "data-j-single-bar-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
2940
2974
  return [r(n.LumeBarGroup, e._g(e._b({ attrs: { orientation: n.orientation } }, "lume-bar-group", a, !1), n.componentEventPropagator))];
@@ -2943,45 +2977,45 @@ var wo = function() {
2943
2977
  return [e._t(o, null, null, l || {})];
2944
2978
  } };
2945
2979
  })], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
2946
- }, Do = [], Ho = /* @__PURE__ */ S(
2947
- $o,
2948
- wo,
2980
+ }, Ho = [], So = /* @__PURE__ */ H(
2949
2981
  Do,
2982
+ Ro,
2983
+ Ho,
2950
2984
  !1,
2951
2985
  null,
2952
2986
  null
2953
2987
  );
2954
- const Tl = Ho.exports, So = {
2955
- [O.VERTICAL]: {
2988
+ const Ol = So.exports, Po = {
2989
+ [I.VERTICAL]: {
2956
2990
  withTooltip: !0,
2957
2991
  xAxisOptions: {},
2958
2992
  yAxisOptions: { gridLines: !0 },
2959
- margins: ie.VERTICAL
2993
+ margins: ve.VERTICAL
2960
2994
  },
2961
- [O.HORIZONTAL]: {
2995
+ [I.HORIZONTAL]: {
2962
2996
  withTooltip: !0,
2963
2997
  xAxisOptions: { gridLines: !0 },
2964
2998
  yAxisOptions: { gridLines: !1 },
2965
- margins: ie.HORIZONTAL,
2999
+ margins: ve.HORIZONTAL,
2966
3000
  tooltipOptions: { position: "right" }
2967
3001
  }
2968
- }, Po = /* @__PURE__ */ R({
3002
+ }, Bo = /* @__PURE__ */ S({
2969
3003
  __name: "lume-grouped-bar-chart",
2970
3004
  props: {
2971
- ...ve()
3005
+ ...ge()
2972
3006
  },
2973
3007
  setup(t, { emit: e }) {
2974
- const r = t, { componentEventPropagator: n } = q(e), a = se(X()), { orientation: o, options: l } = V(r), i = v(
2975
- () => So[o.value || O.VERTICAL]
3008
+ const r = t, { componentEventPropagator: n } = ae(e), a = fe(Q()), { orientation: o, options: l } = z(r), i = v(
3009
+ () => Po[o.value || I.VERTICAL]
2976
3010
  // needs to be computed so that default options are reactive
2977
- ), { allOptions: u } = Q(
3011
+ ), { allOptions: u } = re(
2978
3012
  l,
2979
3013
  i
2980
3014
  );
2981
- return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: i, allOptions: u, LumeChart: fe, LumeBarGroup: ut };
3015
+ return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: i, allOptions: u, LumeChart: he, LumeBarGroup: st };
2982
3016
  }
2983
3017
  });
2984
- var Ro = function() {
3018
+ var Co = function() {
2985
3019
  var e = this, r = e._self._c, n = e._self._setupProxy;
2986
3020
  return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "grouped-bar", options: n.allOptions, "data-j-grouped-bar-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
2987
3021
  return [r(n.LumeBarGroup, e._g(e._b({ attrs: { type: "grouped" } }, "lume-bar-group", a, !1), n.componentEventPropagator))];
@@ -2990,50 +3024,50 @@ var Ro = function() {
2990
3024
  return [e._t(o, null, null, l || {})];
2991
3025
  } };
2992
3026
  })], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
2993
- }, Bo = [], Co = /* @__PURE__ */ S(
2994
- Po,
2995
- Ro,
3027
+ }, Fo = [], Go = /* @__PURE__ */ H(
2996
3028
  Bo,
3029
+ Co,
3030
+ Fo,
2997
3031
  !1,
2998
3032
  null,
2999
3033
  null
3000
3034
  );
3001
- const Al = Co.exports, Fo = {
3002
- [O.VERTICAL]: {
3035
+ const Il = Go.exports, jo = {
3036
+ [I.VERTICAL]: {
3003
3037
  withTooltip: !0,
3004
3038
  xAxisOptions: {},
3005
3039
  yAxisOptions: { gridLines: !0 },
3006
- margins: ie.VERTICAL,
3040
+ margins: ve.VERTICAL,
3007
3041
  tooltipOptions: { inverse: !0 }
3008
3042
  },
3009
- [O.HORIZONTAL]: {
3043
+ [I.HORIZONTAL]: {
3010
3044
  withTooltip: !0,
3011
3045
  xAxisOptions: { gridLines: !0 },
3012
3046
  yAxisOptions: { gridLines: !1 },
3013
- margins: ie.HORIZONTAL,
3047
+ margins: ve.HORIZONTAL,
3014
3048
  tooltipOptions: { position: "right" }
3015
3049
  }
3016
- }, Go = /* @__PURE__ */ R({
3050
+ }, Vo = /* @__PURE__ */ S({
3017
3051
  __name: "lume-stacked-bar-chart",
3018
3052
  props: {
3019
- ...ve()
3053
+ ...ge()
3020
3054
  },
3021
3055
  setup(t, { emit: e }) {
3022
- const r = t, { componentEventPropagator: n } = q(e), a = se(X()), { data: o, orientation: l, options: i, labels: u } = V(r), c = v(
3023
- () => Fo[l.value || O.VERTICAL]
3056
+ const r = t, { componentEventPropagator: n } = ae(e), a = fe(Q()), { data: o, orientation: l, options: i, labels: u } = z(r), s = v(
3057
+ () => jo[l.value || I.VERTICAL]
3024
3058
  // needs to be computed so that default options are reactive
3025
- ), { allOptions: s } = Q(
3059
+ ), { allOptions: c } = re(
3026
3060
  i,
3027
- c
3028
- ), { internalData: f } = rt(o), { groupedData: m } = Zt(f, u), { stackedXScaleGenerator: h, stackedYScaleGenerator: g } = Lo(
3029
- m,
3061
+ s
3062
+ ), { internalData: d } = ot(o), { groupedData: _ } = Yt(d, u), { stackedXScaleGenerator: g, stackedYScaleGenerator: m } = To(
3063
+ _,
3030
3064
  l,
3031
3065
  i
3032
- ), _ = v(() => r.xScale || h), x = v(() => r.yScale || g);
3033
- return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, data: o, orientation: l, options: i, labels: u, baseOptions: c, allOptions: s, internalData: f, groupedData: m, stackedXScaleGenerator: h, stackedYScaleGenerator: g, xScale: _, yScale: x, LumeChart: fe, LumeBarGroup: ut };
3066
+ ), h = v(() => r.xScale || g), b = v(() => r.yScale || m);
3067
+ return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, data: o, orientation: l, options: i, labels: u, baseOptions: s, allOptions: c, internalData: d, groupedData: _, stackedXScaleGenerator: g, stackedYScaleGenerator: m, xScale: h, yScale: b, LumeChart: he, LumeBarGroup: st };
3034
3068
  }
3035
3069
  });
3036
- var jo = function() {
3070
+ var Mo = function() {
3037
3071
  var e = this, r = e._self._c, n = e._self._setupProxy;
3038
3072
  return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "stacked-bar", options: n.allOptions, "x-scale": n.xScale, "y-scale": n.yScale, "data-j-stacked-bar-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
3039
3073
  return [r(n.LumeBarGroup, e._g(e._b({ attrs: { type: "stacked" } }, "lume-bar-group", a, !1), n.componentEventPropagator))];
@@ -3042,15 +3076,15 @@ var jo = function() {
3042
3076
  return [e._t(o, null, null, l || {})];
3043
3077
  } };
3044
3078
  })], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
3045
- }, Vo = [], Mo = /* @__PURE__ */ S(
3046
- Go,
3047
- jo,
3079
+ }, zo = [], Wo = /* @__PURE__ */ H(
3048
3080
  Vo,
3081
+ Mo,
3082
+ zo,
3049
3083
  !1,
3050
3084
  null,
3051
3085
  null
3052
3086
  );
3053
- const Ol = Mo.exports, Tt = 2, zo = /* @__PURE__ */ R({
3087
+ const Nl = Wo.exports, Ot = 2, Uo = /* @__PURE__ */ S({
3054
3088
  __name: "lume-line",
3055
3089
  props: {
3056
3090
  pathDefinition: {
@@ -3059,11 +3093,11 @@ const Ol = Mo.exports, Tt = 2, zo = /* @__PURE__ */ R({
3059
3093
  },
3060
3094
  width: {
3061
3095
  type: Number,
3062
- default: Tt
3096
+ default: Ot
3063
3097
  },
3064
3098
  color: {
3065
3099
  type: String,
3066
- default: Y.Skyblue
3100
+ default: ee.Skyblue
3067
3101
  },
3068
3102
  dashed: {
3069
3103
  type: Boolean,
@@ -3084,11 +3118,11 @@ const Ol = Mo.exports, Tt = 2, zo = /* @__PURE__ */ R({
3084
3118
  },
3085
3119
  emits: ["click"],
3086
3120
  setup(t, { emit: e }) {
3087
- const r = I(null);
3088
- return re(() => Ne(r.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: Tt, emit: e, root: r };
3121
+ const r = N(null);
3122
+ return ue(() => Re(r.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: Ot, emit: e, root: r };
3089
3123
  }
3090
3124
  });
3091
- var Wo = function() {
3125
+ var Zo = function() {
3092
3126
  var e = this, r = e._self._c, n = e._self._setupProxy;
3093
3127
  return r("path", { ref: "root", staticClass: "lume-line", class: {
3094
3128
  [`lume-stroke--${e.color}`]: !0,
@@ -3100,31 +3134,31 @@ var Wo = function() {
3100
3134
  }, attrs: { d: e.pathDefinition, "stroke-width": e.width, "data-j-line": "" }, on: { click: function(a) {
3101
3135
  return n.emit("click", a);
3102
3136
  } } });
3103
- }, Uo = [], Zo = /* @__PURE__ */ S(
3104
- zo,
3105
- Wo,
3137
+ }, Xo = [], Yo = /* @__PURE__ */ H(
3106
3138
  Uo,
3139
+ Zo,
3140
+ Xo,
3107
3141
  !1,
3108
3142
  null,
3109
3143
  "59449838"
3110
3144
  );
3111
- const Xo = Zo.exports, At = 4, Ot = 3, Yo = /* @__PURE__ */ R({
3145
+ const Ko = Yo.exports, It = 4, Nt = 3, Jo = /* @__PURE__ */ S({
3112
3146
  __name: "lume-point",
3113
3147
  props: {
3114
3148
  x: null,
3115
3149
  y: null,
3116
- color: { default: Y.Skyblue },
3117
- radius: { default: At },
3150
+ color: { default: ee.Skyblue },
3151
+ radius: { default: It },
3118
3152
  active: { type: Boolean, default: !1 },
3119
3153
  visible: { type: Boolean, default: !1 }
3120
3154
  },
3121
3155
  emits: ["click"],
3122
3156
  setup(t, { emit: e }) {
3123
- const r = t, n = I(null), a = v(() => r.radius / 2), o = v(() => r.active ? r.radius : r.visible ? Ot : 0);
3124
- return re(() => Ne(n.value)), { __sfc: !0, DEFAULT_RADIUS: At, DEFAULT_VISIBLE_RADIUS: Ot, props: r, emit: e, root: n, strokeWidth: a, computedRadius: o };
3157
+ const r = t, n = N(null), a = v(() => r.radius / 2), o = v(() => r.active ? r.radius : r.visible ? Nt : 0);
3158
+ return ue(() => Re(n.value)), { __sfc: !0, DEFAULT_RADIUS: It, DEFAULT_VISIBLE_RADIUS: Nt, props: r, emit: e, root: n, strokeWidth: a, computedRadius: o };
3125
3159
  }
3126
3160
  });
3127
- var Ko = function() {
3161
+ var Qo = function() {
3128
3162
  var e = this, r = e._self._c, n = e._self._setupProxy;
3129
3163
  return r("circle", { ref: "root", staticClass: "lume-point", class: {
3130
3164
  [`lume-stroke--${e.color}`]: !0,
@@ -3133,28 +3167,28 @@ var Ko = function() {
3133
3167
  }, attrs: { cx: e.x, cy: e.y, r: n.computedRadius, "stroke-width": n.strokeWidth, "data-j-point": "" }, on: { click: function(a) {
3134
3168
  return n.emit("click", a);
3135
3169
  } } });
3136
- }, Jo = [], Qo = /* @__PURE__ */ S(
3137
- Yo,
3138
- Ko,
3170
+ }, qo = [], el = /* @__PURE__ */ H(
3139
3171
  Jo,
3172
+ Qo,
3173
+ qo,
3140
3174
  !1,
3141
3175
  null,
3142
3176
  "080270c0"
3143
3177
  );
3144
- const qo = Qo.exports;
3145
- function Xt(t, e) {
3178
+ const tl = el.exports;
3179
+ function Kt(t, e) {
3146
3180
  function r(l) {
3147
3181
  let i = null;
3148
- return l == null ? void 0 : l.reduce((u, c, s) => (c == null || c.value == null ? (i ? i.push(s) : i = [s], s === (l == null ? void 0 : l.length) - 1 && u.push(i)) : i && (u.push(i), i = null), u), []);
3182
+ return l == null ? void 0 : l.reduce((u, s, c) => (s == null || s.value == null ? (i ? i.push(c) : i = [c], c === (l == null ? void 0 : l.length) - 1 && u.push(i)) : i && (u.push(i), i = null), u), []);
3149
3183
  }
3150
- function n(l, i, u, c) {
3151
- const m = Math.abs(l - i) / (u + 1) * (c + 1);
3152
- return l == null && i == null ? null : l > i ? l - m : l + m;
3184
+ function n(l, i, u, s) {
3185
+ const _ = Math.abs(l - i) / (u + 1) * (s + 1);
3186
+ return l == null && i == null ? null : l > i ? l - _ : l + _;
3153
3187
  }
3154
3188
  function a(l) {
3155
3189
  return function(u) {
3156
3190
  return !!l.find(
3157
- (c) => c.includes(u) || c.includes(u - 1)
3191
+ (s) => s.includes(u) || s.includes(u - 1)
3158
3192
  );
3159
3193
  };
3160
3194
  }
@@ -3164,26 +3198,26 @@ function Xt(t, e) {
3164
3198
  return {
3165
3199
  ...l,
3166
3200
  isDashed: a(i),
3167
- values: l.values.map((u, c) => {
3168
- var f, m, h, g;
3169
- const s = i.find(
3170
- (_) => _.includes(c)
3201
+ values: l.values.map((u, s) => {
3202
+ var d, _, g, m;
3203
+ const c = i.find(
3204
+ (h) => h.includes(s)
3171
3205
  );
3172
- if (s) {
3173
- const _ = s[0] - 1, x = s[s.length - 1] + 1;
3174
- let d = (f = l.values[_]) == null ? void 0 : f.value, p = (m = l.values[x]) == null ? void 0 : m.value;
3175
- if (d == null) {
3176
- const y = (g = (h = e == null ? void 0 : e.value) == null ? void 0 : h.domain) == null ? void 0 : g.call(h);
3177
- d = (y == null ? void 0 : y[1]) ?? 0, p = d;
3178
- } else p == null && (p = d);
3206
+ if (c) {
3207
+ const h = c[0] - 1, b = c[c.length - 1] + 1;
3208
+ let p = (d = l.values[h]) == null ? void 0 : d.value, f = (_ = l.values[b]) == null ? void 0 : _.value;
3209
+ if (p == null) {
3210
+ const y = (m = (g = e == null ? void 0 : e.value) == null ? void 0 : g.domain) == null ? void 0 : m.call(g);
3211
+ p = (y == null ? void 0 : y[1]) ?? 0, f = p;
3212
+ } else f == null && (f = p);
3179
3213
  return {
3180
3214
  value: n(
3181
- d,
3182
3215
  p,
3183
- s.length,
3184
- s.indexOf(c)
3216
+ f,
3217
+ c.length,
3218
+ c.indexOf(s)
3185
3219
  ),
3186
- label: Pt,
3220
+ label: Bt,
3187
3221
  isNull: !0
3188
3222
  };
3189
3223
  }
@@ -3193,23 +3227,23 @@ function Xt(t, e) {
3193
3227
  })
3194
3228
  ) };
3195
3229
  }
3196
- function el(t, e) {
3230
+ function nl(t, e) {
3197
3231
  const r = t.bandwidth() / 2;
3198
3232
  return (n, a) => t(t.domain()[e + (a - 1)]) + r;
3199
3233
  }
3200
- function tl(t, e) {
3234
+ function rl(t, e) {
3201
3235
  return (r, n) => t(e + (n - 1));
3202
3236
  }
3203
- function nl(t, e, r, n) {
3204
- const a = rn().x(
3205
- K(r) ? el(r, t) : tl(r, t)
3237
+ function al(t, e, r, n) {
3238
+ const a = on().x(
3239
+ q(r) ? nl(r, t) : rl(r, t)
3206
3240
  ).y((o) => n(o));
3207
3241
  return e.every((o) => o == null) ? null : a(e);
3208
3242
  }
3209
- const It = 1, rl = /* @__PURE__ */ R({
3243
+ const Et = 1, ol = /* @__PURE__ */ S({
3210
3244
  __name: "lume-line-group",
3211
3245
  props: {
3212
- ...Ee(),
3246
+ ...He(),
3213
3247
  withPoints: {
3214
3248
  type: [Boolean, String],
3215
3249
  default: !0
@@ -3221,124 +3255,133 @@ const It = 1, rl = /* @__PURE__ */ R({
3221
3255
  },
3222
3256
  emits: ["line-click", "point-click", "lume__internal--hover"],
3223
3257
  setup(t, { emit: e }) {
3224
- const r = t, { data: n, options: a, xScale: o, yScale: l, labels: i } = V(r), u = Oe(
3258
+ const r = t, { data: n, options: a, xScale: o, yScale: l, labels: i } = z(r), u = we(
3225
3259
  "tooltipAnchorAttributes",
3226
3260
  null
3227
- ), { updateTooltipAnchorAttributes: c } = jt(
3261
+ ), { updateTooltipAnchorAttributes: s } = Mt(
3228
3262
  u,
3229
3263
  a,
3230
3264
  o,
3231
3265
  l,
3232
3266
  i
3233
- ), s = v(() => {
3234
- if (n.value.every((D) => D.isDashed))
3267
+ ), c = v(() => {
3268
+ if (n.value.every((P) => P.isDashed))
3235
3269
  return n.value;
3236
- const { computedLineData: A } = Xt(
3270
+ const { computedLineData: T } = Kt(
3237
3271
  n,
3238
3272
  l
3239
3273
  );
3240
- return a.value.withTooltip !== !1 && (u != null && u.value) && c(A.value), A.value;
3241
- }), f = v(() => {
3274
+ return a.value.withTooltip !== !1 && (u != null && u.value) && s(T.value), T.value;
3275
+ }), d = v(() => {
3242
3276
  if (r.hoveredIndex === -1) return;
3243
- const A = hn(
3244
- s.value,
3277
+ const T = bn(
3278
+ c.value,
3245
3279
  r.hoveredIndex
3246
3280
  );
3247
3281
  return {
3248
- d: `M ${je(o.value, r.hoveredIndex)},${l.value.range()[1]}
3249
- V ${l.value(A)}`
3282
+ d: `M ${Me(o.value, r.hoveredIndex)},${l.value.range()[1]}
3283
+ V ${l.value(T)}`
3250
3284
  // Move to X index, Vertical line to the highest point
3251
3285
  };
3252
- }), m = v(
3253
- () => o.value && It / (yn(o.value) - 1)
3286
+ }), _ = v(
3287
+ () => o.value && Et / (kn(o.value) - 1)
3254
3288
  // Subtracting the first line (read below)
3255
- ), h = v(
3289
+ ), g = v(
3256
3290
  () => {
3257
- var A;
3258
- return ((A = a.value) == null ? void 0 : A.lineWidth) * 2 || void 0;
3291
+ var T;
3292
+ return ((T = a.value) == null ? void 0 : T.lineWidth) * 2 || void 0;
3259
3293
  }
3260
3294
  // If no `lineWidth`, returns NaN which needs to be undefined
3261
- ), g = v(
3295
+ ), m = v(
3262
3296
  () => o.value.bandwidth() / 2
3263
- ), _ = v(() => o.value.domain()), x = v(
3297
+ ), h = v(() => o.value.domain()), b = v(
3264
3298
  () => a.value.withPoints ?? r.withPoints
3265
- ), d = v(
3299
+ ), p = v(
3266
3300
  () => a.value.withPoints === "visible" || r.withPoints === "visible"
3267
3301
  );
3268
- function p(A) {
3269
- return s.value[A].values;
3270
- }
3271
- function y(A, D) {
3272
- var M, z;
3273
- const C = A === 0 ? [] : [
3274
- (M = p(D)[A - 1]) == null ? void 0 : M.value,
3275
- (z = p(D)[A]) == null ? void 0 : z.value
3302
+ function f(T) {
3303
+ return c.value[T].values;
3304
+ }
3305
+ function y(T) {
3306
+ return f(T).flatMap(
3307
+ (P, j) => P.isNull ? [] : [j]
3308
+ );
3309
+ }
3310
+ function x(T, P) {
3311
+ var j;
3312
+ return ((j = f(P)[T]) == null ? void 0 : j.color) ?? c.value[P].color;
3313
+ }
3314
+ function A(T, P) {
3315
+ var V, K;
3316
+ const j = T === 0 ? [] : [
3317
+ (V = f(P)[T - 1]) == null ? void 0 : V.value,
3318
+ (K = f(P)[T]) == null ? void 0 : K.value
3276
3319
  ];
3277
- return nl(
3278
- A,
3279
- C,
3320
+ return al(
3321
+ T,
3322
+ j,
3280
3323
  o.value,
3281
3324
  l.value
3282
3325
  ) || "";
3283
3326
  }
3284
- function k(A) {
3327
+ function E(T) {
3285
3328
  return {
3286
- animationDelay: A < 2 ? 0 : (A - 1) * m.value,
3287
- animationDuration: m.value
3329
+ animationDelay: T < 2 ? 0 : (T - 1) * _.value,
3330
+ animationDuration: _.value
3288
3331
  };
3289
3332
  }
3290
- function T(A, D) {
3291
- var M;
3292
- const C = (M = p(D)[A]) == null ? void 0 : M.value;
3333
+ function B(T, P) {
3334
+ var V;
3335
+ const j = (V = f(P)[T]) == null ? void 0 : V.value;
3293
3336
  return {
3294
- x: K(o.value) ? r.xScale(_.value[A]) + g.value : r.xScale(A),
3295
- y: C === null ? l.value(l.value.domain()[1]) : l.value(C)
3337
+ x: q(o.value) ? r.xScale(h.value[T]) + m.value : r.xScale(T),
3338
+ y: j === null ? l.value(l.value.domain()[1]) : l.value(j)
3296
3339
  };
3297
3340
  }
3298
- function N(A) {
3299
- return r.hoveredIndex === A;
3341
+ function G(T) {
3342
+ return r.hoveredIndex === T;
3300
3343
  }
3301
- return { __sfc: !0, LUME_TRANSITION_TIME_FULL: It, props: r, emit: e, data: n, options: a, xScale: o, yScale: l, labels: i, tooltipAnchorAttributes: u, updateTooltipAnchorAttributes: c, computedGroupData: s, overlayLineAttributes: f, animationDuration: m, pointRadius: h, xAxisOffset: g, domain: _, computedWithPoints: x, computedVisiblePoints: d, getValuesFromDataset: p, getPathDefinition: y, getLineTransitionParams: k, getPointPosition: T, isPointActive: N, LumeLine: Xo, LumePoint: qo };
3344
+ return { __sfc: !0, LUME_TRANSITION_TIME_FULL: Et, props: r, emit: e, data: n, options: a, xScale: o, yScale: l, labels: i, tooltipAnchorAttributes: u, updateTooltipAnchorAttributes: s, computedGroupData: c, overlayLineAttributes: d, animationDuration: _, pointRadius: g, xAxisOffset: m, domain: h, computedWithPoints: b, computedVisiblePoints: p, getValuesFromDataset: f, getNonNullIndexes: y, getColor: x, getPathDefinition: A, getLineTransitionParams: E, getPointPosition: B, isPointActive: G, LumeLine: Ko, LumePoint: tl };
3302
3345
  }
3303
3346
  });
3304
- var al = function() {
3347
+ var ll = function() {
3305
3348
  var e = this, r = e._self._c, n = e._self._setupProxy;
3306
3349
  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) {
3307
3350
  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) {
3308
- return r(n.LumeLine, e._b({ key: `line-${i}`, attrs: { color: a.color, dashed: a.isDashed(i), "path-definition": n.getPathDefinition(i, o), transition: e.transition, width: n.options.lineWidth }, on: { click: function(u) {
3351
+ return r(n.LumeLine, e._b({ key: `line-${i}`, attrs: { color: n.getColor(i, o), dashed: a.isDashed(i), "path-definition": n.getPathDefinition(i, o), transition: e.transition, width: n.options.lineWidth }, on: { click: function(u) {
3309
3352
  return n.emit("line-click", { index: i, datasetIndex: o, event: u });
3310
3353
  } } }, "lume-line", n.getLineTransitionParams(i), !1));
3311
- }), 1), n.computedWithPoints ? r("g", { staticClass: "lume-line-group__points", attrs: { "data-j-lume-line-group__points": "" } }, [e._l(a.values, function(l, i) {
3312
- return [l.isNull ? e._e() : r(n.LumePoint, e._b({ attrs: { active: n.isPointActive(i), color: a.color, index: i, radius: n.pointRadius, visible: n.computedVisiblePoints }, on: { click: function(u) {
3313
- return n.emit("point-click", { index: i, datasetIndex: o, event: u });
3314
- } } }, "lume-point", n.getPointPosition(i, o), !1))];
3315
- })], 2) : e._e()]);
3354
+ }), 1), n.computedWithPoints ? r("g", { staticClass: "lume-line-group__points", attrs: { "data-j-lume-line-group__points": "" } }, e._l(n.getNonNullIndexes(o), function(l) {
3355
+ return r(n.LumePoint, e._b({ key: `point-${l}`, attrs: { active: n.isPointActive(l), color: n.getColor(l, o), index: l, radius: n.pointRadius, visible: n.computedVisiblePoints }, on: { click: function(i) {
3356
+ return n.emit("point-click", { index: l, datasetIndex: o, event: i });
3357
+ } } }, "lume-point", n.getPointPosition(l, o), !1));
3358
+ }), 1) : e._e()]);
3316
3359
  })], 2);
3317
- }, ol = [], ll = /* @__PURE__ */ S(
3318
- rl,
3319
- al,
3360
+ }, ul = [], il = /* @__PURE__ */ H(
3320
3361
  ol,
3362
+ ll,
3363
+ ul,
3321
3364
  !1,
3322
3365
  null,
3323
- "898c2e7a"
3366
+ "8c8a77a0"
3324
3367
  );
3325
- const Yt = ll.exports, ul = {
3326
- margins: ie.VERTICAL,
3368
+ const Jt = il.exports, sl = {
3369
+ margins: ve.VERTICAL,
3327
3370
  startOnZero: !0,
3328
3371
  withTooltip: !0,
3329
3372
  xAxisOptions: {},
3330
3373
  yAxisOptions: { gridLines: !0 }
3331
- }, il = /* @__PURE__ */ R({
3374
+ }, cl = /* @__PURE__ */ S({
3332
3375
  __name: "lume-line-chart",
3333
3376
  props: {
3334
- ...ve(null, !1)
3377
+ ...ge(null, !1)
3335
3378
  },
3336
3379
  setup(t, { emit: e }) {
3337
- const r = t, { componentEventPropagator: n } = q(e), a = se(X()), { options: o } = V(r), { allOptions: l } = Q(o, ul);
3338
- return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, options: o, allOptions: l, LumeChart: fe, LumeLineGroup: Yt };
3380
+ const r = t, { componentEventPropagator: n } = ae(e), a = fe(Q()), { options: o } = z(r), { allOptions: l } = re(o, sl);
3381
+ return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, options: o, allOptions: l, LumeChart: he, LumeLineGroup: Jt };
3339
3382
  }
3340
3383
  });
3341
- var sl = function() {
3384
+ var dl = function() {
3342
3385
  var e = this, r = e._self._c, n = e._self._setupProxy;
3343
3386
  return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "line", options: n.allOptions, "data-j-lume-line-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
3344
3387
  return [r(n.LumeLineGroup, e._g(e._b({}, "lume-line-group", a, !1), n.componentEventPropagator))];
@@ -3347,26 +3390,26 @@ var sl = function() {
3347
3390
  return [e._t(o, null, null, l || {})];
3348
3391
  } };
3349
3392
  })], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
3350
- }, cl = [], dl = /* @__PURE__ */ S(
3351
- il,
3352
- sl,
3393
+ }, vl = [], fl = /* @__PURE__ */ H(
3353
3394
  cl,
3395
+ dl,
3396
+ vl,
3354
3397
  !1,
3355
3398
  null,
3356
3399
  null
3357
3400
  );
3358
- const Il = dl.exports;
3359
- function vl(t) {
3401
+ const El = fl.exports;
3402
+ function pl(t) {
3360
3403
  return { areaPathDefinition: v(
3361
3404
  () => function(r, n) {
3362
- if (!r || !n || K(r) || K(n))
3405
+ if (!r || !n || q(r) || q(n))
3363
3406
  return;
3364
3407
  const a = t.value[0].values;
3365
- return an().x((o, l) => r(l)).y0(n(Math.min(...n.domain()))).y1((o) => n(o.value))(a);
3408
+ return ln().x((o, l) => r(l)).y0(n(Math.min(...n.domain()))).y1((o) => n(o.value))(a);
3366
3409
  }
3367
3410
  ) };
3368
3411
  }
3369
- const fl = {
3412
+ const _l = {
3370
3413
  margins: {
3371
3414
  top: 0,
3372
3415
  right: 0,
@@ -3380,38 +3423,38 @@ const fl = {
3380
3423
  tooltipOptions: {
3381
3424
  showTitle: !1
3382
3425
  }
3383
- }, pl = /* @__PURE__ */ R({
3426
+ }, ml = /* @__PURE__ */ S({
3384
3427
  __name: "lume-sparkline-chart",
3385
3428
  props: {
3386
- ...nt(null),
3387
- ...ye()
3429
+ ...at(null),
3430
+ ...Le()
3388
3431
  },
3389
3432
  setup(t, { expose: e, emit: r }) {
3390
- const n = t, { componentEventPropagator: a } = q(r), o = se(X()), { data: l, options: i } = V(n), { internalData: u } = rt(l), { allOptions: c } = Q(i, fl), { computedLineData: s } = Xt(u), { areaPathDefinition: f } = vl(s), m = v(() => {
3391
- var x, d;
3392
- return (d = (x = u.value) == null ? void 0 : x[0]) == null ? void 0 : d.color;
3393
- }), h = v(
3433
+ const n = t, { componentEventPropagator: a } = ae(r), o = fe(Q()), { data: l, options: i } = z(n), { internalData: u } = ot(l), { allOptions: s } = re(i, _l), { computedLineData: c } = Kt(u), { areaPathDefinition: d } = pl(c), _ = v(() => {
3434
+ var b, p;
3435
+ return (p = (b = u.value) == null ? void 0 : b[0]) == null ? void 0 : p.color;
3436
+ }), g = v(
3394
3437
  () => {
3395
- var x, d;
3396
- return ((d = (x = l.value) == null ? void 0 : x[0]) == null ? void 0 : d.areaColor) || m.value;
3438
+ var b, p;
3439
+ return ((p = (b = l.value) == null ? void 0 : b[0]) == null ? void 0 : p.areaColor) || _.value;
3397
3440
  }
3398
3441
  );
3399
- function g(x) {
3442
+ function m(b) {
3400
3443
  return {
3401
- ...x,
3444
+ ...b,
3402
3445
  noMinSize: !0
3403
3446
  };
3404
3447
  }
3405
- function _(x, d, p) {
3406
- if (x.length)
3407
- return ge().range([0, p.width]).domain([0, x[0].values.length - 1]);
3448
+ function h(b, p, f) {
3449
+ if (b.length)
3450
+ return ke().range([0, f.width]).domain([0, b[0].values.length - 1]);
3408
3451
  }
3409
3452
  return e({
3410
- areaPathDefinition: f
3411
- }), { __sfc: !0, props: n, emit: r, componentEventPropagator: a, slots: o, data: l, options: i, internalData: u, allOptions: c, computedLineData: s, areaPathDefinition: f, computedColor: m, areaColor: h, getSparklineOptions: g, xScaleGenerator: _, LumeChart: fe, LumeLineGroup: Yt };
3453
+ areaPathDefinition: d
3454
+ }), { __sfc: !0, props: n, emit: r, componentEventPropagator: a, slots: o, data: l, options: i, internalData: u, allOptions: s, computedLineData: c, areaPathDefinition: d, computedColor: _, areaColor: g, getSparklineOptions: m, xScaleGenerator: h, LumeChart: he, LumeLineGroup: Jt };
3412
3455
  }
3413
3456
  });
3414
- var ml = function() {
3457
+ var gl = function() {
3415
3458
  var e = this, r = e._self._c, n = e._self._setupProxy;
3416
3459
  return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "line", options: n.getSparklineOptions(n.allOptions), "x-scale": n.xScaleGenerator }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
3417
3460
  return [n.allOptions.showArea ? r("path", { class: [
@@ -3425,65 +3468,65 @@ var ml = function() {
3425
3468
  return [e._t(o, null, null, l || {})];
3426
3469
  } };
3427
3470
  })], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
3428
- }, _l = [], gl = /* @__PURE__ */ S(
3429
- pl,
3471
+ }, hl = [], yl = /* @__PURE__ */ H(
3430
3472
  ml,
3431
- _l,
3473
+ gl,
3474
+ hl,
3432
3475
  !1,
3433
3476
  null,
3434
3477
  "579f7e32"
3435
3478
  );
3436
- const Nl = gl.exports;
3479
+ const $l = yl.exports;
3437
3480
  export {
3438
- Mr as A,
3439
- mt as B,
3440
- ue as C,
3441
- qe as D,
3442
- je as E,
3443
- pt as F,
3444
- at as G,
3445
- rt as H,
3446
- ar as I,
3447
- Xt as J,
3448
- zr as K,
3449
- tt as L,
3450
- Q as M,
3451
- lr as N,
3452
- et as O,
3453
- Zr as P,
3454
- jt as Q,
3455
- Xr as R,
3456
- Gt as S,
3457
- nt as T,
3458
- ve as U,
3459
- or as V,
3460
- ye as W,
3461
- rr as X,
3462
- Y as a,
3463
- ro as b,
3464
- ka as c,
3465
- da as d,
3466
- _a as e,
3467
- Gn as f,
3468
- Qe as g,
3469
- Ll as h,
3470
- ut as i,
3471
- fe as j,
3472
- dr as k,
3473
- xl as l,
3474
- _r as m,
3475
- Al as n,
3476
- Xo as o,
3477
- Il as p,
3478
- Yt as q,
3479
- jr as r,
3480
- qo as s,
3481
- Tl as t,
3482
- Nl as u,
3483
- Ol as v,
3484
- Rr as w,
3485
- wr as x,
3486
- Or as y,
3487
- kr as z
3481
+ Wr as A,
3482
+ gt as B,
3483
+ de as C,
3484
+ tt as D,
3485
+ Me as E,
3486
+ mt as F,
3487
+ lt as G,
3488
+ ot as H,
3489
+ lr as I,
3490
+ Kt as J,
3491
+ Ur as K,
3492
+ rt as L,
3493
+ re as M,
3494
+ ir as N,
3495
+ nt as O,
3496
+ Yr as P,
3497
+ Mt as Q,
3498
+ Kr as R,
3499
+ Vt as S,
3500
+ at as T,
3501
+ ge as U,
3502
+ ur as V,
3503
+ Le as W,
3504
+ or as X,
3505
+ ee as a,
3506
+ oo as b,
3507
+ La as c,
3508
+ fa as d,
3509
+ ha as e,
3510
+ Vn as f,
3511
+ et as g,
3512
+ Tl as h,
3513
+ st as i,
3514
+ he as j,
3515
+ fr as k,
3516
+ Al as l,
3517
+ hr as m,
3518
+ Il as n,
3519
+ Ko as o,
3520
+ El as p,
3521
+ Jt as q,
3522
+ Mr as r,
3523
+ tl as s,
3524
+ Ol as t,
3525
+ $l as u,
3526
+ Nl as v,
3527
+ Cr as w,
3528
+ Rr as x,
3529
+ Nr as y,
3530
+ Lr as z
3488
3531
  };
3489
- //# sourceMappingURL=AquR79cs.js.map
3532
+ //# sourceMappingURL=DtYmG1uv.js.map