react-semaphor 0.1.387 → 0.1.388
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 +260 -99
- package/dist/data-app-sdk/index.cjs +39 -5
- package/dist/data-app-sdk/index.js +1570 -1359
- package/dist/types/analytics-protocol.d.ts +121 -0
- package/package.json +1 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { toSemaphorInputSnapshots as
|
|
2
|
-
import { jsxs as p, Fragment as
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { M as
|
|
5
|
-
import { X as
|
|
6
|
-
import { b as
|
|
1
|
+
import { toSemaphorInputSnapshots as Tr, toSemaphorInputBinding as Er, toSemaphorActiveInputSnapshots as J, toSemaphorMatrixIntent as kr, toSemaphorSqlIntent as Cr, toSemaphorInputOptionsIntent as Lr, toSemaphorRecordsIntent as Dr, toSemaphorAnalysisQueryOptions as Or, toSemaphorAnalysisIntent as Br, toSemaphorMetricIntent as Kr, hasSemaphorInputValue as re, normalizeSemaphorInputOptions as nr, toSemaphorInputSpec as ir } from "../data-app-sdk-adapters/index.js";
|
|
2
|
+
import { jsxs as p, Fragment as ke, jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as ge, useContext as H, useState as j, useRef as L, useEffect as B, useMemo as v, useId as or, useCallback as D, useReducer as Nr } from "react";
|
|
4
|
+
import { M as $r, a as Wr, S as Fr, E as _r } from "../chunks/search-0LmWwZzW.js";
|
|
5
|
+
import { X as zr, j as Mr } from "../chunks/x-IdR_js6f.js";
|
|
6
|
+
import { b as Pr } from "../chunks/validators-CHPH6ORs.js";
|
|
7
7
|
import "../chunks/analyze-result-contract-DuhlklhI.js";
|
|
8
|
-
function
|
|
8
|
+
function ae(e, r, t = {}) {
|
|
9
9
|
return {
|
|
10
|
-
...
|
|
10
|
+
...t,
|
|
11
11
|
name: e,
|
|
12
|
-
role:
|
|
12
|
+
role: r
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function Zn(e) {
|
|
16
16
|
return e;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function ei(e) {
|
|
19
19
|
return e;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const ri = {
|
|
22
22
|
source: {
|
|
23
23
|
semantic(e) {
|
|
24
24
|
return {
|
|
@@ -34,17 +34,17 @@ const Gn = {
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
field: {
|
|
37
|
-
measure(e,
|
|
38
|
-
return
|
|
37
|
+
measure(e, r) {
|
|
38
|
+
return ae(e, "measure", r);
|
|
39
39
|
},
|
|
40
|
-
dimension(e,
|
|
41
|
-
return
|
|
40
|
+
dimension(e, r) {
|
|
41
|
+
return ae(e, "dimension", r);
|
|
42
42
|
},
|
|
43
|
-
date(e,
|
|
44
|
-
return
|
|
43
|
+
date(e, r) {
|
|
44
|
+
return ae(e, "date", r);
|
|
45
45
|
},
|
|
46
|
-
id(e,
|
|
47
|
-
return
|
|
46
|
+
id(e, r) {
|
|
47
|
+
return ae(e, "id", r);
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
filter(e) {
|
|
@@ -53,15 +53,15 @@ const Gn = {
|
|
|
53
53
|
kind: "filter"
|
|
54
54
|
};
|
|
55
55
|
},
|
|
56
|
-
bindInput(e,
|
|
56
|
+
bindInput(e, r) {
|
|
57
57
|
return {
|
|
58
58
|
toAnalyticsInput() {
|
|
59
|
-
const [
|
|
60
|
-
...
|
|
61
|
-
inputId:
|
|
59
|
+
const [t] = Tr([e]), n = Er({
|
|
60
|
+
...r,
|
|
61
|
+
inputId: r.inputId || t.inputId
|
|
62
62
|
});
|
|
63
63
|
return {
|
|
64
|
-
...
|
|
64
|
+
...t,
|
|
65
65
|
inputId: n.inputId,
|
|
66
66
|
...n.kind ? { kind: n.kind } : {},
|
|
67
67
|
...n.controlRole ? { controlRole: n.controlRole } : {},
|
|
@@ -128,208 +128,208 @@ const Gn = {
|
|
|
128
128
|
queryKind: "matrix"
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
|
-
},
|
|
131
|
+
}, ve = 10, be = 100, Hr = 25, jr = 500, sr = {
|
|
132
132
|
enabled: !1,
|
|
133
133
|
queries: [],
|
|
134
134
|
getQuery: () => {
|
|
135
135
|
},
|
|
136
136
|
getQueries: () => []
|
|
137
|
-
},
|
|
137
|
+
}, De = ge(null), Oe = ge(null), Be = ge(
|
|
138
138
|
void 0
|
|
139
|
-
),
|
|
140
|
-
function
|
|
139
|
+
), P = [];
|
|
140
|
+
function Qr({
|
|
141
141
|
debug: e,
|
|
142
|
-
children:
|
|
142
|
+
children: r
|
|
143
143
|
}) {
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
),
|
|
149
|
-
|
|
150
|
-
i({ type: "config", config:
|
|
151
|
-
}, [
|
|
144
|
+
const t = v(() => Xt(e), [e]), [n, i] = Nr(
|
|
145
|
+
Mt,
|
|
146
|
+
t,
|
|
147
|
+
yr
|
|
148
|
+
), a = L(n), l = or(), [c, u] = j({ open: !1 });
|
|
149
|
+
a.current = n, B(() => {
|
|
150
|
+
i({ type: "config", config: t });
|
|
151
|
+
}, [t]), B(() => {
|
|
152
152
|
if (!n.enabled || !n.exposeWindowBridge || typeof window > "u")
|
|
153
153
|
return;
|
|
154
|
-
const S =
|
|
155
|
-
return
|
|
156
|
-
ownerId:
|
|
154
|
+
const S = Ut(() => a.current);
|
|
155
|
+
return Vr({
|
|
156
|
+
ownerId: l,
|
|
157
157
|
bridge: S
|
|
158
158
|
}), () => {
|
|
159
|
-
|
|
159
|
+
Ur(l);
|
|
160
160
|
};
|
|
161
|
-
}, [
|
|
162
|
-
const f =
|
|
163
|
-
|
|
164
|
-
}, []),
|
|
165
|
-
|
|
161
|
+
}, [l, n.enabled, n.exposeWindowBridge]);
|
|
162
|
+
const f = v(() => ({ state: n, dispatch: i }), [n]), m = D((S) => {
|
|
163
|
+
u({ open: !0, focus: S });
|
|
164
|
+
}, []), y = D(() => {
|
|
165
|
+
u((S) => ({ ...S, open: !1 }));
|
|
166
166
|
}, []), h = D((S) => {
|
|
167
|
-
|
|
168
|
-
}, []),
|
|
167
|
+
u({ open: !0, focus: S });
|
|
168
|
+
}, []), g = v(
|
|
169
169
|
() => ({
|
|
170
170
|
open: c.open,
|
|
171
171
|
focus: c.focus,
|
|
172
|
-
openDevtools:
|
|
173
|
-
closeDevtools:
|
|
172
|
+
openDevtools: m,
|
|
173
|
+
closeDevtools: y,
|
|
174
174
|
focusTrace: h
|
|
175
175
|
}),
|
|
176
176
|
[
|
|
177
|
-
g,
|
|
178
|
-
h,
|
|
179
177
|
y,
|
|
178
|
+
h,
|
|
179
|
+
m,
|
|
180
180
|
c.focus,
|
|
181
181
|
c.open
|
|
182
182
|
]
|
|
183
183
|
);
|
|
184
|
-
return /* @__PURE__ */
|
|
184
|
+
return /* @__PURE__ */ o(De.Provider, { value: f, children: /* @__PURE__ */ o(Oe.Provider, { value: g, children: r }) });
|
|
185
185
|
}
|
|
186
|
-
function
|
|
187
|
-
const
|
|
188
|
-
(
|
|
186
|
+
function Vr(e) {
|
|
187
|
+
const r = P.findIndex(
|
|
188
|
+
(t) => t.ownerId === e.ownerId
|
|
189
189
|
);
|
|
190
|
-
|
|
190
|
+
r >= 0 && P.splice(r, 1), P.push(e), ar();
|
|
191
191
|
}
|
|
192
|
-
function
|
|
193
|
-
const
|
|
194
|
-
(
|
|
192
|
+
function Ur(e) {
|
|
193
|
+
const r = P.findIndex(
|
|
194
|
+
(t) => t.ownerId === e
|
|
195
195
|
);
|
|
196
|
-
|
|
196
|
+
r >= 0 && P.splice(r, 1), ar();
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function ar() {
|
|
199
199
|
if (typeof window > "u")
|
|
200
200
|
return;
|
|
201
|
-
const e =
|
|
201
|
+
const e = P[P.length - 1];
|
|
202
202
|
e ? window.__SEMAPHOR_DEVTOOLS__ = e.bridge : delete window.__SEMAPHOR_DEVTOOLS__;
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function ti({
|
|
205
205
|
id: e,
|
|
206
|
-
title:
|
|
207
|
-
children:
|
|
206
|
+
title: r,
|
|
207
|
+
children: t
|
|
208
208
|
}) {
|
|
209
|
-
const n =
|
|
210
|
-
return /* @__PURE__ */
|
|
209
|
+
const n = v(() => ({ id: e, title: r }), [e, r]);
|
|
210
|
+
return /* @__PURE__ */ o(Be.Provider, { value: n, children: t });
|
|
211
211
|
}
|
|
212
|
-
function
|
|
212
|
+
function Gr({
|
|
213
213
|
buttonPosition: e = "bottom-right",
|
|
214
|
-
initialIsOpen:
|
|
215
|
-
panelPosition:
|
|
214
|
+
initialIsOpen: r = !1,
|
|
215
|
+
panelPosition: t = "right",
|
|
216
216
|
className: n,
|
|
217
217
|
style: i
|
|
218
218
|
} = {}) {
|
|
219
|
-
const
|
|
219
|
+
const a = dr(), l = H(Oe), [c, u] = j(""), [f, m] = j(!1), y = L(null), h = L(null), g = l == null ? void 0 : l.openDevtools, S = l == null ? void 0 : l.closeDevtools, E = (l == null ? void 0 : l.open) === !0;
|
|
220
220
|
B(() => {
|
|
221
|
-
|
|
221
|
+
mr();
|
|
222
222
|
}, []), B(() => {
|
|
223
|
-
|
|
224
|
-
}, [
|
|
225
|
-
if (!
|
|
223
|
+
r && a.enabled && (g == null || g());
|
|
224
|
+
}, [r, a.enabled, g]), B(() => {
|
|
225
|
+
if (!E || !S)
|
|
226
226
|
return;
|
|
227
|
-
const
|
|
228
|
-
var
|
|
229
|
-
const
|
|
230
|
-
|
|
227
|
+
const b = (I) => {
|
|
228
|
+
var A, R;
|
|
229
|
+
const k = I.target;
|
|
230
|
+
k instanceof Node && ((A = y.current) != null && A.contains(k) || (R = h.current) != null && R.contains(k) || S());
|
|
231
231
|
};
|
|
232
|
-
return document.addEventListener("pointerdown",
|
|
233
|
-
document.removeEventListener("pointerdown",
|
|
232
|
+
return document.addEventListener("pointerdown", b, !0), document.addEventListener("mousedown", b, !0), document.addEventListener("click", b, !0), () => {
|
|
233
|
+
document.removeEventListener("pointerdown", b, !0), document.removeEventListener("mousedown", b, !0), document.removeEventListener("click", b, !0);
|
|
234
234
|
};
|
|
235
|
-
}, [S,
|
|
236
|
-
const
|
|
237
|
-
() =>
|
|
238
|
-
[
|
|
239
|
-
),
|
|
240
|
-
() =>
|
|
241
|
-
[
|
|
242
|
-
),
|
|
243
|
-
() =>
|
|
244
|
-
[
|
|
245
|
-
),
|
|
246
|
-
() =>
|
|
247
|
-
[
|
|
235
|
+
}, [S, E]);
|
|
236
|
+
const d = v(
|
|
237
|
+
() => ft(a.queries),
|
|
238
|
+
[a.queries]
|
|
239
|
+
), x = v(
|
|
240
|
+
() => pt(a.queries, c),
|
|
241
|
+
[a.queries, c]
|
|
242
|
+
), N = v(
|
|
243
|
+
() => gt(x),
|
|
244
|
+
[x]
|
|
245
|
+
), C = v(
|
|
246
|
+
() => lr(x, l == null ? void 0 : l.focus) || x[0],
|
|
247
|
+
[x, l == null ? void 0 : l.focus]
|
|
248
248
|
);
|
|
249
|
-
return !
|
|
249
|
+
return !a.enabled || !l ? null : /* @__PURE__ */ p(ke, { children: [
|
|
250
250
|
/* @__PURE__ */ p(
|
|
251
251
|
"button",
|
|
252
252
|
{
|
|
253
|
-
ref:
|
|
253
|
+
ref: y,
|
|
254
254
|
type: "button",
|
|
255
|
-
"aria-label": "Open Semaphor
|
|
256
|
-
title: "Open Semaphor
|
|
255
|
+
"aria-label": "Open Semaphor Inspector",
|
|
256
|
+
title: "Open Semaphor Inspector",
|
|
257
257
|
className: n ? `${$} ${n}` : $,
|
|
258
258
|
style: {
|
|
259
|
-
...
|
|
260
|
-
...
|
|
261
|
-
...
|
|
259
|
+
...s.launcher,
|
|
260
|
+
...Kt(e),
|
|
261
|
+
...Nt(d.severity),
|
|
262
262
|
...i
|
|
263
263
|
},
|
|
264
|
-
onClick: () =>
|
|
264
|
+
onClick: () => l.openDevtools(),
|
|
265
265
|
children: [
|
|
266
|
-
/* @__PURE__ */
|
|
267
|
-
/* @__PURE__ */
|
|
268
|
-
|
|
266
|
+
/* @__PURE__ */ o(Yr, {}),
|
|
267
|
+
/* @__PURE__ */ o("span", { style: s.launcherText, children: d.total }),
|
|
268
|
+
d.issueCount > 0 ? /* @__PURE__ */ o("span", { style: s.launcherIssueCount, children: d.issueCount }) : null
|
|
269
269
|
]
|
|
270
270
|
}
|
|
271
271
|
),
|
|
272
|
-
|
|
272
|
+
l.open ? /* @__PURE__ */ p(
|
|
273
273
|
"div",
|
|
274
274
|
{
|
|
275
275
|
ref: h,
|
|
276
276
|
role: "dialog",
|
|
277
|
-
"aria-label": "Semaphor
|
|
277
|
+
"aria-label": "Semaphor Inspector",
|
|
278
278
|
"aria-modal": "false",
|
|
279
279
|
className: $,
|
|
280
280
|
style: {
|
|
281
|
-
...
|
|
282
|
-
|
|
283
|
-
...f ?
|
|
281
|
+
...s.panel,
|
|
282
|
+
...$t(t),
|
|
283
|
+
...f ? s.panelFullscreen : null
|
|
284
284
|
},
|
|
285
285
|
children: [
|
|
286
|
-
/* @__PURE__ */ p("div", { style:
|
|
287
|
-
/* @__PURE__ */ p("div", { style:
|
|
288
|
-
/* @__PURE__ */
|
|
289
|
-
/* @__PURE__ */ p("div", { style:
|
|
290
|
-
|
|
286
|
+
/* @__PURE__ */ p("div", { style: s.panelHeader, children: [
|
|
287
|
+
/* @__PURE__ */ p("div", { style: s.panelTitleBlock, children: [
|
|
288
|
+
/* @__PURE__ */ o("div", { style: s.panelTitle, children: "Semaphor Inspector" }),
|
|
289
|
+
/* @__PURE__ */ p("div", { style: s.panelSubtitle, children: [
|
|
290
|
+
d.total,
|
|
291
291
|
" queries · ",
|
|
292
|
-
|
|
292
|
+
d.loading,
|
|
293
293
|
" loading ·",
|
|
294
294
|
" ",
|
|
295
|
-
|
|
295
|
+
d.failed,
|
|
296
296
|
" failed"
|
|
297
297
|
] })
|
|
298
298
|
] }),
|
|
299
|
-
/* @__PURE__ */ p("div", { style:
|
|
300
|
-
/* @__PURE__ */
|
|
299
|
+
/* @__PURE__ */ p("div", { style: s.panelActions, children: [
|
|
300
|
+
/* @__PURE__ */ o(
|
|
301
301
|
"button",
|
|
302
302
|
{
|
|
303
303
|
type: "button",
|
|
304
|
-
"aria-label": f ? "Exit fullscreen Semaphor
|
|
305
|
-
title: f ? "Exit fullscreen Semaphor
|
|
306
|
-
style:
|
|
307
|
-
onClick: () =>
|
|
308
|
-
children: f ? /* @__PURE__ */
|
|
304
|
+
"aria-label": f ? "Exit fullscreen Semaphor Inspector" : "Enter fullscreen Semaphor Inspector",
|
|
305
|
+
title: f ? "Exit fullscreen Semaphor Inspector" : "Enter fullscreen Semaphor Inspector",
|
|
306
|
+
style: s.iconButton,
|
|
307
|
+
onClick: () => m((b) => !b),
|
|
308
|
+
children: f ? /* @__PURE__ */ o($r, { size: 15 }) : /* @__PURE__ */ o(Wr, { size: 15 })
|
|
309
309
|
}
|
|
310
310
|
),
|
|
311
|
-
/* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ o(
|
|
312
312
|
"button",
|
|
313
313
|
{
|
|
314
314
|
type: "button",
|
|
315
|
-
"aria-label": "Close Semaphor
|
|
316
|
-
style:
|
|
317
|
-
onClick:
|
|
318
|
-
children: /* @__PURE__ */
|
|
315
|
+
"aria-label": "Close Semaphor Inspector",
|
|
316
|
+
style: s.iconButton,
|
|
317
|
+
onClick: l.closeDevtools,
|
|
318
|
+
children: /* @__PURE__ */ o(zr, { size: 15 })
|
|
319
319
|
}
|
|
320
320
|
)
|
|
321
321
|
] })
|
|
322
322
|
] }),
|
|
323
|
-
/* @__PURE__ */ p("label", { style:
|
|
324
|
-
/* @__PURE__ */
|
|
325
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ p("label", { style: s.searchBox, children: [
|
|
324
|
+
/* @__PURE__ */ o(Fr, { size: 14 }),
|
|
325
|
+
/* @__PURE__ */ o(
|
|
326
326
|
"input",
|
|
327
327
|
{
|
|
328
328
|
"aria-label": "Search Semaphor traces",
|
|
329
329
|
value: c,
|
|
330
|
-
onChange: (
|
|
330
|
+
onChange: (b) => u(b.currentTarget.value),
|
|
331
331
|
placeholder: "Search traces",
|
|
332
|
-
style:
|
|
332
|
+
style: s.searchInput
|
|
333
333
|
}
|
|
334
334
|
)
|
|
335
335
|
] }),
|
|
@@ -337,73 +337,79 @@ function Jt({
|
|
|
337
337
|
"div",
|
|
338
338
|
{
|
|
339
339
|
style: {
|
|
340
|
-
...
|
|
341
|
-
...
|
|
340
|
+
...s.panelBody,
|
|
341
|
+
...Wt(t)
|
|
342
342
|
},
|
|
343
343
|
children: [
|
|
344
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ o(
|
|
345
345
|
"div",
|
|
346
346
|
{
|
|
347
347
|
style: {
|
|
348
|
-
...
|
|
349
|
-
...
|
|
348
|
+
...s.queryList,
|
|
349
|
+
...Ft()
|
|
350
350
|
},
|
|
351
351
|
"aria-label": "Registered queries",
|
|
352
|
-
children:
|
|
353
|
-
/* @__PURE__ */ p("div", { style:
|
|
354
|
-
/* @__PURE__ */
|
|
355
|
-
/* @__PURE__ */
|
|
352
|
+
children: x.length ? N.map((b) => /* @__PURE__ */ p("div", { style: s.queryGroup, children: [
|
|
353
|
+
/* @__PURE__ */ p("div", { style: s.queryGroupHeader, children: [
|
|
354
|
+
/* @__PURE__ */ o("span", { children: b.title }),
|
|
355
|
+
/* @__PURE__ */ o("span", { style: s.queryGroupCount, children: b.traces.length })
|
|
356
356
|
] }),
|
|
357
|
-
|
|
358
|
-
var
|
|
359
|
-
const
|
|
357
|
+
b.traces.length ? b.traces.map((I) => {
|
|
358
|
+
var oe;
|
|
359
|
+
const k = yt(I, C), A = me(I), R = pr(I), w = St(I), K = Ke(I), ne = vt(I), Q = bt(I), ie = ur(R);
|
|
360
360
|
return /* @__PURE__ */ p(
|
|
361
361
|
"button",
|
|
362
362
|
{
|
|
363
363
|
type: "button",
|
|
364
|
-
title: `${
|
|
364
|
+
title: `${A} · ${R} · ${K}`,
|
|
365
365
|
style: {
|
|
366
|
-
...
|
|
367
|
-
...
|
|
366
|
+
...s.queryListItem,
|
|
367
|
+
...k ? s.queryListItemSelected : null
|
|
368
368
|
},
|
|
369
|
-
onClick: () =>
|
|
369
|
+
onClick: () => l.focusTrace({
|
|
370
370
|
traceId: I.traceId,
|
|
371
371
|
queryId: I.queryId,
|
|
372
372
|
viewId: I.viewId
|
|
373
373
|
}),
|
|
374
374
|
children: [
|
|
375
|
-
/* @__PURE__ */ p("span", { style:
|
|
376
|
-
/* @__PURE__ */
|
|
377
|
-
/* @__PURE__ */
|
|
378
|
-
/* @__PURE__ */
|
|
375
|
+
/* @__PURE__ */ p("span", { style: s.queryListItemHeader, children: [
|
|
376
|
+
/* @__PURE__ */ o(Zr, { status: (oe = I.latestAttempt) == null ? void 0 : oe.status }),
|
|
377
|
+
/* @__PURE__ */ o("span", { style: s.queryListTitle, title: A, children: ne }),
|
|
378
|
+
/* @__PURE__ */ o(
|
|
379
|
+
"span",
|
|
380
|
+
{
|
|
381
|
+
style: {
|
|
382
|
+
...s.queryListKindChip,
|
|
383
|
+
...cr(ie)
|
|
384
|
+
},
|
|
385
|
+
children: R
|
|
386
|
+
}
|
|
387
|
+
)
|
|
379
388
|
] }),
|
|
380
|
-
/* @__PURE__ */
|
|
381
|
-
"span",
|
|
382
|
-
{
|
|
383
|
-
className: `${$}-source`,
|
|
384
|
-
style: l.queryListSource,
|
|
385
|
-
title: `${x} · ${k}`,
|
|
386
|
-
children: x
|
|
387
|
-
}
|
|
388
|
-
),
|
|
389
|
-
/* @__PURE__ */ s(
|
|
389
|
+
/* @__PURE__ */ p(
|
|
390
390
|
"span",
|
|
391
391
|
{
|
|
392
392
|
className: `${$}-source`,
|
|
393
|
-
style:
|
|
394
|
-
title:
|
|
395
|
-
children:
|
|
393
|
+
style: s.queryListSource,
|
|
394
|
+
title: `${w} · ${K}`,
|
|
395
|
+
children: [
|
|
396
|
+
/* @__PURE__ */ o("span", { children: Q.source }),
|
|
397
|
+
Q.queryId ? /* @__PURE__ */ p(ke, { children: [
|
|
398
|
+
/* @__PURE__ */ o("span", { style: s.queryListPrefixSep, children: " · " }),
|
|
399
|
+
/* @__PURE__ */ o("span", { style: s.queryListPrefixId, children: Q.queryId })
|
|
400
|
+
] }) : null
|
|
401
|
+
]
|
|
396
402
|
}
|
|
397
403
|
)
|
|
398
404
|
]
|
|
399
405
|
},
|
|
400
|
-
|
|
406
|
+
Ce(I)
|
|
401
407
|
);
|
|
402
|
-
}) : /* @__PURE__ */
|
|
403
|
-
] },
|
|
408
|
+
}) : /* @__PURE__ */ o("div", { style: s.queryGroupEmpty, children: "No input traces" })
|
|
409
|
+
] }, b.title)) : /* @__PURE__ */ o("div", { style: s.emptyState, children: "No matching traces" })
|
|
404
410
|
}
|
|
405
411
|
),
|
|
406
|
-
/* @__PURE__ */
|
|
412
|
+
/* @__PURE__ */ o(Xr, { trace: C })
|
|
407
413
|
]
|
|
408
414
|
}
|
|
409
415
|
)
|
|
@@ -412,234 +418,234 @@ function Jt({
|
|
|
412
418
|
) : null
|
|
413
419
|
] });
|
|
414
420
|
}
|
|
415
|
-
function
|
|
421
|
+
function ni({
|
|
416
422
|
queryId: e,
|
|
417
|
-
viewId:
|
|
418
|
-
label:
|
|
423
|
+
viewId: r,
|
|
424
|
+
label: t,
|
|
419
425
|
className: n,
|
|
420
426
|
style: i
|
|
421
427
|
} = {}) {
|
|
422
|
-
var
|
|
423
|
-
const
|
|
428
|
+
var y, h;
|
|
429
|
+
const a = dr(), l = H(Oe), c = H(Be);
|
|
424
430
|
B(() => {
|
|
425
|
-
|
|
431
|
+
mr();
|
|
426
432
|
}, []);
|
|
427
|
-
const
|
|
428
|
-
() =>
|
|
433
|
+
const u = r || (c == null ? void 0 : c.id), f = v(
|
|
434
|
+
() => mt(a.queries, {
|
|
429
435
|
queryId: e,
|
|
430
|
-
viewId:
|
|
436
|
+
viewId: u
|
|
431
437
|
}),
|
|
432
438
|
[
|
|
433
|
-
|
|
439
|
+
a.queries,
|
|
434
440
|
e,
|
|
435
|
-
|
|
441
|
+
u
|
|
436
442
|
]
|
|
437
443
|
);
|
|
438
|
-
if (!
|
|
444
|
+
if (!a.enabled || !l || !f)
|
|
439
445
|
return null;
|
|
440
|
-
const
|
|
446
|
+
const m = t || `Inspect ${xt(f, !!e)}`;
|
|
441
447
|
return /* @__PURE__ */ p(
|
|
442
448
|
"button",
|
|
443
449
|
{
|
|
444
450
|
type: "button",
|
|
445
|
-
"aria-label":
|
|
446
|
-
title:
|
|
451
|
+
"aria-label": m,
|
|
452
|
+
title: m,
|
|
447
453
|
className: n ? `${$} ${n}` : $,
|
|
448
454
|
style: {
|
|
449
|
-
...
|
|
450
|
-
...
|
|
455
|
+
...s.inspectButton,
|
|
456
|
+
..._t((y = f.latestAttempt) == null ? void 0 : y.status),
|
|
451
457
|
...i
|
|
452
458
|
},
|
|
453
|
-
onClick: () =>
|
|
459
|
+
onClick: () => l.openDevtools({
|
|
454
460
|
traceId: f.traceId,
|
|
455
461
|
queryId: f.queryId,
|
|
456
462
|
viewId: f.viewId
|
|
457
463
|
}),
|
|
458
464
|
children: [
|
|
459
|
-
/* @__PURE__ */
|
|
460
|
-
/* @__PURE__ */
|
|
465
|
+
/* @__PURE__ */ o(_r, { size: 13 }),
|
|
466
|
+
/* @__PURE__ */ o("span", { style: s.inspectButtonText, children: ((h = f.latestAttempt) == null ? void 0 : h.status) || "idle" })
|
|
461
467
|
]
|
|
462
468
|
}
|
|
463
469
|
);
|
|
464
470
|
}
|
|
465
|
-
function
|
|
466
|
-
const e =
|
|
467
|
-
return !e || !e.state.enabled ?
|
|
471
|
+
function dr() {
|
|
472
|
+
const e = H(De);
|
|
473
|
+
return !e || !e.state.enabled ? sr : fe(e.state);
|
|
468
474
|
}
|
|
469
|
-
function
|
|
475
|
+
function Jr({
|
|
470
476
|
spec: e,
|
|
471
|
-
queryKind:
|
|
472
|
-
queryKey:
|
|
477
|
+
queryKind: r,
|
|
478
|
+
queryKey: t,
|
|
473
479
|
intent: n,
|
|
474
480
|
activeInputs: i,
|
|
475
|
-
debug:
|
|
481
|
+
debug: a
|
|
476
482
|
}) {
|
|
477
|
-
const
|
|
483
|
+
const l = H(De), c = H(Be), u = !!(l != null && l.state.enabled), f = l == null ? void 0 : l.dispatch, m = Zt(e), y = e.label, h = v(
|
|
478
484
|
() => JSON.stringify(e),
|
|
479
485
|
[e]
|
|
480
|
-
),
|
|
486
|
+
), g = v(
|
|
481
487
|
() => JSON.stringify(i || []),
|
|
482
488
|
[i]
|
|
483
|
-
), S =
|
|
489
|
+
), S = v(
|
|
484
490
|
() => JSON.stringify(n || null),
|
|
485
491
|
[n]
|
|
486
|
-
),
|
|
487
|
-
|
|
488
|
-
const I =
|
|
489
|
-
() =>
|
|
490
|
-
[
|
|
491
|
-
),
|
|
492
|
-
() =>
|
|
492
|
+
), E = L(e), d = L(h), x = L(n), N = L(S), C = L(i), b = L(g);
|
|
493
|
+
d.current !== h && (d.current = h, E.current = e), N.current !== S && (N.current = S, x.current = n), b.current !== g && (b.current = g, C.current = i);
|
|
494
|
+
const I = E.current, k = x.current, A = C.current, R = or(), w = v(
|
|
495
|
+
() => m || `query_${xr(t)}`,
|
|
496
|
+
[t, m]
|
|
497
|
+
), K = (a == null ? void 0 : a.viewId) || (c == null ? void 0 : c.id), ne = (a == null ? void 0 : a.viewTitle) || (a == null ? void 0 : a.title) || (c == null ? void 0 : c.title), Q = a == null ? void 0 : a.visualType, ie = a == null ? void 0 : a.sectionTitle, oe = JSON.stringify(Ge(a) || []), Fe = v(
|
|
498
|
+
() => Ge(a),
|
|
493
499
|
// Keep inline debug={{ sourceHint: ... }} objects from re-registering every render.
|
|
494
500
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
495
|
-
[
|
|
496
|
-
),
|
|
501
|
+
[oe]
|
|
502
|
+
), z = v(
|
|
497
503
|
() => [
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
504
|
+
K || "unscoped-view",
|
|
505
|
+
w,
|
|
506
|
+
R
|
|
501
507
|
].join("::"),
|
|
502
|
-
[
|
|
503
|
-
),
|
|
508
|
+
[w, R, K]
|
|
509
|
+
), _e = v(
|
|
504
510
|
() => ({
|
|
505
|
-
traceKey:
|
|
511
|
+
traceKey: z,
|
|
506
512
|
spec: I,
|
|
507
|
-
queryId:
|
|
508
|
-
queryLabel:
|
|
509
|
-
queryKind:
|
|
510
|
-
builder:
|
|
511
|
-
viewId:
|
|
512
|
-
viewTitle:
|
|
513
|
-
visualType:
|
|
514
|
-
sectionTitle:
|
|
515
|
-
sourceHints:
|
|
516
|
-
intent:
|
|
517
|
-
activeInputs:
|
|
518
|
-
clientWarnings:
|
|
513
|
+
queryId: w,
|
|
514
|
+
queryLabel: y,
|
|
515
|
+
queryKind: r,
|
|
516
|
+
builder: en(r),
|
|
517
|
+
viewId: K,
|
|
518
|
+
viewTitle: ne,
|
|
519
|
+
visualType: Q,
|
|
520
|
+
sectionTitle: ie,
|
|
521
|
+
sourceHints: Fe,
|
|
522
|
+
intent: k,
|
|
523
|
+
activeInputs: A,
|
|
524
|
+
clientWarnings: m ? [] : ["Query spec is missing an explicit id; using an opaque internal id."]
|
|
519
525
|
}),
|
|
520
526
|
[
|
|
521
|
-
|
|
522
|
-
|
|
527
|
+
w,
|
|
528
|
+
r,
|
|
529
|
+
m,
|
|
523
530
|
y,
|
|
524
|
-
g,
|
|
525
531
|
I,
|
|
526
|
-
|
|
527
|
-
L,
|
|
528
|
-
Ne,
|
|
529
|
-
_e,
|
|
530
|
-
F,
|
|
532
|
+
A,
|
|
531
533
|
k,
|
|
532
|
-
|
|
533
|
-
|
|
534
|
+
Fe,
|
|
535
|
+
ie,
|
|
536
|
+
z,
|
|
537
|
+
K,
|
|
538
|
+
ne,
|
|
539
|
+
Q
|
|
534
540
|
]
|
|
535
541
|
);
|
|
536
542
|
B(() => {
|
|
537
|
-
if (!(!
|
|
538
|
-
return f({ type: "register", descriptor:
|
|
539
|
-
f({ type: "unregister", traceKey:
|
|
543
|
+
if (!(!u || !f))
|
|
544
|
+
return f({ type: "register", descriptor: _e }), () => {
|
|
545
|
+
f({ type: "unregister", traceKey: z });
|
|
540
546
|
};
|
|
541
|
-
}, [
|
|
542
|
-
const
|
|
543
|
-
(
|
|
544
|
-
!
|
|
547
|
+
}, [_e, f, u, z]);
|
|
548
|
+
const W = D(
|
|
549
|
+
(T, V) => {
|
|
550
|
+
!u || !f || f({ type: "event", traceKey: z, event: T, latestAttempt: V });
|
|
545
551
|
},
|
|
546
|
-
[f,
|
|
547
|
-
),
|
|
548
|
-
|
|
552
|
+
[f, u, z]
|
|
553
|
+
), ze = D(() => {
|
|
554
|
+
W(
|
|
549
555
|
{
|
|
550
556
|
type: "query_started",
|
|
551
|
-
queryId:
|
|
557
|
+
queryId: w,
|
|
552
558
|
at: ue()
|
|
553
559
|
},
|
|
554
560
|
{ status: "loading" }
|
|
555
561
|
);
|
|
556
|
-
}, [
|
|
557
|
-
(
|
|
558
|
-
const
|
|
559
|
-
|
|
562
|
+
}, [W, w]), Me = D(
|
|
563
|
+
(T, V) => {
|
|
564
|
+
const X = er(T), Z = ln(T), Ar = un(T);
|
|
565
|
+
W(
|
|
560
566
|
{
|
|
561
567
|
type: "query_succeeded",
|
|
562
|
-
queryId:
|
|
563
|
-
requestId:
|
|
568
|
+
queryId: w,
|
|
569
|
+
requestId: X,
|
|
564
570
|
at: ue(),
|
|
565
|
-
rowCount:
|
|
566
|
-
durationMs:
|
|
571
|
+
rowCount: Z,
|
|
572
|
+
durationMs: V
|
|
567
573
|
},
|
|
568
574
|
{
|
|
569
|
-
requestId:
|
|
575
|
+
requestId: X,
|
|
570
576
|
status: "success",
|
|
571
|
-
durationMs:
|
|
572
|
-
rowCount:
|
|
573
|
-
columnCount:
|
|
574
|
-
executionResult:
|
|
577
|
+
durationMs: V,
|
|
578
|
+
rowCount: Z,
|
|
579
|
+
columnCount: Ar,
|
|
580
|
+
executionResult: Ze(T)
|
|
575
581
|
}
|
|
576
582
|
);
|
|
577
583
|
},
|
|
578
|
-
[
|
|
579
|
-
),
|
|
580
|
-
(
|
|
581
|
-
const
|
|
582
|
-
|
|
584
|
+
[W, w]
|
|
585
|
+
), se = D(
|
|
586
|
+
(T, V) => {
|
|
587
|
+
const X = er(T), Z = T instanceof Error ? T.message : String(T);
|
|
588
|
+
W(
|
|
583
589
|
{
|
|
584
590
|
type: "query_failed",
|
|
585
|
-
queryId:
|
|
586
|
-
requestId:
|
|
591
|
+
queryId: w,
|
|
592
|
+
requestId: X,
|
|
587
593
|
at: ue(),
|
|
588
|
-
errorMessage:
|
|
594
|
+
errorMessage: Z
|
|
589
595
|
},
|
|
590
596
|
{
|
|
591
|
-
requestId:
|
|
597
|
+
requestId: X,
|
|
592
598
|
status: "error",
|
|
593
|
-
durationMs:
|
|
594
|
-
errorMessage:
|
|
595
|
-
executionResult:
|
|
599
|
+
durationMs: V,
|
|
600
|
+
errorMessage: Z,
|
|
601
|
+
executionResult: Ze(T)
|
|
596
602
|
}
|
|
597
603
|
);
|
|
598
604
|
},
|
|
599
|
-
[
|
|
600
|
-
),
|
|
601
|
-
(
|
|
602
|
-
|
|
605
|
+
[W, w]
|
|
606
|
+
), Pe = D(
|
|
607
|
+
(T) => {
|
|
608
|
+
W(
|
|
603
609
|
{
|
|
604
610
|
type: "query_ignored_stale",
|
|
605
|
-
queryId:
|
|
611
|
+
queryId: w,
|
|
606
612
|
at: ue(),
|
|
607
|
-
reason:
|
|
613
|
+
reason: T
|
|
608
614
|
}
|
|
609
615
|
);
|
|
610
616
|
},
|
|
611
|
-
[
|
|
612
|
-
),
|
|
613
|
-
(
|
|
614
|
-
|
|
617
|
+
[W, w]
|
|
618
|
+
), He = D(
|
|
619
|
+
(T) => {
|
|
620
|
+
se(T, 0);
|
|
615
621
|
},
|
|
616
|
-
[
|
|
617
|
-
),
|
|
618
|
-
return
|
|
622
|
+
[se]
|
|
623
|
+
), he = u ? l == null ? void 0 : l.state.entries[z] : void 0;
|
|
624
|
+
return v(
|
|
619
625
|
() => ({
|
|
620
|
-
enabled:
|
|
621
|
-
queryId:
|
|
622
|
-
trace:
|
|
623
|
-
start:
|
|
626
|
+
enabled: u,
|
|
627
|
+
queryId: w,
|
|
628
|
+
trace: he ? ce(he) : void 0,
|
|
629
|
+
start: ze,
|
|
624
630
|
success: Me,
|
|
625
|
-
failure:
|
|
626
|
-
ignored:
|
|
627
|
-
validationFailure:
|
|
631
|
+
failure: se,
|
|
632
|
+
ignored: Pe,
|
|
633
|
+
validationFailure: He
|
|
628
634
|
}),
|
|
629
635
|
[
|
|
630
|
-
|
|
631
|
-
|
|
636
|
+
u,
|
|
637
|
+
se,
|
|
638
|
+
Pe,
|
|
639
|
+
w,
|
|
632
640
|
ze,
|
|
633
|
-
x,
|
|
634
|
-
We,
|
|
635
641
|
Me,
|
|
636
|
-
|
|
637
|
-
|
|
642
|
+
he,
|
|
643
|
+
He
|
|
638
644
|
]
|
|
639
645
|
);
|
|
640
646
|
}
|
|
641
|
-
function
|
|
642
|
-
return /* @__PURE__ */
|
|
647
|
+
function Yr() {
|
|
648
|
+
return /* @__PURE__ */ o("span", { style: s.logoMark, "aria-hidden": !0, children: /* @__PURE__ */ p(
|
|
643
649
|
"svg",
|
|
644
650
|
{
|
|
645
651
|
viewBox: "0 0 100 100",
|
|
@@ -648,167 +654,194 @@ function Xt() {
|
|
|
648
654
|
height: "16",
|
|
649
655
|
focusable: "false",
|
|
650
656
|
children: [
|
|
651
|
-
/* @__PURE__ */
|
|
652
|
-
/* @__PURE__ */
|
|
653
|
-
/* @__PURE__ */
|
|
654
|
-
/* @__PURE__ */
|
|
657
|
+
/* @__PURE__ */ o("rect", { x: "20", y: "15", width: "60", height: "12", rx: "6", fill: "currentColor" }),
|
|
658
|
+
/* @__PURE__ */ o("rect", { x: "20", y: "35", width: "40", height: "12", rx: "6", fill: "currentColor" }),
|
|
659
|
+
/* @__PURE__ */ o("rect", { x: "40", y: "55", width: "40", height: "12", rx: "6", fill: "currentColor" }),
|
|
660
|
+
/* @__PURE__ */ o("rect", { x: "20", y: "75", width: "60", height: "12", rx: "6", fill: "currentColor" })
|
|
655
661
|
]
|
|
656
662
|
}
|
|
657
663
|
) });
|
|
658
664
|
}
|
|
659
|
-
function
|
|
665
|
+
function Xr({
|
|
660
666
|
trace: e
|
|
661
667
|
}) {
|
|
662
|
-
var
|
|
668
|
+
var C, b, I, k, A;
|
|
663
669
|
if (!e)
|
|
664
|
-
return /* @__PURE__ */
|
|
665
|
-
const
|
|
666
|
-
(
|
|
667
|
-
), i =
|
|
668
|
-
(
|
|
669
|
-
),
|
|
670
|
+
return /* @__PURE__ */ o("div", { style: s.detailsPane, children: /* @__PURE__ */ o("div", { style: s.emptyState, children: "No traces registered yet" }) });
|
|
671
|
+
const r = e.latestAttempt, t = r == null ? void 0 : r.executionResult, n = xe(
|
|
672
|
+
(C = t == null ? void 0 : t.validation) == null ? void 0 : C.warnings
|
|
673
|
+
), i = xe((b = t == null ? void 0 : t.validation) == null ? void 0 : b.errors), a = xe(
|
|
674
|
+
(I = t == null ? void 0 : t.coverage) == null ? void 0 : I.missingObligations
|
|
675
|
+
), l = t == null ? void 0 : t.compiledQuery, c = Bt(t), u = ((k = e.server) == null ? void 0 : k.compiledSql) || c.compiledSql, f = r != null && r.errorMessage ? [r.errorMessage] : [], m = [
|
|
670
676
|
...e.clientWarnings,
|
|
671
677
|
...n,
|
|
672
678
|
...i,
|
|
673
|
-
...
|
|
674
|
-
], g =
|
|
675
|
-
return /* @__PURE__ */ p("div", { style:
|
|
676
|
-
/* @__PURE__ */ p("div", { style:
|
|
677
|
-
/* @__PURE__ */ p("div", { style:
|
|
678
|
-
/* @__PURE__ */
|
|
679
|
+
...a
|
|
680
|
+
], y = e.inputsApplied.length > 0, h = !!(l || u), g = qt(e), S = Et(r == null ? void 0 : r.rowCount), E = kt(r == null ? void 0 : r.durationMs), d = e.sourceRefs.length, x = pr(e), N = ur(x);
|
|
681
|
+
return /* @__PURE__ */ p("div", { style: s.detailsPane, children: [
|
|
682
|
+
/* @__PURE__ */ p("div", { style: s.detailsHeader, children: [
|
|
683
|
+
/* @__PURE__ */ p("div", { style: s.detailsHeaderTopRow, children: [
|
|
684
|
+
/* @__PURE__ */ o(
|
|
679
685
|
"span",
|
|
680
686
|
{
|
|
681
687
|
"aria-hidden": !0,
|
|
682
688
|
style: {
|
|
683
|
-
...
|
|
684
|
-
...
|
|
689
|
+
...s.detailsHeaderStatusDot,
|
|
690
|
+
...gr(r == null ? void 0 : r.status)
|
|
685
691
|
}
|
|
686
692
|
}
|
|
687
693
|
),
|
|
688
|
-
/* @__PURE__ */
|
|
689
|
-
/* @__PURE__ */
|
|
694
|
+
/* @__PURE__ */ o("span", { style: s.detailsTitle, children: me(e) }),
|
|
695
|
+
/* @__PURE__ */ o(
|
|
696
|
+
"span",
|
|
697
|
+
{
|
|
698
|
+
style: {
|
|
699
|
+
...s.detailsKindChip,
|
|
700
|
+
...cr(N)
|
|
701
|
+
},
|
|
702
|
+
children: x
|
|
703
|
+
}
|
|
704
|
+
)
|
|
690
705
|
] }),
|
|
691
|
-
/* @__PURE__ */ p("div", { style:
|
|
692
|
-
/* @__PURE__ */
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
style: {
|
|
698
|
-
...l.detailsCaptionValue,
|
|
699
|
-
...l.detailsCaptionItemMono
|
|
700
|
-
},
|
|
701
|
-
children: h
|
|
702
|
-
}
|
|
703
|
-
)
|
|
704
|
-
] }),
|
|
705
|
-
/* @__PURE__ */ p("span", { style: l.detailsCaptionItem, children: [
|
|
706
|
-
/* @__PURE__ */ s("span", { style: l.detailsCaptionLabel, children: "Source" }),
|
|
707
|
-
/* @__PURE__ */ s("span", { style: l.detailsCaptionValue, children: g })
|
|
708
|
-
] }),
|
|
709
|
-
/* @__PURE__ */ p("span", { style: l.detailsCaptionItem, children: [
|
|
710
|
-
/* @__PURE__ */ s("span", { style: l.detailsCaptionLabel, children: "Rows" }),
|
|
711
|
-
/* @__PURE__ */ s("span", { style: l.detailsCaptionValue, children: xr(t == null ? void 0 : t.rowCount) })
|
|
706
|
+
/* @__PURE__ */ p("div", { style: s.metaStrip, children: [
|
|
707
|
+
/* @__PURE__ */ o("span", { style: s.metaStripItem, children: g }),
|
|
708
|
+
/* @__PURE__ */ o("span", { style: s.metaStripDot, children: "·" }),
|
|
709
|
+
/* @__PURE__ */ p("span", { style: s.metaStripItem, children: [
|
|
710
|
+
S,
|
|
711
|
+
" rows"
|
|
712
712
|
] }),
|
|
713
|
-
/* @__PURE__ */
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
713
|
+
/* @__PURE__ */ o("span", { style: s.metaStripDot, children: "·" }),
|
|
714
|
+
/* @__PURE__ */ o("span", { style: s.metaStripItem, children: E }),
|
|
715
|
+
d > 0 ? /* @__PURE__ */ p(ke, { children: [
|
|
716
|
+
/* @__PURE__ */ o("span", { style: s.metaStripDot, children: "·" }),
|
|
717
|
+
/* @__PURE__ */ o("span", { style: s.metaStripItem, children: d === 1 ? "1 source" : `${d} sources` })
|
|
718
|
+
] }) : null
|
|
717
719
|
] })
|
|
718
720
|
] }),
|
|
719
|
-
f.length ? /* @__PURE__ */
|
|
720
|
-
|
|
721
|
-
/* @__PURE__ */
|
|
722
|
-
/* @__PURE__ */
|
|
723
|
-
(
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
721
|
+
f.length ? /* @__PURE__ */ o(je, { tone: "error", title: "Error", items: f }) : null,
|
|
722
|
+
m.length ? /* @__PURE__ */ o(je, { tone: "warning", title: "Warnings", items: m }) : null,
|
|
723
|
+
/* @__PURE__ */ o(et, { trace: e }),
|
|
724
|
+
/* @__PURE__ */ o(nt, { trace: e }),
|
|
725
|
+
(A = e.sourceHints) != null && A.length ? /* @__PURE__ */ o(it, { hints: e.sourceHints }) : null,
|
|
726
|
+
y ? /* @__PURE__ */ o(dt, { inputs: e.inputsApplied }) : null,
|
|
727
|
+
h ? /* @__PURE__ */ o(ee, { title: "Compiled Query", defaultOpen: !0, children: /* @__PURE__ */ o(
|
|
728
|
+
lt,
|
|
727
729
|
{
|
|
728
|
-
compiledQuery:
|
|
729
|
-
compiledSql:
|
|
730
|
+
compiledQuery: l,
|
|
731
|
+
compiledSql: u
|
|
730
732
|
}
|
|
731
733
|
) }) : null,
|
|
732
|
-
/* @__PURE__ */
|
|
734
|
+
/* @__PURE__ */ o(ee, { title: "Lifecycle Events", children: e.recentEvents.length ? /* @__PURE__ */ o("div", { style: s.eventList, children: e.recentEvents.slice(-5).map((R, w) => /* @__PURE__ */ p(
|
|
733
735
|
"div",
|
|
734
736
|
{
|
|
735
|
-
style:
|
|
737
|
+
style: s.eventRow,
|
|
736
738
|
children: [
|
|
737
|
-
/* @__PURE__ */
|
|
738
|
-
/* @__PURE__ */
|
|
739
|
+
/* @__PURE__ */ o("span", { style: s.eventType, children: Lt(R) }),
|
|
740
|
+
/* @__PURE__ */ o("span", { style: s.eventMeta, children: Dt(R) })
|
|
739
741
|
]
|
|
740
742
|
},
|
|
741
|
-
`${
|
|
742
|
-
)) }) : /* @__PURE__ */
|
|
743
|
-
/* @__PURE__ */
|
|
743
|
+
`${R.type}:${R.at}:${w}`
|
|
744
|
+
)) }) : /* @__PURE__ */ o("div", { style: s.mutedText, children: "No attempts recorded" }) }),
|
|
745
|
+
/* @__PURE__ */ o(ee, { title: "Raw Trace", children: /* @__PURE__ */ o("pre", { style: s.codeBlock, children: Ct(e) }) })
|
|
744
746
|
] });
|
|
745
747
|
}
|
|
746
|
-
function
|
|
748
|
+
function je({
|
|
747
749
|
tone: e,
|
|
748
|
-
title:
|
|
749
|
-
items:
|
|
750
|
+
title: r,
|
|
751
|
+
items: t
|
|
750
752
|
}) {
|
|
751
|
-
const n = e === "error" ?
|
|
752
|
-
return /* @__PURE__ */ p("div", { style: { ...
|
|
753
|
-
/* @__PURE__ */
|
|
754
|
-
|
|
753
|
+
const n = e === "error" ? s.alertCardError : s.alertCardWarning;
|
|
754
|
+
return /* @__PURE__ */ p("div", { style: { ...s.alertCard, ...n }, children: [
|
|
755
|
+
/* @__PURE__ */ o("div", { style: s.alertCardTitle, children: r }),
|
|
756
|
+
t.length > 1 ? /* @__PURE__ */ o("ul", { style: s.alertCardList, children: t.map((i, a) => /* @__PURE__ */ o("li", { children: i }, `${e}-${a}`)) }) : /* @__PURE__ */ o("div", { children: t[0] })
|
|
755
757
|
] });
|
|
756
758
|
}
|
|
757
|
-
function
|
|
759
|
+
function Zr({
|
|
758
760
|
status: e
|
|
759
761
|
}) {
|
|
760
|
-
return /* @__PURE__ */
|
|
762
|
+
return /* @__PURE__ */ o(
|
|
761
763
|
"span",
|
|
762
764
|
{
|
|
763
765
|
"aria-hidden": !0,
|
|
764
766
|
style: {
|
|
765
|
-
...
|
|
766
|
-
...
|
|
767
|
+
...s.statusDot,
|
|
768
|
+
...gr(e)
|
|
767
769
|
}
|
|
768
770
|
}
|
|
769
771
|
);
|
|
770
772
|
}
|
|
771
|
-
function
|
|
773
|
+
function ee({
|
|
772
774
|
title: e,
|
|
773
|
-
children:
|
|
775
|
+
children: r,
|
|
776
|
+
defaultOpen: t = !1
|
|
774
777
|
}) {
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
778
|
+
const [n, i] = j(t);
|
|
779
|
+
return /* @__PURE__ */ p(
|
|
780
|
+
"details",
|
|
781
|
+
{
|
|
782
|
+
style: s.disclosure,
|
|
783
|
+
open: n,
|
|
784
|
+
onToggle: (a) => i(a.currentTarget.open),
|
|
785
|
+
children: [
|
|
786
|
+
/* @__PURE__ */ o("summary", { style: s.disclosureSummary, children: e }),
|
|
787
|
+
/* @__PURE__ */ o("div", { style: s.disclosureBody, children: r })
|
|
788
|
+
]
|
|
789
|
+
}
|
|
790
|
+
);
|
|
779
791
|
}
|
|
780
|
-
function
|
|
792
|
+
function et({
|
|
781
793
|
trace: e
|
|
782
794
|
}) {
|
|
783
|
-
var
|
|
784
|
-
const
|
|
785
|
-
return /* @__PURE__ */ p("div", { style:
|
|
786
|
-
/* @__PURE__ */
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
/* @__PURE__ */ s(W, { title: "Time fields", fields: n.timeFields }),
|
|
792
|
-
/* @__PURE__ */ s(
|
|
793
|
-
W,
|
|
795
|
+
var i;
|
|
796
|
+
const r = (i = e.projectionFieldRefs) != null && i.length ? e.projectionFieldRefs : e.fieldRefs, t = e.inputFieldRefs || [], n = wt(r);
|
|
797
|
+
return /* @__PURE__ */ p("div", { style: s.recipe, children: [
|
|
798
|
+
/* @__PURE__ */ o(rt, { sources: e.sourceRefs }),
|
|
799
|
+
/* @__PURE__ */ o(M, { title: "Measures", fields: n.measures }),
|
|
800
|
+
/* @__PURE__ */ o(M, { title: "Time fields", fields: n.timeFields }),
|
|
801
|
+
/* @__PURE__ */ o(
|
|
802
|
+
M,
|
|
794
803
|
{
|
|
795
804
|
title: "Dimensions",
|
|
796
805
|
fields: n.dimensions,
|
|
797
806
|
emptyText: "No dimensions selected"
|
|
798
807
|
}
|
|
799
808
|
),
|
|
800
|
-
/* @__PURE__ */
|
|
801
|
-
/* @__PURE__ */
|
|
802
|
-
/* @__PURE__ */
|
|
809
|
+
/* @__PURE__ */ o(M, { title: "Identifiers", fields: n.identifiers }),
|
|
810
|
+
/* @__PURE__ */ o(M, { title: "Other fields", fields: n.other }),
|
|
811
|
+
/* @__PURE__ */ o(M, { title: "Input bindings", fields: t })
|
|
803
812
|
] });
|
|
804
813
|
}
|
|
805
|
-
function
|
|
814
|
+
function rt({
|
|
815
|
+
sources: e
|
|
816
|
+
}) {
|
|
817
|
+
return e.length ? /* @__PURE__ */ p("div", { style: s.recipeGroup, children: [
|
|
818
|
+
/* @__PURE__ */ p("div", { style: s.recipeGroupHeader, children: [
|
|
819
|
+
/* @__PURE__ */ o("span", { style: s.recipeGroupTitle, children: "From" }),
|
|
820
|
+
/* @__PURE__ */ o("span", { style: s.recipeGroupCount, children: e.length })
|
|
821
|
+
] }),
|
|
822
|
+
/* @__PURE__ */ o("div", { style: s.sourcePillRow, children: e.map((r, t) => /* @__PURE__ */ o(
|
|
823
|
+
tt,
|
|
824
|
+
{
|
|
825
|
+
source: r
|
|
826
|
+
},
|
|
827
|
+
`${F(r)}:${t}`
|
|
828
|
+
)) })
|
|
829
|
+
] }) : null;
|
|
830
|
+
}
|
|
831
|
+
function tt({ source: e }) {
|
|
832
|
+
const r = F(e);
|
|
833
|
+
return /* @__PURE__ */ p("span", { style: s.sourcePill, title: r, children: [
|
|
834
|
+
/* @__PURE__ */ o("span", { style: s.sourcePillLabel, children: r }),
|
|
835
|
+
/* @__PURE__ */ o("span", { style: s.sourcePillRole, children: e.kind })
|
|
836
|
+
] });
|
|
837
|
+
}
|
|
838
|
+
function nt({
|
|
806
839
|
trace: e
|
|
807
840
|
}) {
|
|
808
|
-
return !e.sourceRefs.length && !e.fieldRefs.length ? null : /* @__PURE__ */
|
|
809
|
-
/* @__PURE__ */
|
|
810
|
-
/* @__PURE__ */
|
|
811
|
-
|
|
841
|
+
return !e.sourceRefs.length && !e.fieldRefs.length ? null : /* @__PURE__ */ o(ee, { title: "Sources and field refs", children: /* @__PURE__ */ p("div", { style: s.traceLineage, children: [
|
|
842
|
+
/* @__PURE__ */ o(ot, { sources: e.sourceRefs }),
|
|
843
|
+
/* @__PURE__ */ o(
|
|
844
|
+
M,
|
|
812
845
|
{
|
|
813
846
|
title: "All field refs",
|
|
814
847
|
fields: e.fieldRefs,
|
|
@@ -817,165 +850,261 @@ function rr({
|
|
|
817
850
|
)
|
|
818
851
|
] }) });
|
|
819
852
|
}
|
|
820
|
-
function
|
|
853
|
+
function it({
|
|
821
854
|
hints: e
|
|
822
855
|
}) {
|
|
823
|
-
return /* @__PURE__ */
|
|
824
|
-
const n =
|
|
825
|
-
|
|
856
|
+
return /* @__PURE__ */ o(ee, { title: "Source hints", children: /* @__PURE__ */ o("div", { style: s.recipeFieldList, children: e.map((r, t) => {
|
|
857
|
+
const n = Tt(r), i = r.component || r.exportName || n || "Source hint", a = [
|
|
858
|
+
r.exportName && r.exportName !== i ? r.exportName : void 0,
|
|
826
859
|
n,
|
|
827
|
-
|
|
860
|
+
r.note
|
|
828
861
|
].filter(Boolean).join(" · ");
|
|
829
862
|
return /* @__PURE__ */ p(
|
|
830
863
|
"div",
|
|
831
864
|
{
|
|
832
|
-
style:
|
|
833
|
-
title:
|
|
865
|
+
style: s.recipeFieldRow,
|
|
866
|
+
title: a || i,
|
|
834
867
|
children: [
|
|
835
|
-
/* @__PURE__ */
|
|
836
|
-
|
|
868
|
+
/* @__PURE__ */ o("span", { style: s.recipeFieldName, children: i }),
|
|
869
|
+
a ? /* @__PURE__ */ o("span", { style: s.recipeFieldMeta, children: a }) : null
|
|
837
870
|
]
|
|
838
871
|
},
|
|
839
|
-
`${i}:${n}:${
|
|
872
|
+
`${i}:${n}:${t}`
|
|
840
873
|
);
|
|
841
874
|
}) }) });
|
|
842
875
|
}
|
|
843
|
-
function
|
|
876
|
+
function ot({
|
|
844
877
|
sources: e
|
|
845
878
|
}) {
|
|
846
|
-
return /* @__PURE__ */ p("div", { style:
|
|
847
|
-
/* @__PURE__ */ p("div", { style:
|
|
848
|
-
/* @__PURE__ */
|
|
849
|
-
/* @__PURE__ */
|
|
879
|
+
return /* @__PURE__ */ p("div", { style: s.recipeGroup, children: [
|
|
880
|
+
/* @__PURE__ */ p("div", { style: s.recipeGroupHeader, children: [
|
|
881
|
+
/* @__PURE__ */ o("span", { style: s.recipeGroupTitle, children: "Sources" }),
|
|
882
|
+
/* @__PURE__ */ o("span", { style: s.recipeGroupCount, children: e.length })
|
|
850
883
|
] }),
|
|
851
|
-
e.length ? /* @__PURE__ */
|
|
884
|
+
e.length ? /* @__PURE__ */ o("div", { style: s.recipeFieldList, children: e.map((r, t) => /* @__PURE__ */ p(
|
|
852
885
|
"div",
|
|
853
886
|
{
|
|
854
|
-
style:
|
|
855
|
-
title:
|
|
887
|
+
style: s.recipeFieldRow,
|
|
888
|
+
title: F(r),
|
|
856
889
|
children: [
|
|
857
|
-
/* @__PURE__ */
|
|
858
|
-
/* @__PURE__ */
|
|
890
|
+
/* @__PURE__ */ o("span", { style: s.recipeFieldName, children: F(r) }),
|
|
891
|
+
/* @__PURE__ */ o("span", { style: s.recipeFieldMeta, children: r.kind })
|
|
859
892
|
]
|
|
860
893
|
},
|
|
861
|
-
`${
|
|
862
|
-
)) }) : /* @__PURE__ */
|
|
894
|
+
`${F(r)}:${t}`
|
|
895
|
+
)) }) : /* @__PURE__ */ o("div", { style: s.recipeEmptyText, children: "No sources captured" })
|
|
863
896
|
] });
|
|
864
897
|
}
|
|
865
|
-
function
|
|
898
|
+
function M({
|
|
866
899
|
title: e,
|
|
867
|
-
fields:
|
|
868
|
-
emptyText:
|
|
900
|
+
fields: r,
|
|
901
|
+
emptyText: t
|
|
869
902
|
}) {
|
|
870
|
-
return !
|
|
871
|
-
/* @__PURE__ */ p("div", { style:
|
|
872
|
-
/* @__PURE__ */
|
|
873
|
-
/* @__PURE__ */
|
|
903
|
+
return !r.length && !t ? null : /* @__PURE__ */ p("div", { style: s.recipeGroup, children: [
|
|
904
|
+
/* @__PURE__ */ p("div", { style: s.recipeGroupHeader, children: [
|
|
905
|
+
/* @__PURE__ */ o("span", { style: s.recipeGroupTitle, children: e }),
|
|
906
|
+
/* @__PURE__ */ o("span", { style: s.recipeGroupCount, children: r.length })
|
|
874
907
|
] }),
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
908
|
+
r.length ? /* @__PURE__ */ o("div", { style: s.fieldChipList, children: r.map((n, i) => /* @__PURE__ */ o(
|
|
909
|
+
st,
|
|
910
|
+
{
|
|
911
|
+
field: n,
|
|
912
|
+
groupTitle: e
|
|
913
|
+
},
|
|
914
|
+
`${Ne(n)}:${i}`
|
|
915
|
+
)) }) : /* @__PURE__ */ o("div", { style: s.recipeEmptyText, children: t })
|
|
916
|
+
] });
|
|
917
|
+
}
|
|
918
|
+
function st({
|
|
919
|
+
field: e,
|
|
920
|
+
groupTitle: r
|
|
921
|
+
}) {
|
|
922
|
+
const t = Rt(e), n = e.label || e.name, i = e.dataType && e.dataType !== "unknown" ? e.dataType : void 0, a = e.source ? F(e.source) : void 0, l = [t, i, a].filter(Boolean).join(" · "), c = at(e, r);
|
|
923
|
+
return /* @__PURE__ */ p("div", { style: s.fieldChip, title: l, children: [
|
|
924
|
+
/* @__PURE__ */ o("span", { style: { ...s.fieldGlyph, ...c.style }, children: c.text }),
|
|
925
|
+
e.aggregate ? /* @__PURE__ */ o("span", { style: s.fieldAggBadge, children: e.aggregate }) : null,
|
|
926
|
+
/* @__PURE__ */ o("span", { style: s.fieldChipName, children: n }),
|
|
927
|
+
i ? /* @__PURE__ */ o("span", { style: s.fieldChipMeta, children: i }) : null,
|
|
928
|
+
i && a ? /* @__PURE__ */ o("span", { style: s.fieldChipMetaDot, children: "·" }) : null,
|
|
929
|
+
a ? /* @__PURE__ */ o("span", { style: s.fieldChipMeta, children: a }) : null
|
|
894
930
|
] });
|
|
895
931
|
}
|
|
896
|
-
function
|
|
932
|
+
function at(e, r) {
|
|
933
|
+
const t = e.dataType, n = e.role;
|
|
934
|
+
return !!e.aggregate || n === "measure" || r === "Measures" ? {
|
|
935
|
+
text: "Σ",
|
|
936
|
+
style: {
|
|
937
|
+
borderColor: "var(--sd-tone-metric-border)",
|
|
938
|
+
background: "var(--sd-tone-metric-bg)",
|
|
939
|
+
color: "var(--sd-tone-metric-fg)"
|
|
940
|
+
}
|
|
941
|
+
} : t === "date" || t === "datetime" || n === "date" || r === "Time fields" ? {
|
|
942
|
+
text: "◷",
|
|
943
|
+
style: {
|
|
944
|
+
borderColor: "var(--sd-tone-date-border)",
|
|
945
|
+
background: "var(--sd-tone-date-bg)",
|
|
946
|
+
color: "var(--sd-tone-date-fg)"
|
|
947
|
+
}
|
|
948
|
+
} : t === "number" ? {
|
|
949
|
+
text: "#",
|
|
950
|
+
style: {
|
|
951
|
+
borderColor: "var(--sd-tone-records-border)",
|
|
952
|
+
background: "var(--sd-tone-records-bg)",
|
|
953
|
+
color: "var(--sd-tone-records-fg)"
|
|
954
|
+
}
|
|
955
|
+
} : t === "boolean" ? {
|
|
956
|
+
text: "◐",
|
|
957
|
+
style: {
|
|
958
|
+
borderColor: "var(--sd-border)",
|
|
959
|
+
background: "var(--sd-bg-accent)",
|
|
960
|
+
color: "var(--sd-fg-muted)"
|
|
961
|
+
}
|
|
962
|
+
} : {
|
|
963
|
+
text: "A",
|
|
964
|
+
style: {
|
|
965
|
+
borderColor: "var(--sd-tone-string-border)",
|
|
966
|
+
background: "var(--sd-tone-string-bg)",
|
|
967
|
+
color: "var(--sd-tone-string-fg)"
|
|
968
|
+
}
|
|
969
|
+
};
|
|
970
|
+
}
|
|
971
|
+
function dt({
|
|
897
972
|
inputs: e
|
|
898
973
|
}) {
|
|
899
|
-
return /* @__PURE__ */ p("div", { style:
|
|
900
|
-
/* @__PURE__ */ p("div", { style:
|
|
901
|
-
/* @__PURE__ */
|
|
902
|
-
/* @__PURE__ */
|
|
974
|
+
return /* @__PURE__ */ p("div", { style: s.inputsAppliedBlock, children: [
|
|
975
|
+
/* @__PURE__ */ p("div", { style: s.inputsAppliedHeader, children: [
|
|
976
|
+
/* @__PURE__ */ o("span", { style: s.inputsAppliedTitle, children: "Active Inputs" }),
|
|
977
|
+
/* @__PURE__ */ o("span", { style: s.inputsAppliedCount, children: e.length })
|
|
903
978
|
] }),
|
|
904
|
-
/* @__PURE__ */
|
|
905
|
-
const
|
|
979
|
+
/* @__PURE__ */ o("div", { style: s.inputRecipeList, children: e.map((r) => {
|
|
980
|
+
const t = At(r);
|
|
906
981
|
return /* @__PURE__ */ p(
|
|
907
982
|
"div",
|
|
908
983
|
{
|
|
909
|
-
style:
|
|
910
|
-
title:
|
|
984
|
+
style: s.inputRecipeRow,
|
|
985
|
+
title: t.title,
|
|
911
986
|
children: [
|
|
912
|
-
/* @__PURE__ */ p("div", { style:
|
|
913
|
-
/* @__PURE__ */
|
|
914
|
-
|
|
915
|
-
/* @__PURE__ */
|
|
987
|
+
/* @__PURE__ */ p("div", { style: s.inputRecipeHeader, children: [
|
|
988
|
+
/* @__PURE__ */ o("span", { style: s.inputRecipeId, title: r.inputId, children: r.inputId }),
|
|
989
|
+
t.operator ? /* @__PURE__ */ o("span", { style: s.inputOperatorBadge, children: t.operator }) : null,
|
|
990
|
+
/* @__PURE__ */ o("span", { style: s.inputValuePreview, title: t.value, children: t.value })
|
|
916
991
|
] }),
|
|
917
|
-
|
|
992
|
+
t.binding ? /* @__PURE__ */ o("div", { style: s.inputRecipeBinding, title: t.binding, children: t.binding }) : null
|
|
918
993
|
]
|
|
919
994
|
},
|
|
920
|
-
|
|
995
|
+
r.inputId
|
|
921
996
|
);
|
|
922
997
|
}) })
|
|
923
998
|
] });
|
|
924
999
|
}
|
|
925
|
-
function
|
|
1000
|
+
function lt({
|
|
926
1001
|
compiledQuery: e,
|
|
927
|
-
compiledSql:
|
|
1002
|
+
compiledSql: r
|
|
928
1003
|
}) {
|
|
929
|
-
return (e == null ? void 0 : e.kind) === "sql" ? /* @__PURE__ */ p("div", { style:
|
|
930
|
-
/* @__PURE__ */
|
|
931
|
-
e.pythonCode ? /* @__PURE__ */
|
|
932
|
-
e.parameters ? /* @__PURE__ */
|
|
933
|
-
|
|
1004
|
+
return (e == null ? void 0 : e.kind) === "sql" ? /* @__PURE__ */ p("div", { style: s.compiledQuery, children: [
|
|
1005
|
+
/* @__PURE__ */ o(Qe, { label: "SQL", value: e.sql }),
|
|
1006
|
+
e.pythonCode ? /* @__PURE__ */ o(Se, { label: "Python", value: e.pythonCode }) : null,
|
|
1007
|
+
e.parameters ? /* @__PURE__ */ o(
|
|
1008
|
+
Se,
|
|
934
1009
|
{
|
|
935
1010
|
label: "Parameters",
|
|
936
|
-
value:
|
|
1011
|
+
value: Le(e.parameters)
|
|
937
1012
|
}
|
|
938
1013
|
) : null
|
|
939
|
-
] }) :
|
|
1014
|
+
] }) : r ? /* @__PURE__ */ o(Qe, { label: "SQL", value: r }) : /* @__PURE__ */ o(Se, { label: "Compiled Query", value: Le(e) });
|
|
940
1015
|
}
|
|
941
|
-
function
|
|
1016
|
+
function Se({
|
|
942
1017
|
label: e,
|
|
943
|
-
value:
|
|
1018
|
+
value: r
|
|
944
1019
|
}) {
|
|
945
|
-
return /* @__PURE__ */ p("div", { style:
|
|
946
|
-
/* @__PURE__ */
|
|
947
|
-
/* @__PURE__ */
|
|
1020
|
+
return /* @__PURE__ */ p("div", { style: s.codeBlockGroup, children: [
|
|
1021
|
+
/* @__PURE__ */ o("div", { style: s.codeBlockLabel, children: e }),
|
|
1022
|
+
/* @__PURE__ */ o("pre", { style: s.codeBlock, children: r })
|
|
948
1023
|
] });
|
|
949
1024
|
}
|
|
950
|
-
function
|
|
951
|
-
|
|
1025
|
+
function Qe({
|
|
1026
|
+
label: e,
|
|
1027
|
+
value: r
|
|
1028
|
+
}) {
|
|
1029
|
+
return /* @__PURE__ */ p("div", { style: s.codeBlockGroup, children: [
|
|
1030
|
+
/* @__PURE__ */ o("div", { style: s.codeBlockLabel, children: e }),
|
|
1031
|
+
/* @__PURE__ */ o("pre", { style: s.codeBlock, children: ct(r) })
|
|
1032
|
+
] });
|
|
1033
|
+
}
|
|
1034
|
+
const ut = /* @__PURE__ */ new Set([
|
|
1035
|
+
"SELECT",
|
|
1036
|
+
"FROM",
|
|
1037
|
+
"JOIN",
|
|
1038
|
+
"LEFT",
|
|
1039
|
+
"RIGHT",
|
|
1040
|
+
"INNER",
|
|
1041
|
+
"OUTER",
|
|
1042
|
+
"CROSS",
|
|
1043
|
+
"ON",
|
|
1044
|
+
"USING",
|
|
1045
|
+
"WHERE",
|
|
1046
|
+
"AND",
|
|
1047
|
+
"OR",
|
|
1048
|
+
"GROUP",
|
|
1049
|
+
"BY",
|
|
1050
|
+
"HAVING",
|
|
1051
|
+
"ORDER",
|
|
1052
|
+
"ASC",
|
|
1053
|
+
"DESC",
|
|
1054
|
+
"LIMIT",
|
|
1055
|
+
"OFFSET",
|
|
1056
|
+
"AS",
|
|
1057
|
+
"BETWEEN",
|
|
1058
|
+
"IN",
|
|
1059
|
+
"NOT",
|
|
1060
|
+
"NULL",
|
|
1061
|
+
"IS",
|
|
1062
|
+
"CASE",
|
|
1063
|
+
"WHEN",
|
|
1064
|
+
"THEN",
|
|
1065
|
+
"ELSE",
|
|
1066
|
+
"END",
|
|
1067
|
+
"DISTINCT",
|
|
1068
|
+
"UNION",
|
|
1069
|
+
"ALL",
|
|
1070
|
+
"WITH"
|
|
1071
|
+
]);
|
|
1072
|
+
function ct(e) {
|
|
1073
|
+
return e.split(/(\s+|,|\(|\))/).map((t, n) => {
|
|
1074
|
+
if (!t) return null;
|
|
1075
|
+
const i = t.toUpperCase();
|
|
1076
|
+
return ut.has(i) ? /* @__PURE__ */ o("span", { style: s.sqlKeyword, children: t }, n) : t.startsWith("$") || t.startsWith(":") || t.startsWith("?") ? /* @__PURE__ */ o("span", { style: s.sqlBindParam, children: t }, n) : /* @__PURE__ */ o("span", { children: t }, n);
|
|
1077
|
+
});
|
|
1078
|
+
}
|
|
1079
|
+
function ft(e) {
|
|
1080
|
+
const r = e.filter(
|
|
952
1081
|
(i) => {
|
|
953
|
-
var
|
|
954
|
-
return ((
|
|
1082
|
+
var a;
|
|
1083
|
+
return ((a = i.latestAttempt) == null ? void 0 : a.status) === "error";
|
|
955
1084
|
}
|
|
956
|
-
).length,
|
|
1085
|
+
).length, t = e.filter(
|
|
957
1086
|
(i) => {
|
|
958
|
-
var
|
|
959
|
-
return ((
|
|
1087
|
+
var a;
|
|
1088
|
+
return ((a = i.latestAttempt) == null ? void 0 : a.status) === "loading";
|
|
960
1089
|
}
|
|
961
1090
|
).length, n = e.filter(
|
|
962
1091
|
(i) => {
|
|
963
|
-
var
|
|
964
|
-
return i.clientWarnings.length > 0 || !!((
|
|
1092
|
+
var a, l, c, u;
|
|
1093
|
+
return i.clientWarnings.length > 0 || !!((u = (c = (l = (a = i.latestAttempt) == null ? void 0 : a.executionResult) == null ? void 0 : l.validation) == null ? void 0 : c.warnings) != null && u.length);
|
|
965
1094
|
}
|
|
966
1095
|
).length;
|
|
967
1096
|
return {
|
|
968
1097
|
total: e.length,
|
|
969
|
-
failed:
|
|
970
|
-
loading:
|
|
1098
|
+
failed: r,
|
|
1099
|
+
loading: t,
|
|
971
1100
|
warningCount: n,
|
|
972
|
-
issueCount:
|
|
973
|
-
severity:
|
|
1101
|
+
issueCount: r + n,
|
|
1102
|
+
severity: r ? "error" : n ? "warning" : "ok"
|
|
974
1103
|
};
|
|
975
1104
|
}
|
|
976
|
-
function
|
|
977
|
-
const
|
|
978
|
-
return
|
|
1105
|
+
function pt(e, r) {
|
|
1106
|
+
const t = r.trim().toLowerCase();
|
|
1107
|
+
return t ? e.filter(
|
|
979
1108
|
(n) => [
|
|
980
1109
|
n.queryId,
|
|
981
1110
|
n.queryLabel,
|
|
@@ -985,36 +1114,36 @@ function lr(e, t) {
|
|
|
985
1114
|
n.sectionTitle,
|
|
986
1115
|
n.builder,
|
|
987
1116
|
n.queryKind,
|
|
988
|
-
|
|
989
|
-
].filter(Boolean).join(" ").toLowerCase().includes(
|
|
1117
|
+
Ke(n)
|
|
1118
|
+
].filter(Boolean).join(" ").toLowerCase().includes(t)
|
|
990
1119
|
) : e;
|
|
991
1120
|
}
|
|
992
|
-
function
|
|
993
|
-
const
|
|
1121
|
+
function gt(e) {
|
|
1122
|
+
const r = e.filter((i) => i.queryKind === "inputOptions"), t = new Set(r.map(Ce));
|
|
994
1123
|
return [
|
|
995
|
-
{ title: "
|
|
996
|
-
{ title: "Inputs", traces:
|
|
1124
|
+
{ title: "Views", traces: e.filter((i) => !t.has(Ce(i))) },
|
|
1125
|
+
{ title: "Inputs", traces: r }
|
|
997
1126
|
];
|
|
998
1127
|
}
|
|
999
|
-
function
|
|
1000
|
-
if (!(!(
|
|
1001
|
-
return
|
|
1128
|
+
function lr(e, r) {
|
|
1129
|
+
if (!(!(r != null && r.traceId) && !(r != null && r.queryId) && !(r != null && r.viewId)))
|
|
1130
|
+
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));
|
|
1002
1131
|
}
|
|
1003
|
-
function
|
|
1004
|
-
if (
|
|
1005
|
-
return
|
|
1006
|
-
if (!
|
|
1132
|
+
function mt(e, r) {
|
|
1133
|
+
if (r.queryId)
|
|
1134
|
+
return lr(e, r);
|
|
1135
|
+
if (!r.viewId)
|
|
1007
1136
|
return;
|
|
1008
|
-
const
|
|
1009
|
-
return
|
|
1137
|
+
const t = e.filter((n) => n.viewId === r.viewId);
|
|
1138
|
+
return t.length === 1 ? t[0] : void 0;
|
|
1010
1139
|
}
|
|
1011
|
-
function
|
|
1012
|
-
return !!(e &&
|
|
1140
|
+
function yt(e, r) {
|
|
1141
|
+
return !!(e && r && e.traceId === r.traceId);
|
|
1013
1142
|
}
|
|
1014
|
-
function
|
|
1143
|
+
function Ce(e) {
|
|
1015
1144
|
return e.traceId;
|
|
1016
1145
|
}
|
|
1017
|
-
function
|
|
1146
|
+
function ht(e) {
|
|
1018
1147
|
switch (e) {
|
|
1019
1148
|
case "metric":
|
|
1020
1149
|
return "metric";
|
|
@@ -1032,29 +1161,75 @@ function fr(e) {
|
|
|
1032
1161
|
return ye(e);
|
|
1033
1162
|
}
|
|
1034
1163
|
}
|
|
1035
|
-
function
|
|
1164
|
+
function ur(e) {
|
|
1165
|
+
const r = e.trim().toLowerCase();
|
|
1166
|
+
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";
|
|
1167
|
+
}
|
|
1168
|
+
function cr(e) {
|
|
1169
|
+
switch (e) {
|
|
1170
|
+
case "metric":
|
|
1171
|
+
return {
|
|
1172
|
+
borderColor: "var(--sd-tone-metric-border)",
|
|
1173
|
+
background: "var(--sd-tone-metric-bg)",
|
|
1174
|
+
color: "var(--sd-tone-metric-fg)"
|
|
1175
|
+
};
|
|
1176
|
+
case "records":
|
|
1177
|
+
return {
|
|
1178
|
+
borderColor: "var(--sd-tone-records-border)",
|
|
1179
|
+
background: "var(--sd-tone-records-bg)",
|
|
1180
|
+
color: "var(--sd-tone-records-fg)"
|
|
1181
|
+
};
|
|
1182
|
+
case "analysis":
|
|
1183
|
+
case "matrix":
|
|
1184
|
+
return {
|
|
1185
|
+
borderColor: "var(--sd-tone-analysis-border)",
|
|
1186
|
+
background: "var(--sd-tone-analysis-bg)",
|
|
1187
|
+
color: "var(--sd-tone-analysis-fg)"
|
|
1188
|
+
};
|
|
1189
|
+
case "inputs":
|
|
1190
|
+
case "sql":
|
|
1191
|
+
case "default":
|
|
1192
|
+
default:
|
|
1193
|
+
return {
|
|
1194
|
+
borderColor: "var(--sd-border)",
|
|
1195
|
+
background: "var(--sd-bg-accent)",
|
|
1196
|
+
color: "var(--sd-fg-muted)"
|
|
1197
|
+
};
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
function fr(e) {
|
|
1201
|
+
return e.queryLabel || e.queryId || me(e);
|
|
1202
|
+
}
|
|
1203
|
+
function vt(e) {
|
|
1204
|
+
return fr(e);
|
|
1205
|
+
}
|
|
1206
|
+
function bt(e) {
|
|
1207
|
+
const r = Ke(e), t = fr(e);
|
|
1208
|
+
return e.queryId && e.queryId !== t ? { source: r, queryId: e.queryId } : { source: r };
|
|
1209
|
+
}
|
|
1210
|
+
function me(e) {
|
|
1036
1211
|
return e.viewTitle || e.queryLabel || e.viewId || e.queryId;
|
|
1037
1212
|
}
|
|
1038
|
-
function
|
|
1213
|
+
function St(e) {
|
|
1039
1214
|
return e.viewTitle && e.queryLabel && e.queryLabel !== e.viewTitle ? `${e.queryLabel} · ${e.queryId}` : e.viewTitle || e.queryLabel ? e.queryId : e.viewId ? `${e.viewId} · ${e.queryId}` : e.queryId;
|
|
1040
1215
|
}
|
|
1041
|
-
function
|
|
1042
|
-
return
|
|
1216
|
+
function pr(e) {
|
|
1217
|
+
return It(e.visualType) || ht(e.queryKind);
|
|
1043
1218
|
}
|
|
1044
|
-
function
|
|
1045
|
-
return
|
|
1219
|
+
function xt(e, r) {
|
|
1220
|
+
return r ? e.queryLabel || e.queryId : me(e);
|
|
1046
1221
|
}
|
|
1047
|
-
function
|
|
1222
|
+
function It(e) {
|
|
1048
1223
|
if (e)
|
|
1049
|
-
return e.replace(/[_-]+/g, " ").replace(/\b\w/g, (
|
|
1224
|
+
return e.replace(/[_-]+/g, " ").replace(/\b\w/g, (r) => r.toUpperCase());
|
|
1050
1225
|
}
|
|
1051
|
-
function
|
|
1052
|
-
const
|
|
1053
|
-
return
|
|
1226
|
+
function Ke(e) {
|
|
1227
|
+
const r = e.sourceRefs.map(F);
|
|
1228
|
+
return r.length ? r.length === 1 ? r[0] : `${r[0]} + ${r.length - 1} more` : "No source";
|
|
1054
1229
|
}
|
|
1055
|
-
function
|
|
1230
|
+
function wt(e) {
|
|
1056
1231
|
return e.reduce(
|
|
1057
|
-
(
|
|
1232
|
+
(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),
|
|
1058
1233
|
{
|
|
1059
1234
|
measures: [],
|
|
1060
1235
|
timeFields: [],
|
|
@@ -1064,31 +1239,9 @@ function yr(e) {
|
|
|
1064
1239
|
}
|
|
1065
1240
|
);
|
|
1066
1241
|
}
|
|
1067
|
-
function
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
label: "Operation",
|
|
1071
|
-
value: hr(e)
|
|
1072
|
-
}
|
|
1073
|
-
], i = vr(e, t, r);
|
|
1074
|
-
i && n.push(i);
|
|
1075
|
-
const o = br(t);
|
|
1076
|
-
o && n.push({
|
|
1077
|
-
label: "Grouped by",
|
|
1078
|
-
value: o
|
|
1079
|
-
});
|
|
1080
|
-
const u = Sr(e.inputsApplied);
|
|
1081
|
-
return u && n.push({
|
|
1082
|
-
label: "Filtered by",
|
|
1083
|
-
value: u
|
|
1084
|
-
}), n.push({
|
|
1085
|
-
label: "Source",
|
|
1086
|
-
value: me(e)
|
|
1087
|
-
}), n;
|
|
1088
|
-
}
|
|
1089
|
-
function hr(e) {
|
|
1090
|
-
var t, r;
|
|
1091
|
-
if (e.queryKind === "records" && ((t = e.projectionFieldRefs) != null && t.length) && e.projectionFieldRefs.every((n) => n.role === "measure") && ((r = e.latestAttempt) == null ? void 0 : r.rowCount) === 1)
|
|
1242
|
+
function qt(e) {
|
|
1243
|
+
var r, t;
|
|
1244
|
+
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)
|
|
1092
1245
|
return "KPI query";
|
|
1093
1246
|
switch (e.queryKind) {
|
|
1094
1247
|
case "metric":
|
|
@@ -1107,101 +1260,47 @@ function hr(e) {
|
|
|
1107
1260
|
return ye(e.queryKind);
|
|
1108
1261
|
}
|
|
1109
1262
|
}
|
|
1110
|
-
function
|
|
1111
|
-
if (e.queryKind === "records")
|
|
1112
|
-
return {
|
|
1113
|
-
label: t.measures.length ? "Computes" : "Selects",
|
|
1114
|
-
value: ee(r)
|
|
1115
|
-
};
|
|
1116
|
-
if (e.queryKind === "inputOptions")
|
|
1117
|
-
return {
|
|
1118
|
-
label: "Options from",
|
|
1119
|
-
value: ee(r)
|
|
1120
|
-
};
|
|
1121
|
-
if (t.measures.length)
|
|
1122
|
-
return {
|
|
1123
|
-
label: "Computes",
|
|
1124
|
-
value: ee(t.measures)
|
|
1125
|
-
};
|
|
1126
|
-
if (r.length)
|
|
1127
|
-
return {
|
|
1128
|
-
label: "Uses",
|
|
1129
|
-
value: ee(r)
|
|
1130
|
-
};
|
|
1131
|
-
if (e.queryKind === "sql")
|
|
1132
|
-
return {
|
|
1133
|
-
label: "Inspect",
|
|
1134
|
-
value: "Open compiled query for SQL or Python."
|
|
1135
|
-
};
|
|
1136
|
-
}
|
|
1137
|
-
function br(e) {
|
|
1138
|
-
const t = [
|
|
1139
|
-
...e.dimensions,
|
|
1140
|
-
...e.timeFields
|
|
1141
|
-
];
|
|
1142
|
-
return t.length ? ee(t) : void 0;
|
|
1143
|
-
}
|
|
1144
|
-
function Sr(e) {
|
|
1145
|
-
if (e.length)
|
|
1146
|
-
return dt(
|
|
1147
|
-
e.map((t) => {
|
|
1148
|
-
const r = ft(t);
|
|
1149
|
-
return [
|
|
1150
|
-
t.inputId,
|
|
1151
|
-
r.operator,
|
|
1152
|
-
r.value
|
|
1153
|
-
].filter(Boolean).join(" ");
|
|
1154
|
-
})
|
|
1155
|
-
);
|
|
1156
|
-
}
|
|
1157
|
-
function ee(e) {
|
|
1158
|
-
return dt(e.map(ct));
|
|
1159
|
-
}
|
|
1160
|
-
function dt(e) {
|
|
1161
|
-
const t = e.filter(Boolean);
|
|
1162
|
-
return t.length === 0 ? "-" : t.length === 1 ? t[0] : t.length === 2 ? `${t[0]} and ${t[1]}` : `${t.slice(0, -1).join(", ")}, and ${t[t.length - 1]}`;
|
|
1163
|
-
}
|
|
1164
|
-
function ct(e) {
|
|
1263
|
+
function Rt(e) {
|
|
1165
1264
|
return [e.aggregate, e.label || e.name].filter(Boolean).join(" ");
|
|
1166
1265
|
}
|
|
1167
|
-
function
|
|
1168
|
-
var
|
|
1169
|
-
const
|
|
1266
|
+
function At(e) {
|
|
1267
|
+
var l, c, u;
|
|
1268
|
+
const r = e.valuePreview || "redacted", t = ((l = e.fieldRef) == null ? void 0 : l.label) || ((c = e.fieldRef) == null ? void 0 : c.name), n = (u = e.fieldRef) != null && u.source ? F(e.fieldRef.source) : void 0, i = [t ? `on ${t}` : void 0, n].filter(Boolean).join(" · "), a = [
|
|
1170
1269
|
e.inputId,
|
|
1171
1270
|
e.operator,
|
|
1172
|
-
|
|
1271
|
+
r,
|
|
1173
1272
|
i
|
|
1174
1273
|
].filter(Boolean).join(" - ");
|
|
1175
1274
|
return {
|
|
1176
1275
|
operator: e.operator,
|
|
1177
|
-
value:
|
|
1276
|
+
value: r,
|
|
1178
1277
|
binding: i,
|
|
1179
|
-
title:
|
|
1278
|
+
title: a
|
|
1180
1279
|
};
|
|
1181
1280
|
}
|
|
1182
|
-
function
|
|
1281
|
+
function F(e) {
|
|
1183
1282
|
return e.kind === "semantic" ? e.datasetName || e.datasetId || e.domainId : e.kind === "physical" ? [
|
|
1184
1283
|
e.schemaName,
|
|
1185
1284
|
e.tableName
|
|
1186
1285
|
].filter(Boolean).join(".") || e.tableName : e.connectionId ? `SQL ${e.connectionId}` : "SQL source";
|
|
1187
1286
|
}
|
|
1188
|
-
function
|
|
1287
|
+
function Tt(e) {
|
|
1189
1288
|
if (e.file)
|
|
1190
1289
|
return e.line && e.column ? `${e.file}:${e.line}:${e.column}` : e.line ? `${e.file}:${e.line}` : e.file;
|
|
1191
1290
|
}
|
|
1192
|
-
function
|
|
1291
|
+
function Et(e) {
|
|
1193
1292
|
return typeof e == "number" ? e.toLocaleString() : "-";
|
|
1194
1293
|
}
|
|
1195
|
-
function
|
|
1294
|
+
function kt(e) {
|
|
1196
1295
|
return typeof e == "number" ? `${Math.round(e)}ms` : "-";
|
|
1197
1296
|
}
|
|
1198
|
-
function
|
|
1199
|
-
return
|
|
1297
|
+
function Ct(e) {
|
|
1298
|
+
return Le(e);
|
|
1200
1299
|
}
|
|
1201
|
-
function
|
|
1300
|
+
function Le(e) {
|
|
1202
1301
|
return JSON.stringify(e, null, 2) ?? "undefined";
|
|
1203
1302
|
}
|
|
1204
|
-
function
|
|
1303
|
+
function Lt(e) {
|
|
1205
1304
|
switch (e.type) {
|
|
1206
1305
|
case "query_started":
|
|
1207
1306
|
return "Started";
|
|
@@ -1214,10 +1313,10 @@ function Ar(e) {
|
|
|
1214
1313
|
case "input_changed":
|
|
1215
1314
|
return "Input changed";
|
|
1216
1315
|
default:
|
|
1217
|
-
return
|
|
1316
|
+
return Ot(e);
|
|
1218
1317
|
}
|
|
1219
1318
|
}
|
|
1220
|
-
function
|
|
1319
|
+
function Dt(e) {
|
|
1221
1320
|
return [
|
|
1222
1321
|
e.at,
|
|
1223
1322
|
"durationMs" in e && typeof e.durationMs == "number" ? `${Math.round(e.durationMs)}ms` : void 0,
|
|
@@ -1226,20 +1325,20 @@ function Tr(e) {
|
|
|
1226
1325
|
"errorMessage" in e ? e.errorMessage : void 0
|
|
1227
1326
|
].filter(Boolean).join(" - ");
|
|
1228
1327
|
}
|
|
1229
|
-
function
|
|
1328
|
+
function Ot(e) {
|
|
1230
1329
|
throw new Error(`Unsupported Semaphor trace event: ${JSON.stringify(e)}`);
|
|
1231
1330
|
}
|
|
1232
|
-
function
|
|
1233
|
-
return Array.isArray(e) ? e.filter((
|
|
1331
|
+
function xe(e) {
|
|
1332
|
+
return Array.isArray(e) ? e.filter((r) => typeof r == "string") : [];
|
|
1234
1333
|
}
|
|
1235
|
-
function
|
|
1236
|
-
const
|
|
1334
|
+
function Bt(e) {
|
|
1335
|
+
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;
|
|
1237
1336
|
return {
|
|
1238
|
-
compiledSql: typeof (
|
|
1239
|
-
queryHash: typeof (
|
|
1337
|
+
compiledSql: typeof (t == null ? void 0 : t.compiledSql) == "string" ? t.compiledSql : void 0,
|
|
1338
|
+
queryHash: typeof (t == null ? void 0 : t.queryHash) == "string" ? t.queryHash : void 0
|
|
1240
1339
|
};
|
|
1241
1340
|
}
|
|
1242
|
-
function
|
|
1341
|
+
function Kt(e) {
|
|
1243
1342
|
return e === "relative" ? {
|
|
1244
1343
|
position: "relative",
|
|
1245
1344
|
top: "auto",
|
|
@@ -1253,7 +1352,7 @@ function kr(e) {
|
|
|
1253
1352
|
left: e.endsWith("left") ? 20 : "auto"
|
|
1254
1353
|
};
|
|
1255
1354
|
}
|
|
1256
|
-
function
|
|
1355
|
+
function Nt(e) {
|
|
1257
1356
|
return e === "error" ? {
|
|
1258
1357
|
borderColor: "var(--sd-error-border)",
|
|
1259
1358
|
background: "var(--sd-error-bg)",
|
|
@@ -1268,7 +1367,7 @@ function Cr(e) {
|
|
|
1268
1367
|
color: "var(--sd-success-fg)"
|
|
1269
1368
|
};
|
|
1270
1369
|
}
|
|
1271
|
-
function
|
|
1370
|
+
function $t(e) {
|
|
1272
1371
|
return e === "right" ? {
|
|
1273
1372
|
top: 16,
|
|
1274
1373
|
right: 16,
|
|
@@ -1287,23 +1386,23 @@ function Dr(e) {
|
|
|
1287
1386
|
borderRadius: 6
|
|
1288
1387
|
};
|
|
1289
1388
|
}
|
|
1290
|
-
function
|
|
1389
|
+
function Wt(e) {
|
|
1291
1390
|
return e === "right" ? {
|
|
1292
1391
|
gridTemplateColumns: "minmax(210px, 280px) minmax(0, 1fr)"
|
|
1293
1392
|
} : {
|
|
1294
1393
|
gridTemplateColumns: "minmax(260px, 340px) minmax(0, 1fr)"
|
|
1295
1394
|
};
|
|
1296
1395
|
}
|
|
1297
|
-
function
|
|
1396
|
+
function Ft(e) {
|
|
1298
1397
|
return {
|
|
1299
1398
|
borderRight: "1px solid var(--sd-border)",
|
|
1300
1399
|
borderBottom: 0
|
|
1301
1400
|
};
|
|
1302
1401
|
}
|
|
1303
|
-
function
|
|
1402
|
+
function gr(e) {
|
|
1304
1403
|
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)" };
|
|
1305
1404
|
}
|
|
1306
|
-
function
|
|
1405
|
+
function _t(e) {
|
|
1307
1406
|
return e === "error" ? {
|
|
1308
1407
|
borderColor: "var(--sd-error-border)",
|
|
1309
1408
|
color: "var(--sd-error-fg)"
|
|
@@ -1318,7 +1417,7 @@ function Br(e) {
|
|
|
1318
1417
|
color: "var(--sd-fg-muted)"
|
|
1319
1418
|
};
|
|
1320
1419
|
}
|
|
1321
|
-
const
|
|
1420
|
+
const Ve = "semaphor-devtools-stylesheet", $ = "semaphor-devtools", zt = `
|
|
1322
1421
|
.${$} {
|
|
1323
1422
|
--sd-bg: #ffffff;
|
|
1324
1423
|
--sd-bg-muted: #fafafa;
|
|
@@ -1348,6 +1447,23 @@ const Pe = "semaphor-devtools-stylesheet", $ = "semaphor-devtools", Kr = `
|
|
|
1348
1447
|
--sd-loading-border: #bfdbfe;
|
|
1349
1448
|
--sd-loading-dot: #2563eb;
|
|
1350
1449
|
--sd-idle-dot: #94a3b8;
|
|
1450
|
+
--sd-tone-metric-bg: #f5f3ff;
|
|
1451
|
+
--sd-tone-metric-fg: #6d28d9;
|
|
1452
|
+
--sd-tone-metric-border: #ddd6fe;
|
|
1453
|
+
--sd-tone-records-bg: #f0f9ff;
|
|
1454
|
+
--sd-tone-records-fg: #0369a1;
|
|
1455
|
+
--sd-tone-records-border: #bae6fd;
|
|
1456
|
+
--sd-tone-analysis-bg: #fffbeb;
|
|
1457
|
+
--sd-tone-analysis-fg: #b45309;
|
|
1458
|
+
--sd-tone-analysis-border: #fde68a;
|
|
1459
|
+
--sd-tone-date-bg: #fff7ed;
|
|
1460
|
+
--sd-tone-date-fg: #c2410c;
|
|
1461
|
+
--sd-tone-date-border: #fed7aa;
|
|
1462
|
+
--sd-tone-string-bg: #ecfdf5;
|
|
1463
|
+
--sd-tone-string-fg: #047857;
|
|
1464
|
+
--sd-tone-string-border: #a7f3d0;
|
|
1465
|
+
--sd-sql-keyword: #6d28d9;
|
|
1466
|
+
--sd-sql-bind: #b45309;
|
|
1351
1467
|
}
|
|
1352
1468
|
|
|
1353
1469
|
@media (prefers-color-scheme: dark) {
|
|
@@ -1375,6 +1491,23 @@ const Pe = "semaphor-devtools-stylesheet", $ = "semaphor-devtools", Kr = `
|
|
|
1375
1491
|
--sd-loading-bg: rgba(59, 130, 246, 0.12);
|
|
1376
1492
|
--sd-loading-fg: #93c5fd;
|
|
1377
1493
|
--sd-loading-border: rgba(59, 130, 246, 0.35);
|
|
1494
|
+
--sd-tone-metric-bg: rgba(139, 92, 246, 0.14);
|
|
1495
|
+
--sd-tone-metric-fg: #c4b5fd;
|
|
1496
|
+
--sd-tone-metric-border: rgba(139, 92, 246, 0.4);
|
|
1497
|
+
--sd-tone-records-bg: rgba(14, 165, 233, 0.14);
|
|
1498
|
+
--sd-tone-records-fg: #7dd3fc;
|
|
1499
|
+
--sd-tone-records-border: rgba(14, 165, 233, 0.4);
|
|
1500
|
+
--sd-tone-analysis-bg: rgba(245, 158, 11, 0.14);
|
|
1501
|
+
--sd-tone-analysis-fg: #fcd34d;
|
|
1502
|
+
--sd-tone-analysis-border: rgba(245, 158, 11, 0.4);
|
|
1503
|
+
--sd-tone-date-bg: rgba(249, 115, 22, 0.14);
|
|
1504
|
+
--sd-tone-date-fg: #fdba74;
|
|
1505
|
+
--sd-tone-date-border: rgba(249, 115, 22, 0.4);
|
|
1506
|
+
--sd-tone-string-bg: rgba(16, 185, 129, 0.14);
|
|
1507
|
+
--sd-tone-string-fg: #6ee7b7;
|
|
1508
|
+
--sd-tone-string-border: rgba(16, 185, 129, 0.4);
|
|
1509
|
+
--sd-sql-keyword: #c4b5fd;
|
|
1510
|
+
--sd-sql-bind: #fcd34d;
|
|
1378
1511
|
}
|
|
1379
1512
|
}
|
|
1380
1513
|
|
|
@@ -1386,19 +1519,19 @@ const Pe = "semaphor-devtools-stylesheet", $ = "semaphor-devtools", Kr = `
|
|
|
1386
1519
|
word-break: break-all;
|
|
1387
1520
|
}
|
|
1388
1521
|
`;
|
|
1389
|
-
function
|
|
1390
|
-
if (typeof document > "u" || document.getElementById(
|
|
1522
|
+
function mr() {
|
|
1523
|
+
if (typeof document > "u" || document.getElementById(Ve))
|
|
1391
1524
|
return;
|
|
1392
1525
|
const e = document.createElement("style");
|
|
1393
|
-
e.id =
|
|
1526
|
+
e.id = Ve, e.textContent = zt, document.head.appendChild(e);
|
|
1394
1527
|
}
|
|
1395
|
-
const
|
|
1528
|
+
const de = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif', O = "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace", Ie = {
|
|
1396
1529
|
color: "var(--sd-fg-muted)",
|
|
1397
1530
|
fontSize: 10,
|
|
1398
1531
|
fontWeight: 600,
|
|
1399
1532
|
textTransform: "uppercase",
|
|
1400
1533
|
letterSpacing: "0.08em"
|
|
1401
|
-
},
|
|
1534
|
+
}, s = {
|
|
1402
1535
|
launcher: {
|
|
1403
1536
|
position: "fixed",
|
|
1404
1537
|
bottom: 20,
|
|
@@ -1413,7 +1546,7 @@ const se = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1413
1546
|
borderStyle: "solid",
|
|
1414
1547
|
borderRadius: 6,
|
|
1415
1548
|
boxShadow: "var(--sd-shadow)",
|
|
1416
|
-
font: `600 12px/1.2 ${
|
|
1549
|
+
font: `600 12px/1.2 ${de}`,
|
|
1417
1550
|
cursor: "pointer"
|
|
1418
1551
|
},
|
|
1419
1552
|
launcherText: {
|
|
@@ -1455,7 +1588,7 @@ const se = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1455
1588
|
background: "var(--sd-bg)",
|
|
1456
1589
|
color: "var(--sd-fg)",
|
|
1457
1590
|
boxShadow: "var(--sd-shadow)",
|
|
1458
|
-
font: `13px/1.4 ${
|
|
1591
|
+
font: `13px/1.4 ${de}`
|
|
1459
1592
|
},
|
|
1460
1593
|
panelFullscreen: {
|
|
1461
1594
|
top: 0,
|
|
@@ -1524,7 +1657,7 @@ const se = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1524
1657
|
outline: 0,
|
|
1525
1658
|
background: "transparent",
|
|
1526
1659
|
color: "var(--sd-fg)",
|
|
1527
|
-
font: `12px/1.4 ${
|
|
1660
|
+
font: `12px/1.4 ${de}`
|
|
1528
1661
|
},
|
|
1529
1662
|
panelBody: {
|
|
1530
1663
|
display: "grid",
|
|
@@ -1550,7 +1683,7 @@ const se = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1550
1683
|
alignItems: "center",
|
|
1551
1684
|
justifyContent: "space-between",
|
|
1552
1685
|
padding: "4px 6px 3px",
|
|
1553
|
-
...
|
|
1686
|
+
...Ie
|
|
1554
1687
|
},
|
|
1555
1688
|
queryGroupCount: {
|
|
1556
1689
|
color: "var(--sd-fg-subtle)",
|
|
@@ -1603,11 +1736,21 @@ const se = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1603
1736
|
},
|
|
1604
1737
|
queryListKindChip: {
|
|
1605
1738
|
flex: "0 0 auto",
|
|
1606
|
-
|
|
1739
|
+
display: "inline-flex",
|
|
1740
|
+
alignItems: "center",
|
|
1741
|
+
height: 15,
|
|
1742
|
+
padding: "0 5px",
|
|
1743
|
+
borderWidth: 1,
|
|
1744
|
+
borderStyle: "solid",
|
|
1745
|
+
borderColor: "var(--sd-border)",
|
|
1746
|
+
borderRadius: 3,
|
|
1747
|
+
background: "var(--sd-bg-accent)",
|
|
1748
|
+
color: "var(--sd-fg-muted)",
|
|
1749
|
+
fontFamily: O,
|
|
1607
1750
|
fontSize: 9,
|
|
1608
1751
|
fontWeight: 600,
|
|
1609
1752
|
textTransform: "uppercase",
|
|
1610
|
-
letterSpacing: "0.
|
|
1753
|
+
letterSpacing: "0.06em"
|
|
1611
1754
|
},
|
|
1612
1755
|
queryListSource: {
|
|
1613
1756
|
minWidth: 0,
|
|
@@ -1616,12 +1759,12 @@ const se = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1616
1759
|
fontSize: 11,
|
|
1617
1760
|
lineHeight: 1.35
|
|
1618
1761
|
},
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1762
|
+
queryListPrefixSep: {
|
|
1763
|
+
color: "var(--sd-fg-subtle)"
|
|
1764
|
+
},
|
|
1765
|
+
queryListPrefixId: {
|
|
1766
|
+
fontFamily: O,
|
|
1767
|
+
color: "var(--sd-fg-subtle)"
|
|
1625
1768
|
},
|
|
1626
1769
|
detailsPane: {
|
|
1627
1770
|
minHeight: 0,
|
|
@@ -1658,44 +1801,148 @@ const se = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1658
1801
|
detailsKindChip: {
|
|
1659
1802
|
flex: "0 0 auto",
|
|
1660
1803
|
padding: "2px 6px",
|
|
1804
|
+
borderWidth: 1,
|
|
1805
|
+
borderStyle: "solid",
|
|
1806
|
+
borderColor: "var(--sd-border)",
|
|
1661
1807
|
borderRadius: 3,
|
|
1662
1808
|
background: "var(--sd-bg-accent)",
|
|
1663
1809
|
color: "var(--sd-fg-muted)",
|
|
1810
|
+
fontFamily: O,
|
|
1664
1811
|
fontSize: 10,
|
|
1665
1812
|
fontWeight: 600,
|
|
1666
1813
|
textTransform: "uppercase",
|
|
1667
|
-
letterSpacing: "0.
|
|
1814
|
+
letterSpacing: "0.06em"
|
|
1668
1815
|
},
|
|
1669
|
-
|
|
1816
|
+
metaStrip: {
|
|
1670
1817
|
display: "flex",
|
|
1671
1818
|
flexWrap: "wrap",
|
|
1672
1819
|
alignItems: "center",
|
|
1673
|
-
columnGap:
|
|
1820
|
+
columnGap: 6,
|
|
1674
1821
|
rowGap: 2,
|
|
1822
|
+
paddingLeft: 16,
|
|
1675
1823
|
color: "var(--sd-fg-muted)",
|
|
1676
1824
|
fontSize: 11
|
|
1677
1825
|
},
|
|
1678
|
-
|
|
1826
|
+
metaStripItem: {
|
|
1827
|
+
color: "var(--sd-fg-muted)",
|
|
1828
|
+
fontVariantNumeric: "tabular-nums"
|
|
1829
|
+
},
|
|
1830
|
+
metaStripDot: {
|
|
1831
|
+
color: "var(--sd-fg-subtle)"
|
|
1832
|
+
},
|
|
1833
|
+
sourcePillRow: {
|
|
1834
|
+
display: "flex",
|
|
1835
|
+
flexWrap: "wrap",
|
|
1836
|
+
gap: 6
|
|
1837
|
+
},
|
|
1838
|
+
sourcePill: {
|
|
1679
1839
|
display: "inline-flex",
|
|
1680
1840
|
alignItems: "center",
|
|
1681
|
-
gap:
|
|
1841
|
+
gap: 6,
|
|
1842
|
+
padding: "4px 7px",
|
|
1843
|
+
borderWidth: 1,
|
|
1844
|
+
borderStyle: "solid",
|
|
1845
|
+
borderColor: "var(--sd-border)",
|
|
1846
|
+
borderRadius: 5,
|
|
1847
|
+
background: "var(--sd-bg)",
|
|
1848
|
+
color: "var(--sd-fg)"
|
|
1682
1849
|
},
|
|
1683
|
-
|
|
1684
|
-
fontFamily:
|
|
1850
|
+
sourcePillLabel: {
|
|
1851
|
+
fontFamily: O,
|
|
1852
|
+
fontSize: 11,
|
|
1853
|
+
color: "var(--sd-fg)"
|
|
1685
1854
|
},
|
|
1686
|
-
|
|
1687
|
-
|
|
1855
|
+
sourcePillRole: {
|
|
1856
|
+
display: "inline-flex",
|
|
1857
|
+
alignItems: "center",
|
|
1858
|
+
height: 14,
|
|
1859
|
+
padding: "0 4px",
|
|
1860
|
+
borderRadius: 3,
|
|
1861
|
+
background: "var(--sd-bg-accent)",
|
|
1862
|
+
color: "var(--sd-fg-subtle)",
|
|
1863
|
+
fontFamily: O,
|
|
1864
|
+
fontSize: 9,
|
|
1865
|
+
textTransform: "uppercase",
|
|
1866
|
+
letterSpacing: "0.06em"
|
|
1867
|
+
},
|
|
1868
|
+
fieldChipList: {
|
|
1869
|
+
display: "grid",
|
|
1870
|
+
gap: 5,
|
|
1871
|
+
paddingTop: 6
|
|
1872
|
+
},
|
|
1873
|
+
fieldChip: {
|
|
1874
|
+
display: "flex",
|
|
1875
|
+
alignItems: "center",
|
|
1876
|
+
gap: 8,
|
|
1877
|
+
minWidth: 0,
|
|
1878
|
+
padding: "6px 9px",
|
|
1879
|
+
borderWidth: 1,
|
|
1880
|
+
borderStyle: "solid",
|
|
1881
|
+
borderColor: "var(--sd-border)",
|
|
1882
|
+
borderRadius: 5,
|
|
1883
|
+
background: "var(--sd-bg)"
|
|
1884
|
+
},
|
|
1885
|
+
fieldGlyph: {
|
|
1886
|
+
display: "inline-flex",
|
|
1887
|
+
flex: "0 0 auto",
|
|
1888
|
+
alignItems: "center",
|
|
1889
|
+
justifyContent: "center",
|
|
1890
|
+
width: 18,
|
|
1891
|
+
height: 18,
|
|
1892
|
+
borderWidth: 1,
|
|
1893
|
+
borderStyle: "solid",
|
|
1894
|
+
borderRadius: 4,
|
|
1895
|
+
fontFamily: O,
|
|
1896
|
+
fontSize: 11,
|
|
1897
|
+
fontWeight: 700,
|
|
1898
|
+
lineHeight: 1
|
|
1688
1899
|
},
|
|
1689
|
-
|
|
1900
|
+
fieldAggBadge: {
|
|
1901
|
+
display: "inline-flex",
|
|
1902
|
+
alignItems: "center",
|
|
1903
|
+
height: 16,
|
|
1904
|
+
padding: "0 5px",
|
|
1905
|
+
borderRadius: 3,
|
|
1906
|
+
background: "var(--sd-bg-accent)",
|
|
1690
1907
|
color: "var(--sd-fg)",
|
|
1691
|
-
|
|
1908
|
+
fontFamily: O,
|
|
1909
|
+
fontSize: 10,
|
|
1910
|
+
fontWeight: 600,
|
|
1911
|
+
letterSpacing: "0.04em"
|
|
1912
|
+
},
|
|
1913
|
+
fieldChipName: {
|
|
1914
|
+
flex: 1,
|
|
1915
|
+
minWidth: 0,
|
|
1916
|
+
overflow: "hidden",
|
|
1917
|
+
textOverflow: "ellipsis",
|
|
1918
|
+
whiteSpace: "nowrap",
|
|
1919
|
+
color: "var(--sd-fg)",
|
|
1920
|
+
fontSize: 12,
|
|
1921
|
+
fontWeight: 500
|
|
1922
|
+
},
|
|
1923
|
+
fieldChipMeta: {
|
|
1924
|
+
flex: "0 0 auto",
|
|
1925
|
+
fontFamily: O,
|
|
1926
|
+
fontSize: 10,
|
|
1927
|
+
color: "var(--sd-fg-subtle)"
|
|
1928
|
+
},
|
|
1929
|
+
fieldChipMetaDot: {
|
|
1930
|
+
color: "var(--sd-fg-subtle)",
|
|
1931
|
+
fontSize: 10
|
|
1932
|
+
},
|
|
1933
|
+
sqlKeyword: {
|
|
1934
|
+
color: "var(--sd-sql-keyword)",
|
|
1935
|
+
fontWeight: 600
|
|
1936
|
+
},
|
|
1937
|
+
sqlBindParam: {
|
|
1938
|
+
color: "var(--sd-sql-bind)"
|
|
1692
1939
|
},
|
|
1693
1940
|
disclosure: {
|
|
1694
1941
|
marginTop: 16
|
|
1695
1942
|
},
|
|
1696
1943
|
disclosureSummary: {
|
|
1697
1944
|
cursor: "pointer",
|
|
1698
|
-
...
|
|
1945
|
+
...Ie
|
|
1699
1946
|
},
|
|
1700
1947
|
disclosureBody: {
|
|
1701
1948
|
marginTop: 8
|
|
@@ -1740,38 +1987,6 @@ const se = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1740
1987
|
display: "grid",
|
|
1741
1988
|
gap: 12
|
|
1742
1989
|
},
|
|
1743
|
-
recipeSummary: {
|
|
1744
|
-
display: "grid",
|
|
1745
|
-
gap: 4,
|
|
1746
|
-
padding: "8px 10px",
|
|
1747
|
-
border: "1px solid var(--sd-border)",
|
|
1748
|
-
borderRadius: 5,
|
|
1749
|
-
background: "var(--sd-bg-muted)",
|
|
1750
|
-
color: "var(--sd-fg)",
|
|
1751
|
-
fontSize: 12
|
|
1752
|
-
},
|
|
1753
|
-
recipeSummaryRow: {
|
|
1754
|
-
display: "grid",
|
|
1755
|
-
gridTemplateColumns: "76px minmax(0, 1fr)",
|
|
1756
|
-
gap: 8,
|
|
1757
|
-
minWidth: 0,
|
|
1758
|
-
alignItems: "baseline"
|
|
1759
|
-
},
|
|
1760
|
-
recipeSummaryLabel: {
|
|
1761
|
-
color: "var(--sd-fg-subtle)",
|
|
1762
|
-
fontSize: 10,
|
|
1763
|
-
fontWeight: 600,
|
|
1764
|
-
textTransform: "uppercase",
|
|
1765
|
-
letterSpacing: "0.08em"
|
|
1766
|
-
},
|
|
1767
|
-
recipeSummaryValue: {
|
|
1768
|
-
minWidth: 0,
|
|
1769
|
-
overflow: "hidden",
|
|
1770
|
-
textOverflow: "ellipsis",
|
|
1771
|
-
whiteSpace: "nowrap",
|
|
1772
|
-
color: "var(--sd-fg)",
|
|
1773
|
-
fontSize: 12
|
|
1774
|
-
},
|
|
1775
1990
|
recipeGroup: {
|
|
1776
1991
|
display: "grid",
|
|
1777
1992
|
gap: 4
|
|
@@ -1833,10 +2048,6 @@ const se = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1833
2048
|
fontSize: 11,
|
|
1834
2049
|
textAlign: "right"
|
|
1835
2050
|
},
|
|
1836
|
-
recipeFieldMetaDivider: {
|
|
1837
|
-
color: "var(--sd-fg-subtle)",
|
|
1838
|
-
margin: "0 4px"
|
|
1839
|
-
},
|
|
1840
2051
|
inputsAppliedBlock: {
|
|
1841
2052
|
marginTop: 16,
|
|
1842
2053
|
padding: "10px 12px",
|
|
@@ -1887,7 +2098,7 @@ const se = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1887
2098
|
textOverflow: "ellipsis",
|
|
1888
2099
|
whiteSpace: "nowrap",
|
|
1889
2100
|
color: "var(--sd-fg)",
|
|
1890
|
-
fontFamily:
|
|
2101
|
+
fontFamily: O,
|
|
1891
2102
|
fontSize: 11,
|
|
1892
2103
|
fontWeight: 600
|
|
1893
2104
|
},
|
|
@@ -1900,7 +2111,7 @@ const se = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1900
2111
|
borderRadius: 3,
|
|
1901
2112
|
background: "var(--sd-bg-accent)",
|
|
1902
2113
|
color: "var(--sd-fg-muted)",
|
|
1903
|
-
fontFamily:
|
|
2114
|
+
fontFamily: O,
|
|
1904
2115
|
fontSize: 10,
|
|
1905
2116
|
textTransform: "uppercase",
|
|
1906
2117
|
letterSpacing: "0.06em"
|
|
@@ -1959,7 +2170,7 @@ const se = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1959
2170
|
gap: 5
|
|
1960
2171
|
},
|
|
1961
2172
|
codeBlockLabel: {
|
|
1962
|
-
...
|
|
2173
|
+
...Ie
|
|
1963
2174
|
},
|
|
1964
2175
|
codeBlock: {
|
|
1965
2176
|
maxHeight: 260,
|
|
@@ -1970,7 +2181,7 @@ const se = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1970
2181
|
borderRadius: 5,
|
|
1971
2182
|
background: "var(--sd-bg-muted)",
|
|
1972
2183
|
color: "var(--sd-fg)",
|
|
1973
|
-
fontFamily:
|
|
2184
|
+
fontFamily: O,
|
|
1974
2185
|
fontSize: 11,
|
|
1975
2186
|
lineHeight: 1.5,
|
|
1976
2187
|
whiteSpace: "pre-wrap"
|
|
@@ -1992,7 +2203,7 @@ const se = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1992
2203
|
borderStyle: "solid",
|
|
1993
2204
|
borderRadius: 5,
|
|
1994
2205
|
background: "var(--sd-bg)",
|
|
1995
|
-
font: `600 11px/1 ${
|
|
2206
|
+
font: `600 11px/1 ${de}`,
|
|
1996
2207
|
cursor: "pointer"
|
|
1997
2208
|
},
|
|
1998
2209
|
inspectButtonText: {
|
|
@@ -2001,7 +2212,7 @@ const se = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
2001
2212
|
whiteSpace: "nowrap"
|
|
2002
2213
|
}
|
|
2003
2214
|
};
|
|
2004
|
-
function
|
|
2215
|
+
function yr(e) {
|
|
2005
2216
|
return {
|
|
2006
2217
|
...e,
|
|
2007
2218
|
order: [],
|
|
@@ -2009,88 +2220,88 @@ function yt(e) {
|
|
|
2009
2220
|
sequence: 0
|
|
2010
2221
|
};
|
|
2011
2222
|
}
|
|
2012
|
-
function
|
|
2013
|
-
if (
|
|
2014
|
-
return
|
|
2223
|
+
function Mt(e, r) {
|
|
2224
|
+
if (r.type === "config")
|
|
2225
|
+
return r.config.enabled ? {
|
|
2015
2226
|
...e,
|
|
2016
|
-
...
|
|
2017
|
-
} :
|
|
2227
|
+
...r.config
|
|
2228
|
+
} : yr(r.config);
|
|
2018
2229
|
if (!e.enabled)
|
|
2019
2230
|
return e;
|
|
2020
|
-
switch (
|
|
2231
|
+
switch (r.type) {
|
|
2021
2232
|
case "register":
|
|
2022
|
-
return
|
|
2233
|
+
return Qt(Pt(e, r.descriptor));
|
|
2023
2234
|
case "unregister":
|
|
2024
|
-
return
|
|
2235
|
+
return Ht(e, r.traceKey);
|
|
2025
2236
|
case "event":
|
|
2026
|
-
return
|
|
2237
|
+
return jt(e, r);
|
|
2027
2238
|
default:
|
|
2028
2239
|
return e;
|
|
2029
2240
|
}
|
|
2030
2241
|
}
|
|
2031
|
-
function
|
|
2032
|
-
const
|
|
2033
|
-
...
|
|
2034
|
-
...
|
|
2035
|
-
traceKey:
|
|
2036
|
-
latestAttempt: (
|
|
2037
|
-
recentEvents: (
|
|
2242
|
+
function Pt(e, r) {
|
|
2243
|
+
const t = e.entries[r.traceKey], n = t ? e.sequence : e.sequence + 1, i = $e(), a = {
|
|
2244
|
+
...t || Vt(r),
|
|
2245
|
+
...hr(r),
|
|
2246
|
+
traceKey: r.traceKey,
|
|
2247
|
+
latestAttempt: (t == null ? void 0 : t.latestAttempt) || { status: "idle" },
|
|
2248
|
+
recentEvents: (t == null ? void 0 : t.recentEvents) || [],
|
|
2038
2249
|
mounted: !0,
|
|
2039
|
-
registeredAt: (
|
|
2040
|
-
lastEventAt: (
|
|
2250
|
+
registeredAt: (t == null ? void 0 : t.registeredAt) || n,
|
|
2251
|
+
lastEventAt: (t == null ? void 0 : t.lastEventAt) || i
|
|
2041
2252
|
};
|
|
2042
2253
|
return {
|
|
2043
2254
|
...e,
|
|
2044
2255
|
sequence: n,
|
|
2045
|
-
order:
|
|
2256
|
+
order: t ? e.order : [...e.order, r.traceKey],
|
|
2046
2257
|
entries: {
|
|
2047
2258
|
...e.entries,
|
|
2048
|
-
[
|
|
2259
|
+
[r.traceKey]: a
|
|
2049
2260
|
}
|
|
2050
2261
|
};
|
|
2051
2262
|
}
|
|
2052
|
-
function
|
|
2053
|
-
const
|
|
2054
|
-
return
|
|
2263
|
+
function Ht(e, r) {
|
|
2264
|
+
const t = e.entries[r];
|
|
2265
|
+
return t ? {
|
|
2055
2266
|
...e,
|
|
2056
2267
|
entries: {
|
|
2057
2268
|
...e.entries,
|
|
2058
|
-
[
|
|
2059
|
-
...
|
|
2269
|
+
[r]: {
|
|
2270
|
+
...t,
|
|
2060
2271
|
mounted: !1
|
|
2061
2272
|
}
|
|
2062
2273
|
}
|
|
2063
2274
|
} : e;
|
|
2064
2275
|
}
|
|
2065
|
-
function
|
|
2066
|
-
const
|
|
2067
|
-
if (!
|
|
2276
|
+
function jt(e, r) {
|
|
2277
|
+
const t = e.entries[r.traceKey];
|
|
2278
|
+
if (!t)
|
|
2068
2279
|
return e;
|
|
2069
|
-
const n =
|
|
2070
|
-
...
|
|
2071
|
-
|
|
2280
|
+
const n = $e(), i = [
|
|
2281
|
+
...t.recentEvents,
|
|
2282
|
+
r.event
|
|
2072
2283
|
].slice(-e.maxEventsPerQuery);
|
|
2073
2284
|
return {
|
|
2074
2285
|
...e,
|
|
2075
2286
|
entries: {
|
|
2076
2287
|
...e.entries,
|
|
2077
|
-
[
|
|
2078
|
-
...
|
|
2079
|
-
latestAttempt:
|
|
2080
|
-
...
|
|
2081
|
-
...
|
|
2082
|
-
} :
|
|
2288
|
+
[r.traceKey]: {
|
|
2289
|
+
...t,
|
|
2290
|
+
latestAttempt: r.latestAttempt ? {
|
|
2291
|
+
...t.latestAttempt,
|
|
2292
|
+
...r.latestAttempt
|
|
2293
|
+
} : t.latestAttempt,
|
|
2083
2294
|
recentEvents: i,
|
|
2084
2295
|
lastEventAt: n
|
|
2085
2296
|
}
|
|
2086
2297
|
}
|
|
2087
2298
|
};
|
|
2088
2299
|
}
|
|
2089
|
-
function
|
|
2300
|
+
function Qt(e) {
|
|
2090
2301
|
if (e.order.length <= e.maxQueries)
|
|
2091
2302
|
return e;
|
|
2092
|
-
const
|
|
2093
|
-
|
|
2303
|
+
const r = e.order.map((i) => e.entries[i]).filter((i) => !!i).sort((i, a) => i.mounted !== a.mounted ? i.mounted ? 1 : -1 : i.lastEventAt - a.lastEventAt), t = e.order.length - e.maxQueries, n = new Set(
|
|
2304
|
+
r.slice(0, t).map((i) => i.traceKey)
|
|
2094
2305
|
);
|
|
2095
2306
|
return n.size ? {
|
|
2096
2307
|
...e,
|
|
@@ -2100,26 +2311,26 @@ function Wr(e) {
|
|
|
2100
2311
|
)
|
|
2101
2312
|
} : e;
|
|
2102
2313
|
}
|
|
2103
|
-
function
|
|
2104
|
-
const
|
|
2314
|
+
function Vt(e) {
|
|
2315
|
+
const r = $e();
|
|
2105
2316
|
return {
|
|
2106
|
-
...
|
|
2317
|
+
...hr(e),
|
|
2107
2318
|
traceKey: e.traceKey,
|
|
2108
2319
|
latestAttempt: { status: "idle" },
|
|
2109
2320
|
recentEvents: [],
|
|
2110
2321
|
mounted: !0,
|
|
2111
2322
|
registeredAt: 0,
|
|
2112
|
-
lastEventAt:
|
|
2323
|
+
lastEventAt: r
|
|
2113
2324
|
};
|
|
2114
2325
|
}
|
|
2115
|
-
function
|
|
2326
|
+
function hr(e) {
|
|
2116
2327
|
var n;
|
|
2117
|
-
const
|
|
2328
|
+
const r = on(e.spec), t = sn(
|
|
2118
2329
|
e.spec,
|
|
2119
2330
|
e.activeInputs
|
|
2120
2331
|
);
|
|
2121
2332
|
return {
|
|
2122
|
-
traceId:
|
|
2333
|
+
traceId: xr(e.traceKey),
|
|
2123
2334
|
viewId: e.viewId,
|
|
2124
2335
|
viewTitle: e.viewTitle,
|
|
2125
2336
|
visualType: e.visualType,
|
|
@@ -2128,161 +2339,161 @@ function gt(e) {
|
|
|
2128
2339
|
queryLabel: e.queryLabel,
|
|
2129
2340
|
queryKind: e.queryKind,
|
|
2130
2341
|
builder: e.builder,
|
|
2131
|
-
sourceRefs:
|
|
2342
|
+
sourceRefs: nn(e.intent),
|
|
2132
2343
|
sourceHints: (n = e.sourceHints) != null && n.length ? e.sourceHints : void 0,
|
|
2133
|
-
projectionFieldRefs:
|
|
2134
|
-
inputFieldRefs:
|
|
2135
|
-
fieldRefs:
|
|
2344
|
+
projectionFieldRefs: r,
|
|
2345
|
+
inputFieldRefs: t,
|
|
2346
|
+
fieldRefs: an(e.intent),
|
|
2136
2347
|
inputsApplied: (e.activeInputs || []).map((i) => ({
|
|
2137
2348
|
inputId: i.inputId,
|
|
2138
2349
|
fieldRef: i.field,
|
|
2139
2350
|
operator: i.operator,
|
|
2140
|
-
valuePreview:
|
|
2351
|
+
valuePreview: rn(i)
|
|
2141
2352
|
})),
|
|
2142
2353
|
recentEvents: [],
|
|
2143
2354
|
clientWarnings: e.clientWarnings
|
|
2144
2355
|
};
|
|
2145
2356
|
}
|
|
2146
|
-
function
|
|
2357
|
+
function ce(e) {
|
|
2147
2358
|
const {
|
|
2148
|
-
traceKey:
|
|
2149
|
-
mounted:
|
|
2359
|
+
traceKey: r,
|
|
2360
|
+
mounted: t,
|
|
2150
2361
|
registeredAt: n,
|
|
2151
2362
|
lastEventAt: i,
|
|
2152
|
-
...
|
|
2363
|
+
...a
|
|
2153
2364
|
} = e;
|
|
2154
|
-
return
|
|
2365
|
+
return a;
|
|
2155
2366
|
}
|
|
2156
|
-
function
|
|
2367
|
+
function fe(e) {
|
|
2157
2368
|
return e.enabled ? {
|
|
2158
2369
|
enabled: !0,
|
|
2159
|
-
queries: e.order.map((
|
|
2160
|
-
getQuery: (
|
|
2370
|
+
queries: e.order.map((t) => e.entries[t]).filter((t) => !!t).map(ce),
|
|
2371
|
+
getQuery: (t) => {
|
|
2161
2372
|
const n = Object.values(e.entries).find(
|
|
2162
|
-
(i) => i.queryId ===
|
|
2373
|
+
(i) => i.queryId === t
|
|
2163
2374
|
);
|
|
2164
|
-
return n ?
|
|
2375
|
+
return n ? ce(n) : void 0;
|
|
2165
2376
|
},
|
|
2166
|
-
getQueries: (
|
|
2167
|
-
} :
|
|
2377
|
+
getQueries: (t) => Object.values(e.entries).filter((n) => n.queryId === t).map(ce)
|
|
2378
|
+
} : sr;
|
|
2168
2379
|
}
|
|
2169
|
-
function
|
|
2380
|
+
function Ut(e) {
|
|
2170
2381
|
return {
|
|
2171
|
-
snapshot: () =>
|
|
2172
|
-
getQuery: (
|
|
2173
|
-
getQueries: (
|
|
2382
|
+
snapshot: () => Gt(fe(e())),
|
|
2383
|
+
getQuery: (r) => Ue(fe(e()).getQuery(r)),
|
|
2384
|
+
getQueries: (r) => fe(e()).getQueries(r).map((t) => Ue(t)).filter((t) => !!t)
|
|
2174
2385
|
};
|
|
2175
2386
|
}
|
|
2176
|
-
function
|
|
2387
|
+
function Gt(e) {
|
|
2177
2388
|
if (!e.enabled)
|
|
2178
2389
|
return e;
|
|
2179
|
-
const
|
|
2390
|
+
const r = e.queries.map(vr);
|
|
2180
2391
|
return {
|
|
2181
2392
|
enabled: e.enabled,
|
|
2182
|
-
queries:
|
|
2183
|
-
getQuery: (
|
|
2184
|
-
getQueries: (
|
|
2393
|
+
queries: r,
|
|
2394
|
+
getQuery: (t) => r.find((n) => n.queryId === t),
|
|
2395
|
+
getQueries: (t) => r.filter((n) => n.queryId === t)
|
|
2185
2396
|
};
|
|
2186
2397
|
}
|
|
2187
|
-
function
|
|
2188
|
-
return e ?
|
|
2398
|
+
function Ue(e) {
|
|
2399
|
+
return e ? vr(e) : void 0;
|
|
2189
2400
|
}
|
|
2190
|
-
function
|
|
2191
|
-
var
|
|
2192
|
-
return (
|
|
2401
|
+
function vr(e) {
|
|
2402
|
+
var r;
|
|
2403
|
+
return (r = e == null ? void 0 : e.latestAttempt) != null && r.executionResult ? {
|
|
2193
2404
|
...e,
|
|
2194
2405
|
latestAttempt: {
|
|
2195
2406
|
...e.latestAttempt,
|
|
2196
|
-
executionResult:
|
|
2407
|
+
executionResult: Jt(
|
|
2197
2408
|
e.latestAttempt.executionResult
|
|
2198
2409
|
)
|
|
2199
2410
|
}
|
|
2200
2411
|
} : e;
|
|
2201
2412
|
}
|
|
2202
|
-
function
|
|
2413
|
+
function Jt(e) {
|
|
2203
2414
|
const {
|
|
2204
|
-
compiledQuery:
|
|
2205
|
-
intent:
|
|
2415
|
+
compiledQuery: r,
|
|
2416
|
+
intent: t,
|
|
2206
2417
|
result: n,
|
|
2207
2418
|
...i
|
|
2208
|
-
} = e,
|
|
2419
|
+
} = e, a = Yt(
|
|
2209
2420
|
i.metadata
|
|
2210
2421
|
);
|
|
2211
2422
|
return {
|
|
2212
2423
|
...i,
|
|
2213
|
-
...
|
|
2424
|
+
...a ? { metadata: a } : {}
|
|
2214
2425
|
};
|
|
2215
2426
|
}
|
|
2216
|
-
function
|
|
2427
|
+
function Yt(e) {
|
|
2217
2428
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
2218
2429
|
return e;
|
|
2219
|
-
const
|
|
2220
|
-
if (!
|
|
2430
|
+
const r = e.dataAppDebug;
|
|
2431
|
+
if (!r || typeof r != "object" || Array.isArray(r))
|
|
2221
2432
|
return e;
|
|
2222
|
-
const { compiledSql:
|
|
2433
|
+
const { compiledSql: t, ...n } = r;
|
|
2223
2434
|
return {
|
|
2224
2435
|
...e,
|
|
2225
2436
|
dataAppDebug: n
|
|
2226
2437
|
};
|
|
2227
2438
|
}
|
|
2228
|
-
function
|
|
2439
|
+
function Xt(e) {
|
|
2229
2440
|
return e === void 0 || e === !1 ? {
|
|
2230
2441
|
enabled: !1,
|
|
2231
2442
|
exposeWindowBridge: !1,
|
|
2232
|
-
maxEventsPerQuery:
|
|
2233
|
-
maxQueries:
|
|
2443
|
+
maxEventsPerQuery: ve,
|
|
2444
|
+
maxQueries: be
|
|
2234
2445
|
} : e === !0 ? {
|
|
2235
2446
|
enabled: !0,
|
|
2236
2447
|
exposeWindowBridge: !1,
|
|
2237
|
-
maxEventsPerQuery:
|
|
2238
|
-
maxQueries:
|
|
2448
|
+
maxEventsPerQuery: ve,
|
|
2449
|
+
maxQueries: be
|
|
2239
2450
|
} : {
|
|
2240
2451
|
enabled: e.enabled !== !1,
|
|
2241
2452
|
exposeWindowBridge: e.exposeWindowBridge === !0,
|
|
2242
|
-
maxEventsPerQuery:
|
|
2453
|
+
maxEventsPerQuery: Ye(
|
|
2243
2454
|
e.maxEventsPerQuery,
|
|
2244
|
-
|
|
2245
|
-
|
|
2455
|
+
ve,
|
|
2456
|
+
Hr
|
|
2246
2457
|
),
|
|
2247
|
-
maxQueries:
|
|
2458
|
+
maxQueries: Ye(
|
|
2248
2459
|
e.maxQueries,
|
|
2249
|
-
|
|
2250
|
-
|
|
2460
|
+
be,
|
|
2461
|
+
jr
|
|
2251
2462
|
)
|
|
2252
2463
|
};
|
|
2253
2464
|
}
|
|
2254
|
-
function
|
|
2255
|
-
const
|
|
2465
|
+
function Ge(e) {
|
|
2466
|
+
const t = [
|
|
2256
2467
|
e == null ? void 0 : e.sourceHint,
|
|
2257
2468
|
...(e == null ? void 0 : e.sourceHints) || []
|
|
2258
2469
|
].filter((n) => !!n).map((n) => ({
|
|
2259
2470
|
file: le(n.file),
|
|
2260
|
-
line:
|
|
2261
|
-
column:
|
|
2471
|
+
line: Je(n.line),
|
|
2472
|
+
column: Je(n.column),
|
|
2262
2473
|
exportName: le(n.exportName),
|
|
2263
2474
|
component: le(n.component),
|
|
2264
2475
|
note: le(n.note)
|
|
2265
2476
|
})).filter(
|
|
2266
2477
|
(n) => !!(n.file || n.line || n.column || n.exportName || n.component || n.note)
|
|
2267
2478
|
);
|
|
2268
|
-
return
|
|
2479
|
+
return t.length ? t : void 0;
|
|
2269
2480
|
}
|
|
2270
2481
|
function le(e) {
|
|
2271
2482
|
if (typeof e != "string")
|
|
2272
2483
|
return;
|
|
2273
|
-
const
|
|
2274
|
-
return
|
|
2484
|
+
const r = e.trim();
|
|
2485
|
+
return r || void 0;
|
|
2275
2486
|
}
|
|
2276
|
-
function
|
|
2487
|
+
function Je(e) {
|
|
2277
2488
|
return typeof e == "number" && Number.isInteger(e) && e > 0 ? e : void 0;
|
|
2278
2489
|
}
|
|
2279
|
-
function
|
|
2280
|
-
return e === void 0 || !Number.isFinite(e) || !Number.isInteger(e) || e <= 0 ?
|
|
2490
|
+
function Ye(e, r, t) {
|
|
2491
|
+
return e === void 0 || !Number.isFinite(e) || !Number.isInteger(e) || e <= 0 ? r : Math.min(e, t);
|
|
2281
2492
|
}
|
|
2282
|
-
function
|
|
2493
|
+
function Zt(e) {
|
|
2283
2494
|
return typeof e.id == "string" && e.id.trim() ? e.id : void 0;
|
|
2284
2495
|
}
|
|
2285
|
-
function
|
|
2496
|
+
function en(e) {
|
|
2286
2497
|
switch (e) {
|
|
2287
2498
|
case "metric":
|
|
2288
2499
|
return "semaphor.metric";
|
|
@@ -2303,67 +2514,67 @@ function Ur(e) {
|
|
|
2303
2514
|
function ye(e) {
|
|
2304
2515
|
throw new Error(`Unsupported Semaphor query kind: ${JSON.stringify(e)}`);
|
|
2305
2516
|
}
|
|
2306
|
-
function
|
|
2307
|
-
if (
|
|
2517
|
+
function rn(e) {
|
|
2518
|
+
if (tn(e))
|
|
2308
2519
|
return;
|
|
2309
|
-
const
|
|
2310
|
-
if (
|
|
2311
|
-
if (Array.isArray(
|
|
2312
|
-
const
|
|
2520
|
+
const r = e.value;
|
|
2521
|
+
if (r !== void 0) {
|
|
2522
|
+
if (Array.isArray(r)) {
|
|
2523
|
+
const t = r.filter(
|
|
2313
2524
|
(n) => typeof n == "string" || typeof n == "number" || typeof n == "boolean"
|
|
2314
2525
|
).map((n) => String(n));
|
|
2315
|
-
if (
|
|
2316
|
-
const n =
|
|
2317
|
-
return
|
|
2526
|
+
if (t.length === r.length && t.length > 0) {
|
|
2527
|
+
const n = t.slice(0, 3).join(", "), i = t.length > 3 ? `, +${t.length - 3} more` : "";
|
|
2528
|
+
return Xe(`${n}${i}`);
|
|
2318
2529
|
}
|
|
2319
|
-
return `${
|
|
2530
|
+
return `${r.length} selected`;
|
|
2320
2531
|
}
|
|
2321
|
-
return typeof
|
|
2532
|
+
return typeof r == "number" || typeof r == "boolean" ? String(r) : typeof r == "string" ? Xe(r) : r && typeof r == "object" ? `object(${Object.keys(r).slice(0, 5).join(",")})` : String(r);
|
|
2322
2533
|
}
|
|
2323
2534
|
}
|
|
2324
|
-
function
|
|
2535
|
+
function Xe(e) {
|
|
2325
2536
|
return e.length > 80 ? `${e.slice(0, 77)}...` : e;
|
|
2326
2537
|
}
|
|
2327
|
-
function
|
|
2328
|
-
var
|
|
2329
|
-
const
|
|
2538
|
+
function tn(e) {
|
|
2539
|
+
var t;
|
|
2540
|
+
const r = [
|
|
2330
2541
|
e.inputId,
|
|
2331
2542
|
e.label,
|
|
2332
|
-
(
|
|
2543
|
+
(t = e.field) == null ? void 0 : t.name
|
|
2333
2544
|
].filter(Boolean).join(" ").toLowerCase();
|
|
2334
2545
|
return ["token", "secret", "password", "email", "phone", "ssn"].some(
|
|
2335
|
-
(n) =>
|
|
2546
|
+
(n) => r.includes(n)
|
|
2336
2547
|
);
|
|
2337
2548
|
}
|
|
2338
|
-
function
|
|
2339
|
-
const
|
|
2340
|
-
return
|
|
2341
|
-
|
|
2342
|
-
}), [...
|
|
2549
|
+
function nn(e) {
|
|
2550
|
+
const r = /* @__PURE__ */ new Map();
|
|
2551
|
+
return pe(e, (t) => {
|
|
2552
|
+
dn(t) && r.set(Sr(t), t);
|
|
2553
|
+
}), [...r.values()];
|
|
2343
2554
|
}
|
|
2344
|
-
function
|
|
2555
|
+
function on(e) {
|
|
2345
2556
|
switch (e.queryKind) {
|
|
2346
2557
|
case "metric":
|
|
2347
2558
|
case "analysis":
|
|
2348
|
-
return
|
|
2559
|
+
return G([
|
|
2349
2560
|
...e.measures || [],
|
|
2350
2561
|
e.primaryMeasure,
|
|
2351
2562
|
e.dateField,
|
|
2352
2563
|
...e.dimensions || []
|
|
2353
2564
|
]);
|
|
2354
2565
|
case "records":
|
|
2355
|
-
return
|
|
2566
|
+
return G(e.fields || []);
|
|
2356
2567
|
case "inputOptions":
|
|
2357
|
-
return
|
|
2568
|
+
return G([
|
|
2358
2569
|
e.labelField,
|
|
2359
2570
|
e.valueField,
|
|
2360
2571
|
e.searchField,
|
|
2361
2572
|
...e.disambiguationFields || []
|
|
2362
2573
|
]);
|
|
2363
2574
|
case "sql":
|
|
2364
|
-
return
|
|
2575
|
+
return G(e.fields || []);
|
|
2365
2576
|
case "matrix":
|
|
2366
|
-
return
|
|
2577
|
+
return G([
|
|
2367
2578
|
...(e.rows || []).map(we),
|
|
2368
2579
|
...(e.columns || []).map(we),
|
|
2369
2580
|
...(e.values || []).map(we)
|
|
@@ -2372,68 +2583,68 @@ function Xr(e) {
|
|
|
2372
2583
|
return ye(e);
|
|
2373
2584
|
}
|
|
2374
2585
|
}
|
|
2375
|
-
function
|
|
2376
|
-
const
|
|
2377
|
-
...(e.inputs || []).map(
|
|
2378
|
-
...(
|
|
2586
|
+
function sn(e, r) {
|
|
2587
|
+
const t = [
|
|
2588
|
+
...(e.inputs || []).map(br),
|
|
2589
|
+
...(r || []).map((n) => n.field)
|
|
2379
2590
|
];
|
|
2380
|
-
return
|
|
2591
|
+
return G(t);
|
|
2381
2592
|
}
|
|
2382
|
-
function
|
|
2383
|
-
const
|
|
2384
|
-
return e.forEach((
|
|
2385
|
-
|
|
2386
|
-
}), [...
|
|
2593
|
+
function G(e) {
|
|
2594
|
+
const r = /* @__PURE__ */ new Map();
|
|
2595
|
+
return e.forEach((t) => {
|
|
2596
|
+
t && te(t) && r.set(Ne(t), t);
|
|
2597
|
+
}), [...r.values()];
|
|
2387
2598
|
}
|
|
2388
|
-
function
|
|
2599
|
+
function br(e) {
|
|
2389
2600
|
if (!e || typeof e != "object")
|
|
2390
2601
|
return;
|
|
2391
|
-
const
|
|
2392
|
-
if (typeof
|
|
2393
|
-
const n =
|
|
2394
|
-
return
|
|
2602
|
+
const r = e.toAnalyticsInput;
|
|
2603
|
+
if (typeof r == "function") {
|
|
2604
|
+
const n = r.call(e);
|
|
2605
|
+
return br(n);
|
|
2395
2606
|
}
|
|
2396
|
-
const
|
|
2397
|
-
return
|
|
2607
|
+
const t = e.field;
|
|
2608
|
+
return te(t) ? t : void 0;
|
|
2398
2609
|
}
|
|
2399
2610
|
function we(e) {
|
|
2400
|
-
if (
|
|
2611
|
+
if (te(e))
|
|
2401
2612
|
return e;
|
|
2402
2613
|
if (!e || typeof e != "object")
|
|
2403
2614
|
return;
|
|
2404
|
-
const
|
|
2405
|
-
return
|
|
2615
|
+
const r = e.field;
|
|
2616
|
+
return te(r) ? r : void 0;
|
|
2406
2617
|
}
|
|
2407
|
-
function
|
|
2408
|
-
const
|
|
2409
|
-
return
|
|
2410
|
-
|
|
2411
|
-
}), [...
|
|
2618
|
+
function an(e) {
|
|
2619
|
+
const r = /* @__PURE__ */ new Map();
|
|
2620
|
+
return pe(e, (t) => {
|
|
2621
|
+
te(t) && r.set(Ne(t), t);
|
|
2622
|
+
}), [...r.values()];
|
|
2412
2623
|
}
|
|
2413
|
-
function
|
|
2624
|
+
function pe(e, r) {
|
|
2414
2625
|
if (!(!e || typeof e != "object")) {
|
|
2415
|
-
if (
|
|
2416
|
-
e.forEach((
|
|
2626
|
+
if (r(e), Array.isArray(e)) {
|
|
2627
|
+
e.forEach((t) => pe(t, r));
|
|
2417
2628
|
return;
|
|
2418
2629
|
}
|
|
2419
2630
|
Object.values(e).forEach(
|
|
2420
|
-
(
|
|
2631
|
+
(t) => pe(t, r)
|
|
2421
2632
|
);
|
|
2422
2633
|
}
|
|
2423
2634
|
}
|
|
2424
|
-
function
|
|
2635
|
+
function dn(e) {
|
|
2425
2636
|
if (!e || typeof e != "object")
|
|
2426
2637
|
return !1;
|
|
2427
|
-
const
|
|
2428
|
-
return
|
|
2638
|
+
const r = e;
|
|
2639
|
+
return r.kind === "semantic" ? typeof r.domainId == "string" && typeof r.datasetName == "string" : r.kind === "physical" ? typeof r.connectionId == "string" && typeof r.tableName == "string" : r.kind === "sql" ? typeof r.connectionId == "string" : !1;
|
|
2429
2640
|
}
|
|
2430
|
-
function
|
|
2641
|
+
function te(e) {
|
|
2431
2642
|
if (!e || typeof e != "object")
|
|
2432
2643
|
return !1;
|
|
2433
|
-
const
|
|
2434
|
-
return typeof
|
|
2644
|
+
const r = e;
|
|
2645
|
+
return typeof r.name == "string" && (r.source !== void 0 || r.role !== void 0 || r.dataType !== void 0 || r.aggregate !== void 0);
|
|
2435
2646
|
}
|
|
2436
|
-
function
|
|
2647
|
+
function Sr(e) {
|
|
2437
2648
|
return e.kind === "semantic" ? [
|
|
2438
2649
|
e.kind,
|
|
2439
2650
|
e.domainId,
|
|
@@ -2446,43 +2657,43 @@ function bt(e) {
|
|
|
2446
2657
|
e.tableName
|
|
2447
2658
|
].join(":") : [e.kind, e.connectionId].join(":");
|
|
2448
2659
|
}
|
|
2449
|
-
function
|
|
2660
|
+
function Ne(e) {
|
|
2450
2661
|
return [
|
|
2451
2662
|
e.name,
|
|
2452
2663
|
e.role,
|
|
2453
2664
|
e.aggregate,
|
|
2454
|
-
e.source ?
|
|
2665
|
+
e.source ? Sr(e.source) : ""
|
|
2455
2666
|
].join(":");
|
|
2456
2667
|
}
|
|
2457
|
-
function
|
|
2458
|
-
const
|
|
2459
|
-
return typeof (
|
|
2668
|
+
function ln(e) {
|
|
2669
|
+
const r = e;
|
|
2670
|
+
return typeof (r == null ? void 0 : r.rowCount) == "number" ? r.rowCount : Array.isArray(r == null ? void 0 : r.records) ? r.records.length : void 0;
|
|
2460
2671
|
}
|
|
2461
|
-
function
|
|
2462
|
-
const
|
|
2463
|
-
return Array.isArray(
|
|
2672
|
+
function un(e) {
|
|
2673
|
+
const r = e;
|
|
2674
|
+
return Array.isArray(r == null ? void 0 : r.columns) ? r.columns.length : void 0;
|
|
2464
2675
|
}
|
|
2465
|
-
function
|
|
2466
|
-
const
|
|
2467
|
-
return
|
|
2676
|
+
function Ze(e) {
|
|
2677
|
+
const r = e;
|
|
2678
|
+
return r == null ? void 0 : r.executionResult;
|
|
2468
2679
|
}
|
|
2469
|
-
function
|
|
2470
|
-
const
|
|
2471
|
-
return typeof (
|
|
2680
|
+
function er(e) {
|
|
2681
|
+
const r = e;
|
|
2682
|
+
return typeof (r == null ? void 0 : r.requestId) == "string" ? r.requestId : void 0;
|
|
2472
2683
|
}
|
|
2473
|
-
function
|
|
2474
|
-
let
|
|
2475
|
-
for (let
|
|
2476
|
-
|
|
2477
|
-
return (
|
|
2684
|
+
function xr(e) {
|
|
2685
|
+
let r = 2166136261;
|
|
2686
|
+
for (let t = 0; t < e.length; t += 1)
|
|
2687
|
+
r ^= e.charCodeAt(t), r = Math.imul(r, 16777619);
|
|
2688
|
+
return (r >>> 0).toString(36);
|
|
2478
2689
|
}
|
|
2479
2690
|
function ue() {
|
|
2480
2691
|
return (/* @__PURE__ */ new Date()).toISOString();
|
|
2481
2692
|
}
|
|
2482
|
-
function
|
|
2693
|
+
function $e() {
|
|
2483
2694
|
return typeof performance < "u" && performance.now ? performance.now() : Date.now();
|
|
2484
2695
|
}
|
|
2485
|
-
const
|
|
2696
|
+
const cn = [
|
|
2486
2697
|
"records",
|
|
2487
2698
|
"changes",
|
|
2488
2699
|
"drivers",
|
|
@@ -2490,7 +2701,7 @@ const on = [
|
|
|
2490
2701
|
"largestPositiveChanges",
|
|
2491
2702
|
"largestNegativeDrivers",
|
|
2492
2703
|
"largestPositiveDrivers"
|
|
2493
|
-
],
|
|
2704
|
+
], fn = [
|
|
2494
2705
|
"records",
|
|
2495
2706
|
"changes",
|
|
2496
2707
|
"drivers",
|
|
@@ -2499,13 +2710,13 @@ const on = [
|
|
|
2499
2710
|
"largestNegativeDrivers",
|
|
2500
2711
|
"largestPositiveDrivers"
|
|
2501
2712
|
];
|
|
2502
|
-
function
|
|
2713
|
+
function Ir(e) {
|
|
2503
2714
|
if (!e)
|
|
2504
2715
|
return {};
|
|
2505
|
-
const
|
|
2716
|
+
const r = hn(e.executionResult), t = pn(e, r), n = mn(t);
|
|
2506
2717
|
return {
|
|
2507
2718
|
...e,
|
|
2508
|
-
...Object.keys(
|
|
2719
|
+
...Object.keys(t).length ? { resultSets: t } : {},
|
|
2509
2720
|
...n ? {
|
|
2510
2721
|
columns: n.columns,
|
|
2511
2722
|
records: n.records,
|
|
@@ -2513,136 +2724,136 @@ function wt(e) {
|
|
|
2513
2724
|
} : {}
|
|
2514
2725
|
};
|
|
2515
2726
|
}
|
|
2516
|
-
function
|
|
2517
|
-
const
|
|
2518
|
-
for (const i of
|
|
2519
|
-
if (
|
|
2520
|
-
|
|
2727
|
+
function pn(e, r) {
|
|
2728
|
+
const t = gn(e.resultSets);
|
|
2729
|
+
for (const i of cn) {
|
|
2730
|
+
if (t[i]) {
|
|
2731
|
+
t[i] = wr(t[i]);
|
|
2521
2732
|
continue;
|
|
2522
2733
|
}
|
|
2523
|
-
const
|
|
2524
|
-
if (!
|
|
2734
|
+
const a = vn(e[i]);
|
|
2735
|
+
if (!a.length)
|
|
2525
2736
|
continue;
|
|
2526
|
-
const
|
|
2527
|
-
|
|
2528
|
-
records:
|
|
2529
|
-
columns:
|
|
2530
|
-
rowCount:
|
|
2737
|
+
const l = r.length ? r : bn(a);
|
|
2738
|
+
t[i] = {
|
|
2739
|
+
records: We(a, l),
|
|
2740
|
+
columns: l,
|
|
2741
|
+
rowCount: a.length
|
|
2531
2742
|
};
|
|
2532
2743
|
}
|
|
2533
|
-
const n =
|
|
2534
|
-
return n && n.records.length > 0 && !
|
|
2744
|
+
const n = yn(e.executionResult);
|
|
2745
|
+
return n && n.records.length > 0 && !t.records && (t.records = n), t;
|
|
2535
2746
|
}
|
|
2536
|
-
function
|
|
2747
|
+
function gn(e) {
|
|
2537
2748
|
return Object.fromEntries(
|
|
2538
|
-
Object.entries(e || {}).map(([
|
|
2539
|
-
|
|
2540
|
-
|
|
2749
|
+
Object.entries(e || {}).map(([r, t]) => [
|
|
2750
|
+
r,
|
|
2751
|
+
wr(t)
|
|
2541
2752
|
])
|
|
2542
2753
|
);
|
|
2543
2754
|
}
|
|
2544
|
-
function
|
|
2545
|
-
var
|
|
2755
|
+
function wr(e) {
|
|
2756
|
+
var r;
|
|
2546
2757
|
return {
|
|
2547
2758
|
...e,
|
|
2548
|
-
records:
|
|
2759
|
+
records: We(
|
|
2549
2760
|
e.records || [],
|
|
2550
2761
|
e.columns || []
|
|
2551
2762
|
),
|
|
2552
|
-
rowCount: e.rowCount ?? ((
|
|
2763
|
+
rowCount: e.rowCount ?? ((r = e.records) == null ? void 0 : r.length) ?? 0
|
|
2553
2764
|
};
|
|
2554
2765
|
}
|
|
2555
|
-
function
|
|
2556
|
-
var
|
|
2557
|
-
for (const
|
|
2558
|
-
if ((
|
|
2559
|
-
return e[
|
|
2560
|
-
return Object.values(e).find((
|
|
2561
|
-
}
|
|
2562
|
-
function
|
|
2563
|
-
const
|
|
2564
|
-
if (!(!
|
|
2766
|
+
function mn(e) {
|
|
2767
|
+
var r;
|
|
2768
|
+
for (const t of fn)
|
|
2769
|
+
if ((r = e[t]) != null && r.records.length)
|
|
2770
|
+
return e[t];
|
|
2771
|
+
return Object.values(e).find((t) => t.records.length) || Object.values(e)[0];
|
|
2772
|
+
}
|
|
2773
|
+
function yn(e) {
|
|
2774
|
+
const r = e == null ? void 0 : e.result;
|
|
2775
|
+
if (!(!r || r.kind !== "records" && r.kind !== "sql"))
|
|
2565
2776
|
return {
|
|
2566
|
-
records:
|
|
2567
|
-
columns:
|
|
2568
|
-
rowCount:
|
|
2777
|
+
records: We(r.records, r.columns),
|
|
2778
|
+
columns: r.columns,
|
|
2779
|
+
rowCount: r.rowCount ?? r.records.length
|
|
2569
2780
|
};
|
|
2570
2781
|
}
|
|
2571
|
-
function
|
|
2572
|
-
const
|
|
2573
|
-
return !
|
|
2782
|
+
function hn(e) {
|
|
2783
|
+
const r = e == null ? void 0 : e.result;
|
|
2784
|
+
return !r || r.kind !== "records" && r.kind !== "sql" ? [] : r.columns;
|
|
2574
2785
|
}
|
|
2575
|
-
function
|
|
2786
|
+
function vn(e) {
|
|
2576
2787
|
return Array.isArray(e) ? e.filter(
|
|
2577
|
-
(
|
|
2788
|
+
(r) => !!(r && typeof r == "object" && !Array.isArray(r))
|
|
2578
2789
|
) : [];
|
|
2579
2790
|
}
|
|
2580
|
-
function
|
|
2581
|
-
return
|
|
2791
|
+
function We(e, r) {
|
|
2792
|
+
return r.length ? e.map((t) => {
|
|
2582
2793
|
const n = {};
|
|
2583
|
-
return
|
|
2584
|
-
const
|
|
2794
|
+
return r.forEach((i, a) => {
|
|
2795
|
+
const l = Sn(t, {
|
|
2585
2796
|
name: i.key,
|
|
2586
2797
|
label: i.label,
|
|
2587
|
-
fallbackNames: [i.name, Object.keys(
|
|
2798
|
+
fallbackNames: [i.name, Object.keys(t)[a]]
|
|
2588
2799
|
});
|
|
2589
|
-
|
|
2590
|
-
}), Object.keys(n).length ? n :
|
|
2800
|
+
l !== void 0 && (n[i.key] = l);
|
|
2801
|
+
}), Object.keys(n).length ? n : t;
|
|
2591
2802
|
}) : e;
|
|
2592
2803
|
}
|
|
2593
|
-
function
|
|
2804
|
+
function bn(e) {
|
|
2594
2805
|
return Array.from(
|
|
2595
|
-
new Set(e.flatMap((
|
|
2596
|
-
).map((
|
|
2597
|
-
key:
|
|
2598
|
-
name:
|
|
2599
|
-
label:
|
|
2806
|
+
new Set(e.flatMap((t) => Object.keys(t)))
|
|
2807
|
+
).map((t) => ({
|
|
2808
|
+
key: t,
|
|
2809
|
+
name: t,
|
|
2810
|
+
label: t
|
|
2600
2811
|
}));
|
|
2601
2812
|
}
|
|
2602
|
-
function
|
|
2603
|
-
const
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
...
|
|
2813
|
+
function Sn(e, r) {
|
|
2814
|
+
const t = [
|
|
2815
|
+
r.name,
|
|
2816
|
+
r.label,
|
|
2817
|
+
...r.fallbackNames || []
|
|
2607
2818
|
].filter((n) => !!n);
|
|
2608
|
-
for (const n of
|
|
2819
|
+
for (const n of t)
|
|
2609
2820
|
if (Object.prototype.hasOwnProperty.call(e, n))
|
|
2610
2821
|
return e[n];
|
|
2611
2822
|
}
|
|
2612
|
-
function
|
|
2823
|
+
function xn() {
|
|
2613
2824
|
return {
|
|
2614
|
-
executeAnalysis: (e,
|
|
2825
|
+
executeAnalysis: (e, r, t) => U(
|
|
2615
2826
|
e,
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
).then(
|
|
2619
|
-
executeMetric: (e,
|
|
2620
|
-
executeRecords: (e,
|
|
2621
|
-
executeInputOptions: (e,
|
|
2622
|
-
executeSql: (e,
|
|
2623
|
-
executeMatrix: (e,
|
|
2827
|
+
r,
|
|
2828
|
+
t ?? {}
|
|
2829
|
+
).then(Ir),
|
|
2830
|
+
executeMetric: (e, r) => U(e, r),
|
|
2831
|
+
executeRecords: (e, r) => U(e, r),
|
|
2832
|
+
executeInputOptions: (e, r) => U(e, r),
|
|
2833
|
+
executeSql: (e, r) => U(e, r),
|
|
2834
|
+
executeMatrix: (e, r) => U(e, r)
|
|
2624
2835
|
};
|
|
2625
2836
|
}
|
|
2626
|
-
async function
|
|
2627
|
-
if (!
|
|
2837
|
+
async function U(e, r, t) {
|
|
2838
|
+
if (!r.token)
|
|
2628
2839
|
throw new Error(
|
|
2629
2840
|
"SemaphorDataAppProvider needs a token to execute queries."
|
|
2630
2841
|
);
|
|
2631
|
-
const n =
|
|
2632
|
-
let
|
|
2842
|
+
const n = kn(r), i = qn(e, n);
|
|
2843
|
+
let a;
|
|
2633
2844
|
try {
|
|
2634
|
-
|
|
2845
|
+
a = await fetch(n, {
|
|
2635
2846
|
method: "POST",
|
|
2636
2847
|
headers: {
|
|
2637
2848
|
"Content-Type": "application/json",
|
|
2638
|
-
Authorization: `Bearer ${
|
|
2849
|
+
Authorization: `Bearer ${r.token}`
|
|
2639
2850
|
},
|
|
2640
2851
|
body: JSON.stringify({
|
|
2641
2852
|
intent: e,
|
|
2642
|
-
activeInputs:
|
|
2643
|
-
...
|
|
2853
|
+
activeInputs: r.activeInputs,
|
|
2854
|
+
...t ? { analysisOptions: t } : {},
|
|
2644
2855
|
resultShape: e.kind,
|
|
2645
|
-
...
|
|
2856
|
+
...wn(r) ? { debug: { responseDetail: "debug" } } : {}
|
|
2646
2857
|
})
|
|
2647
2858
|
});
|
|
2648
2859
|
} catch (c) {
|
|
@@ -2650,51 +2861,51 @@ async function H(e, t, r) {
|
|
|
2650
2861
|
`${i}: ${c instanceof Error ? c.message : String(c)}`
|
|
2651
2862
|
);
|
|
2652
2863
|
}
|
|
2653
|
-
const
|
|
2654
|
-
if (!
|
|
2655
|
-
throw
|
|
2656
|
-
`${i}: ${
|
|
2657
|
-
|
|
2864
|
+
const l = await Tn(a);
|
|
2865
|
+
if (!a.ok || l.error)
|
|
2866
|
+
throw In(
|
|
2867
|
+
`${i}: ${l.error || `Semaphor Data App execution failed with status ${a.status}.`}`,
|
|
2868
|
+
l
|
|
2658
2869
|
);
|
|
2659
|
-
return
|
|
2870
|
+
return l;
|
|
2660
2871
|
}
|
|
2661
|
-
function
|
|
2662
|
-
const
|
|
2663
|
-
return
|
|
2872
|
+
function In(e, r) {
|
|
2873
|
+
const t = new Error(e);
|
|
2874
|
+
return r.requestId && (t.requestId = r.requestId), r.details !== void 0 && (t.details = r.details), r.executionResult !== void 0 && (t.executionResult = r.executionResult), t;
|
|
2664
2875
|
}
|
|
2665
|
-
function
|
|
2666
|
-
const
|
|
2667
|
-
return
|
|
2876
|
+
function wn(e) {
|
|
2877
|
+
const r = e.debug;
|
|
2878
|
+
return r ? r === !0 ? !0 : r.enabled !== !1 && r.requestServerDebug !== !1 : !1;
|
|
2668
2879
|
}
|
|
2669
|
-
function
|
|
2880
|
+
function qn(e, r) {
|
|
2670
2881
|
return [
|
|
2671
2882
|
`Semaphor ${e.kind} query`,
|
|
2672
2883
|
e.id ? `id=${e.id}` : void 0,
|
|
2673
2884
|
e.label ? `label=${e.label}` : void 0,
|
|
2674
|
-
|
|
2675
|
-
`endpoint=${
|
|
2676
|
-
].filter((
|
|
2677
|
-
}
|
|
2678
|
-
function
|
|
2679
|
-
const
|
|
2680
|
-
if (!(!
|
|
2681
|
-
if (
|
|
2885
|
+
Rn(e),
|
|
2886
|
+
`endpoint=${An(r)}`
|
|
2887
|
+
].filter((t) => !!t).join(" ");
|
|
2888
|
+
}
|
|
2889
|
+
function Rn(e) {
|
|
2890
|
+
const r = "source" in e ? e.source : void 0;
|
|
2891
|
+
if (!(!r || typeof r != "object")) {
|
|
2892
|
+
if (r.kind === "semantic")
|
|
2682
2893
|
return `source=${[
|
|
2683
|
-
|
|
2684
|
-
|
|
2894
|
+
r.domainId,
|
|
2895
|
+
r.datasetId || r.datasetName
|
|
2685
2896
|
].filter(Boolean).join("/")}`;
|
|
2686
|
-
if (
|
|
2897
|
+
if (r.kind === "physical")
|
|
2687
2898
|
return `source=${[
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2899
|
+
r.connectionId,
|
|
2900
|
+
r.databaseName,
|
|
2901
|
+
r.schemaName,
|
|
2902
|
+
r.tableName
|
|
2692
2903
|
].filter(Boolean).join("/")}`;
|
|
2693
|
-
if (
|
|
2694
|
-
return
|
|
2904
|
+
if (r.kind === "sql")
|
|
2905
|
+
return r.connectionId ? `source=${r.connectionId}` : void 0;
|
|
2695
2906
|
}
|
|
2696
2907
|
}
|
|
2697
|
-
function
|
|
2908
|
+
function An(e) {
|
|
2698
2909
|
if (!e)
|
|
2699
2910
|
return "/api/v1/data-app/execute";
|
|
2700
2911
|
try {
|
|
@@ -2703,303 +2914,303 @@ function Sn(e) {
|
|
|
2703
2914
|
return e;
|
|
2704
2915
|
}
|
|
2705
2916
|
}
|
|
2706
|
-
async function
|
|
2707
|
-
const
|
|
2708
|
-
if (!
|
|
2917
|
+
async function Tn(e) {
|
|
2918
|
+
const r = await e.text().catch(() => "");
|
|
2919
|
+
if (!r.trim())
|
|
2709
2920
|
return e.ok ? {
|
|
2710
2921
|
error: "Semaphor Data App execution returned an empty response."
|
|
2711
2922
|
} : {};
|
|
2712
2923
|
try {
|
|
2713
|
-
return JSON.parse(
|
|
2924
|
+
return JSON.parse(r);
|
|
2714
2925
|
} catch {
|
|
2715
2926
|
return e.ok ? {
|
|
2716
2927
|
error: "Semaphor Data App execution returned invalid JSON.",
|
|
2717
|
-
details:
|
|
2928
|
+
details: r
|
|
2718
2929
|
} : {
|
|
2719
|
-
error:
|
|
2720
|
-
details:
|
|
2930
|
+
error: En(e, r),
|
|
2931
|
+
details: r
|
|
2721
2932
|
};
|
|
2722
2933
|
}
|
|
2723
2934
|
}
|
|
2724
|
-
function
|
|
2725
|
-
const
|
|
2726
|
-
return n ? `Semaphor Data App execution failed with status ${e.status}${
|
|
2935
|
+
function En(e, r) {
|
|
2936
|
+
const t = e.statusText ? ` ${e.statusText}` : "", n = r.replace(/\s+/g, " ").trim();
|
|
2937
|
+
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}.`;
|
|
2727
2938
|
}
|
|
2728
|
-
function
|
|
2729
|
-
const
|
|
2730
|
-
return
|
|
2939
|
+
function kn(e) {
|
|
2940
|
+
const r = Cn(e).replace(/\/+$/, "");
|
|
2941
|
+
return r ? r.endsWith("/api") ? `${r}/v1/data-app/execute` : `${r}/api/v1/data-app/execute` : "/api/v1/data-app/execute";
|
|
2731
2942
|
}
|
|
2732
|
-
function
|
|
2943
|
+
function Cn(e) {
|
|
2733
2944
|
if (e.apiBaseUrl)
|
|
2734
2945
|
return e.apiBaseUrl;
|
|
2735
2946
|
if (!e.token)
|
|
2736
2947
|
return "";
|
|
2737
2948
|
try {
|
|
2738
|
-
return
|
|
2949
|
+
return Mr(e.token).apiServiceUrl || "";
|
|
2739
2950
|
} catch {
|
|
2740
2951
|
return "";
|
|
2741
2952
|
}
|
|
2742
2953
|
}
|
|
2743
|
-
const
|
|
2744
|
-
function
|
|
2954
|
+
const qr = ge({});
|
|
2955
|
+
function Ln() {
|
|
2745
2956
|
if (!(typeof window > "u"))
|
|
2746
2957
|
return window.__SEMAPHOR_DATA_APP_RUNTIME__;
|
|
2747
2958
|
}
|
|
2748
|
-
function
|
|
2749
|
-
return
|
|
2959
|
+
function Dn() {
|
|
2960
|
+
return H(qr);
|
|
2750
2961
|
}
|
|
2751
|
-
const
|
|
2752
|
-
function
|
|
2753
|
-
const
|
|
2962
|
+
const qe = { value: null }, Re = {}, On = { records: [] }, Ae = { options: [] }, Bn = { records: [] }, Te = {};
|
|
2963
|
+
function Kn(e) {
|
|
2964
|
+
const r = J(e.inputs), t = Or(e);
|
|
2754
2965
|
try {
|
|
2755
|
-
const n =
|
|
2966
|
+
const n = Br(e), i = Y(n);
|
|
2756
2967
|
return i ? {
|
|
2757
2968
|
error: i,
|
|
2758
|
-
activeInputs:
|
|
2759
|
-
analysisOptions:
|
|
2969
|
+
activeInputs: r,
|
|
2970
|
+
analysisOptions: t,
|
|
2760
2971
|
queryKey: q(
|
|
2761
2972
|
void 0,
|
|
2762
|
-
|
|
2973
|
+
r,
|
|
2763
2974
|
i,
|
|
2764
|
-
|
|
2975
|
+
t
|
|
2765
2976
|
),
|
|
2766
|
-
idleData:
|
|
2977
|
+
idleData: Re
|
|
2767
2978
|
} : {
|
|
2768
2979
|
intent: n,
|
|
2769
2980
|
error: null,
|
|
2770
|
-
activeInputs:
|
|
2771
|
-
analysisOptions:
|
|
2772
|
-
queryKey: q(n,
|
|
2773
|
-
idleData:
|
|
2981
|
+
activeInputs: r,
|
|
2982
|
+
analysisOptions: t,
|
|
2983
|
+
queryKey: q(n, r, void 0, t),
|
|
2984
|
+
idleData: Re
|
|
2774
2985
|
};
|
|
2775
2986
|
} catch (n) {
|
|
2776
|
-
const i =
|
|
2987
|
+
const i = _(n);
|
|
2777
2988
|
return {
|
|
2778
2989
|
error: i,
|
|
2779
|
-
activeInputs:
|
|
2780
|
-
analysisOptions:
|
|
2990
|
+
activeInputs: r,
|
|
2991
|
+
analysisOptions: t,
|
|
2781
2992
|
queryKey: q(
|
|
2782
2993
|
void 0,
|
|
2783
|
-
|
|
2994
|
+
r,
|
|
2784
2995
|
i,
|
|
2785
|
-
|
|
2996
|
+
t
|
|
2786
2997
|
),
|
|
2787
|
-
idleData:
|
|
2998
|
+
idleData: Re
|
|
2788
2999
|
};
|
|
2789
3000
|
}
|
|
2790
3001
|
}
|
|
2791
|
-
function
|
|
2792
|
-
const
|
|
3002
|
+
function Nn(e) {
|
|
3003
|
+
const r = J(e.inputs);
|
|
2793
3004
|
try {
|
|
2794
|
-
const
|
|
3005
|
+
const t = Kr(e), n = Y(t);
|
|
2795
3006
|
return n ? {
|
|
2796
3007
|
error: n,
|
|
2797
|
-
activeInputs:
|
|
2798
|
-
queryKey: q(void 0,
|
|
2799
|
-
idleData:
|
|
3008
|
+
activeInputs: r,
|
|
3009
|
+
queryKey: q(void 0, r, n),
|
|
3010
|
+
idleData: qe
|
|
2800
3011
|
} : {
|
|
2801
|
-
intent:
|
|
3012
|
+
intent: t,
|
|
2802
3013
|
error: null,
|
|
2803
|
-
activeInputs:
|
|
2804
|
-
queryKey: q(
|
|
2805
|
-
idleData:
|
|
3014
|
+
activeInputs: r,
|
|
3015
|
+
queryKey: q(t, r),
|
|
3016
|
+
idleData: qe
|
|
2806
3017
|
};
|
|
2807
|
-
} catch (
|
|
2808
|
-
const n =
|
|
3018
|
+
} catch (t) {
|
|
3019
|
+
const n = _(t);
|
|
2809
3020
|
return {
|
|
2810
3021
|
error: n,
|
|
2811
|
-
activeInputs:
|
|
2812
|
-
queryKey: q(void 0,
|
|
2813
|
-
idleData:
|
|
3022
|
+
activeInputs: r,
|
|
3023
|
+
queryKey: q(void 0, r, n),
|
|
3024
|
+
idleData: qe
|
|
2814
3025
|
};
|
|
2815
3026
|
}
|
|
2816
3027
|
}
|
|
2817
|
-
function
|
|
2818
|
-
const
|
|
3028
|
+
function $n(e) {
|
|
3029
|
+
const r = J(e.inputs), t = On;
|
|
2819
3030
|
try {
|
|
2820
|
-
const n =
|
|
3031
|
+
const n = Dr(e), i = Y(n);
|
|
2821
3032
|
return i ? {
|
|
2822
3033
|
error: i,
|
|
2823
|
-
activeInputs:
|
|
2824
|
-
queryKey: q(void 0,
|
|
2825
|
-
idleData:
|
|
3034
|
+
activeInputs: r,
|
|
3035
|
+
queryKey: q(void 0, r, i),
|
|
3036
|
+
idleData: t
|
|
2826
3037
|
} : {
|
|
2827
3038
|
intent: n,
|
|
2828
3039
|
error: null,
|
|
2829
|
-
activeInputs:
|
|
2830
|
-
queryKey: q(n,
|
|
2831
|
-
idleData:
|
|
3040
|
+
activeInputs: r,
|
|
3041
|
+
queryKey: q(n, r),
|
|
3042
|
+
idleData: t
|
|
2832
3043
|
};
|
|
2833
3044
|
} catch (n) {
|
|
2834
|
-
const i =
|
|
3045
|
+
const i = _(n);
|
|
2835
3046
|
return {
|
|
2836
3047
|
error: i,
|
|
2837
|
-
activeInputs:
|
|
2838
|
-
queryKey: q(void 0,
|
|
2839
|
-
idleData:
|
|
3048
|
+
activeInputs: r,
|
|
3049
|
+
queryKey: q(void 0, r, i),
|
|
3050
|
+
idleData: t
|
|
2840
3051
|
};
|
|
2841
3052
|
}
|
|
2842
3053
|
}
|
|
2843
|
-
function
|
|
2844
|
-
const
|
|
3054
|
+
function Wn(e) {
|
|
3055
|
+
const r = J(e.inputs);
|
|
2845
3056
|
try {
|
|
2846
|
-
const
|
|
3057
|
+
const t = Lr(e), n = Y(t);
|
|
2847
3058
|
return n ? {
|
|
2848
3059
|
error: n,
|
|
2849
|
-
activeInputs:
|
|
2850
|
-
queryKey: q(void 0,
|
|
2851
|
-
idleData:
|
|
3060
|
+
activeInputs: r,
|
|
3061
|
+
queryKey: q(void 0, r, n),
|
|
3062
|
+
idleData: Ae
|
|
2852
3063
|
} : {
|
|
2853
|
-
intent:
|
|
3064
|
+
intent: t,
|
|
2854
3065
|
error: null,
|
|
2855
|
-
activeInputs:
|
|
2856
|
-
queryKey: q(
|
|
2857
|
-
idleData:
|
|
3066
|
+
activeInputs: r,
|
|
3067
|
+
queryKey: q(t, r),
|
|
3068
|
+
idleData: Ae
|
|
2858
3069
|
};
|
|
2859
|
-
} catch (
|
|
2860
|
-
const n =
|
|
3070
|
+
} catch (t) {
|
|
3071
|
+
const n = _(t);
|
|
2861
3072
|
return {
|
|
2862
3073
|
error: n,
|
|
2863
|
-
activeInputs:
|
|
2864
|
-
queryKey: q(void 0,
|
|
2865
|
-
idleData:
|
|
3074
|
+
activeInputs: r,
|
|
3075
|
+
queryKey: q(void 0, r, n),
|
|
3076
|
+
idleData: Ae
|
|
2866
3077
|
};
|
|
2867
3078
|
}
|
|
2868
3079
|
}
|
|
2869
|
-
function
|
|
2870
|
-
const
|
|
3080
|
+
function Fn(e) {
|
|
3081
|
+
const r = J(e.inputs), t = Bn;
|
|
2871
3082
|
try {
|
|
2872
|
-
const n =
|
|
3083
|
+
const n = Cr(e), i = Y(n);
|
|
2873
3084
|
return i ? {
|
|
2874
3085
|
error: i,
|
|
2875
|
-
activeInputs:
|
|
2876
|
-
queryKey: q(void 0,
|
|
2877
|
-
idleData:
|
|
3086
|
+
activeInputs: r,
|
|
3087
|
+
queryKey: q(void 0, r, i),
|
|
3088
|
+
idleData: t
|
|
2878
3089
|
} : {
|
|
2879
3090
|
intent: n,
|
|
2880
3091
|
error: null,
|
|
2881
|
-
activeInputs:
|
|
2882
|
-
queryKey: q(n,
|
|
2883
|
-
idleData:
|
|
3092
|
+
activeInputs: r,
|
|
3093
|
+
queryKey: q(n, r),
|
|
3094
|
+
idleData: t
|
|
2884
3095
|
};
|
|
2885
3096
|
} catch (n) {
|
|
2886
|
-
const i =
|
|
3097
|
+
const i = _(n);
|
|
2887
3098
|
return {
|
|
2888
3099
|
error: i,
|
|
2889
|
-
activeInputs:
|
|
2890
|
-
queryKey: q(void 0,
|
|
2891
|
-
idleData:
|
|
3100
|
+
activeInputs: r,
|
|
3101
|
+
queryKey: q(void 0, r, i),
|
|
3102
|
+
idleData: t
|
|
2892
3103
|
};
|
|
2893
3104
|
}
|
|
2894
3105
|
}
|
|
2895
|
-
function
|
|
2896
|
-
const
|
|
3106
|
+
function _n(e) {
|
|
3107
|
+
const r = J(e.inputs);
|
|
2897
3108
|
try {
|
|
2898
|
-
const
|
|
3109
|
+
const t = kr(e), n = Y(t);
|
|
2899
3110
|
return n ? {
|
|
2900
3111
|
error: n,
|
|
2901
|
-
activeInputs:
|
|
2902
|
-
queryKey: q(void 0,
|
|
2903
|
-
idleData:
|
|
3112
|
+
activeInputs: r,
|
|
3113
|
+
queryKey: q(void 0, r, n),
|
|
3114
|
+
idleData: Te
|
|
2904
3115
|
} : {
|
|
2905
|
-
intent:
|
|
3116
|
+
intent: t,
|
|
2906
3117
|
error: null,
|
|
2907
|
-
activeInputs:
|
|
2908
|
-
queryKey: q(
|
|
2909
|
-
idleData:
|
|
3118
|
+
activeInputs: r,
|
|
3119
|
+
queryKey: q(t, r),
|
|
3120
|
+
idleData: Te
|
|
2910
3121
|
};
|
|
2911
|
-
} catch (
|
|
2912
|
-
const n =
|
|
3122
|
+
} catch (t) {
|
|
3123
|
+
const n = _(t);
|
|
2913
3124
|
return {
|
|
2914
3125
|
error: n,
|
|
2915
|
-
activeInputs:
|
|
2916
|
-
queryKey: q(void 0,
|
|
2917
|
-
idleData:
|
|
3126
|
+
activeInputs: r,
|
|
3127
|
+
queryKey: q(void 0, r, n),
|
|
3128
|
+
idleData: Te
|
|
2918
3129
|
};
|
|
2919
3130
|
}
|
|
2920
3131
|
}
|
|
2921
|
-
function
|
|
3132
|
+
function _(e) {
|
|
2922
3133
|
return e instanceof Error ? e : new Error(String(e));
|
|
2923
3134
|
}
|
|
2924
|
-
function
|
|
2925
|
-
const
|
|
2926
|
-
if (
|
|
3135
|
+
function Y(e) {
|
|
3136
|
+
const r = Pr(e);
|
|
3137
|
+
if (r.ok)
|
|
2927
3138
|
return null;
|
|
2928
|
-
const
|
|
3139
|
+
const t = r.errors.map(
|
|
2929
3140
|
(n) => n.path ? `${n.code} at ${n.path}: ${n.message}` : `${n.code}: ${n.message}`
|
|
2930
3141
|
).join("; ");
|
|
2931
|
-
return new Error(`Invalid Semaphor analytics intent. ${
|
|
3142
|
+
return new Error(`Invalid Semaphor analytics intent. ${t}`);
|
|
2932
3143
|
}
|
|
2933
|
-
function q(e,
|
|
3144
|
+
function q(e, r, t, n) {
|
|
2934
3145
|
return JSON.stringify({
|
|
2935
3146
|
intent: e,
|
|
2936
|
-
activeInputs:
|
|
3147
|
+
activeInputs: r,
|
|
2937
3148
|
analysisOptions: n,
|
|
2938
|
-
error:
|
|
3149
|
+
error: t == null ? void 0 : t.message
|
|
2939
3150
|
});
|
|
2940
3151
|
}
|
|
2941
|
-
function
|
|
2942
|
-
const [
|
|
2943
|
-
() =>
|
|
3152
|
+
function ii(e) {
|
|
3153
|
+
const [r, t] = j(e.defaultValue), n = Object.prototype.hasOwnProperty.call(e, "value"), i = n ? e.value : r, a = v(
|
|
3154
|
+
() => nr(e.options),
|
|
2944
3155
|
[e.options]
|
|
2945
|
-
),
|
|
2946
|
-
(
|
|
2947
|
-
var
|
|
2948
|
-
const f =
|
|
2949
|
-
(
|
|
3156
|
+
), l = D(
|
|
3157
|
+
(u) => {
|
|
3158
|
+
var m;
|
|
3159
|
+
const f = u;
|
|
3160
|
+
(m = e.onValueChange) == null || m.call(e, f), n || t(f);
|
|
2950
3161
|
},
|
|
2951
3162
|
[n, e]
|
|
2952
|
-
), c = D(() =>
|
|
2953
|
-
return
|
|
2954
|
-
const
|
|
3163
|
+
), c = D(() => l(void 0), [l]);
|
|
3164
|
+
return v(() => {
|
|
3165
|
+
const u = ir(e);
|
|
2955
3166
|
return {
|
|
2956
3167
|
id: e.id,
|
|
2957
3168
|
kind: e.kind,
|
|
2958
3169
|
label: e.label,
|
|
2959
|
-
field:
|
|
2960
|
-
operator:
|
|
2961
|
-
relationshipHint:
|
|
3170
|
+
field: u.field,
|
|
3171
|
+
operator: u.operator,
|
|
3172
|
+
relationshipHint: u.relationshipHint,
|
|
2962
3173
|
controlRole: e.kind === "control" ? e.role : void 0,
|
|
2963
3174
|
value: i,
|
|
2964
|
-
options:
|
|
3175
|
+
options: a,
|
|
2965
3176
|
isActive: re(i),
|
|
2966
|
-
setValue:
|
|
3177
|
+
setValue: l,
|
|
2967
3178
|
clear: c,
|
|
2968
3179
|
toAnalyticsInput: () => ({
|
|
2969
|
-
inputId:
|
|
2970
|
-
field:
|
|
3180
|
+
inputId: u.inputId,
|
|
3181
|
+
field: u.field,
|
|
2971
3182
|
kind: e.kind,
|
|
2972
3183
|
label: e.label,
|
|
2973
3184
|
value: i,
|
|
2974
3185
|
isActive: re(i),
|
|
2975
|
-
operator:
|
|
2976
|
-
relationshipHint:
|
|
3186
|
+
operator: u.operator,
|
|
3187
|
+
relationshipHint: u.relationshipHint,
|
|
2977
3188
|
controlRole: e.kind === "control" ? e.role : void 0
|
|
2978
3189
|
})
|
|
2979
3190
|
};
|
|
2980
|
-
}, [c,
|
|
3191
|
+
}, [c, a, l, e, i]);
|
|
2981
3192
|
}
|
|
2982
|
-
function
|
|
2983
|
-
const [
|
|
3193
|
+
function oi(e) {
|
|
3194
|
+
const [r, t] = j(() => Hn(e));
|
|
2984
3195
|
return B(() => {
|
|
2985
|
-
|
|
3196
|
+
t((n) => {
|
|
2986
3197
|
let i = n;
|
|
2987
|
-
for (const
|
|
2988
|
-
!Object.prototype.hasOwnProperty.call(i,
|
|
3198
|
+
for (const a of e)
|
|
3199
|
+
!Object.prototype.hasOwnProperty.call(i, a.id) && a.defaultValue !== void 0 && (i = { ...i, [a.id]: a.defaultValue });
|
|
2989
3200
|
return i;
|
|
2990
3201
|
});
|
|
2991
|
-
}, [e]),
|
|
3202
|
+
}, [e]), v(
|
|
2992
3203
|
() => e.map((n) => {
|
|
2993
3204
|
const i = Object.prototype.hasOwnProperty.call(
|
|
2994
3205
|
n,
|
|
2995
3206
|
"value"
|
|
2996
|
-
),
|
|
2997
|
-
var
|
|
2998
|
-
(
|
|
3207
|
+
), a = i ? n.value : r[n.id], l = nr(n.options), c = (m) => {
|
|
3208
|
+
var y;
|
|
3209
|
+
(y = n.onValueChange) == null || y.call(n, m), i || t((h) => ({
|
|
2999
3210
|
...h,
|
|
3000
|
-
[n.id]:
|
|
3211
|
+
[n.id]: m
|
|
3001
3212
|
}));
|
|
3002
|
-
},
|
|
3213
|
+
}, u = () => c(void 0), f = ir(n);
|
|
3003
3214
|
return {
|
|
3004
3215
|
id: n.id,
|
|
3005
3216
|
kind: n.kind,
|
|
@@ -3008,99 +3219,99 @@ function Zn(e) {
|
|
|
3008
3219
|
operator: f.operator,
|
|
3009
3220
|
relationshipHint: f.relationshipHint,
|
|
3010
3221
|
controlRole: n.kind === "control" ? n.role : void 0,
|
|
3011
|
-
value:
|
|
3012
|
-
options:
|
|
3013
|
-
isActive: re(
|
|
3222
|
+
value: a,
|
|
3223
|
+
options: l,
|
|
3224
|
+
isActive: re(a),
|
|
3014
3225
|
setValue: c,
|
|
3015
|
-
clear:
|
|
3226
|
+
clear: u,
|
|
3016
3227
|
toAnalyticsInput: () => ({
|
|
3017
3228
|
inputId: f.inputId,
|
|
3018
3229
|
field: f.field,
|
|
3019
3230
|
kind: n.kind,
|
|
3020
3231
|
label: n.label,
|
|
3021
|
-
value:
|
|
3022
|
-
isActive: re(
|
|
3232
|
+
value: a,
|
|
3233
|
+
isActive: re(a),
|
|
3023
3234
|
operator: f.operator,
|
|
3024
3235
|
relationshipHint: f.relationshipHint,
|
|
3025
3236
|
controlRole: n.kind === "control" ? n.role : void 0
|
|
3026
3237
|
})
|
|
3027
3238
|
};
|
|
3028
3239
|
}),
|
|
3029
|
-
[e,
|
|
3240
|
+
[e, r]
|
|
3030
3241
|
);
|
|
3031
3242
|
}
|
|
3032
|
-
function
|
|
3033
|
-
const
|
|
3243
|
+
function si(e, r) {
|
|
3244
|
+
const t = (r == null ? void 0 : r.status) === "success" ? r.options : void 0, n = v(() => Mn(t), [t]);
|
|
3034
3245
|
B(() => {
|
|
3035
|
-
|
|
3036
|
-
}, [e, n,
|
|
3246
|
+
zn(e.value, t) || e.clear();
|
|
3247
|
+
}, [e, n, r == null ? void 0 : r.status, t]);
|
|
3037
3248
|
}
|
|
3038
|
-
function
|
|
3039
|
-
if (!re(e) ||
|
|
3249
|
+
function zn(e, r) {
|
|
3250
|
+
if (!re(e) || r === void 0)
|
|
3040
3251
|
return !0;
|
|
3041
|
-
const
|
|
3042
|
-
|
|
3252
|
+
const t = new Set(
|
|
3253
|
+
r.map((i) => rr(i.value))
|
|
3043
3254
|
);
|
|
3044
3255
|
return (Array.isArray(e) ? e : [e]).every(
|
|
3045
|
-
(i) =>
|
|
3256
|
+
(i) => t.has(rr(i))
|
|
3046
3257
|
);
|
|
3047
3258
|
}
|
|
3048
|
-
function
|
|
3049
|
-
return JSON.stringify((e || []).map((
|
|
3259
|
+
function Mn(e) {
|
|
3260
|
+
return JSON.stringify((e || []).map((r) => r.value));
|
|
3050
3261
|
}
|
|
3051
|
-
function
|
|
3262
|
+
function rr(e) {
|
|
3052
3263
|
return `${typeof e}:${String(e)}`;
|
|
3053
3264
|
}
|
|
3054
|
-
function
|
|
3055
|
-
const
|
|
3056
|
-
() =>
|
|
3265
|
+
function ai(e, r = {}) {
|
|
3266
|
+
const t = v(
|
|
3267
|
+
() => r.inputs ? {
|
|
3057
3268
|
...e,
|
|
3058
|
-
inputs:
|
|
3269
|
+
inputs: r.inputs
|
|
3059
3270
|
} : e,
|
|
3060
|
-
[
|
|
3061
|
-
), n =
|
|
3062
|
-
switch (
|
|
3271
|
+
[r.inputs, e]
|
|
3272
|
+
), n = v(() => {
|
|
3273
|
+
switch (t.queryKind) {
|
|
3063
3274
|
case "metric":
|
|
3064
3275
|
return {
|
|
3065
|
-
queryKind:
|
|
3066
|
-
request:
|
|
3276
|
+
queryKind: t.queryKind,
|
|
3277
|
+
request: Nn(t)
|
|
3067
3278
|
};
|
|
3068
3279
|
case "analysis":
|
|
3069
3280
|
return {
|
|
3070
|
-
queryKind:
|
|
3071
|
-
request:
|
|
3281
|
+
queryKind: t.queryKind,
|
|
3282
|
+
request: Kn(t)
|
|
3072
3283
|
};
|
|
3073
3284
|
case "records":
|
|
3074
3285
|
return {
|
|
3075
|
-
queryKind:
|
|
3076
|
-
request:
|
|
3286
|
+
queryKind: t.queryKind,
|
|
3287
|
+
request: $n(t)
|
|
3077
3288
|
};
|
|
3078
3289
|
case "inputOptions":
|
|
3079
3290
|
return {
|
|
3080
|
-
queryKind:
|
|
3081
|
-
request:
|
|
3291
|
+
queryKind: t.queryKind,
|
|
3292
|
+
request: Wn(t)
|
|
3082
3293
|
};
|
|
3083
3294
|
case "sql":
|
|
3084
3295
|
return {
|
|
3085
|
-
queryKind:
|
|
3086
|
-
request:
|
|
3296
|
+
queryKind: t.queryKind,
|
|
3297
|
+
request: Fn(t)
|
|
3087
3298
|
};
|
|
3088
3299
|
case "matrix":
|
|
3089
3300
|
return {
|
|
3090
|
-
queryKind:
|
|
3091
|
-
request:
|
|
3301
|
+
queryKind: t.queryKind,
|
|
3302
|
+
request: _n(t)
|
|
3092
3303
|
};
|
|
3093
3304
|
default:
|
|
3094
|
-
return
|
|
3305
|
+
return Ee(t);
|
|
3095
3306
|
}
|
|
3096
|
-
}, [
|
|
3097
|
-
spec:
|
|
3307
|
+
}, [t]), i = Jr({
|
|
3308
|
+
spec: t,
|
|
3098
3309
|
queryKind: n.queryKind,
|
|
3099
3310
|
queryKey: n.request.queryKey,
|
|
3100
3311
|
intent: n.request.intent,
|
|
3101
3312
|
activeInputs: n.request.activeInputs,
|
|
3102
|
-
debug:
|
|
3103
|
-
}),
|
|
3313
|
+
debug: r.debug
|
|
3314
|
+
}), a = L(null), l = v(
|
|
3104
3315
|
() => ({
|
|
3105
3316
|
start: i.start,
|
|
3106
3317
|
success: i.success,
|
|
@@ -3114,265 +3325,265 @@ function ti(e, t = {}) {
|
|
|
3114
3325
|
i.success
|
|
3115
3326
|
]
|
|
3116
3327
|
), c = D(
|
|
3117
|
-
(
|
|
3118
|
-
var
|
|
3119
|
-
const
|
|
3120
|
-
if (
|
|
3328
|
+
(d) => {
|
|
3329
|
+
var N, C, b, I, k, A, R, w, K;
|
|
3330
|
+
const x = n.request;
|
|
3331
|
+
if (x.intent)
|
|
3121
3332
|
switch (n.queryKind) {
|
|
3122
3333
|
case "metric":
|
|
3123
|
-
return (
|
|
3124
|
-
|
|
3125
|
-
|
|
3334
|
+
return (N = d.executor) == null ? void 0 : N.executeMetric(
|
|
3335
|
+
x.intent,
|
|
3336
|
+
d
|
|
3126
3337
|
);
|
|
3127
3338
|
case "analysis":
|
|
3128
|
-
return (
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3339
|
+
return (b = (C = d.executor) == null ? void 0 : C.executeAnalysis) == null ? void 0 : b.call(
|
|
3340
|
+
C,
|
|
3341
|
+
x.intent,
|
|
3342
|
+
d,
|
|
3343
|
+
x.analysisOptions
|
|
3133
3344
|
);
|
|
3134
3345
|
case "records":
|
|
3135
|
-
return (I =
|
|
3136
|
-
|
|
3137
|
-
|
|
3346
|
+
return (I = d.executor) == null ? void 0 : I.executeRecords(
|
|
3347
|
+
x.intent,
|
|
3348
|
+
d
|
|
3138
3349
|
);
|
|
3139
3350
|
case "inputOptions":
|
|
3140
|
-
return (
|
|
3141
|
-
|
|
3142
|
-
|
|
3351
|
+
return (k = d.executor) == null ? void 0 : k.executeInputOptions(
|
|
3352
|
+
x.intent,
|
|
3353
|
+
d
|
|
3143
3354
|
);
|
|
3144
3355
|
case "sql":
|
|
3145
|
-
return (
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3356
|
+
return (R = (A = d.executor) == null ? void 0 : A.executeSql) == null ? void 0 : R.call(
|
|
3357
|
+
A,
|
|
3358
|
+
x.intent,
|
|
3359
|
+
d
|
|
3149
3360
|
);
|
|
3150
3361
|
case "matrix":
|
|
3151
|
-
return (
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3362
|
+
return (K = (w = d.executor) == null ? void 0 : w.executeMatrix) == null ? void 0 : K.call(
|
|
3363
|
+
w,
|
|
3364
|
+
x.intent,
|
|
3365
|
+
d
|
|
3155
3366
|
);
|
|
3156
3367
|
default:
|
|
3157
|
-
return
|
|
3368
|
+
return Ee(n);
|
|
3158
3369
|
}
|
|
3159
3370
|
},
|
|
3160
3371
|
[n]
|
|
3161
|
-
),
|
|
3372
|
+
), u = Pn(
|
|
3162
3373
|
n.request.queryKey,
|
|
3163
3374
|
c,
|
|
3164
3375
|
n.request.idleData,
|
|
3165
3376
|
n.request.activeInputs,
|
|
3166
|
-
|
|
3167
|
-
), f = i.queryId,
|
|
3377
|
+
l
|
|
3378
|
+
), f = i.queryId, m = i.validationFailure;
|
|
3168
3379
|
B(() => {
|
|
3169
|
-
const
|
|
3170
|
-
if (!
|
|
3171
|
-
|
|
3380
|
+
const d = n.request.error;
|
|
3381
|
+
if (!d) {
|
|
3382
|
+
a.current = null;
|
|
3172
3383
|
return;
|
|
3173
3384
|
}
|
|
3174
|
-
const
|
|
3175
|
-
|
|
3385
|
+
const x = `${f}:${d.message}`;
|
|
3386
|
+
a.current !== x && (a.current = x, m(d));
|
|
3176
3387
|
}, [
|
|
3177
3388
|
n.request.error,
|
|
3178
3389
|
n.request.queryKey,
|
|
3179
3390
|
f,
|
|
3180
|
-
|
|
3391
|
+
m
|
|
3181
3392
|
]);
|
|
3182
|
-
const
|
|
3393
|
+
const y = n.request.error ? n.request.idleData : u.data, h = n.request.error ? "error" : u.status, g = !n.request.error && u.status === "loading", S = n.request.error || u.error, E = i.trace;
|
|
3183
3394
|
switch (n.queryKind) {
|
|
3184
3395
|
case "metric": {
|
|
3185
|
-
const
|
|
3396
|
+
const d = y;
|
|
3186
3397
|
return {
|
|
3187
|
-
id:
|
|
3398
|
+
id: t.id,
|
|
3188
3399
|
intent: n.request.intent,
|
|
3189
|
-
value: (
|
|
3190
|
-
measures:
|
|
3191
|
-
comparisonValue:
|
|
3192
|
-
delta:
|
|
3193
|
-
deltaPercent:
|
|
3194
|
-
records:
|
|
3195
|
-
executionResult:
|
|
3400
|
+
value: (d == null ? void 0 : d.value) ?? null,
|
|
3401
|
+
measures: d == null ? void 0 : d.measures,
|
|
3402
|
+
comparisonValue: d == null ? void 0 : d.comparisonValue,
|
|
3403
|
+
delta: d == null ? void 0 : d.delta,
|
|
3404
|
+
deltaPercent: d == null ? void 0 : d.deltaPercent,
|
|
3405
|
+
records: d == null ? void 0 : d.records,
|
|
3406
|
+
executionResult: d == null ? void 0 : d.executionResult,
|
|
3196
3407
|
status: h,
|
|
3197
|
-
isLoading:
|
|
3408
|
+
isLoading: g,
|
|
3198
3409
|
error: S,
|
|
3199
|
-
trace:
|
|
3410
|
+
trace: E
|
|
3200
3411
|
};
|
|
3201
3412
|
}
|
|
3202
3413
|
case "analysis": {
|
|
3203
|
-
const
|
|
3414
|
+
const d = Ir(y);
|
|
3204
3415
|
return {
|
|
3205
|
-
id:
|
|
3416
|
+
id: t.id,
|
|
3206
3417
|
intent: n.request.intent,
|
|
3207
|
-
...
|
|
3418
|
+
...d || {},
|
|
3208
3419
|
status: h,
|
|
3209
|
-
isLoading:
|
|
3420
|
+
isLoading: g,
|
|
3210
3421
|
error: S,
|
|
3211
|
-
trace:
|
|
3422
|
+
trace: E
|
|
3212
3423
|
};
|
|
3213
3424
|
}
|
|
3214
3425
|
case "records": {
|
|
3215
|
-
const
|
|
3426
|
+
const d = y;
|
|
3216
3427
|
return {
|
|
3217
|
-
id:
|
|
3428
|
+
id: t.id,
|
|
3218
3429
|
intent: n.request.intent,
|
|
3219
|
-
records: (
|
|
3220
|
-
columns:
|
|
3221
|
-
rowCount:
|
|
3222
|
-
pagination:
|
|
3223
|
-
executionResult:
|
|
3430
|
+
records: (d == null ? void 0 : d.records) || [],
|
|
3431
|
+
columns: d == null ? void 0 : d.columns,
|
|
3432
|
+
rowCount: d == null ? void 0 : d.rowCount,
|
|
3433
|
+
pagination: d == null ? void 0 : d.pagination,
|
|
3434
|
+
executionResult: d == null ? void 0 : d.executionResult,
|
|
3224
3435
|
status: h,
|
|
3225
|
-
isLoading:
|
|
3436
|
+
isLoading: g,
|
|
3226
3437
|
error: S,
|
|
3227
|
-
trace:
|
|
3438
|
+
trace: E
|
|
3228
3439
|
};
|
|
3229
3440
|
}
|
|
3230
3441
|
case "inputOptions": {
|
|
3231
|
-
const
|
|
3442
|
+
const d = y;
|
|
3232
3443
|
return {
|
|
3233
|
-
id:
|
|
3444
|
+
id: t.id,
|
|
3234
3445
|
intent: n.request.intent,
|
|
3235
|
-
options: (
|
|
3236
|
-
executionResult:
|
|
3446
|
+
options: (d == null ? void 0 : d.options) || [],
|
|
3447
|
+
executionResult: d == null ? void 0 : d.executionResult,
|
|
3237
3448
|
status: h,
|
|
3238
|
-
isLoading:
|
|
3449
|
+
isLoading: g,
|
|
3239
3450
|
error: S,
|
|
3240
|
-
trace:
|
|
3451
|
+
trace: E
|
|
3241
3452
|
};
|
|
3242
3453
|
}
|
|
3243
3454
|
case "sql": {
|
|
3244
|
-
const
|
|
3455
|
+
const d = y;
|
|
3245
3456
|
return {
|
|
3246
|
-
id:
|
|
3457
|
+
id: t.id,
|
|
3247
3458
|
intent: n.request.intent,
|
|
3248
|
-
records: (
|
|
3249
|
-
columns:
|
|
3250
|
-
rowCount:
|
|
3251
|
-
pagination:
|
|
3252
|
-
output:
|
|
3253
|
-
rowLimitExceeded:
|
|
3254
|
-
executionResult:
|
|
3459
|
+
records: (d == null ? void 0 : d.records) || [],
|
|
3460
|
+
columns: d == null ? void 0 : d.columns,
|
|
3461
|
+
rowCount: d == null ? void 0 : d.rowCount,
|
|
3462
|
+
pagination: d == null ? void 0 : d.pagination,
|
|
3463
|
+
output: d == null ? void 0 : d.output,
|
|
3464
|
+
rowLimitExceeded: d == null ? void 0 : d.rowLimitExceeded,
|
|
3465
|
+
executionResult: d == null ? void 0 : d.executionResult,
|
|
3255
3466
|
status: h,
|
|
3256
|
-
isLoading:
|
|
3467
|
+
isLoading: g,
|
|
3257
3468
|
error: S,
|
|
3258
|
-
trace:
|
|
3469
|
+
trace: E
|
|
3259
3470
|
};
|
|
3260
3471
|
}
|
|
3261
3472
|
case "matrix": {
|
|
3262
|
-
const
|
|
3473
|
+
const d = y;
|
|
3263
3474
|
return {
|
|
3264
|
-
id:
|
|
3475
|
+
id: t.id,
|
|
3265
3476
|
intent: n.request.intent,
|
|
3266
|
-
matrixResult:
|
|
3267
|
-
grid:
|
|
3268
|
-
expansion:
|
|
3269
|
-
executionResult:
|
|
3477
|
+
matrixResult: d == null ? void 0 : d.matrixResult,
|
|
3478
|
+
grid: d == null ? void 0 : d.grid,
|
|
3479
|
+
expansion: d == null ? void 0 : d.expansion,
|
|
3480
|
+
executionResult: d == null ? void 0 : d.executionResult,
|
|
3270
3481
|
status: h,
|
|
3271
|
-
isLoading:
|
|
3482
|
+
isLoading: g,
|
|
3272
3483
|
error: S,
|
|
3273
|
-
trace:
|
|
3484
|
+
trace: E
|
|
3274
3485
|
};
|
|
3275
3486
|
}
|
|
3276
3487
|
default:
|
|
3277
|
-
return
|
|
3488
|
+
return Ee(n);
|
|
3278
3489
|
}
|
|
3279
3490
|
}
|
|
3280
|
-
function
|
|
3281
|
-
const
|
|
3491
|
+
function Pn(e, r, t, n, i) {
|
|
3492
|
+
const a = Dn(), l = L(r), c = L(n), [u, f] = j({
|
|
3282
3493
|
status: "idle",
|
|
3283
|
-
data:
|
|
3494
|
+
data: t,
|
|
3284
3495
|
error: null
|
|
3285
3496
|
});
|
|
3286
|
-
return
|
|
3287
|
-
let
|
|
3497
|
+
return l.current = r, c.current = n, B(() => {
|
|
3498
|
+
let m;
|
|
3288
3499
|
try {
|
|
3289
|
-
|
|
3290
|
-
...
|
|
3500
|
+
m = l.current({
|
|
3501
|
+
...a,
|
|
3291
3502
|
activeInputs: c.current
|
|
3292
3503
|
});
|
|
3293
|
-
} catch (
|
|
3294
|
-
i == null || i.failure(
|
|
3504
|
+
} catch (g) {
|
|
3505
|
+
i == null || i.failure(g, 0), f({
|
|
3295
3506
|
status: "error",
|
|
3296
|
-
data:
|
|
3297
|
-
error:
|
|
3507
|
+
data: t,
|
|
3508
|
+
error: _(g)
|
|
3298
3509
|
});
|
|
3299
3510
|
return;
|
|
3300
3511
|
}
|
|
3301
|
-
if (!
|
|
3302
|
-
f({ status: "idle", data:
|
|
3512
|
+
if (!m) {
|
|
3513
|
+
f({ status: "idle", data: t, error: null });
|
|
3303
3514
|
return;
|
|
3304
3515
|
}
|
|
3305
|
-
let
|
|
3306
|
-
const h =
|
|
3307
|
-
return i == null || i.start(), f((
|
|
3516
|
+
let y = !1;
|
|
3517
|
+
const h = Rr();
|
|
3518
|
+
return i == null || i.start(), f((g) => ({
|
|
3308
3519
|
status: "loading",
|
|
3309
|
-
data:
|
|
3520
|
+
data: g.data,
|
|
3310
3521
|
error: null
|
|
3311
|
-
})),
|
|
3312
|
-
|
|
3313
|
-
}).catch((
|
|
3314
|
-
|
|
3522
|
+
})), m.then((g) => {
|
|
3523
|
+
y ? i == null || i.ignored("superseded") : (i == null || i.success(g, tr(h)), f({ status: "success", data: g, error: null }));
|
|
3524
|
+
}).catch((g) => {
|
|
3525
|
+
y ? i == null || i.ignored("superseded") : (i == null || i.failure(g, tr(h)), f({
|
|
3315
3526
|
status: "error",
|
|
3316
|
-
data:
|
|
3317
|
-
error:
|
|
3527
|
+
data: t,
|
|
3528
|
+
error: _(g)
|
|
3318
3529
|
}));
|
|
3319
3530
|
}), () => {
|
|
3320
|
-
|
|
3531
|
+
y = !0;
|
|
3321
3532
|
};
|
|
3322
|
-
}, [
|
|
3533
|
+
}, [t, e, a, i]), u;
|
|
3323
3534
|
}
|
|
3324
|
-
function
|
|
3535
|
+
function Rr() {
|
|
3325
3536
|
return typeof performance < "u" && performance.now ? performance.now() : Date.now();
|
|
3326
3537
|
}
|
|
3327
|
-
function
|
|
3328
|
-
return Math.max(0, Math.round(
|
|
3538
|
+
function tr(e) {
|
|
3539
|
+
return Math.max(0, Math.round(Rr() - e));
|
|
3329
3540
|
}
|
|
3330
|
-
function
|
|
3541
|
+
function Hn(e) {
|
|
3331
3542
|
return Object.fromEntries(
|
|
3332
|
-
e.filter((
|
|
3543
|
+
e.filter((r) => r.defaultValue !== void 0).map((r) => [r.id, r.defaultValue])
|
|
3333
3544
|
);
|
|
3334
3545
|
}
|
|
3335
|
-
function
|
|
3546
|
+
function Ee(e) {
|
|
3336
3547
|
throw new Error(`Unsupported Semaphor query kind: ${JSON.stringify(e)}`);
|
|
3337
3548
|
}
|
|
3338
|
-
function
|
|
3549
|
+
function jn(e) {
|
|
3339
3550
|
return !e || typeof e == "boolean" || e.enabled === !1 ? null : e.autoRenderDevtools === !0 ? {} : e.autoRenderDevtools ? e.autoRenderDevtools : null;
|
|
3340
3551
|
}
|
|
3341
|
-
function
|
|
3552
|
+
function di({
|
|
3342
3553
|
token: e,
|
|
3343
|
-
apiBaseUrl:
|
|
3344
|
-
executor:
|
|
3554
|
+
apiBaseUrl: r,
|
|
3555
|
+
executor: t,
|
|
3345
3556
|
debug: n,
|
|
3346
3557
|
children: i
|
|
3347
3558
|
}) {
|
|
3348
|
-
var
|
|
3349
|
-
const
|
|
3559
|
+
var g;
|
|
3560
|
+
const a = Ln(), l = ((g = a == null ? void 0 : a.authToken) == null ? void 0 : g.accessToken) || e, c = (a == null ? void 0 : a.dataApiBaseUrl) || (a == null ? void 0 : a.apiBaseUrl) || r, u = (a == null ? void 0 : a.debug) ?? n, f = jn(u), m = v(() => xn(), []), y = t || m, h = v(
|
|
3350
3561
|
() => ({
|
|
3351
|
-
token:
|
|
3562
|
+
token: l,
|
|
3352
3563
|
apiBaseUrl: c,
|
|
3353
|
-
executor:
|
|
3354
|
-
debug:
|
|
3564
|
+
executor: y,
|
|
3565
|
+
debug: u
|
|
3355
3566
|
}),
|
|
3356
|
-
[c,
|
|
3567
|
+
[c, u, y, l]
|
|
3357
3568
|
);
|
|
3358
|
-
return /* @__PURE__ */
|
|
3569
|
+
return /* @__PURE__ */ o(Qr, { debug: u, children: /* @__PURE__ */ p(qr.Provider, { value: h, children: [
|
|
3359
3570
|
i,
|
|
3360
|
-
f ? /* @__PURE__ */
|
|
3571
|
+
f ? /* @__PURE__ */ o(Gr, { ...f }) : null
|
|
3361
3572
|
] }) });
|
|
3362
3573
|
}
|
|
3363
3574
|
export {
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3575
|
+
di as SemaphorDataAppProvider,
|
|
3576
|
+
Gr as SemaphorDevtools,
|
|
3577
|
+
ni as SemaphorDevtoolsInspectButton,
|
|
3578
|
+
ti as SemaphorViewBoundary,
|
|
3579
|
+
xn as createSemaphorQueryExecutor,
|
|
3580
|
+
Zn as defineSemaphorDataApp,
|
|
3581
|
+
ei as defineSemaphorInput,
|
|
3582
|
+
zn as isSemaphorInputValueValidForOptions,
|
|
3583
|
+
ri as semaphor,
|
|
3584
|
+
si as useClearInvalidSemaphorInputValue,
|
|
3585
|
+
dr as useSemaphorDevtools,
|
|
3586
|
+
ii as useSemaphorInput,
|
|
3587
|
+
oi as useSemaphorInputs,
|
|
3588
|
+
ai as useSemaphorQuery
|
|
3378
3589
|
};
|