react-semaphor 0.1.386 → 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/DATA_APP_SDK.md +67 -0
- package/dist/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +260 -99
- package/dist/data-app-sdk/index.cjs +36 -2
- package/dist/data-app-sdk/index.js +1266 -1010
- package/dist/types/analytics-protocol.d.ts +121 -0
- package/dist/types/data-app-sdk.d.ts +6 -0
- package/package.json +1 -1
- package/src/data-app-sdk/README.md +67 -0
|
@@ -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
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 {
|
|
@@ -35,16 +35,16 @@ const jn = {
|
|
|
35
35
|
},
|
|
36
36
|
field: {
|
|
37
37
|
measure(e, r) {
|
|
38
|
-
return
|
|
38
|
+
return ae(e, "measure", r);
|
|
39
39
|
},
|
|
40
40
|
dimension(e, r) {
|
|
41
|
-
return
|
|
41
|
+
return ae(e, "dimension", r);
|
|
42
42
|
},
|
|
43
43
|
date(e, r) {
|
|
44
|
-
return
|
|
44
|
+
return ae(e, "date", r);
|
|
45
45
|
},
|
|
46
46
|
id(e, r) {
|
|
47
|
-
return
|
|
47
|
+
return ae(e, "id", r);
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
filter(e) {
|
|
@@ -56,7 +56,7 @@ const jn = {
|
|
|
56
56
|
bindInput(e, r) {
|
|
57
57
|
return {
|
|
58
58
|
toAnalyticsInput() {
|
|
59
|
-
const [t] =
|
|
59
|
+
const [t] = Tr([e]), n = Er({
|
|
60
60
|
...r,
|
|
61
61
|
inputId: r.inputId || t.inputId
|
|
62
62
|
});
|
|
@@ -128,208 +128,208 @@ const jn = {
|
|
|
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
142
|
children: r
|
|
143
143
|
}) {
|
|
144
|
-
const t =
|
|
145
|
-
|
|
144
|
+
const t = v(() => Xt(e), [e]), [n, i] = Nr(
|
|
145
|
+
Mt,
|
|
146
146
|
t,
|
|
147
|
-
|
|
148
|
-
),
|
|
149
|
-
|
|
147
|
+
yr
|
|
148
|
+
), a = L(n), l = or(), [c, u] = j({ open: !1 });
|
|
149
|
+
a.current = n, B(() => {
|
|
150
150
|
i({ type: "config", config: t });
|
|
151
|
-
}, [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
|
-
}, []), y =
|
|
165
|
-
|
|
166
|
-
}, []), h =
|
|
167
|
-
|
|
168
|
-
}, []),
|
|
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
|
+
}, []), h = D((S) => {
|
|
167
|
+
u({ open: !0, focus: S });
|
|
168
|
+
}, []), g = v(
|
|
169
169
|
() => ({
|
|
170
170
|
open: c.open,
|
|
171
171
|
focus: c.focus,
|
|
172
|
-
openDevtools:
|
|
172
|
+
openDevtools: m,
|
|
173
173
|
closeDevtools: y,
|
|
174
174
|
focusTrace: h
|
|
175
175
|
}),
|
|
176
176
|
[
|
|
177
177
|
y,
|
|
178
178
|
h,
|
|
179
|
-
|
|
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 r =
|
|
186
|
+
function Vr(e) {
|
|
187
|
+
const r = P.findIndex(
|
|
188
188
|
(t) => t.ownerId === e.ownerId
|
|
189
189
|
);
|
|
190
|
-
r >= 0 &&
|
|
190
|
+
r >= 0 && P.splice(r, 1), P.push(e), ar();
|
|
191
191
|
}
|
|
192
|
-
function
|
|
193
|
-
const r =
|
|
192
|
+
function Ur(e) {
|
|
193
|
+
const r = P.findIndex(
|
|
194
194
|
(t) => t.ownerId === e
|
|
195
195
|
);
|
|
196
|
-
r >= 0 &&
|
|
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
206
|
title: r,
|
|
207
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
214
|
initialIsOpen: r = !1,
|
|
215
215
|
panelPosition: t = "right",
|
|
216
216
|
className: n,
|
|
217
217
|
style: i
|
|
218
218
|
} = {}) {
|
|
219
|
-
const
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
}, []),
|
|
223
|
-
r &&
|
|
224
|
-
}, [r,
|
|
225
|
-
if (!
|
|
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
|
+
B(() => {
|
|
221
|
+
mr();
|
|
222
|
+
}, []), B(() => {
|
|
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
|
-
), x =
|
|
240
|
-
() =>
|
|
241
|
-
[
|
|
242
|
-
),
|
|
243
|
-
() =>
|
|
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
244
|
[x]
|
|
245
|
-
),
|
|
246
|
-
() =>
|
|
247
|
-
[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
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,64 +337,79 @@ function Qr({
|
|
|
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: x.length ?
|
|
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__ */
|
|
389
|
+
/* @__PURE__ */ p(
|
|
381
390
|
"span",
|
|
382
391
|
{
|
|
383
392
|
className: `${$}-source`,
|
|
384
|
-
style:
|
|
385
|
-
title: w
|
|
386
|
-
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
|
+
]
|
|
387
402
|
}
|
|
388
403
|
)
|
|
389
404
|
]
|
|
390
405
|
},
|
|
391
|
-
|
|
406
|
+
Ce(I)
|
|
392
407
|
);
|
|
393
|
-
}) : /* @__PURE__ */
|
|
394
|
-
] },
|
|
408
|
+
}) : /* @__PURE__ */ o("div", { style: s.queryGroupEmpty, children: "No input traces" })
|
|
409
|
+
] }, b.title)) : /* @__PURE__ */ o("div", { style: s.emptyState, children: "No matching traces" })
|
|
395
410
|
}
|
|
396
411
|
),
|
|
397
|
-
/* @__PURE__ */
|
|
412
|
+
/* @__PURE__ */ o(Xr, { trace: C })
|
|
398
413
|
]
|
|
399
414
|
}
|
|
400
415
|
)
|
|
@@ -403,7 +418,7 @@ function Qr({
|
|
|
403
418
|
) : null
|
|
404
419
|
] });
|
|
405
420
|
}
|
|
406
|
-
function
|
|
421
|
+
function ni({
|
|
407
422
|
queryId: e,
|
|
408
423
|
viewId: r,
|
|
409
424
|
label: t,
|
|
@@ -411,222 +426,226 @@ function Pn({
|
|
|
411
426
|
style: i
|
|
412
427
|
} = {}) {
|
|
413
428
|
var y, h;
|
|
414
|
-
const
|
|
415
|
-
|
|
416
|
-
|
|
429
|
+
const a = dr(), l = H(Oe), c = H(Be);
|
|
430
|
+
B(() => {
|
|
431
|
+
mr();
|
|
417
432
|
}, []);
|
|
418
|
-
const
|
|
419
|
-
() =>
|
|
433
|
+
const u = r || (c == null ? void 0 : c.id), f = v(
|
|
434
|
+
() => mt(a.queries, {
|
|
420
435
|
queryId: e,
|
|
421
|
-
viewId:
|
|
436
|
+
viewId: u
|
|
422
437
|
}),
|
|
423
438
|
[
|
|
424
|
-
|
|
439
|
+
a.queries,
|
|
425
440
|
e,
|
|
426
|
-
|
|
441
|
+
u
|
|
427
442
|
]
|
|
428
443
|
);
|
|
429
|
-
if (!
|
|
444
|
+
if (!a.enabled || !l || !f)
|
|
430
445
|
return null;
|
|
431
|
-
const
|
|
446
|
+
const m = t || `Inspect ${xt(f, !!e)}`;
|
|
432
447
|
return /* @__PURE__ */ p(
|
|
433
448
|
"button",
|
|
434
449
|
{
|
|
435
450
|
type: "button",
|
|
436
|
-
"aria-label":
|
|
437
|
-
title:
|
|
451
|
+
"aria-label": m,
|
|
452
|
+
title: m,
|
|
438
453
|
className: n ? `${$} ${n}` : $,
|
|
439
454
|
style: {
|
|
440
|
-
...
|
|
441
|
-
...
|
|
455
|
+
...s.inspectButton,
|
|
456
|
+
..._t((y = f.latestAttempt) == null ? void 0 : y.status),
|
|
442
457
|
...i
|
|
443
458
|
},
|
|
444
|
-
onClick: () =>
|
|
459
|
+
onClick: () => l.openDevtools({
|
|
445
460
|
traceId: f.traceId,
|
|
446
461
|
queryId: f.queryId,
|
|
447
462
|
viewId: f.viewId
|
|
448
463
|
}),
|
|
449
464
|
children: [
|
|
450
|
-
/* @__PURE__ */
|
|
451
|
-
/* @__PURE__ */
|
|
465
|
+
/* @__PURE__ */ o(_r, { size: 13 }),
|
|
466
|
+
/* @__PURE__ */ o("span", { style: s.inspectButtonText, children: ((h = f.latestAttempt) == null ? void 0 : h.status) || "idle" })
|
|
452
467
|
]
|
|
453
468
|
}
|
|
454
469
|
);
|
|
455
470
|
}
|
|
456
|
-
function
|
|
457
|
-
const e =
|
|
458
|
-
return !e || !e.state.enabled ?
|
|
471
|
+
function dr() {
|
|
472
|
+
const e = H(De);
|
|
473
|
+
return !e || !e.state.enabled ? sr : fe(e.state);
|
|
459
474
|
}
|
|
460
|
-
function
|
|
475
|
+
function Jr({
|
|
461
476
|
spec: e,
|
|
462
477
|
queryKind: r,
|
|
463
478
|
queryKey: t,
|
|
464
479
|
intent: n,
|
|
465
480
|
activeInputs: i,
|
|
466
|
-
debug:
|
|
481
|
+
debug: a
|
|
467
482
|
}) {
|
|
468
|
-
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(
|
|
469
484
|
() => JSON.stringify(e),
|
|
470
485
|
[e]
|
|
471
|
-
),
|
|
486
|
+
), g = v(
|
|
472
487
|
() => JSON.stringify(i || []),
|
|
473
488
|
[i]
|
|
474
|
-
), S =
|
|
489
|
+
), S = v(
|
|
475
490
|
() => JSON.stringify(n || null),
|
|
476
491
|
[n]
|
|
477
|
-
),
|
|
478
|
-
|
|
479
|
-
const I =
|
|
480
|
-
() =>
|
|
481
|
-
[t,
|
|
482
|
-
), K = (
|
|
483
|
-
() =>
|
|
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),
|
|
484
499
|
// Keep inline debug={{ sourceHint: ... }} objects from re-registering every render.
|
|
485
500
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
486
|
-
[
|
|
487
|
-
),
|
|
501
|
+
[oe]
|
|
502
|
+
), z = v(
|
|
488
503
|
() => [
|
|
489
504
|
K || "unscoped-view",
|
|
490
505
|
w,
|
|
491
|
-
|
|
506
|
+
R
|
|
492
507
|
].join("::"),
|
|
493
|
-
[w,
|
|
494
|
-
), _e =
|
|
508
|
+
[w, R, K]
|
|
509
|
+
), _e = v(
|
|
495
510
|
() => ({
|
|
496
|
-
traceKey:
|
|
511
|
+
traceKey: z,
|
|
497
512
|
spec: I,
|
|
498
513
|
queryId: w,
|
|
499
514
|
queryLabel: y,
|
|
500
515
|
queryKind: r,
|
|
501
|
-
builder:
|
|
516
|
+
builder: en(r),
|
|
502
517
|
viewId: K,
|
|
503
|
-
viewTitle:
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
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."]
|
|
508
525
|
}),
|
|
509
526
|
[
|
|
510
527
|
w,
|
|
511
528
|
r,
|
|
512
|
-
|
|
529
|
+
m,
|
|
513
530
|
y,
|
|
514
531
|
I,
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
532
|
+
A,
|
|
533
|
+
k,
|
|
534
|
+
Fe,
|
|
535
|
+
ie,
|
|
536
|
+
z,
|
|
519
537
|
K,
|
|
520
|
-
|
|
538
|
+
ne,
|
|
539
|
+
Q
|
|
521
540
|
]
|
|
522
541
|
);
|
|
523
|
-
|
|
524
|
-
if (!(!
|
|
542
|
+
B(() => {
|
|
543
|
+
if (!(!u || !f))
|
|
525
544
|
return f({ type: "register", descriptor: _e }), () => {
|
|
526
|
-
f({ type: "unregister", traceKey:
|
|
545
|
+
f({ type: "unregister", traceKey: z });
|
|
527
546
|
};
|
|
528
|
-
}, [_e, f,
|
|
529
|
-
const
|
|
530
|
-
(
|
|
531
|
-
!
|
|
547
|
+
}, [_e, f, u, z]);
|
|
548
|
+
const W = D(
|
|
549
|
+
(T, V) => {
|
|
550
|
+
!u || !f || f({ type: "event", traceKey: z, event: T, latestAttempt: V });
|
|
532
551
|
},
|
|
533
|
-
[f,
|
|
534
|
-
),
|
|
535
|
-
|
|
552
|
+
[f, u, z]
|
|
553
|
+
), ze = D(() => {
|
|
554
|
+
W(
|
|
536
555
|
{
|
|
537
556
|
type: "query_started",
|
|
538
557
|
queryId: w,
|
|
539
|
-
at:
|
|
558
|
+
at: ue()
|
|
540
559
|
},
|
|
541
560
|
{ status: "loading" }
|
|
542
561
|
);
|
|
543
|
-
}, [
|
|
544
|
-
(
|
|
545
|
-
const
|
|
546
|
-
|
|
562
|
+
}, [W, w]), Me = D(
|
|
563
|
+
(T, V) => {
|
|
564
|
+
const X = er(T), Z = ln(T), Ar = un(T);
|
|
565
|
+
W(
|
|
547
566
|
{
|
|
548
567
|
type: "query_succeeded",
|
|
549
568
|
queryId: w,
|
|
550
|
-
requestId:
|
|
551
|
-
at:
|
|
552
|
-
rowCount:
|
|
553
|
-
durationMs:
|
|
569
|
+
requestId: X,
|
|
570
|
+
at: ue(),
|
|
571
|
+
rowCount: Z,
|
|
572
|
+
durationMs: V
|
|
554
573
|
},
|
|
555
574
|
{
|
|
556
|
-
requestId:
|
|
575
|
+
requestId: X,
|
|
557
576
|
status: "success",
|
|
558
|
-
durationMs:
|
|
559
|
-
rowCount:
|
|
560
|
-
columnCount:
|
|
561
|
-
executionResult:
|
|
577
|
+
durationMs: V,
|
|
578
|
+
rowCount: Z,
|
|
579
|
+
columnCount: Ar,
|
|
580
|
+
executionResult: Ze(T)
|
|
562
581
|
}
|
|
563
582
|
);
|
|
564
583
|
},
|
|
565
|
-
[
|
|
566
|
-
),
|
|
567
|
-
(
|
|
568
|
-
const
|
|
569
|
-
|
|
584
|
+
[W, w]
|
|
585
|
+
), se = D(
|
|
586
|
+
(T, V) => {
|
|
587
|
+
const X = er(T), Z = T instanceof Error ? T.message : String(T);
|
|
588
|
+
W(
|
|
570
589
|
{
|
|
571
590
|
type: "query_failed",
|
|
572
591
|
queryId: w,
|
|
573
|
-
requestId:
|
|
574
|
-
at:
|
|
575
|
-
errorMessage:
|
|
592
|
+
requestId: X,
|
|
593
|
+
at: ue(),
|
|
594
|
+
errorMessage: Z
|
|
576
595
|
},
|
|
577
596
|
{
|
|
578
|
-
requestId:
|
|
597
|
+
requestId: X,
|
|
579
598
|
status: "error",
|
|
580
|
-
durationMs:
|
|
581
|
-
errorMessage:
|
|
582
|
-
executionResult:
|
|
599
|
+
durationMs: V,
|
|
600
|
+
errorMessage: Z,
|
|
601
|
+
executionResult: Ze(T)
|
|
583
602
|
}
|
|
584
603
|
);
|
|
585
604
|
},
|
|
586
|
-
[
|
|
587
|
-
),
|
|
588
|
-
(
|
|
589
|
-
|
|
605
|
+
[W, w]
|
|
606
|
+
), Pe = D(
|
|
607
|
+
(T) => {
|
|
608
|
+
W(
|
|
590
609
|
{
|
|
591
610
|
type: "query_ignored_stale",
|
|
592
611
|
queryId: w,
|
|
593
|
-
at:
|
|
594
|
-
reason:
|
|
612
|
+
at: ue(),
|
|
613
|
+
reason: T
|
|
595
614
|
}
|
|
596
615
|
);
|
|
597
616
|
},
|
|
598
|
-
[
|
|
599
|
-
),
|
|
600
|
-
(
|
|
601
|
-
|
|
617
|
+
[W, w]
|
|
618
|
+
), He = D(
|
|
619
|
+
(T) => {
|
|
620
|
+
se(T, 0);
|
|
602
621
|
},
|
|
603
|
-
[
|
|
604
|
-
),
|
|
605
|
-
return
|
|
622
|
+
[se]
|
|
623
|
+
), he = u ? l == null ? void 0 : l.state.entries[z] : void 0;
|
|
624
|
+
return v(
|
|
606
625
|
() => ({
|
|
607
|
-
enabled:
|
|
626
|
+
enabled: u,
|
|
608
627
|
queryId: w,
|
|
609
|
-
trace:
|
|
610
|
-
start:
|
|
611
|
-
success:
|
|
612
|
-
failure:
|
|
613
|
-
ignored:
|
|
614
|
-
validationFailure:
|
|
628
|
+
trace: he ? ce(he) : void 0,
|
|
629
|
+
start: ze,
|
|
630
|
+
success: Me,
|
|
631
|
+
failure: se,
|
|
632
|
+
ignored: Pe,
|
|
633
|
+
validationFailure: He
|
|
615
634
|
}),
|
|
616
635
|
[
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
636
|
+
u,
|
|
637
|
+
se,
|
|
638
|
+
Pe,
|
|
620
639
|
w,
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
640
|
+
ze,
|
|
641
|
+
Me,
|
|
642
|
+
he,
|
|
643
|
+
He
|
|
625
644
|
]
|
|
626
645
|
);
|
|
627
646
|
}
|
|
628
|
-
function
|
|
629
|
-
return /* @__PURE__ */
|
|
647
|
+
function Yr() {
|
|
648
|
+
return /* @__PURE__ */ o("span", { style: s.logoMark, "aria-hidden": !0, children: /* @__PURE__ */ p(
|
|
630
649
|
"svg",
|
|
631
650
|
{
|
|
632
651
|
viewBox: "0 0 100 100",
|
|
@@ -635,142 +654,151 @@ function Gr() {
|
|
|
635
654
|
height: "16",
|
|
636
655
|
focusable: "false",
|
|
637
656
|
children: [
|
|
638
|
-
/* @__PURE__ */
|
|
639
|
-
/* @__PURE__ */
|
|
640
|
-
/* @__PURE__ */
|
|
641
|
-
/* @__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" })
|
|
642
661
|
]
|
|
643
662
|
}
|
|
644
663
|
) });
|
|
645
664
|
}
|
|
646
|
-
function
|
|
665
|
+
function Xr({
|
|
647
666
|
trace: e
|
|
648
667
|
}) {
|
|
649
|
-
var
|
|
668
|
+
var C, b, I, k, A;
|
|
650
669
|
if (!e)
|
|
651
|
-
return /* @__PURE__ */
|
|
652
|
-
const r = e.latestAttempt, t = r == null ? void 0 : r.executionResult, n =
|
|
653
|
-
(
|
|
654
|
-
), i =
|
|
655
|
-
(
|
|
656
|
-
),
|
|
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 = [
|
|
657
676
|
...e.clientWarnings,
|
|
658
677
|
...n,
|
|
659
678
|
...i,
|
|
660
|
-
...
|
|
661
|
-
], y =
|
|
662
|
-
return /* @__PURE__ */ p("div", { style:
|
|
663
|
-
/* @__PURE__ */ p("div", { style:
|
|
664
|
-
/* @__PURE__ */ p("div", { style:
|
|
665
|
-
/* @__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(
|
|
666
685
|
"span",
|
|
667
686
|
{
|
|
668
687
|
"aria-hidden": !0,
|
|
669
688
|
style: {
|
|
670
|
-
...
|
|
671
|
-
...
|
|
689
|
+
...s.detailsHeaderStatusDot,
|
|
690
|
+
...gr(r == null ? void 0 : r.status)
|
|
672
691
|
}
|
|
673
692
|
}
|
|
674
693
|
),
|
|
675
|
-
/* @__PURE__ */
|
|
676
|
-
/* @__PURE__ */
|
|
677
|
-
] }),
|
|
678
|
-
/* @__PURE__ */ p("div", { style: a.detailsCaption, children: [
|
|
679
|
-
/* @__PURE__ */ s(
|
|
694
|
+
/* @__PURE__ */ o("span", { style: s.detailsTitle, children: me(e) }),
|
|
695
|
+
/* @__PURE__ */ o(
|
|
680
696
|
"span",
|
|
681
697
|
{
|
|
682
|
-
style: {
|
|
683
|
-
|
|
698
|
+
style: {
|
|
699
|
+
...s.detailsKindChip,
|
|
700
|
+
...cr(N)
|
|
701
|
+
},
|
|
702
|
+
children: x
|
|
684
703
|
}
|
|
685
|
-
)
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
/* @__PURE__ */ p("span", { style:
|
|
691
|
-
|
|
692
|
-
|
|
704
|
+
)
|
|
705
|
+
] }),
|
|
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"
|
|
693
712
|
] }),
|
|
694
|
-
/* @__PURE__ */
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
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
|
|
698
719
|
] })
|
|
699
720
|
] }),
|
|
700
|
-
f.length ? /* @__PURE__ */
|
|
701
|
-
|
|
702
|
-
/* @__PURE__ */
|
|
703
|
-
/* @__PURE__ */
|
|
704
|
-
(
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
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,
|
|
708
729
|
{
|
|
709
|
-
compiledQuery:
|
|
710
|
-
compiledSql:
|
|
730
|
+
compiledQuery: l,
|
|
731
|
+
compiledSql: u
|
|
711
732
|
}
|
|
712
733
|
) }) : null,
|
|
713
|
-
/* @__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(
|
|
714
735
|
"div",
|
|
715
736
|
{
|
|
716
|
-
style:
|
|
737
|
+
style: s.eventRow,
|
|
717
738
|
children: [
|
|
718
|
-
/* @__PURE__ */
|
|
719
|
-
/* @__PURE__ */
|
|
739
|
+
/* @__PURE__ */ o("span", { style: s.eventType, children: Lt(R) }),
|
|
740
|
+
/* @__PURE__ */ o("span", { style: s.eventMeta, children: Dt(R) })
|
|
720
741
|
]
|
|
721
742
|
},
|
|
722
|
-
`${
|
|
723
|
-
)) }) : /* @__PURE__ */
|
|
724
|
-
/* @__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) }) })
|
|
725
746
|
] });
|
|
726
747
|
}
|
|
727
|
-
function
|
|
748
|
+
function je({
|
|
728
749
|
tone: e,
|
|
729
750
|
title: r,
|
|
730
751
|
items: t
|
|
731
752
|
}) {
|
|
732
|
-
const n = e === "error" ?
|
|
733
|
-
return /* @__PURE__ */ p("div", { style: { ...
|
|
734
|
-
/* @__PURE__ */
|
|
735
|
-
t.length > 1 ? /* @__PURE__ */
|
|
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] })
|
|
736
757
|
] });
|
|
737
758
|
}
|
|
738
|
-
function
|
|
759
|
+
function Zr({
|
|
739
760
|
status: e
|
|
740
761
|
}) {
|
|
741
|
-
return /* @__PURE__ */
|
|
762
|
+
return /* @__PURE__ */ o(
|
|
742
763
|
"span",
|
|
743
764
|
{
|
|
744
765
|
"aria-hidden": !0,
|
|
745
766
|
style: {
|
|
746
|
-
...
|
|
747
|
-
...
|
|
767
|
+
...s.statusDot,
|
|
768
|
+
...gr(e)
|
|
748
769
|
}
|
|
749
770
|
}
|
|
750
771
|
);
|
|
751
772
|
}
|
|
752
773
|
function ee({
|
|
753
774
|
title: e,
|
|
754
|
-
children: r
|
|
775
|
+
children: r,
|
|
776
|
+
defaultOpen: t = !1
|
|
755
777
|
}) {
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
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
|
+
);
|
|
760
791
|
}
|
|
761
|
-
function
|
|
792
|
+
function et({
|
|
762
793
|
trace: e
|
|
763
794
|
}) {
|
|
764
|
-
var
|
|
765
|
-
const r = (
|
|
766
|
-
return /* @__PURE__ */ p("div", { style:
|
|
767
|
-
/* @__PURE__ */
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
/* @__PURE__ */ s(M, { title: "Measures", fields: n.measures }),
|
|
772
|
-
/* @__PURE__ */ s(M, { title: "Time fields", fields: n.timeFields }),
|
|
773
|
-
/* @__PURE__ */ s(
|
|
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(
|
|
774
802
|
M,
|
|
775
803
|
{
|
|
776
804
|
title: "Dimensions",
|
|
@@ -778,17 +806,41 @@ function Xr({
|
|
|
778
806
|
emptyText: "No dimensions selected"
|
|
779
807
|
}
|
|
780
808
|
),
|
|
781
|
-
/* @__PURE__ */
|
|
782
|
-
/* @__PURE__ */
|
|
783
|
-
/* @__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 })
|
|
784
812
|
] });
|
|
785
813
|
}
|
|
786
|
-
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({
|
|
787
839
|
trace: e
|
|
788
840
|
}) {
|
|
789
|
-
return !e.sourceRefs.length && !e.fieldRefs.length ? null : /* @__PURE__ */
|
|
790
|
-
/* @__PURE__ */
|
|
791
|
-
/* @__PURE__ */
|
|
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(
|
|
792
844
|
M,
|
|
793
845
|
{
|
|
794
846
|
title: "All field refs",
|
|
@@ -798,11 +850,11 @@ function Zr({
|
|
|
798
850
|
)
|
|
799
851
|
] }) });
|
|
800
852
|
}
|
|
801
|
-
function
|
|
853
|
+
function it({
|
|
802
854
|
hints: e
|
|
803
855
|
}) {
|
|
804
|
-
return /* @__PURE__ */
|
|
805
|
-
const n =
|
|
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 = [
|
|
806
858
|
r.exportName && r.exportName !== i ? r.exportName : void 0,
|
|
807
859
|
n,
|
|
808
860
|
r.note
|
|
@@ -810,37 +862,37 @@ function et({
|
|
|
810
862
|
return /* @__PURE__ */ p(
|
|
811
863
|
"div",
|
|
812
864
|
{
|
|
813
|
-
style:
|
|
814
|
-
title:
|
|
865
|
+
style: s.recipeFieldRow,
|
|
866
|
+
title: a || i,
|
|
815
867
|
children: [
|
|
816
|
-
/* @__PURE__ */
|
|
817
|
-
|
|
868
|
+
/* @__PURE__ */ o("span", { style: s.recipeFieldName, children: i }),
|
|
869
|
+
a ? /* @__PURE__ */ o("span", { style: s.recipeFieldMeta, children: a }) : null
|
|
818
870
|
]
|
|
819
871
|
},
|
|
820
872
|
`${i}:${n}:${t}`
|
|
821
873
|
);
|
|
822
874
|
}) }) });
|
|
823
875
|
}
|
|
824
|
-
function
|
|
876
|
+
function ot({
|
|
825
877
|
sources: e
|
|
826
878
|
}) {
|
|
827
|
-
return /* @__PURE__ */ p("div", { style:
|
|
828
|
-
/* @__PURE__ */ p("div", { style:
|
|
829
|
-
/* @__PURE__ */
|
|
830
|
-
/* @__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 })
|
|
831
883
|
] }),
|
|
832
|
-
e.length ? /* @__PURE__ */
|
|
884
|
+
e.length ? /* @__PURE__ */ o("div", { style: s.recipeFieldList, children: e.map((r, t) => /* @__PURE__ */ p(
|
|
833
885
|
"div",
|
|
834
886
|
{
|
|
835
|
-
style:
|
|
836
|
-
title:
|
|
887
|
+
style: s.recipeFieldRow,
|
|
888
|
+
title: F(r),
|
|
837
889
|
children: [
|
|
838
|
-
/* @__PURE__ */
|
|
839
|
-
/* @__PURE__ */
|
|
890
|
+
/* @__PURE__ */ o("span", { style: s.recipeFieldName, children: F(r) }),
|
|
891
|
+
/* @__PURE__ */ o("span", { style: s.recipeFieldMeta, children: r.kind })
|
|
840
892
|
]
|
|
841
893
|
},
|
|
842
|
-
`${
|
|
843
|
-
)) }) : /* @__PURE__ */
|
|
894
|
+
`${F(r)}:${t}`
|
|
895
|
+
)) }) : /* @__PURE__ */ o("div", { style: s.recipeEmptyText, children: "No sources captured" })
|
|
844
896
|
] });
|
|
845
897
|
}
|
|
846
898
|
function M({
|
|
@@ -848,54 +900,96 @@ function M({
|
|
|
848
900
|
fields: r,
|
|
849
901
|
emptyText: t
|
|
850
902
|
}) {
|
|
851
|
-
return !r.length && !t ? null : /* @__PURE__ */ p("div", { style:
|
|
852
|
-
/* @__PURE__ */ p("div", { style:
|
|
853
|
-
/* @__PURE__ */
|
|
854
|
-
/* @__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 })
|
|
855
907
|
] }),
|
|
856
|
-
r.length ? /* @__PURE__ */
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
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
|
|
875
930
|
] });
|
|
876
931
|
}
|
|
877
|
-
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({
|
|
878
972
|
inputs: e
|
|
879
973
|
}) {
|
|
880
|
-
return /* @__PURE__ */ p("div", { style:
|
|
881
|
-
/* @__PURE__ */ p("div", { style:
|
|
882
|
-
/* @__PURE__ */
|
|
883
|
-
/* @__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 })
|
|
884
978
|
] }),
|
|
885
|
-
/* @__PURE__ */
|
|
886
|
-
const t =
|
|
979
|
+
/* @__PURE__ */ o("div", { style: s.inputRecipeList, children: e.map((r) => {
|
|
980
|
+
const t = At(r);
|
|
887
981
|
return /* @__PURE__ */ p(
|
|
888
982
|
"div",
|
|
889
983
|
{
|
|
890
|
-
style:
|
|
984
|
+
style: s.inputRecipeRow,
|
|
891
985
|
title: t.title,
|
|
892
986
|
children: [
|
|
893
|
-
/* @__PURE__ */ p("div", { style:
|
|
894
|
-
/* @__PURE__ */
|
|
895
|
-
t.operator ? /* @__PURE__ */
|
|
896
|
-
/* @__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 })
|
|
897
991
|
] }),
|
|
898
|
-
t.binding ? /* @__PURE__ */
|
|
992
|
+
t.binding ? /* @__PURE__ */ o("div", { style: s.inputRecipeBinding, title: t.binding, children: t.binding }) : null
|
|
899
993
|
]
|
|
900
994
|
},
|
|
901
995
|
r.inputId
|
|
@@ -903,46 +997,100 @@ function tt({
|
|
|
903
997
|
}) })
|
|
904
998
|
] });
|
|
905
999
|
}
|
|
906
|
-
function
|
|
1000
|
+
function lt({
|
|
907
1001
|
compiledQuery: e,
|
|
908
1002
|
compiledSql: r
|
|
909
1003
|
}) {
|
|
910
|
-
return (e == null ? void 0 : e.kind) === "sql" ? /* @__PURE__ */ p("div", { style:
|
|
911
|
-
/* @__PURE__ */
|
|
912
|
-
e.pythonCode ? /* @__PURE__ */
|
|
913
|
-
e.parameters ? /* @__PURE__ */
|
|
914
|
-
|
|
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,
|
|
915
1009
|
{
|
|
916
1010
|
label: "Parameters",
|
|
917
|
-
value:
|
|
1011
|
+
value: Le(e.parameters)
|
|
918
1012
|
}
|
|
919
1013
|
) : null
|
|
920
|
-
] }) : r ? /* @__PURE__ */
|
|
1014
|
+
] }) : r ? /* @__PURE__ */ o(Qe, { label: "SQL", value: r }) : /* @__PURE__ */ o(Se, { label: "Compiled Query", value: Le(e) });
|
|
921
1015
|
}
|
|
922
|
-
function
|
|
1016
|
+
function Se({
|
|
923
1017
|
label: e,
|
|
924
1018
|
value: r
|
|
925
1019
|
}) {
|
|
926
|
-
return /* @__PURE__ */ p("div", { style:
|
|
927
|
-
/* @__PURE__ */
|
|
928
|
-
/* @__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 })
|
|
929
1023
|
] });
|
|
930
1024
|
}
|
|
931
|
-
function
|
|
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) {
|
|
932
1080
|
const r = e.filter(
|
|
933
1081
|
(i) => {
|
|
934
|
-
var
|
|
935
|
-
return ((
|
|
1082
|
+
var a;
|
|
1083
|
+
return ((a = i.latestAttempt) == null ? void 0 : a.status) === "error";
|
|
936
1084
|
}
|
|
937
1085
|
).length, t = e.filter(
|
|
938
1086
|
(i) => {
|
|
939
|
-
var
|
|
940
|
-
return ((
|
|
1087
|
+
var a;
|
|
1088
|
+
return ((a = i.latestAttempt) == null ? void 0 : a.status) === "loading";
|
|
941
1089
|
}
|
|
942
1090
|
).length, n = e.filter(
|
|
943
1091
|
(i) => {
|
|
944
|
-
var
|
|
945
|
-
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);
|
|
946
1094
|
}
|
|
947
1095
|
).length;
|
|
948
1096
|
return {
|
|
@@ -954,45 +1102,48 @@ function it(e) {
|
|
|
954
1102
|
severity: r ? "error" : n ? "warning" : "ok"
|
|
955
1103
|
};
|
|
956
1104
|
}
|
|
957
|
-
function
|
|
1105
|
+
function pt(e, r) {
|
|
958
1106
|
const t = r.trim().toLowerCase();
|
|
959
1107
|
return t ? e.filter(
|
|
960
1108
|
(n) => [
|
|
961
1109
|
n.queryId,
|
|
962
1110
|
n.queryLabel,
|
|
963
1111
|
n.viewId,
|
|
1112
|
+
n.viewTitle,
|
|
1113
|
+
n.visualType,
|
|
1114
|
+
n.sectionTitle,
|
|
964
1115
|
n.builder,
|
|
965
1116
|
n.queryKind,
|
|
966
|
-
|
|
1117
|
+
Ke(n)
|
|
967
1118
|
].filter(Boolean).join(" ").toLowerCase().includes(t)
|
|
968
1119
|
) : e;
|
|
969
1120
|
}
|
|
970
|
-
function
|
|
971
|
-
const r = e.filter((i) => i.queryKind === "inputOptions"), t = new Set(r.map(
|
|
1121
|
+
function gt(e) {
|
|
1122
|
+
const r = e.filter((i) => i.queryKind === "inputOptions"), t = new Set(r.map(Ce));
|
|
972
1123
|
return [
|
|
973
|
-
{ title: "
|
|
1124
|
+
{ title: "Views", traces: e.filter((i) => !t.has(Ce(i))) },
|
|
974
1125
|
{ title: "Inputs", traces: r }
|
|
975
1126
|
];
|
|
976
1127
|
}
|
|
977
|
-
function
|
|
1128
|
+
function lr(e, r) {
|
|
978
1129
|
if (!(!(r != null && r.traceId) && !(r != null && r.queryId) && !(r != null && r.viewId)))
|
|
979
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));
|
|
980
1131
|
}
|
|
981
|
-
function
|
|
1132
|
+
function mt(e, r) {
|
|
982
1133
|
if (r.queryId)
|
|
983
|
-
return
|
|
1134
|
+
return lr(e, r);
|
|
984
1135
|
if (!r.viewId)
|
|
985
1136
|
return;
|
|
986
1137
|
const t = e.filter((n) => n.viewId === r.viewId);
|
|
987
1138
|
return t.length === 1 ? t[0] : void 0;
|
|
988
1139
|
}
|
|
989
|
-
function
|
|
1140
|
+
function yt(e, r) {
|
|
990
1141
|
return !!(e && r && e.traceId === r.traceId);
|
|
991
1142
|
}
|
|
992
|
-
function
|
|
1143
|
+
function Ce(e) {
|
|
993
1144
|
return e.traceId;
|
|
994
1145
|
}
|
|
995
|
-
function
|
|
1146
|
+
function ht(e) {
|
|
996
1147
|
switch (e) {
|
|
997
1148
|
case "metric":
|
|
998
1149
|
return "metric";
|
|
@@ -1007,17 +1158,76 @@ function sr(e) {
|
|
|
1007
1158
|
case "sql":
|
|
1008
1159
|
return "sql";
|
|
1009
1160
|
default:
|
|
1010
|
-
return
|
|
1161
|
+
return ye(e);
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
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
|
+
};
|
|
1011
1198
|
}
|
|
1012
1199
|
}
|
|
1013
|
-
function
|
|
1014
|
-
return e.queryLabel || e.
|
|
1200
|
+
function fr(e) {
|
|
1201
|
+
return e.queryLabel || e.queryId || me(e);
|
|
1202
|
+
}
|
|
1203
|
+
function vt(e) {
|
|
1204
|
+
return fr(e);
|
|
1015
1205
|
}
|
|
1016
|
-
function
|
|
1017
|
-
const r = e
|
|
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) {
|
|
1211
|
+
return e.viewTitle || e.queryLabel || e.viewId || e.queryId;
|
|
1212
|
+
}
|
|
1213
|
+
function St(e) {
|
|
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;
|
|
1215
|
+
}
|
|
1216
|
+
function pr(e) {
|
|
1217
|
+
return It(e.visualType) || ht(e.queryKind);
|
|
1218
|
+
}
|
|
1219
|
+
function xt(e, r) {
|
|
1220
|
+
return r ? e.queryLabel || e.queryId : me(e);
|
|
1221
|
+
}
|
|
1222
|
+
function It(e) {
|
|
1223
|
+
if (e)
|
|
1224
|
+
return e.replace(/[_-]+/g, " ").replace(/\b\w/g, (r) => r.toUpperCase());
|
|
1225
|
+
}
|
|
1226
|
+
function Ke(e) {
|
|
1227
|
+
const r = e.sourceRefs.map(F);
|
|
1018
1228
|
return r.length ? r.length === 1 ? r[0] : `${r[0]} + ${r.length - 1} more` : "No source";
|
|
1019
1229
|
}
|
|
1020
|
-
function
|
|
1230
|
+
function wt(e) {
|
|
1021
1231
|
return e.reduce(
|
|
1022
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),
|
|
1023
1233
|
{
|
|
@@ -1029,29 +1239,7 @@ function ut(e) {
|
|
|
1029
1239
|
}
|
|
1030
1240
|
);
|
|
1031
1241
|
}
|
|
1032
|
-
function
|
|
1033
|
-
const n = [
|
|
1034
|
-
{
|
|
1035
|
-
label: "Operation",
|
|
1036
|
-
value: ct(e)
|
|
1037
|
-
}
|
|
1038
|
-
], i = ft(e, r, t);
|
|
1039
|
-
i && n.push(i);
|
|
1040
|
-
const l = pt(r);
|
|
1041
|
-
l && n.push({
|
|
1042
|
-
label: "Grouped by",
|
|
1043
|
-
value: l
|
|
1044
|
-
});
|
|
1045
|
-
const u = mt(e.inputsApplied);
|
|
1046
|
-
return u && n.push({
|
|
1047
|
-
label: "Filtered by",
|
|
1048
|
-
value: u
|
|
1049
|
-
}), n.push({
|
|
1050
|
-
label: "Source",
|
|
1051
|
-
value: pe(e)
|
|
1052
|
-
}), n;
|
|
1053
|
-
}
|
|
1054
|
-
function ct(e) {
|
|
1242
|
+
function qt(e) {
|
|
1055
1243
|
var r, t;
|
|
1056
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)
|
|
1057
1245
|
return "KPI query";
|
|
@@ -1069,69 +1257,15 @@ function ct(e) {
|
|
|
1069
1257
|
case "sql":
|
|
1070
1258
|
return "SQL query";
|
|
1071
1259
|
default:
|
|
1072
|
-
return
|
|
1260
|
+
return ye(e.queryKind);
|
|
1073
1261
|
}
|
|
1074
1262
|
}
|
|
1075
|
-
function
|
|
1076
|
-
if (e.queryKind === "records")
|
|
1077
|
-
return {
|
|
1078
|
-
label: r.measures.length ? "Computes" : "Selects",
|
|
1079
|
-
value: Z(t)
|
|
1080
|
-
};
|
|
1081
|
-
if (e.queryKind === "inputOptions")
|
|
1082
|
-
return {
|
|
1083
|
-
label: "Options from",
|
|
1084
|
-
value: Z(t)
|
|
1085
|
-
};
|
|
1086
|
-
if (r.measures.length)
|
|
1087
|
-
return {
|
|
1088
|
-
label: "Computes",
|
|
1089
|
-
value: Z(r.measures)
|
|
1090
|
-
};
|
|
1091
|
-
if (t.length)
|
|
1092
|
-
return {
|
|
1093
|
-
label: "Uses",
|
|
1094
|
-
value: Z(t)
|
|
1095
|
-
};
|
|
1096
|
-
if (e.queryKind === "sql")
|
|
1097
|
-
return {
|
|
1098
|
-
label: "Inspect",
|
|
1099
|
-
value: "Open compiled query for SQL or Python."
|
|
1100
|
-
};
|
|
1101
|
-
}
|
|
1102
|
-
function pt(e) {
|
|
1103
|
-
const r = [
|
|
1104
|
-
...e.dimensions,
|
|
1105
|
-
...e.timeFields
|
|
1106
|
-
];
|
|
1107
|
-
return r.length ? Z(r) : void 0;
|
|
1108
|
-
}
|
|
1109
|
-
function mt(e) {
|
|
1110
|
-
if (e.length)
|
|
1111
|
-
return ar(
|
|
1112
|
-
e.map((r) => {
|
|
1113
|
-
const t = ur(r);
|
|
1114
|
-
return [
|
|
1115
|
-
r.inputId,
|
|
1116
|
-
t.operator,
|
|
1117
|
-
t.value
|
|
1118
|
-
].filter(Boolean).join(" ");
|
|
1119
|
-
})
|
|
1120
|
-
);
|
|
1121
|
-
}
|
|
1122
|
-
function Z(e) {
|
|
1123
|
-
return ar(e.map(lr));
|
|
1124
|
-
}
|
|
1125
|
-
function ar(e) {
|
|
1126
|
-
const r = e.filter(Boolean);
|
|
1127
|
-
return r.length === 0 ? "-" : r.length === 1 ? r[0] : r.length === 2 ? `${r[0]} and ${r[1]}` : `${r.slice(0, -1).join(", ")}, and ${r[r.length - 1]}`;
|
|
1128
|
-
}
|
|
1129
|
-
function lr(e) {
|
|
1263
|
+
function Rt(e) {
|
|
1130
1264
|
return [e.aggregate, e.label || e.name].filter(Boolean).join(" ");
|
|
1131
1265
|
}
|
|
1132
|
-
function
|
|
1133
|
-
var
|
|
1134
|
-
const r = e.valuePreview || "redacted", t = ((
|
|
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 = [
|
|
1135
1269
|
e.inputId,
|
|
1136
1270
|
e.operator,
|
|
1137
1271
|
r,
|
|
@@ -1141,32 +1275,32 @@ function ur(e) {
|
|
|
1141
1275
|
operator: e.operator,
|
|
1142
1276
|
value: r,
|
|
1143
1277
|
binding: i,
|
|
1144
|
-
title:
|
|
1278
|
+
title: a
|
|
1145
1279
|
};
|
|
1146
1280
|
}
|
|
1147
|
-
function
|
|
1281
|
+
function F(e) {
|
|
1148
1282
|
return e.kind === "semantic" ? e.datasetName || e.datasetId || e.domainId : e.kind === "physical" ? [
|
|
1149
1283
|
e.schemaName,
|
|
1150
1284
|
e.tableName
|
|
1151
1285
|
].filter(Boolean).join(".") || e.tableName : e.connectionId ? `SQL ${e.connectionId}` : "SQL source";
|
|
1152
1286
|
}
|
|
1153
|
-
function
|
|
1287
|
+
function Tt(e) {
|
|
1154
1288
|
if (e.file)
|
|
1155
1289
|
return e.line && e.column ? `${e.file}:${e.line}:${e.column}` : e.line ? `${e.file}:${e.line}` : e.file;
|
|
1156
1290
|
}
|
|
1157
|
-
function
|
|
1291
|
+
function Et(e) {
|
|
1158
1292
|
return typeof e == "number" ? e.toLocaleString() : "-";
|
|
1159
1293
|
}
|
|
1160
|
-
function
|
|
1294
|
+
function kt(e) {
|
|
1161
1295
|
return typeof e == "number" ? `${Math.round(e)}ms` : "-";
|
|
1162
1296
|
}
|
|
1163
|
-
function
|
|
1164
|
-
return
|
|
1297
|
+
function Ct(e) {
|
|
1298
|
+
return Le(e);
|
|
1165
1299
|
}
|
|
1166
|
-
function
|
|
1300
|
+
function Le(e) {
|
|
1167
1301
|
return JSON.stringify(e, null, 2) ?? "undefined";
|
|
1168
1302
|
}
|
|
1169
|
-
function
|
|
1303
|
+
function Lt(e) {
|
|
1170
1304
|
switch (e.type) {
|
|
1171
1305
|
case "query_started":
|
|
1172
1306
|
return "Started";
|
|
@@ -1179,10 +1313,10 @@ function bt(e) {
|
|
|
1179
1313
|
case "input_changed":
|
|
1180
1314
|
return "Input changed";
|
|
1181
1315
|
default:
|
|
1182
|
-
return
|
|
1316
|
+
return Ot(e);
|
|
1183
1317
|
}
|
|
1184
1318
|
}
|
|
1185
|
-
function
|
|
1319
|
+
function Dt(e) {
|
|
1186
1320
|
return [
|
|
1187
1321
|
e.at,
|
|
1188
1322
|
"durationMs" in e && typeof e.durationMs == "number" ? `${Math.round(e.durationMs)}ms` : void 0,
|
|
@@ -1191,20 +1325,20 @@ function St(e) {
|
|
|
1191
1325
|
"errorMessage" in e ? e.errorMessage : void 0
|
|
1192
1326
|
].filter(Boolean).join(" - ");
|
|
1193
1327
|
}
|
|
1194
|
-
function
|
|
1328
|
+
function Ot(e) {
|
|
1195
1329
|
throw new Error(`Unsupported Semaphor trace event: ${JSON.stringify(e)}`);
|
|
1196
1330
|
}
|
|
1197
|
-
function
|
|
1331
|
+
function xe(e) {
|
|
1198
1332
|
return Array.isArray(e) ? e.filter((r) => typeof r == "string") : [];
|
|
1199
1333
|
}
|
|
1200
|
-
function
|
|
1334
|
+
function Bt(e) {
|
|
1201
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;
|
|
1202
1336
|
return {
|
|
1203
1337
|
compiledSql: typeof (t == null ? void 0 : t.compiledSql) == "string" ? t.compiledSql : void 0,
|
|
1204
1338
|
queryHash: typeof (t == null ? void 0 : t.queryHash) == "string" ? t.queryHash : void 0
|
|
1205
1339
|
};
|
|
1206
1340
|
}
|
|
1207
|
-
function
|
|
1341
|
+
function Kt(e) {
|
|
1208
1342
|
return e === "relative" ? {
|
|
1209
1343
|
position: "relative",
|
|
1210
1344
|
top: "auto",
|
|
@@ -1218,7 +1352,7 @@ function It(e) {
|
|
|
1218
1352
|
left: e.endsWith("left") ? 20 : "auto"
|
|
1219
1353
|
};
|
|
1220
1354
|
}
|
|
1221
|
-
function
|
|
1355
|
+
function Nt(e) {
|
|
1222
1356
|
return e === "error" ? {
|
|
1223
1357
|
borderColor: "var(--sd-error-border)",
|
|
1224
1358
|
background: "var(--sd-error-bg)",
|
|
@@ -1233,7 +1367,7 @@ function qt(e) {
|
|
|
1233
1367
|
color: "var(--sd-success-fg)"
|
|
1234
1368
|
};
|
|
1235
1369
|
}
|
|
1236
|
-
function
|
|
1370
|
+
function $t(e) {
|
|
1237
1371
|
return e === "right" ? {
|
|
1238
1372
|
top: 16,
|
|
1239
1373
|
right: 16,
|
|
@@ -1252,23 +1386,23 @@ function At(e) {
|
|
|
1252
1386
|
borderRadius: 6
|
|
1253
1387
|
};
|
|
1254
1388
|
}
|
|
1255
|
-
function
|
|
1389
|
+
function Wt(e) {
|
|
1256
1390
|
return e === "right" ? {
|
|
1257
1391
|
gridTemplateColumns: "minmax(210px, 280px) minmax(0, 1fr)"
|
|
1258
1392
|
} : {
|
|
1259
1393
|
gridTemplateColumns: "minmax(260px, 340px) minmax(0, 1fr)"
|
|
1260
1394
|
};
|
|
1261
1395
|
}
|
|
1262
|
-
function
|
|
1396
|
+
function Ft(e) {
|
|
1263
1397
|
return {
|
|
1264
1398
|
borderRight: "1px solid var(--sd-border)",
|
|
1265
1399
|
borderBottom: 0
|
|
1266
1400
|
};
|
|
1267
1401
|
}
|
|
1268
|
-
function
|
|
1402
|
+
function gr(e) {
|
|
1269
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)" };
|
|
1270
1404
|
}
|
|
1271
|
-
function
|
|
1405
|
+
function _t(e) {
|
|
1272
1406
|
return e === "error" ? {
|
|
1273
1407
|
borderColor: "var(--sd-error-border)",
|
|
1274
1408
|
color: "var(--sd-error-fg)"
|
|
@@ -1283,7 +1417,7 @@ function Tt(e) {
|
|
|
1283
1417
|
color: "var(--sd-fg-muted)"
|
|
1284
1418
|
};
|
|
1285
1419
|
}
|
|
1286
|
-
const
|
|
1420
|
+
const Ve = "semaphor-devtools-stylesheet", $ = "semaphor-devtools", zt = `
|
|
1287
1421
|
.${$} {
|
|
1288
1422
|
--sd-bg: #ffffff;
|
|
1289
1423
|
--sd-bg-muted: #fafafa;
|
|
@@ -1313,6 +1447,23 @@ const je = "semaphor-devtools-stylesheet", $ = "semaphor-devtools", kt = `
|
|
|
1313
1447
|
--sd-loading-border: #bfdbfe;
|
|
1314
1448
|
--sd-loading-dot: #2563eb;
|
|
1315
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;
|
|
1316
1467
|
}
|
|
1317
1468
|
|
|
1318
1469
|
@media (prefers-color-scheme: dark) {
|
|
@@ -1340,6 +1491,23 @@ const je = "semaphor-devtools-stylesheet", $ = "semaphor-devtools", kt = `
|
|
|
1340
1491
|
--sd-loading-bg: rgba(59, 130, 246, 0.12);
|
|
1341
1492
|
--sd-loading-fg: #93c5fd;
|
|
1342
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;
|
|
1343
1511
|
}
|
|
1344
1512
|
}
|
|
1345
1513
|
|
|
@@ -1351,19 +1519,19 @@ const je = "semaphor-devtools-stylesheet", $ = "semaphor-devtools", kt = `
|
|
|
1351
1519
|
word-break: break-all;
|
|
1352
1520
|
}
|
|
1353
1521
|
`;
|
|
1354
|
-
function
|
|
1355
|
-
if (typeof document > "u" || document.getElementById(
|
|
1522
|
+
function mr() {
|
|
1523
|
+
if (typeof document > "u" || document.getElementById(Ve))
|
|
1356
1524
|
return;
|
|
1357
1525
|
const e = document.createElement("style");
|
|
1358
|
-
e.id =
|
|
1526
|
+
e.id = Ve, e.textContent = zt, document.head.appendChild(e);
|
|
1359
1527
|
}
|
|
1360
|
-
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 = {
|
|
1361
1529
|
color: "var(--sd-fg-muted)",
|
|
1362
1530
|
fontSize: 10,
|
|
1363
1531
|
fontWeight: 600,
|
|
1364
1532
|
textTransform: "uppercase",
|
|
1365
1533
|
letterSpacing: "0.08em"
|
|
1366
|
-
},
|
|
1534
|
+
}, s = {
|
|
1367
1535
|
launcher: {
|
|
1368
1536
|
position: "fixed",
|
|
1369
1537
|
bottom: 20,
|
|
@@ -1378,7 +1546,7 @@ const oe = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1378
1546
|
borderStyle: "solid",
|
|
1379
1547
|
borderRadius: 6,
|
|
1380
1548
|
boxShadow: "var(--sd-shadow)",
|
|
1381
|
-
font: `600 12px/1.2 ${
|
|
1549
|
+
font: `600 12px/1.2 ${de}`,
|
|
1382
1550
|
cursor: "pointer"
|
|
1383
1551
|
},
|
|
1384
1552
|
launcherText: {
|
|
@@ -1420,7 +1588,7 @@ const oe = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1420
1588
|
background: "var(--sd-bg)",
|
|
1421
1589
|
color: "var(--sd-fg)",
|
|
1422
1590
|
boxShadow: "var(--sd-shadow)",
|
|
1423
|
-
font: `13px/1.4 ${
|
|
1591
|
+
font: `13px/1.4 ${de}`
|
|
1424
1592
|
},
|
|
1425
1593
|
panelFullscreen: {
|
|
1426
1594
|
top: 0,
|
|
@@ -1489,7 +1657,7 @@ const oe = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1489
1657
|
outline: 0,
|
|
1490
1658
|
background: "transparent",
|
|
1491
1659
|
color: "var(--sd-fg)",
|
|
1492
|
-
font: `12px/1.4 ${
|
|
1660
|
+
font: `12px/1.4 ${de}`
|
|
1493
1661
|
},
|
|
1494
1662
|
panelBody: {
|
|
1495
1663
|
display: "grid",
|
|
@@ -1515,7 +1683,7 @@ const oe = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1515
1683
|
alignItems: "center",
|
|
1516
1684
|
justifyContent: "space-between",
|
|
1517
1685
|
padding: "4px 6px 3px",
|
|
1518
|
-
...
|
|
1686
|
+
...Ie
|
|
1519
1687
|
},
|
|
1520
1688
|
queryGroupCount: {
|
|
1521
1689
|
color: "var(--sd-fg-subtle)",
|
|
@@ -1568,11 +1736,21 @@ const oe = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1568
1736
|
},
|
|
1569
1737
|
queryListKindChip: {
|
|
1570
1738
|
flex: "0 0 auto",
|
|
1571
|
-
|
|
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,
|
|
1572
1750
|
fontSize: 9,
|
|
1573
1751
|
fontWeight: 600,
|
|
1574
1752
|
textTransform: "uppercase",
|
|
1575
|
-
letterSpacing: "0.
|
|
1753
|
+
letterSpacing: "0.06em"
|
|
1576
1754
|
},
|
|
1577
1755
|
queryListSource: {
|
|
1578
1756
|
minWidth: 0,
|
|
@@ -1581,6 +1759,13 @@ const oe = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1581
1759
|
fontSize: 11,
|
|
1582
1760
|
lineHeight: 1.35
|
|
1583
1761
|
},
|
|
1762
|
+
queryListPrefixSep: {
|
|
1763
|
+
color: "var(--sd-fg-subtle)"
|
|
1764
|
+
},
|
|
1765
|
+
queryListPrefixId: {
|
|
1766
|
+
fontFamily: O,
|
|
1767
|
+
color: "var(--sd-fg-subtle)"
|
|
1768
|
+
},
|
|
1584
1769
|
detailsPane: {
|
|
1585
1770
|
minHeight: 0,
|
|
1586
1771
|
overflowY: "auto",
|
|
@@ -1616,44 +1801,148 @@ const oe = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1616
1801
|
detailsKindChip: {
|
|
1617
1802
|
flex: "0 0 auto",
|
|
1618
1803
|
padding: "2px 6px",
|
|
1804
|
+
borderWidth: 1,
|
|
1805
|
+
borderStyle: "solid",
|
|
1806
|
+
borderColor: "var(--sd-border)",
|
|
1619
1807
|
borderRadius: 3,
|
|
1620
1808
|
background: "var(--sd-bg-accent)",
|
|
1621
1809
|
color: "var(--sd-fg-muted)",
|
|
1810
|
+
fontFamily: O,
|
|
1622
1811
|
fontSize: 10,
|
|
1623
1812
|
fontWeight: 600,
|
|
1624
1813
|
textTransform: "uppercase",
|
|
1625
|
-
letterSpacing: "0.
|
|
1814
|
+
letterSpacing: "0.06em"
|
|
1626
1815
|
},
|
|
1627
|
-
|
|
1816
|
+
metaStrip: {
|
|
1628
1817
|
display: "flex",
|
|
1629
1818
|
flexWrap: "wrap",
|
|
1630
1819
|
alignItems: "center",
|
|
1631
|
-
columnGap:
|
|
1820
|
+
columnGap: 6,
|
|
1632
1821
|
rowGap: 2,
|
|
1822
|
+
paddingLeft: 16,
|
|
1633
1823
|
color: "var(--sd-fg-muted)",
|
|
1634
1824
|
fontSize: 11
|
|
1635
1825
|
},
|
|
1636
|
-
|
|
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: {
|
|
1637
1839
|
display: "inline-flex",
|
|
1638
1840
|
alignItems: "center",
|
|
1639
|
-
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)"
|
|
1640
1849
|
},
|
|
1641
|
-
|
|
1642
|
-
fontFamily:
|
|
1850
|
+
sourcePillLabel: {
|
|
1851
|
+
fontFamily: O,
|
|
1852
|
+
fontSize: 11,
|
|
1853
|
+
color: "var(--sd-fg)"
|
|
1643
1854
|
},
|
|
1644
|
-
|
|
1645
|
-
|
|
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
|
|
1646
1872
|
},
|
|
1647
|
-
|
|
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
|
|
1899
|
+
},
|
|
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)",
|
|
1648
1907
|
color: "var(--sd-fg)",
|
|
1649
|
-
|
|
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)"
|
|
1650
1939
|
},
|
|
1651
1940
|
disclosure: {
|
|
1652
1941
|
marginTop: 16
|
|
1653
1942
|
},
|
|
1654
1943
|
disclosureSummary: {
|
|
1655
1944
|
cursor: "pointer",
|
|
1656
|
-
...
|
|
1945
|
+
...Ie
|
|
1657
1946
|
},
|
|
1658
1947
|
disclosureBody: {
|
|
1659
1948
|
marginTop: 8
|
|
@@ -1698,38 +1987,6 @@ const oe = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1698
1987
|
display: "grid",
|
|
1699
1988
|
gap: 12
|
|
1700
1989
|
},
|
|
1701
|
-
recipeSummary: {
|
|
1702
|
-
display: "grid",
|
|
1703
|
-
gap: 4,
|
|
1704
|
-
padding: "8px 10px",
|
|
1705
|
-
border: "1px solid var(--sd-border)",
|
|
1706
|
-
borderRadius: 5,
|
|
1707
|
-
background: "var(--sd-bg-muted)",
|
|
1708
|
-
color: "var(--sd-fg)",
|
|
1709
|
-
fontSize: 12
|
|
1710
|
-
},
|
|
1711
|
-
recipeSummaryRow: {
|
|
1712
|
-
display: "grid",
|
|
1713
|
-
gridTemplateColumns: "76px minmax(0, 1fr)",
|
|
1714
|
-
gap: 8,
|
|
1715
|
-
minWidth: 0,
|
|
1716
|
-
alignItems: "baseline"
|
|
1717
|
-
},
|
|
1718
|
-
recipeSummaryLabel: {
|
|
1719
|
-
color: "var(--sd-fg-subtle)",
|
|
1720
|
-
fontSize: 10,
|
|
1721
|
-
fontWeight: 600,
|
|
1722
|
-
textTransform: "uppercase",
|
|
1723
|
-
letterSpacing: "0.08em"
|
|
1724
|
-
},
|
|
1725
|
-
recipeSummaryValue: {
|
|
1726
|
-
minWidth: 0,
|
|
1727
|
-
overflow: "hidden",
|
|
1728
|
-
textOverflow: "ellipsis",
|
|
1729
|
-
whiteSpace: "nowrap",
|
|
1730
|
-
color: "var(--sd-fg)",
|
|
1731
|
-
fontSize: 12
|
|
1732
|
-
},
|
|
1733
1990
|
recipeGroup: {
|
|
1734
1991
|
display: "grid",
|
|
1735
1992
|
gap: 4
|
|
@@ -1791,10 +2048,6 @@ const oe = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1791
2048
|
fontSize: 11,
|
|
1792
2049
|
textAlign: "right"
|
|
1793
2050
|
},
|
|
1794
|
-
recipeFieldMetaDivider: {
|
|
1795
|
-
color: "var(--sd-fg-subtle)",
|
|
1796
|
-
margin: "0 4px"
|
|
1797
|
-
},
|
|
1798
2051
|
inputsAppliedBlock: {
|
|
1799
2052
|
marginTop: 16,
|
|
1800
2053
|
padding: "10px 12px",
|
|
@@ -1845,7 +2098,7 @@ const oe = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1845
2098
|
textOverflow: "ellipsis",
|
|
1846
2099
|
whiteSpace: "nowrap",
|
|
1847
2100
|
color: "var(--sd-fg)",
|
|
1848
|
-
fontFamily:
|
|
2101
|
+
fontFamily: O,
|
|
1849
2102
|
fontSize: 11,
|
|
1850
2103
|
fontWeight: 600
|
|
1851
2104
|
},
|
|
@@ -1858,7 +2111,7 @@ const oe = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1858
2111
|
borderRadius: 3,
|
|
1859
2112
|
background: "var(--sd-bg-accent)",
|
|
1860
2113
|
color: "var(--sd-fg-muted)",
|
|
1861
|
-
fontFamily:
|
|
2114
|
+
fontFamily: O,
|
|
1862
2115
|
fontSize: 10,
|
|
1863
2116
|
textTransform: "uppercase",
|
|
1864
2117
|
letterSpacing: "0.06em"
|
|
@@ -1917,7 +2170,7 @@ const oe = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1917
2170
|
gap: 5
|
|
1918
2171
|
},
|
|
1919
2172
|
codeBlockLabel: {
|
|
1920
|
-
...
|
|
2173
|
+
...Ie
|
|
1921
2174
|
},
|
|
1922
2175
|
codeBlock: {
|
|
1923
2176
|
maxHeight: 260,
|
|
@@ -1928,7 +2181,7 @@ const oe = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1928
2181
|
borderRadius: 5,
|
|
1929
2182
|
background: "var(--sd-bg-muted)",
|
|
1930
2183
|
color: "var(--sd-fg)",
|
|
1931
|
-
fontFamily:
|
|
2184
|
+
fontFamily: O,
|
|
1932
2185
|
fontSize: 11,
|
|
1933
2186
|
lineHeight: 1.5,
|
|
1934
2187
|
whiteSpace: "pre-wrap"
|
|
@@ -1950,7 +2203,7 @@ const oe = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1950
2203
|
borderStyle: "solid",
|
|
1951
2204
|
borderRadius: 5,
|
|
1952
2205
|
background: "var(--sd-bg)",
|
|
1953
|
-
font: `600 11px/1 ${
|
|
2206
|
+
font: `600 11px/1 ${de}`,
|
|
1954
2207
|
cursor: "pointer"
|
|
1955
2208
|
},
|
|
1956
2209
|
inspectButtonText: {
|
|
@@ -1959,7 +2212,7 @@ const oe = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1959
2212
|
whiteSpace: "nowrap"
|
|
1960
2213
|
}
|
|
1961
2214
|
};
|
|
1962
|
-
function
|
|
2215
|
+
function yr(e) {
|
|
1963
2216
|
return {
|
|
1964
2217
|
...e,
|
|
1965
2218
|
order: [],
|
|
@@ -1967,29 +2220,29 @@ function fr(e) {
|
|
|
1967
2220
|
sequence: 0
|
|
1968
2221
|
};
|
|
1969
2222
|
}
|
|
1970
|
-
function
|
|
2223
|
+
function Mt(e, r) {
|
|
1971
2224
|
if (r.type === "config")
|
|
1972
2225
|
return r.config.enabled ? {
|
|
1973
2226
|
...e,
|
|
1974
2227
|
...r.config
|
|
1975
|
-
} :
|
|
2228
|
+
} : yr(r.config);
|
|
1976
2229
|
if (!e.enabled)
|
|
1977
2230
|
return e;
|
|
1978
2231
|
switch (r.type) {
|
|
1979
2232
|
case "register":
|
|
1980
|
-
return
|
|
2233
|
+
return Qt(Pt(e, r.descriptor));
|
|
1981
2234
|
case "unregister":
|
|
1982
|
-
return
|
|
2235
|
+
return Ht(e, r.traceKey);
|
|
1983
2236
|
case "event":
|
|
1984
|
-
return
|
|
2237
|
+
return jt(e, r);
|
|
1985
2238
|
default:
|
|
1986
2239
|
return e;
|
|
1987
2240
|
}
|
|
1988
2241
|
}
|
|
1989
|
-
function
|
|
1990
|
-
const t = e.entries[r.traceKey], n = t ? e.sequence : e.sequence + 1, i =
|
|
1991
|
-
...t ||
|
|
1992
|
-
...
|
|
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),
|
|
1993
2246
|
traceKey: r.traceKey,
|
|
1994
2247
|
latestAttempt: (t == null ? void 0 : t.latestAttempt) || { status: "idle" },
|
|
1995
2248
|
recentEvents: (t == null ? void 0 : t.recentEvents) || [],
|
|
@@ -2003,11 +2256,11 @@ function Dt(e, r) {
|
|
|
2003
2256
|
order: t ? e.order : [...e.order, r.traceKey],
|
|
2004
2257
|
entries: {
|
|
2005
2258
|
...e.entries,
|
|
2006
|
-
[r.traceKey]:
|
|
2259
|
+
[r.traceKey]: a
|
|
2007
2260
|
}
|
|
2008
2261
|
};
|
|
2009
2262
|
}
|
|
2010
|
-
function
|
|
2263
|
+
function Ht(e, r) {
|
|
2011
2264
|
const t = e.entries[r];
|
|
2012
2265
|
return t ? {
|
|
2013
2266
|
...e,
|
|
@@ -2020,11 +2273,11 @@ function Ot(e, r) {
|
|
|
2020
2273
|
}
|
|
2021
2274
|
} : e;
|
|
2022
2275
|
}
|
|
2023
|
-
function
|
|
2276
|
+
function jt(e, r) {
|
|
2024
2277
|
const t = e.entries[r.traceKey];
|
|
2025
2278
|
if (!t)
|
|
2026
2279
|
return e;
|
|
2027
|
-
const n =
|
|
2280
|
+
const n = $e(), i = [
|
|
2028
2281
|
...t.recentEvents,
|
|
2029
2282
|
r.event
|
|
2030
2283
|
].slice(-e.maxEventsPerQuery);
|
|
@@ -2044,10 +2297,10 @@ function Lt(e, r) {
|
|
|
2044
2297
|
}
|
|
2045
2298
|
};
|
|
2046
2299
|
}
|
|
2047
|
-
function
|
|
2300
|
+
function Qt(e) {
|
|
2048
2301
|
if (e.order.length <= e.maxQueries)
|
|
2049
2302
|
return e;
|
|
2050
|
-
const r = e.order.map((i) => e.entries[i]).filter((i) => !!i).sort((i,
|
|
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(
|
|
2051
2304
|
r.slice(0, t).map((i) => i.traceKey)
|
|
2052
2305
|
);
|
|
2053
2306
|
return n.size ? {
|
|
@@ -2058,10 +2311,10 @@ function Bt(e) {
|
|
|
2058
2311
|
)
|
|
2059
2312
|
} : e;
|
|
2060
2313
|
}
|
|
2061
|
-
function
|
|
2062
|
-
const r =
|
|
2314
|
+
function Vt(e) {
|
|
2315
|
+
const r = $e();
|
|
2063
2316
|
return {
|
|
2064
|
-
...
|
|
2317
|
+
...hr(e),
|
|
2065
2318
|
traceKey: e.traceKey,
|
|
2066
2319
|
latestAttempt: { status: "idle" },
|
|
2067
2320
|
recentEvents: [],
|
|
@@ -2070,68 +2323,71 @@ function Kt(e) {
|
|
|
2070
2323
|
lastEventAt: r
|
|
2071
2324
|
};
|
|
2072
2325
|
}
|
|
2073
|
-
function
|
|
2326
|
+
function hr(e) {
|
|
2074
2327
|
var n;
|
|
2075
|
-
const r =
|
|
2328
|
+
const r = on(e.spec), t = sn(
|
|
2076
2329
|
e.spec,
|
|
2077
2330
|
e.activeInputs
|
|
2078
2331
|
);
|
|
2079
2332
|
return {
|
|
2080
|
-
traceId:
|
|
2333
|
+
traceId: xr(e.traceKey),
|
|
2081
2334
|
viewId: e.viewId,
|
|
2335
|
+
viewTitle: e.viewTitle,
|
|
2336
|
+
visualType: e.visualType,
|
|
2337
|
+
sectionTitle: e.sectionTitle,
|
|
2082
2338
|
queryId: e.queryId,
|
|
2083
|
-
queryLabel: e.queryLabel
|
|
2339
|
+
queryLabel: e.queryLabel,
|
|
2084
2340
|
queryKind: e.queryKind,
|
|
2085
2341
|
builder: e.builder,
|
|
2086
|
-
sourceRefs:
|
|
2342
|
+
sourceRefs: nn(e.intent),
|
|
2087
2343
|
sourceHints: (n = e.sourceHints) != null && n.length ? e.sourceHints : void 0,
|
|
2088
2344
|
projectionFieldRefs: r,
|
|
2089
2345
|
inputFieldRefs: t,
|
|
2090
|
-
fieldRefs:
|
|
2346
|
+
fieldRefs: an(e.intent),
|
|
2091
2347
|
inputsApplied: (e.activeInputs || []).map((i) => ({
|
|
2092
2348
|
inputId: i.inputId,
|
|
2093
2349
|
fieldRef: i.field,
|
|
2094
2350
|
operator: i.operator,
|
|
2095
|
-
valuePreview:
|
|
2351
|
+
valuePreview: rn(i)
|
|
2096
2352
|
})),
|
|
2097
2353
|
recentEvents: [],
|
|
2098
2354
|
clientWarnings: e.clientWarnings
|
|
2099
2355
|
};
|
|
2100
2356
|
}
|
|
2101
|
-
function
|
|
2357
|
+
function ce(e) {
|
|
2102
2358
|
const {
|
|
2103
2359
|
traceKey: r,
|
|
2104
2360
|
mounted: t,
|
|
2105
2361
|
registeredAt: n,
|
|
2106
2362
|
lastEventAt: i,
|
|
2107
|
-
...
|
|
2363
|
+
...a
|
|
2108
2364
|
} = e;
|
|
2109
|
-
return
|
|
2365
|
+
return a;
|
|
2110
2366
|
}
|
|
2111
|
-
function
|
|
2367
|
+
function fe(e) {
|
|
2112
2368
|
return e.enabled ? {
|
|
2113
2369
|
enabled: !0,
|
|
2114
|
-
queries: e.order.map((t) => e.entries[t]).filter((t) => !!t).map(
|
|
2370
|
+
queries: e.order.map((t) => e.entries[t]).filter((t) => !!t).map(ce),
|
|
2115
2371
|
getQuery: (t) => {
|
|
2116
2372
|
const n = Object.values(e.entries).find(
|
|
2117
2373
|
(i) => i.queryId === t
|
|
2118
2374
|
);
|
|
2119
|
-
return n ?
|
|
2375
|
+
return n ? ce(n) : void 0;
|
|
2120
2376
|
},
|
|
2121
|
-
getQueries: (t) => Object.values(e.entries).filter((n) => n.queryId === t).map(
|
|
2122
|
-
} :
|
|
2377
|
+
getQueries: (t) => Object.values(e.entries).filter((n) => n.queryId === t).map(ce)
|
|
2378
|
+
} : sr;
|
|
2123
2379
|
}
|
|
2124
|
-
function
|
|
2380
|
+
function Ut(e) {
|
|
2125
2381
|
return {
|
|
2126
|
-
snapshot: () =>
|
|
2127
|
-
getQuery: (r) =>
|
|
2128
|
-
getQueries: (r) =>
|
|
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)
|
|
2129
2385
|
};
|
|
2130
2386
|
}
|
|
2131
|
-
function
|
|
2387
|
+
function Gt(e) {
|
|
2132
2388
|
if (!e.enabled)
|
|
2133
2389
|
return e;
|
|
2134
|
-
const r = e.queries.map(
|
|
2390
|
+
const r = e.queries.map(vr);
|
|
2135
2391
|
return {
|
|
2136
2392
|
enabled: e.enabled,
|
|
2137
2393
|
queries: r,
|
|
@@ -2139,36 +2395,36 @@ function _t(e) {
|
|
|
2139
2395
|
getQueries: (t) => r.filter((n) => n.queryId === t)
|
|
2140
2396
|
};
|
|
2141
2397
|
}
|
|
2142
|
-
function
|
|
2143
|
-
return e ?
|
|
2398
|
+
function Ue(e) {
|
|
2399
|
+
return e ? vr(e) : void 0;
|
|
2144
2400
|
}
|
|
2145
|
-
function
|
|
2401
|
+
function vr(e) {
|
|
2146
2402
|
var r;
|
|
2147
2403
|
return (r = e == null ? void 0 : e.latestAttempt) != null && r.executionResult ? {
|
|
2148
2404
|
...e,
|
|
2149
2405
|
latestAttempt: {
|
|
2150
2406
|
...e.latestAttempt,
|
|
2151
|
-
executionResult:
|
|
2407
|
+
executionResult: Jt(
|
|
2152
2408
|
e.latestAttempt.executionResult
|
|
2153
2409
|
)
|
|
2154
2410
|
}
|
|
2155
2411
|
} : e;
|
|
2156
2412
|
}
|
|
2157
|
-
function
|
|
2413
|
+
function Jt(e) {
|
|
2158
2414
|
const {
|
|
2159
2415
|
compiledQuery: r,
|
|
2160
2416
|
intent: t,
|
|
2161
2417
|
result: n,
|
|
2162
2418
|
...i
|
|
2163
|
-
} = e,
|
|
2419
|
+
} = e, a = Yt(
|
|
2164
2420
|
i.metadata
|
|
2165
2421
|
);
|
|
2166
2422
|
return {
|
|
2167
2423
|
...i,
|
|
2168
|
-
...
|
|
2424
|
+
...a ? { metadata: a } : {}
|
|
2169
2425
|
};
|
|
2170
2426
|
}
|
|
2171
|
-
function
|
|
2427
|
+
function Yt(e) {
|
|
2172
2428
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
2173
2429
|
return e;
|
|
2174
2430
|
const r = e.dataAppDebug;
|
|
@@ -2180,64 +2436,64 @@ function Ft(e) {
|
|
|
2180
2436
|
dataAppDebug: n
|
|
2181
2437
|
};
|
|
2182
2438
|
}
|
|
2183
|
-
function
|
|
2439
|
+
function Xt(e) {
|
|
2184
2440
|
return e === void 0 || e === !1 ? {
|
|
2185
2441
|
enabled: !1,
|
|
2186
2442
|
exposeWindowBridge: !1,
|
|
2187
|
-
maxEventsPerQuery:
|
|
2188
|
-
maxQueries:
|
|
2443
|
+
maxEventsPerQuery: ve,
|
|
2444
|
+
maxQueries: be
|
|
2189
2445
|
} : e === !0 ? {
|
|
2190
2446
|
enabled: !0,
|
|
2191
2447
|
exposeWindowBridge: !1,
|
|
2192
|
-
maxEventsPerQuery:
|
|
2193
|
-
maxQueries:
|
|
2448
|
+
maxEventsPerQuery: ve,
|
|
2449
|
+
maxQueries: be
|
|
2194
2450
|
} : {
|
|
2195
2451
|
enabled: e.enabled !== !1,
|
|
2196
2452
|
exposeWindowBridge: e.exposeWindowBridge === !0,
|
|
2197
|
-
maxEventsPerQuery:
|
|
2453
|
+
maxEventsPerQuery: Ye(
|
|
2198
2454
|
e.maxEventsPerQuery,
|
|
2199
|
-
|
|
2200
|
-
|
|
2455
|
+
ve,
|
|
2456
|
+
Hr
|
|
2201
2457
|
),
|
|
2202
|
-
maxQueries:
|
|
2458
|
+
maxQueries: Ye(
|
|
2203
2459
|
e.maxQueries,
|
|
2204
|
-
|
|
2460
|
+
be,
|
|
2205
2461
|
jr
|
|
2206
2462
|
)
|
|
2207
2463
|
};
|
|
2208
2464
|
}
|
|
2209
|
-
function
|
|
2465
|
+
function Ge(e) {
|
|
2210
2466
|
const t = [
|
|
2211
2467
|
e == null ? void 0 : e.sourceHint,
|
|
2212
2468
|
...(e == null ? void 0 : e.sourceHints) || []
|
|
2213
2469
|
].filter((n) => !!n).map((n) => ({
|
|
2214
|
-
file:
|
|
2215
|
-
line:
|
|
2216
|
-
column:
|
|
2217
|
-
exportName:
|
|
2218
|
-
component:
|
|
2219
|
-
note:
|
|
2470
|
+
file: le(n.file),
|
|
2471
|
+
line: Je(n.line),
|
|
2472
|
+
column: Je(n.column),
|
|
2473
|
+
exportName: le(n.exportName),
|
|
2474
|
+
component: le(n.component),
|
|
2475
|
+
note: le(n.note)
|
|
2220
2476
|
})).filter(
|
|
2221
2477
|
(n) => !!(n.file || n.line || n.column || n.exportName || n.component || n.note)
|
|
2222
2478
|
);
|
|
2223
2479
|
return t.length ? t : void 0;
|
|
2224
2480
|
}
|
|
2225
|
-
function
|
|
2481
|
+
function le(e) {
|
|
2226
2482
|
if (typeof e != "string")
|
|
2227
2483
|
return;
|
|
2228
2484
|
const r = e.trim();
|
|
2229
2485
|
return r || void 0;
|
|
2230
2486
|
}
|
|
2231
|
-
function
|
|
2487
|
+
function Je(e) {
|
|
2232
2488
|
return typeof e == "number" && Number.isInteger(e) && e > 0 ? e : void 0;
|
|
2233
2489
|
}
|
|
2234
|
-
function
|
|
2490
|
+
function Ye(e, r, t) {
|
|
2235
2491
|
return e === void 0 || !Number.isFinite(e) || !Number.isInteger(e) || e <= 0 ? r : Math.min(e, t);
|
|
2236
2492
|
}
|
|
2237
|
-
function
|
|
2493
|
+
function Zt(e) {
|
|
2238
2494
|
return typeof e.id == "string" && e.id.trim() ? e.id : void 0;
|
|
2239
2495
|
}
|
|
2240
|
-
function
|
|
2496
|
+
function en(e) {
|
|
2241
2497
|
switch (e) {
|
|
2242
2498
|
case "metric":
|
|
2243
2499
|
return "semaphor.metric";
|
|
@@ -2252,14 +2508,14 @@ function zt(e) {
|
|
|
2252
2508
|
case "sql":
|
|
2253
2509
|
return "semaphor.sql";
|
|
2254
2510
|
default:
|
|
2255
|
-
return
|
|
2511
|
+
return ye(e);
|
|
2256
2512
|
}
|
|
2257
2513
|
}
|
|
2258
|
-
function
|
|
2514
|
+
function ye(e) {
|
|
2259
2515
|
throw new Error(`Unsupported Semaphor query kind: ${JSON.stringify(e)}`);
|
|
2260
2516
|
}
|
|
2261
|
-
function
|
|
2262
|
-
if (
|
|
2517
|
+
function rn(e) {
|
|
2518
|
+
if (tn(e))
|
|
2263
2519
|
return;
|
|
2264
2520
|
const r = e.value;
|
|
2265
2521
|
if (r !== void 0) {
|
|
@@ -2269,17 +2525,17 @@ function jt(e) {
|
|
|
2269
2525
|
).map((n) => String(n));
|
|
2270
2526
|
if (t.length === r.length && t.length > 0) {
|
|
2271
2527
|
const n = t.slice(0, 3).join(", "), i = t.length > 3 ? `, +${t.length - 3} more` : "";
|
|
2272
|
-
return
|
|
2528
|
+
return Xe(`${n}${i}`);
|
|
2273
2529
|
}
|
|
2274
2530
|
return `${r.length} selected`;
|
|
2275
2531
|
}
|
|
2276
|
-
return typeof r == "number" || typeof r == "boolean" ? String(r) : typeof r == "string" ?
|
|
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);
|
|
2277
2533
|
}
|
|
2278
2534
|
}
|
|
2279
|
-
function
|
|
2535
|
+
function Xe(e) {
|
|
2280
2536
|
return e.length > 80 ? `${e.slice(0, 77)}...` : e;
|
|
2281
2537
|
}
|
|
2282
|
-
function
|
|
2538
|
+
function tn(e) {
|
|
2283
2539
|
var t;
|
|
2284
2540
|
const r = [
|
|
2285
2541
|
e.inputId,
|
|
@@ -2290,68 +2546,68 @@ function Ht(e) {
|
|
|
2290
2546
|
(n) => r.includes(n)
|
|
2291
2547
|
);
|
|
2292
2548
|
}
|
|
2293
|
-
function
|
|
2549
|
+
function nn(e) {
|
|
2294
2550
|
const r = /* @__PURE__ */ new Map();
|
|
2295
|
-
return
|
|
2296
|
-
|
|
2551
|
+
return pe(e, (t) => {
|
|
2552
|
+
dn(t) && r.set(Sr(t), t);
|
|
2297
2553
|
}), [...r.values()];
|
|
2298
2554
|
}
|
|
2299
|
-
function
|
|
2555
|
+
function on(e) {
|
|
2300
2556
|
switch (e.queryKind) {
|
|
2301
2557
|
case "metric":
|
|
2302
2558
|
case "analysis":
|
|
2303
|
-
return
|
|
2559
|
+
return G([
|
|
2304
2560
|
...e.measures || [],
|
|
2305
2561
|
e.primaryMeasure,
|
|
2306
2562
|
e.dateField,
|
|
2307
2563
|
...e.dimensions || []
|
|
2308
2564
|
]);
|
|
2309
2565
|
case "records":
|
|
2310
|
-
return
|
|
2566
|
+
return G(e.fields || []);
|
|
2311
2567
|
case "inputOptions":
|
|
2312
|
-
return
|
|
2568
|
+
return G([
|
|
2313
2569
|
e.labelField,
|
|
2314
2570
|
e.valueField,
|
|
2315
2571
|
e.searchField,
|
|
2316
2572
|
...e.disambiguationFields || []
|
|
2317
2573
|
]);
|
|
2318
2574
|
case "sql":
|
|
2319
|
-
return
|
|
2575
|
+
return G(e.fields || []);
|
|
2320
2576
|
case "matrix":
|
|
2321
|
-
return
|
|
2322
|
-
...(e.rows || []).map(
|
|
2323
|
-
...(e.columns || []).map(
|
|
2324
|
-
...(e.values || []).map(
|
|
2577
|
+
return G([
|
|
2578
|
+
...(e.rows || []).map(we),
|
|
2579
|
+
...(e.columns || []).map(we),
|
|
2580
|
+
...(e.values || []).map(we)
|
|
2325
2581
|
]);
|
|
2326
2582
|
default:
|
|
2327
|
-
return
|
|
2583
|
+
return ye(e);
|
|
2328
2584
|
}
|
|
2329
2585
|
}
|
|
2330
|
-
function
|
|
2586
|
+
function sn(e, r) {
|
|
2331
2587
|
const t = [
|
|
2332
|
-
...(e.inputs || []).map(
|
|
2588
|
+
...(e.inputs || []).map(br),
|
|
2333
2589
|
...(r || []).map((n) => n.field)
|
|
2334
2590
|
];
|
|
2335
|
-
return
|
|
2591
|
+
return G(t);
|
|
2336
2592
|
}
|
|
2337
|
-
function
|
|
2593
|
+
function G(e) {
|
|
2338
2594
|
const r = /* @__PURE__ */ new Map();
|
|
2339
2595
|
return e.forEach((t) => {
|
|
2340
|
-
t && te(t) && r.set(
|
|
2596
|
+
t && te(t) && r.set(Ne(t), t);
|
|
2341
2597
|
}), [...r.values()];
|
|
2342
2598
|
}
|
|
2343
|
-
function
|
|
2599
|
+
function br(e) {
|
|
2344
2600
|
if (!e || typeof e != "object")
|
|
2345
2601
|
return;
|
|
2346
2602
|
const r = e.toAnalyticsInput;
|
|
2347
2603
|
if (typeof r == "function") {
|
|
2348
2604
|
const n = r.call(e);
|
|
2349
|
-
return
|
|
2605
|
+
return br(n);
|
|
2350
2606
|
}
|
|
2351
2607
|
const t = e.field;
|
|
2352
2608
|
return te(t) ? t : void 0;
|
|
2353
2609
|
}
|
|
2354
|
-
function
|
|
2610
|
+
function we(e) {
|
|
2355
2611
|
if (te(e))
|
|
2356
2612
|
return e;
|
|
2357
2613
|
if (!e || typeof e != "object")
|
|
@@ -2359,24 +2615,24 @@ function Se(e) {
|
|
|
2359
2615
|
const r = e.field;
|
|
2360
2616
|
return te(r) ? r : void 0;
|
|
2361
2617
|
}
|
|
2362
|
-
function
|
|
2618
|
+
function an(e) {
|
|
2363
2619
|
const r = /* @__PURE__ */ new Map();
|
|
2364
|
-
return
|
|
2365
|
-
te(t) && r.set(
|
|
2620
|
+
return pe(e, (t) => {
|
|
2621
|
+
te(t) && r.set(Ne(t), t);
|
|
2366
2622
|
}), [...r.values()];
|
|
2367
2623
|
}
|
|
2368
|
-
function
|
|
2624
|
+
function pe(e, r) {
|
|
2369
2625
|
if (!(!e || typeof e != "object")) {
|
|
2370
2626
|
if (r(e), Array.isArray(e)) {
|
|
2371
|
-
e.forEach((t) =>
|
|
2627
|
+
e.forEach((t) => pe(t, r));
|
|
2372
2628
|
return;
|
|
2373
2629
|
}
|
|
2374
2630
|
Object.values(e).forEach(
|
|
2375
|
-
(t) =>
|
|
2631
|
+
(t) => pe(t, r)
|
|
2376
2632
|
);
|
|
2377
2633
|
}
|
|
2378
2634
|
}
|
|
2379
|
-
function
|
|
2635
|
+
function dn(e) {
|
|
2380
2636
|
if (!e || typeof e != "object")
|
|
2381
2637
|
return !1;
|
|
2382
2638
|
const r = e;
|
|
@@ -2388,7 +2644,7 @@ function te(e) {
|
|
|
2388
2644
|
const r = e;
|
|
2389
2645
|
return typeof r.name == "string" && (r.source !== void 0 || r.role !== void 0 || r.dataType !== void 0 || r.aggregate !== void 0);
|
|
2390
2646
|
}
|
|
2391
|
-
function
|
|
2647
|
+
function Sr(e) {
|
|
2392
2648
|
return e.kind === "semantic" ? [
|
|
2393
2649
|
e.kind,
|
|
2394
2650
|
e.domainId,
|
|
@@ -2401,43 +2657,43 @@ function yr(e) {
|
|
|
2401
2657
|
e.tableName
|
|
2402
2658
|
].join(":") : [e.kind, e.connectionId].join(":");
|
|
2403
2659
|
}
|
|
2404
|
-
function
|
|
2660
|
+
function Ne(e) {
|
|
2405
2661
|
return [
|
|
2406
2662
|
e.name,
|
|
2407
2663
|
e.role,
|
|
2408
2664
|
e.aggregate,
|
|
2409
|
-
e.source ?
|
|
2665
|
+
e.source ? Sr(e.source) : ""
|
|
2410
2666
|
].join(":");
|
|
2411
2667
|
}
|
|
2412
|
-
function
|
|
2668
|
+
function ln(e) {
|
|
2413
2669
|
const r = e;
|
|
2414
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;
|
|
2415
2671
|
}
|
|
2416
|
-
function
|
|
2672
|
+
function un(e) {
|
|
2417
2673
|
const r = e;
|
|
2418
2674
|
return Array.isArray(r == null ? void 0 : r.columns) ? r.columns.length : void 0;
|
|
2419
2675
|
}
|
|
2420
|
-
function
|
|
2676
|
+
function Ze(e) {
|
|
2421
2677
|
const r = e;
|
|
2422
2678
|
return r == null ? void 0 : r.executionResult;
|
|
2423
2679
|
}
|
|
2424
|
-
function
|
|
2680
|
+
function er(e) {
|
|
2425
2681
|
const r = e;
|
|
2426
2682
|
return typeof (r == null ? void 0 : r.requestId) == "string" ? r.requestId : void 0;
|
|
2427
2683
|
}
|
|
2428
|
-
function
|
|
2684
|
+
function xr(e) {
|
|
2429
2685
|
let r = 2166136261;
|
|
2430
2686
|
for (let t = 0; t < e.length; t += 1)
|
|
2431
2687
|
r ^= e.charCodeAt(t), r = Math.imul(r, 16777619);
|
|
2432
2688
|
return (r >>> 0).toString(36);
|
|
2433
2689
|
}
|
|
2434
|
-
function
|
|
2690
|
+
function ue() {
|
|
2435
2691
|
return (/* @__PURE__ */ new Date()).toISOString();
|
|
2436
2692
|
}
|
|
2437
|
-
function
|
|
2693
|
+
function $e() {
|
|
2438
2694
|
return typeof performance < "u" && performance.now ? performance.now() : Date.now();
|
|
2439
2695
|
}
|
|
2440
|
-
const
|
|
2696
|
+
const cn = [
|
|
2441
2697
|
"records",
|
|
2442
2698
|
"changes",
|
|
2443
2699
|
"drivers",
|
|
@@ -2445,7 +2701,7 @@ const Xt = [
|
|
|
2445
2701
|
"largestPositiveChanges",
|
|
2446
2702
|
"largestNegativeDrivers",
|
|
2447
2703
|
"largestPositiveDrivers"
|
|
2448
|
-
],
|
|
2704
|
+
], fn = [
|
|
2449
2705
|
"records",
|
|
2450
2706
|
"changes",
|
|
2451
2707
|
"drivers",
|
|
@@ -2454,10 +2710,10 @@ const Xt = [
|
|
|
2454
2710
|
"largestNegativeDrivers",
|
|
2455
2711
|
"largestPositiveDrivers"
|
|
2456
2712
|
];
|
|
2457
|
-
function
|
|
2713
|
+
function Ir(e) {
|
|
2458
2714
|
if (!e)
|
|
2459
2715
|
return {};
|
|
2460
|
-
const r =
|
|
2716
|
+
const r = hn(e.executionResult), t = pn(e, r), n = mn(t);
|
|
2461
2717
|
return {
|
|
2462
2718
|
...e,
|
|
2463
2719
|
...Object.keys(t).length ? { resultSets: t } : {},
|
|
@@ -2468,84 +2724,84 @@ function vr(e) {
|
|
|
2468
2724
|
} : {}
|
|
2469
2725
|
};
|
|
2470
2726
|
}
|
|
2471
|
-
function
|
|
2472
|
-
const t =
|
|
2473
|
-
for (const i of
|
|
2727
|
+
function pn(e, r) {
|
|
2728
|
+
const t = gn(e.resultSets);
|
|
2729
|
+
for (const i of cn) {
|
|
2474
2730
|
if (t[i]) {
|
|
2475
|
-
t[i] =
|
|
2731
|
+
t[i] = wr(t[i]);
|
|
2476
2732
|
continue;
|
|
2477
2733
|
}
|
|
2478
|
-
const
|
|
2479
|
-
if (!
|
|
2734
|
+
const a = vn(e[i]);
|
|
2735
|
+
if (!a.length)
|
|
2480
2736
|
continue;
|
|
2481
|
-
const
|
|
2737
|
+
const l = r.length ? r : bn(a);
|
|
2482
2738
|
t[i] = {
|
|
2483
|
-
records:
|
|
2484
|
-
columns:
|
|
2485
|
-
rowCount:
|
|
2739
|
+
records: We(a, l),
|
|
2740
|
+
columns: l,
|
|
2741
|
+
rowCount: a.length
|
|
2486
2742
|
};
|
|
2487
2743
|
}
|
|
2488
|
-
const n =
|
|
2744
|
+
const n = yn(e.executionResult);
|
|
2489
2745
|
return n && n.records.length > 0 && !t.records && (t.records = n), t;
|
|
2490
2746
|
}
|
|
2491
|
-
function
|
|
2747
|
+
function gn(e) {
|
|
2492
2748
|
return Object.fromEntries(
|
|
2493
2749
|
Object.entries(e || {}).map(([r, t]) => [
|
|
2494
2750
|
r,
|
|
2495
|
-
|
|
2751
|
+
wr(t)
|
|
2496
2752
|
])
|
|
2497
2753
|
);
|
|
2498
2754
|
}
|
|
2499
|
-
function
|
|
2755
|
+
function wr(e) {
|
|
2500
2756
|
var r;
|
|
2501
2757
|
return {
|
|
2502
2758
|
...e,
|
|
2503
|
-
records:
|
|
2759
|
+
records: We(
|
|
2504
2760
|
e.records || [],
|
|
2505
2761
|
e.columns || []
|
|
2506
2762
|
),
|
|
2507
2763
|
rowCount: e.rowCount ?? ((r = e.records) == null ? void 0 : r.length) ?? 0
|
|
2508
2764
|
};
|
|
2509
2765
|
}
|
|
2510
|
-
function
|
|
2766
|
+
function mn(e) {
|
|
2511
2767
|
var r;
|
|
2512
|
-
for (const t of
|
|
2768
|
+
for (const t of fn)
|
|
2513
2769
|
if ((r = e[t]) != null && r.records.length)
|
|
2514
2770
|
return e[t];
|
|
2515
2771
|
return Object.values(e).find((t) => t.records.length) || Object.values(e)[0];
|
|
2516
2772
|
}
|
|
2517
|
-
function
|
|
2773
|
+
function yn(e) {
|
|
2518
2774
|
const r = e == null ? void 0 : e.result;
|
|
2519
2775
|
if (!(!r || r.kind !== "records" && r.kind !== "sql"))
|
|
2520
2776
|
return {
|
|
2521
|
-
records:
|
|
2777
|
+
records: We(r.records, r.columns),
|
|
2522
2778
|
columns: r.columns,
|
|
2523
2779
|
rowCount: r.rowCount ?? r.records.length
|
|
2524
2780
|
};
|
|
2525
2781
|
}
|
|
2526
|
-
function
|
|
2782
|
+
function hn(e) {
|
|
2527
2783
|
const r = e == null ? void 0 : e.result;
|
|
2528
2784
|
return !r || r.kind !== "records" && r.kind !== "sql" ? [] : r.columns;
|
|
2529
2785
|
}
|
|
2530
|
-
function
|
|
2786
|
+
function vn(e) {
|
|
2531
2787
|
return Array.isArray(e) ? e.filter(
|
|
2532
2788
|
(r) => !!(r && typeof r == "object" && !Array.isArray(r))
|
|
2533
2789
|
) : [];
|
|
2534
2790
|
}
|
|
2535
|
-
function
|
|
2791
|
+
function We(e, r) {
|
|
2536
2792
|
return r.length ? e.map((t) => {
|
|
2537
2793
|
const n = {};
|
|
2538
|
-
return r.forEach((i,
|
|
2539
|
-
const
|
|
2794
|
+
return r.forEach((i, a) => {
|
|
2795
|
+
const l = Sn(t, {
|
|
2540
2796
|
name: i.key,
|
|
2541
2797
|
label: i.label,
|
|
2542
|
-
fallbackNames: [i.name, Object.keys(t)[
|
|
2798
|
+
fallbackNames: [i.name, Object.keys(t)[a]]
|
|
2543
2799
|
});
|
|
2544
|
-
|
|
2800
|
+
l !== void 0 && (n[i.key] = l);
|
|
2545
2801
|
}), Object.keys(n).length ? n : t;
|
|
2546
2802
|
}) : e;
|
|
2547
2803
|
}
|
|
2548
|
-
function
|
|
2804
|
+
function bn(e) {
|
|
2549
2805
|
return Array.from(
|
|
2550
2806
|
new Set(e.flatMap((t) => Object.keys(t)))
|
|
2551
2807
|
).map((t) => ({
|
|
@@ -2554,7 +2810,7 @@ function an(e) {
|
|
|
2554
2810
|
label: t
|
|
2555
2811
|
}));
|
|
2556
2812
|
}
|
|
2557
|
-
function
|
|
2813
|
+
function Sn(e, r) {
|
|
2558
2814
|
const t = [
|
|
2559
2815
|
r.name,
|
|
2560
2816
|
r.label,
|
|
@@ -2564,29 +2820,29 @@ function ln(e, r) {
|
|
|
2564
2820
|
if (Object.prototype.hasOwnProperty.call(e, n))
|
|
2565
2821
|
return e[n];
|
|
2566
2822
|
}
|
|
2567
|
-
function
|
|
2823
|
+
function xn() {
|
|
2568
2824
|
return {
|
|
2569
|
-
executeAnalysis: (e, r, t) =>
|
|
2825
|
+
executeAnalysis: (e, r, t) => U(
|
|
2570
2826
|
e,
|
|
2571
2827
|
r,
|
|
2572
2828
|
t ?? {}
|
|
2573
|
-
).then(
|
|
2574
|
-
executeMetric: (e, r) =>
|
|
2575
|
-
executeRecords: (e, r) =>
|
|
2576
|
-
executeInputOptions: (e, r) =>
|
|
2577
|
-
executeSql: (e, r) =>
|
|
2578
|
-
executeMatrix: (e, r) =>
|
|
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)
|
|
2579
2835
|
};
|
|
2580
2836
|
}
|
|
2581
|
-
async function
|
|
2837
|
+
async function U(e, r, t) {
|
|
2582
2838
|
if (!r.token)
|
|
2583
2839
|
throw new Error(
|
|
2584
2840
|
"SemaphorDataAppProvider needs a token to execute queries."
|
|
2585
2841
|
);
|
|
2586
|
-
const n =
|
|
2587
|
-
let
|
|
2842
|
+
const n = kn(r), i = qn(e, n);
|
|
2843
|
+
let a;
|
|
2588
2844
|
try {
|
|
2589
|
-
|
|
2845
|
+
a = await fetch(n, {
|
|
2590
2846
|
method: "POST",
|
|
2591
2847
|
headers: {
|
|
2592
2848
|
"Content-Type": "application/json",
|
|
@@ -2597,7 +2853,7 @@ async function H(e, r, t) {
|
|
|
2597
2853
|
activeInputs: r.activeInputs,
|
|
2598
2854
|
...t ? { analysisOptions: t } : {},
|
|
2599
2855
|
resultShape: e.kind,
|
|
2600
|
-
...
|
|
2856
|
+
...wn(r) ? { debug: { responseDetail: "debug" } } : {}
|
|
2601
2857
|
})
|
|
2602
2858
|
});
|
|
2603
2859
|
} catch (c) {
|
|
@@ -2605,32 +2861,32 @@ async function H(e, r, t) {
|
|
|
2605
2861
|
`${i}: ${c instanceof Error ? c.message : String(c)}`
|
|
2606
2862
|
);
|
|
2607
2863
|
}
|
|
2608
|
-
const
|
|
2609
|
-
if (!
|
|
2610
|
-
throw
|
|
2611
|
-
`${i}: ${
|
|
2612
|
-
|
|
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
|
|
2613
2869
|
);
|
|
2614
|
-
return
|
|
2870
|
+
return l;
|
|
2615
2871
|
}
|
|
2616
|
-
function
|
|
2872
|
+
function In(e, r) {
|
|
2617
2873
|
const t = new Error(e);
|
|
2618
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;
|
|
2619
2875
|
}
|
|
2620
|
-
function
|
|
2876
|
+
function wn(e) {
|
|
2621
2877
|
const r = e.debug;
|
|
2622
2878
|
return r ? r === !0 ? !0 : r.enabled !== !1 && r.requestServerDebug !== !1 : !1;
|
|
2623
2879
|
}
|
|
2624
|
-
function
|
|
2880
|
+
function qn(e, r) {
|
|
2625
2881
|
return [
|
|
2626
2882
|
`Semaphor ${e.kind} query`,
|
|
2627
2883
|
e.id ? `id=${e.id}` : void 0,
|
|
2628
2884
|
e.label ? `label=${e.label}` : void 0,
|
|
2629
|
-
|
|
2630
|
-
`endpoint=${
|
|
2885
|
+
Rn(e),
|
|
2886
|
+
`endpoint=${An(r)}`
|
|
2631
2887
|
].filter((t) => !!t).join(" ");
|
|
2632
2888
|
}
|
|
2633
|
-
function
|
|
2889
|
+
function Rn(e) {
|
|
2634
2890
|
const r = "source" in e ? e.source : void 0;
|
|
2635
2891
|
if (!(!r || typeof r != "object")) {
|
|
2636
2892
|
if (r.kind === "semantic")
|
|
@@ -2649,7 +2905,7 @@ function pn(e) {
|
|
|
2649
2905
|
return r.connectionId ? `source=${r.connectionId}` : void 0;
|
|
2650
2906
|
}
|
|
2651
2907
|
}
|
|
2652
|
-
function
|
|
2908
|
+
function An(e) {
|
|
2653
2909
|
if (!e)
|
|
2654
2910
|
return "/api/v1/data-app/execute";
|
|
2655
2911
|
try {
|
|
@@ -2658,7 +2914,7 @@ function mn(e) {
|
|
|
2658
2914
|
return e;
|
|
2659
2915
|
}
|
|
2660
2916
|
}
|
|
2661
|
-
async function
|
|
2917
|
+
async function Tn(e) {
|
|
2662
2918
|
const r = await e.text().catch(() => "");
|
|
2663
2919
|
if (!r.trim())
|
|
2664
2920
|
return e.ok ? {
|
|
@@ -2671,20 +2927,20 @@ async function gn(e) {
|
|
|
2671
2927
|
error: "Semaphor Data App execution returned invalid JSON.",
|
|
2672
2928
|
details: r
|
|
2673
2929
|
} : {
|
|
2674
|
-
error:
|
|
2930
|
+
error: En(e, r),
|
|
2675
2931
|
details: r
|
|
2676
2932
|
};
|
|
2677
2933
|
}
|
|
2678
2934
|
}
|
|
2679
|
-
function
|
|
2935
|
+
function En(e, r) {
|
|
2680
2936
|
const t = e.statusText ? ` ${e.statusText}` : "", n = r.replace(/\s+/g, " ").trim();
|
|
2681
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}.`;
|
|
2682
2938
|
}
|
|
2683
|
-
function
|
|
2684
|
-
const r =
|
|
2939
|
+
function kn(e) {
|
|
2940
|
+
const r = Cn(e).replace(/\/+$/, "");
|
|
2685
2941
|
return r ? r.endsWith("/api") ? `${r}/v1/data-app/execute` : `${r}/api/v1/data-app/execute` : "/api/v1/data-app/execute";
|
|
2686
2942
|
}
|
|
2687
|
-
function
|
|
2943
|
+
function Cn(e) {
|
|
2688
2944
|
if (e.apiBaseUrl)
|
|
2689
2945
|
return e.apiBaseUrl;
|
|
2690
2946
|
if (!e.token)
|
|
@@ -2695,19 +2951,19 @@ function vn(e) {
|
|
|
2695
2951
|
return "";
|
|
2696
2952
|
}
|
|
2697
2953
|
}
|
|
2698
|
-
const
|
|
2699
|
-
function
|
|
2954
|
+
const qr = ge({});
|
|
2955
|
+
function Ln() {
|
|
2700
2956
|
if (!(typeof window > "u"))
|
|
2701
2957
|
return window.__SEMAPHOR_DATA_APP_RUNTIME__;
|
|
2702
2958
|
}
|
|
2703
|
-
function
|
|
2704
|
-
return
|
|
2959
|
+
function Dn() {
|
|
2960
|
+
return H(qr);
|
|
2705
2961
|
}
|
|
2706
|
-
const
|
|
2707
|
-
function
|
|
2708
|
-
const r =
|
|
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);
|
|
2709
2965
|
try {
|
|
2710
|
-
const n =
|
|
2966
|
+
const n = Br(e), i = Y(n);
|
|
2711
2967
|
return i ? {
|
|
2712
2968
|
error: i,
|
|
2713
2969
|
activeInputs: r,
|
|
@@ -2718,17 +2974,17 @@ function In(e) {
|
|
|
2718
2974
|
i,
|
|
2719
2975
|
t
|
|
2720
2976
|
),
|
|
2721
|
-
idleData:
|
|
2977
|
+
idleData: Re
|
|
2722
2978
|
} : {
|
|
2723
2979
|
intent: n,
|
|
2724
2980
|
error: null,
|
|
2725
2981
|
activeInputs: r,
|
|
2726
2982
|
analysisOptions: t,
|
|
2727
2983
|
queryKey: q(n, r, void 0, t),
|
|
2728
|
-
idleData:
|
|
2984
|
+
idleData: Re
|
|
2729
2985
|
};
|
|
2730
2986
|
} catch (n) {
|
|
2731
|
-
const i =
|
|
2987
|
+
const i = _(n);
|
|
2732
2988
|
return {
|
|
2733
2989
|
error: i,
|
|
2734
2990
|
activeInputs: r,
|
|
@@ -2739,40 +2995,40 @@ function In(e) {
|
|
|
2739
2995
|
i,
|
|
2740
2996
|
t
|
|
2741
2997
|
),
|
|
2742
|
-
idleData:
|
|
2998
|
+
idleData: Re
|
|
2743
2999
|
};
|
|
2744
3000
|
}
|
|
2745
3001
|
}
|
|
2746
|
-
function
|
|
2747
|
-
const r =
|
|
3002
|
+
function Nn(e) {
|
|
3003
|
+
const r = J(e.inputs);
|
|
2748
3004
|
try {
|
|
2749
|
-
const t =
|
|
3005
|
+
const t = Kr(e), n = Y(t);
|
|
2750
3006
|
return n ? {
|
|
2751
3007
|
error: n,
|
|
2752
3008
|
activeInputs: r,
|
|
2753
3009
|
queryKey: q(void 0, r, n),
|
|
2754
|
-
idleData:
|
|
3010
|
+
idleData: qe
|
|
2755
3011
|
} : {
|
|
2756
3012
|
intent: t,
|
|
2757
3013
|
error: null,
|
|
2758
3014
|
activeInputs: r,
|
|
2759
3015
|
queryKey: q(t, r),
|
|
2760
|
-
idleData:
|
|
3016
|
+
idleData: qe
|
|
2761
3017
|
};
|
|
2762
3018
|
} catch (t) {
|
|
2763
|
-
const n =
|
|
3019
|
+
const n = _(t);
|
|
2764
3020
|
return {
|
|
2765
3021
|
error: n,
|
|
2766
3022
|
activeInputs: r,
|
|
2767
3023
|
queryKey: q(void 0, r, n),
|
|
2768
|
-
idleData:
|
|
3024
|
+
idleData: qe
|
|
2769
3025
|
};
|
|
2770
3026
|
}
|
|
2771
3027
|
}
|
|
2772
|
-
function
|
|
2773
|
-
const r =
|
|
3028
|
+
function $n(e) {
|
|
3029
|
+
const r = J(e.inputs), t = On;
|
|
2774
3030
|
try {
|
|
2775
|
-
const n =
|
|
3031
|
+
const n = Dr(e), i = Y(n);
|
|
2776
3032
|
return i ? {
|
|
2777
3033
|
error: i,
|
|
2778
3034
|
activeInputs: r,
|
|
@@ -2786,7 +3042,7 @@ function An(e) {
|
|
|
2786
3042
|
idleData: t
|
|
2787
3043
|
};
|
|
2788
3044
|
} catch (n) {
|
|
2789
|
-
const i =
|
|
3045
|
+
const i = _(n);
|
|
2790
3046
|
return {
|
|
2791
3047
|
error: i,
|
|
2792
3048
|
activeInputs: r,
|
|
@@ -2795,36 +3051,36 @@ function An(e) {
|
|
|
2795
3051
|
};
|
|
2796
3052
|
}
|
|
2797
3053
|
}
|
|
2798
|
-
function
|
|
2799
|
-
const r =
|
|
3054
|
+
function Wn(e) {
|
|
3055
|
+
const r = J(e.inputs);
|
|
2800
3056
|
try {
|
|
2801
|
-
const t =
|
|
3057
|
+
const t = Lr(e), n = Y(t);
|
|
2802
3058
|
return n ? {
|
|
2803
3059
|
error: n,
|
|
2804
3060
|
activeInputs: r,
|
|
2805
3061
|
queryKey: q(void 0, r, n),
|
|
2806
|
-
idleData:
|
|
3062
|
+
idleData: Ae
|
|
2807
3063
|
} : {
|
|
2808
3064
|
intent: t,
|
|
2809
3065
|
error: null,
|
|
2810
3066
|
activeInputs: r,
|
|
2811
3067
|
queryKey: q(t, r),
|
|
2812
|
-
idleData:
|
|
3068
|
+
idleData: Ae
|
|
2813
3069
|
};
|
|
2814
3070
|
} catch (t) {
|
|
2815
|
-
const n =
|
|
3071
|
+
const n = _(t);
|
|
2816
3072
|
return {
|
|
2817
3073
|
error: n,
|
|
2818
3074
|
activeInputs: r,
|
|
2819
3075
|
queryKey: q(void 0, r, n),
|
|
2820
|
-
idleData:
|
|
3076
|
+
idleData: Ae
|
|
2821
3077
|
};
|
|
2822
3078
|
}
|
|
2823
3079
|
}
|
|
2824
|
-
function
|
|
2825
|
-
const r =
|
|
3080
|
+
function Fn(e) {
|
|
3081
|
+
const r = J(e.inputs), t = Bn;
|
|
2826
3082
|
try {
|
|
2827
|
-
const n =
|
|
3083
|
+
const n = Cr(e), i = Y(n);
|
|
2828
3084
|
return i ? {
|
|
2829
3085
|
error: i,
|
|
2830
3086
|
activeInputs: r,
|
|
@@ -2838,7 +3094,7 @@ function En(e) {
|
|
|
2838
3094
|
idleData: t
|
|
2839
3095
|
};
|
|
2840
3096
|
} catch (n) {
|
|
2841
|
-
const i =
|
|
3097
|
+
const i = _(n);
|
|
2842
3098
|
return {
|
|
2843
3099
|
error: i,
|
|
2844
3100
|
activeInputs: r,
|
|
@@ -2847,37 +3103,37 @@ function En(e) {
|
|
|
2847
3103
|
};
|
|
2848
3104
|
}
|
|
2849
3105
|
}
|
|
2850
|
-
function
|
|
2851
|
-
const r =
|
|
3106
|
+
function _n(e) {
|
|
3107
|
+
const r = J(e.inputs);
|
|
2852
3108
|
try {
|
|
2853
|
-
const t =
|
|
3109
|
+
const t = kr(e), n = Y(t);
|
|
2854
3110
|
return n ? {
|
|
2855
3111
|
error: n,
|
|
2856
3112
|
activeInputs: r,
|
|
2857
3113
|
queryKey: q(void 0, r, n),
|
|
2858
|
-
idleData:
|
|
3114
|
+
idleData: Te
|
|
2859
3115
|
} : {
|
|
2860
3116
|
intent: t,
|
|
2861
3117
|
error: null,
|
|
2862
3118
|
activeInputs: r,
|
|
2863
3119
|
queryKey: q(t, r),
|
|
2864
|
-
idleData:
|
|
3120
|
+
idleData: Te
|
|
2865
3121
|
};
|
|
2866
3122
|
} catch (t) {
|
|
2867
|
-
const n =
|
|
3123
|
+
const n = _(t);
|
|
2868
3124
|
return {
|
|
2869
3125
|
error: n,
|
|
2870
3126
|
activeInputs: r,
|
|
2871
3127
|
queryKey: q(void 0, r, n),
|
|
2872
|
-
idleData:
|
|
3128
|
+
idleData: Te
|
|
2873
3129
|
};
|
|
2874
3130
|
}
|
|
2875
3131
|
}
|
|
2876
|
-
function
|
|
3132
|
+
function _(e) {
|
|
2877
3133
|
return e instanceof Error ? e : new Error(String(e));
|
|
2878
3134
|
}
|
|
2879
|
-
function
|
|
2880
|
-
const r =
|
|
3135
|
+
function Y(e) {
|
|
3136
|
+
const r = Pr(e);
|
|
2881
3137
|
if (r.ok)
|
|
2882
3138
|
return null;
|
|
2883
3139
|
const t = r.errors.map(
|
|
@@ -2893,68 +3149,68 @@ function q(e, r, t, n) {
|
|
|
2893
3149
|
error: t == null ? void 0 : t.message
|
|
2894
3150
|
});
|
|
2895
3151
|
}
|
|
2896
|
-
function
|
|
2897
|
-
const [r, t] =
|
|
2898
|
-
() =>
|
|
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),
|
|
2899
3155
|
[e.options]
|
|
2900
|
-
),
|
|
2901
|
-
(
|
|
2902
|
-
var
|
|
2903
|
-
const f =
|
|
2904
|
-
(
|
|
3156
|
+
), l = D(
|
|
3157
|
+
(u) => {
|
|
3158
|
+
var m;
|
|
3159
|
+
const f = u;
|
|
3160
|
+
(m = e.onValueChange) == null || m.call(e, f), n || t(f);
|
|
2905
3161
|
},
|
|
2906
3162
|
[n, e]
|
|
2907
|
-
), c =
|
|
2908
|
-
return
|
|
2909
|
-
const
|
|
3163
|
+
), c = D(() => l(void 0), [l]);
|
|
3164
|
+
return v(() => {
|
|
3165
|
+
const u = ir(e);
|
|
2910
3166
|
return {
|
|
2911
3167
|
id: e.id,
|
|
2912
3168
|
kind: e.kind,
|
|
2913
3169
|
label: e.label,
|
|
2914
|
-
field:
|
|
2915
|
-
operator:
|
|
2916
|
-
relationshipHint:
|
|
3170
|
+
field: u.field,
|
|
3171
|
+
operator: u.operator,
|
|
3172
|
+
relationshipHint: u.relationshipHint,
|
|
2917
3173
|
controlRole: e.kind === "control" ? e.role : void 0,
|
|
2918
3174
|
value: i,
|
|
2919
|
-
options:
|
|
3175
|
+
options: a,
|
|
2920
3176
|
isActive: re(i),
|
|
2921
|
-
setValue:
|
|
3177
|
+
setValue: l,
|
|
2922
3178
|
clear: c,
|
|
2923
3179
|
toAnalyticsInput: () => ({
|
|
2924
|
-
inputId:
|
|
2925
|
-
field:
|
|
3180
|
+
inputId: u.inputId,
|
|
3181
|
+
field: u.field,
|
|
2926
3182
|
kind: e.kind,
|
|
2927
3183
|
label: e.label,
|
|
2928
3184
|
value: i,
|
|
2929
3185
|
isActive: re(i),
|
|
2930
|
-
operator:
|
|
2931
|
-
relationshipHint:
|
|
3186
|
+
operator: u.operator,
|
|
3187
|
+
relationshipHint: u.relationshipHint,
|
|
2932
3188
|
controlRole: e.kind === "control" ? e.role : void 0
|
|
2933
3189
|
})
|
|
2934
3190
|
};
|
|
2935
|
-
}, [c,
|
|
3191
|
+
}, [c, a, l, e, i]);
|
|
2936
3192
|
}
|
|
2937
|
-
function
|
|
2938
|
-
const [r, t] =
|
|
2939
|
-
return
|
|
3193
|
+
function oi(e) {
|
|
3194
|
+
const [r, t] = j(() => Hn(e));
|
|
3195
|
+
return B(() => {
|
|
2940
3196
|
t((n) => {
|
|
2941
3197
|
let i = n;
|
|
2942
|
-
for (const
|
|
2943
|
-
!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 });
|
|
2944
3200
|
return i;
|
|
2945
3201
|
});
|
|
2946
|
-
}, [e]),
|
|
3202
|
+
}, [e]), v(
|
|
2947
3203
|
() => e.map((n) => {
|
|
2948
3204
|
const i = Object.prototype.hasOwnProperty.call(
|
|
2949
3205
|
n,
|
|
2950
3206
|
"value"
|
|
2951
|
-
),
|
|
3207
|
+
), a = i ? n.value : r[n.id], l = nr(n.options), c = (m) => {
|
|
2952
3208
|
var y;
|
|
2953
|
-
(y = n.onValueChange) == null || y.call(n,
|
|
3209
|
+
(y = n.onValueChange) == null || y.call(n, m), i || t((h) => ({
|
|
2954
3210
|
...h,
|
|
2955
|
-
[n.id]:
|
|
3211
|
+
[n.id]: m
|
|
2956
3212
|
}));
|
|
2957
|
-
},
|
|
3213
|
+
}, u = () => c(void 0), f = ir(n);
|
|
2958
3214
|
return {
|
|
2959
3215
|
id: n.id,
|
|
2960
3216
|
kind: n.kind,
|
|
@@ -2963,18 +3219,18 @@ function Qn(e) {
|
|
|
2963
3219
|
operator: f.operator,
|
|
2964
3220
|
relationshipHint: f.relationshipHint,
|
|
2965
3221
|
controlRole: n.kind === "control" ? n.role : void 0,
|
|
2966
|
-
value:
|
|
2967
|
-
options:
|
|
2968
|
-
isActive: re(
|
|
3222
|
+
value: a,
|
|
3223
|
+
options: l,
|
|
3224
|
+
isActive: re(a),
|
|
2969
3225
|
setValue: c,
|
|
2970
|
-
clear:
|
|
3226
|
+
clear: u,
|
|
2971
3227
|
toAnalyticsInput: () => ({
|
|
2972
3228
|
inputId: f.inputId,
|
|
2973
3229
|
field: f.field,
|
|
2974
3230
|
kind: n.kind,
|
|
2975
3231
|
label: n.label,
|
|
2976
|
-
value:
|
|
2977
|
-
isActive: re(
|
|
3232
|
+
value: a,
|
|
3233
|
+
isActive: re(a),
|
|
2978
3234
|
operator: f.operator,
|
|
2979
3235
|
relationshipHint: f.relationshipHint,
|
|
2980
3236
|
controlRole: n.kind === "control" ? n.role : void 0
|
|
@@ -2984,78 +3240,78 @@ function Qn(e) {
|
|
|
2984
3240
|
[e, r]
|
|
2985
3241
|
);
|
|
2986
3242
|
}
|
|
2987
|
-
function
|
|
2988
|
-
const t = (r == null ? void 0 : r.status) === "success" ? r.options : void 0, n =
|
|
2989
|
-
|
|
2990
|
-
|
|
3243
|
+
function si(e, r) {
|
|
3244
|
+
const t = (r == null ? void 0 : r.status) === "success" ? r.options : void 0, n = v(() => Mn(t), [t]);
|
|
3245
|
+
B(() => {
|
|
3246
|
+
zn(e.value, t) || e.clear();
|
|
2991
3247
|
}, [e, n, r == null ? void 0 : r.status, t]);
|
|
2992
3248
|
}
|
|
2993
|
-
function
|
|
3249
|
+
function zn(e, r) {
|
|
2994
3250
|
if (!re(e) || r === void 0)
|
|
2995
3251
|
return !0;
|
|
2996
3252
|
const t = new Set(
|
|
2997
|
-
r.map((i) =>
|
|
3253
|
+
r.map((i) => rr(i.value))
|
|
2998
3254
|
);
|
|
2999
3255
|
return (Array.isArray(e) ? e : [e]).every(
|
|
3000
|
-
(i) => t.has(
|
|
3256
|
+
(i) => t.has(rr(i))
|
|
3001
3257
|
);
|
|
3002
3258
|
}
|
|
3003
|
-
function
|
|
3259
|
+
function Mn(e) {
|
|
3004
3260
|
return JSON.stringify((e || []).map((r) => r.value));
|
|
3005
3261
|
}
|
|
3006
|
-
function
|
|
3262
|
+
function rr(e) {
|
|
3007
3263
|
return `${typeof e}:${String(e)}`;
|
|
3008
3264
|
}
|
|
3009
|
-
function
|
|
3010
|
-
const t =
|
|
3265
|
+
function ai(e, r = {}) {
|
|
3266
|
+
const t = v(
|
|
3011
3267
|
() => r.inputs ? {
|
|
3012
3268
|
...e,
|
|
3013
3269
|
inputs: r.inputs
|
|
3014
3270
|
} : e,
|
|
3015
3271
|
[r.inputs, e]
|
|
3016
|
-
), n =
|
|
3272
|
+
), n = v(() => {
|
|
3017
3273
|
switch (t.queryKind) {
|
|
3018
3274
|
case "metric":
|
|
3019
3275
|
return {
|
|
3020
3276
|
queryKind: t.queryKind,
|
|
3021
|
-
request:
|
|
3277
|
+
request: Nn(t)
|
|
3022
3278
|
};
|
|
3023
3279
|
case "analysis":
|
|
3024
3280
|
return {
|
|
3025
3281
|
queryKind: t.queryKind,
|
|
3026
|
-
request:
|
|
3282
|
+
request: Kn(t)
|
|
3027
3283
|
};
|
|
3028
3284
|
case "records":
|
|
3029
3285
|
return {
|
|
3030
3286
|
queryKind: t.queryKind,
|
|
3031
|
-
request:
|
|
3287
|
+
request: $n(t)
|
|
3032
3288
|
};
|
|
3033
3289
|
case "inputOptions":
|
|
3034
3290
|
return {
|
|
3035
3291
|
queryKind: t.queryKind,
|
|
3036
|
-
request:
|
|
3292
|
+
request: Wn(t)
|
|
3037
3293
|
};
|
|
3038
3294
|
case "sql":
|
|
3039
3295
|
return {
|
|
3040
3296
|
queryKind: t.queryKind,
|
|
3041
|
-
request:
|
|
3297
|
+
request: Fn(t)
|
|
3042
3298
|
};
|
|
3043
3299
|
case "matrix":
|
|
3044
3300
|
return {
|
|
3045
3301
|
queryKind: t.queryKind,
|
|
3046
|
-
request:
|
|
3302
|
+
request: _n(t)
|
|
3047
3303
|
};
|
|
3048
3304
|
default:
|
|
3049
|
-
return
|
|
3305
|
+
return Ee(t);
|
|
3050
3306
|
}
|
|
3051
|
-
}, [t]), i =
|
|
3307
|
+
}, [t]), i = Jr({
|
|
3052
3308
|
spec: t,
|
|
3053
3309
|
queryKind: n.queryKind,
|
|
3054
3310
|
queryKey: n.request.queryKey,
|
|
3055
3311
|
intent: n.request.intent,
|
|
3056
3312
|
activeInputs: n.request.activeInputs,
|
|
3057
3313
|
debug: r.debug
|
|
3058
|
-
}),
|
|
3314
|
+
}), a = L(null), l = v(
|
|
3059
3315
|
() => ({
|
|
3060
3316
|
start: i.start,
|
|
3061
3317
|
success: i.success,
|
|
@@ -3068,266 +3324,266 @@ function Gn(e, r = {}) {
|
|
|
3068
3324
|
i.start,
|
|
3069
3325
|
i.success
|
|
3070
3326
|
]
|
|
3071
|
-
), c =
|
|
3072
|
-
(
|
|
3073
|
-
var
|
|
3327
|
+
), c = D(
|
|
3328
|
+
(d) => {
|
|
3329
|
+
var N, C, b, I, k, A, R, w, K;
|
|
3074
3330
|
const x = n.request;
|
|
3075
3331
|
if (x.intent)
|
|
3076
3332
|
switch (n.queryKind) {
|
|
3077
3333
|
case "metric":
|
|
3078
|
-
return (
|
|
3334
|
+
return (N = d.executor) == null ? void 0 : N.executeMetric(
|
|
3079
3335
|
x.intent,
|
|
3080
|
-
|
|
3336
|
+
d
|
|
3081
3337
|
);
|
|
3082
3338
|
case "analysis":
|
|
3083
|
-
return (
|
|
3084
|
-
|
|
3339
|
+
return (b = (C = d.executor) == null ? void 0 : C.executeAnalysis) == null ? void 0 : b.call(
|
|
3340
|
+
C,
|
|
3085
3341
|
x.intent,
|
|
3086
|
-
|
|
3342
|
+
d,
|
|
3087
3343
|
x.analysisOptions
|
|
3088
3344
|
);
|
|
3089
3345
|
case "records":
|
|
3090
|
-
return (I =
|
|
3346
|
+
return (I = d.executor) == null ? void 0 : I.executeRecords(
|
|
3091
3347
|
x.intent,
|
|
3092
|
-
|
|
3348
|
+
d
|
|
3093
3349
|
);
|
|
3094
3350
|
case "inputOptions":
|
|
3095
|
-
return (
|
|
3351
|
+
return (k = d.executor) == null ? void 0 : k.executeInputOptions(
|
|
3096
3352
|
x.intent,
|
|
3097
|
-
|
|
3353
|
+
d
|
|
3098
3354
|
);
|
|
3099
3355
|
case "sql":
|
|
3100
|
-
return (
|
|
3101
|
-
|
|
3356
|
+
return (R = (A = d.executor) == null ? void 0 : A.executeSql) == null ? void 0 : R.call(
|
|
3357
|
+
A,
|
|
3102
3358
|
x.intent,
|
|
3103
|
-
|
|
3359
|
+
d
|
|
3104
3360
|
);
|
|
3105
3361
|
case "matrix":
|
|
3106
|
-
return (K = (w =
|
|
3362
|
+
return (K = (w = d.executor) == null ? void 0 : w.executeMatrix) == null ? void 0 : K.call(
|
|
3107
3363
|
w,
|
|
3108
3364
|
x.intent,
|
|
3109
|
-
|
|
3365
|
+
d
|
|
3110
3366
|
);
|
|
3111
3367
|
default:
|
|
3112
|
-
return
|
|
3368
|
+
return Ee(n);
|
|
3113
3369
|
}
|
|
3114
3370
|
},
|
|
3115
3371
|
[n]
|
|
3116
|
-
),
|
|
3372
|
+
), u = Pn(
|
|
3117
3373
|
n.request.queryKey,
|
|
3118
3374
|
c,
|
|
3119
3375
|
n.request.idleData,
|
|
3120
3376
|
n.request.activeInputs,
|
|
3121
|
-
|
|
3122
|
-
), f = i.queryId,
|
|
3123
|
-
|
|
3124
|
-
const
|
|
3125
|
-
if (!
|
|
3126
|
-
|
|
3377
|
+
l
|
|
3378
|
+
), f = i.queryId, m = i.validationFailure;
|
|
3379
|
+
B(() => {
|
|
3380
|
+
const d = n.request.error;
|
|
3381
|
+
if (!d) {
|
|
3382
|
+
a.current = null;
|
|
3127
3383
|
return;
|
|
3128
3384
|
}
|
|
3129
|
-
const x = `${f}:${
|
|
3130
|
-
|
|
3385
|
+
const x = `${f}:${d.message}`;
|
|
3386
|
+
a.current !== x && (a.current = x, m(d));
|
|
3131
3387
|
}, [
|
|
3132
3388
|
n.request.error,
|
|
3133
3389
|
n.request.queryKey,
|
|
3134
3390
|
f,
|
|
3135
|
-
|
|
3391
|
+
m
|
|
3136
3392
|
]);
|
|
3137
|
-
const y = n.request.error ? n.request.idleData :
|
|
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;
|
|
3138
3394
|
switch (n.queryKind) {
|
|
3139
3395
|
case "metric": {
|
|
3140
|
-
const
|
|
3396
|
+
const d = y;
|
|
3141
3397
|
return {
|
|
3142
3398
|
id: t.id,
|
|
3143
3399
|
intent: n.request.intent,
|
|
3144
|
-
value: (
|
|
3145
|
-
measures:
|
|
3146
|
-
comparisonValue:
|
|
3147
|
-
delta:
|
|
3148
|
-
deltaPercent:
|
|
3149
|
-
records:
|
|
3150
|
-
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,
|
|
3151
3407
|
status: h,
|
|
3152
|
-
isLoading:
|
|
3408
|
+
isLoading: g,
|
|
3153
3409
|
error: S,
|
|
3154
|
-
trace:
|
|
3410
|
+
trace: E
|
|
3155
3411
|
};
|
|
3156
3412
|
}
|
|
3157
3413
|
case "analysis": {
|
|
3158
|
-
const
|
|
3414
|
+
const d = Ir(y);
|
|
3159
3415
|
return {
|
|
3160
3416
|
id: t.id,
|
|
3161
3417
|
intent: n.request.intent,
|
|
3162
|
-
...
|
|
3418
|
+
...d || {},
|
|
3163
3419
|
status: h,
|
|
3164
|
-
isLoading:
|
|
3420
|
+
isLoading: g,
|
|
3165
3421
|
error: S,
|
|
3166
|
-
trace:
|
|
3422
|
+
trace: E
|
|
3167
3423
|
};
|
|
3168
3424
|
}
|
|
3169
3425
|
case "records": {
|
|
3170
|
-
const
|
|
3426
|
+
const d = y;
|
|
3171
3427
|
return {
|
|
3172
3428
|
id: t.id,
|
|
3173
3429
|
intent: n.request.intent,
|
|
3174
|
-
records: (
|
|
3175
|
-
columns:
|
|
3176
|
-
rowCount:
|
|
3177
|
-
pagination:
|
|
3178
|
-
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,
|
|
3179
3435
|
status: h,
|
|
3180
|
-
isLoading:
|
|
3436
|
+
isLoading: g,
|
|
3181
3437
|
error: S,
|
|
3182
|
-
trace:
|
|
3438
|
+
trace: E
|
|
3183
3439
|
};
|
|
3184
3440
|
}
|
|
3185
3441
|
case "inputOptions": {
|
|
3186
|
-
const
|
|
3442
|
+
const d = y;
|
|
3187
3443
|
return {
|
|
3188
3444
|
id: t.id,
|
|
3189
3445
|
intent: n.request.intent,
|
|
3190
|
-
options: (
|
|
3191
|
-
executionResult:
|
|
3446
|
+
options: (d == null ? void 0 : d.options) || [],
|
|
3447
|
+
executionResult: d == null ? void 0 : d.executionResult,
|
|
3192
3448
|
status: h,
|
|
3193
|
-
isLoading:
|
|
3449
|
+
isLoading: g,
|
|
3194
3450
|
error: S,
|
|
3195
|
-
trace:
|
|
3451
|
+
trace: E
|
|
3196
3452
|
};
|
|
3197
3453
|
}
|
|
3198
3454
|
case "sql": {
|
|
3199
|
-
const
|
|
3455
|
+
const d = y;
|
|
3200
3456
|
return {
|
|
3201
3457
|
id: t.id,
|
|
3202
3458
|
intent: n.request.intent,
|
|
3203
|
-
records: (
|
|
3204
|
-
columns:
|
|
3205
|
-
rowCount:
|
|
3206
|
-
pagination:
|
|
3207
|
-
output:
|
|
3208
|
-
rowLimitExceeded:
|
|
3209
|
-
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,
|
|
3210
3466
|
status: h,
|
|
3211
|
-
isLoading:
|
|
3467
|
+
isLoading: g,
|
|
3212
3468
|
error: S,
|
|
3213
|
-
trace:
|
|
3469
|
+
trace: E
|
|
3214
3470
|
};
|
|
3215
3471
|
}
|
|
3216
3472
|
case "matrix": {
|
|
3217
|
-
const
|
|
3473
|
+
const d = y;
|
|
3218
3474
|
return {
|
|
3219
3475
|
id: t.id,
|
|
3220
3476
|
intent: n.request.intent,
|
|
3221
|
-
matrixResult:
|
|
3222
|
-
grid:
|
|
3223
|
-
expansion:
|
|
3224
|
-
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,
|
|
3225
3481
|
status: h,
|
|
3226
|
-
isLoading:
|
|
3482
|
+
isLoading: g,
|
|
3227
3483
|
error: S,
|
|
3228
|
-
trace:
|
|
3484
|
+
trace: E
|
|
3229
3485
|
};
|
|
3230
3486
|
}
|
|
3231
3487
|
default:
|
|
3232
|
-
return
|
|
3488
|
+
return Ee(n);
|
|
3233
3489
|
}
|
|
3234
3490
|
}
|
|
3235
|
-
function
|
|
3236
|
-
const
|
|
3491
|
+
function Pn(e, r, t, n, i) {
|
|
3492
|
+
const a = Dn(), l = L(r), c = L(n), [u, f] = j({
|
|
3237
3493
|
status: "idle",
|
|
3238
3494
|
data: t,
|
|
3239
3495
|
error: null
|
|
3240
3496
|
});
|
|
3241
|
-
return
|
|
3242
|
-
let
|
|
3497
|
+
return l.current = r, c.current = n, B(() => {
|
|
3498
|
+
let m;
|
|
3243
3499
|
try {
|
|
3244
|
-
|
|
3245
|
-
...
|
|
3500
|
+
m = l.current({
|
|
3501
|
+
...a,
|
|
3246
3502
|
activeInputs: c.current
|
|
3247
3503
|
});
|
|
3248
|
-
} catch (
|
|
3249
|
-
i == null || i.failure(
|
|
3504
|
+
} catch (g) {
|
|
3505
|
+
i == null || i.failure(g, 0), f({
|
|
3250
3506
|
status: "error",
|
|
3251
3507
|
data: t,
|
|
3252
|
-
error:
|
|
3508
|
+
error: _(g)
|
|
3253
3509
|
});
|
|
3254
3510
|
return;
|
|
3255
3511
|
}
|
|
3256
|
-
if (!
|
|
3512
|
+
if (!m) {
|
|
3257
3513
|
f({ status: "idle", data: t, error: null });
|
|
3258
3514
|
return;
|
|
3259
3515
|
}
|
|
3260
3516
|
let y = !1;
|
|
3261
|
-
const h =
|
|
3262
|
-
return i == null || i.start(), f((
|
|
3517
|
+
const h = Rr();
|
|
3518
|
+
return i == null || i.start(), f((g) => ({
|
|
3263
3519
|
status: "loading",
|
|
3264
|
-
data:
|
|
3520
|
+
data: g.data,
|
|
3265
3521
|
error: null
|
|
3266
|
-
})),
|
|
3267
|
-
y ? i == null || i.ignored("superseded") : (i == null || i.success(
|
|
3268
|
-
}).catch((
|
|
3269
|
-
y ? i == null || i.ignored("superseded") : (i == null || i.failure(
|
|
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({
|
|
3270
3526
|
status: "error",
|
|
3271
3527
|
data: t,
|
|
3272
|
-
error:
|
|
3528
|
+
error: _(g)
|
|
3273
3529
|
}));
|
|
3274
3530
|
}), () => {
|
|
3275
3531
|
y = !0;
|
|
3276
3532
|
};
|
|
3277
|
-
}, [t, e,
|
|
3533
|
+
}, [t, e, a, i]), u;
|
|
3278
3534
|
}
|
|
3279
|
-
function
|
|
3535
|
+
function Rr() {
|
|
3280
3536
|
return typeof performance < "u" && performance.now ? performance.now() : Date.now();
|
|
3281
3537
|
}
|
|
3282
|
-
function
|
|
3283
|
-
return Math.max(0, Math.round(
|
|
3538
|
+
function tr(e) {
|
|
3539
|
+
return Math.max(0, Math.round(Rr() - e));
|
|
3284
3540
|
}
|
|
3285
|
-
function
|
|
3541
|
+
function Hn(e) {
|
|
3286
3542
|
return Object.fromEntries(
|
|
3287
3543
|
e.filter((r) => r.defaultValue !== void 0).map((r) => [r.id, r.defaultValue])
|
|
3288
3544
|
);
|
|
3289
3545
|
}
|
|
3290
|
-
function
|
|
3546
|
+
function Ee(e) {
|
|
3291
3547
|
throw new Error(`Unsupported Semaphor query kind: ${JSON.stringify(e)}`);
|
|
3292
3548
|
}
|
|
3293
|
-
function
|
|
3549
|
+
function jn(e) {
|
|
3294
3550
|
return !e || typeof e == "boolean" || e.enabled === !1 ? null : e.autoRenderDevtools === !0 ? {} : e.autoRenderDevtools ? e.autoRenderDevtools : null;
|
|
3295
3551
|
}
|
|
3296
|
-
function
|
|
3552
|
+
function di({
|
|
3297
3553
|
token: e,
|
|
3298
3554
|
apiBaseUrl: r,
|
|
3299
3555
|
executor: t,
|
|
3300
3556
|
debug: n,
|
|
3301
3557
|
children: i
|
|
3302
3558
|
}) {
|
|
3303
|
-
var
|
|
3304
|
-
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(
|
|
3305
3561
|
() => ({
|
|
3306
|
-
token:
|
|
3562
|
+
token: l,
|
|
3307
3563
|
apiBaseUrl: c,
|
|
3308
3564
|
executor: y,
|
|
3309
|
-
debug:
|
|
3565
|
+
debug: u
|
|
3310
3566
|
}),
|
|
3311
|
-
[c,
|
|
3567
|
+
[c, u, y, l]
|
|
3312
3568
|
);
|
|
3313
|
-
return /* @__PURE__ */
|
|
3569
|
+
return /* @__PURE__ */ o(Qr, { debug: u, children: /* @__PURE__ */ p(qr.Provider, { value: h, children: [
|
|
3314
3570
|
i,
|
|
3315
|
-
f ? /* @__PURE__ */
|
|
3571
|
+
f ? /* @__PURE__ */ o(Gr, { ...f }) : null
|
|
3316
3572
|
] }) });
|
|
3317
3573
|
}
|
|
3318
3574
|
export {
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
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
|
|
3333
3589
|
};
|