react-semaphor 0.1.420 → 0.1.422
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/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +28 -27
- package/dist/brand-studio/index.cjs +1 -1
- package/dist/brand-studio/index.js +2 -2
- package/dist/chunks/analyze-result-contract-D7pjjYPy.js +2069 -0
- package/dist/chunks/analyze-result-contract-DpDcImgk.js +1 -0
- package/dist/chunks/{calendar-preferences-dialog-f0Z7Kf-U.js → calendar-preferences-dialog-C2fBRNZh.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-DIfAbE_y.js → calendar-preferences-dialog-Cbavs2EK.js} +3 -3
- package/dist/chunks/{dashboard-briefing-launcher-anh-Jy5v.js → dashboard-briefing-launcher-C0_ZbBK3.js} +4 -4
- package/dist/chunks/{dashboard-briefing-launcher-C3tNkGFG.js → dashboard-briefing-launcher-CGfEFUnX.js} +1 -1
- package/dist/chunks/{dashboard-controls-DQxlOxzy.js → dashboard-controls-BUuS-BGl.js} +1 -1
- package/dist/chunks/{dashboard-controls-8dCQaPaq.js → dashboard-controls-ae5t32xV.js} +5 -5
- package/dist/chunks/{dashboard-json-B309EInF.js → dashboard-json-DTL_kYhz.js} +1 -1
- package/dist/chunks/{dashboard-json-i7Ae9KGD.js → dashboard-json-Db3rkY_a.js} +3 -3
- package/dist/chunks/{edit-dashboard-visual-z3IqzYnj.js → edit-dashboard-visual-CW7mv_si.js} +7030 -6963
- package/dist/chunks/{edit-dashboard-visual-4HycwBHR.js → edit-dashboard-visual-Ciqdu58a.js} +38 -38
- package/dist/chunks/{index-yxKWKFdr.js → index-8y8XX7sX.js} +121 -121
- package/dist/chunks/{index-B6DLEXRX.js → index-OD6mLD7U.js} +257 -256
- package/dist/chunks/{switch-COWQU8aK.js → switch-CWcWwwDJ.js} +1 -1
- package/dist/chunks/{switch-D6Ygf3wA.js → switch-DRNqX0v0.js} +1 -1
- package/dist/chunks/{update-policy-BzT2k4n6.js → update-policy-BCJc0oI5.js} +211 -187
- package/dist/chunks/update-policy-C1pmhLz9.js +3 -0
- package/dist/chunks/{use-create-flow-overlay-state-DENfd7sW.js → use-create-flow-overlay-state-C0Uhmlpd.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-CX0D-6HM.js → use-create-flow-overlay-state-CkMmXhI-.js} +3 -3
- package/dist/chunks/validators-DMlVbd1p.js +1 -0
- package/dist/chunks/{validators-Cxr9qbrR.js → validators-PXkij33j.js} +93 -93
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +1 -1
- package/dist/dashboard-authoring/index.js +14 -14
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +2 -2
- package/dist/data-app-codegen/index.cjs +1 -1
- package/dist/data-app-codegen/index.js +2 -2
- package/dist/data-app-codegen-node/index.cjs +188 -251
- package/dist/data-app-codegen-node/index.js +631 -673
- package/dist/data-app-sdk/index.cjs +2 -2
- package/dist/data-app-sdk/index.js +678 -638
- package/dist/data-app-sdk-adapters/index.cjs +1 -1
- package/dist/data-app-sdk-adapters/index.js +51 -51
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +7 -7
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/analytics-protocol.d.ts +12 -9
- package/dist/types/dashboard-assistant.d.ts +0 -6
- package/dist/types/data-app-codegen-node.d.ts +12 -2
- package/dist/types/data-app-codegen.d.ts +12 -2
- package/dist/types/data-app-sdk-validation.d.ts +0 -6
- package/dist/types/data-app-sdk.d.ts +17 -7
- package/package.json +1 -1
- package/dist/chunks/analyze-result-contract-DdhEt99q.js +0 -2004
- package/dist/chunks/analyze-result-contract-DwRzl7yJ.js +0 -1
- package/dist/chunks/update-policy-VloD-0YM.js +0 -3
- package/dist/chunks/validators-BMQo93Y0.js +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { toSemaphorInputSnapshots as
|
|
2
|
-
import { jsxs as p, Fragment as
|
|
3
|
-
import { createContext as Ie, useContext as Q, useState as z, useRef as E, useEffect as B, useMemo as I, Fragment as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { M as
|
|
7
|
-
import { X as
|
|
8
|
-
import { b as
|
|
1
|
+
import { toSemaphorInputSnapshots as jr, toSemaphorInputBinding as Hr, toSemaphorActiveInputSnapshots as X, toSemaphorMatrixIntent as Pr, toSemaphorSqlIntent as Vr, toSemaphorInputOptionsIntent as Qr, toSemaphorRecordsIntent as Ur, toSemaphorAnalysisQueryOptions as Gr, toSemaphorAnalysisIntent as Jr, toSemaphorMetricIntent as Yr, hasSemaphorInputValue as ue, normalizeSemaphorInputOptions as hr, toSemaphorInputSpec as br } from "../data-app-sdk-adapters/index.js";
|
|
2
|
+
import { jsxs as p, Fragment as vr, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as Ie, useContext as Q, useState as z, useRef as E, useEffect as B, useMemo as I, Fragment as Xr, useId as Sr, useCallback as D, useReducer as Zr } from "react";
|
|
4
|
+
import { I as et, L as rt } from "../chunks/analyze-result-contract-D7pjjYPy.js";
|
|
5
|
+
import { b as ao, M as lo } from "../chunks/analyze-result-contract-D7pjjYPy.js";
|
|
6
|
+
import { M as tt, a as nt, S as it, E as ot, C as st } from "../chunks/search-BHsQIWBV.js";
|
|
7
|
+
import { X as at, C as lt, j as dt } from "../chunks/x-CXDkqdur.js";
|
|
8
|
+
import { b as ut } from "../chunks/validators-PXkij33j.js";
|
|
9
9
|
function me(e, r, t = {}) {
|
|
10
10
|
return {
|
|
11
11
|
...t,
|
|
@@ -13,13 +13,13 @@ function me(e, r, t = {}) {
|
|
|
13
13
|
role: r
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function Gi(e) {
|
|
17
17
|
return e;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Ji(e) {
|
|
20
20
|
return e;
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const Yi = {
|
|
23
23
|
source: {
|
|
24
24
|
semantic(e) {
|
|
25
25
|
return {
|
|
@@ -57,7 +57,7 @@ const Hi = {
|
|
|
57
57
|
bindInput(e, r) {
|
|
58
58
|
return {
|
|
59
59
|
toAnalyticsInput() {
|
|
60
|
-
const [t] =
|
|
60
|
+
const [t] = jr([e]), n = Hr({
|
|
61
61
|
...r,
|
|
62
62
|
inputId: r.inputId || t.inputId
|
|
63
63
|
});
|
|
@@ -130,37 +130,37 @@ const Hi = {
|
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
132
|
}, ce = 10, _e = 8;
|
|
133
|
-
function
|
|
134
|
-
const
|
|
135
|
-
if (
|
|
136
|
-
switch (
|
|
133
|
+
function He(e, r) {
|
|
134
|
+
const t = e == null ? void 0 : e.result;
|
|
135
|
+
if (t)
|
|
136
|
+
switch (t.kind) {
|
|
137
137
|
case "records":
|
|
138
138
|
return le({
|
|
139
139
|
title: "Records",
|
|
140
140
|
rowNoun: "rows",
|
|
141
|
-
records:
|
|
142
|
-
columns:
|
|
143
|
-
rowCount:
|
|
141
|
+
records: t.records,
|
|
142
|
+
columns: t.columns,
|
|
143
|
+
rowCount: t.rowCount
|
|
144
144
|
});
|
|
145
145
|
case "sql":
|
|
146
146
|
return le({
|
|
147
147
|
title: "SQL Rows",
|
|
148
148
|
rowNoun: "rows",
|
|
149
|
-
records:
|
|
150
|
-
columns:
|
|
151
|
-
rowCount:
|
|
149
|
+
records: t.records,
|
|
150
|
+
columns: t.columns,
|
|
151
|
+
rowCount: t.rowCount
|
|
152
152
|
});
|
|
153
153
|
case "inputOptions":
|
|
154
154
|
return le({
|
|
155
155
|
title: "Options",
|
|
156
156
|
rowNoun: "options",
|
|
157
|
-
records:
|
|
158
|
-
var
|
|
157
|
+
records: t.options.slice(0, ce).map((n) => {
|
|
158
|
+
var i;
|
|
159
159
|
return {
|
|
160
|
-
label:
|
|
161
|
-
value:
|
|
162
|
-
count:
|
|
163
|
-
disambiguation: (
|
|
160
|
+
label: n.label,
|
|
161
|
+
value: n.value,
|
|
162
|
+
count: n.count,
|
|
163
|
+
disambiguation: (i = n.disambiguation) == null ? void 0 : i.join(" / ")
|
|
164
164
|
};
|
|
165
165
|
}),
|
|
166
166
|
columns: [
|
|
@@ -169,42 +169,22 @@ function lt(e) {
|
|
|
169
169
|
{ key: "count", label: "Count" },
|
|
170
170
|
{ key: "disambiguation", label: "Disambiguation" }
|
|
171
171
|
],
|
|
172
|
-
rowCount:
|
|
173
|
-
});
|
|
174
|
-
case "metric": {
|
|
175
|
-
const t = [
|
|
176
|
-
{ metric: "primaryValue", value: r.primaryValue }
|
|
177
|
-
];
|
|
178
|
-
return r.comparison && t.push(
|
|
179
|
-
{
|
|
180
|
-
metric: `${r.comparison.kind} value`,
|
|
181
|
-
value: r.comparison.value
|
|
182
|
-
},
|
|
183
|
-
{ metric: "delta", value: r.comparison.delta },
|
|
184
|
-
{ metric: "deltaPercent", value: r.comparison.deltaPercent }
|
|
185
|
-
), le({
|
|
186
|
-
title: "Metric",
|
|
187
|
-
rowNoun: "values",
|
|
188
|
-
records: t,
|
|
189
|
-
columns: [
|
|
190
|
-
{ key: "metric", label: "Metric" },
|
|
191
|
-
{ key: "value", label: "Value" }
|
|
192
|
-
],
|
|
193
|
-
rowCount: t.length
|
|
172
|
+
rowCount: t.rowCount ?? t.options.length
|
|
194
173
|
});
|
|
195
|
-
|
|
174
|
+
case "metric":
|
|
175
|
+
return ct(t, r);
|
|
196
176
|
case "matrix":
|
|
197
177
|
return le({
|
|
198
178
|
title: "Matrix Cells",
|
|
199
179
|
rowNoun: "cells",
|
|
200
|
-
records:
|
|
201
|
-
const
|
|
180
|
+
records: t.cells.slice(0, ce).map((n) => {
|
|
181
|
+
const i = t.nodesById[n.rowId], o = n.columnId ? t.nodesById[n.columnId] : void 0, u = t.measuresById[n.measureId];
|
|
202
182
|
return {
|
|
203
|
-
row: (
|
|
204
|
-
column: (
|
|
205
|
-
measure: (
|
|
206
|
-
value:
|
|
207
|
-
role:
|
|
183
|
+
row: (i == null ? void 0 : i.label) || n.rowId,
|
|
184
|
+
column: (o == null ? void 0 : o.label) || n.columnId || "Total",
|
|
185
|
+
measure: (u == null ? void 0 : u.label) || n.measureId,
|
|
186
|
+
value: n.formattedValue ?? n.value,
|
|
187
|
+
role: n.role
|
|
208
188
|
};
|
|
209
189
|
}),
|
|
210
190
|
columns: [
|
|
@@ -214,12 +194,50 @@ function lt(e) {
|
|
|
214
194
|
{ key: "value", label: "Value" },
|
|
215
195
|
{ key: "role", label: "Role" }
|
|
216
196
|
],
|
|
217
|
-
rowCount:
|
|
197
|
+
rowCount: t.rowCount ?? t.cells.length
|
|
218
198
|
});
|
|
219
199
|
default:
|
|
220
|
-
return
|
|
200
|
+
return pt(t);
|
|
221
201
|
}
|
|
222
202
|
}
|
|
203
|
+
function ct(e, r) {
|
|
204
|
+
var o, u, f, d, c;
|
|
205
|
+
const t = [
|
|
206
|
+
{
|
|
207
|
+
metric: "primaryValue",
|
|
208
|
+
value: (r == null ? void 0 : r.primaryValue) ?? e.primaryValue
|
|
209
|
+
}
|
|
210
|
+
], n = (r == null ? void 0 : r.comparisonKind) ?? ((o = e.comparison) == null ? void 0 : o.kind);
|
|
211
|
+
return n && t.push(
|
|
212
|
+
{
|
|
213
|
+
metric: `${n} value`,
|
|
214
|
+
value: (r == null ? void 0 : r.comparisonValue) ?? ((u = e.comparison) == null ? void 0 : u.value)
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
metric: "delta",
|
|
218
|
+
value: (r == null ? void 0 : r.delta) ?? ((f = e.comparison) == null ? void 0 : f.delta)
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
metric: "deltaPercent",
|
|
222
|
+
value: (r == null ? void 0 : r.deltaPercent) ?? ((d = e.comparison) == null ? void 0 : d.deltaPercent)
|
|
223
|
+
}
|
|
224
|
+
), (((c = r == null ? void 0 : r.missingMeasures) == null ? void 0 : c.filter(Boolean)) ?? []).forEach((g) => {
|
|
225
|
+
t.push({ metric: `missing:${g}`, value: "missing" });
|
|
226
|
+
}), Object.entries((r == null ? void 0 : r.measures) ?? {}).sort(([g], [m]) => g.localeCompare(m)).forEach(([g, m]) => {
|
|
227
|
+
t.push({ metric: `measure:${g}`, value: m });
|
|
228
|
+
}), Object.entries((r == null ? void 0 : r.measureBindings) ?? {}).sort(([g], [m]) => g.localeCompare(m)).forEach(([g, m]) => {
|
|
229
|
+
t.push({ metric: `binding:${g}`, value: m });
|
|
230
|
+
}), le({
|
|
231
|
+
title: "Metric",
|
|
232
|
+
rowNoun: "values",
|
|
233
|
+
records: t,
|
|
234
|
+
columns: [
|
|
235
|
+
{ key: "metric", label: "Metric" },
|
|
236
|
+
{ key: "value", label: "Value" }
|
|
237
|
+
],
|
|
238
|
+
rowCount: t.length
|
|
239
|
+
});
|
|
240
|
+
}
|
|
223
241
|
function le({
|
|
224
242
|
title: e,
|
|
225
243
|
rowNoun: r,
|
|
@@ -227,20 +245,20 @@ function le({
|
|
|
227
245
|
columns: n,
|
|
228
246
|
rowCount: i
|
|
229
247
|
}) {
|
|
230
|
-
const o =
|
|
248
|
+
const o = ft(n, t);
|
|
231
249
|
if (!o.length)
|
|
232
250
|
return;
|
|
233
251
|
const u = i ?? t.length, f = t.slice(0, ce);
|
|
234
252
|
return {
|
|
235
253
|
title: e,
|
|
236
|
-
summary: `${
|
|
254
|
+
summary: `${mt(u)} ${r}`,
|
|
237
255
|
columns: o.slice(0, _e),
|
|
238
256
|
rows: f,
|
|
239
257
|
truncatedRows: u > f.length,
|
|
240
258
|
truncatedColumns: o.length > _e
|
|
241
259
|
};
|
|
242
260
|
}
|
|
243
|
-
function
|
|
261
|
+
function ft(e, r) {
|
|
244
262
|
if (e != null && e.length)
|
|
245
263
|
return e.filter((n) => n.key).map((n) => ({
|
|
246
264
|
key: n.key,
|
|
@@ -251,46 +269,46 @@ function dt(e, r) {
|
|
|
251
269
|
Object.keys(n).forEach((i) => t.add(i));
|
|
252
270
|
}), [...t].map((n) => ({ key: n, label: n }));
|
|
253
271
|
}
|
|
254
|
-
function
|
|
255
|
-
throw new Error(`Unhandled Semaphor result kind: ${
|
|
272
|
+
function pt(e) {
|
|
273
|
+
throw new Error(`Unhandled Semaphor result kind: ${wr(e)}`);
|
|
256
274
|
}
|
|
257
|
-
function
|
|
258
|
-
return e === null ? "null" : e === void 0 ? "" : typeof e == "string" ?
|
|
275
|
+
function gt(e) {
|
|
276
|
+
return e === null ? "null" : e === void 0 ? "" : typeof e == "string" ? or(e) : typeof e == "number" || typeof e == "boolean" ? String(e) : or(wr(e));
|
|
259
277
|
}
|
|
260
|
-
function
|
|
278
|
+
function mt(e) {
|
|
261
279
|
return typeof e == "number" ? e.toLocaleString() : "-";
|
|
262
280
|
}
|
|
263
|
-
function
|
|
281
|
+
function wr(e) {
|
|
264
282
|
return JSON.stringify(e, null, 2) ?? "undefined";
|
|
265
283
|
}
|
|
266
|
-
function
|
|
284
|
+
function or(e) {
|
|
267
285
|
return e.length > 80 ? `${e.slice(0, 77)}...` : e;
|
|
268
286
|
}
|
|
269
287
|
function xe(e) {
|
|
270
288
|
return e.viewTitle || e.queryLabel || e.viewId || e.queryId;
|
|
271
289
|
}
|
|
272
|
-
function
|
|
290
|
+
function yt(e) {
|
|
273
291
|
if (e.label)
|
|
274
292
|
return e.label;
|
|
275
293
|
if (e.queryKind !== "inputOptions")
|
|
276
294
|
return;
|
|
277
295
|
const t = e.labelField.label || e.valueField.label || e.labelField.name || e.valueField.name || e.inputId;
|
|
278
|
-
return `${
|
|
296
|
+
return `${ht(t)} Options`;
|
|
279
297
|
}
|
|
280
|
-
function
|
|
298
|
+
function ht(e) {
|
|
281
299
|
return (e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").replace(/\bfilter\b/gi, " ").replace(/\boptions?\b/gi, " ").replace(/\bid\b/gi, " ").replace(/\s+/g, " ").trim() || e).split(" ").filter(Boolean).map((n) => n === n.toUpperCase() && n.length > 1 ? n : `${n.slice(0, 1).toUpperCase()}${n.slice(1)}`).join(" ");
|
|
282
300
|
}
|
|
283
|
-
function
|
|
301
|
+
function Pe(e) {
|
|
284
302
|
return e.flatMap((r) => {
|
|
285
|
-
var
|
|
286
|
-
const t = r.latestAttempt, n = t == null ? void 0 : t.executionResult, i =
|
|
287
|
-
(
|
|
288
|
-
), o =
|
|
303
|
+
var g, m, v, y;
|
|
304
|
+
const t = r.latestAttempt, n = t == null ? void 0 : t.executionResult, i = Te(
|
|
305
|
+
(g = n == null ? void 0 : n.validation) == null ? void 0 : g.warnings
|
|
306
|
+
), o = Te(
|
|
289
307
|
(m = n == null ? void 0 : n.validation) == null ? void 0 : m.errors
|
|
290
|
-
), u =
|
|
308
|
+
), u = wt(
|
|
291
309
|
(v = n == null ? void 0 : n.coverage) == null ? void 0 : v.missingObligations
|
|
292
|
-
), f =
|
|
293
|
-
(
|
|
310
|
+
), f = Te(
|
|
311
|
+
(y = n == null ? void 0 : n.coverage) == null ? void 0 : y.warnings
|
|
294
312
|
), d = [], c = xe(r);
|
|
295
313
|
(t == null ? void 0 : t.status) === "error" && d.push({
|
|
296
314
|
trace: r,
|
|
@@ -311,7 +329,7 @@ function Me(e) {
|
|
|
311
329
|
return d;
|
|
312
330
|
});
|
|
313
331
|
}
|
|
314
|
-
function
|
|
332
|
+
function bt(e) {
|
|
315
333
|
return {
|
|
316
334
|
traceId: e.trace.traceId,
|
|
317
335
|
queryId: e.trace.queryId,
|
|
@@ -325,11 +343,11 @@ function mt(e) {
|
|
|
325
343
|
path: e.path
|
|
326
344
|
};
|
|
327
345
|
}
|
|
328
|
-
function
|
|
346
|
+
function vt(e, r) {
|
|
329
347
|
return e.filter((t) => t.trace.traceId === r.traceId).length;
|
|
330
348
|
}
|
|
331
|
-
function
|
|
332
|
-
const r =
|
|
349
|
+
function St(e) {
|
|
350
|
+
const r = Pe(e), t = e.filter(
|
|
333
351
|
(u) => {
|
|
334
352
|
var f;
|
|
335
353
|
return ((f = u.latestAttempt) == null ? void 0 : f.status) === "error";
|
|
@@ -350,15 +368,15 @@ function ht(e) {
|
|
|
350
368
|
severity: t || i ? "error" : o ? "warning" : n ? "loading" : "ok"
|
|
351
369
|
};
|
|
352
370
|
}
|
|
353
|
-
function
|
|
371
|
+
function wt(e) {
|
|
354
372
|
return Array.isArray(e) ? e.filter((r) => typeof r == "string") : [];
|
|
355
373
|
}
|
|
356
|
-
function
|
|
357
|
-
return Array.isArray(e) ? e.map(
|
|
374
|
+
function Te(e) {
|
|
375
|
+
return Array.isArray(e) ? e.map(It).filter(
|
|
358
376
|
(r) => !!r
|
|
359
377
|
) : [];
|
|
360
378
|
}
|
|
361
|
-
function
|
|
379
|
+
function It(e) {
|
|
362
380
|
if (typeof e == "string")
|
|
363
381
|
return { message: e };
|
|
364
382
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
@@ -373,10 +391,10 @@ function vt(e) {
|
|
|
373
391
|
...i ? { path: i } : {}
|
|
374
392
|
} : n ? { message: n, code: n } : void 0;
|
|
375
393
|
}
|
|
376
|
-
function
|
|
394
|
+
function xt(e) {
|
|
377
395
|
if (!e.enabled)
|
|
378
396
|
return e;
|
|
379
|
-
const r = e.queries.map(
|
|
397
|
+
const r = e.queries.map(Ir);
|
|
380
398
|
return {
|
|
381
399
|
enabled: e.enabled,
|
|
382
400
|
queries: r,
|
|
@@ -385,28 +403,29 @@ function St(e) {
|
|
|
385
403
|
getQueries: (t) => r.filter((n) => n.queryId === t)
|
|
386
404
|
};
|
|
387
405
|
}
|
|
388
|
-
function
|
|
389
|
-
return e ?
|
|
406
|
+
function sr(e) {
|
|
407
|
+
return e ? Ir(e) : void 0;
|
|
390
408
|
}
|
|
391
|
-
function
|
|
409
|
+
function Ir(e) {
|
|
392
410
|
var r;
|
|
393
411
|
return (r = e == null ? void 0 : e.latestAttempt) != null && r.executionResult ? {
|
|
394
412
|
...e,
|
|
395
413
|
latestAttempt: {
|
|
396
414
|
...e.latestAttempt,
|
|
397
|
-
|
|
415
|
+
resultPreview: e.latestAttempt.resultPreview || He(e.latestAttempt.executionResult),
|
|
416
|
+
executionResult: qt(
|
|
398
417
|
e.latestAttempt.executionResult
|
|
399
418
|
)
|
|
400
419
|
}
|
|
401
420
|
} : e;
|
|
402
421
|
}
|
|
403
|
-
function
|
|
422
|
+
function qt(e) {
|
|
404
423
|
const {
|
|
405
424
|
compiledQuery: r,
|
|
406
425
|
intent: t,
|
|
407
426
|
result: n,
|
|
408
427
|
...i
|
|
409
|
-
} = e, o =
|
|
428
|
+
} = e, o = At(
|
|
410
429
|
i.metadata
|
|
411
430
|
);
|
|
412
431
|
return {
|
|
@@ -414,7 +433,7 @@ function wt(e) {
|
|
|
414
433
|
...o ? { metadata: o } : {}
|
|
415
434
|
};
|
|
416
435
|
}
|
|
417
|
-
function
|
|
436
|
+
function At(e) {
|
|
418
437
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
419
438
|
return e;
|
|
420
439
|
const r = e.dataAppDebug;
|
|
@@ -426,7 +445,7 @@ function It(e) {
|
|
|
426
445
|
dataAppDebug: n
|
|
427
446
|
};
|
|
428
447
|
}
|
|
429
|
-
function
|
|
448
|
+
function Ct(e) {
|
|
430
449
|
return e === "relative" ? {
|
|
431
450
|
position: "relative",
|
|
432
451
|
top: "auto",
|
|
@@ -440,7 +459,7 @@ function xt(e) {
|
|
|
440
459
|
left: e.endsWith("left") ? 20 : "auto"
|
|
441
460
|
};
|
|
442
461
|
}
|
|
443
|
-
function
|
|
462
|
+
function Tt(e) {
|
|
444
463
|
return e === "error" ? {
|
|
445
464
|
borderColor: "var(--sd-error-border)",
|
|
446
465
|
background: "var(--sd-error-bg)",
|
|
@@ -459,7 +478,7 @@ function qt(e) {
|
|
|
459
478
|
color: "var(--sd-success-fg)"
|
|
460
479
|
};
|
|
461
480
|
}
|
|
462
|
-
function
|
|
481
|
+
function kt(e) {
|
|
463
482
|
return e === "right" ? {
|
|
464
483
|
top: 16,
|
|
465
484
|
right: 16,
|
|
@@ -478,23 +497,23 @@ function At(e) {
|
|
|
478
497
|
borderRadius: 6
|
|
479
498
|
};
|
|
480
499
|
}
|
|
481
|
-
function
|
|
500
|
+
function Et(e) {
|
|
482
501
|
return e === "right" ? {
|
|
483
502
|
gridTemplateColumns: "minmax(210px, 280px) minmax(0, 1fr)"
|
|
484
503
|
} : {
|
|
485
504
|
gridTemplateColumns: "minmax(260px, 340px) minmax(0, 1fr)"
|
|
486
505
|
};
|
|
487
506
|
}
|
|
488
|
-
function
|
|
507
|
+
function Rt(e) {
|
|
489
508
|
return {
|
|
490
509
|
borderRight: "1px solid var(--sd-border)",
|
|
491
510
|
borderBottom: 0
|
|
492
511
|
};
|
|
493
512
|
}
|
|
494
|
-
function
|
|
513
|
+
function xr(e) {
|
|
495
514
|
return e === "error" ? { background: "var(--sd-error-dot)" } : e === "success" ? { background: "var(--sd-success-dot)" } : e === "loading" ? { background: "var(--sd-loading-dot)" } : { background: "var(--sd-idle-dot)" };
|
|
496
515
|
}
|
|
497
|
-
function
|
|
516
|
+
function Lt(e) {
|
|
498
517
|
return e === "error" ? {
|
|
499
518
|
borderColor: "var(--sd-error-border)",
|
|
500
519
|
color: "var(--sd-error-fg)"
|
|
@@ -509,7 +528,7 @@ function kt(e) {
|
|
|
509
528
|
color: "var(--sd-fg-muted)"
|
|
510
529
|
};
|
|
511
530
|
}
|
|
512
|
-
const
|
|
531
|
+
const ar = "semaphor-devtools-stylesheet", R = "semaphor-devtools", $t = `
|
|
513
532
|
.${R} {
|
|
514
533
|
--sd-bg: #ffffff;
|
|
515
534
|
--sd-bg-muted: #fafafa;
|
|
@@ -626,11 +645,11 @@ const ir = "semaphor-devtools-stylesheet", R = "semaphor-devtools", Et = `
|
|
|
626
645
|
color: var(--sd-fg);
|
|
627
646
|
}
|
|
628
647
|
`;
|
|
629
|
-
function
|
|
630
|
-
if (typeof document > "u" || document.getElementById(
|
|
648
|
+
function qr() {
|
|
649
|
+
if (typeof document > "u" || document.getElementById(ar))
|
|
631
650
|
return;
|
|
632
651
|
const e = document.createElement("style");
|
|
633
|
-
e.id =
|
|
652
|
+
e.id = ar, e.textContent = $t, document.head.appendChild(e);
|
|
634
653
|
}
|
|
635
654
|
const ye = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif', W = "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace", ke = {
|
|
636
655
|
color: "var(--sd-fg-muted)",
|
|
@@ -1540,129 +1559,129 @@ const ye = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1540
1559
|
textOverflow: "ellipsis",
|
|
1541
1560
|
whiteSpace: "nowrap"
|
|
1542
1561
|
}
|
|
1543
|
-
}, Ee = 10, Re = 100,
|
|
1562
|
+
}, Ee = 10, Re = 100, Ot = 25, Dt = 500, Ar = {
|
|
1544
1563
|
enabled: !1,
|
|
1545
1564
|
queries: [],
|
|
1546
1565
|
issues: [],
|
|
1547
1566
|
getQuery: () => {
|
|
1548
1567
|
},
|
|
1549
1568
|
getQueries: () => []
|
|
1550
|
-
},
|
|
1569
|
+
}, Ve = Ie(null), Qe = Ie(null), Ue = Ie(
|
|
1551
1570
|
void 0
|
|
1552
1571
|
), V = [];
|
|
1553
|
-
function
|
|
1572
|
+
function Bt({
|
|
1554
1573
|
debug: e,
|
|
1555
1574
|
children: r
|
|
1556
1575
|
}) {
|
|
1557
|
-
const t = I(() =>
|
|
1558
|
-
|
|
1576
|
+
const t = I(() => Wn(e), [e]), [n, i] = Zr(
|
|
1577
|
+
Rn,
|
|
1559
1578
|
t,
|
|
1560
|
-
|
|
1561
|
-
), o = E(n), u =
|
|
1579
|
+
Or
|
|
1580
|
+
), o = E(n), u = Sr(), [f, d] = z({ open: !1 });
|
|
1562
1581
|
o.current = n, B(() => {
|
|
1563
1582
|
i({ type: "config", config: t });
|
|
1564
1583
|
}, [t]), B(() => {
|
|
1565
1584
|
if (!n.enabled || !n.exposeWindowBridge || typeof window > "u")
|
|
1566
1585
|
return;
|
|
1567
|
-
const h =
|
|
1568
|
-
return
|
|
1586
|
+
const h = Kn(() => o.current);
|
|
1587
|
+
return Kt({
|
|
1569
1588
|
ownerId: u,
|
|
1570
1589
|
bridge: h
|
|
1571
1590
|
}), () => {
|
|
1572
|
-
|
|
1591
|
+
Wt(u);
|
|
1573
1592
|
};
|
|
1574
1593
|
}, [u, n.enabled, n.exposeWindowBridge]);
|
|
1575
|
-
const c = I(() => ({ state: n, dispatch: i }), [n]),
|
|
1594
|
+
const c = I(() => ({ state: n, dispatch: i }), [n]), g = D((h) => {
|
|
1576
1595
|
d({ open: !0, focus: h });
|
|
1577
|
-
}, []), m =
|
|
1596
|
+
}, []), m = D(() => {
|
|
1578
1597
|
d((h) => ({ ...h, open: !1 }));
|
|
1579
|
-
}, []), v =
|
|
1598
|
+
}, []), v = D((h) => {
|
|
1580
1599
|
d({ open: !0, focus: h });
|
|
1581
|
-
}, []),
|
|
1600
|
+
}, []), y = I(
|
|
1582
1601
|
() => ({
|
|
1583
1602
|
open: f.open,
|
|
1584
1603
|
focus: f.focus,
|
|
1585
|
-
openDevtools:
|
|
1604
|
+
openDevtools: g,
|
|
1586
1605
|
closeDevtools: m,
|
|
1587
1606
|
focusTrace: v
|
|
1588
1607
|
}),
|
|
1589
1608
|
[
|
|
1590
1609
|
m,
|
|
1591
1610
|
v,
|
|
1592
|
-
|
|
1611
|
+
g,
|
|
1593
1612
|
f.focus,
|
|
1594
1613
|
f.open
|
|
1595
1614
|
]
|
|
1596
1615
|
);
|
|
1597
|
-
return /* @__PURE__ */ a(
|
|
1616
|
+
return /* @__PURE__ */ a(Ve.Provider, { value: c, children: /* @__PURE__ */ a(Qe.Provider, { value: y, children: r }) });
|
|
1598
1617
|
}
|
|
1599
|
-
function
|
|
1618
|
+
function Kt(e) {
|
|
1600
1619
|
const r = V.findIndex(
|
|
1601
1620
|
(t) => t.ownerId === e.ownerId
|
|
1602
1621
|
);
|
|
1603
|
-
r >= 0 && V.splice(r, 1), V.push(e),
|
|
1622
|
+
r >= 0 && V.splice(r, 1), V.push(e), Cr();
|
|
1604
1623
|
}
|
|
1605
|
-
function
|
|
1624
|
+
function Wt(e) {
|
|
1606
1625
|
const r = V.findIndex(
|
|
1607
1626
|
(t) => t.ownerId === e
|
|
1608
1627
|
);
|
|
1609
|
-
r >= 0 && V.splice(r, 1),
|
|
1628
|
+
r >= 0 && V.splice(r, 1), Cr();
|
|
1610
1629
|
}
|
|
1611
|
-
function
|
|
1630
|
+
function Cr() {
|
|
1612
1631
|
if (typeof window > "u")
|
|
1613
1632
|
return;
|
|
1614
1633
|
const e = V[V.length - 1];
|
|
1615
1634
|
e ? window.__SEMAPHOR_DEVTOOLS__ = e.bridge : delete window.__SEMAPHOR_DEVTOOLS__;
|
|
1616
1635
|
}
|
|
1617
|
-
function
|
|
1636
|
+
function Xi({
|
|
1618
1637
|
id: e,
|
|
1619
1638
|
title: r,
|
|
1620
1639
|
children: t
|
|
1621
1640
|
}) {
|
|
1622
1641
|
const n = I(() => ({ id: e, title: r }), [e, r]);
|
|
1623
|
-
return /* @__PURE__ */ a(
|
|
1642
|
+
return /* @__PURE__ */ a(Ue.Provider, { value: n, children: t });
|
|
1624
1643
|
}
|
|
1625
|
-
function
|
|
1644
|
+
function _t({
|
|
1626
1645
|
buttonPosition: e = "bottom-right",
|
|
1627
1646
|
initialIsOpen: r = !1,
|
|
1628
1647
|
panelPosition: t = "right",
|
|
1629
1648
|
className: n,
|
|
1630
1649
|
style: i
|
|
1631
1650
|
} = {}) {
|
|
1632
|
-
const o =
|
|
1651
|
+
const o = Tr(), u = Q(Qe), [f, d] = z(""), [c, g] = z(!1), m = E(null), v = E(null), y = u == null ? void 0 : u.openDevtools, h = u == null ? void 0 : u.closeDevtools, C = (u == null ? void 0 : u.open) === !0;
|
|
1633
1652
|
B(() => {
|
|
1634
|
-
|
|
1653
|
+
qr();
|
|
1635
1654
|
}, []), B(() => {
|
|
1636
|
-
r && o.enabled && (
|
|
1637
|
-
}, [r, o.enabled,
|
|
1638
|
-
if (!
|
|
1655
|
+
r && o.enabled && (y == null || y());
|
|
1656
|
+
}, [r, o.enabled, y]), B(() => {
|
|
1657
|
+
if (!C || !h)
|
|
1639
1658
|
return;
|
|
1640
1659
|
const S = (w) => {
|
|
1641
|
-
var x,
|
|
1660
|
+
var x, O;
|
|
1642
1661
|
const L = w.target;
|
|
1643
|
-
L instanceof Node && ((x = m.current) != null && x.contains(L) || (
|
|
1662
|
+
L instanceof Node && ((x = m.current) != null && x.contains(L) || (O = v.current) != null && O.contains(L) || h());
|
|
1644
1663
|
};
|
|
1645
1664
|
return document.addEventListener("pointerdown", S, !0), document.addEventListener("mousedown", S, !0), document.addEventListener("click", S, !0), () => {
|
|
1646
1665
|
document.removeEventListener("pointerdown", S, !0), document.removeEventListener("mousedown", S, !0), document.removeEventListener("click", S, !0);
|
|
1647
1666
|
};
|
|
1648
|
-
}, [h,
|
|
1667
|
+
}, [h, C]);
|
|
1649
1668
|
const l = I(
|
|
1650
|
-
() =>
|
|
1669
|
+
() => St(o.queries),
|
|
1651
1670
|
[o.queries]
|
|
1652
1671
|
), b = I(
|
|
1653
|
-
() =>
|
|
1672
|
+
() => Pe(o.queries),
|
|
1654
1673
|
[o.queries]
|
|
1655
|
-
), K =
|
|
1656
|
-
() =>
|
|
1674
|
+
), K = sn(l), T = I(
|
|
1675
|
+
() => an(o.queries, f),
|
|
1657
1676
|
[o.queries, f]
|
|
1658
1677
|
), N = I(
|
|
1659
|
-
() =>
|
|
1678
|
+
() => ln(T),
|
|
1660
1679
|
[T]
|
|
1661
1680
|
), $ = I(
|
|
1662
|
-
() =>
|
|
1681
|
+
() => kr(T, u == null ? void 0 : u.focus) || T[0],
|
|
1663
1682
|
[T, u == null ? void 0 : u.focus]
|
|
1664
1683
|
);
|
|
1665
|
-
return !o.enabled || !u ? null : /* @__PURE__ */ p(
|
|
1684
|
+
return !o.enabled || !u ? null : /* @__PURE__ */ p(vr, { children: [
|
|
1666
1685
|
/* @__PURE__ */ p(
|
|
1667
1686
|
"button",
|
|
1668
1687
|
{
|
|
@@ -1673,8 +1692,8 @@ function Bt({
|
|
|
1673
1692
|
className: n ? `${R} ${n}` : R,
|
|
1674
1693
|
style: {
|
|
1675
1694
|
...s.launcher,
|
|
1676
|
-
...
|
|
1677
|
-
...
|
|
1695
|
+
...Ct(e),
|
|
1696
|
+
...Tt(l.severity),
|
|
1678
1697
|
...i
|
|
1679
1698
|
},
|
|
1680
1699
|
onClick: () => {
|
|
@@ -1689,7 +1708,7 @@ function Bt({
|
|
|
1689
1708
|
);
|
|
1690
1709
|
},
|
|
1691
1710
|
children: [
|
|
1692
|
-
/* @__PURE__ */ a(
|
|
1711
|
+
/* @__PURE__ */ a(Mt, {}),
|
|
1693
1712
|
/* @__PURE__ */ a("span", { style: s.launcherText, children: l.total }),
|
|
1694
1713
|
l.issueCount > 0 ? /* @__PURE__ */ p("span", { style: s.launcherIssueCount, children: [
|
|
1695
1714
|
l.issueCount,
|
|
@@ -1709,7 +1728,7 @@ function Bt({
|
|
|
1709
1728
|
className: R,
|
|
1710
1729
|
style: {
|
|
1711
1730
|
...s.panel,
|
|
1712
|
-
...
|
|
1731
|
+
...kt(t),
|
|
1713
1732
|
...c ? s.panelFullscreen : null
|
|
1714
1733
|
},
|
|
1715
1734
|
children: [
|
|
@@ -1739,8 +1758,8 @@ function Bt({
|
|
|
1739
1758
|
"aria-label": c ? "Exit fullscreen Semaphor Inspector" : "Enter fullscreen Semaphor Inspector",
|
|
1740
1759
|
title: c ? "Exit fullscreen Semaphor Inspector" : "Enter fullscreen Semaphor Inspector",
|
|
1741
1760
|
style: s.iconButton,
|
|
1742
|
-
onClick: () =>
|
|
1743
|
-
children: c ? /* @__PURE__ */ a(
|
|
1761
|
+
onClick: () => g((S) => !S),
|
|
1762
|
+
children: c ? /* @__PURE__ */ a(tt, { size: 15 }) : /* @__PURE__ */ a(nt, { size: 15 })
|
|
1744
1763
|
}
|
|
1745
1764
|
),
|
|
1746
1765
|
/* @__PURE__ */ a(
|
|
@@ -1750,13 +1769,13 @@ function Bt({
|
|
|
1750
1769
|
"aria-label": "Close Semaphor Inspector",
|
|
1751
1770
|
style: s.iconButton,
|
|
1752
1771
|
onClick: u.closeDevtools,
|
|
1753
|
-
children: /* @__PURE__ */ a(
|
|
1772
|
+
children: /* @__PURE__ */ a(at, { size: 15 })
|
|
1754
1773
|
}
|
|
1755
1774
|
)
|
|
1756
1775
|
] })
|
|
1757
1776
|
] }),
|
|
1758
1777
|
/* @__PURE__ */ p("label", { style: s.searchBox, children: [
|
|
1759
|
-
/* @__PURE__ */ a(
|
|
1778
|
+
/* @__PURE__ */ a(it, { size: 14 }),
|
|
1760
1779
|
/* @__PURE__ */ a(
|
|
1761
1780
|
"input",
|
|
1762
1781
|
{
|
|
@@ -1769,7 +1788,7 @@ function Bt({
|
|
|
1769
1788
|
)
|
|
1770
1789
|
] }),
|
|
1771
1790
|
b.length ? /* @__PURE__ */ a(
|
|
1772
|
-
|
|
1791
|
+
Ht,
|
|
1773
1792
|
{
|
|
1774
1793
|
issues: b,
|
|
1775
1794
|
onSelect: (S) => u.focusTrace({
|
|
@@ -1784,7 +1803,7 @@ function Bt({
|
|
|
1784
1803
|
{
|
|
1785
1804
|
style: {
|
|
1786
1805
|
...s.panelBody,
|
|
1787
|
-
...
|
|
1806
|
+
...Et(t)
|
|
1788
1807
|
},
|
|
1789
1808
|
children: [
|
|
1790
1809
|
/* @__PURE__ */ a(
|
|
@@ -1792,7 +1811,7 @@ function Bt({
|
|
|
1792
1811
|
{
|
|
1793
1812
|
style: {
|
|
1794
1813
|
...s.queryList,
|
|
1795
|
-
...
|
|
1814
|
+
...Rt()
|
|
1796
1815
|
},
|
|
1797
1816
|
"aria-label": "Registered queries",
|
|
1798
1817
|
children: T.length ? N.map((S) => /* @__PURE__ */ p("div", { style: s.queryGroup, children: [
|
|
@@ -1802,12 +1821,12 @@ function Bt({
|
|
|
1802
1821
|
] }),
|
|
1803
1822
|
S.traces.length ? S.traces.map((w) => {
|
|
1804
1823
|
var ne;
|
|
1805
|
-
const L =
|
|
1824
|
+
const L = un(w, $), x = xe(w), O = Lr(w), pe = $r(w), re = fn(w, x, pe), te = re.join(" · "), k = Er(O), j = vt(b, w);
|
|
1806
1825
|
return /* @__PURE__ */ p(
|
|
1807
1826
|
"button",
|
|
1808
1827
|
{
|
|
1809
1828
|
type: "button",
|
|
1810
|
-
title: `${x} · ${
|
|
1829
|
+
title: `${x} · ${O} · ${te}`,
|
|
1811
1830
|
style: {
|
|
1812
1831
|
...s.queryListItem,
|
|
1813
1832
|
...L ? s.queryListItemSelected : null
|
|
@@ -1819,19 +1838,19 @@ function Bt({
|
|
|
1819
1838
|
}),
|
|
1820
1839
|
children: [
|
|
1821
1840
|
/* @__PURE__ */ p("span", { style: s.queryListItemHeader, children: [
|
|
1822
|
-
/* @__PURE__ */ a(
|
|
1841
|
+
/* @__PURE__ */ a(Pt, { status: (ne = w.latestAttempt) == null ? void 0 : ne.status }),
|
|
1823
1842
|
/* @__PURE__ */ a("span", { style: s.queryListTitle, title: x, children: x }),
|
|
1824
1843
|
/* @__PURE__ */ a(
|
|
1825
1844
|
"span",
|
|
1826
1845
|
{
|
|
1827
1846
|
style: {
|
|
1828
1847
|
...s.queryListKindChip,
|
|
1829
|
-
...
|
|
1848
|
+
...Rr(k)
|
|
1830
1849
|
},
|
|
1831
|
-
children:
|
|
1850
|
+
children: O
|
|
1832
1851
|
}
|
|
1833
1852
|
),
|
|
1834
|
-
|
|
1853
|
+
j > 0 ? /* @__PURE__ */ a("span", { style: s.queryListIssueBadge, children: j }) : null
|
|
1835
1854
|
] }),
|
|
1836
1855
|
/* @__PURE__ */ a(
|
|
1837
1856
|
"span",
|
|
@@ -1839,7 +1858,7 @@ function Bt({
|
|
|
1839
1858
|
className: `${R}-source`,
|
|
1840
1859
|
style: s.queryListSource,
|
|
1841
1860
|
title: te,
|
|
1842
|
-
children: re.map((ie, oe) => /* @__PURE__ */ p(
|
|
1861
|
+
children: re.map((ie, oe) => /* @__PURE__ */ p(Xr, { children: [
|
|
1843
1862
|
oe > 0 ? /* @__PURE__ */ a("span", { style: s.queryListSubtitleSep, children: " · " }) : null,
|
|
1844
1863
|
/* @__PURE__ */ a("span", { children: ie })
|
|
1845
1864
|
] }, `${ie}:${oe}`))
|
|
@@ -1853,7 +1872,7 @@ function Bt({
|
|
|
1853
1872
|
] }, S.title)) : /* @__PURE__ */ a("div", { style: s.emptyState, children: "No matching traces" })
|
|
1854
1873
|
}
|
|
1855
1874
|
),
|
|
1856
|
-
/* @__PURE__ */ a(
|
|
1875
|
+
/* @__PURE__ */ a(Ft, { trace: $ })
|
|
1857
1876
|
]
|
|
1858
1877
|
}
|
|
1859
1878
|
)
|
|
@@ -1862,7 +1881,7 @@ function Bt({
|
|
|
1862
1881
|
) : null
|
|
1863
1882
|
] });
|
|
1864
1883
|
}
|
|
1865
|
-
function
|
|
1884
|
+
function Zi({
|
|
1866
1885
|
queryId: e,
|
|
1867
1886
|
viewId: r,
|
|
1868
1887
|
label: t,
|
|
@@ -1870,12 +1889,12 @@ function Qi({
|
|
|
1870
1889
|
style: i
|
|
1871
1890
|
} = {}) {
|
|
1872
1891
|
var m, v;
|
|
1873
|
-
const o =
|
|
1892
|
+
const o = Tr(), u = Q(Qe), f = Q(Ue);
|
|
1874
1893
|
B(() => {
|
|
1875
|
-
|
|
1894
|
+
qr();
|
|
1876
1895
|
}, []);
|
|
1877
1896
|
const d = r || (f == null ? void 0 : f.id), c = I(
|
|
1878
|
-
() =>
|
|
1897
|
+
() => dn(o.queries, {
|
|
1879
1898
|
queryId: e,
|
|
1880
1899
|
viewId: d
|
|
1881
1900
|
}),
|
|
@@ -1887,17 +1906,17 @@ function Qi({
|
|
|
1887
1906
|
);
|
|
1888
1907
|
if (!o.enabled || !u || !c)
|
|
1889
1908
|
return null;
|
|
1890
|
-
const
|
|
1909
|
+
const g = t || `Inspect ${pn(c, !!e)}`;
|
|
1891
1910
|
return /* @__PURE__ */ p(
|
|
1892
1911
|
"button",
|
|
1893
1912
|
{
|
|
1894
1913
|
type: "button",
|
|
1895
|
-
"aria-label":
|
|
1896
|
-
title:
|
|
1914
|
+
"aria-label": g,
|
|
1915
|
+
title: g,
|
|
1897
1916
|
className: n ? `${R} ${n}` : R,
|
|
1898
1917
|
style: {
|
|
1899
1918
|
...s.inspectButton,
|
|
1900
|
-
...
|
|
1919
|
+
...Lt((m = c.latestAttempt) == null ? void 0 : m.status),
|
|
1901
1920
|
...i
|
|
1902
1921
|
},
|
|
1903
1922
|
onClick: () => u.openDevtools({
|
|
@@ -1906,17 +1925,17 @@ function Qi({
|
|
|
1906
1925
|
viewId: c.viewId
|
|
1907
1926
|
}),
|
|
1908
1927
|
children: [
|
|
1909
|
-
/* @__PURE__ */ a(
|
|
1928
|
+
/* @__PURE__ */ a(ot, { size: 13 }),
|
|
1910
1929
|
/* @__PURE__ */ a("span", { style: s.inspectButtonText, children: ((v = c.latestAttempt) == null ? void 0 : v.status) || "idle" })
|
|
1911
1930
|
]
|
|
1912
1931
|
}
|
|
1913
1932
|
);
|
|
1914
1933
|
}
|
|
1915
|
-
function
|
|
1916
|
-
const e = Q(
|
|
1917
|
-
return !e || !e.state.enabled ?
|
|
1934
|
+
function Tr() {
|
|
1935
|
+
const e = Q(Ve);
|
|
1936
|
+
return !e || !e.state.enabled ? Ar : de(e.state);
|
|
1918
1937
|
}
|
|
1919
|
-
function
|
|
1938
|
+
function Nt({
|
|
1920
1939
|
spec: e,
|
|
1921
1940
|
queryKind: r,
|
|
1922
1941
|
queryKey: t,
|
|
@@ -1924,73 +1943,73 @@ function Kt({
|
|
|
1924
1943
|
activeInputs: i,
|
|
1925
1944
|
debug: o
|
|
1926
1945
|
}) {
|
|
1927
|
-
const u = Q(
|
|
1946
|
+
const u = Q(Ve), f = Q(Ue), d = !!(u != null && u.state.enabled), c = u == null ? void 0 : u.dispatch, g = Nn(e), m = yt(e), v = I(
|
|
1928
1947
|
() => JSON.stringify(e),
|
|
1929
1948
|
[e]
|
|
1930
|
-
),
|
|
1949
|
+
), y = I(
|
|
1931
1950
|
() => JSON.stringify(i || []),
|
|
1932
1951
|
[i]
|
|
1933
1952
|
), h = I(
|
|
1934
1953
|
() => JSON.stringify(n || null),
|
|
1935
1954
|
[n]
|
|
1936
|
-
),
|
|
1937
|
-
l.current !== v && (l.current = v,
|
|
1938
|
-
const x =
|
|
1939
|
-
() =>
|
|
1940
|
-
[t,
|
|
1941
|
-
),
|
|
1955
|
+
), C = E(e), l = E(v), b = E(n), K = E(h), T = E(i), N = E(y), $ = _n(o), S = JSON.stringify($ || []), w = E($), L = E(S);
|
|
1956
|
+
l.current !== v && (l.current = v, C.current = e), K.current !== h && (K.current = h, b.current = n), N.current !== y && (N.current = y, T.current = i), L.current !== S && (L.current = S, w.current = $);
|
|
1957
|
+
const x = C.current, O = b.current, pe = T.current, re = w.current, te = Sr(), k = I(
|
|
1958
|
+
() => g || `query_${Kr(t)}`,
|
|
1959
|
+
[t, g]
|
|
1960
|
+
), j = (o == null ? void 0 : o.viewId) || (f == null ? void 0 : f.id), ne = (o == null ? void 0 : o.viewTitle) || (o == null ? void 0 : o.title) || (f == null ? void 0 : f.title), ie = o == null ? void 0 : o.visualType, oe = o == null ? void 0 : o.sectionTitle, H = I(
|
|
1942
1961
|
() => [
|
|
1943
|
-
|
|
1962
|
+
j || "unscoped-view",
|
|
1944
1963
|
k,
|
|
1945
1964
|
te
|
|
1946
1965
|
].join("::"),
|
|
1947
|
-
[k, te,
|
|
1948
|
-
),
|
|
1966
|
+
[k, te, j]
|
|
1967
|
+
), Ze = I(
|
|
1949
1968
|
() => ({
|
|
1950
|
-
traceKey:
|
|
1969
|
+
traceKey: H,
|
|
1951
1970
|
spec: x,
|
|
1952
1971
|
queryId: k,
|
|
1953
1972
|
queryLabel: m,
|
|
1954
1973
|
queryKind: r,
|
|
1955
|
-
builder:
|
|
1956
|
-
viewId:
|
|
1974
|
+
builder: Mn(r),
|
|
1975
|
+
viewId: j,
|
|
1957
1976
|
viewTitle: ne,
|
|
1958
1977
|
visualType: ie,
|
|
1959
1978
|
sectionTitle: oe,
|
|
1960
1979
|
sourceHints: re,
|
|
1961
|
-
intent:
|
|
1980
|
+
intent: O,
|
|
1962
1981
|
activeInputs: pe,
|
|
1963
|
-
clientWarnings:
|
|
1982
|
+
clientWarnings: g ? [] : ["Query spec is missing an explicit id; using an opaque internal id."]
|
|
1964
1983
|
}),
|
|
1965
1984
|
[
|
|
1966
1985
|
k,
|
|
1967
1986
|
r,
|
|
1968
|
-
|
|
1987
|
+
g,
|
|
1969
1988
|
m,
|
|
1970
1989
|
x,
|
|
1971
1990
|
pe,
|
|
1972
|
-
|
|
1991
|
+
O,
|
|
1973
1992
|
re,
|
|
1974
1993
|
oe,
|
|
1994
|
+
H,
|
|
1975
1995
|
j,
|
|
1976
|
-
M,
|
|
1977
1996
|
ne,
|
|
1978
1997
|
ie
|
|
1979
1998
|
]
|
|
1980
1999
|
);
|
|
1981
2000
|
B(() => {
|
|
1982
2001
|
if (!(!d || !c))
|
|
1983
|
-
return c({ type: "register", descriptor:
|
|
1984
|
-
c({ type: "unregister", traceKey:
|
|
2002
|
+
return c({ type: "register", descriptor: Ze }), () => {
|
|
2003
|
+
c({ type: "unregister", traceKey: H });
|
|
1985
2004
|
};
|
|
1986
|
-
}, [
|
|
1987
|
-
const
|
|
1988
|
-
(
|
|
1989
|
-
!d || !c || c({ type: "event", traceKey:
|
|
2005
|
+
}, [Ze, c, d, H]);
|
|
2006
|
+
const M = D(
|
|
2007
|
+
(q, U) => {
|
|
2008
|
+
!d || !c || c({ type: "event", traceKey: H, event: q, latestAttempt: U });
|
|
1990
2009
|
},
|
|
1991
|
-
[c, d,
|
|
1992
|
-
),
|
|
1993
|
-
|
|
2010
|
+
[c, d, H]
|
|
2011
|
+
), er = D(() => {
|
|
2012
|
+
M(
|
|
1994
2013
|
{
|
|
1995
2014
|
type: "query_started",
|
|
1996
2015
|
queryId: k,
|
|
@@ -1998,10 +2017,10 @@ function Kt({
|
|
|
1998
2017
|
},
|
|
1999
2018
|
{ status: "loading" }
|
|
2000
2019
|
);
|
|
2001
|
-
}, [
|
|
2002
|
-
(
|
|
2003
|
-
const se =
|
|
2004
|
-
|
|
2020
|
+
}, [M, k]), rr = D(
|
|
2021
|
+
(q, U) => {
|
|
2022
|
+
const se = gr(q), ae = Un(q), zr = Gn(q), ir = pr(q);
|
|
2023
|
+
M(
|
|
2005
2024
|
{
|
|
2006
2025
|
type: "query_succeeded",
|
|
2007
2026
|
queryId: k,
|
|
@@ -2015,17 +2034,21 @@ function Kt({
|
|
|
2015
2034
|
status: "success",
|
|
2016
2035
|
durationMs: U,
|
|
2017
2036
|
rowCount: ae,
|
|
2018
|
-
columnCount:
|
|
2019
|
-
metricCoverage:
|
|
2020
|
-
|
|
2037
|
+
columnCount: zr,
|
|
2038
|
+
metricCoverage: Jn(q),
|
|
2039
|
+
resultPreview: He(
|
|
2040
|
+
ir,
|
|
2041
|
+
Yn(q)
|
|
2042
|
+
),
|
|
2043
|
+
executionResult: ir
|
|
2021
2044
|
}
|
|
2022
2045
|
);
|
|
2023
2046
|
},
|
|
2024
|
-
[
|
|
2025
|
-
), ge =
|
|
2026
|
-
(
|
|
2027
|
-
const se =
|
|
2028
|
-
|
|
2047
|
+
[M, k]
|
|
2048
|
+
), ge = D(
|
|
2049
|
+
(q, U) => {
|
|
2050
|
+
const se = gr(q), ae = q instanceof Error ? q.message : String(q);
|
|
2051
|
+
M(
|
|
2029
2052
|
{
|
|
2030
2053
|
type: "query_failed",
|
|
2031
2054
|
queryId: k,
|
|
@@ -2038,53 +2061,53 @@ function Kt({
|
|
|
2038
2061
|
status: "error",
|
|
2039
2062
|
durationMs: U,
|
|
2040
2063
|
errorMessage: ae,
|
|
2041
|
-
executionResult:
|
|
2064
|
+
executionResult: pr(q)
|
|
2042
2065
|
}
|
|
2043
2066
|
);
|
|
2044
2067
|
},
|
|
2045
|
-
[
|
|
2046
|
-
),
|
|
2047
|
-
(
|
|
2048
|
-
|
|
2068
|
+
[M, k]
|
|
2069
|
+
), tr = D(
|
|
2070
|
+
(q) => {
|
|
2071
|
+
M(
|
|
2049
2072
|
{
|
|
2050
2073
|
type: "query_ignored_stale",
|
|
2051
2074
|
queryId: k,
|
|
2052
2075
|
at: be(),
|
|
2053
|
-
reason:
|
|
2076
|
+
reason: q
|
|
2054
2077
|
}
|
|
2055
2078
|
);
|
|
2056
2079
|
},
|
|
2057
|
-
[
|
|
2058
|
-
),
|
|
2059
|
-
(
|
|
2060
|
-
ge(
|
|
2080
|
+
[M, k]
|
|
2081
|
+
), nr = D(
|
|
2082
|
+
(q) => {
|
|
2083
|
+
ge(q, 0);
|
|
2061
2084
|
},
|
|
2062
2085
|
[ge]
|
|
2063
|
-
),
|
|
2086
|
+
), Ce = d ? u == null ? void 0 : u.state.entries[H] : void 0;
|
|
2064
2087
|
return I(
|
|
2065
2088
|
() => ({
|
|
2066
2089
|
enabled: d,
|
|
2067
2090
|
queryId: k,
|
|
2068
|
-
trace:
|
|
2069
|
-
start:
|
|
2070
|
-
success:
|
|
2091
|
+
trace: Ce ? ve(Ce) : void 0,
|
|
2092
|
+
start: er,
|
|
2093
|
+
success: rr,
|
|
2071
2094
|
failure: ge,
|
|
2072
|
-
ignored:
|
|
2073
|
-
validationFailure:
|
|
2095
|
+
ignored: tr,
|
|
2096
|
+
validationFailure: nr
|
|
2074
2097
|
}),
|
|
2075
2098
|
[
|
|
2076
2099
|
d,
|
|
2077
2100
|
ge,
|
|
2078
|
-
|
|
2101
|
+
tr,
|
|
2079
2102
|
k,
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2103
|
+
er,
|
|
2104
|
+
rr,
|
|
2105
|
+
Ce,
|
|
2106
|
+
nr
|
|
2084
2107
|
]
|
|
2085
2108
|
);
|
|
2086
2109
|
}
|
|
2087
|
-
function
|
|
2110
|
+
function Mt() {
|
|
2088
2111
|
return /* @__PURE__ */ a("span", { style: s.logoMark, "aria-hidden": !0, children: /* @__PURE__ */ p(
|
|
2089
2112
|
"svg",
|
|
2090
2113
|
{
|
|
@@ -2102,7 +2125,7 @@ function Wt() {
|
|
|
2102
2125
|
}
|
|
2103
2126
|
) });
|
|
2104
2127
|
}
|
|
2105
|
-
function
|
|
2128
|
+
function Ft({
|
|
2106
2129
|
trace: e
|
|
2107
2130
|
}) {
|
|
2108
2131
|
var $, S, w, L, x;
|
|
@@ -2110,11 +2133,11 @@ function _t({
|
|
|
2110
2133
|
return /* @__PURE__ */ a("div", { style: s.detailsPane, children: /* @__PURE__ */ a("div", { style: s.emptyState, children: "No traces registered yet" }) });
|
|
2111
2134
|
const r = e.latestAttempt, t = r == null ? void 0 : r.executionResult, n = $e(
|
|
2112
2135
|
($ = t == null ? void 0 : t.validation) == null ? void 0 : $.warnings
|
|
2113
|
-
), i = $e((S = t == null ? void 0 : t.validation) == null ? void 0 : S.errors), o =
|
|
2136
|
+
), i = $e((S = t == null ? void 0 : t.validation) == null ? void 0 : S.errors), o = Cn(
|
|
2114
2137
|
(w = t == null ? void 0 : t.coverage) == null ? void 0 : w.missingObligations
|
|
2115
2138
|
), u = $e(
|
|
2116
2139
|
(L = t == null ? void 0 : t.coverage) == null ? void 0 : L.warnings
|
|
2117
|
-
), f = t == null ? void 0 : t.compiledQuery, d =
|
|
2140
|
+
), f = t == null ? void 0 : t.compiledQuery, d = En(t), c = ((x = e.server) == null ? void 0 : x.compiledSql) || d.compiledSql, g = (r == null ? void 0 : r.resultPreview) || He(t), m = [
|
|
2118
2141
|
...r != null && r.errorMessage ? [r.errorMessage] : [],
|
|
2119
2142
|
...i
|
|
2120
2143
|
], v = [
|
|
@@ -2122,7 +2145,7 @@ function _t({
|
|
|
2122
2145
|
...n,
|
|
2123
2146
|
...o,
|
|
2124
2147
|
...u
|
|
2125
|
-
],
|
|
2148
|
+
], y = e.inputsApplied.length > 0, h = !!(f || c), C = yn(e), l = Sn(r == null ? void 0 : r.rowCount), b = wn(r == null ? void 0 : r.durationMs), K = e.sourceRefs.length, T = Lr(e), N = Er(T);
|
|
2126
2149
|
return /* @__PURE__ */ p("div", { style: s.detailsPane, children: [
|
|
2127
2150
|
/* @__PURE__ */ p("div", { style: s.detailsHeader, children: [
|
|
2128
2151
|
/* @__PURE__ */ p("div", { style: s.detailsHeaderTopRow, children: [
|
|
@@ -2132,7 +2155,7 @@ function _t({
|
|
|
2132
2155
|
"aria-hidden": !0,
|
|
2133
2156
|
style: {
|
|
2134
2157
|
...s.detailsHeaderStatusDot,
|
|
2135
|
-
...
|
|
2158
|
+
...xr(r == null ? void 0 : r.status)
|
|
2136
2159
|
}
|
|
2137
2160
|
}
|
|
2138
2161
|
),
|
|
@@ -2142,14 +2165,14 @@ function _t({
|
|
|
2142
2165
|
{
|
|
2143
2166
|
style: {
|
|
2144
2167
|
...s.detailsKindChip,
|
|
2145
|
-
...
|
|
2168
|
+
...Rr(N)
|
|
2146
2169
|
},
|
|
2147
2170
|
children: T
|
|
2148
2171
|
}
|
|
2149
2172
|
)
|
|
2150
2173
|
] }),
|
|
2151
2174
|
/* @__PURE__ */ p("div", { style: s.metaStrip, children: [
|
|
2152
|
-
/* @__PURE__ */ a("span", { style: s.metaStripItem, children:
|
|
2175
|
+
/* @__PURE__ */ a("span", { style: s.metaStripItem, children: C }),
|
|
2153
2176
|
/* @__PURE__ */ a("span", { style: s.metaStripDot, children: "·" }),
|
|
2154
2177
|
/* @__PURE__ */ p("span", { style: s.metaStripItem, children: [
|
|
2155
2178
|
l,
|
|
@@ -2157,21 +2180,21 @@ function _t({
|
|
|
2157
2180
|
] }),
|
|
2158
2181
|
/* @__PURE__ */ a("span", { style: s.metaStripDot, children: "·" }),
|
|
2159
2182
|
/* @__PURE__ */ a("span", { style: s.metaStripItem, children: b }),
|
|
2160
|
-
K > 0 ? /* @__PURE__ */ p(
|
|
2183
|
+
K > 0 ? /* @__PURE__ */ p(vr, { children: [
|
|
2161
2184
|
/* @__PURE__ */ a("span", { style: s.metaStripDot, children: "·" }),
|
|
2162
2185
|
/* @__PURE__ */ a("span", { style: s.metaStripItem, children: K === 1 ? "1 source" : `${K} sources` })
|
|
2163
2186
|
] }) : null
|
|
2164
2187
|
] })
|
|
2165
2188
|
] }),
|
|
2166
|
-
m.length ? /* @__PURE__ */ a(
|
|
2167
|
-
v.length ? /* @__PURE__ */ a(
|
|
2168
|
-
/* @__PURE__ */ a(
|
|
2169
|
-
|
|
2189
|
+
m.length ? /* @__PURE__ */ a(lr, { tone: "error", title: "Error", items: m }) : null,
|
|
2190
|
+
v.length ? /* @__PURE__ */ a(lr, { tone: "warning", title: "Warnings", items: v }) : null,
|
|
2191
|
+
/* @__PURE__ */ a(Vt, { trace: e }),
|
|
2192
|
+
y ? /* @__PURE__ */ a(en, { inputs: e.inputsApplied }) : null,
|
|
2170
2193
|
/* @__PURE__ */ a(
|
|
2171
|
-
|
|
2194
|
+
zt,
|
|
2172
2195
|
{
|
|
2173
2196
|
trace: e,
|
|
2174
|
-
resultPreview:
|
|
2197
|
+
resultPreview: g,
|
|
2175
2198
|
compiledQuery: f,
|
|
2176
2199
|
compiledSql: c,
|
|
2177
2200
|
hasCompiled: h
|
|
@@ -2179,24 +2202,24 @@ function _t({
|
|
|
2179
2202
|
)
|
|
2180
2203
|
] });
|
|
2181
2204
|
}
|
|
2182
|
-
function
|
|
2205
|
+
function zt({
|
|
2183
2206
|
trace: e,
|
|
2184
2207
|
resultPreview: r,
|
|
2185
2208
|
compiledQuery: t,
|
|
2186
2209
|
compiledSql: n,
|
|
2187
2210
|
hasCompiled: i
|
|
2188
2211
|
}) {
|
|
2189
|
-
var h,
|
|
2212
|
+
var h, C;
|
|
2190
2213
|
const o = [];
|
|
2191
2214
|
r && o.push({
|
|
2192
2215
|
id: "returned",
|
|
2193
2216
|
label: "Returned",
|
|
2194
|
-
render: () => /* @__PURE__ */ a(
|
|
2217
|
+
render: () => /* @__PURE__ */ a(rn, { preview: r })
|
|
2195
2218
|
}), i && o.push({
|
|
2196
2219
|
id: "compiled",
|
|
2197
2220
|
label: "Compiled",
|
|
2198
2221
|
render: () => /* @__PURE__ */ a(
|
|
2199
|
-
|
|
2222
|
+
tn,
|
|
2200
2223
|
{
|
|
2201
2224
|
compiledQuery: t,
|
|
2202
2225
|
compiledSql: n
|
|
@@ -2205,24 +2228,24 @@ function Nt({
|
|
|
2205
2228
|
}), (e.sourceRefs.length || e.fieldRefs.length) && o.push({
|
|
2206
2229
|
id: "lineage",
|
|
2207
2230
|
label: "Sources",
|
|
2208
|
-
render: () => /* @__PURE__ */ a(
|
|
2231
|
+
render: () => /* @__PURE__ */ a(Gt, { trace: e })
|
|
2209
2232
|
}), (h = e.sourceHints) != null && h.length && o.push({
|
|
2210
2233
|
id: "hints",
|
|
2211
2234
|
label: "Hints",
|
|
2212
|
-
render: () => /* @__PURE__ */ a(
|
|
2235
|
+
render: () => /* @__PURE__ */ a(Jt, { hints: e.sourceHints ?? [] })
|
|
2213
2236
|
}), o.push({
|
|
2214
2237
|
id: "lifecycle",
|
|
2215
2238
|
label: "Lifecycle",
|
|
2216
|
-
render: () => /* @__PURE__ */ a(
|
|
2239
|
+
render: () => /* @__PURE__ */ a(jt, { trace: e })
|
|
2217
2240
|
}), o.push({
|
|
2218
2241
|
id: "raw",
|
|
2219
2242
|
label: "Raw",
|
|
2220
|
-
render: () => /* @__PURE__ */ a("pre", { style: s.codeBlock, children:
|
|
2243
|
+
render: () => /* @__PURE__ */ a("pre", { style: s.codeBlock, children: In(e) })
|
|
2221
2244
|
});
|
|
2222
|
-
const u = (
|
|
2245
|
+
const u = (C = o[0]) == null ? void 0 : C.id, f = e.traceId || `${e.viewId ?? ""}:${e.queryId}`, [d, c] = z(u), g = E(f), m = E(!1), v = o.map((l) => l.id).join("|");
|
|
2223
2246
|
B(() => {
|
|
2224
|
-
if (
|
|
2225
|
-
|
|
2247
|
+
if (g.current !== f) {
|
|
2248
|
+
g.current = f, m.current = !1, c(u);
|
|
2226
2249
|
return;
|
|
2227
2250
|
}
|
|
2228
2251
|
if (!(d ? v.split("|").includes(d) : !1)) {
|
|
@@ -2231,10 +2254,10 @@ function Nt({
|
|
|
2231
2254
|
}
|
|
2232
2255
|
!m.current && d !== u && c(u);
|
|
2233
2256
|
}, [d, u, v, f]);
|
|
2234
|
-
const
|
|
2257
|
+
const y = o.find((l) => l.id === d) ?? o[0];
|
|
2235
2258
|
return /* @__PURE__ */ p("div", { style: s.traceTabs, children: [
|
|
2236
2259
|
/* @__PURE__ */ a("div", { style: s.traceTabBar, role: "tablist", "aria-label": "Trace details", children: o.map((l) => {
|
|
2237
|
-
const b = l.id ===
|
|
2260
|
+
const b = l.id === y.id;
|
|
2238
2261
|
return /* @__PURE__ */ a(
|
|
2239
2262
|
"button",
|
|
2240
2263
|
{
|
|
@@ -2254,18 +2277,18 @@ function Nt({
|
|
|
2254
2277
|
l.id
|
|
2255
2278
|
);
|
|
2256
2279
|
}) }),
|
|
2257
|
-
/* @__PURE__ */ a("div", { style: s.traceTabPanel, role: "tabpanel", children:
|
|
2280
|
+
/* @__PURE__ */ a("div", { style: s.traceTabPanel, role: "tabpanel", children: y.render() })
|
|
2258
2281
|
] });
|
|
2259
2282
|
}
|
|
2260
|
-
function
|
|
2283
|
+
function jt({
|
|
2261
2284
|
trace: e
|
|
2262
2285
|
}) {
|
|
2263
2286
|
return e.recentEvents.length ? /* @__PURE__ */ a("div", { style: s.eventList, children: e.recentEvents.slice(-5).map((r, t) => /* @__PURE__ */ p("div", { style: s.eventRow, children: [
|
|
2264
|
-
/* @__PURE__ */ a("span", { style: s.eventType, children:
|
|
2265
|
-
/* @__PURE__ */ a("span", { style: s.eventMeta, children:
|
|
2287
|
+
/* @__PURE__ */ a("span", { style: s.eventType, children: xn(r) }),
|
|
2288
|
+
/* @__PURE__ */ a("span", { style: s.eventMeta, children: qn(r) })
|
|
2266
2289
|
] }, `${r.type}:${r.at}:${t}`)) }) : /* @__PURE__ */ a("div", { style: s.mutedText, children: "No attempts recorded" });
|
|
2267
2290
|
}
|
|
2268
|
-
function
|
|
2291
|
+
function lr({
|
|
2269
2292
|
tone: e,
|
|
2270
2293
|
title: r,
|
|
2271
2294
|
items: t
|
|
@@ -2276,7 +2299,7 @@ function or({
|
|
|
2276
2299
|
t.length > 1 ? /* @__PURE__ */ a("ul", { style: s.alertCardList, children: t.map((i, o) => /* @__PURE__ */ a("li", { children: i }, `${e}-${o}`)) }) : /* @__PURE__ */ a("div", { children: t[0] })
|
|
2277
2300
|
] });
|
|
2278
2301
|
}
|
|
2279
|
-
function
|
|
2302
|
+
function Ht({
|
|
2280
2303
|
issues: e,
|
|
2281
2304
|
onSelect: r
|
|
2282
2305
|
}) {
|
|
@@ -2294,7 +2317,7 @@ function Ft({
|
|
|
2294
2317
|
onClick: () => n((c) => !c),
|
|
2295
2318
|
children: [
|
|
2296
2319
|
/* @__PURE__ */ p("span", { style: s.issueSummaryHeaderLabel, children: [
|
|
2297
|
-
t ? /* @__PURE__ */ a(
|
|
2320
|
+
t ? /* @__PURE__ */ a(lt, { size: 13 }) : /* @__PURE__ */ a(st, { size: 13 }),
|
|
2298
2321
|
/* @__PURE__ */ a("span", { children: "Issues" })
|
|
2299
2322
|
] }),
|
|
2300
2323
|
/* @__PURE__ */ a("span", { style: s.issueSummaryCount, children: e.length })
|
|
@@ -2302,7 +2325,7 @@ function Ft({
|
|
|
2302
2325
|
}
|
|
2303
2326
|
),
|
|
2304
2327
|
t ? /* @__PURE__ */ p("div", { style: s.issueSummaryList, children: [
|
|
2305
|
-
i.map((c,
|
|
2328
|
+
i.map((c, g) => /* @__PURE__ */ p(
|
|
2306
2329
|
"button",
|
|
2307
2330
|
{
|
|
2308
2331
|
type: "button",
|
|
@@ -2326,7 +2349,7 @@ function Ft({
|
|
|
2326
2349
|
] })
|
|
2327
2350
|
]
|
|
2328
2351
|
},
|
|
2329
|
-
`${c.trace.traceId}:${c.title}:${
|
|
2352
|
+
`${c.trace.traceId}:${c.title}:${g}`
|
|
2330
2353
|
)),
|
|
2331
2354
|
o > 0 ? /* @__PURE__ */ p("div", { style: s.issueSummaryMore, children: [
|
|
2332
2355
|
o,
|
|
@@ -2340,7 +2363,7 @@ function Ft({
|
|
|
2340
2363
|
] })
|
|
2341
2364
|
] });
|
|
2342
2365
|
}
|
|
2343
|
-
function
|
|
2366
|
+
function Pt({
|
|
2344
2367
|
status: e
|
|
2345
2368
|
}) {
|
|
2346
2369
|
return /* @__PURE__ */ a(
|
|
@@ -2349,32 +2372,32 @@ function zt({
|
|
|
2349
2372
|
"aria-hidden": !0,
|
|
2350
2373
|
style: {
|
|
2351
2374
|
...s.statusDot,
|
|
2352
|
-
...
|
|
2375
|
+
...xr(e)
|
|
2353
2376
|
}
|
|
2354
2377
|
}
|
|
2355
2378
|
);
|
|
2356
2379
|
}
|
|
2357
|
-
function
|
|
2380
|
+
function Vt({
|
|
2358
2381
|
trace: e
|
|
2359
2382
|
}) {
|
|
2360
2383
|
var i;
|
|
2361
|
-
const r = (i = e.projectionFieldRefs) != null && i.length ? e.projectionFieldRefs : e.fieldRefs, t = e.inputFieldRefs || [], n =
|
|
2384
|
+
const r = (i = e.projectionFieldRefs) != null && i.length ? e.projectionFieldRefs : e.fieldRefs, t = e.inputFieldRefs || [], n = mn(r);
|
|
2362
2385
|
return /* @__PURE__ */ p("div", { style: s.recipe, children: [
|
|
2363
|
-
/* @__PURE__ */ a(
|
|
2364
|
-
/* @__PURE__ */ a(
|
|
2365
|
-
/* @__PURE__ */ a(
|
|
2386
|
+
/* @__PURE__ */ a(Qt, { sources: e.sourceRefs }),
|
|
2387
|
+
/* @__PURE__ */ a(P, { title: "Measures", fields: n.measures }),
|
|
2388
|
+
/* @__PURE__ */ a(P, { title: "Time fields", fields: n.timeFields }),
|
|
2366
2389
|
/* @__PURE__ */ a(
|
|
2367
|
-
|
|
2390
|
+
P,
|
|
2368
2391
|
{
|
|
2369
2392
|
title: "Dimensions",
|
|
2370
2393
|
fields: n.dimensions,
|
|
2371
2394
|
emptyText: "No dimensions selected"
|
|
2372
2395
|
}
|
|
2373
2396
|
),
|
|
2374
|
-
/* @__PURE__ */ a(
|
|
2375
|
-
/* @__PURE__ */ a(
|
|
2397
|
+
/* @__PURE__ */ a(P, { title: "Identifiers", fields: n.identifiers }),
|
|
2398
|
+
/* @__PURE__ */ a(P, { title: "Other fields", fields: n.other }),
|
|
2376
2399
|
/* @__PURE__ */ a(
|
|
2377
|
-
|
|
2400
|
+
P,
|
|
2378
2401
|
{
|
|
2379
2402
|
title: "Input bindings (Filters)",
|
|
2380
2403
|
fields: t
|
|
@@ -2382,7 +2405,7 @@ function Mt({
|
|
|
2382
2405
|
)
|
|
2383
2406
|
] });
|
|
2384
2407
|
}
|
|
2385
|
-
function
|
|
2408
|
+
function Qt({
|
|
2386
2409
|
sources: e
|
|
2387
2410
|
}) {
|
|
2388
2411
|
return e.length ? /* @__PURE__ */ p("div", { style: s.recipeGroup, children: [
|
|
@@ -2391,7 +2414,7 @@ function jt({
|
|
|
2391
2414
|
/* @__PURE__ */ a("span", { style: s.recipeGroupCount, children: e.length })
|
|
2392
2415
|
] }),
|
|
2393
2416
|
/* @__PURE__ */ a("div", { style: s.sourcePillRow, children: e.map((r, t) => /* @__PURE__ */ a(
|
|
2394
|
-
|
|
2417
|
+
Ut,
|
|
2395
2418
|
{
|
|
2396
2419
|
source: r
|
|
2397
2420
|
},
|
|
@@ -2399,20 +2422,20 @@ function jt({
|
|
|
2399
2422
|
)) })
|
|
2400
2423
|
] }) : null;
|
|
2401
2424
|
}
|
|
2402
|
-
function
|
|
2425
|
+
function Ut({ source: e }) {
|
|
2403
2426
|
const r = F(e);
|
|
2404
2427
|
return /* @__PURE__ */ p("span", { style: s.sourcePill, title: r, children: [
|
|
2405
2428
|
/* @__PURE__ */ a("span", { style: s.sourcePillLabel, children: r }),
|
|
2406
2429
|
/* @__PURE__ */ a("span", { style: s.sourcePillRole, children: e.kind })
|
|
2407
2430
|
] });
|
|
2408
2431
|
}
|
|
2409
|
-
function
|
|
2432
|
+
function Gt({
|
|
2410
2433
|
trace: e
|
|
2411
2434
|
}) {
|
|
2412
2435
|
return /* @__PURE__ */ p("div", { style: s.traceLineage, children: [
|
|
2413
|
-
/* @__PURE__ */ a(
|
|
2436
|
+
/* @__PURE__ */ a(Yt, { sources: e.sourceRefs }),
|
|
2414
2437
|
/* @__PURE__ */ a(
|
|
2415
|
-
|
|
2438
|
+
P,
|
|
2416
2439
|
{
|
|
2417
2440
|
title: "All field refs",
|
|
2418
2441
|
fields: e.fieldRefs,
|
|
@@ -2421,11 +2444,11 @@ function Vt({
|
|
|
2421
2444
|
)
|
|
2422
2445
|
] });
|
|
2423
2446
|
}
|
|
2424
|
-
function
|
|
2447
|
+
function Jt({
|
|
2425
2448
|
hints: e
|
|
2426
2449
|
}) {
|
|
2427
2450
|
return /* @__PURE__ */ a("div", { style: s.recipeFieldList, children: e.map((r, t) => {
|
|
2428
|
-
const n =
|
|
2451
|
+
const n = vn(r), i = r.component || r.exportName || n || "Source hint", o = [
|
|
2429
2452
|
r.exportName && r.exportName !== i ? r.exportName : void 0,
|
|
2430
2453
|
n,
|
|
2431
2454
|
r.note
|
|
@@ -2444,7 +2467,7 @@ function Qt({
|
|
|
2444
2467
|
);
|
|
2445
2468
|
}) });
|
|
2446
2469
|
}
|
|
2447
|
-
function
|
|
2470
|
+
function Yt({
|
|
2448
2471
|
sources: e
|
|
2449
2472
|
}) {
|
|
2450
2473
|
return /* @__PURE__ */ p("div", { style: s.recipeGroup, children: [
|
|
@@ -2466,7 +2489,7 @@ function Ut({
|
|
|
2466
2489
|
)) }) : /* @__PURE__ */ a("div", { style: s.recipeEmptyText, children: "No sources captured" })
|
|
2467
2490
|
] });
|
|
2468
2491
|
}
|
|
2469
|
-
function
|
|
2492
|
+
function P({
|
|
2470
2493
|
title: e,
|
|
2471
2494
|
fields: r,
|
|
2472
2495
|
emptyText: t
|
|
@@ -2477,20 +2500,20 @@ function H({
|
|
|
2477
2500
|
/* @__PURE__ */ a("span", { style: s.recipeGroupCount, children: r.length })
|
|
2478
2501
|
] }),
|
|
2479
2502
|
r.length ? /* @__PURE__ */ a("div", { style: s.fieldChipList, children: r.map((n, i) => /* @__PURE__ */ a(
|
|
2480
|
-
|
|
2503
|
+
Xt,
|
|
2481
2504
|
{
|
|
2482
2505
|
field: n,
|
|
2483
2506
|
groupTitle: e
|
|
2484
2507
|
},
|
|
2485
|
-
`${
|
|
2508
|
+
`${Ge(n)}:${i}`
|
|
2486
2509
|
)) }) : /* @__PURE__ */ a("div", { style: s.recipeEmptyText, children: t })
|
|
2487
2510
|
] });
|
|
2488
2511
|
}
|
|
2489
|
-
function
|
|
2512
|
+
function Xt({
|
|
2490
2513
|
field: e,
|
|
2491
2514
|
groupTitle: r
|
|
2492
2515
|
}) {
|
|
2493
|
-
const t =
|
|
2516
|
+
const t = hn(e), n = e.label || e.name, i = e.dataType && e.dataType !== "unknown" ? e.dataType : void 0, o = e.source ? F(e.source) : void 0, u = [t, i, o].filter(Boolean).join(" · "), f = Zt(e, r);
|
|
2494
2517
|
return /* @__PURE__ */ p(
|
|
2495
2518
|
"div",
|
|
2496
2519
|
{
|
|
@@ -2508,7 +2531,7 @@ function Gt({
|
|
|
2508
2531
|
}
|
|
2509
2532
|
);
|
|
2510
2533
|
}
|
|
2511
|
-
function
|
|
2534
|
+
function Zt(e, r) {
|
|
2512
2535
|
const t = e.dataType, n = e.role;
|
|
2513
2536
|
return !!e.aggregate || n === "measure" || r === "Measures" ? {
|
|
2514
2537
|
text: "Σ",
|
|
@@ -2547,7 +2570,7 @@ function Jt(e, r) {
|
|
|
2547
2570
|
}
|
|
2548
2571
|
};
|
|
2549
2572
|
}
|
|
2550
|
-
function
|
|
2573
|
+
function en({
|
|
2551
2574
|
inputs: e
|
|
2552
2575
|
}) {
|
|
2553
2576
|
return /* @__PURE__ */ p("div", { style: s.inputsAppliedBlock, children: [
|
|
@@ -2556,7 +2579,7 @@ function Yt({
|
|
|
2556
2579
|
/* @__PURE__ */ a("span", { style: s.inputsAppliedCount, children: e.length })
|
|
2557
2580
|
] }),
|
|
2558
2581
|
/* @__PURE__ */ a("div", { style: s.inputRecipeList, children: e.map((r) => {
|
|
2559
|
-
const t =
|
|
2582
|
+
const t = bn(r);
|
|
2560
2583
|
return /* @__PURE__ */ p(
|
|
2561
2584
|
"div",
|
|
2562
2585
|
{
|
|
@@ -2577,7 +2600,7 @@ function Yt({
|
|
|
2577
2600
|
}) })
|
|
2578
2601
|
] });
|
|
2579
2602
|
}
|
|
2580
|
-
function
|
|
2603
|
+
function rn({
|
|
2581
2604
|
preview: e
|
|
2582
2605
|
}) {
|
|
2583
2606
|
return /* @__PURE__ */ p("div", { style: s.resultPreview, children: [
|
|
@@ -2587,7 +2610,7 @@ function Xt({
|
|
|
2587
2610
|
] }),
|
|
2588
2611
|
/* @__PURE__ */ a("div", { style: s.resultPreviewScroller, children: /* @__PURE__ */ p("table", { style: s.resultPreviewTable, children: [
|
|
2589
2612
|
/* @__PURE__ */ a("thead", { children: /* @__PURE__ */ a("tr", { children: e.columns.map((r) => /* @__PURE__ */ a("th", { style: s.resultPreviewTh, children: r.label }, r.key)) }) }),
|
|
2590
|
-
/* @__PURE__ */ a("tbody", { children: e.rows.length ? e.rows.map((r, t) => /* @__PURE__ */ a("tr", { children: e.columns.map((n) => /* @__PURE__ */ a("td", { style: s.resultPreviewTd, children:
|
|
2613
|
+
/* @__PURE__ */ a("tbody", { children: e.rows.length ? e.rows.map((r, t) => /* @__PURE__ */ a("tr", { children: e.columns.map((n) => /* @__PURE__ */ a("td", { style: s.resultPreviewTd, children: gt(r[n.key]) }, n.key)) }, t)) : /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a(
|
|
2591
2614
|
"td",
|
|
2592
2615
|
{
|
|
2593
2616
|
colSpan: e.columns.length,
|
|
@@ -2606,21 +2629,21 @@ function Xt({
|
|
|
2606
2629
|
] }) : null
|
|
2607
2630
|
] });
|
|
2608
2631
|
}
|
|
2609
|
-
function
|
|
2632
|
+
function tn({
|
|
2610
2633
|
compiledQuery: e,
|
|
2611
2634
|
compiledSql: r
|
|
2612
2635
|
}) {
|
|
2613
2636
|
return (e == null ? void 0 : e.kind) === "sql" ? /* @__PURE__ */ p("div", { style: s.compiledQuery, children: [
|
|
2614
|
-
/* @__PURE__ */ a(
|
|
2637
|
+
/* @__PURE__ */ a(dr, { label: "SQL", value: e.sql }),
|
|
2615
2638
|
e.pythonCode ? /* @__PURE__ */ a(Le, { label: "Python", value: e.pythonCode }) : null,
|
|
2616
2639
|
e.parameters ? /* @__PURE__ */ a(
|
|
2617
2640
|
Le,
|
|
2618
2641
|
{
|
|
2619
2642
|
label: "Parameters",
|
|
2620
|
-
value:
|
|
2643
|
+
value: Me(e.parameters)
|
|
2621
2644
|
}
|
|
2622
2645
|
) : null
|
|
2623
|
-
] }) : r ? /* @__PURE__ */ a(
|
|
2646
|
+
] }) : r ? /* @__PURE__ */ a(dr, { label: "SQL", value: r }) : /* @__PURE__ */ a(Le, { label: "Compiled Query", value: Me(e) });
|
|
2624
2647
|
}
|
|
2625
2648
|
function Le({
|
|
2626
2649
|
label: e,
|
|
@@ -2631,16 +2654,16 @@ function Le({
|
|
|
2631
2654
|
/* @__PURE__ */ a("pre", { style: s.codeBlock, children: r })
|
|
2632
2655
|
] });
|
|
2633
2656
|
}
|
|
2634
|
-
function
|
|
2657
|
+
function dr({
|
|
2635
2658
|
label: e,
|
|
2636
2659
|
value: r
|
|
2637
2660
|
}) {
|
|
2638
2661
|
return /* @__PURE__ */ p("div", { style: s.codeBlockGroup, children: [
|
|
2639
2662
|
/* @__PURE__ */ a("div", { style: s.codeBlockLabel, children: e }),
|
|
2640
|
-
/* @__PURE__ */ a("pre", { style: s.codeBlock, children:
|
|
2663
|
+
/* @__PURE__ */ a("pre", { style: s.codeBlock, children: on(r) })
|
|
2641
2664
|
] });
|
|
2642
2665
|
}
|
|
2643
|
-
const
|
|
2666
|
+
const nn = /* @__PURE__ */ new Set([
|
|
2644
2667
|
"SELECT",
|
|
2645
2668
|
"FROM",
|
|
2646
2669
|
"JOIN",
|
|
@@ -2678,14 +2701,14 @@ const en = /* @__PURE__ */ new Set([
|
|
|
2678
2701
|
"ALL",
|
|
2679
2702
|
"WITH"
|
|
2680
2703
|
]);
|
|
2681
|
-
function
|
|
2704
|
+
function on(e) {
|
|
2682
2705
|
return e.split(/(\s+|,|\(|\))/).map((t, n) => {
|
|
2683
2706
|
if (!t) return null;
|
|
2684
2707
|
const i = t.toUpperCase();
|
|
2685
|
-
return
|
|
2708
|
+
return nn.has(i) ? /* @__PURE__ */ a("span", { style: s.sqlKeyword, children: t }, n) : t.startsWith("$") || t.startsWith(":") || t.startsWith("?") ? /* @__PURE__ */ a("span", { style: s.sqlBindParam, children: t }, n) : /* @__PURE__ */ a("span", { children: t }, n);
|
|
2686
2709
|
});
|
|
2687
2710
|
}
|
|
2688
|
-
function
|
|
2711
|
+
function sn(e) {
|
|
2689
2712
|
return [
|
|
2690
2713
|
`${e.total} ${e.total === 1 ? "trace" : "traces"}`,
|
|
2691
2714
|
`${e.loading} loading`,
|
|
@@ -2694,7 +2717,7 @@ function tn(e) {
|
|
|
2694
2717
|
`${e.warningCount} warning${e.warningCount === 1 ? "" : "s"}`
|
|
2695
2718
|
].join(" · ");
|
|
2696
2719
|
}
|
|
2697
|
-
function
|
|
2720
|
+
function an(e, r) {
|
|
2698
2721
|
const t = r.trim().toLowerCase();
|
|
2699
2722
|
return t ? e.filter(
|
|
2700
2723
|
(n) => [
|
|
@@ -2706,36 +2729,36 @@ function nn(e, r) {
|
|
|
2706
2729
|
n.sectionTitle,
|
|
2707
2730
|
n.builder,
|
|
2708
2731
|
n.queryKind,
|
|
2709
|
-
|
|
2732
|
+
$r(n)
|
|
2710
2733
|
].filter(Boolean).join(" ").toLowerCase().includes(t)
|
|
2711
2734
|
) : e;
|
|
2712
2735
|
}
|
|
2713
|
-
function
|
|
2736
|
+
function ln(e) {
|
|
2714
2737
|
const r = e.filter((i) => i.queryKind === "inputOptions"), t = new Set(r.map(Ne));
|
|
2715
2738
|
return [
|
|
2716
2739
|
{ title: "Views", traces: e.filter((i) => !t.has(Ne(i))) },
|
|
2717
2740
|
{ title: "Inputs", traces: r }
|
|
2718
2741
|
];
|
|
2719
2742
|
}
|
|
2720
|
-
function
|
|
2743
|
+
function kr(e, r) {
|
|
2721
2744
|
if (!(!(r != null && r.traceId) && !(r != null && r.queryId) && !(r != null && r.viewId)))
|
|
2722
2745
|
return r.traceId ? e.find((t) => t.traceId === r.traceId) : e.find((t) => !(r.queryId && t.queryId !== r.queryId || r.viewId && t.viewId !== r.viewId));
|
|
2723
2746
|
}
|
|
2724
|
-
function
|
|
2747
|
+
function dn(e, r) {
|
|
2725
2748
|
if (r.queryId)
|
|
2726
|
-
return
|
|
2749
|
+
return kr(e, r);
|
|
2727
2750
|
if (!r.viewId)
|
|
2728
2751
|
return;
|
|
2729
2752
|
const t = e.filter((n) => n.viewId === r.viewId);
|
|
2730
2753
|
return t.length === 1 ? t[0] : void 0;
|
|
2731
2754
|
}
|
|
2732
|
-
function
|
|
2755
|
+
function un(e, r) {
|
|
2733
2756
|
return !!(e && r && e.traceId === r.traceId);
|
|
2734
2757
|
}
|
|
2735
2758
|
function Ne(e) {
|
|
2736
2759
|
return e.traceId;
|
|
2737
2760
|
}
|
|
2738
|
-
function
|
|
2761
|
+
function cn(e) {
|
|
2739
2762
|
switch (e) {
|
|
2740
2763
|
case "metric":
|
|
2741
2764
|
return "metric";
|
|
@@ -2753,11 +2776,11 @@ function ln(e) {
|
|
|
2753
2776
|
return qe(e);
|
|
2754
2777
|
}
|
|
2755
2778
|
}
|
|
2756
|
-
function
|
|
2779
|
+
function Er(e) {
|
|
2757
2780
|
const r = e.trim().toLowerCase();
|
|
2758
2781
|
return r === "metric" || r === "kpi" ? "metric" : r === "records" || r === "table" ? "records" : r === "matrix" || r === "pivot" ? "matrix" : r === "analysis" ? "analysis" : r === "inputs" || r === "input options" ? "inputs" : r === "sql" ? "sql" : "default";
|
|
2759
2782
|
}
|
|
2760
|
-
function
|
|
2783
|
+
function Rr(e) {
|
|
2761
2784
|
switch (e) {
|
|
2762
2785
|
case "metric":
|
|
2763
2786
|
return {
|
|
@@ -2789,25 +2812,25 @@ function Cr(e) {
|
|
|
2789
2812
|
};
|
|
2790
2813
|
}
|
|
2791
2814
|
}
|
|
2792
|
-
function
|
|
2815
|
+
function fn(e, r, t) {
|
|
2793
2816
|
const n = [];
|
|
2794
2817
|
return e.queryLabel && e.queryLabel !== r && n.push(e.queryLabel), e.queryId && e.queryId !== r && e.queryId !== e.queryLabel ? n.push(e.queryId) : e.viewId && e.viewId !== r && e.viewId !== e.queryLabel && n.push(e.viewId), n.push(t), n;
|
|
2795
2818
|
}
|
|
2796
|
-
function
|
|
2797
|
-
return
|
|
2819
|
+
function Lr(e) {
|
|
2820
|
+
return gn(e.visualType) || cn(e.queryKind);
|
|
2798
2821
|
}
|
|
2799
|
-
function
|
|
2822
|
+
function pn(e, r) {
|
|
2800
2823
|
return r ? e.queryLabel || e.queryId : xe(e);
|
|
2801
2824
|
}
|
|
2802
|
-
function
|
|
2825
|
+
function gn(e) {
|
|
2803
2826
|
if (e)
|
|
2804
2827
|
return e.replace(/[_-]+/g, " ").replace(/\b\w/g, (r) => r.toUpperCase());
|
|
2805
2828
|
}
|
|
2806
|
-
function
|
|
2829
|
+
function $r(e) {
|
|
2807
2830
|
const r = e.sourceRefs.map(F);
|
|
2808
2831
|
return r.length ? r.length === 1 ? r[0] : `${r[0]} + ${r.length - 1} more` : "No source";
|
|
2809
2832
|
}
|
|
2810
|
-
function
|
|
2833
|
+
function mn(e) {
|
|
2811
2834
|
return e.reduce(
|
|
2812
2835
|
(r, t) => (t.role === "measure" ? r.measures.push(t) : t.role === "date" ? r.timeFields.push(t) : t.role === "dimension" ? r.dimensions.push(t) : t.role === "id" ? r.identifiers.push(t) : r.other.push(t), r),
|
|
2813
2836
|
{
|
|
@@ -2819,7 +2842,7 @@ function fn(e) {
|
|
|
2819
2842
|
}
|
|
2820
2843
|
);
|
|
2821
2844
|
}
|
|
2822
|
-
function
|
|
2845
|
+
function yn(e) {
|
|
2823
2846
|
var r, t;
|
|
2824
2847
|
if (e.queryKind === "records" && ((r = e.projectionFieldRefs) != null && r.length) && e.projectionFieldRefs.every((n) => n.role === "measure") && ((t = e.latestAttempt) == null ? void 0 : t.rowCount) === 1)
|
|
2825
2848
|
return "KPI query";
|
|
@@ -2840,10 +2863,10 @@ function pn(e) {
|
|
|
2840
2863
|
return qe(e.queryKind);
|
|
2841
2864
|
}
|
|
2842
2865
|
}
|
|
2843
|
-
function
|
|
2866
|
+
function hn(e) {
|
|
2844
2867
|
return [e.aggregate, e.label || e.name].filter(Boolean).join(" ");
|
|
2845
2868
|
}
|
|
2846
|
-
function
|
|
2869
|
+
function bn(e) {
|
|
2847
2870
|
var f, d, c;
|
|
2848
2871
|
const r = e.valuePreview || "redacted", t = e.inputLabel || e.inputId, n = ((f = e.fieldRef) == null ? void 0 : f.label) || ((d = e.fieldRef) == null ? void 0 : d.name), i = (c = e.fieldRef) != null && c.source ? F(e.fieldRef.source) : void 0, o = [n ? `on ${n}` : void 0, i].filter(Boolean).join(" · "), u = [
|
|
2849
2872
|
t,
|
|
@@ -2867,23 +2890,23 @@ function F(e) {
|
|
|
2867
2890
|
e.tableName
|
|
2868
2891
|
].filter(Boolean).join(".") || e.tableName : e.connectionId ? `SQL ${e.connectionId}` : "SQL source";
|
|
2869
2892
|
}
|
|
2870
|
-
function
|
|
2893
|
+
function vn(e) {
|
|
2871
2894
|
if (e.file)
|
|
2872
2895
|
return e.line && e.column ? `${e.file}:${e.line}:${e.column}` : e.line ? `${e.file}:${e.line}` : e.file;
|
|
2873
2896
|
}
|
|
2874
|
-
function
|
|
2897
|
+
function Sn(e) {
|
|
2875
2898
|
return typeof e == "number" ? e.toLocaleString() : "-";
|
|
2876
2899
|
}
|
|
2877
|
-
function
|
|
2900
|
+
function wn(e) {
|
|
2878
2901
|
return typeof e == "number" ? `${Math.round(e)}ms` : "-";
|
|
2879
2902
|
}
|
|
2880
|
-
function
|
|
2881
|
-
return
|
|
2903
|
+
function In(e) {
|
|
2904
|
+
return Me(e);
|
|
2882
2905
|
}
|
|
2883
|
-
function
|
|
2906
|
+
function Me(e) {
|
|
2884
2907
|
return JSON.stringify(e, null, 2) ?? "undefined";
|
|
2885
2908
|
}
|
|
2886
|
-
function
|
|
2909
|
+
function xn(e) {
|
|
2887
2910
|
switch (e.type) {
|
|
2888
2911
|
case "query_started":
|
|
2889
2912
|
return "Started";
|
|
@@ -2896,10 +2919,10 @@ function Sn(e) {
|
|
|
2896
2919
|
case "input_changed":
|
|
2897
2920
|
return "Input changed";
|
|
2898
2921
|
default:
|
|
2899
|
-
return
|
|
2922
|
+
return An(e);
|
|
2900
2923
|
}
|
|
2901
2924
|
}
|
|
2902
|
-
function
|
|
2925
|
+
function qn(e) {
|
|
2903
2926
|
return [
|
|
2904
2927
|
e.at,
|
|
2905
2928
|
"durationMs" in e && typeof e.durationMs == "number" ? `${Math.round(e.durationMs)}ms` : void 0,
|
|
@@ -2908,20 +2931,20 @@ function wn(e) {
|
|
|
2908
2931
|
"errorMessage" in e ? e.errorMessage : void 0
|
|
2909
2932
|
].filter(Boolean).join(" - ");
|
|
2910
2933
|
}
|
|
2911
|
-
function
|
|
2934
|
+
function An(e) {
|
|
2912
2935
|
throw new Error(`Unsupported Semaphor trace event: ${JSON.stringify(e)}`);
|
|
2913
2936
|
}
|
|
2914
|
-
function
|
|
2937
|
+
function Cn(e) {
|
|
2915
2938
|
return Array.isArray(e) ? e.filter((r) => typeof r == "string") : [];
|
|
2916
2939
|
}
|
|
2917
2940
|
function $e(e) {
|
|
2918
|
-
return Array.isArray(e) ? e.map((r) =>
|
|
2941
|
+
return Array.isArray(e) ? e.map((r) => Tn(r)).filter((r) => !!r) : [];
|
|
2919
2942
|
}
|
|
2920
|
-
function
|
|
2943
|
+
function Tn(e) {
|
|
2921
2944
|
var r;
|
|
2922
|
-
return (r =
|
|
2945
|
+
return (r = kn(e)) == null ? void 0 : r.message;
|
|
2923
2946
|
}
|
|
2924
|
-
function
|
|
2947
|
+
function kn(e) {
|
|
2925
2948
|
if (typeof e == "string")
|
|
2926
2949
|
return { message: e };
|
|
2927
2950
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
@@ -2933,14 +2956,14 @@ function An(e) {
|
|
|
2933
2956
|
...i ? { path: i } : {}
|
|
2934
2957
|
} : t ? { message: t } : n ? { message: n, code: n } : void 0;
|
|
2935
2958
|
}
|
|
2936
|
-
function
|
|
2959
|
+
function En(e) {
|
|
2937
2960
|
const r = e == null ? void 0 : e.metadata, t = r && typeof r == "object" && !Array.isArray(r) && "dataAppDebug" in r && r.dataAppDebug && typeof r.dataAppDebug == "object" && !Array.isArray(r.dataAppDebug) ? r.dataAppDebug : void 0;
|
|
2938
2961
|
return {
|
|
2939
2962
|
compiledSql: typeof (t == null ? void 0 : t.compiledSql) == "string" ? t.compiledSql : void 0,
|
|
2940
2963
|
queryHash: typeof (t == null ? void 0 : t.queryHash) == "string" ? t.queryHash : void 0
|
|
2941
2964
|
};
|
|
2942
2965
|
}
|
|
2943
|
-
function
|
|
2966
|
+
function Or(e) {
|
|
2944
2967
|
return {
|
|
2945
2968
|
...e,
|
|
2946
2969
|
order: [],
|
|
@@ -2948,29 +2971,29 @@ function Rr(e) {
|
|
|
2948
2971
|
sequence: 0
|
|
2949
2972
|
};
|
|
2950
2973
|
}
|
|
2951
|
-
function
|
|
2974
|
+
function Rn(e, r) {
|
|
2952
2975
|
if (r.type === "config")
|
|
2953
2976
|
return r.config.enabled ? {
|
|
2954
2977
|
...e,
|
|
2955
2978
|
...r.config
|
|
2956
|
-
} :
|
|
2979
|
+
} : Or(r.config);
|
|
2957
2980
|
if (!e.enabled)
|
|
2958
2981
|
return e;
|
|
2959
2982
|
switch (r.type) {
|
|
2960
2983
|
case "register":
|
|
2961
|
-
return Ln(
|
|
2984
|
+
return Dn(Ln(e, r.descriptor));
|
|
2962
2985
|
case "unregister":
|
|
2963
|
-
return
|
|
2986
|
+
return $n(e, r.traceKey);
|
|
2964
2987
|
case "event":
|
|
2965
|
-
return
|
|
2988
|
+
return On(e, r);
|
|
2966
2989
|
default:
|
|
2967
2990
|
return e;
|
|
2968
2991
|
}
|
|
2969
2992
|
}
|
|
2970
|
-
function
|
|
2971
|
-
const t = e.entries[r.traceKey], n = t ? e.sequence : e.sequence + 1, i =
|
|
2972
|
-
...t ||
|
|
2973
|
-
...
|
|
2993
|
+
function Ln(e, r) {
|
|
2994
|
+
const t = e.entries[r.traceKey], n = t ? e.sequence : e.sequence + 1, i = Je(), o = {
|
|
2995
|
+
...t || Bn(r),
|
|
2996
|
+
...Dr(r),
|
|
2974
2997
|
traceKey: r.traceKey,
|
|
2975
2998
|
latestAttempt: (t == null ? void 0 : t.latestAttempt) || { status: "idle" },
|
|
2976
2999
|
recentEvents: (t == null ? void 0 : t.recentEvents) || [],
|
|
@@ -2988,7 +3011,7 @@ function kn(e, r) {
|
|
|
2988
3011
|
}
|
|
2989
3012
|
};
|
|
2990
3013
|
}
|
|
2991
|
-
function
|
|
3014
|
+
function $n(e, r) {
|
|
2992
3015
|
const t = e.entries[r];
|
|
2993
3016
|
return t ? {
|
|
2994
3017
|
...e,
|
|
@@ -3001,11 +3024,11 @@ function En(e, r) {
|
|
|
3001
3024
|
}
|
|
3002
3025
|
} : e;
|
|
3003
3026
|
}
|
|
3004
|
-
function
|
|
3027
|
+
function On(e, r) {
|
|
3005
3028
|
const t = e.entries[r.traceKey];
|
|
3006
3029
|
if (!t)
|
|
3007
3030
|
return e;
|
|
3008
|
-
const n =
|
|
3031
|
+
const n = Je(), i = [
|
|
3009
3032
|
...t.recentEvents,
|
|
3010
3033
|
r.event
|
|
3011
3034
|
].slice(-e.maxEventsPerQuery);
|
|
@@ -3025,7 +3048,7 @@ function Rn(e, r) {
|
|
|
3025
3048
|
}
|
|
3026
3049
|
};
|
|
3027
3050
|
}
|
|
3028
|
-
function
|
|
3051
|
+
function Dn(e) {
|
|
3029
3052
|
if (e.order.length <= e.maxQueries)
|
|
3030
3053
|
return e;
|
|
3031
3054
|
const r = e.order.map((i) => e.entries[i]).filter((i) => !!i).sort((i, o) => i.mounted !== o.mounted ? i.mounted ? 1 : -1 : i.lastEventAt - o.lastEventAt), t = e.order.length - e.maxQueries, n = new Set(
|
|
@@ -3039,10 +3062,10 @@ function Ln(e) {
|
|
|
3039
3062
|
)
|
|
3040
3063
|
} : e;
|
|
3041
3064
|
}
|
|
3042
|
-
function
|
|
3043
|
-
const r =
|
|
3065
|
+
function Bn(e) {
|
|
3066
|
+
const r = Je();
|
|
3044
3067
|
return {
|
|
3045
|
-
...
|
|
3068
|
+
...Dr(e),
|
|
3046
3069
|
traceKey: e.traceKey,
|
|
3047
3070
|
latestAttempt: { status: "idle" },
|
|
3048
3071
|
recentEvents: [],
|
|
@@ -3051,14 +3074,14 @@ function $n(e) {
|
|
|
3051
3074
|
lastEventAt: r
|
|
3052
3075
|
};
|
|
3053
3076
|
}
|
|
3054
|
-
function
|
|
3077
|
+
function Dr(e) {
|
|
3055
3078
|
var n;
|
|
3056
|
-
const r =
|
|
3079
|
+
const r = Hn(e.spec), t = Pn(
|
|
3057
3080
|
e.spec,
|
|
3058
3081
|
e.activeInputs
|
|
3059
3082
|
);
|
|
3060
3083
|
return {
|
|
3061
|
-
traceId:
|
|
3084
|
+
traceId: Kr(e.traceKey),
|
|
3062
3085
|
viewId: e.viewId,
|
|
3063
3086
|
viewTitle: e.viewTitle,
|
|
3064
3087
|
visualType: e.visualType,
|
|
@@ -3067,17 +3090,17 @@ function Lr(e) {
|
|
|
3067
3090
|
queryLabel: e.queryLabel,
|
|
3068
3091
|
queryKind: e.queryKind,
|
|
3069
3092
|
builder: e.builder,
|
|
3070
|
-
sourceRefs:
|
|
3093
|
+
sourceRefs: jn(e.intent),
|
|
3071
3094
|
sourceHints: (n = e.sourceHints) != null && n.length ? e.sourceHints : void 0,
|
|
3072
3095
|
projectionFieldRefs: r,
|
|
3073
3096
|
inputFieldRefs: t,
|
|
3074
|
-
fieldRefs:
|
|
3097
|
+
fieldRefs: Vn(e.intent),
|
|
3075
3098
|
inputsApplied: (e.activeInputs || []).map((i) => ({
|
|
3076
3099
|
inputId: i.inputId,
|
|
3077
3100
|
inputLabel: i.label,
|
|
3078
3101
|
fieldRef: i.field,
|
|
3079
3102
|
operator: i.operator,
|
|
3080
|
-
valuePreview:
|
|
3103
|
+
valuePreview: Fn(i)
|
|
3081
3104
|
})),
|
|
3082
3105
|
recentEvents: [],
|
|
3083
3106
|
clientWarnings: e.clientWarnings
|
|
@@ -3095,8 +3118,8 @@ function ve(e) {
|
|
|
3095
3118
|
}
|
|
3096
3119
|
function de(e) {
|
|
3097
3120
|
if (!e.enabled)
|
|
3098
|
-
return
|
|
3099
|
-
const r = e.order.map((n) => e.entries[n]).filter((n) => !!n).map(ve), t =
|
|
3121
|
+
return Ar;
|
|
3122
|
+
const r = e.order.map((n) => e.entries[n]).filter((n) => !!n).map(ve), t = Pe(r).map(bt);
|
|
3100
3123
|
return {
|
|
3101
3124
|
enabled: !0,
|
|
3102
3125
|
queries: r,
|
|
@@ -3110,15 +3133,15 @@ function de(e) {
|
|
|
3110
3133
|
getQueries: (n) => Object.values(e.entries).filter((i) => i.queryId === n).map(ve)
|
|
3111
3134
|
};
|
|
3112
3135
|
}
|
|
3113
|
-
function
|
|
3136
|
+
function Kn(e) {
|
|
3114
3137
|
return {
|
|
3115
|
-
snapshot: () =>
|
|
3116
|
-
getQuery: (r) =>
|
|
3117
|
-
getQueries: (r) => de(e()).getQueries(r).map((t) =>
|
|
3138
|
+
snapshot: () => xt(de(e())),
|
|
3139
|
+
getQuery: (r) => sr(de(e()).getQuery(r)),
|
|
3140
|
+
getQueries: (r) => de(e()).getQueries(r).map((t) => sr(t)).filter((t) => !!t),
|
|
3118
3141
|
getIssues: () => de(e()).issues
|
|
3119
3142
|
};
|
|
3120
3143
|
}
|
|
3121
|
-
function
|
|
3144
|
+
function Wn(e) {
|
|
3122
3145
|
return e === void 0 || e === !1 ? {
|
|
3123
3146
|
enabled: !1,
|
|
3124
3147
|
exposeWindowBridge: !1,
|
|
@@ -3132,26 +3155,26 @@ function On(e) {
|
|
|
3132
3155
|
} : {
|
|
3133
3156
|
enabled: e.enabled !== !1,
|
|
3134
3157
|
exposeWindowBridge: e.exposeWindowBridge === !0,
|
|
3135
|
-
maxEventsPerQuery:
|
|
3158
|
+
maxEventsPerQuery: cr(
|
|
3136
3159
|
e.maxEventsPerQuery,
|
|
3137
3160
|
Ee,
|
|
3138
|
-
|
|
3161
|
+
Ot
|
|
3139
3162
|
),
|
|
3140
|
-
maxQueries:
|
|
3163
|
+
maxQueries: cr(
|
|
3141
3164
|
e.maxQueries,
|
|
3142
3165
|
Re,
|
|
3143
|
-
|
|
3166
|
+
Dt
|
|
3144
3167
|
)
|
|
3145
3168
|
};
|
|
3146
3169
|
}
|
|
3147
|
-
function
|
|
3170
|
+
function _n(e) {
|
|
3148
3171
|
const t = [
|
|
3149
3172
|
e == null ? void 0 : e.sourceHint,
|
|
3150
3173
|
...(e == null ? void 0 : e.sourceHints) || []
|
|
3151
3174
|
].filter((n) => !!n).map((n) => ({
|
|
3152
3175
|
file: he(n.file),
|
|
3153
|
-
line:
|
|
3154
|
-
column:
|
|
3176
|
+
line: ur(n.line),
|
|
3177
|
+
column: ur(n.column),
|
|
3155
3178
|
exportName: he(n.exportName),
|
|
3156
3179
|
component: he(n.component),
|
|
3157
3180
|
note: he(n.note)
|
|
@@ -3166,16 +3189,16 @@ function he(e) {
|
|
|
3166
3189
|
const r = e.trim();
|
|
3167
3190
|
return r || void 0;
|
|
3168
3191
|
}
|
|
3169
|
-
function
|
|
3192
|
+
function ur(e) {
|
|
3170
3193
|
return typeof e == "number" && Number.isInteger(e) && e > 0 ? e : void 0;
|
|
3171
3194
|
}
|
|
3172
|
-
function
|
|
3195
|
+
function cr(e, r, t) {
|
|
3173
3196
|
return e === void 0 || !Number.isFinite(e) || !Number.isInteger(e) || e <= 0 ? r : Math.min(e, t);
|
|
3174
3197
|
}
|
|
3175
|
-
function
|
|
3198
|
+
function Nn(e) {
|
|
3176
3199
|
return typeof e.id == "string" && e.id.trim() ? e.id : void 0;
|
|
3177
3200
|
}
|
|
3178
|
-
function
|
|
3201
|
+
function Mn(e) {
|
|
3179
3202
|
switch (e) {
|
|
3180
3203
|
case "metric":
|
|
3181
3204
|
return "semaphor.metric";
|
|
@@ -3196,8 +3219,8 @@ function Wn(e) {
|
|
|
3196
3219
|
function qe(e) {
|
|
3197
3220
|
throw new Error(`Unsupported Semaphor query kind: ${JSON.stringify(e)}`);
|
|
3198
3221
|
}
|
|
3199
|
-
function
|
|
3200
|
-
if (
|
|
3222
|
+
function Fn(e) {
|
|
3223
|
+
if (zn(e))
|
|
3201
3224
|
return;
|
|
3202
3225
|
const r = e.value;
|
|
3203
3226
|
if (r !== void 0) {
|
|
@@ -3207,17 +3230,17 @@ function _n(e) {
|
|
|
3207
3230
|
).map((n) => String(n));
|
|
3208
3231
|
if (t.length === r.length && t.length > 0) {
|
|
3209
3232
|
const n = t.slice(0, 3).join(", "), i = t.length > 3 ? `, +${t.length - 3} more` : "";
|
|
3210
|
-
return
|
|
3233
|
+
return fr(`${n}${i}`);
|
|
3211
3234
|
}
|
|
3212
3235
|
return `${r.length} selected`;
|
|
3213
3236
|
}
|
|
3214
|
-
return typeof r == "number" || typeof r == "boolean" ? String(r) : typeof r == "string" ?
|
|
3237
|
+
return typeof r == "number" || typeof r == "boolean" ? String(r) : typeof r == "string" ? fr(r) : r && typeof r == "object" ? `object(${Object.keys(r).slice(0, 5).join(",")})` : String(r);
|
|
3215
3238
|
}
|
|
3216
3239
|
}
|
|
3217
|
-
function
|
|
3240
|
+
function fr(e) {
|
|
3218
3241
|
return e.length > 80 ? `${e.slice(0, 77)}...` : e;
|
|
3219
3242
|
}
|
|
3220
|
-
function
|
|
3243
|
+
function zn(e) {
|
|
3221
3244
|
var t;
|
|
3222
3245
|
const r = [
|
|
3223
3246
|
e.inputId,
|
|
@@ -3228,13 +3251,13 @@ function Nn(e) {
|
|
|
3228
3251
|
(n) => r.includes(n)
|
|
3229
3252
|
);
|
|
3230
3253
|
}
|
|
3231
|
-
function
|
|
3254
|
+
function jn(e) {
|
|
3232
3255
|
const r = [];
|
|
3233
3256
|
return we(e, (t) => {
|
|
3234
|
-
|
|
3235
|
-
}),
|
|
3257
|
+
Qn(t) && r.push(t);
|
|
3258
|
+
}), rt(r);
|
|
3236
3259
|
}
|
|
3237
|
-
function
|
|
3260
|
+
function Hn(e) {
|
|
3238
3261
|
switch (e.queryKind) {
|
|
3239
3262
|
case "metric":
|
|
3240
3263
|
case "analysis":
|
|
@@ -3257,17 +3280,17 @@ function Fn(e) {
|
|
|
3257
3280
|
return Y(e.fields || []);
|
|
3258
3281
|
case "matrix":
|
|
3259
3282
|
return Y([
|
|
3260
|
-
...(e.rows || []).map(
|
|
3261
|
-
...(e.columns || []).map(
|
|
3262
|
-
...(e.values || []).map(
|
|
3283
|
+
...(e.rows || []).map(Oe),
|
|
3284
|
+
...(e.columns || []).map(Oe),
|
|
3285
|
+
...(e.values || []).map(Oe)
|
|
3263
3286
|
]);
|
|
3264
3287
|
default:
|
|
3265
3288
|
return qe(e);
|
|
3266
3289
|
}
|
|
3267
3290
|
}
|
|
3268
|
-
function
|
|
3291
|
+
function Pn(e, r) {
|
|
3269
3292
|
const t = [
|
|
3270
|
-
...(e.inputs || []).map(
|
|
3293
|
+
...(e.inputs || []).map(Br),
|
|
3271
3294
|
...(r || []).map((n) => n.field)
|
|
3272
3295
|
];
|
|
3273
3296
|
return Y(t);
|
|
@@ -3275,21 +3298,21 @@ function zn(e, r) {
|
|
|
3275
3298
|
function Y(e) {
|
|
3276
3299
|
const r = /* @__PURE__ */ new Map();
|
|
3277
3300
|
return e.forEach((t) => {
|
|
3278
|
-
t && fe(t) && r.set(
|
|
3301
|
+
t && fe(t) && r.set(Ge(t), t);
|
|
3279
3302
|
}), [...r.values()];
|
|
3280
3303
|
}
|
|
3281
|
-
function
|
|
3304
|
+
function Br(e) {
|
|
3282
3305
|
if (!e || typeof e != "object")
|
|
3283
3306
|
return;
|
|
3284
3307
|
const r = e.toAnalyticsInput;
|
|
3285
3308
|
if (typeof r == "function") {
|
|
3286
3309
|
const n = r.call(e);
|
|
3287
|
-
return
|
|
3310
|
+
return Br(n);
|
|
3288
3311
|
}
|
|
3289
3312
|
const t = e.field;
|
|
3290
3313
|
return fe(t) ? t : void 0;
|
|
3291
3314
|
}
|
|
3292
|
-
function
|
|
3315
|
+
function Oe(e) {
|
|
3293
3316
|
if (fe(e))
|
|
3294
3317
|
return e;
|
|
3295
3318
|
if (!e || typeof e != "object")
|
|
@@ -3297,10 +3320,10 @@ function De(e) {
|
|
|
3297
3320
|
const r = e.field;
|
|
3298
3321
|
return fe(r) ? r : void 0;
|
|
3299
3322
|
}
|
|
3300
|
-
function
|
|
3323
|
+
function Vn(e) {
|
|
3301
3324
|
const r = /* @__PURE__ */ new Map();
|
|
3302
3325
|
return we(e, (t) => {
|
|
3303
|
-
fe(t) && r.set(
|
|
3326
|
+
fe(t) && r.set(Ge(t), t);
|
|
3304
3327
|
}), [...r.values()];
|
|
3305
3328
|
}
|
|
3306
3329
|
function we(e, r) {
|
|
@@ -3314,7 +3337,7 @@ function we(e, r) {
|
|
|
3314
3337
|
);
|
|
3315
3338
|
}
|
|
3316
3339
|
}
|
|
3317
|
-
function
|
|
3340
|
+
function Qn(e) {
|
|
3318
3341
|
if (!e || typeof e != "object")
|
|
3319
3342
|
return !1;
|
|
3320
3343
|
const r = e;
|
|
@@ -3326,27 +3349,27 @@ function fe(e) {
|
|
|
3326
3349
|
const r = e;
|
|
3327
3350
|
return typeof r.name == "string" && (r.source !== void 0 || r.role !== void 0 || r.dataType !== void 0 || r.aggregate !== void 0);
|
|
3328
3351
|
}
|
|
3329
|
-
function
|
|
3352
|
+
function Ge(e) {
|
|
3330
3353
|
return [
|
|
3331
3354
|
e.name,
|
|
3332
3355
|
e.role,
|
|
3333
3356
|
e.aggregate,
|
|
3334
|
-
e.source ?
|
|
3357
|
+
e.source ? et(e.source) : ""
|
|
3335
3358
|
].join(":");
|
|
3336
3359
|
}
|
|
3337
|
-
function
|
|
3360
|
+
function Un(e) {
|
|
3338
3361
|
const r = e;
|
|
3339
3362
|
return typeof (r == null ? void 0 : r.rowCount) == "number" ? r.rowCount : Array.isArray(r == null ? void 0 : r.records) ? r.records.length : void 0;
|
|
3340
3363
|
}
|
|
3341
|
-
function
|
|
3364
|
+
function Gn(e) {
|
|
3342
3365
|
const r = e;
|
|
3343
3366
|
return Array.isArray(r == null ? void 0 : r.columns) ? r.columns.length : void 0;
|
|
3344
3367
|
}
|
|
3345
|
-
function
|
|
3368
|
+
function pr(e) {
|
|
3346
3369
|
const r = e;
|
|
3347
3370
|
return r == null ? void 0 : r.executionResult;
|
|
3348
3371
|
}
|
|
3349
|
-
function
|
|
3372
|
+
function Jn(e) {
|
|
3350
3373
|
const r = e, t = [
|
|
3351
3374
|
...r != null && r.measures ? Object.keys(r.measures) : [],
|
|
3352
3375
|
...r != null && r.measureBindings ? Object.keys(r.measureBindings) : []
|
|
@@ -3359,11 +3382,29 @@ function Qn(e) {
|
|
|
3359
3382
|
...n.length > 0 ? { missingMeasures: n } : {}
|
|
3360
3383
|
};
|
|
3361
3384
|
}
|
|
3362
|
-
function
|
|
3385
|
+
function Yn(e) {
|
|
3386
|
+
const r = e;
|
|
3387
|
+
if (!r || typeof r != "object")
|
|
3388
|
+
return;
|
|
3389
|
+
const t = {};
|
|
3390
|
+
return Fe(r.primaryValue) && (t.primaryValue = r.primaryValue), Fe(r.comparisonValue) && (t.comparisonValue = r.comparisonValue), typeof r.comparisonKind == "string" && (t.comparisonKind = r.comparisonKind), (typeof r.delta == "number" || r.delta === null) && (t.delta = r.delta), (typeof r.deltaPercent == "number" || r.deltaPercent === null) && (t.deltaPercent = r.deltaPercent), Xn(r.measures) && (t.measures = r.measures), Zn(r.measureBindings) && (t.measureBindings = r.measureBindings), Array.isArray(r.missingMeasures) && (t.missingMeasures = r.missingMeasures.filter(
|
|
3391
|
+
(n) => typeof n == "string" && !!n
|
|
3392
|
+
)), Object.keys(t).length > 0 ? t : void 0;
|
|
3393
|
+
}
|
|
3394
|
+
function Fe(e) {
|
|
3395
|
+
return e === null || typeof e == "number" || typeof e == "string";
|
|
3396
|
+
}
|
|
3397
|
+
function Xn(e) {
|
|
3398
|
+
return e !== null && typeof e == "object" && !Array.isArray(e) && Object.values(e).every(Fe);
|
|
3399
|
+
}
|
|
3400
|
+
function Zn(e) {
|
|
3401
|
+
return e !== null && typeof e == "object" && !Array.isArray(e) && Object.values(e).every((r) => typeof r == "string");
|
|
3402
|
+
}
|
|
3403
|
+
function gr(e) {
|
|
3363
3404
|
const r = e;
|
|
3364
3405
|
return typeof (r == null ? void 0 : r.requestId) == "string" ? r.requestId : void 0;
|
|
3365
3406
|
}
|
|
3366
|
-
function
|
|
3407
|
+
function Kr(e) {
|
|
3367
3408
|
let r = 2166136261;
|
|
3368
3409
|
for (let t = 0; t < e.length; t += 1)
|
|
3369
3410
|
r ^= e.charCodeAt(t), r = Math.imul(r, 16777619);
|
|
@@ -3372,10 +3413,10 @@ function Dr(e) {
|
|
|
3372
3413
|
function be() {
|
|
3373
3414
|
return (/* @__PURE__ */ new Date()).toISOString();
|
|
3374
3415
|
}
|
|
3375
|
-
function
|
|
3416
|
+
function Je() {
|
|
3376
3417
|
return typeof performance < "u" && performance.now ? performance.now() : Date.now();
|
|
3377
3418
|
}
|
|
3378
|
-
const
|
|
3419
|
+
const ei = [
|
|
3379
3420
|
"primary",
|
|
3380
3421
|
"comparisons",
|
|
3381
3422
|
"contributors",
|
|
@@ -3389,7 +3430,7 @@ const Un = [
|
|
|
3389
3430
|
"largestPositiveChanges",
|
|
3390
3431
|
"largestNegativeDrivers",
|
|
3391
3432
|
"largestPositiveDrivers"
|
|
3392
|
-
],
|
|
3433
|
+
], ri = [
|
|
3393
3434
|
"primary",
|
|
3394
3435
|
"records",
|
|
3395
3436
|
"periodChanges",
|
|
@@ -3404,12 +3445,12 @@ const Un = [
|
|
|
3404
3445
|
"largestNegativeDrivers",
|
|
3405
3446
|
"largestPositiveDrivers"
|
|
3406
3447
|
];
|
|
3407
|
-
function
|
|
3448
|
+
function Wr(e) {
|
|
3408
3449
|
if (!e)
|
|
3409
3450
|
return {};
|
|
3410
|
-
const r =
|
|
3411
|
-
|
|
3412
|
-
|
|
3451
|
+
const r = ai(e.executionResult), t = ti(e, r), n = oi(t), i = _r(
|
|
3452
|
+
Xe(e.analysisWarnings),
|
|
3453
|
+
ui(t)
|
|
3413
3454
|
);
|
|
3414
3455
|
return {
|
|
3415
3456
|
...e,
|
|
@@ -3422,19 +3463,19 @@ function Or(e) {
|
|
|
3422
3463
|
} : {}
|
|
3423
3464
|
};
|
|
3424
3465
|
}
|
|
3425
|
-
function
|
|
3426
|
-
const t =
|
|
3427
|
-
for (const i of
|
|
3466
|
+
function ti(e, r) {
|
|
3467
|
+
const t = ni(e.resultSets);
|
|
3468
|
+
for (const i of ei) {
|
|
3428
3469
|
if (t[i])
|
|
3429
3470
|
continue;
|
|
3430
|
-
const o =
|
|
3471
|
+
const o = li(e[i]);
|
|
3431
3472
|
if (!o.length)
|
|
3432
3473
|
continue;
|
|
3433
|
-
const u = r.length ? r :
|
|
3474
|
+
const u = r.length ? r : di(o);
|
|
3434
3475
|
t[i] = {
|
|
3435
3476
|
id: i,
|
|
3436
3477
|
role: i,
|
|
3437
|
-
...
|
|
3478
|
+
...Ye({
|
|
3438
3479
|
records: o,
|
|
3439
3480
|
columns: u,
|
|
3440
3481
|
resultSetKey: i
|
|
@@ -3443,20 +3484,20 @@ function Jn(e, r) {
|
|
|
3443
3484
|
rowCount: o.length
|
|
3444
3485
|
};
|
|
3445
3486
|
}
|
|
3446
|
-
const n =
|
|
3487
|
+
const n = si(e.executionResult);
|
|
3447
3488
|
return n && n.records.length > 0 && !t.records && (t.records = n), t;
|
|
3448
3489
|
}
|
|
3449
|
-
function
|
|
3490
|
+
function ni(e) {
|
|
3450
3491
|
return Object.fromEntries(
|
|
3451
3492
|
Object.entries(e || {}).map(([r, t]) => [
|
|
3452
3493
|
r,
|
|
3453
|
-
|
|
3494
|
+
ii(t, r)
|
|
3454
3495
|
])
|
|
3455
3496
|
);
|
|
3456
3497
|
}
|
|
3457
|
-
function
|
|
3498
|
+
function ii(e, r = e.id || e.role || "resultSet") {
|
|
3458
3499
|
var n;
|
|
3459
|
-
const t =
|
|
3500
|
+
const t = Ye({
|
|
3460
3501
|
records: e.records || [],
|
|
3461
3502
|
columns: e.columns || [],
|
|
3462
3503
|
resultSetKey: r
|
|
@@ -3465,28 +3506,28 @@ function Xn(e, r = e.id || e.role || "resultSet") {
|
|
|
3465
3506
|
...e,
|
|
3466
3507
|
...t,
|
|
3467
3508
|
...e.warnings || t.warnings ? {
|
|
3468
|
-
warnings:
|
|
3469
|
-
|
|
3509
|
+
warnings: _r(
|
|
3510
|
+
Xe(e.warnings),
|
|
3470
3511
|
t.warnings
|
|
3471
3512
|
)
|
|
3472
3513
|
} : {},
|
|
3473
3514
|
rowCount: e.rowCount ?? ((n = e.records) == null ? void 0 : n.length) ?? 0
|
|
3474
3515
|
};
|
|
3475
3516
|
}
|
|
3476
|
-
function
|
|
3517
|
+
function oi(e) {
|
|
3477
3518
|
var r;
|
|
3478
|
-
for (const t of
|
|
3519
|
+
for (const t of ri)
|
|
3479
3520
|
if ((r = e[t]) != null && r.records.length)
|
|
3480
3521
|
return e[t];
|
|
3481
3522
|
return Object.values(e).find((t) => t.records.length) || Object.values(e)[0];
|
|
3482
3523
|
}
|
|
3483
|
-
function
|
|
3524
|
+
function si(e) {
|
|
3484
3525
|
const r = e == null ? void 0 : e.result;
|
|
3485
3526
|
if (!(!r || r.kind !== "records" && r.kind !== "sql"))
|
|
3486
3527
|
return {
|
|
3487
3528
|
id: "records",
|
|
3488
3529
|
role: "records",
|
|
3489
|
-
...
|
|
3530
|
+
...Ye({
|
|
3490
3531
|
records: r.records,
|
|
3491
3532
|
columns: r.columns,
|
|
3492
3533
|
resultSetKey: "records"
|
|
@@ -3495,16 +3536,16 @@ function ei(e) {
|
|
|
3495
3536
|
rowCount: r.rowCount ?? r.records.length
|
|
3496
3537
|
};
|
|
3497
3538
|
}
|
|
3498
|
-
function
|
|
3539
|
+
function ai(e) {
|
|
3499
3540
|
const r = e == null ? void 0 : e.result;
|
|
3500
3541
|
return !r || r.kind !== "records" && r.kind !== "sql" ? [] : r.columns;
|
|
3501
3542
|
}
|
|
3502
|
-
function
|
|
3543
|
+
function li(e) {
|
|
3503
3544
|
return Array.isArray(e) ? e.filter(
|
|
3504
3545
|
(r) => !!(r && typeof r == "object" && !Array.isArray(r))
|
|
3505
3546
|
) : [];
|
|
3506
3547
|
}
|
|
3507
|
-
function
|
|
3548
|
+
function Ye({
|
|
3508
3549
|
records: e,
|
|
3509
3550
|
columns: r,
|
|
3510
3551
|
resultSetKey: t
|
|
@@ -3536,7 +3577,7 @@ function Ge({
|
|
|
3536
3577
|
...n.length ? { warnings: n } : {}
|
|
3537
3578
|
};
|
|
3538
3579
|
}
|
|
3539
|
-
function
|
|
3580
|
+
function di(e) {
|
|
3540
3581
|
return Array.from(
|
|
3541
3582
|
new Set(e.flatMap((t) => Object.keys(t)))
|
|
3542
3583
|
).map((t) => ({
|
|
@@ -3545,54 +3586,53 @@ function ni(e) {
|
|
|
3545
3586
|
label: t
|
|
3546
3587
|
}));
|
|
3547
3588
|
}
|
|
3548
|
-
function
|
|
3589
|
+
function ui(e) {
|
|
3549
3590
|
return Object.values(e).flatMap(
|
|
3550
|
-
(r) =>
|
|
3591
|
+
(r) => Xe(r.warnings)
|
|
3551
3592
|
);
|
|
3552
3593
|
}
|
|
3553
|
-
function
|
|
3554
|
-
return Array.isArray(e) ? e.filter(
|
|
3594
|
+
function Xe(e) {
|
|
3595
|
+
return Array.isArray(e) ? e.filter(ci) : [];
|
|
3555
3596
|
}
|
|
3556
|
-
function
|
|
3597
|
+
function ci(e) {
|
|
3557
3598
|
return !!(e && typeof e == "object" && !Array.isArray(e));
|
|
3558
3599
|
}
|
|
3559
|
-
function
|
|
3600
|
+
function _r(...e) {
|
|
3560
3601
|
const r = /* @__PURE__ */ new Set(), t = [];
|
|
3561
3602
|
for (const n of e.flatMap((i) => i || [])) {
|
|
3562
|
-
const i =
|
|
3603
|
+
const i = fi(n);
|
|
3563
3604
|
r.has(i) || (r.add(i), t.push(n));
|
|
3564
3605
|
}
|
|
3565
3606
|
return t;
|
|
3566
3607
|
}
|
|
3567
|
-
function
|
|
3608
|
+
function fi(e) {
|
|
3568
3609
|
return e.code === "missing_analysis_result_key" ? [
|
|
3569
3610
|
e.code,
|
|
3570
3611
|
e.resultSetKey,
|
|
3571
3612
|
e.rowIndex,
|
|
3572
3613
|
e.columnKey
|
|
3573
|
-
].join(":") :
|
|
3614
|
+
].join(":") : ze(e);
|
|
3574
3615
|
}
|
|
3575
|
-
function
|
|
3616
|
+
function ze(e) {
|
|
3576
3617
|
if (!e || typeof e != "object")
|
|
3577
3618
|
return JSON.stringify(e);
|
|
3578
3619
|
if (Array.isArray(e))
|
|
3579
|
-
return `[${e.map((t) =>
|
|
3620
|
+
return `[${e.map((t) => ze(t)).join(",")}]`;
|
|
3580
3621
|
const r = e;
|
|
3581
|
-
return `{${Object.keys(r).sort().map((t) => `${JSON.stringify(t)}:${
|
|
3622
|
+
return `{${Object.keys(r).sort().map((t) => `${JSON.stringify(t)}:${ze(r[t])}`).join(",")}}`;
|
|
3582
3623
|
}
|
|
3583
|
-
const
|
|
3584
|
-
value: null,
|
|
3624
|
+
const De = {
|
|
3585
3625
|
primaryValue: null
|
|
3586
|
-
}, Be = {},
|
|
3587
|
-
function
|
|
3588
|
-
const r = X(e.inputs), t =
|
|
3626
|
+
}, Be = {}, pi = { records: [] }, Ke = { options: [] }, gi = { records: [] }, We = {};
|
|
3627
|
+
function mi(e) {
|
|
3628
|
+
const r = X(e.inputs), t = Gr(e);
|
|
3589
3629
|
try {
|
|
3590
|
-
const n =
|
|
3630
|
+
const n = Jr(e), i = ee(n, "analysis");
|
|
3591
3631
|
return i ? {
|
|
3592
3632
|
error: i,
|
|
3593
3633
|
activeInputs: r,
|
|
3594
3634
|
analysisOptions: t,
|
|
3595
|
-
queryKey:
|
|
3635
|
+
queryKey: A(
|
|
3596
3636
|
void 0,
|
|
3597
3637
|
r,
|
|
3598
3638
|
i,
|
|
@@ -3604,7 +3644,7 @@ function di(e) {
|
|
|
3604
3644
|
error: null,
|
|
3605
3645
|
activeInputs: r,
|
|
3606
3646
|
analysisOptions: t,
|
|
3607
|
-
queryKey:
|
|
3647
|
+
queryKey: A(n, r, void 0, t),
|
|
3608
3648
|
idleData: Be
|
|
3609
3649
|
};
|
|
3610
3650
|
} catch (n) {
|
|
@@ -3613,7 +3653,7 @@ function di(e) {
|
|
|
3613
3653
|
error: i,
|
|
3614
3654
|
activeInputs: r,
|
|
3615
3655
|
analysisOptions: t,
|
|
3616
|
-
queryKey:
|
|
3656
|
+
queryKey: A(
|
|
3617
3657
|
void 0,
|
|
3618
3658
|
r,
|
|
3619
3659
|
i,
|
|
@@ -3623,46 +3663,46 @@ function di(e) {
|
|
|
3623
3663
|
};
|
|
3624
3664
|
}
|
|
3625
3665
|
}
|
|
3626
|
-
function
|
|
3666
|
+
function yi(e) {
|
|
3627
3667
|
const r = X(e.inputs);
|
|
3628
3668
|
try {
|
|
3629
|
-
const t =
|
|
3669
|
+
const t = Yr(e), n = ee(t);
|
|
3630
3670
|
return n ? {
|
|
3631
3671
|
error: n,
|
|
3632
3672
|
activeInputs: r,
|
|
3633
|
-
queryKey:
|
|
3634
|
-
idleData:
|
|
3673
|
+
queryKey: A(void 0, r, n),
|
|
3674
|
+
idleData: De
|
|
3635
3675
|
} : {
|
|
3636
3676
|
intent: t,
|
|
3637
3677
|
error: null,
|
|
3638
3678
|
activeInputs: r,
|
|
3639
|
-
queryKey:
|
|
3640
|
-
idleData:
|
|
3679
|
+
queryKey: A(t, r),
|
|
3680
|
+
idleData: De
|
|
3641
3681
|
};
|
|
3642
3682
|
} catch (t) {
|
|
3643
3683
|
const n = Z(t, "metric");
|
|
3644
3684
|
return {
|
|
3645
3685
|
error: n,
|
|
3646
3686
|
activeInputs: r,
|
|
3647
|
-
queryKey:
|
|
3648
|
-
idleData:
|
|
3687
|
+
queryKey: A(void 0, r, n),
|
|
3688
|
+
idleData: De
|
|
3649
3689
|
};
|
|
3650
3690
|
}
|
|
3651
3691
|
}
|
|
3652
|
-
function
|
|
3653
|
-
const r = X(e.inputs), t =
|
|
3692
|
+
function hi(e) {
|
|
3693
|
+
const r = X(e.inputs), t = pi;
|
|
3654
3694
|
try {
|
|
3655
|
-
const n =
|
|
3695
|
+
const n = Ur(e), i = ee(n);
|
|
3656
3696
|
return i ? {
|
|
3657
3697
|
error: i,
|
|
3658
3698
|
activeInputs: r,
|
|
3659
|
-
queryKey:
|
|
3699
|
+
queryKey: A(void 0, r, i),
|
|
3660
3700
|
idleData: t
|
|
3661
3701
|
} : {
|
|
3662
3702
|
intent: n,
|
|
3663
3703
|
error: null,
|
|
3664
3704
|
activeInputs: r,
|
|
3665
|
-
queryKey:
|
|
3705
|
+
queryKey: A(n, r),
|
|
3666
3706
|
idleData: t
|
|
3667
3707
|
};
|
|
3668
3708
|
} catch (n) {
|
|
@@ -3670,25 +3710,25 @@ function ci(e) {
|
|
|
3670
3710
|
return {
|
|
3671
3711
|
error: i,
|
|
3672
3712
|
activeInputs: r,
|
|
3673
|
-
queryKey:
|
|
3713
|
+
queryKey: A(void 0, r, i),
|
|
3674
3714
|
idleData: t
|
|
3675
3715
|
};
|
|
3676
3716
|
}
|
|
3677
3717
|
}
|
|
3678
|
-
function
|
|
3718
|
+
function bi(e) {
|
|
3679
3719
|
const r = X(e.inputs);
|
|
3680
3720
|
try {
|
|
3681
|
-
const t =
|
|
3721
|
+
const t = Qr(e), n = ee(t);
|
|
3682
3722
|
return n ? {
|
|
3683
3723
|
error: n,
|
|
3684
3724
|
activeInputs: r,
|
|
3685
|
-
queryKey:
|
|
3725
|
+
queryKey: A(void 0, r, n),
|
|
3686
3726
|
idleData: Ke
|
|
3687
3727
|
} : {
|
|
3688
3728
|
intent: t,
|
|
3689
3729
|
error: null,
|
|
3690
3730
|
activeInputs: r,
|
|
3691
|
-
queryKey:
|
|
3731
|
+
queryKey: A(t, r),
|
|
3692
3732
|
idleData: Ke
|
|
3693
3733
|
};
|
|
3694
3734
|
} catch (t) {
|
|
@@ -3696,25 +3736,25 @@ function fi(e) {
|
|
|
3696
3736
|
return {
|
|
3697
3737
|
error: n,
|
|
3698
3738
|
activeInputs: r,
|
|
3699
|
-
queryKey:
|
|
3739
|
+
queryKey: A(void 0, r, n),
|
|
3700
3740
|
idleData: Ke
|
|
3701
3741
|
};
|
|
3702
3742
|
}
|
|
3703
3743
|
}
|
|
3704
|
-
function
|
|
3705
|
-
const r = X(e.inputs), t =
|
|
3744
|
+
function vi(e) {
|
|
3745
|
+
const r = X(e.inputs), t = gi;
|
|
3706
3746
|
try {
|
|
3707
|
-
const n =
|
|
3747
|
+
const n = Vr(e), i = ee(n);
|
|
3708
3748
|
return i ? {
|
|
3709
3749
|
error: i,
|
|
3710
3750
|
activeInputs: r,
|
|
3711
|
-
queryKey:
|
|
3751
|
+
queryKey: A(void 0, r, i),
|
|
3712
3752
|
idleData: t
|
|
3713
3753
|
} : {
|
|
3714
3754
|
intent: n,
|
|
3715
3755
|
error: null,
|
|
3716
3756
|
activeInputs: r,
|
|
3717
|
-
queryKey:
|
|
3757
|
+
queryKey: A(n, r),
|
|
3718
3758
|
idleData: t
|
|
3719
3759
|
};
|
|
3720
3760
|
} catch (n) {
|
|
@@ -3722,25 +3762,25 @@ function pi(e) {
|
|
|
3722
3762
|
return {
|
|
3723
3763
|
error: i,
|
|
3724
3764
|
activeInputs: r,
|
|
3725
|
-
queryKey:
|
|
3765
|
+
queryKey: A(void 0, r, i),
|
|
3726
3766
|
idleData: t
|
|
3727
3767
|
};
|
|
3728
3768
|
}
|
|
3729
3769
|
}
|
|
3730
|
-
function
|
|
3770
|
+
function Si(e) {
|
|
3731
3771
|
const r = X(e.inputs);
|
|
3732
3772
|
try {
|
|
3733
|
-
const t =
|
|
3773
|
+
const t = Pr(e), n = ee(t);
|
|
3734
3774
|
return n ? {
|
|
3735
3775
|
error: n,
|
|
3736
3776
|
activeInputs: r,
|
|
3737
|
-
queryKey:
|
|
3777
|
+
queryKey: A(void 0, r, n),
|
|
3738
3778
|
idleData: We
|
|
3739
3779
|
} : {
|
|
3740
3780
|
intent: t,
|
|
3741
3781
|
error: null,
|
|
3742
3782
|
activeInputs: r,
|
|
3743
|
-
queryKey:
|
|
3783
|
+
queryKey: A(t, r),
|
|
3744
3784
|
idleData: We
|
|
3745
3785
|
};
|
|
3746
3786
|
} catch (t) {
|
|
@@ -3748,14 +3788,14 @@ function gi(e) {
|
|
|
3748
3788
|
return {
|
|
3749
3789
|
error: n,
|
|
3750
3790
|
activeInputs: r,
|
|
3751
|
-
queryKey:
|
|
3791
|
+
queryKey: A(void 0, r, n),
|
|
3752
3792
|
idleData: We
|
|
3753
3793
|
};
|
|
3754
3794
|
}
|
|
3755
3795
|
}
|
|
3756
|
-
function
|
|
3796
|
+
function je(e) {
|
|
3757
3797
|
var o;
|
|
3758
|
-
if (
|
|
3798
|
+
if (wi(e))
|
|
3759
3799
|
return e;
|
|
3760
3800
|
const r = e instanceof Error ? e : void 0, t = e, n = t == null ? void 0 : t.executionResult, i = Ae(
|
|
3761
3801
|
(r == null ? void 0 : r.message) ?? String(e),
|
|
@@ -3770,7 +3810,7 @@ function ze(e) {
|
|
|
3770
3810
|
return i.name = (r == null ? void 0 : r.name) || i.name, i.stack = r == null ? void 0 : r.stack, i;
|
|
3771
3811
|
}
|
|
3772
3812
|
function Z(e, r) {
|
|
3773
|
-
const t =
|
|
3813
|
+
const t = je(e);
|
|
3774
3814
|
if (t.executionResult || t.validation)
|
|
3775
3815
|
return t;
|
|
3776
3816
|
const n = {
|
|
@@ -3790,7 +3830,7 @@ function Z(e, r) {
|
|
|
3790
3830
|
recommendedNextStep: "Update the Data App query spec to satisfy the SDK builder contract."
|
|
3791
3831
|
}
|
|
3792
3832
|
]
|
|
3793
|
-
}, i =
|
|
3833
|
+
}, i = Nr(
|
|
3794
3834
|
void 0,
|
|
3795
3835
|
r,
|
|
3796
3836
|
n
|
|
@@ -3808,16 +3848,16 @@ function Ae(e, r = {}) {
|
|
|
3808
3848
|
const n = r.validationIssues ?? ((i = r.validation) == null ? void 0 : i.errors) ?? ((u = (o = r.executionResult) == null ? void 0 : o.validation) == null ? void 0 : u.errors);
|
|
3809
3849
|
return n !== void 0 && (t.validationIssues = n), t;
|
|
3810
3850
|
}
|
|
3811
|
-
function
|
|
3851
|
+
function wi(e) {
|
|
3812
3852
|
return e instanceof Error && e.kind === "data_app_query_error";
|
|
3813
3853
|
}
|
|
3814
3854
|
function ee(e, r = e.kind) {
|
|
3815
|
-
const t =
|
|
3855
|
+
const t = ut(e);
|
|
3816
3856
|
if (t.ok)
|
|
3817
3857
|
return null;
|
|
3818
3858
|
const n = t.errors.map(
|
|
3819
3859
|
(o) => o.path ? `${o.code} at ${o.path}: ${o.message}` : `${o.code}: ${o.message}`
|
|
3820
|
-
).join("; "), i =
|
|
3860
|
+
).join("; "), i = Nr(
|
|
3821
3861
|
e,
|
|
3822
3862
|
r,
|
|
3823
3863
|
t
|
|
@@ -3831,7 +3871,7 @@ function ee(e, r = e.kind) {
|
|
|
3831
3871
|
}
|
|
3832
3872
|
);
|
|
3833
3873
|
}
|
|
3834
|
-
function
|
|
3874
|
+
function Nr(e, r, t) {
|
|
3835
3875
|
return {
|
|
3836
3876
|
...e != null && e.id ? { intentId: e.id } : {},
|
|
3837
3877
|
...e ? { intent: e } : {},
|
|
@@ -3870,7 +3910,7 @@ function Kr(e, r, t) {
|
|
|
3870
3910
|
}
|
|
3871
3911
|
};
|
|
3872
3912
|
}
|
|
3873
|
-
function
|
|
3913
|
+
function A(e, r, t, n) {
|
|
3874
3914
|
return JSON.stringify({
|
|
3875
3915
|
intent: e,
|
|
3876
3916
|
activeInputs: r,
|
|
@@ -3878,13 +3918,13 @@ function q(e, r, t, n) {
|
|
|
3878
3918
|
error: t == null ? void 0 : t.message
|
|
3879
3919
|
});
|
|
3880
3920
|
}
|
|
3881
|
-
function
|
|
3921
|
+
function Ii() {
|
|
3882
3922
|
return {
|
|
3883
3923
|
executeAnalysis: (e, r, t) => G(
|
|
3884
3924
|
e,
|
|
3885
3925
|
r,
|
|
3886
3926
|
t ?? {}
|
|
3887
|
-
).then(
|
|
3927
|
+
).then(Wr),
|
|
3888
3928
|
executeMetric: (e, r) => G(e, r),
|
|
3889
3929
|
executeRecords: (e, r) => G(e, r),
|
|
3890
3930
|
executeInputOptions: (e, r) => G(e, r),
|
|
@@ -3897,7 +3937,7 @@ async function G(e, r, t) {
|
|
|
3897
3937
|
throw new Error(
|
|
3898
3938
|
"SemaphorDataAppProvider needs a token to execute queries."
|
|
3899
3939
|
);
|
|
3900
|
-
const n =
|
|
3940
|
+
const n = Ri(r), i = Ai(e, n);
|
|
3901
3941
|
let o;
|
|
3902
3942
|
try {
|
|
3903
3943
|
o = await fetch(n, {
|
|
@@ -3911,7 +3951,7 @@ async function G(e, r, t) {
|
|
|
3911
3951
|
activeInputs: r.activeInputs,
|
|
3912
3952
|
...t ? { analysisOptions: t } : {},
|
|
3913
3953
|
resultShape: e.kind,
|
|
3914
|
-
...
|
|
3954
|
+
...qi(r) ? { debug: { responseDetail: "debug" } } : {}
|
|
3915
3955
|
})
|
|
3916
3956
|
});
|
|
3917
3957
|
} catch (f) {
|
|
@@ -3919,15 +3959,15 @@ async function G(e, r, t) {
|
|
|
3919
3959
|
`${i}: ${f instanceof Error ? f.message : String(f)}`
|
|
3920
3960
|
);
|
|
3921
3961
|
}
|
|
3922
|
-
const u = await
|
|
3962
|
+
const u = await ki(o);
|
|
3923
3963
|
if (!o.ok || u.error)
|
|
3924
|
-
throw
|
|
3964
|
+
throw xi(
|
|
3925
3965
|
`${i}: ${u.error || `Semaphor Data App execution failed with status ${o.status}.`}`,
|
|
3926
3966
|
u
|
|
3927
3967
|
);
|
|
3928
3968
|
return u;
|
|
3929
3969
|
}
|
|
3930
|
-
function
|
|
3970
|
+
function xi(e, r) {
|
|
3931
3971
|
var t;
|
|
3932
3972
|
return Ae(e, {
|
|
3933
3973
|
requestId: r.requestId,
|
|
@@ -3936,20 +3976,20 @@ function hi(e, r) {
|
|
|
3936
3976
|
validation: (t = r.executionResult) == null ? void 0 : t.validation
|
|
3937
3977
|
});
|
|
3938
3978
|
}
|
|
3939
|
-
function
|
|
3979
|
+
function qi(e) {
|
|
3940
3980
|
const r = e.debug;
|
|
3941
3981
|
return r ? r === !0 ? !0 : r.enabled !== !1 && r.requestServerDebug !== !1 : !1;
|
|
3942
3982
|
}
|
|
3943
|
-
function
|
|
3983
|
+
function Ai(e, r) {
|
|
3944
3984
|
return [
|
|
3945
3985
|
`Semaphor ${e.kind} query`,
|
|
3946
3986
|
e.id ? `id=${e.id}` : void 0,
|
|
3947
3987
|
e.label ? `label=${e.label}` : void 0,
|
|
3948
|
-
|
|
3949
|
-
`endpoint=${
|
|
3988
|
+
Ci(e),
|
|
3989
|
+
`endpoint=${Ti(r)}`
|
|
3950
3990
|
].filter((t) => !!t).join(" ");
|
|
3951
3991
|
}
|
|
3952
|
-
function
|
|
3992
|
+
function Ci(e) {
|
|
3953
3993
|
const r = "source" in e ? e.source : void 0;
|
|
3954
3994
|
if (!(!r || typeof r != "object")) {
|
|
3955
3995
|
if (r.kind === "semantic")
|
|
@@ -3968,7 +4008,7 @@ function Si(e) {
|
|
|
3968
4008
|
return r.connectionId ? `source=${r.connectionId}` : void 0;
|
|
3969
4009
|
}
|
|
3970
4010
|
}
|
|
3971
|
-
function
|
|
4011
|
+
function Ti(e) {
|
|
3972
4012
|
if (!e)
|
|
3973
4013
|
return "/api/v1/data-app/execute";
|
|
3974
4014
|
try {
|
|
@@ -3977,7 +4017,7 @@ function wi(e) {
|
|
|
3977
4017
|
return e;
|
|
3978
4018
|
}
|
|
3979
4019
|
}
|
|
3980
|
-
async function
|
|
4020
|
+
async function ki(e) {
|
|
3981
4021
|
const r = await e.text().catch(() => "");
|
|
3982
4022
|
if (!r.trim())
|
|
3983
4023
|
return e.ok ? {
|
|
@@ -3990,52 +4030,52 @@ async function Ii(e) {
|
|
|
3990
4030
|
error: "Semaphor Data App execution returned invalid JSON.",
|
|
3991
4031
|
details: r
|
|
3992
4032
|
} : {
|
|
3993
|
-
error:
|
|
4033
|
+
error: Ei(e, r),
|
|
3994
4034
|
details: r
|
|
3995
4035
|
};
|
|
3996
4036
|
}
|
|
3997
4037
|
}
|
|
3998
|
-
function
|
|
4038
|
+
function Ei(e, r) {
|
|
3999
4039
|
const t = e.statusText ? ` ${e.statusText}` : "", n = r.replace(/\s+/g, " ").trim();
|
|
4000
4040
|
return n ? `Semaphor Data App execution failed with status ${e.status}${t}: ${n.slice(0, 240)}` : `Semaphor Data App execution failed with status ${e.status}${t}.`;
|
|
4001
4041
|
}
|
|
4002
|
-
function
|
|
4003
|
-
const r =
|
|
4042
|
+
function Ri(e) {
|
|
4043
|
+
const r = Li(e).replace(/\/+$/, "");
|
|
4004
4044
|
return r ? r.endsWith("/api") ? `${r}/v1/data-app/execute` : `${r}/api/v1/data-app/execute` : "/api/v1/data-app/execute";
|
|
4005
4045
|
}
|
|
4006
|
-
function
|
|
4046
|
+
function Li(e) {
|
|
4007
4047
|
if (e.apiBaseUrl)
|
|
4008
4048
|
return e.apiBaseUrl;
|
|
4009
4049
|
if (!e.token)
|
|
4010
4050
|
return "";
|
|
4011
4051
|
try {
|
|
4012
|
-
return
|
|
4052
|
+
return dt(e.token).apiServiceUrl || "";
|
|
4013
4053
|
} catch {
|
|
4014
4054
|
return "";
|
|
4015
4055
|
}
|
|
4016
4056
|
}
|
|
4017
|
-
const
|
|
4018
|
-
function
|
|
4057
|
+
const Mr = Ie({});
|
|
4058
|
+
function $i() {
|
|
4019
4059
|
if (!(typeof window > "u"))
|
|
4020
4060
|
return window.__SEMAPHOR_DATA_APP_RUNTIME__;
|
|
4021
4061
|
}
|
|
4022
|
-
function
|
|
4023
|
-
return Q(
|
|
4062
|
+
function Oi() {
|
|
4063
|
+
return Q(Mr);
|
|
4024
4064
|
}
|
|
4025
|
-
function
|
|
4065
|
+
function eo(e) {
|
|
4026
4066
|
const [r, t] = z(e.defaultValue), n = Object.prototype.hasOwnProperty.call(e, "value"), i = n ? e.value : r, o = I(
|
|
4027
|
-
() =>
|
|
4067
|
+
() => hr(e.options),
|
|
4028
4068
|
[e.options]
|
|
4029
|
-
), u =
|
|
4069
|
+
), u = D(
|
|
4030
4070
|
(d) => {
|
|
4031
|
-
var
|
|
4071
|
+
var g;
|
|
4032
4072
|
const c = d;
|
|
4033
|
-
(
|
|
4073
|
+
(g = e.onValueChange) == null || g.call(e, c), n || t(c);
|
|
4034
4074
|
},
|
|
4035
4075
|
[n, e]
|
|
4036
|
-
), f =
|
|
4076
|
+
), f = D(() => u(void 0), [u]);
|
|
4037
4077
|
return I(() => {
|
|
4038
|
-
const d =
|
|
4078
|
+
const d = br(e);
|
|
4039
4079
|
return {
|
|
4040
4080
|
id: e.id,
|
|
4041
4081
|
kind: e.kind,
|
|
@@ -4063,8 +4103,8 @@ function Ui(e) {
|
|
|
4063
4103
|
};
|
|
4064
4104
|
}, [f, o, u, e, i]);
|
|
4065
4105
|
}
|
|
4066
|
-
function
|
|
4067
|
-
const [r, t] = z(() =>
|
|
4106
|
+
function ro(e) {
|
|
4107
|
+
const [r, t] = z(() => Mi(e));
|
|
4068
4108
|
return B(() => {
|
|
4069
4109
|
t((n) => {
|
|
4070
4110
|
let i = n;
|
|
@@ -4077,13 +4117,13 @@ function Gi(e) {
|
|
|
4077
4117
|
const i = Object.prototype.hasOwnProperty.call(
|
|
4078
4118
|
n,
|
|
4079
4119
|
"value"
|
|
4080
|
-
), o = i ? n.value : r[n.id], u =
|
|
4120
|
+
), o = i ? n.value : r[n.id], u = hr(n.options), f = (g) => {
|
|
4081
4121
|
var m;
|
|
4082
|
-
(m = n.onValueChange) == null || m.call(n,
|
|
4122
|
+
(m = n.onValueChange) == null || m.call(n, g), i || t((v) => ({
|
|
4083
4123
|
...v,
|
|
4084
|
-
[n.id]:
|
|
4124
|
+
[n.id]: g
|
|
4085
4125
|
}));
|
|
4086
|
-
}, d = () => f(void 0), c =
|
|
4126
|
+
}, d = () => f(void 0), c = br(n);
|
|
4087
4127
|
return {
|
|
4088
4128
|
id: n.id,
|
|
4089
4129
|
kind: n.kind,
|
|
@@ -4113,29 +4153,29 @@ function Gi(e) {
|
|
|
4113
4153
|
[e, r]
|
|
4114
4154
|
);
|
|
4115
4155
|
}
|
|
4116
|
-
function
|
|
4117
|
-
const t = (r == null ? void 0 : r.status) === "success" ? r.options : void 0, n = I(() =>
|
|
4156
|
+
function to(e, r) {
|
|
4157
|
+
const t = (r == null ? void 0 : r.status) === "success" ? r.options : void 0, n = I(() => Bi(t), [t]);
|
|
4118
4158
|
B(() => {
|
|
4119
|
-
|
|
4159
|
+
Di(e.value, t) || e.clear();
|
|
4120
4160
|
}, [e, n, r == null ? void 0 : r.status, t]);
|
|
4121
4161
|
}
|
|
4122
|
-
function
|
|
4162
|
+
function Di(e, r) {
|
|
4123
4163
|
if (!ue(e) || r === void 0)
|
|
4124
4164
|
return !0;
|
|
4125
4165
|
const t = new Set(
|
|
4126
|
-
r.map((i) =>
|
|
4166
|
+
r.map((i) => mr(i.value))
|
|
4127
4167
|
);
|
|
4128
4168
|
return (Array.isArray(e) ? e : [e]).every(
|
|
4129
|
-
(i) => t.has(
|
|
4169
|
+
(i) => t.has(mr(i))
|
|
4130
4170
|
);
|
|
4131
4171
|
}
|
|
4132
|
-
function
|
|
4172
|
+
function Bi(e) {
|
|
4133
4173
|
return JSON.stringify((e || []).map((r) => r.value));
|
|
4134
4174
|
}
|
|
4135
|
-
function
|
|
4175
|
+
function mr(e) {
|
|
4136
4176
|
return `${typeof e}:${String(e)}`;
|
|
4137
4177
|
}
|
|
4138
|
-
function
|
|
4178
|
+
function no(e, r = {}) {
|
|
4139
4179
|
const t = I(
|
|
4140
4180
|
() => r.inputs ? {
|
|
4141
4181
|
...e,
|
|
@@ -4147,37 +4187,37 @@ function Yi(e, r = {}) {
|
|
|
4147
4187
|
case "metric":
|
|
4148
4188
|
return {
|
|
4149
4189
|
queryKind: t.queryKind,
|
|
4150
|
-
request:
|
|
4190
|
+
request: yi(t)
|
|
4151
4191
|
};
|
|
4152
4192
|
case "analysis":
|
|
4153
4193
|
return {
|
|
4154
4194
|
queryKind: t.queryKind,
|
|
4155
|
-
request:
|
|
4195
|
+
request: mi(t)
|
|
4156
4196
|
};
|
|
4157
4197
|
case "records":
|
|
4158
4198
|
return {
|
|
4159
4199
|
queryKind: t.queryKind,
|
|
4160
|
-
request:
|
|
4200
|
+
request: hi(t)
|
|
4161
4201
|
};
|
|
4162
4202
|
case "inputOptions":
|
|
4163
4203
|
return {
|
|
4164
4204
|
queryKind: t.queryKind,
|
|
4165
|
-
request:
|
|
4205
|
+
request: bi(t)
|
|
4166
4206
|
};
|
|
4167
4207
|
case "sql":
|
|
4168
4208
|
return {
|
|
4169
4209
|
queryKind: t.queryKind,
|
|
4170
|
-
request:
|
|
4210
|
+
request: vi(t)
|
|
4171
4211
|
};
|
|
4172
4212
|
case "matrix":
|
|
4173
4213
|
return {
|
|
4174
4214
|
queryKind: t.queryKind,
|
|
4175
|
-
request:
|
|
4215
|
+
request: Si(t)
|
|
4176
4216
|
};
|
|
4177
4217
|
default:
|
|
4178
4218
|
return Se(t);
|
|
4179
4219
|
}
|
|
4180
|
-
}, [t]), i =
|
|
4220
|
+
}, [t]), i = Nt({
|
|
4181
4221
|
spec: t,
|
|
4182
4222
|
queryKind: n.queryKind,
|
|
4183
4223
|
queryKey: n.request.queryKey,
|
|
@@ -4197,9 +4237,9 @@ function Yi(e, r = {}) {
|
|
|
4197
4237
|
i.start,
|
|
4198
4238
|
i.success
|
|
4199
4239
|
]
|
|
4200
|
-
), f =
|
|
4240
|
+
), f = D(
|
|
4201
4241
|
(l) => {
|
|
4202
|
-
var K, T, N, $, S, w, L, x,
|
|
4242
|
+
var K, T, N, $, S, w, L, x, O;
|
|
4203
4243
|
const b = n.request;
|
|
4204
4244
|
if (b.intent)
|
|
4205
4245
|
switch (n.queryKind) {
|
|
@@ -4232,7 +4272,7 @@ function Yi(e, r = {}) {
|
|
|
4232
4272
|
l
|
|
4233
4273
|
);
|
|
4234
4274
|
case "matrix":
|
|
4235
|
-
return (
|
|
4275
|
+
return (O = (x = l.executor) == null ? void 0 : x.executeMatrix) == null ? void 0 : O.call(
|
|
4236
4276
|
x,
|
|
4237
4277
|
b.intent,
|
|
4238
4278
|
l
|
|
@@ -4242,13 +4282,13 @@ function Yi(e, r = {}) {
|
|
|
4242
4282
|
}
|
|
4243
4283
|
},
|
|
4244
4284
|
[n]
|
|
4245
|
-
), d =
|
|
4285
|
+
), d = Ni(
|
|
4246
4286
|
n.request.queryKey,
|
|
4247
4287
|
f,
|
|
4248
4288
|
n.request.idleData,
|
|
4249
4289
|
n.request.activeInputs,
|
|
4250
4290
|
u
|
|
4251
|
-
), c = i.queryId,
|
|
4291
|
+
), c = i.queryId, g = i.validationFailure;
|
|
4252
4292
|
B(() => {
|
|
4253
4293
|
const l = n.request.error;
|
|
4254
4294
|
if (!l) {
|
|
@@ -4256,22 +4296,22 @@ function Yi(e, r = {}) {
|
|
|
4256
4296
|
return;
|
|
4257
4297
|
}
|
|
4258
4298
|
const b = `${c}:${l.message}`;
|
|
4259
|
-
o.current !== b && (o.current = b,
|
|
4299
|
+
o.current !== b && (o.current = b, g(l));
|
|
4260
4300
|
}, [
|
|
4261
4301
|
n.request.error,
|
|
4262
4302
|
n.request.queryKey,
|
|
4263
4303
|
c,
|
|
4264
|
-
|
|
4304
|
+
g
|
|
4265
4305
|
]);
|
|
4266
|
-
const m = n.request.error ? n.request.idleData : d.data, v = n.request.error ? "error" : d.status,
|
|
4306
|
+
const m = n.request.error ? n.request.idleData : d.data, v = n.request.error ? "error" : d.status, y = !n.request.error && d.status === "loading", h = n.request.error || d.error, C = i.trace;
|
|
4267
4307
|
switch (n.queryKind) {
|
|
4268
4308
|
case "metric": {
|
|
4269
4309
|
const l = m, b = J({
|
|
4270
4310
|
queryKind: n.queryKind,
|
|
4271
4311
|
status: v,
|
|
4272
|
-
isLoading:
|
|
4312
|
+
isLoading: y,
|
|
4273
4313
|
error: h,
|
|
4274
|
-
trace:
|
|
4314
|
+
trace: C,
|
|
4275
4315
|
payload: l,
|
|
4276
4316
|
activeInputs: n.request.activeInputs,
|
|
4277
4317
|
isStale: d.isStale
|
|
@@ -4279,7 +4319,6 @@ function Yi(e, r = {}) {
|
|
|
4279
4319
|
return {
|
|
4280
4320
|
id: t.id,
|
|
4281
4321
|
intent: n.request.intent,
|
|
4282
|
-
value: (l == null ? void 0 : l.value) ?? null,
|
|
4283
4322
|
primaryValue: (l == null ? void 0 : l.primaryValue) ?? null,
|
|
4284
4323
|
measures: l == null ? void 0 : l.measures,
|
|
4285
4324
|
measureBindings: l == null ? void 0 : l.measureBindings,
|
|
@@ -4293,12 +4332,12 @@ function Yi(e, r = {}) {
|
|
|
4293
4332
|
};
|
|
4294
4333
|
}
|
|
4295
4334
|
case "analysis": {
|
|
4296
|
-
const l =
|
|
4335
|
+
const l = Wr(m), b = J({
|
|
4297
4336
|
queryKind: n.queryKind,
|
|
4298
4337
|
status: v,
|
|
4299
|
-
isLoading:
|
|
4338
|
+
isLoading: y,
|
|
4300
4339
|
error: h,
|
|
4301
|
-
trace:
|
|
4340
|
+
trace: C,
|
|
4302
4341
|
payload: l,
|
|
4303
4342
|
activeInputs: n.request.activeInputs,
|
|
4304
4343
|
isStale: d.isStale
|
|
@@ -4314,9 +4353,9 @@ function Yi(e, r = {}) {
|
|
|
4314
4353
|
const l = m, b = J({
|
|
4315
4354
|
queryKind: n.queryKind,
|
|
4316
4355
|
status: v,
|
|
4317
|
-
isLoading:
|
|
4356
|
+
isLoading: y,
|
|
4318
4357
|
error: h,
|
|
4319
|
-
trace:
|
|
4358
|
+
trace: C,
|
|
4320
4359
|
payload: l,
|
|
4321
4360
|
activeInputs: n.request.activeInputs,
|
|
4322
4361
|
isStale: d.isStale
|
|
@@ -4336,9 +4375,9 @@ function Yi(e, r = {}) {
|
|
|
4336
4375
|
const l = m, b = J({
|
|
4337
4376
|
queryKind: n.queryKind,
|
|
4338
4377
|
status: v,
|
|
4339
|
-
isLoading:
|
|
4378
|
+
isLoading: y,
|
|
4340
4379
|
error: h,
|
|
4341
|
-
trace:
|
|
4380
|
+
trace: C,
|
|
4342
4381
|
payload: l,
|
|
4343
4382
|
activeInputs: n.request.activeInputs,
|
|
4344
4383
|
isStale: d.isStale
|
|
@@ -4354,9 +4393,9 @@ function Yi(e, r = {}) {
|
|
|
4354
4393
|
const l = m, b = J({
|
|
4355
4394
|
queryKind: n.queryKind,
|
|
4356
4395
|
status: v,
|
|
4357
|
-
isLoading:
|
|
4396
|
+
isLoading: y,
|
|
4358
4397
|
error: h,
|
|
4359
|
-
trace:
|
|
4398
|
+
trace: C,
|
|
4360
4399
|
payload: l,
|
|
4361
4400
|
activeInputs: n.request.activeInputs,
|
|
4362
4401
|
isStale: d.isStale
|
|
@@ -4377,9 +4416,9 @@ function Yi(e, r = {}) {
|
|
|
4377
4416
|
const l = m, b = J({
|
|
4378
4417
|
queryKind: n.queryKind,
|
|
4379
4418
|
status: v,
|
|
4380
|
-
isLoading:
|
|
4419
|
+
isLoading: y,
|
|
4381
4420
|
error: h,
|
|
4382
|
-
trace:
|
|
4421
|
+
trace: C,
|
|
4383
4422
|
payload: l,
|
|
4384
4423
|
activeInputs: n.request.activeInputs,
|
|
4385
4424
|
isStale: d.isStale
|
|
@@ -4399,7 +4438,7 @@ function Yi(e, r = {}) {
|
|
|
4399
4438
|
}
|
|
4400
4439
|
function J(e) {
|
|
4401
4440
|
var o, u, f;
|
|
4402
|
-
const r =
|
|
4441
|
+
const r = Ki(e.payload) ?? ((o = e.error) == null ? void 0 : o.executionResult), t = ((u = e.error) == null ? void 0 : u.validation) ?? (r == null ? void 0 : r.validation), n = r == null ? void 0 : r.coverage, i = r == null ? void 0 : r.diagnosticFeedback;
|
|
4403
4442
|
return {
|
|
4404
4443
|
status: e.status,
|
|
4405
4444
|
executionStatus: r == null ? void 0 : r.status,
|
|
@@ -4408,8 +4447,8 @@ function J(e) {
|
|
|
4408
4447
|
coverage: n,
|
|
4409
4448
|
diagnosticFeedback: i,
|
|
4410
4449
|
isLoading: e.isLoading,
|
|
4411
|
-
isEmpty:
|
|
4412
|
-
isPartial:
|
|
4450
|
+
isEmpty: _i(e.queryKind, e.payload, e.status),
|
|
4451
|
+
isPartial: Wi(e.payload, r),
|
|
4413
4452
|
isFiltered: !!((f = e.activeInputs) != null && f.some(
|
|
4414
4453
|
(d) => d.kind === "filter" && d.isActive
|
|
4415
4454
|
)),
|
|
@@ -4419,23 +4458,23 @@ function J(e) {
|
|
|
4419
4458
|
trace: e.trace
|
|
4420
4459
|
};
|
|
4421
4460
|
}
|
|
4422
|
-
function
|
|
4461
|
+
function Ki(e) {
|
|
4423
4462
|
const r = e;
|
|
4424
4463
|
return r == null ? void 0 : r.executionResult;
|
|
4425
4464
|
}
|
|
4426
|
-
function
|
|
4465
|
+
function Wi(e, r) {
|
|
4427
4466
|
var n, i;
|
|
4428
4467
|
const t = !!(e != null && e.rowLimitExceeded);
|
|
4429
4468
|
return !!((r == null ? void 0 : r.status) === "partial" || ((n = r == null ? void 0 : r.diagnosticFeedback) == null ? void 0 : n.status) === "partial" || (r == null ? void 0 : r.status) !== "failed" && ((i = r == null ? void 0 : r.coverage) != null && i.missingObligations.length) || t);
|
|
4430
4469
|
}
|
|
4431
|
-
function
|
|
4470
|
+
function _i(e, r, t) {
|
|
4432
4471
|
var n, i, o, u, f;
|
|
4433
4472
|
if (t !== "success")
|
|
4434
4473
|
return !1;
|
|
4435
4474
|
switch (e) {
|
|
4436
4475
|
case "metric": {
|
|
4437
4476
|
const d = r;
|
|
4438
|
-
return (d == null ? void 0 : d.
|
|
4477
|
+
return (d == null ? void 0 : d.primaryValue) == null && !_(d == null ? void 0 : d.records);
|
|
4439
4478
|
}
|
|
4440
4479
|
case "analysis": {
|
|
4441
4480
|
const d = r;
|
|
@@ -4466,47 +4505,47 @@ function $i(e, r, t) {
|
|
|
4466
4505
|
function _(e) {
|
|
4467
4506
|
return Array.isArray(e) && e.length > 0;
|
|
4468
4507
|
}
|
|
4469
|
-
function
|
|
4470
|
-
const o =
|
|
4508
|
+
function Ni(e, r, t, n, i) {
|
|
4509
|
+
const o = Oi(), u = E(r), f = E(n), [d, c] = z({
|
|
4471
4510
|
status: "idle",
|
|
4472
4511
|
data: t,
|
|
4473
4512
|
error: null,
|
|
4474
4513
|
isStale: !1
|
|
4475
4514
|
});
|
|
4476
4515
|
return u.current = r, f.current = n, B(() => {
|
|
4477
|
-
let
|
|
4516
|
+
let g;
|
|
4478
4517
|
try {
|
|
4479
|
-
|
|
4518
|
+
g = u.current({
|
|
4480
4519
|
...o,
|
|
4481
4520
|
activeInputs: f.current
|
|
4482
4521
|
});
|
|
4483
|
-
} catch (
|
|
4484
|
-
i == null || i.failure(
|
|
4522
|
+
} catch (y) {
|
|
4523
|
+
i == null || i.failure(y, 0), c({
|
|
4485
4524
|
status: "error",
|
|
4486
4525
|
data: t,
|
|
4487
|
-
error:
|
|
4526
|
+
error: je(y),
|
|
4488
4527
|
isStale: !1
|
|
4489
4528
|
});
|
|
4490
4529
|
return;
|
|
4491
4530
|
}
|
|
4492
|
-
if (!
|
|
4531
|
+
if (!g) {
|
|
4493
4532
|
c({ status: "idle", data: t, error: null, isStale: !1 });
|
|
4494
4533
|
return;
|
|
4495
4534
|
}
|
|
4496
4535
|
let m = !1;
|
|
4497
|
-
const v =
|
|
4498
|
-
return i == null || i.start(), c((
|
|
4536
|
+
const v = Fr();
|
|
4537
|
+
return i == null || i.start(), c((y) => ({
|
|
4499
4538
|
status: "loading",
|
|
4500
|
-
data:
|
|
4539
|
+
data: y.data,
|
|
4501
4540
|
error: null,
|
|
4502
|
-
isStale:
|
|
4503
|
-
})),
|
|
4504
|
-
m ? i == null || i.ignored("superseded") : (i == null || i.success(
|
|
4505
|
-
}).catch((
|
|
4506
|
-
m ? i == null || i.ignored("superseded") : (i == null || i.failure(
|
|
4541
|
+
isStale: y.isStale || y.status === "success"
|
|
4542
|
+
})), g.then((y) => {
|
|
4543
|
+
m ? i == null || i.ignored("superseded") : (i == null || i.success(y, yr(v)), c({ status: "success", data: y, error: null, isStale: !1 }));
|
|
4544
|
+
}).catch((y) => {
|
|
4545
|
+
m ? i == null || i.ignored("superseded") : (i == null || i.failure(y, yr(v)), c({
|
|
4507
4546
|
status: "error",
|
|
4508
4547
|
data: t,
|
|
4509
|
-
error:
|
|
4548
|
+
error: je(y),
|
|
4510
4549
|
isStale: !1
|
|
4511
4550
|
}));
|
|
4512
4551
|
}), () => {
|
|
@@ -4514,13 +4553,13 @@ function Di(e, r, t, n, i) {
|
|
|
4514
4553
|
};
|
|
4515
4554
|
}, [t, e, o, i]), d;
|
|
4516
4555
|
}
|
|
4517
|
-
function
|
|
4556
|
+
function Fr() {
|
|
4518
4557
|
return typeof performance < "u" && performance.now ? performance.now() : Date.now();
|
|
4519
4558
|
}
|
|
4520
|
-
function
|
|
4521
|
-
return Math.max(0, Math.round(
|
|
4559
|
+
function yr(e) {
|
|
4560
|
+
return Math.max(0, Math.round(Fr() - e));
|
|
4522
4561
|
}
|
|
4523
|
-
function
|
|
4562
|
+
function Mi(e) {
|
|
4524
4563
|
return Object.fromEntries(
|
|
4525
4564
|
e.filter((r) => r.defaultValue !== void 0).map((r) => [r.id, r.defaultValue])
|
|
4526
4565
|
);
|
|
@@ -4528,18 +4567,18 @@ function Oi(e) {
|
|
|
4528
4567
|
function Se(e) {
|
|
4529
4568
|
throw new Error(`Unsupported Semaphor query kind: ${JSON.stringify(e)}`);
|
|
4530
4569
|
}
|
|
4531
|
-
function
|
|
4570
|
+
function Fi(e) {
|
|
4532
4571
|
return !e || typeof e == "boolean" || e.enabled === !1 ? null : e.autoRenderDevtools === !0 ? {} : e.autoRenderDevtools ? e.autoRenderDevtools : null;
|
|
4533
4572
|
}
|
|
4534
|
-
function
|
|
4573
|
+
function io({
|
|
4535
4574
|
token: e,
|
|
4536
4575
|
apiBaseUrl: r,
|
|
4537
4576
|
executor: t,
|
|
4538
4577
|
debug: n,
|
|
4539
4578
|
children: i
|
|
4540
4579
|
}) {
|
|
4541
|
-
var
|
|
4542
|
-
const o =
|
|
4580
|
+
var y;
|
|
4581
|
+
const o = $i(), u = ((y = o == null ? void 0 : o.authToken) == null ? void 0 : y.accessToken) || e, f = (o == null ? void 0 : o.dataApiBaseUrl) || (o == null ? void 0 : o.apiBaseUrl) || r, d = (o == null ? void 0 : o.debug) ?? n, c = Fi(d), g = I(() => Ii(), []), m = t || g, v = I(
|
|
4543
4582
|
() => ({
|
|
4544
4583
|
token: u,
|
|
4545
4584
|
apiBaseUrl: f,
|
|
@@ -4548,25 +4587,26 @@ function Xi({
|
|
|
4548
4587
|
}),
|
|
4549
4588
|
[f, d, m, u]
|
|
4550
4589
|
);
|
|
4551
|
-
return /* @__PURE__ */ a(
|
|
4590
|
+
return /* @__PURE__ */ a(Bt, { debug: d, children: /* @__PURE__ */ p(Mr.Provider, { value: v, children: [
|
|
4552
4591
|
i,
|
|
4553
|
-
c ? /* @__PURE__ */ a(
|
|
4592
|
+
c ? /* @__PURE__ */ a(_t, { ...c }) : null
|
|
4554
4593
|
] }) });
|
|
4555
4594
|
}
|
|
4556
4595
|
export {
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4596
|
+
io as SemaphorDataAppProvider,
|
|
4597
|
+
_t as SemaphorDevtools,
|
|
4598
|
+
Zi as SemaphorDevtoolsInspectButton,
|
|
4599
|
+
Xi as SemaphorViewBoundary,
|
|
4600
|
+
Ii as createSemaphorQueryExecutor,
|
|
4601
|
+
Gi as defineSemaphorDataApp,
|
|
4602
|
+
Ji as defineSemaphorInput,
|
|
4603
|
+
Di as isSemaphorInputValueValidForOptions,
|
|
4604
|
+
Yi as semaphor,
|
|
4605
|
+
ao as semaphorMetricAggregate,
|
|
4606
|
+
lo as semaphorMetricMeasureBindingKey,
|
|
4607
|
+
to as useClearInvalidSemaphorInputValue,
|
|
4608
|
+
Tr as useSemaphorDevtools,
|
|
4609
|
+
eo as useSemaphorInput,
|
|
4610
|
+
ro as useSemaphorInputs,
|
|
4611
|
+
no as useSemaphorQuery
|
|
4572
4612
|
};
|