@adyen/lume 1.6.5 → 1.7.0

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