@kong-ui-public/analytics-metric-provider 4.0.7 → 4.0.8
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/MetricsConsumer.vue.d.ts.map +1 -1
- package/dist/types/components/MetricsProviderInternal.vue.d.ts.map +1 -1
- package/dist/types/components/metricsProviderUtil.d.ts +0 -1
- package/dist/types/components/metricsProviderUtil.d.ts.map +1 -1
- package/dist/types/composables/useMetricFetcher.d.ts +1 -0
- package/dist/types/composables/useMetricFetcher.d.ts.map +1 -1
- package/dist/vitals-metric-provider.es.js +498 -492
- package/dist/vitals-metric-provider.umd.js +1 -1
- package/package.json +5 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ref as pe, watchEffect as He, computed as g, getCurrentInstance as Be, reactive as $e, onMounted as Pe, onUnmounted as Ke, isReadonly as Ze, watch as Ue, toRefs as Ge, defineComponent as
|
|
2
|
-
import {
|
|
1
|
+
import { ref as pe, watchEffect as He, computed as g, getCurrentInstance as Be, reactive as $e, onMounted as Pe, onUnmounted as Ke, isReadonly as Ze, watch as Ue, toRefs as Ge, defineComponent as k, inject as ke, toRef as Se, provide as je, renderSlot as ze, resolveComponent as qe, openBlock as p, createElementBlock as m, createElementVNode as R, normalizeClass as G, unref as w, createCommentVNode as E, createBlock as T, resolveDynamicComponent as q, toDisplayString as N, withCtx as A, createVNode as X, normalizeStyle as V, Fragment as we, renderList as Xe, mergeProps as Ye, pushScopeId as L, popScopeId as D, normalizeProps as Qe, guardReactiveProps as We } from "vue";
|
|
2
|
+
import { TimePeriods as re, TimeframeKeys as te, queryableExploreDimensions as Je, DeltaQueryTime as er, UnaryQueryTime as rr } from "@kong-ui-public/analytics-utilities";
|
|
3
3
|
import { createI18n as tr, i18nTComponent as ir } from "@kong-ui-public/i18n";
|
|
4
4
|
const nr = {
|
|
5
5
|
notAvailable: "N/A"
|
|
@@ -15,7 +15,7 @@ const nr = {
|
|
|
15
15
|
latency: "P99 Latency"
|
|
16
16
|
}
|
|
17
17
|
}, or = {
|
|
18
|
-
custom: "vs previous {numDays} days",
|
|
18
|
+
custom: "vs previous {numDays, plural, =1 {day} other {# days}}",
|
|
19
19
|
"15m": "vs previous 15 minutes",
|
|
20
20
|
"1h": "vs previous hour",
|
|
21
21
|
"6h": "vs previous 6 hours",
|
|
@@ -45,59 +45,59 @@ function ur() {
|
|
|
45
45
|
const lr = 2, Q = ["1XX", "2XX", "3XX", "4XX", "5XX"], _e = ["4XX", "5XX"], dr = "analytics-query-provider";
|
|
46
46
|
var Ae = /* @__PURE__ */ ((e) => (e.VALIDATING = "VALIDATING", e.VALIDATING_HAS_DATA = "VALIDATING_HAS_DATA", e.PENDING = "PENDING", e.SUCCESS = "SUCCESS", e.SUCCESS_HAS_DATA = "SUCCESS_HAS_DATA", e.ERROR = "ERROR", e.STALE_IF_ERROR = "STALE_IF_ERROR", e))(Ae || {});
|
|
47
47
|
const cr = (e) => {
|
|
48
|
-
var
|
|
48
|
+
var r, t, a, n, i;
|
|
49
49
|
return e ? !!// TODO: revisit: currently only the first check ever matters?
|
|
50
|
-
((
|
|
50
|
+
((r = Object.keys(e)) != null && r.length || (t = e.data) != null && t.length || (n = (a = e.data) == null ? void 0 : a.data) != null && n.length || !((i = e.data) != null && i.data) && typeof e.data == "object" && Object.keys(e == null ? void 0 : e.data).length) : !1;
|
|
51
51
|
};
|
|
52
|
-
function fr(e = pe({}),
|
|
52
|
+
function fr(e = pe({}), r, t, a = cr) {
|
|
53
53
|
const n = pe(
|
|
54
54
|
"PENDING"
|
|
55
55
|
/* PENDING */
|
|
56
56
|
);
|
|
57
57
|
return He(() => {
|
|
58
58
|
const i = a(e.value);
|
|
59
|
-
if (e.value && i &&
|
|
59
|
+
if (e.value && i && t.value) {
|
|
60
60
|
n.value = "VALIDATING_HAS_DATA";
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
|
-
if (e.value &&
|
|
63
|
+
if (e.value && t.value) {
|
|
64
64
|
n.value = "VALIDATING";
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
|
-
if (e.value &&
|
|
67
|
+
if (e.value && r.value) {
|
|
68
68
|
n.value = "STALE_IF_ERROR";
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
|
-
if (e.value === void 0 && !
|
|
71
|
+
if (e.value === void 0 && !r.value) {
|
|
72
72
|
n.value = "PENDING";
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
|
-
if (e.value && !
|
|
75
|
+
if (e.value && !r.value && i) {
|
|
76
76
|
n.value = "SUCCESS_HAS_DATA";
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
|
-
if (e.value && !
|
|
79
|
+
if (e.value && !r.value) {
|
|
80
80
|
n.value = "SUCCESS";
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
|
-
e.value === void 0 &&
|
|
83
|
+
e.value === void 0 && r && (n.value = "ERROR");
|
|
84
84
|
}), {
|
|
85
85
|
state: n,
|
|
86
86
|
swrvState: Ae
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
-
const B = Symbol("default"), ue = "status_code_grouped", Re = (e,
|
|
90
|
-
e[
|
|
89
|
+
const B = Symbol("default"), ue = "status_code_grouped", Re = (e, r, t, a, n) => {
|
|
90
|
+
e[r][t] || (e[r][t] = {}), e[r][t][a] = n;
|
|
91
91
|
};
|
|
92
|
-
function pr(e,
|
|
93
|
-
var
|
|
94
|
-
const
|
|
92
|
+
function pr(e, r) {
|
|
93
|
+
var f;
|
|
94
|
+
const t = ((f = e.meta.metric_names) == null ? void 0 : f[0]) || "", a = e.meta.start_ms, n = Object.keys(e.meta.display || {}), i = !!n.find((d) => d === ue), u = n.find((d) => d !== ue);
|
|
95
95
|
return n.length > 2 || n.length > 1 && !i ? (console.error("Don't know how to work with provided dimensions:", n), {
|
|
96
96
|
previous: { [B]: { [B]: 0 } },
|
|
97
97
|
current: { [B]: { [B]: 0 } }
|
|
98
98
|
}) : e.data.reduce((d, o) => {
|
|
99
|
-
const s = o.event[
|
|
100
|
-
return new Date(o.timestamp).getTime() === a &&
|
|
99
|
+
const s = o.event[t], l = u ? o.event[u] : B, c = i ? o.event[ue] : B;
|
|
100
|
+
return new Date(o.timestamp).getTime() === a && r ? Re(d, "previous", l, c, s) : Re(d, "current", l, c, s), d;
|
|
101
101
|
}, {
|
|
102
102
|
previous: {},
|
|
103
103
|
current: {}
|
|
@@ -105,56 +105,67 @@ function pr(e, t) {
|
|
|
105
105
|
}
|
|
106
106
|
function vr(e) {
|
|
107
107
|
e.queryReady === void 0 && (e.queryReady = g(() => !0));
|
|
108
|
-
const t = g(() => {
|
|
109
|
-
var
|
|
108
|
+
const { i18n: r } = K.useI18n(), t = g(() => {
|
|
109
|
+
var l, c;
|
|
110
110
|
return {
|
|
111
111
|
metrics: e.metrics,
|
|
112
112
|
dimensions: [
|
|
113
|
-
...(
|
|
113
|
+
...(l = e.dimensions) != null && l.length ? [...e.dimensions] : [],
|
|
114
114
|
...e.withTrend ? ["time"] : []
|
|
115
115
|
],
|
|
116
116
|
granularity: e.withTrend ? "trend" : void 0,
|
|
117
|
-
...(
|
|
117
|
+
...(c = e.filter.value) != null && c.length ? { filters: e.filter.value } : {},
|
|
118
118
|
time_range: e.timeframe.value.v4Query(e.tz.value)
|
|
119
119
|
};
|
|
120
|
-
}),
|
|
121
|
-
var
|
|
122
|
-
if (!((
|
|
120
|
+
}), a = g(() => {
|
|
121
|
+
var c, v, S, y;
|
|
122
|
+
if (!((c = e.queryReady) != null && c.value) || e.featureFlags && !e.featureFlags.every((h) => h))
|
|
123
123
|
return null;
|
|
124
|
-
const
|
|
125
|
-
return `metric-fetcher-${e.timeframe.value.cacheKey()}-${(
|
|
126
|
-
}), { response:
|
|
127
|
-
() =>
|
|
124
|
+
const l = (v = e.filter) != null && v.value ? JSON.stringify(e.filter.value) : "";
|
|
125
|
+
return `metric-fetcher-${e.timeframe.value.cacheKey()}-${(S = e.dimensions) == null ? void 0 : S.join("-")}-${(y = e.metrics) == null ? void 0 : y.join("-")}-${l}`;
|
|
126
|
+
}), { response: n, error: i, isValidating: u } = K.useRequest(
|
|
127
|
+
() => a.value,
|
|
128
128
|
() => e.queryFn(t.value, e.abortController ?? new AbortController()),
|
|
129
129
|
{
|
|
130
130
|
refreshInterval: e.refreshInterval,
|
|
131
131
|
revalidateOnFocus: !1,
|
|
132
132
|
errorRetryCount: lr
|
|
133
133
|
}
|
|
134
|
-
), { state:
|
|
135
|
-
var
|
|
136
|
-
return !((
|
|
134
|
+
), { state: f, swrvState: d } = fr(n, i, u), o = g(() => {
|
|
135
|
+
var l, c, v, S, y, h, x;
|
|
136
|
+
return !((c = (l = n.value) == null ? void 0 : l.data) != null && c.length) || !((S = (v = n.value) == null ? void 0 : v.meta) != null && S.display) || !((x = (h = (y = n.value) == null ? void 0 : y.meta) == null ? void 0 : h.metric_names) != null && x.length) ? { current: {}, previous: {} } : pr(n.value, !!e.withTrend);
|
|
137
|
+
}), s = g(() => {
|
|
138
|
+
var l, c, v;
|
|
139
|
+
if (e.timeframe.value.key === "custom") {
|
|
140
|
+
if (!((c = (l = n.value) == null ? void 0 : l.meta) != null && c.start_ms))
|
|
141
|
+
return "";
|
|
142
|
+
const { start_ms: S, end_ms: y } = n.value.meta;
|
|
143
|
+
let h = (y - S) / (1e3 * 60 * 60 * 24);
|
|
144
|
+
return e.withTrend && (h /= 2), r.t("trendRange.custom", { numDays: Math.round(h) });
|
|
145
|
+
} else
|
|
146
|
+
return e.withTrend ? r.t(`trendRange.${e.timeframe.value.key}`) : r.t(`trendRange.${(v = re.get(te.ONE_DAY)) == null ? void 0 : v.key}`);
|
|
137
147
|
});
|
|
138
148
|
return {
|
|
139
|
-
isLoading: g(() =>
|
|
140
|
-
hasError: g(() =>
|
|
141
|
-
raw:
|
|
142
|
-
mapped:
|
|
149
|
+
isLoading: g(() => d.PENDING === f.value),
|
|
150
|
+
hasError: g(() => d.ERROR === f.value),
|
|
151
|
+
raw: n,
|
|
152
|
+
mapped: o,
|
|
153
|
+
trendRange: s
|
|
143
154
|
};
|
|
144
155
|
}
|
|
145
|
-
const j = (e,
|
|
146
|
-
const
|
|
147
|
-
return
|
|
156
|
+
const j = (e, r, t = B, a) => (a ?? [B]).reduce((i, u) => {
|
|
157
|
+
const f = e[r][t];
|
|
158
|
+
return f ? i + (f[u] || 0) : i;
|
|
148
159
|
}, 0);
|
|
149
160
|
function gr(e) {
|
|
150
161
|
const {
|
|
151
|
-
cardType:
|
|
152
|
-
title:
|
|
162
|
+
cardType: r,
|
|
163
|
+
title: t,
|
|
153
164
|
description: a,
|
|
154
165
|
record: n,
|
|
155
166
|
hasError: i,
|
|
156
167
|
increaseIsBad: u,
|
|
157
|
-
formatValueFn:
|
|
168
|
+
formatValueFn: f,
|
|
158
169
|
trendRange: d
|
|
159
170
|
} = e;
|
|
160
171
|
return g(() => {
|
|
@@ -169,64 +180,64 @@ function gr(e) {
|
|
|
169
180
|
);
|
|
170
181
|
}
|
|
171
182
|
return {
|
|
172
|
-
cardType:
|
|
183
|
+
cardType: r,
|
|
173
184
|
hasError: i.value,
|
|
174
185
|
currentValue: o,
|
|
175
186
|
previousValue: s,
|
|
176
|
-
title:
|
|
187
|
+
title: t.value,
|
|
177
188
|
description: a,
|
|
178
189
|
increaseIsBad: !!u,
|
|
179
190
|
// Coerce undefined to false
|
|
180
|
-
formatValueFn:
|
|
191
|
+
formatValueFn: f,
|
|
181
192
|
trendRange: d == null ? void 0 : d.value
|
|
182
193
|
};
|
|
183
194
|
});
|
|
184
195
|
}
|
|
185
196
|
var le = /* @__PURE__ */ new WeakMap(), Ne = 0;
|
|
186
|
-
function
|
|
197
|
+
function mr(e) {
|
|
187
198
|
if (!e.length)
|
|
188
199
|
return "";
|
|
189
|
-
for (var
|
|
200
|
+
for (var r = "arg", t = 0; t < e.length; ++t) {
|
|
190
201
|
var a = void 0;
|
|
191
|
-
e[
|
|
202
|
+
e[t] === null || typeof e[t] != "object" && typeof e[t] != "function" ? typeof e[t] == "string" ? a = '"' + e[t] + '"' : a = String(e[t]) : le.has(e[t]) ? a = le.get(e[t]) : (a = Ne, le.set(e[t], Ne++)), r += "@" + a;
|
|
192
203
|
}
|
|
193
|
-
return
|
|
204
|
+
return r;
|
|
194
205
|
}
|
|
195
|
-
function
|
|
206
|
+
function yr(e) {
|
|
196
207
|
if (typeof e == "function")
|
|
197
208
|
try {
|
|
198
209
|
e = e();
|
|
199
210
|
} catch {
|
|
200
211
|
e = "";
|
|
201
212
|
}
|
|
202
|
-
return Array.isArray(e) ? e =
|
|
213
|
+
return Array.isArray(e) ? e = mr(e) : e = String(e || ""), e;
|
|
203
214
|
}
|
|
204
215
|
var ve = (
|
|
205
216
|
/** @class */
|
|
206
217
|
function() {
|
|
207
|
-
function e(
|
|
208
|
-
|
|
218
|
+
function e(r) {
|
|
219
|
+
r === void 0 && (r = 0), this.items = /* @__PURE__ */ new Map(), this.ttl = r;
|
|
209
220
|
}
|
|
210
|
-
return e.prototype.serializeKey = function(
|
|
211
|
-
return
|
|
212
|
-
}, e.prototype.get = function(
|
|
213
|
-
var
|
|
214
|
-
return this.items.get(
|
|
215
|
-
}, e.prototype.set = function(
|
|
216
|
-
var n = this.serializeKey(
|
|
217
|
-
data:
|
|
221
|
+
return e.prototype.serializeKey = function(r) {
|
|
222
|
+
return yr(r);
|
|
223
|
+
}, e.prototype.get = function(r) {
|
|
224
|
+
var t = this.serializeKey(r);
|
|
225
|
+
return this.items.get(t);
|
|
226
|
+
}, e.prototype.set = function(r, t, a) {
|
|
227
|
+
var n = this.serializeKey(r), i = a || this.ttl, u = Date.now(), f = {
|
|
228
|
+
data: t,
|
|
218
229
|
createdAt: u,
|
|
219
230
|
expiresAt: i ? u + i : 1 / 0
|
|
220
231
|
};
|
|
221
|
-
this.dispatchExpire(i,
|
|
222
|
-
}, e.prototype.dispatchExpire = function(
|
|
232
|
+
this.dispatchExpire(i, f, n), this.items.set(n, f);
|
|
233
|
+
}, e.prototype.dispatchExpire = function(r, t, a) {
|
|
223
234
|
var n = this;
|
|
224
|
-
|
|
225
|
-
var i = Date.now(), u = i >=
|
|
235
|
+
r && setTimeout(function() {
|
|
236
|
+
var i = Date.now(), u = i >= t.expiresAt;
|
|
226
237
|
u && n.delete(a);
|
|
227
|
-
},
|
|
228
|
-
}, e.prototype.delete = function(
|
|
229
|
-
this.items.delete(
|
|
238
|
+
}, r);
|
|
239
|
+
}, e.prototype.delete = function(r) {
|
|
240
|
+
this.items.delete(r);
|
|
230
241
|
}, e;
|
|
231
242
|
}()
|
|
232
243
|
);
|
|
@@ -237,8 +248,8 @@ function Cr() {
|
|
|
237
248
|
return typeof document < "u" && typeof document.visibilityState < "u" ? document.visibilityState !== "hidden" : !0;
|
|
238
249
|
}
|
|
239
250
|
var br = function(e) {
|
|
240
|
-
return fetch(e).then(function(
|
|
241
|
-
return
|
|
251
|
+
return fetch(e).then(function(r) {
|
|
252
|
+
return r.json();
|
|
242
253
|
});
|
|
243
254
|
};
|
|
244
255
|
const de = {
|
|
@@ -248,21 +259,21 @@ const de = {
|
|
|
248
259
|
};
|
|
249
260
|
var O = function() {
|
|
250
261
|
return O = Object.assign || function(e) {
|
|
251
|
-
for (var
|
|
252
|
-
|
|
253
|
-
for (var n in
|
|
254
|
-
Object.prototype.hasOwnProperty.call(
|
|
262
|
+
for (var r, t = 1, a = arguments.length; t < a; t++) {
|
|
263
|
+
r = arguments[t];
|
|
264
|
+
for (var n in r)
|
|
265
|
+
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
255
266
|
}
|
|
256
267
|
return e;
|
|
257
268
|
}, O.apply(this, arguments);
|
|
258
|
-
}, Z = function(e,
|
|
269
|
+
}, Z = function(e, r, t, a) {
|
|
259
270
|
function n(i) {
|
|
260
|
-
return i instanceof
|
|
271
|
+
return i instanceof t ? i : new t(function(u) {
|
|
261
272
|
u(i);
|
|
262
273
|
});
|
|
263
274
|
}
|
|
264
|
-
return new (
|
|
265
|
-
function
|
|
275
|
+
return new (t || (t = Promise))(function(i, u) {
|
|
276
|
+
function f(s) {
|
|
266
277
|
try {
|
|
267
278
|
o(a.next(s));
|
|
268
279
|
} catch (l) {
|
|
@@ -277,20 +288,20 @@ var O = function() {
|
|
|
277
288
|
}
|
|
278
289
|
}
|
|
279
290
|
function o(s) {
|
|
280
|
-
s.done ? i(s.value) : n(s.value).then(
|
|
291
|
+
s.done ? i(s.value) : n(s.value).then(f, d);
|
|
281
292
|
}
|
|
282
|
-
o((a = a.apply(e,
|
|
293
|
+
o((a = a.apply(e, r || [])).next());
|
|
283
294
|
});
|
|
284
|
-
}, U = function(e,
|
|
285
|
-
var
|
|
295
|
+
}, U = function(e, r) {
|
|
296
|
+
var t = { label: 0, sent: function() {
|
|
286
297
|
if (i[0] & 1)
|
|
287
298
|
throw i[1];
|
|
288
299
|
return i[1];
|
|
289
300
|
}, trys: [], ops: [] }, a, n, i, u;
|
|
290
|
-
return u = { next:
|
|
301
|
+
return u = { next: f(0), throw: f(1), return: f(2) }, typeof Symbol == "function" && (u[Symbol.iterator] = function() {
|
|
291
302
|
return this;
|
|
292
303
|
}), u;
|
|
293
|
-
function
|
|
304
|
+
function f(o) {
|
|
294
305
|
return function(s) {
|
|
295
306
|
return d([o, s]);
|
|
296
307
|
};
|
|
@@ -298,7 +309,7 @@ var O = function() {
|
|
|
298
309
|
function d(o) {
|
|
299
310
|
if (a)
|
|
300
311
|
throw new TypeError("Generator is already executing.");
|
|
301
|
-
for (;
|
|
312
|
+
for (; t; )
|
|
302
313
|
try {
|
|
303
314
|
if (a = 1, n && (i = o[0] & 2 ? n.return : o[0] ? n.throw || ((i = n.return) && i.call(n), 0) : n.next) && !(i = i.call(n, o[1])).done)
|
|
304
315
|
return i;
|
|
@@ -308,34 +319,34 @@ var O = function() {
|
|
|
308
319
|
i = o;
|
|
309
320
|
break;
|
|
310
321
|
case 4:
|
|
311
|
-
return
|
|
322
|
+
return t.label++, { value: o[1], done: !1 };
|
|
312
323
|
case 5:
|
|
313
|
-
|
|
324
|
+
t.label++, n = o[1], o = [0];
|
|
314
325
|
continue;
|
|
315
326
|
case 7:
|
|
316
|
-
o =
|
|
327
|
+
o = t.ops.pop(), t.trys.pop();
|
|
317
328
|
continue;
|
|
318
329
|
default:
|
|
319
|
-
if (i =
|
|
320
|
-
|
|
330
|
+
if (i = t.trys, !(i = i.length > 0 && i[i.length - 1]) && (o[0] === 6 || o[0] === 2)) {
|
|
331
|
+
t = 0;
|
|
321
332
|
continue;
|
|
322
333
|
}
|
|
323
334
|
if (o[0] === 3 && (!i || o[1] > i[0] && o[1] < i[3])) {
|
|
324
|
-
|
|
335
|
+
t.label = o[1];
|
|
325
336
|
break;
|
|
326
337
|
}
|
|
327
|
-
if (o[0] === 6 &&
|
|
328
|
-
|
|
338
|
+
if (o[0] === 6 && t.label < i[1]) {
|
|
339
|
+
t.label = i[1], i = o;
|
|
329
340
|
break;
|
|
330
341
|
}
|
|
331
|
-
if (i &&
|
|
332
|
-
|
|
342
|
+
if (i && t.label < i[2]) {
|
|
343
|
+
t.label = i[2], t.ops.push(o);
|
|
333
344
|
break;
|
|
334
345
|
}
|
|
335
|
-
i[2] &&
|
|
346
|
+
i[2] && t.ops.pop(), t.trys.pop();
|
|
336
347
|
continue;
|
|
337
348
|
}
|
|
338
|
-
o =
|
|
349
|
+
o = r.call(e, t);
|
|
339
350
|
} catch (s) {
|
|
340
351
|
o = [6, s], n = 0;
|
|
341
352
|
} finally {
|
|
@@ -345,30 +356,30 @@ var O = function() {
|
|
|
345
356
|
throw o[1];
|
|
346
357
|
return { value: o[0] ? o[1] : void 0, done: !0 };
|
|
347
358
|
}
|
|
348
|
-
}, Sr = function(e,
|
|
349
|
-
var
|
|
350
|
-
if (!
|
|
359
|
+
}, Sr = function(e, r) {
|
|
360
|
+
var t = typeof Symbol == "function" && e[Symbol.iterator];
|
|
361
|
+
if (!t)
|
|
351
362
|
return e;
|
|
352
|
-
var a =
|
|
363
|
+
var a = t.call(e), n, i = [], u;
|
|
353
364
|
try {
|
|
354
|
-
for (; (
|
|
365
|
+
for (; (r === void 0 || r-- > 0) && !(n = a.next()).done; )
|
|
355
366
|
i.push(n.value);
|
|
356
|
-
} catch (
|
|
357
|
-
u = { error:
|
|
367
|
+
} catch (f) {
|
|
368
|
+
u = { error: f };
|
|
358
369
|
} finally {
|
|
359
370
|
try {
|
|
360
|
-
n && !n.done && (
|
|
371
|
+
n && !n.done && (t = a.return) && t.call(a);
|
|
361
372
|
} finally {
|
|
362
373
|
if (u)
|
|
363
374
|
throw u.error;
|
|
364
375
|
}
|
|
365
376
|
}
|
|
366
377
|
return i;
|
|
367
|
-
}, wr = function(e,
|
|
368
|
-
if (
|
|
369
|
-
for (var a = 0, n =
|
|
370
|
-
(i || !(a in
|
|
371
|
-
return e.concat(i || Array.prototype.slice.call(
|
|
378
|
+
}, wr = function(e, r, t) {
|
|
379
|
+
if (t || arguments.length === 2)
|
|
380
|
+
for (var a = 0, n = r.length, i; a < n; a++)
|
|
381
|
+
(i || !(a in r)) && (i || (i = Array.prototype.slice.call(r, 0, a)), i[a] = r[a]);
|
|
382
|
+
return e.concat(i || Array.prototype.slice.call(r));
|
|
372
383
|
}, Ve = new ve(), ie = new ve(), ce = new ve(), Le = {
|
|
373
384
|
cache: Ve,
|
|
374
385
|
refreshInterval: 0,
|
|
@@ -384,69 +395,69 @@ var O = function() {
|
|
|
384
395
|
isOnline: de.isOnline,
|
|
385
396
|
isDocumentVisible: de.isDocumentVisible
|
|
386
397
|
};
|
|
387
|
-
function _r(e,
|
|
398
|
+
function _r(e, r, t) {
|
|
388
399
|
var a = ie.get(e);
|
|
389
400
|
if (a)
|
|
390
|
-
a.data.push(
|
|
401
|
+
a.data.push(r);
|
|
391
402
|
else {
|
|
392
403
|
var n = 5e3;
|
|
393
|
-
ie.set(e, [
|
|
404
|
+
ie.set(e, [r], t > 0 ? t + n : t);
|
|
394
405
|
}
|
|
395
406
|
}
|
|
396
|
-
function Rr(e,
|
|
397
|
-
if (
|
|
398
|
-
var a = Math.min(
|
|
407
|
+
function Rr(e, r, t) {
|
|
408
|
+
if (t.isDocumentVisible() && !(t.errorRetryCount !== void 0 && r > t.errorRetryCount)) {
|
|
409
|
+
var a = Math.min(r || 0, t.errorRetryCount), n = a * t.errorRetryInterval;
|
|
399
410
|
setTimeout(function() {
|
|
400
411
|
e(null, { errorRetryCount: a + 1, shouldRetryOnError: !0 });
|
|
401
412
|
}, n);
|
|
402
413
|
}
|
|
403
414
|
}
|
|
404
|
-
var Ie = function(e,
|
|
405
|
-
return
|
|
406
|
-
var n, i, u,
|
|
415
|
+
var Ie = function(e, r, t, a) {
|
|
416
|
+
return t === void 0 && (t = Ve), a === void 0 && (a = Le.ttl), Z(void 0, void 0, void 0, function() {
|
|
417
|
+
var n, i, u, f, d, o, s;
|
|
407
418
|
return U(this, function(l) {
|
|
408
419
|
switch (l.label) {
|
|
409
420
|
case 0:
|
|
410
|
-
if (!Ir(
|
|
421
|
+
if (!Ir(r))
|
|
411
422
|
return [3, 5];
|
|
412
423
|
l.label = 1;
|
|
413
424
|
case 1:
|
|
414
|
-
return l.trys.push([1, 3, , 4]), [4,
|
|
425
|
+
return l.trys.push([1, 3, , 4]), [4, r];
|
|
415
426
|
case 2:
|
|
416
427
|
return n = l.sent(), [3, 4];
|
|
417
428
|
case 3:
|
|
418
|
-
return
|
|
429
|
+
return f = l.sent(), i = f, [3, 4];
|
|
419
430
|
case 4:
|
|
420
431
|
return [3, 6];
|
|
421
432
|
case 5:
|
|
422
|
-
n =
|
|
433
|
+
n = r, l.label = 6;
|
|
423
434
|
case 6:
|
|
424
435
|
if (u = !1, d = { data: n, error: i, isValidating: u }, typeof n < "u")
|
|
425
436
|
try {
|
|
426
|
-
|
|
427
|
-
} catch (
|
|
428
|
-
console.error("swrv(mutate): failed to set cache",
|
|
437
|
+
t.set(e, d, a);
|
|
438
|
+
} catch (c) {
|
|
439
|
+
console.error("swrv(mutate): failed to set cache", c);
|
|
429
440
|
}
|
|
430
|
-
return o = ie.get(e), o && o.data.length && (s = o.data.filter(function(
|
|
431
|
-
return
|
|
432
|
-
}), s.forEach(function(
|
|
433
|
-
typeof d.data < "u" && (
|
|
434
|
-
var
|
|
435
|
-
|
|
441
|
+
return o = ie.get(e), o && o.data.length && (s = o.data.filter(function(c) {
|
|
442
|
+
return c.key === e;
|
|
443
|
+
}), s.forEach(function(c, v) {
|
|
444
|
+
typeof d.data < "u" && (c.data = d.data), c.error = d.error, c.isValidating = d.isValidating;
|
|
445
|
+
var S = v === s.length - 1;
|
|
446
|
+
S || delete s[v];
|
|
436
447
|
}), s = s.filter(Boolean)), [2, d];
|
|
437
448
|
}
|
|
438
449
|
});
|
|
439
450
|
});
|
|
440
451
|
};
|
|
441
452
|
function Nr() {
|
|
442
|
-
for (var e = this,
|
|
443
|
-
t
|
|
444
|
-
var a, n, i = O({}, Le), u = !1,
|
|
453
|
+
for (var e = this, r = [], t = 0; t < arguments.length; t++)
|
|
454
|
+
r[t] = arguments[t];
|
|
455
|
+
var a, n, i = O({}, Le), u = !1, f = !1, d = Be(), o = (d == null ? void 0 : d.proxy) || d;
|
|
445
456
|
if (!o)
|
|
446
457
|
return console.error("Could not get current instance, check to make sure that `useSwrv` is declared in the top level of the setup function."), null;
|
|
447
458
|
var s = (o == null ? void 0 : o.$isServer) || !1;
|
|
448
|
-
|
|
449
|
-
var l = s ? i.serverTTL : i.ttl,
|
|
459
|
+
r.length >= 1 && (a = r[0]), r.length >= 2 && (n = r[1]), r.length > 2 && (i = O(O({}, i), r[2]));
|
|
460
|
+
var l = s ? i.serverTTL : i.ttl, c = typeof a == "function" ? a : pe(a);
|
|
450
461
|
typeof n > "u" && (n = i.fetcher);
|
|
451
462
|
var v = null;
|
|
452
463
|
v || (v = $e({
|
|
@@ -455,16 +466,16 @@ function Nr() {
|
|
|
455
466
|
isValidating: !0,
|
|
456
467
|
key: null
|
|
457
468
|
}));
|
|
458
|
-
var
|
|
469
|
+
var S = function(b, C) {
|
|
459
470
|
return Z(e, void 0, void 0, function() {
|
|
460
|
-
var H, I, $, Y, ne,
|
|
471
|
+
var H, I, $, Y, ne, ye, ae, he = this;
|
|
461
472
|
return U(this, function(oe) {
|
|
462
473
|
switch (oe.label) {
|
|
463
474
|
case 0:
|
|
464
|
-
return H = v.data === void 0, I =
|
|
475
|
+
return H = v.data === void 0, I = c.value, I ? ($ = i.cache.get(I), Y = $ && $.data, v.isValidating = !0, Y && (v.data = Y.data, v.error = Y.error), ne = b || n, !ne || !i.isDocumentVisible() && !H || (C == null ? void 0 : C.forceRevalidate) !== void 0 && !(C != null && C.forceRevalidate) ? (v.isValidating = !1, [
|
|
465
476
|
2
|
|
466
477
|
/*return*/
|
|
467
|
-
]) : $ && (
|
|
478
|
+
]) : $ && (ye = !!(Date.now() - $.createdAt >= i.dedupingInterval || C != null && C.forceRevalidate), !ye) ? (v.isValidating = !1, [
|
|
468
479
|
2
|
|
469
480
|
/*return*/
|
|
470
481
|
]) : (ae = function() {
|
|
@@ -481,7 +492,7 @@ function Nr() {
|
|
|
481
492
|
case 3:
|
|
482
493
|
W.sent(), W.label = 4;
|
|
483
494
|
case 4:
|
|
484
|
-
return v.isValidating = !1, ce.delete(I), v.error !== void 0 && (be = !u && i.shouldRetryOnError && (
|
|
495
|
+
return v.isValidating = !1, ce.delete(I), v.error !== void 0 && (be = !u && i.shouldRetryOnError && (C ? C.shouldRetryOnError : !0), be && Rr(S, C ? C.errorRetryCount : 1, i)), [
|
|
485
496
|
2
|
|
486
497
|
/*return*/
|
|
487
498
|
];
|
|
@@ -520,26 +531,26 @@ function Nr() {
|
|
|
520
531
|
}
|
|
521
532
|
});
|
|
522
533
|
});
|
|
523
|
-
},
|
|
534
|
+
}, y = function() {
|
|
524
535
|
return Z(e, void 0, void 0, function() {
|
|
525
|
-
return U(this, function(
|
|
526
|
-
return [2,
|
|
536
|
+
return U(this, function(b) {
|
|
537
|
+
return [2, S(null, { shouldRetryOnError: !1 })];
|
|
527
538
|
});
|
|
528
539
|
});
|
|
529
|
-
},
|
|
540
|
+
}, h = null;
|
|
530
541
|
Pe(function() {
|
|
531
|
-
var
|
|
542
|
+
var b = function() {
|
|
532
543
|
return Z(e, void 0, void 0, function() {
|
|
533
|
-
return U(this, function(
|
|
534
|
-
switch (
|
|
544
|
+
return U(this, function(C) {
|
|
545
|
+
switch (C.label) {
|
|
535
546
|
case 0:
|
|
536
|
-
return !v.error && i.isOnline() ? [4,
|
|
547
|
+
return !v.error && i.isOnline() ? [4, S()] : [3, 2];
|
|
537
548
|
case 1:
|
|
538
|
-
return
|
|
549
|
+
return C.sent(), [3, 3];
|
|
539
550
|
case 2:
|
|
540
|
-
|
|
551
|
+
h && clearTimeout(h), C.label = 3;
|
|
541
552
|
case 3:
|
|
542
|
-
return i.refreshInterval && !u && (
|
|
553
|
+
return i.refreshInterval && !u && (h = setTimeout(b, i.refreshInterval)), [
|
|
543
554
|
2
|
|
544
555
|
/*return*/
|
|
545
556
|
];
|
|
@@ -547,41 +558,41 @@ function Nr() {
|
|
|
547
558
|
});
|
|
548
559
|
});
|
|
549
560
|
};
|
|
550
|
-
i.refreshInterval && (
|
|
561
|
+
i.refreshInterval && (h = setTimeout(b, i.refreshInterval)), i.revalidateOnFocus && (document.addEventListener("visibilitychange", y, !1), window.addEventListener("focus", y, !1));
|
|
551
562
|
}), Ke(function() {
|
|
552
|
-
u = !0,
|
|
553
|
-
var
|
|
554
|
-
|
|
555
|
-
return
|
|
563
|
+
u = !0, h && clearTimeout(h), i.revalidateOnFocus && (document.removeEventListener("visibilitychange", y, !1), window.removeEventListener("focus", y, !1));
|
|
564
|
+
var b = ie.get(c.value);
|
|
565
|
+
b && (b.data = b.data.filter(function(C) {
|
|
566
|
+
return C !== v;
|
|
556
567
|
}));
|
|
557
568
|
});
|
|
558
569
|
try {
|
|
559
|
-
Ue(
|
|
560
|
-
Ze(
|
|
570
|
+
Ue(c, function(b) {
|
|
571
|
+
Ze(c) || (c.value = b), v.key = b, v.isValidating = !!b, _r(c.value, v, l), !s && !f && c.value && S(), f = !1;
|
|
561
572
|
}, {
|
|
562
573
|
immediate: !0
|
|
563
574
|
});
|
|
564
575
|
} catch {
|
|
565
576
|
}
|
|
566
|
-
var
|
|
567
|
-
return b
|
|
577
|
+
var x = O(O({}, Ge(v)), { mutate: function(b, C) {
|
|
578
|
+
return S(b, O(O({}, C), { forceRevalidate: !0 }));
|
|
568
579
|
} });
|
|
569
|
-
return
|
|
580
|
+
return x;
|
|
570
581
|
}
|
|
571
582
|
function Ir(e) {
|
|
572
583
|
return e !== null && typeof e == "object" && typeof e.then == "function";
|
|
573
584
|
}
|
|
574
|
-
function Er(e,
|
|
585
|
+
function Er(e, r, t) {
|
|
575
586
|
const {
|
|
576
587
|
data: a,
|
|
577
588
|
error: n,
|
|
578
589
|
isValidating: i,
|
|
579
590
|
mutate: u
|
|
580
|
-
} = Nr(e,
|
|
591
|
+
} = Nr(e, r, {
|
|
581
592
|
revalidateDebounce: 500,
|
|
582
593
|
revalidateOnFocus: !1,
|
|
583
594
|
dedupingInterval: 100,
|
|
584
|
-
...
|
|
595
|
+
...t
|
|
585
596
|
});
|
|
586
597
|
return {
|
|
587
598
|
data: g(() => a.value),
|
|
@@ -598,34 +609,34 @@ const K = {
|
|
|
598
609
|
useRequest: Er
|
|
599
610
|
}, De = Symbol("METRICS_PROVIDER_KEY"), Tr = (e) => {
|
|
600
611
|
const {
|
|
601
|
-
dimension:
|
|
602
|
-
dimensionFilterValue:
|
|
612
|
+
dimension: r,
|
|
613
|
+
dimensionFilterValue: t,
|
|
603
614
|
additionalFilter: a,
|
|
604
615
|
queryReady: n,
|
|
605
616
|
timeframe: i,
|
|
606
617
|
tz: u,
|
|
607
|
-
hasTrendAccess:
|
|
618
|
+
hasTrendAccess: f,
|
|
608
619
|
refreshInterval: d,
|
|
609
620
|
abortController: o,
|
|
610
621
|
queryFn: s
|
|
611
622
|
} = e;
|
|
612
|
-
if (
|
|
623
|
+
if (t && !r)
|
|
613
624
|
throw new Error("Must provide a dimension if filtering by a value");
|
|
614
|
-
const l = !!(
|
|
615
|
-
const
|
|
616
|
-
return l &&
|
|
617
|
-
dimension:
|
|
625
|
+
const l = !!(r && t), c = !!(r && !t), v = g(() => {
|
|
626
|
+
const b = [];
|
|
627
|
+
return l && b.push({
|
|
628
|
+
dimension: r,
|
|
618
629
|
type: "in",
|
|
619
|
-
values: [
|
|
620
|
-
}), a.value &&
|
|
621
|
-
}),
|
|
630
|
+
values: [t]
|
|
631
|
+
}), a.value && b.push(...a.value), b;
|
|
632
|
+
}), S = {
|
|
622
633
|
metrics: [
|
|
623
634
|
"request_count"
|
|
624
635
|
],
|
|
625
636
|
// Traffic and error rate cards should only try to query for the dimension if it's going to be used.
|
|
626
637
|
// It isn't used for single entity queries.
|
|
627
638
|
dimensions: [
|
|
628
|
-
...
|
|
639
|
+
...r && !l ? [r] : [],
|
|
629
640
|
"status_code_grouped"
|
|
630
641
|
],
|
|
631
642
|
filter: v,
|
|
@@ -633,35 +644,35 @@ const K = {
|
|
|
633
644
|
timeframe: i,
|
|
634
645
|
tz: u,
|
|
635
646
|
// Traffic and error rate cards can't query trend if multiple entities are expected.
|
|
636
|
-
withTrend:
|
|
647
|
+
withTrend: f && !c,
|
|
637
648
|
refreshInterval: d,
|
|
638
649
|
queryFn: s,
|
|
639
650
|
abortController: o
|
|
640
|
-
},
|
|
651
|
+
}, y = {
|
|
641
652
|
metrics: [
|
|
642
653
|
"response_latency_p99"
|
|
643
654
|
],
|
|
644
655
|
// To keep single-entity queries consistent, don't bother querying the dimension for latency
|
|
645
656
|
// in the single-entity case, even though it's possible.
|
|
646
|
-
...
|
|
657
|
+
...r && !l ? { dimensions: [r] } : {},
|
|
647
658
|
filter: v,
|
|
648
659
|
queryReady: n,
|
|
649
660
|
timeframe: i,
|
|
650
661
|
tz: u,
|
|
651
662
|
// Don't query latency trends in the multi-entity case: it's possible, but wasteful.
|
|
652
|
-
withTrend:
|
|
663
|
+
withTrend: f && !c,
|
|
653
664
|
refreshInterval: d,
|
|
654
665
|
queryFn: s,
|
|
655
666
|
abortController: o
|
|
656
|
-
},
|
|
667
|
+
}, h = K.useMetricFetcher(S), x = K.useMetricFetcher(y);
|
|
657
668
|
return {
|
|
658
|
-
trafficData:
|
|
659
|
-
latencyData:
|
|
669
|
+
trafficData: h,
|
|
670
|
+
latencyData: x
|
|
660
671
|
};
|
|
661
|
-
}, ci = /* @__PURE__ */
|
|
672
|
+
}, ci = /* @__PURE__ */ k({
|
|
662
673
|
__name: "MetricsProviderInternal",
|
|
663
674
|
props: {
|
|
664
|
-
maxTimeframe: { default:
|
|
675
|
+
maxTimeframe: { default: te.THIRTY_DAY },
|
|
665
676
|
overrideTimeframe: { default: void 0 },
|
|
666
677
|
tz: { default: void 0 },
|
|
667
678
|
dimension: { default: void 0 },
|
|
@@ -675,49 +686,45 @@ const K = {
|
|
|
675
686
|
abortController: { default: void 0 }
|
|
676
687
|
},
|
|
677
688
|
setup(e) {
|
|
678
|
-
const
|
|
679
|
-
if (r.dimension && Je.findIndex((
|
|
689
|
+
const r = e;
|
|
690
|
+
if (r.dimension && Je.findIndex((d) => d === r.dimension) === -1)
|
|
680
691
|
throw new Error(`Attempted to use MetricsProvider with an invalid dimension: ${r.dimension}`);
|
|
681
|
-
const
|
|
682
|
-
let
|
|
683
|
-
|
|
684
|
-
const
|
|
692
|
+
const t = ke(dr);
|
|
693
|
+
let a;
|
|
694
|
+
t ? a = t.queryFn : (console.warn("Analytics dashboards require a query bridge supplied via provide / inject."), console.warn("Please ensure your application has a query bridge provided under the key 'analytics-query-provider', as described in"), console.warn("https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-metric-provider/README.md#requirements"), a = () => Promise.reject(new Error("Query bridge required")));
|
|
695
|
+
const n = g(() => r.tz ? r.tz : new Intl.DateTimeFormat().resolvedOptions().timeZone), i = g(() => {
|
|
685
696
|
if (r.overrideTimeframe)
|
|
686
697
|
return r.overrideTimeframe;
|
|
687
|
-
const
|
|
688
|
-
if (!
|
|
698
|
+
const d = r.hasTrendAccess ? re.get(r.maxTimeframe) : re.get(te.ONE_DAY);
|
|
699
|
+
if (!d)
|
|
689
700
|
throw new Error("Metrics provider failed to resolve fallback timeframe.");
|
|
690
|
-
return
|
|
691
|
-
}), c = g(() => {
|
|
692
|
-
var s;
|
|
693
|
-
return u.value.key === "custom" ? t.t("trendRange.custom", { numDays: Math.ceil(u.value.timeframeLength() / (1e3 * 60 * 24)) }) : r.hasTrendAccess ? t.t(`trendRange.${u.value.key}`) : t.t(`trendRange.${(s = te.get(re.ONE_DAY)) == null ? void 0 : s.key}`);
|
|
701
|
+
return d;
|
|
694
702
|
}), {
|
|
695
|
-
trafficData:
|
|
696
|
-
latencyData:
|
|
703
|
+
trafficData: u,
|
|
704
|
+
latencyData: f
|
|
697
705
|
} = Tr({
|
|
698
706
|
dimension: r.dimension,
|
|
699
707
|
dimensionFilterValue: r.filterValue,
|
|
700
708
|
additionalFilter: Se(r, "additionalFilter"),
|
|
701
709
|
queryReady: Se(r, "queryReady"),
|
|
702
|
-
timeframe:
|
|
703
|
-
tz:
|
|
710
|
+
timeframe: i,
|
|
711
|
+
tz: n,
|
|
704
712
|
hasTrendAccess: r.hasTrendAccess,
|
|
705
713
|
refreshInterval: r.refreshInterval,
|
|
706
|
-
queryFn:
|
|
714
|
+
queryFn: a,
|
|
707
715
|
abortController: r.abortController
|
|
708
716
|
});
|
|
709
717
|
return je(De, {
|
|
710
718
|
data: {
|
|
711
|
-
traffic:
|
|
712
|
-
latency:
|
|
719
|
+
traffic: u,
|
|
720
|
+
latency: f
|
|
713
721
|
},
|
|
714
722
|
description: r.description,
|
|
715
723
|
hasTrendAccess: r.hasTrendAccess,
|
|
716
|
-
longCardTitles: r.longCardTitles
|
|
717
|
-
|
|
718
|
-
}), (s, l) => ze(s.$slots, "default", {
|
|
724
|
+
longCardTitles: r.longCardTitles
|
|
725
|
+
}), (d, o) => ze(d.$slots, "default", {
|
|
719
726
|
hasTrendAccess: r.hasTrendAccess,
|
|
720
|
-
timeframe:
|
|
727
|
+
timeframe: i.value
|
|
721
728
|
});
|
|
722
729
|
}
|
|
723
730
|
});
|
|
@@ -727,45 +734,45 @@ function xr(e) {
|
|
|
727
734
|
var Me = { exports: {} };
|
|
728
735
|
(function(e) {
|
|
729
736
|
(function() {
|
|
730
|
-
function
|
|
737
|
+
function r(o, s) {
|
|
731
738
|
if (s.separator === !1 || o < 1e3)
|
|
732
739
|
return o.toString();
|
|
733
|
-
var l = typeof s.separator == "string" ? s.separator : ",",
|
|
734
|
-
return v.reverse().forEach(function(
|
|
735
|
-
|
|
736
|
-
}),
|
|
740
|
+
var l = typeof s.separator == "string" ? s.separator : ",", c = [], v = Math.round(o).toString().split("");
|
|
741
|
+
return v.reverse().forEach(function(S, y) {
|
|
742
|
+
y && y % 3 === 0 && c.push(l), c.push(S);
|
|
743
|
+
}), c.reverse().join("");
|
|
737
744
|
}
|
|
738
|
-
function
|
|
739
|
-
var
|
|
740
|
-
return l.decimal === !1 ? (o = Math[v](
|
|
745
|
+
function t(o, s, l) {
|
|
746
|
+
var c = o / s, v = l.round ? "round" : "floor";
|
|
747
|
+
return l.decimal === !1 ? (o = Math[v](c), o.toString()) : (l.precision ? o = c : o = c < 10 ? Math[v](c * 10) / 10 : Math[v](c), o = o.toString(), typeof l.decimal == "string" && (o = o.replace(".", l.decimal)), o);
|
|
741
748
|
}
|
|
742
|
-
var a = 1e3, n = 1e4, i = 1e6, u = 1e9,
|
|
749
|
+
var a = 1e3, n = 1e4, i = 1e6, u = 1e9, f = 1e12;
|
|
743
750
|
function d(o, s) {
|
|
744
751
|
var l;
|
|
745
752
|
s = s || {};
|
|
746
|
-
var
|
|
747
|
-
|
|
753
|
+
var c = o < 0;
|
|
754
|
+
c && (o = Math.abs(o)), s.precision && (o = parseFloat(o.toPrecision(s.precision)));
|
|
748
755
|
var v = s.min10k ? n : a;
|
|
749
|
-
return o < v || s.precision && s.precision > Math.log10(o) ? l = t(
|
|
756
|
+
return o < v || s.precision && s.precision > Math.log10(o) ? l = r(t(o, 1, s), s) : o < i ? l = t(o, a, s) + "k" : o < u ? l = t(o, i, s) + "m" : o < f ? l = r(t(o, u, s), s) + "b" : l = r(t(o, f, s), s) + "t", c && (l = "-" + l), s.capital && (l = l.toUpperCase()), s.prefix && (l = s.prefix + l), s.suffix && (l = l + s.suffix), l;
|
|
750
757
|
}
|
|
751
|
-
d.addCommas =
|
|
758
|
+
d.addCommas = r, e.exports = d;
|
|
752
759
|
})();
|
|
753
760
|
})(Me);
|
|
754
761
|
var kr = Me.exports;
|
|
755
762
|
const zr = /* @__PURE__ */ xr(kr);
|
|
756
|
-
var
|
|
757
|
-
const _ = "24px", M = (e,
|
|
758
|
-
const
|
|
759
|
-
for (const [a, n] of
|
|
760
|
-
|
|
761
|
-
return
|
|
763
|
+
var z = /* @__PURE__ */ ((e) => (e.Small = "sm", e.Medium = "md", e.Large = "lg", e.LargeCompact = "lgc", e.ExtraLarge = "xl", e))(z || {});
|
|
764
|
+
const _ = "24px", M = (e, r) => {
|
|
765
|
+
const t = e.__vccOpts || e;
|
|
766
|
+
for (const [a, n] of r)
|
|
767
|
+
t[a] = n;
|
|
768
|
+
return t;
|
|
762
769
|
}, qr = (e) => (L("data-v-115ec679"), e = e(), D(), e), Ar = ["aria-hidden"], Vr = {
|
|
763
770
|
key: 0,
|
|
764
771
|
"data-testid": "kui-icon-svg-title"
|
|
765
772
|
}, Lr = /* @__PURE__ */ qr(() => /* @__PURE__ */ R("path", {
|
|
766
773
|
d: "M6.5 20C4.98333 20 3.6875 19.475 2.6125 18.425C1.5375 17.375 1 16.0917 1 14.575C1 13.275 1.39167 12.1167 2.175 11.1C2.95833 10.0833 3.98333 9.43333 5.25 9.15C5.66667 7.61667 6.5 6.375 7.75 5.425C9 4.475 10.4167 4 12 4C13.95 4 15.6042 4.67917 16.9625 6.0375C18.3208 7.39583 19 9.05 19 11C20.15 11.1333 21.1042 11.6292 21.8625 12.4875C22.6208 13.3458 23 14.35 23 15.5C23 16.75 22.5625 17.8125 21.6875 18.6875C20.8125 19.5625 19.75 20 18.5 20H13C12.45 20 11.9792 19.8042 11.5875 19.4125C11.1958 19.0208 11 18.55 11 18V12.85L9.4 14.4L8 13L12 9L16 13L14.6 14.4L13 12.85V18H18.5C19.2 18 19.7917 17.7583 20.275 17.275C20.7583 16.7917 21 16.2 21 15.5C21 14.8 20.7583 14.2083 20.275 13.725C19.7917 13.2417 19.2 13 18.5 13H17V11C17 9.61667 16.5125 8.4375 15.5375 7.4625C14.5625 6.4875 13.3833 6 12 6C10.6167 6 9.4375 6.4875 8.4625 7.4625C7.4875 8.4375 7 9.61667 7 11H6.5C5.53333 11 4.70833 11.3417 4.025 12.025C3.34167 12.7083 3 13.5333 3 14.5C3 15.4667 3.34167 16.2917 4.025 16.975C4.70833 17.6583 5.53333 18 6.5 18H9V20H6.5Z",
|
|
767
774
|
fill: "currentColor"
|
|
768
|
-
}, null, -1)), Dr = /* @__PURE__ */
|
|
775
|
+
}, null, -1)), Dr = /* @__PURE__ */ k({
|
|
769
776
|
__name: "CloudUploadIcon",
|
|
770
777
|
props: {
|
|
771
778
|
/** The accessibility text provided to screen readers */
|
|
@@ -802,8 +809,8 @@ const _ = "24px", M = (e, t) => {
|
|
|
802
809
|
if (typeof e == "number" && e > 0)
|
|
803
810
|
return !0;
|
|
804
811
|
if (typeof e == "string") {
|
|
805
|
-
const
|
|
806
|
-
if (
|
|
812
|
+
const r = String(e).replace(/px/gi, ""), t = Number(r);
|
|
813
|
+
if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
|
|
807
814
|
return !0;
|
|
808
815
|
}
|
|
809
816
|
return !1;
|
|
@@ -817,31 +824,31 @@ const _ = "24px", M = (e, t) => {
|
|
|
817
824
|
}
|
|
818
825
|
},
|
|
819
826
|
setup(e) {
|
|
820
|
-
const
|
|
821
|
-
if (typeof
|
|
822
|
-
return `${
|
|
823
|
-
if (typeof
|
|
824
|
-
const n = String(
|
|
827
|
+
const r = e, t = g(() => {
|
|
828
|
+
if (typeof r.size == "number" && r.size > 0)
|
|
829
|
+
return `${r.size}px`;
|
|
830
|
+
if (typeof r.size == "string") {
|
|
831
|
+
const n = String(r.size).replace(/px/gi, ""), i = Number(n);
|
|
825
832
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
826
833
|
return `${i}px`;
|
|
827
834
|
}
|
|
828
835
|
return _;
|
|
829
836
|
}), a = g(() => ({
|
|
830
837
|
boxSizing: "border-box",
|
|
831
|
-
color:
|
|
832
|
-
display:
|
|
833
|
-
height:
|
|
838
|
+
color: r.color,
|
|
839
|
+
display: r.display,
|
|
840
|
+
height: t.value,
|
|
834
841
|
lineHeight: "0",
|
|
835
|
-
width:
|
|
842
|
+
width: t.value
|
|
836
843
|
}));
|
|
837
|
-
return (n, i) => (
|
|
844
|
+
return (n, i) => (p(), T(q(e.as), {
|
|
838
845
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
839
846
|
class: "kui-icon cloud-upload-icon",
|
|
840
847
|
"data-testid": "kui-icon-wrapper-cloud-upload-icon",
|
|
841
848
|
style: V(a.value)
|
|
842
849
|
}, {
|
|
843
850
|
default: A(() => [
|
|
844
|
-
(
|
|
851
|
+
(p(), m("svg", {
|
|
845
852
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
846
853
|
"data-testid": "kui-icon-svg-cloud-upload-icon",
|
|
847
854
|
fill: "none",
|
|
@@ -851,7 +858,7 @@ const _ = "24px", M = (e, t) => {
|
|
|
851
858
|
width: "100%",
|
|
852
859
|
xmlns: "http://www.w3.org/2000/svg"
|
|
853
860
|
}, [
|
|
854
|
-
e.title ? (
|
|
861
|
+
e.title ? (p(), m("title", Vr, N(e.title), 1)) : E("", !0),
|
|
855
862
|
Lr
|
|
856
863
|
], 8, Ar))
|
|
857
864
|
]),
|
|
@@ -864,7 +871,7 @@ const _ = "24px", M = (e, t) => {
|
|
|
864
871
|
}, Br = /* @__PURE__ */ Or(() => /* @__PURE__ */ R("path", {
|
|
865
872
|
d: "M4 17V14H20V17H4ZM4 10V7H20V10H4Z",
|
|
866
873
|
fill: "currentColor"
|
|
867
|
-
}, null, -1)), $r = /* @__PURE__ */
|
|
874
|
+
}, null, -1)), $r = /* @__PURE__ */ k({
|
|
868
875
|
__name: "EqualIcon",
|
|
869
876
|
props: {
|
|
870
877
|
/** The accessibility text provided to screen readers */
|
|
@@ -901,8 +908,8 @@ const _ = "24px", M = (e, t) => {
|
|
|
901
908
|
if (typeof e == "number" && e > 0)
|
|
902
909
|
return !0;
|
|
903
910
|
if (typeof e == "string") {
|
|
904
|
-
const
|
|
905
|
-
if (
|
|
911
|
+
const r = String(e).replace(/px/gi, ""), t = Number(r);
|
|
912
|
+
if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
|
|
906
913
|
return !0;
|
|
907
914
|
}
|
|
908
915
|
return !1;
|
|
@@ -916,31 +923,31 @@ const _ = "24px", M = (e, t) => {
|
|
|
916
923
|
}
|
|
917
924
|
},
|
|
918
925
|
setup(e) {
|
|
919
|
-
const
|
|
920
|
-
if (typeof
|
|
921
|
-
return `${
|
|
922
|
-
if (typeof
|
|
923
|
-
const n = String(
|
|
926
|
+
const r = e, t = g(() => {
|
|
927
|
+
if (typeof r.size == "number" && r.size > 0)
|
|
928
|
+
return `${r.size}px`;
|
|
929
|
+
if (typeof r.size == "string") {
|
|
930
|
+
const n = String(r.size).replace(/px/gi, ""), i = Number(n);
|
|
924
931
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
925
932
|
return `${i}px`;
|
|
926
933
|
}
|
|
927
934
|
return _;
|
|
928
935
|
}), a = g(() => ({
|
|
929
936
|
boxSizing: "border-box",
|
|
930
|
-
color:
|
|
931
|
-
display:
|
|
932
|
-
height:
|
|
937
|
+
color: r.color,
|
|
938
|
+
display: r.display,
|
|
939
|
+
height: t.value,
|
|
933
940
|
lineHeight: "0",
|
|
934
|
-
width:
|
|
941
|
+
width: t.value
|
|
935
942
|
}));
|
|
936
|
-
return (n, i) => (
|
|
943
|
+
return (n, i) => (p(), T(q(e.as), {
|
|
937
944
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
938
945
|
class: "kui-icon equal-icon",
|
|
939
946
|
"data-testid": "kui-icon-wrapper-equal-icon",
|
|
940
947
|
style: V(a.value)
|
|
941
948
|
}, {
|
|
942
949
|
default: A(() => [
|
|
943
|
-
(
|
|
950
|
+
(p(), m("svg", {
|
|
944
951
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
945
952
|
"data-testid": "kui-icon-svg-equal-icon",
|
|
946
953
|
fill: "none",
|
|
@@ -950,7 +957,7 @@ const _ = "24px", M = (e, t) => {
|
|
|
950
957
|
width: "100%",
|
|
951
958
|
xmlns: "http://www.w3.org/2000/svg"
|
|
952
959
|
}, [
|
|
953
|
-
e.title ? (
|
|
960
|
+
e.title ? (p(), m("title", Hr, N(e.title), 1)) : E("", !0),
|
|
954
961
|
Br
|
|
955
962
|
], 8, Fr))
|
|
956
963
|
]),
|
|
@@ -963,7 +970,7 @@ const _ = "24px", M = (e, t) => {
|
|
|
963
970
|
}, Gr = /* @__PURE__ */ Kr(() => /* @__PURE__ */ R("path", {
|
|
964
971
|
d: "M5 11V9H15V11H5Z",
|
|
965
972
|
fill: "currentColor"
|
|
966
|
-
}, null, -1)), jr = /* @__PURE__ */
|
|
973
|
+
}, null, -1)), jr = /* @__PURE__ */ k({
|
|
967
974
|
__name: "IndeterminateSmallIcon",
|
|
968
975
|
props: {
|
|
969
976
|
/** The accessibility text provided to screen readers */
|
|
@@ -1000,8 +1007,8 @@ const _ = "24px", M = (e, t) => {
|
|
|
1000
1007
|
if (typeof e == "number" && e > 0)
|
|
1001
1008
|
return !0;
|
|
1002
1009
|
if (typeof e == "string") {
|
|
1003
|
-
const
|
|
1004
|
-
if (
|
|
1010
|
+
const r = String(e).replace(/px/gi, ""), t = Number(r);
|
|
1011
|
+
if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
|
|
1005
1012
|
return !0;
|
|
1006
1013
|
}
|
|
1007
1014
|
return !1;
|
|
@@ -1015,31 +1022,31 @@ const _ = "24px", M = (e, t) => {
|
|
|
1015
1022
|
}
|
|
1016
1023
|
},
|
|
1017
1024
|
setup(e) {
|
|
1018
|
-
const
|
|
1019
|
-
if (typeof
|
|
1020
|
-
return `${
|
|
1021
|
-
if (typeof
|
|
1022
|
-
const n = String(
|
|
1025
|
+
const r = e, t = g(() => {
|
|
1026
|
+
if (typeof r.size == "number" && r.size > 0)
|
|
1027
|
+
return `${r.size}px`;
|
|
1028
|
+
if (typeof r.size == "string") {
|
|
1029
|
+
const n = String(r.size).replace(/px/gi, ""), i = Number(n);
|
|
1023
1030
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
1024
1031
|
return `${i}px`;
|
|
1025
1032
|
}
|
|
1026
1033
|
return _;
|
|
1027
1034
|
}), a = g(() => ({
|
|
1028
1035
|
boxSizing: "border-box",
|
|
1029
|
-
color:
|
|
1030
|
-
display:
|
|
1031
|
-
height:
|
|
1036
|
+
color: r.color,
|
|
1037
|
+
display: r.display,
|
|
1038
|
+
height: t.value,
|
|
1032
1039
|
lineHeight: "0",
|
|
1033
|
-
width:
|
|
1040
|
+
width: t.value
|
|
1034
1041
|
}));
|
|
1035
|
-
return (n, i) => (
|
|
1042
|
+
return (n, i) => (p(), T(q(e.as), {
|
|
1036
1043
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1037
1044
|
class: "kui-icon indeterminate-small-icon",
|
|
1038
1045
|
"data-testid": "kui-icon-wrapper-indeterminate-small-icon",
|
|
1039
1046
|
style: V(a.value)
|
|
1040
1047
|
}, {
|
|
1041
1048
|
default: A(() => [
|
|
1042
|
-
(
|
|
1049
|
+
(p(), m("svg", {
|
|
1043
1050
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1044
1051
|
"data-testid": "kui-icon-svg-indeterminate-small-icon",
|
|
1045
1052
|
fill: "none",
|
|
@@ -1049,7 +1056,7 @@ const _ = "24px", M = (e, t) => {
|
|
|
1049
1056
|
width: "100%",
|
|
1050
1057
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1051
1058
|
}, [
|
|
1052
|
-
e.title ? (
|
|
1059
|
+
e.title ? (p(), m("title", Ur, N(e.title), 1)) : E("", !0),
|
|
1053
1060
|
Gr
|
|
1054
1061
|
], 8, Zr))
|
|
1055
1062
|
]),
|
|
@@ -1062,7 +1069,7 @@ const _ = "24px", M = (e, t) => {
|
|
|
1062
1069
|
}, Wr = /* @__PURE__ */ Xr(() => /* @__PURE__ */ R("path", {
|
|
1063
1070
|
d: "M11 17H13V11H11V17ZM12 9C12.2833 9 12.5208 8.90417 12.7125 8.7125C12.9042 8.52083 13 8.28333 13 8C13 7.71667 12.9042 7.47917 12.7125 7.2875C12.5208 7.09583 12.2833 7 12 7C11.7167 7 11.4792 7.09583 11.2875 7.2875C11.0958 7.47917 11 7.71667 11 8C11 8.28333 11.0958 8.52083 11.2875 8.7125C11.4792 8.90417 11.7167 9 12 9ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22Z",
|
|
1064
1071
|
fill: "currentColor"
|
|
1065
|
-
}, null, -1)), Jr = /* @__PURE__ */
|
|
1072
|
+
}, null, -1)), Jr = /* @__PURE__ */ k({
|
|
1066
1073
|
__name: "InfoIcon",
|
|
1067
1074
|
props: {
|
|
1068
1075
|
/** The accessibility text provided to screen readers */
|
|
@@ -1099,8 +1106,8 @@ const _ = "24px", M = (e, t) => {
|
|
|
1099
1106
|
if (typeof e == "number" && e > 0)
|
|
1100
1107
|
return !0;
|
|
1101
1108
|
if (typeof e == "string") {
|
|
1102
|
-
const
|
|
1103
|
-
if (
|
|
1109
|
+
const r = String(e).replace(/px/gi, ""), t = Number(r);
|
|
1110
|
+
if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
|
|
1104
1111
|
return !0;
|
|
1105
1112
|
}
|
|
1106
1113
|
return !1;
|
|
@@ -1114,31 +1121,31 @@ const _ = "24px", M = (e, t) => {
|
|
|
1114
1121
|
}
|
|
1115
1122
|
},
|
|
1116
1123
|
setup(e) {
|
|
1117
|
-
const
|
|
1118
|
-
if (typeof
|
|
1119
|
-
return `${
|
|
1120
|
-
if (typeof
|
|
1121
|
-
const n = String(
|
|
1124
|
+
const r = e, t = g(() => {
|
|
1125
|
+
if (typeof r.size == "number" && r.size > 0)
|
|
1126
|
+
return `${r.size}px`;
|
|
1127
|
+
if (typeof r.size == "string") {
|
|
1128
|
+
const n = String(r.size).replace(/px/gi, ""), i = Number(n);
|
|
1122
1129
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
1123
1130
|
return `${i}px`;
|
|
1124
1131
|
}
|
|
1125
1132
|
return _;
|
|
1126
1133
|
}), a = g(() => ({
|
|
1127
1134
|
boxSizing: "border-box",
|
|
1128
|
-
color:
|
|
1129
|
-
display:
|
|
1130
|
-
height:
|
|
1135
|
+
color: r.color,
|
|
1136
|
+
display: r.display,
|
|
1137
|
+
height: t.value,
|
|
1131
1138
|
lineHeight: "0",
|
|
1132
|
-
width:
|
|
1139
|
+
width: t.value
|
|
1133
1140
|
}));
|
|
1134
|
-
return (n, i) => (
|
|
1141
|
+
return (n, i) => (p(), T(q(e.as), {
|
|
1135
1142
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1136
1143
|
class: "kui-icon info-icon",
|
|
1137
1144
|
"data-testid": "kui-icon-wrapper-info-icon",
|
|
1138
1145
|
style: V(a.value)
|
|
1139
1146
|
}, {
|
|
1140
1147
|
default: A(() => [
|
|
1141
|
-
(
|
|
1148
|
+
(p(), m("svg", {
|
|
1142
1149
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1143
1150
|
"data-testid": "kui-icon-svg-info-icon",
|
|
1144
1151
|
fill: "none",
|
|
@@ -1148,7 +1155,7 @@ const _ = "24px", M = (e, t) => {
|
|
|
1148
1155
|
width: "100%",
|
|
1149
1156
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1150
1157
|
}, [
|
|
1151
|
-
e.title ? (
|
|
1158
|
+
e.title ? (p(), m("title", Qr, N(e.title), 1)) : E("", !0),
|
|
1152
1159
|
Wr
|
|
1153
1160
|
], 8, Yr))
|
|
1154
1161
|
]),
|
|
@@ -1161,7 +1168,7 @@ const _ = "24px", M = (e, t) => {
|
|
|
1161
1168
|
}, nt = /* @__PURE__ */ rt(() => /* @__PURE__ */ R("path", {
|
|
1162
1169
|
d: "M15.25 5C14.9 5 14.6042 4.87917 14.3625 4.6375C14.1208 4.39583 14 4.1 14 3.75C14 3.4 14.1208 3.10417 14.3625 2.8625C14.6042 2.62083 14.9 2.5 15.25 2.5C15.6 2.5 15.8958 2.62083 16.1375 2.8625C16.3792 3.10417 16.5 3.4 16.5 3.75C16.5 4.1 16.3792 4.39583 16.1375 4.6375C15.8958 4.87917 15.6 5 15.25 5ZM15.25 21.5C14.9 21.5 14.6042 21.3792 14.3625 21.1375C14.1208 20.8958 14 20.6 14 20.25C14 19.9 14.1208 19.6042 14.3625 19.3625C14.6042 19.1208 14.9 19 15.25 19C15.6 19 15.8958 19.1208 16.1375 19.3625C16.3792 19.6042 16.5 19.9 16.5 20.25C16.5 20.6 16.3792 20.8958 16.1375 21.1375C15.8958 21.3792 15.6 21.5 15.25 21.5ZM19.25 8.5C18.9 8.5 18.6042 8.37917 18.3625 8.1375C18.1208 7.89583 18 7.6 18 7.25C18 6.9 18.1208 6.60417 18.3625 6.3625C18.6042 6.12083 18.9 6 19.25 6C19.6 6 19.8958 6.12083 20.1375 6.3625C20.3792 6.60417 20.5 6.9 20.5 7.25C20.5 7.6 20.3792 7.89583 20.1375 8.1375C19.8958 8.37917 19.6 8.5 19.25 8.5ZM19.25 18C18.9 18 18.6042 17.8792 18.3625 17.6375C18.1208 17.3958 18 17.1 18 16.75C18 16.4 18.1208 16.1042 18.3625 15.8625C18.6042 15.6208 18.9 15.5 19.25 15.5C19.6 15.5 19.8958 15.6208 20.1375 15.8625C20.3792 16.1042 20.5 16.4 20.5 16.75C20.5 17.1 20.3792 17.3958 20.1375 17.6375C19.8958 17.8792 19.6 18 19.25 18ZM20.75 13.25C20.4 13.25 20.1042 13.1292 19.8625 12.8875C19.6208 12.6458 19.5 12.35 19.5 12C19.5 11.65 19.6208 11.3542 19.8625 11.1125C20.1042 10.8708 20.4 10.75 20.75 10.75C21.1 10.75 21.3958 10.8708 21.6375 11.1125C21.8792 11.3542 22 11.65 22 12C22 12.35 21.8792 12.6458 21.6375 12.8875C21.3958 13.1292 21.1 13.25 20.75 13.25ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2V4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20V22ZM12 14C11.45 14 10.9792 13.8042 10.5875 13.4125C10.1958 13.0208 10 12.55 10 12C10 11.9167 10.0042 11.8292 10.0125 11.7375C10.0208 11.6458 10.0417 11.5583 10.075 11.475L8 9.4L9.4 8L11.475 10.075C11.5417 10.0583 11.7167 10.0333 12 10C12.55 10 13.0208 10.1958 13.4125 10.5875C13.8042 10.9792 14 11.45 14 12C14 12.55 13.8042 13.0208 13.4125 13.4125C13.0208 13.8042 12.55 14 12 14Z",
|
|
1163
1170
|
fill: "currentColor"
|
|
1164
|
-
}, null, -1)), at = /* @__PURE__ */
|
|
1171
|
+
}, null, -1)), at = /* @__PURE__ */ k({
|
|
1165
1172
|
__name: "ResponseIcon",
|
|
1166
1173
|
props: {
|
|
1167
1174
|
/** The accessibility text provided to screen readers */
|
|
@@ -1198,8 +1205,8 @@ const _ = "24px", M = (e, t) => {
|
|
|
1198
1205
|
if (typeof e == "number" && e > 0)
|
|
1199
1206
|
return !0;
|
|
1200
1207
|
if (typeof e == "string") {
|
|
1201
|
-
const
|
|
1202
|
-
if (
|
|
1208
|
+
const r = String(e).replace(/px/gi, ""), t = Number(r);
|
|
1209
|
+
if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
|
|
1203
1210
|
return !0;
|
|
1204
1211
|
}
|
|
1205
1212
|
return !1;
|
|
@@ -1213,31 +1220,31 @@ const _ = "24px", M = (e, t) => {
|
|
|
1213
1220
|
}
|
|
1214
1221
|
},
|
|
1215
1222
|
setup(e) {
|
|
1216
|
-
const
|
|
1217
|
-
if (typeof
|
|
1218
|
-
return `${
|
|
1219
|
-
if (typeof
|
|
1220
|
-
const n = String(
|
|
1223
|
+
const r = e, t = g(() => {
|
|
1224
|
+
if (typeof r.size == "number" && r.size > 0)
|
|
1225
|
+
return `${r.size}px`;
|
|
1226
|
+
if (typeof r.size == "string") {
|
|
1227
|
+
const n = String(r.size).replace(/px/gi, ""), i = Number(n);
|
|
1221
1228
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
1222
1229
|
return `${i}px`;
|
|
1223
1230
|
}
|
|
1224
1231
|
return _;
|
|
1225
1232
|
}), a = g(() => ({
|
|
1226
1233
|
boxSizing: "border-box",
|
|
1227
|
-
color:
|
|
1228
|
-
display:
|
|
1229
|
-
height:
|
|
1234
|
+
color: r.color,
|
|
1235
|
+
display: r.display,
|
|
1236
|
+
height: t.value,
|
|
1230
1237
|
lineHeight: "0",
|
|
1231
|
-
width:
|
|
1238
|
+
width: t.value
|
|
1232
1239
|
}));
|
|
1233
|
-
return (n, i) => (
|
|
1240
|
+
return (n, i) => (p(), T(q(e.as), {
|
|
1234
1241
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1235
1242
|
class: "kui-icon response-icon",
|
|
1236
1243
|
"data-testid": "kui-icon-wrapper-response-icon",
|
|
1237
1244
|
style: V(a.value)
|
|
1238
1245
|
}, {
|
|
1239
1246
|
default: A(() => [
|
|
1240
|
-
(
|
|
1247
|
+
(p(), m("svg", {
|
|
1241
1248
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1242
1249
|
"data-testid": "kui-icon-svg-response-icon",
|
|
1243
1250
|
fill: "none",
|
|
@@ -1247,7 +1254,7 @@ const _ = "24px", M = (e, t) => {
|
|
|
1247
1254
|
width: "100%",
|
|
1248
1255
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1249
1256
|
}, [
|
|
1250
|
-
e.title ? (
|
|
1257
|
+
e.title ? (p(), m("title", it, N(e.title), 1)) : E("", !0),
|
|
1251
1258
|
nt
|
|
1252
1259
|
], 8, tt))
|
|
1253
1260
|
]),
|
|
@@ -1260,7 +1267,7 @@ const _ = "24px", M = (e, t) => {
|
|
|
1260
1267
|
}, dt = /* @__PURE__ */ st(() => /* @__PURE__ */ R("path", {
|
|
1261
1268
|
d: "M16 18V16H18.6L13.4 10.85L9.4 14.85L2 7.4L3.4 6L9.4 12L13.4 8L20 14.6V12H22V18H16Z",
|
|
1262
1269
|
fill: "currentColor"
|
|
1263
|
-
}, null, -1)), ct = /* @__PURE__ */
|
|
1270
|
+
}, null, -1)), ct = /* @__PURE__ */ k({
|
|
1264
1271
|
__name: "TrendDownIcon",
|
|
1265
1272
|
props: {
|
|
1266
1273
|
/** The accessibility text provided to screen readers */
|
|
@@ -1297,8 +1304,8 @@ const _ = "24px", M = (e, t) => {
|
|
|
1297
1304
|
if (typeof e == "number" && e > 0)
|
|
1298
1305
|
return !0;
|
|
1299
1306
|
if (typeof e == "string") {
|
|
1300
|
-
const
|
|
1301
|
-
if (
|
|
1307
|
+
const r = String(e).replace(/px/gi, ""), t = Number(r);
|
|
1308
|
+
if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
|
|
1302
1309
|
return !0;
|
|
1303
1310
|
}
|
|
1304
1311
|
return !1;
|
|
@@ -1312,31 +1319,31 @@ const _ = "24px", M = (e, t) => {
|
|
|
1312
1319
|
}
|
|
1313
1320
|
},
|
|
1314
1321
|
setup(e) {
|
|
1315
|
-
const
|
|
1316
|
-
if (typeof
|
|
1317
|
-
return `${
|
|
1318
|
-
if (typeof
|
|
1319
|
-
const n = String(
|
|
1322
|
+
const r = e, t = g(() => {
|
|
1323
|
+
if (typeof r.size == "number" && r.size > 0)
|
|
1324
|
+
return `${r.size}px`;
|
|
1325
|
+
if (typeof r.size == "string") {
|
|
1326
|
+
const n = String(r.size).replace(/px/gi, ""), i = Number(n);
|
|
1320
1327
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
1321
1328
|
return `${i}px`;
|
|
1322
1329
|
}
|
|
1323
1330
|
return _;
|
|
1324
1331
|
}), a = g(() => ({
|
|
1325
1332
|
boxSizing: "border-box",
|
|
1326
|
-
color:
|
|
1327
|
-
display:
|
|
1328
|
-
height:
|
|
1333
|
+
color: r.color,
|
|
1334
|
+
display: r.display,
|
|
1335
|
+
height: t.value,
|
|
1329
1336
|
lineHeight: "0",
|
|
1330
|
-
width:
|
|
1337
|
+
width: t.value
|
|
1331
1338
|
}));
|
|
1332
|
-
return (n, i) => (
|
|
1339
|
+
return (n, i) => (p(), T(q(e.as), {
|
|
1333
1340
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1334
1341
|
class: "kui-icon trend-down-icon",
|
|
1335
1342
|
"data-testid": "kui-icon-wrapper-trend-down-icon",
|
|
1336
1343
|
style: V(a.value)
|
|
1337
1344
|
}, {
|
|
1338
1345
|
default: A(() => [
|
|
1339
|
-
(
|
|
1346
|
+
(p(), m("svg", {
|
|
1340
1347
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1341
1348
|
"data-testid": "kui-icon-svg-trend-down-icon",
|
|
1342
1349
|
fill: "none",
|
|
@@ -1346,7 +1353,7 @@ const _ = "24px", M = (e, t) => {
|
|
|
1346
1353
|
width: "100%",
|
|
1347
1354
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1348
1355
|
}, [
|
|
1349
|
-
e.title ? (
|
|
1356
|
+
e.title ? (p(), m("title", lt, N(e.title), 1)) : E("", !0),
|
|
1350
1357
|
dt
|
|
1351
1358
|
], 8, ut))
|
|
1352
1359
|
]),
|
|
@@ -1356,10 +1363,10 @@ const _ = "24px", M = (e, t) => {
|
|
|
1356
1363
|
}), ft = /* @__PURE__ */ M(ct, [["__scopeId", "data-v-aa775b0e"]]), pt = (e) => (L("data-v-cb010004"), e = e(), D(), e), vt = ["aria-hidden"], gt = {
|
|
1357
1364
|
key: 0,
|
|
1358
1365
|
"data-testid": "kui-icon-svg-title"
|
|
1359
|
-
},
|
|
1366
|
+
}, mt = /* @__PURE__ */ pt(() => /* @__PURE__ */ R("path", {
|
|
1360
1367
|
d: "M3.4 18L2 16.6L9.4 9.15L13.4 13.15L18.6 8H16V6H22V12H20V9.4L13.4 16L9.4 12L3.4 18Z",
|
|
1361
1368
|
fill: "currentColor"
|
|
1362
|
-
}, null, -1)),
|
|
1369
|
+
}, null, -1)), yt = /* @__PURE__ */ k({
|
|
1363
1370
|
__name: "TrendUpIcon",
|
|
1364
1371
|
props: {
|
|
1365
1372
|
/** The accessibility text provided to screen readers */
|
|
@@ -1396,8 +1403,8 @@ const _ = "24px", M = (e, t) => {
|
|
|
1396
1403
|
if (typeof e == "number" && e > 0)
|
|
1397
1404
|
return !0;
|
|
1398
1405
|
if (typeof e == "string") {
|
|
1399
|
-
const
|
|
1400
|
-
if (
|
|
1406
|
+
const r = String(e).replace(/px/gi, ""), t = Number(r);
|
|
1407
|
+
if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
|
|
1401
1408
|
return !0;
|
|
1402
1409
|
}
|
|
1403
1410
|
return !1;
|
|
@@ -1411,31 +1418,31 @@ const _ = "24px", M = (e, t) => {
|
|
|
1411
1418
|
}
|
|
1412
1419
|
},
|
|
1413
1420
|
setup(e) {
|
|
1414
|
-
const
|
|
1415
|
-
if (typeof
|
|
1416
|
-
return `${
|
|
1417
|
-
if (typeof
|
|
1418
|
-
const n = String(
|
|
1421
|
+
const r = e, t = g(() => {
|
|
1422
|
+
if (typeof r.size == "number" && r.size > 0)
|
|
1423
|
+
return `${r.size}px`;
|
|
1424
|
+
if (typeof r.size == "string") {
|
|
1425
|
+
const n = String(r.size).replace(/px/gi, ""), i = Number(n);
|
|
1419
1426
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
1420
1427
|
return `${i}px`;
|
|
1421
1428
|
}
|
|
1422
1429
|
return _;
|
|
1423
1430
|
}), a = g(() => ({
|
|
1424
1431
|
boxSizing: "border-box",
|
|
1425
|
-
color:
|
|
1426
|
-
display:
|
|
1427
|
-
height:
|
|
1432
|
+
color: r.color,
|
|
1433
|
+
display: r.display,
|
|
1434
|
+
height: t.value,
|
|
1428
1435
|
lineHeight: "0",
|
|
1429
|
-
width:
|
|
1436
|
+
width: t.value
|
|
1430
1437
|
}));
|
|
1431
|
-
return (n, i) => (
|
|
1438
|
+
return (n, i) => (p(), T(q(e.as), {
|
|
1432
1439
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1433
1440
|
class: "kui-icon trend-up-icon",
|
|
1434
1441
|
"data-testid": "kui-icon-wrapper-trend-up-icon",
|
|
1435
1442
|
style: V(a.value)
|
|
1436
1443
|
}, {
|
|
1437
1444
|
default: A(() => [
|
|
1438
|
-
(
|
|
1445
|
+
(p(), m("svg", {
|
|
1439
1446
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1440
1447
|
"data-testid": "kui-icon-svg-trend-up-icon",
|
|
1441
1448
|
fill: "none",
|
|
@@ -1445,20 +1452,20 @@ const _ = "24px", M = (e, t) => {
|
|
|
1445
1452
|
width: "100%",
|
|
1446
1453
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1447
1454
|
}, [
|
|
1448
|
-
e.title ? (
|
|
1449
|
-
|
|
1455
|
+
e.title ? (p(), m("title", gt, N(e.title), 1)) : E("", !0),
|
|
1456
|
+
mt
|
|
1450
1457
|
], 8, vt))
|
|
1451
1458
|
]),
|
|
1452
1459
|
_: 1
|
|
1453
1460
|
}, 8, ["aria-hidden", "style"]));
|
|
1454
1461
|
}
|
|
1455
|
-
}), ht = /* @__PURE__ */ M(
|
|
1462
|
+
}), ht = /* @__PURE__ */ M(yt, [["__scopeId", "data-v-cb010004"]]), Ct = (e) => (L("data-v-6d3b4073"), e = e(), D(), e), bt = ["aria-hidden"], St = {
|
|
1456
1463
|
key: 0,
|
|
1457
1464
|
"data-testid": "kui-icon-svg-title"
|
|
1458
1465
|
}, wt = /* @__PURE__ */ Ct(() => /* @__PURE__ */ R("path", {
|
|
1459
1466
|
d: "M9 20C8.68333 20 8.4 19.9083 8.15 19.725C7.9 19.5417 7.71667 19.3083 7.6 19.025L5.3 13H1V11H6.7L9 17.1L13.6 4.975C13.7167 4.69167 13.9 4.45833 14.15 4.275C14.4 4.09167 14.6833 4 15 4C15.3167 4 15.6 4.09167 15.85 4.275C16.1 4.45833 16.2833 4.69167 16.4 4.975L18.7 11H23V13H17.3L15 6.9L10.4 19.025C10.2833 19.3083 10.1 19.5417 9.85 19.725C9.6 19.9083 9.31667 20 9 20Z",
|
|
1460
1467
|
fill: "currentColor"
|
|
1461
|
-
}, null, -1)), _t = /* @__PURE__ */
|
|
1468
|
+
}, null, -1)), _t = /* @__PURE__ */ k({
|
|
1462
1469
|
__name: "VitalsIcon",
|
|
1463
1470
|
props: {
|
|
1464
1471
|
/** The accessibility text provided to screen readers */
|
|
@@ -1495,8 +1502,8 @@ const _ = "24px", M = (e, t) => {
|
|
|
1495
1502
|
if (typeof e == "number" && e > 0)
|
|
1496
1503
|
return !0;
|
|
1497
1504
|
if (typeof e == "string") {
|
|
1498
|
-
const
|
|
1499
|
-
if (
|
|
1505
|
+
const r = String(e).replace(/px/gi, ""), t = Number(r);
|
|
1506
|
+
if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
|
|
1500
1507
|
return !0;
|
|
1501
1508
|
}
|
|
1502
1509
|
return !1;
|
|
@@ -1510,31 +1517,31 @@ const _ = "24px", M = (e, t) => {
|
|
|
1510
1517
|
}
|
|
1511
1518
|
},
|
|
1512
1519
|
setup(e) {
|
|
1513
|
-
const
|
|
1514
|
-
if (typeof
|
|
1515
|
-
return `${
|
|
1516
|
-
if (typeof
|
|
1517
|
-
const n = String(
|
|
1520
|
+
const r = e, t = g(() => {
|
|
1521
|
+
if (typeof r.size == "number" && r.size > 0)
|
|
1522
|
+
return `${r.size}px`;
|
|
1523
|
+
if (typeof r.size == "string") {
|
|
1524
|
+
const n = String(r.size).replace(/px/gi, ""), i = Number(n);
|
|
1518
1525
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
1519
1526
|
return `${i}px`;
|
|
1520
1527
|
}
|
|
1521
1528
|
return _;
|
|
1522
1529
|
}), a = g(() => ({
|
|
1523
1530
|
boxSizing: "border-box",
|
|
1524
|
-
color:
|
|
1525
|
-
display:
|
|
1526
|
-
height:
|
|
1531
|
+
color: r.color,
|
|
1532
|
+
display: r.display,
|
|
1533
|
+
height: t.value,
|
|
1527
1534
|
lineHeight: "0",
|
|
1528
|
-
width:
|
|
1535
|
+
width: t.value
|
|
1529
1536
|
}));
|
|
1530
|
-
return (n, i) => (
|
|
1537
|
+
return (n, i) => (p(), T(q(e.as), {
|
|
1531
1538
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1532
1539
|
class: "kui-icon vitals-icon",
|
|
1533
1540
|
"data-testid": "kui-icon-wrapper-vitals-icon",
|
|
1534
1541
|
style: V(a.value)
|
|
1535
1542
|
}, {
|
|
1536
1543
|
default: A(() => [
|
|
1537
|
-
(
|
|
1544
|
+
(p(), m("svg", {
|
|
1538
1545
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1539
1546
|
"data-testid": "kui-icon-svg-vitals-icon",
|
|
1540
1547
|
fill: "none",
|
|
@@ -1544,7 +1551,7 @@ const _ = "24px", M = (e, t) => {
|
|
|
1544
1551
|
width: "100%",
|
|
1545
1552
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1546
1553
|
}, [
|
|
1547
|
-
e.title ? (
|
|
1554
|
+
e.title ? (p(), m("title", St, N(e.title), 1)) : E("", !0),
|
|
1548
1555
|
wt
|
|
1549
1556
|
], 8, bt))
|
|
1550
1557
|
]),
|
|
@@ -1557,7 +1564,7 @@ const _ = "24px", M = (e, t) => {
|
|
|
1557
1564
|
}, Tt = /* @__PURE__ */ Nt(() => /* @__PURE__ */ R("path", {
|
|
1558
1565
|
d: "M12.0001 22.025C11.7334 22.025 11.4793 21.975 11.2376 21.875C10.9959 21.775 10.7751 21.6333 10.5751 21.45L2.5501 13.425C2.36676 13.225 2.2251 13.0041 2.1251 12.7625C2.0251 12.5208 1.9751 12.2666 1.9751 12C1.9751 11.7333 2.0251 11.475 2.1251 11.225C2.2251 10.975 2.36676 10.7583 2.5501 10.575L10.5751 2.54998C10.7751 2.34998 10.9959 2.20414 11.2376 2.11248C11.4793 2.02081 11.7334 1.97498 12.0001 1.97498C12.2668 1.97498 12.5251 2.02081 12.7751 2.11248C13.0251 2.20414 13.2418 2.34998 13.4251 2.54998L21.4501 10.575C21.6501 10.7583 21.7959 10.975 21.8876 11.225C21.9793 11.475 22.0251 11.7333 22.0251 12C22.0251 12.2666 21.9793 12.5208 21.8876 12.7625C21.7959 13.0041 21.6501 13.225 21.4501 13.425L13.4251 21.45C13.2418 21.6333 13.0251 21.775 12.7751 21.875C12.5251 21.975 12.2668 22.025 12.0001 22.025ZM12.0001 20.025L20.0251 12L12.0001 3.97498L3.9751 12L12.0001 20.025ZM11.0001 13H13.0001V6.99998H11.0001V13ZM12.0001 16C12.2834 16 12.5209 15.9041 12.7126 15.7125C12.9043 15.5208 13.0001 15.2833 13.0001 15C13.0001 14.7166 12.9043 14.4791 12.7126 14.2875C12.5209 14.0958 12.2834 14 12.0001 14C11.7168 14 11.4793 14.0958 11.2876 14.2875C11.0959 14.4791 11.0001 14.7166 11.0001 15C11.0001 15.2833 11.0959 15.5208 11.2876 15.7125C11.4793 15.9041 11.7168 16 12.0001 16Z",
|
|
1559
1566
|
fill: "currentColor"
|
|
1560
|
-
}, null, -1)), xt = /* @__PURE__ */
|
|
1567
|
+
}, null, -1)), xt = /* @__PURE__ */ k({
|
|
1561
1568
|
__name: "WarningOutlineIcon",
|
|
1562
1569
|
props: {
|
|
1563
1570
|
/** The accessibility text provided to screen readers */
|
|
@@ -1594,8 +1601,8 @@ const _ = "24px", M = (e, t) => {
|
|
|
1594
1601
|
if (typeof e == "number" && e > 0)
|
|
1595
1602
|
return !0;
|
|
1596
1603
|
if (typeof e == "string") {
|
|
1597
|
-
const
|
|
1598
|
-
if (
|
|
1604
|
+
const r = String(e).replace(/px/gi, ""), t = Number(r);
|
|
1605
|
+
if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
|
|
1599
1606
|
return !0;
|
|
1600
1607
|
}
|
|
1601
1608
|
return !1;
|
|
@@ -1609,31 +1616,31 @@ const _ = "24px", M = (e, t) => {
|
|
|
1609
1616
|
}
|
|
1610
1617
|
},
|
|
1611
1618
|
setup(e) {
|
|
1612
|
-
const
|
|
1613
|
-
if (typeof
|
|
1614
|
-
return `${
|
|
1615
|
-
if (typeof
|
|
1616
|
-
const n = String(
|
|
1619
|
+
const r = e, t = g(() => {
|
|
1620
|
+
if (typeof r.size == "number" && r.size > 0)
|
|
1621
|
+
return `${r.size}px`;
|
|
1622
|
+
if (typeof r.size == "string") {
|
|
1623
|
+
const n = String(r.size).replace(/px/gi, ""), i = Number(n);
|
|
1617
1624
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
1618
1625
|
return `${i}px`;
|
|
1619
1626
|
}
|
|
1620
1627
|
return _;
|
|
1621
1628
|
}), a = g(() => ({
|
|
1622
1629
|
boxSizing: "border-box",
|
|
1623
|
-
color:
|
|
1624
|
-
display:
|
|
1625
|
-
height:
|
|
1630
|
+
color: r.color,
|
|
1631
|
+
display: r.display,
|
|
1632
|
+
height: t.value,
|
|
1626
1633
|
lineHeight: "0",
|
|
1627
|
-
width:
|
|
1634
|
+
width: t.value
|
|
1628
1635
|
}));
|
|
1629
|
-
return (n, i) => (
|
|
1636
|
+
return (n, i) => (p(), T(q(e.as), {
|
|
1630
1637
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1631
1638
|
class: "kui-icon warning-outline-icon",
|
|
1632
1639
|
"data-testid": "kui-icon-wrapper-warning-outline-icon",
|
|
1633
1640
|
style: V(a.value)
|
|
1634
1641
|
}, {
|
|
1635
1642
|
default: A(() => [
|
|
1636
|
-
(
|
|
1643
|
+
(p(), m("svg", {
|
|
1637
1644
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1638
1645
|
"data-testid": "kui-icon-svg-warning-outline-icon",
|
|
1639
1646
|
fill: "none",
|
|
@@ -1643,7 +1650,7 @@ const _ = "24px", M = (e, t) => {
|
|
|
1643
1650
|
width: "100%",
|
|
1644
1651
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1645
1652
|
}, [
|
|
1646
|
-
e.title ? (
|
|
1653
|
+
e.title ? (p(), m("title", Et, N(e.title), 1)) : E("", !0),
|
|
1647
1654
|
Tt
|
|
1648
1655
|
], 8, It))
|
|
1649
1656
|
]),
|
|
@@ -1656,7 +1663,7 @@ const _ = "24px", M = (e, t) => {
|
|
|
1656
1663
|
}, Vt = /* @__PURE__ */ zt(() => /* @__PURE__ */ R("path", {
|
|
1657
1664
|
d: "M12.025 22.05C11.7583 22.05 11.5042 22 11.2625 21.9C11.0208 21.8 10.8 21.6583 10.6 21.475L2.575 13.45C2.39167 13.25 2.25 13.0292 2.15 12.7875C2.05 12.5458 2 12.2917 2 12.025C2 11.7583 2.05 11.5 2.15 11.25C2.25 11 2.39167 10.7833 2.575 10.6L10.6 2.575C10.8 2.375 11.0208 2.22917 11.2625 2.1375C11.5042 2.04583 11.7583 2 12.025 2C12.2917 2 12.55 2.04583 12.8 2.1375C13.05 2.22917 13.2667 2.375 13.45 2.575L21.475 10.6C21.675 10.7833 21.8208 11 21.9125 11.25C22.0042 11.5 22.05 11.7583 22.05 12.025C22.05 12.2917 22.0042 12.5458 21.9125 12.7875C21.8208 13.0292 21.675 13.25 21.475 13.45L13.45 21.475C13.2667 21.6583 13.05 21.8 12.8 21.9C12.55 22 12.2917 22.05 12.025 22.05ZM11.025 13.025H13.025V7.025H11.025V13.025ZM12.025 16.025C12.3083 16.025 12.5458 15.9292 12.7375 15.7375C12.9292 15.5458 13.025 15.3083 13.025 15.025C13.025 14.7417 12.9292 14.5042 12.7375 14.3125C12.5458 14.1208 12.3083 14.025 12.025 14.025C11.7417 14.025 11.5042 14.1208 11.3125 14.3125C11.1208 14.5042 11.025 14.7417 11.025 15.025C11.025 15.3083 11.1208 15.5458 11.3125 15.7375C11.5042 15.9292 11.7417 16.025 12.025 16.025Z",
|
|
1658
1665
|
fill: "currentColor"
|
|
1659
|
-
}, null, -1)), Lt = /* @__PURE__ */
|
|
1666
|
+
}, null, -1)), Lt = /* @__PURE__ */ k({
|
|
1660
1667
|
__name: "WarningIcon",
|
|
1661
1668
|
props: {
|
|
1662
1669
|
/** The accessibility text provided to screen readers */
|
|
@@ -1693,8 +1700,8 @@ const _ = "24px", M = (e, t) => {
|
|
|
1693
1700
|
if (typeof e == "number" && e > 0)
|
|
1694
1701
|
return !0;
|
|
1695
1702
|
if (typeof e == "string") {
|
|
1696
|
-
const
|
|
1697
|
-
if (
|
|
1703
|
+
const r = String(e).replace(/px/gi, ""), t = Number(r);
|
|
1704
|
+
if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
|
|
1698
1705
|
return !0;
|
|
1699
1706
|
}
|
|
1700
1707
|
return !1;
|
|
@@ -1708,31 +1715,31 @@ const _ = "24px", M = (e, t) => {
|
|
|
1708
1715
|
}
|
|
1709
1716
|
},
|
|
1710
1717
|
setup(e) {
|
|
1711
|
-
const
|
|
1712
|
-
if (typeof
|
|
1713
|
-
return `${
|
|
1714
|
-
if (typeof
|
|
1715
|
-
const n = String(
|
|
1718
|
+
const r = e, t = g(() => {
|
|
1719
|
+
if (typeof r.size == "number" && r.size > 0)
|
|
1720
|
+
return `${r.size}px`;
|
|
1721
|
+
if (typeof r.size == "string") {
|
|
1722
|
+
const n = String(r.size).replace(/px/gi, ""), i = Number(n);
|
|
1716
1723
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
1717
1724
|
return `${i}px`;
|
|
1718
1725
|
}
|
|
1719
1726
|
return _;
|
|
1720
1727
|
}), a = g(() => ({
|
|
1721
1728
|
boxSizing: "border-box",
|
|
1722
|
-
color:
|
|
1723
|
-
display:
|
|
1724
|
-
height:
|
|
1729
|
+
color: r.color,
|
|
1730
|
+
display: r.display,
|
|
1731
|
+
height: t.value,
|
|
1725
1732
|
lineHeight: "0",
|
|
1726
|
-
width:
|
|
1733
|
+
width: t.value
|
|
1727
1734
|
}));
|
|
1728
|
-
return (n, i) => (
|
|
1735
|
+
return (n, i) => (p(), T(q(e.as), {
|
|
1729
1736
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1730
1737
|
class: "kui-icon warning-icon",
|
|
1731
1738
|
"data-testid": "kui-icon-wrapper-warning-icon",
|
|
1732
1739
|
style: V(a.value)
|
|
1733
1740
|
}, {
|
|
1734
1741
|
default: A(() => [
|
|
1735
|
-
(
|
|
1742
|
+
(p(), m("svg", {
|
|
1736
1743
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1737
1744
|
"data-testid": "kui-icon-svg-warning-icon",
|
|
1738
1745
|
fill: "none",
|
|
@@ -1742,17 +1749,17 @@ const _ = "24px", M = (e, t) => {
|
|
|
1742
1749
|
width: "100%",
|
|
1743
1750
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1744
1751
|
}, [
|
|
1745
|
-
e.title ? (
|
|
1752
|
+
e.title ? (p(), m("title", At, N(e.title), 1)) : E("", !0),
|
|
1746
1753
|
Vt
|
|
1747
1754
|
], 8, qt))
|
|
1748
1755
|
]),
|
|
1749
1756
|
_: 1
|
|
1750
1757
|
}, 8, ["aria-hidden", "style"]));
|
|
1751
1758
|
}
|
|
1752
|
-
}), Fe = /* @__PURE__ */ M(Lt, [["__scopeId", "data-v-d7b122fd"]]), ge = 2, Ee = ge + 2, Dt = (e,
|
|
1753
|
-
let a = !
|
|
1754
|
-
return
|
|
1755
|
-
}, Mt = (e,
|
|
1759
|
+
}), Fe = /* @__PURE__ */ M(Lt, [["__scopeId", "data-v-d7b122fd"]]), ge = 2, Ee = ge + 2, Dt = (e, r, t = !1) => {
|
|
1760
|
+
let a = !r || Number(e.toFixed(Ee)) === 0 ? 0 : Number(e.toFixed(Ee)) > 0 ? 1 : -1;
|
|
1761
|
+
return t && (a *= -1), a;
|
|
1762
|
+
}, Mt = (e, r, t) => r ? `${Math.abs(e * 100).toFixed(ge)}%` : t, Ot = (e, r) => r === 0 ? 0 : e / r - 1, Ft = (e, r = !1) => (r && (e *= -1), e > 0 ? ht : e < 0 ? ft : Oe), Ht = "#ad000e", fe = "#6c7489", Te = "#52596e", Bt = "#007d60", J = "16px", $t = "20px", Pt = "14px", Kt = "48px";
|
|
1756
1763
|
var F = /* @__PURE__ */ ((e) => (e.GENERIC_COUNT = "GenericCount", e.TRAFFIC = "Traffic", e.ERROR_RATE = "ErrorRate", e.LATENCY = "Latency", e))(F || {});
|
|
1757
1764
|
const Zt = { class: "metricscard" }, Ut = {
|
|
1758
1765
|
key: 0,
|
|
@@ -1766,7 +1773,7 @@ const Zt = { class: "metricscard" }, Ut = {
|
|
|
1766
1773
|
}, Xt = { "data-testid": "metric-trend-change" }, Yt = {
|
|
1767
1774
|
key: 0,
|
|
1768
1775
|
class: "metricscard-trend-range"
|
|
1769
|
-
}, Qt = /* @__PURE__ */
|
|
1776
|
+
}, Qt = /* @__PURE__ */ k({
|
|
1770
1777
|
__name: "MetricsCard",
|
|
1771
1778
|
props: {
|
|
1772
1779
|
cardType: {
|
|
@@ -1829,107 +1836,107 @@ const Zt = { class: "metricscard" }, Ut = {
|
|
|
1829
1836
|
}
|
|
1830
1837
|
},
|
|
1831
1838
|
setup(e) {
|
|
1832
|
-
const
|
|
1839
|
+
const r = /* @__PURE__ */ new Map([
|
|
1833
1840
|
[F.GENERIC_COUNT, Rt],
|
|
1834
1841
|
[F.TRAFFIC, Mr],
|
|
1835
1842
|
[F.ERROR_RATE, kt],
|
|
1836
1843
|
[F.LATENCY, ot]
|
|
1837
|
-
]),
|
|
1844
|
+
]), t = e, a = (o) => {
|
|
1838
1845
|
const s = {
|
|
1839
1846
|
red: `var(--kong-ui-metric-card-trend-negative, ${Ht})`,
|
|
1840
1847
|
green: `var(--kong-ui-metric-card-trend-positive, ${Bt})`,
|
|
1841
1848
|
grey: `var(--kong-ui-metric-card-trend-neutral, ${Te})`
|
|
1842
1849
|
};
|
|
1843
1850
|
return o > 0 ? s.green : o < 0 ? s.red : s.grey;
|
|
1844
|
-
}, n = (o) => o > 0 ? "positive" : o < 0 ? "negative" : "neutral", i = [
|
|
1851
|
+
}, n = (o) => o > 0 ? "positive" : o < 0 ? "negative" : "neutral", i = [z.Medium, z.Large, z.LargeCompact].includes(t.cardSize), u = t.cardSize === z.ExtraLarge ? Kt : i ? "22px" : Pt, f = g(() => t.cardSize === z.LargeCompact), d = [z.Small, z.LargeCompact].includes(t.cardSize);
|
|
1845
1852
|
return (o, s) => {
|
|
1846
1853
|
const l = qe("KTooltip");
|
|
1847
|
-
return
|
|
1854
|
+
return p(), m("div", Zt, [
|
|
1848
1855
|
R("div", {
|
|
1849
1856
|
class: G(["metricscard-title", e.cardSize])
|
|
1850
1857
|
}, [
|
|
1851
|
-
|
|
1858
|
+
w(d) ? E("", !0) : (p(), T(q(w(r).get(e.cardType)), {
|
|
1852
1859
|
key: 0,
|
|
1853
1860
|
class: "metricscard-icon",
|
|
1854
|
-
color:
|
|
1855
|
-
size:
|
|
1861
|
+
color: w(fe),
|
|
1862
|
+
size: w(J)
|
|
1856
1863
|
}, null, 8, ["color", "size"])),
|
|
1857
1864
|
R("span", null, N(e.title), 1),
|
|
1858
|
-
e.tooltip ? (
|
|
1865
|
+
e.tooltip ? (p(), T(l, {
|
|
1859
1866
|
key: 1,
|
|
1860
1867
|
class: "metricscard-tooltip",
|
|
1861
1868
|
placement: "right",
|
|
1862
1869
|
text: e.tooltip
|
|
1863
1870
|
}, {
|
|
1864
1871
|
default: A(() => [
|
|
1865
|
-
X(
|
|
1866
|
-
color:
|
|
1867
|
-
size:
|
|
1872
|
+
X(w(et), {
|
|
1873
|
+
color: w(fe),
|
|
1874
|
+
size: w(J)
|
|
1868
1875
|
}, null, 8, ["color", "size"])
|
|
1869
1876
|
]),
|
|
1870
1877
|
_: 1
|
|
1871
1878
|
}, 8, ["text"])) : E("", !0)
|
|
1872
1879
|
], 2),
|
|
1873
|
-
e.description &&
|
|
1880
|
+
e.description && w(i) && !f.value ? (p(), m("div", Ut, [
|
|
1874
1881
|
R("span", null, N(e.description), 1)
|
|
1875
1882
|
])) : E("", !0),
|
|
1876
1883
|
R("div", {
|
|
1877
|
-
class: G(["metricscard-valuetrend", { "is-compact":
|
|
1884
|
+
class: G(["metricscard-valuetrend", { "is-compact": f.value }])
|
|
1878
1885
|
}, [
|
|
1879
|
-
e.hasError ? (
|
|
1880
|
-
X(
|
|
1881
|
-
color:
|
|
1882
|
-
size:
|
|
1886
|
+
e.hasError ? (p(), m("div", Gt, [
|
|
1887
|
+
X(w(Fe), {
|
|
1888
|
+
color: w(fe),
|
|
1889
|
+
size: w($t)
|
|
1883
1890
|
}, null, 8, ["color", "size"]),
|
|
1884
1891
|
R("div", null, " " + N(e.errorMessage), 1)
|
|
1885
|
-
])) : (
|
|
1892
|
+
])) : (p(), m("div", {
|
|
1886
1893
|
key: 1,
|
|
1887
1894
|
class: G(["metricscard-value", e.cardSize]),
|
|
1888
1895
|
"data-testid": "metric-value",
|
|
1889
|
-
style: V(`font-size:${
|
|
1896
|
+
style: V(`font-size:${w(u)}`)
|
|
1890
1897
|
}, N(e.metricValue), 7)),
|
|
1891
|
-
|
|
1898
|
+
w(i) ? (p(), m("div", jt, [
|
|
1892
1899
|
R("div", {
|
|
1893
1900
|
class: G(["metricscard-trend-change", n(e.changePolarity)]),
|
|
1894
1901
|
"data-testid": "metric-trend-parent"
|
|
1895
1902
|
}, [
|
|
1896
|
-
e.changePolarity !== 0 ? (
|
|
1903
|
+
e.changePolarity !== 0 ? (p(), T(q(e.trendIcon), {
|
|
1897
1904
|
key: 0,
|
|
1898
1905
|
color: a(e.changePolarity),
|
|
1899
|
-
size:
|
|
1900
|
-
}, null, 8, ["color", "size"])) : (
|
|
1906
|
+
size: w(J)
|
|
1907
|
+
}, null, 8, ["color", "size"])) : (p(), T(w(Pr), {
|
|
1901
1908
|
key: 1,
|
|
1902
|
-
color:
|
|
1903
|
-
size:
|
|
1909
|
+
color: w(Te),
|
|
1910
|
+
size: w(J)
|
|
1904
1911
|
}, null, 8, ["color", "size"])),
|
|
1905
1912
|
R("div", Xt, N(e.metricChange), 1)
|
|
1906
1913
|
], 2),
|
|
1907
|
-
e.trendRange && e.cardSize !==
|
|
1914
|
+
e.trendRange && e.cardSize !== w(z).LargeCompact ? (p(), m("div", Yt, N(e.trendRange), 1)) : E("", !0)
|
|
1908
1915
|
])) : E("", !0)
|
|
1909
1916
|
], 2)
|
|
1910
1917
|
]);
|
|
1911
1918
|
};
|
|
1912
1919
|
}
|
|
1913
|
-
}),
|
|
1914
|
-
const
|
|
1915
|
-
for (const [a, n] of
|
|
1916
|
-
|
|
1917
|
-
return
|
|
1918
|
-
}, Wt = /* @__PURE__ */
|
|
1919
|
-
function ri(e,
|
|
1920
|
-
const
|
|
1921
|
-
return
|
|
1922
|
-
X(
|
|
1923
|
-
X(
|
|
1920
|
+
}), me = (e, r) => {
|
|
1921
|
+
const t = e.__vccOpts || e;
|
|
1922
|
+
for (const [a, n] of r)
|
|
1923
|
+
t[a] = n;
|
|
1924
|
+
return t;
|
|
1925
|
+
}, Wt = /* @__PURE__ */ me(Qt, [["__scopeId", "data-v-975ba293"]]), Jt = {}, ei = { class: "loading-tabs" };
|
|
1926
|
+
function ri(e, r) {
|
|
1927
|
+
const t = qe("KSkeletonBox");
|
|
1928
|
+
return p(), m("div", ei, [
|
|
1929
|
+
X(t, { width: "100" }),
|
|
1930
|
+
X(t, { width: "75" })
|
|
1924
1931
|
]);
|
|
1925
1932
|
}
|
|
1926
|
-
const ti = /* @__PURE__ */
|
|
1933
|
+
const ti = /* @__PURE__ */ me(Jt, [["render", ri], ["__scopeId", "data-v-f7eb9c40"]]), ii = {
|
|
1927
1934
|
key: 0,
|
|
1928
1935
|
class: "error-display"
|
|
1929
1936
|
}, ni = {
|
|
1930
1937
|
key: 0,
|
|
1931
1938
|
class: "error-display-message"
|
|
1932
|
-
}, ai = /* @__PURE__ */
|
|
1939
|
+
}, ai = /* @__PURE__ */ k({
|
|
1933
1940
|
__name: "MetricCardContainer",
|
|
1934
1941
|
props: {
|
|
1935
1942
|
fallbackDisplayText: {
|
|
@@ -1958,31 +1965,31 @@ const ti = /* @__PURE__ */ ye(Jt, [["render", ri], ["__scopeId", "data-v-f7eb9c4
|
|
|
1958
1965
|
cardSize: {
|
|
1959
1966
|
type: String,
|
|
1960
1967
|
required: !1,
|
|
1961
|
-
default: () =>
|
|
1968
|
+
default: () => z.Large
|
|
1962
1969
|
}
|
|
1963
1970
|
},
|
|
1964
1971
|
setup(e) {
|
|
1965
|
-
const
|
|
1966
|
-
const i = Ot(n.currentValue, n.previousValue) || 0, u = Dt(i,
|
|
1972
|
+
const r = e, t = g(() => r.cards.every((n) => (n == null ? void 0 : n.hasError) === !0)), a = (n) => {
|
|
1973
|
+
const i = Ot(n.currentValue, n.previousValue) || 0, u = Dt(i, r.hasTrendAccess, n.increaseIsBad);
|
|
1967
1974
|
return {
|
|
1968
1975
|
metricValue: n.formatValueFn ? n.formatValueFn(n.currentValue) : zr(n.currentValue, { capital: !0, round: !0 }) || "0",
|
|
1969
|
-
metricChange: n.formatChangeFn ? n.formatChangeFn(i) : Mt(i,
|
|
1976
|
+
metricChange: n.formatChangeFn ? n.formatChangeFn(i) : Mt(i, r.hasTrendAccess, r.fallbackDisplayText),
|
|
1970
1977
|
changePolarity: u,
|
|
1971
1978
|
trendIcon: Ft(u, n.increaseIsBad),
|
|
1972
|
-
cardSize:
|
|
1979
|
+
cardSize: r.cardSize
|
|
1973
1980
|
};
|
|
1974
1981
|
};
|
|
1975
|
-
return (n, i) => (
|
|
1982
|
+
return (n, i) => (p(), m("div", {
|
|
1976
1983
|
class: G(["kong-ui-public-metric-card-container", e.cardSize])
|
|
1977
1984
|
}, [
|
|
1978
|
-
|
|
1979
|
-
X(
|
|
1980
|
-
e.errorMessage ? (
|
|
1981
|
-
])) : (
|
|
1982
|
-
e.loading ? (
|
|
1983
|
-
key: `skeleton-${
|
|
1984
|
-
class: G(e.cardSize ===
|
|
1985
|
-
}, null, 8, ["class"])) : (
|
|
1985
|
+
t.value ? (p(), m("div", ii, [
|
|
1986
|
+
X(w(Fe), { class: "error-display-icon" }),
|
|
1987
|
+
e.errorMessage ? (p(), m("div", ni, N(e.errorMessage), 1)) : E("", !0)
|
|
1988
|
+
])) : (p(!0), m(we, { key: 1 }, Xe(e.cards, (u, f) => (p(), m(we, null, [
|
|
1989
|
+
e.loading ? (p(), T(ti, {
|
|
1990
|
+
key: `skeleton-${f}`,
|
|
1991
|
+
class: G(e.cardSize === w(z).Small ? "loading-tabs-small" : "loading-tabs-large")
|
|
1992
|
+
}, null, 8, ["class"])) : (p(), T(Wt, Ye({ key: f }, a(u), {
|
|
1986
1993
|
"card-size": e.cardSize,
|
|
1987
1994
|
"card-type": u.cardType,
|
|
1988
1995
|
description: u.description,
|
|
@@ -1995,95 +2002,94 @@ const ti = /* @__PURE__ */ ye(Jt, [["render", ri], ["__scopeId", "data-v-f7eb9c4
|
|
|
1995
2002
|
], 64))), 256))
|
|
1996
2003
|
], 2));
|
|
1997
2004
|
}
|
|
1998
|
-
}), oi = /* @__PURE__ */
|
|
2005
|
+
}), oi = /* @__PURE__ */ me(ai, [["__scopeId", "data-v-80b51a84"]]), fi = /* @__PURE__ */ k({
|
|
1999
2006
|
__name: "MetricsConsumer",
|
|
2000
2007
|
props: {
|
|
2001
2008
|
lookupKey: { default: void 0 },
|
|
2002
|
-
cardSize: { default:
|
|
2009
|
+
cardSize: { default: z.Large },
|
|
2003
2010
|
cardToDisplay: { default: void 0 }
|
|
2004
2011
|
},
|
|
2005
2012
|
setup(e) {
|
|
2006
|
-
const
|
|
2007
|
-
if (!
|
|
2013
|
+
const r = e, t = ke(De);
|
|
2014
|
+
if (!t)
|
|
2008
2015
|
throw new Error("MetricsConsumer must be nested inside a MetricsProvider instance.");
|
|
2009
|
-
const { traffic: a, latency: n } =
|
|
2016
|
+
const { traffic: a, latency: n } = t.data, { i18n: i } = K.useI18n(), u = K.useMetricCardBuilder({
|
|
2010
2017
|
cardType: F.TRAFFIC,
|
|
2011
|
-
title: g(() =>
|
|
2012
|
-
description:
|
|
2018
|
+
title: g(() => t.longCardTitles ? i.t("metricCard.long.traffic") : i.t("metricCard.short.traffic")),
|
|
2019
|
+
description: t.description,
|
|
2013
2020
|
record: a.mapped,
|
|
2014
2021
|
hasError: a.hasError,
|
|
2015
|
-
lookupKey:
|
|
2022
|
+
lookupKey: r.lookupKey,
|
|
2016
2023
|
sumGroupedValues: Q,
|
|
2017
|
-
trendRange:
|
|
2018
|
-
}),
|
|
2019
|
-
const
|
|
2024
|
+
trendRange: a.trendRange
|
|
2025
|
+
}), f = (y) => `${y.toFixed(ge)}%`, d = g(() => {
|
|
2026
|
+
const y = a.mapped.value, h = j(y, "current", r.lookupKey, _e), x = j(y, "current", r.lookupKey, Q), b = h / x * 100 || 0, C = j(y, "previous", r.lookupKey, _e), H = j(y, "previous", r.lookupKey, Q), I = C / H * 100 || 0;
|
|
2020
2027
|
return {
|
|
2021
2028
|
cardType: F.ERROR_RATE,
|
|
2022
2029
|
hasError: a.hasError.value,
|
|
2023
|
-
currentValue:
|
|
2030
|
+
currentValue: b,
|
|
2024
2031
|
previousValue: I,
|
|
2025
|
-
formatValueFn:
|
|
2026
|
-
title:
|
|
2027
|
-
description:
|
|
2032
|
+
formatValueFn: f,
|
|
2033
|
+
title: t.longCardTitles ? i.t("metricCard.long.errorRate") : i.t("metricCard.short.errorRate"),
|
|
2034
|
+
description: t.description,
|
|
2028
2035
|
increaseIsBad: !0,
|
|
2029
|
-
trendRange:
|
|
2036
|
+
trendRange: a.trendRange.value
|
|
2030
2037
|
};
|
|
2031
|
-
}), o = (
|
|
2038
|
+
}), o = (y) => `${y}ms`, s = K.useMetricCardBuilder({
|
|
2032
2039
|
cardType: F.LATENCY,
|
|
2033
|
-
title: g(() =>
|
|
2034
|
-
description:
|
|
2040
|
+
title: g(() => t.longCardTitles ? i.t("metricCard.long.latency") : i.t("metricCard.short.latency")),
|
|
2041
|
+
description: t.description,
|
|
2035
2042
|
hasError: n.hasError,
|
|
2036
2043
|
record: n.mapped,
|
|
2037
|
-
lookupKey:
|
|
2044
|
+
lookupKey: r.lookupKey,
|
|
2038
2045
|
increaseIsBad: !0,
|
|
2039
2046
|
formatValueFn: o,
|
|
2040
|
-
trendRange:
|
|
2041
|
-
}), l = g(() =>
|
|
2047
|
+
trendRange: n.trendRange
|
|
2048
|
+
}), l = g(() => r.cardToDisplay === "TRAFFIC" ? [u.value] : r.cardToDisplay === "ERROR_RATE" ? [d.value] : r.cardToDisplay === "LATENCY" ? [s.value] : [u.value, d.value, s.value]), c = g(() => r.cardToDisplay === "TRAFFIC" || r.cardToDisplay === "ERROR_RATE" ? a.isLoading.value : r.cardToDisplay === "LATENCY" ? n.isLoading.value : a.isLoading.value || n.isLoading.value), v = g(() => ({
|
|
2042
2049
|
cards: l.value,
|
|
2043
|
-
loading:
|
|
2044
|
-
hasTrendAccess:
|
|
2050
|
+
loading: c.value,
|
|
2051
|
+
hasTrendAccess: t.hasTrendAccess,
|
|
2045
2052
|
fallbackDisplayText: i.t("general.notAvailable"),
|
|
2046
|
-
cardSize:
|
|
2047
|
-
hideTitle: !0
|
|
2048
|
-
|
|
2049
|
-
})), b = g(() => ({
|
|
2053
|
+
cardSize: r.cardSize,
|
|
2054
|
+
hideTitle: !0
|
|
2055
|
+
})), S = g(() => ({
|
|
2050
2056
|
loading: v.value.loading,
|
|
2051
2057
|
trafficCard: u.value,
|
|
2052
2058
|
errorRateCard: d.value,
|
|
2053
2059
|
latencyCard: s.value,
|
|
2054
|
-
errorRateFormatted:
|
|
2060
|
+
errorRateFormatted: f(d.value.currentValue),
|
|
2055
2061
|
latencyFormatted: o(s.value.currentValue)
|
|
2056
2062
|
}));
|
|
2057
|
-
return (
|
|
2058
|
-
X(
|
|
2063
|
+
return (y, h) => ze(y.$slots, "default", { cardValues: S.value }, () => [
|
|
2064
|
+
X(w(oi), Qe(We(v.value)), null, 16)
|
|
2059
2065
|
]);
|
|
2060
2066
|
}
|
|
2061
|
-
}), ee = (e) => new Date(e), pi = (e,
|
|
2062
|
-
const
|
|
2067
|
+
}), ee = (e) => new Date(e), pi = (e, r) => {
|
|
2068
|
+
const t = e.body;
|
|
2063
2069
|
e.reply({
|
|
2064
2070
|
statusCode: 200,
|
|
2065
|
-
body: si(
|
|
2071
|
+
body: si(t, r)
|
|
2066
2072
|
});
|
|
2067
|
-
}, xe = (e) => e.reduce((
|
|
2068
|
-
var
|
|
2069
|
-
const
|
|
2073
|
+
}, xe = (e) => e.reduce((r, t) => (r[t] = { name: t }, r), {}), si = (e, r) => {
|
|
2074
|
+
var S, y;
|
|
2075
|
+
const t = re.get(te.ONE_DAY), a = e.granularity === "trend" ? new er(t) : new rr(t), n = a.endMs(), i = a.startMs(), u = a.granularityMs(), f = e.granularity === "trend" ? 2 : 1;
|
|
2070
2076
|
if ((e.dimensions ?? []).length > 2)
|
|
2071
2077
|
throw new Error(`Explore only supports 0-2 dimensions; got: ${JSON.stringify(e.dimensions)}`);
|
|
2072
|
-
const d = (e.dimensions ?? []).find((
|
|
2073
|
-
for (let
|
|
2074
|
-
for (let
|
|
2075
|
-
const
|
|
2076
|
-
(
|
|
2077
|
-
const H = l.reduce((I, $) => (I[$] = (
|
|
2078
|
-
|
|
2078
|
+
const d = (e.dimensions ?? []).find((h) => h !== "time"), o = (r == null ? void 0 : r.dimensionNames) ?? [], s = Math.max(o.length, 1), l = e.metrics || [], c = [];
|
|
2079
|
+
for (let h = 0; h < f; h++)
|
|
2080
|
+
for (let x = 0; x < s; x++) {
|
|
2081
|
+
const b = d ? { [d]: o[x] } : {};
|
|
2082
|
+
(S = e.dimensions) != null && S.includes("status_code_grouped") ? Q.forEach((C) => {
|
|
2083
|
+
const H = l.reduce((I, $) => (I[$] = (f - h) * 1e3 + 100 * x + 1, I), { ...b, status_code_grouped: C });
|
|
2084
|
+
c.push({
|
|
2079
2085
|
version: "v1",
|
|
2080
|
-
timestamp:
|
|
2086
|
+
timestamp: h === 0 ? ee(i).toISOString() : ee(i + u).toISOString(),
|
|
2081
2087
|
event: H
|
|
2082
2088
|
});
|
|
2083
|
-
}) :
|
|
2089
|
+
}) : c.push({
|
|
2084
2090
|
version: "v1",
|
|
2085
|
-
timestamp:
|
|
2086
|
-
event: l.reduce((
|
|
2091
|
+
timestamp: h === 0 ? ee(i).toISOString() : ee(i + u).toISOString(),
|
|
2092
|
+
event: l.reduce((C, H) => (C[H] = (f - h) * 1e3 + 100 * x + 1, C), { ...b })
|
|
2087
2093
|
});
|
|
2088
2094
|
}
|
|
2089
2095
|
const v = {
|
|
@@ -2092,13 +2098,13 @@ const ti = /* @__PURE__ */ ye(Jt, [["render", ri], ["__scopeId", "data-v-f7eb9c4
|
|
|
2092
2098
|
granularity_ms: u,
|
|
2093
2099
|
display: d ? {
|
|
2094
2100
|
[d]: xe(o),
|
|
2095
|
-
...(
|
|
2101
|
+
...(y = e.dimensions) != null && y.includes("status_code_grouped") ? { status_code_grouped: xe(Q) } : {}
|
|
2096
2102
|
} : {},
|
|
2097
2103
|
metric_names: e.metrics,
|
|
2098
2104
|
query_id: "test"
|
|
2099
2105
|
};
|
|
2100
2106
|
return {
|
|
2101
|
-
data:
|
|
2107
|
+
data: c,
|
|
2102
2108
|
meta: v
|
|
2103
2109
|
};
|
|
2104
2110
|
};
|