@iota-uz/sdk 0.29.0 → 0.29.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chat-ui/index.js +2247 -2235
- package/dist/client-host/identity.d.ts +4 -4
- package/dist/client-host/identity.js +2 -2
- package/dist/lens/{CascadePanel-CCOzLuq0.js → CascadePanel-DEs04AOu.js} +1 -1
- package/dist/lens/{ChartDataEquivalent-jAEMAHLz.js → ChartDataEquivalent-y0Ja1lfd.js} +1 -1
- package/dist/lens/{ChartPanel-BM5BNY_0.js → ChartPanel-CkDA9y5c.js} +321 -320
- package/dist/lens/{CoveragePanel-D9dnY-z3.js → CoveragePanel-B_kLd22w.js} +6 -6
- package/dist/lens/{GaugePanel-Da_8U-va.js → GaugePanel-BDEEmz0J.js} +1 -1
- package/dist/lens/{MapPanel-C_5zKBAZ.js → MapPanel-DQ8ueGdc.js} +3 -3
- package/dist/lens/{MetricFlowPanel-CjIbdcGO.js → MetricFlowPanel-nZhDpP27.js} +2 -2
- package/dist/lens/{MetricHierarchyPanel-B2P_uTgk.js → MetricHierarchyPanel-CLp-X_7T.js} +10 -10
- package/dist/lens/{MetricRelationshipPanel-0d4fAcHP.js → MetricRelationshipPanel-5tAFw7YP.js} +9 -9
- package/dist/lens/{PrintReport-awUBISRB.js → PrintReport-BIw1Shm-.js} +5 -5
- package/dist/lens/{TablePanel-D46pk8E6.js → TablePanel-DiYUJNpq.js} +1 -1
- package/dist/lens/{adapter-BJKTlRCi.js → adapter-BPB6ITHL.js} +5055 -5049
- package/dist/lens/breakpoints.d.ts +1 -0
- package/dist/lens/breakpoints.d.ts.map +1 -1
- package/dist/lens/charts/echarts/adapter.d.ts.map +1 -1
- package/dist/lens/charts/echarts/options.d.ts +3 -2
- package/dist/lens/charts/echarts/options.d.ts.map +1 -1
- package/dist/lens/{dashboardEdit-KuYE7jYk.js → dashboardEdit-Ws5Y-sU5.js} +1 -1
- package/dist/lens/{index-C2oaf8ou.js → index-CPIuDkay.js} +537 -533
- package/dist/lens/{index-BHhPCIjl.js → index-Mzdz1KAK.js} +1 -1
- package/dist/lens/index.js +14 -14
- package/dist/lens/{install-ilsK_qly.js → install-BlXfYeDC.js} +1 -1
- package/dist/lens/{install-Bu88-uMj.js → install-CAPfK0sF.js} +1 -1
- package/dist/lens/{install-Y4ssavWy.js → install-CEH7nY0h.js} +1 -1
- package/dist/lens/{install-Ca0kMSB-.js → install-Ctdnkntc.js} +1 -1
- package/dist/lens/keys-DboqvsSZ.js +99 -0
- package/dist/lens/{metricViews-CY3ENGQy.js → metricViews-D4YyYuq9.js} +8 -8
- package/dist/lens/panels/ChartHost.d.ts +1 -0
- package/dist/lens/panels/ChartHost.d.ts.map +1 -1
- package/dist/lens/panels/ChartPanel.d.ts.map +1 -1
- package/dist/lens/{prefetch-H6lk56fj.js → prefetch-CQn2TcqX.js} +2 -2
- package/dist/lens/{prefetchPanels-BM6WTBt-.js → prefetchPanels-CjawjdC_.js} +1 -1
- package/dist/lens/{print-DYkxBibF.js → print-DLWwd4pP.js} +1 -1
- package/dist/lens/{scales-COnESBiP.js → scales-BKnFdYip.js} +3 -3
- package/dist/sdk-identity.cjs +3 -3
- package/dist/sdk-identity.js +3 -3
- package/dist/sdk-identity.json +2 -2
- package/package.json +1 -1
- package/dist/lens/keys-B-YImOJ9.js +0 -92
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { insert as i, memo as
|
|
2
|
-
import { createSignal as
|
|
3
|
-
import { r as
|
|
4
|
-
import { C as
|
|
5
|
-
import { s as
|
|
6
|
-
import { H as
|
|
7
|
-
import { C as
|
|
8
|
-
var
|
|
9
|
-
const
|
|
10
|
-
function
|
|
11
|
-
const t =
|
|
12
|
-
const
|
|
1
|
+
import { insert as i, memo as D, effect as Y, setAttribute as H, createComponent as K, className as Ye, template as L, addEventListener as $t, style as ct, use as xt, setStyleProperty as _t, delegateEvents as It } from "solid-js/web";
|
|
2
|
+
import { createSignal as le, createMemo as R, onCleanup as Be, untrack as ze, createEffect as xe, For as Ge, Show as ne } from "solid-js";
|
|
3
|
+
import { r as Ct } from "./adapter-CgoRd_uP.js";
|
|
4
|
+
import { C as Lt, f as kt } from "./keys-DboqvsSZ.js";
|
|
5
|
+
import { s as Ft, o as De, c as At, a as Kt, b as Tt, d as Rt, f as Et } from "./scales-BKnFdYip.js";
|
|
6
|
+
import { H as Ht, u as Fe, g as dt, I as Bt, J as nt, K as ot, l as Mt, M as Ot, N as Nt, O as Ut, Q as Vt, a as Pt, R as zt, T as Dt, U as rt, m as ut, n as gt, k as mt, V as qt, W as Wt, o as Zt, X as jt, Y as Qt, Z as Yt, _ as Gt, $ as z, a0 as at, a1 as Jt, a2 as qe, a3 as Xt, a4 as en, a5 as tn, a6 as nn, a7 as on } from "./index-CPIuDkay.js";
|
|
7
|
+
import { C as rn, c as an } from "./ChartDataEquivalent-y0Ja1lfd.js";
|
|
8
|
+
var ln = /* @__PURE__ */ L("<div class=lens-temporal-controls>"), sn = /* @__PURE__ */ L("<button class=lens-temporal-toggle type=button>"), cn = /* @__PURE__ */ L("<select class=lens-temporal-select><option value>"), dn = /* @__PURE__ */ L("<option>"), un = /* @__PURE__ */ L("<span class=lens-chart-source-note role=note>"), gn = /* @__PURE__ */ L("<span class=lens-chart-log-scale role=note><span>"), mn = /* @__PURE__ */ L("<span class=lens-chart-period-note role=note>"), hn = /* @__PURE__ */ L("<button class=lens-chart-collapse-other type=button>"), fn = /* @__PURE__ */ L("<button class=lens-chart-reset-zoom type=button>"), vn = /* @__PURE__ */ L("<div class=lens-chart-notes><span class=lens-chart-notes-actions>"), wn = /* @__PURE__ */ L("<div><div class=lens-chart-area>"), pn = /* @__PURE__ */ L("<div class=lens-chart-empty role=status><span class=lens-chart-empty-note></span><button class=lens-chart-empty-action type=button>"), yn = /* @__PURE__ */ L("<span class=lens-chart-compact-empty>"), bn = /* @__PURE__ */ L("<strong class=lens-chart-compact-value>"), Sn = /* @__PURE__ */ L("<span class=lens-chart-compact-label>"), $n = /* @__PURE__ */ L('<button class="lens-chart-compact lens-chart-compact-action"type=button>'), xn = /* @__PURE__ */ L("<div class=lens-chart-compact role=img>"), _n = /* @__PURE__ */ L("<span class=lens-plot-total><span class=lens-panel-total-label>:</span> "), In = /* @__PURE__ */ L('<div class=lens-chart-legend-shell><div class=lens-chart-legend-scroll-frame><ul class=lens-chart-legend role=region></ul><span aria-hidden=true class="lens-chart-legend-edge lens-chart-legend-edge-top"></span><span aria-hidden=true class="lens-chart-legend-edge lens-chart-legend-edge-bottom">'), Cn = /* @__PURE__ */ L("<div class=lens-chart-legend-controls><div class=lens-chart-legend-tools role=group>"), Qe = /* @__PURE__ */ L("<button type=button>"), Ln = /* @__PURE__ */ L("<button class=lens-chart-legend-invert type=button>"), kn = /* @__PURE__ */ L("<label class=lens-chart-legend-search><span class=lens:sr-only></span><input class=lens-facet-search type=search>"), Fn = /* @__PURE__ */ L("<li class=lens-chart-legend-item><button type=button><span aria-hidden=true class=lens-chart-legend-mark></span><span class=lens-chart-legend-label></span><span aria-hidden=true class=lens-chart-legend-visibility>"), An = /* @__PURE__ */ L("<li class=lens-chart-legend-heading>"), ht = /* @__PURE__ */ L("<span class=lens-chart-legend-value>"), Kn = /* @__PURE__ */ L("<button class=lens-chart-legend-overflow type=button>"), Tn = /* @__PURE__ */ L('<ul class="lens-chart-legend lens-chart-overlay-legend"><li class=lens-chart-legend-heading>'), Rn = /* @__PURE__ */ L("<li class=lens-chart-legend-item><button type=button><span aria-hidden=true class=lens-chart-overlay-mark></span><span class=lens-chart-legend-label>"), En = /* @__PURE__ */ L("<span aria-hidden=true class=lens-chart-legend-separator>·");
|
|
9
|
+
const Hn = 0.02, Bn = on, Mn = 4;
|
|
10
|
+
function On(e) {
|
|
11
|
+
const t = z(), o = z(e.encoding.label ? e.format[e.encoding.label] : void 0), a = z(e.encoding.value ? e.format[e.encoding.value] : void 0), g = z(e.encoding.previous ? e.format[e.encoding.previous] : void 0), l = z(e.encoding.lower ? e.format[e.encoding.lower] : void 0), _ = z(e.encoding.q1 ? e.format[e.encoding.q1] : void 0), I = z(e.encoding.median ? e.format[e.encoding.median] : void 0), b = z(e.encoding.q3 ? e.format[e.encoding.q3] : void 0), $ = z(e.encoding.upper ? e.format[e.encoding.upper] : void 0), S = z(e.encoding.id ? e.format[e.encoding.id] : void 0), B = z(e.encoding.series ? e.format[e.encoding.series] : void 0), v = z(e.encoding.category ? e.format[e.encoding.category] : void 0), m = z(e.encoding.cut ? e.format[e.encoding.cut] : void 0), M = z(e.encoding.cutLabel ? e.format[e.encoding.cutLabel] : void 0), q = z(e.encoding.final ? e.format[e.encoding.final] : void 0), oe = at(e.encoding.value ? e.format[e.encoding.value] : void 0), Q = at(e.encoding.median ? e.format[e.encoding.median] : void 0), w = R(() => {
|
|
12
|
+
const se = {
|
|
13
13
|
label: o,
|
|
14
|
-
value:
|
|
14
|
+
value: a,
|
|
15
15
|
previous: g,
|
|
16
16
|
lower: l,
|
|
17
17
|
q1: _,
|
|
@@ -24,15 +24,15 @@ function Hn(e) {
|
|
|
24
24
|
cut: m,
|
|
25
25
|
cutLabel: M,
|
|
26
26
|
final: q
|
|
27
|
-
},
|
|
28
|
-
for (const J of
|
|
29
|
-
const re = e.encoding[J], X =
|
|
30
|
-
re && X &&
|
|
27
|
+
}, ge = /* @__PURE__ */ new Map();
|
|
28
|
+
for (const J of Jt) {
|
|
29
|
+
const re = e.encoding[J], X = se[J];
|
|
30
|
+
re && X && ge.set(re, X);
|
|
31
31
|
}
|
|
32
|
-
return (J, re) => (
|
|
32
|
+
return (J, re) => (ge.get(J) ?? t)(re);
|
|
33
33
|
}), W = R(() => {
|
|
34
|
-
const
|
|
35
|
-
return (J, re) =>
|
|
34
|
+
const se = e.encoding.value, ge = e.encoding.median;
|
|
35
|
+
return (J, re) => se && J === se ? oe(re) : ge && J === ge ? Q(re) : w()(J, re);
|
|
36
36
|
});
|
|
37
37
|
return {
|
|
38
38
|
format: w(),
|
|
@@ -41,7 +41,7 @@ function Hn(e) {
|
|
|
41
41
|
}
|
|
42
42
|
function We(e, t, o) {
|
|
43
43
|
var I, b;
|
|
44
|
-
const
|
|
44
|
+
const a = t.encoding.id ? e.columns.findIndex(($) => $.name === t.encoding.id) : -1, g = [t.encoding.category, t.encoding.label].find(($) => !!$ && e.columns.some((S) => S.name === $)), l = e.columns.findIndex(($) => $.name === g), _ = a >= 0 ? (I = e.rows[o]) == null ? void 0 : I[a] : (b = e.rows[o]) == null ? void 0 : b[l];
|
|
45
45
|
return String(typeof _ == "string" || typeof _ == "number" || typeof _ == "bigint" ? _ : o);
|
|
46
46
|
}
|
|
47
47
|
function lt(e, t, o) {
|
|
@@ -51,24 +51,24 @@ function lt(e, t, o) {
|
|
|
51
51
|
if (b >= 0) {
|
|
52
52
|
const $ = e.rows.findIndex((S, B) => {
|
|
53
53
|
const v = S[b], m = typeof v == "string" || typeof v == "number" || typeof v == "bigint" ? String(v) : "";
|
|
54
|
-
return
|
|
54
|
+
return Ct(m, We(e, t, B)) === o;
|
|
55
55
|
});
|
|
56
56
|
if ($ >= 0) return $;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
const
|
|
60
|
-
if (
|
|
59
|
+
const a = e.rows.findIndex((b, $) => We(e, t, $) === o);
|
|
60
|
+
if (a >= 0) return a;
|
|
61
61
|
const g = t.encoding.category ?? t.encoding.label, l = e.columns.findIndex((b) => b.name === g), _ = e.columns.findIndex((b) => b.name === t.encoding.series);
|
|
62
|
-
return l < 0 ? -1 : e.rows.findIndex((b) =>
|
|
62
|
+
return l < 0 ? -1 : e.rows.findIndex((b) => kt(ke(b[l]), _ >= 0 ? ke(b[_]) : "") === o);
|
|
63
63
|
}
|
|
64
64
|
function ft(e, t) {
|
|
65
65
|
return t.semantics !== "series" || !t.encoding.series ? -1 : e.columns.findIndex((o) => o.name === t.encoding.series);
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function Nn(e, t, o) {
|
|
68
68
|
var l;
|
|
69
|
-
const
|
|
70
|
-
if (
|
|
71
|
-
const g = (l = e.rows[o]) == null ? void 0 : l[
|
|
69
|
+
const a = ft(e, t);
|
|
70
|
+
if (a < 0) return We(e, t, o);
|
|
71
|
+
const g = (l = e.rows[o]) == null ? void 0 : l[a];
|
|
72
72
|
return String(typeof g == "string" || typeof g == "number" || typeof g == "bigint" ? g : o);
|
|
73
73
|
}
|
|
74
74
|
function ve(e) {
|
|
@@ -81,19 +81,19 @@ function ve(e) {
|
|
|
81
81
|
function ke(e) {
|
|
82
82
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "bigint" ? String(e) : "";
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function Un(e, t) {
|
|
85
85
|
const g = (t.kind === "pie" || t.kind === "donut" || t.kind === "radial" ? [t.encoding.label, t.encoding.category] : [t.encoding.category, t.encoding.label]).reduce((l, _) => l >= 0 || !_ ? l : e.columns.findIndex((I) => I.name === _), -1);
|
|
86
86
|
return g < 0 ? 0 : new Set(e.rows.map((l) => l[g]).filter((l) => l != null).map(String)).size;
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
const o = e.columns.findIndex((
|
|
90
|
-
return o < 0 ? 1 : new Set(e.rows.map((
|
|
88
|
+
function Vn(e, t) {
|
|
89
|
+
const o = e.columns.findIndex((a) => a.name === t.encoding.series);
|
|
90
|
+
return o < 0 ? 1 : new Set(e.rows.map((a) => a[o]).filter((a) => a != null).map(String)).size;
|
|
91
91
|
}
|
|
92
|
-
const vt = "__lens_other__",
|
|
92
|
+
const vt = "__lens_other__", Pn = "__lens_topn_group";
|
|
93
93
|
function st(e, t) {
|
|
94
94
|
var S, B;
|
|
95
|
-
const o = e.columns.findIndex((v) => v.name ===
|
|
96
|
-
if (o < 0 ||
|
|
95
|
+
const o = e.columns.findIndex((v) => v.name === Pn), a = e.columns.findIndex((v) => v.name === (t.encoding.label ?? t.encoding.category)), g = e.columns.findIndex((v) => v.name === t.encoding.id), l = e.columns.findIndex((v) => v.name === t.encoding.value);
|
|
96
|
+
if (o < 0 || a < 0 || l < 0) return {
|
|
97
97
|
frame: e,
|
|
98
98
|
collapsed: !1
|
|
99
99
|
};
|
|
@@ -103,7 +103,7 @@ function st(e, t) {
|
|
|
103
103
|
collapsed: !1
|
|
104
104
|
};
|
|
105
105
|
const I = e.rows.filter((v) => !_.includes(v)).map((v) => [...v]), b = new Array(e.columns.length).fill(null);
|
|
106
|
-
b[o] = (S = _[0]) == null ? void 0 : S[o], b[
|
|
106
|
+
b[o] = (S = _[0]) == null ? void 0 : S[o], b[a] = (B = _[0]) == null ? void 0 : B[o], g >= 0 && (b[g] = vt), b[l] = _.reduce((v, m) => v + (ve(m[l]) ?? 0), 0), I.push(b);
|
|
107
107
|
const $ = e.colors ? [...e.colors.filter((v, m) => !_.includes(e.rows[m])), qe()] : [...I.slice(0, -1).map(() => ""), qe()];
|
|
108
108
|
return {
|
|
109
109
|
frame: {
|
|
@@ -119,8 +119,8 @@ function it(e, t, o) {
|
|
|
119
119
|
frame: e,
|
|
120
120
|
collapsed: !1
|
|
121
121
|
};
|
|
122
|
-
const
|
|
123
|
-
if (
|
|
122
|
+
const a = e.columns.findIndex((m) => m.name === (t.encoding.label ?? t.encoding.category)), g = e.columns.findIndex((m) => m.name === t.encoding.id), l = e.columns.findIndex((m) => m.name === t.encoding.value);
|
|
123
|
+
if (a < 0 || l < 0) return {
|
|
124
124
|
frame: e,
|
|
125
125
|
collapsed: !1
|
|
126
126
|
};
|
|
@@ -134,7 +134,7 @@ function it(e, t, o) {
|
|
|
134
134
|
value: ve(m[l]) ?? 0
|
|
135
135
|
})).filter(({
|
|
136
136
|
value: m
|
|
137
|
-
}) => m / _ <
|
|
137
|
+
}) => m / _ < Hn);
|
|
138
138
|
if (I.length === 0) return {
|
|
139
139
|
frame: e,
|
|
140
140
|
collapsed: !1
|
|
@@ -142,7 +142,7 @@ function it(e, t, o) {
|
|
|
142
142
|
const b = new Set(I.map(({
|
|
143
143
|
index: m
|
|
144
144
|
}) => m)), $ = e.rows.filter((m, M) => !b.has(M)).map((m) => [...m]), S = new Array(e.columns.length).fill(null);
|
|
145
|
-
S[
|
|
145
|
+
S[a] = o, g >= 0 && (S[g] = vt), S[l] = I.reduce((m, M) => m + M.value, 0), $.push(S);
|
|
146
146
|
const B = e.rows.map((m, M) => M).filter((m) => !b.has(m)), v = e.colors ? [...e.colors.filter((m, M) => !b.has(M)), qe()] : [...B.map(() => ""), qe()];
|
|
147
147
|
return {
|
|
148
148
|
frame: {
|
|
@@ -153,63 +153,63 @@ function it(e, t, o) {
|
|
|
153
153
|
collapsed: !0
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function to(e) {
|
|
157
157
|
var tt;
|
|
158
|
-
const t = e.panel, o =
|
|
158
|
+
const t = e.panel, o = Ht(t.id), a = Fe(), {
|
|
159
159
|
document: g,
|
|
160
160
|
navigation: l
|
|
161
161
|
} = dt(), {
|
|
162
162
|
drillInto: _
|
|
163
|
-
} =
|
|
163
|
+
} = Bt(), {
|
|
164
164
|
format: I,
|
|
165
165
|
formatAxis: b
|
|
166
|
-
} =
|
|
166
|
+
} = On(t), [$, S] = le(), [B, v] = le(!1), [m, M] = le(0), q = typeof window > "u" ? {
|
|
167
167
|
regression: !1
|
|
168
|
-
} : nt(new URL(window.location.href), t.id), [oe, Q] =
|
|
168
|
+
} : nt(new URL(window.location.href), t.id), [oe, Q] = le(q.regression), [w, W] = le(q.movingAverage), [se, ge] = le(/* @__PURE__ */ new Set()), [J, re] = le(typeof window > "u" ? /* @__PURE__ */ new Set() : ot(new URL(window.location.href), t.id)), X = R(() => J()), _e = () => l.panelId === t.id && l.path.length > 0, ee = R(() => _e() ? Mt(g, l.path) : t.drillRoot ? g.drill.edges[t.drillRoot] : void 0), Ie = () => ee() ? ee().children.some(({
|
|
169
169
|
target: n
|
|
170
|
-
}) => n) : !!t.drillRoot, G = () => !!t.drillRoot || !!ee(), x =
|
|
170
|
+
}) => n) : !!t.drillRoot, G = () => !!t.drillRoot || !!ee(), x = Ot(t);
|
|
171
171
|
let ie;
|
|
172
172
|
const Me = (n) => {
|
|
173
|
-
if (
|
|
174
|
-
const
|
|
175
|
-
return x.urlForRow(o.data,
|
|
173
|
+
if (ze(G) || !x.action || !o.data) return;
|
|
174
|
+
const r = lt(o.data, t, n);
|
|
175
|
+
return x.urlForRow(o.data, r >= 0 ? o.data.rows[r] : void 0);
|
|
176
176
|
}, Ae = (n) => {
|
|
177
|
-
ie == null || ie(), ie = void 0, !(n === null ||
|
|
177
|
+
ie == null || ie(), ie = void 0, !(n === null || ze(G)) && (ie = x.prefetch(Me(n)));
|
|
178
178
|
};
|
|
179
179
|
Be(() => ie == null ? void 0 : ie());
|
|
180
180
|
const Oe = R(() => {
|
|
181
181
|
var n;
|
|
182
|
-
return
|
|
183
|
-
const s = x.urlForRow(o.data,
|
|
182
|
+
return ze(G) || ((n = x.action) == null ? void 0 : n.kind) !== "open_drawer" || !o.data ? [] : o.data.rows.length === 0 || o.data.rows.length > 4 ? [] : [...new Set(o.data.rows.flatMap((r) => {
|
|
183
|
+
const s = x.urlForRow(o.data, r);
|
|
184
184
|
return s ? [s] : [];
|
|
185
185
|
}))];
|
|
186
186
|
});
|
|
187
187
|
xe(() => {
|
|
188
188
|
const n = Oe();
|
|
189
189
|
if (n.length === 0) return;
|
|
190
|
-
const
|
|
191
|
-
Be(
|
|
190
|
+
const r = x.prefetchIdle(n);
|
|
191
|
+
Be(r);
|
|
192
192
|
});
|
|
193
|
-
const Ke =
|
|
194
|
-
var n,
|
|
195
|
-
return ((n = x.action) == null ? void 0 : n.kind) === "cross_filter" || ((
|
|
193
|
+
const Ke = Nt(), be = () => {
|
|
194
|
+
var n, r;
|
|
195
|
+
return ((n = x.action) == null ? void 0 : n.kind) === "cross_filter" || ((r = x.action) == null ? void 0 : r.kind) === "cube_drill" ? x.action.filter : void 0;
|
|
196
196
|
}, we = R(() => {
|
|
197
197
|
var u;
|
|
198
198
|
if (!((u = be()) != null && u.dimension)) return;
|
|
199
|
-
const n = Ke.values[
|
|
199
|
+
const n = Ke.values[Ut], r = Array.isArray(n) ? n : n ? [n] : [], s = `${be().dimension}:`, d = new Set(r.filter((P) => P.startsWith(s)).map((P) => P.slice(s.length)));
|
|
200
200
|
return d.size > 0 ? d : void 0;
|
|
201
201
|
}), Ze = R(() => {
|
|
202
202
|
if (!we() || !be() || !o.data) return;
|
|
203
203
|
new URL(globalThis.location.href);
|
|
204
204
|
const n = o.data;
|
|
205
|
-
for (let
|
|
206
|
-
const s =
|
|
207
|
-
fields:
|
|
205
|
+
for (let r = 0; r < n.rows.length; r += 1) {
|
|
206
|
+
const s = Vt(be().value, {
|
|
207
|
+
fields: Pt(n, n.rows[r]),
|
|
208
208
|
variables: {}
|
|
209
209
|
}), d = ke(s);
|
|
210
|
-
if (d !== "" && we().has(d)) return We(n, t,
|
|
210
|
+
if (d !== "" && we().has(d)) return We(n, t, r);
|
|
211
211
|
}
|
|
212
|
-
}),
|
|
212
|
+
}), ae = t.kind, Te = () => o.data ? Un(o.data, t) <= 1 && Vn(o.data, t) <= 1 : !1, Ne = () => `${l.panelId === t.id ? l.path.join("|") : ""}:${l.perspectiveId ?? ""}`;
|
|
213
213
|
let Re;
|
|
214
214
|
xe(() => {
|
|
215
215
|
const n = Ne();
|
|
@@ -222,341 +222,341 @@ function Jn(e) {
|
|
|
222
222
|
window.addEventListener("popstate", n), Be(() => window.removeEventListener("popstate", n));
|
|
223
223
|
}), xe(() => {
|
|
224
224
|
if (typeof window > "u") return;
|
|
225
|
-
const n = new URL(window.location.href),
|
|
226
|
-
|
|
225
|
+
const n = new URL(window.location.href), r = zt(n, t.id, X());
|
|
226
|
+
r.search !== n.search && window.history.replaceState(window.history.state, "", r);
|
|
227
227
|
}), xe(() => {
|
|
228
228
|
if (typeof window > "u") return;
|
|
229
229
|
const n = () => {
|
|
230
|
-
const
|
|
231
|
-
Q(
|
|
230
|
+
const r = nt(new URL(window.location.href), t.id);
|
|
231
|
+
Q(r.regression), W(r.movingAverage);
|
|
232
232
|
};
|
|
233
233
|
window.addEventListener("popstate", n), Be(() => window.removeEventListener("popstate", n));
|
|
234
234
|
}), xe(() => {
|
|
235
235
|
if (typeof window > "u") return;
|
|
236
|
-
const n = new URL(window.location.href),
|
|
236
|
+
const n = new URL(window.location.href), r = Dt(n, t.id, {
|
|
237
237
|
regression: oe(),
|
|
238
238
|
movingAverage: w()
|
|
239
239
|
});
|
|
240
|
-
|
|
240
|
+
r.search !== n.search && window.history.replaceState(window.history.state, "", r);
|
|
241
241
|
});
|
|
242
|
-
const
|
|
243
|
-
var
|
|
242
|
+
const C = R(() => {
|
|
243
|
+
var P, te;
|
|
244
244
|
if (!o.data || X().size === 0) return o.data;
|
|
245
|
-
const n = o.data.rows.map((
|
|
245
|
+
const n = o.data.rows.map((ue, $e) => !X().has(Nn(o.data, t, $e))), r = o.data.rows.filter((ue, $e) => n[$e]), s = (P = o.data.colors) == null ? void 0 : P.filter((ue, $e) => n[$e]), d = o.data.columns.findIndex((ue) => ue.name === t.encoding.value), u = ((te = t.radial) == null ? void 0 : te.mode) === "partition" || d < 0 ? o.data.total : r.reduce((ue, $e) => ue + (ve($e[d]) ?? 0), 0);
|
|
246
246
|
return {
|
|
247
247
|
...o.data,
|
|
248
|
-
rows:
|
|
248
|
+
rows: r,
|
|
249
249
|
total: u,
|
|
250
250
|
...s ? {
|
|
251
251
|
colors: s
|
|
252
252
|
} : {}
|
|
253
253
|
};
|
|
254
254
|
}), y = R(() => {
|
|
255
|
-
const n =
|
|
255
|
+
const n = C();
|
|
256
256
|
if (!n) return {
|
|
257
257
|
frame: n,
|
|
258
258
|
collapsed: !1
|
|
259
259
|
};
|
|
260
|
-
const
|
|
261
|
-
return
|
|
260
|
+
const r = st(n, t);
|
|
261
|
+
return r.collapsed ? r : it(n, t, a("chart.other", "Other"));
|
|
262
262
|
}), f = () => {
|
|
263
263
|
const n = y();
|
|
264
|
-
return n.collapsed && n.frame ?
|
|
265
|
-
},
|
|
264
|
+
return n.collapsed && n.frame ? an(n.frame, t, n.frame.rows.length - 1) : void 0;
|
|
265
|
+
}, k = R(() => B() || !y().collapsed ? C() : y().frame), E = R(() => {
|
|
266
266
|
var n;
|
|
267
|
-
return
|
|
267
|
+
return k() ? Ft(k(), t.encoding, t.valueAxis, (n = t.presentation) == null ? void 0 : n.valueSpreadThreshold) : !1;
|
|
268
268
|
}), O = R(() => {
|
|
269
269
|
if (!o.data || B()) return o.data;
|
|
270
270
|
const n = st(o.data, t);
|
|
271
|
-
return n.collapsed ? n.frame : it(o.data, t,
|
|
271
|
+
return n.collapsed ? n.frame : it(o.data, t, a("chart.other", "Other")).frame;
|
|
272
272
|
}), h = R(() => {
|
|
273
|
-
var
|
|
274
|
-
if (!o.data || X().size === 0 || !t.encoding.value || ((
|
|
273
|
+
var r, s;
|
|
274
|
+
if (!o.data || X().size === 0 || !t.encoding.value || ((r = t.radial) == null ? void 0 : r.mode) === "partition") return;
|
|
275
275
|
const n = o.data.columns.findIndex((d) => d.name === t.encoding.value);
|
|
276
276
|
if (!(n < 0))
|
|
277
|
-
return (((s =
|
|
277
|
+
return (((s = C()) == null ? void 0 : s.rows) ?? []).reduce((d, u) => d + (ve(u[n]) ?? 0), 0);
|
|
278
278
|
}), T = R(() => {
|
|
279
|
-
var
|
|
280
|
-
if (!o.data || !t.encoding.value || ((
|
|
279
|
+
var r;
|
|
280
|
+
if (!o.data || !t.encoding.value || ((r = t.radial) == null ? void 0 : r.mode) === "partition") return;
|
|
281
281
|
const n = o.data.columns.findIndex((s) => s.name === t.encoding.value);
|
|
282
282
|
if (!(n < 0))
|
|
283
283
|
return o.data.rows.reduce((s, d) => s + (ve(d[n]) ?? 0), 0);
|
|
284
284
|
}), N = () => {
|
|
285
285
|
var n;
|
|
286
|
-
return X().size > 0 && (((n =
|
|
286
|
+
return X().size > 0 && (((n = C()) == null ? void 0 : n.rows.length) ?? 0) === 0;
|
|
287
287
|
}, Z = () => {
|
|
288
|
-
var n,
|
|
289
|
-
return ((
|
|
290
|
-
}, ce = () => o.data && (o.data.rows.length > 0 || Z()) ? o.data.total ?? (Z() || _e() || t.kind === "pie" || t.kind === "donut" || t.kind === "radial" ? T() : void 0) ?? t.total : void 0,
|
|
288
|
+
var n, r;
|
|
289
|
+
return ((r = ((n = o.data) == null ? void 0 : n.presentation) ?? t.presentation) == null ? void 0 : r.keepTotalBadge) === !0;
|
|
290
|
+
}, ce = () => o.data && (o.data.rows.length > 0 || Z()) ? o.data.total ?? (Z() || _e() || t.kind === "pie" || t.kind === "donut" || t.kind === "radial" ? T() : void 0) ?? t.total : void 0, me = R(() => ce() === void 0 || N() && !Z() ? null : X().size > 0 ? h() ?? null : ce()), de = () => {
|
|
291
291
|
var n;
|
|
292
292
|
return ((n = o.data) == null ? void 0 : n.presentation) ?? t.presentation;
|
|
293
293
|
}, p = () => {
|
|
294
294
|
var n;
|
|
295
|
-
return (n =
|
|
296
|
-
},
|
|
297
|
-
const
|
|
298
|
-
|
|
299
|
-
},
|
|
295
|
+
return (n = k()) == null ? void 0 : n.colors;
|
|
296
|
+
}, F = (n) => {
|
|
297
|
+
const r = new Set(X());
|
|
298
|
+
r.has(n) ? r.delete(n) : r.add(n), c(r);
|
|
299
|
+
}, A = R(() => {
|
|
300
300
|
if (ee())
|
|
301
301
|
return (n) => {
|
|
302
|
-
var
|
|
303
|
-
return !!((
|
|
302
|
+
var r;
|
|
303
|
+
return !!((r = rt(ee(), n)) != null && r.target);
|
|
304
304
|
};
|
|
305
305
|
}), V = R(() => ut(o.data, t)), U = R(() => gt(g.theme, t, o.data, !_e())), Se = R(() => mt(g.theme, t, {
|
|
306
306
|
colors: p(),
|
|
307
307
|
positional: !_e(),
|
|
308
308
|
labels: V()
|
|
309
309
|
})), Ee = R(() => {
|
|
310
|
-
var
|
|
311
|
-
const n = new Set(
|
|
312
|
-
oe() || n.add(
|
|
310
|
+
var r;
|
|
311
|
+
const n = new Set(se());
|
|
312
|
+
oe() || n.add(De.trend);
|
|
313
313
|
for (const {
|
|
314
314
|
window: s
|
|
315
|
-
} of ((
|
|
316
|
-
s !== w() && n.add(
|
|
315
|
+
} of ((r = t.temporal) == null ? void 0 : r.movingAverages) ?? [])
|
|
316
|
+
s !== w() && n.add(De.average(s));
|
|
317
317
|
return n;
|
|
318
318
|
}), Ue = (n) => {
|
|
319
319
|
var s, d;
|
|
320
|
-
if (n ===
|
|
320
|
+
if (n === De.trend) {
|
|
321
321
|
Q((u) => !u);
|
|
322
322
|
return;
|
|
323
323
|
}
|
|
324
|
-
const
|
|
324
|
+
const r = (d = (s = t.temporal) == null ? void 0 : s.movingAverages) == null ? void 0 : d.find(({
|
|
325
325
|
window: u
|
|
326
|
-
}) =>
|
|
327
|
-
if (
|
|
328
|
-
W((u) => u ===
|
|
326
|
+
}) => De.average(u) === n);
|
|
327
|
+
if (r) {
|
|
328
|
+
W((u) => u === r.window ? void 0 : r.window);
|
|
329
329
|
return;
|
|
330
330
|
}
|
|
331
|
-
|
|
332
|
-
const
|
|
333
|
-
return
|
|
331
|
+
ge((u) => {
|
|
332
|
+
const P = new Set(u);
|
|
333
|
+
return P.has(n) ? P.delete(n) : P.add(n), P;
|
|
334
334
|
});
|
|
335
|
-
}, j = (
|
|
336
|
-
var n =
|
|
335
|
+
}, j = (ae === "line" || ae === "area") && t.temporal && (t.temporal.regression || (tt = t.temporal.movingAverages) != null && tt.length) ? (() => {
|
|
336
|
+
var n = ln();
|
|
337
337
|
return i(n, (() => {
|
|
338
|
-
var
|
|
339
|
-
return () =>
|
|
340
|
-
var s =
|
|
341
|
-
return s.$$click = () => Q((d) => !d), i(s, () =>
|
|
338
|
+
var r = D(() => !!t.temporal.regression);
|
|
339
|
+
return () => r() && (() => {
|
|
340
|
+
var s = sn();
|
|
341
|
+
return s.$$click = () => Q((d) => !d), i(s, () => a("chart.regression", "Trend")), Y(() => H(s, "aria-pressed", oe())), s;
|
|
342
342
|
})();
|
|
343
343
|
})(), null), i(n, (() => {
|
|
344
|
-
var
|
|
344
|
+
var r = D(() => {
|
|
345
345
|
var s;
|
|
346
346
|
return !!((s = t.temporal.movingAverages) != null && s.length);
|
|
347
347
|
});
|
|
348
|
-
return () =>
|
|
349
|
-
var s =
|
|
350
|
-
return s.addEventListener("change", (u) => W(u.target.value ? Number(u.target.value) : void 0)), i(d, () =>
|
|
348
|
+
return () => r() && (() => {
|
|
349
|
+
var s = cn(), d = s.firstChild;
|
|
350
|
+
return s.addEventListener("change", (u) => W(u.target.value ? Number(u.target.value) : void 0)), i(d, () => a("chart.movingAverage", "Moving average")), i(s, K(Ge, {
|
|
351
351
|
get each() {
|
|
352
352
|
return t.temporal.movingAverages;
|
|
353
353
|
},
|
|
354
354
|
children: ({
|
|
355
355
|
window: u,
|
|
356
|
-
label:
|
|
356
|
+
label: P
|
|
357
357
|
}) => (() => {
|
|
358
|
-
var te =
|
|
359
|
-
return te.value = u, i(te,
|
|
358
|
+
var te = dn();
|
|
359
|
+
return te.value = u, i(te, P || `SMA ${u}`), te;
|
|
360
360
|
})()
|
|
361
|
-
}), null), Y(() => H(s, "aria-label",
|
|
361
|
+
}), null), Y(() => H(s, "aria-label", a("chart.movingAverage", "Moving average"))), Y(() => s.value = w() ?? ""), s;
|
|
362
362
|
})();
|
|
363
363
|
})(), null), n;
|
|
364
364
|
})() : void 0, pe = R(() => ({
|
|
365
|
-
current:
|
|
366
|
-
previous:
|
|
367
|
-
trend:
|
|
368
|
-
movingAverage: (n) =>
|
|
365
|
+
current: a("chart.series.current", "Current period"),
|
|
366
|
+
previous: a("chart.series.previous", "Previous"),
|
|
367
|
+
trend: a("chart.series.trend", "Trend"),
|
|
368
|
+
movingAverage: (n) => a("chart.series.movingAverage", "SMA {window}", {
|
|
369
369
|
window: String(n)
|
|
370
370
|
}),
|
|
371
|
-
estimate:
|
|
372
|
-
ytd:
|
|
373
|
-
forecast:
|
|
374
|
-
forecastLower: (n) =>
|
|
371
|
+
estimate: a("chart.series.estimate", "Estimate"),
|
|
372
|
+
ytd: a("chart.series.ytd", "YTD"),
|
|
373
|
+
forecast: a("chart.series.forecast", "Forecast"),
|
|
374
|
+
forecastLower: (n) => a("chart.series.forecastLower", "{forecast} lower", {
|
|
375
375
|
forecast: n
|
|
376
376
|
}),
|
|
377
|
-
forecastConfidence: (n) =>
|
|
377
|
+
forecastConfidence: (n) => a("chart.series.forecastConfidence", "{forecast} confidence", {
|
|
378
378
|
forecast: n
|
|
379
379
|
}),
|
|
380
|
-
boxplot: [
|
|
381
|
-
noData:
|
|
382
|
-
copyValue:
|
|
383
|
-
copied:
|
|
380
|
+
boxplot: [a("chart.boxplot.min", "Min"), a("chart.boxplot.q1", "Q1"), a("chart.boxplot.median", "Median"), a("chart.boxplot.q3", "Q3"), a("chart.boxplot.max", "Max")],
|
|
381
|
+
noData: a("panel.empty", "No data"),
|
|
382
|
+
copyValue: a("explore.copyValue", "Copy value"),
|
|
383
|
+
copied: a("explore.copied", "Copied")
|
|
384
384
|
})), ye = R(() => {
|
|
385
|
-
var n,
|
|
386
|
-
return
|
|
387
|
-
kind:
|
|
388
|
-
frame:
|
|
385
|
+
var n, r;
|
|
386
|
+
return k() ? {
|
|
387
|
+
kind: ae,
|
|
388
|
+
frame: k(),
|
|
389
389
|
encoding: t.encoding,
|
|
390
390
|
format: I,
|
|
391
391
|
formatAxis: b,
|
|
392
|
-
formatTooltip: (s, d, u) =>
|
|
392
|
+
formatTooltip: (s, d, u) => jt(d, u, t.format[s], g.meta.locale),
|
|
393
393
|
// The plot abbreviates because a label has to fit beside a mark; the
|
|
394
394
|
// tooltip is where a reader who stopped to point gets the whole number, and
|
|
395
395
|
// the clipboard gets the machine value behind it.
|
|
396
396
|
formatExact: (s, d) => {
|
|
397
397
|
var u;
|
|
398
|
-
return
|
|
398
|
+
return Zt(d, t.format[s], ((u = g.meta) == null ? void 0 : u.locale) ?? "en");
|
|
399
399
|
},
|
|
400
|
-
rawValue: (s, d) =>
|
|
400
|
+
rawValue: (s, d) => Wt(d, t.format[s]),
|
|
401
401
|
categoryFormatDefined: !!(t.encoding.category && t.format[t.encoding.category]),
|
|
402
402
|
locale: (n = g.meta) == null ? void 0 : n.locale,
|
|
403
|
-
shareDecimalSeparator: t.encoding.value ? (
|
|
404
|
-
tooltipTotalLabel:
|
|
403
|
+
shareDecimalSeparator: t.encoding.value ? (r = t.format[t.encoding.value]) == null ? void 0 : r.decimalSeparator : void 0,
|
|
404
|
+
tooltipTotalLabel: a("panel.total", "Total"),
|
|
405
405
|
labels: pe(),
|
|
406
406
|
theme: g.theme,
|
|
407
407
|
// An explicit pick wins; otherwise the mark the page is currently filtered
|
|
408
408
|
// by carries the same outline, so the source panel states its own selection
|
|
409
409
|
// across a reload or a shared URL, not only in the click that made it.
|
|
410
410
|
selectedKey: $() ?? Ze(),
|
|
411
|
-
presentation:
|
|
411
|
+
presentation: de(),
|
|
412
412
|
seriesColor: U(),
|
|
413
413
|
rowColor: Se(),
|
|
414
414
|
radial: t.radial,
|
|
415
415
|
temporal: t.temporal,
|
|
416
416
|
hiddenOverlays: Ee(),
|
|
417
417
|
valueAxis: t.valueAxis,
|
|
418
|
-
valueUnit:
|
|
419
|
-
expandable:
|
|
418
|
+
valueUnit: qt(t.encoding.value ? t.format[t.encoding.value] : void 0),
|
|
419
|
+
expandable: A()
|
|
420
420
|
} : void 0;
|
|
421
421
|
}), he = R(() => {
|
|
422
|
-
var
|
|
422
|
+
var r, s;
|
|
423
423
|
if (!t.temporal && !t.encoding.previous) return [];
|
|
424
424
|
const n = t.encoding.category ?? t.encoding.label;
|
|
425
|
-
return
|
|
425
|
+
return At({
|
|
426
426
|
temporal: t.temporal,
|
|
427
427
|
hasComparison: !!t.encoding.previous,
|
|
428
428
|
labels: pe(),
|
|
429
429
|
formatValue: (d) => I(t.encoding.value ?? "", d),
|
|
430
|
-
formatCategory:
|
|
430
|
+
formatCategory: Kt({
|
|
431
431
|
format: (d) => I(n ?? "", d),
|
|
432
|
-
isTime: ((
|
|
432
|
+
isTime: ((r = o.data) == null ? void 0 : r.columns.some((d) => d.name === n && d.type === "time")) === !0,
|
|
433
433
|
hasDeclaredFormat: !!(n && t.format[n]),
|
|
434
434
|
locale: (s = g.meta) == null ? void 0 : s.locale
|
|
435
435
|
}),
|
|
436
436
|
hidden: Ee()
|
|
437
437
|
});
|
|
438
|
-
}), fe =
|
|
438
|
+
}), fe = Qt(), He = () => {
|
|
439
439
|
var n;
|
|
440
440
|
return G() ? fe ? !!(((n = ee()) == null ? void 0 : n.children.length) ?? t.drillRoot) : Ie() : !!x.action;
|
|
441
|
-
}, Je =
|
|
441
|
+
}, Je = ae === "histogram" || ae === "boxplot" || ae === "heatmap", Ve = () => Te() && !Je, je = (n, r, s) => {
|
|
442
442
|
const d = y(), u = d.frame ? d.frame.rows.length - 1 : -1;
|
|
443
443
|
if (d.collapsed && !!(n === f() || d.frame && lt(d.frame, t, n) === u)) {
|
|
444
|
-
v((
|
|
444
|
+
v((ue) => !ue);
|
|
445
445
|
return;
|
|
446
446
|
}
|
|
447
|
-
if (!
|
|
448
|
-
const
|
|
449
|
-
x.activate(
|
|
447
|
+
if (!ze(G)) {
|
|
448
|
+
const ue = Me(n);
|
|
449
|
+
x.activate(ue, void 0, {
|
|
450
450
|
newTab: s == null ? void 0 : s.newTab
|
|
451
451
|
});
|
|
452
452
|
return;
|
|
453
453
|
}
|
|
454
454
|
if (fe) {
|
|
455
|
-
S(n), fe(n,
|
|
455
|
+
S(n), fe(n, r);
|
|
456
456
|
return;
|
|
457
457
|
}
|
|
458
458
|
const te = rt(ee(), n);
|
|
459
459
|
ee() && !(te != null && te.target) || (S(n), _((te == null ? void 0 : te.key) ?? n, t.id));
|
|
460
|
-
}, Xe = () => {
|
|
460
|
+
}, [wt, pt] = le(), Xe = () => {
|
|
461
|
+
var n, r;
|
|
462
|
+
return !!k() && (!Ve() && ((n = de()) == null ? void 0 : n.legend) === "below" || nn(ae, wt(), (r = de()) == null ? void 0 : r.sliceLabels));
|
|
463
|
+
}, yt = () => !Ve() && he().length > 0 && !!k(), Ce = () => He() || y().collapsed, bt = t.encoding.category ?? t.encoding.label, et = () => {
|
|
461
464
|
var n;
|
|
462
|
-
return
|
|
463
|
-
},
|
|
464
|
-
var n;
|
|
465
|
-
return (le === "line" || le === "area") && ((n = L()) == null ? void 0 : n.columns.some((a) => a.name === pt && a.type === "time")) === !0;
|
|
466
|
-
}, ze = () => he().find((n) => n.kind === "incomplete" && n.active), yt = () => be() ? r("chart.filterHint", "Select to filter the page") : r("chart.drillHint", "Select to explore"), Le = R(() => ye() && He() ? {
|
|
465
|
+
return (ae === "line" || ae === "area") && ((n = k()) == null ? void 0 : n.columns.some((r) => r.name === bt && r.type === "time")) === !0;
|
|
466
|
+
}, Pe = () => he().find((n) => n.kind === "incomplete" && n.active), St = () => be() ? a("chart.filterHint", "Select to filter the page") : a("chart.drillHint", "Select to explore"), Le = R(() => ye() && He() ? {
|
|
467
467
|
...ye(),
|
|
468
|
-
actionHint:
|
|
468
|
+
actionHint: St()
|
|
469
469
|
} : ye());
|
|
470
|
-
return K(
|
|
470
|
+
return K(Yt, {
|
|
471
471
|
allowEmptyContent: !Je,
|
|
472
472
|
headerActions: j,
|
|
473
473
|
panel: t,
|
|
474
474
|
frame: o,
|
|
475
475
|
get total() {
|
|
476
|
-
return
|
|
476
|
+
return me();
|
|
477
477
|
},
|
|
478
478
|
get children() {
|
|
479
|
-
var n =
|
|
480
|
-
return i(
|
|
479
|
+
var n = wn(), r = n.firstChild;
|
|
480
|
+
return i(r, K(ne, {
|
|
481
481
|
get when() {
|
|
482
|
-
return
|
|
482
|
+
return D(() => {
|
|
483
483
|
var s, d;
|
|
484
|
-
return ((s =
|
|
485
|
-
})() &&
|
|
484
|
+
return ((s = de()) == null ? void 0 : s.totalBadge) === "plot" && ae !== "donut" && ((d = t.radial) == null ? void 0 : d.mode) !== "partition";
|
|
485
|
+
})() && me() !== null;
|
|
486
486
|
},
|
|
487
487
|
get children() {
|
|
488
|
-
return K(
|
|
488
|
+
return K(qn, {
|
|
489
489
|
panel: t,
|
|
490
490
|
get total() {
|
|
491
|
-
return
|
|
491
|
+
return me();
|
|
492
492
|
}
|
|
493
493
|
});
|
|
494
494
|
}
|
|
495
|
-
}), null), i(
|
|
495
|
+
}), null), i(r, K(ne, {
|
|
496
496
|
get when() {
|
|
497
|
-
return E() ||
|
|
497
|
+
return E() || Pe() || et() || we() || B() && y().collapsed;
|
|
498
498
|
},
|
|
499
499
|
get children() {
|
|
500
|
-
var s =
|
|
500
|
+
var s = vn(), d = s.firstChild;
|
|
501
501
|
return i(s, K(ne, {
|
|
502
502
|
get when() {
|
|
503
503
|
return we();
|
|
504
504
|
},
|
|
505
505
|
get children() {
|
|
506
|
-
var u =
|
|
507
|
-
return i(u, () =>
|
|
506
|
+
var u = un();
|
|
507
|
+
return i(u, () => a("chart.crossFilterSource", "All categories shown — the filter applies to the other panels")), u;
|
|
508
508
|
}
|
|
509
509
|
}), d), i(s, K(ne, {
|
|
510
510
|
get when() {
|
|
511
511
|
return E();
|
|
512
512
|
},
|
|
513
513
|
get children() {
|
|
514
|
-
var u =
|
|
515
|
-
return i(u, K(
|
|
514
|
+
var u = gn(), P = u.firstChild;
|
|
515
|
+
return i(u, K(Gt, {
|
|
516
516
|
"aria-hidden": "true"
|
|
517
|
-
}),
|
|
517
|
+
}), P), i(P, () => a("chart.logScale", "Logarithmic scale")), Y(() => H(u, "title", a("chart.logScaleHint", "Values are shown on a logarithmic scale"))), u;
|
|
518
518
|
}
|
|
519
519
|
}), d), i(s, K(ne, {
|
|
520
520
|
get when() {
|
|
521
|
-
return
|
|
521
|
+
return Pe();
|
|
522
522
|
},
|
|
523
523
|
get children() {
|
|
524
|
-
var u =
|
|
525
|
-
return i(u, () => [
|
|
524
|
+
var u = mn();
|
|
525
|
+
return i(u, () => [Pe().detail, Pe().label].filter(Boolean).join(" · ")), u;
|
|
526
526
|
}
|
|
527
527
|
}), d), i(d, K(ne, {
|
|
528
528
|
get when() {
|
|
529
|
-
return
|
|
529
|
+
return D(() => !!B())() && y().collapsed;
|
|
530
530
|
},
|
|
531
531
|
get children() {
|
|
532
|
-
var u =
|
|
533
|
-
return u.$$click = () => v(!1), i(u, () =>
|
|
532
|
+
var u = hn();
|
|
533
|
+
return u.$$click = () => v(!1), i(u, () => a("chart.collapseOther", "Collapse Other")), u;
|
|
534
534
|
}
|
|
535
535
|
}), null), i(d, K(ne, {
|
|
536
536
|
get when() {
|
|
537
537
|
return et();
|
|
538
538
|
},
|
|
539
539
|
get children() {
|
|
540
|
-
var u =
|
|
541
|
-
return u.$$click = () => M((
|
|
540
|
+
var u = fn();
|
|
541
|
+
return u.$$click = () => M((P) => P + 1), i(u, () => a("chart.resetZoom", "Reset zoom")), u;
|
|
542
542
|
}
|
|
543
543
|
}), null), s;
|
|
544
544
|
}
|
|
545
|
-
}), null), i(
|
|
545
|
+
}), null), i(r, K(ne, {
|
|
546
546
|
get when() {
|
|
547
547
|
return N();
|
|
548
548
|
},
|
|
549
549
|
get children() {
|
|
550
|
-
return K(
|
|
550
|
+
return K(zn, {
|
|
551
551
|
onShowAll: () => c(/* @__PURE__ */ new Set())
|
|
552
552
|
});
|
|
553
553
|
}
|
|
554
|
-
}), null), i(
|
|
554
|
+
}), null), i(r, K(ne, {
|
|
555
555
|
get when() {
|
|
556
|
-
return
|
|
556
|
+
return D(() => !!(!N() && Le()))() && Ve();
|
|
557
557
|
},
|
|
558
558
|
get children() {
|
|
559
|
-
return K(
|
|
559
|
+
return K(Dn, {
|
|
560
560
|
get actionable() {
|
|
561
561
|
return Ce();
|
|
562
562
|
},
|
|
@@ -569,12 +569,12 @@ function Jn(e) {
|
|
|
569
569
|
panel: t
|
|
570
570
|
});
|
|
571
571
|
}
|
|
572
|
-
}), null), i(
|
|
572
|
+
}), null), i(r, K(ne, {
|
|
573
573
|
get when() {
|
|
574
|
-
return
|
|
574
|
+
return D(() => !!(!N() && Le()))() && !Ve();
|
|
575
575
|
},
|
|
576
576
|
get children() {
|
|
577
|
-
return [K(
|
|
577
|
+
return [K(rn, {
|
|
578
578
|
get actionable() {
|
|
579
579
|
return Ce();
|
|
580
580
|
},
|
|
@@ -585,15 +585,16 @@ function Jn(e) {
|
|
|
585
585
|
return Le().frame;
|
|
586
586
|
},
|
|
587
587
|
get label() {
|
|
588
|
-
return
|
|
588
|
+
return a("chart.data", "Chart data for {name}", {
|
|
589
589
|
name: t.title
|
|
590
590
|
});
|
|
591
591
|
},
|
|
592
592
|
onHover: Ae,
|
|
593
593
|
onSelect: je,
|
|
594
594
|
panel: t,
|
|
595
|
-
translate:
|
|
596
|
-
}), K(
|
|
595
|
+
translate: a
|
|
596
|
+
}), K(Lt, {
|
|
597
|
+
onWidthChange: pt,
|
|
597
598
|
get input() {
|
|
598
599
|
return Le();
|
|
599
600
|
},
|
|
@@ -604,7 +605,7 @@ function Jn(e) {
|
|
|
604
605
|
return e.adapter;
|
|
605
606
|
},
|
|
606
607
|
get label() {
|
|
607
|
-
return
|
|
608
|
+
return a("chart.label", "{name} chart", {
|
|
608
609
|
name: t.title
|
|
609
610
|
});
|
|
610
611
|
},
|
|
@@ -622,12 +623,12 @@ function Jn(e) {
|
|
|
622
623
|
}
|
|
623
624
|
})];
|
|
624
625
|
}
|
|
625
|
-
}), null), i(
|
|
626
|
+
}), null), i(r, K(ne, {
|
|
626
627
|
get when() {
|
|
627
|
-
return
|
|
628
|
+
return yt();
|
|
628
629
|
},
|
|
629
630
|
get children() {
|
|
630
|
-
return K(
|
|
631
|
+
return K(Zn, {
|
|
631
632
|
onToggle: Ue,
|
|
632
633
|
get overlays() {
|
|
633
634
|
return he();
|
|
@@ -636,10 +637,10 @@ function Jn(e) {
|
|
|
636
637
|
}
|
|
637
638
|
}), null), i(n, K(ne, {
|
|
638
639
|
get when() {
|
|
639
|
-
return
|
|
640
|
+
return D(() => !!Xe())() && O();
|
|
640
641
|
},
|
|
641
642
|
get children() {
|
|
642
|
-
return K(
|
|
643
|
+
return K(Wn, {
|
|
643
644
|
get frame() {
|
|
644
645
|
return O();
|
|
645
646
|
},
|
|
@@ -647,13 +648,13 @@ function Jn(e) {
|
|
|
647
648
|
return X();
|
|
648
649
|
},
|
|
649
650
|
onSetHidden: c,
|
|
650
|
-
onToggle:
|
|
651
|
+
onToggle: F,
|
|
651
652
|
panel: t,
|
|
652
653
|
get presentation() {
|
|
653
|
-
return
|
|
654
|
+
return de();
|
|
654
655
|
},
|
|
655
656
|
get total() {
|
|
656
|
-
return
|
|
657
|
+
return me() ?? void 0;
|
|
657
658
|
}
|
|
658
659
|
});
|
|
659
660
|
}
|
|
@@ -661,27 +662,27 @@ function Jn(e) {
|
|
|
661
662
|
}
|
|
662
663
|
});
|
|
663
664
|
}
|
|
664
|
-
function
|
|
665
|
+
function zn(e) {
|
|
665
666
|
const t = Fe();
|
|
666
667
|
return (() => {
|
|
667
|
-
var o =
|
|
668
|
-
return i(
|
|
668
|
+
var o = pn(), a = o.firstChild, g = a.nextSibling;
|
|
669
|
+
return i(a, () => t("chart.allSeriesHidden", "All series are hidden")), $t(g, "click", e.onShowAll, !0), i(g, () => t("chart.showAllSeries", "Show all series")), o;
|
|
669
670
|
})();
|
|
670
671
|
}
|
|
671
|
-
function
|
|
672
|
+
function Dn(e) {
|
|
672
673
|
var oe, Q;
|
|
673
|
-
const t = Fe(), o = [e.panel.encoding.category, e.panel.encoding.label].find((w) => w !== void 0 && e.frame.columns.some((W) => W.name === w)),
|
|
674
|
-
var w =
|
|
674
|
+
const t = Fe(), o = [e.panel.encoding.category, e.panel.encoding.label].find((w) => w !== void 0 && e.frame.columns.some((W) => W.name === w)), a = e.panel.encoding.value, g = e.frame.columns.findIndex((w) => w.name === o), l = e.frame.columns.findIndex((w) => w.name === a), _ = z(a ? e.panel.format[a] : void 0), I = l < 0 ? void 0 : e.frame.rows.reduce((w, W) => w + (ve(W[l]) ?? 0), 0), b = g < 0 || (oe = e.frame.rows[0]) == null ? void 0 : oe[g], $ = ke(b), S = _(I), B = e.panel.encoding.id ?? o, v = e.frame.columns.findIndex((w) => w.name === B), m = ke(v < 0 || (Q = e.frame.rows[0]) == null ? void 0 : Q[v]), M = D(() => D(() => e.frame.rows.length === 0)() ? (() => {
|
|
675
|
+
var w = yn();
|
|
675
676
|
return i(w, () => t("panel.empty", "No data")), w;
|
|
676
677
|
})() : [$ && (() => {
|
|
677
|
-
var w =
|
|
678
|
+
var w = Sn();
|
|
678
679
|
return H(w, "title", $), i(w, $), w;
|
|
679
680
|
})(), (() => {
|
|
680
|
-
var w =
|
|
681
|
+
var w = bn();
|
|
681
682
|
return i(w, S), w;
|
|
682
683
|
})()]), q = e.frame.rows.length === 0 ? t("panel.empty", "No data") : [$, S].filter(Boolean).join(" / ");
|
|
683
684
|
return e.actionable && m && e.frame.rows.length > 0 ? (() => {
|
|
684
|
-
var w =
|
|
685
|
+
var w = $n();
|
|
685
686
|
return w.$$click = () => {
|
|
686
687
|
var W;
|
|
687
688
|
return (W = e.onSelect) == null ? void 0 : W.call(e, m);
|
|
@@ -689,57 +690,57 @@ function Vn(e) {
|
|
|
689
690
|
name: $ ?? m
|
|
690
691
|
})}`)), w;
|
|
691
692
|
})() : (() => {
|
|
692
|
-
var w =
|
|
693
|
+
var w = xn();
|
|
693
694
|
return H(w, "aria-label", q), i(w, M), w;
|
|
694
695
|
})();
|
|
695
696
|
}
|
|
696
|
-
function
|
|
697
|
-
const t = Fe(), o =
|
|
697
|
+
function qn(e) {
|
|
698
|
+
const t = Fe(), o = z(e.panel.encoding.value ? e.panel.format[e.panel.encoding.value] : void 0);
|
|
698
699
|
return (() => {
|
|
699
|
-
var
|
|
700
|
-
return g.nextSibling, i(g, () => t("panel.total", "Total"), l), i(
|
|
700
|
+
var a = _n(), g = a.firstChild, l = g.firstChild;
|
|
701
|
+
return g.nextSibling, i(g, () => t("panel.total", "Total"), l), i(a, () => o(e.total), null), a;
|
|
701
702
|
})();
|
|
702
703
|
}
|
|
703
|
-
function
|
|
704
|
+
function Wn(e) {
|
|
704
705
|
var Ne, Re;
|
|
705
706
|
const t = e.panel, o = e.frame, {
|
|
706
|
-
document:
|
|
707
|
+
document: a,
|
|
707
708
|
navigation: g
|
|
708
|
-
} = dt(), l = Fe(), [_, I] =
|
|
709
|
+
} = dt(), l = Fe(), [_, I] = le("");
|
|
709
710
|
let b;
|
|
710
|
-
const [$, S] =
|
|
711
|
+
const [$, S] = le({
|
|
711
712
|
top: !1,
|
|
712
713
|
bottom: !1
|
|
713
|
-
}), [B, v] =
|
|
714
|
+
}), [B, v] = le(0), [m, M] = le(!1), q = ft(o, t), oe = q >= 0 ? t.encoding.series : [t.encoding.label, t.encoding.category].find((c) => c !== void 0 && o.columns.some((C) => C.name === c)), Q = t.encoding.value, w = z(Q ? t.format[Q] : void 0), W = o.columns.findIndex((c) => c.name === oe), se = o.columns.findIndex((c) => c.name === Q), ge = z(oe ? t.format[oe] : void 0), J = () => g.panelId === t.id && g.path.length > 0, re = ut(o, t), X = gt(a.theme, t, o, !J()), _e = mt(a.theme, t, {
|
|
714
715
|
colors: o.colors,
|
|
715
716
|
positional: !J(),
|
|
716
717
|
labels: re
|
|
717
718
|
}), ee = t.encoding.id ? o.columns.findIndex((c) => c.name === t.encoding.id) : -1, Ie = t.encoding.series ? o.columns.findIndex((c) => c.name === t.encoding.series) : -1, G = ((Ne = t.radial) == null ? void 0 : Ne.mode) === "partition", x = R(() => {
|
|
718
|
-
var
|
|
719
|
-
const c = o.rows.map((p,
|
|
720
|
-
const
|
|
721
|
-
return String(typeof
|
|
722
|
-
}),
|
|
723
|
-
if (q < 0) return c[
|
|
724
|
-
const
|
|
725
|
-
return String(typeof
|
|
719
|
+
var me, de;
|
|
720
|
+
const c = o.rows.map((p, F) => {
|
|
721
|
+
const A = ee >= 0 ? p[ee] : p[W];
|
|
722
|
+
return String(typeof A == "string" || typeof A == "number" || typeof A == "bigint" ? A : F);
|
|
723
|
+
}), C = o.rows.map((p, F) => {
|
|
724
|
+
if (q < 0) return c[F];
|
|
725
|
+
const A = p[q];
|
|
726
|
+
return String(typeof A == "string" || typeof A == "number" || typeof A == "bigint" ? A : F);
|
|
726
727
|
});
|
|
727
|
-
let y = o.rows.map((p,
|
|
728
|
+
let y = o.rows.map((p, F) => F);
|
|
728
729
|
if (q >= 0 || G) {
|
|
729
730
|
const p = /* @__PURE__ */ new Set();
|
|
730
731
|
y = [];
|
|
731
|
-
for (let
|
|
732
|
-
const
|
|
733
|
-
p.has(
|
|
732
|
+
for (let F = 0; F < o.rows.length; F += 1) {
|
|
733
|
+
const A = C[F];
|
|
734
|
+
p.has(A) || (p.add(A), y.push(F));
|
|
734
735
|
}
|
|
735
736
|
}
|
|
736
|
-
const f = y.map((p) =>
|
|
737
|
+
const f = y.map((p) => C[p]), k = new Map(y.map((p, F) => [p, F])), E = /* @__PURE__ */ new Map();
|
|
737
738
|
G && c.forEach((p) => {
|
|
738
739
|
E.has(p) || E.set(p, E.size);
|
|
739
740
|
});
|
|
740
|
-
const O = new Map((((
|
|
741
|
+
const O = new Map((((me = t.radial) == null ? void 0 : me.rings) ?? []).map((p) => [p.key, p.total])), h = /* @__PURE__ */ new Map();
|
|
741
742
|
for (let p = 0; p < o.rows.length; p += 1) {
|
|
742
|
-
const
|
|
743
|
+
const F = Ie >= 0 ? (de = o.rows[p]) == null ? void 0 : de[Ie] : void 0, A = G && typeof F == "string" ? F : "", V = G ? O.get(A) ?? e.total : e.total, U = G ? A : String(V), Se = h.get(U) ?? {
|
|
743
744
|
denominator: V,
|
|
744
745
|
indices: []
|
|
745
746
|
};
|
|
@@ -748,61 +749,61 @@ function Dn(e) {
|
|
|
748
749
|
const T = /* @__PURE__ */ new Map();
|
|
749
750
|
for (const {
|
|
750
751
|
denominator: p,
|
|
751
|
-
indices:
|
|
752
|
+
indices: F
|
|
752
753
|
} of h.values()) {
|
|
753
|
-
const
|
|
754
|
+
const A = F.map((V) => {
|
|
754
755
|
var U;
|
|
755
|
-
return
|
|
756
|
+
return se >= 0 ? ve((U = o.rows[V]) == null ? void 0 : U[se]) : void 0;
|
|
756
757
|
});
|
|
757
|
-
|
|
758
|
+
Rt(A, p).forEach((V, U) => T.set(F[U], V));
|
|
758
759
|
}
|
|
759
760
|
const N = /* @__PURE__ */ new Map();
|
|
760
761
|
G && c.forEach((p) => N.set(p, (N.get(p) ?? 0) + 1));
|
|
761
762
|
const Z = /* @__PURE__ */ new Map();
|
|
762
|
-
|
|
763
|
+
se >= 0 && o.rows.forEach((p, F) => {
|
|
763
764
|
var U;
|
|
764
|
-
const
|
|
765
|
-
if (
|
|
766
|
-
const V =
|
|
767
|
-
q >= 0 && Q && ((U = t.format[Q]) == null ? void 0 : U.kind) !== "percent" ? Z.set(V, (Z.get(V) ?? 0) +
|
|
765
|
+
const A = ve(p[se]);
|
|
766
|
+
if (A === void 0) return;
|
|
767
|
+
const V = C[F];
|
|
768
|
+
q >= 0 && Q && ((U = t.format[Q]) == null ? void 0 : U.kind) !== "percent" ? Z.set(V, (Z.get(V) ?? 0) + A) : Z.set(V, A);
|
|
768
769
|
});
|
|
769
770
|
const ce = /* @__PURE__ */ new Map();
|
|
770
771
|
return G && Ie >= 0 && y.forEach((p) => {
|
|
771
|
-
var
|
|
772
|
-
const
|
|
773
|
-
typeof
|
|
772
|
+
var A;
|
|
773
|
+
const F = (A = o.rows[p]) == null ? void 0 : A[Ie];
|
|
774
|
+
typeof F == "string" && ce.set(p, F);
|
|
774
775
|
}), {
|
|
775
776
|
allKeys: f,
|
|
776
777
|
categoryOrder: E,
|
|
777
778
|
entries: y,
|
|
778
|
-
entryKeys:
|
|
779
|
-
entryPositions:
|
|
779
|
+
entryKeys: C,
|
|
780
|
+
entryPositions: k,
|
|
780
781
|
ringByIndex: ce,
|
|
781
782
|
rowKeys: c,
|
|
782
783
|
rowsPerKey: N,
|
|
783
784
|
shares: T,
|
|
784
785
|
valueByKey: Z
|
|
785
786
|
};
|
|
786
|
-
}), ie = (c,
|
|
787
|
+
}), ie = (c, C, y) => {
|
|
787
788
|
var E;
|
|
788
|
-
if (q >= 0) return X(x().entryKeys[
|
|
789
|
-
const f = ee >= 0 ? (E = o.rows[
|
|
790
|
-
return _e(c, x().categoryOrder.get(x().rowKeys[
|
|
789
|
+
if (q >= 0) return X(x().entryKeys[C], y);
|
|
790
|
+
const f = ee >= 0 ? (E = o.rows[C]) == null ? void 0 : E[ee] : void 0, k = typeof f == "string" && f.trim() !== "" ? f : void 0;
|
|
791
|
+
return _e(c, x().categoryOrder.get(x().rowKeys[C]) ?? C, k);
|
|
791
792
|
}, Me = ((Re = e.presentation) == null ? void 0 : Re.legendValue) === "percent", Ae = (c) => q >= 0 ? "value" : Me ? "percent" : G ? x().rowsPerKey.get(x().rowKeys[c]) === 1 ? "percent" : "none" : "value", Oe = () => _().trim().toLocaleLowerCase(), Ke = R(() => Oe() === "" ? x().entries : x().entries.filter((c) => {
|
|
792
793
|
var y;
|
|
793
|
-
const
|
|
794
|
-
return ke(
|
|
794
|
+
const C = (y = o.rows[c]) == null ? void 0 : y[W];
|
|
795
|
+
return ke(C).toLocaleLowerCase().includes(Oe());
|
|
795
796
|
}));
|
|
796
797
|
xe(() => {
|
|
797
798
|
const c = b;
|
|
798
799
|
if (!c) return;
|
|
799
800
|
m(), Ke().length;
|
|
800
|
-
const
|
|
801
|
-
const f = c.scrollTop + c.clientHeight,
|
|
801
|
+
const C = () => {
|
|
802
|
+
const f = c.scrollTop + c.clientHeight, k = c.scrollHeight > c.clientHeight + 1;
|
|
802
803
|
if (S({
|
|
803
|
-
top:
|
|
804
|
-
bottom:
|
|
805
|
-
}), !
|
|
804
|
+
top: k && c.scrollTop > 1,
|
|
805
|
+
bottom: k && f < c.scrollHeight - 1
|
|
806
|
+
}), !k) {
|
|
806
807
|
v(0);
|
|
807
808
|
return;
|
|
808
809
|
}
|
|
@@ -811,28 +812,28 @@ function Dn(e) {
|
|
|
811
812
|
for (const h of E) h.offsetTop + h.offsetHeight > f + 1 && (O += 1);
|
|
812
813
|
v(O);
|
|
813
814
|
};
|
|
814
|
-
|
|
815
|
+
C(), c.addEventListener("scroll", C, {
|
|
815
816
|
passive: !0
|
|
816
817
|
});
|
|
817
|
-
const y = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(
|
|
818
|
+
const y = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(C);
|
|
818
819
|
y == null || y.observe(c), Be(() => {
|
|
819
|
-
c.removeEventListener("scroll",
|
|
820
|
+
c.removeEventListener("scroll", C), y == null || y.disconnect();
|
|
820
821
|
});
|
|
821
822
|
});
|
|
822
823
|
const be = (c) => {
|
|
823
|
-
const
|
|
824
|
-
e.onSetHidden(
|
|
825
|
-
}, we = () => x().allKeys.length > 0 && x().allKeys.every((c) => e.hidden.has(c)), Ze = () => x().allKeys.every((c) => !e.hidden.has(c)),
|
|
824
|
+
const C = !e.hidden.has(c) && x().allKeys.every((y) => y === c || e.hidden.has(y));
|
|
825
|
+
e.onSetHidden(C ? /* @__PURE__ */ new Set() : new Set(x().allKeys.filter((y) => y !== c)));
|
|
826
|
+
}, we = () => x().allKeys.length > 0 && x().allKeys.every((c) => e.hidden.has(c)), Ze = () => x().allKeys.every((c) => !e.hidden.has(c)), ae = () => x().allKeys.length > Mn, Te = () => x().entries.length >= Bn;
|
|
826
827
|
return K(ne, {
|
|
827
828
|
when: W >= 0,
|
|
828
829
|
get children() {
|
|
829
|
-
var c =
|
|
830
|
+
var c = In(), C = c.firstChild, y = C.firstChild;
|
|
830
831
|
return i(c, (() => {
|
|
831
|
-
var f =
|
|
832
|
+
var f = D(() => !!ae());
|
|
832
833
|
return () => f() && (() => {
|
|
833
|
-
var
|
|
834
|
+
var k = Cn(), E = k.firstChild;
|
|
834
835
|
return i(E, (() => {
|
|
835
|
-
var O =
|
|
836
|
+
var O = D(() => !!Te());
|
|
836
837
|
return () => O() ? [(() => {
|
|
837
838
|
var h = Qe();
|
|
838
839
|
return h.$$click = () => e.onSetHidden(new Set(x().allKeys)), i(h, () => l("chart.legendHideAll", "Hide all")), Y(() => H(h, "aria-pressed", we())), h;
|
|
@@ -840,8 +841,8 @@ function Dn(e) {
|
|
|
840
841
|
var h = Qe();
|
|
841
842
|
return h.$$click = () => e.onSetHidden(/* @__PURE__ */ new Set()), i(h, () => l("chart.legendShowAll", "Show all")), Y(() => H(h, "aria-pressed", Ze())), h;
|
|
842
843
|
})(), (() => {
|
|
843
|
-
var h =
|
|
844
|
-
return h.$$click = () => e.onSetHidden(new Set(x().allKeys.filter((T) => !e.hidden.has(T)))), i(h, K(
|
|
844
|
+
var h = Ln();
|
|
845
|
+
return h.$$click = () => e.onSetHidden(new Set(x().allKeys.filter((T) => !e.hidden.has(T)))), i(h, K(Xt, {})), Y((T) => {
|
|
845
846
|
var N = l("chart.legendInvert", "Invert"), Z = l("chart.legendInvert", "Invert");
|
|
846
847
|
return N !== T.e && H(h, "aria-label", T.e = N), Z !== T.t && H(h, "title", T.t = Z), T;
|
|
847
848
|
}, {
|
|
@@ -851,14 +852,14 @@ function Dn(e) {
|
|
|
851
852
|
})()] : (() => {
|
|
852
853
|
var h = Qe();
|
|
853
854
|
return h.$$click = () => e.onSetHidden(we() ? /* @__PURE__ */ new Set() : new Set(x().allKeys)), i(h, (() => {
|
|
854
|
-
var T =
|
|
855
|
+
var T = D(() => !!we());
|
|
855
856
|
return () => T() ? l("chart.legendShowAll", "Show all") : l("chart.legendHideAll", "Hide all");
|
|
856
857
|
})()), h;
|
|
857
858
|
})();
|
|
858
|
-
})()), i(
|
|
859
|
-
var O =
|
|
859
|
+
})()), i(k, (() => {
|
|
860
|
+
var O = D(() => !!Te());
|
|
860
861
|
return () => O() && (() => {
|
|
861
|
-
var h =
|
|
862
|
+
var h = kn(), T = h.firstChild, N = T.nextSibling;
|
|
862
863
|
return i(T, () => l("chart.legendSearch", "Search legend")), N.addEventListener("change", (Z) => I(Z.currentTarget.value)), Y(() => H(N, "placeholder", l("chart.legendSearch", "Search legend"))), Y(() => N.value = _()), h;
|
|
863
864
|
})();
|
|
864
865
|
})(), null), Y((O) => {
|
|
@@ -867,40 +868,40 @@ function Dn(e) {
|
|
|
867
868
|
}, {
|
|
868
869
|
e: void 0,
|
|
869
870
|
t: void 0
|
|
870
|
-
}),
|
|
871
|
+
}), k;
|
|
871
872
|
})();
|
|
872
|
-
})(),
|
|
873
|
+
})(), C), xt((f) => {
|
|
873
874
|
b = f;
|
|
874
875
|
}, y), i(y, K(Ge, {
|
|
875
876
|
get each() {
|
|
876
877
|
return Ke();
|
|
877
878
|
},
|
|
878
|
-
children: (f,
|
|
879
|
-
var p,
|
|
880
|
-
const E = o.rows[f], O = x().entryPositions.get(f) ?? f, h = E[W], T = h == null ? "" :
|
|
881
|
-
return [ce && ce !==
|
|
882
|
-
var V =
|
|
883
|
-
return i(V,
|
|
879
|
+
children: (f, k) => {
|
|
880
|
+
var p, F, A;
|
|
881
|
+
const E = o.rows[f], O = x().entryPositions.get(f) ?? f, h = E[W], T = h == null ? "" : ge(h), N = x().entryKeys[f], Z = () => e.hidden.has(N), ce = x().ringByIndex.get(f), me = k() > 0 ? x().ringByIndex.get(Ke()[k() - 1]) : void 0, de = ((A = (F = (p = t.radial) == null ? void 0 : p.rings) == null ? void 0 : F.find((V) => V.key === ce)) == null ? void 0 : A.label) ?? ce;
|
|
882
|
+
return [ce && ce !== me && (() => {
|
|
883
|
+
var V = An();
|
|
884
|
+
return i(V, de), V;
|
|
884
885
|
})(), (() => {
|
|
885
|
-
var V =
|
|
886
|
+
var V = Fn(), U = V.firstChild, Se = U.firstChild, Ee = Se.nextSibling, Ue = Ee.nextSibling;
|
|
886
887
|
return U.$$dblclick = () => be(N), U.$$click = () => e.onToggle(N), i(Ee, T), i(U, (() => {
|
|
887
|
-
var j =
|
|
888
|
+
var j = D(() => Ae(f) !== "none");
|
|
888
889
|
return () => j() && (() => {
|
|
889
890
|
var pe = ht();
|
|
890
891
|
return i(pe, (() => {
|
|
891
|
-
var ye =
|
|
892
|
+
var ye = D(() => Ae(f) === "percent");
|
|
892
893
|
return () => {
|
|
893
894
|
var he, fe;
|
|
894
|
-
return ye() ?
|
|
895
|
+
return ye() ? Et(x().shares.get(f), (he = a.meta) == null ? void 0 : he.locale, Q ? (fe = t.format[Q]) == null ? void 0 : fe.decimalSeparator : void 0) : w(x().valueByKey.get(N));
|
|
895
896
|
};
|
|
896
897
|
})()), pe;
|
|
897
898
|
})();
|
|
898
899
|
})(), Ue), i(Ue, (() => {
|
|
899
|
-
var j =
|
|
900
|
-
return () => j() ? K(
|
|
900
|
+
var j = D(() => !!Z());
|
|
901
|
+
return () => j() ? K(en, {}) : K(tn, {});
|
|
901
902
|
})()), Y((j) => {
|
|
902
903
|
var pe = !Z(), ye = `lens-chart-legend-toggle${Z() ? " lens-chart-legend-hidden" : ""}`, he = `lens-panel-${t.id}-legend-series-${O}`, fe = l("chart.legendToggleHint", "Click to toggle · double-click to isolate"), He = ie(T, f, O);
|
|
903
|
-
return pe !== j.e && H(U, "aria-pressed", j.e = pe), ye !== j.t && Ye(U, j.t = ye), he !== j.a && H(U, "data-testid", j.a = he), fe !== j.o && H(U, "title", j.o = fe), He !== j.i &&
|
|
904
|
+
return pe !== j.e && H(U, "aria-pressed", j.e = pe), ye !== j.t && Ye(U, j.t = ye), he !== j.a && H(U, "data-testid", j.a = he), fe !== j.o && H(U, "title", j.o = fe), He !== j.i && _t(Se, "background", j.i = He), j;
|
|
904
905
|
}, {
|
|
905
906
|
e: void 0,
|
|
906
907
|
t: void 0,
|
|
@@ -911,21 +912,21 @@ function Dn(e) {
|
|
|
911
912
|
})()];
|
|
912
913
|
}
|
|
913
914
|
})), i(c, (() => {
|
|
914
|
-
var f =
|
|
915
|
+
var f = D(() => !!(B() > 0 || m()));
|
|
915
916
|
return () => f() && (() => {
|
|
916
|
-
var
|
|
917
|
-
return
|
|
918
|
-
var E =
|
|
917
|
+
var k = Kn();
|
|
918
|
+
return k.$$click = () => M((E) => !E), i(k, (() => {
|
|
919
|
+
var E = D(() => !!m());
|
|
919
920
|
return () => E() ? l("chart.legendCollapse", "Show fewer") : l("chart.legendMore", "{count} more", {
|
|
920
921
|
count: String(B())
|
|
921
922
|
});
|
|
922
|
-
})()),
|
|
923
|
+
})()), k;
|
|
923
924
|
})();
|
|
924
925
|
})(), null), Y((f) => {
|
|
925
|
-
var
|
|
926
|
+
var k = m() ? {
|
|
926
927
|
"--lens-chart-legend-max": "none"
|
|
927
928
|
} : void 0, E = $().bottom || void 0, O = $().top || void 0, h = l("chart.legendControls", "Legend controls"), T = `lens-panel-${t.id}-legend`, N = $().top || $().bottom ? 0 : void 0;
|
|
928
|
-
return f.e = ct(c,
|
|
929
|
+
return f.e = ct(c, k, f.e), E !== f.t && H(C, "data-overflow-bottom", f.t = E), O !== f.a && H(C, "data-overflow-top", f.a = O), h !== f.o && H(y, "aria-label", f.o = h), T !== f.i && H(y, "data-testid", f.i = T), N !== f.n && H(y, "tabindex", f.n = N), f;
|
|
929
930
|
}, {
|
|
930
931
|
e: void 0,
|
|
931
932
|
t: void 0,
|
|
@@ -937,25 +938,25 @@ function Dn(e) {
|
|
|
937
938
|
}
|
|
938
939
|
});
|
|
939
940
|
}
|
|
940
|
-
function
|
|
941
|
+
function Zn(e) {
|
|
941
942
|
const t = Fe(), o = t("chart.legendOverlays", "Chart marks");
|
|
942
943
|
return (() => {
|
|
943
|
-
var
|
|
944
|
-
return H(
|
|
944
|
+
var a = Tn(), g = a.firstChild;
|
|
945
|
+
return H(a, "aria-label", o), i(g, o), i(a, K(Ge, {
|
|
945
946
|
get each() {
|
|
946
947
|
return e.overlays;
|
|
947
948
|
},
|
|
948
949
|
children: (l) => (() => {
|
|
949
|
-
var _ =
|
|
950
|
+
var _ = Rn(), I = _.firstChild, b = I.firstChild, $ = b.nextSibling;
|
|
950
951
|
return I.$$click = () => e.onToggle(l.id), i($, () => l.label), i(I, (() => {
|
|
951
|
-
var S =
|
|
952
|
-
return () => S() && [
|
|
952
|
+
var S = D(() => !!l.detail);
|
|
953
|
+
return () => S() && [En(), (() => {
|
|
953
954
|
var B = ht();
|
|
954
955
|
return i(B, () => l.detail), B;
|
|
955
956
|
})()];
|
|
956
957
|
})(), null), Y((S) => {
|
|
957
958
|
var B = l.active, v = `lens-chart-legend-toggle${l.active ? "" : " lens-chart-legend-hidden"}`, m = t("chart.legendToggleOverlay", "Show or hide this mark"), M = l.stroke, q = {
|
|
958
|
-
"--lens-overlay-ink": `var(${
|
|
959
|
+
"--lens-overlay-ink": `var(${Tt(l.tone)})`
|
|
959
960
|
};
|
|
960
961
|
return B !== S.e && H(I, "aria-pressed", S.e = B), v !== S.t && Ye(I, S.t = v), m !== S.a && H(I, "title", S.a = m), M !== S.o && H(b, "data-stroke", S.o = M), S.i = ct(b, q, S.i), S;
|
|
961
962
|
}, {
|
|
@@ -966,16 +967,16 @@ function Pn(e) {
|
|
|
966
967
|
i: void 0
|
|
967
968
|
}), _;
|
|
968
969
|
})()
|
|
969
|
-
}), null),
|
|
970
|
+
}), null), a;
|
|
970
971
|
})();
|
|
971
972
|
}
|
|
972
|
-
|
|
973
|
+
It(["click", "dblclick"]);
|
|
973
974
|
export {
|
|
974
|
-
|
|
975
|
+
to as ChartPanel,
|
|
975
976
|
st as collapseExpandableTopN,
|
|
976
977
|
it as collapseMinorDonutSlices,
|
|
977
978
|
vt as donutRemainderKey,
|
|
978
979
|
We as legendKey,
|
|
979
980
|
lt as rowIndexForKey,
|
|
980
|
-
|
|
981
|
+
Pn as topNGroupField
|
|
981
982
|
};
|