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