@adyen/lume 0.3.2 → 0.3.3

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.
@@ -1,7 +1,7 @@
1
- import U, { isRef as Yt, reactive as it, computed as d, ref as L, watch as D, defineComponent as $, toRefs as I, onMounted as B, onBeforeUnmount as Kt, watchEffect as Jt, useSlots as H, defineAsyncComponent as ht } from "vue";
2
- import { sankeyLinkHorizontal as Oe, sankey as ke, sankeyJustify as xe } from "d3-sankey";
3
- import { format as Le, ticks as $e, scaleBand as Q, scaleLinear as q, line as we, area as Ie } from "d3";
4
- import { createPopper as Se } from "@popperjs/core";
1
+ import Y, { isRef as Yt, computed as d, ref as L, watch as C, defineComponent as $, toRefs as I, reactive as it, inject as Kt, onMounted as G, onBeforeUnmount as Jt, watchEffect as Qt, useSlots as H, provide as Et, defineAsyncComponent as _t } from "vue";
2
+ import { sankeyLinkHorizontal as xe, sankey as Le, sankeyJustify as $e } from "d3-sankey";
3
+ import { format as we, ticks as Ie, scaleBand as Q, scaleLinear as q, line as Se, area as De } from "d3";
4
+ import { createPopper as Re } from "@popperjs/core";
5
5
  function rt(e) {
6
6
  return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? rt = function(t) {
7
7
  return typeof t;
@@ -9,35 +9,35 @@ function rt(e) {
9
9
  return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
10
10
  }, rt(e);
11
11
  }
12
- function Re(e) {
13
- return De(e) || Pe(e) || Ee();
12
+ function Pe(e) {
13
+ return Ee(e) || Ce(e) || Ne();
14
14
  }
15
- function De(e) {
15
+ function Ee(e) {
16
16
  if (Array.isArray(e)) {
17
17
  for (var t = 0, r = new Array(e.length); t < e.length; t++)
18
18
  r[t] = e[t];
19
19
  return r;
20
20
  }
21
21
  }
22
- function Pe(e) {
22
+ function Ce(e) {
23
23
  if (Symbol.iterator in Object(e) || Object.prototype.toString.call(e) === "[object Arguments]")
24
24
  return Array.from(e);
25
25
  }
26
- function Ee() {
26
+ function Ne() {
27
27
  throw new TypeError("Invalid attempt to spread non-iterable instance");
28
28
  }
29
29
  var nt = typeof window < "u";
30
- function Ce(e) {
30
+ function Be(e) {
31
31
  return Array.isArray(e) || rt(e) === "object" ? Object.freeze(e) : e;
32
32
  }
33
- function Ne(e) {
33
+ function Ge(e) {
34
34
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
35
35
  return e.reduce(function(r, n) {
36
36
  var a = n.passengers[0], o = typeof a == "function" ? a(t) : n.passengers;
37
37
  return r.concat(o);
38
38
  }, []);
39
39
  }
40
- function Be(e, t) {
40
+ function He(e, t) {
41
41
  return e.map(function(r, n) {
42
42
  return [n, r];
43
43
  }).sort(function(r, n) {
@@ -46,17 +46,17 @@ function Be(e, t) {
46
46
  return r[1];
47
47
  });
48
48
  }
49
- function Et(e, t) {
49
+ function Ct(e, t) {
50
50
  return t.reduce(function(r, n) {
51
51
  return e.hasOwnProperty(n) && (r[n] = e[n]), r;
52
52
  }, {});
53
53
  }
54
- var Qt = {}, He = {}, Ge = {}, Ve = U.extend({
54
+ var qt = {}, Ve = {}, je = {}, Fe = Y.extend({
55
55
  data: function() {
56
56
  return {
57
- transports: Qt,
58
- targets: He,
59
- sources: Ge,
57
+ transports: qt,
58
+ targets: Ve,
59
+ sources: je,
60
60
  trackInstances: nt
61
61
  };
62
62
  },
@@ -68,13 +68,13 @@ var Qt = {}, He = {}, Ge = {}, Ve = U.extend({
68
68
  var i = {
69
69
  to: r,
70
70
  from: n,
71
- passengers: Ce(a),
71
+ passengers: Be(a),
72
72
  order: s
73
73
  }, l = Object.keys(this.transports);
74
- l.indexOf(r) === -1 && U.set(this.transports, r, []);
74
+ l.indexOf(r) === -1 && Y.set(this.transports, r, []);
75
75
  var u = this.$_getTransportIndex(i), c = this.transports[r].slice(0);
76
- u === -1 ? c.push(i) : c[u] = i, this.transports[r] = Be(c, function(f, _) {
77
- return f.order - _.order;
76
+ u === -1 ? c.push(i) : c[u] = i, this.transports[r] = He(c, function(p, v) {
77
+ return p.order - v.order;
78
78
  });
79
79
  }
80
80
  }
@@ -121,7 +121,7 @@ var Qt = {}, He = {}, Ge = {}, Ve = U.extend({
121
121
  return -1;
122
122
  }
123
123
  }
124
- }), R = new Ve(Qt), je = 1, qt = U.extend({
124
+ }), E = new Fe(qt), Me = 1, te = Y.extend({
125
125
  name: "portal",
126
126
  props: {
127
127
  disabled: {
@@ -130,7 +130,7 @@ var Qt = {}, He = {}, Ge = {}, Ve = U.extend({
130
130
  name: {
131
131
  type: String,
132
132
  default: function() {
133
- return String(je++);
133
+ return String(Me++);
134
134
  }
135
135
  },
136
136
  order: {
@@ -160,7 +160,7 @@ var Qt = {}, He = {}, Ge = {}, Ve = U.extend({
160
160
  created: function() {
161
161
  var t = this;
162
162
  this.$nextTick(function() {
163
- R.registerSource(t.name, t);
163
+ E.registerSource(t.name, t);
164
164
  });
165
165
  },
166
166
  mounted: function() {
@@ -170,7 +170,7 @@ var Qt = {}, He = {}, Ge = {}, Ve = U.extend({
170
170
  this.disabled ? this.clear() : this.sendUpdate();
171
171
  },
172
172
  beforeDestroy: function() {
173
- R.unregisterSource(this.name), this.clear();
173
+ E.unregisterSource(this.name), this.clear();
174
174
  },
175
175
  watch: {
176
176
  to: function(t, r) {
@@ -183,7 +183,7 @@ var Qt = {}, He = {}, Ge = {}, Ve = U.extend({
183
183
  from: this.name,
184
184
  to: t || this.to
185
185
  };
186
- R.close(r);
186
+ E.close(r);
187
187
  },
188
188
  normalizeSlots: function() {
189
189
  return this.$scopedSlots.default ? [this.$scopedSlots.default] : this.$slots.default;
@@ -197,10 +197,10 @@ var Qt = {}, He = {}, Ge = {}, Ve = U.extend({
197
197
  var r = {
198
198
  from: this.name,
199
199
  to: this.to,
200
- passengers: Re(t),
200
+ passengers: Pe(t),
201
201
  order: this.order
202
202
  };
203
- R.open(r);
203
+ E.open(r);
204
204
  } else
205
205
  this.clear();
206
206
  }
@@ -217,7 +217,7 @@ var Qt = {}, He = {}, Ge = {}, Ve = U.extend({
217
217
  key: "v-portal-placeholder"
218
218
  });
219
219
  }
220
- }), te = U.extend({
220
+ }), ee = Y.extend({
221
221
  name: "portalTarget",
222
222
  props: {
223
223
  multiple: {
@@ -248,14 +248,14 @@ var Qt = {}, He = {}, Ge = {}, Ve = U.extend({
248
248
  },
249
249
  data: function() {
250
250
  return {
251
- transports: R.transports,
251
+ transports: E.transports,
252
252
  firstRender: !0
253
253
  };
254
254
  },
255
255
  created: function() {
256
256
  var t = this;
257
257
  this.$nextTick(function() {
258
- R.registerTarget(t.name, t);
258
+ E.registerTarget(t.name, t);
259
259
  });
260
260
  },
261
261
  watch: {
@@ -263,7 +263,7 @@ var Qt = {}, He = {}, Ge = {}, Ve = U.extend({
263
263
  this.$emit("change", this.children().length > 0);
264
264
  },
265
265
  name: function(t, r) {
266
- R.unregisterTarget(r), R.registerTarget(t, this);
266
+ E.unregisterTarget(r), E.registerTarget(t, this);
267
267
  }
268
268
  },
269
269
  mounted: function() {
@@ -273,7 +273,7 @@ var Qt = {}, He = {}, Ge = {}, Ve = U.extend({
273
273
  });
274
274
  },
275
275
  beforeDestroy: function() {
276
- R.unregisterTarget(this.name);
276
+ E.unregisterTarget(this.name);
277
277
  },
278
278
  computed: {
279
279
  ownTransports: function() {
@@ -281,7 +281,7 @@ var Qt = {}, He = {}, Ge = {}, Ve = U.extend({
281
281
  return this.multiple ? t : t.length === 0 ? [] : [t[t.length - 1]];
282
282
  },
283
283
  passengers: function() {
284
- return Ne(this.ownTransports, this.slotProps);
284
+ return Ge(this.ownTransports, this.slotProps);
285
285
  }
286
286
  },
287
287
  methods: {
@@ -304,8 +304,8 @@ var Qt = {}, He = {}, Ge = {}, Ve = U.extend({
304
304
  }
305
305
  }, n);
306
306
  }
307
- }), Fe = 0, Me = ["disabled", "name", "order", "slim", "slotProps", "tag", "to"], ze = ["multiple", "transition"];
308
- U.extend({
307
+ }), ze = 0, We = ["disabled", "name", "order", "slim", "slotProps", "tag", "to"], Ze = ["multiple", "transition"];
308
+ Y.extend({
309
309
  name: "MountingPortal",
310
310
  inheritAttrs: !1,
311
311
  props: {
@@ -325,7 +325,7 @@ U.extend({
325
325
  name: {
326
326
  type: String,
327
327
  default: function() {
328
- return "mounted_" + String(Fe++);
328
+ return "mounted_" + String(ze++);
329
329
  }
330
330
  },
331
331
  order: {
@@ -380,9 +380,9 @@ U.extend({
380
380
  return;
381
381
  }
382
382
  var r = this.$props;
383
- if (R.targets[r.name]) {
383
+ if (E.targets[r.name]) {
384
384
  r.bail ? console.warn("[portal-vue]: Target ".concat(r.name, ` is already mounted.
385
- Aborting because 'bail: true' is set`)) : this.portalTarget = R.targets[r.name];
385
+ Aborting because 'bail: true' is set`)) : this.portalTarget = E.targets[r.name];
386
386
  return;
387
387
  }
388
388
  var n = r.append;
@@ -390,8 +390,8 @@ U.extend({
390
390
  var a = typeof n == "string" ? n : "DIV", o = document.createElement(a);
391
391
  t.appendChild(o), t = o;
392
392
  }
393
- var s = Et(this.$props, ze);
394
- s.slim = this.targetSlim, s.tag = this.targetTag, s.slotProps = this.targetSlotProps, s.name = this.to, this.portalTarget = new te({
393
+ var s = Ct(this.$props, Ze);
394
+ s.slim = this.targetSlim, s.tag = this.targetTag, s.slotProps = this.targetSlotProps, s.name = this.to, this.portalTarget = new ee({
395
395
  el: t,
396
396
  parent: this.$parent || this,
397
397
  propsData: s
@@ -410,8 +410,8 @@ U.extend({
410
410
  if (!this.portalTarget)
411
411
  return console.warn("[portal-vue] Target wasn't mounted"), t();
412
412
  if (!this.$scopedSlots.manual) {
413
- var r = Et(this.$props, Me);
414
- return t(qt, {
413
+ var r = Ct(this.$props, We);
414
+ return t(te, {
415
415
  props: r,
416
416
  attrs: this.$attrs,
417
417
  on: this.$listeners,
@@ -424,75 +424,36 @@ U.extend({
424
424
  return Array.isArray(n) && (n = n[0]), n || t();
425
425
  }
426
426
  });
427
- var E = /* @__PURE__ */ ((e) => (e.Skyblue = "skyblue", e.Royalblue = "royalblue", e.Violet = "violet", e.Darkteal = "darkteal", e.Gold = "gold", e))(E || {}), ee = /* @__PURE__ */ ((e) => (e.Skyblue10 = "skyblue-10", e.Skyblue20 = "skyblue-20", e.Skyblue30 = "skyblue-30", e.Skyblue40 = "skyblue-40", e.Skyblue50 = "skyblue-50", e.Skyblue60 = "skyblue-60", e.Skyblue70 = "skyblue-70", e.Skyblue80 = "skyblue-80", e.Skyblue90 = "skyblue-90", e.Skyblue100 = "skyblue-100", e.Royalblue10 = "royalblue-10", e.Royalblue20 = "royalblue-20", e.Royalblue30 = "royalblue-30", e.Royalblue40 = "royalblue-40", e.Royalblue50 = "royalblue-50", e.Royalblue60 = "royalblue-60", e.Royalblue70 = "royalblue-70", e.Royalblue80 = "royalblue-80", e.Royalblue90 = "royalblue-90", e.Royalblue100 = "royalblue-100", e.Violet10 = "violet-10", e.Violet20 = "violet-20", e.Violet30 = "violet-30", e.Violet40 = "violet-40", e.Violet50 = "violet-50", e.Violet60 = "violet-60", e.Violet70 = "violet-70", e.Violet80 = "violet-80", e.Violet90 = "violet-90", e.Violet100 = "violet-100", e.Darkteal10 = "darkteal-10", e.Darkteal20 = "darkteal-20", e.Darkteal30 = "darkteal-30", e.Darkteal40 = "darkteal-40", e.Darkteal50 = "darkteal-50", e.Darkteal60 = "darkteal-60", e.Darkteal70 = "darkteal-70", e.Darkteal80 = "darkteal-80", e.Darkteal90 = "darkteal-90", e.Darkteal100 = "darkteal-100", e.Gold10 = "gold-10", e.Gold20 = "gold-20", e.Gold30 = "gold-30", e.Gold40 = "gold-40", e.Gold50 = "gold-50", e.Gold60 = "gold-60", e.Gold70 = "gold-70", e.Gold80 = "gold-80", e.Gold90 = "gold-90", e.Gold100 = "gold-100", e))(ee || {}), xt = /* @__PURE__ */ ((e) => (e.SkyTeal = "skyblue-darkteal", e.VioletRoyal = "violet-royalblue", e.VioletTeal = "violet-darkteal", e.GoldTeal = "gold-darkteal", e.GoldRoyal = "gold-royalblue", e))(xt || {}), ne = /* @__PURE__ */ ((e) => (e.Grey = "grey", e.Green = "green", e.Orange = "orange", e.Red = "red", e))(ne || {}), Lt = /* @__PURE__ */ ((e) => (e["01"] = "01", e["02"] = "02", e["03"] = "03", e["04"] = "04", e["05"] = "05", e["06"] = "06", e["07"] = "07", e["08"] = "08", e["09"] = "09", e))(Lt || {});
428
- const b = {
429
- HORIZONTAL: "horizontal",
430
- VERTICAL: "vertical"
431
- }, We = {
432
- SINGLE: "single",
433
- GROUPED: "grouped",
434
- STACKED: "stacked"
435
- }, M = {
436
- VERTICAL: {
437
- top: 16,
438
- right: 0,
439
- bottom: 28,
440
- left: 24
441
- },
442
- HORIZONTAL: {
443
- top: 16,
444
- right: 0,
445
- bottom: 28,
446
- left: 24
447
- }
448
- }, re = "No data", Ze = 20, Xe = 0.33, Ue = 0.5, Ye = 1, Ke = [
449
- "auto",
450
- "auto-start",
451
- "auto-end",
452
- "top",
453
- "top-start",
454
- "top-end",
455
- "right",
456
- "right-start",
457
- "right-end",
458
- "bottom",
459
- "bottom-start",
460
- "bottom-end",
461
- "left",
462
- "left-start",
463
- "left-end"
464
- ];
465
- var F = /* @__PURE__ */ ((e) => (e.Categorical = "categorical", e.Sequential = "sequential", e.Divergent = "divergent", e))(F || {});
466
- function ae() {
427
+ function ne() {
467
428
  return process.env.NODE_ENV === "production";
468
429
  }
469
- function oe(e) {
430
+ function re(e) {
470
431
  return (e == null ? void 0 : e.map(
471
432
  (t) => t.values.map((r) => r == null ? void 0 : r.value).flat()
472
433
  ).flat()) || [];
473
434
  }
474
- function $t(e) {
435
+ function kt(e) {
475
436
  return e.length === 1;
476
437
  }
477
- function mt(e) {
438
+ function ht(e) {
478
439
  return !!e && typeof e == "object" && !Array.isArray(e);
479
440
  }
480
- function se(e, t) {
441
+ function ae(e, t) {
481
442
  const r = { ...e };
482
443
  return Object.entries(t).forEach(([n, a]) => {
483
- r[n] = mt(e[n]) && mt(a) ? se(e[n], a) : a;
444
+ r[n] = ht(e[n]) && ht(a) ? ae(e[n], a) : a;
484
445
  }), r;
485
446
  }
486
- function Je(e) {
487
- return e != null && mt(e) && "value" in e;
447
+ function Xe(e) {
448
+ return e != null && ht(e) && "value" in e;
488
449
  }
489
- function z(e) {
450
+ function F(e) {
490
451
  return (e == null ? void 0 : e.bandwidth) !== void 0;
491
452
  }
492
- function wt(e) {
493
- return z(e) ? e.bandwidth() : Math.max(...e.range()) / Math.max(...e.domain());
453
+ function xt(e) {
454
+ return F(e) ? e.bandwidth() : Math.max(...e.range()) / Math.max(...e.domain());
494
455
  }
495
- const Qe = (e, t) => {
456
+ const Ue = (e, t) => {
496
457
  if (!e)
497
458
  throw new Error("Data is not a valid array");
498
459
  if (e.length === 0)
@@ -502,16 +463,16 @@ const Qe = (e, t) => {
502
463
  throw new Error("Index exceeds length of at least one of the datasets");
503
464
  });
504
465
  };
505
- function qe(e, t) {
466
+ function Ye(e, t) {
506
467
  var r;
507
- return Qe(e, t), ((r = e.reduce(
468
+ return Ue(e, t), ((r = e.reduce(
508
469
  (n, a) => {
509
470
  var o, s, i, l;
510
471
  return ((s = (o = n.values[t]) == null ? void 0 : o.value) != null ? s : 0) > ((l = (i = a.values[t]) == null ? void 0 : i.value) != null ? l : 0) ? n : a;
511
472
  }
512
473
  ).values[t]) == null ? void 0 : r.value) || 0;
513
474
  }
514
- function gt(e) {
475
+ function mt(e) {
515
476
  const t = Yt(e) ? e.value : e;
516
477
  if (!t)
517
478
  throw new Error("No empty array can be created from specified data value");
@@ -521,17 +482,17 @@ function gt(e) {
521
482
  );
522
483
  return Array(r).fill(null);
523
484
  }
524
- function tn(e) {
525
- return z(e) ? e.domain().length : Math.max(...e.domain());
485
+ function Ke(e) {
486
+ return F(e) ? e.domain().length : Math.max(...e.domain());
526
487
  }
527
- function en(e, t) {
488
+ function Je(e, t) {
528
489
  return (r) => Math.round(e * (1 - r) + t * r);
529
490
  }
530
- function nn(e, t, r) {
491
+ function Qe(e, t, r) {
531
492
  const n = r ? e.length - t : t, a = e.slice(0, n);
532
493
  return e.slice(n).concat(a);
533
494
  }
534
- function W(e) {
495
+ function M(e) {
535
496
  if (e.groups) {
536
497
  const t = Object.keys(e);
537
498
  return Object.assign(
@@ -541,121 +502,22 @@ function W(e) {
541
502
  }
542
503
  return e;
543
504
  }
544
- const rn = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce(
505
+ const qe = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce(
545
506
  (t, r) => t += (r &= 63) < 36 ? r.toString(36) : r < 62 ? (r - 26).toString(36).toUpperCase() : r > 62 ? "-" : "_",
546
507
  ""
547
508
  );
548
509
  var tt = /* @__PURE__ */ ((e) => (e.DatasetLength = `Our guidelines highly recommend not having more than 5 datasets in one chart.
549
510
  Learn more: https://lume.design/guidelines/datasets`, e.ColorLoop = "Colors will loop around after the 5th dataset. You can prevent this by setting specific colors for your datasets.", e.InvalidFormat = "The string provided to format is invalid. Please refer to https://github.com/d3/d3-format for valid arguments.", e.NotContainedInSvg = "This component is an `SVGElement`, thus it is required to be inside an `<svg>` container.", e))(tt || {});
550
- const an = "[lume] ";
511
+ const tn = "[lume] ";
551
512
  function ut(e, t = !0) {
552
- t && ae() || console.warn(an + "Warning: " + e);
553
- }
554
- const on = F.Categorical, lt = E.Skyblue, sn = xt.SkyTeal;
555
- function un(e) {
556
- return e === F.Divergent ? sn : lt;
557
- }
558
- function ln(e) {
559
- return Object.values(Lt).includes(e);
560
- }
561
- function Ct(e, t) {
562
- return t === F.Divergent ? Object.values(xt).includes(e) : Object.values({
563
- ...E,
564
- ...ee,
565
- ...ne,
566
- ...Lt
567
- }).includes(e);
568
- }
569
- function cn(e, t) {
570
- const r = Object.values(E).indexOf(e);
571
- return nn(Object.values(E), r > -1 ? r : 0)[t];
572
- }
573
- function dn(e, t) {
574
- const r = 50 + t * 10;
575
- return `${e}-${r}`;
576
- }
577
- function pn(e, t) {
578
- const r = (t + 1) * 10;
579
- return `${e}-${r}`;
580
- }
581
- function Nt(e, t, r) {
582
- switch (t) {
583
- default:
584
- case F.Categorical:
585
- return ln(e) ? e : cn(e, r);
586
- case F.Sequential:
587
- return dn(e, r);
588
- case F.Divergent:
589
- return pn(e, r);
590
- }
591
- }
592
- function fn(e, t, r = on, n) {
593
- return Ct(e, r) ? e : (n > 4 && (ut(tt.ColorLoop), n = n % 5), Ct(t, r) ? Nt(t, r, n) : Nt(un(r), r, n));
594
- }
595
- function vn(e) {
596
- return e.map((t) => Je(t) ? t : { value: t });
597
- }
598
- function _n(e) {
599
- return e.__internal === !0;
600
- }
601
- const ie = (e = null) => ({
602
- data: {
603
- type: Array,
604
- required: !0,
605
- validator: e || void 0
606
- },
607
- labels: {
608
- type: Array,
609
- default: void 0
610
- },
611
- color: {
612
- type: String,
613
- default: E.Skyblue
614
- }
615
- });
616
- function ct(e, t, r, n, a) {
617
- const o = it({
618
- width: 0,
619
- height: 0
620
- }), s = rn(12), i = d(() => {
621
- var c;
622
- return e.value.length > 5 && ut(tt.DatasetLength), (c = e.value) == null ? void 0 : c.map(
623
- (f, _) => {
624
- if (_n(f))
625
- return f;
626
- const m = vn(f.values), p = fn(
627
- f.color,
628
- r == null ? void 0 : r.value,
629
- n == null ? void 0 : n.value.colorPalette,
630
- _
631
- );
632
- return {
633
- ...f,
634
- values: m,
635
- color: p,
636
- __internal: !0
637
- };
638
- }
639
- );
640
- }), l = d(() => Array.isArray(t.value) ? t.value : gt(e.value).map((c, f) => f));
641
- function u(c) {
642
- const f = (a == null ? void 0 : a.value) === b.HORIZONTAL ? gt(e).length * (Ze * 2) : c.height;
643
- o.width = c.width, o.height = f;
644
- }
645
- return {
646
- chartID: s,
647
- computedLabels: l,
648
- containerSize: o,
649
- internalData: i,
650
- updateSize: u
651
- };
513
+ t && ne() || console.warn(tn + "Warning: " + e);
652
514
  }
653
- const It = (e) => {
515
+ const Lt = (e) => {
654
516
  let t = null;
655
517
  switch (typeof e) {
656
518
  case "string":
657
519
  try {
658
- t = Le(e);
520
+ t = we(e);
659
521
  } catch {
660
522
  ut(tt.InvalidFormat), t = null;
661
523
  }
@@ -670,29 +532,29 @@ const It = (e) => {
670
532
  return t ? t(n) : n;
671
533
  }
672
534
  return r;
673
- }, dt = () => ({
535
+ }, lt = () => ({
674
536
  options: {
675
537
  type: Object,
676
538
  default: () => ({})
677
539
  }
678
540
  });
679
- function C(e, t) {
541
+ function B(e, t) {
680
542
  return { allOptions: d(() => {
681
543
  const n = Yt(t) ? t == null ? void 0 : t.value : t;
682
- return n ? se(n, e.value) : e.value;
544
+ return n ? ae(n, e.value) : e.value;
683
545
  }) };
684
546
  }
685
- const hn = 0.15;
686
- function mn(e, t, r) {
547
+ const en = 0.15;
548
+ function nn(e, t, r) {
687
549
  const n = L(), a = d(() => Math.max(...e.value.range())), o = d(() => t.value.length);
688
550
  function s() {
689
551
  if (!t.value)
690
552
  return;
691
553
  const l = t.value.reduce(
692
- (c, f) => c + f.getBoundingClientRect().width,
554
+ (c, p) => c + p.getBoundingClientRect().width,
693
555
  0
694
556
  ), u = Math.ceil(l / o.value);
695
- n.value = u + u * hn;
557
+ n.value = u + u * en;
696
558
  }
697
559
  function i(l) {
698
560
  if (!t.value)
@@ -700,12 +562,50 @@ function mn(e, t, r) {
700
562
  const u = t.value.length;
701
563
  if (l === 0)
702
564
  return !0;
703
- const c = a.value / u, f = typeof r == "number" && r > 0 && r + 1 || Math.ceil(n.value / c);
704
- return l % f === 0;
565
+ const c = a.value / u, p = typeof r == "number" && r > 0 && r + 1 || Math.ceil(n.value / c);
566
+ return l % p === 0;
705
567
  }
706
- return D(t, s), { showTick: i };
568
+ return C(t, s), { showTick: i };
707
569
  }
708
- function pt(e) {
570
+ var N = /* @__PURE__ */ ((e) => (e.Skyblue = "skyblue", e.Royalblue = "royalblue", e.Violet = "violet", e.Darkteal = "darkteal", e.Gold = "gold", e))(N || {}), oe = /* @__PURE__ */ ((e) => (e.Skyblue10 = "skyblue-10", e.Skyblue20 = "skyblue-20", e.Skyblue30 = "skyblue-30", e.Skyblue40 = "skyblue-40", e.Skyblue50 = "skyblue-50", e.Skyblue60 = "skyblue-60", e.Skyblue70 = "skyblue-70", e.Skyblue80 = "skyblue-80", e.Skyblue90 = "skyblue-90", e.Skyblue100 = "skyblue-100", e.Royalblue10 = "royalblue-10", e.Royalblue20 = "royalblue-20", e.Royalblue30 = "royalblue-30", e.Royalblue40 = "royalblue-40", e.Royalblue50 = "royalblue-50", e.Royalblue60 = "royalblue-60", e.Royalblue70 = "royalblue-70", e.Royalblue80 = "royalblue-80", e.Royalblue90 = "royalblue-90", e.Royalblue100 = "royalblue-100", e.Violet10 = "violet-10", e.Violet20 = "violet-20", e.Violet30 = "violet-30", e.Violet40 = "violet-40", e.Violet50 = "violet-50", e.Violet60 = "violet-60", e.Violet70 = "violet-70", e.Violet80 = "violet-80", e.Violet90 = "violet-90", e.Violet100 = "violet-100", e.Darkteal10 = "darkteal-10", e.Darkteal20 = "darkteal-20", e.Darkteal30 = "darkteal-30", e.Darkteal40 = "darkteal-40", e.Darkteal50 = "darkteal-50", e.Darkteal60 = "darkteal-60", e.Darkteal70 = "darkteal-70", e.Darkteal80 = "darkteal-80", e.Darkteal90 = "darkteal-90", e.Darkteal100 = "darkteal-100", e.Gold10 = "gold-10", e.Gold20 = "gold-20", e.Gold30 = "gold-30", e.Gold40 = "gold-40", e.Gold50 = "gold-50", e.Gold60 = "gold-60", e.Gold70 = "gold-70", e.Gold80 = "gold-80", e.Gold90 = "gold-90", e.Gold100 = "gold-100", e))(oe || {}), $t = /* @__PURE__ */ ((e) => (e.SkyTeal = "skyblue-darkteal", e.VioletRoyal = "violet-royalblue", e.VioletTeal = "violet-darkteal", e.GoldTeal = "gold-darkteal", e.GoldRoyal = "gold-royalblue", e))($t || {}), se = /* @__PURE__ */ ((e) => (e.Grey = "grey", e.Green = "green", e.Orange = "orange", e.Red = "red", e))(se || {}), wt = /* @__PURE__ */ ((e) => (e["01"] = "01", e["02"] = "02", e["03"] = "03", e["04"] = "04", e["05"] = "05", e["06"] = "06", e["07"] = "07", e["08"] = "08", e["09"] = "09", e))(wt || {});
571
+ const A = {
572
+ HORIZONTAL: "horizontal",
573
+ VERTICAL: "vertical"
574
+ }, rn = {
575
+ SINGLE: "single",
576
+ GROUPED: "grouped",
577
+ STACKED: "stacked"
578
+ }, j = {
579
+ VERTICAL: {
580
+ top: 16,
581
+ right: 0,
582
+ bottom: 28,
583
+ left: 24
584
+ },
585
+ HORIZONTAL: {
586
+ top: 16,
587
+ right: 0,
588
+ bottom: 28,
589
+ left: 24
590
+ }
591
+ }, ie = "No data", an = 20, on = 0.33, sn = 0.5, un = 1, ln = [
592
+ "auto",
593
+ "auto-start",
594
+ "auto-end",
595
+ "top",
596
+ "top-start",
597
+ "top-end",
598
+ "right",
599
+ "right-start",
600
+ "right-end",
601
+ "bottom",
602
+ "bottom-start",
603
+ "bottom-end",
604
+ "left",
605
+ "left-start",
606
+ "left-end"
607
+ ];
608
+ function ct(e) {
709
609
  e != null && e.closest("svg") || ut(tt.NotContainedInSvg);
710
610
  }
711
611
  const ue = {
@@ -715,14 +615,14 @@ const ue = {
715
615
  tickCount: 10,
716
616
  tickFormat: null,
717
617
  tickPadding: 8
718
- }, gn = {
618
+ }, cn = {
719
619
  ...ue,
720
620
  withTitle: !1,
721
621
  skip: !0
722
- }, yn = {
622
+ }, dn = {
723
623
  ...ue,
724
624
  gridLines: !0
725
- }, bn = 12, Tn = 8, An = function(e, t, r) {
625
+ }, pn = 12, fn = 8, vn = function(e, t, r) {
726
626
  const n = d(() => e.value.step() * e.value.paddingInner() / 2);
727
627
  function a(l, u) {
728
628
  var c;
@@ -735,7 +635,7 @@ const ue = {
735
635
  return {
736
636
  x: -(u - e.value.step()) / 2,
737
637
  width: u,
738
- height: r.value.tickPadding + bn + Tn
638
+ height: r.value.tickPadding + pn + fn
739
639
  };
740
640
  }
741
641
  function s() {
@@ -760,7 +660,7 @@ const ue = {
760
660
  getTickGroupAttributes: a,
761
661
  getTickLabelAttributes: i
762
662
  };
763
- }, On = function(e, t, r) {
663
+ }, _n = function(e, t, r) {
764
664
  const n = d(() => e.value.step() * e.value.paddingInner() / 2);
765
665
  function a(l, u) {
766
666
  var c;
@@ -797,7 +697,7 @@ const ue = {
797
697
  getTickGroupAttributes: a,
798
698
  getTickLabelAttributes: i
799
699
  };
800
- }, kn = function(e, t, r) {
700
+ }, hn = function(e, t, r) {
801
701
  function n(i) {
802
702
  return {
803
703
  transform: `translate(${e.value(i)}, 0)`
@@ -824,7 +724,7 @@ const ue = {
824
724
  getTickGroupAttributes: n,
825
725
  getTickLabelAttributes: s
826
726
  };
827
- }, xn = function(e, t, r) {
727
+ }, mn = function(e, t, r) {
828
728
  function n(i) {
829
729
  return {
830
730
  transform: `translate(0, ${e.value(i)})`
@@ -851,14 +751,14 @@ const ue = {
851
751
  getTickGroupAttributes: n,
852
752
  getTickLabelAttributes: s
853
753
  };
854
- }, Ln = {
855
- "x-band-scale-axis": An,
856
- "y-band-scale-axis": On,
857
- "x-linear-scale-axis": kn,
858
- "y-linear-scale-axis": xn
754
+ }, gn = {
755
+ "x-band-scale-axis": vn,
756
+ "y-band-scale-axis": _n,
757
+ "x-linear-scale-axis": hn,
758
+ "y-linear-scale-axis": mn
859
759
  };
860
- var yt = /* @__PURE__ */ ((e) => (e.bandScale = "band-scale-axis", e.linearScale = "linear-scale-axis", e))(yt || {}), bt = /* @__PURE__ */ ((e) => (e.left = "left", e.bottom = "bottom", e))(bt || {}), at = /* @__PURE__ */ ((e) => (e.x = "bottom", e.y = "left", e))(at || {});
861
- const $n = /* @__PURE__ */ $({
760
+ var gt = /* @__PURE__ */ ((e) => (e.bandScale = "band-scale-axis", e.linearScale = "linear-scale-axis", e))(gt || {}), yt = /* @__PURE__ */ ((e) => (e.left = "left", e.bottom = "bottom", e))(yt || {}), at = /* @__PURE__ */ ((e) => (e.x = "bottom", e.y = "left", e))(at || {});
761
+ const yn = /* @__PURE__ */ $({
862
762
  __name: "lume-axis",
863
763
  props: {
864
764
  scale: {
@@ -873,7 +773,7 @@ const $n = /* @__PURE__ */ $({
873
773
  position: {
874
774
  type: String,
875
775
  default: void 0,
876
- validator: (e) => e in bt
776
+ validator: (e) => e in yt
877
777
  },
878
778
  containerSize: {
879
779
  type: Object,
@@ -885,87 +785,87 @@ const $n = /* @__PURE__ */ $({
885
785
  },
886
786
  orientation: {
887
787
  type: String,
888
- default: b.VERTICAL
788
+ default: A.VERTICAL
889
789
  },
890
- ...dt()
790
+ ...lt()
891
791
  },
892
792
  emits: ["tick-mouseover"],
893
793
  setup(e, { emit: t }) {
894
- const r = e, { scale: n, containerSize: a, hoveredIndex: o, options: s, orientation: i } = I(r), l = it({}), u = L(null), c = L(null), f = L(null), { chartID: _ } = ct(), m = d(
794
+ const r = e, { scale: n, containerSize: a, hoveredIndex: o, options: s, orientation: i } = I(r), l = it({}), u = L(null), c = L(null), p = L(null), v = Kt("chartID"), g = d(
895
795
  () => r.type ? at[r.type] : r.position
896
- ), p = d(
897
- () => r.type || (m.value === "left" ? "y" : "x")
898
- ), h = d(
899
- () => p.value === "x" && i.value === b.VERTICAL || p.value === "y" && i.value === b.HORIZONTAL
900
- ), { allOptions: g } = C(
796
+ ), f = d(
797
+ () => r.type || (g.value === "left" ? "y" : "x")
798
+ ), _ = d(
799
+ () => f.value === "x" && i.value === A.VERTICAL || f.value === "y" && i.value === A.HORIZONTAL
800
+ ), { allOptions: h } = B(
901
801
  s,
902
- p.value === "x" ? gn : yn
903
- ), { showTick: v } = mn(n, u, g.value.skip), y = d(
802
+ f.value === "x" ? cn : dn
803
+ ), { showTick: y } = nn(n, u, h.value.skip), b = d(
904
804
  () => {
905
- var x;
906
- return `translate(0, ${p.value === "x" ? (x = a.value) == null ? void 0 : x.height : 0})`;
805
+ var k;
806
+ return `translate(0, ${f.value === "x" ? (k = a.value) == null ? void 0 : k.height : 0})`;
907
807
  }
908
- ), A = d(() => {
909
- if (z(n.value))
808
+ ), m = d(() => {
809
+ if (F(n.value))
910
810
  return n.value.labels || n.value.domain();
911
- const { tickCount: x } = g.value, [S, J] = n.value.domain();
912
- return $e(S, J, x);
811
+ const { tickCount: k } = h.value, [R, J] = n.value.domain();
812
+ return Ie(R, J, k);
913
813
  }), T = d(() => {
914
- const { tickFormat: x } = g.value;
915
- return It(x);
814
+ const { tickFormat: k } = h.value;
815
+ return Lt(k);
916
816
  });
917
- function k(x) {
918
- const { showTicks: S } = g.value;
919
- return S === !1 ? "" : T.value(x);
817
+ function x(k) {
818
+ const { showTicks: R } = h.value;
819
+ return R === !1 ? "" : T.value(k);
920
820
  }
921
- function P(x) {
922
- h.value && t("tick-mouseover", x);
821
+ function S(k) {
822
+ _.value && t("tick-mouseover", k);
923
823
  }
924
- function G(x) {
925
- return g.value.withHover && h.value && o.value === x;
824
+ function D(k) {
825
+ return h.value.withHover && _.value && o.value === k;
926
826
  }
927
- function N(x) {
928
- return `${_}-${p.value}-tick--${x}`;
827
+ function P(k) {
828
+ return `${v}-${f.value}-tick--${k}`;
929
829
  }
930
- function V(x) {
830
+ function W(k) {
931
831
  if (!!u.value)
932
- return u.value.find((S) => +S.dataset.index === x);
832
+ return u.value.find((R) => +R.dataset.index === k);
933
833
  }
934
- function j() {
935
- f.value = A.value.map((x, S) => ({
936
- value: x,
937
- group: l.getTickGroupAttributes(x, S),
938
- ghost: l.getTickGhostAttributes(V(S)),
834
+ function Z() {
835
+ p.value = m.value.map((k, R) => ({
836
+ value: k,
837
+ group: l.getTickGroupAttributes(k, R),
838
+ ghost: l.getTickGhostAttributes(W(R)),
939
839
  label: l.getTickLabelAttributes(),
940
840
  gridLine: l.getGridLinesAttributes()
941
841
  }));
942
842
  }
943
- function K() {
944
- const x = n.value.step ? "bandScale" : "linearScale", S = Ln[`${p.value}-${yt[x]}`];
945
- Object.entries(S(n, a, g) || []).forEach(
946
- ([J, vt]) => {
947
- l[J] = vt;
843
+ function X() {
844
+ const k = n.value.step ? "bandScale" : "linearScale", R = gn[`${f.value}-${gt[k]}`];
845
+ Object.entries(R(n, a, h) || []).forEach(
846
+ ([J, ft]) => {
847
+ l[J] = ft;
948
848
  }
949
849
  );
950
850
  }
951
- return D(n, K, { flush: "sync", immediate: !0 }), D(
851
+ return C(n, X, { flush: "sync", immediate: !0 }), C(
952
852
  [
953
- A,
853
+ m,
954
854
  u,
955
855
  () => a.value.width,
956
856
  () => a.value.height
957
857
  ],
958
- j,
858
+ Z,
959
859
  { immediate: !0 }
960
- ), B(() => pt(c.value)), { __sfc: !0, SCALE_MIXIN_MAP: yt, POSITIONS: bt, TYPES: at, props: r, emit: t, scale: n, containerSize: a, hoveredIndex: o, options: s, orientation: i, mixins: l, tickRefs: u, root: c, ticksWithAttributes: f, chartID: _, computedPosition: m, computedType: p, shouldHover: h, allOptions: g, showTick: v, axisTransform: y, ticks: A, tickFormatter: T, formatTick: k, onTickMouseover: P, isHovering: G, getTickId: N, getTextNode: V, setTicks: j, init: K, VuePortal: qt, VuePortalTarget: te };
860
+ ), G(() => ct(c.value)), { __sfc: !0, SCALE_MIXIN_MAP: gt, POSITIONS: yt, TYPES: at, props: r, emit: t, scale: n, containerSize: a, hoveredIndex: o, options: s, orientation: i, mixins: l, tickRefs: u, root: c, ticksWithAttributes: p, chartID: v, computedPosition: g, computedType: f, shouldHover: _, allOptions: h, showTick: y, axisTransform: b, ticks: m, tickFormatter: T, formatTick: x, onTickMouseover: S, isHovering: D, getTickId: P, getTextNode: W, setTicks: Z, init: X, VuePortal: te, VuePortalTarget: ee };
961
861
  }
962
862
  });
963
863
  function w(e, t, r, n, a, o, s, i) {
964
864
  var l = typeof e == "function" ? e.options : e;
965
865
  t && (l.render = t, l.staticRenderFns = r, l._compiled = !0), n && (l.functional = !0), o && (l._scopeId = "data-v-" + o);
966
866
  var u;
967
- if (s ? (u = function(_) {
968
- _ = _ || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !_ && typeof __VUE_SSR_CONTEXT__ < "u" && (_ = __VUE_SSR_CONTEXT__), a && a.call(this, _), _ && _._registeredComponents && _._registeredComponents.add(s);
867
+ if (s ? (u = function(v) {
868
+ v = v || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !v && typeof __VUE_SSR_CONTEXT__ < "u" && (v = __VUE_SSR_CONTEXT__), a && a.call(this, v), v && v._registeredComponents && v._registeredComponents.add(s);
969
869
  }, l._ssrRegister = u) : a && (u = i ? function() {
970
870
  a.call(
971
871
  this,
@@ -975,19 +875,19 @@ function w(e, t, r, n, a, o, s, i) {
975
875
  if (l.functional) {
976
876
  l._injectStyles = u;
977
877
  var c = l.render;
978
- l.render = function(m, p) {
979
- return u.call(p), c(m, p);
878
+ l.render = function(g, f) {
879
+ return u.call(f), c(g, f);
980
880
  };
981
881
  } else {
982
- var f = l.beforeCreate;
983
- l.beforeCreate = f ? [].concat(f, u) : [u];
882
+ var p = l.beforeCreate;
883
+ l.beforeCreate = p ? [].concat(p, u) : [u];
984
884
  }
985
885
  return {
986
886
  exports: e,
987
887
  options: l
988
888
  };
989
889
  }
990
- var wn = function() {
890
+ var bn = function() {
991
891
  var t = this, r = t._self._c, n = t._self._setupProxy;
992
892
  return n.scale ? r("g", { ref: "root", staticClass: "axis", attrs: { transform: n.axisTransform, "data-j-axis": "" } }, [n.computedType === "x" ? r("defs", [r("linearGradient", { attrs: { id: "lume-tick-gradient" } }, [r("stop", { attrs: { offset: "0%", "stop-color": "rgba(255,255,255,0)" } }), r("stop", { attrs: { offset: "10%", "stop-color": "var(--lume-chart-background-color)" } }), r("stop", { attrs: { offset: "90%", "stop-color": "var(--lume-chart-background-color)" } }), r("stop", { attrs: { offset: "100%", "stop-color": "rgba(255,255,255,0)" } })], 1)], 1) : t._e(), t._l(n.ticksWithAttributes, function(a, o) {
993
893
  return r(n.VuePortal, { key: `${a.value}_${o}`, attrs: { slim: "", disabled: !n.isHovering(o), to: `${n.chartID}-${n.computedType}-hovered-portal` } }, [r("g", t._b({ staticClass: "axis__tick", class: {
@@ -997,18 +897,18 @@ var wn = function() {
997
897
  return n.onTickMouseover(o);
998
898
  } } }, [r("rect", t._b({ staticClass: "axis__ghost", attrs: { fill: "url(#lume-tick-gradient)" } }, "rect", a.ghost, !1)), r("text", t._b({ ref: "tickRefs", refInFor: !0, staticClass: "axis__label", attrs: { "data-index": o } }, "text", a.label, !1), [t._v(" " + t._s(n.formatTick(a.value)) + " ")])]), n.allOptions.gridLines ? r("line", t._b({ staticClass: "axis__grid-line" }, "line", a.gridLine, !1)) : t._e()])]);
999
899
  }), r(n.VuePortalTarget, { attrs: { name: `${n.chartID}-${n.computedType}-hovered-portal`, slim: "" } })], 2) : t._e();
1000
- }, In = [], Sn = /* @__PURE__ */ w(
1001
- $n,
1002
- wn,
1003
- In,
900
+ }, Tn = [], An = /* @__PURE__ */ w(
901
+ yn,
902
+ bn,
903
+ Tn,
1004
904
  !1,
1005
905
  null,
1006
- "44f74829",
906
+ "d1a0065e",
1007
907
  null,
1008
908
  null
1009
909
  );
1010
- const Rn = Sn.exports;
1011
- function Dn() {
910
+ const On = An.exports;
911
+ function kn() {
1012
912
  const e = L(), t = it({
1013
913
  dimensions: {}
1014
914
  }), r = new ResizeObserver((n) => {
@@ -1016,13 +916,13 @@ function Dn() {
1016
916
  t.dimensions = a.contentRect;
1017
917
  });
1018
918
  });
1019
- return B(() => {
919
+ return G(() => {
1020
920
  r.observe(e.value);
1021
- }), Kt(() => {
921
+ }), Jt(() => {
1022
922
  r.unobserve(e.value);
1023
923
  }), { resizeState: t, resizeRef: e };
1024
924
  }
1025
- const Pn = /* @__PURE__ */ $({
925
+ const xn = /* @__PURE__ */ $({
1026
926
  __name: "lume-chart-container",
1027
927
  props: {
1028
928
  margins: {
@@ -1049,29 +949,29 @@ const Pn = /* @__PURE__ */ $({
1049
949
  right: 0,
1050
950
  top: 0,
1051
951
  bottom: 0
1052
- }, { margins: a, containerSize: o } = I(r), s = L(null), { resizeRef: i, resizeState: l } = Dn(), u = d(() => ({
952
+ }, { margins: a, containerSize: o } = I(r), s = L(null), { resizeRef: i, resizeState: l } = kn(), u = d(() => ({
1053
953
  ...n,
1054
954
  ...a.value
1055
955
  })), c = d(
1056
956
  () => o.value.height + u.value.top + u.value.bottom
1057
957
  );
1058
- return Jt(() => {
958
+ return Qt(() => {
1059
959
  if (!s.value)
1060
960
  return;
1061
- const { width: f } = l.dimensions, { height: _ } = s.value.getBoundingClientRect();
1062
- if (!f || !_)
961
+ const { width: p } = l.dimensions, { height: v } = s.value.getBoundingClientRect();
962
+ if (!p || !v)
1063
963
  return;
1064
- const m = f - u.value.left - u.value.right, p = _ - u.value.top - u.value.bottom, h = {
1065
- width: m > 0 ? m : 0,
1066
- height: p > 0 ? p : 0,
1067
- outerWidth: f,
1068
- outerHeight: _
964
+ const g = p - u.value.left - u.value.right, f = v - u.value.top - u.value.bottom, _ = {
965
+ width: g > 0 ? g : 0,
966
+ height: f > 0 ? f : 0,
967
+ outerWidth: p,
968
+ outerHeight: v
1069
969
  };
1070
- t("resize", h);
970
+ t("resize", _);
1071
971
  }), { __sfc: !0, BASE_MARGINS: n, props: r, emit: t, margins: a, containerSize: o, root: s, resizeRef: i, resizeState: l, computedMargins: u, svgHeight: c };
1072
972
  }
1073
973
  });
1074
- var En = function() {
974
+ var Ln = function() {
1075
975
  var t = this, r = t._self._c, n = t._self._setupProxy;
1076
976
  return r("div", { ref: "resizeRef", staticClass: "lume-chart-container", class: {
1077
977
  "lume-chart-container--minimum": !t.noMinSize
@@ -1080,17 +980,17 @@ var En = function() {
1080
980
  }, attrs: { height: n.svgHeight, "data-j-chart-container__root": "" }, on: { mouseleave: function(a) {
1081
981
  return t.$emit("mouseleave", a);
1082
982
  } } }, [r("g", { staticClass: "lume-chart-container__group", attrs: { transform: `translate(${n.computedMargins.left}, ${n.computedMargins.top})`, "data-j-chart-container__group": "" } }, [t._t("default")], 2)]), t._t("footer"), t._t("extra")], 2);
1083
- }, Cn = [], Nn = /* @__PURE__ */ w(
1084
- Pn,
1085
- En,
1086
- Cn,
983
+ }, $n = [], wn = /* @__PURE__ */ w(
984
+ xn,
985
+ Ln,
986
+ $n,
1087
987
  !1,
1088
988
  null,
1089
989
  "136a2456",
1090
990
  null,
1091
991
  null
1092
992
  );
1093
- const Bn = Nn.exports, Hn = /* @__PURE__ */ $({
993
+ const In = wn.exports, Sn = /* @__PURE__ */ $({
1094
994
  __name: "lume-chart-legend",
1095
995
  props: {
1096
996
  data: {
@@ -1104,24 +1004,24 @@ const Bn = Nn.exports, Hn = /* @__PURE__ */ $({
1104
1004
  return { __sfc: !0, emit: t };
1105
1005
  }
1106
1006
  });
1107
- var Gn = function() {
1007
+ var Dn = function() {
1108
1008
  var t = this, r = t._self._c, n = t._self._setupProxy;
1109
1009
  return r("div", { staticClass: "lume-chart-legend", attrs: { "data-j-chart-legend": "" } }, t._l(t.data, function(a, o) {
1110
1010
  return r("div", { key: `legend-item-${o}`, staticClass: "lume-chart-legend__item lume-typography--body", attrs: { tabindex: "0", "data-j-chart-legend__symbol-wrapper": "" }, on: { click: function(s) {
1111
1011
  return n.emit("click", o);
1112
1012
  } } }, [r("span", { staticClass: "lume-chart-legend__symbol", class: `lume-background-color--${a.color}`, attrs: { "data-j-chart-legend__symbol": "" } }), t._v(" " + t._s(a.label) + " ")]);
1113
1013
  }), 0);
1114
- }, Vn = [], jn = /* @__PURE__ */ w(
1115
- Hn,
1116
- Gn,
1117
- Vn,
1014
+ }, Rn = [], Pn = /* @__PURE__ */ w(
1015
+ Sn,
1016
+ Dn,
1017
+ Rn,
1118
1018
  !1,
1119
1019
  null,
1120
1020
  "0cbb8403",
1121
1021
  null,
1122
1022
  null
1123
1023
  );
1124
- const Fn = jn.exports, Mn = /* @__PURE__ */ $({
1024
+ const En = Pn.exports, Cn = /* @__PURE__ */ $({
1125
1025
  __name: "lume-tooltip",
1126
1026
  props: {
1127
1027
  targetElement: {
@@ -1135,7 +1035,7 @@ const Fn = jn.exports, Mn = /* @__PURE__ */ $({
1135
1035
  position: {
1136
1036
  type: String,
1137
1037
  default: "auto",
1138
- validator: (e) => Ke.includes(e)
1038
+ validator: (e) => ln.includes(e)
1139
1039
  },
1140
1040
  fixedPositioning: {
1141
1041
  type: Boolean,
@@ -1153,13 +1053,13 @@ const Fn = jn.exports, Mn = /* @__PURE__ */ $({
1153
1053
  type: String,
1154
1054
  default: null
1155
1055
  },
1156
- ...dt()
1056
+ ...lt()
1157
1057
  },
1158
1058
  setup(e) {
1159
- const t = e, r = L(null), { items: n, options: a } = I(t), o = L(null), { allOptions: s } = C(a), i = d(
1059
+ const t = e, r = L(null), { items: n, options: a } = I(t), o = L(null), { allOptions: s } = B(a), i = d(
1160
1060
  () => {
1161
- var g;
1162
- return (g = s.value.fixedPositioning) != null ? g : t.fixedPositioning;
1061
+ var h;
1062
+ return (h = s.value.fixedPositioning) != null ? h : t.fixedPositioning;
1163
1063
  }
1164
1064
  ), l = d(
1165
1065
  () => i.value ? "fixed" : "absolute"
@@ -1177,54 +1077,54 @@ const Fn = jn.exports, Mn = /* @__PURE__ */ $({
1177
1077
  ...t.modifiers || []
1178
1078
  ]), c = d(
1179
1079
  () => s.value.showTitle !== !1 && t.title != null
1180
- ), f = d(() => It(s.value.valueFormat)), _ = d(
1080
+ ), p = d(() => Lt(s.value.valueFormat)), v = d(
1181
1081
  () => {
1182
- var g, v;
1183
- return ((g = n.value) == null ? void 0 : g.find((y) => y.isSummary)) || {
1184
- label: (v = s.value.summary) != null ? v : t.summary
1082
+ var h, y;
1083
+ return ((h = n.value) == null ? void 0 : h.find((b) => b.isSummary)) || {
1084
+ label: (y = s.value.summary) != null ? y : t.summary
1185
1085
  };
1186
1086
  }
1187
1087
  );
1188
- function m() {
1189
- t.targetElement && r.value && (o.value = Se(t.targetElement, r.value, {
1088
+ function g() {
1089
+ t.targetElement && r.value && (o.value = Re(t.targetElement, r.value, {
1190
1090
  placement: t.position,
1191
1091
  strategy: l.value,
1192
1092
  modifiers: u.value
1193
1093
  }));
1194
1094
  }
1195
- function p() {
1095
+ function f() {
1196
1096
  o.value && o.value.destroy();
1197
1097
  }
1198
- function h() {
1098
+ function _() {
1199
1099
  !o.value || (r.value.classList.add("lume-tooltip--animated"), t.targetElement ? function() {
1200
1100
  o.value.state.elements.reference = t.targetElement, o.value.update();
1201
- }() : p());
1101
+ }() : f());
1202
1102
  }
1203
- return D(() => t.targetElement, h), B(m), Kt(p), { __sfc: !0, props: t, root: r, items: n, options: a, popper: o, allOptions: s, computedFixedPositioning: i, strategy: l, allModifiers: u, showTitle: c, formatValue: f, summaryItem: _, initPopper: m, destroyPopper: p, updatePopper: h };
1103
+ return C(() => t.targetElement, _), G(g), Jt(f), { __sfc: !0, props: t, root: r, items: n, options: a, popper: o, allOptions: s, computedFixedPositioning: i, strategy: l, allModifiers: u, showTitle: c, formatValue: p, summaryItem: v, initPopper: g, destroyPopper: f, updatePopper: _ };
1204
1104
  }
1205
1105
  });
1206
- var zn = function() {
1106
+ var Nn = function() {
1207
1107
  var t = this, r = t._self._c, n = t._self._setupProxy;
1208
1108
  return r("div", { ref: "root", staticClass: "lume-tooltip lume-typography--caption", attrs: { "data-j-tooltip": "" } }, [t._t("default", function() {
1209
1109
  return [n.showTitle ? r("div", { staticClass: "lume-tooltip__title", attrs: { "data-j-tooltip__title": "" } }, [t._v(" " + t._s(t.title) + " ")]) : t._e(), r("ul", { staticClass: "lume-tooltip__items" }, [n.summaryItem.label ? [r("li", { staticClass: "lume-tooltip__item", attrs: { "data-j-tooltip__summary-item": "" } }, [r("span", [t._v(" " + t._s(n.summaryItem.label) + " ")]), n.summaryItem.value ? r("strong", { staticClass: "lume-tooltip__value" }, [t._v(" " + t._s(n.formatValue(n.summaryItem.value)) + " ")]) : t._e()]), t._m(0)] : t._e(), t._l(n.items, function(a) {
1210
1110
  return r("li", { key: a.label, staticClass: "lume-tooltip__item", attrs: { "data-j-tooltip__item": "" } }, [r("span", { staticClass: "lume-tooltip__symbol", class: [`lume-background-color--${a.color}`], attrs: { "data-j-tooltip__item__symbol": "" } }), r("span", { attrs: { "data-j-tooltip__item__label": "" } }, [t._v(" " + t._s(a.label) + " ")]), r("strong", { staticClass: "lume-tooltip__value", attrs: { "data-j-tooltip__item__value": "" } }, [t._v(" " + t._s(n.formatValue(a.value)) + " ")])]);
1211
1111
  })], 2)];
1212
1112
  })], 2);
1213
- }, Wn = [function() {
1113
+ }, Bn = [function() {
1214
1114
  var e = this, t = e._self._c;
1215
1115
  return e._self._setupProxy, t("li", { staticClass: "lume-tooltip__break" }, [t("hr")]);
1216
- }], Zn = /* @__PURE__ */ w(
1217
- Mn,
1218
- zn,
1219
- Wn,
1116
+ }], Gn = /* @__PURE__ */ w(
1117
+ Cn,
1118
+ Nn,
1119
+ Bn,
1220
1120
  !1,
1221
1121
  null,
1222
1122
  "f861f1d1",
1223
1123
  null,
1224
1124
  null
1225
1125
  );
1226
- const Xn = Zn.exports;
1227
- function Un(e, t, r, n) {
1126
+ const Hn = Gn.exports;
1127
+ function Vn(e, t, r, n) {
1228
1128
  const a = d(() => r.value > 0 && r.value < 1), o = d(
1229
1129
  () => n.value > 0 && n.value < 1
1230
1130
  ), s = d(
@@ -1234,13 +1134,13 @@ function Un(e, t, r, n) {
1234
1134
  );
1235
1135
  return { computedX: s, computedY: i, shouldHaveMinWidth: a, shouldHaveMinHeight: o };
1236
1136
  }
1237
- function Yn(e, t, r, n) {
1137
+ function jn(e, t, r, n) {
1238
1138
  const a = L(0), o = L(0), s = d(() => `${e.value + r.value / 2}px ${t.value + n.value / 2}px`);
1239
- return B(() => {
1139
+ return G(() => {
1240
1140
  a.value = r.value, o.value = n.value;
1241
- }), D(r, (i) => a.value = i), D(n, (i) => o.value = i), { computedWidth: a, computedHeight: o, transformOrigin: s };
1141
+ }), C(r, (i) => a.value = i), C(n, (i) => o.value = i), { computedWidth: a, computedHeight: o, transformOrigin: s };
1242
1142
  }
1243
- const Kn = /* @__PURE__ */ $({
1143
+ const Fn = /* @__PURE__ */ $({
1244
1144
  __name: "lume-bar",
1245
1145
  props: {
1246
1146
  x: {
@@ -1279,11 +1179,11 @@ const Kn = /* @__PURE__ */ $({
1279
1179
  setup(e) {
1280
1180
  const t = e, { x: r, y: n, width: a, height: o, transition: s, classList: i } = I(t), l = L(null), u = d(
1281
1181
  () => typeof i.value == "string" ? [i.value] : i.value
1282
- ), c = d(() => s.value === "width"), f = d(() => s.value === "height"), _ = Yn(r, n, a, o), { computedX: m, computedY: p, shouldHaveMinWidth: h, shouldHaveMinHeight: g } = Un(r, n, a, o), v = d(() => h.value ? 1 : (c.value ? _.computedWidth : a).value), y = d(() => g.value ? 1 : (f.value ? _.computedHeight : o).value), A = c.value || f.value ? _.transformOrigin : null;
1283
- return B(() => pt(l.value)), { __sfc: !0, props: t, x: r, y: n, width: a, height: o, transition: s, classList: i, root: l, computedClasses: u, shouldTransitionWidth: c, shouldTransitionHeight: f, transitionProps: _, computedX: m, computedY: p, shouldHaveMinWidth: h, shouldHaveMinHeight: g, computedWidth: v, computedHeight: y, transformOrigin: A };
1182
+ ), c = d(() => s.value === "width"), p = d(() => s.value === "height"), v = jn(r, n, a, o), { computedX: g, computedY: f, shouldHaveMinWidth: _, shouldHaveMinHeight: h } = Vn(r, n, a, o), y = d(() => _.value ? 1 : (c.value ? v.computedWidth : a).value), b = d(() => h.value ? 1 : (p.value ? v.computedHeight : o).value), m = c.value || p.value ? v.transformOrigin : null;
1183
+ return G(() => ct(l.value)), { __sfc: !0, props: t, x: r, y: n, width: a, height: o, transition: s, classList: i, root: l, computedClasses: u, shouldTransitionWidth: c, shouldTransitionHeight: p, transitionProps: v, computedX: g, computedY: f, shouldHaveMinWidth: _, shouldHaveMinHeight: h, computedWidth: y, computedHeight: b, transformOrigin: m };
1284
1184
  }
1285
1185
  });
1286
- var Jn = function() {
1186
+ var Mn = function() {
1287
1187
  var t = this, r = t._self._c, n = t._self._setupProxy;
1288
1188
  return r("rect", { ref: "root", staticClass: "lume-bar", class: [
1289
1189
  {
@@ -1294,17 +1194,17 @@ var Jn = function() {
1294
1194
  },
1295
1195
  ...n.computedClasses
1296
1196
  ], style: { transformOrigin: n.transformOrigin }, attrs: { x: n.computedX, y: n.computedY, width: n.computedWidth, height: n.computedHeight, "data-j-bar": "" } });
1297
- }, Qn = [], qn = /* @__PURE__ */ w(
1298
- Kn,
1299
- Jn,
1300
- Qn,
1197
+ }, zn = [], Wn = /* @__PURE__ */ w(
1198
+ Fn,
1199
+ Mn,
1200
+ zn,
1301
1201
  !1,
1302
1202
  null,
1303
1203
  "08915152",
1304
1204
  null,
1305
1205
  null
1306
1206
  );
1307
- const St = qn.exports, Bt = 2, tr = /* @__PURE__ */ $({
1207
+ const It = Wn.exports, Nt = 2, Zn = /* @__PURE__ */ $({
1308
1208
  __name: "lume-line",
1309
1209
  props: {
1310
1210
  pathDefinition: {
@@ -1313,11 +1213,11 @@ const St = qn.exports, Bt = 2, tr = /* @__PURE__ */ $({
1313
1213
  },
1314
1214
  width: {
1315
1215
  type: Number,
1316
- default: Bt
1216
+ default: Nt
1317
1217
  },
1318
1218
  color: {
1319
1219
  type: String,
1320
- default: E.Skyblue
1220
+ default: N.Skyblue
1321
1221
  },
1322
1222
  dashed: {
1323
1223
  type: Boolean,
@@ -1338,10 +1238,10 @@ const St = qn.exports, Bt = 2, tr = /* @__PURE__ */ $({
1338
1238
  },
1339
1239
  setup(e) {
1340
1240
  const t = L(null);
1341
- return B(() => pt(t.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: Bt, root: t };
1241
+ return G(() => ct(t.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: Nt, root: t };
1342
1242
  }
1343
1243
  });
1344
- var er = function() {
1244
+ var Xn = function() {
1345
1245
  var t = this, r = t._self._c;
1346
1246
  return t._self._setupProxy, r("path", { ref: "root", staticClass: "lume-line", class: {
1347
1247
  [`lume-stroke--${t.color}`]: !0,
@@ -1351,28 +1251,28 @@ var er = function() {
1351
1251
  animationDelay: t.transition && t.animationDelay + "s",
1352
1252
  animationDuration: t.transition && t.animationDuration + "s"
1353
1253
  }, attrs: { d: t.pathDefinition, "stroke-width": t.width, "data-j-line": "" } });
1354
- }, nr = [], rr = /* @__PURE__ */ w(
1355
- tr,
1356
- er,
1357
- nr,
1254
+ }, Un = [], Yn = /* @__PURE__ */ w(
1255
+ Zn,
1256
+ Xn,
1257
+ Un,
1358
1258
  !1,
1359
1259
  null,
1360
1260
  "00afaa24",
1361
1261
  null,
1362
1262
  null
1363
1263
  );
1364
- const ar = rr.exports, Ht = 4, or = /* @__PURE__ */ $({
1264
+ const Kn = Yn.exports, Bt = 4, Jn = /* @__PURE__ */ $({
1365
1265
  __name: "lume-point",
1366
1266
  props: {
1367
1267
  x: { type: Number, required: !0 },
1368
1268
  y: { type: Number, required: !0 },
1369
1269
  color: {
1370
1270
  type: String,
1371
- default: E.Skyblue
1271
+ default: N.Skyblue
1372
1272
  },
1373
1273
  radius: {
1374
1274
  type: Number,
1375
- default: Ht
1275
+ default: Bt
1376
1276
  },
1377
1277
  active: {
1378
1278
  type: Boolean,
@@ -1381,23 +1281,124 @@ const ar = rr.exports, Ht = 4, or = /* @__PURE__ */ $({
1381
1281
  },
1382
1282
  setup(e) {
1383
1283
  const t = e, r = L(null), n = d(() => t.radius / 2);
1384
- return B(() => pt(r.value)), { __sfc: !0, DEFAULT_RADIUS: Ht, props: t, root: r, strokeWidth: n };
1284
+ return G(() => ct(r.value)), { __sfc: !0, DEFAULT_RADIUS: Bt, props: t, root: r, strokeWidth: n };
1385
1285
  }
1386
1286
  });
1387
- var sr = function() {
1287
+ var Qn = function() {
1388
1288
  var t = this, r = t._self._c, n = t._self._setupProxy;
1389
1289
  return r("circle", { ref: "root", staticClass: "lume-point", class: `lume-stroke--${t.color}`, attrs: { cx: t.x, cy: t.y, r: t.active ? t.radius : 0, "stroke-width": n.strokeWidth, "data-j-point": "" } });
1390
- }, ir = [], ur = /* @__PURE__ */ w(
1391
- or,
1392
- sr,
1393
- ir,
1290
+ }, qn = [], tr = /* @__PURE__ */ w(
1291
+ Jn,
1292
+ Qn,
1293
+ qn,
1394
1294
  !1,
1395
1295
  null,
1396
1296
  "5a728c02",
1397
1297
  null,
1398
1298
  null
1399
1299
  );
1400
- const lr = ur.exports, cr = () => ({
1300
+ const er = tr.exports;
1301
+ var V = /* @__PURE__ */ ((e) => (e.Categorical = "categorical", e.Sequential = "sequential", e.Divergent = "divergent", e))(V || {});
1302
+ const nr = V.Categorical, dt = N.Skyblue, rr = $t.SkyTeal;
1303
+ function ar(e) {
1304
+ return e === V.Divergent ? rr : dt;
1305
+ }
1306
+ function or(e) {
1307
+ return Object.values(wt).includes(e);
1308
+ }
1309
+ function Gt(e, t) {
1310
+ return t === V.Divergent ? Object.values($t).includes(e) : Object.values({
1311
+ ...N,
1312
+ ...oe,
1313
+ ...se,
1314
+ ...wt
1315
+ }).includes(e);
1316
+ }
1317
+ function sr(e, t) {
1318
+ const r = Object.values(N).indexOf(e);
1319
+ return Qe(Object.values(N), r > -1 ? r : 0)[t];
1320
+ }
1321
+ function ir(e, t) {
1322
+ const r = 50 + t * 10;
1323
+ return `${e}-${r}`;
1324
+ }
1325
+ function ur(e, t) {
1326
+ const r = (t + 1) * 10;
1327
+ return `${e}-${r}`;
1328
+ }
1329
+ function Ht(e, t, r) {
1330
+ switch (t) {
1331
+ default:
1332
+ case V.Categorical:
1333
+ return or(e) ? e : sr(e, r);
1334
+ case V.Sequential:
1335
+ return ir(e, r);
1336
+ case V.Divergent:
1337
+ return ur(e, r);
1338
+ }
1339
+ }
1340
+ function lr(e, t, r = nr, n) {
1341
+ return Gt(e, r) ? e : (n > 4 && (ut(tt.ColorLoop), n = n % 5), Gt(t, r) ? Ht(t, r, n) : Ht(ar(r), r, n));
1342
+ }
1343
+ function cr(e) {
1344
+ return e.map((t) => Xe(t) ? t : { value: t });
1345
+ }
1346
+ function dr(e) {
1347
+ return e.__internal === !0;
1348
+ }
1349
+ const le = (e = null) => ({
1350
+ data: {
1351
+ type: Array,
1352
+ required: !0,
1353
+ validator: e || void 0
1354
+ },
1355
+ labels: {
1356
+ type: Array,
1357
+ default: void 0
1358
+ },
1359
+ color: {
1360
+ type: String,
1361
+ default: N.Skyblue
1362
+ }
1363
+ });
1364
+ function St(e, t, r, n, a) {
1365
+ const o = it({
1366
+ width: 0,
1367
+ height: 0
1368
+ }), s = qe(12), i = d(() => {
1369
+ var c;
1370
+ return e.value.length > 5 && ut(tt.DatasetLength), (c = e.value) == null ? void 0 : c.map(
1371
+ (p, v) => {
1372
+ if (dr(p))
1373
+ return p;
1374
+ const g = cr(p.values), f = lr(
1375
+ p.color,
1376
+ r == null ? void 0 : r.value,
1377
+ n == null ? void 0 : n.value.colorPalette,
1378
+ v
1379
+ );
1380
+ return {
1381
+ ...p,
1382
+ values: g,
1383
+ color: f,
1384
+ __internal: !0
1385
+ };
1386
+ }
1387
+ );
1388
+ }), l = d(() => Array.isArray(t.value) ? t.value : mt(e.value).map((c, p) => p));
1389
+ function u(c) {
1390
+ const p = (a == null ? void 0 : a.value) === A.HORIZONTAL ? mt(e).length * (an * 2) : c.height;
1391
+ o.width = c.width, o.height = p;
1392
+ }
1393
+ return {
1394
+ chartID: s,
1395
+ computedLabels: l,
1396
+ containerSize: o,
1397
+ internalData: i,
1398
+ updateSize: u
1399
+ };
1400
+ }
1401
+ const pr = () => ({
1401
1402
  xScale: {
1402
1403
  type: Function,
1403
1404
  default: null
@@ -1407,59 +1408,59 @@ const lr = ur.exports, cr = () => ({
1407
1408
  default: null
1408
1409
  }
1409
1410
  });
1410
- function dr(e, t, r, n, a) {
1411
+ function fr(e, t, r, n, a) {
1411
1412
  const o = L(null), s = L(null);
1412
1413
  function i() {
1413
1414
  const { width: l, height: u } = r;
1414
- !l && !u || !t.value || !e.value || (n.value === b.HORIZONTAL ? (o.value = Vt(
1415
+ !l && !u || !t.value || !e.value || (n.value === A.HORIZONTAL ? (o.value = jt(
1415
1416
  e.value,
1416
1417
  l,
1417
1418
  n.value,
1418
1419
  a.value.startOnZero
1419
- ), s.value = Gt(t.value, u)) : (o.value = Gt(t.value, l), s.value = Vt(
1420
+ ), s.value = Vt(t.value, u)) : (o.value = Vt(t.value, l), s.value = jt(
1420
1421
  e.value,
1421
1422
  u,
1422
1423
  n.value,
1423
1424
  a.value.startOnZero
1424
1425
  )));
1425
1426
  }
1426
- return Jt(i), { xScale: o, yScale: s };
1427
+ return Qt(i), { xScale: o, yScale: s };
1427
1428
  }
1428
- function Gt(e, t) {
1429
+ function Vt(e, t) {
1429
1430
  const r = [0, t];
1430
1431
  return Object.assign(
1431
1432
  Q().range(r).domain(e.map((n, a) => a)),
1432
1433
  { labels: e }
1433
1434
  );
1434
1435
  }
1435
- function Vt(e, t, r, n) {
1436
- const a = oe(e).filter((c) => c != null), o = [0, t];
1436
+ function jt(e, t, r, n) {
1437
+ const a = re(e).filter((c) => c != null), o = [0, t];
1437
1438
  if (a.length === 0)
1438
1439
  return q().range(o).domain([0, 0]).nice();
1439
- const s = Math.min(...a), i = n && s > 0 ? 0 : s, l = Math.max(...a), u = r === b.HORIZONTAL ? [i, l] : [l, i];
1440
+ const s = Math.min(...a), i = n && s > 0 ? 0 : s, l = Math.max(...a), u = r === A.HORIZONTAL ? [i, l] : [l, i];
1440
1441
  return q().range(o).domain(u).nice();
1441
1442
  }
1442
- function jt(e) {
1443
+ function Ft(e) {
1443
1444
  return (e == null ? void 0 : e.range) !== void 0 || (e == null ? void 0 : e.copy) !== void 0;
1444
1445
  }
1445
- function Tt(e, t) {
1446
- return z(e) ? e.bandwidth() / 2 + e(e.domain()[t]) : e(t);
1446
+ function bt(e, t) {
1447
+ return F(e) ? e.bandwidth() / 2 + e(e.domain()[t]) : e(t);
1447
1448
  }
1448
1449
  function ot(e, t, {
1449
1450
  padding: r,
1450
1451
  paddingInner: n,
1451
1452
  paddingOuter: a
1452
1453
  } = {}) {
1453
- const o = r != null ? r : t === b.HORIZONTAL ? Ue : Xe;
1454
+ const o = r != null ? r : t === A.HORIZONTAL ? sn : on;
1454
1455
  return e.copy().paddingInner(n != null ? n : o).paddingOuter(a != null ? a : o / 2);
1455
1456
  }
1456
- function le(e) {
1457
- return Object.values(b).includes(e);
1457
+ function ce(e) {
1458
+ return Object.values(A).includes(e);
1458
1459
  }
1459
- const Z = (e, t = !0, r = !0) => ({
1460
- ...ie(e),
1461
- ...r ? cr() : {},
1462
- ...dt(),
1460
+ const z = (e, t = !0, r = !0) => ({
1461
+ ...le(e),
1462
+ ...r ? pr() : {},
1463
+ ...lt(),
1463
1464
  title: {
1464
1465
  type: String,
1465
1466
  default: null
@@ -1467,15 +1468,15 @@ const Z = (e, t = !0, r = !0) => ({
1467
1468
  ...t ? {
1468
1469
  orientation: {
1469
1470
  type: String,
1470
- default: b.VERTICAL,
1471
- validator: le
1471
+ default: A.VERTICAL,
1472
+ validator: ce
1472
1473
  }
1473
1474
  } : {},
1474
1475
  classList: {
1475
1476
  type: [String, Array],
1476
1477
  default: () => []
1477
1478
  }
1478
- }), ft = () => ({
1479
+ }), pt = () => ({
1479
1480
  data: {
1480
1481
  type: Array,
1481
1482
  required: !0
@@ -1490,8 +1491,8 @@ const Z = (e, t = !0, r = !0) => ({
1490
1491
  },
1491
1492
  orientation: {
1492
1493
  type: String,
1493
- default: b.VERTICAL,
1494
- validator: le
1494
+ default: A.VERTICAL,
1495
+ validator: ce
1495
1496
  },
1496
1497
  xScale: {
1497
1498
  type: Function,
@@ -1517,59 +1518,59 @@ const Z = (e, t = !0, r = !0) => ({
1517
1518
  type: [String, Array],
1518
1519
  default: () => []
1519
1520
  }
1520
- }), pr = /* @__PURE__ */ $({
1521
+ }), vr = /* @__PURE__ */ $({
1521
1522
  __name: "lume-overlay-group",
1522
1523
  props: {
1523
- ...ft(),
1524
+ ...pt(),
1524
1525
  orientation: {
1525
1526
  type: String,
1526
- default: b.VERTICAL
1527
+ default: A.VERTICAL
1527
1528
  }
1528
1529
  },
1529
1530
  emits: ["mouseover"],
1530
1531
  setup(e, { emit: t }) {
1531
- const r = e, { data: n, orientation: a, xScale: o, yScale: s } = I(r), i = d(() => gt(n));
1532
+ const r = e, { data: n, orientation: a, xScale: o, yScale: s } = I(r), i = d(() => mt(n));
1532
1533
  function l(u) {
1533
- const c = a.value === b.HORIZONTAL ? s.value : o.value, f = c.domain(), _ = wt(c), m = z(c) ? c(f[u]) : c(u) - _ / 2;
1534
- return a.value === b.HORIZONTAL ? {
1534
+ const c = a.value === A.HORIZONTAL ? s.value : o.value, p = c.domain(), v = xt(c), g = F(c) ? c(p[u]) : c(u) - v / 2;
1535
+ return a.value === A.HORIZONTAL ? {
1535
1536
  width: Math.max(...o.value.range()),
1536
- height: _,
1537
- transform: `translate(0, ${m})`
1537
+ height: v,
1538
+ transform: `translate(0, ${g})`
1538
1539
  } : {
1539
- width: _,
1540
+ width: v,
1540
1541
  height: Math.max(...s.value.range()),
1541
- transform: `translate(${m}, 0)`
1542
+ transform: `translate(${g}, 0)`
1542
1543
  };
1543
1544
  }
1544
- return { __sfc: !0, props: r, emit: t, data: n, orientation: a, xScale: o, yScale: s, overlayData: i, getOverlayBarAttributes: l, LumeBar: St };
1545
+ return { __sfc: !0, props: r, emit: t, data: n, orientation: a, xScale: o, yScale: s, overlayData: i, getOverlayBarAttributes: l, LumeBar: It };
1545
1546
  }
1546
1547
  });
1547
- var fr = function() {
1548
+ var _r = function() {
1548
1549
  var t = this, r = t._self._c, n = t._self._setupProxy;
1549
1550
  return r("g", { staticClass: "lume-overlay-group" }, t._l(n.overlayData, function(a, o) {
1550
1551
  return r(n.LumeBar, t._b({ key: `overlay-${o}`, attrs: { "data-j-lume-overlay-group": o, transition: !1, "class-list": "lume-fill--transparent" }, nativeOn: { mouseover: function(s) {
1551
1552
  return n.emit("mouseover", o);
1552
1553
  } } }, "lume-bar", n.getOverlayBarAttributes(o), !1));
1553
1554
  }), 1);
1554
- }, vr = [], _r = /* @__PURE__ */ w(
1555
- pr,
1556
- fr,
1555
+ }, hr = [], mr = /* @__PURE__ */ w(
1557
1556
  vr,
1557
+ _r,
1558
+ hr,
1558
1559
  !1,
1559
1560
  null,
1560
1561
  null,
1561
1562
  null,
1562
1563
  null
1563
1564
  );
1564
- const hr = _r.exports;
1565
- function mr(e) {
1565
+ const gr = mr.exports;
1566
+ function yr(e) {
1566
1567
  return { hasNegativeValues: d(
1567
- () => oe(e.value).some((r) => r < 0)
1568
+ () => re(e.value).some((r) => r < 0)
1568
1569
  ) };
1569
1570
  }
1570
- function gr(e, t, r, n) {
1571
+ function br(e, t, r, n) {
1571
1572
  const a = d(
1572
- () => n.value === b.HORIZONTAL
1573
+ () => n.value === A.HORIZONTAL
1573
1574
  ), o = d(
1574
1575
  () => {
1575
1576
  var u;
@@ -1592,38 +1593,44 @@ function gr(e, t, r, n) {
1592
1593
  transform: i.value
1593
1594
  })) };
1594
1595
  }
1595
- function yr(e) {
1596
+ function Tr(e) {
1596
1597
  return e.reduce((t, r) => r.values.map((n, a) => {
1597
1598
  var o;
1598
1599
  return t[a] ? n.value > t[a] ? n.value : t[a] : (o = n.value) != null ? o : 0;
1599
1600
  }), []);
1600
1601
  }
1601
- function br(e) {
1602
+ function Ar(e) {
1602
1603
  return e.reduce((t, r) => r.values.map((n, a) => {
1603
1604
  var o;
1604
1605
  return t[a] ? n.value + t[a] : (o = n.value) != null ? o : 0;
1605
1606
  }), []);
1606
1607
  }
1607
- const Ft = {
1608
- "stacked-bar": br
1609
- }, Mt = L(null);
1610
- function ce(e, t, r, n, a) {
1611
- function o(s) {
1612
- const i = (a == null ? void 0 : a.value) && Ft[a.value] ? Ft[a.value](s) : yr(s);
1613
- Mt.value = i.map((l, u) => ({
1614
- cx: (r == null ? void 0 : r.value) === b.HORIZONTAL ? e.value(l) : Tt(e.value, u),
1615
- cy: (r == null ? void 0 : r.value) === b.HORIZONTAL ? Tt(t.value, u) : t.value(l)
1608
+ const Mt = {
1609
+ "stacked-bar": Ar
1610
+ };
1611
+ function de(e, t, r, n, a, o, s) {
1612
+ const i = d(
1613
+ () => {
1614
+ var u;
1615
+ return t.value.withTooltip !== !1 && !((u = t.value.tooltipOptions) != null && u.targetElement);
1616
+ }
1617
+ );
1618
+ function l(u) {
1619
+ const c = (s == null ? void 0 : s.value) && Mt[s.value] ? Mt[s.value](u) : Tr(u);
1620
+ e.value = c.map((p, v) => ({
1621
+ cx: (a == null ? void 0 : a.value) === A.HORIZONTAL ? r.value(p) : bt(r.value, v),
1622
+ cy: (a == null ? void 0 : a.value) === A.HORIZONTAL ? bt(n.value, v) : n.value(p)
1616
1623
  }));
1617
1624
  }
1618
- return D(
1619
- [e, t],
1625
+ return C(
1626
+ [r, n],
1620
1627
  () => {
1621
- e.value && t.value && (n == null ? void 0 : n.value) && o(n.value);
1628
+ r.value && n.value && (o == null ? void 0 : o.value) && i.value && l(o.value);
1622
1629
  },
1623
1630
  { immediate: !0 }
1624
- ), { tooltipAnchorAttributes: Mt, updateTooltipAnchorAttributes: o };
1631
+ ), { shouldGenerateTooltipAnchors: i, updateTooltipAnchorAttributes: l };
1625
1632
  }
1626
- function Tr() {
1633
+ function Or() {
1627
1634
  const e = it({
1628
1635
  opened: !1,
1629
1636
  targetElement: null
@@ -1634,22 +1641,22 @@ function Tr() {
1634
1641
  e.opened = !1, e.targetElement = null;
1635
1642
  } };
1636
1643
  }
1637
- function Ar(e) {
1644
+ function kr(e) {
1638
1645
  return { getTooltipItems: d(
1639
1646
  () => (r) => e.value.map(({ color: n, label: a, values: o }) => {
1640
1647
  var s, i, l, u, c;
1641
1648
  return {
1642
1649
  color: ((s = o[r]) == null ? void 0 : s.color) || n,
1643
1650
  label: a,
1644
- value: (c = (u = (i = o[r]) == null ? void 0 : i.label) != null ? u : (l = o[r]) == null ? void 0 : l.value) != null ? c : re
1651
+ value: (c = (u = (i = o[r]) == null ? void 0 : i.label) != null ? u : (l = o[r]) == null ? void 0 : l.value) != null ? c : ie
1645
1652
  };
1646
1653
  })
1647
1654
  ) };
1648
1655
  }
1649
- const Or = /* @__PURE__ */ $({
1656
+ const xr = /* @__PURE__ */ $({
1650
1657
  __name: "lume-chart",
1651
1658
  props: {
1652
- ...Z(),
1659
+ ...z(),
1653
1660
  chartType: {
1654
1661
  type: String,
1655
1662
  default: null
@@ -1657,86 +1664,77 @@ const Or = /* @__PURE__ */ $({
1657
1664
  },
1658
1665
  emits: ["click"],
1659
1666
  setup(e, { emit: t }) {
1660
- const r = e, n = H(), a = Ye, { data: o, labels: s, color: i, options: l, orientation: u, chartType: c } = I(r), f = L(-1), _ = L(null), m = L(null), { allOptions: p } = C(l), { internalData: h, computedLabels: g, containerSize: v, updateSize: y } = ct(
1661
- o,
1662
- s,
1663
- i,
1664
- p,
1665
- u
1666
- ), { xScale: A, yScale: T } = dr(
1667
+ const r = e, n = H(), a = un, { data: o, labels: s, color: i, options: l, orientation: u, chartType: c } = I(r), p = L(-1), v = L(null), g = L(null), f = L([]), { allOptions: _ } = B(l), { internalData: h, computedLabels: y, containerSize: b, updateSize: m, chartID: T } = St(o, s, i, _, u), { xScale: x, yScale: S } = fr(
1667
1668
  h,
1668
- g,
1669
- v,
1669
+ y,
1670
+ b,
1670
1671
  u,
1671
- p
1672
- ), k = d(() => {
1672
+ _
1673
+ ), D = d(() => {
1673
1674
  var O;
1674
- return r.xScale ? jt(r.xScale) ? r.xScale : (O = r.xScale) == null ? void 0 : O.call(r, h.value, s.value, v) : A.value;
1675
+ return r.xScale ? Ft(r.xScale) ? r.xScale : (O = r.xScale) == null ? void 0 : O.call(r, h.value, s.value, b) : x.value;
1675
1676
  }), P = d(() => {
1676
1677
  var O;
1677
- return r.yScale ? jt(r.yScale) ? r.yScale : (O = r.yScale) == null ? void 0 : O.call(r, h.value, s.value, v) : T.value;
1678
- }), G = d(() => ({
1679
- ...p.value.xAxisOptions,
1680
- withHover: u.value === b.VERTICAL
1681
- })), N = d(() => ({
1682
- ...p.value.yAxisOptions,
1683
- withHover: u.value === b.HORIZONTAL
1684
- })), V = d(() => {
1678
+ return r.yScale ? Ft(r.yScale) ? r.yScale : (O = r.yScale) == null ? void 0 : O.call(r, h.value, s.value, b) : S.value;
1679
+ }), W = d(() => ({
1680
+ ..._.value.xAxisOptions,
1681
+ withHover: u.value === A.VERTICAL
1682
+ })), Z = d(() => ({
1683
+ ..._.value.yAxisOptions,
1684
+ withHover: u.value === A.HORIZONTAL
1685
+ })), X = d(() => {
1685
1686
  var O;
1686
- return (O = p.value.xAxisOptions) == null ? void 0 : O.title;
1687
- }), j = d(() => {
1687
+ return (O = _.value.xAxisOptions) == null ? void 0 : O.title;
1688
+ }), k = d(() => {
1688
1689
  var O;
1689
- return (O = p.value.yAxisOptions) == null ? void 0 : O.title;
1690
- }), K = d(() => {
1690
+ return (O = _.value.yAxisOptions) == null ? void 0 : O.title;
1691
+ }), R = d(() => {
1691
1692
  var O;
1692
- return ((O = p.value.xAxisOptions) == null ? void 0 : O.withTitle) !== !1 && V.value;
1693
- }), x = d(() => {
1693
+ return ((O = _.value.xAxisOptions) == null ? void 0 : O.withTitle) !== !1 && X.value;
1694
+ }), J = d(() => {
1694
1695
  var O;
1695
- return ((O = p.value.yAxisOptions) == null ? void 0 : O.withTitle) !== !1 && j.value;
1696
- }), S = d(
1697
- () => {
1698
- var O;
1699
- return p.value.withTooltip !== !1 && !((O = p.value.tooltipOptions) != null && O.targetElement);
1700
- }
1701
- ), J = d(() => {
1702
- const O = [], { noBaseScales: et } = p.value;
1703
- return et || O.push(() => !!(k.value && P.value)), O.every((_t) => _t() === !0);
1704
- }), { hasNegativeValues: vt } = mr(h), { negativeBarAttributes: he } = gr(
1705
- v,
1706
- k,
1696
+ return ((O = _.value.yAxisOptions) == null ? void 0 : O.withTitle) !== !1 && k.value;
1697
+ }), ft = d(() => {
1698
+ const O = [], { noBaseScales: et } = _.value;
1699
+ return et || O.push(() => !!(D.value && P.value)), O.every((vt) => vt() === !0);
1700
+ }), { hasNegativeValues: me } = yr(h), { negativeBarAttributes: ge } = br(
1701
+ b,
1702
+ D,
1707
1703
  P,
1708
1704
  u
1709
- ), { tooltipAnchorAttributes: me } = ce(
1710
- k,
1705
+ ), { shouldGenerateTooltipAnchors: ye } = de(
1706
+ f,
1707
+ _,
1708
+ D,
1711
1709
  P,
1712
1710
  u,
1713
1711
  h,
1714
1712
  c
1715
- ), { tooltipConfig: ge, showTooltip: Dt, hideTooltip: Pt } = Tr(), { getTooltipItems: ye } = Ar(h), be = d(
1713
+ ), { tooltipConfig: be, showTooltip: Rt, hideTooltip: Pt } = Or(), { getTooltipItems: Te } = kr(h), Ae = d(
1716
1714
  () => {
1717
1715
  var O;
1718
- return ((O = p.value.tooltipOptions) == null ? void 0 : O.position) || "top";
1716
+ return ((O = _.value.tooltipOptions) == null ? void 0 : O.position) || "top";
1719
1717
  }
1720
1718
  );
1721
- function Te(O) {
1719
+ function Oe(O) {
1722
1720
  var et;
1723
- if (p.value.withHover !== !1 && (f.value = O), p.value.withTooltip !== !1) {
1724
- const _t = (et = p.value.tooltipOptions) != null && et.targetElement ? p.value.tooltipOptions.targetElement === "self" ? m.value.$el : p.value.tooltipOptions.targetElement : _.value[O];
1725
- Dt(_t);
1721
+ if (_.value.withHover !== !1 && (p.value = O), _.value.withTooltip !== !1) {
1722
+ const vt = (et = _.value.tooltipOptions) != null && et.targetElement ? _.value.tooltipOptions.targetElement === "self" ? g.value.$el : _.value.tooltipOptions.targetElement : v.value[O];
1723
+ Rt(vt);
1726
1724
  }
1727
1725
  }
1728
- function Ae() {
1729
- Pt(), f.value = -1;
1726
+ function ke() {
1727
+ Pt(), p.value = -1;
1730
1728
  }
1731
- return B(() => {
1729
+ return Et("chartID", T), Et("tooltipAnchorAttributes", f), G(() => {
1732
1730
  var O;
1733
1731
  (O = n.groups) != null && O.call(n) || console.error('"groups" `<slot>` must have content.');
1734
- }), { __sfc: !0, props: r, slots: n, emit: t, tooltipAnchorRadius: a, data: o, labels: s, color: i, options: l, orientation: u, chartType: c, hoveredIndex: f, tooltipAnchor: _, chartContainer: m, allOptions: p, internalData: h, computedLabels: g, containerSize: v, updateSize: y, xScale: A, yScale: T, computedXScale: k, computedYScale: P, computedXAxisOptions: G, computedYAxisOptions: N, xAxisTitle: V, yAxisTitle: j, showXAxisTitle: K, showYAxisTitle: x, shouldGenerateTooltipAnchors: S, isReady: J, hasNegativeValues: vt, negativeBarAttributes: he, tooltipAnchorAttributes: me, tooltipConfig: ge, showTooltip: Dt, hideTooltip: Pt, getTooltipItems: ye, tooltipPosition: be, mouseOverHandler: Te, handleMouseleave: Ae, LumeAxis: Rn, LumeBar: St, LumeChartContainer: Bn, LumeChartLegend: Fn, LumeTooltip: Xn, LumeOverlayGroup: hr };
1732
+ }), { __sfc: !0, props: r, slots: n, emit: t, tooltipAnchorRadius: a, data: o, labels: s, color: i, options: l, orientation: u, chartType: c, hoveredIndex: p, tooltipAnchor: v, chartContainer: g, tooltipAnchorAttributes: f, allOptions: _, internalData: h, computedLabels: y, containerSize: b, updateSize: m, chartID: T, xScale: x, yScale: S, computedXScale: D, computedYScale: P, computedXAxisOptions: W, computedYAxisOptions: Z, xAxisTitle: X, yAxisTitle: k, showXAxisTitle: R, showYAxisTitle: J, isReady: ft, hasNegativeValues: me, negativeBarAttributes: ge, shouldGenerateTooltipAnchors: ye, tooltipConfig: be, showTooltip: Rt, hideTooltip: Pt, getTooltipItems: Te, tooltipPosition: Ae, mouseOverHandler: Oe, handleMouseleave: ke, LumeAxis: On, LumeBar: It, LumeChartContainer: In, LumeChartLegend: En, LumeTooltip: Hn, LumeOverlayGroup: gr };
1735
1733
  }
1736
1734
  });
1737
- var kr = function() {
1735
+ var Lr = function() {
1738
1736
  var t = this, r = t._self._c, n = t._self._setupProxy;
1739
- return r(n.LumeChartContainer, { ref: "chartContainer", attrs: { margins: n.allOptions.margins, "container-size": n.containerSize, "no-min-size": n.allOptions.noMinSize, "transparent-background": n.allOptions.transparentBackground, "data-j-lume-chart": "" }, on: { resize: n.updateSize, mouseleave: n.handleMouseleave }, scopedSlots: t._u([{ key: "header", fn: function() {
1737
+ return r(n.LumeChartContainer, { ref: "chartContainer", attrs: { id: `lume-chart_${n.chartID}`, margins: n.allOptions.margins, "container-size": n.containerSize, "no-min-size": n.allOptions.noMinSize, "transparent-background": n.allOptions.transparentBackground, "data-j-lume-chart": "" }, on: { resize: n.updateSize, mouseleave: n.handleMouseleave }, scopedSlots: t._u([{ key: "header", fn: function() {
1740
1738
  return [r("div", { staticClass: "lume-chart__header" }, [r("div", { staticClass: "lume-chart__header-section" }, [t.title ? r("h1", { staticClass: "lume-chart__title lume-chart-title lume-typography--display" }, [t._v(" " + t._s(t.title) + " ")]) : t._e(), r("div", { staticClass: "lume-chart__controls" }, [t._t("controls")], 2)]), r("div", { staticClass: "lume-chart__header-section" }, [n.showYAxisTitle ? r("h3", { staticClass: "lume-chart__axis-title lume-axis-title lume-typography--body" }, [t._v(" " + t._s(n.yAxisTitle) + " ")]) : t._e(), t._t("legend", function() {
1741
1739
  return [n.allOptions.withLegend !== !1 && n.allOptions.legendPosition !== "bottom" ? r(n.LumeChartLegend, { staticClass: "lume-chart__legend", attrs: { data: n.internalData, "data-j-lume-chart__legend": "" }, on: { click: function(a) {
1742
1740
  return n.emit("click", a);
@@ -1756,20 +1754,20 @@ var kr = function() {
1756
1754
  } } }), r(n.LumeAxis, { attrs: { type: "y", scale: n.computedYScale, "container-size": n.containerSize, options: n.computedYAxisOptions, "hovered-index": n.hoveredIndex, orientation: n.orientation, "data-j-lume-chart__y-axis": "" }, on: { "tick-mouseover": function(a) {
1757
1755
  return n.mouseOverHandler(a);
1758
1756
  } } })];
1759
- }, { xScale: n.computedXScale, yScale: n.computedYScale, containerSize: n.containerSize, options: n.allOptions, hoveredIndex: n.hoveredIndex }) : t._e(), t._t("groups", null, { data: n.internalData, labels: n.computedLabels, options: n.allOptions, orientation: n.orientation, xScale: n.computedXScale, yScale: n.computedYScale, hoveredIndex: n.hoveredIndex, containerSize: n.containerSize, transition: n.allOptions.withTransition !== !1, classList: t.classList }), 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: { mouseover: n.mouseOverHandler } }) : t._e(), n.shouldGenerateTooltipAnchors ? r("g", t._l(n.tooltipAnchorAttributes, function(a) {
1760
- return r("circle", t._b({ key: `anchor-${a.cx}${a.cy}`, ref: "tooltipAnchor", refInFor: !0, staticClass: "lume-fill--transparent", attrs: { r: n.tooltipAnchorRadius } }, "circle", a, !1));
1757
+ }, { xScale: n.computedXScale, yScale: n.computedYScale, containerSize: n.containerSize, options: n.allOptions, hoveredIndex: n.hoveredIndex }) : t._e(), t._t("groups", null, { data: n.internalData, labels: n.computedLabels, options: n.allOptions, orientation: n.orientation, xScale: n.computedXScale, yScale: n.computedYScale, hoveredIndex: n.hoveredIndex, containerSize: n.containerSize, transition: n.allOptions.withTransition !== !1, classList: t.classList }), 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: { mouseover: n.mouseOverHandler } }) : t._e(), n.shouldGenerateTooltipAnchors ? r("g", t._l(n.tooltipAnchorAttributes, function(a, o) {
1758
+ return r("circle", t._b({ key: `anchor_${o}`, ref: "tooltipAnchor", refInFor: !0, staticClass: "lume-fill--transparent", attrs: { r: n.tooltipAnchorRadius } }, "circle", a, !1));
1761
1759
  }), 0) : t._e()] : t._e()], 2);
1762
- }, xr = [], Lr = /* @__PURE__ */ w(
1763
- Or,
1764
- kr,
1760
+ }, $r = [], wr = /* @__PURE__ */ w(
1765
1761
  xr,
1762
+ Lr,
1763
+ $r,
1766
1764
  !1,
1767
1765
  null,
1768
- "7da3eff9",
1766
+ "0d2bef6f",
1769
1767
  null,
1770
1768
  null
1771
1769
  );
1772
- const Y = Lr.exports;
1770
+ const K = wr.exports;
1773
1771
  function zt(e, t) {
1774
1772
  return {
1775
1773
  x0: 0 + (t ? t.left : 0),
@@ -1778,32 +1776,32 @@ function zt(e, t) {
1778
1776
  y1: e.height - (t ? t.bottom : 0)
1779
1777
  };
1780
1778
  }
1781
- function $r(e) {
1779
+ function Ir(e) {
1782
1780
  const t = L(zt(e));
1783
1781
  function r(n) {
1784
1782
  t.value = zt(e, n);
1785
1783
  }
1786
1784
  return { extents: t, updateExtents: r };
1787
1785
  }
1788
- var de = /* @__PURE__ */ ((e) => (e.GraphProblem = "There was an issue generating your alluvial graph.", e))(de || {});
1789
- const wr = "[lume] ";
1790
- function Ir(e, t, r = !0) {
1791
- r && ae() || console.error(wr + "Error: " + e, t);
1786
+ var pe = /* @__PURE__ */ ((e) => (e.GraphProblem = "There was an issue generating your alluvial graph.", e))(pe || {});
1787
+ const Sr = "[lume] ";
1788
+ function Dr(e, t, r = !0) {
1789
+ r && ne() || console.error(Sr + "Error: " + e, t);
1792
1790
  }
1793
- const Wt = 8, Sr = 8, Rr = 200;
1794
- function X(e) {
1791
+ const Wt = 8, Rr = 8, Pr = 200;
1792
+ function U(e) {
1795
1793
  var t;
1796
1794
  return typeof e == "string" || typeof e == "number" ? e : (t = e.id) != null ? t : e.label;
1797
1795
  }
1798
1796
  function st(e) {
1799
1797
  return e.source.id + ":" + e.target.id;
1800
1798
  }
1801
- function pe(e) {
1799
+ function fe(e) {
1802
1800
  return Boolean(
1803
1801
  e.sourceLinks && e.targetLinks
1804
1802
  );
1805
1803
  }
1806
- function Dr(e, t) {
1804
+ function Er(e, t) {
1807
1805
  if (!t)
1808
1806
  return;
1809
1807
  const r = e.nodes.filter((s) => s.targetLinks.length === 0).map((s) => `${s.id}`), n = e.nodes.filter((s) => s.sourceLinks.length === 0).map((s) => `${s.id}`), a = t.filter((s) => r.includes(s.dataset.id)).reduce(
@@ -1820,7 +1818,7 @@ function Dr(e, t) {
1820
1818
  bottom: 0
1821
1819
  };
1822
1820
  }
1823
- function Pr(e) {
1821
+ function Cr(e) {
1824
1822
  return e.map((t) => ({
1825
1823
  x: t.x0,
1826
1824
  y: t.y0,
@@ -1833,13 +1831,13 @@ function Pr(e) {
1833
1831
  node: t
1834
1832
  }));
1835
1833
  }
1836
- function Er(e) {
1837
- const t = Oe();
1834
+ function Nr(e) {
1835
+ const t = xe();
1838
1836
  return e.map((r) => {
1839
1837
  var n;
1840
1838
  return {
1841
1839
  id: st(r),
1842
- color: r.color || ((n = r.source) == null ? void 0 : n.color) || lt,
1840
+ color: r.color || ((n = r.source) == null ? void 0 : n.color) || dt,
1843
1841
  d: t(r),
1844
1842
  strokeWidth: Math.max(1, r.width),
1845
1843
  link: r
@@ -1847,17 +1845,17 @@ function Er(e) {
1847
1845
  });
1848
1846
  }
1849
1847
  function Zt(e, t, r) {
1850
- const n = Date.now(), a = en(t, r), o = () => {
1851
- let i = (Date.now() - n) / Rr;
1852
- i > 1 && (i = 1), U.set(e.node, "transitionValue", a(i)), i < 1 && requestAnimationFrame(o);
1848
+ const n = Date.now(), a = Je(t, r), o = () => {
1849
+ let i = (Date.now() - n) / Pr;
1850
+ i > 1 && (i = 1), Y.set(e.node, "transitionValue", a(i)), i < 1 && requestAnimationFrame(o);
1853
1851
  };
1854
1852
  requestAnimationFrame(o);
1855
1853
  }
1856
- const Cr = {
1854
+ const Br = {
1857
1855
  nodes: [],
1858
1856
  links: []
1859
1857
  };
1860
- function Nr(e, t, r) {
1858
+ function Gr(e, t, r) {
1861
1859
  const n = L(null), a = d(() => {
1862
1860
  var i;
1863
1861
  return (i = e.value) == null ? void 0 : i[0].values.map(({ label: l, color: u, value: c }) => ({
@@ -1870,19 +1868,19 @@ function Nr(e, t, r) {
1870
1868
  return (i = e.value) == null ? void 0 : i[0].values.map(
1871
1869
  (l) => {
1872
1870
  var u;
1873
- return (u = l.targets) == null ? void 0 : u.map(({ node: c, value: f, color: _ }) => {
1874
- var m;
1871
+ return (u = l.targets) == null ? void 0 : u.map(({ node: c, value: p, color: v }) => {
1872
+ var g;
1875
1873
  return {
1876
- color: _,
1877
- source: (m = l.value) != null ? m : l.label,
1874
+ color: v,
1875
+ source: (g = l.value) != null ? g : l.label,
1878
1876
  target: c,
1879
- value: f
1877
+ value: p
1880
1878
  };
1881
1879
  });
1882
1880
  }
1883
1881
  ).filter(Boolean).flat();
1884
- }), s = d(() => ke().nodeId(X).nodeAlign(t.value.nodeAlign).nodePadding(t.value.nodePadding).nodeSort(t.value.nodeSort).nodeWidth(t.value.nodeWidth));
1885
- return D([s, r], () => {
1882
+ }), s = d(() => Le().nodeId(U).nodeAlign(t.value.nodeAlign).nodePadding(t.value.nodePadding).nodeSort(t.value.nodeSort).nodeWidth(t.value.nodeWidth));
1883
+ return C([s, r], () => {
1886
1884
  try {
1887
1885
  const { x0: i, y0: l, x1: u, y1: c } = r.value;
1888
1886
  n.value = s.value.extent([
@@ -1890,62 +1888,62 @@ function Nr(e, t, r) {
1890
1888
  [u, c]
1891
1889
  ])({ nodes: a.value, links: o.value });
1892
1890
  } catch (i) {
1893
- Ir(de.GraphProblem, i), n.value = Cr;
1891
+ Dr(pe.GraphProblem, i), n.value = Br;
1894
1892
  }
1895
1893
  }), { graph: n };
1896
1894
  }
1897
- function At(e, t) {
1895
+ function Tt(e, t) {
1898
1896
  return t || (t = {}), e.targetLinks && e.targetLinks.forEach(({ source: r, value: n }) => {
1899
- t[r.id] = n, At(r, t);
1897
+ t[r.id] = n, Tt(r, t);
1900
1898
  }), t;
1901
1899
  }
1902
- function Ot(e, t) {
1900
+ function At(e, t) {
1903
1901
  return t || (t = {}), e.sourceLinks && e.sourceLinks.forEach(({ target: r, value: n }) => {
1904
- t[r.id] = n, Ot(r, t);
1902
+ t[r.id] = n, At(r, t);
1905
1903
  }), t;
1906
1904
  }
1907
- function Br(e, t) {
1905
+ function Hr(e, t) {
1908
1906
  return t.links.reduce((r, n) => (n.source.id in e && n.target.id in e && r.push(st(n)), r), []);
1909
1907
  }
1910
- const Hr = (e, t) => {
1908
+ const Vr = (e, t) => {
1911
1909
  let r;
1912
- pe(e) ? r = {
1910
+ fe(e) ? r = {
1913
1911
  [e.id]: e.value,
1914
- ...At(e),
1915
- ...Ot(e)
1912
+ ...Tt(e),
1913
+ ...At(e)
1916
1914
  } : r = {
1917
1915
  [e.source.id]: e.source.value,
1918
1916
  [e.target.id]: e.target.value,
1919
- ...At(e.source),
1920
- ...Ot(e.target)
1917
+ ...Tt(e.source),
1918
+ ...At(e.target)
1921
1919
  };
1922
- const n = Br(r, t);
1920
+ const n = Hr(r, t);
1923
1921
  return { nodes: r, links: n };
1924
- }, Gr = (e) => {
1925
- if (pe(e)) {
1922
+ }, jr = (e) => {
1923
+ if (fe(e)) {
1926
1924
  const t = [...e.sourceLinks, ...e.targetLinks];
1927
1925
  return {
1928
1926
  nodes: t.reduce(
1929
- (r, { source: n, target: a, value: o }) => n === e ? { ...r, [X(a)]: o } : { ...r, [X(n)]: o },
1930
- { [X(e)]: e.value }
1927
+ (r, { source: n, target: a, value: o }) => n === e ? { ...r, [U(a)]: o } : { ...r, [U(n)]: o },
1928
+ { [U(e)]: e.value }
1931
1929
  ),
1932
1930
  links: t.map((r) => st(r))
1933
1931
  };
1934
1932
  }
1935
1933
  return {
1936
1934
  nodes: {
1937
- [X(e.target)]: e.value,
1938
- [X(e.source)]: e.source.value
1935
+ [U(e.target)]: e.value,
1936
+ [U(e.source)]: e.source.value
1939
1937
  },
1940
1938
  links: [st(e)]
1941
1939
  };
1942
1940
  };
1943
- function Vr(e, t, r) {
1941
+ function Fr(e, t, r) {
1944
1942
  const n = L(null), a = d(() => n.value ? typeof t.value.highlightedElements == "function" ? t.value.highlightedElements(
1945
1943
  n.value,
1946
1944
  r.value
1947
- ) : t.value.highlightedElements === "closest" ? Gr(n.value, r.value) : Hr(n.value, r.value) : { nodes: {}, links: [] });
1948
- return D(a, (o, s) => {
1945
+ ) : t.value.highlightedElements === "closest" ? jr(n.value, r.value) : Vr(n.value, r.value) : { nodes: {}, links: [] });
1946
+ return C(a, (o, s) => {
1949
1947
  if (o.links.length === 0 && Object.keys(o.nodes).length === 0) {
1950
1948
  e.value.forEach((i) => {
1951
1949
  i.node.id in s.nodes && Zt(
@@ -1965,36 +1963,36 @@ function Vr(e, t, r) {
1965
1963
  });
1966
1964
  }), { highlightedElements: a, hoveredElement: n };
1967
1965
  }
1968
- const jr = /* @__PURE__ */ $({
1966
+ const Mr = /* @__PURE__ */ $({
1969
1967
  __name: "lume-alluvial-group",
1970
1968
  props: {
1971
- ...ft()
1969
+ ...pt()
1972
1970
  },
1973
1971
  setup(e) {
1974
- const t = e, { data: r, options: n } = I(t), a = L([]), o = L([]), s = L(null), { extents: i, updateExtents: l } = $r(t.containerSize), { graph: u } = Nr(r, n, i), { hoveredElement: c, highlightedElements: f } = Vr(
1972
+ const t = e, { data: r, options: n } = I(t), a = L([]), o = L([]), s = L(null), { extents: i, updateExtents: l } = Ir(t.containerSize), { graph: u } = Gr(r, n, i), { hoveredElement: c, highlightedElements: p } = Fr(
1975
1973
  a,
1976
1974
  n,
1977
1975
  u
1978
- ), _ = d(() => It(n.value.valueFormat)), m = d(
1979
- () => Object.keys(f.value.nodes)
1976
+ ), v = d(() => Lt(n.value.valueFormat)), g = d(
1977
+ () => Object.keys(p.value.nodes)
1980
1978
  );
1981
- function p(g) {
1982
- return m.value.length > 0 && !m.value.includes(g.toString());
1979
+ function f(h) {
1980
+ return g.value.length > 0 && !g.value.includes(h.toString());
1983
1981
  }
1984
- function h(g) {
1985
- return f.value.links.length > 0 && !f.value.links.includes(g);
1982
+ function _(h) {
1983
+ return p.value.links.length > 0 && !p.value.links.includes(h);
1986
1984
  }
1987
- return D(u, (g) => {
1988
- a.value = Pr(g.nodes), o.value = Er(g.links);
1989
- }), D([t.containerSize, s], () => {
1985
+ return C(u, (h) => {
1986
+ a.value = Cr(h.nodes), o.value = Nr(h.links);
1987
+ }), C([t.containerSize, s], () => {
1990
1988
  if (t.containerSize.width && t.containerSize.height) {
1991
- const g = Dr(u.value, s.value);
1992
- l(g);
1989
+ const h = Er(u.value, s.value);
1990
+ l(h);
1993
1991
  }
1994
- }), { __sfc: !0, props: t, data: r, options: n, nodeBlocks: a, linkPaths: o, nodeTextRefs: s, extents: i, updateExtents: l, graph: u, hoveredElement: c, highlightedElements: f, formatValue: _, hoveredNodeIds: m, isNodeFaded: p, isLinkFaded: h, GHOST_STROKE_WIDTH_OFFSET: Sr, DEFAULT_COLOR: lt };
1992
+ }), { __sfc: !0, props: t, data: r, options: n, nodeBlocks: a, linkPaths: o, nodeTextRefs: s, extents: i, updateExtents: l, graph: u, hoveredElement: c, highlightedElements: p, formatValue: v, hoveredNodeIds: g, isNodeFaded: f, isLinkFaded: _, GHOST_STROKE_WIDTH_OFFSET: Rr, DEFAULT_COLOR: dt };
1995
1993
  }
1996
1994
  });
1997
- var Fr = function() {
1995
+ var zr = function() {
1998
1996
  var t = this, r = t._self._c, n = t._self._setupProxy;
1999
1997
  return r("g", { staticClass: "lume-alluvial-group", attrs: { "data-j-alluvial-group": "" } }, [t._l(n.nodeBlocks, function(a, o) {
2000
1998
  return r("g", { key: `node-block_${o}`, staticClass: "lume-alluvial-group__node", class: {
@@ -2027,17 +2025,17 @@ var Fr = function() {
2027
2025
  n.hoveredElement = a.link;
2028
2026
  } } });
2029
2027
  })], 2)], 2);
2030
- }, Mr = [], zr = /* @__PURE__ */ w(
2031
- jr,
2032
- Fr,
2028
+ }, Wr = [], Zr = /* @__PURE__ */ w(
2033
2029
  Mr,
2030
+ zr,
2031
+ Wr,
2034
2032
  !1,
2035
2033
  null,
2036
2034
  "5377a0bf",
2037
2035
  null,
2038
2036
  null
2039
2037
  );
2040
- const Wr = zr.exports, Zr = {
2038
+ const Xr = Zr.exports, Ur = {
2041
2039
  margins: {
2042
2040
  top: 0,
2043
2041
  right: 0,
@@ -2051,29 +2049,29 @@ const Wr = zr.exports, Zr = {
2051
2049
  highlightedElements: "full",
2052
2050
  nodePadding: 16,
2053
2051
  nodeWidth: 16,
2054
- nodeAlign: xe,
2052
+ nodeAlign: $e,
2055
2053
  valueFormat: (e) => String(e)
2056
- }, Xr = /* @__PURE__ */ $({
2054
+ }, Yr = /* @__PURE__ */ $({
2057
2055
  __name: "lume-alluvial-diagram",
2058
2056
  props: {
2059
- ...Z(
2060
- $t,
2057
+ ...z(
2058
+ kt,
2061
2059
  !1,
2062
2060
  !1
2063
2061
  )
2064
2062
  },
2065
2063
  setup(e) {
2066
- const t = e, r = W(H()), { options: n } = I(t), { allOptions: a } = C(n, Zr);
2064
+ const t = e, r = M(H()), { options: n } = I(t), { allOptions: a } = B(n, Ur);
2067
2065
  function o(s) {
2068
2066
  return {
2069
2067
  ...s,
2070
2068
  noBaseScales: !0
2071
2069
  };
2072
2070
  }
2073
- return { __sfc: !0, props: t, slots: r, options: n, allOptions: a, getAlluvialDiagramOptions: o, LumeChart: Y, LumeAlluvialGroup: Wr };
2071
+ return { __sfc: !0, props: t, slots: r, options: n, allOptions: a, getAlluvialDiagramOptions: o, LumeChart: K, LumeAlluvialGroup: Xr };
2074
2072
  }
2075
2073
  });
2076
- var Ur = function() {
2074
+ var Kr = function() {
2077
2075
  var t = this, r = t._self._c, n = t._self._setupProxy;
2078
2076
  return r(n.LumeChart, t._b({ attrs: { options: n.getAlluvialDiagramOptions(n.allOptions), "data-j-alluvial-diagram": "" }, scopedSlots: t._u([{ key: "groups", fn: function(a) {
2079
2077
  return [r(n.LumeAlluvialGroup, t._b({}, "lume-alluvial-group", a, !1))];
@@ -2082,101 +2080,101 @@ var Ur = function() {
2082
2080
  return [t._t(o, null, null, s || {})];
2083
2081
  } };
2084
2082
  })], null, !0) }, "lume-chart", n.props, !1));
2085
- }, Yr = [], Kr = /* @__PURE__ */ w(
2086
- Xr,
2087
- Ur,
2083
+ }, Jr = [], Qr = /* @__PURE__ */ w(
2088
2084
  Yr,
2085
+ Kr,
2086
+ Jr,
2089
2087
  !1,
2090
2088
  null,
2091
2089
  null,
2092
2090
  null,
2093
2091
  null
2094
2092
  );
2095
- const Ja = Kr.exports;
2096
- var kt = /* @__PURE__ */ ((e) => (e.grouped = "grouped", e.stacked = "stacked", e))(kt || {});
2097
- const Jr = /* @__PURE__ */ $({
2093
+ const qa = Qr.exports;
2094
+ var Ot = /* @__PURE__ */ ((e) => (e.grouped = "grouped", e.stacked = "stacked", e))(Ot || {});
2095
+ const qr = /* @__PURE__ */ $({
2098
2096
  __name: "lume-bar-chart",
2099
2097
  props: {
2100
- ...Z(),
2098
+ ...z(),
2101
2099
  type: {
2102
2100
  type: String,
2103
2101
  default: null,
2104
- validator: (e) => e in kt || e == null
2102
+ validator: (e) => e in Ot || e == null
2105
2103
  }
2106
2104
  },
2107
2105
  setup(e) {
2108
- const t = e, r = ht(
2109
- () => import("./be9b5401.js")
2110
- ), n = ht(
2111
- () => import("./bd928433.js")
2112
- ), a = ht(
2113
- () => import("./1612c2b0.js")
2106
+ const t = e, r = _t(
2107
+ () => import("./afbaa446.js")
2108
+ ), n = _t(
2109
+ () => import("./6234a134.js")
2110
+ ), a = _t(
2111
+ () => import("./6323ec6e.js")
2114
2112
  ), o = /* @__PURE__ */ new Map([
2115
2113
  ["single", r],
2116
2114
  ["grouped", n],
2117
2115
  ["stacked", a]
2118
- ]), s = W(H());
2116
+ ]), s = M(H());
2119
2117
  function i(u) {
2120
2118
  return {
2121
2119
  ...u,
2122
2120
  startOnZero: !0,
2123
2121
  tooltipOptions: {
2124
2122
  ...(u == null ? void 0 : u.tooltipOptions) || {},
2125
- position: t.orientation === b.HORIZONTAL && "right"
2123
+ position: t.orientation === A.HORIZONTAL && "right"
2126
2124
  }
2127
2125
  };
2128
2126
  }
2129
2127
  const l = d(() => {
2130
2128
  if (!!t.data) {
2131
- if ($t(t.data))
2129
+ if (kt(t.data))
2132
2130
  return o.get("single");
2133
2131
  if (!t.type)
2134
2132
  throw new Error("Bar chart needs a type when there's multiple datasets.");
2135
2133
  return o.get(t.type);
2136
2134
  }
2137
2135
  });
2138
- return { __sfc: !0, TYPES: kt, LumeSingleBarChart: r, LumeGroupedBarChart: n, LumeStackedBarChart: a, COMPONENT_MAP: o, props: t, slots: s, getBarChartOptions: i, component: l };
2136
+ return { __sfc: !0, TYPES: Ot, LumeSingleBarChart: r, LumeGroupedBarChart: n, LumeStackedBarChart: a, COMPONENT_MAP: o, props: t, slots: s, getBarChartOptions: i, component: l };
2139
2137
  }
2140
2138
  });
2141
- var Qr = function() {
2139
+ var ta = function() {
2142
2140
  var t = this, r = t._self._c, n = t._self._setupProxy;
2143
2141
  return r(n.component, t._b({ tag: "component", attrs: { options: n.getBarChartOptions(t.options) }, scopedSlots: t._u([t._l(n.slots, function(a, o) {
2144
2142
  return { key: o, fn: function(s) {
2145
2143
  return [t._t(o, null, null, s || {})];
2146
2144
  } };
2147
2145
  })], null, !0) }, "component", { ...n.props, ...t.$attrs }, !1));
2148
- }, qr = [], ta = /* @__PURE__ */ w(
2149
- Jr,
2150
- Qr,
2146
+ }, ea = [], na = /* @__PURE__ */ w(
2151
2147
  qr,
2148
+ ta,
2149
+ ea,
2152
2150
  !1,
2153
2151
  null,
2154
2152
  null,
2155
2153
  null,
2156
2154
  null
2157
2155
  );
2158
- const Qa = ta.exports;
2159
- function ea(e) {
2160
- return Object.values(We).includes(e) || e == null;
2156
+ const to = na.exports;
2157
+ function ra(e) {
2158
+ return Object.values(rn).includes(e) || e == null;
2161
2159
  }
2162
- function na(e) {
2163
- return Object.values(b).includes(e);
2160
+ function aa(e) {
2161
+ return Object.values(A).includes(e);
2164
2162
  }
2165
- const ra = (e = !1) => ({
2163
+ const oa = (e = !1) => ({
2166
2164
  type: {
2167
2165
  type: String,
2168
2166
  default: null,
2169
- validator: ea
2167
+ validator: ra
2170
2168
  },
2171
2169
  ...e ? {
2172
2170
  orientation: {
2173
2171
  type: String,
2174
- default: b.VERTICAL,
2175
- validator: na
2172
+ default: A.VERTICAL,
2173
+ validator: aa
2176
2174
  }
2177
2175
  } : {}
2178
2176
  });
2179
- function fe(e) {
2177
+ function ve(e) {
2180
2178
  const t = d(() => e.value.map((n) => ({
2181
2179
  ...n,
2182
2180
  values: n.values.map((a) => ({
@@ -2191,12 +2189,12 @@ function fe(e) {
2191
2189
  });
2192
2190
  return { multiBarData: t, groupedData: r };
2193
2191
  }
2194
- function aa(e, t) {
2192
+ function sa(e, t) {
2195
2193
  return e.value.length === 1 ? "single" : t.value;
2196
2194
  }
2197
- function oa(e, t, r, n) {
2195
+ function ia(e, t, r, n) {
2198
2196
  const a = d(
2199
- () => n.value === b.HORIZONTAL
2197
+ () => n.value === A.HORIZONTAL
2200
2198
  );
2201
2199
  function o(l) {
2202
2200
  Math.min(...l.domain()) > 0 && console.error("Bar linear scale domain cannot start above 0!");
@@ -2218,76 +2216,76 @@ function oa(e, t, r, n) {
2218
2216
  });
2219
2217
  return { barXScale: s, barYScale: i };
2220
2218
  }
2221
- function sa(e, t, r, n, a, o) {
2219
+ function ua(e, t, r, n, a, o) {
2222
2220
  const s = d(
2223
- () => n.value === b.HORIZONTAL
2221
+ () => n.value === A.HORIZONTAL
2224
2222
  );
2225
- function i(f, _) {
2226
- let m, p;
2227
- return s.value ? (m = f >= 0 ? t.value(0) : t.value(f), p = r.value(r.value.domain()[_])) : (m = t.value(t.value.domain()[_]), p = f < 0 ? r.value(0) : r.value(f)), { x: m, y: p };
2223
+ function i(p, v) {
2224
+ let g, f;
2225
+ return s.value ? (g = p >= 0 ? t.value(0) : t.value(p), f = r.value(r.value.domain()[v])) : (g = t.value(t.value.domain()[v]), f = p < 0 ? r.value(0) : r.value(p)), { x: g, y: f };
2228
2226
  }
2229
- function l(f) {
2230
- return s.value ? f < 0 ? t.value(0) - t.value(f) : t.value(f) - t.value(0) : t.value.bandwidth();
2227
+ function l(p) {
2228
+ return s.value ? p < 0 ? t.value(0) - t.value(p) : t.value(p) - t.value(0) : t.value.bandwidth();
2231
2229
  }
2232
- function u(f) {
2233
- return s.value ? r.value.bandwidth() : f < 0 ? r.value(f) - r.value(0) : r.value(0) - r.value(f);
2230
+ function u(p) {
2231
+ return s.value ? r.value.bandwidth() : p < 0 ? r.value(p) - r.value(0) : r.value(0) - r.value(p);
2234
2232
  }
2235
- function c(f, _, m) {
2236
- var k;
2237
- const { value: p, color: h } = f, g = (k = h != null ? h : e.value[_].color) != null ? k : lt, { x: v, y } = i(p, m), A = l(p), T = u(p);
2233
+ function c(p, v, g) {
2234
+ var x;
2235
+ const { value: f, color: _ } = p, h = (x = _ != null ? _ : e.value[v].color) != null ? x : dt, { x: y, y: b } = i(f, g), m = l(f), T = u(f);
2238
2236
  return {
2239
- classList: [`lume-fill--${g}`, ...o],
2240
- x: v,
2241
- y,
2242
- width: A,
2237
+ classList: [`lume-fill--${h}`, ...o],
2238
+ x: y,
2239
+ y: b,
2240
+ width: m,
2243
2241
  height: T,
2244
- isFaded: a.value !== -1 && a.value !== m,
2245
- isNegative: p < 0
2242
+ isFaded: a.value !== -1 && a.value !== g,
2243
+ isNegative: f < 0
2246
2244
  };
2247
2245
  }
2248
2246
  return { barAttributeGenerator: c };
2249
2247
  }
2250
- function ia(e, t, r, n, a, o) {
2248
+ function la(e, t, r, n, a, o) {
2251
2249
  const s = d(
2252
- () => n.value === b.HORIZONTAL
2253
- ), i = d(() => Q().domain(e.value.map((p, h) => h)).range([0, t.value.bandwidth()]).padding(0)), l = d(() => Q().domain(e.value.map((p, h) => h)).range([0, r.value.bandwidth()]).padding(0));
2254
- function u(p, h, g) {
2250
+ () => n.value === A.HORIZONTAL
2251
+ ), i = d(() => Q().domain(e.value.map((f, _) => _)).range([0, t.value.bandwidth()]).padding(0)), l = d(() => Q().domain(e.value.map((f, _) => _)).range([0, r.value.bandwidth()]).padding(0));
2252
+ function u(f, _, h) {
2255
2253
  if (s.value)
2256
- return p >= 0 ? t.value(0) : t.value(p);
2257
- const v = t.value.domain();
2258
- return t.value(v[h]) + i.value(g);
2254
+ return f >= 0 ? t.value(0) : t.value(f);
2255
+ const y = t.value.domain();
2256
+ return t.value(y[_]) + i.value(h);
2259
2257
  }
2260
- function c(p, h, g) {
2258
+ function c(f, _, h) {
2261
2259
  if (s.value) {
2262
- const v = r.value.domain();
2263
- return r.value(v[h]) + l.value(g);
2260
+ const y = r.value.domain();
2261
+ return r.value(y[_]) + l.value(h);
2264
2262
  }
2265
- return p < 0 ? r.value(0) : r.value(p);
2263
+ return f < 0 ? r.value(0) : r.value(f);
2266
2264
  }
2267
- function f(p) {
2268
- return s.value ? p < 0 ? t.value(0) - t.value(p) : t.value(p) - t.value(0) : i.value.bandwidth();
2265
+ function p(f) {
2266
+ return s.value ? f < 0 ? t.value(0) - t.value(f) : t.value(f) - t.value(0) : i.value.bandwidth();
2269
2267
  }
2270
- function _(p) {
2271
- return s.value ? l.value.bandwidth() : p < 0 ? r.value(p) - r.value(0) : r.value(0) - r.value(p);
2268
+ function v(f) {
2269
+ return s.value ? l.value.bandwidth() : f < 0 ? r.value(f) - r.value(0) : r.value(0) - r.value(f);
2272
2270
  }
2273
- function m(p, h, g) {
2274
- var N;
2275
- const { value: v, color: y } = p, A = (N = y != null ? y : e.value[h].color) != null ? N : Object.values(E)[h], T = u(v, g, h), k = c(v, g, h), P = f(v), G = _(v);
2271
+ function g(f, _, h) {
2272
+ var P;
2273
+ const { value: y, color: b } = f, m = (P = b != null ? b : e.value[_].color) != null ? P : Object.values(N)[_], T = u(y, h, _), x = c(y, h, _), S = p(y), D = v(y);
2276
2274
  return {
2277
- classList: [`lume-fill--${A}`, ...o],
2275
+ classList: [`lume-fill--${m}`, ...o],
2278
2276
  x: T,
2279
- y: k,
2280
- width: P,
2281
- height: G,
2282
- isFaded: a.value !== -1 && a.value !== g,
2283
- isNegative: v < 0
2277
+ y: x,
2278
+ width: S,
2279
+ height: D,
2280
+ isFaded: a.value !== -1 && a.value !== h,
2281
+ isNegative: y < 0
2284
2282
  };
2285
2283
  }
2286
- return { barAttributeGenerator: m };
2284
+ return { barAttributeGenerator: g };
2287
2285
  }
2288
- function ua(e, t) {
2286
+ function ca(e, t) {
2289
2287
  const r = d(
2290
- () => t.value === b.HORIZONTAL
2288
+ () => t.value === A.HORIZONTAL
2291
2289
  ), n = d(() => {
2292
2290
  const i = e.value.map(
2293
2291
  (l) => l.filter((u) => u.value < 0).reduce((u, c) => u + c.value, 0)
@@ -2305,7 +2303,7 @@ function ua(e, t) {
2305
2303
  function o(i, l, u) {
2306
2304
  return r.value ? q().domain([n.value, a.value]).range([0, u.width]) : Object.assign(
2307
2305
  ot(
2308
- Q().domain(l.map((c, f) => f)).range([0, u.width])
2306
+ Q().domain(l.map((c, p) => p)).range([0, u.width])
2309
2307
  ),
2310
2308
  { labels: l }
2311
2309
  );
@@ -2313,71 +2311,71 @@ function ua(e, t) {
2313
2311
  function s(i, l, u) {
2314
2312
  return r.value ? Object.assign(
2315
2313
  ot(
2316
- Q().domain(l.map((c, f) => f)).range([0, u.height])
2314
+ Q().domain(l.map((c, p) => p)).range([0, u.height])
2317
2315
  ),
2318
2316
  { labels: l }
2319
2317
  ) : q().domain([a.value, n.value]).range([0, u.height]);
2320
2318
  }
2321
2319
  return { stackedXScaleGenerator: o, stackedYScaleGenerator: s };
2322
2320
  }
2323
- function la(e, t, r, n, a, o) {
2321
+ function da(e, t, r, n, a, o) {
2324
2322
  const s = d(
2325
- () => n.value === b.HORIZONTAL
2323
+ () => n.value === A.HORIZONTAL
2326
2324
  ), i = d(
2327
2325
  () => s.value ? r.value.domain() : t.value.domain()
2328
2326
  ), l = d(
2329
- () => e.value.map((v) => v.values.map((y) => y == null ? void 0 : y.value))
2327
+ () => e.value.map((y) => y.values.map((b) => b == null ? void 0 : b.value))
2330
2328
  );
2331
- function u(v, y, A) {
2332
- let T, k;
2333
- return s.value ? (T = t.value(v >= 0 ? 0 + A : v + A), k = r.value(i.value[y])) : (T = t.value(i.value[y]), k = r.value(v >= 0 ? v + A : 0 + A)), { x: T, y: k };
2329
+ function u(y, b, m) {
2330
+ let T, x;
2331
+ return s.value ? (T = t.value(y >= 0 ? 0 + m : y + m), x = r.value(i.value[b])) : (T = t.value(i.value[b]), x = r.value(y >= 0 ? y + m : 0 + m)), { x: T, y: x };
2334
2332
  }
2335
- function c(v) {
2336
- return s.value ? t.value(v) - t.value(0) : t.value.bandwidth();
2333
+ function c(y) {
2334
+ return s.value ? t.value(y) - t.value(0) : t.value.bandwidth();
2337
2335
  }
2338
- function f(v) {
2339
- return s.value ? t.value(0) - t.value(v) : t.value.bandwidth();
2336
+ function p(y) {
2337
+ return s.value ? t.value(0) - t.value(y) : t.value.bandwidth();
2340
2338
  }
2341
- function _(v) {
2342
- return s.value ? r.value.bandwidth() : r.value(0) - r.value(v);
2339
+ function v(y) {
2340
+ return s.value ? r.value.bandwidth() : r.value(0) - r.value(y);
2343
2341
  }
2344
- function m(v) {
2345
- return s.value ? r.value.bandwidth() : r.value(v) - r.value(0);
2342
+ function g(y) {
2343
+ return s.value ? r.value.bandwidth() : r.value(y) - r.value(0);
2346
2344
  }
2347
- function p(v, y) {
2348
- return v ? l.value.reduce((A, T, k) => (k < v && T[y] >= 0 && (A += T[y]), A), 0) : 0;
2345
+ function f(y, b) {
2346
+ return y ? l.value.reduce((m, T, x) => (x < y && T[b] >= 0 && (m += T[b]), m), 0) : 0;
2349
2347
  }
2350
- function h(v, y) {
2351
- return v ? l.value.reduce((A, T, k) => (k < v && T[y] < 0 && (A += T[y]), A), 0) : 0;
2348
+ function _(y, b) {
2349
+ return y ? l.value.reduce((m, T, x) => (x < y && T[b] < 0 && (m += T[b]), m), 0) : 0;
2352
2350
  }
2353
- function g(v, y, A) {
2354
- var x;
2355
- const { value: T, color: k } = v, P = T >= 0 ? c(T) : f(T), G = T >= 0 ? _(T) : m(T), N = T >= 0 ? p(y, A) : h(y, A), { x: V, y: j } = u(T, A, N);
2351
+ function h(y, b, m) {
2352
+ var k;
2353
+ const { value: T, color: x } = y, S = T >= 0 ? c(T) : p(T), D = T >= 0 ? v(T) : g(T), P = T >= 0 ? f(b, m) : _(b, m), { x: W, y: Z } = u(T, m, P);
2356
2354
  return {
2357
- classList: [`lume-fill--${(x = k != null ? k : e.value[y].color) != null ? x : Object.values(E)[y]}`, ...o],
2358
- width: P,
2359
- height: G,
2360
- x: V,
2361
- y: j,
2362
- isFaded: a.value !== -1 && a.value !== A,
2355
+ classList: [`lume-fill--${(k = x != null ? x : e.value[b].color) != null ? k : Object.values(N)[b]}`, ...o],
2356
+ width: S,
2357
+ height: D,
2358
+ x: W,
2359
+ y: Z,
2360
+ isFaded: a.value !== -1 && a.value !== m,
2363
2361
  isNegative: T < 0
2364
2362
  };
2365
2363
  }
2366
- return { barAttributeGenerator: g };
2364
+ return { barAttributeGenerator: h };
2367
2365
  }
2368
2366
  const Xt = {
2369
- single: sa,
2370
- grouped: ia,
2371
- stacked: la
2372
- }, ca = /* @__PURE__ */ $({
2367
+ single: ua,
2368
+ grouped: la,
2369
+ stacked: da
2370
+ }, pa = /* @__PURE__ */ $({
2373
2371
  __name: "lume-bar-group",
2374
2372
  props: {
2375
- ...ft(),
2373
+ ...pt(),
2376
2374
  classList: {
2377
2375
  type: [String, Array],
2378
2376
  default: () => []
2379
2377
  },
2380
- ...ra(!0),
2378
+ ...oa(!0),
2381
2379
  transition: {
2382
2380
  type: Boolean,
2383
2381
  default: !0
@@ -2394,71 +2392,71 @@ const Xt = {
2394
2392
  xScale: l,
2395
2393
  yScale: u,
2396
2394
  classList: c
2397
- } = I(t), { groupedData: f } = fe(r), { barXScale: _, barYScale: m } = oa(
2395
+ } = I(t), { groupedData: p } = ve(r), { barXScale: v, barYScale: g } = ia(
2398
2396
  l,
2399
2397
  u,
2400
2398
  a,
2401
2399
  o
2402
- ), p = d(() => typeof c.value == "string" ? [c.value] : c.value), h = d(() => {
2403
- const v = aa(r, i), { barAttributeGenerator: y } = Xt[v](
2400
+ ), f = d(() => typeof c.value == "string" ? [c.value] : c.value), _ = d(() => {
2401
+ const y = sa(r, i), { barAttributeGenerator: b } = Xt[y](
2404
2402
  r,
2405
- _,
2406
- m,
2403
+ v,
2404
+ g,
2407
2405
  o,
2408
2406
  n,
2409
- p.value
2407
+ f.value
2410
2408
  );
2411
- return y;
2412
- }), g = d(() => {
2409
+ return b;
2410
+ }), h = d(() => {
2413
2411
  if (!!s.value)
2414
- return o.value === b.HORIZONTAL ? "width" : "height";
2412
+ return o.value === A.HORIZONTAL ? "width" : "height";
2415
2413
  });
2416
- return { __sfc: !0, MIXIN_MAP: Xt, props: t, data: r, hoveredIndex: n, options: a, orientation: o, transition: s, type: i, xScale: l, yScale: u, classList: c, groupedData: f, barXScale: _, barYScale: m, computedClasses: p, getBarAttributes: h, computedTransition: g, LumeBar: St };
2414
+ return { __sfc: !0, MIXIN_MAP: Xt, props: t, data: r, hoveredIndex: n, options: a, orientation: o, transition: s, type: i, xScale: l, yScale: u, classList: c, groupedData: p, barXScale: v, barYScale: g, computedClasses: f, getBarAttributes: _, computedTransition: h, LumeBar: It };
2417
2415
  }
2418
2416
  });
2419
- var da = function() {
2417
+ var fa = function() {
2420
2418
  var t = this, r = t._self._c, n = t._self._setupProxy;
2421
2419
  return r("g", { staticClass: "lume-bar-group", attrs: { "data-j-bars-group": "" } }, t._l(n.groupedData, function(a, o) {
2422
2420
  return r("g", { key: o }, t._l(a, function(s, i) {
2423
2421
  return r(n.LumeBar, t._b({ key: `bar-${i}`, attrs: { transition: n.computedTransition, "data-j-lume-bar": "" } }, "lume-bar", n.getBarAttributes(s, i, o, a), !1));
2424
2422
  }), 1);
2425
2423
  }), 0);
2426
- }, pa = [], fa = /* @__PURE__ */ w(
2427
- ca,
2428
- da,
2424
+ }, va = [], _a = /* @__PURE__ */ w(
2429
2425
  pa,
2426
+ fa,
2427
+ va,
2430
2428
  !1,
2431
2429
  null,
2432
2430
  null,
2433
2431
  null,
2434
2432
  null
2435
2433
  );
2436
- const Rt = fa.exports, va = {
2437
- [b.VERTICAL]: {
2434
+ const Dt = _a.exports, ha = {
2435
+ [A.VERTICAL]: {
2438
2436
  withTooltip: !0,
2439
2437
  xAxisOptions: {},
2440
2438
  yAxisOptions: { gridLines: !0 },
2441
- margins: M.VERTICAL
2439
+ margins: j.VERTICAL
2442
2440
  },
2443
- [b.HORIZONTAL]: {
2441
+ [A.HORIZONTAL]: {
2444
2442
  withTooltip: !0,
2445
2443
  xAxisOptions: { gridLines: !0 },
2446
2444
  yAxisOptions: { gridLines: !1 },
2447
- margins: M.HORIZONTAL
2445
+ margins: j.HORIZONTAL
2448
2446
  }
2449
- }, _a = /* @__PURE__ */ $({
2447
+ }, ma = /* @__PURE__ */ $({
2450
2448
  __name: "lume-single-bar-chart",
2451
2449
  props: {
2452
- ...Z($t)
2450
+ ...z(kt)
2453
2451
  },
2454
2452
  setup(e) {
2455
- const t = e, r = W(H()), { orientation: n, options: a } = I(t), o = d(
2456
- () => va[n.value || b.VERTICAL]
2457
- ), { allOptions: s } = C(a, o);
2458
- return { __sfc: !0, props: t, slots: r, orientation: n, options: a, baseOptions: o, allOptions: s, LumeChart: Y, LumeBarGroup: Rt };
2453
+ const t = e, r = M(H()), { orientation: n, options: a } = I(t), o = d(
2454
+ () => ha[n.value || A.VERTICAL]
2455
+ ), { allOptions: s } = B(a, o);
2456
+ return { __sfc: !0, props: t, slots: r, orientation: n, options: a, baseOptions: o, allOptions: s, LumeChart: K, LumeBarGroup: Dt };
2459
2457
  }
2460
2458
  });
2461
- var ha = function() {
2459
+ var ga = function() {
2462
2460
  var t = this, r = t._self._c, n = t._self._setupProxy;
2463
2461
  return r(n.LumeChart, t._b({ attrs: { "chart-type": "single-bar", options: n.allOptions, "data-j-single-bar-chart": "" }, scopedSlots: t._u([{ key: "groups", fn: function(a) {
2464
2462
  return [r(n.LumeBarGroup, t._b({ attrs: { orientation: n.orientation } }, "lume-bar-group", a, !1))];
@@ -2467,43 +2465,43 @@ var ha = function() {
2467
2465
  return [t._t(o, null, null, s || {})];
2468
2466
  } };
2469
2467
  })], null, !0) }, "lume-chart", n.props, !1));
2470
- }, ma = [], ga = /* @__PURE__ */ w(
2471
- _a,
2472
- ha,
2468
+ }, ya = [], ba = /* @__PURE__ */ w(
2473
2469
  ma,
2470
+ ga,
2471
+ ya,
2474
2472
  !1,
2475
2473
  null,
2476
2474
  null,
2477
2475
  null,
2478
2476
  null
2479
2477
  );
2480
- const qa = ga.exports, ya = {
2481
- [b.VERTICAL]: {
2478
+ const eo = ba.exports, Ta = {
2479
+ [A.VERTICAL]: {
2482
2480
  withTooltip: !0,
2483
2481
  xAxisOptions: {},
2484
2482
  yAxisOptions: { gridLines: !0 },
2485
- margins: M.VERTICAL
2483
+ margins: j.VERTICAL
2486
2484
  },
2487
- [b.HORIZONTAL]: {
2485
+ [A.HORIZONTAL]: {
2488
2486
  withTooltip: !0,
2489
2487
  xAxisOptions: { gridLines: !0 },
2490
2488
  yAxisOptions: { gridLines: !1 },
2491
- margins: M.HORIZONTAL,
2489
+ margins: j.HORIZONTAL,
2492
2490
  tooltipOptions: { position: "right" }
2493
2491
  }
2494
- }, ba = /* @__PURE__ */ $({
2492
+ }, Aa = /* @__PURE__ */ $({
2495
2493
  __name: "lume-grouped-bar-chart",
2496
2494
  props: {
2497
- ...Z()
2495
+ ...z()
2498
2496
  },
2499
2497
  setup(e) {
2500
- const t = e, r = W(H()), { orientation: n, options: a } = I(t), o = d(
2501
- () => ya[n.value || b.VERTICAL]
2502
- ), { allOptions: s } = C(a, o);
2503
- return { __sfc: !0, props: t, slots: r, orientation: n, options: a, baseOptions: o, allOptions: s, LumeChart: Y, LumeBarGroup: Rt };
2498
+ const t = e, r = M(H()), { orientation: n, options: a } = I(t), o = d(
2499
+ () => Ta[n.value || A.VERTICAL]
2500
+ ), { allOptions: s } = B(a, o);
2501
+ return { __sfc: !0, props: t, slots: r, orientation: n, options: a, baseOptions: o, allOptions: s, LumeChart: K, LumeBarGroup: Dt };
2504
2502
  }
2505
2503
  });
2506
- var Ta = function() {
2504
+ var Oa = function() {
2507
2505
  var t = this, r = t._self._c, n = t._self._setupProxy;
2508
2506
  return r(n.LumeChart, t._b({ attrs: { "chart-type": "grouped-bar", options: n.allOptions, "data-j-grouped-bar-chart": "" }, scopedSlots: t._u([{ key: "groups", fn: function(a) {
2509
2507
  return [r(n.LumeBarGroup, t._b({ attrs: { type: "grouped" } }, "lume-bar-group", a, !1))];
@@ -2512,46 +2510,46 @@ var Ta = function() {
2512
2510
  return [t._t(o, null, null, s || {})];
2513
2511
  } };
2514
2512
  })], null, !0) }, "lume-chart", n.props, !1));
2515
- }, Aa = [], Oa = /* @__PURE__ */ w(
2516
- ba,
2517
- Ta,
2513
+ }, ka = [], xa = /* @__PURE__ */ w(
2518
2514
  Aa,
2515
+ Oa,
2516
+ ka,
2519
2517
  !1,
2520
2518
  null,
2521
2519
  null,
2522
2520
  null,
2523
2521
  null
2524
2522
  );
2525
- const to = Oa.exports, ka = {
2526
- [b.VERTICAL]: {
2523
+ const no = xa.exports, La = {
2524
+ [A.VERTICAL]: {
2527
2525
  withTooltip: !0,
2528
2526
  xAxisOptions: {},
2529
2527
  yAxisOptions: { gridLines: !0 },
2530
- margins: M.VERTICAL
2528
+ margins: j.VERTICAL
2531
2529
  },
2532
- [b.HORIZONTAL]: {
2530
+ [A.HORIZONTAL]: {
2533
2531
  withTooltip: !0,
2534
2532
  xAxisOptions: { gridLines: !0 },
2535
2533
  yAxisOptions: { gridLines: !1 },
2536
- margins: M.HORIZONTAL,
2534
+ margins: j.HORIZONTAL,
2537
2535
  tooltipOptions: { position: "right" }
2538
2536
  }
2539
- }, xa = /* @__PURE__ */ $({
2537
+ }, $a = /* @__PURE__ */ $({
2540
2538
  __name: "lume-stacked-bar-chart",
2541
2539
  props: {
2542
- ...Z()
2540
+ ...z()
2543
2541
  },
2544
2542
  setup(e) {
2545
- const t = e, r = W(H()), { data: n, orientation: a, options: o } = I(t), s = d(
2546
- () => ka[a.value || b.VERTICAL]
2547
- ), { allOptions: i } = C(o, s), { internalData: l } = ct(n), { groupedData: u } = fe(l), { stackedXScaleGenerator: c, stackedYScaleGenerator: f } = ua(
2543
+ const t = e, r = M(H()), { data: n, orientation: a, options: o } = I(t), s = d(
2544
+ () => La[a.value || A.VERTICAL]
2545
+ ), { allOptions: i } = B(o, s), { internalData: l } = St(n), { groupedData: u } = ve(l), { stackedXScaleGenerator: c, stackedYScaleGenerator: p } = ca(
2548
2546
  u,
2549
2547
  a
2550
2548
  );
2551
- return { __sfc: !0, props: t, slots: r, data: n, orientation: a, options: o, baseOptions: s, allOptions: i, internalData: l, groupedData: u, stackedXScaleGenerator: c, stackedYScaleGenerator: f, LumeChart: Y, LumeBarGroup: Rt };
2549
+ return { __sfc: !0, props: t, slots: r, data: n, orientation: a, options: o, baseOptions: s, allOptions: i, internalData: l, groupedData: u, stackedXScaleGenerator: c, stackedYScaleGenerator: p, LumeChart: K, LumeBarGroup: Dt };
2552
2550
  }
2553
2551
  });
2554
- var La = function() {
2552
+ var wa = function() {
2555
2553
  var t = this, r = t._self._c, n = t._self._setupProxy;
2556
2554
  return r(n.LumeChart, t._b({ attrs: { "chart-type": "stacked-bar", options: n.allOptions, "x-scale": n.stackedXScaleGenerator, "y-scale": n.stackedYScaleGenerator, "data-j-stacked-bar-chart": "" }, scopedSlots: t._u([{ key: "groups", fn: function(a) {
2557
2555
  return [r(n.LumeBarGroup, t._b({ attrs: { type: "stacked" } }, "lume-bar-group", a, !1))];
@@ -2560,25 +2558,25 @@ var La = function() {
2560
2558
  return [t._t(o, null, null, s || {})];
2561
2559
  } };
2562
2560
  })], null, !0) }, "lume-chart", n.props, !1));
2563
- }, $a = [], wa = /* @__PURE__ */ w(
2564
- xa,
2565
- La,
2561
+ }, Ia = [], Sa = /* @__PURE__ */ w(
2566
2562
  $a,
2563
+ wa,
2564
+ Ia,
2567
2565
  !1,
2568
2566
  null,
2569
2567
  null,
2570
2568
  null,
2571
2569
  null
2572
2570
  );
2573
- const eo = wa.exports;
2574
- function ve(e) {
2571
+ const ro = Sa.exports;
2572
+ function _e(e) {
2575
2573
  function t(o) {
2576
2574
  let s = null;
2577
2575
  return o == null ? void 0 : o.reduce((i, l, u) => (l == null || l.value == null ? (s ? s.push(u) : s = [u], u === (o == null ? void 0 : o.length) - 1 && i.push(s)) : s && (i.push(s), s = null), i), []);
2578
2576
  }
2579
2577
  function r(o, s, i, l) {
2580
- const f = Math.abs(o - s) / (i + 1) * (l + 1);
2581
- return o > s ? o - f : o + f;
2578
+ const p = Math.abs(o - s) / (i + 1) * (l + 1);
2579
+ return o > s ? o - p : o + p;
2582
2580
  }
2583
2581
  function n(o) {
2584
2582
  return function(i) {
@@ -2593,21 +2591,21 @@ function ve(e) {
2593
2591
  ...o,
2594
2592
  isDashed: n(s),
2595
2593
  values: o.values.map((i, l) => {
2596
- var c, f;
2594
+ var c, p;
2597
2595
  const u = s.find(
2598
- (_) => _.includes(l)
2596
+ (v) => v.includes(l)
2599
2597
  );
2600
2598
  if (u) {
2601
- const _ = u[0] - 1, m = u[u.length - 1] + 1;
2602
- let p = (c = o.values[_]) == null ? void 0 : c.value, h = (f = o.values[m]) == null ? void 0 : f.value;
2603
- return p == null && (p = h), h == null && (h = p), {
2599
+ const v = u[0] - 1, g = u[u.length - 1] + 1;
2600
+ let f = (c = o.values[v]) == null ? void 0 : c.value, _ = (p = o.values[g]) == null ? void 0 : p.value;
2601
+ return f == null && (f = _), _ == null && (_ = f), {
2604
2602
  value: r(
2605
- p,
2606
- h,
2603
+ f,
2604
+ _,
2607
2605
  u.length,
2608
2606
  u.indexOf(l)
2609
2607
  ),
2610
- label: re
2608
+ label: ie
2611
2609
  };
2612
2610
  }
2613
2611
  return i;
@@ -2615,22 +2613,22 @@ function ve(e) {
2615
2613
  };
2616
2614
  })) };
2617
2615
  }
2618
- function Ia(e, t) {
2619
- const r = wt(e) / 2;
2616
+ function Da(e, t) {
2617
+ const r = xt(e) / 2;
2620
2618
  return (n, a) => e(e.domain()[t + (a - 1)]) + r;
2621
2619
  }
2622
- function Sa(e, t) {
2620
+ function Ra(e, t) {
2623
2621
  return (r, n) => e(t + (n - 1));
2624
2622
  }
2625
- function Ra(e, t, r, n) {
2626
- return we().x(
2627
- z(r) ? Ia(r, e) : Sa(r, e)
2623
+ function Pa(e, t, r, n) {
2624
+ return Se().x(
2625
+ F(r) ? Da(r, e) : Ra(r, e)
2628
2626
  ).y((o) => n(o))(t);
2629
2627
  }
2630
- const Ut = 1, Da = /* @__PURE__ */ $({
2628
+ const Ut = 1, Ea = /* @__PURE__ */ $({
2631
2629
  __name: "lume-line-group",
2632
2630
  props: {
2633
- ...ft(),
2631
+ ...pt(),
2634
2632
  withPoints: {
2635
2633
  type: Boolean,
2636
2634
  default: !0
@@ -2641,71 +2639,75 @@ const Ut = 1, Da = /* @__PURE__ */ $({
2641
2639
  }
2642
2640
  },
2643
2641
  setup(e) {
2644
- const t = e, { data: r, options: n, xScale: a, yScale: o } = I(t), s = d(() => {
2645
- if (r.value.every((y) => y.isDashed))
2642
+ const t = e, { data: r, options: n, xScale: a, yScale: o } = I(t), s = Kt(
2643
+ "tooltipAnchorAttributes",
2644
+ null
2645
+ ), { updateTooltipAnchorAttributes: i } = de(
2646
+ s,
2647
+ n,
2648
+ a,
2649
+ o
2650
+ ), l = d(() => {
2651
+ if (r.value.every((T) => T.isDashed))
2646
2652
  return r.value;
2647
- const { computedLineData: v } = ve(r);
2648
- if (n.value.withTooltip !== !1) {
2649
- const { updateTooltipAnchorAttributes: y } = ce(a, o);
2650
- y(v.value);
2651
- }
2652
- return v.value;
2653
- }), i = d(() => {
2653
+ const { computedLineData: m } = _e(r);
2654
+ return n.value.withTooltip !== !1 && (s == null ? void 0 : s.value) && i(m.value), m.value;
2655
+ }), u = d(() => {
2654
2656
  if (t.hoveredIndex === -1)
2655
2657
  return;
2656
- const v = qe(
2657
- s.value,
2658
+ const m = Ye(
2659
+ l.value,
2658
2660
  t.hoveredIndex
2659
2661
  );
2660
2662
  return {
2661
- d: `M ${Tt(a.value, t.hoveredIndex)},${o.value.range()[1]}
2662
- V ${o.value(v)}`
2663
+ d: `M ${bt(a.value, t.hoveredIndex)},${o.value.range()[1]}
2664
+ V ${o.value(m)}`
2663
2665
  };
2664
- }), l = d(
2665
- () => a.value && Ut / (tn(a.value) - 1)
2666
- ), u = d(
2666
+ }), c = d(
2667
+ () => a.value && Ut / (Ke(a.value) - 1)
2668
+ ), p = d(
2667
2669
  () => {
2668
- var v;
2669
- return ((v = n.value) == null ? void 0 : v.lineWidth) * 2 || void 0;
2670
+ var m;
2671
+ return ((m = n.value) == null ? void 0 : m.lineWidth) * 2 || void 0;
2670
2672
  }
2671
- ), c = d(() => wt(a.value) / 2), f = d(() => a.value.domain());
2672
- function _(v) {
2673
- return s.value[v].values;
2673
+ ), v = d(() => xt(a.value) / 2), g = d(() => a.value.domain());
2674
+ function f(m) {
2675
+ return l.value[m].values;
2674
2676
  }
2675
- function m(v, y) {
2676
- var T, k;
2677
- const A = v === 0 ? [] : [
2678
- (T = _(y)[v - 1]) == null ? void 0 : T.value,
2679
- (k = _(y)[v]) == null ? void 0 : k.value
2677
+ function _(m, T) {
2678
+ var S, D;
2679
+ const x = m === 0 ? [] : [
2680
+ (S = f(T)[m - 1]) == null ? void 0 : S.value,
2681
+ (D = f(T)[m]) == null ? void 0 : D.value
2680
2682
  ];
2681
- return Ra(
2682
- v,
2683
- A,
2683
+ return Pa(
2684
+ m,
2685
+ x,
2684
2686
  a.value,
2685
2687
  o.value
2686
2688
  ) || "";
2687
2689
  }
2688
- function p(v) {
2690
+ function h(m) {
2689
2691
  return {
2690
- animationDelay: v < 2 ? 0 : (v - 1) * l.value,
2691
- animationDuration: l.value
2692
+ animationDelay: m < 2 ? 0 : (m - 1) * c.value,
2693
+ animationDuration: c.value
2692
2694
  };
2693
2695
  }
2694
- function h(v, y) {
2695
- var T;
2696
- const A = (T = _(y)[v]) == null ? void 0 : T.value;
2696
+ function y(m, T) {
2697
+ var S;
2698
+ const x = (S = f(T)[m]) == null ? void 0 : S.value;
2697
2699
  return {
2698
- x: z(a.value) ? t.xScale(f.value[v]) + c.value : t.xScale(v),
2699
- y: o.value(A)
2700
+ x: F(a.value) ? t.xScale(g.value[m]) + v.value : t.xScale(m),
2701
+ y: o.value(x)
2700
2702
  };
2701
2703
  }
2702
- function g(v) {
2703
- return t.hoveredIndex === v;
2704
+ function b(m) {
2705
+ return t.hoveredIndex === m;
2704
2706
  }
2705
- return { __sfc: !0, LUME_TRANSITION_TIME_FULL: Ut, props: t, data: r, options: n, xScale: a, yScale: o, computedGroupData: s, overlayLineAttributes: i, animationDuration: l, pointRadius: u, xAxisOffset: c, domain: f, getValuesFromDataset: _, getPathDefinition: m, getLineTransitionParams: p, getPointPosition: h, isPointActive: g, LumeLine: ar, LumePoint: lr };
2707
+ return { __sfc: !0, LUME_TRANSITION_TIME_FULL: Ut, props: t, data: r, options: n, xScale: a, yScale: o, tooltipAnchorAttributes: s, updateTooltipAnchorAttributes: i, computedGroupData: l, overlayLineAttributes: u, animationDuration: c, pointRadius: p, xAxisOffset: v, domain: g, getValuesFromDataset: f, getPathDefinition: _, getLineTransitionParams: h, getPointPosition: y, isPointActive: b, LumeLine: Kn, LumePoint: er };
2706
2708
  }
2707
2709
  });
2708
- var Pa = function() {
2710
+ var Ca = function() {
2709
2711
  var t = this, r = t._self._c, n = t._self._setupProxy;
2710
2712
  return r("g", { staticClass: "lume-line-group", attrs: { "data-j-lume-line-group": "" } }, [r("path", t._b({ staticClass: "lume-line-group__overlay-line", attrs: { "data-j-lume-line-group__overlay-line": "" } }, "path", n.overlayLineAttributes, !1)), t._l(n.computedGroupData, function(a, o) {
2711
2713
  return r("g", { key: a.label, staticClass: "lume-line-group__group" }, [r("g", { staticClass: "lume-line-group__lines" }, t._l(a.values, function(s, i) {
@@ -2714,33 +2716,33 @@ var Pa = function() {
2714
2716
  return r(n.LumePoint, t._b({ key: `point-${i}`, attrs: { active: n.isPointActive(i), color: a.color, index: i, radius: n.pointRadius } }, "lume-point", n.getPointPosition(i, o), !1));
2715
2717
  }), 1) : t._e()]);
2716
2718
  })], 2);
2717
- }, Ea = [], Ca = /* @__PURE__ */ w(
2718
- Da,
2719
- Pa,
2719
+ }, Na = [], Ba = /* @__PURE__ */ w(
2720
2720
  Ea,
2721
+ Ca,
2722
+ Na,
2721
2723
  !1,
2722
2724
  null,
2723
- "d5c53b3e",
2725
+ "cacd2403",
2724
2726
  null,
2725
2727
  null
2726
2728
  );
2727
- const _e = Ca.exports, Na = {
2728
- margins: M.VERTICAL,
2729
+ const he = Ba.exports, Ga = {
2730
+ margins: j.VERTICAL,
2729
2731
  startOnZero: !0,
2730
2732
  withTooltip: !0,
2731
2733
  xAxisOptions: {},
2732
2734
  yAxisOptions: { gridLines: !0 }
2733
- }, Ba = /* @__PURE__ */ $({
2735
+ }, Ha = /* @__PURE__ */ $({
2734
2736
  __name: "lume-line-chart",
2735
2737
  props: {
2736
- ...Z(null, !1)
2738
+ ...z(null, !1)
2737
2739
  },
2738
2740
  setup(e) {
2739
- const t = e, r = W(H()), { options: n } = I(t), { allOptions: a } = C(n, Na);
2740
- return { __sfc: !0, props: t, slots: r, options: n, allOptions: a, LumeChart: Y, LumeLineGroup: _e };
2741
+ const t = e, r = M(H()), { options: n } = I(t), { allOptions: a } = B(n, Ga);
2742
+ return { __sfc: !0, props: t, slots: r, options: n, allOptions: a, LumeChart: K, LumeLineGroup: he };
2741
2743
  }
2742
2744
  });
2743
- var Ha = function() {
2745
+ var Va = function() {
2744
2746
  var t = this, r = t._self._c, n = t._self._setupProxy;
2745
2747
  return r(n.LumeChart, t._b({ attrs: { "chart-type": "line", options: n.allOptions, "data-j-lume-line-chart": "" }, scopedSlots: t._u([{ key: "groups", fn: function(a) {
2746
2748
  return [r(n.LumeLineGroup, t._b({}, "lume-line-group", a, !1))];
@@ -2749,28 +2751,28 @@ var Ha = function() {
2749
2751
  return [t._t(o, null, null, s || {})];
2750
2752
  } };
2751
2753
  })], null, !0) }, "lume-chart", n.props, !1));
2752
- }, Ga = [], Va = /* @__PURE__ */ w(
2753
- Ba,
2754
+ }, ja = [], Fa = /* @__PURE__ */ w(
2754
2755
  Ha,
2755
- Ga,
2756
+ Va,
2757
+ ja,
2756
2758
  !1,
2757
2759
  null,
2758
2760
  null,
2759
2761
  null,
2760
2762
  null
2761
2763
  );
2762
- const no = Va.exports;
2763
- function ja(e) {
2764
+ const ao = Fa.exports;
2765
+ function Ma(e) {
2764
2766
  return { areaPathDefinition: d(
2765
2767
  () => function(r, n) {
2766
2768
  if (!r || !n)
2767
2769
  return;
2768
2770
  const a = e.value[0].values;
2769
- return Ie().x((o, s) => r(s)).y0(n(Math.min(...n.domain()))).y1((o) => n(o.value))(a);
2771
+ return De().x((o, s) => r(s)).y0(n(Math.min(...n.domain()))).y1((o) => n(o.value))(a);
2770
2772
  }
2771
2773
  ) };
2772
2774
  }
2773
- const Fa = {
2775
+ const za = {
2774
2776
  margins: {
2775
2777
  top: 0,
2776
2778
  right: 0,
@@ -2784,31 +2786,31 @@ const Fa = {
2784
2786
  tooltipOptions: {
2785
2787
  showTitle: !1
2786
2788
  }
2787
- }, Ma = /* @__PURE__ */ $({
2789
+ }, Wa = /* @__PURE__ */ $({
2788
2790
  __name: "lume-sparkline-chart",
2789
2791
  props: {
2790
- ...ie(null),
2791
- ...dt()
2792
+ ...le(null),
2793
+ ...lt()
2792
2794
  },
2793
2795
  setup(e, { expose: t }) {
2794
- const r = e, n = W(H()), { data: a, options: o } = I(r), { internalData: s } = ct(a), { allOptions: i } = C(o, Fa), { computedLineData: l } = ve(s), { areaPathDefinition: u } = ja(l), c = d(() => s.value[0].color), f = d(
2796
+ const r = e, n = M(H()), { data: a, options: o } = I(r), { internalData: s } = St(a), { allOptions: i } = B(o, za), { computedLineData: l } = _e(s), { areaPathDefinition: u } = Ma(l), c = d(() => s.value[0].color), p = d(
2795
2797
  () => a.value[0].areaColor || c.value
2796
2798
  );
2797
- function _(p) {
2799
+ function v(f) {
2798
2800
  return {
2799
- ...p,
2801
+ ...f,
2800
2802
  noMinSize: !0
2801
2803
  };
2802
2804
  }
2803
- function m(p, h, g) {
2804
- return q().range([0, g.width]).domain([0, p[0].values.length - 1]);
2805
+ function g(f, _, h) {
2806
+ return q().range([0, h.width]).domain([0, f[0].values.length - 1]);
2805
2807
  }
2806
2808
  return t({
2807
2809
  areaPathDefinition: u
2808
- }), { __sfc: !0, props: r, slots: n, data: a, options: o, internalData: s, allOptions: i, computedLineData: l, areaPathDefinition: u, computedColor: c, areaColor: f, getSparklineOptions: _, xScaleGenerator: m, LumeChart: Y, LumeLineGroup: _e };
2810
+ }), { __sfc: !0, props: r, slots: n, data: a, options: o, internalData: s, allOptions: i, computedLineData: l, areaPathDefinition: u, computedColor: c, areaColor: p, getSparklineOptions: v, xScaleGenerator: g, LumeChart: K, LumeLineGroup: he };
2809
2811
  }
2810
2812
  });
2811
- var za = function() {
2813
+ var Za = function() {
2812
2814
  var t = this, r = t._self._c, n = t._self._setupProxy;
2813
2815
  return r(n.LumeChart, t._b({ attrs: { "chart-type": "line", options: n.getSparklineOptions(n.allOptions), "x-scale": n.xScaleGenerator }, scopedSlots: t._u([{ key: "groups", fn: function(a) {
2814
2816
  return [n.allOptions.showArea ? r("path", { class: [
@@ -2821,36 +2823,36 @@ var za = function() {
2821
2823
  return [t._t(o, null, null, s || {})];
2822
2824
  } };
2823
2825
  })], null, !0) }, "lume-chart", n.props, !1));
2824
- }, Wa = [], Za = /* @__PURE__ */ w(
2825
- Ma,
2826
- za,
2826
+ }, Xa = [], Ua = /* @__PURE__ */ w(
2827
2827
  Wa,
2828
+ Za,
2829
+ Xa,
2828
2830
  !1,
2829
2831
  null,
2830
2832
  "6d7c407a",
2831
2833
  null,
2832
2834
  null
2833
2835
  );
2834
- const ro = Za.exports;
2836
+ const oo = Ua.exports;
2835
2837
  export {
2836
- Rn as L,
2837
- Qa as a,
2838
- qa as b,
2839
- to as c,
2840
- eo as d,
2841
- no as e,
2842
- ro as f,
2843
- Y as g,
2844
- Bn as h,
2845
- Fn as i,
2846
- Xn as j,
2847
- St as k,
2848
- Ja as l,
2849
- ar as m,
2850
- lr as n,
2851
- Wr as o,
2852
- Rt as p,
2853
- _e as q,
2854
- hr as r
2838
+ On as L,
2839
+ to as a,
2840
+ eo as b,
2841
+ no as c,
2842
+ ro as d,
2843
+ ao as e,
2844
+ oo as f,
2845
+ K as g,
2846
+ In as h,
2847
+ En as i,
2848
+ Hn as j,
2849
+ It as k,
2850
+ qa as l,
2851
+ Kn as m,
2852
+ er as n,
2853
+ Xr as o,
2854
+ Dt as p,
2855
+ he as q,
2856
+ gr as r
2855
2857
  };
2856
- //# sourceMappingURL=bb1b9da1.js.map
2858
+ //# sourceMappingURL=6c47b7a9.js.map