@voltro/devtools 0.81.0 → 0.83.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 +1806 -6
- package/dist/index.d.ts +73 -0
- package/dist/index.js +1464 -958
- 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. The api answers a cross-origin read only for a page on `localhost`, so from a deployed host that path cannot work with or without a token. 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. The web server lends the api's credential only to its own machine, to a session signed in with `VOLTRO_DASHBOARD_TOKEN`, or to a client network listed in `VOLTRO_INSPECT_TRUSTED_CLIENTS` (behind the proxies in `VOLTRO_TRUSTED_PROXIES`).",
|
|
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,39 @@ 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
|
-
}, Q =
|
|
1400
|
+
}, Q = (e, t) => {
|
|
1401
|
+
let n = `${e}\u0000${t ?? ""}`, r = cn.get(n);
|
|
1402
|
+
if (r !== void 0) return r;
|
|
1403
|
+
let i = ln(e, t).finally(() => {
|
|
1404
|
+
cn.delete(n);
|
|
1405
|
+
});
|
|
1406
|
+
return cn.set(n, i), i;
|
|
1407
|
+
}, cn = /* @__PURE__ */ new Map(), ln = async (e, t) => {
|
|
1408
|
+
let n = Bt(e);
|
|
1409
|
+
if (!Ht(n)) return null;
|
|
1410
|
+
let r;
|
|
1185
1411
|
try {
|
|
1186
|
-
|
|
1187
|
-
|
|
1412
|
+
r = await fetch(e, { headers: nn(t, { accept: "application/json" }) });
|
|
1413
|
+
} catch {
|
|
1414
|
+
return Wt(n, !0), null;
|
|
1415
|
+
}
|
|
1416
|
+
if (qt(r.status)) return Ut(await Jt(n, r)), null;
|
|
1417
|
+
if (!r.ok) return Wt(n, !1), null;
|
|
1418
|
+
Gt(n);
|
|
1419
|
+
try {
|
|
1420
|
+
return on(await r.json());
|
|
1188
1421
|
} catch {
|
|
1189
1422
|
return null;
|
|
1190
1423
|
}
|
|
1191
|
-
},
|
|
1424
|
+
}, un = (e) => typeof document > "u" ? () => {} : (document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e)), dn = () => typeof document > "u" || !document.hidden, fn = () => !0, $ = () => u(un, dn, fn), pn = 5e3, mn = async (e, t) => {
|
|
1192
1425
|
if (e === "") return null;
|
|
1193
1426
|
let n = await Q(`${e}/_voltro/inspect/subscriptions`, t);
|
|
1194
1427
|
return n !== null && Array.isArray(n.subscriptions) ? n : null;
|
|
1195
|
-
},
|
|
1196
|
-
let t =
|
|
1428
|
+
}, hn = (e) => {
|
|
1429
|
+
let t = k(), n = $(), r = Z(), a = t.names, o = e && n, [s, c] = l(() => a.map((e) => ({
|
|
1197
1430
|
name: e,
|
|
1198
1431
|
response: null,
|
|
1199
1432
|
live: !1
|
|
@@ -1205,46 +1438,46 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1205
1438
|
...e,
|
|
1206
1439
|
...n
|
|
1207
1440
|
} : e));
|
|
1208
|
-
}, i = a.map((
|
|
1209
|
-
let
|
|
1210
|
-
if (
|
|
1211
|
-
let
|
|
1212
|
-
|
|
1213
|
-
},
|
|
1214
|
-
if (
|
|
1215
|
-
let
|
|
1216
|
-
let
|
|
1217
|
-
|
|
1218
|
-
response:
|
|
1441
|
+
}, i = a.map((i) => {
|
|
1442
|
+
let a = t.get(i).inspectBaseUrl;
|
|
1443
|
+
if (a === "") return { teardown: () => {} };
|
|
1444
|
+
let o = null, s = null, c, l = () => {
|
|
1445
|
+
s !== null && clearInterval(s), s = null;
|
|
1446
|
+
}, u = () => Vt(a) !== void 0, d = () => {
|
|
1447
|
+
if (s !== null || u()) return;
|
|
1448
|
+
let e = async () => {
|
|
1449
|
+
let e = await mn(a, r);
|
|
1450
|
+
e !== null && n(i, {
|
|
1451
|
+
response: e,
|
|
1219
1452
|
live: !1
|
|
1220
|
-
});
|
|
1453
|
+
}), u() && (l(), o?.close());
|
|
1221
1454
|
};
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
},
|
|
1455
|
+
e(), s = setInterval(() => {
|
|
1456
|
+
e();
|
|
1457
|
+
}, pn);
|
|
1225
1458
|
};
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
})
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1459
|
+
return mn(a, r).then((e) => {
|
|
1460
|
+
e !== null && n(i, { response: e }), u() && (l(), o?.close());
|
|
1461
|
+
}), c = setTimeout(() => {
|
|
1462
|
+
if (!(u() || e)) try {
|
|
1463
|
+
o = new EventSource(`${a}/_voltro/inspect/stream`), o.addEventListener("subscriptions", (e) => {
|
|
1464
|
+
try {
|
|
1465
|
+
let t = JSON.parse(e.data).payload;
|
|
1466
|
+
t && typeof t == "object" && n(i, {
|
|
1467
|
+
response: t,
|
|
1468
|
+
live: !0
|
|
1469
|
+
});
|
|
1470
|
+
} catch {}
|
|
1471
|
+
}), o.addEventListener("open", () => {
|
|
1472
|
+
n(i, { live: !0 }), l();
|
|
1473
|
+
}), o.addEventListener("error", () => {
|
|
1474
|
+
n(i, { live: !1 }), d();
|
|
1475
|
+
});
|
|
1476
|
+
} catch {
|
|
1477
|
+
d();
|
|
1478
|
+
}
|
|
1479
|
+
}, 0), { teardown: () => {
|
|
1480
|
+
clearTimeout(c), o?.close(), l();
|
|
1248
1481
|
} };
|
|
1249
1482
|
});
|
|
1250
1483
|
return () => {
|
|
@@ -1257,139 +1490,139 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1257
1490
|
a,
|
|
1258
1491
|
r
|
|
1259
1492
|
]), s;
|
|
1260
|
-
},
|
|
1493
|
+
}, gn = (e) => {
|
|
1261
1494
|
if (typeof e != "object" || !e) return !1;
|
|
1262
1495
|
let t = e;
|
|
1263
|
-
if (Array.isArray(t.and)) return t.and.some(
|
|
1264
|
-
if (Array.isArray(t.or)) return t.or.some(
|
|
1496
|
+
if (Array.isArray(t.and)) return t.and.some(gn);
|
|
1497
|
+
if (Array.isArray(t.or)) return t.or.some(gn);
|
|
1265
1498
|
let n = t.op;
|
|
1266
1499
|
return n === "gt" || n === "gte" || n === "lt" || n === "lte";
|
|
1267
|
-
},
|
|
1500
|
+
}, _n = (e) => {
|
|
1268
1501
|
if (typeof e != "object" || !e) return !1;
|
|
1269
1502
|
let t = e;
|
|
1270
|
-
if (Array.isArray(t.and)) return t.and.some(
|
|
1271
|
-
if (Array.isArray(t.or)) return t.or.some(
|
|
1503
|
+
if (Array.isArray(t.and)) return t.and.some(_n);
|
|
1504
|
+
if (Array.isArray(t.or)) return t.or.some(_n);
|
|
1272
1505
|
let n = t.op;
|
|
1273
1506
|
return n === "eq" || n === "in";
|
|
1274
|
-
},
|
|
1507
|
+
}, vn = (e) => e.usingIndex !== void 0 && e.usingIndex.fields.every((t) => e.conjunctiveColumns.includes(t)) ? "tuple" : _n(e.predicate) ? "column" : gn(e.predicate) ? "range" : "unindexed", yn = (e) => e === "tuple" ? "success" : e === "column" ? "info" : e === "range" ? "neutral" : "warning", bn = (e) => e === "tuple" ? "tuple" : e === "column" ? "column" : e === "range" ? "range" : "UNINDEXED", xn = (e) => e == null ? "null" : typeof e == "string" ? `'${e}'` : Array.isArray(e) ? `[${e.map(xn).join(", ")}]` : String(e), Sn = (e) => e.op === "isNull" ? `${e.column} IS NULL` : e.op === "isNotNull" ? `${e.column} IS NOT NULL` : `${e.column} ${e.op} ${xn(e.value)}`, Cn = (e, t = 0) => {
|
|
1275
1508
|
if (typeof e != "object" || !e) return String(e);
|
|
1276
1509
|
let n = e;
|
|
1277
|
-
if (Array.isArray(n.and)) return n.and.map((e) =>
|
|
1510
|
+
if (Array.isArray(n.and)) return n.and.map((e) => Cn(e, t + 1)).join(" AND ");
|
|
1278
1511
|
if (Array.isArray(n.or)) {
|
|
1279
|
-
let e = n.or.map((e) =>
|
|
1512
|
+
let e = n.or.map((e) => Cn(e, t + 1)).join(" OR ");
|
|
1280
1513
|
return t > 0 ? `(${e})` : e;
|
|
1281
1514
|
}
|
|
1282
|
-
return typeof n.column == "string" && typeof n.op == "string" ?
|
|
1283
|
-
},
|
|
1284
|
-
let e =
|
|
1285
|
-
return e.length === 0 ? /* @__PURE__ */
|
|
1515
|
+
return typeof n.column == "string" && typeof n.op == "string" ? Sn(n) : JSON.stringify(e);
|
|
1516
|
+
}, wn = () => {
|
|
1517
|
+
let e = hn(!0), t = H().indexes, n = e.filter((e) => e.response !== null).length;
|
|
1518
|
+
return e.length === 0 ? /* @__PURE__ */ N(J, { children: t.noApis }) : n === 0 ? /* @__PURE__ */ P(J, { children: [t.unreachableTitle, /* @__PURE__ */ N("div", {
|
|
1286
1519
|
className: "vdt:mt-1 vdt:text-foreground-subtle",
|
|
1287
1520
|
children: t.unreachableHint
|
|
1288
|
-
})] }) : /* @__PURE__ */
|
|
1521
|
+
})] }) : /* @__PURE__ */ N("div", {
|
|
1289
1522
|
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:
|
|
1523
|
+
children: e.map(({ name: e, response: n, live: r }) => n === null ? /* @__PURE__ */ P(G, { children: [/* @__PURE__ */ N(K, {
|
|
1524
|
+
Icon: he,
|
|
1292
1525
|
children: e
|
|
1293
|
-
}), /* @__PURE__ */
|
|
1526
|
+
}), /* @__PURE__ */ N(We, {
|
|
1294
1527
|
className: "vdt:text-xs vdt:text-foreground-subtle",
|
|
1295
1528
|
children: t.offline
|
|
1296
|
-
})] }, e) : /* @__PURE__ */
|
|
1529
|
+
})] }, e) : /* @__PURE__ */ N(Tn, {
|
|
1297
1530
|
apiName: e,
|
|
1298
1531
|
response: n,
|
|
1299
1532
|
live: r
|
|
1300
1533
|
}, e))
|
|
1301
1534
|
});
|
|
1302
|
-
},
|
|
1303
|
-
let r =
|
|
1304
|
-
return /* @__PURE__ */
|
|
1305
|
-
/* @__PURE__ */
|
|
1306
|
-
Icon:
|
|
1307
|
-
right: /* @__PURE__ */
|
|
1535
|
+
}, Tn = ({ apiName: e, response: t, live: n }) => {
|
|
1536
|
+
let r = H().indexes, i = [...t.subscriptions].sort((e, t) => t.subscriberCount - e.subscriberCount);
|
|
1537
|
+
return /* @__PURE__ */ P(G, { children: [
|
|
1538
|
+
/* @__PURE__ */ N(K, {
|
|
1539
|
+
Icon: he,
|
|
1540
|
+
right: /* @__PURE__ */ P("div", {
|
|
1308
1541
|
className: "vdt:flex vdt:items-center vdt:gap-1",
|
|
1309
|
-
children: [/* @__PURE__ */
|
|
1542
|
+
children: [/* @__PURE__ */ N(W, {
|
|
1310
1543
|
tone: "info",
|
|
1311
1544
|
children: r.subsBadge(t.subscriptions.length)
|
|
1312
|
-
}), /* @__PURE__ */
|
|
1545
|
+
}), /* @__PURE__ */ N(W, {
|
|
1313
1546
|
tone: n ? "success" : "neutral",
|
|
1314
1547
|
children: n ? r.live : r.poll
|
|
1315
1548
|
})]
|
|
1316
1549
|
}),
|
|
1317
1550
|
children: e
|
|
1318
1551
|
}),
|
|
1319
|
-
t.matcherStats.length > 0 && /* @__PURE__ */
|
|
1552
|
+
t.matcherStats.length > 0 && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("div", {
|
|
1320
1553
|
className: "vdt:text-[11px] vdt:uppercase vdt:tracking-wide vdt:text-foreground-subtle vdt:mt-3 vdt:mb-1",
|
|
1321
1554
|
children: r.tables
|
|
1322
|
-
}), /* @__PURE__ */
|
|
1555
|
+
}), /* @__PURE__ */ N("div", {
|
|
1323
1556
|
className: "vdt:flex vdt:flex-col vdt:gap-1",
|
|
1324
|
-
children: t.matcherStats.map((e) => /* @__PURE__ */
|
|
1557
|
+
children: t.matcherStats.map((e) => /* @__PURE__ */ P("div", {
|
|
1325
1558
|
className: "vdt:flex vdt:items-baseline vdt:gap-3 vdt:text-xs",
|
|
1326
1559
|
children: [
|
|
1327
|
-
/* @__PURE__ */
|
|
1560
|
+
/* @__PURE__ */ N("span", {
|
|
1328
1561
|
className: "vdt:font-mono vdt:text-foreground",
|
|
1329
1562
|
children: e.tableName
|
|
1330
1563
|
}),
|
|
1331
|
-
/* @__PURE__ */
|
|
1564
|
+
/* @__PURE__ */ P("span", {
|
|
1332
1565
|
className: "vdt:text-foreground-subtle",
|
|
1333
1566
|
children: [e.tupleRouted + e.columnBucketed + e.rangeBucketed + e.unindexedFallback, " subs"]
|
|
1334
1567
|
}),
|
|
1335
|
-
e.tupleRouted > 0 && /* @__PURE__ */
|
|
1568
|
+
e.tupleRouted > 0 && /* @__PURE__ */ N(W, {
|
|
1336
1569
|
tone: "success",
|
|
1337
1570
|
children: `${e.tupleRouted} tuple`
|
|
1338
1571
|
}),
|
|
1339
|
-
e.columnBucketed > 0 && /* @__PURE__ */
|
|
1572
|
+
e.columnBucketed > 0 && /* @__PURE__ */ N(W, {
|
|
1340
1573
|
tone: "info",
|
|
1341
1574
|
children: `${e.columnBucketed} column`
|
|
1342
1575
|
}),
|
|
1343
|
-
e.rangeBucketed > 0 && /* @__PURE__ */
|
|
1576
|
+
e.rangeBucketed > 0 && /* @__PURE__ */ N(W, {
|
|
1344
1577
|
tone: "neutral",
|
|
1345
1578
|
children: `${e.rangeBucketed} range`
|
|
1346
1579
|
}),
|
|
1347
|
-
e.unindexedFallback > 0 && /* @__PURE__ */
|
|
1580
|
+
e.unindexedFallback > 0 && /* @__PURE__ */ N(W, {
|
|
1348
1581
|
tone: "warning",
|
|
1349
1582
|
children: `${e.unindexedFallback} unindexed`
|
|
1350
1583
|
}),
|
|
1351
|
-
e.distinctTupleKeys > 0 && /* @__PURE__ */
|
|
1584
|
+
e.distinctTupleKeys > 0 && /* @__PURE__ */ P("span", {
|
|
1352
1585
|
className: "vdt:text-foreground-subtle",
|
|
1353
1586
|
children: [e.distinctTupleKeys, " tuple keys"]
|
|
1354
1587
|
})
|
|
1355
1588
|
]
|
|
1356
1589
|
}, e.tableName))
|
|
1357
1590
|
})] }),
|
|
1358
|
-
i.length > 0 && /* @__PURE__ */
|
|
1591
|
+
i.length > 0 && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("div", {
|
|
1359
1592
|
className: "vdt:text-[11px] vdt:uppercase vdt:tracking-wide vdt:text-foreground-subtle vdt:mt-3 vdt:mb-1",
|
|
1360
1593
|
children: r.subscriptionsSection
|
|
1361
|
-
}), /* @__PURE__ */
|
|
1594
|
+
}), /* @__PURE__ */ N("div", {
|
|
1362
1595
|
className: "vdt:flex vdt:flex-col vdt:gap-2",
|
|
1363
|
-
children: i.map((e) => /* @__PURE__ */
|
|
1596
|
+
children: i.map((e) => /* @__PURE__ */ N(En, { sub: e }, e.fingerprint))
|
|
1364
1597
|
})] })
|
|
1365
1598
|
] });
|
|
1366
|
-
},
|
|
1367
|
-
let t =
|
|
1368
|
-
return /* @__PURE__ */
|
|
1599
|
+
}, En = ({ sub: e }) => {
|
|
1600
|
+
let t = H().indexes, n = vn(e);
|
|
1601
|
+
return /* @__PURE__ */ P("div", {
|
|
1369
1602
|
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__ */
|
|
1603
|
+
children: [/* @__PURE__ */ P("div", {
|
|
1371
1604
|
className: "vdt:flex vdt:items-baseline vdt:gap-2 vdt:text-xs",
|
|
1372
1605
|
children: [
|
|
1373
|
-
/* @__PURE__ */
|
|
1606
|
+
/* @__PURE__ */ N("span", {
|
|
1374
1607
|
className: "vdt:font-mono vdt:text-foreground",
|
|
1375
1608
|
children: e.table
|
|
1376
1609
|
}),
|
|
1377
|
-
/* @__PURE__ */
|
|
1378
|
-
tone:
|
|
1379
|
-
children:
|
|
1610
|
+
/* @__PURE__ */ N(W, {
|
|
1611
|
+
tone: yn(n),
|
|
1612
|
+
children: bn(n)
|
|
1380
1613
|
}),
|
|
1381
|
-
e.usingIndex && /* @__PURE__ */
|
|
1614
|
+
e.usingIndex && /* @__PURE__ */ P("span", {
|
|
1382
1615
|
className: "vdt:text-foreground-subtle",
|
|
1383
1616
|
children: [
|
|
1384
1617
|
t.via,
|
|
1385
1618
|
" ",
|
|
1386
|
-
/* @__PURE__ */
|
|
1619
|
+
/* @__PURE__ */ N("span", {
|
|
1387
1620
|
className: "vdt:font-mono",
|
|
1388
1621
|
children: e.usingIndex.name
|
|
1389
1622
|
})
|
|
1390
1623
|
]
|
|
1391
1624
|
}),
|
|
1392
|
-
/* @__PURE__ */
|
|
1625
|
+
/* @__PURE__ */ P("span", {
|
|
1393
1626
|
className: "vdt:text-foreground-subtle vdt:ml-auto",
|
|
1394
1627
|
children: [
|
|
1395
1628
|
e.subscriberCount,
|
|
@@ -1398,34 +1631,34 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1398
1631
|
]
|
|
1399
1632
|
})
|
|
1400
1633
|
]
|
|
1401
|
-
}), /* @__PURE__ */
|
|
1634
|
+
}), /* @__PURE__ */ N("div", {
|
|
1402
1635
|
className: "vdt:text-[11px] vdt:font-mono vdt:text-foreground-subtle vdt:break-all",
|
|
1403
|
-
children:
|
|
1636
|
+
children: Cn(e.predicate)
|
|
1404
1637
|
})]
|
|
1405
1638
|
});
|
|
1406
|
-
},
|
|
1407
|
-
let t =
|
|
1639
|
+
}, Dn = (e) => {
|
|
1640
|
+
let t = hn(e), n = 0;
|
|
1408
1641
|
for (let e of t) n += e.response?.subscriptions.length ?? 0;
|
|
1409
1642
|
return n;
|
|
1410
|
-
},
|
|
1643
|
+
}, On = {
|
|
1411
1644
|
outgoing: [],
|
|
1412
1645
|
incoming: [],
|
|
1413
1646
|
targets: [],
|
|
1414
1647
|
deliveries: []
|
|
1415
|
-
},
|
|
1648
|
+
}, kn = 4e3, An = async (e, t) => {
|
|
1416
1649
|
if (e === "") return null;
|
|
1417
1650
|
let n = await Q(`${e}/_voltro/inspect/webhooks`, t);
|
|
1418
1651
|
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(
|
|
1652
|
+
}, jn = (e, t = !0) => {
|
|
1653
|
+
let n = $(), r = Z(), a = t && n && e !== "", [o, s] = l(On);
|
|
1421
1654
|
return i(() => {
|
|
1422
1655
|
if (!a) return;
|
|
1423
1656
|
let t = !1, n = async () => {
|
|
1424
|
-
let n = await
|
|
1657
|
+
let n = await An(e, r);
|
|
1425
1658
|
t || n === null || s(n);
|
|
1426
1659
|
};
|
|
1427
1660
|
n();
|
|
1428
|
-
let i = setInterval(n,
|
|
1661
|
+
let i = setInterval(n, kn);
|
|
1429
1662
|
return () => {
|
|
1430
1663
|
t = !0, clearInterval(i);
|
|
1431
1664
|
};
|
|
@@ -1434,17 +1667,17 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1434
1667
|
a,
|
|
1435
1668
|
r
|
|
1436
1669
|
]), o;
|
|
1437
|
-
},
|
|
1670
|
+
}, Mn = {
|
|
1438
1671
|
pending: "neutral",
|
|
1439
1672
|
inFlight: "info",
|
|
1440
1673
|
succeeded: "success",
|
|
1441
1674
|
failed: "danger",
|
|
1442
1675
|
retryScheduled: "warning"
|
|
1443
|
-
},
|
|
1676
|
+
}, Nn = (e) => {
|
|
1444
1677
|
let t = new Date(e), n = (e) => e < 10 ? `0${e}` : String(e);
|
|
1445
1678
|
return `${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`;
|
|
1446
|
-
},
|
|
1447
|
-
let t =
|
|
1679
|
+
}, Pn = (e) => {
|
|
1680
|
+
let t = k(), n = $(), r = Z(), a = t.names.join(","), [o, s] = l(0), c = e && n;
|
|
1448
1681
|
return i(() => {
|
|
1449
1682
|
if (!c) {
|
|
1450
1683
|
s(0);
|
|
@@ -1456,11 +1689,11 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1456
1689
|
return;
|
|
1457
1690
|
}
|
|
1458
1691
|
let n = !1, i = async () => {
|
|
1459
|
-
let t = await Promise.all(e.map((e) =>
|
|
1692
|
+
let t = await Promise.all(e.map((e) => An(e, r)));
|
|
1460
1693
|
n || s(t.reduce((e, t) => e + (t === null ? 0 : t.outgoing.length + t.incoming.length + t.targets.length), 0));
|
|
1461
1694
|
};
|
|
1462
1695
|
i();
|
|
1463
|
-
let o = setInterval(i,
|
|
1696
|
+
let o = setInterval(i, kn);
|
|
1464
1697
|
return () => {
|
|
1465
1698
|
n = !0, clearInterval(o);
|
|
1466
1699
|
};
|
|
@@ -1470,33 +1703,33 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1470
1703
|
c,
|
|
1471
1704
|
r
|
|
1472
1705
|
]), o;
|
|
1473
|
-
},
|
|
1474
|
-
let n =
|
|
1475
|
-
return n.outgoing.length + n.incoming.length + n.targets.length + n.deliveries.length > 0 ? /* @__PURE__ */
|
|
1706
|
+
}, Fn = ({ apiName: e, baseUrl: t }) => {
|
|
1707
|
+
let n = jn(t), r = H().webhooks;
|
|
1708
|
+
return n.outgoing.length + n.incoming.length + n.targets.length + n.deliveries.length > 0 ? /* @__PURE__ */ N("div", {
|
|
1476
1709
|
className: "vdt:space-y-4",
|
|
1477
|
-
children: /* @__PURE__ */
|
|
1478
|
-
Icon:
|
|
1710
|
+
children: /* @__PURE__ */ P(G, { children: [/* @__PURE__ */ N(K, {
|
|
1711
|
+
Icon: xe,
|
|
1479
1712
|
children: e
|
|
1480
|
-
}), /* @__PURE__ */
|
|
1481
|
-
n.outgoing.length > 0 ? /* @__PURE__ */
|
|
1713
|
+
}), /* @__PURE__ */ P(We, { children: [
|
|
1714
|
+
n.outgoing.length > 0 ? /* @__PURE__ */ P("div", {
|
|
1482
1715
|
className: "vdt:mb-4",
|
|
1483
|
-
children: [/* @__PURE__ */
|
|
1716
|
+
children: [/* @__PURE__ */ N("div", {
|
|
1484
1717
|
className: "vdt:text-foreground-muted vdt:text-xs vdt:uppercase vdt:tracking-wider vdt:mb-2",
|
|
1485
1718
|
children: r.outgoing(n.outgoing.length)
|
|
1486
|
-
}), /* @__PURE__ */
|
|
1719
|
+
}), /* @__PURE__ */ N("div", {
|
|
1487
1720
|
className: "vdt:space-y-1",
|
|
1488
|
-
children: n.outgoing.map((e) => /* @__PURE__ */
|
|
1721
|
+
children: n.outgoing.map((e) => /* @__PURE__ */ P("div", {
|
|
1489
1722
|
className: "vdt-record-row vdt:text-sm",
|
|
1490
1723
|
children: [
|
|
1491
|
-
/* @__PURE__ */
|
|
1724
|
+
/* @__PURE__ */ N("code", {
|
|
1492
1725
|
className: "vdt:text-foreground vdt:font-mono",
|
|
1493
1726
|
children: e.id
|
|
1494
1727
|
}),
|
|
1495
|
-
/* @__PURE__ */
|
|
1728
|
+
/* @__PURE__ */ P(W, {
|
|
1496
1729
|
tone: "neutral",
|
|
1497
1730
|
children: ["v", e.version]
|
|
1498
1731
|
}),
|
|
1499
|
-
e.description ? /* @__PURE__ */
|
|
1732
|
+
e.description ? /* @__PURE__ */ N("span", {
|
|
1500
1733
|
className: "vdt-record-description vdt:text-foreground-muted vdt:text-xs",
|
|
1501
1734
|
children: e.description
|
|
1502
1735
|
}) : null
|
|
@@ -1504,28 +1737,28 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1504
1737
|
}, e.id))
|
|
1505
1738
|
})]
|
|
1506
1739
|
}) : null,
|
|
1507
|
-
n.incoming.length > 0 ? /* @__PURE__ */
|
|
1740
|
+
n.incoming.length > 0 ? /* @__PURE__ */ P("div", {
|
|
1508
1741
|
className: "vdt:mb-4",
|
|
1509
|
-
children: [/* @__PURE__ */
|
|
1742
|
+
children: [/* @__PURE__ */ N("div", {
|
|
1510
1743
|
className: "vdt:text-foreground-muted vdt:text-xs vdt:uppercase vdt:tracking-wider vdt:mb-2",
|
|
1511
1744
|
children: r.incoming(n.incoming.length)
|
|
1512
|
-
}), /* @__PURE__ */
|
|
1745
|
+
}), /* @__PURE__ */ N("div", {
|
|
1513
1746
|
className: "vdt:space-y-1",
|
|
1514
|
-
children: n.incoming.map((e) => /* @__PURE__ */
|
|
1747
|
+
children: n.incoming.map((e) => /* @__PURE__ */ P("div", {
|
|
1515
1748
|
className: "vdt-record-row vdt:text-sm",
|
|
1516
1749
|
children: [
|
|
1517
|
-
/* @__PURE__ */
|
|
1750
|
+
/* @__PURE__ */ N("code", {
|
|
1518
1751
|
className: "vdt:text-foreground vdt:font-mono",
|
|
1519
1752
|
children: e.path
|
|
1520
1753
|
}),
|
|
1521
|
-
e.provider ? /* @__PURE__ */
|
|
1754
|
+
e.provider ? /* @__PURE__ */ N(W, {
|
|
1522
1755
|
tone: "info",
|
|
1523
1756
|
children: e.provider
|
|
1524
1757
|
}) : null,
|
|
1525
|
-
e.signatureConfigured ? /* @__PURE__ */
|
|
1758
|
+
e.signatureConfigured ? /* @__PURE__ */ N(W, {
|
|
1526
1759
|
tone: "success",
|
|
1527
1760
|
children: r.signed
|
|
1528
|
-
}) : /* @__PURE__ */
|
|
1761
|
+
}) : /* @__PURE__ */ N(W, {
|
|
1529
1762
|
tone: "warning",
|
|
1530
1763
|
children: r.unsigned
|
|
1531
1764
|
})
|
|
@@ -1533,41 +1766,41 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1533
1766
|
}, e.id))
|
|
1534
1767
|
})]
|
|
1535
1768
|
}) : null,
|
|
1536
|
-
n.targets.length > 0 ? /* @__PURE__ */
|
|
1769
|
+
n.targets.length > 0 ? /* @__PURE__ */ P("div", {
|
|
1537
1770
|
className: "vdt:mb-4",
|
|
1538
|
-
children: [/* @__PURE__ */
|
|
1771
|
+
children: [/* @__PURE__ */ N("div", {
|
|
1539
1772
|
className: "vdt:text-foreground-muted vdt:text-xs vdt:uppercase vdt:tracking-wider vdt:mb-2",
|
|
1540
1773
|
children: r.targets(n.targets.length)
|
|
1541
|
-
}), /* @__PURE__ */
|
|
1774
|
+
}), /* @__PURE__ */ N("div", {
|
|
1542
1775
|
className: "vdt:space-y-1",
|
|
1543
1776
|
children: n.targets.map((e) => {
|
|
1544
1777
|
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__ */
|
|
1778
|
+
return /* @__PURE__ */ P("div", {
|
|
1546
1779
|
className: "vdt-record-row vdt:text-sm",
|
|
1547
1780
|
children: [
|
|
1548
|
-
/* @__PURE__ */
|
|
1781
|
+
/* @__PURE__ */ N("code", {
|
|
1549
1782
|
className: "vdt:text-foreground vdt:font-mono",
|
|
1550
1783
|
children: e.event
|
|
1551
1784
|
}),
|
|
1552
|
-
/* @__PURE__ */
|
|
1785
|
+
/* @__PURE__ */ N("span", {
|
|
1553
1786
|
className: "vdt:text-foreground-muted",
|
|
1554
1787
|
children: "→"
|
|
1555
1788
|
}),
|
|
1556
|
-
/* @__PURE__ */
|
|
1789
|
+
/* @__PURE__ */ N("span", {
|
|
1557
1790
|
className: "vdt:text-foreground vdt:text-xs vdt:truncate vdt:max-w-72",
|
|
1558
1791
|
children: e.url
|
|
1559
1792
|
}),
|
|
1560
|
-
e.active ? /* @__PURE__ */
|
|
1793
|
+
e.active ? /* @__PURE__ */ N(W, {
|
|
1561
1794
|
tone: "success",
|
|
1562
1795
|
children: r.active
|
|
1563
|
-
}) : /* @__PURE__ */
|
|
1796
|
+
}) : /* @__PURE__ */ N(W, {
|
|
1564
1797
|
tone: "warning",
|
|
1565
1798
|
children: r.paused
|
|
1566
1799
|
}),
|
|
1567
|
-
i === "current" ? /* @__PURE__ */
|
|
1800
|
+
i === "current" ? /* @__PURE__ */ P(W, {
|
|
1568
1801
|
tone: "neutral",
|
|
1569
1802
|
children: ["v", e.payloadVersion]
|
|
1570
|
-
}) : i === "behind" ? /* @__PURE__ */
|
|
1803
|
+
}) : i === "behind" ? /* @__PURE__ */ P(W, {
|
|
1571
1804
|
tone: "warning",
|
|
1572
1805
|
children: [
|
|
1573
1806
|
"v",
|
|
@@ -1575,7 +1808,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1575
1808
|
" ← current v",
|
|
1576
1809
|
t
|
|
1577
1810
|
]
|
|
1578
|
-
}) : /* @__PURE__ */
|
|
1811
|
+
}) : /* @__PURE__ */ P(W, {
|
|
1579
1812
|
tone: "danger",
|
|
1580
1813
|
children: [
|
|
1581
1814
|
"v",
|
|
@@ -1589,39 +1822,39 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1589
1822
|
})
|
|
1590
1823
|
})]
|
|
1591
1824
|
}) : null,
|
|
1592
|
-
n.deliveries.length > 0 ? /* @__PURE__ */
|
|
1825
|
+
n.deliveries.length > 0 ? /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("div", {
|
|
1593
1826
|
className: "vdt:text-foreground-muted vdt:text-xs vdt:uppercase vdt:tracking-wider vdt:mb-2",
|
|
1594
1827
|
children: r.deliveries(n.deliveries.length)
|
|
1595
|
-
}), /* @__PURE__ */
|
|
1828
|
+
}), /* @__PURE__ */ N("div", {
|
|
1596
1829
|
className: "vdt:space-y-0.5 vdt:font-mono vdt:text-xs",
|
|
1597
|
-
children: n.deliveries.map((e) => /* @__PURE__ */
|
|
1830
|
+
children: n.deliveries.map((e) => /* @__PURE__ */ P("div", {
|
|
1598
1831
|
className: "vdt:flex vdt:items-center vdt:gap-2",
|
|
1599
1832
|
children: [
|
|
1600
|
-
/* @__PURE__ */
|
|
1833
|
+
/* @__PURE__ */ N("span", {
|
|
1601
1834
|
className: "vdt:text-foreground-subtle",
|
|
1602
|
-
children:
|
|
1835
|
+
children: Nn(e.scheduledAt)
|
|
1603
1836
|
}),
|
|
1604
|
-
/* @__PURE__ */
|
|
1837
|
+
/* @__PURE__ */ N("span", {
|
|
1605
1838
|
className: "vdt:text-foreground vdt:min-w-32 vdt:truncate",
|
|
1606
1839
|
children: e.event
|
|
1607
1840
|
}),
|
|
1608
|
-
/* @__PURE__ */
|
|
1609
|
-
tone:
|
|
1841
|
+
/* @__PURE__ */ N(W, {
|
|
1842
|
+
tone: Mn[e.status],
|
|
1610
1843
|
children: e.status
|
|
1611
1844
|
}),
|
|
1612
|
-
e.responseStatus === null ? null : /* @__PURE__ */
|
|
1845
|
+
e.responseStatus === null ? null : /* @__PURE__ */ N("span", {
|
|
1613
1846
|
className: "vdt:text-foreground-muted",
|
|
1614
1847
|
children: e.responseStatus
|
|
1615
1848
|
}),
|
|
1616
|
-
e.latencyMs === null ? null : /* @__PURE__ */
|
|
1849
|
+
e.latencyMs === null ? null : /* @__PURE__ */ P("span", {
|
|
1617
1850
|
className: "vdt:text-foreground-subtle",
|
|
1618
1851
|
children: [e.latencyMs, "ms"]
|
|
1619
1852
|
}),
|
|
1620
|
-
/* @__PURE__ */
|
|
1853
|
+
/* @__PURE__ */ N("span", {
|
|
1621
1854
|
className: "vdt:text-foreground-subtle",
|
|
1622
1855
|
children: r.attempt(e.attempt)
|
|
1623
1856
|
}),
|
|
1624
|
-
e.errorMessage ? /* @__PURE__ */
|
|
1857
|
+
e.errorMessage ? /* @__PURE__ */ N("span", {
|
|
1625
1858
|
className: "vdt:text-danger vdt:truncate vdt:max-w-64",
|
|
1626
1859
|
children: e.errorMessage
|
|
1627
1860
|
}) : null
|
|
@@ -1630,75 +1863,82 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1630
1863
|
})] }) : null
|
|
1631
1864
|
] })] })
|
|
1632
1865
|
}) : null;
|
|
1633
|
-
},
|
|
1634
|
-
let e =
|
|
1635
|
-
return e.names.length === 0 ? /* @__PURE__ */
|
|
1866
|
+
}, In = () => {
|
|
1867
|
+
let e = k(), t = H().webhooks;
|
|
1868
|
+
return e.names.length === 0 ? /* @__PURE__ */ N(J, { children: t.empty }) : /* @__PURE__ */ N("div", {
|
|
1636
1869
|
className: "vdt:space-y-4 vdt:p-3",
|
|
1637
1870
|
children: e.names.map((t) => {
|
|
1638
1871
|
let n = e.get(t);
|
|
1639
|
-
return /* @__PURE__ */
|
|
1872
|
+
return /* @__PURE__ */ N(Fn, {
|
|
1640
1873
|
apiName: t,
|
|
1641
1874
|
baseUrl: n.inspectBaseUrl
|
|
1642
1875
|
}, t);
|
|
1643
1876
|
})
|
|
1644
1877
|
});
|
|
1645
|
-
},
|
|
1646
|
-
let n = `${e}/_voltro/inspect/stream?channels=${encodeURIComponent(t.channels.join(","))}`, r = !1, i =
|
|
1878
|
+
}, Ln = (e, t) => {
|
|
1879
|
+
let n = `${e}/_voltro/inspect/stream?channels=${encodeURIComponent(t.channels.join(","))}`, r = !1, i = !1, a = 0, o, s, c = async () => {
|
|
1647
1880
|
if (r) return;
|
|
1648
|
-
|
|
1649
|
-
|
|
1881
|
+
if (Vt(e) !== void 0) {
|
|
1882
|
+
i = !0;
|
|
1883
|
+
return;
|
|
1884
|
+
}
|
|
1885
|
+
o = new AbortController();
|
|
1886
|
+
let l;
|
|
1650
1887
|
try {
|
|
1651
|
-
let
|
|
1652
|
-
headers:
|
|
1653
|
-
signal:
|
|
1888
|
+
let s = await fetch(n, {
|
|
1889
|
+
headers: nn(t.token, { accept: "text/event-stream" }),
|
|
1890
|
+
signal: o.signal
|
|
1654
1891
|
});
|
|
1655
|
-
if (
|
|
1892
|
+
if (qt(s.status)) throw Ut(await Jt(e, s)), i = !0, Error(`inspect stream refused (HTTP ${s.status})`);
|
|
1893
|
+
if (!s.ok || s.body === null) throw Error(`inspect stream HTTP ${s.status}`);
|
|
1656
1894
|
if (r) {
|
|
1657
|
-
await
|
|
1895
|
+
await s.body.cancel();
|
|
1658
1896
|
return;
|
|
1659
1897
|
}
|
|
1660
|
-
|
|
1661
|
-
let
|
|
1898
|
+
a = 0, l = s.body.getReader();
|
|
1899
|
+
let c = new TextDecoder(), u = "";
|
|
1662
1900
|
for (; !r;) {
|
|
1663
|
-
let { done:
|
|
1664
|
-
if (
|
|
1665
|
-
if (
|
|
1666
|
-
let
|
|
1667
|
-
for (; (
|
|
1668
|
-
let e =
|
|
1669
|
-
|
|
1901
|
+
let { done: e, value: n } = await l.read();
|
|
1902
|
+
if (e) break;
|
|
1903
|
+
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");
|
|
1904
|
+
let r;
|
|
1905
|
+
for (; (r = u.indexOf("\n\n")) !== -1;) {
|
|
1906
|
+
let e = u.slice(0, r);
|
|
1907
|
+
u = u.slice(r + 2);
|
|
1670
1908
|
let n = e.split("\n").filter((e) => e.startsWith("data:")).map((e) => e.slice(5).replace(/^ /, "")).join("\n");
|
|
1671
1909
|
if (n === "") continue;
|
|
1672
|
-
let
|
|
1910
|
+
let i;
|
|
1673
1911
|
try {
|
|
1674
|
-
|
|
1912
|
+
i = JSON.parse(n);
|
|
1675
1913
|
} catch {
|
|
1676
1914
|
continue;
|
|
1677
1915
|
}
|
|
1678
|
-
typeof
|
|
1916
|
+
typeof i == "object" && i && typeof i.channel == "string" && t.onEvent(i);
|
|
1679
1917
|
}
|
|
1680
1918
|
}
|
|
1681
1919
|
if (!r) throw Error("inspect stream disconnected");
|
|
1682
1920
|
} catch (e) {
|
|
1683
1921
|
r || t.onError?.(e instanceof Error ? e : Error(String(e)));
|
|
1684
1922
|
} finally {
|
|
1685
|
-
await
|
|
1923
|
+
await l?.cancel().catch(() => void 0), l?.releaseLock(), o.abort();
|
|
1686
1924
|
}
|
|
1687
|
-
if (!r) {
|
|
1688
|
-
let e = Math.min(3e4, 1e3 * 2 **
|
|
1689
|
-
|
|
1690
|
-
|
|
1925
|
+
if (!r && !i) {
|
|
1926
|
+
let e = Math.min(3e4, 1e3 * 2 ** a);
|
|
1927
|
+
a = Math.min(a + 1, 5), s = setTimeout(() => {
|
|
1928
|
+
c();
|
|
1691
1929
|
}, e);
|
|
1692
1930
|
}
|
|
1693
1931
|
};
|
|
1694
|
-
return s
|
|
1695
|
-
|
|
1932
|
+
return s = setTimeout(() => {
|
|
1933
|
+
c();
|
|
1934
|
+
}, 0), { close: () => {
|
|
1935
|
+
r = !0, clearTimeout(s), o?.abort();
|
|
1696
1936
|
} };
|
|
1697
|
-
},
|
|
1937
|
+
}, Rn = (e, t, n, r = 250) => {
|
|
1698
1938
|
let [a, o] = l(0), s = t.join(",");
|
|
1699
1939
|
return i(() => {
|
|
1700
1940
|
if (!n || e === "") return;
|
|
1701
|
-
let t = new Set(s.split(",")), i, a = !1, c =
|
|
1941
|
+
let t = new Set(s.split(",")), i, a = !1, c = Ln(e, {
|
|
1702
1942
|
channels: s.split(","),
|
|
1703
1943
|
token: null,
|
|
1704
1944
|
onEvent: (e) => {
|
|
@@ -1716,7 +1956,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1716
1956
|
n,
|
|
1717
1957
|
r
|
|
1718
1958
|
]), a;
|
|
1719
|
-
},
|
|
1959
|
+
}, zn = {
|
|
1720
1960
|
queued: "neutral",
|
|
1721
1961
|
running: "info",
|
|
1722
1962
|
succeeded: "success",
|
|
@@ -1724,36 +1964,36 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1724
1964
|
cancelled: "warning",
|
|
1725
1965
|
paused: "accent",
|
|
1726
1966
|
suspended: "accent"
|
|
1727
|
-
},
|
|
1967
|
+
}, Bn = {
|
|
1728
1968
|
running: "info",
|
|
1729
1969
|
succeeded: "success",
|
|
1730
1970
|
failed: "danger"
|
|
1731
|
-
},
|
|
1971
|
+
}, Vn = 50, Hn = 1e4, Un = (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`, Wn = (e) => {
|
|
1732
1972
|
let t = new Date(e), n = (e) => e < 10 ? `0${e}` : String(e);
|
|
1733
1973
|
return `${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`;
|
|
1734
|
-
},
|
|
1974
|
+
}, Gn = (e) => {
|
|
1735
1975
|
try {
|
|
1736
1976
|
return JSON.stringify(e, null, 2);
|
|
1737
1977
|
} catch {
|
|
1738
1978
|
return String(e);
|
|
1739
1979
|
}
|
|
1740
|
-
},
|
|
1980
|
+
}, Kn = (e) => e === "running" || e === "queued", qn = (e, t) => e.durationMs ?? (Kn(e.status) ? t - new Date(e.startedAt).getTime() : null), Jn = (e) => {
|
|
1741
1981
|
let t = /* @__PURE__ */ new Set();
|
|
1742
1982
|
for (let n of e) {
|
|
1743
1983
|
let e = n.payload?.signalName;
|
|
1744
1984
|
typeof e == "string" && (n.eventType === "signal-awaited" && t.add(e), n.eventType === "signal-received" && t.delete(e));
|
|
1745
1985
|
}
|
|
1746
1986
|
return [...t];
|
|
1747
|
-
},
|
|
1987
|
+
}, Yn = async (e, t) => {
|
|
1748
1988
|
if (e === "") return null;
|
|
1749
|
-
let n = await Q(`${e}/_voltro/inspect/workflows/runs?limit=${
|
|
1989
|
+
let n = await Q(`${e}/_voltro/inspect/workflows/runs?limit=${Vn}`, t);
|
|
1750
1990
|
return n !== null && Array.isArray(n.runs) ? n.runs : null;
|
|
1751
|
-
},
|
|
1752
|
-
let t = $(), n = Z(), r = t && e !== "", a =
|
|
1991
|
+
}, Xn = (e) => {
|
|
1992
|
+
let t = $(), n = Z(), r = t && e !== "", a = Rn(e, ["workflowRuns"], r), [o, s] = l([]), [c, u] = l(!1);
|
|
1753
1993
|
return i(() => {
|
|
1754
1994
|
if (!r) return;
|
|
1755
1995
|
let t = !1, i = async () => {
|
|
1756
|
-
let r = await
|
|
1996
|
+
let r = await Yn(e, n);
|
|
1757
1997
|
if (!t) {
|
|
1758
1998
|
if (r === null) {
|
|
1759
1999
|
u(!0);
|
|
@@ -1763,7 +2003,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1763
2003
|
}
|
|
1764
2004
|
};
|
|
1765
2005
|
i();
|
|
1766
|
-
let a = setInterval(i,
|
|
2006
|
+
let a = setInterval(i, Hn);
|
|
1767
2007
|
return () => {
|
|
1768
2008
|
t = !0, clearInterval(a);
|
|
1769
2009
|
};
|
|
@@ -1776,8 +2016,8 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1776
2016
|
runs: o,
|
|
1777
2017
|
failed: c
|
|
1778
2018
|
};
|
|
1779
|
-
},
|
|
1780
|
-
let n = $(), r = Z(), a =
|
|
2019
|
+
}, Zn = (e, t) => {
|
|
2020
|
+
let n = $(), r = Z(), a = Rn(e, ["workflowSteps", "workflowEvents"], n && e !== ""), [o, s] = l([]), [c, u] = l([]);
|
|
1781
2021
|
return i(() => {
|
|
1782
2022
|
if (!n || e === "") return;
|
|
1783
2023
|
let i = !1, a = `${e}/_voltro/inspect/workflows/runs/${encodeURIComponent(t)}`, o = async () => {
|
|
@@ -1785,7 +2025,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1785
2025
|
i || (e !== null && Array.isArray(e.steps) && s(e.steps), t !== null && Array.isArray(t.events) && u(t.events));
|
|
1786
2026
|
};
|
|
1787
2027
|
o();
|
|
1788
|
-
let c = setInterval(o,
|
|
2028
|
+
let c = setInterval(o, Hn);
|
|
1789
2029
|
return () => {
|
|
1790
2030
|
i = !0, clearInterval(c);
|
|
1791
2031
|
};
|
|
@@ -1799,8 +2039,8 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1799
2039
|
steps: o,
|
|
1800
2040
|
events: c
|
|
1801
2041
|
};
|
|
1802
|
-
},
|
|
1803
|
-
let t =
|
|
2042
|
+
}, Qn = (e) => {
|
|
2043
|
+
let t = k(), n = $(), r = Z(), a = t.names.join(","), [o, s] = l(0), c = e && n, u = Rn(a === "" ? "" : t.get(a.split(",")[0]).inspectBaseUrl ?? "", ["workflowRuns"], c);
|
|
1804
2044
|
return i(() => {
|
|
1805
2045
|
if (!c) {
|
|
1806
2046
|
s(0);
|
|
@@ -1812,11 +2052,11 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1812
2052
|
return;
|
|
1813
2053
|
}
|
|
1814
2054
|
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) =>
|
|
2055
|
+
let t = await Promise.all(e.map((e) => Yn(e, r)));
|
|
2056
|
+
n || s(t.reduce((e, t) => e + (t === null ? 0 : t.filter((e) => Kn(e.status)).length), 0));
|
|
1817
2057
|
};
|
|
1818
2058
|
i();
|
|
1819
|
-
let o = setInterval(i,
|
|
2059
|
+
let o = setInterval(i, Hn);
|
|
1820
2060
|
return () => {
|
|
1821
2061
|
n = !0, clearInterval(o);
|
|
1822
2062
|
};
|
|
@@ -1827,87 +2067,87 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1827
2067
|
r,
|
|
1828
2068
|
u
|
|
1829
2069
|
]), o;
|
|
1830
|
-
},
|
|
1831
|
-
let e =
|
|
1832
|
-
return e.names.length === 0 ? /* @__PURE__ */
|
|
2070
|
+
}, $n = () => {
|
|
2071
|
+
let e = k(), t = H().workflows;
|
|
2072
|
+
return e.names.length === 0 ? /* @__PURE__ */ N(J, { children: t.noApi }) : /* @__PURE__ */ N("div", {
|
|
1833
2073
|
className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
|
|
1834
|
-
children: e.names.map((e) => /* @__PURE__ */
|
|
2074
|
+
children: e.names.map((e) => /* @__PURE__ */ N(er, { apiName: e }, e))
|
|
1835
2075
|
});
|
|
1836
|
-
},
|
|
1837
|
-
let t =
|
|
2076
|
+
}, er = ({ apiName: e }) => {
|
|
2077
|
+
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 } = Xn(a), d = c.filter((e) => Kn(e.status)).length, [f, p] = l(null), [m, h] = l(() => Date.now());
|
|
1838
2078
|
return i(() => {
|
|
1839
2079
|
if (d === 0) return;
|
|
1840
2080
|
let e = setInterval(() => h(Date.now()), 1e3);
|
|
1841
2081
|
return () => clearInterval(e);
|
|
1842
|
-
}, [d]), /* @__PURE__ */
|
|
1843
|
-
/* @__PURE__ */
|
|
1844
|
-
Icon:
|
|
1845
|
-
right: d > 0 ? /* @__PURE__ */
|
|
2082
|
+
}, [d]), /* @__PURE__ */ P(G, { children: [
|
|
2083
|
+
/* @__PURE__ */ N(K, {
|
|
2084
|
+
Icon: Se,
|
|
2085
|
+
right: d > 0 ? /* @__PURE__ */ N(W, {
|
|
1846
2086
|
tone: "info",
|
|
1847
2087
|
children: n.runningBadge(d)
|
|
1848
|
-
}) : /* @__PURE__ */
|
|
2088
|
+
}) : /* @__PURE__ */ N(W, {
|
|
1849
2089
|
tone: "neutral",
|
|
1850
2090
|
children: n.runsBadge(c.length)
|
|
1851
2091
|
}),
|
|
1852
2092
|
children: e
|
|
1853
2093
|
}),
|
|
1854
|
-
/* @__PURE__ */
|
|
2094
|
+
/* @__PURE__ */ N(tr, {
|
|
1855
2095
|
apiName: e,
|
|
1856
2096
|
definitions: o,
|
|
1857
2097
|
runs: c
|
|
1858
2098
|
}),
|
|
1859
|
-
/* @__PURE__ */
|
|
2099
|
+
/* @__PURE__ */ P("div", {
|
|
1860
2100
|
className: "vdt:px-3 vdt:py-2 vdt:border-t vdt:border-border",
|
|
1861
|
-
children: [/* @__PURE__ */
|
|
2101
|
+
children: [/* @__PURE__ */ N("div", {
|
|
1862
2102
|
className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:mb-1.5",
|
|
1863
2103
|
children: n.runs(c.length)
|
|
1864
|
-
}), u ? /* @__PURE__ */
|
|
2104
|
+
}), u ? /* @__PURE__ */ N("div", {
|
|
1865
2105
|
className: "vdt:text-xs vdt:text-danger",
|
|
1866
2106
|
children: n.runsUnavailable
|
|
1867
|
-
}) : c.length === 0 ? /* @__PURE__ */
|
|
2107
|
+
}) : c.length === 0 ? /* @__PURE__ */ N("div", {
|
|
1868
2108
|
className: "vdt:text-xs vdt:text-foreground-subtle",
|
|
1869
2109
|
children: o.length === 0 ? n.noDefinitions : n.noRuns
|
|
1870
|
-
}) : /* @__PURE__ */
|
|
2110
|
+
}) : /* @__PURE__ */ N("div", {
|
|
1871
2111
|
className: "vdt:flex vdt:flex-col vdt:gap-0.5",
|
|
1872
|
-
children: c.map((e) => /* @__PURE__ */
|
|
2112
|
+
children: c.map((e) => /* @__PURE__ */ P("div", {
|
|
1873
2113
|
"data-run-id": e.id,
|
|
1874
2114
|
"data-run-status": e.status,
|
|
1875
|
-
children: [/* @__PURE__ */
|
|
2115
|
+
children: [/* @__PURE__ */ P("button", {
|
|
1876
2116
|
type: "button",
|
|
1877
2117
|
"aria-expanded": f === e.id,
|
|
1878
2118
|
onClick: () => p(f === e.id ? null : e.id),
|
|
1879
2119
|
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
2120
|
children: [
|
|
1881
|
-
/* @__PURE__ */
|
|
2121
|
+
/* @__PURE__ */ N("span", {
|
|
1882
2122
|
className: "vdt:text-foreground-subtle vdt:w-2",
|
|
1883
2123
|
children: f === e.id ? "▾" : "▸"
|
|
1884
2124
|
}),
|
|
1885
|
-
/* @__PURE__ */
|
|
1886
|
-
tone:
|
|
2125
|
+
/* @__PURE__ */ N(W, {
|
|
2126
|
+
tone: zn[e.status] ?? "neutral",
|
|
1887
2127
|
children: e.status
|
|
1888
2128
|
}),
|
|
1889
|
-
/* @__PURE__ */
|
|
2129
|
+
/* @__PURE__ */ N("code", {
|
|
1890
2130
|
className: "vdt:font-mono vdt:text-foreground vdt:truncate",
|
|
1891
2131
|
children: e.tag
|
|
1892
2132
|
}),
|
|
1893
|
-
e.parentExecutionId === null ? null : /* @__PURE__ */
|
|
2133
|
+
e.parentExecutionId === null ? null : /* @__PURE__ */ N(W, {
|
|
1894
2134
|
tone: "neutral",
|
|
1895
2135
|
children: n.child
|
|
1896
2136
|
}),
|
|
1897
|
-
e.errorMessage === null ? null : /* @__PURE__ */
|
|
2137
|
+
e.errorMessage === null ? null : /* @__PURE__ */ P("span", {
|
|
1898
2138
|
className: "vdt:text-danger vdt:truncate vdt:font-mono vdt:text-[11px]",
|
|
1899
2139
|
children: [e.errorTag === null ? "" : `${e.errorTag} · `, e.errorMessage]
|
|
1900
2140
|
}),
|
|
1901
|
-
/* @__PURE__ */
|
|
2141
|
+
/* @__PURE__ */ N("span", {
|
|
1902
2142
|
className: "vdt:ml-auto vdt:tabular-nums vdt:text-foreground-muted vdt:whitespace-nowrap",
|
|
1903
|
-
children:
|
|
2143
|
+
children: Un(qn(e, m))
|
|
1904
2144
|
}),
|
|
1905
|
-
/* @__PURE__ */
|
|
2145
|
+
/* @__PURE__ */ N("span", {
|
|
1906
2146
|
className: "vdt:tabular-nums vdt:text-foreground-subtle vdt:whitespace-nowrap",
|
|
1907
|
-
children:
|
|
2147
|
+
children: Wn(e.startedAt)
|
|
1908
2148
|
})
|
|
1909
2149
|
]
|
|
1910
|
-
}), f === e.id ? /* @__PURE__ */
|
|
2150
|
+
}), f === e.id ? /* @__PURE__ */ N(nr, {
|
|
1911
2151
|
baseUrl: a,
|
|
1912
2152
|
run: e
|
|
1913
2153
|
}) : null]
|
|
@@ -1915,19 +2155,19 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1915
2155
|
})]
|
|
1916
2156
|
})
|
|
1917
2157
|
] });
|
|
1918
|
-
},
|
|
1919
|
-
let r =
|
|
2158
|
+
}, tr = ({ apiName: e, definitions: t, runs: n }) => {
|
|
2159
|
+
let r = H().workflows, [a, o] = l(t[0] ?? "");
|
|
1920
2160
|
i(() => {
|
|
1921
2161
|
a === "" && t.length > 0 && o(t[0]);
|
|
1922
2162
|
}, [t, a]);
|
|
1923
2163
|
let c = s(() => {
|
|
1924
2164
|
let e = n.find((e) => e.tag === a);
|
|
1925
|
-
return e === void 0 ? "{}" :
|
|
2165
|
+
return e === void 0 ? "{}" : Gn(e.payload);
|
|
1926
2166
|
}, [n, a]), [u, d] = l(c), [f, p] = l(!1);
|
|
1927
2167
|
i(() => {
|
|
1928
2168
|
f || d(c);
|
|
1929
2169
|
}, [c, f]);
|
|
1930
|
-
let [m, h] = l(null), g =
|
|
2170
|
+
let [m, h] = l(null), g = j(e, a === "" ? "__voltro.devtools.none" : a);
|
|
1931
2171
|
if (t.length === 0) return null;
|
|
1932
2172
|
let _ = async () => {
|
|
1933
2173
|
let e;
|
|
@@ -1954,30 +2194,30 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1954
2194
|
});
|
|
1955
2195
|
}
|
|
1956
2196
|
};
|
|
1957
|
-
return /* @__PURE__ */
|
|
2197
|
+
return /* @__PURE__ */ P("div", {
|
|
1958
2198
|
className: "vdt:px-3 vdt:py-2 vdt:flex vdt:flex-col vdt:gap-1.5",
|
|
1959
2199
|
children: [
|
|
1960
|
-
/* @__PURE__ */
|
|
2200
|
+
/* @__PURE__ */ P("div", {
|
|
1961
2201
|
className: "vdt:flex vdt:items-center vdt:gap-2",
|
|
1962
2202
|
children: [
|
|
1963
|
-
/* @__PURE__ */
|
|
2203
|
+
/* @__PURE__ */ N("span", {
|
|
1964
2204
|
className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider",
|
|
1965
2205
|
children: r.start
|
|
1966
2206
|
}),
|
|
1967
|
-
/* @__PURE__ */
|
|
2207
|
+
/* @__PURE__ */ N("select", {
|
|
1968
2208
|
"aria-label": r.workflowLabel,
|
|
1969
2209
|
value: a,
|
|
1970
2210
|
onChange: (e) => {
|
|
1971
2211
|
o(e.target.value), p(!1), h(null);
|
|
1972
2212
|
},
|
|
1973
2213
|
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__ */
|
|
2214
|
+
children: t.map((e) => /* @__PURE__ */ N("option", {
|
|
1975
2215
|
value: e,
|
|
1976
2216
|
children: e
|
|
1977
2217
|
}, e))
|
|
1978
2218
|
}),
|
|
1979
|
-
/* @__PURE__ */
|
|
1980
|
-
/* @__PURE__ */
|
|
2219
|
+
/* @__PURE__ */ N("span", { className: "vdt:sp" }),
|
|
2220
|
+
/* @__PURE__ */ N(U, {
|
|
1981
2221
|
onClick: () => {
|
|
1982
2222
|
_();
|
|
1983
2223
|
},
|
|
@@ -1986,7 +2226,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1986
2226
|
})
|
|
1987
2227
|
]
|
|
1988
2228
|
}),
|
|
1989
|
-
/* @__PURE__ */
|
|
2229
|
+
/* @__PURE__ */ N("textarea", {
|
|
1990
2230
|
"aria-label": r.payloadLabel,
|
|
1991
2231
|
value: u,
|
|
1992
2232
|
onChange: (e) => {
|
|
@@ -1996,19 +2236,19 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
1996
2236
|
rows: Math.min(8, Math.max(2, u.split("\n").length)),
|
|
1997
2237
|
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
2238
|
}),
|
|
1999
|
-
/* @__PURE__ */
|
|
2239
|
+
/* @__PURE__ */ N("div", {
|
|
2000
2240
|
className: "vdt:text-[10px] vdt:text-foreground-subtle",
|
|
2001
2241
|
children: r.payloadHint
|
|
2002
2242
|
}),
|
|
2003
|
-
m === null ? null : /* @__PURE__ */
|
|
2243
|
+
m === null ? null : /* @__PURE__ */ N("div", {
|
|
2004
2244
|
role: m.tone === "danger" ? "alert" : "status",
|
|
2005
2245
|
className: `vdt:text-xs ${m.tone === "danger" ? "vdt:text-danger" : "vdt:text-success"}`,
|
|
2006
2246
|
children: m.text
|
|
2007
2247
|
})
|
|
2008
2248
|
]
|
|
2009
2249
|
});
|
|
2010
|
-
},
|
|
2011
|
-
let n =
|
|
2250
|
+
}, nr = ({ baseUrl: e, run: t }) => {
|
|
2251
|
+
let n = H().workflows, r = Z(), { steps: a, events: o } = Zn(e, t.id), c = s(() => Jn(o), [o]), [u, d] = l(""), [f, p] = l("{}"), [m, h] = l(!1), [g, _] = l(null);
|
|
2012
2252
|
i(() => {
|
|
2013
2253
|
u === "" && c.length > 0 && d(c[0]);
|
|
2014
2254
|
}, [c, u]);
|
|
@@ -2028,7 +2268,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2028
2268
|
h(!1);
|
|
2029
2269
|
}
|
|
2030
2270
|
}, C = () => S(n.cancel, async () => {
|
|
2031
|
-
let e = await
|
|
2271
|
+
let e = await sn(`${x}/cancel`, r, {});
|
|
2032
2272
|
return n.cancelResult(typeof e.kind == "string" ? e.kind : e.cancelled === !0 ? "confirmed" : "submitted");
|
|
2033
2273
|
}), w = () => S(n.sendSignal, async () => {
|
|
2034
2274
|
let e;
|
|
@@ -2037,20 +2277,20 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2037
2277
|
} catch (e) {
|
|
2038
2278
|
throw Error(n.invalidJson(e instanceof Error ? e.message : String(e)));
|
|
2039
2279
|
}
|
|
2040
|
-
return await
|
|
2280
|
+
return await sn(`${x}/signal`, r, e === void 0 ? { signalName: u } : {
|
|
2041
2281
|
signalName: u,
|
|
2042
2282
|
payload: e
|
|
2043
2283
|
}), n.signalSent(u);
|
|
2044
2284
|
});
|
|
2045
|
-
return /* @__PURE__ */
|
|
2285
|
+
return /* @__PURE__ */ P("div", {
|
|
2046
2286
|
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
2287
|
children: [
|
|
2048
|
-
/* @__PURE__ */
|
|
2288
|
+
/* @__PURE__ */ P("div", {
|
|
2049
2289
|
className: "vdt:grid vdt:grid-cols-1 vdt:sm:grid-cols-2 vdt:gap-2",
|
|
2050
|
-
children: [/* @__PURE__ */
|
|
2290
|
+
children: [/* @__PURE__ */ N(rr, {
|
|
2051
2291
|
label: n.payloadLabel,
|
|
2052
2292
|
value: t.payload
|
|
2053
|
-
}), /* @__PURE__ */
|
|
2293
|
+
}), /* @__PURE__ */ N(rr, {
|
|
2054
2294
|
label: t.status === "failed" ? n.error : n.output,
|
|
2055
2295
|
value: t.status === "failed" ? {
|
|
2056
2296
|
tag: t.errorTag,
|
|
@@ -2058,46 +2298,46 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2058
2298
|
} : t.output
|
|
2059
2299
|
})]
|
|
2060
2300
|
}),
|
|
2061
|
-
/* @__PURE__ */
|
|
2301
|
+
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("div", {
|
|
2062
2302
|
className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:mb-1",
|
|
2063
2303
|
children: n.steps(a.length)
|
|
2064
|
-
}), a.length === 0 ? /* @__PURE__ */
|
|
2304
|
+
}), a.length === 0 ? /* @__PURE__ */ N("div", {
|
|
2065
2305
|
className: "vdt:text-foreground-subtle",
|
|
2066
2306
|
children: n.noSteps
|
|
2067
|
-
}) : /* @__PURE__ */
|
|
2307
|
+
}) : /* @__PURE__ */ N("div", {
|
|
2068
2308
|
className: "vdt:flex vdt:flex-col vdt:gap-0.5",
|
|
2069
|
-
children: a.map((e) => /* @__PURE__ */
|
|
2309
|
+
children: a.map((e) => /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ P("button", {
|
|
2070
2310
|
type: "button",
|
|
2071
2311
|
onClick: () => y(v === e.id ? null : e.id),
|
|
2072
2312
|
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
2313
|
children: [
|
|
2074
|
-
/* @__PURE__ */
|
|
2075
|
-
tone:
|
|
2314
|
+
/* @__PURE__ */ N(W, {
|
|
2315
|
+
tone: Bn[e.status] ?? "info",
|
|
2076
2316
|
children: e.status
|
|
2077
2317
|
}),
|
|
2078
|
-
/* @__PURE__ */
|
|
2318
|
+
/* @__PURE__ */ N("code", {
|
|
2079
2319
|
className: "vdt:font-mono vdt:text-foreground",
|
|
2080
2320
|
children: e.stepName
|
|
2081
2321
|
}),
|
|
2082
|
-
e.attempt > 1 ? /* @__PURE__ */
|
|
2322
|
+
e.attempt > 1 ? /* @__PURE__ */ N("span", {
|
|
2083
2323
|
className: "vdt:text-warning",
|
|
2084
2324
|
children: n.attempt(e.attempt)
|
|
2085
2325
|
}) : null,
|
|
2086
|
-
e.errorMessage === null ? null : /* @__PURE__ */
|
|
2326
|
+
e.errorMessage === null ? null : /* @__PURE__ */ N("span", {
|
|
2087
2327
|
className: "vdt:text-danger vdt:truncate vdt:font-mono vdt:text-[11px]",
|
|
2088
2328
|
children: e.errorMessage
|
|
2089
2329
|
}),
|
|
2090
|
-
/* @__PURE__ */
|
|
2330
|
+
/* @__PURE__ */ N("span", {
|
|
2091
2331
|
className: "vdt:ml-auto vdt:tabular-nums vdt:text-foreground-muted",
|
|
2092
|
-
children:
|
|
2332
|
+
children: Un(e.durationMs)
|
|
2093
2333
|
})
|
|
2094
2334
|
]
|
|
2095
|
-
}), v === e.id ? /* @__PURE__ */
|
|
2335
|
+
}), v === e.id ? /* @__PURE__ */ P("div", {
|
|
2096
2336
|
className: "vdt:ml-3 vdt:grid vdt:grid-cols-1 vdt:sm:grid-cols-2 vdt:gap-2 vdt:py-1",
|
|
2097
|
-
children: [/* @__PURE__ */
|
|
2337
|
+
children: [/* @__PURE__ */ N(rr, {
|
|
2098
2338
|
label: n.input,
|
|
2099
2339
|
value: e.input
|
|
2100
|
-
}), /* @__PURE__ */
|
|
2340
|
+
}), /* @__PURE__ */ N(rr, {
|
|
2101
2341
|
label: e.status === "failed" ? n.error : n.output,
|
|
2102
2342
|
value: e.status === "failed" ? e.errorCause ?? {
|
|
2103
2343
|
tag: e.errorTag,
|
|
@@ -2106,50 +2346,50 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2106
2346
|
})]
|
|
2107
2347
|
}) : null] }, e.id))
|
|
2108
2348
|
})] }),
|
|
2109
|
-
o.length > 0 ? /* @__PURE__ */
|
|
2349
|
+
o.length > 0 ? /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("div", {
|
|
2110
2350
|
className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:mb-1",
|
|
2111
2351
|
children: n.events(o.length)
|
|
2112
|
-
}), /* @__PURE__ */
|
|
2352
|
+
}), /* @__PURE__ */ N("div", {
|
|
2113
2353
|
className: "vdt:flex vdt:flex-wrap vdt:gap-1",
|
|
2114
|
-
children: o.map((e) => /* @__PURE__ */
|
|
2115
|
-
title:
|
|
2354
|
+
children: o.map((e) => /* @__PURE__ */ P("span", {
|
|
2355
|
+
title: Wn(e.occurredAt),
|
|
2116
2356
|
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
2357
|
children: [e.eventType, e.stepName === null ? "" : ` · ${e.stepName}`]
|
|
2118
2358
|
}, e.id))
|
|
2119
2359
|
})] }) : null,
|
|
2120
|
-
/* @__PURE__ */
|
|
2360
|
+
/* @__PURE__ */ P("div", {
|
|
2121
2361
|
className: "vdt:flex vdt:flex-wrap vdt:items-center vdt:gap-2",
|
|
2122
2362
|
children: [
|
|
2123
|
-
b ? /* @__PURE__ */
|
|
2363
|
+
b ? /* @__PURE__ */ N(U, {
|
|
2124
2364
|
onClick: () => {
|
|
2125
2365
|
C();
|
|
2126
2366
|
},
|
|
2127
2367
|
disabled: m,
|
|
2128
2368
|
children: n.cancel
|
|
2129
2369
|
}) : null,
|
|
2130
|
-
c.length > 0 && t.status === "running" ? /* @__PURE__ */
|
|
2131
|
-
/* @__PURE__ */
|
|
2370
|
+
c.length > 0 && t.status === "running" ? /* @__PURE__ */ P(M, { children: [
|
|
2371
|
+
/* @__PURE__ */ N("span", {
|
|
2132
2372
|
className: "vdt:text-foreground-muted",
|
|
2133
2373
|
children: n.awaiting
|
|
2134
2374
|
}),
|
|
2135
|
-
/* @__PURE__ */
|
|
2375
|
+
/* @__PURE__ */ N("select", {
|
|
2136
2376
|
"aria-label": n.signalName,
|
|
2137
2377
|
value: u,
|
|
2138
2378
|
onChange: (e) => d(e.target.value),
|
|
2139
2379
|
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__ */
|
|
2380
|
+
children: c.map((e) => /* @__PURE__ */ N("option", {
|
|
2141
2381
|
value: e,
|
|
2142
2382
|
children: e
|
|
2143
2383
|
}, e))
|
|
2144
2384
|
}),
|
|
2145
|
-
/* @__PURE__ */
|
|
2385
|
+
/* @__PURE__ */ N("input", {
|
|
2146
2386
|
"aria-label": n.signalPayload,
|
|
2147
2387
|
value: f,
|
|
2148
2388
|
onChange: (e) => p(e.target.value),
|
|
2149
2389
|
spellCheck: !1,
|
|
2150
2390
|
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
2391
|
}),
|
|
2152
|
-
/* @__PURE__ */
|
|
2392
|
+
/* @__PURE__ */ N(U, {
|
|
2153
2393
|
onClick: () => {
|
|
2154
2394
|
w();
|
|
2155
2395
|
},
|
|
@@ -2157,7 +2397,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2157
2397
|
children: n.sendSignal
|
|
2158
2398
|
})
|
|
2159
2399
|
] }) : null,
|
|
2160
|
-
t.traceId === null ? null : /* @__PURE__ */
|
|
2400
|
+
t.traceId === null ? null : /* @__PURE__ */ P("span", {
|
|
2161
2401
|
className: "vdt:text-[10px] vdt:font-mono vdt:text-foreground-subtle",
|
|
2162
2402
|
children: [
|
|
2163
2403
|
n.trace,
|
|
@@ -2167,32 +2407,32 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2167
2407
|
})
|
|
2168
2408
|
]
|
|
2169
2409
|
}),
|
|
2170
|
-
g === null ? null : /* @__PURE__ */
|
|
2410
|
+
g === null ? null : /* @__PURE__ */ N("div", {
|
|
2171
2411
|
role: g.tone === "danger" ? "alert" : "status",
|
|
2172
2412
|
className: g.tone === "danger" ? "vdt:text-danger" : "vdt:text-success",
|
|
2173
2413
|
children: g.text
|
|
2174
2414
|
})
|
|
2175
2415
|
]
|
|
2176
2416
|
});
|
|
2177
|
-
},
|
|
2417
|
+
}, rr = ({ label: e, value: t }) => /* @__PURE__ */ P("div", {
|
|
2178
2418
|
className: "vdt:min-w-0",
|
|
2179
|
-
children: [/* @__PURE__ */
|
|
2419
|
+
children: [/* @__PURE__ */ N("div", {
|
|
2180
2420
|
className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:mb-0.5",
|
|
2181
2421
|
children: e
|
|
2182
|
-
}), t == null ? /* @__PURE__ */
|
|
2422
|
+
}), t == null ? /* @__PURE__ */ N("div", {
|
|
2183
2423
|
className: "vdt:text-foreground-subtle",
|
|
2184
2424
|
children: "—"
|
|
2185
|
-
}) : /* @__PURE__ */
|
|
2425
|
+
}) : /* @__PURE__ */ N("pre", {
|
|
2186
2426
|
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:
|
|
2427
|
+
children: Gn(t)
|
|
2188
2428
|
})]
|
|
2189
|
-
}),
|
|
2429
|
+
}), ir = (e) => {
|
|
2190
2430
|
try {
|
|
2191
2431
|
return JSON.stringify(e, null, 2);
|
|
2192
2432
|
} catch {
|
|
2193
2433
|
return String(e);
|
|
2194
2434
|
}
|
|
2195
|
-
},
|
|
2435
|
+
}, ar = () => u(h, f, f), or = () => {
|
|
2196
2436
|
let [e, t] = l(() => typeof window > "u" ? "/" : window.location.pathname);
|
|
2197
2437
|
return i(() => {
|
|
2198
2438
|
if (typeof window > "u") return;
|
|
@@ -2203,49 +2443,49 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2203
2443
|
window.removeEventListener("popstate", e), clearInterval(n);
|
|
2204
2444
|
};
|
|
2205
2445
|
}, []), e;
|
|
2206
|
-
},
|
|
2207
|
-
let e =
|
|
2446
|
+
}, sr = () => {
|
|
2447
|
+
let e = ar(), t = or(), 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
2448
|
key: e,
|
|
2209
2449
|
value: String(t)
|
|
2210
2450
|
}));
|
|
2211
|
-
return /* @__PURE__ */
|
|
2451
|
+
return /* @__PURE__ */ P("div", {
|
|
2212
2452
|
className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
|
|
2213
|
-
children: [/* @__PURE__ */
|
|
2214
|
-
/* @__PURE__ */
|
|
2215
|
-
Icon:
|
|
2453
|
+
children: [/* @__PURE__ */ P(G, { children: [
|
|
2454
|
+
/* @__PURE__ */ N(K, {
|
|
2455
|
+
Icon: _e,
|
|
2216
2456
|
children: n.currentRoute
|
|
2217
2457
|
}),
|
|
2218
|
-
/* @__PURE__ */
|
|
2458
|
+
/* @__PURE__ */ N(q, { entries: [{
|
|
2219
2459
|
key: "pathname",
|
|
2220
2460
|
value: a
|
|
2221
2461
|
}, {
|
|
2222
2462
|
key: "params",
|
|
2223
2463
|
value: o.length === 0 ? "—" : ""
|
|
2224
2464
|
}] }),
|
|
2225
|
-
o.length > 0 ? /* @__PURE__ */
|
|
2465
|
+
o.length > 0 ? /* @__PURE__ */ N("div", {
|
|
2226
2466
|
className: "vdt:px-3 vdt:pb-3",
|
|
2227
|
-
children: /* @__PURE__ */
|
|
2467
|
+
children: /* @__PURE__ */ N(q, { entries: o })
|
|
2228
2468
|
}) : null
|
|
2229
|
-
] }), /* @__PURE__ */
|
|
2230
|
-
/* @__PURE__ */
|
|
2231
|
-
Icon:
|
|
2469
|
+
] }), /* @__PURE__ */ P(G, { children: [
|
|
2470
|
+
/* @__PURE__ */ N(K, {
|
|
2471
|
+
Icon: _e,
|
|
2232
2472
|
children: n.loaderData
|
|
2233
2473
|
}),
|
|
2234
|
-
/* @__PURE__ */
|
|
2474
|
+
/* @__PURE__ */ N("button", {
|
|
2235
2475
|
onClick: () => i((e) => !e),
|
|
2236
2476
|
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
2477
|
children: r ? n.collapse : n.expand
|
|
2238
2478
|
}),
|
|
2239
|
-
r ? e.loaderData === void 0 ? /* @__PURE__ */
|
|
2479
|
+
r ? e.loaderData === void 0 ? /* @__PURE__ */ P(J, { children: [n.noLoaderTitle, /* @__PURE__ */ N("div", {
|
|
2240
2480
|
className: "vdt:mt-1 vdt:text-foreground-subtle",
|
|
2241
|
-
children: n.noLoaderHint(/* @__PURE__ */
|
|
2242
|
-
})] }) : /* @__PURE__ */
|
|
2481
|
+
children: n.noLoaderHint(/* @__PURE__ */ N("code", { children: "<Router>" }))
|
|
2482
|
+
})] }) : /* @__PURE__ */ N("pre", {
|
|
2243
2483
|
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:
|
|
2484
|
+
children: ir(e.loaderData)
|
|
2245
2485
|
}) : null
|
|
2246
2486
|
] })]
|
|
2247
2487
|
});
|
|
2248
|
-
},
|
|
2488
|
+
}, cr = (e) => {
|
|
2249
2489
|
let t = 0, n = 0, r = 0, i = 0, a = 0;
|
|
2250
2490
|
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
2491
|
return {
|
|
@@ -2255,23 +2495,23 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2255
2495
|
streams: i,
|
|
2256
2496
|
workflows: a
|
|
2257
2497
|
};
|
|
2258
|
-
},
|
|
2259
|
-
let e =
|
|
2260
|
-
return n.length === 0 ? /* @__PURE__ */
|
|
2498
|
+
}, lr = () => {
|
|
2499
|
+
let e = k(), t = H().runtimes, n = e.names;
|
|
2500
|
+
return n.length === 0 ? /* @__PURE__ */ P(J, { children: [t.emptyTitle, /* @__PURE__ */ N("div", {
|
|
2261
2501
|
className: "vdt:mt-1 vdt:text-foreground-subtle",
|
|
2262
2502
|
children: t.emptyHint
|
|
2263
|
-
})] }) : /* @__PURE__ */
|
|
2503
|
+
})] }) : /* @__PURE__ */ N("div", {
|
|
2264
2504
|
className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
|
|
2265
2505
|
children: n.map((n) => {
|
|
2266
|
-
let r = e.get(n), i =
|
|
2267
|
-
return /* @__PURE__ */
|
|
2268
|
-
Icon:
|
|
2269
|
-
right: /* @__PURE__ */
|
|
2506
|
+
let r = e.get(n), i = cr(r.descriptors);
|
|
2507
|
+
return /* @__PURE__ */ P(G, { children: [/* @__PURE__ */ N(K, {
|
|
2508
|
+
Icon: ve,
|
|
2509
|
+
right: /* @__PURE__ */ N(W, {
|
|
2270
2510
|
tone: "success",
|
|
2271
2511
|
children: t.live
|
|
2272
2512
|
}),
|
|
2273
2513
|
children: n
|
|
2274
|
-
}), /* @__PURE__ */
|
|
2514
|
+
}), /* @__PURE__ */ N(q, { entries: [
|
|
2275
2515
|
{
|
|
2276
2516
|
key: "queries",
|
|
2277
2517
|
value: String(i.queries)
|
|
@@ -2303,7 +2543,262 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2303
2543
|
] })] }, n);
|
|
2304
2544
|
})
|
|
2305
2545
|
});
|
|
2306
|
-
},
|
|
2546
|
+
}, ur = (e, t) => ({
|
|
2547
|
+
supported: t,
|
|
2548
|
+
scope: e?.scope ?? null,
|
|
2549
|
+
scriptUrl: e?.active?.scriptURL ?? e?.waiting?.scriptURL ?? e?.installing?.scriptURL ?? null,
|
|
2550
|
+
installing: e?.installing?.state ?? null,
|
|
2551
|
+
waiting: e?.waiting?.state ?? null,
|
|
2552
|
+
active: e?.active?.state ?? null,
|
|
2553
|
+
backgroundSync: e != null && "sync" in e && e.sync !== void 0
|
|
2554
|
+
}), dr = (e) => e.filter((e) => e.startsWith("voltro-")).sort(), fr = (e) => {
|
|
2555
|
+
try {
|
|
2556
|
+
return new URL(e).host;
|
|
2557
|
+
} catch {
|
|
2558
|
+
return "(unparseable endpoint)";
|
|
2559
|
+
}
|
|
2560
|
+
}, pr = async () => {
|
|
2561
|
+
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 = ur(n ?? null, t), i = globalThis.caches, a = i ? dr(await i.keys().catch(() => [])) : [], o = [];
|
|
2562
|
+
for (let e of a) {
|
|
2563
|
+
let t = i ? await i.open(e).then((e) => e.keys()).then((e) => e.length).catch(() => 0) : 0;
|
|
2564
|
+
o.push({
|
|
2565
|
+
name: e,
|
|
2566
|
+
entries: t
|
|
2567
|
+
});
|
|
2568
|
+
}
|
|
2569
|
+
let s = globalThis.Notification, c = null;
|
|
2570
|
+
if (n?.pushManager) {
|
|
2571
|
+
let e = await n.pushManager.getSubscription().catch(() => null);
|
|
2572
|
+
c = e ? fr(e.endpoint) : null;
|
|
2573
|
+
}
|
|
2574
|
+
return {
|
|
2575
|
+
worker: r,
|
|
2576
|
+
caches: o,
|
|
2577
|
+
pushPermission: s?.permission ?? null,
|
|
2578
|
+
pushEndpointHost: c
|
|
2579
|
+
};
|
|
2580
|
+
}, mr = (e) => e === "activated" ? "success" : e === null ? "neutral" : "warning", hr = () => {
|
|
2581
|
+
let e = H().pwa, t = _(), r = v(), a = y(), o = A(), [s, c] = l(null), u = n(() => {
|
|
2582
|
+
pr().then(c);
|
|
2583
|
+
}, []);
|
|
2584
|
+
if (i(() => {
|
|
2585
|
+
u();
|
|
2586
|
+
let e = typeof navigator > "u" ? void 0 : navigator;
|
|
2587
|
+
return e?.serviceWorker?.addEventListener?.("controllerchange", u), () => {
|
|
2588
|
+
e?.serviceWorker?.removeEventListener?.("controllerchange", u);
|
|
2589
|
+
};
|
|
2590
|
+
}, [u]), s === null) return /* @__PURE__ */ N(J, { children: e.loading });
|
|
2591
|
+
if (!s.worker.supported) return /* @__PURE__ */ N(J, { children: e.unsupported });
|
|
2592
|
+
let d = s.worker;
|
|
2593
|
+
return /* @__PURE__ */ P("div", {
|
|
2594
|
+
className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
|
|
2595
|
+
children: [
|
|
2596
|
+
/* @__PURE__ */ P(G, { children: [/* @__PURE__ */ N(K, {
|
|
2597
|
+
Icon: ve,
|
|
2598
|
+
right: /* @__PURE__ */ N(U, {
|
|
2599
|
+
size: "sm",
|
|
2600
|
+
onClick: u,
|
|
2601
|
+
children: e.refresh
|
|
2602
|
+
}),
|
|
2603
|
+
children: e.worker
|
|
2604
|
+
}), /* @__PURE__ */ N(q, { entries: [
|
|
2605
|
+
{
|
|
2606
|
+
key: e.scope,
|
|
2607
|
+
value: d.scope ?? e.none
|
|
2608
|
+
},
|
|
2609
|
+
{
|
|
2610
|
+
key: e.script,
|
|
2611
|
+
value: d.scriptUrl ?? e.none
|
|
2612
|
+
},
|
|
2613
|
+
{
|
|
2614
|
+
key: "installing",
|
|
2615
|
+
value: /* @__PURE__ */ N(W, {
|
|
2616
|
+
tone: mr(d.installing),
|
|
2617
|
+
children: d.installing ?? e.none
|
|
2618
|
+
})
|
|
2619
|
+
},
|
|
2620
|
+
{
|
|
2621
|
+
key: "waiting",
|
|
2622
|
+
value: /* @__PURE__ */ N(W, {
|
|
2623
|
+
tone: mr(d.waiting),
|
|
2624
|
+
children: d.waiting ?? e.none
|
|
2625
|
+
})
|
|
2626
|
+
},
|
|
2627
|
+
{
|
|
2628
|
+
key: "active",
|
|
2629
|
+
value: /* @__PURE__ */ N(W, {
|
|
2630
|
+
tone: mr(d.active),
|
|
2631
|
+
children: d.active ?? e.none
|
|
2632
|
+
})
|
|
2633
|
+
},
|
|
2634
|
+
{
|
|
2635
|
+
key: e.backgroundSync,
|
|
2636
|
+
value: d.backgroundSync ? e.yes : e.no
|
|
2637
|
+
}
|
|
2638
|
+
] })] }),
|
|
2639
|
+
/* @__PURE__ */ P(G, { children: [/* @__PURE__ */ N(K, {
|
|
2640
|
+
right: /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(U, {
|
|
2641
|
+
size: "sm",
|
|
2642
|
+
onClick: () => {
|
|
2643
|
+
t.check();
|
|
2644
|
+
},
|
|
2645
|
+
children: e.checkNow
|
|
2646
|
+
}), /* @__PURE__ */ N(U, {
|
|
2647
|
+
size: "sm",
|
|
2648
|
+
variant: "accent",
|
|
2649
|
+
disabled: !t.updateAvailable,
|
|
2650
|
+
onClick: () => {
|
|
2651
|
+
t.apply({ force: !0 });
|
|
2652
|
+
},
|
|
2653
|
+
children: e.forceUpdate
|
|
2654
|
+
})] }),
|
|
2655
|
+
children: e.update
|
|
2656
|
+
}), /* @__PURE__ */ N(q, { entries: [
|
|
2657
|
+
{
|
|
2658
|
+
key: e.currentBuild,
|
|
2659
|
+
value: o.platform.appVersion ?? e.unknown
|
|
2660
|
+
},
|
|
2661
|
+
{
|
|
2662
|
+
key: e.waitingBuild,
|
|
2663
|
+
value: t.updateAvailable ? t.version ?? e.unknown : e.none
|
|
2664
|
+
},
|
|
2665
|
+
{
|
|
2666
|
+
key: e.online,
|
|
2667
|
+
value: a.online ? e.yes : e.no
|
|
2668
|
+
}
|
|
2669
|
+
] })] }),
|
|
2670
|
+
/* @__PURE__ */ P(G, { children: [/* @__PURE__ */ N(K, { children: e.precache }), s.caches.length === 0 ? /* @__PURE__ */ N("div", {
|
|
2671
|
+
className: "vdt:px-3 vdt:py-2 vdt:text-xs vdt:text-foreground-subtle",
|
|
2672
|
+
children: e.noCaches
|
|
2673
|
+
}) : /* @__PURE__ */ N(q, { entries: s.caches.map((t) => ({
|
|
2674
|
+
key: t.name,
|
|
2675
|
+
value: e.entries(t.entries)
|
|
2676
|
+
})) })] }),
|
|
2677
|
+
/* @__PURE__ */ P(G, { children: [/* @__PURE__ */ N(K, {
|
|
2678
|
+
right: r.canInstall ? /* @__PURE__ */ N(U, {
|
|
2679
|
+
size: "sm",
|
|
2680
|
+
onClick: () => {
|
|
2681
|
+
r.install();
|
|
2682
|
+
},
|
|
2683
|
+
children: e.install
|
|
2684
|
+
}) : void 0,
|
|
2685
|
+
children: e.installAndPush
|
|
2686
|
+
}), /* @__PURE__ */ N(q, { entries: [
|
|
2687
|
+
{
|
|
2688
|
+
key: e.installed,
|
|
2689
|
+
value: r.installed ? e.yes : e.no
|
|
2690
|
+
},
|
|
2691
|
+
{
|
|
2692
|
+
key: e.installPrompt,
|
|
2693
|
+
value: r.platform
|
|
2694
|
+
},
|
|
2695
|
+
{
|
|
2696
|
+
key: e.pushPermission,
|
|
2697
|
+
value: s.pushPermission ?? e.unknown
|
|
2698
|
+
},
|
|
2699
|
+
{
|
|
2700
|
+
key: e.pushSubscription,
|
|
2701
|
+
value: s.pushEndpointHost ?? e.none
|
|
2702
|
+
}
|
|
2703
|
+
] })] })
|
|
2704
|
+
]
|
|
2705
|
+
});
|
|
2706
|
+
}, gr = (e) => Object.entries(e ?? {}).filter(([, e]) => e === !0).map(([e]) => e).sort(), _r = (e) => [e.fullscreen ? "fullscreen" : e.maximized ? "maximized" : "windowed", e.focused ? "focused" : "unfocused"].join(", "), vr = () => {
|
|
2707
|
+
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), []);
|
|
2708
|
+
if (i(() => {
|
|
2709
|
+
if (!r) return;
|
|
2710
|
+
let e = r.window.subscribe(f), t = r.os.onThemeChange(f);
|
|
2711
|
+
return () => {
|
|
2712
|
+
e(), t();
|
|
2713
|
+
};
|
|
2714
|
+
}, [r, f]), i(() => {
|
|
2715
|
+
let e = t.storage("local");
|
|
2716
|
+
if (e === null) {
|
|
2717
|
+
d(null);
|
|
2718
|
+
return;
|
|
2719
|
+
}
|
|
2720
|
+
C(e).then(d);
|
|
2721
|
+
}, [t, a]), !r) return /* @__PURE__ */ N(J, { children: e.notDesktop });
|
|
2722
|
+
let p = gr(t.capabilities);
|
|
2723
|
+
return /* @__PURE__ */ P("div", {
|
|
2724
|
+
className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
|
|
2725
|
+
children: [
|
|
2726
|
+
/* @__PURE__ */ P(G, { children: [/* @__PURE__ */ N(K, {
|
|
2727
|
+
Icon: ke,
|
|
2728
|
+
right: /* @__PURE__ */ N(U, {
|
|
2729
|
+
size: "sm",
|
|
2730
|
+
onClick: f,
|
|
2731
|
+
children: e.refresh
|
|
2732
|
+
}),
|
|
2733
|
+
children: e.shell
|
|
2734
|
+
}), /* @__PURE__ */ N(q, { entries: [
|
|
2735
|
+
{
|
|
2736
|
+
key: e.kind,
|
|
2737
|
+
value: /* @__PURE__ */ N(W, {
|
|
2738
|
+
tone: "info",
|
|
2739
|
+
children: r.kind
|
|
2740
|
+
})
|
|
2741
|
+
},
|
|
2742
|
+
{
|
|
2743
|
+
key: e.os,
|
|
2744
|
+
value: `${r.os.platform} ${r.os.arch} ${r.os.version}`
|
|
2745
|
+
},
|
|
2746
|
+
{
|
|
2747
|
+
key: e.theme,
|
|
2748
|
+
value: r.os.theme()
|
|
2749
|
+
},
|
|
2750
|
+
{
|
|
2751
|
+
key: e.window,
|
|
2752
|
+
value: _r(r.window.read())
|
|
2753
|
+
},
|
|
2754
|
+
{
|
|
2755
|
+
key: e.appVersion,
|
|
2756
|
+
value: t.platform.appVersion ?? e.unknown
|
|
2757
|
+
}
|
|
2758
|
+
] })] }),
|
|
2759
|
+
/* @__PURE__ */ P(G, { children: [/* @__PURE__ */ N(K, {
|
|
2760
|
+
right: t.updates ? /* @__PURE__ */ N(U, {
|
|
2761
|
+
size: "sm",
|
|
2762
|
+
onClick: () => {
|
|
2763
|
+
t.updates.check().then(c);
|
|
2764
|
+
},
|
|
2765
|
+
children: e.checkNow
|
|
2766
|
+
}) : void 0,
|
|
2767
|
+
children: e.updater
|
|
2768
|
+
}), /* @__PURE__ */ N(q, { entries: [{
|
|
2769
|
+
key: e.updaterPort,
|
|
2770
|
+
value: t.updates ? e.yes : e.no
|
|
2771
|
+
}, {
|
|
2772
|
+
key: e.waitingVersion,
|
|
2773
|
+
value: s?.version ?? e.none
|
|
2774
|
+
}] })] }),
|
|
2775
|
+
/* @__PURE__ */ P(G, { children: [/* @__PURE__ */ N(K, { children: e.localStack }), /* @__PURE__ */ N(q, { entries: [
|
|
2776
|
+
{
|
|
2777
|
+
key: e.sidecarPort,
|
|
2778
|
+
value: r.sidecar === void 0 ? e.no : e.yes
|
|
2779
|
+
},
|
|
2780
|
+
{
|
|
2781
|
+
key: e.apiUrl,
|
|
2782
|
+
value: u?.api ?? e.none
|
|
2783
|
+
},
|
|
2784
|
+
{
|
|
2785
|
+
key: e.apiName,
|
|
2786
|
+
value: u?.name ?? e.none
|
|
2787
|
+
}
|
|
2788
|
+
] })] }),
|
|
2789
|
+
/* @__PURE__ */ P(G, { children: [/* @__PURE__ */ N(K, { children: e.capabilities }), p.length === 0 ? /* @__PURE__ */ N("div", {
|
|
2790
|
+
className: "vdt:px-3 vdt:py-2 vdt:text-xs vdt:text-foreground-subtle",
|
|
2791
|
+
children: e.noCapabilities
|
|
2792
|
+
}) : /* @__PURE__ */ N("div", {
|
|
2793
|
+
className: "vdt:flex vdt:flex-wrap vdt:gap-1 vdt:px-3 vdt:py-2",
|
|
2794
|
+
children: p.map((e) => /* @__PURE__ */ N(W, {
|
|
2795
|
+
tone: "neutral",
|
|
2796
|
+
children: e
|
|
2797
|
+
}, e))
|
|
2798
|
+
})] })
|
|
2799
|
+
]
|
|
2800
|
+
});
|
|
2801
|
+
}, yr = () => u(E, w, w), br = (e, t = 90) => {
|
|
2307
2802
|
let n;
|
|
2308
2803
|
try {
|
|
2309
2804
|
n = JSON.stringify(e) ?? String(e);
|
|
@@ -2311,36 +2806,36 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2311
2806
|
n = String(e);
|
|
2312
2807
|
}
|
|
2313
2808
|
return n.length > t ? `${n.slice(0, t)}…` : n;
|
|
2314
|
-
},
|
|
2809
|
+
}, xr = (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])), Sr = ({ label: e, state: t }) => {
|
|
2315
2810
|
let [n, r] = l(!1);
|
|
2316
|
-
return /* @__PURE__ */
|
|
2811
|
+
return /* @__PURE__ */ P("div", {
|
|
2317
2812
|
className: "vdt:border-t vdt:border-border",
|
|
2318
|
-
children: [/* @__PURE__ */
|
|
2813
|
+
children: [/* @__PURE__ */ P("button", {
|
|
2319
2814
|
type: "button",
|
|
2320
2815
|
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
2816
|
onClick: () => r((e) => !e),
|
|
2322
|
-
children: [/* @__PURE__ */
|
|
2817
|
+
children: [/* @__PURE__ */ N(W, {
|
|
2323
2818
|
tone: "neutral",
|
|
2324
2819
|
children: e
|
|
2325
|
-
}), /* @__PURE__ */
|
|
2820
|
+
}), /* @__PURE__ */ N("span", {
|
|
2326
2821
|
className: "vdt:truncate vdt:font-mono vdt:text-[11px] vdt:text-foreground-muted",
|
|
2327
|
-
children:
|
|
2822
|
+
children: br(t)
|
|
2328
2823
|
})]
|
|
2329
|
-
}), n ? /* @__PURE__ */
|
|
2824
|
+
}), n ? /* @__PURE__ */ N(q, { entries: Object.entries(t).map(([e, t]) => ({
|
|
2330
2825
|
key: e,
|
|
2331
|
-
value:
|
|
2826
|
+
value: br(t, 200)
|
|
2332
2827
|
})) }) : null]
|
|
2333
2828
|
});
|
|
2334
|
-
},
|
|
2335
|
-
let e =
|
|
2336
|
-
return /* @__PURE__ */
|
|
2337
|
-
/* @__PURE__ */
|
|
2338
|
-
Icon:
|
|
2339
|
-
right: /* @__PURE__ */
|
|
2829
|
+
}, Cr = () => {
|
|
2830
|
+
let e = yr(), [t, n] = l(null), r = x(), i = t ?? e.length;
|
|
2831
|
+
return /* @__PURE__ */ P(M, { children: [
|
|
2832
|
+
/* @__PURE__ */ P(K, {
|
|
2833
|
+
Icon: ge,
|
|
2834
|
+
right: /* @__PURE__ */ P(U, {
|
|
2340
2835
|
onClick: () => {
|
|
2341
|
-
|
|
2836
|
+
b(), n(null);
|
|
2342
2837
|
},
|
|
2343
|
-
children: [/* @__PURE__ */
|
|
2838
|
+
children: [/* @__PURE__ */ N(be, {}), "Clear"]
|
|
2344
2839
|
}),
|
|
2345
2840
|
children: [
|
|
2346
2841
|
"Stores (",
|
|
@@ -2348,28 +2843,28 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2348
2843
|
")"
|
|
2349
2844
|
]
|
|
2350
2845
|
}),
|
|
2351
|
-
r.length === 0 ? /* @__PURE__ */
|
|
2352
|
-
/* @__PURE__ */
|
|
2353
|
-
/* @__PURE__ */
|
|
2846
|
+
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: [
|
|
2847
|
+
/* @__PURE__ */ N(K, { children: e.name }),
|
|
2848
|
+
/* @__PURE__ */ N(Sr, {
|
|
2354
2849
|
label: "global",
|
|
2355
2850
|
state: e.get()
|
|
2356
2851
|
}),
|
|
2357
|
-
e.keys().map((t) => /* @__PURE__ */
|
|
2852
|
+
e.keys().map((t) => /* @__PURE__ */ N(Sr, {
|
|
2358
2853
|
label: t,
|
|
2359
2854
|
state: e.get(t)
|
|
2360
2855
|
}, t))
|
|
2361
2856
|
] }, e.name)),
|
|
2362
|
-
/* @__PURE__ */
|
|
2363
|
-
Icon:
|
|
2364
|
-
right: /* @__PURE__ */
|
|
2857
|
+
/* @__PURE__ */ P(K, {
|
|
2858
|
+
Icon: ye,
|
|
2859
|
+
right: /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(U, {
|
|
2365
2860
|
onClick: () => {
|
|
2366
|
-
i <= 0 ||
|
|
2861
|
+
i <= 0 || D(i - 1, "before") && n(i - 1);
|
|
2367
2862
|
},
|
|
2368
2863
|
disabled: i <= 0,
|
|
2369
2864
|
children: "◀ Back"
|
|
2370
|
-
}), /* @__PURE__ */
|
|
2865
|
+
}), /* @__PURE__ */ N(U, {
|
|
2371
2866
|
onClick: () => {
|
|
2372
|
-
t === null || i >= e.length ||
|
|
2867
|
+
t === null || i >= e.length || D(i, "after") && n(i + 1);
|
|
2373
2868
|
},
|
|
2374
2869
|
disabled: t === null || i >= e.length,
|
|
2375
2870
|
children: "Forward ▶"
|
|
@@ -2381,54 +2876,54 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2381
2876
|
t === null ? "" : ` — travelled to ${i}/${e.length}`
|
|
2382
2877
|
]
|
|
2383
2878
|
}),
|
|
2384
|
-
e.length === 0 ? /* @__PURE__ */
|
|
2385
|
-
let a = e.length - 1 - r, o =
|
|
2386
|
-
return /* @__PURE__ */
|
|
2879
|
+
e.length === 0 ? /* @__PURE__ */ N(J, { children: "No writes yet. Every `set()` lands here, labelled if you pass one." }) : [...e].reverse().map((n, r) => {
|
|
2880
|
+
let a = e.length - 1 - r, o = xr(n.prev, n.next);
|
|
2881
|
+
return /* @__PURE__ */ P(G, { children: [/* @__PURE__ */ P("div", {
|
|
2387
2882
|
className: "vdt:flex vdt:items-center vdt:gap-2 vdt:px-3 vdt:py-2",
|
|
2388
2883
|
children: [
|
|
2389
|
-
/* @__PURE__ */
|
|
2884
|
+
/* @__PURE__ */ N(W, {
|
|
2390
2885
|
tone: n.isUndo === !0 ? "warning" : "neutral",
|
|
2391
2886
|
children: n.store
|
|
2392
2887
|
}),
|
|
2393
|
-
n.key === void 0 ? null : /* @__PURE__ */
|
|
2888
|
+
n.key === void 0 ? null : /* @__PURE__ */ N(W, {
|
|
2394
2889
|
tone: "neutral",
|
|
2395
2890
|
children: n.key
|
|
2396
2891
|
}),
|
|
2397
|
-
n.label === void 0 ? null : /* @__PURE__ */
|
|
2892
|
+
n.label === void 0 ? null : /* @__PURE__ */ N("span", {
|
|
2398
2893
|
className: "vdt:truncate vdt:font-mono vdt:text-[11px] vdt:text-foreground-muted",
|
|
2399
2894
|
children: n.label
|
|
2400
2895
|
}),
|
|
2401
|
-
t !== null && a === i ? /* @__PURE__ */
|
|
2896
|
+
t !== null && a === i ? /* @__PURE__ */ N(W, {
|
|
2402
2897
|
tone: "info",
|
|
2403
2898
|
children: "here"
|
|
2404
2899
|
}) : null
|
|
2405
2900
|
]
|
|
2406
|
-
}), /* @__PURE__ */
|
|
2901
|
+
}), /* @__PURE__ */ N(q, { entries: [
|
|
2407
2902
|
{
|
|
2408
2903
|
key: "changed",
|
|
2409
2904
|
value: o.length > 0 ? o.join(", ") : "(no field diff)"
|
|
2410
2905
|
},
|
|
2411
2906
|
{
|
|
2412
2907
|
key: "before",
|
|
2413
|
-
value:
|
|
2908
|
+
value: br(n.prev)
|
|
2414
2909
|
},
|
|
2415
2910
|
{
|
|
2416
2911
|
key: "after",
|
|
2417
|
-
value:
|
|
2912
|
+
value: br(n.next)
|
|
2418
2913
|
}
|
|
2419
2914
|
] })] }, `${n.at}-${a}`);
|
|
2420
2915
|
})
|
|
2421
2916
|
] });
|
|
2422
|
-
},
|
|
2917
|
+
}, wr = (e) => typeof e == "number" ? e < 1 ? "<1ms" : e < 1e3 ? `${Math.round(e)}ms` : `${(e / 1e3).toFixed(1)}s` : "—", Tr = (e) => {
|
|
2423
2918
|
try {
|
|
2424
2919
|
return JSON.stringify(e, null, 2);
|
|
2425
2920
|
} catch {
|
|
2426
2921
|
return String(e);
|
|
2427
2922
|
}
|
|
2428
|
-
},
|
|
2923
|
+
}, Er = ({ mutation: e }) => /* @__PURE__ */ P("div", {
|
|
2429
2924
|
className: "vdt:bg-background/60",
|
|
2430
2925
|
children: [
|
|
2431
|
-
/* @__PURE__ */
|
|
2926
|
+
/* @__PURE__ */ N(q, { entries: [
|
|
2432
2927
|
{
|
|
2433
2928
|
key: "id",
|
|
2434
2929
|
value: e.id
|
|
@@ -2455,101 +2950,101 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2455
2950
|
},
|
|
2456
2951
|
{
|
|
2457
2952
|
key: "duration",
|
|
2458
|
-
value:
|
|
2953
|
+
value: wr(e.durationMs)
|
|
2459
2954
|
}
|
|
2460
2955
|
] }),
|
|
2461
|
-
/* @__PURE__ */
|
|
2956
|
+
/* @__PURE__ */ P("details", {
|
|
2462
2957
|
className: "vdt:px-3 vdt:py-2 vdt:border-t vdt:border-border",
|
|
2463
2958
|
open: !0,
|
|
2464
|
-
children: [/* @__PURE__ */
|
|
2959
|
+
children: [/* @__PURE__ */ N("summary", {
|
|
2465
2960
|
className: "vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:text-foreground-muted vdt:cursor-pointer",
|
|
2466
2961
|
children: "Input"
|
|
2467
|
-
}), /* @__PURE__ */
|
|
2962
|
+
}), /* @__PURE__ */ N("pre", {
|
|
2468
2963
|
className: "vdt:mt-2 vdt:text-[11px] vdt:max-h-48 vdt:overflow-auto vdt:font-mono vdt:text-foreground",
|
|
2469
|
-
children:
|
|
2964
|
+
children: Tr(e.input)
|
|
2470
2965
|
})]
|
|
2471
2966
|
}),
|
|
2472
|
-
e.status === "success" ? /* @__PURE__ */
|
|
2967
|
+
e.status === "success" ? /* @__PURE__ */ P("details", {
|
|
2473
2968
|
className: "vdt:px-3 vdt:py-2 vdt:border-t vdt:border-border",
|
|
2474
2969
|
open: !0,
|
|
2475
|
-
children: [/* @__PURE__ */
|
|
2970
|
+
children: [/* @__PURE__ */ N("summary", {
|
|
2476
2971
|
className: "vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:text-foreground-muted vdt:cursor-pointer",
|
|
2477
2972
|
children: "Output"
|
|
2478
|
-
}), /* @__PURE__ */
|
|
2973
|
+
}), /* @__PURE__ */ N("pre", {
|
|
2479
2974
|
className: "vdt:mt-2 vdt:text-[11px] vdt:max-h-48 vdt:overflow-auto vdt:font-mono vdt:text-foreground",
|
|
2480
|
-
children:
|
|
2975
|
+
children: Tr(e.output)
|
|
2481
2976
|
})]
|
|
2482
2977
|
}) : null,
|
|
2483
|
-
e.status === "error" ? /* @__PURE__ */
|
|
2978
|
+
e.status === "error" ? /* @__PURE__ */ P("details", {
|
|
2484
2979
|
className: "vdt:px-3 vdt:py-2 vdt:border-t vdt:border-border",
|
|
2485
2980
|
open: !0,
|
|
2486
|
-
children: [/* @__PURE__ */
|
|
2981
|
+
children: [/* @__PURE__ */ N("summary", {
|
|
2487
2982
|
className: "vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:text-danger vdt:cursor-pointer",
|
|
2488
2983
|
children: "Error"
|
|
2489
|
-
}), /* @__PURE__ */
|
|
2984
|
+
}), /* @__PURE__ */ N("pre", {
|
|
2490
2985
|
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 ?? ""}` :
|
|
2986
|
+
children: e.error instanceof Error ? `${e.error.name}: ${e.error.message}\n\n${e.error.stack ?? ""}` : Tr(e.error)
|
|
2492
2987
|
})]
|
|
2493
2988
|
}) : null
|
|
2494
2989
|
]
|
|
2495
|
-
}),
|
|
2990
|
+
}), Dr = {
|
|
2496
2991
|
trace: "vdt:text-foreground-subtle",
|
|
2497
2992
|
debug: "vdt:text-info",
|
|
2498
2993
|
info: "vdt:text-foreground",
|
|
2499
2994
|
warn: "vdt:text-warning",
|
|
2500
2995
|
error: "vdt:text-danger",
|
|
2501
2996
|
fatal: "vdt:text-danger vdt:font-bold"
|
|
2502
|
-
},
|
|
2997
|
+
}, Or = (e) => {
|
|
2503
2998
|
if (Object.keys(e).length === 0) return "";
|
|
2504
2999
|
try {
|
|
2505
3000
|
return JSON.stringify(e, null, 2);
|
|
2506
3001
|
} catch {
|
|
2507
3002
|
return String(e);
|
|
2508
3003
|
}
|
|
2509
|
-
},
|
|
3004
|
+
}, kr = (e) => {
|
|
2510
3005
|
let t = (e) => e < 10 ? `0${e}` : String(e);
|
|
2511
3006
|
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__ */
|
|
3007
|
+
}, Ar = ({ record: e }) => {
|
|
3008
|
+
let t = Or(e.fields);
|
|
3009
|
+
return /* @__PURE__ */ P("div", {
|
|
2515
3010
|
className: "vdt:bg-background/60 vdt:px-3 vdt:py-2 vdt:flex vdt:flex-col vdt:gap-2",
|
|
2516
3011
|
children: [
|
|
2517
|
-
/* @__PURE__ */
|
|
3012
|
+
/* @__PURE__ */ P("div", {
|
|
2518
3013
|
className: "vdt:text-[10px] vdt:font-mono vdt:text-foreground-muted",
|
|
2519
3014
|
children: [
|
|
2520
|
-
|
|
3015
|
+
kr(e.ts),
|
|
2521
3016
|
e.scope ? ` · ${e.scope}` : "",
|
|
2522
3017
|
" · ",
|
|
2523
3018
|
e.level
|
|
2524
3019
|
]
|
|
2525
3020
|
}),
|
|
2526
|
-
/* @__PURE__ */
|
|
2527
|
-
className: ["vdt:text-xs vdt:break-words",
|
|
3021
|
+
/* @__PURE__ */ N("div", {
|
|
3022
|
+
className: ["vdt:text-xs vdt:break-words", Dr[e.level]].join(" "),
|
|
2528
3023
|
children: e.message
|
|
2529
3024
|
}),
|
|
2530
|
-
e.fiberId ? /* @__PURE__ */
|
|
3025
|
+
e.fiberId ? /* @__PURE__ */ P("div", {
|
|
2531
3026
|
className: "vdt:text-[10px] vdt:font-mono vdt:text-foreground-muted",
|
|
2532
3027
|
children: ["fiber: ", e.fiberId]
|
|
2533
3028
|
}) : null,
|
|
2534
|
-
t ? /* @__PURE__ */
|
|
3029
|
+
t ? /* @__PURE__ */ N("pre", {
|
|
2535
3030
|
className: "vdt:text-[11px] vdt:max-h-48 vdt:overflow-auto vdt:font-mono vdt:text-foreground",
|
|
2536
3031
|
children: t
|
|
2537
3032
|
}) : null,
|
|
2538
|
-
e.cause === void 0 ? null : /* @__PURE__ */
|
|
3033
|
+
e.cause === void 0 ? null : /* @__PURE__ */ N("pre", {
|
|
2539
3034
|
className: "vdt:text-[11px] vdt:max-h-48 vdt:overflow-auto vdt:font-mono vdt:text-danger",
|
|
2540
3035
|
children: e.cause instanceof Error ? e.cause.stack ?? `${e.cause.name}: ${e.cause.message}` : String(e.cause)
|
|
2541
3036
|
})
|
|
2542
3037
|
]
|
|
2543
3038
|
});
|
|
2544
|
-
},
|
|
3039
|
+
}, jr = 4e3, Mr = async (e, t, n = !1) => {
|
|
2545
3040
|
if (e === "") return null;
|
|
2546
3041
|
let r = await Q(`${e}/_voltro/inspect/traces${n ? "?includeBackground=1" : ""}`, t);
|
|
2547
3042
|
return r !== null && Array.isArray(r.traces) ? r : null;
|
|
2548
|
-
},
|
|
2549
|
-
let n =
|
|
3043
|
+
}, Nr = [], Pr = (e, t = !1) => {
|
|
3044
|
+
let n = k(), r = $(), a = Z(), o = n.names.join(","), [s, c] = l(Nr), u = e && r;
|
|
2550
3045
|
return i(() => {
|
|
2551
3046
|
if (!u) {
|
|
2552
|
-
c(
|
|
3047
|
+
c(Nr);
|
|
2553
3048
|
return;
|
|
2554
3049
|
}
|
|
2555
3050
|
let e = o === "" ? [] : o.split(",").map((e) => ({
|
|
@@ -2557,11 +3052,11 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2557
3052
|
baseUrl: n.get(e).inspectBaseUrl
|
|
2558
3053
|
})).filter((e) => e.baseUrl !== "");
|
|
2559
3054
|
if (e.length === 0) {
|
|
2560
|
-
c(
|
|
3055
|
+
c(Nr);
|
|
2561
3056
|
return;
|
|
2562
3057
|
}
|
|
2563
3058
|
let r = !1, i = async () => {
|
|
2564
|
-
let n = await Promise.all(e.map((e) =>
|
|
3059
|
+
let n = await Promise.all(e.map((e) => Mr(e.baseUrl, a, t)));
|
|
2565
3060
|
if (r) return;
|
|
2566
3061
|
let i = [];
|
|
2567
3062
|
n.forEach((t, n) => {
|
|
@@ -2572,7 +3067,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2572
3067
|
}), c(i);
|
|
2573
3068
|
};
|
|
2574
3069
|
i();
|
|
2575
|
-
let s = setInterval(i,
|
|
3070
|
+
let s = setInterval(i, jr);
|
|
2576
3071
|
return () => {
|
|
2577
3072
|
r = !0, clearInterval(s);
|
|
2578
3073
|
};
|
|
@@ -2583,7 +3078,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2583
3078
|
a,
|
|
2584
3079
|
t
|
|
2585
3080
|
]), s;
|
|
2586
|
-
},
|
|
3081
|
+
}, Fr = (e) => e < 1 ? "<1ms" : e < 1e3 ? `${Math.round(e)}ms` : `${(e / 1e3).toFixed(2)}s`, Ir = (e) => {
|
|
2587
3082
|
let t = new Map(e.map((e) => [e.spanId, e])), n = /* @__PURE__ */ new Map(), r = (e, i) => {
|
|
2588
3083
|
if (n.has(e.spanId)) return n.get(e.spanId);
|
|
2589
3084
|
if (i > 64 || e.parentSpanId === null) return n.set(e.spanId, 0), 0;
|
|
@@ -2592,94 +3087,94 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2592
3087
|
};
|
|
2593
3088
|
for (let t of e) r(t, 0);
|
|
2594
3089
|
return n;
|
|
2595
|
-
},
|
|
3090
|
+
}, Lr = (e) => {
|
|
2596
3091
|
if (typeof e == "string") return e;
|
|
2597
3092
|
try {
|
|
2598
3093
|
return JSON.stringify(e, null, 2) ?? String(e);
|
|
2599
3094
|
} catch {
|
|
2600
3095
|
return String(e);
|
|
2601
3096
|
}
|
|
2602
|
-
},
|
|
2603
|
-
let t =
|
|
2604
|
-
return /* @__PURE__ */
|
|
3097
|
+
}, Rr = ({ trace: e }) => {
|
|
3098
|
+
let t = H().traces, n = Ir(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;
|
|
3099
|
+
return /* @__PURE__ */ P("div", {
|
|
2605
3100
|
className: "vdt-trace-detail",
|
|
2606
3101
|
children: [
|
|
2607
|
-
/* @__PURE__ */
|
|
3102
|
+
/* @__PURE__ */ P("div", {
|
|
2608
3103
|
className: "vdt-trace-summary",
|
|
2609
|
-
children: [/* @__PURE__ */
|
|
3104
|
+
children: [/* @__PURE__ */ N("span", { children: t.spans(e.spanCount) }), e.kind === "subscription" ? /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ P("span", { children: [
|
|
2610
3105
|
e.deliveryCount ?? 0,
|
|
2611
3106
|
" ",
|
|
2612
3107
|
t.delivery(e.deliveryCount ?? 0)
|
|
2613
|
-
] }), e.lastDeliveryMs === void 0 ? null : /* @__PURE__ */
|
|
3108
|
+
] }), e.lastDeliveryMs === void 0 ? null : /* @__PURE__ */ P("span", { children: [
|
|
2614
3109
|
t.lastDelivery,
|
|
2615
3110
|
": ",
|
|
2616
|
-
/* @__PURE__ */
|
|
2617
|
-
] })] }) : /* @__PURE__ */
|
|
3111
|
+
/* @__PURE__ */ N("strong", { children: Fr(e.lastDeliveryMs) })
|
|
3112
|
+
] })] }) : /* @__PURE__ */ P("span", { children: [
|
|
2618
3113
|
t.duration,
|
|
2619
3114
|
": ",
|
|
2620
|
-
/* @__PURE__ */
|
|
3115
|
+
/* @__PURE__ */ N("strong", { children: Fr(e.durationMs) })
|
|
2621
3116
|
] })]
|
|
2622
3117
|
}),
|
|
2623
|
-
/* @__PURE__ */
|
|
3118
|
+
/* @__PURE__ */ P("code", {
|
|
2624
3119
|
className: "vdt-trace-id",
|
|
2625
3120
|
children: ["trace ", e.traceId]
|
|
2626
3121
|
}),
|
|
2627
|
-
i || a ? /* @__PURE__ */
|
|
3122
|
+
i || a ? /* @__PURE__ */ N("p", {
|
|
2628
3123
|
className: "vdt-trace-context",
|
|
2629
3124
|
children: i ? t.missingParents : t.sqlWithoutCaller
|
|
2630
3125
|
}) : null,
|
|
2631
3126
|
e.spans.map((r) => {
|
|
2632
3127
|
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__ */
|
|
3128
|
+
return /* @__PURE__ */ P("details", {
|
|
2634
3129
|
className: "vdt-trace-span",
|
|
2635
3130
|
open: r.status === "error",
|
|
2636
3131
|
"data-status": r.status,
|
|
2637
|
-
children: [/* @__PURE__ */
|
|
3132
|
+
children: [/* @__PURE__ */ P("summary", {
|
|
2638
3133
|
className: "vdt-trace-span-head",
|
|
2639
3134
|
style: { paddingLeft: 8 + i * 8 },
|
|
2640
3135
|
children: [
|
|
2641
|
-
/* @__PURE__ */
|
|
3136
|
+
/* @__PURE__ */ P("span", {
|
|
2642
3137
|
className: "vdt-trace-span-label",
|
|
2643
|
-
children: [/* @__PURE__ */
|
|
3138
|
+
children: [/* @__PURE__ */ N(pe, { className: "vdt-trace-chevron" }), /* @__PURE__ */ N("code", {
|
|
2644
3139
|
className: "vdt-trace-span-name",
|
|
2645
3140
|
children: r.name
|
|
2646
3141
|
})]
|
|
2647
3142
|
}),
|
|
2648
|
-
/* @__PURE__ */
|
|
3143
|
+
/* @__PURE__ */ N("span", {
|
|
2649
3144
|
className: "vdt-trace-span-duration",
|
|
2650
|
-
children:
|
|
3145
|
+
children: Fr(r.durationMs)
|
|
2651
3146
|
}),
|
|
2652
|
-
/* @__PURE__ */
|
|
3147
|
+
/* @__PURE__ */ N("span", {
|
|
2653
3148
|
className: "vdt-trace-span-bar",
|
|
2654
3149
|
"aria-hidden": "true",
|
|
2655
|
-
children: /* @__PURE__ */
|
|
3150
|
+
children: /* @__PURE__ */ N("span", { style: {
|
|
2656
3151
|
left: `${a}%`,
|
|
2657
3152
|
width: `${s}%`
|
|
2658
3153
|
} })
|
|
2659
3154
|
})
|
|
2660
3155
|
]
|
|
2661
|
-
}), /* @__PURE__ */
|
|
3156
|
+
}), /* @__PURE__ */ P("div", {
|
|
2662
3157
|
className: "vdt-trace-span-body",
|
|
2663
3158
|
children: [
|
|
2664
|
-
/* @__PURE__ */
|
|
3159
|
+
/* @__PURE__ */ P("div", {
|
|
2665
3160
|
className: "vdt-trace-span-meta",
|
|
2666
3161
|
children: [
|
|
2667
|
-
/* @__PURE__ */
|
|
2668
|
-
/* @__PURE__ */
|
|
2669
|
-
/* @__PURE__ */
|
|
3162
|
+
/* @__PURE__ */ N("span", { children: r.kind }),
|
|
3163
|
+
/* @__PURE__ */ N("span", { children: r.status }),
|
|
3164
|
+
/* @__PURE__ */ N("code", { children: r.spanId })
|
|
2670
3165
|
]
|
|
2671
3166
|
}),
|
|
2672
|
-
r.statusMessage ? /* @__PURE__ */
|
|
3167
|
+
r.statusMessage ? /* @__PURE__ */ N("p", {
|
|
2673
3168
|
className: "vdt-trace-span-message",
|
|
2674
3169
|
children: r.statusMessage
|
|
2675
3170
|
}) : null,
|
|
2676
|
-
c.length > 0 ? /* @__PURE__ */
|
|
3171
|
+
c.length > 0 ? /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("div", {
|
|
2677
3172
|
className: "vdt-trace-attributes-label",
|
|
2678
3173
|
children: t.attributes
|
|
2679
|
-
}), /* @__PURE__ */
|
|
3174
|
+
}), /* @__PURE__ */ N("dl", {
|
|
2680
3175
|
className: "vdt-trace-attributes",
|
|
2681
|
-
children: c.map(([e, t]) => /* @__PURE__ */
|
|
2682
|
-
})] }) : /* @__PURE__ */
|
|
3176
|
+
children: c.map(([e, t]) => /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("dt", { children: e }), /* @__PURE__ */ N("dd", { children: /* @__PURE__ */ N("pre", { children: Lr(t) }) })] }, e))
|
|
3177
|
+
})] }) : /* @__PURE__ */ N("p", {
|
|
2683
3178
|
className: "vdt-trace-no-attributes",
|
|
2684
3179
|
children: t.noAttributes
|
|
2685
3180
|
})
|
|
@@ -2689,42 +3184,44 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2689
3184
|
})
|
|
2690
3185
|
]
|
|
2691
3186
|
});
|
|
2692
|
-
},
|
|
3187
|
+
}, zr = [
|
|
2693
3188
|
"all",
|
|
2694
3189
|
"subscription",
|
|
2695
3190
|
"mutation",
|
|
2696
3191
|
"action",
|
|
2697
3192
|
"trace",
|
|
2698
3193
|
"log"
|
|
2699
|
-
],
|
|
3194
|
+
], Br = [
|
|
2700
3195
|
"workflows",
|
|
2701
3196
|
"stores",
|
|
2702
3197
|
"indexes",
|
|
2703
3198
|
"webhooks",
|
|
2704
3199
|
"routes",
|
|
2705
|
-
"runtimes"
|
|
2706
|
-
|
|
3200
|
+
"runtimes",
|
|
3201
|
+
"pwa",
|
|
3202
|
+
"desktop"
|
|
3203
|
+
], Vr = [...zr, ...Br], Hr = (e) => zr.includes(e), Ur = (e) => {
|
|
2707
3204
|
let t = [], n = /"([^"]*)"|(\S+)/g, r;
|
|
2708
3205
|
for (; (r = n.exec(e)) !== null;) {
|
|
2709
3206
|
let e = (r[1] ?? r[2] ?? "").toLowerCase();
|
|
2710
3207
|
e !== "" && t.push(e);
|
|
2711
3208
|
}
|
|
2712
3209
|
return t;
|
|
2713
|
-
},
|
|
3210
|
+
}, Wr = (e, t) => t.every((t) => e.includes(t)), Gr = {
|
|
2714
3211
|
subscription: 0,
|
|
2715
3212
|
mutation: 1,
|
|
2716
3213
|
action: 1,
|
|
2717
3214
|
trace: 1,
|
|
2718
3215
|
log: 1
|
|
2719
|
-
},
|
|
2720
|
-
let r =
|
|
2721
|
-
return [...r.length === 0 ? i : i.filter((e) =>
|
|
2722
|
-
let n = Number(
|
|
3216
|
+
}, Kr = (e) => (e.source === "mutation" || e.source === "action") && e.status === "pending", qr = (e, t, n) => {
|
|
3217
|
+
let r = Ur(t), i = n === "all" ? e : e.filter((e) => e.source === n);
|
|
3218
|
+
return [...r.length === 0 ? i : i.filter((e) => Wr(e.haystack, r))].sort((e, t) => {
|
|
3219
|
+
let n = Number(Kr(t)) - Number(Kr(e));
|
|
2723
3220
|
if (n !== 0) return n;
|
|
2724
|
-
let r =
|
|
3221
|
+
let r = Gr[e.source] - Gr[t.source];
|
|
2725
3222
|
return r === 0 ? t.at - e.at : r;
|
|
2726
3223
|
});
|
|
2727
|
-
},
|
|
3224
|
+
}, Jr = (e) => {
|
|
2728
3225
|
let t = {
|
|
2729
3226
|
subscription: 0,
|
|
2730
3227
|
mutation: 0,
|
|
@@ -2734,7 +3231,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2734
3231
|
};
|
|
2735
3232
|
for (let n of e) t[n.source]++;
|
|
2736
3233
|
return t;
|
|
2737
|
-
},
|
|
3234
|
+
}, Yr = (e, t = 400) => {
|
|
2738
3235
|
let n;
|
|
2739
3236
|
try {
|
|
2740
3237
|
n = JSON.stringify(e) ?? String(e);
|
|
@@ -2742,12 +3239,12 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2742
3239
|
n = String(e);
|
|
2743
3240
|
}
|
|
2744
3241
|
return n.length > t ? n.slice(0, t) : n;
|
|
2745
|
-
},
|
|
3242
|
+
}, Xr = (e, t, n) => {
|
|
2746
3243
|
if (e.length === 0) return null;
|
|
2747
3244
|
let r = t === null ? -1 : e.indexOf(t);
|
|
2748
3245
|
return r === -1 ? n === 1 ? e[0] : e[e.length - 1] : e[(r + n + e.length) % e.length];
|
|
2749
|
-
},
|
|
2750
|
-
let n =
|
|
3246
|
+
}, Zr = (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", Qr = (e, t) => {
|
|
3247
|
+
let n = Ze(t.key), r = [];
|
|
2751
3248
|
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
3249
|
let i = t.snapshot.error ? "error" : t.recovery.phase === "steady" ? void 0 : t.recovery.phase;
|
|
2753
3250
|
return {
|
|
@@ -2757,7 +3254,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2757
3254
|
name: n,
|
|
2758
3255
|
summary: r.join(" · "),
|
|
2759
3256
|
...i === void 0 ? {} : { status: i },
|
|
2760
|
-
tone:
|
|
3257
|
+
tone: Zr(t),
|
|
2761
3258
|
at: 0,
|
|
2762
3259
|
haystack: `${e} ${t.key} ${t.tag ?? ""} ${t.source ?? ""} ${i ?? ""}`.toLowerCase(),
|
|
2763
3260
|
detail: {
|
|
@@ -2766,16 +3263,16 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2766
3263
|
entry: t
|
|
2767
3264
|
}
|
|
2768
3265
|
};
|
|
2769
|
-
},
|
|
2770
|
-
let t = e.kind === "action" ? "action" : "mutation", n =
|
|
3266
|
+
}, $r = (e) => e.status === "pending" ? "info" : e.status === "success" ? "ok" : "err", ei = (e) => e.status === "error" ? e.error instanceof Error && e.error.name !== "Error" ? e.error.name : "error" : e.status, ti = (e) => {
|
|
3267
|
+
let t = e.kind === "action" ? "action" : "mutation", n = Yr(e.input, 160), r = e.status === "error" ? e.error instanceof Error ? `${e.error.name} ${e.error.message}` : Yr(e.error, 200) : "";
|
|
2771
3268
|
return {
|
|
2772
3269
|
id: `mut:${e.id}`,
|
|
2773
3270
|
source: t,
|
|
2774
3271
|
apiName: e.apiName,
|
|
2775
3272
|
name: e.tag,
|
|
2776
3273
|
summary: n,
|
|
2777
|
-
status:
|
|
2778
|
-
tone:
|
|
3274
|
+
status: ei(e),
|
|
3275
|
+
tone: $r(e),
|
|
2779
3276
|
at: e.startedAt,
|
|
2780
3277
|
haystack: `${t} ${e.apiName} ${e.tag} ${e.status} ${n} ${r}`.toLowerCase(),
|
|
2781
3278
|
detail: {
|
|
@@ -2783,7 +3280,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2783
3280
|
mutation: e
|
|
2784
3281
|
}
|
|
2785
3282
|
};
|
|
2786
|
-
},
|
|
3283
|
+
}, ni = (e) => {
|
|
2787
3284
|
switch (e.level) {
|
|
2788
3285
|
case "error":
|
|
2789
3286
|
case "fatal": return "err";
|
|
@@ -2791,22 +3288,22 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2791
3288
|
case "info": return "info";
|
|
2792
3289
|
default: return "idle";
|
|
2793
3290
|
}
|
|
2794
|
-
},
|
|
3291
|
+
}, ri = (e, t) => ({
|
|
2795
3292
|
id: `log:${e.ts.getTime()}:${t}`,
|
|
2796
3293
|
source: "log",
|
|
2797
3294
|
name: e.scope ?? "log",
|
|
2798
3295
|
summary: e.message,
|
|
2799
3296
|
status: e.level,
|
|
2800
|
-
tone:
|
|
3297
|
+
tone: ni(e),
|
|
2801
3298
|
at: e.ts.getTime(),
|
|
2802
|
-
haystack: `${e.scope ?? ""} ${e.level} ${e.message} ${
|
|
3299
|
+
haystack: `${e.scope ?? ""} ${e.level} ${e.message} ${Yr(e.fields, 300)}`.toLowerCase(),
|
|
2803
3300
|
detail: {
|
|
2804
3301
|
source: "log",
|
|
2805
3302
|
record: e
|
|
2806
3303
|
}
|
|
2807
|
-
}),
|
|
3304
|
+
}), ii = (e, t, n = Le.traces) => {
|
|
2808
3305
|
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
|
-
|
|
3306
|
+
Fr(t.durationMs),
|
|
2810
3307
|
n.spans(t.spanCount),
|
|
2811
3308
|
r ?? i
|
|
2812
3309
|
].filter(Boolean).join(" · "), o = t.spans.filter((e) => e.status === "error").map((e) => `${e.name} ${e.statusMessage ?? ""}`).join(" ");
|
|
@@ -2826,14 +3323,14 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2826
3323
|
trace: t
|
|
2827
3324
|
}
|
|
2828
3325
|
};
|
|
2829
|
-
},
|
|
2830
|
-
let n =
|
|
3326
|
+
}, ai = () => u(T, S, S), oi = () => u(de, ue, ue), si = (e, t = !1) => {
|
|
3327
|
+
let n = H().traces, r = Ye(), i = ai(), a = oi(), o = Pr(e, t);
|
|
2831
3328
|
return s(() => {
|
|
2832
3329
|
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(
|
|
3330
|
+
for (let t of r) for (let n of t.entries) e.push(Qr(t.name, n));
|
|
3331
|
+
for (let t of i) e.push(ti(t));
|
|
3332
|
+
for (let t of o) e.push(ii(t.apiName, t.trace, n));
|
|
3333
|
+
return a.forEach((t, n) => e.push(ri(t, n))), e;
|
|
2837
3334
|
}, [
|
|
2838
3335
|
r,
|
|
2839
3336
|
i,
|
|
@@ -2841,20 +3338,22 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2841
3338
|
o,
|
|
2842
3339
|
n
|
|
2843
3340
|
]);
|
|
2844
|
-
},
|
|
3341
|
+
}, ci = {
|
|
2845
3342
|
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
|
-
|
|
3343
|
+
subscription: he,
|
|
3344
|
+
mutation: Ee,
|
|
3345
|
+
action: we,
|
|
3346
|
+
trace: Ce,
|
|
3347
|
+
log: Oe,
|
|
3348
|
+
workflows: Se,
|
|
3349
|
+
stores: ge,
|
|
3350
|
+
indexes: De,
|
|
3351
|
+
webhooks: xe,
|
|
3352
|
+
routes: _e,
|
|
3353
|
+
runtimes: ke,
|
|
3354
|
+
pwa: ke,
|
|
3355
|
+
desktop: ke
|
|
3356
|
+
}, li = typeof navigator < "u" && /Mac|iPhone|iPad|iPod/.test(navigator.platform || navigator.userAgent) ? {
|
|
2858
3357
|
search: "⌘K",
|
|
2859
3358
|
alt: "⌥",
|
|
2860
3359
|
shift: "⇧"
|
|
@@ -2862,7 +3361,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2862
3361
|
search: "Ctrl K",
|
|
2863
3362
|
alt: "Alt",
|
|
2864
3363
|
shift: "Shift"
|
|
2865
|
-
},
|
|
3364
|
+
}, ui = (e, t, n) => {
|
|
2866
3365
|
if (n.trim() !== "") return {
|
|
2867
3366
|
title: e.noResults,
|
|
2868
3367
|
hint: e.noResultsHint
|
|
@@ -2893,14 +3392,14 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2893
3392
|
hint: e.emptyAllHint
|
|
2894
3393
|
};
|
|
2895
3394
|
}
|
|
2896
|
-
},
|
|
3395
|
+
}, di = (e) => {
|
|
2897
3396
|
let t = new Date(e), n = (e) => e < 10 ? `0${e}` : String(e);
|
|
2898
3397
|
return `${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`;
|
|
2899
|
-
},
|
|
3398
|
+
}, fi = ({ item: e, selected: t, onSelect: n }) => {
|
|
2900
3399
|
let r = c(null);
|
|
2901
3400
|
return i(() => {
|
|
2902
3401
|
t && r.current !== null && typeof r.current.scrollIntoView == "function" && r.current.scrollIntoView({ block: "nearest" });
|
|
2903
|
-
}, [t]), /* @__PURE__ */
|
|
3402
|
+
}, [t]), /* @__PURE__ */ P("button", {
|
|
2904
3403
|
ref: r,
|
|
2905
3404
|
type: "button",
|
|
2906
3405
|
role: "option",
|
|
@@ -2909,106 +3408,106 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
2909
3408
|
className: `vdt-row${t ? " vdt-row-sel" : ""}`,
|
|
2910
3409
|
onClick: n,
|
|
2911
3410
|
children: [
|
|
2912
|
-
/* @__PURE__ */
|
|
3411
|
+
/* @__PURE__ */ N("span", {
|
|
2913
3412
|
className: `vdt-dot vdt-dot-${e.tone}`,
|
|
2914
3413
|
"aria-hidden": "true"
|
|
2915
3414
|
}),
|
|
2916
|
-
/* @__PURE__ */
|
|
3415
|
+
/* @__PURE__ */ N("span", {
|
|
2917
3416
|
className: "vdt-row-src",
|
|
2918
3417
|
children: e.source
|
|
2919
3418
|
}),
|
|
2920
|
-
/* @__PURE__ */
|
|
3419
|
+
/* @__PURE__ */ P("span", {
|
|
2921
3420
|
className: "vdt-row-main",
|
|
2922
|
-
children: [/* @__PURE__ */
|
|
3421
|
+
children: [/* @__PURE__ */ N("code", {
|
|
2923
3422
|
className: "vdt-row-name",
|
|
2924
3423
|
children: e.name
|
|
2925
|
-
}), /* @__PURE__ */
|
|
3424
|
+
}), /* @__PURE__ */ N("span", {
|
|
2926
3425
|
className: "vdt-row-summary",
|
|
2927
3426
|
children: e.summary
|
|
2928
3427
|
})]
|
|
2929
3428
|
}),
|
|
2930
|
-
/* @__PURE__ */
|
|
3429
|
+
/* @__PURE__ */ P("span", {
|
|
2931
3430
|
className: "vdt-row-meta",
|
|
2932
3431
|
children: [
|
|
2933
|
-
e.apiName === void 0 ? null : /* @__PURE__ */
|
|
3432
|
+
e.apiName === void 0 ? null : /* @__PURE__ */ N("span", {
|
|
2934
3433
|
className: "vdt-row-api",
|
|
2935
3434
|
children: e.apiName
|
|
2936
3435
|
}),
|
|
2937
|
-
e.status === void 0 ? null : /* @__PURE__ */
|
|
3436
|
+
e.status === void 0 ? null : /* @__PURE__ */ N("span", {
|
|
2938
3437
|
className: `vdt-tag vdt-tag-${e.tone}`,
|
|
2939
3438
|
children: e.status
|
|
2940
3439
|
}),
|
|
2941
|
-
e.at > 0 ? /* @__PURE__ */
|
|
3440
|
+
e.at > 0 ? /* @__PURE__ */ N("span", {
|
|
2942
3441
|
className: "vdt-row-time",
|
|
2943
|
-
children:
|
|
3442
|
+
children: di(e.at)
|
|
2944
3443
|
}) : null
|
|
2945
3444
|
]
|
|
2946
3445
|
})
|
|
2947
3446
|
]
|
|
2948
3447
|
});
|
|
2949
|
-
},
|
|
2950
|
-
let n = e.detail, r =
|
|
2951
|
-
return /* @__PURE__ */
|
|
3448
|
+
}, pi = ({ item: e, retained: t }) => {
|
|
3449
|
+
let n = e.detail, r = H().shell;
|
|
3450
|
+
return /* @__PURE__ */ P("div", {
|
|
2952
3451
|
className: "vdt-detail",
|
|
2953
|
-
children: [/* @__PURE__ */
|
|
3452
|
+
children: [/* @__PURE__ */ P("div", {
|
|
2954
3453
|
className: "vdt-detail-head",
|
|
2955
3454
|
children: [
|
|
2956
|
-
/* @__PURE__ */
|
|
3455
|
+
/* @__PURE__ */ N("span", {
|
|
2957
3456
|
className: `vdt-dot vdt-dot-${e.tone}`,
|
|
2958
3457
|
"aria-hidden": "true"
|
|
2959
3458
|
}),
|
|
2960
|
-
/* @__PURE__ */
|
|
3459
|
+
/* @__PURE__ */ N("span", {
|
|
2961
3460
|
className: "vdt-row-src",
|
|
2962
3461
|
children: e.source
|
|
2963
3462
|
}),
|
|
2964
|
-
/* @__PURE__ */
|
|
3463
|
+
/* @__PURE__ */ N("code", {
|
|
2965
3464
|
className: "vdt-detail-name",
|
|
2966
3465
|
children: e.name
|
|
2967
3466
|
}),
|
|
2968
|
-
e.status === void 0 ? null : /* @__PURE__ */
|
|
3467
|
+
e.status === void 0 ? null : /* @__PURE__ */ N("span", {
|
|
2969
3468
|
className: `vdt-tag vdt-tag-${e.tone}`,
|
|
2970
3469
|
children: e.status
|
|
2971
3470
|
}),
|
|
2972
|
-
/* @__PURE__ */
|
|
2973
|
-
e.apiName === void 0 ? null : /* @__PURE__ */
|
|
3471
|
+
/* @__PURE__ */ N("span", { className: "vdt-sp" }),
|
|
3472
|
+
e.apiName === void 0 ? null : /* @__PURE__ */ N("span", {
|
|
2974
3473
|
className: "vdt-row-api",
|
|
2975
3474
|
children: e.apiName
|
|
2976
3475
|
}),
|
|
2977
|
-
e.at > 0 ? /* @__PURE__ */
|
|
3476
|
+
e.at > 0 ? /* @__PURE__ */ N("span", {
|
|
2978
3477
|
className: "vdt-row-time",
|
|
2979
|
-
children:
|
|
3478
|
+
children: di(e.at)
|
|
2980
3479
|
}) : null
|
|
2981
3480
|
]
|
|
2982
|
-
}), /* @__PURE__ */
|
|
3481
|
+
}), /* @__PURE__ */ P("div", {
|
|
2983
3482
|
className: "vdt-detail-body",
|
|
2984
3483
|
children: [
|
|
2985
|
-
t ? /* @__PURE__ */
|
|
3484
|
+
t ? /* @__PURE__ */ N("p", {
|
|
2986
3485
|
className: "vdt:px-3 vdt:py-2 vdt:text-xs vdt:text-foreground-muted",
|
|
2987
3486
|
role: "status",
|
|
2988
3487
|
children: r.retainedSelection
|
|
2989
3488
|
}) : null,
|
|
2990
|
-
n.source === "subscription" ? /* @__PURE__ */
|
|
2991
|
-
n.source === "mutation" || n.source === "action" ? /* @__PURE__ */
|
|
2992
|
-
n.source === "trace" ? /* @__PURE__ */
|
|
2993
|
-
n.source === "log" ? /* @__PURE__ */
|
|
3489
|
+
n.source === "subscription" ? /* @__PURE__ */ N(Qe, { entry: n.entry }) : null,
|
|
3490
|
+
n.source === "mutation" || n.source === "action" ? /* @__PURE__ */ N(Er, { mutation: n.mutation }) : null,
|
|
3491
|
+
n.source === "trace" ? /* @__PURE__ */ N(Rr, { trace: n.trace }) : null,
|
|
3492
|
+
n.source === "log" ? /* @__PURE__ */ N(Ar, { record: n.record }) : null
|
|
2994
3493
|
]
|
|
2995
3494
|
})]
|
|
2996
3495
|
});
|
|
2997
|
-
},
|
|
2998
|
-
let t =
|
|
2999
|
-
return /* @__PURE__ */
|
|
3496
|
+
}, mi = ({ name: e }) => {
|
|
3497
|
+
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;
|
|
3498
|
+
return /* @__PURE__ */ P("span", {
|
|
3000
3499
|
className: "vdt-chip",
|
|
3001
3500
|
"data-status": n,
|
|
3002
3501
|
children: [
|
|
3003
|
-
/* @__PURE__ */
|
|
3502
|
+
/* @__PURE__ */ N("span", {
|
|
3004
3503
|
className: `vdt-dot vdt-dot-${r}`,
|
|
3005
3504
|
"aria-hidden": "true"
|
|
3006
3505
|
}),
|
|
3007
|
-
/* @__PURE__ */
|
|
3008
|
-
/* @__PURE__ */
|
|
3506
|
+
/* @__PURE__ */ N("b", { children: e }),
|
|
3507
|
+
/* @__PURE__ */ N("span", { children: i })
|
|
3009
3508
|
]
|
|
3010
3509
|
});
|
|
3011
|
-
},
|
|
3510
|
+
}, hi = () => u(h, () => f().pathname ?? "", () => ""), gi = (e) => {
|
|
3012
3511
|
let t = e.detail;
|
|
3013
3512
|
switch (t.source) {
|
|
3014
3513
|
case "subscription": return t.entry;
|
|
@@ -3017,56 +3516,56 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3017
3516
|
case "trace": return t.trace;
|
|
3018
3517
|
case "log": return t.record;
|
|
3019
3518
|
}
|
|
3020
|
-
},
|
|
3021
|
-
let f =
|
|
3519
|
+
}, _i = ({ dock: e, push: t, onDock: n, onPush: r, onClose: a, scope: o, onScope: c, searchRef: u, onHeaderPointerDown: d }) => {
|
|
3520
|
+
let f = H(), p = f.shell, m = f.tabs, h = k(), [g, _] = l(!1), v = si(!0, g), y = Dn(!0), b = Pn(!0), x = Qn(!0), S = hi(), [C, w] = l(""), [T, E] = l(!1), [D, O] = l(null), A = D?.id ?? null;
|
|
3022
3521
|
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 &&
|
|
3522
|
+
if (D === null || D.source === "subscription") return;
|
|
3523
|
+
let e = v.find((e) => e.id === D.id);
|
|
3524
|
+
e !== void 0 && gi(e) !== gi(D) && O(e);
|
|
3525
|
+
}, [v, D]);
|
|
3526
|
+
let ee = Hr(o), j = s(() => Jr(v), [v]), te = s(() => v.filter((e) => e.source === "trace" && e.tone === "err").length, [v]), ne = s(() => v.filter(Kr).length, [v]), F = D === null ? null : v.find((e) => e.id === D.id) ?? null, I = D !== null && D.source !== "subscription" && F === null, L = s(() => {
|
|
3527
|
+
let e = F ?? (I ? D : null);
|
|
3528
|
+
return e !== null && qr([e], C, o).length > 0 ? e : null;
|
|
3030
3529
|
}, [
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3530
|
+
F,
|
|
3531
|
+
I,
|
|
3532
|
+
D,
|
|
3034
3533
|
C,
|
|
3035
3534
|
o
|
|
3036
|
-
]),
|
|
3037
|
-
let e =
|
|
3038
|
-
return
|
|
3535
|
+
]), R = s(() => {
|
|
3536
|
+
let e = I && L !== null ? [...v, L] : v;
|
|
3537
|
+
return qr(T ? e.filter(Kr) : e, C, o);
|
|
3039
3538
|
}, [
|
|
3040
3539
|
v,
|
|
3041
3540
|
C,
|
|
3042
3541
|
o,
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
]),
|
|
3542
|
+
T,
|
|
3543
|
+
I,
|
|
3544
|
+
L
|
|
3545
|
+
]), re = s(() => T && C.trim() === "" ? {
|
|
3047
3546
|
title: p.emptyPending,
|
|
3048
3547
|
hint: p.emptyPendingHint
|
|
3049
|
-
} :
|
|
3548
|
+
} : ui(p, o, C), [
|
|
3050
3549
|
p,
|
|
3051
3550
|
o,
|
|
3052
3551
|
C,
|
|
3053
|
-
|
|
3054
|
-
]),
|
|
3055
|
-
|
|
3056
|
-
},
|
|
3552
|
+
T
|
|
3553
|
+
]), z = (e) => {
|
|
3554
|
+
O(e === null ? null : R.find((t) => t.id === e) ?? null);
|
|
3555
|
+
}, ie = (e) => {
|
|
3057
3556
|
switch (e) {
|
|
3058
3557
|
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
|
|
3558
|
+
case "subscription": return j.subscription;
|
|
3559
|
+
case "mutation": return j.mutation;
|
|
3560
|
+
case "action": return j.action;
|
|
3561
|
+
case "trace": return j.trace;
|
|
3562
|
+
case "log": return j.log;
|
|
3064
3563
|
case "indexes": return y;
|
|
3065
3564
|
case "webhooks": return b;
|
|
3066
3565
|
case "workflows": return x;
|
|
3067
3566
|
default: return null;
|
|
3068
3567
|
}
|
|
3069
|
-
},
|
|
3568
|
+
}, B = (e) => {
|
|
3070
3569
|
switch (e) {
|
|
3071
3570
|
case "all": return p.scopeAll;
|
|
3072
3571
|
case "subscription": return m.subscriptions;
|
|
@@ -3080,231 +3579,236 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3080
3579
|
case "webhooks": return m.webhooks;
|
|
3081
3580
|
case "routes": return m.routes;
|
|
3082
3581
|
case "runtimes": return m.runtimes;
|
|
3582
|
+
case "pwa": return m.pwa;
|
|
3583
|
+
case "desktop": return m.desktop;
|
|
3083
3584
|
}
|
|
3084
3585
|
};
|
|
3085
|
-
return /* @__PURE__ */
|
|
3086
|
-
/* @__PURE__ */
|
|
3586
|
+
return /* @__PURE__ */ P(M, { children: [
|
|
3587
|
+
/* @__PURE__ */ P("header", {
|
|
3087
3588
|
className: "vdt-bar",
|
|
3088
3589
|
onPointerDown: d,
|
|
3089
3590
|
children: [
|
|
3090
|
-
e === "window" ? /* @__PURE__ */
|
|
3591
|
+
e === "window" ? /* @__PURE__ */ N("span", {
|
|
3091
3592
|
className: "vdt-win-handle",
|
|
3092
3593
|
title: p.moveTitle,
|
|
3093
3594
|
"aria-hidden": "true",
|
|
3094
|
-
children: /* @__PURE__ */
|
|
3595
|
+
children: /* @__PURE__ */ N(Fe, { className: "vdt:w-4 vdt:h-4" })
|
|
3095
3596
|
}) : null,
|
|
3096
|
-
/* @__PURE__ */
|
|
3097
|
-
|
|
3597
|
+
/* @__PURE__ */ N(fe, { className: "vdt-bar-mark" }),
|
|
3598
|
+
ee ? /* @__PURE__ */ P("label", {
|
|
3098
3599
|
className: "vdt-search",
|
|
3099
3600
|
children: [
|
|
3100
|
-
/* @__PURE__ */
|
|
3101
|
-
/* @__PURE__ */
|
|
3601
|
+
/* @__PURE__ */ N(Te, { className: "vdt:w-3.5 vdt:h-3.5" }),
|
|
3602
|
+
/* @__PURE__ */ N("input", {
|
|
3102
3603
|
ref: u,
|
|
3103
3604
|
type: "search",
|
|
3104
3605
|
value: C,
|
|
3105
3606
|
onChange: (e) => w(e.target.value),
|
|
3106
3607
|
onKeyDown: (e) => {
|
|
3107
|
-
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(),
|
|
3608
|
+
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), z(Xr(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
3609
|
},
|
|
3109
3610
|
placeholder: p.searchPlaceholder,
|
|
3110
3611
|
"aria-label": p.searchLabel,
|
|
3111
3612
|
autoComplete: "off",
|
|
3112
3613
|
spellCheck: !1
|
|
3113
3614
|
}),
|
|
3114
|
-
/* @__PURE__ */
|
|
3615
|
+
/* @__PURE__ */ N("kbd", {
|
|
3115
3616
|
className: "vdt-kbd",
|
|
3116
|
-
children:
|
|
3617
|
+
children: li.search
|
|
3117
3618
|
})
|
|
3118
3619
|
]
|
|
3119
|
-
}) : /* @__PURE__ */
|
|
3620
|
+
}) : /* @__PURE__ */ P("span", {
|
|
3120
3621
|
className: "vdt-bar-title",
|
|
3121
|
-
children: [/* @__PURE__ */
|
|
3622
|
+
children: [/* @__PURE__ */ N("span", {
|
|
3122
3623
|
className: "vdt-bar-brand",
|
|
3123
3624
|
children: p.brandWord
|
|
3124
|
-
}), /* @__PURE__ */
|
|
3625
|
+
}), /* @__PURE__ */ N("span", {
|
|
3125
3626
|
className: "vdt-bar-kicker",
|
|
3126
3627
|
children: p.kicker
|
|
3127
3628
|
})]
|
|
3128
3629
|
}),
|
|
3129
|
-
/* @__PURE__ */
|
|
3630
|
+
/* @__PURE__ */ N("div", {
|
|
3130
3631
|
role: "tablist",
|
|
3131
3632
|
"aria-label": p.brand,
|
|
3132
3633
|
className: "vdt-scopes",
|
|
3133
|
-
children:
|
|
3134
|
-
let n =
|
|
3135
|
-
return /* @__PURE__ */
|
|
3634
|
+
children: Vr.map((e, t) => {
|
|
3635
|
+
let n = ci[e], r = ie(e), i = e === o;
|
|
3636
|
+
return /* @__PURE__ */ P("button", {
|
|
3136
3637
|
type: "button",
|
|
3137
3638
|
role: "tab",
|
|
3138
|
-
"aria-label": r !== null && r > 0 ? `${
|
|
3639
|
+
"aria-label": r !== null && r > 0 ? `${B(e)} (${r})` : B(e),
|
|
3139
3640
|
"aria-selected": i,
|
|
3140
3641
|
"data-scope": e,
|
|
3141
|
-
className: `vdt-scope${i ? " vdt-scope-on" : ""}${t ===
|
|
3642
|
+
className: `vdt-scope${i ? " vdt-scope-on" : ""}${t === zr.length ? " vdt-scope-sep" : ""}`,
|
|
3142
3643
|
onClick: () => {
|
|
3143
|
-
c(e),
|
|
3644
|
+
c(e), z(null), E(!1), Hr(e) && requestAnimationFrame(() => {
|
|
3144
3645
|
let e = u.current;
|
|
3145
3646
|
e !== null && e.getRootNode().activeElement !== e && e.focus();
|
|
3146
3647
|
});
|
|
3147
3648
|
},
|
|
3148
3649
|
children: [
|
|
3149
|
-
n ? /* @__PURE__ */
|
|
3150
|
-
/* @__PURE__ */
|
|
3650
|
+
n ? /* @__PURE__ */ N(n, { className: "vdt:w-3.5 vdt:h-3.5" }) : null,
|
|
3651
|
+
/* @__PURE__ */ N("span", {
|
|
3151
3652
|
className: "vdt-scope-label",
|
|
3152
|
-
children:
|
|
3653
|
+
children: B(e)
|
|
3153
3654
|
}),
|
|
3154
|
-
r !== null && r > 0 ? /* @__PURE__ */
|
|
3155
|
-
className: `vdt-badge${i ? " vdt-badge-acc" : ""}${e === "trace" &&
|
|
3655
|
+
r !== null && r > 0 ? /* @__PURE__ */ N("span", {
|
|
3656
|
+
className: `vdt-badge${i ? " vdt-badge-acc" : ""}${e === "trace" && te > 0 ? " vdt-badge-err" : ""}`,
|
|
3156
3657
|
children: r
|
|
3157
3658
|
}) : null
|
|
3158
3659
|
]
|
|
3159
3660
|
}, e);
|
|
3160
3661
|
})
|
|
3161
3662
|
}),
|
|
3162
|
-
/* @__PURE__ */
|
|
3163
|
-
/* @__PURE__ */
|
|
3663
|
+
/* @__PURE__ */ N("span", { className: "vdt-sp" }),
|
|
3664
|
+
/* @__PURE__ */ N(Pt, {
|
|
3164
3665
|
dock: e,
|
|
3165
3666
|
push: t,
|
|
3166
3667
|
onDock: n,
|
|
3167
3668
|
onPush: r
|
|
3168
3669
|
}),
|
|
3169
|
-
/* @__PURE__ */
|
|
3670
|
+
/* @__PURE__ */ N("button", {
|
|
3170
3671
|
type: "button",
|
|
3171
3672
|
className: "vdt-iconbtn",
|
|
3172
3673
|
title: p.closeTitle,
|
|
3173
3674
|
"aria-label": p.closeTitle,
|
|
3174
3675
|
onClick: a,
|
|
3175
|
-
children: /* @__PURE__ */
|
|
3676
|
+
children: /* @__PURE__ */ N(me, { className: "vdt:w-4 vdt:h-4" })
|
|
3176
3677
|
})
|
|
3177
3678
|
]
|
|
3178
3679
|
}),
|
|
3179
|
-
|
|
3680
|
+
/* @__PURE__ */ N($t, {}),
|
|
3681
|
+
ee ? /* @__PURE__ */ P("div", {
|
|
3180
3682
|
className: "vdt-body",
|
|
3181
|
-
"data-empty":
|
|
3182
|
-
children: [/* @__PURE__ */
|
|
3683
|
+
"data-empty": R.length === 0 && L === null ? "true" : "false",
|
|
3684
|
+
children: [/* @__PURE__ */ N("div", {
|
|
3183
3685
|
role: "listbox",
|
|
3184
|
-
"aria-label": p.results(
|
|
3686
|
+
"aria-label": p.results(R.length),
|
|
3185
3687
|
tabIndex: 0,
|
|
3186
3688
|
className: "vdt-results",
|
|
3187
3689
|
onKeyDown: (e) => {
|
|
3188
|
-
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(),
|
|
3690
|
+
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), z(Xr(R.map((e) => e.id), A, e.key === "ArrowDown" ? 1 : -1))) : e.key === "Escape" && a();
|
|
3189
3691
|
},
|
|
3190
|
-
children:
|
|
3692
|
+
children: R.length === 0 ? /* @__PURE__ */ P("div", {
|
|
3191
3693
|
className: "vdt-empty",
|
|
3192
|
-
children: [/* @__PURE__ */
|
|
3694
|
+
children: [/* @__PURE__ */ N("div", {
|
|
3193
3695
|
className: "vdt-empty-title",
|
|
3194
|
-
children:
|
|
3195
|
-
}), /* @__PURE__ */
|
|
3696
|
+
children: re.title
|
|
3697
|
+
}), /* @__PURE__ */ N("div", {
|
|
3196
3698
|
className: "vdt-empty-hint",
|
|
3197
|
-
children:
|
|
3699
|
+
children: re.hint
|
|
3198
3700
|
})]
|
|
3199
|
-
}) :
|
|
3701
|
+
}) : R.map((e) => /* @__PURE__ */ N(fi, {
|
|
3200
3702
|
item: e,
|
|
3201
|
-
selected: e.id ===
|
|
3202
|
-
onSelect: () =>
|
|
3703
|
+
selected: e.id === A,
|
|
3704
|
+
onSelect: () => z(e.id === A ? null : e.id)
|
|
3203
3705
|
}, e.id))
|
|
3204
|
-
}), /* @__PURE__ */
|
|
3706
|
+
}), /* @__PURE__ */ N("aside", {
|
|
3205
3707
|
className: "vdt-side",
|
|
3206
3708
|
"aria-live": "polite",
|
|
3207
|
-
children:
|
|
3709
|
+
children: L === null ? /* @__PURE__ */ N("div", {
|
|
3208
3710
|
className: "vdt-empty vdt-empty-side",
|
|
3209
|
-
children: /* @__PURE__ */
|
|
3711
|
+
children: /* @__PURE__ */ N("div", {
|
|
3210
3712
|
className: "vdt-empty-hint",
|
|
3211
3713
|
children: p.selectHint
|
|
3212
3714
|
})
|
|
3213
|
-
}) : /* @__PURE__ */
|
|
3214
|
-
item:
|
|
3215
|
-
retained:
|
|
3715
|
+
}) : /* @__PURE__ */ N(pi, {
|
|
3716
|
+
item: L,
|
|
3717
|
+
retained: I
|
|
3216
3718
|
})
|
|
3217
3719
|
})]
|
|
3218
|
-
}) : /* @__PURE__ */
|
|
3720
|
+
}) : /* @__PURE__ */ P("div", {
|
|
3219
3721
|
className: "vdt-body vdt-body-panel",
|
|
3220
3722
|
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__ */
|
|
3723
|
+
o === "workflows" ? /* @__PURE__ */ N($n, {}) : null,
|
|
3724
|
+
o === "stores" ? /* @__PURE__ */ N(Cr, {}) : null,
|
|
3725
|
+
o === "indexes" ? /* @__PURE__ */ N(wn, {}) : null,
|
|
3726
|
+
o === "webhooks" ? /* @__PURE__ */ N(In, {}) : null,
|
|
3727
|
+
o === "routes" ? /* @__PURE__ */ N(sr, {}) : null,
|
|
3728
|
+
o === "runtimes" ? /* @__PURE__ */ N(lr, {}) : null,
|
|
3729
|
+
o === "pwa" ? /* @__PURE__ */ N(hr, {}) : null,
|
|
3730
|
+
o === "desktop" ? /* @__PURE__ */ N(vr, {}) : null
|
|
3227
3731
|
]
|
|
3228
3732
|
}),
|
|
3229
|
-
/* @__PURE__ */
|
|
3733
|
+
/* @__PURE__ */ P("footer", {
|
|
3230
3734
|
className: "vdt-foot",
|
|
3231
3735
|
children: [
|
|
3232
|
-
o === "trace" ? /* @__PURE__ */
|
|
3736
|
+
o === "trace" ? /* @__PURE__ */ N("button", {
|
|
3233
3737
|
type: "button",
|
|
3234
3738
|
className: "vdt-chip vdt-background-filter",
|
|
3235
3739
|
"aria-pressed": g,
|
|
3236
3740
|
onClick: () => _(!g),
|
|
3237
3741
|
children: f.traces.includeBackground
|
|
3238
3742
|
}) : null,
|
|
3239
|
-
|
|
3743
|
+
ne > 0 || T ? /* @__PURE__ */ P("button", {
|
|
3240
3744
|
type: "button",
|
|
3241
3745
|
className: "vdt-chip vdt-chip-info vdt-pending-filter",
|
|
3242
3746
|
"data-chip": "pending",
|
|
3243
|
-
"aria-label": p.pendingInvocations(
|
|
3244
|
-
"aria-pressed":
|
|
3747
|
+
"aria-label": p.pendingInvocations(ne),
|
|
3748
|
+
"aria-pressed": T,
|
|
3245
3749
|
onClick: () => {
|
|
3246
|
-
|
|
3750
|
+
E(!T), c("all"), w(""), z(null);
|
|
3247
3751
|
},
|
|
3248
3752
|
children: [
|
|
3249
|
-
/* @__PURE__ */
|
|
3753
|
+
/* @__PURE__ */ N("span", {
|
|
3250
3754
|
className: "vdt-dot vdt-dot-info",
|
|
3251
3755
|
"aria-hidden": "true"
|
|
3252
3756
|
}),
|
|
3253
|
-
/* @__PURE__ */
|
|
3757
|
+
/* @__PURE__ */ N("b", { children: ne }),
|
|
3254
3758
|
" ",
|
|
3255
3759
|
p.pending
|
|
3256
3760
|
]
|
|
3257
3761
|
}) : null,
|
|
3258
|
-
h.names.map((e) => /* @__PURE__ */
|
|
3259
|
-
S === "" ? null : /* @__PURE__ */
|
|
3762
|
+
h.names.map((e) => /* @__PURE__ */ N(mi, { name: e }, e)),
|
|
3763
|
+
S === "" ? null : /* @__PURE__ */ N("span", {
|
|
3260
3764
|
className: "vdt-foot-route",
|
|
3261
|
-
children: /* @__PURE__ */
|
|
3765
|
+
children: /* @__PURE__ */ N("code", { children: S })
|
|
3262
3766
|
}),
|
|
3263
|
-
/* @__PURE__ */
|
|
3264
|
-
/* @__PURE__ */
|
|
3767
|
+
/* @__PURE__ */ N("span", { className: "vdt-sp" }),
|
|
3768
|
+
/* @__PURE__ */ P("span", {
|
|
3265
3769
|
className: "vdt-hints",
|
|
3266
3770
|
children: [
|
|
3267
|
-
/* @__PURE__ */
|
|
3268
|
-
/* @__PURE__ */
|
|
3771
|
+
/* @__PURE__ */ P("span", { children: [
|
|
3772
|
+
/* @__PURE__ */ N("kbd", {
|
|
3269
3773
|
className: "vdt-kbd",
|
|
3270
3774
|
children: "↑↓"
|
|
3271
3775
|
}),
|
|
3272
3776
|
" ",
|
|
3273
3777
|
p.hintNavigate
|
|
3274
3778
|
] }),
|
|
3275
|
-
/* @__PURE__ */
|
|
3276
|
-
/* @__PURE__ */
|
|
3779
|
+
/* @__PURE__ */ P("span", { children: [
|
|
3780
|
+
/* @__PURE__ */ N("kbd", {
|
|
3277
3781
|
className: "vdt-kbd",
|
|
3278
3782
|
children: "↵"
|
|
3279
3783
|
}),
|
|
3280
3784
|
" ",
|
|
3281
3785
|
p.hintOpen
|
|
3282
3786
|
] }),
|
|
3283
|
-
/* @__PURE__ */
|
|
3284
|
-
/* @__PURE__ */
|
|
3787
|
+
/* @__PURE__ */ P("span", { children: [
|
|
3788
|
+
/* @__PURE__ */ N("kbd", {
|
|
3285
3789
|
className: "vdt-kbd",
|
|
3286
|
-
children:
|
|
3790
|
+
children: li.alt
|
|
3287
3791
|
}),
|
|
3288
3792
|
"+",
|
|
3289
|
-
/* @__PURE__ */
|
|
3793
|
+
/* @__PURE__ */ N("kbd", {
|
|
3290
3794
|
className: "vdt-kbd",
|
|
3291
3795
|
children: "V"
|
|
3292
3796
|
}),
|
|
3293
3797
|
" ",
|
|
3294
3798
|
p.hintToggle
|
|
3295
3799
|
] }),
|
|
3296
|
-
/* @__PURE__ */
|
|
3297
|
-
/* @__PURE__ */
|
|
3800
|
+
/* @__PURE__ */ P("span", { children: [
|
|
3801
|
+
/* @__PURE__ */ N("kbd", {
|
|
3298
3802
|
className: "vdt-kbd",
|
|
3299
|
-
children:
|
|
3803
|
+
children: li.alt
|
|
3300
3804
|
}),
|
|
3301
3805
|
"+",
|
|
3302
|
-
/* @__PURE__ */
|
|
3806
|
+
/* @__PURE__ */ N("kbd", {
|
|
3303
3807
|
className: "vdt-kbd",
|
|
3304
|
-
children:
|
|
3808
|
+
children: li.shift
|
|
3305
3809
|
}),
|
|
3306
3810
|
"+",
|
|
3307
|
-
/* @__PURE__ */
|
|
3811
|
+
/* @__PURE__ */ N("kbd", {
|
|
3308
3812
|
className: "vdt-kbd",
|
|
3309
3813
|
children: "←↑↓→"
|
|
3310
3814
|
}),
|
|
@@ -3316,17 +3820,17 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3316
3820
|
]
|
|
3317
3821
|
})
|
|
3318
3822
|
] });
|
|
3319
|
-
},
|
|
3320
|
-
let n =
|
|
3321
|
-
return /* @__PURE__ */
|
|
3823
|
+
}, vi = ({ error: e, onReset: t }) => {
|
|
3824
|
+
let n = H().shell;
|
|
3825
|
+
return /* @__PURE__ */ P("div", {
|
|
3322
3826
|
role: "alert",
|
|
3323
3827
|
className: "vdt-crash",
|
|
3324
3828
|
children: [
|
|
3325
|
-
/* @__PURE__ */
|
|
3829
|
+
/* @__PURE__ */ N("div", {
|
|
3326
3830
|
className: "vdt-crash-title",
|
|
3327
3831
|
children: n.crashTitle
|
|
3328
3832
|
}),
|
|
3329
|
-
/* @__PURE__ */
|
|
3833
|
+
/* @__PURE__ */ P("pre", {
|
|
3330
3834
|
className: "vdt-crash-message",
|
|
3331
3835
|
children: [
|
|
3332
3836
|
e.name,
|
|
@@ -3334,7 +3838,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3334
3838
|
e.message
|
|
3335
3839
|
]
|
|
3336
3840
|
}),
|
|
3337
|
-
/* @__PURE__ */
|
|
3841
|
+
/* @__PURE__ */ N("button", {
|
|
3338
3842
|
type: "button",
|
|
3339
3843
|
className: "vdt-crash-reset",
|
|
3340
3844
|
onClick: t,
|
|
@@ -3342,7 +3846,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3342
3846
|
})
|
|
3343
3847
|
]
|
|
3344
3848
|
});
|
|
3345
|
-
},
|
|
3849
|
+
}, yi = class extends e {
|
|
3346
3850
|
state = { error: null };
|
|
3347
3851
|
static getDerivedStateFromError(e) {
|
|
3348
3852
|
return { error: e };
|
|
@@ -3351,15 +3855,15 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3351
3855
|
this.props.onError?.(e, t);
|
|
3352
3856
|
}
|
|
3353
3857
|
render() {
|
|
3354
|
-
return this.state.error === null ? this.props.children : /* @__PURE__ */
|
|
3858
|
+
return this.state.error === null ? this.props.children : /* @__PURE__ */ N(vi, {
|
|
3355
3859
|
error: this.state.error,
|
|
3356
3860
|
onReset: () => this.setState({ error: null })
|
|
3357
3861
|
});
|
|
3358
3862
|
}
|
|
3359
|
-
},
|
|
3863
|
+
}, bi = /vdt/, xi = (e, t) => {
|
|
3360
3864
|
for (let n of Array.from(e)) {
|
|
3361
3865
|
if (n instanceof CSSStyleRule) {
|
|
3362
|
-
|
|
3866
|
+
bi.test(n.selectorText) && t.push(n.cssText);
|
|
3363
3867
|
continue;
|
|
3364
3868
|
}
|
|
3365
3869
|
if (n instanceof CSSKeyframesRule) {
|
|
@@ -3368,14 +3872,14 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3368
3872
|
}
|
|
3369
3873
|
if (n instanceof CSSGroupingRule || n instanceof CSSLayerBlockRule) {
|
|
3370
3874
|
let e = [];
|
|
3371
|
-
if (
|
|
3875
|
+
if (xi(n.cssRules, e), e.length === 0) continue;
|
|
3372
3876
|
let r = n.cssText, i = r.slice(0, r.indexOf("{")).trim();
|
|
3373
3877
|
t.push(`${i} {\n${e.join("\n")}\n}`);
|
|
3374
3878
|
continue;
|
|
3375
3879
|
}
|
|
3376
|
-
n.constructor.name === "CSSPropertyRule" &&
|
|
3880
|
+
n.constructor.name === "CSSPropertyRule" && bi.test(n.cssText) && t.push(n.cssText), n.constructor.name === "CSSLayerStatementRule" && t.push(n.cssText);
|
|
3377
3881
|
}
|
|
3378
|
-
},
|
|
3882
|
+
}, Si = (e) => {
|
|
3379
3883
|
let t = [];
|
|
3380
3884
|
for (let n of Array.from(e.styleSheets)) {
|
|
3381
3885
|
let e;
|
|
@@ -3384,10 +3888,10 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3384
3888
|
} catch {
|
|
3385
3889
|
continue;
|
|
3386
3890
|
}
|
|
3387
|
-
|
|
3891
|
+
xi(e, t);
|
|
3388
3892
|
}
|
|
3389
3893
|
return t.join("\n");
|
|
3390
|
-
},
|
|
3894
|
+
}, Ci = (e, t) => {
|
|
3391
3895
|
if (typeof CSSStyleSheet < "u" && "replaceSync" in CSSStyleSheet.prototype && "adoptedStyleSheets" in e) {
|
|
3392
3896
|
let n = new CSSStyleSheet();
|
|
3393
3897
|
n.replaceSync(t), e.adoptedStyleSheets = [n];
|
|
@@ -3395,7 +3899,7 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3395
3899
|
}
|
|
3396
3900
|
let n = e.querySelector("style[data-vdt]");
|
|
3397
3901
|
n === null && (n = e.ownerDocument.createElement("style"), n.setAttribute("data-vdt", ""), e.prepend(n)), n.textContent = t;
|
|
3398
|
-
},
|
|
3902
|
+
}, wi = ({ children: e }) => {
|
|
3399
3903
|
let t = c(null), [n, r] = l(null);
|
|
3400
3904
|
return o(() => {
|
|
3401
3905
|
let e = t.current;
|
|
@@ -3403,8 +3907,8 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3403
3907
|
let n = e.shadowRoot ?? e.attachShadow({ mode: "open" }), i = n.querySelector("[data-vdt-mount]");
|
|
3404
3908
|
i === null && (i = e.ownerDocument.createElement("div"), i.setAttribute("data-vdt-mount", ""), n.append(i));
|
|
3405
3909
|
let a = e.ownerDocument, o = "", s = () => {
|
|
3406
|
-
let e =
|
|
3407
|
-
e !== o && (o = e,
|
|
3910
|
+
let e = Si(a);
|
|
3911
|
+
e !== o && (o = e, Ci(n, e));
|
|
3408
3912
|
};
|
|
3409
3913
|
s();
|
|
3410
3914
|
let c = typeof MutationObserver > "u" ? null : new MutationObserver(() => s());
|
|
@@ -3413,37 +3917,37 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3413
3917
|
subtree: !0,
|
|
3414
3918
|
characterData: !0
|
|
3415
3919
|
}), r(i), () => c?.disconnect();
|
|
3416
|
-
}, []), /* @__PURE__ */
|
|
3920
|
+
}, []), /* @__PURE__ */ N("div", {
|
|
3417
3921
|
ref: t,
|
|
3418
3922
|
className: "vdt-root",
|
|
3419
3923
|
"data-voltro-devtools": "",
|
|
3420
|
-
children: n === null ? null :
|
|
3924
|
+
children: n === null ? null : te(e, n)
|
|
3421
3925
|
});
|
|
3422
|
-
},
|
|
3926
|
+
}, Ti = () => u(g, p, p), Ei = "voltro:devtools:open", Di = (e) => {
|
|
3423
3927
|
if (typeof window > "u") return e;
|
|
3424
3928
|
try {
|
|
3425
|
-
let t = window.localStorage.getItem(
|
|
3929
|
+
let t = window.localStorage.getItem(Ei);
|
|
3426
3930
|
return t === null ? e : t === "1";
|
|
3427
3931
|
} catch {
|
|
3428
3932
|
return e;
|
|
3429
3933
|
}
|
|
3430
|
-
},
|
|
3934
|
+
}, Oi = (e) => {
|
|
3431
3935
|
if (!(typeof window > "u")) try {
|
|
3432
|
-
window.localStorage.setItem(
|
|
3936
|
+
window.localStorage.setItem(Ei, e ? "1" : "0");
|
|
3433
3937
|
} catch {}
|
|
3434
|
-
},
|
|
3435
|
-
let i =
|
|
3436
|
-
return /* @__PURE__ */
|
|
3938
|
+
}, ki = ({ initialIsOpen: e = !1, initialDock: t = "bottom", strings: n, inspectToken: r } = {}) => {
|
|
3939
|
+
let i = rn(r);
|
|
3940
|
+
return /* @__PURE__ */ N(tn, {
|
|
3437
3941
|
token: i,
|
|
3438
|
-
children: /* @__PURE__ */
|
|
3942
|
+
children: /* @__PURE__ */ N(Be, {
|
|
3439
3943
|
strings: n ?? {},
|
|
3440
|
-
children: /* @__PURE__ */
|
|
3944
|
+
children: /* @__PURE__ */ N(Li, {
|
|
3441
3945
|
initialIsOpen: e,
|
|
3442
3946
|
initialDock: t
|
|
3443
3947
|
})
|
|
3444
3948
|
})
|
|
3445
3949
|
});
|
|
3446
|
-
},
|
|
3950
|
+
}, Ai = (e) => e === "bottom" ? "padding-bottom" : e === "top" ? "padding-top" : e === "left" ? "padding-left" : "padding-right", ji = (e) => {
|
|
3447
3951
|
switch (e.dock) {
|
|
3448
3952
|
case "bottom":
|
|
3449
3953
|
case "top": return { height: e.sizes[e.dock] };
|
|
@@ -3456,50 +3960,52 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3456
3960
|
height: e.window.h
|
|
3457
3961
|
};
|
|
3458
3962
|
}
|
|
3459
|
-
},
|
|
3963
|
+
}, Mi = (e, t, n, r) => {
|
|
3460
3964
|
switch (e) {
|
|
3461
3965
|
case "bottom": return t - r;
|
|
3462
3966
|
case "top": return t + r;
|
|
3463
3967
|
case "left": return t + n;
|
|
3464
3968
|
case "right": return t - n;
|
|
3465
3969
|
}
|
|
3466
|
-
},
|
|
3970
|
+
}, Ni = (e) => {
|
|
3467
3971
|
console.error("[voltro devtools] the overlay hit an error and was contained:", e);
|
|
3468
|
-
},
|
|
3972
|
+
}, Pi = (e) => {
|
|
3469
3973
|
let t = document.body.style;
|
|
3470
3974
|
e !== null && t.setProperty("cursor", e), t.setProperty("user-select", "none"), t.setProperty("-webkit-user-select", "none");
|
|
3471
|
-
},
|
|
3975
|
+
}, Fi = () => {
|
|
3472
3976
|
let e = document.body.style;
|
|
3473
3977
|
e.removeProperty("cursor"), e.removeProperty("user-select"), e.removeProperty("-webkit-user-select");
|
|
3474
|
-
},
|
|
3475
|
-
let r =
|
|
3978
|
+
}, Ii = (e) => e instanceof Element && e.closest("button, input, a, [role=\"menu\"], [role=\"tablist\"], label") !== null, Li = ({ initialIsOpen: e, initialDock: t }) => {
|
|
3979
|
+
let r = H().shell, [a, o] = l(() => Di(e)), [u, d] = jt(t), [f, p] = l("all"), m = c(null), [h, g] = l(0), _ = Ti(), v = _.length > 0 ? _[_.length - 1] : null;
|
|
3476
3980
|
i(() => {
|
|
3477
|
-
|
|
3981
|
+
Oi(a);
|
|
3982
|
+
}, [a]), i(() => {
|
|
3983
|
+
a || Kt();
|
|
3478
3984
|
}, [a]);
|
|
3479
|
-
let { dock: y, push: b } = u, { setDock: x, setEdgeSize: S, setWindowRect: C, setPush: w } = d, T =
|
|
3480
|
-
a && !D &&
|
|
3481
|
-
let
|
|
3985
|
+
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);
|
|
3986
|
+
a && !D && O(!0);
|
|
3987
|
+
let k = D && !a, A = c(null);
|
|
3482
3988
|
i(() => {
|
|
3483
|
-
if (!
|
|
3484
|
-
let e =
|
|
3989
|
+
if (!k) return;
|
|
3990
|
+
let e = A.current?.getAnimations?.() ?? [];
|
|
3485
3991
|
if (e.length === 0) {
|
|
3486
|
-
|
|
3992
|
+
O(!1);
|
|
3487
3993
|
return;
|
|
3488
3994
|
}
|
|
3489
3995
|
let t = !1, n = () => {
|
|
3490
|
-
t ||
|
|
3996
|
+
t || O(!1);
|
|
3491
3997
|
};
|
|
3492
3998
|
return Promise.all(e.map((e) => e.finished)).then(n, n), () => {
|
|
3493
3999
|
t = !0;
|
|
3494
4000
|
};
|
|
3495
|
-
}, [
|
|
3496
|
-
let
|
|
4001
|
+
}, [k]);
|
|
4002
|
+
let ee = c(null), j = c(!1);
|
|
3497
4003
|
i(() => {
|
|
3498
4004
|
if (D) {
|
|
3499
|
-
|
|
4005
|
+
j.current = !0;
|
|
3500
4006
|
return;
|
|
3501
4007
|
}
|
|
3502
|
-
|
|
4008
|
+
j.current && ee.current?.focus();
|
|
3503
4009
|
}, [D]), i(() => {
|
|
3504
4010
|
if (typeof window > "u") return;
|
|
3505
4011
|
let e = (e, t, n) => e.code === t || e.key.toLowerCase() === n, t = (t) => {
|
|
@@ -3508,11 +4014,11 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3508
4014
|
return;
|
|
3509
4015
|
}
|
|
3510
4016
|
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);
|
|
4017
|
+
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
4018
|
return;
|
|
3513
4019
|
}
|
|
3514
4020
|
if (t.altKey && t.shiftKey) {
|
|
3515
|
-
let e =
|
|
4021
|
+
let e = Mt(t.key);
|
|
3516
4022
|
e !== null && (t.preventDefault(), o(!0), x(e));
|
|
3517
4023
|
}
|
|
3518
4024
|
};
|
|
@@ -3522,8 +4028,8 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3522
4028
|
let e = requestAnimationFrame(() => m.current?.focus());
|
|
3523
4029
|
return () => cancelAnimationFrame(e);
|
|
3524
4030
|
}, [a, h]), i(() => {
|
|
3525
|
-
if (typeof document > "u" || !D || !b || !
|
|
3526
|
-
let e = document.documentElement, t =
|
|
4031
|
+
if (typeof document > "u" || !D || !b || !dt(y)) return;
|
|
4032
|
+
let e = document.documentElement, t = Ai(y);
|
|
3527
4033
|
return e.style.setProperty(t, `${E.sizes[y]}px`), () => {
|
|
3528
4034
|
e.style.removeProperty(t);
|
|
3529
4035
|
};
|
|
@@ -3533,45 +4039,45 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3533
4039
|
y,
|
|
3534
4040
|
E.sizes
|
|
3535
4041
|
]);
|
|
3536
|
-
let
|
|
3537
|
-
if (!
|
|
4042
|
+
let M = n((e) => {
|
|
4043
|
+
if (!dt(y)) return;
|
|
3538
4044
|
e.preventDefault();
|
|
3539
4045
|
let t = y, n = {
|
|
3540
4046
|
x: e.clientX,
|
|
3541
4047
|
y: e.clientY,
|
|
3542
4048
|
size: E.sizes[t]
|
|
3543
4049
|
}, r = (e) => {
|
|
3544
|
-
S(t,
|
|
4050
|
+
S(t, St(t, Mi(t, n.size, e.clientX - n.x, e.clientY - n.y)));
|
|
3545
4051
|
}, i = () => {
|
|
3546
|
-
window.removeEventListener("pointermove", r), window.removeEventListener("pointerup", i), window.removeEventListener("pointercancel", i),
|
|
4052
|
+
window.removeEventListener("pointermove", r), window.removeEventListener("pointerup", i), window.removeEventListener("pointercancel", i), Fi();
|
|
3547
4053
|
};
|
|
3548
|
-
window.addEventListener("pointermove", r), window.addEventListener("pointerup", i), window.addEventListener("pointercancel", i),
|
|
4054
|
+
window.addEventListener("pointermove", r), window.addEventListener("pointerup", i), window.addEventListener("pointercancel", i), Pi(t === "left" || t === "right" ? "col-resize" : "row-resize");
|
|
3549
4055
|
}, [
|
|
3550
4056
|
y,
|
|
3551
4057
|
E.sizes,
|
|
3552
4058
|
S
|
|
3553
|
-
]),
|
|
3554
|
-
if (y !== "window" ||
|
|
4059
|
+
]), te = n((e) => {
|
|
4060
|
+
if (y !== "window" || Ii(e.target)) return;
|
|
3555
4061
|
e.preventDefault();
|
|
3556
4062
|
let t = {
|
|
3557
4063
|
x: e.clientX,
|
|
3558
4064
|
y: e.clientY,
|
|
3559
4065
|
rect: E.window
|
|
3560
4066
|
}, n = (e) => {
|
|
3561
|
-
C(
|
|
4067
|
+
C(Ct({
|
|
3562
4068
|
...t.rect,
|
|
3563
4069
|
x: t.rect.x + (e.clientX - t.x),
|
|
3564
4070
|
y: t.rect.y + (e.clientY - t.y)
|
|
3565
4071
|
}));
|
|
3566
4072
|
}, r = () => {
|
|
3567
|
-
window.removeEventListener("pointermove", n), window.removeEventListener("pointerup", r), window.removeEventListener("pointercancel", r),
|
|
4073
|
+
window.removeEventListener("pointermove", n), window.removeEventListener("pointerup", r), window.removeEventListener("pointercancel", r), Fi();
|
|
3568
4074
|
};
|
|
3569
|
-
window.addEventListener("pointermove", n), window.addEventListener("pointerup", r), window.addEventListener("pointercancel", r),
|
|
4075
|
+
window.addEventListener("pointermove", n), window.addEventListener("pointerup", r), window.addEventListener("pointercancel", r), Pi(null);
|
|
3570
4076
|
}, [
|
|
3571
4077
|
y,
|
|
3572
4078
|
E.window,
|
|
3573
4079
|
C
|
|
3574
|
-
]),
|
|
4080
|
+
]), ne = n((e) => {
|
|
3575
4081
|
if (y !== "window") return;
|
|
3576
4082
|
e.preventDefault();
|
|
3577
4083
|
let t = {
|
|
@@ -3579,75 +4085,75 @@ var Z = () => r(Et), Ot = (e, t) => {
|
|
|
3579
4085
|
y: e.clientY,
|
|
3580
4086
|
rect: E.window
|
|
3581
4087
|
}, n = (e) => {
|
|
3582
|
-
C(
|
|
4088
|
+
C(Ct({
|
|
3583
4089
|
...t.rect,
|
|
3584
4090
|
w: t.rect.w + (e.clientX - t.x),
|
|
3585
4091
|
h: t.rect.h + (e.clientY - t.y)
|
|
3586
4092
|
}));
|
|
3587
4093
|
}, r = () => {
|
|
3588
|
-
window.removeEventListener("pointermove", n), window.removeEventListener("pointerup", r), window.removeEventListener("pointercancel", r),
|
|
4094
|
+
window.removeEventListener("pointermove", n), window.removeEventListener("pointerup", r), window.removeEventListener("pointercancel", r), Fi();
|
|
3589
4095
|
};
|
|
3590
|
-
window.addEventListener("pointermove", n), window.addEventListener("pointerup", r), window.addEventListener("pointercancel", r),
|
|
4096
|
+
window.addEventListener("pointermove", n), window.addEventListener("pointerup", r), window.addEventListener("pointercancel", r), Pi("nwse-resize");
|
|
3591
4097
|
}, [
|
|
3592
4098
|
y,
|
|
3593
4099
|
E.window,
|
|
3594
4100
|
C
|
|
3595
|
-
]),
|
|
3596
|
-
return /* @__PURE__ */
|
|
4101
|
+
]), F = n(() => o(!1), []), I = n(() => o(!0), []);
|
|
4102
|
+
return /* @__PURE__ */ N(wi, { children: /* @__PURE__ */ N("div", {
|
|
3597
4103
|
className: "vdt-host",
|
|
3598
4104
|
"data-open": a ? "true" : "false",
|
|
3599
4105
|
"data-dock": y,
|
|
3600
4106
|
"data-push": b && D && y !== "window" ? "true" : "false",
|
|
3601
|
-
children: /* @__PURE__ */
|
|
4107
|
+
children: /* @__PURE__ */ N("div", {
|
|
3602
4108
|
className: "vdt-scope",
|
|
3603
|
-
children: D ? /* @__PURE__ */
|
|
3604
|
-
ref:
|
|
4109
|
+
children: D ? /* @__PURE__ */ P("section", {
|
|
4110
|
+
ref: A,
|
|
3605
4111
|
className: "vdt-console",
|
|
3606
4112
|
role: "dialog",
|
|
3607
4113
|
"aria-label": r.brand,
|
|
3608
4114
|
"data-dock": y,
|
|
3609
|
-
"data-closing":
|
|
3610
|
-
inert:
|
|
3611
|
-
style:
|
|
4115
|
+
"data-closing": k ? "true" : void 0,
|
|
4116
|
+
inert: k,
|
|
4117
|
+
style: ji(E),
|
|
3612
4118
|
children: [
|
|
3613
|
-
|
|
4119
|
+
dt(y) ? /* @__PURE__ */ N("div", {
|
|
3614
4120
|
className: "vdt-grip",
|
|
3615
4121
|
role: "separator",
|
|
3616
4122
|
"aria-label": r.resizeLabel,
|
|
3617
4123
|
"aria-orientation": y === "left" || y === "right" ? "vertical" : "horizontal",
|
|
3618
|
-
onPointerDown:
|
|
4124
|
+
onPointerDown: M
|
|
3619
4125
|
}) : null,
|
|
3620
|
-
/* @__PURE__ */
|
|
3621
|
-
onError:
|
|
3622
|
-
children: /* @__PURE__ */
|
|
4126
|
+
/* @__PURE__ */ N(yi, {
|
|
4127
|
+
onError: Ni,
|
|
4128
|
+
children: /* @__PURE__ */ N(_i, {
|
|
3623
4129
|
dock: y,
|
|
3624
4130
|
push: b,
|
|
3625
4131
|
onDock: x,
|
|
3626
4132
|
onPush: w,
|
|
3627
|
-
onClose:
|
|
4133
|
+
onClose: F,
|
|
3628
4134
|
scope: f,
|
|
3629
4135
|
onScope: p,
|
|
3630
4136
|
searchRef: m,
|
|
3631
|
-
onHeaderPointerDown: y === "window" ?
|
|
4137
|
+
onHeaderPointerDown: y === "window" ? te : void 0
|
|
3632
4138
|
})
|
|
3633
4139
|
}),
|
|
3634
|
-
y === "window" ? /* @__PURE__ */
|
|
4140
|
+
y === "window" ? /* @__PURE__ */ N("div", {
|
|
3635
4141
|
className: "vdt-win-resize",
|
|
3636
4142
|
role: "separator",
|
|
3637
4143
|
"aria-label": r.resizeLabel,
|
|
3638
|
-
onPointerDown:
|
|
4144
|
+
onPointerDown: ne
|
|
3639
4145
|
}) : null
|
|
3640
4146
|
]
|
|
3641
|
-
}) : /* @__PURE__ */
|
|
3642
|
-
onError:
|
|
3643
|
-
children: /* @__PURE__ */
|
|
4147
|
+
}) : /* @__PURE__ */ N(yi, {
|
|
4148
|
+
onError: Ni,
|
|
4149
|
+
children: /* @__PURE__ */ N(st, {
|
|
3644
4150
|
status: v,
|
|
3645
|
-
onOpen:
|
|
3646
|
-
buttonRef:
|
|
4151
|
+
onOpen: I,
|
|
4152
|
+
buttonRef: ee
|
|
3647
4153
|
})
|
|
3648
4154
|
})
|
|
3649
4155
|
})
|
|
3650
4156
|
}) });
|
|
3651
4157
|
};
|
|
3652
4158
|
//#endregion
|
|
3653
|
-
export {
|
|
4159
|
+
export { Be as DevtoolsStringsProvider, ki as VoltroDevtools, Le as defaultDevtoolsStrings, H as useDevtoolsStrings };
|