@adyen/lume 0.3.3 → 0.5.0

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