@voltro/devtools 0.80.0 → 0.82.0
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/CHANGELOG.md +1610 -6
- package/dist/index.d.ts +73 -0
- package/dist/index.js +1427 -930
- package/dist/styles.css +17 -0
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Component as e, createContext as t, useCallback as n, useContext as r, useEffect as i, useId as a, useLayoutEffect as o, useMemo as s, useRef as c, useState as l, useSyncExternalStore as u } from "react";
|
|
2
2
|
import { addSink as d } from "@voltro/logger";
|
|
3
|
-
import { getRouteSnapshot as f, getStatuses as p, subscribeConsoleCalls as m, subscribeRouteSnapshot as h, subscribeStatuses as g } from "@voltro/web";
|
|
4
|
-
import { clearStoreHistory as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { createPortal as
|
|
3
|
+
import { getRouteSnapshot as f, getStatuses as p, subscribeConsoleCalls as m, subscribeRouteSnapshot as h, subscribeStatuses as g, useAppUpdate as _, useInstallPrompt as v, useOfflineStatus as y } from "@voltro/web";
|
|
4
|
+
import { clearStoreHistory as b, definedStores as x, getMutations as S, readPairing as C, storeHistory as w, subscribeMutations as T, subscribeStoreHistory as E, travelToStoreState as D, useConnectionStatus as O, useFrameworkRuntimes as k, usePlatform as A, useShellExtension as ee, useWorkflow as j } from "@voltro/client";
|
|
5
|
+
import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
6
|
+
import { createPortal as te } from "react-dom";
|
|
7
7
|
//#region src/consoleBridge.ts
|
|
8
|
-
var
|
|
8
|
+
var ne = (e) => e === "warn" || e === "error", F = (e) => {
|
|
9
9
|
if (typeof e == "string") return e;
|
|
10
10
|
if (e instanceof Error) return `${e.name}: ${e.message}`;
|
|
11
11
|
if (e === void 0) return "undefined";
|
|
@@ -17,7 +17,7 @@ var j = (e) => e === "warn" || e === "error", M = (e) => {
|
|
|
17
17
|
} catch {
|
|
18
18
|
return String(e);
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, I = (e, t, n = /* @__PURE__ */ new Date()) => {
|
|
21
21
|
let r = t.find((e) => e instanceof Error), i = {};
|
|
22
22
|
return t.forEach((e, t) => {
|
|
23
23
|
typeof e != "string" && !(e instanceof Error) && typeof e == "object" && e && (i[`arg${t}`] = e);
|
|
@@ -25,22 +25,22 @@ var j = (e) => e === "warn" || e === "error", M = (e) => {
|
|
|
25
25
|
ts: n,
|
|
26
26
|
level: e,
|
|
27
27
|
scope: `console.${e}`,
|
|
28
|
-
message: t.map(
|
|
28
|
+
message: t.map(F).join(" "),
|
|
29
29
|
fields: i,
|
|
30
30
|
...r === void 0 ? {} : { cause: r }
|
|
31
31
|
};
|
|
32
|
-
},
|
|
32
|
+
}, L = (e, t, n = /* @__PURE__ */ new Date()) => {
|
|
33
33
|
let r = t instanceof Error ? t : void 0;
|
|
34
34
|
return {
|
|
35
35
|
ts: n,
|
|
36
36
|
level: "error",
|
|
37
37
|
scope: e,
|
|
38
|
-
message: t instanceof Error ? `${t.name}: ${t.message}` : `${e === "window.error" ? "Uncaught" : "Unhandled rejection"}: ${
|
|
38
|
+
message: t instanceof Error ? `${t.name}: ${t.message}` : `${e === "window.error" ? "Uncaught" : "Unhandled rejection"}: ${F(t)}`,
|
|
39
39
|
fields: {},
|
|
40
40
|
...r === void 0 ? {} : { cause: r }
|
|
41
41
|
};
|
|
42
|
-
},
|
|
43
|
-
let n = globalThis, r = n[
|
|
42
|
+
}, R = Symbol.for("voltro.devtools.consoleBridge"), re = (e, t = m) => {
|
|
43
|
+
let n = globalThis, r = n[R];
|
|
44
44
|
if (r !== void 0) return r;
|
|
45
45
|
let i = [], a = !1, o = () => {
|
|
46
46
|
a = !1;
|
|
@@ -60,39 +60,39 @@ var j = (e) => e === "warn" || e === "error", M = (e) => {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
}, l = t((e) => {
|
|
63
|
-
if (
|
|
64
|
-
s(
|
|
63
|
+
if (ne(e.level)) try {
|
|
64
|
+
s(I(e.level, e.args, new Date(e.ts)));
|
|
65
65
|
} catch {}
|
|
66
66
|
}), u = (t) => {
|
|
67
|
-
e(
|
|
67
|
+
e(L("window.error", t.error ?? t.message));
|
|
68
68
|
}, d = (t) => {
|
|
69
|
-
e(
|
|
69
|
+
e(L("unhandledrejection", t.reason));
|
|
70
70
|
}, f = typeof window < "u";
|
|
71
71
|
f && (window.addEventListener("error", u), window.addEventListener("unhandledrejection", d));
|
|
72
72
|
let p = {
|
|
73
73
|
noteLoggerRecord: c,
|
|
74
74
|
dispose: () => {
|
|
75
|
-
l(), f && (window.removeEventListener("error", u), window.removeEventListener("unhandledrejection", d)), delete n[
|
|
75
|
+
l(), f && (window.removeEventListener("error", u), window.removeEventListener("unhandledrejection", d)), delete n[R];
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
|
-
return n[
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
for (let e of
|
|
78
|
+
return n[R] = p, p;
|
|
79
|
+
}, z = 500, ie = [], B = /* @__PURE__ */ new Set(), ae = [], oe = () => {
|
|
80
|
+
ae = ie.slice();
|
|
81
|
+
}, se = () => {
|
|
82
|
+
oe();
|
|
83
|
+
for (let e of B) try {
|
|
84
84
|
e();
|
|
85
85
|
} catch {}
|
|
86
|
-
},
|
|
86
|
+
}, ce = typeof window < "u" ? re(le) : null;
|
|
87
87
|
d((e) => {
|
|
88
|
-
|
|
88
|
+
ce?.noteLoggerRecord(e), le(e);
|
|
89
89
|
});
|
|
90
|
-
function
|
|
91
|
-
|
|
90
|
+
function le(e) {
|
|
91
|
+
ie.unshift(e), ie.length > z && (ie.length = z), se();
|
|
92
92
|
}
|
|
93
|
-
var
|
|
94
|
-
|
|
95
|
-
}),
|
|
93
|
+
var ue = () => ae, de = (e) => (B.add(e), () => {
|
|
94
|
+
B.delete(e);
|
|
95
|
+
}), V = (e) => ({ className: t }) => /* @__PURE__ */ N("svg", {
|
|
96
96
|
viewBox: "0 0 24 24",
|
|
97
97
|
fill: "none",
|
|
98
98
|
stroke: "currentColor",
|
|
@@ -102,223 +102,223 @@ var H = () => z, re = (e) => (R.add(e), () => {
|
|
|
102
102
|
className: t ?? "vdt:w-4 vdt:h-4",
|
|
103
103
|
"aria-hidden": "true",
|
|
104
104
|
children: e
|
|
105
|
-
}),
|
|
105
|
+
}), fe = ({ className: e }) => {
|
|
106
106
|
let t = a(), n = `vdtBoltFront-${t}`, r = `vdtBoltBack-${t}`;
|
|
107
|
-
return /* @__PURE__ */
|
|
107
|
+
return /* @__PURE__ */ P("svg", {
|
|
108
108
|
viewBox: "0 0 48 48",
|
|
109
109
|
fill: "none",
|
|
110
110
|
className: e,
|
|
111
111
|
"aria-hidden": "true",
|
|
112
112
|
children: [
|
|
113
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ P("defs", { children: [/* @__PURE__ */ P("linearGradient", {
|
|
114
114
|
id: n,
|
|
115
115
|
x1: "13",
|
|
116
116
|
y1: "5",
|
|
117
117
|
x2: "33",
|
|
118
118
|
y2: "43",
|
|
119
119
|
gradientUnits: "userSpaceOnUse",
|
|
120
|
-
children: [/* @__PURE__ */
|
|
120
|
+
children: [/* @__PURE__ */ N("stop", { stopColor: "#C4A6FF" }), /* @__PURE__ */ N("stop", {
|
|
121
121
|
offset: "1",
|
|
122
122
|
stopColor: "#9D5BFF"
|
|
123
123
|
})]
|
|
124
|
-
}), /* @__PURE__ */
|
|
124
|
+
}), /* @__PURE__ */ P("linearGradient", {
|
|
125
125
|
id: r,
|
|
126
126
|
x1: "22",
|
|
127
127
|
y1: "5",
|
|
128
128
|
x2: "35",
|
|
129
129
|
y2: "43",
|
|
130
130
|
gradientUnits: "userSpaceOnUse",
|
|
131
|
-
children: [/* @__PURE__ */
|
|
131
|
+
children: [/* @__PURE__ */ N("stop", { stopColor: "#9D5BFF" }), /* @__PURE__ */ N("stop", {
|
|
132
132
|
offset: "1",
|
|
133
133
|
stopColor: "#7C3AED"
|
|
134
134
|
})]
|
|
135
135
|
})] }),
|
|
136
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ N("path", {
|
|
137
137
|
d: "M28 5 13 27 22 26 20 43Z",
|
|
138
138
|
fill: `url(#${n})`
|
|
139
139
|
}),
|
|
140
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ N("path", {
|
|
141
141
|
d: "M28 5 20 43 35 21 26 22Z",
|
|
142
142
|
fill: `url(#${r})`
|
|
143
143
|
})
|
|
144
144
|
]
|
|
145
145
|
});
|
|
146
|
-
},
|
|
146
|
+
}, pe = V(/* @__PURE__ */ N("polyline", { points: "6 9 12 15 18 9" })), me = V(/* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("line", {
|
|
147
147
|
x1: "18",
|
|
148
148
|
y1: "6",
|
|
149
149
|
x2: "6",
|
|
150
150
|
y2: "18"
|
|
151
|
-
}), /* @__PURE__ */
|
|
151
|
+
}), /* @__PURE__ */ N("line", {
|
|
152
152
|
x1: "6",
|
|
153
153
|
y1: "6",
|
|
154
154
|
x2: "18",
|
|
155
155
|
y2: "18"
|
|
156
|
-
})] })),
|
|
157
|
-
/* @__PURE__ */
|
|
156
|
+
})] })), he = V(/* @__PURE__ */ N("polyline", { points: "22 12 18 12 15 21 9 3 6 12 2 12" })), ge = V(/* @__PURE__ */ P(M, { children: [
|
|
157
|
+
/* @__PURE__ */ N("ellipse", {
|
|
158
158
|
cx: "12",
|
|
159
159
|
cy: "5",
|
|
160
160
|
rx: "9",
|
|
161
161
|
ry: "3"
|
|
162
162
|
}),
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
-
] })),
|
|
163
|
+
/* @__PURE__ */ N("path", { d: "M3 5 v6 c0 1.66 4 3 9 3 s9 -1.34 9 -3 V5" }),
|
|
164
|
+
/* @__PURE__ */ N("path", { d: "M3 11 v6 c0 1.66 4 3 9 3 s9 -1.34 9 -3 v-6" })
|
|
165
|
+
] })), _e = V(/* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("circle", {
|
|
166
166
|
cx: "12",
|
|
167
167
|
cy: "12",
|
|
168
168
|
r: "10"
|
|
169
|
-
}), /* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
] })),
|
|
175
|
-
/* @__PURE__ */
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
] })),
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
] })),
|
|
184
|
-
/* @__PURE__ */
|
|
169
|
+
}), /* @__PURE__ */ N("polygon", { points: "16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76" })] })), ve = V(/* @__PURE__ */ P(M, { children: [
|
|
170
|
+
/* @__PURE__ */ N("path", { d: "M12 22 v-5" }),
|
|
171
|
+
/* @__PURE__ */ N("path", { d: "M9 8 V2" }),
|
|
172
|
+
/* @__PURE__ */ N("path", { d: "M15 8 V2" }),
|
|
173
|
+
/* @__PURE__ */ N("path", { d: "M18 8 v4 a6 6 0 0 1 -12 0 V8 z" })
|
|
174
|
+
] })), ye = V(/* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("polyline", { points: "17 11 12 6 7 11" }), /* @__PURE__ */ N("polyline", { points: "17 17 12 22 7 17" })] })), be = V(/* @__PURE__ */ P(M, { children: [
|
|
175
|
+
/* @__PURE__ */ N("polyline", { points: "3 6 5 6 21 6" }),
|
|
176
|
+
/* @__PURE__ */ N("path", { d: "M19 6 l-1 14 c-.05 1.1 -.96 2 -2 2 H8 c-1.04 0 -1.95 -.9 -2 -2 L5 6" }),
|
|
177
|
+
/* @__PURE__ */ N("path", { d: "M10 11 v6" }),
|
|
178
|
+
/* @__PURE__ */ N("path", { d: "M14 11 v6" })
|
|
179
|
+
] })), xe = V(/* @__PURE__ */ P(M, { children: [
|
|
180
|
+
/* @__PURE__ */ N("path", { d: "M18 16.98 h-5.99 c-1.1 0 -1.95 .94 -2.48 1.9 A4 4 0 0 1 2 17 c0 -1.42 .76 -2.66 1.9 -3.34" }),
|
|
181
|
+
/* @__PURE__ */ N("path", { d: "M6 17 l3.13 -5.78 c.53 -.97 .43 -2.22 -.26 -3.07 A4 4 0 1 1 17 7" }),
|
|
182
|
+
/* @__PURE__ */ N("path", { d: "M16 6.78 a4 4 0 1 1 5 6.31 c-.84 .6 -1.36 1.59 -1.36 2.61" })
|
|
183
|
+
] })), Se = V(/* @__PURE__ */ P(M, { children: [
|
|
184
|
+
/* @__PURE__ */ N("rect", {
|
|
185
185
|
x: "3",
|
|
186
186
|
y: "3",
|
|
187
187
|
width: "6",
|
|
188
188
|
height: "6",
|
|
189
189
|
rx: "1"
|
|
190
190
|
}),
|
|
191
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ N("rect", {
|
|
192
192
|
x: "15",
|
|
193
193
|
y: "15",
|
|
194
194
|
width: "6",
|
|
195
195
|
height: "6",
|
|
196
196
|
rx: "1"
|
|
197
197
|
}),
|
|
198
|
-
/* @__PURE__ */
|
|
199
|
-
/* @__PURE__ */
|
|
200
|
-
] })),
|
|
201
|
-
/* @__PURE__ */
|
|
198
|
+
/* @__PURE__ */ N("path", { d: "M9 6h3a3 3 0 0 1 3 3v3" }),
|
|
199
|
+
/* @__PURE__ */ N("path", { d: "M15 18h-3a3 3 0 0 1-3-3v-3" })
|
|
200
|
+
] })), Ce = V(/* @__PURE__ */ P(M, { children: [
|
|
201
|
+
/* @__PURE__ */ N("line", {
|
|
202
202
|
x1: "6",
|
|
203
203
|
y1: "3",
|
|
204
204
|
x2: "6",
|
|
205
205
|
y2: "15"
|
|
206
206
|
}),
|
|
207
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ N("circle", {
|
|
208
208
|
cx: "18",
|
|
209
209
|
cy: "6",
|
|
210
210
|
r: "3"
|
|
211
211
|
}),
|
|
212
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ N("circle", {
|
|
213
213
|
cx: "6",
|
|
214
214
|
cy: "18",
|
|
215
215
|
r: "3"
|
|
216
216
|
}),
|
|
217
|
-
/* @__PURE__ */
|
|
218
|
-
] })),
|
|
217
|
+
/* @__PURE__ */ N("path", { d: "M18 9 a9 9 0 0 1 -9 9" })
|
|
218
|
+
] })), we = V(/* @__PURE__ */ N("path", { d: "m13 2-9 12h7l-1 8 10-12h-7l1-8z" })), Te = V(/* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("circle", {
|
|
219
219
|
cx: "11",
|
|
220
220
|
cy: "11",
|
|
221
221
|
r: "7"
|
|
222
|
-
}), /* @__PURE__ */
|
|
223
|
-
/* @__PURE__ */
|
|
224
|
-
/* @__PURE__ */
|
|
222
|
+
}), /* @__PURE__ */ N("path", { d: "m20 20-3.5-3.5" })] })), Ee = V(/* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("path", { d: "M4 12h12M12 6l6 6-6 6" }), /* @__PURE__ */ N("path", { d: "M4 4v16" })] })), De = V(/* @__PURE__ */ P(M, { children: [
|
|
223
|
+
/* @__PURE__ */ N("path", { d: "M4 6h16M4 12h10M4 18h6" }),
|
|
224
|
+
/* @__PURE__ */ N("circle", {
|
|
225
225
|
cx: "18",
|
|
226
226
|
cy: "17",
|
|
227
227
|
r: "3"
|
|
228
228
|
}),
|
|
229
|
-
/* @__PURE__ */
|
|
230
|
-
] })),
|
|
229
|
+
/* @__PURE__ */ N("path", { d: "m20.5 19.5 2 2" })
|
|
230
|
+
] })), Oe = V(/* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("path", { d: "M5 4h14v16H5z" }), /* @__PURE__ */ N("path", { d: "M8 8h8M8 12h8M8 16h5" })] })), ke = V(/* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("rect", {
|
|
231
231
|
x: "3",
|
|
232
232
|
y: "4",
|
|
233
233
|
width: "18",
|
|
234
234
|
height: "12",
|
|
235
235
|
rx: "2"
|
|
236
|
-
}), /* @__PURE__ */
|
|
236
|
+
}), /* @__PURE__ */ N("path", { d: "M8 20h8M12 16v4" })] })), Ae = V(/* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("rect", {
|
|
237
237
|
x: "3",
|
|
238
238
|
y: "4",
|
|
239
239
|
width: "18",
|
|
240
240
|
height: "16",
|
|
241
241
|
rx: "2"
|
|
242
|
-
}), /* @__PURE__ */
|
|
242
|
+
}), /* @__PURE__ */ N("path", { d: "M3 14h18" })] })), je = V(/* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("rect", {
|
|
243
243
|
x: "3",
|
|
244
244
|
y: "4",
|
|
245
245
|
width: "18",
|
|
246
246
|
height: "16",
|
|
247
247
|
rx: "2"
|
|
248
|
-
}), /* @__PURE__ */
|
|
248
|
+
}), /* @__PURE__ */ N("path", { d: "M3 10h18" })] })), Me = V(/* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("rect", {
|
|
249
249
|
x: "3",
|
|
250
250
|
y: "4",
|
|
251
251
|
width: "18",
|
|
252
252
|
height: "16",
|
|
253
253
|
rx: "2"
|
|
254
|
-
}), /* @__PURE__ */
|
|
254
|
+
}), /* @__PURE__ */ N("path", { d: "M9 4v16" })] })), Ne = V(/* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("rect", {
|
|
255
255
|
x: "3",
|
|
256
256
|
y: "4",
|
|
257
257
|
width: "18",
|
|
258
258
|
height: "16",
|
|
259
259
|
rx: "2"
|
|
260
|
-
}), /* @__PURE__ */
|
|
260
|
+
}), /* @__PURE__ */ N("path", { d: "M15 4v16" })] })), Pe = V(/* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("rect", {
|
|
261
261
|
x: "7",
|
|
262
262
|
y: "8",
|
|
263
263
|
width: "14",
|
|
264
264
|
height: "12",
|
|
265
265
|
rx: "2"
|
|
266
|
-
}), /* @__PURE__ */
|
|
267
|
-
/* @__PURE__ */
|
|
266
|
+
}), /* @__PURE__ */ N("path", { d: "M3 14V6a2 2 0 0 1 2-2h8" })] })), Fe = V(/* @__PURE__ */ P(M, { children: [
|
|
267
|
+
/* @__PURE__ */ N("circle", {
|
|
268
268
|
cx: "9",
|
|
269
269
|
cy: "6",
|
|
270
270
|
r: "1",
|
|
271
271
|
fill: "currentColor"
|
|
272
272
|
}),
|
|
273
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ N("circle", {
|
|
274
274
|
cx: "15",
|
|
275
275
|
cy: "6",
|
|
276
276
|
r: "1",
|
|
277
277
|
fill: "currentColor"
|
|
278
278
|
}),
|
|
279
|
-
/* @__PURE__ */
|
|
279
|
+
/* @__PURE__ */ N("circle", {
|
|
280
280
|
cx: "9",
|
|
281
281
|
cy: "12",
|
|
282
282
|
r: "1",
|
|
283
283
|
fill: "currentColor"
|
|
284
284
|
}),
|
|
285
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ N("circle", {
|
|
286
286
|
cx: "15",
|
|
287
287
|
cy: "12",
|
|
288
288
|
r: "1",
|
|
289
289
|
fill: "currentColor"
|
|
290
290
|
}),
|
|
291
|
-
/* @__PURE__ */
|
|
291
|
+
/* @__PURE__ */ N("circle", {
|
|
292
292
|
cx: "9",
|
|
293
293
|
cy: "18",
|
|
294
294
|
r: "1",
|
|
295
295
|
fill: "currentColor"
|
|
296
296
|
}),
|
|
297
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ N("circle", {
|
|
298
298
|
cx: "15",
|
|
299
299
|
cy: "18",
|
|
300
300
|
r: "1",
|
|
301
301
|
fill: "currentColor"
|
|
302
302
|
})
|
|
303
|
-
] })),
|
|
303
|
+
] })), Ie = ({ className: e }) => /* @__PURE__ */ P("svg", {
|
|
304
304
|
viewBox: "0 0 24 24",
|
|
305
305
|
fill: "none",
|
|
306
306
|
className: e,
|
|
307
307
|
"aria-hidden": "true",
|
|
308
|
-
children: [/* @__PURE__ */
|
|
308
|
+
children: [/* @__PURE__ */ N("circle", {
|
|
309
309
|
cx: "12",
|
|
310
310
|
cy: "12",
|
|
311
311
|
r: "9",
|
|
312
312
|
stroke: "currentColor",
|
|
313
313
|
strokeOpacity: "0.2",
|
|
314
314
|
strokeWidth: "2.5"
|
|
315
|
-
}), /* @__PURE__ */
|
|
315
|
+
}), /* @__PURE__ */ N("path", {
|
|
316
316
|
d: "M21 12 a9 9 0 0 0 -9 -9",
|
|
317
317
|
stroke: "currentColor",
|
|
318
318
|
strokeWidth: "2.5",
|
|
319
319
|
strokeLinecap: "round"
|
|
320
320
|
})]
|
|
321
|
-
}),
|
|
321
|
+
}), Le = {
|
|
322
322
|
shell: {
|
|
323
323
|
brand: "Voltro Devtools",
|
|
324
324
|
brandWord: "Voltro",
|
|
@@ -375,6 +375,16 @@ var H = () => z, re = (e) => (R.add(e), () => {
|
|
|
375
375
|
crashTitle: "The devtools overlay hit an error. The page is unaffected.",
|
|
376
376
|
crashReset: "Reset overlay"
|
|
377
377
|
},
|
|
378
|
+
inspect: {
|
|
379
|
+
refusedTitle: (e, t) => `The inspect surface of \`${e}\` refused the devtools (HTTP ${t}).`,
|
|
380
|
+
unreachableTitle: (e) => `The inspect surface of \`${e}\` could not be read.`,
|
|
381
|
+
unreachableHint: "The browser gave no status. An api on another origin looks exactly like this when it refuses the request — the browser hides the reason. Read it through the web server instead: drop `apis.<name>.url` and point `VOLTRO_API_ORIGIN_<NAME>` at the api, so the overlay fetches `/_voltro/api/<name>` on this origin.",
|
|
382
|
+
fixLabel: "Fix:",
|
|
383
|
+
paused: "Inspect reads for this api are paused until you reopen the console.",
|
|
384
|
+
tokenLabel: "Devtools token (VOLTRO_DASHBOARD_TOKEN)",
|
|
385
|
+
signIn: "Sign in",
|
|
386
|
+
signInFailed: (e) => `Sign-in refused: ${e}`
|
|
387
|
+
},
|
|
378
388
|
tabs: {
|
|
379
389
|
subscriptions: "Subs",
|
|
380
390
|
mutations: "Mutations",
|
|
@@ -386,7 +396,61 @@ var H = () => z, re = (e) => (R.add(e), () => {
|
|
|
386
396
|
routes: "Routes",
|
|
387
397
|
runtimes: "Runtimes",
|
|
388
398
|
logs: "Logs",
|
|
389
|
-
workflows: "Workflows"
|
|
399
|
+
workflows: "Workflows",
|
|
400
|
+
pwa: "PWA",
|
|
401
|
+
desktop: "Desktop"
|
|
402
|
+
},
|
|
403
|
+
pwa: {
|
|
404
|
+
loading: "Reading the worker…",
|
|
405
|
+
unsupported: "No service worker support in this browser — the PWA surface is off here.",
|
|
406
|
+
refresh: "Refresh",
|
|
407
|
+
worker: "Service worker",
|
|
408
|
+
scope: "scope",
|
|
409
|
+
script: "script",
|
|
410
|
+
backgroundSync: "background sync",
|
|
411
|
+
update: "Update",
|
|
412
|
+
checkNow: "Check now",
|
|
413
|
+
forceUpdate: "Force update",
|
|
414
|
+
currentBuild: "current build",
|
|
415
|
+
waitingBuild: "waiting build",
|
|
416
|
+
online: "online",
|
|
417
|
+
precache: "Caches",
|
|
418
|
+
noCaches: "No voltro-* cache yet — the worker precaches at install.",
|
|
419
|
+
entries: (e) => e === 1 ? "1 entry" : `${e} entries`,
|
|
420
|
+
installAndPush: "Install + push",
|
|
421
|
+
install: "Install",
|
|
422
|
+
installed: "installed",
|
|
423
|
+
installPrompt: "install prompt",
|
|
424
|
+
pushPermission: "push permission",
|
|
425
|
+
pushSubscription: "push subscription",
|
|
426
|
+
yes: "yes",
|
|
427
|
+
no: "no",
|
|
428
|
+
none: "—",
|
|
429
|
+
unknown: "?"
|
|
430
|
+
},
|
|
431
|
+
desktop: {
|
|
432
|
+
notDesktop: "Not a desktop shell — this is a browser tab; the desktop surface is off here.",
|
|
433
|
+
refresh: "Refresh",
|
|
434
|
+
shell: "Shell",
|
|
435
|
+
kind: "kind",
|
|
436
|
+
os: "os",
|
|
437
|
+
theme: "theme",
|
|
438
|
+
window: "window",
|
|
439
|
+
appVersion: "app version",
|
|
440
|
+
updater: "Updater",
|
|
441
|
+
updaterPort: "update channel",
|
|
442
|
+
checkNow: "Check now",
|
|
443
|
+
waitingVersion: "available version",
|
|
444
|
+
localStack: "Local Stack",
|
|
445
|
+
sidecarPort: "sidecar port",
|
|
446
|
+
apiUrl: "api url",
|
|
447
|
+
apiName: "api name",
|
|
448
|
+
capabilities: "Capabilities",
|
|
449
|
+
noCapabilities: "No capability reports true — the adapter fills in what the shell has.",
|
|
450
|
+
yes: "yes",
|
|
451
|
+
no: "no",
|
|
452
|
+
none: "—",
|
|
453
|
+
unknown: "?"
|
|
390
454
|
},
|
|
391
455
|
workflows: {
|
|
392
456
|
noApi: "No api processes connected — workflows discover from `*.workflow.tsx`.",
|
|
@@ -475,7 +539,7 @@ var H = () => z, re = (e) => (R.add(e), () => {
|
|
|
475
539
|
collapse: "collapse",
|
|
476
540
|
expand: "expand",
|
|
477
541
|
noLoaderTitle: "No loader data for this route.",
|
|
478
|
-
noLoaderHint: (e) => /* @__PURE__ */
|
|
542
|
+
noLoaderHint: (e) => /* @__PURE__ */ P(M, { children: [
|
|
479
543
|
"Pages with an exported `loader` see their resolved data here. UI-only apps (no ",
|
|
480
544
|
e,
|
|
481
545
|
") don't surface loader state at all."
|
|
@@ -497,7 +561,7 @@ var H = () => z, re = (e) => (R.add(e), () => {
|
|
|
497
561
|
noApi: "No API connected. Traces appear once a `useMutation` / `useSubscription` call runs.",
|
|
498
562
|
noneCaptured: (e) => `${e} — no traces captured yet. Trigger an action.`,
|
|
499
563
|
proxiedTitle: "Traces aren't fetchable from this browser — the API is reached over a proxied socket, so there's no direct inspect origin for this panel.",
|
|
500
|
-
proxiedHint: (e) => /* @__PURE__ */
|
|
564
|
+
proxiedHint: (e) => /* @__PURE__ */ P(M, { children: [
|
|
501
565
|
"They're still recorded server-side. Use ",
|
|
502
566
|
e,
|
|
503
567
|
" or open the app's",
|
|
@@ -510,11 +574,15 @@ var H = () => z, re = (e) => (R.add(e), () => {
|
|
|
510
574
|
delivery: (e) => e === 1 ? "delivery" : "deliveries",
|
|
511
575
|
spans: (e) => `${e} ${e === 1 ? "span" : "spans"}`
|
|
512
576
|
}
|
|
513
|
-
},
|
|
577
|
+
}, Re = t(Le), ze = (e, t) => ({
|
|
514
578
|
shell: {
|
|
515
579
|
...e.shell,
|
|
516
580
|
...t.shell
|
|
517
581
|
},
|
|
582
|
+
inspect: {
|
|
583
|
+
...e.inspect,
|
|
584
|
+
...t.inspect
|
|
585
|
+
},
|
|
518
586
|
tabs: {
|
|
519
587
|
...e.tabs,
|
|
520
588
|
...t.tabs
|
|
@@ -554,111 +622,134 @@ var H = () => z, re = (e) => (R.add(e), () => {
|
|
|
554
622
|
workflows: {
|
|
555
623
|
...e.workflows,
|
|
556
624
|
...t.workflows
|
|
625
|
+
},
|
|
626
|
+
pwa: {
|
|
627
|
+
...e.pwa,
|
|
628
|
+
...t.pwa
|
|
629
|
+
},
|
|
630
|
+
desktop: {
|
|
631
|
+
...e.desktop,
|
|
632
|
+
...t.desktop
|
|
557
633
|
}
|
|
558
634
|
});
|
|
559
|
-
function
|
|
560
|
-
let t = r(
|
|
561
|
-
return /* @__PURE__ */
|
|
635
|
+
function Be(e) {
|
|
636
|
+
let t = r(Re), n = s(() => ze(t, e.strings), [t, e.strings]);
|
|
637
|
+
return /* @__PURE__ */ N(Re.Provider, {
|
|
562
638
|
value: n,
|
|
563
639
|
children: e.children
|
|
564
640
|
});
|
|
565
641
|
}
|
|
566
|
-
var
|
|
567
|
-
let t = r(
|
|
568
|
-
return s(() => e ?
|
|
569
|
-
},
|
|
642
|
+
var H = (e) => {
|
|
643
|
+
let t = r(Re);
|
|
644
|
+
return s(() => e ? ze(t, e) : t, [t, e]);
|
|
645
|
+
}, Ve = {
|
|
570
646
|
default: "vdt:bg-muted vdt:text-foreground vdt:hover:bg-muted/80",
|
|
571
647
|
ghost: "vdt:bg-transparent vdt:text-foreground vdt:hover:bg-muted/50",
|
|
572
648
|
outline: "vdt:bg-transparent vdt:text-foreground vdt:border vdt:border-border vdt:hover:border-border-strong",
|
|
573
649
|
accent: "vdt:bg-accent vdt:text-accent-foreground vdt:hover:bg-accent-dim",
|
|
574
650
|
danger: "vdt:bg-danger/15 vdt:text-danger vdt:hover:bg-danger/25"
|
|
575
|
-
},
|
|
651
|
+
}, He = {
|
|
576
652
|
sm: "vdt:text-xs vdt:px-2 vdt:py-1 vdt:rounded-sm",
|
|
577
653
|
md: "vdt:text-sm vdt:px-3 vdt:py-1.5 vdt:rounded-md"
|
|
578
|
-
},
|
|
654
|
+
}, U = ({ variant: e = "default", size: t = "md", onClick: n, disabled: r, children: i, className: a, title: o }) => /* @__PURE__ */ N("button", {
|
|
579
655
|
onClick: n,
|
|
580
656
|
disabled: r,
|
|
581
657
|
title: o,
|
|
582
658
|
className: [
|
|
583
659
|
"vdt:inline-flex vdt:items-center vdt:gap-1.5 vdt:font-medium vdt:transition-colors",
|
|
584
660
|
"vdt:disabled:opacity-40 vdt:disabled:cursor-not-allowed",
|
|
585
|
-
|
|
586
|
-
|
|
661
|
+
Ve[e],
|
|
662
|
+
He[t],
|
|
587
663
|
a ?? ""
|
|
588
664
|
].join(" "),
|
|
589
665
|
children: i
|
|
590
|
-
}),
|
|
666
|
+
}), Ue = {
|
|
591
667
|
neutral: "vdt:bg-muted vdt:text-foreground-muted vdt:border vdt:border-border",
|
|
592
668
|
success: "vdt:bg-success/15 vdt:text-success vdt:border vdt:border-success/30",
|
|
593
669
|
warning: "vdt:bg-warning/15 vdt:text-warning vdt:border vdt:border-warning/30",
|
|
594
670
|
danger: "vdt:bg-danger/15 vdt:text-danger vdt:border vdt:border-danger/30",
|
|
595
671
|
info: "vdt:bg-info/15 vdt:text-info vdt:border vdt:border-info/30",
|
|
596
672
|
accent: "vdt:bg-accent/15 vdt:text-accent vdt:border vdt:border-accent/30"
|
|
597
|
-
},
|
|
673
|
+
}, W = ({ tone: e = "neutral", children: t, className: n }) => /* @__PURE__ */ N("span", {
|
|
598
674
|
className: [
|
|
599
675
|
"vdt:inline-flex vdt:items-center vdt:gap-1 vdt:px-1.5 vdt:py-0.5",
|
|
600
676
|
"vdt:rounded-sm vdt:text-[10px] vdt:font-medium vdt:uppercase vdt:tracking-wider",
|
|
601
|
-
|
|
677
|
+
Ue[e],
|
|
602
678
|
n ?? ""
|
|
603
679
|
].join(" "),
|
|
604
680
|
children: t
|
|
605
|
-
}),
|
|
681
|
+
}), G = ({ children: e, className: t }) => /* @__PURE__ */ N("div", {
|
|
606
682
|
className: ["vdt:bg-background-elevated vdt:border vdt:border-border vdt:rounded-md", t ?? ""].join(" "),
|
|
607
683
|
children: e
|
|
608
|
-
}),
|
|
684
|
+
}), We = ({ children: e, className: t }) => /* @__PURE__ */ N("div", {
|
|
609
685
|
className: ["vdt-card-body", t ?? ""].join(" "),
|
|
610
686
|
children: e
|
|
611
|
-
}),
|
|
687
|
+
}), K = ({ children: e, right: t, Icon: n }) => /* @__PURE__ */ P("div", {
|
|
612
688
|
className: "vdt:flex vdt:items-center vdt:justify-between vdt:px-3 vdt:py-2 vdt:border-b vdt:border-border",
|
|
613
|
-
children: [/* @__PURE__ */
|
|
689
|
+
children: [/* @__PURE__ */ P("div", {
|
|
614
690
|
className: "vdt:flex vdt:items-center vdt:gap-1.5",
|
|
615
|
-
children: [n ? /* @__PURE__ */
|
|
691
|
+
children: [n ? /* @__PURE__ */ N(n, { className: "vdt:w-3 vdt:h-3 vdt:text-foreground-muted" }) : null, /* @__PURE__ */ N("span", {
|
|
616
692
|
className: "vdt:text-[10px] vdt:font-semibold vdt:uppercase vdt:tracking-wider vdt:text-foreground-muted",
|
|
617
693
|
children: e
|
|
618
694
|
})]
|
|
619
695
|
}), t ?? null]
|
|
620
|
-
}),
|
|
696
|
+
}), q = ({ entries: e }) => /* @__PURE__ */ N("dl", {
|
|
621
697
|
className: "vdt:grid vdt:grid-cols-[auto_1fr] vdt:gap-x-3 vdt:gap-y-1 vdt:px-3 vdt:py-2 vdt:text-xs",
|
|
622
|
-
children: e.map((e) => /* @__PURE__ */
|
|
698
|
+
children: e.map((e) => /* @__PURE__ */ P("div", {
|
|
623
699
|
className: "vdt:contents",
|
|
624
|
-
children: [/* @__PURE__ */
|
|
700
|
+
children: [/* @__PURE__ */ N("dt", {
|
|
625
701
|
className: "vdt:text-foreground-muted vdt:font-medium",
|
|
626
702
|
children: e.key
|
|
627
|
-
}), /* @__PURE__ */
|
|
703
|
+
}), /* @__PURE__ */ N("dd", {
|
|
628
704
|
className: "vdt:font-mono vdt:text-foreground vdt:break-all",
|
|
629
705
|
children: e.value
|
|
630
706
|
})]
|
|
631
707
|
}, e.key))
|
|
632
|
-
}),
|
|
708
|
+
}), J = ({ children: e }) => /* @__PURE__ */ N("div", {
|
|
633
709
|
className: "vdt:flex vdt:items-center vdt:justify-center vdt:py-12 vdt:px-6 vdt:text-center",
|
|
634
|
-
children: /* @__PURE__ */
|
|
710
|
+
children: /* @__PURE__ */ N("div", {
|
|
635
711
|
className: "vdt:text-xs vdt:text-foreground-subtle vdt:max-w-xs",
|
|
636
712
|
children: e
|
|
637
713
|
})
|
|
638
|
-
}),
|
|
714
|
+
}), Ge = 500, Ke = (e) => {
|
|
639
715
|
let t = "";
|
|
640
|
-
for (let n of e) t += `${n.key}|${n.subscriberCount}|${n.snapshot.revision}|${n.snapshot.pendingPatches}|${n.snapshot.error ? "
|
|
716
|
+
for (let n of e) t += `${n.key}|${n.subscriberCount}|${n.snapshot.revision}|${n.snapshot.pendingPatches}|${n.snapshot.error === void 0 ? "0" : "1"}|${n.hasFiber ? "1" : "0"}|${n.evicting ? "1" : "0"};`;
|
|
641
717
|
return t;
|
|
642
|
-
},
|
|
643
|
-
let [t, n] = l(() => e ? e.peekAll() : []), r = c(
|
|
718
|
+
}, qe = (e) => {
|
|
719
|
+
let [t, n] = l(() => e ? e.peekAll() : []), r = c(Ke(t));
|
|
644
720
|
return i(() => {
|
|
645
721
|
if (!e) return;
|
|
646
722
|
let t = () => {
|
|
647
|
-
let t = e.peekAll(), i =
|
|
723
|
+
let t = e.peekAll(), i = Ke(t);
|
|
648
724
|
i !== r.current && (r.current = i, n(t));
|
|
649
|
-
}, i = setInterval(t,
|
|
725
|
+
}, i = setInterval(t, Ge);
|
|
650
726
|
return t(), () => clearInterval(i);
|
|
651
727
|
}, [e]), t;
|
|
652
|
-
},
|
|
653
|
-
let e =
|
|
728
|
+
}, Je = () => {
|
|
729
|
+
let e = k();
|
|
654
730
|
return e.names.map((t) => ({
|
|
655
731
|
name: t,
|
|
656
732
|
entries: e.get(t).cache.peekAll()
|
|
657
733
|
}));
|
|
658
|
-
},
|
|
659
|
-
let e =
|
|
660
|
-
return
|
|
661
|
-
},
|
|
734
|
+
}, Ye = () => {
|
|
735
|
+
let e = k();
|
|
736
|
+
return qe((e.names[0] ? e.get(e.names[0]) : null)?.cache ?? null), Je();
|
|
737
|
+
}, Xe = (e) => {
|
|
738
|
+
if (e instanceof Error) {
|
|
739
|
+
let t = e._tag;
|
|
740
|
+
return `${typeof t == "string" ? t : e.name}: ${e.message}`;
|
|
741
|
+
}
|
|
742
|
+
if (typeof e == "object" && e) {
|
|
743
|
+
let { _tag: t, message: n } = e;
|
|
744
|
+
if (typeof t == "string") return typeof n == "string" && n !== "" ? `${t}: ${n}` : t;
|
|
745
|
+
try {
|
|
746
|
+
return JSON.stringify(e);
|
|
747
|
+
} catch {
|
|
748
|
+
return String(e);
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
return String(e);
|
|
752
|
+
}, Ze = (e) => {
|
|
662
753
|
try {
|
|
663
754
|
let t = JSON.parse(e);
|
|
664
755
|
if (Array.isArray(t)) {
|
|
@@ -667,9 +758,9 @@ var W = (e) => {
|
|
|
667
758
|
}
|
|
668
759
|
} catch {}
|
|
669
760
|
return e;
|
|
670
|
-
},
|
|
761
|
+
}, Qe = ({ entry: e }) => /* @__PURE__ */ P("div", {
|
|
671
762
|
className: "vdt:bg-background/60",
|
|
672
|
-
children: [/* @__PURE__ */
|
|
763
|
+
children: [/* @__PURE__ */ N(q, { entries: [
|
|
673
764
|
{
|
|
674
765
|
key: "tag",
|
|
675
766
|
value: e.tag ?? "—"
|
|
@@ -724,14 +815,14 @@ var W = (e) => {
|
|
|
724
815
|
},
|
|
725
816
|
{
|
|
726
817
|
key: "error",
|
|
727
|
-
value: e.snapshot.error ?
|
|
818
|
+
value: e.snapshot.error === void 0 ? "—" : Xe(e.snapshot.error)
|
|
728
819
|
}
|
|
729
|
-
] }), /* @__PURE__ */
|
|
820
|
+
] }), /* @__PURE__ */ P("details", {
|
|
730
821
|
className: "vdt:px-3 vdt:py-2 vdt:border-t vdt:border-border",
|
|
731
|
-
children: [/* @__PURE__ */
|
|
822
|
+
children: [/* @__PURE__ */ N("summary", {
|
|
732
823
|
className: "vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:text-foreground-muted vdt:cursor-pointer",
|
|
733
824
|
children: "Data"
|
|
734
|
-
}), /* @__PURE__ */
|
|
825
|
+
}), /* @__PURE__ */ N("pre", {
|
|
735
826
|
className: "vdt:mt-2 vdt:text-[11px] vdt:text-foreground vdt:max-h-64 vdt:overflow-auto vdt:font-mono",
|
|
736
827
|
children: (() => {
|
|
737
828
|
try {
|
|
@@ -742,17 +833,17 @@ var W = (e) => {
|
|
|
742
833
|
})()
|
|
743
834
|
})]
|
|
744
835
|
})]
|
|
745
|
-
}),
|
|
746
|
-
let t =
|
|
747
|
-
return /* @__PURE__ */
|
|
836
|
+
}), $e = () => Ye().reduce((e, t) => e + t.entries.length, 0), et = (e) => e === "compiling" || e === "loading" || e === "reconnecting", tt = () => u(de, ue, ue), nt = ({ name: e }) => {
|
|
837
|
+
let t = O(e).status;
|
|
838
|
+
return /* @__PURE__ */ P("span", {
|
|
748
839
|
className: "vdt-chip",
|
|
749
840
|
"data-status": t,
|
|
750
|
-
children: [/* @__PURE__ */
|
|
841
|
+
children: [/* @__PURE__ */ N("span", {
|
|
751
842
|
className: `vdt-dot vdt-dot-${t === "connected" ? "ok" : t === "recovering" ? "warn" : "err"}`,
|
|
752
843
|
"aria-hidden": "true"
|
|
753
|
-
}), /* @__PURE__ */
|
|
844
|
+
}), /* @__PURE__ */ N("b", { children: e })]
|
|
754
845
|
});
|
|
755
|
-
},
|
|
846
|
+
}, rt = 260, it = "cubic-bezier(0.2, 0.8, 0.2, 1)", at = () => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, ot = (e, t) => {
|
|
756
847
|
let r = c(null), a = c(null), s = c(null), l = c(e), u = n((e) => {
|
|
757
848
|
r.current = e, t && (t.current = e);
|
|
758
849
|
}, [t]);
|
|
@@ -768,15 +859,15 @@ var W = (e) => {
|
|
|
768
859
|
if (l.current === e) return;
|
|
769
860
|
l.current = e;
|
|
770
861
|
let t = r.current;
|
|
771
|
-
if (t === null || typeof t.animate != "function" ||
|
|
862
|
+
if (t === null || typeof t.animate != "function" || at()) return;
|
|
772
863
|
let n = s.current === null ? a.current : t.offsetWidth;
|
|
773
864
|
s.current?.cancel(), s.current = null;
|
|
774
865
|
let i = t.offsetWidth;
|
|
775
866
|
if (n === null || n === i) return;
|
|
776
867
|
t.setAttribute("data-morphing", "true");
|
|
777
868
|
let o = t.animate([{ width: `${n}px` }, { width: `${i}px` }], {
|
|
778
|
-
duration:
|
|
779
|
-
easing:
|
|
869
|
+
duration: rt,
|
|
870
|
+
easing: it
|
|
780
871
|
});
|
|
781
872
|
s.current = o;
|
|
782
873
|
let c = () => {
|
|
@@ -784,9 +875,9 @@ var W = (e) => {
|
|
|
784
875
|
};
|
|
785
876
|
o.addEventListener("finish", c), o.addEventListener("cancel", c);
|
|
786
877
|
}, [e]), u;
|
|
787
|
-
},
|
|
788
|
-
let r =
|
|
789
|
-
return /* @__PURE__ */
|
|
878
|
+
}, st = ({ status: e, onOpen: t, buttonRef: n }) => {
|
|
879
|
+
let r = H().shell, i = k(), a = $e(), o = u(T, S, S), s = tt(), c = o.filter((e) => e.status === "pending").length, l = o.filter((e) => e.status === "error").length, d = s.filter((e) => e.level === "error" || e.level === "fatal").length, f = s.filter((e) => e.level === "warn").length, p = e !== null, m = e?.kind ?? "idle", h = e === null ? "" : et(m) ? e.label.replace(/[…\.\s]+$/, "") : e.label, g = p ? `${m}:${h}` : "chips", _ = ot(g, n);
|
|
880
|
+
return /* @__PURE__ */ P("button", {
|
|
790
881
|
ref: _,
|
|
791
882
|
type: "button",
|
|
792
883
|
className: "vdt-capsule",
|
|
@@ -796,79 +887,79 @@ var W = (e) => {
|
|
|
796
887
|
title: r.openTitle,
|
|
797
888
|
"aria-label": r.openLabel,
|
|
798
889
|
children: [
|
|
799
|
-
/* @__PURE__ */
|
|
890
|
+
/* @__PURE__ */ N("span", {
|
|
800
891
|
className: "vdt-capsule-halo vdt-capsule-aura",
|
|
801
892
|
"aria-hidden": "true"
|
|
802
893
|
}),
|
|
803
|
-
/* @__PURE__ */
|
|
894
|
+
/* @__PURE__ */ N("span", {
|
|
804
895
|
className: "vdt-capsule-halo",
|
|
805
896
|
"aria-hidden": "true"
|
|
806
897
|
}),
|
|
807
|
-
p ? /* @__PURE__ */
|
|
808
|
-
p ? /* @__PURE__ */
|
|
898
|
+
p ? /* @__PURE__ */ N(Ie, { className: "vdt-capsule-mark vdt-spinner" }) : /* @__PURE__ */ N(fe, { className: "vdt-capsule-mark" }),
|
|
899
|
+
p ? /* @__PURE__ */ P("span", {
|
|
809
900
|
className: "vdt-capsule-status",
|
|
810
|
-
children: [h,
|
|
901
|
+
children: [h, et(m) ? /* @__PURE__ */ P("span", {
|
|
811
902
|
className: "vdt-dots",
|
|
812
903
|
"aria-hidden": "true",
|
|
813
904
|
children: [
|
|
814
|
-
/* @__PURE__ */
|
|
815
|
-
/* @__PURE__ */
|
|
816
|
-
/* @__PURE__ */
|
|
905
|
+
/* @__PURE__ */ N("span", {}),
|
|
906
|
+
/* @__PURE__ */ N("span", {}),
|
|
907
|
+
/* @__PURE__ */ N("span", {})
|
|
817
908
|
]
|
|
818
909
|
}) : null]
|
|
819
|
-
}, g) : /* @__PURE__ */
|
|
910
|
+
}, g) : /* @__PURE__ */ P("span", {
|
|
820
911
|
className: "vdt-capsule-chips",
|
|
821
912
|
children: [
|
|
822
|
-
i.names.map((e) => /* @__PURE__ */
|
|
823
|
-
/* @__PURE__ */
|
|
913
|
+
i.names.map((e) => /* @__PURE__ */ N(nt, { name: e }, e)),
|
|
914
|
+
/* @__PURE__ */ P("span", {
|
|
824
915
|
className: "vdt-chip",
|
|
825
916
|
"data-chip": "live",
|
|
826
917
|
children: [
|
|
827
|
-
/* @__PURE__ */
|
|
918
|
+
/* @__PURE__ */ N("b", { children: a }),
|
|
828
919
|
" ",
|
|
829
920
|
r.live
|
|
830
921
|
]
|
|
831
922
|
}),
|
|
832
|
-
c > 0 ? /* @__PURE__ */
|
|
923
|
+
c > 0 ? /* @__PURE__ */ P("span", {
|
|
833
924
|
className: "vdt-chip vdt-chip-info",
|
|
834
925
|
"data-chip": "pending",
|
|
835
926
|
children: [
|
|
836
|
-
/* @__PURE__ */
|
|
927
|
+
/* @__PURE__ */ N("span", {
|
|
837
928
|
className: "vdt-dot vdt-dot-info",
|
|
838
929
|
"aria-hidden": "true"
|
|
839
930
|
}),
|
|
840
|
-
/* @__PURE__ */
|
|
931
|
+
/* @__PURE__ */ N("b", { children: c }),
|
|
841
932
|
" ",
|
|
842
933
|
r.pending
|
|
843
934
|
]
|
|
844
935
|
}) : null,
|
|
845
|
-
l > 0 ? /* @__PURE__ */
|
|
936
|
+
l > 0 ? /* @__PURE__ */ P("span", {
|
|
846
937
|
className: "vdt-chip vdt-chip-err",
|
|
847
938
|
"data-chip": "failed",
|
|
848
939
|
children: [
|
|
849
|
-
/* @__PURE__ */
|
|
940
|
+
/* @__PURE__ */ N("span", {
|
|
850
941
|
className: "vdt-dot vdt-dot-err",
|
|
851
942
|
"aria-hidden": "true"
|
|
852
943
|
}),
|
|
853
|
-
/* @__PURE__ */
|
|
944
|
+
/* @__PURE__ */ N("b", { children: l }),
|
|
854
945
|
" ",
|
|
855
946
|
r.failed
|
|
856
947
|
]
|
|
857
948
|
}) : null,
|
|
858
|
-
d > 0 ? /* @__PURE__ */
|
|
949
|
+
d > 0 ? /* @__PURE__ */ P("span", {
|
|
859
950
|
className: "vdt-chip vdt-chip-err",
|
|
860
951
|
"data-chip": "errors",
|
|
861
952
|
children: [
|
|
862
|
-
/* @__PURE__ */
|
|
953
|
+
/* @__PURE__ */ N("b", { children: d }),
|
|
863
954
|
" ",
|
|
864
955
|
r.errorsWord(d)
|
|
865
956
|
]
|
|
866
957
|
}) : null,
|
|
867
|
-
d === 0 && f > 0 ? /* @__PURE__ */
|
|
958
|
+
d === 0 && f > 0 ? /* @__PURE__ */ P("span", {
|
|
868
959
|
className: "vdt-chip vdt-chip-warn",
|
|
869
960
|
"data-chip": "warnings",
|
|
870
961
|
children: [
|
|
871
|
-
/* @__PURE__ */
|
|
962
|
+
/* @__PURE__ */ N("b", { children: f }),
|
|
872
963
|
" ",
|
|
873
964
|
r.warningsWord(f)
|
|
874
965
|
]
|
|
@@ -877,26 +968,26 @@ var W = (e) => {
|
|
|
877
968
|
})
|
|
878
969
|
]
|
|
879
970
|
});
|
|
880
|
-
},
|
|
971
|
+
}, ct = [
|
|
881
972
|
"bottom",
|
|
882
973
|
"top",
|
|
883
974
|
"left",
|
|
884
975
|
"right",
|
|
885
976
|
"window"
|
|
886
|
-
],
|
|
977
|
+
], lt = [
|
|
887
978
|
"bottom",
|
|
888
979
|
"top",
|
|
889
980
|
"left",
|
|
890
981
|
"right"
|
|
891
|
-
],
|
|
982
|
+
], ut = (e) => typeof e == "string" && ct.includes(e), dt = (e) => e !== "window", ft = {
|
|
892
983
|
bottom: 240,
|
|
893
984
|
top: 240,
|
|
894
985
|
left: 320,
|
|
895
986
|
right: 320
|
|
896
|
-
},
|
|
987
|
+
}, pt = {
|
|
897
988
|
w: 480,
|
|
898
989
|
h: 320
|
|
899
|
-
},
|
|
990
|
+
}, mt = 64, ht = {
|
|
900
991
|
dock: "bottom",
|
|
901
992
|
sizes: {
|
|
902
993
|
bottom: 400,
|
|
@@ -911,98 +1002,98 @@ var W = (e) => {
|
|
|
911
1002
|
h: 560
|
|
912
1003
|
},
|
|
913
1004
|
push: !1
|
|
914
|
-
},
|
|
1005
|
+
}, gt = "voltro:devtools:dock", _t = (e) => typeof e == "number" && Number.isFinite(e), vt = (e, t) => {
|
|
915
1006
|
let n = {
|
|
916
|
-
...
|
|
1007
|
+
...ht,
|
|
917
1008
|
dock: t
|
|
918
1009
|
};
|
|
919
1010
|
if (typeof e != "object" || !e) return n;
|
|
920
|
-
let r = e, i = typeof r.sizes == "object" && r.sizes !== null ? r.sizes : {}, a = { ...
|
|
921
|
-
for (let e of
|
|
1011
|
+
let r = e, i = typeof r.sizes == "object" && r.sizes !== null ? r.sizes : {}, a = { ...ht.sizes };
|
|
1012
|
+
for (let e of lt) {
|
|
922
1013
|
let t = i[e];
|
|
923
|
-
|
|
1014
|
+
_t(t) && t >= ft[e] && (a[e] = Math.round(t));
|
|
924
1015
|
}
|
|
925
1016
|
let o = typeof r.window == "object" && r.window !== null ? r.window : {}, s = {
|
|
926
|
-
x:
|
|
927
|
-
y:
|
|
928
|
-
w:
|
|
929
|
-
h:
|
|
1017
|
+
x: _t(o.x) ? Math.round(o.x) : n.window.x,
|
|
1018
|
+
y: _t(o.y) ? Math.round(o.y) : n.window.y,
|
|
1019
|
+
w: _t(o.w) && o.w >= pt.w ? Math.round(o.w) : n.window.w,
|
|
1020
|
+
h: _t(o.h) && o.h >= pt.h ? Math.round(o.h) : n.window.h
|
|
930
1021
|
};
|
|
931
1022
|
return {
|
|
932
|
-
dock:
|
|
1023
|
+
dock: ut(r.dock) ? r.dock : t,
|
|
933
1024
|
sizes: a,
|
|
934
1025
|
window: s,
|
|
935
1026
|
push: r.push === !0
|
|
936
1027
|
};
|
|
937
|
-
},
|
|
1028
|
+
}, yt = (e) => {
|
|
938
1029
|
if (typeof window > "u") return {
|
|
939
|
-
...
|
|
1030
|
+
...ht,
|
|
940
1031
|
dock: e
|
|
941
1032
|
};
|
|
942
1033
|
try {
|
|
943
|
-
let t = window.localStorage.getItem(
|
|
1034
|
+
let t = window.localStorage.getItem(gt);
|
|
944
1035
|
return t === null ? {
|
|
945
|
-
...
|
|
1036
|
+
...ht,
|
|
946
1037
|
dock: e
|
|
947
|
-
} :
|
|
1038
|
+
} : vt(JSON.parse(t), e);
|
|
948
1039
|
} catch {
|
|
949
1040
|
return {
|
|
950
|
-
...
|
|
1041
|
+
...ht,
|
|
951
1042
|
dock: e
|
|
952
1043
|
};
|
|
953
1044
|
}
|
|
954
|
-
},
|
|
1045
|
+
}, bt = (e) => {
|
|
955
1046
|
if (!(typeof window > "u")) try {
|
|
956
|
-
window.localStorage.setItem(
|
|
1047
|
+
window.localStorage.setItem(gt, JSON.stringify(e));
|
|
957
1048
|
} catch {}
|
|
958
|
-
},
|
|
1049
|
+
}, xt = () => typeof window > "u" ? {
|
|
959
1050
|
width: 1440,
|
|
960
1051
|
height: 900
|
|
961
1052
|
} : {
|
|
962
1053
|
width: window.innerWidth,
|
|
963
1054
|
height: window.innerHeight
|
|
964
|
-
},
|
|
965
|
-
let r = e === "left" || e === "right" ? n.width : n.height, i = Math.max(
|
|
966
|
-
return Math.round(Math.min(i, Math.max(
|
|
967
|
-
},
|
|
968
|
-
let n = Math.max(120, t.width - 16), r = Math.max(120, t.height - 16), i = Math.round(Math.min(Math.max(Math.min(
|
|
1055
|
+
}, St = (e, t, n = xt()) => {
|
|
1056
|
+
let r = e === "left" || e === "right" ? n.width : n.height, i = Math.max(ft[e], r - mt);
|
|
1057
|
+
return Math.round(Math.min(i, Math.max(ft[e], t)));
|
|
1058
|
+
}, Ct = (e, t = xt()) => {
|
|
1059
|
+
let n = Math.max(120, t.width - 16), r = Math.max(120, t.height - 16), i = Math.round(Math.min(Math.max(Math.min(pt.w, n), e.w), n)), a = Math.round(Math.min(Math.max(Math.min(pt.h, r), e.h), r));
|
|
969
1060
|
return {
|
|
970
1061
|
x: Math.round(Math.min(Math.max(8, e.x), Math.max(8, t.width - i - 8))),
|
|
971
1062
|
y: Math.round(Math.min(Math.max(8, e.y), Math.max(8, t.height - a - 8))),
|
|
972
1063
|
w: i,
|
|
973
1064
|
h: a
|
|
974
1065
|
};
|
|
975
|
-
},
|
|
1066
|
+
}, wt = (e, t) => {
|
|
976
1067
|
let n = { ...e.sizes }, r = !1;
|
|
977
|
-
for (let e of
|
|
978
|
-
let i =
|
|
1068
|
+
for (let e of lt) {
|
|
1069
|
+
let i = St(e, n[e], t);
|
|
979
1070
|
i !== n[e] && (n[e] = i, r = !0);
|
|
980
1071
|
}
|
|
981
|
-
let i =
|
|
1072
|
+
let i = Ct(e.window, t), a = i.x !== e.window.x || i.y !== e.window.y || i.w !== e.window.w || i.h !== e.window.h;
|
|
982
1073
|
return !r && !a ? e : {
|
|
983
1074
|
...e,
|
|
984
1075
|
sizes: n,
|
|
985
1076
|
window: i
|
|
986
1077
|
};
|
|
987
|
-
},
|
|
1078
|
+
}, Tt = (e) => (window.addEventListener("resize", e), () => window.removeEventListener("resize", e)), Et = {
|
|
988
1079
|
width: 0,
|
|
989
1080
|
height: 0
|
|
990
|
-
},
|
|
1081
|
+
}, Dt = () => {
|
|
991
1082
|
let e = window.innerWidth, t = window.innerHeight;
|
|
992
|
-
return (
|
|
1083
|
+
return (Et.width !== e || Et.height !== t) && (Et = {
|
|
993
1084
|
width: e,
|
|
994
1085
|
height: t
|
|
995
|
-
}),
|
|
996
|
-
},
|
|
1086
|
+
}), Et;
|
|
1087
|
+
}, Ot = {
|
|
997
1088
|
width: 1440,
|
|
998
1089
|
height: 900
|
|
999
|
-
},
|
|
1000
|
-
let [t, r] = l(() =>
|
|
1090
|
+
}, kt = () => Ot, At = () => u(Tt, Dt, kt), jt = (e = "bottom") => {
|
|
1091
|
+
let [t, r] = l(() => yt(e));
|
|
1001
1092
|
i(() => {
|
|
1002
1093
|
if (typeof window > "u") return;
|
|
1003
1094
|
let t = (t) => {
|
|
1004
|
-
if (t.key ===
|
|
1005
|
-
r(
|
|
1095
|
+
if (t.key === gt && t.newValue !== null) try {
|
|
1096
|
+
r(vt(JSON.parse(t.newValue), e));
|
|
1006
1097
|
} catch {}
|
|
1007
1098
|
};
|
|
1008
1099
|
return window.addEventListener("storage", t), () => window.removeEventListener("storage", t);
|
|
@@ -1010,7 +1101,7 @@ var W = (e) => {
|
|
|
1010
1101
|
let a = n((e) => {
|
|
1011
1102
|
r((t) => {
|
|
1012
1103
|
let n = e(t);
|
|
1013
|
-
return
|
|
1104
|
+
return bt(n), n;
|
|
1014
1105
|
});
|
|
1015
1106
|
}, []);
|
|
1016
1107
|
return [t, {
|
|
@@ -1019,7 +1110,7 @@ var W = (e) => {
|
|
|
1019
1110
|
dock: e
|
|
1020
1111
|
}), [a]),
|
|
1021
1112
|
setEdgeSize: n((e, t) => a((n) => {
|
|
1022
|
-
let r =
|
|
1113
|
+
let r = St(e, t);
|
|
1023
1114
|
return n.sizes[e] === r ? n : {
|
|
1024
1115
|
...n,
|
|
1025
1116
|
sizes: {
|
|
@@ -1030,14 +1121,14 @@ var W = (e) => {
|
|
|
1030
1121
|
}), [a]),
|
|
1031
1122
|
setWindowRect: n((e) => a((t) => ({
|
|
1032
1123
|
...t,
|
|
1033
|
-
window:
|
|
1124
|
+
window: Ct(e)
|
|
1034
1125
|
})), [a]),
|
|
1035
1126
|
setPush: n((e) => a((t) => t.push === e ? t : {
|
|
1036
1127
|
...t,
|
|
1037
1128
|
push: e
|
|
1038
1129
|
}), [a])
|
|
1039
1130
|
}];
|
|
1040
|
-
},
|
|
1131
|
+
}, Mt = (e) => {
|
|
1041
1132
|
switch (e) {
|
|
1042
1133
|
case "ArrowDown": return "bottom";
|
|
1043
1134
|
case "ArrowUp": return "top";
|
|
@@ -1045,14 +1136,14 @@ var W = (e) => {
|
|
|
1045
1136
|
case "ArrowRight": return "right";
|
|
1046
1137
|
default: return null;
|
|
1047
1138
|
}
|
|
1048
|
-
},
|
|
1049
|
-
bottom:
|
|
1050
|
-
top:
|
|
1051
|
-
left:
|
|
1052
|
-
right:
|
|
1053
|
-
window:
|
|
1054
|
-
},
|
|
1055
|
-
let a =
|
|
1139
|
+
}, Nt = {
|
|
1140
|
+
bottom: Ae,
|
|
1141
|
+
top: je,
|
|
1142
|
+
left: Me,
|
|
1143
|
+
right: Ne,
|
|
1144
|
+
window: Pe
|
|
1145
|
+
}, Pt = ({ dock: e, push: t, onDock: n, onPush: r }) => {
|
|
1146
|
+
let a = H().shell, [o, s] = l(!1), u = c(null), d = {
|
|
1056
1147
|
bottom: a.dockBottom,
|
|
1057
1148
|
top: a.dockTop,
|
|
1058
1149
|
left: a.dockLeft,
|
|
@@ -1073,7 +1164,7 @@ var W = (e) => {
|
|
|
1073
1164
|
let f = c([]);
|
|
1074
1165
|
i(() => {
|
|
1075
1166
|
if (!o) return;
|
|
1076
|
-
let t =
|
|
1167
|
+
let t = ct.indexOf(e);
|
|
1077
1168
|
f.current[t === -1 ? 0 : t]?.focus();
|
|
1078
1169
|
}, [o, e]);
|
|
1079
1170
|
let p = (e) => {
|
|
@@ -1098,11 +1189,11 @@ var W = (e) => {
|
|
|
1098
1189
|
default: return;
|
|
1099
1190
|
}
|
|
1100
1191
|
e.preventDefault(), t[r]?.focus();
|
|
1101
|
-
}, m =
|
|
1102
|
-
return /* @__PURE__ */
|
|
1192
|
+
}, m = Nt[e];
|
|
1193
|
+
return /* @__PURE__ */ P("div", {
|
|
1103
1194
|
ref: u,
|
|
1104
1195
|
className: "vdt-dockmenu",
|
|
1105
|
-
children: [/* @__PURE__ */
|
|
1196
|
+
children: [/* @__PURE__ */ N("button", {
|
|
1106
1197
|
type: "button",
|
|
1107
1198
|
className: `vdt-iconbtn${o ? " vdt-iconbtn-on" : ""}`,
|
|
1108
1199
|
title: a.dockMenuTitle,
|
|
@@ -1110,17 +1201,17 @@ var W = (e) => {
|
|
|
1110
1201
|
"aria-haspopup": "menu",
|
|
1111
1202
|
"aria-expanded": o,
|
|
1112
1203
|
onClick: () => s((e) => !e),
|
|
1113
|
-
children: /* @__PURE__ */
|
|
1114
|
-
}), o ? /* @__PURE__ */
|
|
1204
|
+
children: /* @__PURE__ */ N(m, { className: "vdt:w-4 vdt:h-4" })
|
|
1205
|
+
}), o ? /* @__PURE__ */ P("div", {
|
|
1115
1206
|
role: "menu",
|
|
1116
1207
|
"aria-label": a.dockMenuTitle,
|
|
1117
1208
|
className: "vdt-dockmenu-pop",
|
|
1118
|
-
children: [/* @__PURE__ */
|
|
1209
|
+
children: [/* @__PURE__ */ N("div", {
|
|
1119
1210
|
className: "vdt-dockmenu-row",
|
|
1120
1211
|
onKeyDown: p,
|
|
1121
|
-
children:
|
|
1122
|
-
let i =
|
|
1123
|
-
return /* @__PURE__ */
|
|
1212
|
+
children: ct.map((t, r) => {
|
|
1213
|
+
let i = Nt[t], a = t === e;
|
|
1214
|
+
return /* @__PURE__ */ N("button", {
|
|
1124
1215
|
ref: (e) => {
|
|
1125
1216
|
f.current[r] = e;
|
|
1126
1217
|
},
|
|
@@ -1133,42 +1224,167 @@ var W = (e) => {
|
|
|
1133
1224
|
onClick: () => {
|
|
1134
1225
|
n(t), s(!1);
|
|
1135
1226
|
},
|
|
1136
|
-
children: /* @__PURE__ */
|
|
1227
|
+
children: /* @__PURE__ */ N(i, { className: "vdt:w-4 vdt:h-4" })
|
|
1137
1228
|
}, t);
|
|
1138
1229
|
})
|
|
1139
|
-
}), /* @__PURE__ */
|
|
1230
|
+
}), /* @__PURE__ */ P("label", {
|
|
1140
1231
|
className: `vdt-dockmenu-push${e === "window" ? " vdt-dockmenu-push-off" : ""}`,
|
|
1141
|
-
children: [/* @__PURE__ */
|
|
1232
|
+
children: [/* @__PURE__ */ N("input", {
|
|
1142
1233
|
type: "checkbox",
|
|
1143
1234
|
role: "menuitemcheckbox",
|
|
1144
1235
|
"aria-checked": t,
|
|
1145
1236
|
checked: t,
|
|
1146
1237
|
disabled: e === "window",
|
|
1147
1238
|
onChange: (e) => r(e.target.checked)
|
|
1148
|
-
}), /* @__PURE__ */
|
|
1239
|
+
}), /* @__PURE__ */ P("span", { children: [/* @__PURE__ */ N("span", {
|
|
1149
1240
|
className: "vdt-dockmenu-push-label",
|
|
1150
1241
|
children: a.pushPage
|
|
1151
|
-
}), /* @__PURE__ */
|
|
1242
|
+
}), /* @__PURE__ */ N("span", {
|
|
1152
1243
|
className: "vdt-dockmenu-push-hint",
|
|
1153
1244
|
children: a.pushPageHint
|
|
1154
1245
|
})] })]
|
|
1155
1246
|
})]
|
|
1156
1247
|
}) : null]
|
|
1157
1248
|
});
|
|
1158
|
-
},
|
|
1159
|
-
|
|
1160
|
-
|
|
1249
|
+
}, Ft = 2e3, It = 6e4, Y = /* @__PURE__ */ new Map(), X = /* @__PURE__ */ new Map(), Lt = /* @__PURE__ */ new Set(), Rt = [], zt = () => {
|
|
1250
|
+
Rt = Array.from(Y.values());
|
|
1251
|
+
for (let e of Lt) e();
|
|
1252
|
+
}, Bt = (e) => {
|
|
1253
|
+
let t = e.indexOf("/_voltro/inspect");
|
|
1254
|
+
return t === -1 ? e : e.slice(0, t);
|
|
1255
|
+
}, Vt = (e) => Y.get(e), Ht = (e, t = Date.now()) => {
|
|
1256
|
+
if (Y.has(e)) return !1;
|
|
1257
|
+
let n = X.get(e);
|
|
1258
|
+
return n === void 0 || t >= n.retryAt;
|
|
1259
|
+
}, Ut = (e) => {
|
|
1260
|
+
X.delete(e.baseUrl), Y.set(e.baseUrl, e), zt();
|
|
1261
|
+
}, Wt = (e, t, n = Date.now()) => {
|
|
1262
|
+
let r = (X.get(e)?.count ?? 0) + 1;
|
|
1263
|
+
if (t && r >= 3) {
|
|
1264
|
+
Ut({
|
|
1265
|
+
baseUrl: e,
|
|
1266
|
+
status: 0
|
|
1267
|
+
});
|
|
1268
|
+
return;
|
|
1269
|
+
}
|
|
1270
|
+
X.set(e, {
|
|
1271
|
+
count: r,
|
|
1272
|
+
retryAt: n + Math.min(It, Ft * 2 ** r)
|
|
1273
|
+
});
|
|
1274
|
+
}, Gt = (e) => {
|
|
1275
|
+
X.delete(e);
|
|
1276
|
+
}, Kt = () => {
|
|
1277
|
+
X.clear(), Y.size !== 0 && (Y.clear(), zt());
|
|
1278
|
+
}, qt = (e) => e === 401 || e === 403, Jt = async (e, t) => {
|
|
1279
|
+
let n = await t.json().catch(() => null), r = (e) => {
|
|
1280
|
+
let t = typeof n == "object" && n ? n[e] : void 0;
|
|
1281
|
+
return typeof t == "string" && t !== "" ? t : void 0;
|
|
1282
|
+
}, i = typeof n == "object" && !!n && n.locked === !0, a = r("error"), o = r("reason"), s = r("fix"), c = r("login");
|
|
1283
|
+
return {
|
|
1284
|
+
baseUrl: e,
|
|
1285
|
+
status: t.status,
|
|
1286
|
+
...a === void 0 ? {} : { error: a },
|
|
1287
|
+
...o === void 0 ? {} : { reason: o },
|
|
1288
|
+
...s === void 0 ? {} : { fix: s },
|
|
1289
|
+
...i ? { locked: !0 } : {},
|
|
1290
|
+
...c === void 0 ? {} : { login: c }
|
|
1291
|
+
};
|
|
1292
|
+
}, Yt = (e) => (Lt.add(e), () => {
|
|
1293
|
+
Lt.delete(e);
|
|
1294
|
+
}), Xt = () => u(Yt, () => Rt, () => Rt), Zt = (e) => {
|
|
1295
|
+
if (e.login !== void 0) try {
|
|
1296
|
+
return new URL(e.login, new URL(e.baseUrl, window.location.href)).href;
|
|
1297
|
+
} catch {
|
|
1298
|
+
return;
|
|
1299
|
+
}
|
|
1300
|
+
}, Qt = ({ url: e }) => {
|
|
1301
|
+
let t = H().inspect, [n, r] = l(""), [i, a] = l(null), o = async (t) => {
|
|
1302
|
+
t.preventDefault(), a(null);
|
|
1303
|
+
try {
|
|
1304
|
+
let t = await fetch(e, {
|
|
1305
|
+
method: "POST",
|
|
1306
|
+
credentials: "same-origin",
|
|
1307
|
+
headers: { "content-type": "application/json" },
|
|
1308
|
+
body: JSON.stringify({ token: n })
|
|
1309
|
+
});
|
|
1310
|
+
if (t.ok) {
|
|
1311
|
+
r(""), Kt();
|
|
1312
|
+
return;
|
|
1313
|
+
}
|
|
1314
|
+
let i = await t.json().catch(() => null), o = typeof i == "object" && i && typeof i.reason == "string" ? i.reason : `HTTP ${t.status}`;
|
|
1315
|
+
a(o);
|
|
1316
|
+
} catch (e) {
|
|
1317
|
+
a(e instanceof Error ? e.message : String(e));
|
|
1318
|
+
}
|
|
1319
|
+
};
|
|
1320
|
+
return /* @__PURE__ */ P("form", {
|
|
1321
|
+
className: "vdt-refusal-signin",
|
|
1322
|
+
onSubmit: (e) => {
|
|
1323
|
+
o(e);
|
|
1324
|
+
},
|
|
1325
|
+
children: [
|
|
1326
|
+
/* @__PURE__ */ P("label", { children: [/* @__PURE__ */ N("span", { children: t.tokenLabel }), /* @__PURE__ */ N("input", {
|
|
1327
|
+
type: "password",
|
|
1328
|
+
autoComplete: "off",
|
|
1329
|
+
value: n,
|
|
1330
|
+
onChange: (e) => r(e.target.value)
|
|
1331
|
+
})] }),
|
|
1332
|
+
/* @__PURE__ */ N("button", {
|
|
1333
|
+
type: "submit",
|
|
1334
|
+
disabled: n === "",
|
|
1335
|
+
children: t.signIn
|
|
1336
|
+
}),
|
|
1337
|
+
i === null ? null : /* @__PURE__ */ N("span", {
|
|
1338
|
+
className: "vdt-refusal-failed",
|
|
1339
|
+
children: t.signInFailed(i)
|
|
1340
|
+
})
|
|
1341
|
+
]
|
|
1342
|
+
});
|
|
1343
|
+
}, $t = () => {
|
|
1344
|
+
let e = Xt(), t = k(), n = H().inspect;
|
|
1345
|
+
if (e.length === 0) return null;
|
|
1346
|
+
let r = (e) => t.names.find((n) => t.get(n).inspectBaseUrl === e) ?? e;
|
|
1347
|
+
return /* @__PURE__ */ N("div", {
|
|
1348
|
+
className: "vdt-refusals",
|
|
1349
|
+
role: "status",
|
|
1350
|
+
children: e.map((e) => {
|
|
1351
|
+
let t = e.locked === !0 ? Zt(e) : void 0;
|
|
1352
|
+
return /* @__PURE__ */ P("div", {
|
|
1353
|
+
className: "vdt-refusal",
|
|
1354
|
+
children: [
|
|
1355
|
+
/* @__PURE__ */ N("strong", { children: e.status === 0 ? n.unreachableTitle(r(e.baseUrl)) : n.refusedTitle(r(e.baseUrl), e.status) }),
|
|
1356
|
+
e.status === 0 ? /* @__PURE__ */ N("p", { children: n.unreachableHint }) : /* @__PURE__ */ N("p", { children: [e.error, e.reason].filter((e) => e !== void 0).join(" — ") }),
|
|
1357
|
+
e.fix === void 0 ? null : /* @__PURE__ */ P("p", { children: [
|
|
1358
|
+
/* @__PURE__ */ N("span", {
|
|
1359
|
+
className: "vdt-refusal-label",
|
|
1360
|
+
children: n.fixLabel
|
|
1361
|
+
}),
|
|
1362
|
+
" ",
|
|
1363
|
+
e.fix
|
|
1364
|
+
] }),
|
|
1365
|
+
t === void 0 ? null : /* @__PURE__ */ N(Qt, { url: t }),
|
|
1366
|
+
/* @__PURE__ */ N("p", {
|
|
1367
|
+
className: "vdt-refusal-paused",
|
|
1368
|
+
children: n.paused
|
|
1369
|
+
})
|
|
1370
|
+
]
|
|
1371
|
+
}, e.baseUrl);
|
|
1372
|
+
})
|
|
1373
|
+
});
|
|
1374
|
+
}, en = t(null);
|
|
1375
|
+
function tn(e) {
|
|
1376
|
+
return /* @__PURE__ */ N(en.Provider, {
|
|
1161
1377
|
value: e.token,
|
|
1162
1378
|
children: e.children
|
|
1163
1379
|
});
|
|
1164
1380
|
}
|
|
1165
|
-
var Z = () => r(
|
|
1381
|
+
var Z = () => r(en), nn = (e, t) => {
|
|
1166
1382
|
let n = { ...t ?? {} };
|
|
1167
1383
|
return e !== null && e !== "" && (n.authorization = `Bearer ${e}`), n;
|
|
1168
|
-
},
|
|
1384
|
+
}, rn = (e) => e !== void 0 && e !== "" ? e : null, an = (e) => typeof e == "object" && !!e && "data" in e, on = (e) => an(e) ? e.data : null, sn = async (e, t, n) => {
|
|
1169
1385
|
let r = await fetch(e, {
|
|
1170
1386
|
method: "POST",
|
|
1171
|
-
headers:
|
|
1387
|
+
headers: nn(t, {
|
|
1172
1388
|
accept: "application/json",
|
|
1173
1389
|
"content-type": "application/json"
|
|
1174
1390
|
}),
|
|
@@ -1178,22 +1394,32 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1178
1394
|
let e = typeof i == "object" && i ? i : void 0, t = typeof e?.message == "string" ? e.message : typeof e?.error == "string" ? e.error : `HTTP ${r.status}`;
|
|
1179
1395
|
throw Error(t);
|
|
1180
1396
|
}
|
|
1181
|
-
let a =
|
|
1397
|
+
let a = on(i);
|
|
1182
1398
|
if (a === null) throw Error("the api answered without an observation");
|
|
1183
1399
|
return a;
|
|
1184
1400
|
}, Q = async (e, t) => {
|
|
1401
|
+
let n = Bt(e);
|
|
1402
|
+
if (!Ht(n)) return null;
|
|
1403
|
+
let r;
|
|
1404
|
+
try {
|
|
1405
|
+
r = await fetch(e, { headers: nn(t, { accept: "application/json" }) });
|
|
1406
|
+
} catch {
|
|
1407
|
+
return Wt(n, !0), null;
|
|
1408
|
+
}
|
|
1409
|
+
if (qt(r.status)) return Ut(await Jt(n, r)), null;
|
|
1410
|
+
if (!r.ok) return Wt(n, !1), null;
|
|
1411
|
+
Gt(n);
|
|
1185
1412
|
try {
|
|
1186
|
-
|
|
1187
|
-
return n.ok ? jt(await n.json()) : null;
|
|
1413
|
+
return on(await r.json());
|
|
1188
1414
|
} catch {
|
|
1189
1415
|
return null;
|
|
1190
1416
|
}
|
|
1191
|
-
},
|
|
1417
|
+
}, cn = (e) => typeof document > "u" ? () => {} : (document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e)), ln = () => typeof document > "u" || !document.hidden, un = () => !0, $ = () => u(cn, ln, un), dn = 5e3, fn = async (e, t) => {
|
|
1192
1418
|
if (e === "") return null;
|
|
1193
1419
|
let n = await Q(`${e}/_voltro/inspect/subscriptions`, t);
|
|
1194
1420
|
return n !== null && Array.isArray(n.subscriptions) ? n : null;
|
|
1195
|
-
},
|
|
1196
|
-
let t =
|
|
1421
|
+
}, pn = (e) => {
|
|
1422
|
+
let t = k(), n = $(), r = Z(), a = t.names, o = e && n, [s, c] = l(() => a.map((e) => ({
|
|
1197
1423
|
name: e,
|
|
1198
1424
|
response: null,
|
|
1199
1425
|
live: !1
|
|
@@ -1210,22 +1436,22 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1210
1436
|
if (i === "") return { teardown: () => {} };
|
|
1211
1437
|
let a = null, o = null, s = () => {
|
|
1212
1438
|
o !== null && clearInterval(o), o = null;
|
|
1213
|
-
}, c = () => {
|
|
1214
|
-
if (o !== null) return;
|
|
1439
|
+
}, c = () => Vt(i) !== void 0, l = () => {
|
|
1440
|
+
if (o !== null || c()) return;
|
|
1215
1441
|
let t = async () => {
|
|
1216
|
-
let t = await
|
|
1442
|
+
let t = await fn(i, r);
|
|
1217
1443
|
t !== null && n(e, {
|
|
1218
1444
|
response: t,
|
|
1219
1445
|
live: !1
|
|
1220
|
-
});
|
|
1446
|
+
}), c() && (s(), a?.close());
|
|
1221
1447
|
};
|
|
1222
1448
|
t(), o = setInterval(() => {
|
|
1223
1449
|
t();
|
|
1224
|
-
},
|
|
1450
|
+
}, dn);
|
|
1225
1451
|
};
|
|
1226
|
-
|
|
1227
|
-
t !== null && n(e, { response: t });
|
|
1228
|
-
});
|
|
1452
|
+
if (fn(i, r).then((t) => {
|
|
1453
|
+
t !== null && n(e, { response: t }), c() && (s(), a?.close());
|
|
1454
|
+
}), c()) return { teardown: () => {} };
|
|
1229
1455
|
try {
|
|
1230
1456
|
a = new EventSource(`${i}/_voltro/inspect/stream`), a.addEventListener("subscriptions", (t) => {
|
|
1231
1457
|
try {
|
|
@@ -1238,10 +1464,10 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1238
1464
|
}), a.addEventListener("open", () => {
|
|
1239
1465
|
n(e, { live: !0 }), s();
|
|
1240
1466
|
}), a.addEventListener("error", () => {
|
|
1241
|
-
n(e, { live: !1 }),
|
|
1467
|
+
n(e, { live: !1 }), l();
|
|
1242
1468
|
});
|
|
1243
1469
|
} catch {
|
|
1244
|
-
|
|
1470
|
+
l();
|
|
1245
1471
|
}
|
|
1246
1472
|
return { teardown: () => {
|
|
1247
1473
|
a?.close(), s();
|
|
@@ -1257,139 +1483,139 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1257
1483
|
a,
|
|
1258
1484
|
r
|
|
1259
1485
|
]), s;
|
|
1260
|
-
},
|
|
1486
|
+
}, mn = (e) => {
|
|
1261
1487
|
if (typeof e != "object" || !e) return !1;
|
|
1262
1488
|
let t = e;
|
|
1263
|
-
if (Array.isArray(t.and)) return t.and.some(
|
|
1264
|
-
if (Array.isArray(t.or)) return t.or.some(
|
|
1489
|
+
if (Array.isArray(t.and)) return t.and.some(mn);
|
|
1490
|
+
if (Array.isArray(t.or)) return t.or.some(mn);
|
|
1265
1491
|
let n = t.op;
|
|
1266
1492
|
return n === "gt" || n === "gte" || n === "lt" || n === "lte";
|
|
1267
|
-
},
|
|
1493
|
+
}, hn = (e) => {
|
|
1268
1494
|
if (typeof e != "object" || !e) return !1;
|
|
1269
1495
|
let t = e;
|
|
1270
|
-
if (Array.isArray(t.and)) return t.and.some(
|
|
1271
|
-
if (Array.isArray(t.or)) return t.or.some(
|
|
1496
|
+
if (Array.isArray(t.and)) return t.and.some(hn);
|
|
1497
|
+
if (Array.isArray(t.or)) return t.or.some(hn);
|
|
1272
1498
|
let n = t.op;
|
|
1273
1499
|
return n === "eq" || n === "in";
|
|
1274
|
-
},
|
|
1500
|
+
}, gn = (e) => e.usingIndex !== void 0 && e.usingIndex.fields.every((t) => e.conjunctiveColumns.includes(t)) ? "tuple" : hn(e.predicate) ? "column" : mn(e.predicate) ? "range" : "unindexed", _n = (e) => e === "tuple" ? "success" : e === "column" ? "info" : e === "range" ? "neutral" : "warning", vn = (e) => e === "tuple" ? "tuple" : e === "column" ? "column" : e === "range" ? "range" : "UNINDEXED", yn = (e) => e == null ? "null" : typeof e == "string" ? `'${e}'` : Array.isArray(e) ? `[${e.map(yn).join(", ")}]` : String(e), bn = (e) => e.op === "isNull" ? `${e.column} IS NULL` : e.op === "isNotNull" ? `${e.column} IS NOT NULL` : `${e.column} ${e.op} ${yn(e.value)}`, xn = (e, t = 0) => {
|
|
1275
1501
|
if (typeof e != "object" || !e) return String(e);
|
|
1276
1502
|
let n = e;
|
|
1277
|
-
if (Array.isArray(n.and)) return n.and.map((e) =>
|
|
1503
|
+
if (Array.isArray(n.and)) return n.and.map((e) => xn(e, t + 1)).join(" AND ");
|
|
1278
1504
|
if (Array.isArray(n.or)) {
|
|
1279
|
-
let e = n.or.map((e) =>
|
|
1505
|
+
let e = n.or.map((e) => xn(e, t + 1)).join(" OR ");
|
|
1280
1506
|
return t > 0 ? `(${e})` : e;
|
|
1281
1507
|
}
|
|
1282
|
-
return typeof n.column == "string" && typeof n.op == "string" ?
|
|
1283
|
-
},
|
|
1284
|
-
let e =
|
|
1285
|
-
return e.length === 0 ? /* @__PURE__ */
|
|
1508
|
+
return typeof n.column == "string" && typeof n.op == "string" ? bn(n) : JSON.stringify(e);
|
|
1509
|
+
}, Sn = () => {
|
|
1510
|
+
let e = pn(!0), t = H().indexes, n = e.filter((e) => e.response !== null).length;
|
|
1511
|
+
return e.length === 0 ? /* @__PURE__ */ N(J, { children: t.noApis }) : n === 0 ? /* @__PURE__ */ P(J, { children: [t.unreachableTitle, /* @__PURE__ */ N("div", {
|
|
1286
1512
|
className: "vdt:mt-1 vdt:text-foreground-subtle",
|
|
1287
1513
|
children: t.unreachableHint
|
|
1288
|
-
})] }) : /* @__PURE__ */
|
|
1514
|
+
})] }) : /* @__PURE__ */ N("div", {
|
|
1289
1515
|
className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
|
|
1290
|
-
children: e.map(({ name: e, response: n, live: r }) => n === null ? /* @__PURE__ */
|
|
1291
|
-
Icon:
|
|
1516
|
+
children: e.map(({ name: e, response: n, live: r }) => n === null ? /* @__PURE__ */ P(G, { children: [/* @__PURE__ */ N(K, {
|
|
1517
|
+
Icon: he,
|
|
1292
1518
|
children: e
|
|
1293
|
-
}), /* @__PURE__ */
|
|
1519
|
+
}), /* @__PURE__ */ N(We, {
|
|
1294
1520
|
className: "vdt:text-xs vdt:text-foreground-subtle",
|
|
1295
1521
|
children: t.offline
|
|
1296
|
-
})] }, e) : /* @__PURE__ */
|
|
1522
|
+
})] }, e) : /* @__PURE__ */ N(Cn, {
|
|
1297
1523
|
apiName: e,
|
|
1298
1524
|
response: n,
|
|
1299
1525
|
live: r
|
|
1300
1526
|
}, e))
|
|
1301
1527
|
});
|
|
1302
|
-
},
|
|
1303
|
-
let r =
|
|
1304
|
-
return /* @__PURE__ */
|
|
1305
|
-
/* @__PURE__ */
|
|
1306
|
-
Icon:
|
|
1307
|
-
right: /* @__PURE__ */
|
|
1528
|
+
}, Cn = ({ apiName: e, response: t, live: n }) => {
|
|
1529
|
+
let r = H().indexes, i = [...t.subscriptions].sort((e, t) => t.subscriberCount - e.subscriberCount);
|
|
1530
|
+
return /* @__PURE__ */ P(G, { children: [
|
|
1531
|
+
/* @__PURE__ */ N(K, {
|
|
1532
|
+
Icon: he,
|
|
1533
|
+
right: /* @__PURE__ */ P("div", {
|
|
1308
1534
|
className: "vdt:flex vdt:items-center vdt:gap-1",
|
|
1309
|
-
children: [/* @__PURE__ */
|
|
1535
|
+
children: [/* @__PURE__ */ N(W, {
|
|
1310
1536
|
tone: "info",
|
|
1311
1537
|
children: r.subsBadge(t.subscriptions.length)
|
|
1312
|
-
}), /* @__PURE__ */
|
|
1538
|
+
}), /* @__PURE__ */ N(W, {
|
|
1313
1539
|
tone: n ? "success" : "neutral",
|
|
1314
1540
|
children: n ? r.live : r.poll
|
|
1315
1541
|
})]
|
|
1316
1542
|
}),
|
|
1317
1543
|
children: e
|
|
1318
1544
|
}),
|
|
1319
|
-
t.matcherStats.length > 0 && /* @__PURE__ */
|
|
1545
|
+
t.matcherStats.length > 0 && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("div", {
|
|
1320
1546
|
className: "vdt:text-[11px] vdt:uppercase vdt:tracking-wide vdt:text-foreground-subtle vdt:mt-3 vdt:mb-1",
|
|
1321
1547
|
children: r.tables
|
|
1322
|
-
}), /* @__PURE__ */
|
|
1548
|
+
}), /* @__PURE__ */ N("div", {
|
|
1323
1549
|
className: "vdt:flex vdt:flex-col vdt:gap-1",
|
|
1324
|
-
children: t.matcherStats.map((e) => /* @__PURE__ */
|
|
1550
|
+
children: t.matcherStats.map((e) => /* @__PURE__ */ P("div", {
|
|
1325
1551
|
className: "vdt:flex vdt:items-baseline vdt:gap-3 vdt:text-xs",
|
|
1326
1552
|
children: [
|
|
1327
|
-
/* @__PURE__ */
|
|
1553
|
+
/* @__PURE__ */ N("span", {
|
|
1328
1554
|
className: "vdt:font-mono vdt:text-foreground",
|
|
1329
1555
|
children: e.tableName
|
|
1330
1556
|
}),
|
|
1331
|
-
/* @__PURE__ */
|
|
1557
|
+
/* @__PURE__ */ P("span", {
|
|
1332
1558
|
className: "vdt:text-foreground-subtle",
|
|
1333
1559
|
children: [e.tupleRouted + e.columnBucketed + e.rangeBucketed + e.unindexedFallback, " subs"]
|
|
1334
1560
|
}),
|
|
1335
|
-
e.tupleRouted > 0 && /* @__PURE__ */
|
|
1561
|
+
e.tupleRouted > 0 && /* @__PURE__ */ N(W, {
|
|
1336
1562
|
tone: "success",
|
|
1337
1563
|
children: `${e.tupleRouted} tuple`
|
|
1338
1564
|
}),
|
|
1339
|
-
e.columnBucketed > 0 && /* @__PURE__ */
|
|
1565
|
+
e.columnBucketed > 0 && /* @__PURE__ */ N(W, {
|
|
1340
1566
|
tone: "info",
|
|
1341
1567
|
children: `${e.columnBucketed} column`
|
|
1342
1568
|
}),
|
|
1343
|
-
e.rangeBucketed > 0 && /* @__PURE__ */
|
|
1569
|
+
e.rangeBucketed > 0 && /* @__PURE__ */ N(W, {
|
|
1344
1570
|
tone: "neutral",
|
|
1345
1571
|
children: `${e.rangeBucketed} range`
|
|
1346
1572
|
}),
|
|
1347
|
-
e.unindexedFallback > 0 && /* @__PURE__ */
|
|
1573
|
+
e.unindexedFallback > 0 && /* @__PURE__ */ N(W, {
|
|
1348
1574
|
tone: "warning",
|
|
1349
1575
|
children: `${e.unindexedFallback} unindexed`
|
|
1350
1576
|
}),
|
|
1351
|
-
e.distinctTupleKeys > 0 && /* @__PURE__ */
|
|
1577
|
+
e.distinctTupleKeys > 0 && /* @__PURE__ */ P("span", {
|
|
1352
1578
|
className: "vdt:text-foreground-subtle",
|
|
1353
1579
|
children: [e.distinctTupleKeys, " tuple keys"]
|
|
1354
1580
|
})
|
|
1355
1581
|
]
|
|
1356
1582
|
}, e.tableName))
|
|
1357
1583
|
})] }),
|
|
1358
|
-
i.length > 0 && /* @__PURE__ */
|
|
1584
|
+
i.length > 0 && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("div", {
|
|
1359
1585
|
className: "vdt:text-[11px] vdt:uppercase vdt:tracking-wide vdt:text-foreground-subtle vdt:mt-3 vdt:mb-1",
|
|
1360
1586
|
children: r.subscriptionsSection
|
|
1361
|
-
}), /* @__PURE__ */
|
|
1587
|
+
}), /* @__PURE__ */ N("div", {
|
|
1362
1588
|
className: "vdt:flex vdt:flex-col vdt:gap-2",
|
|
1363
|
-
children: i.map((e) => /* @__PURE__ */
|
|
1589
|
+
children: i.map((e) => /* @__PURE__ */ N(wn, { sub: e }, e.fingerprint))
|
|
1364
1590
|
})] })
|
|
1365
1591
|
] });
|
|
1366
|
-
},
|
|
1367
|
-
let t =
|
|
1368
|
-
return /* @__PURE__ */
|
|
1592
|
+
}, wn = ({ sub: e }) => {
|
|
1593
|
+
let t = H().indexes, n = gn(e);
|
|
1594
|
+
return /* @__PURE__ */ P("div", {
|
|
1369
1595
|
className: "vdt:flex vdt:flex-col vdt:gap-0.5 vdt:px-2 vdt:py-1 vdt:rounded-sm vdt:bg-muted/40",
|
|
1370
|
-
children: [/* @__PURE__ */
|
|
1596
|
+
children: [/* @__PURE__ */ P("div", {
|
|
1371
1597
|
className: "vdt:flex vdt:items-baseline vdt:gap-2 vdt:text-xs",
|
|
1372
1598
|
children: [
|
|
1373
|
-
/* @__PURE__ */
|
|
1599
|
+
/* @__PURE__ */ N("span", {
|
|
1374
1600
|
className: "vdt:font-mono vdt:text-foreground",
|
|
1375
1601
|
children: e.table
|
|
1376
1602
|
}),
|
|
1377
|
-
/* @__PURE__ */
|
|
1378
|
-
tone:
|
|
1379
|
-
children:
|
|
1603
|
+
/* @__PURE__ */ N(W, {
|
|
1604
|
+
tone: _n(n),
|
|
1605
|
+
children: vn(n)
|
|
1380
1606
|
}),
|
|
1381
|
-
e.usingIndex && /* @__PURE__ */
|
|
1607
|
+
e.usingIndex && /* @__PURE__ */ P("span", {
|
|
1382
1608
|
className: "vdt:text-foreground-subtle",
|
|
1383
1609
|
children: [
|
|
1384
1610
|
t.via,
|
|
1385
1611
|
" ",
|
|
1386
|
-
/* @__PURE__ */
|
|
1612
|
+
/* @__PURE__ */ N("span", {
|
|
1387
1613
|
className: "vdt:font-mono",
|
|
1388
1614
|
children: e.usingIndex.name
|
|
1389
1615
|
})
|
|
1390
1616
|
]
|
|
1391
1617
|
}),
|
|
1392
|
-
/* @__PURE__ */
|
|
1618
|
+
/* @__PURE__ */ P("span", {
|
|
1393
1619
|
className: "vdt:text-foreground-subtle vdt:ml-auto",
|
|
1394
1620
|
children: [
|
|
1395
1621
|
e.subscriberCount,
|
|
@@ -1398,34 +1624,34 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1398
1624
|
]
|
|
1399
1625
|
})
|
|
1400
1626
|
]
|
|
1401
|
-
}), /* @__PURE__ */
|
|
1627
|
+
}), /* @__PURE__ */ N("div", {
|
|
1402
1628
|
className: "vdt:text-[11px] vdt:font-mono vdt:text-foreground-subtle vdt:break-all",
|
|
1403
|
-
children:
|
|
1629
|
+
children: xn(e.predicate)
|
|
1404
1630
|
})]
|
|
1405
1631
|
});
|
|
1406
|
-
},
|
|
1407
|
-
let t =
|
|
1632
|
+
}, Tn = (e) => {
|
|
1633
|
+
let t = pn(e), n = 0;
|
|
1408
1634
|
for (let e of t) n += e.response?.subscriptions.length ?? 0;
|
|
1409
1635
|
return n;
|
|
1410
|
-
},
|
|
1636
|
+
}, En = {
|
|
1411
1637
|
outgoing: [],
|
|
1412
1638
|
incoming: [],
|
|
1413
1639
|
targets: [],
|
|
1414
1640
|
deliveries: []
|
|
1415
|
-
},
|
|
1641
|
+
}, Dn = 4e3, On = async (e, t) => {
|
|
1416
1642
|
if (e === "") return null;
|
|
1417
1643
|
let n = await Q(`${e}/_voltro/inspect/webhooks`, t);
|
|
1418
1644
|
return n !== null && Array.isArray(n.outgoing) && Array.isArray(n.incoming) ? n : null;
|
|
1419
|
-
},
|
|
1420
|
-
let n = $(), r = Z(), a = t && n && e !== "", [o, s] = l(
|
|
1645
|
+
}, kn = (e, t = !0) => {
|
|
1646
|
+
let n = $(), r = Z(), a = t && n && e !== "", [o, s] = l(En);
|
|
1421
1647
|
return i(() => {
|
|
1422
1648
|
if (!a) return;
|
|
1423
1649
|
let t = !1, n = async () => {
|
|
1424
|
-
let n = await
|
|
1650
|
+
let n = await On(e, r);
|
|
1425
1651
|
t || n === null || s(n);
|
|
1426
1652
|
};
|
|
1427
1653
|
n();
|
|
1428
|
-
let i = setInterval(n,
|
|
1654
|
+
let i = setInterval(n, Dn);
|
|
1429
1655
|
return () => {
|
|
1430
1656
|
t = !0, clearInterval(i);
|
|
1431
1657
|
};
|
|
@@ -1434,17 +1660,17 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1434
1660
|
a,
|
|
1435
1661
|
r
|
|
1436
1662
|
]), o;
|
|
1437
|
-
},
|
|
1663
|
+
}, An = {
|
|
1438
1664
|
pending: "neutral",
|
|
1439
1665
|
inFlight: "info",
|
|
1440
1666
|
succeeded: "success",
|
|
1441
1667
|
failed: "danger",
|
|
1442
1668
|
retryScheduled: "warning"
|
|
1443
|
-
},
|
|
1669
|
+
}, jn = (e) => {
|
|
1444
1670
|
let t = new Date(e), n = (e) => e < 10 ? `0${e}` : String(e);
|
|
1445
1671
|
return `${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`;
|
|
1446
|
-
},
|
|
1447
|
-
let t =
|
|
1672
|
+
}, Mn = (e) => {
|
|
1673
|
+
let t = k(), n = $(), r = Z(), a = t.names.join(","), [o, s] = l(0), c = e && n;
|
|
1448
1674
|
return i(() => {
|
|
1449
1675
|
if (!c) {
|
|
1450
1676
|
s(0);
|
|
@@ -1456,11 +1682,11 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1456
1682
|
return;
|
|
1457
1683
|
}
|
|
1458
1684
|
let n = !1, i = async () => {
|
|
1459
|
-
let t = await Promise.all(e.map((e) =>
|
|
1685
|
+
let t = await Promise.all(e.map((e) => On(e, r)));
|
|
1460
1686
|
n || s(t.reduce((e, t) => e + (t === null ? 0 : t.outgoing.length + t.incoming.length + t.targets.length), 0));
|
|
1461
1687
|
};
|
|
1462
1688
|
i();
|
|
1463
|
-
let o = setInterval(i,
|
|
1689
|
+
let o = setInterval(i, Dn);
|
|
1464
1690
|
return () => {
|
|
1465
1691
|
n = !0, clearInterval(o);
|
|
1466
1692
|
};
|
|
@@ -1470,33 +1696,33 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1470
1696
|
c,
|
|
1471
1697
|
r
|
|
1472
1698
|
]), o;
|
|
1473
|
-
},
|
|
1474
|
-
let n =
|
|
1475
|
-
return n.outgoing.length + n.incoming.length + n.targets.length + n.deliveries.length > 0 ? /* @__PURE__ */
|
|
1699
|
+
}, Nn = ({ apiName: e, baseUrl: t }) => {
|
|
1700
|
+
let n = kn(t), r = H().webhooks;
|
|
1701
|
+
return n.outgoing.length + n.incoming.length + n.targets.length + n.deliveries.length > 0 ? /* @__PURE__ */ N("div", {
|
|
1476
1702
|
className: "vdt:space-y-4",
|
|
1477
|
-
children: /* @__PURE__ */
|
|
1478
|
-
Icon:
|
|
1703
|
+
children: /* @__PURE__ */ P(G, { children: [/* @__PURE__ */ N(K, {
|
|
1704
|
+
Icon: xe,
|
|
1479
1705
|
children: e
|
|
1480
|
-
}), /* @__PURE__ */
|
|
1481
|
-
n.outgoing.length > 0 ? /* @__PURE__ */
|
|
1706
|
+
}), /* @__PURE__ */ P(We, { children: [
|
|
1707
|
+
n.outgoing.length > 0 ? /* @__PURE__ */ P("div", {
|
|
1482
1708
|
className: "vdt:mb-4",
|
|
1483
|
-
children: [/* @__PURE__ */
|
|
1709
|
+
children: [/* @__PURE__ */ N("div", {
|
|
1484
1710
|
className: "vdt:text-foreground-muted vdt:text-xs vdt:uppercase vdt:tracking-wider vdt:mb-2",
|
|
1485
1711
|
children: r.outgoing(n.outgoing.length)
|
|
1486
|
-
}), /* @__PURE__ */
|
|
1712
|
+
}), /* @__PURE__ */ N("div", {
|
|
1487
1713
|
className: "vdt:space-y-1",
|
|
1488
|
-
children: n.outgoing.map((e) => /* @__PURE__ */
|
|
1714
|
+
children: n.outgoing.map((e) => /* @__PURE__ */ P("div", {
|
|
1489
1715
|
className: "vdt-record-row vdt:text-sm",
|
|
1490
1716
|
children: [
|
|
1491
|
-
/* @__PURE__ */
|
|
1717
|
+
/* @__PURE__ */ N("code", {
|
|
1492
1718
|
className: "vdt:text-foreground vdt:font-mono",
|
|
1493
1719
|
children: e.id
|
|
1494
1720
|
}),
|
|
1495
|
-
/* @__PURE__ */
|
|
1721
|
+
/* @__PURE__ */ P(W, {
|
|
1496
1722
|
tone: "neutral",
|
|
1497
1723
|
children: ["v", e.version]
|
|
1498
1724
|
}),
|
|
1499
|
-
e.description ? /* @__PURE__ */
|
|
1725
|
+
e.description ? /* @__PURE__ */ N("span", {
|
|
1500
1726
|
className: "vdt-record-description vdt:text-foreground-muted vdt:text-xs",
|
|
1501
1727
|
children: e.description
|
|
1502
1728
|
}) : null
|
|
@@ -1504,28 +1730,28 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1504
1730
|
}, e.id))
|
|
1505
1731
|
})]
|
|
1506
1732
|
}) : null,
|
|
1507
|
-
n.incoming.length > 0 ? /* @__PURE__ */
|
|
1733
|
+
n.incoming.length > 0 ? /* @__PURE__ */ P("div", {
|
|
1508
1734
|
className: "vdt:mb-4",
|
|
1509
|
-
children: [/* @__PURE__ */
|
|
1735
|
+
children: [/* @__PURE__ */ N("div", {
|
|
1510
1736
|
className: "vdt:text-foreground-muted vdt:text-xs vdt:uppercase vdt:tracking-wider vdt:mb-2",
|
|
1511
1737
|
children: r.incoming(n.incoming.length)
|
|
1512
|
-
}), /* @__PURE__ */
|
|
1738
|
+
}), /* @__PURE__ */ N("div", {
|
|
1513
1739
|
className: "vdt:space-y-1",
|
|
1514
|
-
children: n.incoming.map((e) => /* @__PURE__ */
|
|
1740
|
+
children: n.incoming.map((e) => /* @__PURE__ */ P("div", {
|
|
1515
1741
|
className: "vdt-record-row vdt:text-sm",
|
|
1516
1742
|
children: [
|
|
1517
|
-
/* @__PURE__ */
|
|
1743
|
+
/* @__PURE__ */ N("code", {
|
|
1518
1744
|
className: "vdt:text-foreground vdt:font-mono",
|
|
1519
1745
|
children: e.path
|
|
1520
1746
|
}),
|
|
1521
|
-
e.provider ? /* @__PURE__ */
|
|
1747
|
+
e.provider ? /* @__PURE__ */ N(W, {
|
|
1522
1748
|
tone: "info",
|
|
1523
1749
|
children: e.provider
|
|
1524
1750
|
}) : null,
|
|
1525
|
-
e.signatureConfigured ? /* @__PURE__ */
|
|
1751
|
+
e.signatureConfigured ? /* @__PURE__ */ N(W, {
|
|
1526
1752
|
tone: "success",
|
|
1527
1753
|
children: r.signed
|
|
1528
|
-
}) : /* @__PURE__ */
|
|
1754
|
+
}) : /* @__PURE__ */ N(W, {
|
|
1529
1755
|
tone: "warning",
|
|
1530
1756
|
children: r.unsigned
|
|
1531
1757
|
})
|
|
@@ -1533,41 +1759,41 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1533
1759
|
}, e.id))
|
|
1534
1760
|
})]
|
|
1535
1761
|
}) : null,
|
|
1536
|
-
n.targets.length > 0 ? /* @__PURE__ */
|
|
1762
|
+
n.targets.length > 0 ? /* @__PURE__ */ P("div", {
|
|
1537
1763
|
className: "vdt:mb-4",
|
|
1538
|
-
children: [/* @__PURE__ */
|
|
1764
|
+
children: [/* @__PURE__ */ N("div", {
|
|
1539
1765
|
className: "vdt:text-foreground-muted vdt:text-xs vdt:uppercase vdt:tracking-wider vdt:mb-2",
|
|
1540
1766
|
children: r.targets(n.targets.length)
|
|
1541
|
-
}), /* @__PURE__ */
|
|
1767
|
+
}), /* @__PURE__ */ N("div", {
|
|
1542
1768
|
className: "vdt:space-y-1",
|
|
1543
1769
|
children: n.targets.map((e) => {
|
|
1544
1770
|
let t = n.outgoing.find((t) => t.id === e.event)?.version ?? e.payloadVersion, i = e.payloadVersion === t ? "current" : e.payloadVersion < t ? "behind" : "ahead";
|
|
1545
|
-
return /* @__PURE__ */
|
|
1771
|
+
return /* @__PURE__ */ P("div", {
|
|
1546
1772
|
className: "vdt-record-row vdt:text-sm",
|
|
1547
1773
|
children: [
|
|
1548
|
-
/* @__PURE__ */
|
|
1774
|
+
/* @__PURE__ */ N("code", {
|
|
1549
1775
|
className: "vdt:text-foreground vdt:font-mono",
|
|
1550
1776
|
children: e.event
|
|
1551
1777
|
}),
|
|
1552
|
-
/* @__PURE__ */
|
|
1778
|
+
/* @__PURE__ */ N("span", {
|
|
1553
1779
|
className: "vdt:text-foreground-muted",
|
|
1554
1780
|
children: "→"
|
|
1555
1781
|
}),
|
|
1556
|
-
/* @__PURE__ */
|
|
1782
|
+
/* @__PURE__ */ N("span", {
|
|
1557
1783
|
className: "vdt:text-foreground vdt:text-xs vdt:truncate vdt:max-w-72",
|
|
1558
1784
|
children: e.url
|
|
1559
1785
|
}),
|
|
1560
|
-
e.active ? /* @__PURE__ */
|
|
1786
|
+
e.active ? /* @__PURE__ */ N(W, {
|
|
1561
1787
|
tone: "success",
|
|
1562
1788
|
children: r.active
|
|
1563
|
-
}) : /* @__PURE__ */
|
|
1789
|
+
}) : /* @__PURE__ */ N(W, {
|
|
1564
1790
|
tone: "warning",
|
|
1565
1791
|
children: r.paused
|
|
1566
1792
|
}),
|
|
1567
|
-
i === "current" ? /* @__PURE__ */
|
|
1793
|
+
i === "current" ? /* @__PURE__ */ P(W, {
|
|
1568
1794
|
tone: "neutral",
|
|
1569
1795
|
children: ["v", e.payloadVersion]
|
|
1570
|
-
}) : i === "behind" ? /* @__PURE__ */
|
|
1796
|
+
}) : i === "behind" ? /* @__PURE__ */ P(W, {
|
|
1571
1797
|
tone: "warning",
|
|
1572
1798
|
children: [
|
|
1573
1799
|
"v",
|
|
@@ -1575,7 +1801,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1575
1801
|
" ← current v",
|
|
1576
1802
|
t
|
|
1577
1803
|
]
|
|
1578
|
-
}) : /* @__PURE__ */
|
|
1804
|
+
}) : /* @__PURE__ */ P(W, {
|
|
1579
1805
|
tone: "danger",
|
|
1580
1806
|
children: [
|
|
1581
1807
|
"v",
|
|
@@ -1589,39 +1815,39 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1589
1815
|
})
|
|
1590
1816
|
})]
|
|
1591
1817
|
}) : null,
|
|
1592
|
-
n.deliveries.length > 0 ? /* @__PURE__ */
|
|
1818
|
+
n.deliveries.length > 0 ? /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("div", {
|
|
1593
1819
|
className: "vdt:text-foreground-muted vdt:text-xs vdt:uppercase vdt:tracking-wider vdt:mb-2",
|
|
1594
1820
|
children: r.deliveries(n.deliveries.length)
|
|
1595
|
-
}), /* @__PURE__ */
|
|
1821
|
+
}), /* @__PURE__ */ N("div", {
|
|
1596
1822
|
className: "vdt:space-y-0.5 vdt:font-mono vdt:text-xs",
|
|
1597
|
-
children: n.deliveries.map((e) => /* @__PURE__ */
|
|
1823
|
+
children: n.deliveries.map((e) => /* @__PURE__ */ P("div", {
|
|
1598
1824
|
className: "vdt:flex vdt:items-center vdt:gap-2",
|
|
1599
1825
|
children: [
|
|
1600
|
-
/* @__PURE__ */
|
|
1826
|
+
/* @__PURE__ */ N("span", {
|
|
1601
1827
|
className: "vdt:text-foreground-subtle",
|
|
1602
|
-
children:
|
|
1828
|
+
children: jn(e.scheduledAt)
|
|
1603
1829
|
}),
|
|
1604
|
-
/* @__PURE__ */
|
|
1830
|
+
/* @__PURE__ */ N("span", {
|
|
1605
1831
|
className: "vdt:text-foreground vdt:min-w-32 vdt:truncate",
|
|
1606
1832
|
children: e.event
|
|
1607
1833
|
}),
|
|
1608
|
-
/* @__PURE__ */
|
|
1609
|
-
tone:
|
|
1834
|
+
/* @__PURE__ */ N(W, {
|
|
1835
|
+
tone: An[e.status],
|
|
1610
1836
|
children: e.status
|
|
1611
1837
|
}),
|
|
1612
|
-
e.responseStatus === null ? null : /* @__PURE__ */
|
|
1838
|
+
e.responseStatus === null ? null : /* @__PURE__ */ N("span", {
|
|
1613
1839
|
className: "vdt:text-foreground-muted",
|
|
1614
1840
|
children: e.responseStatus
|
|
1615
1841
|
}),
|
|
1616
|
-
e.latencyMs === null ? null : /* @__PURE__ */
|
|
1842
|
+
e.latencyMs === null ? null : /* @__PURE__ */ P("span", {
|
|
1617
1843
|
className: "vdt:text-foreground-subtle",
|
|
1618
1844
|
children: [e.latencyMs, "ms"]
|
|
1619
1845
|
}),
|
|
1620
|
-
/* @__PURE__ */
|
|
1846
|
+
/* @__PURE__ */ N("span", {
|
|
1621
1847
|
className: "vdt:text-foreground-subtle",
|
|
1622
1848
|
children: r.attempt(e.attempt)
|
|
1623
1849
|
}),
|
|
1624
|
-
e.errorMessage ? /* @__PURE__ */
|
|
1850
|
+
e.errorMessage ? /* @__PURE__ */ N("span", {
|
|
1625
1851
|
className: "vdt:text-danger vdt:truncate vdt:max-w-64",
|
|
1626
1852
|
children: e.errorMessage
|
|
1627
1853
|
}) : null
|
|
@@ -1630,75 +1856,80 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1630
1856
|
})] }) : null
|
|
1631
1857
|
] })] })
|
|
1632
1858
|
}) : null;
|
|
1633
|
-
},
|
|
1634
|
-
let e =
|
|
1635
|
-
return e.names.length === 0 ? /* @__PURE__ */
|
|
1859
|
+
}, Pn = () => {
|
|
1860
|
+
let e = k(), t = H().webhooks;
|
|
1861
|
+
return e.names.length === 0 ? /* @__PURE__ */ N(J, { children: t.empty }) : /* @__PURE__ */ N("div", {
|
|
1636
1862
|
className: "vdt:space-y-4 vdt:p-3",
|
|
1637
1863
|
children: e.names.map((t) => {
|
|
1638
1864
|
let n = e.get(t);
|
|
1639
|
-
return /* @__PURE__ */
|
|
1865
|
+
return /* @__PURE__ */ N(Nn, {
|
|
1640
1866
|
apiName: t,
|
|
1641
1867
|
baseUrl: n.inspectBaseUrl
|
|
1642
1868
|
}, t);
|
|
1643
1869
|
})
|
|
1644
1870
|
});
|
|
1645
|
-
},
|
|
1646
|
-
let n = `${e}/_voltro/inspect/stream?channels=${encodeURIComponent(t.channels.join(","))}`, r = !1, i =
|
|
1871
|
+
}, Fn = (e, t) => {
|
|
1872
|
+
let n = `${e}/_voltro/inspect/stream?channels=${encodeURIComponent(t.channels.join(","))}`, r = !1, i = !1, a = 0, o, s, c = async () => {
|
|
1647
1873
|
if (r) return;
|
|
1648
|
-
|
|
1649
|
-
|
|
1874
|
+
if (Vt(e) !== void 0) {
|
|
1875
|
+
i = !0;
|
|
1876
|
+
return;
|
|
1877
|
+
}
|
|
1878
|
+
o = new AbortController();
|
|
1879
|
+
let l;
|
|
1650
1880
|
try {
|
|
1651
|
-
let
|
|
1652
|
-
headers:
|
|
1653
|
-
signal:
|
|
1881
|
+
let s = await fetch(n, {
|
|
1882
|
+
headers: nn(t.token, { accept: "text/event-stream" }),
|
|
1883
|
+
signal: o.signal
|
|
1654
1884
|
});
|
|
1655
|
-
if (
|
|
1885
|
+
if (qt(s.status)) throw Ut(await Jt(e, s)), i = !0, Error(`inspect stream refused (HTTP ${s.status})`);
|
|
1886
|
+
if (!s.ok || s.body === null) throw Error(`inspect stream HTTP ${s.status}`);
|
|
1656
1887
|
if (r) {
|
|
1657
|
-
await
|
|
1888
|
+
await s.body.cancel();
|
|
1658
1889
|
return;
|
|
1659
1890
|
}
|
|
1660
|
-
|
|
1661
|
-
let
|
|
1891
|
+
a = 0, l = s.body.getReader();
|
|
1892
|
+
let c = new TextDecoder(), u = "";
|
|
1662
1893
|
for (; !r;) {
|
|
1663
|
-
let { done:
|
|
1664
|
-
if (
|
|
1665
|
-
if (
|
|
1666
|
-
let
|
|
1667
|
-
for (; (
|
|
1668
|
-
let e =
|
|
1669
|
-
|
|
1894
|
+
let { done: e, value: n } = await l.read();
|
|
1895
|
+
if (e) break;
|
|
1896
|
+
if (u = (u + c.decode(n, { stream: !0 })).replace(/\r\n/g, "\n"), u.length > 1048576) throw Error("inspect stream event exceeds the size limit");
|
|
1897
|
+
let r;
|
|
1898
|
+
for (; (r = u.indexOf("\n\n")) !== -1;) {
|
|
1899
|
+
let e = u.slice(0, r);
|
|
1900
|
+
u = u.slice(r + 2);
|
|
1670
1901
|
let n = e.split("\n").filter((e) => e.startsWith("data:")).map((e) => e.slice(5).replace(/^ /, "")).join("\n");
|
|
1671
1902
|
if (n === "") continue;
|
|
1672
|
-
let
|
|
1903
|
+
let i;
|
|
1673
1904
|
try {
|
|
1674
|
-
|
|
1905
|
+
i = JSON.parse(n);
|
|
1675
1906
|
} catch {
|
|
1676
1907
|
continue;
|
|
1677
1908
|
}
|
|
1678
|
-
typeof
|
|
1909
|
+
typeof i == "object" && i && typeof i.channel == "string" && t.onEvent(i);
|
|
1679
1910
|
}
|
|
1680
1911
|
}
|
|
1681
1912
|
if (!r) throw Error("inspect stream disconnected");
|
|
1682
1913
|
} catch (e) {
|
|
1683
1914
|
r || t.onError?.(e instanceof Error ? e : Error(String(e)));
|
|
1684
1915
|
} finally {
|
|
1685
|
-
await
|
|
1916
|
+
await l?.cancel().catch(() => void 0), l?.releaseLock(), o.abort();
|
|
1686
1917
|
}
|
|
1687
|
-
if (!r) {
|
|
1688
|
-
let e = Math.min(3e4, 1e3 * 2 **
|
|
1689
|
-
|
|
1690
|
-
|
|
1918
|
+
if (!r && !i) {
|
|
1919
|
+
let e = Math.min(3e4, 1e3 * 2 ** a);
|
|
1920
|
+
a = Math.min(a + 1, 5), s = setTimeout(() => {
|
|
1921
|
+
c();
|
|
1691
1922
|
}, e);
|
|
1692
1923
|
}
|
|
1693
1924
|
};
|
|
1694
|
-
return
|
|
1695
|
-
r = !0, clearTimeout(
|
|
1925
|
+
return c(), { close: () => {
|
|
1926
|
+
r = !0, clearTimeout(s), o?.abort();
|
|
1696
1927
|
} };
|
|
1697
|
-
},
|
|
1928
|
+
}, In = (e, t, n, r = 250) => {
|
|
1698
1929
|
let [a, o] = l(0), s = t.join(",");
|
|
1699
1930
|
return i(() => {
|
|
1700
1931
|
if (!n || e === "") return;
|
|
1701
|
-
let t = new Set(s.split(",")), i, a = !1, c =
|
|
1932
|
+
let t = new Set(s.split(",")), i, a = !1, c = Fn(e, {
|
|
1702
1933
|
channels: s.split(","),
|
|
1703
1934
|
token: null,
|
|
1704
1935
|
onEvent: (e) => {
|
|
@@ -1716,7 +1947,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1716
1947
|
n,
|
|
1717
1948
|
r
|
|
1718
1949
|
]), a;
|
|
1719
|
-
},
|
|
1950
|
+
}, Ln = {
|
|
1720
1951
|
queued: "neutral",
|
|
1721
1952
|
running: "info",
|
|
1722
1953
|
succeeded: "success",
|
|
@@ -1724,36 +1955,36 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1724
1955
|
cancelled: "warning",
|
|
1725
1956
|
paused: "accent",
|
|
1726
1957
|
suspended: "accent"
|
|
1727
|
-
},
|
|
1958
|
+
}, Rn = {
|
|
1728
1959
|
running: "info",
|
|
1729
1960
|
succeeded: "success",
|
|
1730
1961
|
failed: "danger"
|
|
1731
|
-
},
|
|
1962
|
+
}, zn = 50, Bn = 1e4, Vn = (e) => e == null ? "—" : e < 1e3 ? `${Math.round(e)}ms` : e < 6e4 ? `${(e / 1e3).toFixed(e < 1e4 ? 2 : 1)}s` : `${Math.floor(e / 6e4)}m ${Math.floor(e % 6e4 / 1e3)}s`, Hn = (e) => {
|
|
1732
1963
|
let t = new Date(e), n = (e) => e < 10 ? `0${e}` : String(e);
|
|
1733
1964
|
return `${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`;
|
|
1734
|
-
},
|
|
1965
|
+
}, Un = (e) => {
|
|
1735
1966
|
try {
|
|
1736
1967
|
return JSON.stringify(e, null, 2);
|
|
1737
1968
|
} catch {
|
|
1738
1969
|
return String(e);
|
|
1739
1970
|
}
|
|
1740
|
-
},
|
|
1971
|
+
}, Wn = (e) => e === "running" || e === "queued", Gn = (e, t) => e.durationMs ?? (Wn(e.status) ? t - new Date(e.startedAt).getTime() : null), Kn = (e) => {
|
|
1741
1972
|
let t = /* @__PURE__ */ new Set();
|
|
1742
1973
|
for (let n of e) {
|
|
1743
1974
|
let e = n.payload?.signalName;
|
|
1744
1975
|
typeof e == "string" && (n.eventType === "signal-awaited" && t.add(e), n.eventType === "signal-received" && t.delete(e));
|
|
1745
1976
|
}
|
|
1746
1977
|
return [...t];
|
|
1747
|
-
},
|
|
1978
|
+
}, qn = async (e, t) => {
|
|
1748
1979
|
if (e === "") return null;
|
|
1749
|
-
let n = await Q(`${e}/_voltro/inspect/workflows/runs?limit=${
|
|
1980
|
+
let n = await Q(`${e}/_voltro/inspect/workflows/runs?limit=${zn}`, t);
|
|
1750
1981
|
return n !== null && Array.isArray(n.runs) ? n.runs : null;
|
|
1751
|
-
},
|
|
1752
|
-
let t = $(), n = Z(), r = t && e !== "", a =
|
|
1982
|
+
}, Jn = (e) => {
|
|
1983
|
+
let t = $(), n = Z(), r = t && e !== "", a = In(e, ["workflowRuns"], r), [o, s] = l([]), [c, u] = l(!1);
|
|
1753
1984
|
return i(() => {
|
|
1754
1985
|
if (!r) return;
|
|
1755
1986
|
let t = !1, i = async () => {
|
|
1756
|
-
let r = await
|
|
1987
|
+
let r = await qn(e, n);
|
|
1757
1988
|
if (!t) {
|
|
1758
1989
|
if (r === null) {
|
|
1759
1990
|
u(!0);
|
|
@@ -1763,7 +1994,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1763
1994
|
}
|
|
1764
1995
|
};
|
|
1765
1996
|
i();
|
|
1766
|
-
let a = setInterval(i,
|
|
1997
|
+
let a = setInterval(i, Bn);
|
|
1767
1998
|
return () => {
|
|
1768
1999
|
t = !0, clearInterval(a);
|
|
1769
2000
|
};
|
|
@@ -1776,8 +2007,8 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1776
2007
|
runs: o,
|
|
1777
2008
|
failed: c
|
|
1778
2009
|
};
|
|
1779
|
-
},
|
|
1780
|
-
let n = $(), r = Z(), a =
|
|
2010
|
+
}, Yn = (e, t) => {
|
|
2011
|
+
let n = $(), r = Z(), a = In(e, ["workflowSteps", "workflowEvents"], n && e !== ""), [o, s] = l([]), [c, u] = l([]);
|
|
1781
2012
|
return i(() => {
|
|
1782
2013
|
if (!n || e === "") return;
|
|
1783
2014
|
let i = !1, a = `${e}/_voltro/inspect/workflows/runs/${encodeURIComponent(t)}`, o = async () => {
|
|
@@ -1785,7 +2016,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1785
2016
|
i || (e !== null && Array.isArray(e.steps) && s(e.steps), t !== null && Array.isArray(t.events) && u(t.events));
|
|
1786
2017
|
};
|
|
1787
2018
|
o();
|
|
1788
|
-
let c = setInterval(o,
|
|
2019
|
+
let c = setInterval(o, Bn);
|
|
1789
2020
|
return () => {
|
|
1790
2021
|
i = !0, clearInterval(c);
|
|
1791
2022
|
};
|
|
@@ -1799,8 +2030,8 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1799
2030
|
steps: o,
|
|
1800
2031
|
events: c
|
|
1801
2032
|
};
|
|
1802
|
-
},
|
|
1803
|
-
let t =
|
|
2033
|
+
}, Xn = (e) => {
|
|
2034
|
+
let t = k(), n = $(), r = Z(), a = t.names.join(","), [o, s] = l(0), c = e && n, u = In(a === "" ? "" : t.get(a.split(",")[0]).inspectBaseUrl ?? "", ["workflowRuns"], c);
|
|
1804
2035
|
return i(() => {
|
|
1805
2036
|
if (!c) {
|
|
1806
2037
|
s(0);
|
|
@@ -1812,11 +2043,11 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1812
2043
|
return;
|
|
1813
2044
|
}
|
|
1814
2045
|
let n = !1, i = async () => {
|
|
1815
|
-
let t = await Promise.all(e.map((e) =>
|
|
1816
|
-
n || s(t.reduce((e, t) => e + (t === null ? 0 : t.filter((e) =>
|
|
2046
|
+
let t = await Promise.all(e.map((e) => qn(e, r)));
|
|
2047
|
+
n || s(t.reduce((e, t) => e + (t === null ? 0 : t.filter((e) => Wn(e.status)).length), 0));
|
|
1817
2048
|
};
|
|
1818
2049
|
i();
|
|
1819
|
-
let o = setInterval(i,
|
|
2050
|
+
let o = setInterval(i, Bn);
|
|
1820
2051
|
return () => {
|
|
1821
2052
|
n = !0, clearInterval(o);
|
|
1822
2053
|
};
|
|
@@ -1827,87 +2058,87 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1827
2058
|
r,
|
|
1828
2059
|
u
|
|
1829
2060
|
]), o;
|
|
1830
|
-
},
|
|
1831
|
-
let e =
|
|
1832
|
-
return e.names.length === 0 ? /* @__PURE__ */
|
|
2061
|
+
}, Zn = () => {
|
|
2062
|
+
let e = k(), t = H().workflows;
|
|
2063
|
+
return e.names.length === 0 ? /* @__PURE__ */ N(J, { children: t.noApi }) : /* @__PURE__ */ N("div", {
|
|
1833
2064
|
className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
|
|
1834
|
-
children: e.names.map((e) => /* @__PURE__ */
|
|
2065
|
+
children: e.names.map((e) => /* @__PURE__ */ N(Qn, { apiName: e }, e))
|
|
1835
2066
|
});
|
|
1836
|
-
},
|
|
1837
|
-
let t =
|
|
2067
|
+
}, Qn = ({ apiName: e }) => {
|
|
2068
|
+
let t = k(), n = H().workflows, r = t.get(e), a = r.inspectBaseUrl, o = s(() => Object.entries(r.descriptors).filter(([, e]) => e.kind === "workflow").map(([e]) => e).sort(), [r.descriptors]), { runs: c, failed: u } = Jn(a), d = c.filter((e) => Wn(e.status)).length, [f, p] = l(null), [m, h] = l(() => Date.now());
|
|
1838
2069
|
return i(() => {
|
|
1839
2070
|
if (d === 0) return;
|
|
1840
2071
|
let e = setInterval(() => h(Date.now()), 1e3);
|
|
1841
2072
|
return () => clearInterval(e);
|
|
1842
|
-
}, [d]), /* @__PURE__ */
|
|
1843
|
-
/* @__PURE__ */
|
|
1844
|
-
Icon:
|
|
1845
|
-
right: d > 0 ? /* @__PURE__ */
|
|
2073
|
+
}, [d]), /* @__PURE__ */ P(G, { children: [
|
|
2074
|
+
/* @__PURE__ */ N(K, {
|
|
2075
|
+
Icon: Se,
|
|
2076
|
+
right: d > 0 ? /* @__PURE__ */ N(W, {
|
|
1846
2077
|
tone: "info",
|
|
1847
2078
|
children: n.runningBadge(d)
|
|
1848
|
-
}) : /* @__PURE__ */
|
|
2079
|
+
}) : /* @__PURE__ */ N(W, {
|
|
1849
2080
|
tone: "neutral",
|
|
1850
2081
|
children: n.runsBadge(c.length)
|
|
1851
2082
|
}),
|
|
1852
2083
|
children: e
|
|
1853
2084
|
}),
|
|
1854
|
-
/* @__PURE__ */
|
|
2085
|
+
/* @__PURE__ */ N($n, {
|
|
1855
2086
|
apiName: e,
|
|
1856
2087
|
definitions: o,
|
|
1857
2088
|
runs: c
|
|
1858
2089
|
}),
|
|
1859
|
-
/* @__PURE__ */
|
|
2090
|
+
/* @__PURE__ */ P("div", {
|
|
1860
2091
|
className: "vdt:px-3 vdt:py-2 vdt:border-t vdt:border-border",
|
|
1861
|
-
children: [/* @__PURE__ */
|
|
2092
|
+
children: [/* @__PURE__ */ N("div", {
|
|
1862
2093
|
className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:mb-1.5",
|
|
1863
2094
|
children: n.runs(c.length)
|
|
1864
|
-
}), u ? /* @__PURE__ */
|
|
2095
|
+
}), u ? /* @__PURE__ */ N("div", {
|
|
1865
2096
|
className: "vdt:text-xs vdt:text-danger",
|
|
1866
2097
|
children: n.runsUnavailable
|
|
1867
|
-
}) : c.length === 0 ? /* @__PURE__ */
|
|
2098
|
+
}) : c.length === 0 ? /* @__PURE__ */ N("div", {
|
|
1868
2099
|
className: "vdt:text-xs vdt:text-foreground-subtle",
|
|
1869
2100
|
children: o.length === 0 ? n.noDefinitions : n.noRuns
|
|
1870
|
-
}) : /* @__PURE__ */
|
|
2101
|
+
}) : /* @__PURE__ */ N("div", {
|
|
1871
2102
|
className: "vdt:flex vdt:flex-col vdt:gap-0.5",
|
|
1872
|
-
children: c.map((e) => /* @__PURE__ */
|
|
2103
|
+
children: c.map((e) => /* @__PURE__ */ P("div", {
|
|
1873
2104
|
"data-run-id": e.id,
|
|
1874
2105
|
"data-run-status": e.status,
|
|
1875
|
-
children: [/* @__PURE__ */
|
|
2106
|
+
children: [/* @__PURE__ */ P("button", {
|
|
1876
2107
|
type: "button",
|
|
1877
2108
|
"aria-expanded": f === e.id,
|
|
1878
2109
|
onClick: () => p(f === e.id ? null : e.id),
|
|
1879
2110
|
className: "vdt:w-full vdt:flex vdt:items-center vdt:gap-2 vdt:text-left vdt:text-xs vdt:px-1.5 vdt:py-1 vdt:rounded-sm vdt:hover:bg-muted",
|
|
1880
2111
|
children: [
|
|
1881
|
-
/* @__PURE__ */
|
|
2112
|
+
/* @__PURE__ */ N("span", {
|
|
1882
2113
|
className: "vdt:text-foreground-subtle vdt:w-2",
|
|
1883
2114
|
children: f === e.id ? "▾" : "▸"
|
|
1884
2115
|
}),
|
|
1885
|
-
/* @__PURE__ */
|
|
1886
|
-
tone:
|
|
2116
|
+
/* @__PURE__ */ N(W, {
|
|
2117
|
+
tone: Ln[e.status] ?? "neutral",
|
|
1887
2118
|
children: e.status
|
|
1888
2119
|
}),
|
|
1889
|
-
/* @__PURE__ */
|
|
2120
|
+
/* @__PURE__ */ N("code", {
|
|
1890
2121
|
className: "vdt:font-mono vdt:text-foreground vdt:truncate",
|
|
1891
2122
|
children: e.tag
|
|
1892
2123
|
}),
|
|
1893
|
-
e.parentExecutionId === null ? null : /* @__PURE__ */
|
|
2124
|
+
e.parentExecutionId === null ? null : /* @__PURE__ */ N(W, {
|
|
1894
2125
|
tone: "neutral",
|
|
1895
2126
|
children: n.child
|
|
1896
2127
|
}),
|
|
1897
|
-
e.errorMessage === null ? null : /* @__PURE__ */
|
|
2128
|
+
e.errorMessage === null ? null : /* @__PURE__ */ P("span", {
|
|
1898
2129
|
className: "vdt:text-danger vdt:truncate vdt:font-mono vdt:text-[11px]",
|
|
1899
2130
|
children: [e.errorTag === null ? "" : `${e.errorTag} · `, e.errorMessage]
|
|
1900
2131
|
}),
|
|
1901
|
-
/* @__PURE__ */
|
|
2132
|
+
/* @__PURE__ */ N("span", {
|
|
1902
2133
|
className: "vdt:ml-auto vdt:tabular-nums vdt:text-foreground-muted vdt:whitespace-nowrap",
|
|
1903
|
-
children:
|
|
2134
|
+
children: Vn(Gn(e, m))
|
|
1904
2135
|
}),
|
|
1905
|
-
/* @__PURE__ */
|
|
2136
|
+
/* @__PURE__ */ N("span", {
|
|
1906
2137
|
className: "vdt:tabular-nums vdt:text-foreground-subtle vdt:whitespace-nowrap",
|
|
1907
|
-
children:
|
|
2138
|
+
children: Hn(e.startedAt)
|
|
1908
2139
|
})
|
|
1909
2140
|
]
|
|
1910
|
-
}), f === e.id ? /* @__PURE__ */
|
|
2141
|
+
}), f === e.id ? /* @__PURE__ */ N(er, {
|
|
1911
2142
|
baseUrl: a,
|
|
1912
2143
|
run: e
|
|
1913
2144
|
}) : null]
|
|
@@ -1915,19 +2146,19 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1915
2146
|
})]
|
|
1916
2147
|
})
|
|
1917
2148
|
] });
|
|
1918
|
-
},
|
|
1919
|
-
let r =
|
|
2149
|
+
}, $n = ({ apiName: e, definitions: t, runs: n }) => {
|
|
2150
|
+
let r = H().workflows, [a, o] = l(t[0] ?? "");
|
|
1920
2151
|
i(() => {
|
|
1921
2152
|
a === "" && t.length > 0 && o(t[0]);
|
|
1922
2153
|
}, [t, a]);
|
|
1923
2154
|
let c = s(() => {
|
|
1924
2155
|
let e = n.find((e) => e.tag === a);
|
|
1925
|
-
return e === void 0 ? "{}" :
|
|
2156
|
+
return e === void 0 ? "{}" : Un(e.payload);
|
|
1926
2157
|
}, [n, a]), [u, d] = l(c), [f, p] = l(!1);
|
|
1927
2158
|
i(() => {
|
|
1928
2159
|
f || d(c);
|
|
1929
2160
|
}, [c, f]);
|
|
1930
|
-
let [m, h] = l(null), g =
|
|
2161
|
+
let [m, h] = l(null), g = j(e, a === "" ? "__voltro.devtools.none" : a);
|
|
1931
2162
|
if (t.length === 0) return null;
|
|
1932
2163
|
let _ = async () => {
|
|
1933
2164
|
let e;
|
|
@@ -1954,30 +2185,30 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1954
2185
|
});
|
|
1955
2186
|
}
|
|
1956
2187
|
};
|
|
1957
|
-
return /* @__PURE__ */
|
|
2188
|
+
return /* @__PURE__ */ P("div", {
|
|
1958
2189
|
className: "vdt:px-3 vdt:py-2 vdt:flex vdt:flex-col vdt:gap-1.5",
|
|
1959
2190
|
children: [
|
|
1960
|
-
/* @__PURE__ */
|
|
2191
|
+
/* @__PURE__ */ P("div", {
|
|
1961
2192
|
className: "vdt:flex vdt:items-center vdt:gap-2",
|
|
1962
2193
|
children: [
|
|
1963
|
-
/* @__PURE__ */
|
|
2194
|
+
/* @__PURE__ */ N("span", {
|
|
1964
2195
|
className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider",
|
|
1965
2196
|
children: r.start
|
|
1966
2197
|
}),
|
|
1967
|
-
/* @__PURE__ */
|
|
2198
|
+
/* @__PURE__ */ N("select", {
|
|
1968
2199
|
"aria-label": r.workflowLabel,
|
|
1969
2200
|
value: a,
|
|
1970
2201
|
onChange: (e) => {
|
|
1971
2202
|
o(e.target.value), p(!1), h(null);
|
|
1972
2203
|
},
|
|
1973
2204
|
className: "vdt:text-xs vdt:font-mono vdt:bg-background vdt:border vdt:border-border vdt:rounded-sm vdt:px-1.5 vdt:py-0.5 vdt:text-foreground",
|
|
1974
|
-
children: t.map((e) => /* @__PURE__ */
|
|
2205
|
+
children: t.map((e) => /* @__PURE__ */ N("option", {
|
|
1975
2206
|
value: e,
|
|
1976
2207
|
children: e
|
|
1977
2208
|
}, e))
|
|
1978
2209
|
}),
|
|
1979
|
-
/* @__PURE__ */
|
|
1980
|
-
/* @__PURE__ */
|
|
2210
|
+
/* @__PURE__ */ N("span", { className: "vdt:sp" }),
|
|
2211
|
+
/* @__PURE__ */ N(U, {
|
|
1981
2212
|
onClick: () => {
|
|
1982
2213
|
_();
|
|
1983
2214
|
},
|
|
@@ -1986,7 +2217,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1986
2217
|
})
|
|
1987
2218
|
]
|
|
1988
2219
|
}),
|
|
1989
|
-
/* @__PURE__ */
|
|
2220
|
+
/* @__PURE__ */ N("textarea", {
|
|
1990
2221
|
"aria-label": r.payloadLabel,
|
|
1991
2222
|
value: u,
|
|
1992
2223
|
onChange: (e) => {
|
|
@@ -1996,19 +2227,19 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1996
2227
|
rows: Math.min(8, Math.max(2, u.split("\n").length)),
|
|
1997
2228
|
className: "vdt:w-full vdt:text-[11px] vdt:font-mono vdt:bg-background vdt:border vdt:border-border vdt:rounded-sm vdt:px-2 vdt:py-1 vdt:text-foreground vdt:resize-y"
|
|
1998
2229
|
}),
|
|
1999
|
-
/* @__PURE__ */
|
|
2230
|
+
/* @__PURE__ */ N("div", {
|
|
2000
2231
|
className: "vdt:text-[10px] vdt:text-foreground-subtle",
|
|
2001
2232
|
children: r.payloadHint
|
|
2002
2233
|
}),
|
|
2003
|
-
m === null ? null : /* @__PURE__ */
|
|
2234
|
+
m === null ? null : /* @__PURE__ */ N("div", {
|
|
2004
2235
|
role: m.tone === "danger" ? "alert" : "status",
|
|
2005
2236
|
className: `vdt:text-xs ${m.tone === "danger" ? "vdt:text-danger" : "vdt:text-success"}`,
|
|
2006
2237
|
children: m.text
|
|
2007
2238
|
})
|
|
2008
2239
|
]
|
|
2009
2240
|
});
|
|
2010
|
-
},
|
|
2011
|
-
let n =
|
|
2241
|
+
}, er = ({ baseUrl: e, run: t }) => {
|
|
2242
|
+
let n = H().workflows, r = Z(), { steps: a, events: o } = Yn(e, t.id), c = s(() => Kn(o), [o]), [u, d] = l(""), [f, p] = l("{}"), [m, h] = l(!1), [g, _] = l(null);
|
|
2012
2243
|
i(() => {
|
|
2013
2244
|
u === "" && c.length > 0 && d(c[0]);
|
|
2014
2245
|
}, [c, u]);
|
|
@@ -2028,7 +2259,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2028
2259
|
h(!1);
|
|
2029
2260
|
}
|
|
2030
2261
|
}, C = () => S(n.cancel, async () => {
|
|
2031
|
-
let e = await
|
|
2262
|
+
let e = await sn(`${x}/cancel`, r, {});
|
|
2032
2263
|
return n.cancelResult(typeof e.kind == "string" ? e.kind : e.cancelled === !0 ? "confirmed" : "submitted");
|
|
2033
2264
|
}), w = () => S(n.sendSignal, async () => {
|
|
2034
2265
|
let e;
|
|
@@ -2037,20 +2268,20 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2037
2268
|
} catch (e) {
|
|
2038
2269
|
throw Error(n.invalidJson(e instanceof Error ? e.message : String(e)));
|
|
2039
2270
|
}
|
|
2040
|
-
return await
|
|
2271
|
+
return await sn(`${x}/signal`, r, e === void 0 ? { signalName: u } : {
|
|
2041
2272
|
signalName: u,
|
|
2042
2273
|
payload: e
|
|
2043
2274
|
}), n.signalSent(u);
|
|
2044
2275
|
});
|
|
2045
|
-
return /* @__PURE__ */
|
|
2276
|
+
return /* @__PURE__ */ P("div", {
|
|
2046
2277
|
className: "vdt:ml-4 vdt:pl-2 vdt:border-l vdt:border-border vdt:py-1 vdt:flex vdt:flex-col vdt:gap-2 vdt:text-xs",
|
|
2047
2278
|
children: [
|
|
2048
|
-
/* @__PURE__ */
|
|
2279
|
+
/* @__PURE__ */ P("div", {
|
|
2049
2280
|
className: "vdt:grid vdt:grid-cols-1 vdt:sm:grid-cols-2 vdt:gap-2",
|
|
2050
|
-
children: [/* @__PURE__ */
|
|
2281
|
+
children: [/* @__PURE__ */ N(tr, {
|
|
2051
2282
|
label: n.payloadLabel,
|
|
2052
2283
|
value: t.payload
|
|
2053
|
-
}), /* @__PURE__ */
|
|
2284
|
+
}), /* @__PURE__ */ N(tr, {
|
|
2054
2285
|
label: t.status === "failed" ? n.error : n.output,
|
|
2055
2286
|
value: t.status === "failed" ? {
|
|
2056
2287
|
tag: t.errorTag,
|
|
@@ -2058,46 +2289,46 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2058
2289
|
} : t.output
|
|
2059
2290
|
})]
|
|
2060
2291
|
}),
|
|
2061
|
-
/* @__PURE__ */
|
|
2292
|
+
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("div", {
|
|
2062
2293
|
className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:mb-1",
|
|
2063
2294
|
children: n.steps(a.length)
|
|
2064
|
-
}), a.length === 0 ? /* @__PURE__ */
|
|
2295
|
+
}), a.length === 0 ? /* @__PURE__ */ N("div", {
|
|
2065
2296
|
className: "vdt:text-foreground-subtle",
|
|
2066
2297
|
children: n.noSteps
|
|
2067
|
-
}) : /* @__PURE__ */
|
|
2298
|
+
}) : /* @__PURE__ */ N("div", {
|
|
2068
2299
|
className: "vdt:flex vdt:flex-col vdt:gap-0.5",
|
|
2069
|
-
children: a.map((e) => /* @__PURE__ */
|
|
2300
|
+
children: a.map((e) => /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ P("button", {
|
|
2070
2301
|
type: "button",
|
|
2071
2302
|
onClick: () => y(v === e.id ? null : e.id),
|
|
2072
2303
|
className: "vdt:w-full vdt:flex vdt:items-center vdt:gap-2 vdt:text-left vdt:px-1 vdt:py-0.5 vdt:rounded-sm vdt:hover:bg-muted",
|
|
2073
2304
|
children: [
|
|
2074
|
-
/* @__PURE__ */
|
|
2075
|
-
tone:
|
|
2305
|
+
/* @__PURE__ */ N(W, {
|
|
2306
|
+
tone: Rn[e.status] ?? "info",
|
|
2076
2307
|
children: e.status
|
|
2077
2308
|
}),
|
|
2078
|
-
/* @__PURE__ */
|
|
2309
|
+
/* @__PURE__ */ N("code", {
|
|
2079
2310
|
className: "vdt:font-mono vdt:text-foreground",
|
|
2080
2311
|
children: e.stepName
|
|
2081
2312
|
}),
|
|
2082
|
-
e.attempt > 1 ? /* @__PURE__ */
|
|
2313
|
+
e.attempt > 1 ? /* @__PURE__ */ N("span", {
|
|
2083
2314
|
className: "vdt:text-warning",
|
|
2084
2315
|
children: n.attempt(e.attempt)
|
|
2085
2316
|
}) : null,
|
|
2086
|
-
e.errorMessage === null ? null : /* @__PURE__ */
|
|
2317
|
+
e.errorMessage === null ? null : /* @__PURE__ */ N("span", {
|
|
2087
2318
|
className: "vdt:text-danger vdt:truncate vdt:font-mono vdt:text-[11px]",
|
|
2088
2319
|
children: e.errorMessage
|
|
2089
2320
|
}),
|
|
2090
|
-
/* @__PURE__ */
|
|
2321
|
+
/* @__PURE__ */ N("span", {
|
|
2091
2322
|
className: "vdt:ml-auto vdt:tabular-nums vdt:text-foreground-muted",
|
|
2092
|
-
children:
|
|
2323
|
+
children: Vn(e.durationMs)
|
|
2093
2324
|
})
|
|
2094
2325
|
]
|
|
2095
|
-
}), v === e.id ? /* @__PURE__ */
|
|
2326
|
+
}), v === e.id ? /* @__PURE__ */ P("div", {
|
|
2096
2327
|
className: "vdt:ml-3 vdt:grid vdt:grid-cols-1 vdt:sm:grid-cols-2 vdt:gap-2 vdt:py-1",
|
|
2097
|
-
children: [/* @__PURE__ */
|
|
2328
|
+
children: [/* @__PURE__ */ N(tr, {
|
|
2098
2329
|
label: n.input,
|
|
2099
2330
|
value: e.input
|
|
2100
|
-
}), /* @__PURE__ */
|
|
2331
|
+
}), /* @__PURE__ */ N(tr, {
|
|
2101
2332
|
label: e.status === "failed" ? n.error : n.output,
|
|
2102
2333
|
value: e.status === "failed" ? e.errorCause ?? {
|
|
2103
2334
|
tag: e.errorTag,
|
|
@@ -2106,50 +2337,50 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2106
2337
|
})]
|
|
2107
2338
|
}) : null] }, e.id))
|
|
2108
2339
|
})] }),
|
|
2109
|
-
o.length > 0 ? /* @__PURE__ */
|
|
2340
|
+
o.length > 0 ? /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("div", {
|
|
2110
2341
|
className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:mb-1",
|
|
2111
2342
|
children: n.events(o.length)
|
|
2112
|
-
}), /* @__PURE__ */
|
|
2343
|
+
}), /* @__PURE__ */ N("div", {
|
|
2113
2344
|
className: "vdt:flex vdt:flex-wrap vdt:gap-1",
|
|
2114
|
-
children: o.map((e) => /* @__PURE__ */
|
|
2115
|
-
title:
|
|
2345
|
+
children: o.map((e) => /* @__PURE__ */ P("span", {
|
|
2346
|
+
title: Hn(e.occurredAt),
|
|
2116
2347
|
className: "vdt:inline-flex vdt:items-center vdt:gap-1 vdt:text-[10px] vdt:font-mono vdt:text-foreground-muted vdt:border vdt:border-border vdt:rounded-sm vdt:px-1",
|
|
2117
2348
|
children: [e.eventType, e.stepName === null ? "" : ` · ${e.stepName}`]
|
|
2118
2349
|
}, e.id))
|
|
2119
2350
|
})] }) : null,
|
|
2120
|
-
/* @__PURE__ */
|
|
2351
|
+
/* @__PURE__ */ P("div", {
|
|
2121
2352
|
className: "vdt:flex vdt:flex-wrap vdt:items-center vdt:gap-2",
|
|
2122
2353
|
children: [
|
|
2123
|
-
b ? /* @__PURE__ */
|
|
2354
|
+
b ? /* @__PURE__ */ N(U, {
|
|
2124
2355
|
onClick: () => {
|
|
2125
2356
|
C();
|
|
2126
2357
|
},
|
|
2127
2358
|
disabled: m,
|
|
2128
2359
|
children: n.cancel
|
|
2129
2360
|
}) : null,
|
|
2130
|
-
c.length > 0 && t.status === "running" ? /* @__PURE__ */
|
|
2131
|
-
/* @__PURE__ */
|
|
2361
|
+
c.length > 0 && t.status === "running" ? /* @__PURE__ */ P(M, { children: [
|
|
2362
|
+
/* @__PURE__ */ N("span", {
|
|
2132
2363
|
className: "vdt:text-foreground-muted",
|
|
2133
2364
|
children: n.awaiting
|
|
2134
2365
|
}),
|
|
2135
|
-
/* @__PURE__ */
|
|
2366
|
+
/* @__PURE__ */ N("select", {
|
|
2136
2367
|
"aria-label": n.signalName,
|
|
2137
2368
|
value: u,
|
|
2138
2369
|
onChange: (e) => d(e.target.value),
|
|
2139
2370
|
className: "vdt:text-xs vdt:font-mono vdt:bg-background vdt:border vdt:border-border vdt:rounded-sm vdt:px-1.5 vdt:py-0.5 vdt:text-foreground",
|
|
2140
|
-
children: c.map((e) => /* @__PURE__ */
|
|
2371
|
+
children: c.map((e) => /* @__PURE__ */ N("option", {
|
|
2141
2372
|
value: e,
|
|
2142
2373
|
children: e
|
|
2143
2374
|
}, e))
|
|
2144
2375
|
}),
|
|
2145
|
-
/* @__PURE__ */
|
|
2376
|
+
/* @__PURE__ */ N("input", {
|
|
2146
2377
|
"aria-label": n.signalPayload,
|
|
2147
2378
|
value: f,
|
|
2148
2379
|
onChange: (e) => p(e.target.value),
|
|
2149
2380
|
spellCheck: !1,
|
|
2150
2381
|
className: "vdt:text-[11px] vdt:font-mono vdt:bg-background vdt:border vdt:border-border vdt:rounded-sm vdt:px-1.5 vdt:py-0.5 vdt:text-foreground vdt:min-w-32"
|
|
2151
2382
|
}),
|
|
2152
|
-
/* @__PURE__ */
|
|
2383
|
+
/* @__PURE__ */ N(U, {
|
|
2153
2384
|
onClick: () => {
|
|
2154
2385
|
w();
|
|
2155
2386
|
},
|
|
@@ -2157,7 +2388,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2157
2388
|
children: n.sendSignal
|
|
2158
2389
|
})
|
|
2159
2390
|
] }) : null,
|
|
2160
|
-
t.traceId === null ? null : /* @__PURE__ */
|
|
2391
|
+
t.traceId === null ? null : /* @__PURE__ */ P("span", {
|
|
2161
2392
|
className: "vdt:text-[10px] vdt:font-mono vdt:text-foreground-subtle",
|
|
2162
2393
|
children: [
|
|
2163
2394
|
n.trace,
|
|
@@ -2167,32 +2398,32 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2167
2398
|
})
|
|
2168
2399
|
]
|
|
2169
2400
|
}),
|
|
2170
|
-
g === null ? null : /* @__PURE__ */
|
|
2401
|
+
g === null ? null : /* @__PURE__ */ N("div", {
|
|
2171
2402
|
role: g.tone === "danger" ? "alert" : "status",
|
|
2172
2403
|
className: g.tone === "danger" ? "vdt:text-danger" : "vdt:text-success",
|
|
2173
2404
|
children: g.text
|
|
2174
2405
|
})
|
|
2175
2406
|
]
|
|
2176
2407
|
});
|
|
2177
|
-
},
|
|
2408
|
+
}, tr = ({ label: e, value: t }) => /* @__PURE__ */ P("div", {
|
|
2178
2409
|
className: "vdt:min-w-0",
|
|
2179
|
-
children: [/* @__PURE__ */
|
|
2410
|
+
children: [/* @__PURE__ */ N("div", {
|
|
2180
2411
|
className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:mb-0.5",
|
|
2181
2412
|
children: e
|
|
2182
|
-
}), t == null ? /* @__PURE__ */
|
|
2413
|
+
}), t == null ? /* @__PURE__ */ N("div", {
|
|
2183
2414
|
className: "vdt:text-foreground-subtle",
|
|
2184
2415
|
children: "—"
|
|
2185
|
-
}) : /* @__PURE__ */
|
|
2416
|
+
}) : /* @__PURE__ */ N("pre", {
|
|
2186
2417
|
className: "vdt:overflow-x-auto vdt:text-[11px] vdt:font-mono vdt:p-1.5 vdt:rounded-sm vdt:bg-background vdt:border vdt:border-border vdt:text-foreground vdt:whitespace-pre-wrap vdt:break-all",
|
|
2187
|
-
children:
|
|
2418
|
+
children: Un(t)
|
|
2188
2419
|
})]
|
|
2189
|
-
}),
|
|
2420
|
+
}), nr = (e) => {
|
|
2190
2421
|
try {
|
|
2191
2422
|
return JSON.stringify(e, null, 2);
|
|
2192
2423
|
} catch {
|
|
2193
2424
|
return String(e);
|
|
2194
2425
|
}
|
|
2195
|
-
},
|
|
2426
|
+
}, rr = () => u(h, f, f), ir = () => {
|
|
2196
2427
|
let [e, t] = l(() => typeof window > "u" ? "/" : window.location.pathname);
|
|
2197
2428
|
return i(() => {
|
|
2198
2429
|
if (typeof window > "u") return;
|
|
@@ -2203,49 +2434,49 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2203
2434
|
window.removeEventListener("popstate", e), clearInterval(n);
|
|
2204
2435
|
};
|
|
2205
2436
|
}, []), e;
|
|
2206
|
-
},
|
|
2207
|
-
let e =
|
|
2437
|
+
}, ar = () => {
|
|
2438
|
+
let e = rr(), t = ir(), n = H().routes, [r, i] = l(!0), a = e.pathname === "/" && Object.keys(e.params).length === 0 && e.loaderData === void 0 && t !== "/" ? t : e.pathname, o = Object.entries(e.params).map(([e, t]) => ({
|
|
2208
2439
|
key: e,
|
|
2209
2440
|
value: String(t)
|
|
2210
2441
|
}));
|
|
2211
|
-
return /* @__PURE__ */
|
|
2442
|
+
return /* @__PURE__ */ P("div", {
|
|
2212
2443
|
className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
|
|
2213
|
-
children: [/* @__PURE__ */
|
|
2214
|
-
/* @__PURE__ */
|
|
2215
|
-
Icon:
|
|
2444
|
+
children: [/* @__PURE__ */ P(G, { children: [
|
|
2445
|
+
/* @__PURE__ */ N(K, {
|
|
2446
|
+
Icon: _e,
|
|
2216
2447
|
children: n.currentRoute
|
|
2217
2448
|
}),
|
|
2218
|
-
/* @__PURE__ */
|
|
2449
|
+
/* @__PURE__ */ N(q, { entries: [{
|
|
2219
2450
|
key: "pathname",
|
|
2220
2451
|
value: a
|
|
2221
2452
|
}, {
|
|
2222
2453
|
key: "params",
|
|
2223
2454
|
value: o.length === 0 ? "—" : ""
|
|
2224
2455
|
}] }),
|
|
2225
|
-
o.length > 0 ? /* @__PURE__ */
|
|
2456
|
+
o.length > 0 ? /* @__PURE__ */ N("div", {
|
|
2226
2457
|
className: "vdt:px-3 vdt:pb-3",
|
|
2227
|
-
children: /* @__PURE__ */
|
|
2458
|
+
children: /* @__PURE__ */ N(q, { entries: o })
|
|
2228
2459
|
}) : null
|
|
2229
|
-
] }), /* @__PURE__ */
|
|
2230
|
-
/* @__PURE__ */
|
|
2231
|
-
Icon:
|
|
2460
|
+
] }), /* @__PURE__ */ P(G, { children: [
|
|
2461
|
+
/* @__PURE__ */ N(K, {
|
|
2462
|
+
Icon: _e,
|
|
2232
2463
|
children: n.loaderData
|
|
2233
2464
|
}),
|
|
2234
|
-
/* @__PURE__ */
|
|
2465
|
+
/* @__PURE__ */ N("button", {
|
|
2235
2466
|
onClick: () => i((e) => !e),
|
|
2236
2467
|
className: "vdt:px-3 vdt:py-1.5 vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:text-foreground-muted vdt:hover:text-foreground",
|
|
2237
2468
|
children: r ? n.collapse : n.expand
|
|
2238
2469
|
}),
|
|
2239
|
-
r ? e.loaderData === void 0 ? /* @__PURE__ */
|
|
2470
|
+
r ? e.loaderData === void 0 ? /* @__PURE__ */ P(J, { children: [n.noLoaderTitle, /* @__PURE__ */ N("div", {
|
|
2240
2471
|
className: "vdt:mt-1 vdt:text-foreground-subtle",
|
|
2241
|
-
children: n.noLoaderHint(/* @__PURE__ */
|
|
2242
|
-
})] }) : /* @__PURE__ */
|
|
2472
|
+
children: n.noLoaderHint(/* @__PURE__ */ N("code", { children: "<Router>" }))
|
|
2473
|
+
})] }) : /* @__PURE__ */ N("pre", {
|
|
2243
2474
|
className: "vdt:px-3 vdt:pb-3 vdt:text-[11px] vdt:max-h-80 vdt:overflow-auto vdt:font-mono vdt:text-foreground",
|
|
2244
|
-
children:
|
|
2475
|
+
children: nr(e.loaderData)
|
|
2245
2476
|
}) : null
|
|
2246
2477
|
] })]
|
|
2247
2478
|
});
|
|
2248
|
-
},
|
|
2479
|
+
}, or = (e) => {
|
|
2249
2480
|
let t = 0, n = 0, r = 0, i = 0, a = 0;
|
|
2250
2481
|
for (let o of Object.values(e)) o.kind === "query" && (t += 1), o.kind === "mutation" && (n += 1), o.kind === "action" && (r += 1), o.kind === "stream" && (i += 1), o.kind === "workflow" && (a += 1);
|
|
2251
2482
|
return {
|
|
@@ -2255,23 +2486,23 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2255
2486
|
streams: i,
|
|
2256
2487
|
workflows: a
|
|
2257
2488
|
};
|
|
2258
|
-
},
|
|
2259
|
-
let e =
|
|
2260
|
-
return n.length === 0 ? /* @__PURE__ */
|
|
2489
|
+
}, sr = () => {
|
|
2490
|
+
let e = k(), t = H().runtimes, n = e.names;
|
|
2491
|
+
return n.length === 0 ? /* @__PURE__ */ P(J, { children: [t.emptyTitle, /* @__PURE__ */ N("div", {
|
|
2261
2492
|
className: "vdt:mt-1 vdt:text-foreground-subtle",
|
|
2262
2493
|
children: t.emptyHint
|
|
2263
|
-
})] }) : /* @__PURE__ */
|
|
2494
|
+
})] }) : /* @__PURE__ */ N("div", {
|
|
2264
2495
|
className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
|
|
2265
2496
|
children: n.map((n) => {
|
|
2266
|
-
let r = e.get(n), i =
|
|
2267
|
-
return /* @__PURE__ */
|
|
2268
|
-
Icon:
|
|
2269
|
-
right: /* @__PURE__ */
|
|
2497
|
+
let r = e.get(n), i = or(r.descriptors);
|
|
2498
|
+
return /* @__PURE__ */ P(G, { children: [/* @__PURE__ */ N(K, {
|
|
2499
|
+
Icon: ve,
|
|
2500
|
+
right: /* @__PURE__ */ N(W, {
|
|
2270
2501
|
tone: "success",
|
|
2271
2502
|
children: t.live
|
|
2272
2503
|
}),
|
|
2273
2504
|
children: n
|
|
2274
|
-
}), /* @__PURE__ */
|
|
2505
|
+
}), /* @__PURE__ */ N(q, { entries: [
|
|
2275
2506
|
{
|
|
2276
2507
|
key: "queries",
|
|
2277
2508
|
value: String(i.queries)
|
|
@@ -2303,7 +2534,262 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2303
2534
|
] })] }, n);
|
|
2304
2535
|
})
|
|
2305
2536
|
});
|
|
2306
|
-
},
|
|
2537
|
+
}, cr = (e, t) => ({
|
|
2538
|
+
supported: t,
|
|
2539
|
+
scope: e?.scope ?? null,
|
|
2540
|
+
scriptUrl: e?.active?.scriptURL ?? e?.waiting?.scriptURL ?? e?.installing?.scriptURL ?? null,
|
|
2541
|
+
installing: e?.installing?.state ?? null,
|
|
2542
|
+
waiting: e?.waiting?.state ?? null,
|
|
2543
|
+
active: e?.active?.state ?? null,
|
|
2544
|
+
backgroundSync: e != null && "sync" in e && e.sync !== void 0
|
|
2545
|
+
}), lr = (e) => e.filter((e) => e.startsWith("voltro-")).sort(), ur = (e) => {
|
|
2546
|
+
try {
|
|
2547
|
+
return new URL(e).host;
|
|
2548
|
+
} catch {
|
|
2549
|
+
return "(unparseable endpoint)";
|
|
2550
|
+
}
|
|
2551
|
+
}, dr = async () => {
|
|
2552
|
+
let e = typeof navigator > "u" ? void 0 : navigator, t = e?.serviceWorker !== void 0, n = t ? await e.serviceWorker.getRegistration().catch(() => void 0) : void 0, r = cr(n ?? null, t), i = globalThis.caches, a = i ? lr(await i.keys().catch(() => [])) : [], o = [];
|
|
2553
|
+
for (let e of a) {
|
|
2554
|
+
let t = i ? await i.open(e).then((e) => e.keys()).then((e) => e.length).catch(() => 0) : 0;
|
|
2555
|
+
o.push({
|
|
2556
|
+
name: e,
|
|
2557
|
+
entries: t
|
|
2558
|
+
});
|
|
2559
|
+
}
|
|
2560
|
+
let s = globalThis.Notification, c = null;
|
|
2561
|
+
if (n?.pushManager) {
|
|
2562
|
+
let e = await n.pushManager.getSubscription().catch(() => null);
|
|
2563
|
+
c = e ? ur(e.endpoint) : null;
|
|
2564
|
+
}
|
|
2565
|
+
return {
|
|
2566
|
+
worker: r,
|
|
2567
|
+
caches: o,
|
|
2568
|
+
pushPermission: s?.permission ?? null,
|
|
2569
|
+
pushEndpointHost: c
|
|
2570
|
+
};
|
|
2571
|
+
}, fr = (e) => e === "activated" ? "success" : e === null ? "neutral" : "warning", pr = () => {
|
|
2572
|
+
let e = H().pwa, t = _(), r = v(), a = y(), o = A(), [s, c] = l(null), u = n(() => {
|
|
2573
|
+
dr().then(c);
|
|
2574
|
+
}, []);
|
|
2575
|
+
if (i(() => {
|
|
2576
|
+
u();
|
|
2577
|
+
let e = typeof navigator > "u" ? void 0 : navigator;
|
|
2578
|
+
return e?.serviceWorker?.addEventListener?.("controllerchange", u), () => {
|
|
2579
|
+
e?.serviceWorker?.removeEventListener?.("controllerchange", u);
|
|
2580
|
+
};
|
|
2581
|
+
}, [u]), s === null) return /* @__PURE__ */ N(J, { children: e.loading });
|
|
2582
|
+
if (!s.worker.supported) return /* @__PURE__ */ N(J, { children: e.unsupported });
|
|
2583
|
+
let d = s.worker;
|
|
2584
|
+
return /* @__PURE__ */ P("div", {
|
|
2585
|
+
className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
|
|
2586
|
+
children: [
|
|
2587
|
+
/* @__PURE__ */ P(G, { children: [/* @__PURE__ */ N(K, {
|
|
2588
|
+
Icon: ve,
|
|
2589
|
+
right: /* @__PURE__ */ N(U, {
|
|
2590
|
+
size: "sm",
|
|
2591
|
+
onClick: u,
|
|
2592
|
+
children: e.refresh
|
|
2593
|
+
}),
|
|
2594
|
+
children: e.worker
|
|
2595
|
+
}), /* @__PURE__ */ N(q, { entries: [
|
|
2596
|
+
{
|
|
2597
|
+
key: e.scope,
|
|
2598
|
+
value: d.scope ?? e.none
|
|
2599
|
+
},
|
|
2600
|
+
{
|
|
2601
|
+
key: e.script,
|
|
2602
|
+
value: d.scriptUrl ?? e.none
|
|
2603
|
+
},
|
|
2604
|
+
{
|
|
2605
|
+
key: "installing",
|
|
2606
|
+
value: /* @__PURE__ */ N(W, {
|
|
2607
|
+
tone: fr(d.installing),
|
|
2608
|
+
children: d.installing ?? e.none
|
|
2609
|
+
})
|
|
2610
|
+
},
|
|
2611
|
+
{
|
|
2612
|
+
key: "waiting",
|
|
2613
|
+
value: /* @__PURE__ */ N(W, {
|
|
2614
|
+
tone: fr(d.waiting),
|
|
2615
|
+
children: d.waiting ?? e.none
|
|
2616
|
+
})
|
|
2617
|
+
},
|
|
2618
|
+
{
|
|
2619
|
+
key: "active",
|
|
2620
|
+
value: /* @__PURE__ */ N(W, {
|
|
2621
|
+
tone: fr(d.active),
|
|
2622
|
+
children: d.active ?? e.none
|
|
2623
|
+
})
|
|
2624
|
+
},
|
|
2625
|
+
{
|
|
2626
|
+
key: e.backgroundSync,
|
|
2627
|
+
value: d.backgroundSync ? e.yes : e.no
|
|
2628
|
+
}
|
|
2629
|
+
] })] }),
|
|
2630
|
+
/* @__PURE__ */ P(G, { children: [/* @__PURE__ */ N(K, {
|
|
2631
|
+
right: /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(U, {
|
|
2632
|
+
size: "sm",
|
|
2633
|
+
onClick: () => {
|
|
2634
|
+
t.check();
|
|
2635
|
+
},
|
|
2636
|
+
children: e.checkNow
|
|
2637
|
+
}), /* @__PURE__ */ N(U, {
|
|
2638
|
+
size: "sm",
|
|
2639
|
+
variant: "accent",
|
|
2640
|
+
disabled: !t.updateAvailable,
|
|
2641
|
+
onClick: () => {
|
|
2642
|
+
t.apply({ force: !0 });
|
|
2643
|
+
},
|
|
2644
|
+
children: e.forceUpdate
|
|
2645
|
+
})] }),
|
|
2646
|
+
children: e.update
|
|
2647
|
+
}), /* @__PURE__ */ N(q, { entries: [
|
|
2648
|
+
{
|
|
2649
|
+
key: e.currentBuild,
|
|
2650
|
+
value: o.platform.appVersion ?? e.unknown
|
|
2651
|
+
},
|
|
2652
|
+
{
|
|
2653
|
+
key: e.waitingBuild,
|
|
2654
|
+
value: t.updateAvailable ? t.version ?? e.unknown : e.none
|
|
2655
|
+
},
|
|
2656
|
+
{
|
|
2657
|
+
key: e.online,
|
|
2658
|
+
value: a.online ? e.yes : e.no
|
|
2659
|
+
}
|
|
2660
|
+
] })] }),
|
|
2661
|
+
/* @__PURE__ */ P(G, { children: [/* @__PURE__ */ N(K, { children: e.precache }), s.caches.length === 0 ? /* @__PURE__ */ N("div", {
|
|
2662
|
+
className: "vdt:px-3 vdt:py-2 vdt:text-xs vdt:text-foreground-subtle",
|
|
2663
|
+
children: e.noCaches
|
|
2664
|
+
}) : /* @__PURE__ */ N(q, { entries: s.caches.map((t) => ({
|
|
2665
|
+
key: t.name,
|
|
2666
|
+
value: e.entries(t.entries)
|
|
2667
|
+
})) })] }),
|
|
2668
|
+
/* @__PURE__ */ P(G, { children: [/* @__PURE__ */ N(K, {
|
|
2669
|
+
right: r.canInstall ? /* @__PURE__ */ N(U, {
|
|
2670
|
+
size: "sm",
|
|
2671
|
+
onClick: () => {
|
|
2672
|
+
r.install();
|
|
2673
|
+
},
|
|
2674
|
+
children: e.install
|
|
2675
|
+
}) : void 0,
|
|
2676
|
+
children: e.installAndPush
|
|
2677
|
+
}), /* @__PURE__ */ N(q, { entries: [
|
|
2678
|
+
{
|
|
2679
|
+
key: e.installed,
|
|
2680
|
+
value: r.installed ? e.yes : e.no
|
|
2681
|
+
},
|
|
2682
|
+
{
|
|
2683
|
+
key: e.installPrompt,
|
|
2684
|
+
value: r.platform
|
|
2685
|
+
},
|
|
2686
|
+
{
|
|
2687
|
+
key: e.pushPermission,
|
|
2688
|
+
value: s.pushPermission ?? e.unknown
|
|
2689
|
+
},
|
|
2690
|
+
{
|
|
2691
|
+
key: e.pushSubscription,
|
|
2692
|
+
value: s.pushEndpointHost ?? e.none
|
|
2693
|
+
}
|
|
2694
|
+
] })] })
|
|
2695
|
+
]
|
|
2696
|
+
});
|
|
2697
|
+
}, mr = (e) => Object.entries(e ?? {}).filter(([, e]) => e === !0).map(([e]) => e).sort(), hr = (e) => [e.fullscreen ? "fullscreen" : e.maximized ? "maximized" : "windowed", e.focused ? "focused" : "unfocused"].join(", "), gr = () => {
|
|
2698
|
+
let e = H().desktop, t = A(), r = ee("desktop"), [a, o] = l(0), [s, c] = l(null), [u, d] = l(null), f = n(() => o((e) => e + 1), []);
|
|
2699
|
+
if (i(() => {
|
|
2700
|
+
if (!r) return;
|
|
2701
|
+
let e = r.window.subscribe(f), t = r.os.onThemeChange(f);
|
|
2702
|
+
return () => {
|
|
2703
|
+
e(), t();
|
|
2704
|
+
};
|
|
2705
|
+
}, [r, f]), i(() => {
|
|
2706
|
+
let e = t.storage("local");
|
|
2707
|
+
if (e === null) {
|
|
2708
|
+
d(null);
|
|
2709
|
+
return;
|
|
2710
|
+
}
|
|
2711
|
+
C(e).then(d);
|
|
2712
|
+
}, [t, a]), !r) return /* @__PURE__ */ N(J, { children: e.notDesktop });
|
|
2713
|
+
let p = mr(t.capabilities);
|
|
2714
|
+
return /* @__PURE__ */ P("div", {
|
|
2715
|
+
className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
|
|
2716
|
+
children: [
|
|
2717
|
+
/* @__PURE__ */ P(G, { children: [/* @__PURE__ */ N(K, {
|
|
2718
|
+
Icon: ke,
|
|
2719
|
+
right: /* @__PURE__ */ N(U, {
|
|
2720
|
+
size: "sm",
|
|
2721
|
+
onClick: f,
|
|
2722
|
+
children: e.refresh
|
|
2723
|
+
}),
|
|
2724
|
+
children: e.shell
|
|
2725
|
+
}), /* @__PURE__ */ N(q, { entries: [
|
|
2726
|
+
{
|
|
2727
|
+
key: e.kind,
|
|
2728
|
+
value: /* @__PURE__ */ N(W, {
|
|
2729
|
+
tone: "info",
|
|
2730
|
+
children: r.kind
|
|
2731
|
+
})
|
|
2732
|
+
},
|
|
2733
|
+
{
|
|
2734
|
+
key: e.os,
|
|
2735
|
+
value: `${r.os.platform} ${r.os.arch} ${r.os.version}`
|
|
2736
|
+
},
|
|
2737
|
+
{
|
|
2738
|
+
key: e.theme,
|
|
2739
|
+
value: r.os.theme()
|
|
2740
|
+
},
|
|
2741
|
+
{
|
|
2742
|
+
key: e.window,
|
|
2743
|
+
value: hr(r.window.read())
|
|
2744
|
+
},
|
|
2745
|
+
{
|
|
2746
|
+
key: e.appVersion,
|
|
2747
|
+
value: t.platform.appVersion ?? e.unknown
|
|
2748
|
+
}
|
|
2749
|
+
] })] }),
|
|
2750
|
+
/* @__PURE__ */ P(G, { children: [/* @__PURE__ */ N(K, {
|
|
2751
|
+
right: t.updates ? /* @__PURE__ */ N(U, {
|
|
2752
|
+
size: "sm",
|
|
2753
|
+
onClick: () => {
|
|
2754
|
+
t.updates.check().then(c);
|
|
2755
|
+
},
|
|
2756
|
+
children: e.checkNow
|
|
2757
|
+
}) : void 0,
|
|
2758
|
+
children: e.updater
|
|
2759
|
+
}), /* @__PURE__ */ N(q, { entries: [{
|
|
2760
|
+
key: e.updaterPort,
|
|
2761
|
+
value: t.updates ? e.yes : e.no
|
|
2762
|
+
}, {
|
|
2763
|
+
key: e.waitingVersion,
|
|
2764
|
+
value: s?.version ?? e.none
|
|
2765
|
+
}] })] }),
|
|
2766
|
+
/* @__PURE__ */ P(G, { children: [/* @__PURE__ */ N(K, { children: e.localStack }), /* @__PURE__ */ N(q, { entries: [
|
|
2767
|
+
{
|
|
2768
|
+
key: e.sidecarPort,
|
|
2769
|
+
value: r.sidecar === void 0 ? e.no : e.yes
|
|
2770
|
+
},
|
|
2771
|
+
{
|
|
2772
|
+
key: e.apiUrl,
|
|
2773
|
+
value: u?.api ?? e.none
|
|
2774
|
+
},
|
|
2775
|
+
{
|
|
2776
|
+
key: e.apiName,
|
|
2777
|
+
value: u?.name ?? e.none
|
|
2778
|
+
}
|
|
2779
|
+
] })] }),
|
|
2780
|
+
/* @__PURE__ */ P(G, { children: [/* @__PURE__ */ N(K, { children: e.capabilities }), p.length === 0 ? /* @__PURE__ */ N("div", {
|
|
2781
|
+
className: "vdt:px-3 vdt:py-2 vdt:text-xs vdt:text-foreground-subtle",
|
|
2782
|
+
children: e.noCapabilities
|
|
2783
|
+
}) : /* @__PURE__ */ N("div", {
|
|
2784
|
+
className: "vdt:flex vdt:flex-wrap vdt:gap-1 vdt:px-3 vdt:py-2",
|
|
2785
|
+
children: p.map((e) => /* @__PURE__ */ N(W, {
|
|
2786
|
+
tone: "neutral",
|
|
2787
|
+
children: e
|
|
2788
|
+
}, e))
|
|
2789
|
+
})] })
|
|
2790
|
+
]
|
|
2791
|
+
});
|
|
2792
|
+
}, _r = () => u(E, w, w), vr = (e, t = 90) => {
|
|
2307
2793
|
let n;
|
|
2308
2794
|
try {
|
|
2309
2795
|
n = JSON.stringify(e) ?? String(e);
|
|
@@ -2311,36 +2797,36 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2311
2797
|
n = String(e);
|
|
2312
2798
|
}
|
|
2313
2799
|
return n.length > t ? `${n.slice(0, t)}…` : n;
|
|
2314
|
-
},
|
|
2800
|
+
}, yr = (e, t) => typeof e != "object" || typeof t != "object" || e === null || t === null ? [] : [.../* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])].filter((n) => !Object.is(e[n], t[n])), br = ({ label: e, state: t }) => {
|
|
2315
2801
|
let [n, r] = l(!1);
|
|
2316
|
-
return /* @__PURE__ */
|
|
2802
|
+
return /* @__PURE__ */ P("div", {
|
|
2317
2803
|
className: "vdt:border-t vdt:border-border",
|
|
2318
|
-
children: [/* @__PURE__ */
|
|
2804
|
+
children: [/* @__PURE__ */ P("button", {
|
|
2319
2805
|
type: "button",
|
|
2320
2806
|
className: "vdt:flex vdt:w-full vdt:items-center vdt:gap-2 vdt:px-3 vdt:py-2 vdt:text-left vdt:hover:bg-muted",
|
|
2321
2807
|
onClick: () => r((e) => !e),
|
|
2322
|
-
children: [/* @__PURE__ */
|
|
2808
|
+
children: [/* @__PURE__ */ N(W, {
|
|
2323
2809
|
tone: "neutral",
|
|
2324
2810
|
children: e
|
|
2325
|
-
}), /* @__PURE__ */
|
|
2811
|
+
}), /* @__PURE__ */ N("span", {
|
|
2326
2812
|
className: "vdt:truncate vdt:font-mono vdt:text-[11px] vdt:text-foreground-muted",
|
|
2327
|
-
children:
|
|
2813
|
+
children: vr(t)
|
|
2328
2814
|
})]
|
|
2329
|
-
}), n ? /* @__PURE__ */
|
|
2815
|
+
}), n ? /* @__PURE__ */ N(q, { entries: Object.entries(t).map(([e, t]) => ({
|
|
2330
2816
|
key: e,
|
|
2331
|
-
value:
|
|
2817
|
+
value: vr(t, 200)
|
|
2332
2818
|
})) }) : null]
|
|
2333
2819
|
});
|
|
2334
|
-
},
|
|
2335
|
-
let e =
|
|
2336
|
-
return /* @__PURE__ */
|
|
2337
|
-
/* @__PURE__ */
|
|
2338
|
-
Icon:
|
|
2339
|
-
right: /* @__PURE__ */
|
|
2820
|
+
}, xr = () => {
|
|
2821
|
+
let e = _r(), [t, n] = l(null), r = x(), i = t ?? e.length;
|
|
2822
|
+
return /* @__PURE__ */ P(M, { children: [
|
|
2823
|
+
/* @__PURE__ */ P(K, {
|
|
2824
|
+
Icon: ge,
|
|
2825
|
+
right: /* @__PURE__ */ P(U, {
|
|
2340
2826
|
onClick: () => {
|
|
2341
|
-
|
|
2827
|
+
b(), n(null);
|
|
2342
2828
|
},
|
|
2343
|
-
children: [/* @__PURE__ */
|
|
2829
|
+
children: [/* @__PURE__ */ N(be, {}), "Clear"]
|
|
2344
2830
|
}),
|
|
2345
2831
|
children: [
|
|
2346
2832
|
"Stores (",
|
|
@@ -2348,28 +2834,28 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2348
2834
|
")"
|
|
2349
2835
|
]
|
|
2350
2836
|
}),
|
|
2351
|
-
r.length === 0 ? /* @__PURE__ */
|
|
2352
|
-
/* @__PURE__ */
|
|
2353
|
-
/* @__PURE__ */
|
|
2837
|
+
r.length === 0 ? /* @__PURE__ */ N(J, { children: "No stores defined. `defineStore(name, () => state)` in a *.store.ts file." }) : r.map((e) => /* @__PURE__ */ P(G, { children: [
|
|
2838
|
+
/* @__PURE__ */ N(K, { children: e.name }),
|
|
2839
|
+
/* @__PURE__ */ N(br, {
|
|
2354
2840
|
label: "global",
|
|
2355
2841
|
state: e.get()
|
|
2356
2842
|
}),
|
|
2357
|
-
e.keys().map((t) => /* @__PURE__ */
|
|
2843
|
+
e.keys().map((t) => /* @__PURE__ */ N(br, {
|
|
2358
2844
|
label: t,
|
|
2359
2845
|
state: e.get(t)
|
|
2360
2846
|
}, t))
|
|
2361
2847
|
] }, e.name)),
|
|
2362
|
-
/* @__PURE__ */
|
|
2363
|
-
Icon:
|
|
2364
|
-
right: /* @__PURE__ */
|
|
2848
|
+
/* @__PURE__ */ P(K, {
|
|
2849
|
+
Icon: ye,
|
|
2850
|
+
right: /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(U, {
|
|
2365
2851
|
onClick: () => {
|
|
2366
|
-
i <= 0 ||
|
|
2852
|
+
i <= 0 || D(i - 1, "before") && n(i - 1);
|
|
2367
2853
|
},
|
|
2368
2854
|
disabled: i <= 0,
|
|
2369
2855
|
children: "◀ Back"
|
|
2370
|
-
}), /* @__PURE__ */
|
|
2856
|
+
}), /* @__PURE__ */ N(U, {
|
|
2371
2857
|
onClick: () => {
|
|
2372
|
-
t === null || i >= e.length ||
|
|
2858
|
+
t === null || i >= e.length || D(i, "after") && n(i + 1);
|
|
2373
2859
|
},
|
|
2374
2860
|
disabled: t === null || i >= e.length,
|
|
2375
2861
|
children: "Forward ▶"
|
|
@@ -2381,54 +2867,54 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2381
2867
|
t === null ? "" : ` — travelled to ${i}/${e.length}`
|
|
2382
2868
|
]
|
|
2383
2869
|
}),
|
|
2384
|
-
e.length === 0 ? /* @__PURE__ */
|
|
2385
|
-
let a = e.length - 1 - r, o =
|
|
2386
|
-
return /* @__PURE__ */
|
|
2870
|
+
e.length === 0 ? /* @__PURE__ */ N(J, { children: "No writes yet. Every `set()` lands here, labelled if you pass one." }) : [...e].reverse().map((n, r) => {
|
|
2871
|
+
let a = e.length - 1 - r, o = yr(n.prev, n.next);
|
|
2872
|
+
return /* @__PURE__ */ P(G, { children: [/* @__PURE__ */ P("div", {
|
|
2387
2873
|
className: "vdt:flex vdt:items-center vdt:gap-2 vdt:px-3 vdt:py-2",
|
|
2388
2874
|
children: [
|
|
2389
|
-
/* @__PURE__ */
|
|
2875
|
+
/* @__PURE__ */ N(W, {
|
|
2390
2876
|
tone: n.isUndo === !0 ? "warning" : "neutral",
|
|
2391
2877
|
children: n.store
|
|
2392
2878
|
}),
|
|
2393
|
-
n.key === void 0 ? null : /* @__PURE__ */
|
|
2879
|
+
n.key === void 0 ? null : /* @__PURE__ */ N(W, {
|
|
2394
2880
|
tone: "neutral",
|
|
2395
2881
|
children: n.key
|
|
2396
2882
|
}),
|
|
2397
|
-
n.label === void 0 ? null : /* @__PURE__ */
|
|
2883
|
+
n.label === void 0 ? null : /* @__PURE__ */ N("span", {
|
|
2398
2884
|
className: "vdt:truncate vdt:font-mono vdt:text-[11px] vdt:text-foreground-muted",
|
|
2399
2885
|
children: n.label
|
|
2400
2886
|
}),
|
|
2401
|
-
t !== null && a === i ? /* @__PURE__ */
|
|
2887
|
+
t !== null && a === i ? /* @__PURE__ */ N(W, {
|
|
2402
2888
|
tone: "info",
|
|
2403
2889
|
children: "here"
|
|
2404
2890
|
}) : null
|
|
2405
2891
|
]
|
|
2406
|
-
}), /* @__PURE__ */
|
|
2892
|
+
}), /* @__PURE__ */ N(q, { entries: [
|
|
2407
2893
|
{
|
|
2408
2894
|
key: "changed",
|
|
2409
2895
|
value: o.length > 0 ? o.join(", ") : "(no field diff)"
|
|
2410
2896
|
},
|
|
2411
2897
|
{
|
|
2412
2898
|
key: "before",
|
|
2413
|
-
value:
|
|
2899
|
+
value: vr(n.prev)
|
|
2414
2900
|
},
|
|
2415
2901
|
{
|
|
2416
2902
|
key: "after",
|
|
2417
|
-
value:
|
|
2903
|
+
value: vr(n.next)
|
|
2418
2904
|
}
|
|
2419
2905
|
] })] }, `${n.at}-${a}`);
|
|
2420
2906
|
})
|
|
2421
2907
|
] });
|
|
2422
|
-
},
|
|
2908
|
+
}, Sr = (e) => typeof e == "number" ? e < 1 ? "<1ms" : e < 1e3 ? `${Math.round(e)}ms` : `${(e / 1e3).toFixed(1)}s` : "—", Cr = (e) => {
|
|
2423
2909
|
try {
|
|
2424
2910
|
return JSON.stringify(e, null, 2);
|
|
2425
2911
|
} catch {
|
|
2426
2912
|
return String(e);
|
|
2427
2913
|
}
|
|
2428
|
-
},
|
|
2914
|
+
}, wr = ({ mutation: e }) => /* @__PURE__ */ P("div", {
|
|
2429
2915
|
className: "vdt:bg-background/60",
|
|
2430
2916
|
children: [
|
|
2431
|
-
/* @__PURE__ */
|
|
2917
|
+
/* @__PURE__ */ N(q, { entries: [
|
|
2432
2918
|
{
|
|
2433
2919
|
key: "id",
|
|
2434
2920
|
value: e.id
|
|
@@ -2455,101 +2941,101 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2455
2941
|
},
|
|
2456
2942
|
{
|
|
2457
2943
|
key: "duration",
|
|
2458
|
-
value:
|
|
2944
|
+
value: Sr(e.durationMs)
|
|
2459
2945
|
}
|
|
2460
2946
|
] }),
|
|
2461
|
-
/* @__PURE__ */
|
|
2947
|
+
/* @__PURE__ */ P("details", {
|
|
2462
2948
|
className: "vdt:px-3 vdt:py-2 vdt:border-t vdt:border-border",
|
|
2463
2949
|
open: !0,
|
|
2464
|
-
children: [/* @__PURE__ */
|
|
2950
|
+
children: [/* @__PURE__ */ N("summary", {
|
|
2465
2951
|
className: "vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:text-foreground-muted vdt:cursor-pointer",
|
|
2466
2952
|
children: "Input"
|
|
2467
|
-
}), /* @__PURE__ */
|
|
2953
|
+
}), /* @__PURE__ */ N("pre", {
|
|
2468
2954
|
className: "vdt:mt-2 vdt:text-[11px] vdt:max-h-48 vdt:overflow-auto vdt:font-mono vdt:text-foreground",
|
|
2469
|
-
children:
|
|
2955
|
+
children: Cr(e.input)
|
|
2470
2956
|
})]
|
|
2471
2957
|
}),
|
|
2472
|
-
e.status === "success" ? /* @__PURE__ */
|
|
2958
|
+
e.status === "success" ? /* @__PURE__ */ P("details", {
|
|
2473
2959
|
className: "vdt:px-3 vdt:py-2 vdt:border-t vdt:border-border",
|
|
2474
2960
|
open: !0,
|
|
2475
|
-
children: [/* @__PURE__ */
|
|
2961
|
+
children: [/* @__PURE__ */ N("summary", {
|
|
2476
2962
|
className: "vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:text-foreground-muted vdt:cursor-pointer",
|
|
2477
2963
|
children: "Output"
|
|
2478
|
-
}), /* @__PURE__ */
|
|
2964
|
+
}), /* @__PURE__ */ N("pre", {
|
|
2479
2965
|
className: "vdt:mt-2 vdt:text-[11px] vdt:max-h-48 vdt:overflow-auto vdt:font-mono vdt:text-foreground",
|
|
2480
|
-
children:
|
|
2966
|
+
children: Cr(e.output)
|
|
2481
2967
|
})]
|
|
2482
2968
|
}) : null,
|
|
2483
|
-
e.status === "error" ? /* @__PURE__ */
|
|
2969
|
+
e.status === "error" ? /* @__PURE__ */ P("details", {
|
|
2484
2970
|
className: "vdt:px-3 vdt:py-2 vdt:border-t vdt:border-border",
|
|
2485
2971
|
open: !0,
|
|
2486
|
-
children: [/* @__PURE__ */
|
|
2972
|
+
children: [/* @__PURE__ */ N("summary", {
|
|
2487
2973
|
className: "vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:text-danger vdt:cursor-pointer",
|
|
2488
2974
|
children: "Error"
|
|
2489
|
-
}), /* @__PURE__ */
|
|
2975
|
+
}), /* @__PURE__ */ N("pre", {
|
|
2490
2976
|
className: "vdt:mt-2 vdt:text-[11px] vdt:max-h-48 vdt:overflow-auto vdt:font-mono vdt:text-danger",
|
|
2491
|
-
children: e.error instanceof Error ? `${e.error.name}: ${e.error.message}\n\n${e.error.stack ?? ""}` :
|
|
2977
|
+
children: e.error instanceof Error ? `${e.error.name}: ${e.error.message}\n\n${e.error.stack ?? ""}` : Cr(e.error)
|
|
2492
2978
|
})]
|
|
2493
2979
|
}) : null
|
|
2494
2980
|
]
|
|
2495
|
-
}),
|
|
2981
|
+
}), Tr = {
|
|
2496
2982
|
trace: "vdt:text-foreground-subtle",
|
|
2497
2983
|
debug: "vdt:text-info",
|
|
2498
2984
|
info: "vdt:text-foreground",
|
|
2499
2985
|
warn: "vdt:text-warning",
|
|
2500
2986
|
error: "vdt:text-danger",
|
|
2501
2987
|
fatal: "vdt:text-danger vdt:font-bold"
|
|
2502
|
-
},
|
|
2988
|
+
}, Er = (e) => {
|
|
2503
2989
|
if (Object.keys(e).length === 0) return "";
|
|
2504
2990
|
try {
|
|
2505
2991
|
return JSON.stringify(e, null, 2);
|
|
2506
2992
|
} catch {
|
|
2507
2993
|
return String(e);
|
|
2508
2994
|
}
|
|
2509
|
-
},
|
|
2995
|
+
}, Dr = (e) => {
|
|
2510
2996
|
let t = (e) => e < 10 ? `0${e}` : String(e);
|
|
2511
2997
|
return `${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}.${((e) => e < 100 ? e < 10 ? `00${e}` : `0${e}` : String(e))(e.getMilliseconds())}`;
|
|
2512
|
-
},
|
|
2513
|
-
let t =
|
|
2514
|
-
return /* @__PURE__ */
|
|
2998
|
+
}, Or = ({ record: e }) => {
|
|
2999
|
+
let t = Er(e.fields);
|
|
3000
|
+
return /* @__PURE__ */ P("div", {
|
|
2515
3001
|
className: "vdt:bg-background/60 vdt:px-3 vdt:py-2 vdt:flex vdt:flex-col vdt:gap-2",
|
|
2516
3002
|
children: [
|
|
2517
|
-
/* @__PURE__ */
|
|
3003
|
+
/* @__PURE__ */ P("div", {
|
|
2518
3004
|
className: "vdt:text-[10px] vdt:font-mono vdt:text-foreground-muted",
|
|
2519
3005
|
children: [
|
|
2520
|
-
|
|
3006
|
+
Dr(e.ts),
|
|
2521
3007
|
e.scope ? ` · ${e.scope}` : "",
|
|
2522
3008
|
" · ",
|
|
2523
3009
|
e.level
|
|
2524
3010
|
]
|
|
2525
3011
|
}),
|
|
2526
|
-
/* @__PURE__ */
|
|
2527
|
-
className: ["vdt:text-xs vdt:break-words",
|
|
3012
|
+
/* @__PURE__ */ N("div", {
|
|
3013
|
+
className: ["vdt:text-xs vdt:break-words", Tr[e.level]].join(" "),
|
|
2528
3014
|
children: e.message
|
|
2529
3015
|
}),
|
|
2530
|
-
e.fiberId ? /* @__PURE__ */
|
|
3016
|
+
e.fiberId ? /* @__PURE__ */ P("div", {
|
|
2531
3017
|
className: "vdt:text-[10px] vdt:font-mono vdt:text-foreground-muted",
|
|
2532
3018
|
children: ["fiber: ", e.fiberId]
|
|
2533
3019
|
}) : null,
|
|
2534
|
-
t ? /* @__PURE__ */
|
|
3020
|
+
t ? /* @__PURE__ */ N("pre", {
|
|
2535
3021
|
className: "vdt:text-[11px] vdt:max-h-48 vdt:overflow-auto vdt:font-mono vdt:text-foreground",
|
|
2536
3022
|
children: t
|
|
2537
3023
|
}) : null,
|
|
2538
|
-
e.cause === void 0 ? null : /* @__PURE__ */
|
|
3024
|
+
e.cause === void 0 ? null : /* @__PURE__ */ N("pre", {
|
|
2539
3025
|
className: "vdt:text-[11px] vdt:max-h-48 vdt:overflow-auto vdt:font-mono vdt:text-danger",
|
|
2540
3026
|
children: e.cause instanceof Error ? e.cause.stack ?? `${e.cause.name}: ${e.cause.message}` : String(e.cause)
|
|
2541
3027
|
})
|
|
2542
3028
|
]
|
|
2543
3029
|
});
|
|
2544
|
-
},
|
|
3030
|
+
}, kr = 4e3, Ar = async (e, t, n = !1) => {
|
|
2545
3031
|
if (e === "") return null;
|
|
2546
3032
|
let r = await Q(`${e}/_voltro/inspect/traces${n ? "?includeBackground=1" : ""}`, t);
|
|
2547
3033
|
return r !== null && Array.isArray(r.traces) ? r : null;
|
|
2548
|
-
},
|
|
2549
|
-
let n =
|
|
3034
|
+
}, jr = [], Mr = (e, t = !1) => {
|
|
3035
|
+
let n = k(), r = $(), a = Z(), o = n.names.join(","), [s, c] = l(jr), u = e && r;
|
|
2550
3036
|
return i(() => {
|
|
2551
3037
|
if (!u) {
|
|
2552
|
-
c(
|
|
3038
|
+
c(jr);
|
|
2553
3039
|
return;
|
|
2554
3040
|
}
|
|
2555
3041
|
let e = o === "" ? [] : o.split(",").map((e) => ({
|
|
@@ -2557,11 +3043,11 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2557
3043
|
baseUrl: n.get(e).inspectBaseUrl
|
|
2558
3044
|
})).filter((e) => e.baseUrl !== "");
|
|
2559
3045
|
if (e.length === 0) {
|
|
2560
|
-
c(
|
|
3046
|
+
c(jr);
|
|
2561
3047
|
return;
|
|
2562
3048
|
}
|
|
2563
3049
|
let r = !1, i = async () => {
|
|
2564
|
-
let n = await Promise.all(e.map((e) =>
|
|
3050
|
+
let n = await Promise.all(e.map((e) => Ar(e.baseUrl, a, t)));
|
|
2565
3051
|
if (r) return;
|
|
2566
3052
|
let i = [];
|
|
2567
3053
|
n.forEach((t, n) => {
|
|
@@ -2572,7 +3058,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2572
3058
|
}), c(i);
|
|
2573
3059
|
};
|
|
2574
3060
|
i();
|
|
2575
|
-
let s = setInterval(i,
|
|
3061
|
+
let s = setInterval(i, kr);
|
|
2576
3062
|
return () => {
|
|
2577
3063
|
r = !0, clearInterval(s);
|
|
2578
3064
|
};
|
|
@@ -2583,7 +3069,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2583
3069
|
a,
|
|
2584
3070
|
t
|
|
2585
3071
|
]), s;
|
|
2586
|
-
},
|
|
3072
|
+
}, Nr = (e) => e < 1 ? "<1ms" : e < 1e3 ? `${Math.round(e)}ms` : `${(e / 1e3).toFixed(2)}s`, Pr = (e) => {
|
|
2587
3073
|
let t = new Map(e.map((e) => [e.spanId, e])), n = /* @__PURE__ */ new Map(), r = (e, i) => {
|
|
2588
3074
|
if (n.has(e.spanId)) return n.get(e.spanId);
|
|
2589
3075
|
if (i > 64 || e.parentSpanId === null) return n.set(e.spanId, 0), 0;
|
|
@@ -2592,94 +3078,94 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2592
3078
|
};
|
|
2593
3079
|
for (let t of e) r(t, 0);
|
|
2594
3080
|
return n;
|
|
2595
|
-
},
|
|
3081
|
+
}, Fr = (e) => {
|
|
2596
3082
|
if (typeof e == "string") return e;
|
|
2597
3083
|
try {
|
|
2598
3084
|
return JSON.stringify(e, null, 2) ?? String(e);
|
|
2599
3085
|
} catch {
|
|
2600
3086
|
return String(e);
|
|
2601
3087
|
}
|
|
2602
|
-
},
|
|
2603
|
-
let t =
|
|
2604
|
-
return /* @__PURE__ */
|
|
3088
|
+
}, Ir = ({ trace: e }) => {
|
|
3089
|
+
let t = H().traces, n = Pr(e.spans), r = new Set(e.spans.map((e) => e.spanId)), i = e.spans.some((e) => e.parentSpanId !== null && !r.has(e.parentSpanId)), a = e.spans.length > 0 && e.spans.every((e) => e.name.startsWith("sql.")), o = e.durationMs > 0 ? e.durationMs : 1;
|
|
3090
|
+
return /* @__PURE__ */ P("div", {
|
|
2605
3091
|
className: "vdt-trace-detail",
|
|
2606
3092
|
children: [
|
|
2607
|
-
/* @__PURE__ */
|
|
3093
|
+
/* @__PURE__ */ P("div", {
|
|
2608
3094
|
className: "vdt-trace-summary",
|
|
2609
|
-
children: [/* @__PURE__ */
|
|
3095
|
+
children: [/* @__PURE__ */ N("span", { children: t.spans(e.spanCount) }), e.kind === "subscription" ? /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ P("span", { children: [
|
|
2610
3096
|
e.deliveryCount ?? 0,
|
|
2611
3097
|
" ",
|
|
2612
3098
|
t.delivery(e.deliveryCount ?? 0)
|
|
2613
|
-
] }), e.lastDeliveryMs === void 0 ? null : /* @__PURE__ */
|
|
3099
|
+
] }), e.lastDeliveryMs === void 0 ? null : /* @__PURE__ */ P("span", { children: [
|
|
2614
3100
|
t.lastDelivery,
|
|
2615
3101
|
": ",
|
|
2616
|
-
/* @__PURE__ */
|
|
2617
|
-
] })] }) : /* @__PURE__ */
|
|
3102
|
+
/* @__PURE__ */ N("strong", { children: Nr(e.lastDeliveryMs) })
|
|
3103
|
+
] })] }) : /* @__PURE__ */ P("span", { children: [
|
|
2618
3104
|
t.duration,
|
|
2619
3105
|
": ",
|
|
2620
|
-
/* @__PURE__ */
|
|
3106
|
+
/* @__PURE__ */ N("strong", { children: Nr(e.durationMs) })
|
|
2621
3107
|
] })]
|
|
2622
3108
|
}),
|
|
2623
|
-
/* @__PURE__ */
|
|
3109
|
+
/* @__PURE__ */ P("code", {
|
|
2624
3110
|
className: "vdt-trace-id",
|
|
2625
3111
|
children: ["trace ", e.traceId]
|
|
2626
3112
|
}),
|
|
2627
|
-
i || a ? /* @__PURE__ */
|
|
3113
|
+
i || a ? /* @__PURE__ */ N("p", {
|
|
2628
3114
|
className: "vdt-trace-context",
|
|
2629
3115
|
children: i ? t.missingParents : t.sqlWithoutCaller
|
|
2630
3116
|
}) : null,
|
|
2631
3117
|
e.spans.map((r) => {
|
|
2632
3118
|
let i = Math.min(n.get(r.spanId) ?? 0, 8), a = Math.max(0, Math.min(100, (r.startMs - e.startMs) / o * 100)), s = Math.max(0, Math.min(100 - a, Math.max(1.5, r.durationMs / o * 100))), c = Object.entries(r.attributes);
|
|
2633
|
-
return /* @__PURE__ */
|
|
3119
|
+
return /* @__PURE__ */ P("details", {
|
|
2634
3120
|
className: "vdt-trace-span",
|
|
2635
3121
|
open: r.status === "error",
|
|
2636
3122
|
"data-status": r.status,
|
|
2637
|
-
children: [/* @__PURE__ */
|
|
3123
|
+
children: [/* @__PURE__ */ P("summary", {
|
|
2638
3124
|
className: "vdt-trace-span-head",
|
|
2639
3125
|
style: { paddingLeft: 8 + i * 8 },
|
|
2640
3126
|
children: [
|
|
2641
|
-
/* @__PURE__ */
|
|
3127
|
+
/* @__PURE__ */ P("span", {
|
|
2642
3128
|
className: "vdt-trace-span-label",
|
|
2643
|
-
children: [/* @__PURE__ */
|
|
3129
|
+
children: [/* @__PURE__ */ N(pe, { className: "vdt-trace-chevron" }), /* @__PURE__ */ N("code", {
|
|
2644
3130
|
className: "vdt-trace-span-name",
|
|
2645
3131
|
children: r.name
|
|
2646
3132
|
})]
|
|
2647
3133
|
}),
|
|
2648
|
-
/* @__PURE__ */
|
|
3134
|
+
/* @__PURE__ */ N("span", {
|
|
2649
3135
|
className: "vdt-trace-span-duration",
|
|
2650
|
-
children:
|
|
3136
|
+
children: Nr(r.durationMs)
|
|
2651
3137
|
}),
|
|
2652
|
-
/* @__PURE__ */
|
|
3138
|
+
/* @__PURE__ */ N("span", {
|
|
2653
3139
|
className: "vdt-trace-span-bar",
|
|
2654
3140
|
"aria-hidden": "true",
|
|
2655
|
-
children: /* @__PURE__ */
|
|
3141
|
+
children: /* @__PURE__ */ N("span", { style: {
|
|
2656
3142
|
left: `${a}%`,
|
|
2657
3143
|
width: `${s}%`
|
|
2658
3144
|
} })
|
|
2659
3145
|
})
|
|
2660
3146
|
]
|
|
2661
|
-
}), /* @__PURE__ */
|
|
3147
|
+
}), /* @__PURE__ */ P("div", {
|
|
2662
3148
|
className: "vdt-trace-span-body",
|
|
2663
3149
|
children: [
|
|
2664
|
-
/* @__PURE__ */
|
|
3150
|
+
/* @__PURE__ */ P("div", {
|
|
2665
3151
|
className: "vdt-trace-span-meta",
|
|
2666
3152
|
children: [
|
|
2667
|
-
/* @__PURE__ */
|
|
2668
|
-
/* @__PURE__ */
|
|
2669
|
-
/* @__PURE__ */
|
|
3153
|
+
/* @__PURE__ */ N("span", { children: r.kind }),
|
|
3154
|
+
/* @__PURE__ */ N("span", { children: r.status }),
|
|
3155
|
+
/* @__PURE__ */ N("code", { children: r.spanId })
|
|
2670
3156
|
]
|
|
2671
3157
|
}),
|
|
2672
|
-
r.statusMessage ? /* @__PURE__ */
|
|
3158
|
+
r.statusMessage ? /* @__PURE__ */ N("p", {
|
|
2673
3159
|
className: "vdt-trace-span-message",
|
|
2674
3160
|
children: r.statusMessage
|
|
2675
3161
|
}) : null,
|
|
2676
|
-
c.length > 0 ? /* @__PURE__ */
|
|
3162
|
+
c.length > 0 ? /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("div", {
|
|
2677
3163
|
className: "vdt-trace-attributes-label",
|
|
2678
3164
|
children: t.attributes
|
|
2679
|
-
}), /* @__PURE__ */
|
|
3165
|
+
}), /* @__PURE__ */ N("dl", {
|
|
2680
3166
|
className: "vdt-trace-attributes",
|
|
2681
|
-
children: c.map(([e, t]) => /* @__PURE__ */
|
|
2682
|
-
})] }) : /* @__PURE__ */
|
|
3167
|
+
children: c.map(([e, t]) => /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("dt", { children: e }), /* @__PURE__ */ N("dd", { children: /* @__PURE__ */ N("pre", { children: Fr(t) }) })] }, e))
|
|
3168
|
+
})] }) : /* @__PURE__ */ N("p", {
|
|
2683
3169
|
className: "vdt-trace-no-attributes",
|
|
2684
3170
|
children: t.noAttributes
|
|
2685
3171
|
})
|
|
@@ -2689,42 +3175,44 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2689
3175
|
})
|
|
2690
3176
|
]
|
|
2691
3177
|
});
|
|
2692
|
-
},
|
|
3178
|
+
}, Lr = [
|
|
2693
3179
|
"all",
|
|
2694
3180
|
"subscription",
|
|
2695
3181
|
"mutation",
|
|
2696
3182
|
"action",
|
|
2697
3183
|
"trace",
|
|
2698
3184
|
"log"
|
|
2699
|
-
],
|
|
3185
|
+
], Rr = [
|
|
2700
3186
|
"workflows",
|
|
2701
3187
|
"stores",
|
|
2702
3188
|
"indexes",
|
|
2703
3189
|
"webhooks",
|
|
2704
3190
|
"routes",
|
|
2705
|
-
"runtimes"
|
|
2706
|
-
|
|
3191
|
+
"runtimes",
|
|
3192
|
+
"pwa",
|
|
3193
|
+
"desktop"
|
|
3194
|
+
], zr = [...Lr, ...Rr], Br = (e) => Lr.includes(e), Vr = (e) => {
|
|
2707
3195
|
let t = [], n = /"([^"]*)"|(\S+)/g, r;
|
|
2708
3196
|
for (; (r = n.exec(e)) !== null;) {
|
|
2709
3197
|
let e = (r[1] ?? r[2] ?? "").toLowerCase();
|
|
2710
3198
|
e !== "" && t.push(e);
|
|
2711
3199
|
}
|
|
2712
3200
|
return t;
|
|
2713
|
-
},
|
|
3201
|
+
}, Hr = (e, t) => t.every((t) => e.includes(t)), Ur = {
|
|
2714
3202
|
subscription: 0,
|
|
2715
3203
|
mutation: 1,
|
|
2716
3204
|
action: 1,
|
|
2717
3205
|
trace: 1,
|
|
2718
3206
|
log: 1
|
|
2719
|
-
},
|
|
2720
|
-
let r =
|
|
2721
|
-
return [...r.length === 0 ? i : i.filter((e) =>
|
|
2722
|
-
let n = Number(
|
|
3207
|
+
}, Wr = (e) => (e.source === "mutation" || e.source === "action") && e.status === "pending", Gr = (e, t, n) => {
|
|
3208
|
+
let r = Vr(t), i = n === "all" ? e : e.filter((e) => e.source === n);
|
|
3209
|
+
return [...r.length === 0 ? i : i.filter((e) => Hr(e.haystack, r))].sort((e, t) => {
|
|
3210
|
+
let n = Number(Wr(t)) - Number(Wr(e));
|
|
2723
3211
|
if (n !== 0) return n;
|
|
2724
|
-
let r =
|
|
3212
|
+
let r = Ur[e.source] - Ur[t.source];
|
|
2725
3213
|
return r === 0 ? t.at - e.at : r;
|
|
2726
3214
|
});
|
|
2727
|
-
},
|
|
3215
|
+
}, Kr = (e) => {
|
|
2728
3216
|
let t = {
|
|
2729
3217
|
subscription: 0,
|
|
2730
3218
|
mutation: 0,
|
|
@@ -2734,7 +3222,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2734
3222
|
};
|
|
2735
3223
|
for (let n of e) t[n.source]++;
|
|
2736
3224
|
return t;
|
|
2737
|
-
},
|
|
3225
|
+
}, qr = (e, t = 400) => {
|
|
2738
3226
|
let n;
|
|
2739
3227
|
try {
|
|
2740
3228
|
n = JSON.stringify(e) ?? String(e);
|
|
@@ -2742,12 +3230,12 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2742
3230
|
n = String(e);
|
|
2743
3231
|
}
|
|
2744
3232
|
return n.length > t ? n.slice(0, t) : n;
|
|
2745
|
-
},
|
|
3233
|
+
}, Jr = (e, t, n) => {
|
|
2746
3234
|
if (e.length === 0) return null;
|
|
2747
3235
|
let r = t === null ? -1 : e.indexOf(t);
|
|
2748
3236
|
return r === -1 ? n === 1 ? e[0] : e[e.length - 1] : e[(r + n + e.length) % e.length];
|
|
2749
|
-
},
|
|
2750
|
-
let n =
|
|
3237
|
+
}, Yr = (e) => e.recovery.phase === "stuck" || e.snapshot.error ? "err" : e.recovery.phase !== "steady" || e.snapshot.pendingPatches > 0 ? "warn" : e.snapshot.revision >= 0 ? "ok" : e.hasFiber ? "info" : "idle", Xr = (e, t) => {
|
|
3238
|
+
let n = Ze(t.key), r = [];
|
|
2751
3239
|
t.subscriberCount > 0 && r.push(`${t.subscriberCount} sub${t.subscriberCount === 1 ? "" : "s"}`), t.snapshot.revision >= 0 && r.push(`r${t.snapshot.revision}`), t.snapshot.pendingPatches > 0 && r.push(`+${t.snapshot.pendingPatches} pending`), t.evicting && r.push("evicting");
|
|
2752
3240
|
let i = t.snapshot.error ? "error" : t.recovery.phase === "steady" ? void 0 : t.recovery.phase;
|
|
2753
3241
|
return {
|
|
@@ -2757,7 +3245,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2757
3245
|
name: n,
|
|
2758
3246
|
summary: r.join(" · "),
|
|
2759
3247
|
...i === void 0 ? {} : { status: i },
|
|
2760
|
-
tone:
|
|
3248
|
+
tone: Yr(t),
|
|
2761
3249
|
at: 0,
|
|
2762
3250
|
haystack: `${e} ${t.key} ${t.tag ?? ""} ${t.source ?? ""} ${i ?? ""}`.toLowerCase(),
|
|
2763
3251
|
detail: {
|
|
@@ -2766,16 +3254,16 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2766
3254
|
entry: t
|
|
2767
3255
|
}
|
|
2768
3256
|
};
|
|
2769
|
-
},
|
|
2770
|
-
let t = e.kind === "action" ? "action" : "mutation", n =
|
|
3257
|
+
}, Zr = (e) => e.status === "pending" ? "info" : e.status === "success" ? "ok" : "err", Qr = (e) => e.status === "error" ? e.error instanceof Error && e.error.name !== "Error" ? e.error.name : "error" : e.status, $r = (e) => {
|
|
3258
|
+
let t = e.kind === "action" ? "action" : "mutation", n = qr(e.input, 160), r = e.status === "error" ? e.error instanceof Error ? `${e.error.name} ${e.error.message}` : qr(e.error, 200) : "";
|
|
2771
3259
|
return {
|
|
2772
3260
|
id: `mut:${e.id}`,
|
|
2773
3261
|
source: t,
|
|
2774
3262
|
apiName: e.apiName,
|
|
2775
3263
|
name: e.tag,
|
|
2776
3264
|
summary: n,
|
|
2777
|
-
status:
|
|
2778
|
-
tone:
|
|
3265
|
+
status: Qr(e),
|
|
3266
|
+
tone: Zr(e),
|
|
2779
3267
|
at: e.startedAt,
|
|
2780
3268
|
haystack: `${t} ${e.apiName} ${e.tag} ${e.status} ${n} ${r}`.toLowerCase(),
|
|
2781
3269
|
detail: {
|
|
@@ -2783,7 +3271,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2783
3271
|
mutation: e
|
|
2784
3272
|
}
|
|
2785
3273
|
};
|
|
2786
|
-
},
|
|
3274
|
+
}, ei = (e) => {
|
|
2787
3275
|
switch (e.level) {
|
|
2788
3276
|
case "error":
|
|
2789
3277
|
case "fatal": return "err";
|
|
@@ -2791,22 +3279,22 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2791
3279
|
case "info": return "info";
|
|
2792
3280
|
default: return "idle";
|
|
2793
3281
|
}
|
|
2794
|
-
},
|
|
3282
|
+
}, ti = (e, t) => ({
|
|
2795
3283
|
id: `log:${e.ts.getTime()}:${t}`,
|
|
2796
3284
|
source: "log",
|
|
2797
3285
|
name: e.scope ?? "log",
|
|
2798
3286
|
summary: e.message,
|
|
2799
3287
|
status: e.level,
|
|
2800
|
-
tone:
|
|
3288
|
+
tone: ei(e),
|
|
2801
3289
|
at: e.ts.getTime(),
|
|
2802
|
-
haystack: `${e.scope ?? ""} ${e.level} ${e.message} ${
|
|
3290
|
+
haystack: `${e.scope ?? ""} ${e.level} ${e.message} ${qr(e.fields, 300)}`.toLowerCase(),
|
|
2803
3291
|
detail: {
|
|
2804
3292
|
source: "log",
|
|
2805
3293
|
record: e
|
|
2806
3294
|
}
|
|
2807
|
-
}),
|
|
3295
|
+
}), ni = (e, t, n = Le.traces) => {
|
|
2808
3296
|
let r = t.spans.map((e) => e.attributes["db.operation.name"] ?? e.attributes["db.operation"]).find((e) => typeof e == "string"), i = t.spans.filter((e) => e.name !== t.rootName).slice(0, 3).map((e) => e.name).join(" → "), a = t.kind === "subscription" ? `${t.deliveryCount ?? 0} ${n.delivery(t.deliveryCount ?? 0)}` : [
|
|
2809
|
-
|
|
3297
|
+
Nr(t.durationMs),
|
|
2810
3298
|
n.spans(t.spanCount),
|
|
2811
3299
|
r ?? i
|
|
2812
3300
|
].filter(Boolean).join(" · "), o = t.spans.filter((e) => e.status === "error").map((e) => `${e.name} ${e.statusMessage ?? ""}`).join(" ");
|
|
@@ -2826,14 +3314,14 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2826
3314
|
trace: t
|
|
2827
3315
|
}
|
|
2828
3316
|
};
|
|
2829
|
-
},
|
|
2830
|
-
let n =
|
|
3317
|
+
}, ri = () => u(T, S, S), ii = () => u(de, ue, ue), ai = (e, t = !1) => {
|
|
3318
|
+
let n = H().traces, r = Ye(), i = ri(), a = ii(), o = Mr(e, t);
|
|
2831
3319
|
return s(() => {
|
|
2832
3320
|
let e = [];
|
|
2833
|
-
for (let t of r) for (let n of t.entries) e.push(
|
|
2834
|
-
for (let t of i) e.push(
|
|
2835
|
-
for (let t of o) e.push(
|
|
2836
|
-
return a.forEach((t, n) => e.push(
|
|
3321
|
+
for (let t of r) for (let n of t.entries) e.push(Xr(t.name, n));
|
|
3322
|
+
for (let t of i) e.push($r(t));
|
|
3323
|
+
for (let t of o) e.push(ni(t.apiName, t.trace, n));
|
|
3324
|
+
return a.forEach((t, n) => e.push(ti(t, n))), e;
|
|
2837
3325
|
}, [
|
|
2838
3326
|
r,
|
|
2839
3327
|
i,
|
|
@@ -2841,20 +3329,22 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2841
3329
|
o,
|
|
2842
3330
|
n
|
|
2843
3331
|
]);
|
|
2844
|
-
},
|
|
3332
|
+
}, oi = {
|
|
2845
3333
|
all: null,
|
|
2846
|
-
subscription:
|
|
2847
|
-
mutation:
|
|
2848
|
-
action:
|
|
2849
|
-
trace:
|
|
2850
|
-
log:
|
|
2851
|
-
workflows:
|
|
2852
|
-
stores:
|
|
2853
|
-
indexes:
|
|
2854
|
-
webhooks:
|
|
2855
|
-
routes:
|
|
2856
|
-
runtimes:
|
|
2857
|
-
|
|
3334
|
+
subscription: he,
|
|
3335
|
+
mutation: Ee,
|
|
3336
|
+
action: we,
|
|
3337
|
+
trace: Ce,
|
|
3338
|
+
log: Oe,
|
|
3339
|
+
workflows: Se,
|
|
3340
|
+
stores: ge,
|
|
3341
|
+
indexes: De,
|
|
3342
|
+
webhooks: xe,
|
|
3343
|
+
routes: _e,
|
|
3344
|
+
runtimes: ke,
|
|
3345
|
+
pwa: ke,
|
|
3346
|
+
desktop: ke
|
|
3347
|
+
}, si = typeof navigator < "u" && /Mac|iPhone|iPad|iPod/.test(navigator.platform || navigator.userAgent) ? {
|
|
2858
3348
|
search: "⌘K",
|
|
2859
3349
|
alt: "⌥",
|
|
2860
3350
|
shift: "⇧"
|
|
@@ -2862,7 +3352,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2862
3352
|
search: "Ctrl K",
|
|
2863
3353
|
alt: "Alt",
|
|
2864
3354
|
shift: "Shift"
|
|
2865
|
-
},
|
|
3355
|
+
}, ci = (e, t, n) => {
|
|
2866
3356
|
if (n.trim() !== "") return {
|
|
2867
3357
|
title: e.noResults,
|
|
2868
3358
|
hint: e.noResultsHint
|
|
@@ -2893,14 +3383,14 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2893
3383
|
hint: e.emptyAllHint
|
|
2894
3384
|
};
|
|
2895
3385
|
}
|
|
2896
|
-
},
|
|
3386
|
+
}, li = (e) => {
|
|
2897
3387
|
let t = new Date(e), n = (e) => e < 10 ? `0${e}` : String(e);
|
|
2898
3388
|
return `${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`;
|
|
2899
|
-
},
|
|
3389
|
+
}, ui = ({ item: e, selected: t, onSelect: n }) => {
|
|
2900
3390
|
let r = c(null);
|
|
2901
3391
|
return i(() => {
|
|
2902
3392
|
t && r.current !== null && typeof r.current.scrollIntoView == "function" && r.current.scrollIntoView({ block: "nearest" });
|
|
2903
|
-
}, [t]), /* @__PURE__ */
|
|
3393
|
+
}, [t]), /* @__PURE__ */ P("button", {
|
|
2904
3394
|
ref: r,
|
|
2905
3395
|
type: "button",
|
|
2906
3396
|
role: "option",
|
|
@@ -2909,106 +3399,106 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2909
3399
|
className: `vdt-row${t ? " vdt-row-sel" : ""}`,
|
|
2910
3400
|
onClick: n,
|
|
2911
3401
|
children: [
|
|
2912
|
-
/* @__PURE__ */
|
|
3402
|
+
/* @__PURE__ */ N("span", {
|
|
2913
3403
|
className: `vdt-dot vdt-dot-${e.tone}`,
|
|
2914
3404
|
"aria-hidden": "true"
|
|
2915
3405
|
}),
|
|
2916
|
-
/* @__PURE__ */
|
|
3406
|
+
/* @__PURE__ */ N("span", {
|
|
2917
3407
|
className: "vdt-row-src",
|
|
2918
3408
|
children: e.source
|
|
2919
3409
|
}),
|
|
2920
|
-
/* @__PURE__ */
|
|
3410
|
+
/* @__PURE__ */ P("span", {
|
|
2921
3411
|
className: "vdt-row-main",
|
|
2922
|
-
children: [/* @__PURE__ */
|
|
3412
|
+
children: [/* @__PURE__ */ N("code", {
|
|
2923
3413
|
className: "vdt-row-name",
|
|
2924
3414
|
children: e.name
|
|
2925
|
-
}), /* @__PURE__ */
|
|
3415
|
+
}), /* @__PURE__ */ N("span", {
|
|
2926
3416
|
className: "vdt-row-summary",
|
|
2927
3417
|
children: e.summary
|
|
2928
3418
|
})]
|
|
2929
3419
|
}),
|
|
2930
|
-
/* @__PURE__ */
|
|
3420
|
+
/* @__PURE__ */ P("span", {
|
|
2931
3421
|
className: "vdt-row-meta",
|
|
2932
3422
|
children: [
|
|
2933
|
-
e.apiName === void 0 ? null : /* @__PURE__ */
|
|
3423
|
+
e.apiName === void 0 ? null : /* @__PURE__ */ N("span", {
|
|
2934
3424
|
className: "vdt-row-api",
|
|
2935
3425
|
children: e.apiName
|
|
2936
3426
|
}),
|
|
2937
|
-
e.status === void 0 ? null : /* @__PURE__ */
|
|
3427
|
+
e.status === void 0 ? null : /* @__PURE__ */ N("span", {
|
|
2938
3428
|
className: `vdt-tag vdt-tag-${e.tone}`,
|
|
2939
3429
|
children: e.status
|
|
2940
3430
|
}),
|
|
2941
|
-
e.at > 0 ? /* @__PURE__ */
|
|
3431
|
+
e.at > 0 ? /* @__PURE__ */ N("span", {
|
|
2942
3432
|
className: "vdt-row-time",
|
|
2943
|
-
children:
|
|
3433
|
+
children: li(e.at)
|
|
2944
3434
|
}) : null
|
|
2945
3435
|
]
|
|
2946
3436
|
})
|
|
2947
3437
|
]
|
|
2948
3438
|
});
|
|
2949
|
-
},
|
|
2950
|
-
let n = e.detail, r =
|
|
2951
|
-
return /* @__PURE__ */
|
|
3439
|
+
}, di = ({ item: e, retained: t }) => {
|
|
3440
|
+
let n = e.detail, r = H().shell;
|
|
3441
|
+
return /* @__PURE__ */ P("div", {
|
|
2952
3442
|
className: "vdt-detail",
|
|
2953
|
-
children: [/* @__PURE__ */
|
|
3443
|
+
children: [/* @__PURE__ */ P("div", {
|
|
2954
3444
|
className: "vdt-detail-head",
|
|
2955
3445
|
children: [
|
|
2956
|
-
/* @__PURE__ */
|
|
3446
|
+
/* @__PURE__ */ N("span", {
|
|
2957
3447
|
className: `vdt-dot vdt-dot-${e.tone}`,
|
|
2958
3448
|
"aria-hidden": "true"
|
|
2959
3449
|
}),
|
|
2960
|
-
/* @__PURE__ */
|
|
3450
|
+
/* @__PURE__ */ N("span", {
|
|
2961
3451
|
className: "vdt-row-src",
|
|
2962
3452
|
children: e.source
|
|
2963
3453
|
}),
|
|
2964
|
-
/* @__PURE__ */
|
|
3454
|
+
/* @__PURE__ */ N("code", {
|
|
2965
3455
|
className: "vdt-detail-name",
|
|
2966
3456
|
children: e.name
|
|
2967
3457
|
}),
|
|
2968
|
-
e.status === void 0 ? null : /* @__PURE__ */
|
|
3458
|
+
e.status === void 0 ? null : /* @__PURE__ */ N("span", {
|
|
2969
3459
|
className: `vdt-tag vdt-tag-${e.tone}`,
|
|
2970
3460
|
children: e.status
|
|
2971
3461
|
}),
|
|
2972
|
-
/* @__PURE__ */
|
|
2973
|
-
e.apiName === void 0 ? null : /* @__PURE__ */
|
|
3462
|
+
/* @__PURE__ */ N("span", { className: "vdt-sp" }),
|
|
3463
|
+
e.apiName === void 0 ? null : /* @__PURE__ */ N("span", {
|
|
2974
3464
|
className: "vdt-row-api",
|
|
2975
3465
|
children: e.apiName
|
|
2976
3466
|
}),
|
|
2977
|
-
e.at > 0 ? /* @__PURE__ */
|
|
3467
|
+
e.at > 0 ? /* @__PURE__ */ N("span", {
|
|
2978
3468
|
className: "vdt-row-time",
|
|
2979
|
-
children:
|
|
3469
|
+
children: li(e.at)
|
|
2980
3470
|
}) : null
|
|
2981
3471
|
]
|
|
2982
|
-
}), /* @__PURE__ */
|
|
3472
|
+
}), /* @__PURE__ */ P("div", {
|
|
2983
3473
|
className: "vdt-detail-body",
|
|
2984
3474
|
children: [
|
|
2985
|
-
t ? /* @__PURE__ */
|
|
3475
|
+
t ? /* @__PURE__ */ N("p", {
|
|
2986
3476
|
className: "vdt:px-3 vdt:py-2 vdt:text-xs vdt:text-foreground-muted",
|
|
2987
3477
|
role: "status",
|
|
2988
3478
|
children: r.retainedSelection
|
|
2989
3479
|
}) : null,
|
|
2990
|
-
n.source === "subscription" ? /* @__PURE__ */
|
|
2991
|
-
n.source === "mutation" || n.source === "action" ? /* @__PURE__ */
|
|
2992
|
-
n.source === "trace" ? /* @__PURE__ */
|
|
2993
|
-
n.source === "log" ? /* @__PURE__ */
|
|
3480
|
+
n.source === "subscription" ? /* @__PURE__ */ N(Qe, { entry: n.entry }) : null,
|
|
3481
|
+
n.source === "mutation" || n.source === "action" ? /* @__PURE__ */ N(wr, { mutation: n.mutation }) : null,
|
|
3482
|
+
n.source === "trace" ? /* @__PURE__ */ N(Ir, { trace: n.trace }) : null,
|
|
3483
|
+
n.source === "log" ? /* @__PURE__ */ N(Or, { record: n.record }) : null
|
|
2994
3484
|
]
|
|
2995
3485
|
})]
|
|
2996
3486
|
});
|
|
2997
|
-
},
|
|
2998
|
-
let t =
|
|
2999
|
-
return /* @__PURE__ */
|
|
3487
|
+
}, fi = ({ name: e }) => {
|
|
3488
|
+
let t = H().shell, n = O(e).status, r = n === "connected" ? "ok" : n === "recovering" ? "warn" : "err", i = n === "connected" ? t.connected : n === "recovering" ? t.recovering : n === "degraded" ? t.degraded : t.offline;
|
|
3489
|
+
return /* @__PURE__ */ P("span", {
|
|
3000
3490
|
className: "vdt-chip",
|
|
3001
3491
|
"data-status": n,
|
|
3002
3492
|
children: [
|
|
3003
|
-
/* @__PURE__ */
|
|
3493
|
+
/* @__PURE__ */ N("span", {
|
|
3004
3494
|
className: `vdt-dot vdt-dot-${r}`,
|
|
3005
3495
|
"aria-hidden": "true"
|
|
3006
3496
|
}),
|
|
3007
|
-
/* @__PURE__ */
|
|
3008
|
-
/* @__PURE__ */
|
|
3497
|
+
/* @__PURE__ */ N("b", { children: e }),
|
|
3498
|
+
/* @__PURE__ */ N("span", { children: i })
|
|
3009
3499
|
]
|
|
3010
3500
|
});
|
|
3011
|
-
},
|
|
3501
|
+
}, pi = () => u(h, () => f().pathname ?? "", () => ""), mi = (e) => {
|
|
3012
3502
|
let t = e.detail;
|
|
3013
3503
|
switch (t.source) {
|
|
3014
3504
|
case "subscription": return t.entry;
|
|
@@ -3017,56 +3507,56 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3017
3507
|
case "trace": return t.trace;
|
|
3018
3508
|
case "log": return t.record;
|
|
3019
3509
|
}
|
|
3020
|
-
},
|
|
3021
|
-
let f =
|
|
3510
|
+
}, hi = ({ dock: e, push: t, onDock: n, onPush: r, onClose: a, scope: o, onScope: c, searchRef: u, onHeaderPointerDown: d }) => {
|
|
3511
|
+
let f = H(), p = f.shell, m = f.tabs, h = k(), [g, _] = l(!1), v = ai(!0, g), y = Tn(!0), b = Mn(!0), x = Xn(!0), S = pi(), [C, w] = l(""), [T, E] = l(!1), [D, O] = l(null), A = D?.id ?? null;
|
|
3022
3512
|
i(() => {
|
|
3023
|
-
if (
|
|
3024
|
-
let e = v.find((e) => e.id ===
|
|
3025
|
-
e !== void 0 &&
|
|
3026
|
-
}, [v,
|
|
3027
|
-
let
|
|
3028
|
-
let e =
|
|
3029
|
-
return e !== null &&
|
|
3513
|
+
if (D === null || D.source === "subscription") return;
|
|
3514
|
+
let e = v.find((e) => e.id === D.id);
|
|
3515
|
+
e !== void 0 && mi(e) !== mi(D) && O(e);
|
|
3516
|
+
}, [v, D]);
|
|
3517
|
+
let ee = Br(o), j = s(() => Kr(v), [v]), te = s(() => v.filter((e) => e.source === "trace" && e.tone === "err").length, [v]), ne = s(() => v.filter(Wr).length, [v]), F = D === null ? null : v.find((e) => e.id === D.id) ?? null, I = D !== null && D.source !== "subscription" && F === null, L = s(() => {
|
|
3518
|
+
let e = F ?? (I ? D : null);
|
|
3519
|
+
return e !== null && Gr([e], C, o).length > 0 ? e : null;
|
|
3030
3520
|
}, [
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3521
|
+
F,
|
|
3522
|
+
I,
|
|
3523
|
+
D,
|
|
3034
3524
|
C,
|
|
3035
3525
|
o
|
|
3036
|
-
]),
|
|
3037
|
-
let e =
|
|
3038
|
-
return
|
|
3526
|
+
]), R = s(() => {
|
|
3527
|
+
let e = I && L !== null ? [...v, L] : v;
|
|
3528
|
+
return Gr(T ? e.filter(Wr) : e, C, o);
|
|
3039
3529
|
}, [
|
|
3040
3530
|
v,
|
|
3041
3531
|
C,
|
|
3042
3532
|
o,
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
]),
|
|
3533
|
+
T,
|
|
3534
|
+
I,
|
|
3535
|
+
L
|
|
3536
|
+
]), re = s(() => T && C.trim() === "" ? {
|
|
3047
3537
|
title: p.emptyPending,
|
|
3048
3538
|
hint: p.emptyPendingHint
|
|
3049
|
-
} :
|
|
3539
|
+
} : ci(p, o, C), [
|
|
3050
3540
|
p,
|
|
3051
3541
|
o,
|
|
3052
3542
|
C,
|
|
3053
|
-
|
|
3054
|
-
]),
|
|
3055
|
-
|
|
3056
|
-
},
|
|
3543
|
+
T
|
|
3544
|
+
]), z = (e) => {
|
|
3545
|
+
O(e === null ? null : R.find((t) => t.id === e) ?? null);
|
|
3546
|
+
}, ie = (e) => {
|
|
3057
3547
|
switch (e) {
|
|
3058
3548
|
case "all": return v.length;
|
|
3059
|
-
case "subscription": return
|
|
3060
|
-
case "mutation": return
|
|
3061
|
-
case "action": return
|
|
3062
|
-
case "trace": return
|
|
3063
|
-
case "log": return
|
|
3549
|
+
case "subscription": return j.subscription;
|
|
3550
|
+
case "mutation": return j.mutation;
|
|
3551
|
+
case "action": return j.action;
|
|
3552
|
+
case "trace": return j.trace;
|
|
3553
|
+
case "log": return j.log;
|
|
3064
3554
|
case "indexes": return y;
|
|
3065
3555
|
case "webhooks": return b;
|
|
3066
3556
|
case "workflows": return x;
|
|
3067
3557
|
default: return null;
|
|
3068
3558
|
}
|
|
3069
|
-
},
|
|
3559
|
+
}, B = (e) => {
|
|
3070
3560
|
switch (e) {
|
|
3071
3561
|
case "all": return p.scopeAll;
|
|
3072
3562
|
case "subscription": return m.subscriptions;
|
|
@@ -3080,231 +3570,236 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3080
3570
|
case "webhooks": return m.webhooks;
|
|
3081
3571
|
case "routes": return m.routes;
|
|
3082
3572
|
case "runtimes": return m.runtimes;
|
|
3573
|
+
case "pwa": return m.pwa;
|
|
3574
|
+
case "desktop": return m.desktop;
|
|
3083
3575
|
}
|
|
3084
3576
|
};
|
|
3085
|
-
return /* @__PURE__ */
|
|
3086
|
-
/* @__PURE__ */
|
|
3577
|
+
return /* @__PURE__ */ P(M, { children: [
|
|
3578
|
+
/* @__PURE__ */ P("header", {
|
|
3087
3579
|
className: "vdt-bar",
|
|
3088
3580
|
onPointerDown: d,
|
|
3089
3581
|
children: [
|
|
3090
|
-
e === "window" ? /* @__PURE__ */
|
|
3582
|
+
e === "window" ? /* @__PURE__ */ N("span", {
|
|
3091
3583
|
className: "vdt-win-handle",
|
|
3092
3584
|
title: p.moveTitle,
|
|
3093
3585
|
"aria-hidden": "true",
|
|
3094
|
-
children: /* @__PURE__ */
|
|
3586
|
+
children: /* @__PURE__ */ N(Fe, { className: "vdt:w-4 vdt:h-4" })
|
|
3095
3587
|
}) : null,
|
|
3096
|
-
/* @__PURE__ */
|
|
3097
|
-
|
|
3588
|
+
/* @__PURE__ */ N(fe, { className: "vdt-bar-mark" }),
|
|
3589
|
+
ee ? /* @__PURE__ */ P("label", {
|
|
3098
3590
|
className: "vdt-search",
|
|
3099
3591
|
children: [
|
|
3100
|
-
/* @__PURE__ */
|
|
3101
|
-
/* @__PURE__ */
|
|
3592
|
+
/* @__PURE__ */ N(Te, { className: "vdt:w-3.5 vdt:h-3.5" }),
|
|
3593
|
+
/* @__PURE__ */ N("input", {
|
|
3102
3594
|
ref: u,
|
|
3103
3595
|
type: "search",
|
|
3104
3596
|
value: C,
|
|
3105
3597
|
onChange: (e) => w(e.target.value),
|
|
3106
3598
|
onKeyDown: (e) => {
|
|
3107
|
-
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(),
|
|
3599
|
+
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), z(Jr(R.map((e) => e.id), A, e.key === "ArrowDown" ? 1 : -1))) : e.key === "Escape" ? C === "" ? a() : (e.preventDefault(), w("")) : e.key === "Enter" && L === null && R.length > 0 && z(R[0].id);
|
|
3108
3600
|
},
|
|
3109
3601
|
placeholder: p.searchPlaceholder,
|
|
3110
3602
|
"aria-label": p.searchLabel,
|
|
3111
3603
|
autoComplete: "off",
|
|
3112
3604
|
spellCheck: !1
|
|
3113
3605
|
}),
|
|
3114
|
-
/* @__PURE__ */
|
|
3606
|
+
/* @__PURE__ */ N("kbd", {
|
|
3115
3607
|
className: "vdt-kbd",
|
|
3116
|
-
children:
|
|
3608
|
+
children: si.search
|
|
3117
3609
|
})
|
|
3118
3610
|
]
|
|
3119
|
-
}) : /* @__PURE__ */
|
|
3611
|
+
}) : /* @__PURE__ */ P("span", {
|
|
3120
3612
|
className: "vdt-bar-title",
|
|
3121
|
-
children: [/* @__PURE__ */
|
|
3613
|
+
children: [/* @__PURE__ */ N("span", {
|
|
3122
3614
|
className: "vdt-bar-brand",
|
|
3123
3615
|
children: p.brandWord
|
|
3124
|
-
}), /* @__PURE__ */
|
|
3616
|
+
}), /* @__PURE__ */ N("span", {
|
|
3125
3617
|
className: "vdt-bar-kicker",
|
|
3126
3618
|
children: p.kicker
|
|
3127
3619
|
})]
|
|
3128
3620
|
}),
|
|
3129
|
-
/* @__PURE__ */
|
|
3621
|
+
/* @__PURE__ */ N("div", {
|
|
3130
3622
|
role: "tablist",
|
|
3131
3623
|
"aria-label": p.brand,
|
|
3132
3624
|
className: "vdt-scopes",
|
|
3133
|
-
children:
|
|
3134
|
-
let n =
|
|
3135
|
-
return /* @__PURE__ */
|
|
3625
|
+
children: zr.map((e, t) => {
|
|
3626
|
+
let n = oi[e], r = ie(e), i = e === o;
|
|
3627
|
+
return /* @__PURE__ */ P("button", {
|
|
3136
3628
|
type: "button",
|
|
3137
3629
|
role: "tab",
|
|
3138
|
-
"aria-label": r !== null && r > 0 ? `${
|
|
3630
|
+
"aria-label": r !== null && r > 0 ? `${B(e)} (${r})` : B(e),
|
|
3139
3631
|
"aria-selected": i,
|
|
3140
3632
|
"data-scope": e,
|
|
3141
|
-
className: `vdt-scope${i ? " vdt-scope-on" : ""}${t ===
|
|
3633
|
+
className: `vdt-scope${i ? " vdt-scope-on" : ""}${t === Lr.length ? " vdt-scope-sep" : ""}`,
|
|
3142
3634
|
onClick: () => {
|
|
3143
|
-
c(e),
|
|
3635
|
+
c(e), z(null), E(!1), Br(e) && requestAnimationFrame(() => {
|
|
3144
3636
|
let e = u.current;
|
|
3145
3637
|
e !== null && e.getRootNode().activeElement !== e && e.focus();
|
|
3146
3638
|
});
|
|
3147
3639
|
},
|
|
3148
3640
|
children: [
|
|
3149
|
-
n ? /* @__PURE__ */
|
|
3150
|
-
/* @__PURE__ */
|
|
3641
|
+
n ? /* @__PURE__ */ N(n, { className: "vdt:w-3.5 vdt:h-3.5" }) : null,
|
|
3642
|
+
/* @__PURE__ */ N("span", {
|
|
3151
3643
|
className: "vdt-scope-label",
|
|
3152
|
-
children:
|
|
3644
|
+
children: B(e)
|
|
3153
3645
|
}),
|
|
3154
|
-
r !== null && r > 0 ? /* @__PURE__ */
|
|
3155
|
-
className: `vdt-badge${i ? " vdt-badge-acc" : ""}${e === "trace" &&
|
|
3646
|
+
r !== null && r > 0 ? /* @__PURE__ */ N("span", {
|
|
3647
|
+
className: `vdt-badge${i ? " vdt-badge-acc" : ""}${e === "trace" && te > 0 ? " vdt-badge-err" : ""}`,
|
|
3156
3648
|
children: r
|
|
3157
3649
|
}) : null
|
|
3158
3650
|
]
|
|
3159
3651
|
}, e);
|
|
3160
3652
|
})
|
|
3161
3653
|
}),
|
|
3162
|
-
/* @__PURE__ */
|
|
3163
|
-
/* @__PURE__ */
|
|
3654
|
+
/* @__PURE__ */ N("span", { className: "vdt-sp" }),
|
|
3655
|
+
/* @__PURE__ */ N(Pt, {
|
|
3164
3656
|
dock: e,
|
|
3165
3657
|
push: t,
|
|
3166
3658
|
onDock: n,
|
|
3167
3659
|
onPush: r
|
|
3168
3660
|
}),
|
|
3169
|
-
/* @__PURE__ */
|
|
3661
|
+
/* @__PURE__ */ N("button", {
|
|
3170
3662
|
type: "button",
|
|
3171
3663
|
className: "vdt-iconbtn",
|
|
3172
3664
|
title: p.closeTitle,
|
|
3173
3665
|
"aria-label": p.closeTitle,
|
|
3174
3666
|
onClick: a,
|
|
3175
|
-
children: /* @__PURE__ */
|
|
3667
|
+
children: /* @__PURE__ */ N(me, { className: "vdt:w-4 vdt:h-4" })
|
|
3176
3668
|
})
|
|
3177
3669
|
]
|
|
3178
3670
|
}),
|
|
3179
|
-
|
|
3671
|
+
/* @__PURE__ */ N($t, {}),
|
|
3672
|
+
ee ? /* @__PURE__ */ P("div", {
|
|
3180
3673
|
className: "vdt-body",
|
|
3181
|
-
"data-empty":
|
|
3182
|
-
children: [/* @__PURE__ */
|
|
3674
|
+
"data-empty": R.length === 0 && L === null ? "true" : "false",
|
|
3675
|
+
children: [/* @__PURE__ */ N("div", {
|
|
3183
3676
|
role: "listbox",
|
|
3184
|
-
"aria-label": p.results(
|
|
3677
|
+
"aria-label": p.results(R.length),
|
|
3185
3678
|
tabIndex: 0,
|
|
3186
3679
|
className: "vdt-results",
|
|
3187
3680
|
onKeyDown: (e) => {
|
|
3188
|
-
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(),
|
|
3681
|
+
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), z(Jr(R.map((e) => e.id), A, e.key === "ArrowDown" ? 1 : -1))) : e.key === "Escape" && a();
|
|
3189
3682
|
},
|
|
3190
|
-
children:
|
|
3683
|
+
children: R.length === 0 ? /* @__PURE__ */ P("div", {
|
|
3191
3684
|
className: "vdt-empty",
|
|
3192
|
-
children: [/* @__PURE__ */
|
|
3685
|
+
children: [/* @__PURE__ */ N("div", {
|
|
3193
3686
|
className: "vdt-empty-title",
|
|
3194
|
-
children:
|
|
3195
|
-
}), /* @__PURE__ */
|
|
3687
|
+
children: re.title
|
|
3688
|
+
}), /* @__PURE__ */ N("div", {
|
|
3196
3689
|
className: "vdt-empty-hint",
|
|
3197
|
-
children:
|
|
3690
|
+
children: re.hint
|
|
3198
3691
|
})]
|
|
3199
|
-
}) :
|
|
3692
|
+
}) : R.map((e) => /* @__PURE__ */ N(ui, {
|
|
3200
3693
|
item: e,
|
|
3201
|
-
selected: e.id ===
|
|
3202
|
-
onSelect: () =>
|
|
3694
|
+
selected: e.id === A,
|
|
3695
|
+
onSelect: () => z(e.id === A ? null : e.id)
|
|
3203
3696
|
}, e.id))
|
|
3204
|
-
}), /* @__PURE__ */
|
|
3697
|
+
}), /* @__PURE__ */ N("aside", {
|
|
3205
3698
|
className: "vdt-side",
|
|
3206
3699
|
"aria-live": "polite",
|
|
3207
|
-
children:
|
|
3700
|
+
children: L === null ? /* @__PURE__ */ N("div", {
|
|
3208
3701
|
className: "vdt-empty vdt-empty-side",
|
|
3209
|
-
children: /* @__PURE__ */
|
|
3702
|
+
children: /* @__PURE__ */ N("div", {
|
|
3210
3703
|
className: "vdt-empty-hint",
|
|
3211
3704
|
children: p.selectHint
|
|
3212
3705
|
})
|
|
3213
|
-
}) : /* @__PURE__ */
|
|
3214
|
-
item:
|
|
3215
|
-
retained:
|
|
3706
|
+
}) : /* @__PURE__ */ N(di, {
|
|
3707
|
+
item: L,
|
|
3708
|
+
retained: I
|
|
3216
3709
|
})
|
|
3217
3710
|
})]
|
|
3218
|
-
}) : /* @__PURE__ */
|
|
3711
|
+
}) : /* @__PURE__ */ P("div", {
|
|
3219
3712
|
className: "vdt-body vdt-body-panel",
|
|
3220
3713
|
children: [
|
|
3221
|
-
o === "workflows" ? /* @__PURE__ */
|
|
3222
|
-
o === "stores" ? /* @__PURE__ */
|
|
3223
|
-
o === "indexes" ? /* @__PURE__ */
|
|
3224
|
-
o === "webhooks" ? /* @__PURE__ */
|
|
3225
|
-
o === "routes" ? /* @__PURE__ */
|
|
3226
|
-
o === "runtimes" ? /* @__PURE__ */
|
|
3714
|
+
o === "workflows" ? /* @__PURE__ */ N(Zn, {}) : null,
|
|
3715
|
+
o === "stores" ? /* @__PURE__ */ N(xr, {}) : null,
|
|
3716
|
+
o === "indexes" ? /* @__PURE__ */ N(Sn, {}) : null,
|
|
3717
|
+
o === "webhooks" ? /* @__PURE__ */ N(Pn, {}) : null,
|
|
3718
|
+
o === "routes" ? /* @__PURE__ */ N(ar, {}) : null,
|
|
3719
|
+
o === "runtimes" ? /* @__PURE__ */ N(sr, {}) : null,
|
|
3720
|
+
o === "pwa" ? /* @__PURE__ */ N(pr, {}) : null,
|
|
3721
|
+
o === "desktop" ? /* @__PURE__ */ N(gr, {}) : null
|
|
3227
3722
|
]
|
|
3228
3723
|
}),
|
|
3229
|
-
/* @__PURE__ */
|
|
3724
|
+
/* @__PURE__ */ P("footer", {
|
|
3230
3725
|
className: "vdt-foot",
|
|
3231
3726
|
children: [
|
|
3232
|
-
o === "trace" ? /* @__PURE__ */
|
|
3727
|
+
o === "trace" ? /* @__PURE__ */ N("button", {
|
|
3233
3728
|
type: "button",
|
|
3234
3729
|
className: "vdt-chip vdt-background-filter",
|
|
3235
3730
|
"aria-pressed": g,
|
|
3236
3731
|
onClick: () => _(!g),
|
|
3237
3732
|
children: f.traces.includeBackground
|
|
3238
3733
|
}) : null,
|
|
3239
|
-
|
|
3734
|
+
ne > 0 || T ? /* @__PURE__ */ P("button", {
|
|
3240
3735
|
type: "button",
|
|
3241
3736
|
className: "vdt-chip vdt-chip-info vdt-pending-filter",
|
|
3242
3737
|
"data-chip": "pending",
|
|
3243
|
-
"aria-label": p.pendingInvocations(
|
|
3244
|
-
"aria-pressed":
|
|
3738
|
+
"aria-label": p.pendingInvocations(ne),
|
|
3739
|
+
"aria-pressed": T,
|
|
3245
3740
|
onClick: () => {
|
|
3246
|
-
|
|
3741
|
+
E(!T), c("all"), w(""), z(null);
|
|
3247
3742
|
},
|
|
3248
3743
|
children: [
|
|
3249
|
-
/* @__PURE__ */
|
|
3744
|
+
/* @__PURE__ */ N("span", {
|
|
3250
3745
|
className: "vdt-dot vdt-dot-info",
|
|
3251
3746
|
"aria-hidden": "true"
|
|
3252
3747
|
}),
|
|
3253
|
-
/* @__PURE__ */
|
|
3748
|
+
/* @__PURE__ */ N("b", { children: ne }),
|
|
3254
3749
|
" ",
|
|
3255
3750
|
p.pending
|
|
3256
3751
|
]
|
|
3257
3752
|
}) : null,
|
|
3258
|
-
h.names.map((e) => /* @__PURE__ */
|
|
3259
|
-
S === "" ? null : /* @__PURE__ */
|
|
3753
|
+
h.names.map((e) => /* @__PURE__ */ N(fi, { name: e }, e)),
|
|
3754
|
+
S === "" ? null : /* @__PURE__ */ N("span", {
|
|
3260
3755
|
className: "vdt-foot-route",
|
|
3261
|
-
children: /* @__PURE__ */
|
|
3756
|
+
children: /* @__PURE__ */ N("code", { children: S })
|
|
3262
3757
|
}),
|
|
3263
|
-
/* @__PURE__ */
|
|
3264
|
-
/* @__PURE__ */
|
|
3758
|
+
/* @__PURE__ */ N("span", { className: "vdt-sp" }),
|
|
3759
|
+
/* @__PURE__ */ P("span", {
|
|
3265
3760
|
className: "vdt-hints",
|
|
3266
3761
|
children: [
|
|
3267
|
-
/* @__PURE__ */
|
|
3268
|
-
/* @__PURE__ */
|
|
3762
|
+
/* @__PURE__ */ P("span", { children: [
|
|
3763
|
+
/* @__PURE__ */ N("kbd", {
|
|
3269
3764
|
className: "vdt-kbd",
|
|
3270
3765
|
children: "↑↓"
|
|
3271
3766
|
}),
|
|
3272
3767
|
" ",
|
|
3273
3768
|
p.hintNavigate
|
|
3274
3769
|
] }),
|
|
3275
|
-
/* @__PURE__ */
|
|
3276
|
-
/* @__PURE__ */
|
|
3770
|
+
/* @__PURE__ */ P("span", { children: [
|
|
3771
|
+
/* @__PURE__ */ N("kbd", {
|
|
3277
3772
|
className: "vdt-kbd",
|
|
3278
3773
|
children: "↵"
|
|
3279
3774
|
}),
|
|
3280
3775
|
" ",
|
|
3281
3776
|
p.hintOpen
|
|
3282
3777
|
] }),
|
|
3283
|
-
/* @__PURE__ */
|
|
3284
|
-
/* @__PURE__ */
|
|
3778
|
+
/* @__PURE__ */ P("span", { children: [
|
|
3779
|
+
/* @__PURE__ */ N("kbd", {
|
|
3285
3780
|
className: "vdt-kbd",
|
|
3286
|
-
children:
|
|
3781
|
+
children: si.alt
|
|
3287
3782
|
}),
|
|
3288
3783
|
"+",
|
|
3289
|
-
/* @__PURE__ */
|
|
3784
|
+
/* @__PURE__ */ N("kbd", {
|
|
3290
3785
|
className: "vdt-kbd",
|
|
3291
3786
|
children: "V"
|
|
3292
3787
|
}),
|
|
3293
3788
|
" ",
|
|
3294
3789
|
p.hintToggle
|
|
3295
3790
|
] }),
|
|
3296
|
-
/* @__PURE__ */
|
|
3297
|
-
/* @__PURE__ */
|
|
3791
|
+
/* @__PURE__ */ P("span", { children: [
|
|
3792
|
+
/* @__PURE__ */ N("kbd", {
|
|
3298
3793
|
className: "vdt-kbd",
|
|
3299
|
-
children:
|
|
3794
|
+
children: si.alt
|
|
3300
3795
|
}),
|
|
3301
3796
|
"+",
|
|
3302
|
-
/* @__PURE__ */
|
|
3797
|
+
/* @__PURE__ */ N("kbd", {
|
|
3303
3798
|
className: "vdt-kbd",
|
|
3304
|
-
children:
|
|
3799
|
+
children: si.shift
|
|
3305
3800
|
}),
|
|
3306
3801
|
"+",
|
|
3307
|
-
/* @__PURE__ */
|
|
3802
|
+
/* @__PURE__ */ N("kbd", {
|
|
3308
3803
|
className: "vdt-kbd",
|
|
3309
3804
|
children: "←↑↓→"
|
|
3310
3805
|
}),
|
|
@@ -3316,17 +3811,17 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3316
3811
|
]
|
|
3317
3812
|
})
|
|
3318
3813
|
] });
|
|
3319
|
-
},
|
|
3320
|
-
let n =
|
|
3321
|
-
return /* @__PURE__ */
|
|
3814
|
+
}, gi = ({ error: e, onReset: t }) => {
|
|
3815
|
+
let n = H().shell;
|
|
3816
|
+
return /* @__PURE__ */ P("div", {
|
|
3322
3817
|
role: "alert",
|
|
3323
3818
|
className: "vdt-crash",
|
|
3324
3819
|
children: [
|
|
3325
|
-
/* @__PURE__ */
|
|
3820
|
+
/* @__PURE__ */ N("div", {
|
|
3326
3821
|
className: "vdt-crash-title",
|
|
3327
3822
|
children: n.crashTitle
|
|
3328
3823
|
}),
|
|
3329
|
-
/* @__PURE__ */
|
|
3824
|
+
/* @__PURE__ */ P("pre", {
|
|
3330
3825
|
className: "vdt-crash-message",
|
|
3331
3826
|
children: [
|
|
3332
3827
|
e.name,
|
|
@@ -3334,7 +3829,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3334
3829
|
e.message
|
|
3335
3830
|
]
|
|
3336
3831
|
}),
|
|
3337
|
-
/* @__PURE__ */
|
|
3832
|
+
/* @__PURE__ */ N("button", {
|
|
3338
3833
|
type: "button",
|
|
3339
3834
|
className: "vdt-crash-reset",
|
|
3340
3835
|
onClick: t,
|
|
@@ -3342,7 +3837,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3342
3837
|
})
|
|
3343
3838
|
]
|
|
3344
3839
|
});
|
|
3345
|
-
},
|
|
3840
|
+
}, _i = class extends e {
|
|
3346
3841
|
state = { error: null };
|
|
3347
3842
|
static getDerivedStateFromError(e) {
|
|
3348
3843
|
return { error: e };
|
|
@@ -3351,15 +3846,15 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3351
3846
|
this.props.onError?.(e, t);
|
|
3352
3847
|
}
|
|
3353
3848
|
render() {
|
|
3354
|
-
return this.state.error === null ? this.props.children : /* @__PURE__ */
|
|
3849
|
+
return this.state.error === null ? this.props.children : /* @__PURE__ */ N(gi, {
|
|
3355
3850
|
error: this.state.error,
|
|
3356
3851
|
onReset: () => this.setState({ error: null })
|
|
3357
3852
|
});
|
|
3358
3853
|
}
|
|
3359
|
-
},
|
|
3854
|
+
}, vi = /vdt/, yi = (e, t) => {
|
|
3360
3855
|
for (let n of Array.from(e)) {
|
|
3361
3856
|
if (n instanceof CSSStyleRule) {
|
|
3362
|
-
|
|
3857
|
+
vi.test(n.selectorText) && t.push(n.cssText);
|
|
3363
3858
|
continue;
|
|
3364
3859
|
}
|
|
3365
3860
|
if (n instanceof CSSKeyframesRule) {
|
|
@@ -3368,14 +3863,14 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3368
3863
|
}
|
|
3369
3864
|
if (n instanceof CSSGroupingRule || n instanceof CSSLayerBlockRule) {
|
|
3370
3865
|
let e = [];
|
|
3371
|
-
if (
|
|
3866
|
+
if (yi(n.cssRules, e), e.length === 0) continue;
|
|
3372
3867
|
let r = n.cssText, i = r.slice(0, r.indexOf("{")).trim();
|
|
3373
3868
|
t.push(`${i} {\n${e.join("\n")}\n}`);
|
|
3374
3869
|
continue;
|
|
3375
3870
|
}
|
|
3376
|
-
n.constructor.name === "CSSPropertyRule" &&
|
|
3871
|
+
n.constructor.name === "CSSPropertyRule" && vi.test(n.cssText) && t.push(n.cssText), n.constructor.name === "CSSLayerStatementRule" && t.push(n.cssText);
|
|
3377
3872
|
}
|
|
3378
|
-
},
|
|
3873
|
+
}, bi = (e) => {
|
|
3379
3874
|
let t = [];
|
|
3380
3875
|
for (let n of Array.from(e.styleSheets)) {
|
|
3381
3876
|
let e;
|
|
@@ -3384,10 +3879,10 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3384
3879
|
} catch {
|
|
3385
3880
|
continue;
|
|
3386
3881
|
}
|
|
3387
|
-
|
|
3882
|
+
yi(e, t);
|
|
3388
3883
|
}
|
|
3389
3884
|
return t.join("\n");
|
|
3390
|
-
},
|
|
3885
|
+
}, xi = (e, t) => {
|
|
3391
3886
|
if (typeof CSSStyleSheet < "u" && "replaceSync" in CSSStyleSheet.prototype && "adoptedStyleSheets" in e) {
|
|
3392
3887
|
let n = new CSSStyleSheet();
|
|
3393
3888
|
n.replaceSync(t), e.adoptedStyleSheets = [n];
|
|
@@ -3395,7 +3890,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3395
3890
|
}
|
|
3396
3891
|
let n = e.querySelector("style[data-vdt]");
|
|
3397
3892
|
n === null && (n = e.ownerDocument.createElement("style"), n.setAttribute("data-vdt", ""), e.prepend(n)), n.textContent = t;
|
|
3398
|
-
},
|
|
3893
|
+
}, Si = ({ children: e }) => {
|
|
3399
3894
|
let t = c(null), [n, r] = l(null);
|
|
3400
3895
|
return o(() => {
|
|
3401
3896
|
let e = t.current;
|
|
@@ -3403,8 +3898,8 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3403
3898
|
let n = e.shadowRoot ?? e.attachShadow({ mode: "open" }), i = n.querySelector("[data-vdt-mount]");
|
|
3404
3899
|
i === null && (i = e.ownerDocument.createElement("div"), i.setAttribute("data-vdt-mount", ""), n.append(i));
|
|
3405
3900
|
let a = e.ownerDocument, o = "", s = () => {
|
|
3406
|
-
let e =
|
|
3407
|
-
e !== o && (o = e,
|
|
3901
|
+
let e = bi(a);
|
|
3902
|
+
e !== o && (o = e, xi(n, e));
|
|
3408
3903
|
};
|
|
3409
3904
|
s();
|
|
3410
3905
|
let c = typeof MutationObserver > "u" ? null : new MutationObserver(() => s());
|
|
@@ -3413,37 +3908,37 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3413
3908
|
subtree: !0,
|
|
3414
3909
|
characterData: !0
|
|
3415
3910
|
}), r(i), () => c?.disconnect();
|
|
3416
|
-
}, []), /* @__PURE__ */
|
|
3911
|
+
}, []), /* @__PURE__ */ N("div", {
|
|
3417
3912
|
ref: t,
|
|
3418
3913
|
className: "vdt-root",
|
|
3419
3914
|
"data-voltro-devtools": "",
|
|
3420
|
-
children: n === null ? null :
|
|
3915
|
+
children: n === null ? null : te(e, n)
|
|
3421
3916
|
});
|
|
3422
|
-
},
|
|
3917
|
+
}, Ci = () => u(g, p, p), wi = "voltro:devtools:open", Ti = (e) => {
|
|
3423
3918
|
if (typeof window > "u") return e;
|
|
3424
3919
|
try {
|
|
3425
|
-
let t = window.localStorage.getItem(
|
|
3920
|
+
let t = window.localStorage.getItem(wi);
|
|
3426
3921
|
return t === null ? e : t === "1";
|
|
3427
3922
|
} catch {
|
|
3428
3923
|
return e;
|
|
3429
3924
|
}
|
|
3430
|
-
},
|
|
3925
|
+
}, Ei = (e) => {
|
|
3431
3926
|
if (!(typeof window > "u")) try {
|
|
3432
|
-
window.localStorage.setItem(
|
|
3927
|
+
window.localStorage.setItem(wi, e ? "1" : "0");
|
|
3433
3928
|
} catch {}
|
|
3434
|
-
},
|
|
3435
|
-
let i =
|
|
3436
|
-
return /* @__PURE__ */
|
|
3929
|
+
}, Di = ({ initialIsOpen: e = !1, initialDock: t = "bottom", strings: n, inspectToken: r } = {}) => {
|
|
3930
|
+
let i = rn(r);
|
|
3931
|
+
return /* @__PURE__ */ N(tn, {
|
|
3437
3932
|
token: i,
|
|
3438
|
-
children: /* @__PURE__ */
|
|
3933
|
+
children: /* @__PURE__ */ N(Be, {
|
|
3439
3934
|
strings: n ?? {},
|
|
3440
|
-
children: /* @__PURE__ */
|
|
3935
|
+
children: /* @__PURE__ */ N(Fi, {
|
|
3441
3936
|
initialIsOpen: e,
|
|
3442
3937
|
initialDock: t
|
|
3443
3938
|
})
|
|
3444
3939
|
})
|
|
3445
3940
|
});
|
|
3446
|
-
},
|
|
3941
|
+
}, Oi = (e) => e === "bottom" ? "padding-bottom" : e === "top" ? "padding-top" : e === "left" ? "padding-left" : "padding-right", ki = (e) => {
|
|
3447
3942
|
switch (e.dock) {
|
|
3448
3943
|
case "bottom":
|
|
3449
3944
|
case "top": return { height: e.sizes[e.dock] };
|
|
@@ -3456,50 +3951,52 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3456
3951
|
height: e.window.h
|
|
3457
3952
|
};
|
|
3458
3953
|
}
|
|
3459
|
-
},
|
|
3954
|
+
}, Ai = (e, t, n, r) => {
|
|
3460
3955
|
switch (e) {
|
|
3461
3956
|
case "bottom": return t - r;
|
|
3462
3957
|
case "top": return t + r;
|
|
3463
3958
|
case "left": return t + n;
|
|
3464
3959
|
case "right": return t - n;
|
|
3465
3960
|
}
|
|
3466
|
-
},
|
|
3961
|
+
}, ji = (e) => {
|
|
3467
3962
|
console.error("[voltro devtools] the overlay hit an error and was contained:", e);
|
|
3468
|
-
},
|
|
3963
|
+
}, Mi = (e) => {
|
|
3469
3964
|
let t = document.body.style;
|
|
3470
3965
|
e !== null && t.setProperty("cursor", e), t.setProperty("user-select", "none"), t.setProperty("-webkit-user-select", "none");
|
|
3471
|
-
},
|
|
3966
|
+
}, Ni = () => {
|
|
3472
3967
|
let e = document.body.style;
|
|
3473
3968
|
e.removeProperty("cursor"), e.removeProperty("user-select"), e.removeProperty("-webkit-user-select");
|
|
3474
|
-
},
|
|
3475
|
-
let r =
|
|
3969
|
+
}, Pi = (e) => e instanceof Element && e.closest("button, input, a, [role=\"menu\"], [role=\"tablist\"], label") !== null, Fi = ({ initialIsOpen: e, initialDock: t }) => {
|
|
3970
|
+
let r = H().shell, [a, o] = l(() => Ti(e)), [u, d] = jt(t), [f, p] = l("all"), m = c(null), [h, g] = l(0), _ = Ci(), v = _.length > 0 ? _[_.length - 1] : null;
|
|
3476
3971
|
i(() => {
|
|
3477
|
-
|
|
3972
|
+
Ei(a);
|
|
3973
|
+
}, [a]), i(() => {
|
|
3974
|
+
a || Kt();
|
|
3478
3975
|
}, [a]);
|
|
3479
|
-
let { dock: y, push: b } = u, { setDock: x, setEdgeSize: S, setWindowRect: C, setPush: w } = d, T =
|
|
3480
|
-
a && !D &&
|
|
3481
|
-
let
|
|
3976
|
+
let { dock: y, push: b } = u, { setDock: x, setEdgeSize: S, setWindowRect: C, setPush: w } = d, T = At(), E = s(() => wt(u, T), [u, T]), [D, O] = l(a);
|
|
3977
|
+
a && !D && O(!0);
|
|
3978
|
+
let k = D && !a, A = c(null);
|
|
3482
3979
|
i(() => {
|
|
3483
|
-
if (!
|
|
3484
|
-
let e =
|
|
3980
|
+
if (!k) return;
|
|
3981
|
+
let e = A.current?.getAnimations?.() ?? [];
|
|
3485
3982
|
if (e.length === 0) {
|
|
3486
|
-
|
|
3983
|
+
O(!1);
|
|
3487
3984
|
return;
|
|
3488
3985
|
}
|
|
3489
3986
|
let t = !1, n = () => {
|
|
3490
|
-
t ||
|
|
3987
|
+
t || O(!1);
|
|
3491
3988
|
};
|
|
3492
3989
|
return Promise.all(e.map((e) => e.finished)).then(n, n), () => {
|
|
3493
3990
|
t = !0;
|
|
3494
3991
|
};
|
|
3495
|
-
}, [
|
|
3496
|
-
let
|
|
3992
|
+
}, [k]);
|
|
3993
|
+
let ee = c(null), j = c(!1);
|
|
3497
3994
|
i(() => {
|
|
3498
3995
|
if (D) {
|
|
3499
|
-
|
|
3996
|
+
j.current = !0;
|
|
3500
3997
|
return;
|
|
3501
3998
|
}
|
|
3502
|
-
|
|
3999
|
+
j.current && ee.current?.focus();
|
|
3503
4000
|
}, [D]), i(() => {
|
|
3504
4001
|
if (typeof window > "u") return;
|
|
3505
4002
|
let e = (e, t, n) => e.code === t || e.key.toLowerCase() === n, t = (t) => {
|
|
@@ -3508,11 +4005,11 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3508
4005
|
return;
|
|
3509
4006
|
}
|
|
3510
4007
|
if ((t.metaKey || t.ctrlKey) && !t.altKey && e(t, "KeyK", "k")) {
|
|
3511
|
-
t.preventDefault(), o(!0), p((e) => e === "stores" || e === "indexes" || e === "webhooks" || e === "routes" || e === "runtimes" ? "all" : e), g((e) => e + 1);
|
|
4008
|
+
t.preventDefault(), o(!0), p((e) => e === "stores" || e === "indexes" || e === "webhooks" || e === "routes" || e === "runtimes" || e === "pwa" || e === "desktop" ? "all" : e), g((e) => e + 1);
|
|
3512
4009
|
return;
|
|
3513
4010
|
}
|
|
3514
4011
|
if (t.altKey && t.shiftKey) {
|
|
3515
|
-
let e =
|
|
4012
|
+
let e = Mt(t.key);
|
|
3516
4013
|
e !== null && (t.preventDefault(), o(!0), x(e));
|
|
3517
4014
|
}
|
|
3518
4015
|
};
|
|
@@ -3522,8 +4019,8 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3522
4019
|
let e = requestAnimationFrame(() => m.current?.focus());
|
|
3523
4020
|
return () => cancelAnimationFrame(e);
|
|
3524
4021
|
}, [a, h]), i(() => {
|
|
3525
|
-
if (typeof document > "u" || !D || !b || !
|
|
3526
|
-
let e = document.documentElement, t =
|
|
4022
|
+
if (typeof document > "u" || !D || !b || !dt(y)) return;
|
|
4023
|
+
let e = document.documentElement, t = Oi(y);
|
|
3527
4024
|
return e.style.setProperty(t, `${E.sizes[y]}px`), () => {
|
|
3528
4025
|
e.style.removeProperty(t);
|
|
3529
4026
|
};
|
|
@@ -3533,45 +4030,45 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3533
4030
|
y,
|
|
3534
4031
|
E.sizes
|
|
3535
4032
|
]);
|
|
3536
|
-
let
|
|
3537
|
-
if (!
|
|
4033
|
+
let M = n((e) => {
|
|
4034
|
+
if (!dt(y)) return;
|
|
3538
4035
|
e.preventDefault();
|
|
3539
4036
|
let t = y, n = {
|
|
3540
4037
|
x: e.clientX,
|
|
3541
4038
|
y: e.clientY,
|
|
3542
4039
|
size: E.sizes[t]
|
|
3543
4040
|
}, r = (e) => {
|
|
3544
|
-
S(t,
|
|
4041
|
+
S(t, St(t, Ai(t, n.size, e.clientX - n.x, e.clientY - n.y)));
|
|
3545
4042
|
}, i = () => {
|
|
3546
|
-
window.removeEventListener("pointermove", r), window.removeEventListener("pointerup", i), window.removeEventListener("pointercancel", i),
|
|
4043
|
+
window.removeEventListener("pointermove", r), window.removeEventListener("pointerup", i), window.removeEventListener("pointercancel", i), Ni();
|
|
3547
4044
|
};
|
|
3548
|
-
window.addEventListener("pointermove", r), window.addEventListener("pointerup", i), window.addEventListener("pointercancel", i),
|
|
4045
|
+
window.addEventListener("pointermove", r), window.addEventListener("pointerup", i), window.addEventListener("pointercancel", i), Mi(t === "left" || t === "right" ? "col-resize" : "row-resize");
|
|
3549
4046
|
}, [
|
|
3550
4047
|
y,
|
|
3551
4048
|
E.sizes,
|
|
3552
4049
|
S
|
|
3553
|
-
]),
|
|
3554
|
-
if (y !== "window" ||
|
|
4050
|
+
]), te = n((e) => {
|
|
4051
|
+
if (y !== "window" || Pi(e.target)) return;
|
|
3555
4052
|
e.preventDefault();
|
|
3556
4053
|
let t = {
|
|
3557
4054
|
x: e.clientX,
|
|
3558
4055
|
y: e.clientY,
|
|
3559
4056
|
rect: E.window
|
|
3560
4057
|
}, n = (e) => {
|
|
3561
|
-
C(
|
|
4058
|
+
C(Ct({
|
|
3562
4059
|
...t.rect,
|
|
3563
4060
|
x: t.rect.x + (e.clientX - t.x),
|
|
3564
4061
|
y: t.rect.y + (e.clientY - t.y)
|
|
3565
4062
|
}));
|
|
3566
4063
|
}, r = () => {
|
|
3567
|
-
window.removeEventListener("pointermove", n), window.removeEventListener("pointerup", r), window.removeEventListener("pointercancel", r),
|
|
4064
|
+
window.removeEventListener("pointermove", n), window.removeEventListener("pointerup", r), window.removeEventListener("pointercancel", r), Ni();
|
|
3568
4065
|
};
|
|
3569
|
-
window.addEventListener("pointermove", n), window.addEventListener("pointerup", r), window.addEventListener("pointercancel", r),
|
|
4066
|
+
window.addEventListener("pointermove", n), window.addEventListener("pointerup", r), window.addEventListener("pointercancel", r), Mi(null);
|
|
3570
4067
|
}, [
|
|
3571
4068
|
y,
|
|
3572
4069
|
E.window,
|
|
3573
4070
|
C
|
|
3574
|
-
]),
|
|
4071
|
+
]), ne = n((e) => {
|
|
3575
4072
|
if (y !== "window") return;
|
|
3576
4073
|
e.preventDefault();
|
|
3577
4074
|
let t = {
|
|
@@ -3579,75 +4076,75 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3579
4076
|
y: e.clientY,
|
|
3580
4077
|
rect: E.window
|
|
3581
4078
|
}, n = (e) => {
|
|
3582
|
-
C(
|
|
4079
|
+
C(Ct({
|
|
3583
4080
|
...t.rect,
|
|
3584
4081
|
w: t.rect.w + (e.clientX - t.x),
|
|
3585
4082
|
h: t.rect.h + (e.clientY - t.y)
|
|
3586
4083
|
}));
|
|
3587
4084
|
}, r = () => {
|
|
3588
|
-
window.removeEventListener("pointermove", n), window.removeEventListener("pointerup", r), window.removeEventListener("pointercancel", r),
|
|
4085
|
+
window.removeEventListener("pointermove", n), window.removeEventListener("pointerup", r), window.removeEventListener("pointercancel", r), Ni();
|
|
3589
4086
|
};
|
|
3590
|
-
window.addEventListener("pointermove", n), window.addEventListener("pointerup", r), window.addEventListener("pointercancel", r),
|
|
4087
|
+
window.addEventListener("pointermove", n), window.addEventListener("pointerup", r), window.addEventListener("pointercancel", r), Mi("nwse-resize");
|
|
3591
4088
|
}, [
|
|
3592
4089
|
y,
|
|
3593
4090
|
E.window,
|
|
3594
4091
|
C
|
|
3595
|
-
]),
|
|
3596
|
-
return /* @__PURE__ */
|
|
4092
|
+
]), F = n(() => o(!1), []), I = n(() => o(!0), []);
|
|
4093
|
+
return /* @__PURE__ */ N(Si, { children: /* @__PURE__ */ N("div", {
|
|
3597
4094
|
className: "vdt-host",
|
|
3598
4095
|
"data-open": a ? "true" : "false",
|
|
3599
4096
|
"data-dock": y,
|
|
3600
4097
|
"data-push": b && D && y !== "window" ? "true" : "false",
|
|
3601
|
-
children: /* @__PURE__ */
|
|
4098
|
+
children: /* @__PURE__ */ N("div", {
|
|
3602
4099
|
className: "vdt-scope",
|
|
3603
|
-
children: D ? /* @__PURE__ */
|
|
3604
|
-
ref:
|
|
4100
|
+
children: D ? /* @__PURE__ */ P("section", {
|
|
4101
|
+
ref: A,
|
|
3605
4102
|
className: "vdt-console",
|
|
3606
4103
|
role: "dialog",
|
|
3607
4104
|
"aria-label": r.brand,
|
|
3608
4105
|
"data-dock": y,
|
|
3609
|
-
"data-closing":
|
|
3610
|
-
inert:
|
|
3611
|
-
style:
|
|
4106
|
+
"data-closing": k ? "true" : void 0,
|
|
4107
|
+
inert: k,
|
|
4108
|
+
style: ki(E),
|
|
3612
4109
|
children: [
|
|
3613
|
-
|
|
4110
|
+
dt(y) ? /* @__PURE__ */ N("div", {
|
|
3614
4111
|
className: "vdt-grip",
|
|
3615
4112
|
role: "separator",
|
|
3616
4113
|
"aria-label": r.resizeLabel,
|
|
3617
4114
|
"aria-orientation": y === "left" || y === "right" ? "vertical" : "horizontal",
|
|
3618
|
-
onPointerDown:
|
|
4115
|
+
onPointerDown: M
|
|
3619
4116
|
}) : null,
|
|
3620
|
-
/* @__PURE__ */
|
|
3621
|
-
onError:
|
|
3622
|
-
children: /* @__PURE__ */
|
|
4117
|
+
/* @__PURE__ */ N(_i, {
|
|
4118
|
+
onError: ji,
|
|
4119
|
+
children: /* @__PURE__ */ N(hi, {
|
|
3623
4120
|
dock: y,
|
|
3624
4121
|
push: b,
|
|
3625
4122
|
onDock: x,
|
|
3626
4123
|
onPush: w,
|
|
3627
|
-
onClose:
|
|
4124
|
+
onClose: F,
|
|
3628
4125
|
scope: f,
|
|
3629
4126
|
onScope: p,
|
|
3630
4127
|
searchRef: m,
|
|
3631
|
-
onHeaderPointerDown: y === "window" ?
|
|
4128
|
+
onHeaderPointerDown: y === "window" ? te : void 0
|
|
3632
4129
|
})
|
|
3633
4130
|
}),
|
|
3634
|
-
y === "window" ? /* @__PURE__ */
|
|
4131
|
+
y === "window" ? /* @__PURE__ */ N("div", {
|
|
3635
4132
|
className: "vdt-win-resize",
|
|
3636
4133
|
role: "separator",
|
|
3637
4134
|
"aria-label": r.resizeLabel,
|
|
3638
|
-
onPointerDown:
|
|
4135
|
+
onPointerDown: ne
|
|
3639
4136
|
}) : null
|
|
3640
4137
|
]
|
|
3641
|
-
}) : /* @__PURE__ */
|
|
3642
|
-
onError:
|
|
3643
|
-
children: /* @__PURE__ */
|
|
4138
|
+
}) : /* @__PURE__ */ N(_i, {
|
|
4139
|
+
onError: ji,
|
|
4140
|
+
children: /* @__PURE__ */ N(st, {
|
|
3644
4141
|
status: v,
|
|
3645
|
-
onOpen:
|
|
3646
|
-
buttonRef:
|
|
4142
|
+
onOpen: I,
|
|
4143
|
+
buttonRef: ee
|
|
3647
4144
|
})
|
|
3648
4145
|
})
|
|
3649
4146
|
})
|
|
3650
4147
|
}) });
|
|
3651
4148
|
};
|
|
3652
4149
|
//#endregion
|
|
3653
|
-
export {
|
|
4150
|
+
export { Be as DevtoolsStringsProvider, Di as VoltroDevtools, Le as defaultDevtoolsStrings, H as useDevtoolsStrings };
|