@adyen/lume 0.2.0 → 0.2.1

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