@concavejs/devtools 0.0.1-alpha.5 → 0.0.1-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client-B-Tg1Mm1.js +3008 -0
- package/dist/client.js +1 -1
- package/dist/index.js +301 -208
- package/dist/interceptor/websocket-interceptor.d.ts +1 -0
- package/dist/overlay/ActivityPanel.d.ts +9 -1
- package/dist/overlay/DevToolbar.d.ts +9 -1
- package/dist/overlay/utils.d.ts +14 -0
- package/dist/store/event-store.d.ts +24 -0
- package/dist/types.d.ts +33 -0
- package/dist/vite-plugin.js +279 -170
- package/package.json +5 -5
- package/dist/client-D6NyDOCN.js +0 -2781
|
@@ -0,0 +1,3008 @@
|
|
|
1
|
+
import { jsxs as n, jsx as t, Fragment as X } from "react/jsx-runtime";
|
|
2
|
+
import se from "react-dom";
|
|
3
|
+
import le, { useState as L, useMemo as it, useRef as ft, useEffect as U, useCallback as F } from "react";
|
|
4
|
+
let mt = null;
|
|
5
|
+
function Jt() {
|
|
6
|
+
if (mt !== null) return mt;
|
|
7
|
+
try {
|
|
8
|
+
const o = "__concave_test__";
|
|
9
|
+
localStorage.setItem(o, "1"), localStorage.removeItem(o), mt = !0;
|
|
10
|
+
} catch {
|
|
11
|
+
mt = !1;
|
|
12
|
+
}
|
|
13
|
+
return mt;
|
|
14
|
+
}
|
|
15
|
+
function jt(o) {
|
|
16
|
+
if (!Jt()) return null;
|
|
17
|
+
try {
|
|
18
|
+
return localStorage.getItem(o);
|
|
19
|
+
} catch {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function Rt(o, r) {
|
|
24
|
+
if (Jt())
|
|
25
|
+
try {
|
|
26
|
+
localStorage.setItem(o, r);
|
|
27
|
+
} catch {
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function Wt(o) {
|
|
31
|
+
if (Jt())
|
|
32
|
+
try {
|
|
33
|
+
localStorage.removeItem(o);
|
|
34
|
+
} catch {
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const de = "0.0.1-alpha.6", Gt = {
|
|
38
|
+
version: de
|
|
39
|
+
}, ne = Gt.version.length > 0 ? Gt.version : "0.0.0", ae = ne;
|
|
40
|
+
ne.split("-")[0];
|
|
41
|
+
const ce = "concave-devtools-events", pe = "concave-devtools-settings", Xt = 200;
|
|
42
|
+
class Mt {
|
|
43
|
+
events = [];
|
|
44
|
+
maxEvents;
|
|
45
|
+
listeners = /* @__PURE__ */ new Set();
|
|
46
|
+
focusListeners = /* @__PURE__ */ new Set();
|
|
47
|
+
settingsListeners = /* @__PURE__ */ new Set();
|
|
48
|
+
subscriptions = /* @__PURE__ */ new Map();
|
|
49
|
+
snapshots = [];
|
|
50
|
+
maxSnapshots = 50;
|
|
51
|
+
isPaused = !1;
|
|
52
|
+
focusedEventId = null;
|
|
53
|
+
storageKey;
|
|
54
|
+
settingsKey;
|
|
55
|
+
persistenceEnabled;
|
|
56
|
+
recentEventIds = /* @__PURE__ */ new Set();
|
|
57
|
+
persistTimer = null;
|
|
58
|
+
settings = {
|
|
59
|
+
persistEvents: !0,
|
|
60
|
+
maxEvents: 1e3,
|
|
61
|
+
captureLogLines: !0,
|
|
62
|
+
autoPauseOnError: !1,
|
|
63
|
+
wsLatencyMs: 0,
|
|
64
|
+
wsJitterMs: 0
|
|
65
|
+
};
|
|
66
|
+
static MIN_EVENTS = 100;
|
|
67
|
+
static MAX_EVENTS = 1e4;
|
|
68
|
+
constructor(r = 1e3, a = "global") {
|
|
69
|
+
const s = typeof r == "number" ? { maxEvents: r, storageScope: a } : r, l = (s.storageScope ?? "global").trim() || "global";
|
|
70
|
+
this.storageKey = `${ce}:${l}`, this.settingsKey = `${pe}:${l}`, this.persistenceEnabled = s.enablePersistence !== !1, this.maxEvents = s.maxEvents ?? 1e3, this.persistenceEnabled || (this.settings.persistEvents = !1), this.loadSettings(), this.persistenceEnabled || (this.settings.persistEvents = !1), this.loadPersistedEvents();
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Add an event to the store
|
|
74
|
+
*/
|
|
75
|
+
addEvent(r) {
|
|
76
|
+
if (!this.isPaused && !(r.type === "log" && !this.settings.captureLogLines) && !this.recentEventIds.has(r.id)) {
|
|
77
|
+
if (this.recentEventIds.add(r.id), this.recentEventIds.size > Xt) {
|
|
78
|
+
const a = this.recentEventIds.size - Xt, s = this.recentEventIds.values();
|
|
79
|
+
for (let l = 0; l < a; l++)
|
|
80
|
+
this.recentEventIds.delete(s.next().value);
|
|
81
|
+
}
|
|
82
|
+
if (this.reconcilePendingOperation(r), this.events.push(r), this.events.length > this.maxEvents + 100 && (this.events = this.events.slice(-this.maxEvents)), r.type === "subscription")
|
|
83
|
+
this.updateSubscription(r);
|
|
84
|
+
else if (r.type === "query" && r.status === "success") {
|
|
85
|
+
const a = this.subscriptions.get(r.queryId);
|
|
86
|
+
a && (a.previousValue = a.currentValue, a.updateCount++, a.lastUpdate = r.timestamp, a.currentValue = r.result, a.status = "active");
|
|
87
|
+
} else if (r.type === "query" && r.status === "error") {
|
|
88
|
+
const a = this.subscriptions.get(r.queryId);
|
|
89
|
+
a && (a.status = "error", a.error = r.error);
|
|
90
|
+
}
|
|
91
|
+
this.settings.autoPauseOnError && !this.isPaused && ("status" in r && r.status === "error" || r.type === "log" && r.level === "error") && (this.isPaused = !0), this.persistenceEnabled && this.settings.persistEvents && !this.persistTimer && (this.persistTimer = setTimeout(() => {
|
|
92
|
+
this.persistTimer = null, this.persistEvents();
|
|
93
|
+
}, 500)), this.listeners.forEach((a) => {
|
|
94
|
+
a(r);
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Subscribe to new events
|
|
100
|
+
*/
|
|
101
|
+
subscribe(r) {
|
|
102
|
+
return this.listeners.add(r), () => this.listeners.delete(r);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Subscribe to focus/navigation changes across panels
|
|
106
|
+
*/
|
|
107
|
+
subscribeFocus(r) {
|
|
108
|
+
return this.focusListeners.add(r), () => this.focusListeners.delete(r);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Subscribe to settings changes
|
|
112
|
+
*/
|
|
113
|
+
subscribeSettings(r) {
|
|
114
|
+
return this.settingsListeners.add(r), () => this.settingsListeners.delete(r);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Set the currently focused event (for cross-panel navigation)
|
|
118
|
+
*/
|
|
119
|
+
setFocusedEventId(r) {
|
|
120
|
+
this.focusedEventId = r, this.focusListeners.forEach((a) => {
|
|
121
|
+
a(r);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Get focused event id
|
|
126
|
+
*/
|
|
127
|
+
getFocusedEventId() {
|
|
128
|
+
return this.focusedEventId;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Get all events
|
|
132
|
+
*/
|
|
133
|
+
getAllEvents() {
|
|
134
|
+
return [...this.events];
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Get events by type
|
|
138
|
+
*/
|
|
139
|
+
getEventsByType(r) {
|
|
140
|
+
return this.events.filter((a) => a.type === r);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Get recent events
|
|
144
|
+
*/
|
|
145
|
+
getRecentEvents(r) {
|
|
146
|
+
return this.events.slice(-r);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Get events for a specific function
|
|
150
|
+
*/
|
|
151
|
+
getEventsByFunction(r) {
|
|
152
|
+
return this.events.filter((a) => "udfPath" in a ? a.udfPath === r : !1);
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Get active subscriptions
|
|
156
|
+
*/
|
|
157
|
+
getActiveSubscriptions() {
|
|
158
|
+
return Array.from(this.subscriptions.values()).filter((r) => r.status === "active" || r.status === "error");
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Get subscription by query ID
|
|
162
|
+
*/
|
|
163
|
+
getSubscription(r) {
|
|
164
|
+
return this.subscriptions.get(r);
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Calculate performance metrics
|
|
168
|
+
*/
|
|
169
|
+
getPerformanceMetrics() {
|
|
170
|
+
const r = (x) => {
|
|
171
|
+
const f = typeof x == "number" ? x : typeof x == "string" ? Number(x) : Number.NaN;
|
|
172
|
+
return !Number.isFinite(f) || f < 0 ? null : f;
|
|
173
|
+
}, a = (x) => {
|
|
174
|
+
const f = [];
|
|
175
|
+
for (const m of x) {
|
|
176
|
+
if (m.status !== "success") continue;
|
|
177
|
+
const g = r(m.endToEndDurationMs ?? m.duration);
|
|
178
|
+
g !== null && f.push({ event: m, duration: g });
|
|
179
|
+
}
|
|
180
|
+
return f;
|
|
181
|
+
}, s = a(this.getEventsByType("query")), l = a(this.getEventsByType("mutation")), u = a(this.getEventsByType("action")), c = (x) => x.length === 0 ? 0 : x.reduce((m, g) => m + g, 0) / x.length, b = (x, f) => {
|
|
182
|
+
if (x.length === 0) return 0;
|
|
183
|
+
const m = [...x].sort(($, I) => $ - I), g = Math.floor(m.length * f);
|
|
184
|
+
return m[Math.min(g, m.length - 1)] || 0;
|
|
185
|
+
}, N = [
|
|
186
|
+
...s.map(({ event: x, duration: f }) => ({
|
|
187
|
+
type: "query",
|
|
188
|
+
eventId: x.id,
|
|
189
|
+
udfPath: x.udfPath,
|
|
190
|
+
duration: f,
|
|
191
|
+
timestamp: x.timestamp
|
|
192
|
+
})),
|
|
193
|
+
...l.map(({ event: x, duration: f }) => ({
|
|
194
|
+
type: "mutation",
|
|
195
|
+
eventId: x.id,
|
|
196
|
+
udfPath: x.udfPath,
|
|
197
|
+
duration: f,
|
|
198
|
+
timestamp: x.timestamp
|
|
199
|
+
})),
|
|
200
|
+
...u.map(({ event: x, duration: f }) => ({
|
|
201
|
+
type: "action",
|
|
202
|
+
eventId: x.id,
|
|
203
|
+
udfPath: x.udfPath,
|
|
204
|
+
duration: f,
|
|
205
|
+
timestamp: x.timestamp
|
|
206
|
+
}))
|
|
207
|
+
].sort((x, f) => f.duration - x.duration).slice(0, 10), y = s.map(({ duration: x }) => x), D = l.map(({ duration: x }) => x), h = u.map(({ duration: x }) => x);
|
|
208
|
+
return {
|
|
209
|
+
totalQueries: s.length,
|
|
210
|
+
totalMutations: l.length,
|
|
211
|
+
totalActions: u.length,
|
|
212
|
+
avgQueryDuration: c(y),
|
|
213
|
+
avgMutationDuration: c(D),
|
|
214
|
+
avgActionDuration: c(h),
|
|
215
|
+
p50QueryDuration: b(y, 0.5),
|
|
216
|
+
p50MutationDuration: b(D, 0.5),
|
|
217
|
+
p50ActionDuration: b(h, 0.5),
|
|
218
|
+
p90QueryDuration: b(y, 0.9),
|
|
219
|
+
p90MutationDuration: b(D, 0.9),
|
|
220
|
+
p90ActionDuration: b(h, 0.9),
|
|
221
|
+
p95QueryDuration: b(y, 0.95),
|
|
222
|
+
p95MutationDuration: b(D, 0.95),
|
|
223
|
+
p95ActionDuration: b(h, 0.95),
|
|
224
|
+
p99QueryDuration: b(y, 0.99),
|
|
225
|
+
p99MutationDuration: b(D, 0.99),
|
|
226
|
+
p99ActionDuration: b(h, 0.99),
|
|
227
|
+
slowestOperations: N
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Clear all events
|
|
232
|
+
*/
|
|
233
|
+
clear() {
|
|
234
|
+
this.events = [], this.subscriptions.clear(), this.snapshots = [], this.setFocusedEventId(null), this.recentEventIds.clear(), Wt(this.storageKey), this.listeners.forEach((r) => {
|
|
235
|
+
r({
|
|
236
|
+
id: "clear",
|
|
237
|
+
timestamp: Date.now(),
|
|
238
|
+
type: "log",
|
|
239
|
+
level: "info",
|
|
240
|
+
message: "DevTools cleared"
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Pause event capture
|
|
246
|
+
*/
|
|
247
|
+
pause() {
|
|
248
|
+
this.isPaused = !0;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Resume event capture
|
|
252
|
+
*/
|
|
253
|
+
resume() {
|
|
254
|
+
this.isPaused = !1;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Check if paused
|
|
258
|
+
*/
|
|
259
|
+
isPausedState() {
|
|
260
|
+
return this.isPaused;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Create a snapshot of current state (for time-travel)
|
|
264
|
+
*/
|
|
265
|
+
createSnapshot() {
|
|
266
|
+
const r = {
|
|
267
|
+
timestamp: Date.now(),
|
|
268
|
+
events: [...this.events],
|
|
269
|
+
subscriptions: Array.from(this.subscriptions.entries())
|
|
270
|
+
};
|
|
271
|
+
this.snapshots.push(r), this.snapshots.length > this.maxSnapshots && this.snapshots.shift();
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Restore from a snapshot
|
|
275
|
+
*/
|
|
276
|
+
restoreSnapshot(r) {
|
|
277
|
+
const a = this.snapshots.find((s) => s.timestamp === r);
|
|
278
|
+
return a ? (this.events = [...a.events], this.subscriptions = new Map(a.subscriptions), this.setFocusedEventId(null), this.listeners.forEach((s) => {
|
|
279
|
+
s({
|
|
280
|
+
id: "restore",
|
|
281
|
+
timestamp: Date.now(),
|
|
282
|
+
type: "log",
|
|
283
|
+
level: "info",
|
|
284
|
+
message: `Restored to snapshot from ${new Date(r).toLocaleTimeString()}`
|
|
285
|
+
});
|
|
286
|
+
}), !0) : !1;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Get all snapshots
|
|
290
|
+
*/
|
|
291
|
+
getSnapshots() {
|
|
292
|
+
return [...this.snapshots];
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Export session data
|
|
296
|
+
*/
|
|
297
|
+
exportSession() {
|
|
298
|
+
return {
|
|
299
|
+
version: ae,
|
|
300
|
+
exportedAt: Date.now(),
|
|
301
|
+
events: [...this.events],
|
|
302
|
+
subscriptions: Array.from(this.subscriptions.entries()),
|
|
303
|
+
metadata: {
|
|
304
|
+
userAgent: navigator.userAgent,
|
|
305
|
+
url: window.location.href
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Import session data
|
|
311
|
+
*/
|
|
312
|
+
importSession(r) {
|
|
313
|
+
try {
|
|
314
|
+
if (!r || typeof r != "object" || !r.version || !r.events)
|
|
315
|
+
throw new Error("Invalid session format");
|
|
316
|
+
if (this.events = [], this.subscriptions.clear(), this.setFocusedEventId(null), this.events = this.sanitizeEvents(r.events).slice(-this.maxEvents), Array.isArray(r.subscriptions)) {
|
|
317
|
+
const a = r.subscriptions.filter(
|
|
318
|
+
(s) => Array.isArray(s) && s.length === 2 && typeof s[0] == "number" && Number.isFinite(s[0]) && typeof s[1] == "object" && s[1] !== null
|
|
319
|
+
);
|
|
320
|
+
this.subscriptions = new Map(a);
|
|
321
|
+
}
|
|
322
|
+
return this.listeners.forEach((a) => {
|
|
323
|
+
a({
|
|
324
|
+
id: "import",
|
|
325
|
+
timestamp: Date.now(),
|
|
326
|
+
type: "log",
|
|
327
|
+
level: "info",
|
|
328
|
+
message: `Imported ${this.events.length} events`
|
|
329
|
+
});
|
|
330
|
+
}), !0;
|
|
331
|
+
} catch (a) {
|
|
332
|
+
return console.error("[DevTools] Failed to import session:", a), !1;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Save settings
|
|
337
|
+
*/
|
|
338
|
+
saveSettings(r) {
|
|
339
|
+
this.settings = { ...this.settings, ...r }, this.persistenceEnabled || (this.settings.persistEvents = !1);
|
|
340
|
+
const a = this.normalizeMaxEvents(this.settings.maxEvents);
|
|
341
|
+
this.settings.maxEvents !== a && (this.settings.maxEvents = a), a !== this.maxEvents && (this.maxEvents = a), this.events.length > this.maxEvents && (this.events = this.events.slice(-this.maxEvents)), this.syncLatencyConfig(), this.persistenceEnabled && Rt(this.settingsKey, JSON.stringify(this.settings)), this.notifySettingsChanged();
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Get settings
|
|
345
|
+
*/
|
|
346
|
+
getSettings() {
|
|
347
|
+
return { ...this.settings };
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Whether this store supports local persistence
|
|
351
|
+
*/
|
|
352
|
+
isPersistenceEnabled() {
|
|
353
|
+
return this.persistenceEnabled;
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Load settings from localStorage
|
|
357
|
+
*/
|
|
358
|
+
loadSettings() {
|
|
359
|
+
if (this.persistenceEnabled) {
|
|
360
|
+
try {
|
|
361
|
+
const r = jt(this.settingsKey);
|
|
362
|
+
r && (this.settings = { ...this.settings, ...JSON.parse(r) }, this.maxEvents = this.normalizeMaxEvents(this.settings.maxEvents), this.settings.maxEvents = this.maxEvents);
|
|
363
|
+
} catch (r) {
|
|
364
|
+
console.warn("[DevTools] Failed to load settings:", r);
|
|
365
|
+
}
|
|
366
|
+
this.syncLatencyConfig();
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Push latency settings to the shared window config object
|
|
371
|
+
* that the WebSocket interceptors read on every send/receive.
|
|
372
|
+
*/
|
|
373
|
+
syncLatencyConfig() {
|
|
374
|
+
try {
|
|
375
|
+
window.__concaveDevToolsLatencyConfig = {
|
|
376
|
+
latencyMs: this.settings.wsLatencyMs || 0,
|
|
377
|
+
jitterMs: this.settings.wsJitterMs || 0
|
|
378
|
+
};
|
|
379
|
+
} catch {
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
notifySettingsChanged() {
|
|
383
|
+
const r = this.getSettings();
|
|
384
|
+
this.settingsListeners.forEach((a) => {
|
|
385
|
+
a(r);
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Persist events to localStorage
|
|
390
|
+
*/
|
|
391
|
+
persistEvents() {
|
|
392
|
+
if (!(!this.persistenceEnabled || !this.settings.persistEvents))
|
|
393
|
+
try {
|
|
394
|
+
const r = this.events.slice(-100);
|
|
395
|
+
Rt(this.storageKey, JSON.stringify(r));
|
|
396
|
+
} catch (r) {
|
|
397
|
+
console.warn("[DevTools] Failed to persist events:", r);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* Load persisted events from localStorage
|
|
402
|
+
*/
|
|
403
|
+
loadPersistedEvents() {
|
|
404
|
+
if (!(!this.persistenceEnabled || !this.settings.persistEvents))
|
|
405
|
+
try {
|
|
406
|
+
const r = jt(this.storageKey);
|
|
407
|
+
if (r) {
|
|
408
|
+
const a = this.sanitizeEvents(JSON.parse(r));
|
|
409
|
+
this.events = a.slice(-this.maxEvents);
|
|
410
|
+
}
|
|
411
|
+
} catch (r) {
|
|
412
|
+
console.warn("[DevTools] Failed to load persisted events:", r), Wt(this.storageKey);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Update subscription tracking
|
|
417
|
+
*/
|
|
418
|
+
updateSubscription(r) {
|
|
419
|
+
r.status === "added" ? this.subscriptions.set(r.queryId, {
|
|
420
|
+
queryId: r.queryId,
|
|
421
|
+
udfPath: r.udfPath,
|
|
422
|
+
args: r.args,
|
|
423
|
+
componentPath: r.componentPath,
|
|
424
|
+
addedAt: r.timestamp,
|
|
425
|
+
updateCount: 0,
|
|
426
|
+
lastUpdate: r.timestamp,
|
|
427
|
+
status: "active"
|
|
428
|
+
}) : r.status === "removed" && this.subscriptions.delete(r.queryId);
|
|
429
|
+
}
|
|
430
|
+
sanitizeEvents(r) {
|
|
431
|
+
return Array.isArray(r) ? r.filter((a) => this.isEventLike(a)) : [];
|
|
432
|
+
}
|
|
433
|
+
isEventLike(r) {
|
|
434
|
+
if (!r || typeof r != "object") return !1;
|
|
435
|
+
const a = r;
|
|
436
|
+
return !(typeof a.id != "string" || typeof a.type != "string" || typeof a.timestamp != "number" || !Number.isFinite(a.timestamp));
|
|
437
|
+
}
|
|
438
|
+
normalizeMaxEvents(r) {
|
|
439
|
+
const a = typeof r == "number" ? r : Number(r);
|
|
440
|
+
if (!Number.isFinite(a))
|
|
441
|
+
return 1e3;
|
|
442
|
+
const s = Math.round(a);
|
|
443
|
+
return Math.min(Mt.MAX_EVENTS, Math.max(Mt.MIN_EVENTS, s));
|
|
444
|
+
}
|
|
445
|
+
isOperationEvent(r) {
|
|
446
|
+
return r.type === "query" || r.type === "mutation" || r.type === "action";
|
|
447
|
+
}
|
|
448
|
+
isTerminalOperationEvent(r) {
|
|
449
|
+
return this.isOperationEvent(r) && (r.status === "success" || r.status === "error");
|
|
450
|
+
}
|
|
451
|
+
isMatchingPendingOperation(r, a) {
|
|
452
|
+
return !this.isOperationEvent(r) || r.type !== a.type || r.status !== "pending" ? !1 : a.type === "query" ? r.type === "query" && r.queryId === a.queryId : r.type !== "query" && r.requestId === a.requestId;
|
|
453
|
+
}
|
|
454
|
+
reconcilePendingOperation(r) {
|
|
455
|
+
this.isTerminalOperationEvent(r) && this.events.length !== 0 && (this.events = this.events.filter((a) => !this.isMatchingPendingOperation(a, r)));
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
let Tt = null;
|
|
459
|
+
function ue() {
|
|
460
|
+
return Tt || (Tt = new Mt()), Tt;
|
|
461
|
+
}
|
|
462
|
+
const xe = "#f97316", he = 6, be = "M16 6 Q 9.2 13.3 8 22 Q 16 19 24 22 Q 22.8 13.3 16 6 Z";
|
|
463
|
+
function P(o) {
|
|
464
|
+
const r = document.featurePolicy ?? document.permissionsPolicy;
|
|
465
|
+
(r ? r.allowsFeature("clipboard-write") : !0) && navigator.clipboard?.writeText ? navigator.clipboard.writeText(o).then(zt, () => {
|
|
466
|
+
Yt(o), zt();
|
|
467
|
+
}) : (Yt(o), zt());
|
|
468
|
+
}
|
|
469
|
+
function zt() {
|
|
470
|
+
const o = document.createElement("div");
|
|
471
|
+
o.textContent = "Copied!", o.style.cssText = "position:fixed;bottom:16px;left:50%;transform:translateX(-50%);z-index:99999999;padding:4px 12px;border-radius:6px;font:500 11px/1.4 system-ui,sans-serif;color:#e4e4e7;background:rgba(39,39,42,0.95);border:1px solid rgba(63,63,70,0.6);box-shadow:0 4px 12px rgba(0,0,0,0.4);pointer-events:none;animation:dt-fade-in 0.15s ease-out;opacity:1;transition:opacity 0.2s;", document.body.appendChild(o), setTimeout(() => {
|
|
472
|
+
o.style.opacity = "0";
|
|
473
|
+
}, 600), setTimeout(() => {
|
|
474
|
+
o.remove();
|
|
475
|
+
}, 800);
|
|
476
|
+
}
|
|
477
|
+
function Yt(o) {
|
|
478
|
+
const r = document.createElement("textarea");
|
|
479
|
+
r.value = o, r.style.cssText = "position:fixed;opacity:0;pointer-events:none;", document.body.appendChild(r), r.select();
|
|
480
|
+
try {
|
|
481
|
+
document.execCommand("copy");
|
|
482
|
+
} catch {
|
|
483
|
+
}
|
|
484
|
+
document.body.removeChild(r);
|
|
485
|
+
}
|
|
486
|
+
function $t() {
|
|
487
|
+
const o = document.getElementById("concave-devtools-host");
|
|
488
|
+
return o ? document.activeElement === o || o.contains(document.activeElement) : !1;
|
|
489
|
+
}
|
|
490
|
+
function ie() {
|
|
491
|
+
return document.getElementById("concave-devtools-host")?.shadowRoot?.activeElement ?? null;
|
|
492
|
+
}
|
|
493
|
+
function lt(o) {
|
|
494
|
+
return Array.isArray(o) && o.length === 1 ? o[0] : o;
|
|
495
|
+
}
|
|
496
|
+
const me = {
|
|
497
|
+
maxStringLength: 40,
|
|
498
|
+
stringTailLength: 10,
|
|
499
|
+
maxArrayItems: 2,
|
|
500
|
+
maxObjectEntries: 2,
|
|
501
|
+
maxDepth: 2
|
|
502
|
+
};
|
|
503
|
+
function ge(o, r, a) {
|
|
504
|
+
if (o.length <= r)
|
|
505
|
+
return o;
|
|
506
|
+
const s = Math.max(12, r), l = Math.max(
|
|
507
|
+
4,
|
|
508
|
+
Math.min(a, Math.floor(s / 2))
|
|
509
|
+
), u = Math.max(6, s - l - 1);
|
|
510
|
+
return `${o.slice(0, u)}…${o.slice(-l)}`;
|
|
511
|
+
}
|
|
512
|
+
function wt(o, r = {}, a = 0) {
|
|
513
|
+
const s = {
|
|
514
|
+
...me,
|
|
515
|
+
...r
|
|
516
|
+
};
|
|
517
|
+
if (o === null) return "null";
|
|
518
|
+
if (o === void 0) return "undefined";
|
|
519
|
+
if (typeof o == "string")
|
|
520
|
+
return `"${ge(
|
|
521
|
+
o,
|
|
522
|
+
s.maxStringLength,
|
|
523
|
+
s.stringTailLength
|
|
524
|
+
)}"`;
|
|
525
|
+
if (typeof o == "number" || typeof o == "boolean")
|
|
526
|
+
return String(o);
|
|
527
|
+
if (Array.isArray(o)) {
|
|
528
|
+
if (o.length === 0) return "[]";
|
|
529
|
+
if (a >= s.maxDepth) return "[…]";
|
|
530
|
+
const l = o.slice(0, s.maxArrayItems).map((c) => wt(c, s, a + 1)), u = o.length > s.maxArrayItems ? ", …" : "";
|
|
531
|
+
return `[${l.join(", ")}${u}]`;
|
|
532
|
+
}
|
|
533
|
+
if (typeof o == "object") {
|
|
534
|
+
const l = Object.entries(o);
|
|
535
|
+
if (l.length === 0) return "{}";
|
|
536
|
+
if (a >= s.maxDepth) return "{…}";
|
|
537
|
+
const u = l.slice(0, s.maxObjectEntries).map(([b, N]) => `${b}: ${wt(N, s, a + 1)}`), c = l.length > s.maxObjectEntries ? ", …" : "";
|
|
538
|
+
return `{${u.join(", ")}${c}}`;
|
|
539
|
+
}
|
|
540
|
+
return String(o);
|
|
541
|
+
}
|
|
542
|
+
function tt(o, r = 180) {
|
|
543
|
+
try {
|
|
544
|
+
const a = JSON.stringify(o, null, 2);
|
|
545
|
+
return a ? a.length <= r ? a : `${a.slice(0, r - 1)}…` : "";
|
|
546
|
+
} catch {
|
|
547
|
+
return String(o);
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
function gt({
|
|
551
|
+
data: o,
|
|
552
|
+
label: r,
|
|
553
|
+
onCopy: a,
|
|
554
|
+
maxHeight: s = 300
|
|
555
|
+
}) {
|
|
556
|
+
const [l, u] = L(!0), [c, b] = L("tree"), [N, y] = L(""), D = () => {
|
|
557
|
+
P(JSON.stringify(o, null, 2)), a?.();
|
|
558
|
+
}, h = it(() => JSON.stringify(o, null, 2), [o]), x = it(() => {
|
|
559
|
+
if (!N) return null;
|
|
560
|
+
const m = /* @__PURE__ */ new Set(), g = N.toLowerCase();
|
|
561
|
+
function $(I, T) {
|
|
562
|
+
if (I === null) {
|
|
563
|
+
"null".includes(g) && m.add(T);
|
|
564
|
+
return;
|
|
565
|
+
}
|
|
566
|
+
if (typeof I == "string" || typeof I == "number" || typeof I == "boolean") {
|
|
567
|
+
String(I).toLowerCase().includes(g) && m.add(T);
|
|
568
|
+
return;
|
|
569
|
+
}
|
|
570
|
+
if (Array.isArray(I)) {
|
|
571
|
+
for (let E = 0; E < I.length; E++) {
|
|
572
|
+
const z = `${T}[${E}]`;
|
|
573
|
+
$(I[E], z);
|
|
574
|
+
}
|
|
575
|
+
return;
|
|
576
|
+
}
|
|
577
|
+
if (typeof I == "object")
|
|
578
|
+
for (const [E, z] of Object.entries(I)) {
|
|
579
|
+
const O = `${T}.${E}`;
|
|
580
|
+
E.toLowerCase().includes(g) && m.add(O), $(z, O);
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
return $(o, "$"), m;
|
|
584
|
+
}, [o, N]), f = x?.size ?? 0;
|
|
585
|
+
return /* @__PURE__ */ n("div", { className: "flex flex-col gap-1 text-[12px]", role: "region", "aria-label": r || "Data Inspector", children: [
|
|
586
|
+
r && /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
|
|
587
|
+
/* @__PURE__ */ n(
|
|
588
|
+
"button",
|
|
589
|
+
{
|
|
590
|
+
className: "flex items-center gap-1 bg-transparent border-none text-dt-text-tertiary cursor-pointer text-[11px] font-semibold uppercase tracking-wider p-0 hover:text-dt-text-secondary transition-colors",
|
|
591
|
+
onClick: () => u(!l),
|
|
592
|
+
"aria-expanded": l,
|
|
593
|
+
"aria-controls": `inspector-content-${r}`,
|
|
594
|
+
"aria-label": `${l ? "Collapse" : "Expand"} ${r}`,
|
|
595
|
+
children: [
|
|
596
|
+
/* @__PURE__ */ t("span", { className: `text-[10px] transition-transform ${l ? "rotate-90" : ""}`, "aria-hidden": "true", children: "▶" }),
|
|
597
|
+
/* @__PURE__ */ t("span", { children: r })
|
|
598
|
+
]
|
|
599
|
+
}
|
|
600
|
+
),
|
|
601
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-0.5", role: "toolbar", "aria-label": "Inspector actions", children: [
|
|
602
|
+
/* @__PURE__ */ t(
|
|
603
|
+
"button",
|
|
604
|
+
{
|
|
605
|
+
className: `px-1.5 py-0.5 text-[10px] bg-transparent border border-transparent rounded cursor-pointer transition-all ${c === "tree" ? "bg-white/10 text-dt-text-secondary border-dt-border-light" : "text-dt-text-muted hover:text-dt-text-tertiary"}`,
|
|
606
|
+
onClick: () => b("tree"),
|
|
607
|
+
title: "Tree view",
|
|
608
|
+
"aria-label": "Tree view",
|
|
609
|
+
"aria-pressed": c === "tree",
|
|
610
|
+
children: "Tree"
|
|
611
|
+
}
|
|
612
|
+
),
|
|
613
|
+
/* @__PURE__ */ t(
|
|
614
|
+
"button",
|
|
615
|
+
{
|
|
616
|
+
className: `px-1.5 py-0.5 text-[10px] bg-transparent border border-transparent rounded cursor-pointer transition-all ${c === "raw" ? "bg-white/10 text-dt-text-secondary border-dt-border-light" : "text-dt-text-muted hover:text-dt-text-tertiary"}`,
|
|
617
|
+
onClick: () => b("raw"),
|
|
618
|
+
title: "Raw JSON",
|
|
619
|
+
"aria-label": "Raw JSON view",
|
|
620
|
+
"aria-pressed": c === "raw",
|
|
621
|
+
children: "Raw"
|
|
622
|
+
}
|
|
623
|
+
),
|
|
624
|
+
/* @__PURE__ */ t(
|
|
625
|
+
"button",
|
|
626
|
+
{
|
|
627
|
+
className: "p-0.5 bg-transparent border-none text-dt-text-muted cursor-pointer rounded hover:text-dt-text-tertiary transition-colors text-[12px]",
|
|
628
|
+
onClick: D,
|
|
629
|
+
title: "Copy JSON",
|
|
630
|
+
"aria-label": "Copy JSON to clipboard",
|
|
631
|
+
children: /* @__PURE__ */ n("svg", { width: "12", height: "12", viewBox: "0 0 16 16", fill: "currentColor", children: [
|
|
632
|
+
/* @__PURE__ */ t("path", { d: "M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" }),
|
|
633
|
+
/* @__PURE__ */ t("path", { d: "M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" })
|
|
634
|
+
] })
|
|
635
|
+
}
|
|
636
|
+
)
|
|
637
|
+
] })
|
|
638
|
+
] }),
|
|
639
|
+
l && /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
|
|
640
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-1.5 px-2 py-1 bg-zinc-950/50 rounded-t border border-b-0 border-dt-border-light", children: [
|
|
641
|
+
/* @__PURE__ */ t(
|
|
642
|
+
"input",
|
|
643
|
+
{
|
|
644
|
+
type: "text",
|
|
645
|
+
className: "flex-1 bg-transparent border-none text-[10px] font-mono text-dt-text-secondary placeholder-dt-text-muted/40 outline-none",
|
|
646
|
+
placeholder: "Filter...",
|
|
647
|
+
value: N,
|
|
648
|
+
onChange: (m) => y(m.target.value)
|
|
649
|
+
}
|
|
650
|
+
),
|
|
651
|
+
N && /* @__PURE__ */ n(X, { children: [
|
|
652
|
+
/* @__PURE__ */ n("span", { className: "text-[9px] text-dt-text-muted/60 font-mono", children: [
|
|
653
|
+
f,
|
|
654
|
+
" match",
|
|
655
|
+
f !== 1 ? "es" : ""
|
|
656
|
+
] }),
|
|
657
|
+
/* @__PURE__ */ t(
|
|
658
|
+
"button",
|
|
659
|
+
{
|
|
660
|
+
className: "bg-transparent border-none text-dt-text-muted cursor-pointer text-[10px] p-0 hover:text-dt-text-secondary",
|
|
661
|
+
onClick: () => y(""),
|
|
662
|
+
"aria-label": "Clear search",
|
|
663
|
+
children: "×"
|
|
664
|
+
}
|
|
665
|
+
)
|
|
666
|
+
] })
|
|
667
|
+
] }),
|
|
668
|
+
/* @__PURE__ */ t(
|
|
669
|
+
"div",
|
|
670
|
+
{
|
|
671
|
+
className: "overflow-auto bg-zinc-950/50 rounded-b border border-dt-border-light p-2 font-mono text-[11px]",
|
|
672
|
+
id: r ? `inspector-content-${r}` : void 0,
|
|
673
|
+
style: { maxHeight: s },
|
|
674
|
+
role: "region",
|
|
675
|
+
"aria-label": `${r || "Data"} content`,
|
|
676
|
+
children: c === "tree" ? /* @__PURE__ */ t(Ft, { data: o, matchingPaths: x, searchTerm: N }) : /* @__PURE__ */ t("pre", { className: "text-dt-text-muted whitespace-pre-wrap break-all m-0", "aria-readonly": "true", children: N ? /* @__PURE__ */ t(fe, { text: h, term: N }) : h })
|
|
677
|
+
}
|
|
678
|
+
)
|
|
679
|
+
] })
|
|
680
|
+
] });
|
|
681
|
+
}
|
|
682
|
+
function fe({ text: o, term: r }) {
|
|
683
|
+
if (!r) return /* @__PURE__ */ t(X, { children: o });
|
|
684
|
+
const a = [], s = o.toLowerCase(), l = r.toLowerCase();
|
|
685
|
+
let u = 0, c = s.indexOf(l, u), b = 0;
|
|
686
|
+
for (; c !== -1; )
|
|
687
|
+
c > u && a.push(o.slice(u, c)), a.push(
|
|
688
|
+
/* @__PURE__ */ t("mark", { className: "bg-yellow-400/30 text-yellow-200 rounded-sm px-px", children: o.slice(c, c + r.length) }, b++)
|
|
689
|
+
), u = c + r.length, c = s.indexOf(l, u);
|
|
690
|
+
return u < o.length && a.push(o.slice(u)), /* @__PURE__ */ t(X, { children: a });
|
|
691
|
+
}
|
|
692
|
+
function Ft({ data: o, depth: r = 0, path: a = "$", matchingPaths: s, searchTerm: l }) {
|
|
693
|
+
const u = s ? qt(a, s) : !1, [c, b] = L(r < 2), N = s?.has(a) ?? !1, y = c || !!s && u;
|
|
694
|
+
if (o === null)
|
|
695
|
+
return /* @__PURE__ */ t("span", { className: `italic ${N ? "bg-yellow-400/25 rounded-sm px-0.5 text-yellow-200" : "text-dt-text-muted"}`, children: "null" });
|
|
696
|
+
if (typeof o == "string")
|
|
697
|
+
return /* @__PURE__ */ n("span", { className: N ? "bg-yellow-400/25 rounded-sm px-0.5 text-yellow-200" : "text-dt-success", children: [
|
|
698
|
+
'"',
|
|
699
|
+
l ? /* @__PURE__ */ t(Zt, { text: o, term: l }) : o,
|
|
700
|
+
'"'
|
|
701
|
+
] });
|
|
702
|
+
if (typeof o == "number")
|
|
703
|
+
return /* @__PURE__ */ t("span", { className: N ? "bg-yellow-400/25 rounded-sm px-0.5 text-yellow-200" : "text-dt-query", children: o });
|
|
704
|
+
if (typeof o == "boolean")
|
|
705
|
+
return /* @__PURE__ */ t("span", { className: N ? "bg-yellow-400/25 rounded-sm px-0.5 text-yellow-200" : "text-dt-mutation", children: o.toString() });
|
|
706
|
+
if (Array.isArray(o))
|
|
707
|
+
return o.length === 0 ? /* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "[]" }) : /* @__PURE__ */ n("div", { className: "inline", children: [
|
|
708
|
+
/* @__PURE__ */ n(
|
|
709
|
+
"button",
|
|
710
|
+
{
|
|
711
|
+
type: "button",
|
|
712
|
+
className: "bg-transparent border-none cursor-pointer p-0 text-inherit font-inherit inline-flex items-center gap-0.5",
|
|
713
|
+
onClick: () => b(!y),
|
|
714
|
+
"aria-expanded": y,
|
|
715
|
+
"aria-label": `${y ? "Collapse" : "Expand"} array with ${o.length} items`,
|
|
716
|
+
children: [
|
|
717
|
+
/* @__PURE__ */ t("span", { className: `text-[10px] transition-transform inline-block ${y ? "rotate-90" : ""}`, "aria-hidden": "true", children: "▶" }),
|
|
718
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "[" }),
|
|
719
|
+
!y && /* @__PURE__ */ n("span", { className: "text-dt-text-muted/60 italic text-[10px]", children: [
|
|
720
|
+
o.length,
|
|
721
|
+
" items..."
|
|
722
|
+
] }),
|
|
723
|
+
!y && /* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "]" })
|
|
724
|
+
]
|
|
725
|
+
}
|
|
726
|
+
),
|
|
727
|
+
y && /* @__PURE__ */ n(X, { children: [
|
|
728
|
+
/* @__PURE__ */ t("div", { className: "pl-4 border-l border-dt-border-light/30 ml-1", children: o.map((D, h) => {
|
|
729
|
+
const x = `${a}[${h}]`;
|
|
730
|
+
return s && !qt(x, s) && !s.has(x) ? null : /* @__PURE__ */ n("div", { className: "py-px", children: [
|
|
731
|
+
/* @__PURE__ */ n("span", { className: "text-dt-text-tertiary", children: [
|
|
732
|
+
h,
|
|
733
|
+
":"
|
|
734
|
+
] }),
|
|
735
|
+
" ",
|
|
736
|
+
/* @__PURE__ */ t(Ft, { data: D, depth: r + 1, path: x, matchingPaths: s, searchTerm: l })
|
|
737
|
+
] }, h);
|
|
738
|
+
}) }),
|
|
739
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "]" })
|
|
740
|
+
] })
|
|
741
|
+
] });
|
|
742
|
+
if (typeof o == "object") {
|
|
743
|
+
const D = Object.entries(o);
|
|
744
|
+
return D.length === 0 ? /* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "{}" }) : /* @__PURE__ */ n("div", { className: "inline", children: [
|
|
745
|
+
/* @__PURE__ */ n(
|
|
746
|
+
"button",
|
|
747
|
+
{
|
|
748
|
+
type: "button",
|
|
749
|
+
className: "bg-transparent border-none cursor-pointer p-0 text-inherit font-inherit inline-flex items-center gap-0.5",
|
|
750
|
+
onClick: () => b(!y),
|
|
751
|
+
"aria-expanded": y,
|
|
752
|
+
"aria-label": `${y ? "Collapse" : "Expand"} object with ${D.length} keys`,
|
|
753
|
+
children: [
|
|
754
|
+
/* @__PURE__ */ t("span", { className: `text-[10px] transition-transform inline-block ${y ? "rotate-90" : ""}`, "aria-hidden": "true", children: "▶" }),
|
|
755
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "{" }),
|
|
756
|
+
!y && /* @__PURE__ */ n("span", { className: "text-dt-text-muted/60 italic text-[10px]", children: [
|
|
757
|
+
D.length,
|
|
758
|
+
" keys..."
|
|
759
|
+
] }),
|
|
760
|
+
!y && /* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "}" })
|
|
761
|
+
]
|
|
762
|
+
}
|
|
763
|
+
),
|
|
764
|
+
y && /* @__PURE__ */ n(X, { children: [
|
|
765
|
+
/* @__PURE__ */ t("div", { className: "pl-4 border-l border-dt-border-light/30 ml-1", children: D.map(([h, x]) => {
|
|
766
|
+
const f = `${a}.${h}`, m = s?.has(f) && l && h.toLowerCase().includes(l.toLowerCase());
|
|
767
|
+
return s && !qt(f, s) && !s.has(f) ? null : /* @__PURE__ */ n("div", { className: "py-px", children: [
|
|
768
|
+
/* @__PURE__ */ n("span", { className: m ? "bg-yellow-400/25 rounded-sm px-0.5 text-yellow-200" : "text-dt-text-tertiary", children: [
|
|
769
|
+
'"',
|
|
770
|
+
l ? /* @__PURE__ */ t(Zt, { text: h, term: l }) : h,
|
|
771
|
+
'":'
|
|
772
|
+
] }),
|
|
773
|
+
" ",
|
|
774
|
+
/* @__PURE__ */ t(Ft, { data: x, depth: r + 1, path: f, matchingPaths: s, searchTerm: l })
|
|
775
|
+
] }, h);
|
|
776
|
+
}) }),
|
|
777
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "}" })
|
|
778
|
+
] })
|
|
779
|
+
] });
|
|
780
|
+
}
|
|
781
|
+
return /* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: String(o) });
|
|
782
|
+
}
|
|
783
|
+
function qt(o, r) {
|
|
784
|
+
for (const a of r)
|
|
785
|
+
if (a.startsWith(o) && a !== o) return !0;
|
|
786
|
+
return !1;
|
|
787
|
+
}
|
|
788
|
+
function Zt({ text: o, term: r }) {
|
|
789
|
+
if (!r) return /* @__PURE__ */ t(X, { children: o });
|
|
790
|
+
const a = o.toLowerCase(), s = r.toLowerCase(), l = [];
|
|
791
|
+
let u = 0, c = a.indexOf(s, u), b = 0;
|
|
792
|
+
for (; c !== -1; )
|
|
793
|
+
c > u && l.push(o.slice(u, c)), l.push(
|
|
794
|
+
/* @__PURE__ */ t("mark", { className: "bg-yellow-400/30 text-yellow-200 rounded-sm px-px", children: o.slice(c, c + r.length) }, b++)
|
|
795
|
+
), u = c + r.length, c = a.indexOf(s, u);
|
|
796
|
+
return u < o.length && l.push(o.slice(u)), /* @__PURE__ */ t(X, { children: l });
|
|
797
|
+
}
|
|
798
|
+
const Ut = le.forwardRef(
|
|
799
|
+
({ value: o, onValueChange: r, onClear: a, placeholder: s, className: l = "", ...u }, c) => {
|
|
800
|
+
const b = () => {
|
|
801
|
+
a ? a() : r("");
|
|
802
|
+
};
|
|
803
|
+
return /* @__PURE__ */ n("div", { className: `relative flex items-center ${l === "stretch" ? "flex-1" : ""}`, role: "search", children: [
|
|
804
|
+
/* @__PURE__ */ t(
|
|
805
|
+
"input",
|
|
806
|
+
{
|
|
807
|
+
...u,
|
|
808
|
+
ref: c,
|
|
809
|
+
type: "search",
|
|
810
|
+
className: "w-full bg-dt-bg-tertiary/50 border border-dt-border-light rounded-md px-2.5 pr-7 py-1 text-[11px] text-dt-text-secondary placeholder:text-dt-text-muted/50 outline-none focus:border-dt-info/50 focus:bg-dt-bg-tertiary transition-colors font-sans [&::-webkit-search-cancel-button]:hidden",
|
|
811
|
+
value: o,
|
|
812
|
+
onChange: (N) => r(N.target.value),
|
|
813
|
+
placeholder: s,
|
|
814
|
+
spellCheck: u.spellCheck ?? !1,
|
|
815
|
+
"aria-label": u["aria-label"] || s || "Search"
|
|
816
|
+
}
|
|
817
|
+
),
|
|
818
|
+
o && /* @__PURE__ */ t(
|
|
819
|
+
"button",
|
|
820
|
+
{
|
|
821
|
+
type: "button",
|
|
822
|
+
className: "absolute right-1.5 p-0.5 bg-transparent border-none text-dt-text-muted cursor-pointer rounded hover:text-dt-text-tertiary transition-colors",
|
|
823
|
+
onClick: b,
|
|
824
|
+
"aria-label": "Clear search",
|
|
825
|
+
title: "Clear search",
|
|
826
|
+
children: /* @__PURE__ */ t("svg", { width: "12", height: "12", viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ t("path", { d: "M3.646 3.646a.5.5 0 0 1 .708 0L8 7.293l3.646-3.647a.5.5 0 0 1 .708.708L8.707 8l3.647 3.646a.5.5 0 0 1-.708.708L8 8.707l-3.646 3.647a.5.5 0 0 1-.708-.708L7.293 8 3.646 4.354a.5.5 0 0 1 0-.708Z" }) })
|
|
827
|
+
}
|
|
828
|
+
)
|
|
829
|
+
] });
|
|
830
|
+
}
|
|
831
|
+
);
|
|
832
|
+
function Kt({ x: o, y: r, items: a, onClose: s }) {
|
|
833
|
+
const [l, u] = L(-1), c = ft(null), [b, N] = L({ x: o, y: r });
|
|
834
|
+
U(() => {
|
|
835
|
+
const h = c.current;
|
|
836
|
+
if (!h) return;
|
|
837
|
+
const x = 8, f = h.getBoundingClientRect(), m = window.innerWidth, g = window.innerHeight;
|
|
838
|
+
let $ = o, I = r;
|
|
839
|
+
o + f.width > m - x && ($ = Math.max(x, m - f.width - x)), r + f.height > g - x && (I = Math.max(x, g - f.height - x)), ($ !== b.x || I !== b.y) && N({ x: $, y: I });
|
|
840
|
+
}, [o, r]), U(() => {
|
|
841
|
+
const h = ($) => {
|
|
842
|
+
c.current && !c.current.contains($.target) && s();
|
|
843
|
+
}, x = ($) => {
|
|
844
|
+
c.current && !c.current.contains($.target) && s();
|
|
845
|
+
}, f = () => s(), m = () => s(), g = setTimeout(() => {
|
|
846
|
+
document.addEventListener("mousedown", h), document.addEventListener("contextmenu", x);
|
|
847
|
+
}, 0);
|
|
848
|
+
return window.addEventListener("scroll", f, !0), window.addEventListener("blur", m), () => {
|
|
849
|
+
clearTimeout(g), document.removeEventListener("mousedown", h), document.removeEventListener("contextmenu", x), window.removeEventListener("scroll", f, !0), window.removeEventListener("blur", m);
|
|
850
|
+
};
|
|
851
|
+
}, [s]);
|
|
852
|
+
const y = a.map((h, x) => ({ ...h, index: x })).filter((h) => !h.disabled), D = F(
|
|
853
|
+
(h) => {
|
|
854
|
+
if (h.key === "Escape") {
|
|
855
|
+
h.preventDefault(), h.stopPropagation(), s();
|
|
856
|
+
return;
|
|
857
|
+
}
|
|
858
|
+
if (h.key === "ArrowDown") {
|
|
859
|
+
h.preventDefault(), u((x) => {
|
|
860
|
+
const f = y.findIndex((g) => g.index === x), m = f < y.length - 1 ? f + 1 : 0;
|
|
861
|
+
return y[m].index;
|
|
862
|
+
});
|
|
863
|
+
return;
|
|
864
|
+
}
|
|
865
|
+
if (h.key === "ArrowUp") {
|
|
866
|
+
h.preventDefault(), u((x) => {
|
|
867
|
+
const f = y.findIndex((g) => g.index === x), m = f > 0 ? f - 1 : y.length - 1;
|
|
868
|
+
return y[m].index;
|
|
869
|
+
});
|
|
870
|
+
return;
|
|
871
|
+
}
|
|
872
|
+
if (h.key === "Enter") {
|
|
873
|
+
h.preventDefault(), l >= 0 && !a[l].disabled && (a[l].action(), s());
|
|
874
|
+
return;
|
|
875
|
+
}
|
|
876
|
+
},
|
|
877
|
+
[s, l, a, y]
|
|
878
|
+
);
|
|
879
|
+
return U(() => (window.addEventListener("keydown", D, !0), () => window.removeEventListener("keydown", D, !0)), [D]), U(() => {
|
|
880
|
+
y.length > 0 && l === -1 && u(y[0].index);
|
|
881
|
+
}, []), /* @__PURE__ */ t(
|
|
882
|
+
"div",
|
|
883
|
+
{
|
|
884
|
+
ref: c,
|
|
885
|
+
className: "fixed z-[9999999] min-w-[180px] max-w-[280px] bg-zinc-900/[0.98] backdrop-blur-lg border border-dt-border rounded-lg shadow-2xl py-1 animate-[dt-fade-in_0.1s_ease-out]",
|
|
886
|
+
style: { top: b.y, left: b.x },
|
|
887
|
+
role: "menu",
|
|
888
|
+
onContextMenu: (h) => h.preventDefault(),
|
|
889
|
+
children: a.map((h, x) => /* @__PURE__ */ n("div", { children: [
|
|
890
|
+
h.separator && x > 0 && /* @__PURE__ */ t("div", { className: "border-t border-dt-border-light/40 my-0.5", role: "separator" }),
|
|
891
|
+
/* @__PURE__ */ n(
|
|
892
|
+
"button",
|
|
893
|
+
{
|
|
894
|
+
className: `flex items-center w-full px-3 py-1.5 text-[12px] text-left bg-transparent border-none cursor-pointer transition-colors ${h.disabled ? "opacity-40 pointer-events-none text-dt-text-muted" : l === x ? "bg-white/[0.08] text-dt-text-secondary" : "text-dt-text-secondary hover:bg-white/[0.06]"}`,
|
|
895
|
+
role: "menuitem",
|
|
896
|
+
tabIndex: -1,
|
|
897
|
+
disabled: h.disabled,
|
|
898
|
+
onMouseEnter: () => {
|
|
899
|
+
h.disabled || u(x);
|
|
900
|
+
},
|
|
901
|
+
onClick: (f) => {
|
|
902
|
+
f.stopPropagation(), h.disabled || (h.action(), s());
|
|
903
|
+
},
|
|
904
|
+
children: [
|
|
905
|
+
/* @__PURE__ */ t("span", { className: "flex-1 truncate", children: h.label }),
|
|
906
|
+
h.shortcut && /* @__PURE__ */ t("span", { className: "text-dt-text-muted font-mono text-[11px] ml-4 shrink-0", children: h.shortcut })
|
|
907
|
+
]
|
|
908
|
+
}
|
|
909
|
+
)
|
|
910
|
+
] }, x))
|
|
911
|
+
}
|
|
912
|
+
);
|
|
913
|
+
}
|
|
914
|
+
function St(o) {
|
|
915
|
+
return o.type === "query" || o.type === "mutation" || o.type === "action";
|
|
916
|
+
}
|
|
917
|
+
function Bt(o) {
|
|
918
|
+
return o.type === "auth";
|
|
919
|
+
}
|
|
920
|
+
function Nt(o) {
|
|
921
|
+
return St(o) || Bt(o);
|
|
922
|
+
}
|
|
923
|
+
const we = `
|
|
924
|
+
.cdv-json-key { color: var(--color-dt-text-tertiary); }
|
|
925
|
+
.cdv-json-string { color: var(--color-dt-success); }
|
|
926
|
+
.cdv-json-number { color: var(--color-dt-query); }
|
|
927
|
+
.cdv-json-boolean { color: var(--color-dt-mutation); }
|
|
928
|
+
.cdv-json-null { color: var(--color-dt-text-muted); }
|
|
929
|
+
.cdv-json-value { color: var(--color-dt-text-secondary); }
|
|
930
|
+
`, Et = 100, te = 100, pt = 4e3, ve = {
|
|
931
|
+
maxStringLength: 128,
|
|
932
|
+
stringTailLength: 24,
|
|
933
|
+
maxArrayItems: 4,
|
|
934
|
+
maxObjectEntries: 4,
|
|
935
|
+
maxDepth: 3
|
|
936
|
+
};
|
|
937
|
+
function Pt(o) {
|
|
938
|
+
if (o == null) return "";
|
|
939
|
+
if (typeof o == "string")
|
|
940
|
+
return o.length > pt ? o.slice(0, pt) : o;
|
|
941
|
+
try {
|
|
942
|
+
const r = JSON.stringify(o);
|
|
943
|
+
return r ? r.length > pt ? r.slice(0, pt) : r : "";
|
|
944
|
+
} catch {
|
|
945
|
+
const r = String(o);
|
|
946
|
+
return r.length > pt ? r.slice(0, pt) : r;
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
function ye(o) {
|
|
950
|
+
const [r, a] = o.split("-", 3);
|
|
951
|
+
return r === "query" && a ? `Q${a}` : r === "mutation" && a ? `M${a}` : r === "action" && a ? `A${a}` : o;
|
|
952
|
+
}
|
|
953
|
+
function ke({ eventStore: o, panelConnectionState: r }) {
|
|
954
|
+
const [a, s] = L([]), [l, u] = L("all"), [c, b] = L(""), [N, y] = L(Et), [D, h] = L(null), [x, f] = L(0), [m, g] = L(null), [$, I] = L(null), T = ft(null), E = D && St(D) ? D : null, z = D && Bt(D) ? D : null, O = F(() => {
|
|
955
|
+
y(Et), f(0);
|
|
956
|
+
}, []), d = F((e) => {
|
|
957
|
+
u(e), O();
|
|
958
|
+
}, [O]), p = F((e) => {
|
|
959
|
+
b(e), O();
|
|
960
|
+
}, [O]);
|
|
961
|
+
U(() => {
|
|
962
|
+
const e = () => {
|
|
963
|
+
s(o.getAllEvents());
|
|
964
|
+
}, v = o.subscribe(e);
|
|
965
|
+
return e(), v;
|
|
966
|
+
}, [o]), U(() => {
|
|
967
|
+
const e = (w) => {
|
|
968
|
+
if (!w) return;
|
|
969
|
+
const q = o.getAllEvents().find((_) => _.id === w);
|
|
970
|
+
if (!q || !Nt(q)) return;
|
|
971
|
+
u("all"), b(""), y(Et), g(null), I(null), h(q), f(0);
|
|
972
|
+
const A = o.getAllEvents().filter(Nt).sort((_, Q) => Q.timestamp - _.timestamp).findIndex((_) => _.id === w);
|
|
973
|
+
A >= 0 && (y((_) => Math.max(_, Et, A + 1)), f(A));
|
|
974
|
+
}, v = o.subscribeFocus(e);
|
|
975
|
+
return e(o.getFocusedEventId()), v;
|
|
976
|
+
}, [o]);
|
|
977
|
+
const i = F((e) => {
|
|
978
|
+
const v = lt(e.args), w = [
|
|
979
|
+
e.id,
|
|
980
|
+
e.type,
|
|
981
|
+
e.status,
|
|
982
|
+
e.udfPath
|
|
983
|
+
];
|
|
984
|
+
if (e.componentPath && w.push(e.componentPath), e.type === "query")
|
|
985
|
+
w.push(String(e.queryId), `q${e.queryId}`), e.triggeredBy && w.push(e.triggeredBy);
|
|
986
|
+
else {
|
|
987
|
+
const q = e.type === "mutation" ? "m" : "a";
|
|
988
|
+
w.push(String(e.requestId), `${q}${e.requestId}`);
|
|
989
|
+
}
|
|
990
|
+
return w.push(Pt(v)), e.result !== void 0 && w.push(Pt(e.result)), e.error && w.push(e.error), e.logLines && e.logLines.length > 0 && w.push(e.logLines.join(`
|
|
991
|
+
`)), typeof e.duration == "number" && w.push(`${e.duration}`, `${e.duration}ms`), typeof e.simulatedDelayMs == "number" && e.simulatedDelayMs > 0 && w.push(`simulated ${e.simulatedDelayMs}`, `delay ${e.simulatedDelayMs}ms`), typeof e.endToEndDurationMs == "number" && w.push(`${e.endToEndDurationMs}`, `${e.endToEndDurationMs}ms`, "end-to-end"), w.join(`
|
|
992
|
+
`).toLowerCase();
|
|
993
|
+
}, []), C = F((e) => {
|
|
994
|
+
if (St(e))
|
|
995
|
+
return i(e);
|
|
996
|
+
const v = [
|
|
997
|
+
e.id,
|
|
998
|
+
e.type,
|
|
999
|
+
e.status,
|
|
1000
|
+
e.direction,
|
|
1001
|
+
e.messageType
|
|
1002
|
+
];
|
|
1003
|
+
return e.tokenType && v.push(e.tokenType), e.error && v.push(e.error), e.details !== void 0 && v.push(Pt(e.details)), v.join(`
|
|
1004
|
+
`).toLowerCase();
|
|
1005
|
+
}, [i]), { filteredEvents: S, totalMatchCount: M, hasMoreResults: H } = it(() => {
|
|
1006
|
+
let e = a.filter(Nt);
|
|
1007
|
+
l !== "all" && (l === "error" ? e = e.filter((k) => k.status === "error") : e = e.filter((k) => k.type === l));
|
|
1008
|
+
const v = c.trim().toLowerCase().split(/\s+/).filter((k) => k.length > 0);
|
|
1009
|
+
v.length > 0 && (e = e.filter((k) => {
|
|
1010
|
+
const A = C(k);
|
|
1011
|
+
return v.every((_) => A.includes(_));
|
|
1012
|
+
}));
|
|
1013
|
+
const w = e.sort((k, A) => A.timestamp - k.timestamp), q = w.slice(0, N);
|
|
1014
|
+
return {
|
|
1015
|
+
filteredEvents: q,
|
|
1016
|
+
totalMatchCount: w.length,
|
|
1017
|
+
hasMoreResults: w.length > q.length
|
|
1018
|
+
};
|
|
1019
|
+
}, [a, l, c, N, C]);
|
|
1020
|
+
U(() => {
|
|
1021
|
+
if (S.length === 0) {
|
|
1022
|
+
f(0);
|
|
1023
|
+
return;
|
|
1024
|
+
}
|
|
1025
|
+
f((e) => Math.min(e, S.length - 1));
|
|
1026
|
+
}, [S.length]);
|
|
1027
|
+
const j = it(() => {
|
|
1028
|
+
const e = a.filter(Nt), v = e.filter((_) => _.type === "query"), w = e.filter((_) => _.type === "mutation"), q = e.filter((_) => _.type === "action"), k = e.filter((_) => _.type === "auth"), A = e.filter((_) => _.status === "error").length;
|
|
1029
|
+
return {
|
|
1030
|
+
queries: v.length,
|
|
1031
|
+
mutations: w.length,
|
|
1032
|
+
actions: q.length,
|
|
1033
|
+
auth: k.length,
|
|
1034
|
+
errors: A,
|
|
1035
|
+
total: v.length + w.length + q.length + k.length
|
|
1036
|
+
};
|
|
1037
|
+
}, [a]), Y = !!r?.waitingForConnection && l === "all" && !c;
|
|
1038
|
+
U(() => {
|
|
1039
|
+
const e = (v) => {
|
|
1040
|
+
if ($t()) {
|
|
1041
|
+
if ((v.metaKey || v.ctrlKey) && v.key === "k") {
|
|
1042
|
+
v.preventDefault(), T.current?.focus();
|
|
1043
|
+
return;
|
|
1044
|
+
}
|
|
1045
|
+
if (v.key === "Escape") {
|
|
1046
|
+
v.preventDefault(), D ? h(null) : (l !== "all" || c) && (d("all"), p(""));
|
|
1047
|
+
return;
|
|
1048
|
+
}
|
|
1049
|
+
if (ie() !== T.current && S.length !== 0) {
|
|
1050
|
+
if (v.key === "ArrowDown")
|
|
1051
|
+
v.preventDefault(), f((w) => Math.min(w + 1, S.length - 1));
|
|
1052
|
+
else if (v.key === "ArrowUp")
|
|
1053
|
+
v.preventDefault(), f((w) => Math.max(w - 1, 0));
|
|
1054
|
+
else if (v.key === "Enter") {
|
|
1055
|
+
v.preventDefault();
|
|
1056
|
+
const w = S[x];
|
|
1057
|
+
w && h(D?.id === w.id ? null : w);
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
};
|
|
1062
|
+
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
1063
|
+
}, [S, x, D, l, c, d, p]);
|
|
1064
|
+
const K = (e) => {
|
|
1065
|
+
if (e == null) return "0";
|
|
1066
|
+
const v = JSON.stringify(e), w = new Blob([v]).size;
|
|
1067
|
+
return w < 1024 ? `${w}B` : w < 1024 * 1024 ? `${(w / 1024).toFixed(1)}KB` : `${(w / (1024 * 1024)).toFixed(1)}MB`;
|
|
1068
|
+
}, R = (e) => !Number.isFinite(e) || e < 0 ? "—" : e < 1e3 ? `${e.toFixed(3)}ms` : e < 6e4 ? `${(e / 1e3).toFixed(3)}s` : e < 36e5 ? `${(e / 6e4).toFixed(1)}m` : `${(e / 36e5).toFixed(2)}h`, Z = (e) => typeof e.duration != "number" || !Number.isFinite(e.duration) || e.duration < 0 ? null : e.duration, rt = (e) => typeof e.simulatedDelayMs != "number" || !Number.isFinite(e.simulatedDelayMs) || e.simulatedDelayMs <= 0 ? 0 : e.simulatedDelayMs, It = (e) => {
|
|
1069
|
+
if (typeof e.endToEndDurationMs == "number" && Number.isFinite(e.endToEndDurationMs) && e.endToEndDurationMs >= 0)
|
|
1070
|
+
return e.endToEndDurationMs;
|
|
1071
|
+
const v = Z(e);
|
|
1072
|
+
return v === null ? null : v + rt(e);
|
|
1073
|
+
}, xt = (e) => {
|
|
1074
|
+
const v = Date.now() - e;
|
|
1075
|
+
return v < 2e3 ? "just now" : v < 6e4 ? `${Math.floor(v / 1e3)}s ago` : v < 36e5 ? `${Math.floor(v / 6e4)}m ago` : v < 864e5 ? `${Math.floor(v / 36e5)}h ago` : `${Math.floor(v / 864e5)}d ago`;
|
|
1076
|
+
}, _t = (e) => new Date(e).toLocaleTimeString([], {
|
|
1077
|
+
hour: "2-digit",
|
|
1078
|
+
minute: "2-digit",
|
|
1079
|
+
second: "2-digit",
|
|
1080
|
+
fractionalSecondDigits: 3
|
|
1081
|
+
}), Qt = (e) => e.type === "query" ? `Q${e.queryId}` : e.type === "mutation" ? `M${e.requestId}` : e.type === "action" ? `A${e.requestId}` : null, Lt = (e) => St(e) ? Qt(e) ?? e.id : `${e.direction === "client" ? "C" : "S"}:${e.messageType}`, vt = F((e, v) => {
|
|
1082
|
+
if (typeof window > "u") return null;
|
|
1083
|
+
const w = 8, q = 300, k = window.innerWidth, A = window.innerHeight, _ = Math.min(260, A - w * 2);
|
|
1084
|
+
let Q = v.right + w;
|
|
1085
|
+
Q + q > k - w && (Q = v.left - q - w), Q < w && (Q = Math.max(w, k - q - w));
|
|
1086
|
+
let B = v.top + v.height / 2 - _ / 2;
|
|
1087
|
+
return B < w && (B = w), B + _ > A - w && (B = Math.max(w, A - w - _)), { event: e, x: Q, y: B };
|
|
1088
|
+
}, []), Ht = F((e) => {
|
|
1089
|
+
if (Bt(e)) {
|
|
1090
|
+
const _ = [
|
|
1091
|
+
{ label: "Copy Message Type", action: () => P(e.messageType), shortcut: "⌘C" }
|
|
1092
|
+
];
|
|
1093
|
+
return e.error && _.push({
|
|
1094
|
+
label: "Copy Error",
|
|
1095
|
+
action: () => P(e.error)
|
|
1096
|
+
}), e.details !== void 0 && _.push({
|
|
1097
|
+
label: "Copy Details",
|
|
1098
|
+
action: () => P(JSON.stringify(e.details, null, 2))
|
|
1099
|
+
}), _.push({
|
|
1100
|
+
label: "Filter by Type: auth",
|
|
1101
|
+
action: () => d("auth"),
|
|
1102
|
+
separator: !0
|
|
1103
|
+
}), _.push({
|
|
1104
|
+
label: "Copy Event ID",
|
|
1105
|
+
action: () => P(e.id),
|
|
1106
|
+
separator: !0
|
|
1107
|
+
}), _.push({
|
|
1108
|
+
label: "Copy as JSON",
|
|
1109
|
+
action: () => P(JSON.stringify(e, null, 2))
|
|
1110
|
+
}), _;
|
|
1111
|
+
}
|
|
1112
|
+
const v = lt(e.args), w = v != null, q = e.status === "success" && e.result !== void 0, k = e.status === "error" && !!e.error, A = [
|
|
1113
|
+
{ label: "Copy Function Path", action: () => P(e.udfPath), shortcut: "⌘C" }
|
|
1114
|
+
];
|
|
1115
|
+
if (w) {
|
|
1116
|
+
const _ = JSON.stringify(v);
|
|
1117
|
+
A.push({
|
|
1118
|
+
label: "Copy as convex run",
|
|
1119
|
+
action: () => P(`npx convex run ${e.udfPath} '${_}'`)
|
|
1120
|
+
}), A.push({
|
|
1121
|
+
label: "Copy Arguments",
|
|
1122
|
+
action: () => P(JSON.stringify(v, null, 2))
|
|
1123
|
+
});
|
|
1124
|
+
}
|
|
1125
|
+
return q && A.push({
|
|
1126
|
+
label: "Copy Result",
|
|
1127
|
+
action: () => P(JSON.stringify(e.result, null, 2))
|
|
1128
|
+
}), k && A.push({
|
|
1129
|
+
label: "Copy Error",
|
|
1130
|
+
action: () => P(e.error)
|
|
1131
|
+
}), A.push({
|
|
1132
|
+
label: "Filter by Function",
|
|
1133
|
+
action: () => p(e.udfPath),
|
|
1134
|
+
separator: !0
|
|
1135
|
+
}), A.push({
|
|
1136
|
+
label: `Filter by Type: ${e.type}`,
|
|
1137
|
+
action: () => d(e.type)
|
|
1138
|
+
}), A.push({
|
|
1139
|
+
label: "Copy Event ID",
|
|
1140
|
+
action: () => P(e.id),
|
|
1141
|
+
separator: !0
|
|
1142
|
+
}), A.push({
|
|
1143
|
+
label: "Copy as JSON",
|
|
1144
|
+
action: () => P(JSON.stringify(e, null, 2))
|
|
1145
|
+
}), A;
|
|
1146
|
+
}, [d, p]);
|
|
1147
|
+
return /* @__PURE__ */ n("div", { className: "flex flex-col h-full overflow-hidden", children: [
|
|
1148
|
+
/* @__PURE__ */ t("style", { children: we }),
|
|
1149
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-2 px-3 py-1.5 border-b border-dt-border-light", children: [
|
|
1150
|
+
/* @__PURE__ */ t("div", { className: "flex gap-[3px] bg-zinc-900/50 p-[3px] rounded-md border border-zinc-700/30", children: ["all", "query", "mutation", "action", "auth", "error"].map((e) => /* @__PURE__ */ t(
|
|
1151
|
+
"button",
|
|
1152
|
+
{
|
|
1153
|
+
className: `px-2 py-1 text-[11px] font-mono font-bold uppercase tracking-wide bg-transparent border-none rounded cursor-pointer transition-all ${l === e ? e === "query" ? "bg-dt-query/25 text-dt-query shadow-[0_0_0_1px_rgba(96,165,250,0.5)]" : e === "mutation" ? "bg-dt-mutation/25 text-dt-mutation shadow-[0_0_0_1px_rgba(167,139,250,0.5)]" : e === "action" ? "bg-dt-action/25 text-dt-action shadow-[0_0_0_1px_rgba(52,211,153,0.5)]" : e === "auth" ? "bg-dt-warning/20 text-dt-warning shadow-[0_0_0_1px_rgba(245,158,11,0.5)]" : e === "error" ? "bg-dt-error/25 text-dt-error shadow-[0_0_0_1px_rgba(239,68,68,0.5)]" : "bg-zinc-500/25 text-dt-text-tertiary shadow-[0_0_0_1px_rgba(161,161,170,0.4)]" : e === "query" ? "text-dt-text-muted hover:bg-dt-query/15 hover:text-dt-query" : e === "mutation" ? "text-dt-text-muted hover:bg-dt-mutation/15 hover:text-dt-mutation" : e === "action" ? "text-dt-text-muted hover:bg-dt-action/15 hover:text-dt-action" : e === "auth" ? "text-dt-text-muted hover:bg-dt-warning/15 hover:text-dt-warning" : e === "error" ? "text-dt-text-muted hover:bg-dt-error/15 hover:text-dt-error" : "text-dt-text-muted hover:bg-white/5 hover:text-dt-text-tertiary"}`,
|
|
1154
|
+
onClick: () => d(e),
|
|
1155
|
+
children: e === "all" ? `All ${j.total}` : `${e === "auth" ? "C" : e === "error" ? "E" : e.charAt(0).toUpperCase()} ${e === "query" ? j.queries : e === "mutation" ? j.mutations : e === "action" ? j.actions : e === "error" ? j.errors : j.auth}`
|
|
1156
|
+
},
|
|
1157
|
+
e
|
|
1158
|
+
)) }),
|
|
1159
|
+
/* @__PURE__ */ t(
|
|
1160
|
+
Ut,
|
|
1161
|
+
{
|
|
1162
|
+
ref: T,
|
|
1163
|
+
value: c,
|
|
1164
|
+
onValueChange: p,
|
|
1165
|
+
onClear: () => p(""),
|
|
1166
|
+
placeholder: "Search path/auth/error/details... (Cmd/Ctrl+K)",
|
|
1167
|
+
className: "stretch"
|
|
1168
|
+
}
|
|
1169
|
+
),
|
|
1170
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-1 ml-auto shrink-0", children: (l !== "all" || c) && /* @__PURE__ */ t(
|
|
1171
|
+
"button",
|
|
1172
|
+
{
|
|
1173
|
+
className: "p-1 bg-transparent border-none text-dt-text-muted cursor-pointer rounded transition-colors hover:text-dt-text-tertiary",
|
|
1174
|
+
onClick: () => {
|
|
1175
|
+
d("all"), p("");
|
|
1176
|
+
},
|
|
1177
|
+
title: "Clear filters (Esc)",
|
|
1178
|
+
children: /* @__PURE__ */ t("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ t("path", { d: "M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z" }) })
|
|
1179
|
+
}
|
|
1180
|
+
) })
|
|
1181
|
+
] }),
|
|
1182
|
+
S.length === 0 && /* @__PURE__ */ n("div", { className: "flex flex-col items-center justify-center py-12 text-dt-text-muted gap-2", children: [
|
|
1183
|
+
/* @__PURE__ */ n("svg", { width: "48", height: "48", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: [
|
|
1184
|
+
/* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "10", strokeWidth: "1.5" }),
|
|
1185
|
+
/* @__PURE__ */ t("path", { d: "M12 6v6l4 2", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
1186
|
+
] }),
|
|
1187
|
+
Y ? /* @__PURE__ */ n(X, { children: [
|
|
1188
|
+
/* @__PURE__ */ t("p", { children: "Waiting for Convex WebSocket activity" }),
|
|
1189
|
+
r.needsReload ? /* @__PURE__ */ n(X, { children: [
|
|
1190
|
+
/* @__PURE__ */ t("p", { className: "text-[11px] text-dt-text-muted/60 max-w-[360px] text-center", children: "Page was already connected before DevTools attached. Reload to start capturing this connection." }),
|
|
1191
|
+
/* @__PURE__ */ t(
|
|
1192
|
+
"button",
|
|
1193
|
+
{
|
|
1194
|
+
type: "button",
|
|
1195
|
+
className: "mt-1 px-3 py-1.5 text-[11px] font-medium rounded-md bg-dt-bg-tertiary border border-dt-border text-dt-text-secondary hover:bg-white/10 hover:border-dt-border-light transition-colors cursor-pointer",
|
|
1196
|
+
onClick: r.onReload,
|
|
1197
|
+
children: "Reload Page"
|
|
1198
|
+
}
|
|
1199
|
+
)
|
|
1200
|
+
] }) : /* @__PURE__ */ t("p", { className: "text-[11px] text-dt-text-muted/60 max-w-[360px] text-center", children: "Events will appear here once the app establishes a Convex WebSocket connection." }),
|
|
1201
|
+
/* @__PURE__ */ n("p", { className: "text-[10px] text-dt-text-muted/60 font-mono", children: [
|
|
1202
|
+
"Agent ",
|
|
1203
|
+
r.agentAttached ? "attached" : "attaching",
|
|
1204
|
+
" · Socket ",
|
|
1205
|
+
r.socketSeen ? "seen" : "waiting",
|
|
1206
|
+
" · Capture ",
|
|
1207
|
+
r.captureLive ? "live" : r.needsReload ? "reload" : "waiting"
|
|
1208
|
+
] })
|
|
1209
|
+
] }) : /* @__PURE__ */ n(X, { children: [
|
|
1210
|
+
/* @__PURE__ */ t("p", { children: "No activity yet" }),
|
|
1211
|
+
/* @__PURE__ */ t("p", { className: "text-[11px] text-dt-text-muted/60", children: l !== "all" || c ? "No activity matches your current filters" : "Execute operations or auth flows to see them here" })
|
|
1212
|
+
] })
|
|
1213
|
+
] }),
|
|
1214
|
+
S.length > 0 && /* @__PURE__ */ n("div", { className: "flex flex-1 overflow-hidden", children: [
|
|
1215
|
+
/* @__PURE__ */ n("div", { className: "flex-1 overflow-y-auto", children: [
|
|
1216
|
+
H && /* @__PURE__ */ n("div", { className: "text-center text-[10px] text-dt-text-muted/60 py-1 border-b border-dt-border-light/30", children: [
|
|
1217
|
+
"Showing ",
|
|
1218
|
+
S.length,
|
|
1219
|
+
" of ",
|
|
1220
|
+
M
|
|
1221
|
+
] }),
|
|
1222
|
+
S.map((e, v) => {
|
|
1223
|
+
const w = D?.id === e.id, q = v === x;
|
|
1224
|
+
if (e.type === "auth") {
|
|
1225
|
+
const J = e.direction === "client" ? "cli" : "srv", st = e.direction === "client" ? "→" : "←", at = e.details && typeof e.details == "object" && !Array.isArray(e.details) ? Object.keys(e.details).length : null;
|
|
1226
|
+
return /* @__PURE__ */ t(
|
|
1227
|
+
"div",
|
|
1228
|
+
{
|
|
1229
|
+
className: `flex flex-col px-3 py-1.5 border-b border-dt-border-light/50 cursor-pointer transition-colors hover:bg-white/[0.03] ${w ? "bg-white/[0.06]" : ""} ${q ? "bg-white/[0.03] outline outline-1 outline-dt-info/30 -outline-offset-1" : ""} ${e.status === "error" ? "border-l-2 border-l-dt-error/40" : ""}`,
|
|
1230
|
+
onClick: () => {
|
|
1231
|
+
h(w ? null : e), f(v);
|
|
1232
|
+
},
|
|
1233
|
+
onKeyDown: (V) => {
|
|
1234
|
+
(V.key === "Enter" || V.key === " ") && (V.preventDefault(), h(w ? null : e), f(v));
|
|
1235
|
+
},
|
|
1236
|
+
onContextMenu: (V) => {
|
|
1237
|
+
V.preventDefault(), g(null), I({
|
|
1238
|
+
x: V.clientX,
|
|
1239
|
+
y: V.clientY,
|
|
1240
|
+
items: Ht(e)
|
|
1241
|
+
});
|
|
1242
|
+
},
|
|
1243
|
+
onMouseEnter: (V) => {
|
|
1244
|
+
const At = V.currentTarget.getBoundingClientRect(), ct = vt(e, At);
|
|
1245
|
+
ct && g(ct);
|
|
1246
|
+
},
|
|
1247
|
+
onMouseMove: (V) => {
|
|
1248
|
+
if (m?.event.id === e.id) {
|
|
1249
|
+
const At = V.currentTarget.getBoundingClientRect(), ct = vt(e, At);
|
|
1250
|
+
ct && g(
|
|
1251
|
+
(bt) => bt && bt.event.id === e.id && (bt.x !== ct.x || bt.y !== ct.y) ? ct : bt
|
|
1252
|
+
);
|
|
1253
|
+
}
|
|
1254
|
+
},
|
|
1255
|
+
onMouseLeave: () => {
|
|
1256
|
+
g((V) => V && V.event.id === e.id ? null : V);
|
|
1257
|
+
},
|
|
1258
|
+
role: "button",
|
|
1259
|
+
tabIndex: 0,
|
|
1260
|
+
"aria-label": `Connection ${e.messageType} ${e.status}`,
|
|
1261
|
+
"aria-selected": w,
|
|
1262
|
+
"aria-current": q ? "true" : void 0,
|
|
1263
|
+
children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
1264
|
+
/* @__PURE__ */ t("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-[3px] text-[9px] font-bold shrink-0 bg-dt-warning/20 text-dt-warning shadow-[0_1px_2px_rgba(245,158,11,0.35)]", children: "C" }),
|
|
1265
|
+
/* @__PURE__ */ t(
|
|
1266
|
+
"span",
|
|
1267
|
+
{
|
|
1268
|
+
className: `w-1.5 h-1.5 rounded-full shrink-0 ${e.status === "success" ? "bg-dt-success" : e.status === "error" ? "bg-dt-error" : "bg-dt-warning animate-pulse"}`,
|
|
1269
|
+
title: e.status
|
|
1270
|
+
}
|
|
1271
|
+
),
|
|
1272
|
+
/* @__PURE__ */ n("span", { className: "font-mono text-[12px] text-dt-text-secondary truncate flex-1", children: [
|
|
1273
|
+
st,
|
|
1274
|
+
" ",
|
|
1275
|
+
e.messageType
|
|
1276
|
+
] }),
|
|
1277
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-2 shrink-0 text-[11px] text-dt-text-muted ml-auto", children: [
|
|
1278
|
+
e.tokenType && /* @__PURE__ */ t("span", { className: "text-dt-text-muted/80 font-mono text-[10px]", children: e.tokenType }),
|
|
1279
|
+
at !== null && /* @__PURE__ */ n("span", { className: "text-dt-text-muted/70 font-mono text-[10px]", children: [
|
|
1280
|
+
at,
|
|
1281
|
+
"f"
|
|
1282
|
+
] }),
|
|
1283
|
+
e.error && /* @__PURE__ */ t("span", { className: "text-dt-error truncate max-w-[180px]", title: e.error, children: e.error }),
|
|
1284
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-muted/70 font-mono text-[10px]", children: J }),
|
|
1285
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-muted/60 font-mono", children: _t(e.timestamp) })
|
|
1286
|
+
] })
|
|
1287
|
+
] })
|
|
1288
|
+
},
|
|
1289
|
+
e.id
|
|
1290
|
+
);
|
|
1291
|
+
}
|
|
1292
|
+
const k = e, A = lt(k.args), _ = A !== void 0, Q = k.type === "query" ? o.getSubscription(k.queryId) : null, B = Q && Q.updateCount > 0, G = It(k), ot = Z(k), nt = rt(k), et = k.type === "query" ? "Query" : k.type === "mutation" ? "Mutation" : "Action", ht = k.status === "success" ? "succeeded" : k.status === "error" ? "failed" : "pending", dt = nt > 0 && ot !== null, yt = `${et} ${k.udfPath} ${ht}${G !== null ? ` in ${dt ? `e2e ${R(G)}` : `net ${R(G)}`}` : ""}${dt ? ` (${R(ot)} net + ${R(nt)} simulated)` : ""}`, kt = B && k.type === "query";
|
|
1293
|
+
return /* @__PURE__ */ t(
|
|
1294
|
+
"div",
|
|
1295
|
+
{
|
|
1296
|
+
className: `flex flex-col px-3 py-1.5 border-b border-dt-border-light/50 cursor-pointer transition-colors hover:bg-white/[0.03] ${w ? "bg-white/[0.06]" : ""} ${q ? "bg-white/[0.03] outline outline-1 outline-dt-info/30 -outline-offset-1" : ""} ${k.status === "error" ? "border-l-2 border-l-dt-error/40" : ""} ${kt ? "border-l-2 border-l-dt-query/30 bg-dt-query/[0.02]" : ""}`,
|
|
1297
|
+
onClick: () => {
|
|
1298
|
+
h(w ? null : e), f(v);
|
|
1299
|
+
},
|
|
1300
|
+
onKeyDown: (J) => {
|
|
1301
|
+
(J.key === "Enter" || J.key === " ") && (J.preventDefault(), h(w ? null : e), f(v));
|
|
1302
|
+
},
|
|
1303
|
+
onContextMenu: (J) => {
|
|
1304
|
+
J.preventDefault(), g(null), I({
|
|
1305
|
+
x: J.clientX,
|
|
1306
|
+
y: J.clientY,
|
|
1307
|
+
items: Ht(k)
|
|
1308
|
+
});
|
|
1309
|
+
},
|
|
1310
|
+
onMouseEnter: (J) => {
|
|
1311
|
+
const st = J.currentTarget.getBoundingClientRect(), at = vt(k, st);
|
|
1312
|
+
at && g(at);
|
|
1313
|
+
},
|
|
1314
|
+
onMouseMove: (J) => {
|
|
1315
|
+
if (m?.event.id === k.id) {
|
|
1316
|
+
const st = J.currentTarget.getBoundingClientRect(), at = vt(k, st);
|
|
1317
|
+
at && g(
|
|
1318
|
+
(V) => V && V.event.id === k.id && (V.x !== at.x || V.y !== at.y) ? at : V
|
|
1319
|
+
);
|
|
1320
|
+
}
|
|
1321
|
+
},
|
|
1322
|
+
onMouseLeave: () => {
|
|
1323
|
+
g((J) => J && J.event.id === k.id ? null : J);
|
|
1324
|
+
},
|
|
1325
|
+
role: "button",
|
|
1326
|
+
tabIndex: 0,
|
|
1327
|
+
"aria-label": yt,
|
|
1328
|
+
"aria-selected": w,
|
|
1329
|
+
"aria-current": q ? "true" : void 0,
|
|
1330
|
+
children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
1331
|
+
/* @__PURE__ */ t(
|
|
1332
|
+
"span",
|
|
1333
|
+
{
|
|
1334
|
+
className: `inline-flex items-center justify-center w-4 h-4 rounded-[3px] text-[9px] font-bold shrink-0 ${k.type === "query" ? "bg-dt-query/20 text-dt-query shadow-[0_1px_2px_rgba(96,165,250,0.35)]" : k.type === "mutation" ? "bg-dt-mutation/20 text-dt-mutation shadow-[0_1px_2px_rgba(167,139,250,0.35)]" : "bg-dt-action/20 text-dt-action shadow-[0_1px_2px_rgba(52,211,153,0.35)]"}`,
|
|
1335
|
+
title: k.type,
|
|
1336
|
+
children: k.type === "query" ? "Q" : k.type === "mutation" ? "M" : "A"
|
|
1337
|
+
}
|
|
1338
|
+
),
|
|
1339
|
+
/* @__PURE__ */ t(
|
|
1340
|
+
"span",
|
|
1341
|
+
{
|
|
1342
|
+
className: `w-1.5 h-1.5 rounded-full shrink-0 ${k.status === "success" ? "bg-dt-success" : k.status === "error" ? "bg-dt-error" : "bg-dt-warning animate-pulse"}`,
|
|
1343
|
+
title: k.status
|
|
1344
|
+
}
|
|
1345
|
+
),
|
|
1346
|
+
/* @__PURE__ */ n("span", { className: "flex items-center gap-0 min-w-0 flex-1 overflow-hidden", children: [
|
|
1347
|
+
/* @__PURE__ */ t(
|
|
1348
|
+
"span",
|
|
1349
|
+
{
|
|
1350
|
+
className: `font-mono text-[12px] text-dt-text-secondary truncate min-w-0 ${_ ? "max-w-[44%]" : ""}`,
|
|
1351
|
+
children: k.udfPath
|
|
1352
|
+
}
|
|
1353
|
+
),
|
|
1354
|
+
"args" in k && _ && /* @__PURE__ */ n(
|
|
1355
|
+
"span",
|
|
1356
|
+
{
|
|
1357
|
+
className: "font-mono text-[11px] text-dt-text-muted min-w-0 flex-1 truncate max-w-[min(62vw,760px)]",
|
|
1358
|
+
title: tt(A, 460),
|
|
1359
|
+
children: [
|
|
1360
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-muted/60", children: "(" }),
|
|
1361
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: wt(A, ve) }),
|
|
1362
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-muted/60", children: ")" })
|
|
1363
|
+
]
|
|
1364
|
+
}
|
|
1365
|
+
)
|
|
1366
|
+
] }),
|
|
1367
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-2 shrink-0 text-[11px] text-dt-text-muted ml-auto", children: [
|
|
1368
|
+
B && /* @__PURE__ */ n("span", { className: "text-dt-info text-[10px]", title: "Subscription update", children: [
|
|
1369
|
+
"↻",
|
|
1370
|
+
Q.updateCount
|
|
1371
|
+
] }),
|
|
1372
|
+
k.status === "success" && "result" in k && k.result !== void 0 && /* @__PURE__ */ n("span", { className: "text-dt-text-muted/80", title: tt(k.result), children: [
|
|
1373
|
+
"↓",
|
|
1374
|
+
K(k.result)
|
|
1375
|
+
] }),
|
|
1376
|
+
G !== null && (!B || G > 100) && /* @__PURE__ */ n(
|
|
1377
|
+
"span",
|
|
1378
|
+
{
|
|
1379
|
+
className: "font-mono text-dt-text-muted",
|
|
1380
|
+
title: dt ? `E2E ${R(G)} = Net ${R(ot)} + Sim ${R(nt)}` : `Net ${R(G)}`,
|
|
1381
|
+
children: [
|
|
1382
|
+
B && "Δ",
|
|
1383
|
+
dt ? `E2E ${R(G)}` : `Net ${R(G)}`
|
|
1384
|
+
]
|
|
1385
|
+
}
|
|
1386
|
+
),
|
|
1387
|
+
k.status === "pending" && /* @__PURE__ */ t("span", { className: "font-mono text-dt-warning/90 text-[10px] uppercase", children: "pending" }),
|
|
1388
|
+
dt && /* @__PURE__ */ n(
|
|
1389
|
+
"span",
|
|
1390
|
+
{
|
|
1391
|
+
className: "font-mono text-dt-text-muted/85 text-[10px]",
|
|
1392
|
+
title: "Server/network round-trip",
|
|
1393
|
+
children: [
|
|
1394
|
+
"Net ",
|
|
1395
|
+
R(ot)
|
|
1396
|
+
]
|
|
1397
|
+
}
|
|
1398
|
+
),
|
|
1399
|
+
nt > 0 && /* @__PURE__ */ n(
|
|
1400
|
+
"span",
|
|
1401
|
+
{
|
|
1402
|
+
className: "font-mono text-dt-warning/90 text-[10px]",
|
|
1403
|
+
title: "Devtools simulated client delivery delay",
|
|
1404
|
+
children: [
|
|
1405
|
+
"Sim +",
|
|
1406
|
+
R(nt)
|
|
1407
|
+
]
|
|
1408
|
+
}
|
|
1409
|
+
),
|
|
1410
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-muted/60 font-mono", children: _t(k.timestamp) })
|
|
1411
|
+
] })
|
|
1412
|
+
] })
|
|
1413
|
+
},
|
|
1414
|
+
e.id
|
|
1415
|
+
);
|
|
1416
|
+
}),
|
|
1417
|
+
H && /* @__PURE__ */ n("div", { className: "sticky bottom-0 z-[2] px-3 py-2 border-t border-dt-border-light/40 bg-dt-bg-secondary/85 backdrop-blur-sm flex items-center justify-between gap-2", children: [
|
|
1418
|
+
/* @__PURE__ */ n("span", { className: "text-[10px] text-dt-text-muted", children: [
|
|
1419
|
+
"Showing ",
|
|
1420
|
+
S.length,
|
|
1421
|
+
" of ",
|
|
1422
|
+
M
|
|
1423
|
+
] }),
|
|
1424
|
+
/* @__PURE__ */ n(
|
|
1425
|
+
"button",
|
|
1426
|
+
{
|
|
1427
|
+
type: "button",
|
|
1428
|
+
className: "px-2 py-1 text-[10px] font-semibold rounded border border-dt-border-light text-dt-text-secondary bg-dt-bg-tertiary hover:bg-white/10 hover:border-dt-border transition-colors",
|
|
1429
|
+
onClick: () => y((e) => Math.min(e + te, M)),
|
|
1430
|
+
children: [
|
|
1431
|
+
"Load ",
|
|
1432
|
+
Math.min(te, M - S.length),
|
|
1433
|
+
" more"
|
|
1434
|
+
]
|
|
1435
|
+
}
|
|
1436
|
+
)
|
|
1437
|
+
] })
|
|
1438
|
+
] }),
|
|
1439
|
+
D && /* @__PURE__ */ n("div", { className: "w-[320px] border-l border-dt-border overflow-y-auto bg-dt-bg-secondary/50 animate-[dt-slide-in_0.2s_ease-out] shrink-0", children: [
|
|
1440
|
+
/* @__PURE__ */ n("div", { className: "flex items-center justify-between px-3 py-2 border-b border-dt-border-light", children: [
|
|
1441
|
+
/* @__PURE__ */ t("h4", { className: "text-[12px] font-semibold text-dt-text-secondary m-0", children: "Details" }),
|
|
1442
|
+
/* @__PURE__ */ t(
|
|
1443
|
+
"button",
|
|
1444
|
+
{
|
|
1445
|
+
className: "p-1 bg-transparent border-none text-dt-text-muted cursor-pointer rounded hover:bg-white/5 hover:text-dt-text-tertiary",
|
|
1446
|
+
onClick: () => h(null),
|
|
1447
|
+
children: /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ t("path", { d: "M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z" }) })
|
|
1448
|
+
}
|
|
1449
|
+
)
|
|
1450
|
+
] }),
|
|
1451
|
+
/* @__PURE__ */ n("div", { className: "p-3 flex flex-col gap-3", children: [
|
|
1452
|
+
D.type === "query" && o.getSubscription(D.queryId) && (() => {
|
|
1453
|
+
const e = o.getSubscription(D.queryId);
|
|
1454
|
+
if (e.updateCount > 0) {
|
|
1455
|
+
const w = _t(e.addedAt);
|
|
1456
|
+
return /* @__PURE__ */ n("div", { className: "flex items-center gap-1 flex-wrap bg-dt-info/5 border border-dt-info/20 rounded-md px-2 py-1 text-[10px] font-mono", children: [
|
|
1457
|
+
/* @__PURE__ */ t("span", { className: "text-dt-info font-semibold uppercase tracking-wide", children: "Sub" }),
|
|
1458
|
+
/* @__PURE__ */ n("span", { className: "text-dt-text-secondary", children: [
|
|
1459
|
+
"↻",
|
|
1460
|
+
e.updateCount
|
|
1461
|
+
] }),
|
|
1462
|
+
/* @__PURE__ */ n("span", { className: "text-dt-text-muted/70", children: [
|
|
1463
|
+
"since ",
|
|
1464
|
+
xt(e.addedAt)
|
|
1465
|
+
] }),
|
|
1466
|
+
/* @__PURE__ */ t(
|
|
1467
|
+
"span",
|
|
1468
|
+
{
|
|
1469
|
+
className: "ml-auto text-dt-text-muted/60",
|
|
1470
|
+
title: new Date(e.addedAt).toLocaleString(),
|
|
1471
|
+
children: w
|
|
1472
|
+
}
|
|
1473
|
+
)
|
|
1474
|
+
] });
|
|
1475
|
+
}
|
|
1476
|
+
return null;
|
|
1477
|
+
})(),
|
|
1478
|
+
E && (() => {
|
|
1479
|
+
const e = E.udfPath, v = E.componentPath, w = new Date(E.timestamp), q = Qt(E), k = It(E), A = Z(E), _ = rt(E), Q = k !== null ? R(k) : null, B = A !== null ? R(A) : null, G = _ > 0 ? R(_) : null, ot = lt(E.args), nt = E.status === "success" && "result" in E && E.result !== void 0 ? E.result : void 0;
|
|
1480
|
+
return /* @__PURE__ */ n(X, { children: [
|
|
1481
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: [
|
|
1482
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
1483
|
+
/* @__PURE__ */ t(
|
|
1484
|
+
"span",
|
|
1485
|
+
{
|
|
1486
|
+
className: `text-[11px] font-bold uppercase tracking-wider ${E.type === "query" ? "text-dt-query" : E.type === "mutation" ? "text-dt-mutation" : "text-dt-action"}`,
|
|
1487
|
+
children: E.type === "query" ? "Query" : E.type === "mutation" ? "Mutation" : "Action"
|
|
1488
|
+
}
|
|
1489
|
+
),
|
|
1490
|
+
/* @__PURE__ */ n(
|
|
1491
|
+
"span",
|
|
1492
|
+
{
|
|
1493
|
+
className: `text-[10px] font-semibold uppercase flex items-center gap-1 ${E.status === "success" ? "text-dt-success" : E.status === "error" ? "text-dt-error" : "text-dt-warning"}`,
|
|
1494
|
+
children: [
|
|
1495
|
+
/* @__PURE__ */ t(Ct, { status: E.status }),
|
|
1496
|
+
E.status?.toUpperCase() ?? "PENDING"
|
|
1497
|
+
]
|
|
1498
|
+
}
|
|
1499
|
+
),
|
|
1500
|
+
/* @__PURE__ */ t("span", { className: "text-[10px] text-dt-text-muted ml-auto", title: w.toLocaleString(), children: xt(E.timestamp) })
|
|
1501
|
+
] }),
|
|
1502
|
+
/* @__PURE__ */ t("div", { className: "font-mono text-[12px] text-dt-text truncate", title: e, children: e || "Unknown function" }),
|
|
1503
|
+
/* @__PURE__ */ n("div", { className: "flex flex-wrap gap-1", children: [
|
|
1504
|
+
q && /* @__PURE__ */ t("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: q }),
|
|
1505
|
+
Q && /* @__PURE__ */ n("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: [
|
|
1506
|
+
"E2E ",
|
|
1507
|
+
Q
|
|
1508
|
+
] }),
|
|
1509
|
+
G && B && /* @__PURE__ */ n("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: [
|
|
1510
|
+
"Net ",
|
|
1511
|
+
B
|
|
1512
|
+
] }),
|
|
1513
|
+
G && /* @__PURE__ */ n("span", { className: "px-1.5 py-0.5 bg-dt-warning/15 border border-dt-warning/20 rounded text-[10px] text-dt-warning font-mono", children: [
|
|
1514
|
+
"Sim +",
|
|
1515
|
+
G
|
|
1516
|
+
] })
|
|
1517
|
+
] }),
|
|
1518
|
+
v && /* @__PURE__ */ t("div", { className: "text-[10px] text-dt-text-muted/60 font-mono truncate", title: v, children: v }),
|
|
1519
|
+
E.type === "query" && E.triggeredBy && /* @__PURE__ */ n(
|
|
1520
|
+
"button",
|
|
1521
|
+
{
|
|
1522
|
+
type: "button",
|
|
1523
|
+
className: "flex items-center gap-1.5 px-2 py-1 bg-dt-mutation/10 border border-dt-mutation/20 rounded text-[10px] text-dt-mutation hover:bg-dt-mutation/20 transition-colors cursor-pointer",
|
|
1524
|
+
title: "Jump to triggering operation",
|
|
1525
|
+
onClick: () => o.setFocusedEventId(E.triggeredBy),
|
|
1526
|
+
children: [
|
|
1527
|
+
/* @__PURE__ */ n("span", { children: [
|
|
1528
|
+
"Triggered by ",
|
|
1529
|
+
ye(E.triggeredBy)
|
|
1530
|
+
] }),
|
|
1531
|
+
/* @__PURE__ */ t("span", { className: "text-dt-mutation/70", children: "→" })
|
|
1532
|
+
]
|
|
1533
|
+
}
|
|
1534
|
+
)
|
|
1535
|
+
] }),
|
|
1536
|
+
"args" in E && ot !== void 0 && /* @__PURE__ */ t(gt, { data: ot, label: "Arguments", maxHeight: 200 }),
|
|
1537
|
+
nt !== void 0 && /* @__PURE__ */ t(gt, { data: nt, label: "Result", maxHeight: 200 }),
|
|
1538
|
+
E.status === "error" && "error" in E && E.error && /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
|
|
1539
|
+
/* @__PURE__ */ t("div", { className: "text-[11px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: "Error" }),
|
|
1540
|
+
/* @__PURE__ */ t("div", { className: "text-[12px] text-dt-error bg-dt-error/10 rounded px-2 py-1.5 font-mono break-words", children: E.error })
|
|
1541
|
+
] }),
|
|
1542
|
+
E.logLines && E.logLines.length > 0 && /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
|
|
1543
|
+
/* @__PURE__ */ t("div", { className: "text-[11px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: "Console Output" }),
|
|
1544
|
+
/* @__PURE__ */ t("div", { className: "bg-zinc-950/50 rounded border border-dt-border-light p-2 font-mono text-[11px] max-h-[150px] overflow-y-auto", children: E.logLines.map((et, ht) => /* @__PURE__ */ t("div", { className: "text-dt-text-muted leading-relaxed", children: et }, ht)) })
|
|
1545
|
+
] })
|
|
1546
|
+
] });
|
|
1547
|
+
})(),
|
|
1548
|
+
z && /* @__PURE__ */ n(X, { children: [
|
|
1549
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: [
|
|
1550
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
1551
|
+
/* @__PURE__ */ t("span", { className: "text-[11px] font-bold uppercase tracking-wider text-dt-warning", children: "Connection" }),
|
|
1552
|
+
/* @__PURE__ */ n(
|
|
1553
|
+
"span",
|
|
1554
|
+
{
|
|
1555
|
+
className: `text-[10px] font-semibold uppercase flex items-center gap-1 ${z.status === "success" ? "text-dt-success" : z.status === "error" ? "text-dt-error" : "text-dt-warning"}`,
|
|
1556
|
+
children: [
|
|
1557
|
+
/* @__PURE__ */ t(Ct, { status: z.status }),
|
|
1558
|
+
z.status.toUpperCase()
|
|
1559
|
+
]
|
|
1560
|
+
}
|
|
1561
|
+
),
|
|
1562
|
+
/* @__PURE__ */ t("span", { className: "text-[10px] text-dt-text-muted ml-auto", title: new Date(z.timestamp).toLocaleString(), children: xt(z.timestamp) })
|
|
1563
|
+
] }),
|
|
1564
|
+
/* @__PURE__ */ n("div", { className: "font-mono text-[12px] text-dt-text truncate", children: [
|
|
1565
|
+
z.direction === "client" ? "→" : "←",
|
|
1566
|
+
" ",
|
|
1567
|
+
z.messageType
|
|
1568
|
+
] }),
|
|
1569
|
+
/* @__PURE__ */ n("div", { className: "flex flex-wrap gap-1", children: [
|
|
1570
|
+
/* @__PURE__ */ t("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: Lt(z) }),
|
|
1571
|
+
z.tokenType && /* @__PURE__ */ t("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: z.tokenType })
|
|
1572
|
+
] })
|
|
1573
|
+
] }),
|
|
1574
|
+
z.details !== void 0 && /* @__PURE__ */ t(gt, { data: z.details, label: "Details", maxHeight: 220 }),
|
|
1575
|
+
z.error && /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
|
|
1576
|
+
/* @__PURE__ */ t("div", { className: "text-[11px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: "Error" }),
|
|
1577
|
+
/* @__PURE__ */ t("div", { className: "text-[12px] text-dt-error bg-dt-error/10 rounded px-2 py-1.5 font-mono break-words", children: z.error })
|
|
1578
|
+
] })
|
|
1579
|
+
] })
|
|
1580
|
+
] })
|
|
1581
|
+
] })
|
|
1582
|
+
] }),
|
|
1583
|
+
m && (() => {
|
|
1584
|
+
const e = m.event;
|
|
1585
|
+
if (e.type === "auth") {
|
|
1586
|
+
const J = e.details !== void 0 ? tt(e.details, 200) : null, st = e.error && e.error.length > 160 ? `${e.error.slice(0, 157)}…` : e.error;
|
|
1587
|
+
return /* @__PURE__ */ n(
|
|
1588
|
+
"div",
|
|
1589
|
+
{
|
|
1590
|
+
className: "fixed z-[9999999] w-[300px] bg-zinc-900/[0.98] border border-dt-border rounded-lg shadow-2xl p-3 flex flex-col gap-2 pointer-events-none animate-[dt-fade-in_0.15s_ease-out] backdrop-blur-lg",
|
|
1591
|
+
style: { top: m.y, left: m.x },
|
|
1592
|
+
role: "tooltip",
|
|
1593
|
+
children: [
|
|
1594
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
1595
|
+
/* @__PURE__ */ t("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-[3px] text-[9px] font-bold shrink-0 bg-dt-warning/20 text-dt-warning", children: "C" }),
|
|
1596
|
+
/* @__PURE__ */ n("span", { className: "font-mono text-[12px] text-dt-text truncate flex-1", children: [
|
|
1597
|
+
e.direction === "client" ? "→" : "←",
|
|
1598
|
+
" ",
|
|
1599
|
+
e.messageType
|
|
1600
|
+
] }),
|
|
1601
|
+
/* @__PURE__ */ n(
|
|
1602
|
+
"span",
|
|
1603
|
+
{
|
|
1604
|
+
className: `text-[9px] font-bold uppercase flex items-center gap-0.5 px-1.5 py-0.5 rounded-full ${e.status === "success" ? "bg-dt-success/15 text-dt-success" : e.status === "error" ? "bg-dt-error/15 text-dt-error" : "bg-dt-warning/15 text-dt-warning"}`,
|
|
1605
|
+
children: [
|
|
1606
|
+
/* @__PURE__ */ t(Ct, { status: e.status }),
|
|
1607
|
+
e.status.toUpperCase()
|
|
1608
|
+
]
|
|
1609
|
+
}
|
|
1610
|
+
)
|
|
1611
|
+
] }),
|
|
1612
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-1 flex-wrap", children: [
|
|
1613
|
+
/* @__PURE__ */ t("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: xt(e.timestamp) }),
|
|
1614
|
+
/* @__PURE__ */ t("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: Lt(e) }),
|
|
1615
|
+
e.tokenType && /* @__PURE__ */ t("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: e.tokenType })
|
|
1616
|
+
] }),
|
|
1617
|
+
J && /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
|
|
1618
|
+
/* @__PURE__ */ t("span", { className: "text-[10px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: "Details" }),
|
|
1619
|
+
/* @__PURE__ */ t("pre", { className: "font-mono text-[10px] text-dt-text-muted bg-zinc-950/50 rounded p-1.5 overflow-hidden max-h-[100px] whitespace-pre-wrap break-all m-0", children: /* @__PURE__ */ t(Ot, { json: J }) })
|
|
1620
|
+
] }),
|
|
1621
|
+
st && /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
|
|
1622
|
+
/* @__PURE__ */ t("span", { className: "text-[10px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: "Error" }),
|
|
1623
|
+
/* @__PURE__ */ t("span", { className: "text-[11px] text-dt-error", title: e.error, children: st })
|
|
1624
|
+
] })
|
|
1625
|
+
]
|
|
1626
|
+
}
|
|
1627
|
+
);
|
|
1628
|
+
}
|
|
1629
|
+
const v = Lt(e), w = It(e), q = Z(e), k = rt(e), A = w !== null ? R(w) : null, _ = q !== null ? R(q) : null, Q = k > 0 ? R(k) : null, B = lt(e.args), G = B !== void 0 ? tt(B) : null, ot = B !== void 0 ? K(B) : null, nt = B !== void 0 ? tt(B) : "", et = e.status === "success" && e.result !== void 0 ? e.result : void 0, ht = et ? tt(et) : null, dt = et ? tt(et) : "", yt = et ? K(et) : null, kt = e.status === "error" && e.error ? e.error.length > 160 ? `${e.error.slice(0, 157)}…` : e.error : null;
|
|
1630
|
+
return /* @__PURE__ */ n(
|
|
1631
|
+
"div",
|
|
1632
|
+
{
|
|
1633
|
+
className: "fixed z-[9999999] w-[300px] bg-zinc-900/[0.98] border border-dt-border rounded-lg shadow-2xl p-3 flex flex-col gap-2 pointer-events-none animate-[dt-fade-in_0.15s_ease-out] backdrop-blur-lg",
|
|
1634
|
+
style: { top: m.y, left: m.x },
|
|
1635
|
+
role: "tooltip",
|
|
1636
|
+
children: [
|
|
1637
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
1638
|
+
/* @__PURE__ */ t(
|
|
1639
|
+
"span",
|
|
1640
|
+
{
|
|
1641
|
+
className: `inline-flex items-center justify-center w-4 h-4 rounded-[3px] text-[9px] font-bold shrink-0 ${e.type === "query" ? "bg-dt-query/20 text-dt-query shadow-[0_1px_2px_rgba(96,165,250,0.35)]" : e.type === "mutation" ? "bg-dt-mutation/20 text-dt-mutation shadow-[0_1px_2px_rgba(167,139,250,0.35)]" : "bg-dt-action/20 text-dt-action shadow-[0_1px_2px_rgba(52,211,153,0.35)]"}`,
|
|
1642
|
+
children: e.type === "query" ? "Q" : e.type === "mutation" ? "M" : "A"
|
|
1643
|
+
}
|
|
1644
|
+
),
|
|
1645
|
+
/* @__PURE__ */ t("span", { className: "font-mono text-[12px] text-dt-text truncate flex-1", title: e.udfPath, children: e.udfPath }),
|
|
1646
|
+
/* @__PURE__ */ n(
|
|
1647
|
+
"span",
|
|
1648
|
+
{
|
|
1649
|
+
className: `text-[9px] font-bold uppercase flex items-center gap-0.5 px-1.5 py-0.5 rounded-full ${e.status === "success" ? "bg-dt-success/15 text-dt-success" : e.status === "error" ? "bg-dt-error/15 text-dt-error" : "bg-dt-warning/15 text-dt-warning"}`,
|
|
1650
|
+
children: [
|
|
1651
|
+
/* @__PURE__ */ t(Ct, { status: e.status }),
|
|
1652
|
+
e.status?.toUpperCase() ?? "PENDING"
|
|
1653
|
+
]
|
|
1654
|
+
}
|
|
1655
|
+
)
|
|
1656
|
+
] }),
|
|
1657
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-1 flex-wrap", children: [
|
|
1658
|
+
/* @__PURE__ */ t("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: xt(e.timestamp) }),
|
|
1659
|
+
A && /* @__PURE__ */ n("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: [
|
|
1660
|
+
"E2E ",
|
|
1661
|
+
A
|
|
1662
|
+
] }),
|
|
1663
|
+
Q && _ && /* @__PURE__ */ n("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: [
|
|
1664
|
+
"Net ",
|
|
1665
|
+
_
|
|
1666
|
+
] }),
|
|
1667
|
+
Q && /* @__PURE__ */ n("span", { className: "px-1.5 py-0.5 bg-dt-warning/15 border border-dt-warning/20 rounded text-[10px] text-dt-warning font-mono", children: [
|
|
1668
|
+
"Sim +",
|
|
1669
|
+
Q
|
|
1670
|
+
] }),
|
|
1671
|
+
/* @__PURE__ */ t("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: v }),
|
|
1672
|
+
e.logLines && e.logLines.length > 0 && /* @__PURE__ */ n("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: [
|
|
1673
|
+
"Logs ",
|
|
1674
|
+
e.logLines.length
|
|
1675
|
+
] })
|
|
1676
|
+
] }),
|
|
1677
|
+
e.componentPath && /* @__PURE__ */ t("div", { className: "text-[10px] text-dt-text-muted/60 font-mono truncate", title: e.componentPath, children: e.componentPath }),
|
|
1678
|
+
B !== void 0 && /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
|
|
1679
|
+
/* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
|
|
1680
|
+
/* @__PURE__ */ t("span", { className: "text-[10px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: "Args" }),
|
|
1681
|
+
ot && /* @__PURE__ */ t("span", { className: "text-[9px] text-dt-text-muted/60 font-mono", children: ot })
|
|
1682
|
+
] }),
|
|
1683
|
+
/* @__PURE__ */ t("pre", { className: "font-mono text-[10px] text-dt-text-muted bg-zinc-950/50 rounded p-1.5 overflow-hidden max-h-[80px] whitespace-pre-wrap break-all m-0", title: G ?? void 0, children: /* @__PURE__ */ t(Ot, { json: nt }) })
|
|
1684
|
+
] }),
|
|
1685
|
+
et !== void 0 && /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
|
|
1686
|
+
/* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
|
|
1687
|
+
/* @__PURE__ */ t("span", { className: "text-[10px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: "Result" }),
|
|
1688
|
+
yt && /* @__PURE__ */ t("span", { className: "text-[9px] text-dt-text-muted/60 font-mono", children: yt })
|
|
1689
|
+
] }),
|
|
1690
|
+
/* @__PURE__ */ t("pre", { className: "font-mono text-[10px] text-dt-text-muted bg-zinc-950/50 rounded p-1.5 overflow-hidden max-h-[80px] whitespace-pre-wrap break-all m-0", title: ht ?? void 0, children: /* @__PURE__ */ t(Ot, { json: dt }) })
|
|
1691
|
+
] }),
|
|
1692
|
+
kt && /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
|
|
1693
|
+
/* @__PURE__ */ t("span", { className: "text-[10px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: "Error" }),
|
|
1694
|
+
/* @__PURE__ */ t("span", { className: "text-[11px] text-dt-error", title: e.error, children: kt })
|
|
1695
|
+
] })
|
|
1696
|
+
]
|
|
1697
|
+
}
|
|
1698
|
+
);
|
|
1699
|
+
})(),
|
|
1700
|
+
$ && /* @__PURE__ */ t(
|
|
1701
|
+
Kt,
|
|
1702
|
+
{
|
|
1703
|
+
x: $.x,
|
|
1704
|
+
y: $.y,
|
|
1705
|
+
items: $.items,
|
|
1706
|
+
onClose: () => I(null)
|
|
1707
|
+
}
|
|
1708
|
+
)
|
|
1709
|
+
] });
|
|
1710
|
+
}
|
|
1711
|
+
function Ot({ json: o }) {
|
|
1712
|
+
const r = it(() => o.replace(
|
|
1713
|
+
/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)/g,
|
|
1714
|
+
(a) => {
|
|
1715
|
+
let s = "cdv-json-value";
|
|
1716
|
+
return /^"/.test(a) ? /:$/.test(a) ? s = "cdv-json-key" : s = "cdv-json-string" : /true|false/.test(a) ? s = "cdv-json-boolean" : /null/.test(a) ? s = "cdv-json-null" : s = "cdv-json-number", `<span class="${s}">${a}</span>`;
|
|
1717
|
+
}
|
|
1718
|
+
), [o]);
|
|
1719
|
+
return /* @__PURE__ */ t("span", { dangerouslySetInnerHTML: { __html: r } });
|
|
1720
|
+
}
|
|
1721
|
+
function Ct({ status: o }) {
|
|
1722
|
+
return o === "success" ? /* @__PURE__ */ t("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "currentColor", className: "text-dt-success", children: /* @__PURE__ */ t("path", { d: "M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z" }) }) : o === "error" ? /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "currentColor", className: "text-dt-error", children: [
|
|
1723
|
+
/* @__PURE__ */ t("path", { d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" }),
|
|
1724
|
+
/* @__PURE__ */ t("path", { d: "M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z" })
|
|
1725
|
+
] }) : /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "currentColor", className: "text-dt-warning", children: [
|
|
1726
|
+
/* @__PURE__ */ t("circle", { cx: "8", cy: "8", r: "7", stroke: "currentColor", strokeWidth: "1", fill: "none" }),
|
|
1727
|
+
/* @__PURE__ */ t("circle", { cx: "8", cy: "8", r: "2" })
|
|
1728
|
+
] });
|
|
1729
|
+
}
|
|
1730
|
+
const ee = {
|
|
1731
|
+
maxStringLength: 96,
|
|
1732
|
+
stringTailLength: 20,
|
|
1733
|
+
maxArrayItems: 4,
|
|
1734
|
+
maxObjectEntries: 4,
|
|
1735
|
+
maxDepth: 3
|
|
1736
|
+
};
|
|
1737
|
+
function Ne({ eventStore: o }) {
|
|
1738
|
+
const [r, a] = L([]), [s, l] = L(null), [u, c] = L(0), [b, N] = L("all"), [y, D] = L(""), [h, x] = L(null), [f, m] = L(null), g = ft(null);
|
|
1739
|
+
U(() => {
|
|
1740
|
+
const d = () => {
|
|
1741
|
+
a(o.getActiveSubscriptions());
|
|
1742
|
+
}, p = o.subscribe(d);
|
|
1743
|
+
return d(), p;
|
|
1744
|
+
}, [o]);
|
|
1745
|
+
const $ = it(() => {
|
|
1746
|
+
let d = r;
|
|
1747
|
+
return b !== "all" && (d = d.filter((p) => p.status === b)), y && (d = d.filter(
|
|
1748
|
+
(p) => p.udfPath.toLowerCase().includes(y.toLowerCase()) || p.componentPath?.toLowerCase().includes(y.toLowerCase())
|
|
1749
|
+
)), [...d].sort((p, i) => p.lastUpdate !== i.lastUpdate ? i.lastUpdate - p.lastUpdate : p.addedAt !== i.addedAt ? i.addedAt - p.addedAt : i.queryId - p.queryId);
|
|
1750
|
+
}, [r, b, y]);
|
|
1751
|
+
U(() => {
|
|
1752
|
+
const d = (p) => {
|
|
1753
|
+
if ($t()) {
|
|
1754
|
+
if ((p.metaKey || p.ctrlKey) && p.key === "k") {
|
|
1755
|
+
p.preventDefault(), g.current?.focus();
|
|
1756
|
+
return;
|
|
1757
|
+
}
|
|
1758
|
+
if (p.key === "Escape") {
|
|
1759
|
+
p.preventDefault(), s !== null ? l(null) : (b !== "all" || y) && (N("all"), D(""));
|
|
1760
|
+
return;
|
|
1761
|
+
}
|
|
1762
|
+
if (ie() !== g.current && $.length !== 0) {
|
|
1763
|
+
if (p.key === "ArrowDown")
|
|
1764
|
+
p.preventDefault(), c((i) => Math.min(i + 1, $.length - 1));
|
|
1765
|
+
else if (p.key === "ArrowUp")
|
|
1766
|
+
p.preventDefault(), c((i) => Math.max(i - 1, 0));
|
|
1767
|
+
else if (p.key === "Enter" || p.key === " ") {
|
|
1768
|
+
p.preventDefault();
|
|
1769
|
+
const i = $[u];
|
|
1770
|
+
i && l(s === i.queryId ? null : i.queryId);
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
}
|
|
1774
|
+
};
|
|
1775
|
+
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
1776
|
+
}, [$, u, s, b, y]), U(() => {
|
|
1777
|
+
c(0);
|
|
1778
|
+
}, [b, y]);
|
|
1779
|
+
const I = F((d) => {
|
|
1780
|
+
P(d);
|
|
1781
|
+
}, []), T = F((d, p) => {
|
|
1782
|
+
if (typeof window > "u") return null;
|
|
1783
|
+
const i = 8, C = 300, S = window.innerWidth, M = window.innerHeight, H = Math.min(260, M - i * 2);
|
|
1784
|
+
let j = p.right + i;
|
|
1785
|
+
j + C > S - i && (j = p.left - C - i), j < i && (j = Math.max(i, S - C - i));
|
|
1786
|
+
let Y = p.top + p.height / 2 - H / 2;
|
|
1787
|
+
return Y < i && (Y = i), Y + H > M - i && (Y = Math.max(i, M - i - H)), { subscription: d, x: j, y: Y };
|
|
1788
|
+
}, []), E = F((d) => {
|
|
1789
|
+
if (d == null) return "0";
|
|
1790
|
+
const p = JSON.stringify(d), i = new Blob([p]).size;
|
|
1791
|
+
return i < 1024 ? `${i}B` : i < 1024 * 1024 ? `${(i / 1024).toFixed(1)}KB` : `${(i / (1024 * 1024)).toFixed(1)}MB`;
|
|
1792
|
+
}, []), z = F(
|
|
1793
|
+
(d) => {
|
|
1794
|
+
const p = lt(d.args), i = p != null, C = d.currentValue !== void 0, S = [
|
|
1795
|
+
{ label: "Copy Function Path", action: () => P(d.udfPath), shortcut: "⌘C" }
|
|
1796
|
+
];
|
|
1797
|
+
return i && S.push({
|
|
1798
|
+
label: "Copy Arguments",
|
|
1799
|
+
action: () => P(JSON.stringify(p, null, 2))
|
|
1800
|
+
}), C && S.push({
|
|
1801
|
+
label: "Copy Current Value",
|
|
1802
|
+
action: () => P(JSON.stringify(d.currentValue, null, 2))
|
|
1803
|
+
}), S.push({
|
|
1804
|
+
label: "Filter by Function",
|
|
1805
|
+
action: () => D(d.udfPath),
|
|
1806
|
+
separator: !0
|
|
1807
|
+
}), S.push({
|
|
1808
|
+
label: "Copy Query ID",
|
|
1809
|
+
action: () => P(String(d.queryId))
|
|
1810
|
+
}), S;
|
|
1811
|
+
},
|
|
1812
|
+
[]
|
|
1813
|
+
), O = (d) => {
|
|
1814
|
+
const p = Math.floor((Date.now() - d) / 1e3);
|
|
1815
|
+
if (p < 60) return `${p}s ago`;
|
|
1816
|
+
const i = Math.floor(p / 60);
|
|
1817
|
+
return i < 60 ? `${i}m ago` : `${Math.floor(i / 60)}h ago`;
|
|
1818
|
+
};
|
|
1819
|
+
return /* @__PURE__ */ n("div", { className: "flex flex-col h-full overflow-hidden", children: [
|
|
1820
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-2 px-3 py-1.5 border-b border-dt-border-light", children: [
|
|
1821
|
+
/* @__PURE__ */ n("div", { className: "flex gap-[3px] bg-zinc-900/50 p-[3px] rounded-md border border-zinc-700/30", children: [
|
|
1822
|
+
/* @__PURE__ */ t(
|
|
1823
|
+
"button",
|
|
1824
|
+
{
|
|
1825
|
+
className: `px-2 py-1 text-[11px] font-mono font-bold uppercase tracking-wide bg-transparent border-none rounded cursor-pointer transition-all hover:bg-white/5 hover:text-dt-text-tertiary ${b === "all" ? "bg-zinc-500/25 text-dt-text-tertiary shadow-[0_0_0_1px_rgba(161,161,170,0.4)]" : "text-dt-text-muted"}`,
|
|
1826
|
+
onClick: () => N("all"),
|
|
1827
|
+
"aria-label": "Show all subscriptions",
|
|
1828
|
+
"aria-pressed": b === "all",
|
|
1829
|
+
children: "All"
|
|
1830
|
+
}
|
|
1831
|
+
),
|
|
1832
|
+
/* @__PURE__ */ t(
|
|
1833
|
+
"button",
|
|
1834
|
+
{
|
|
1835
|
+
className: `px-2 py-1 text-[11px] font-mono font-bold uppercase tracking-wide bg-transparent border-none rounded cursor-pointer transition-all ${b === "active" ? "bg-dt-query/25 text-dt-query shadow-[0_0_0_1px_rgba(96,165,250,0.5)]" : "text-dt-text-muted hover:bg-dt-query/15 hover:text-dt-query"}`,
|
|
1836
|
+
onClick: () => N("active"),
|
|
1837
|
+
"aria-label": "Show active subscriptions",
|
|
1838
|
+
"aria-pressed": b === "active",
|
|
1839
|
+
children: "Active"
|
|
1840
|
+
}
|
|
1841
|
+
),
|
|
1842
|
+
/* @__PURE__ */ t(
|
|
1843
|
+
"button",
|
|
1844
|
+
{
|
|
1845
|
+
className: `px-2 py-1 text-[11px] font-mono font-bold uppercase tracking-wide bg-transparent border-none rounded cursor-pointer transition-all ${b === "error" ? "bg-dt-error/25 text-dt-error shadow-[0_0_0_1px_rgba(239,68,68,0.5)]" : "text-dt-text-muted hover:bg-dt-error/15 hover:text-dt-error"}`,
|
|
1846
|
+
onClick: () => N("error"),
|
|
1847
|
+
"aria-label": "Show error subscriptions",
|
|
1848
|
+
"aria-pressed": b === "error",
|
|
1849
|
+
children: "Errors"
|
|
1850
|
+
}
|
|
1851
|
+
)
|
|
1852
|
+
] }),
|
|
1853
|
+
/* @__PURE__ */ t(
|
|
1854
|
+
Ut,
|
|
1855
|
+
{
|
|
1856
|
+
ref: g,
|
|
1857
|
+
value: y,
|
|
1858
|
+
onValueChange: D,
|
|
1859
|
+
onClear: () => D(""),
|
|
1860
|
+
placeholder: "Search subscriptions... (Cmd/Ctrl+K)",
|
|
1861
|
+
className: "stretch"
|
|
1862
|
+
}
|
|
1863
|
+
)
|
|
1864
|
+
] }),
|
|
1865
|
+
/* @__PURE__ */ n("div", { className: "flex-1 overflow-y-auto", children: [
|
|
1866
|
+
$.length === 0 && /* @__PURE__ */ n("div", { className: "flex flex-col items-center justify-center py-12 text-dt-text-muted gap-2", children: [
|
|
1867
|
+
/* @__PURE__ */ t("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: /* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "10", strokeWidth: "1.5" }) }),
|
|
1868
|
+
/* @__PURE__ */ t("p", { children: r.length === 0 ? "No active subscriptions" : b !== "all" || y ? "No subscriptions match your filters" : "No active subscriptions" }),
|
|
1869
|
+
b !== "all" || y ? /* @__PURE__ */ t("p", { className: "text-[11px] text-dt-text-muted/60", children: "Try adjusting your filters or search" }) : null
|
|
1870
|
+
] }),
|
|
1871
|
+
$.map((d, p) => {
|
|
1872
|
+
const i = s === d.queryId, C = p === u, S = d.status === "error" ? "error" : "success", M = lt(d.args), H = M != null, j = JSON.stringify(M ?? null, null, 2), Y = `Subscription ${d.queryId} ${d.udfPath} ${d.status}${H ? ` with args ${wt(M, ee)}` : ""}`;
|
|
1873
|
+
return /* @__PURE__ */ n(
|
|
1874
|
+
"div",
|
|
1875
|
+
{
|
|
1876
|
+
className: `border-b border-dt-border-light/50 transition-colors ${d.status === "error" ? "border-l-2 border-l-dt-error/40" : ""} ${i ? "bg-white/[0.03]" : ""} ${C ? "bg-white/[0.03] outline outline-1 outline-dt-info/30 -outline-offset-1" : ""}`,
|
|
1877
|
+
children: [
|
|
1878
|
+
/* @__PURE__ */ n(
|
|
1879
|
+
"div",
|
|
1880
|
+
{
|
|
1881
|
+
className: "flex items-center gap-2 px-3 py-1.5 cursor-pointer hover:bg-white/[0.03]",
|
|
1882
|
+
onClick: () => {
|
|
1883
|
+
l(i ? null : d.queryId), c(p);
|
|
1884
|
+
},
|
|
1885
|
+
onKeyDown: (K) => {
|
|
1886
|
+
(K.key === "Enter" || K.key === " ") && (K.preventDefault(), l(i ? null : d.queryId), c(p));
|
|
1887
|
+
},
|
|
1888
|
+
onContextMenu: (K) => {
|
|
1889
|
+
K.preventDefault(), x(null), m({
|
|
1890
|
+
x: K.clientX,
|
|
1891
|
+
y: K.clientY,
|
|
1892
|
+
items: z(d)
|
|
1893
|
+
});
|
|
1894
|
+
},
|
|
1895
|
+
onMouseEnter: (K) => {
|
|
1896
|
+
const R = K.currentTarget.getBoundingClientRect(), Z = T(d, R);
|
|
1897
|
+
Z && x(Z);
|
|
1898
|
+
},
|
|
1899
|
+
onMouseMove: (K) => {
|
|
1900
|
+
if (h?.subscription.queryId === d.queryId) {
|
|
1901
|
+
const R = K.currentTarget.getBoundingClientRect(), Z = T(d, R);
|
|
1902
|
+
Z && x(
|
|
1903
|
+
(rt) => rt && rt.subscription.queryId === d.queryId && (rt.x !== Z.x || rt.y !== Z.y) ? Z : rt
|
|
1904
|
+
);
|
|
1905
|
+
}
|
|
1906
|
+
},
|
|
1907
|
+
onMouseLeave: () => {
|
|
1908
|
+
h?.subscription.queryId === d.queryId && x(null);
|
|
1909
|
+
},
|
|
1910
|
+
role: "button",
|
|
1911
|
+
tabIndex: 0,
|
|
1912
|
+
"aria-label": Y,
|
|
1913
|
+
"aria-expanded": i,
|
|
1914
|
+
"aria-current": C ? "true" : void 0,
|
|
1915
|
+
children: [
|
|
1916
|
+
/* @__PURE__ */ n("span", { className: "text-[10px] font-mono text-dt-text-muted font-semibold shrink-0", children: [
|
|
1917
|
+
"Q",
|
|
1918
|
+
d.queryId
|
|
1919
|
+
] }),
|
|
1920
|
+
/* @__PURE__ */ t("span", { className: `w-1.5 h-1.5 rounded-full shrink-0 ${S === "error" ? "bg-dt-error" : "bg-dt-success"}` }),
|
|
1921
|
+
/* @__PURE__ */ n("span", { className: "flex items-center gap-0 min-w-0 flex-1 overflow-hidden", children: [
|
|
1922
|
+
/* @__PURE__ */ t(
|
|
1923
|
+
"span",
|
|
1924
|
+
{
|
|
1925
|
+
className: `font-mono text-[12px] text-dt-text-secondary truncate min-w-0 ${H ? "max-w-[44%]" : ""}`,
|
|
1926
|
+
children: d.udfPath
|
|
1927
|
+
}
|
|
1928
|
+
),
|
|
1929
|
+
H && /* @__PURE__ */ n(
|
|
1930
|
+
"span",
|
|
1931
|
+
{
|
|
1932
|
+
className: "font-mono text-[11px] text-dt-text-muted min-w-0 flex-1 truncate max-w-[min(58vw,680px)]",
|
|
1933
|
+
title: tt(M, 360),
|
|
1934
|
+
children: [
|
|
1935
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-muted/60", children: "(" }),
|
|
1936
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: wt(M, ee) }),
|
|
1937
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-muted/60", children: ")" })
|
|
1938
|
+
]
|
|
1939
|
+
}
|
|
1940
|
+
)
|
|
1941
|
+
] }),
|
|
1942
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-2 shrink-0 text-[11px] text-dt-text-muted ml-auto", children: [
|
|
1943
|
+
/* @__PURE__ */ n("span", { className: "text-dt-info font-mono", children: [
|
|
1944
|
+
"↻",
|
|
1945
|
+
d.updateCount
|
|
1946
|
+
] }),
|
|
1947
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-muted/60 font-mono", children: O(d.lastUpdate) }),
|
|
1948
|
+
/* @__PURE__ */ t("span", { className: "text-[10px] text-dt-text-muted/40", children: i ? "▼" : "▶" })
|
|
1949
|
+
] })
|
|
1950
|
+
]
|
|
1951
|
+
}
|
|
1952
|
+
),
|
|
1953
|
+
i && /* @__PURE__ */ n("div", { className: "px-3 py-2 bg-dt-bg-secondary/30 border-t border-dt-border-light/30 flex flex-col gap-2 animate-[dt-fade-in_0.15s_ease-out]", children: [
|
|
1954
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-1 flex-wrap text-[10px] font-mono", children: [
|
|
1955
|
+
/* @__PURE__ */ n("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-dt-text-muted", children: [
|
|
1956
|
+
"Started ",
|
|
1957
|
+
new Date(d.addedAt).toLocaleTimeString()
|
|
1958
|
+
] }),
|
|
1959
|
+
d.componentPath && /* @__PURE__ */ t(
|
|
1960
|
+
"span",
|
|
1961
|
+
{
|
|
1962
|
+
className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-dt-text-muted truncate max-w-[200px]",
|
|
1963
|
+
title: d.componentPath,
|
|
1964
|
+
children: d.componentPath
|
|
1965
|
+
}
|
|
1966
|
+
)
|
|
1967
|
+
] }),
|
|
1968
|
+
d.status === "error" && d.error && /* @__PURE__ */ t("div", { className: "text-dt-error font-mono text-[11px] bg-dt-error/10 rounded px-2 py-1 break-words", children: d.error }),
|
|
1969
|
+
/* @__PURE__ */ t(
|
|
1970
|
+
gt,
|
|
1971
|
+
{
|
|
1972
|
+
data: M ?? null,
|
|
1973
|
+
label: "Args",
|
|
1974
|
+
onCopy: () => I(j ?? "null"),
|
|
1975
|
+
maxHeight: 200
|
|
1976
|
+
}
|
|
1977
|
+
),
|
|
1978
|
+
d.currentValue !== void 0 && d.previousValue !== void 0 && /* @__PURE__ */ t(Ee, { previous: d.previousValue, current: d.currentValue }),
|
|
1979
|
+
d.currentValue !== void 0 && /* @__PURE__ */ t(
|
|
1980
|
+
gt,
|
|
1981
|
+
{
|
|
1982
|
+
data: d.currentValue,
|
|
1983
|
+
label: "Current Value",
|
|
1984
|
+
onCopy: () => I(JSON.stringify(d.currentValue, null, 2)),
|
|
1985
|
+
maxHeight: 300
|
|
1986
|
+
}
|
|
1987
|
+
)
|
|
1988
|
+
] })
|
|
1989
|
+
]
|
|
1990
|
+
},
|
|
1991
|
+
d.queryId
|
|
1992
|
+
);
|
|
1993
|
+
})
|
|
1994
|
+
] }),
|
|
1995
|
+
h && (() => {
|
|
1996
|
+
const d = h.subscription, p = lt(d.args), i = p !== void 0 ? tt(p) : null, C = p !== void 0 ? E(p) : null, S = p !== void 0 ? tt(p) : "", M = d.currentValue, H = M !== void 0 ? tt(M) : null, j = M !== void 0 ? tt(M) : "", Y = M !== void 0 ? E(M) : null, K = d.status === "error" && d.error ? d.error.length > 160 ? `${d.error.slice(0, 157)}…` : d.error : null;
|
|
1997
|
+
return /* @__PURE__ */ n("div", { className: "fixed z-[9999999] w-[300px] bg-zinc-900/[0.98] border border-dt-border rounded-lg shadow-2xl p-3 flex flex-col gap-2 pointer-events-none animate-[dt-fade-in_0.15s_ease-out] backdrop-blur-lg", style: { top: h.y, left: h.x }, role: "tooltip", children: [
|
|
1998
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
1999
|
+
/* @__PURE__ */ t("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-[3px] bg-dt-query/20 text-dt-query text-[9px] font-bold shrink-0 shadow-[0_1px_2px_rgba(96,165,250,0.35)]", children: "Q" }),
|
|
2000
|
+
/* @__PURE__ */ t("span", { className: "font-mono text-[12px] text-dt-text truncate flex-1", title: d.udfPath, children: d.udfPath }),
|
|
2001
|
+
/* @__PURE__ */ n("span", { className: `text-[9px] font-bold uppercase flex items-center gap-0.5 px-1.5 py-0.5 rounded-full ${d.status === "error" ? "bg-dt-error/15 text-dt-error" : "bg-dt-success/15 text-dt-success"}`, children: [
|
|
2002
|
+
d.status === "error" ? "❌" : "✓",
|
|
2003
|
+
d.status.toUpperCase()
|
|
2004
|
+
] })
|
|
2005
|
+
] }),
|
|
2006
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-1 flex-wrap", children: [
|
|
2007
|
+
/* @__PURE__ */ n("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: [
|
|
2008
|
+
"Q",
|
|
2009
|
+
d.queryId
|
|
2010
|
+
] }),
|
|
2011
|
+
/* @__PURE__ */ n("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: [
|
|
2012
|
+
"↻ ",
|
|
2013
|
+
d.updateCount,
|
|
2014
|
+
" updates"
|
|
2015
|
+
] }),
|
|
2016
|
+
/* @__PURE__ */ t("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: O(d.lastUpdate) })
|
|
2017
|
+
] }),
|
|
2018
|
+
d.componentPath && /* @__PURE__ */ t("div", { className: "text-[10px] text-dt-text-muted/60 font-mono truncate", title: d.componentPath, children: d.componentPath }),
|
|
2019
|
+
p !== void 0 && /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
|
|
2020
|
+
/* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
|
|
2021
|
+
/* @__PURE__ */ t("span", { className: "text-[10px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: "Args" }),
|
|
2022
|
+
C && /* @__PURE__ */ t("span", { className: "text-[9px] text-dt-text-muted/60 font-mono", children: C })
|
|
2023
|
+
] }),
|
|
2024
|
+
/* @__PURE__ */ t("pre", { className: "font-mono text-[10px] text-dt-text-muted bg-zinc-950/50 rounded p-1.5 overflow-hidden max-h-[80px] whitespace-pre-wrap break-all m-0", title: i ?? void 0, children: S })
|
|
2025
|
+
] }),
|
|
2026
|
+
M !== void 0 && /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
|
|
2027
|
+
/* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
|
|
2028
|
+
/* @__PURE__ */ t("span", { className: "text-[10px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: "Current Value" }),
|
|
2029
|
+
Y && /* @__PURE__ */ t("span", { className: "text-[9px] text-dt-text-muted/60 font-mono", children: Y })
|
|
2030
|
+
] }),
|
|
2031
|
+
/* @__PURE__ */ t("pre", { className: "font-mono text-[10px] text-dt-text-muted bg-zinc-950/50 rounded p-1.5 overflow-hidden max-h-[80px] whitespace-pre-wrap break-all m-0", title: H ?? void 0, children: j })
|
|
2032
|
+
] }),
|
|
2033
|
+
K && /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
|
|
2034
|
+
/* @__PURE__ */ t("span", { className: "text-[10px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: "Error" }),
|
|
2035
|
+
/* @__PURE__ */ t("span", { className: "text-[11px] text-dt-error", title: d.error, children: K })
|
|
2036
|
+
] })
|
|
2037
|
+
] });
|
|
2038
|
+
})(),
|
|
2039
|
+
f && /* @__PURE__ */ t(
|
|
2040
|
+
Kt,
|
|
2041
|
+
{
|
|
2042
|
+
x: f.x,
|
|
2043
|
+
y: f.y,
|
|
2044
|
+
items: f.items,
|
|
2045
|
+
onClose: () => m(null)
|
|
2046
|
+
}
|
|
2047
|
+
)
|
|
2048
|
+
] });
|
|
2049
|
+
}
|
|
2050
|
+
function Ee({ previous: o, current: r }) {
|
|
2051
|
+
const [a, s] = L(!0), l = it(() => Vt(o, r), [o, r]);
|
|
2052
|
+
return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
|
|
2053
|
+
/* @__PURE__ */ n(
|
|
2054
|
+
"button",
|
|
2055
|
+
{
|
|
2056
|
+
className: "flex items-center gap-1 bg-transparent border-none text-dt-text-tertiary cursor-pointer text-[11px] font-semibold uppercase tracking-wider p-0 hover:text-dt-text-secondary transition-colors",
|
|
2057
|
+
onClick: () => s(!a),
|
|
2058
|
+
children: [
|
|
2059
|
+
/* @__PURE__ */ t("span", { className: `text-[10px] transition-transform ${a ? "rotate-90" : ""}`, children: "▶" }),
|
|
2060
|
+
/* @__PURE__ */ n("span", { children: [
|
|
2061
|
+
"Changes (",
|
|
2062
|
+
l.length,
|
|
2063
|
+
")"
|
|
2064
|
+
] })
|
|
2065
|
+
]
|
|
2066
|
+
}
|
|
2067
|
+
),
|
|
2068
|
+
a && /* @__PURE__ */ t("div", { className: "bg-zinc-950/50 rounded border border-dt-border-light p-2 font-mono text-[11px] max-h-[200px] overflow-y-auto", children: l.map((u, c) => /* @__PURE__ */ n("div", { className: `py-px ${u.type === "added" ? "text-dt-success bg-dt-success/5" : u.type === "removed" ? "text-dt-error bg-dt-error/5" : "text-dt-warning bg-dt-warning/5"}`, children: [
|
|
2069
|
+
/* @__PURE__ */ t("span", { className: "select-none opacity-60 mr-1", children: u.type === "added" ? "+" : u.type === "removed" ? "-" : "~" }),
|
|
2070
|
+
/* @__PURE__ */ n("span", { className: "text-dt-text-muted", children: [
|
|
2071
|
+
u.path,
|
|
2072
|
+
":"
|
|
2073
|
+
] }),
|
|
2074
|
+
" ",
|
|
2075
|
+
u.type === "changed" ? /* @__PURE__ */ n(X, { children: [
|
|
2076
|
+
/* @__PURE__ */ t("span", { className: "text-dt-error line-through opacity-70", children: u.oldVal }),
|
|
2077
|
+
" → ",
|
|
2078
|
+
/* @__PURE__ */ t("span", { className: "text-dt-success", children: u.newVal })
|
|
2079
|
+
] }) : /* @__PURE__ */ t("span", { children: u.value })
|
|
2080
|
+
] }, c)) })
|
|
2081
|
+
] });
|
|
2082
|
+
}
|
|
2083
|
+
function Vt(o, r, a = "$") {
|
|
2084
|
+
const s = [], l = (u) => {
|
|
2085
|
+
const c = JSON.stringify(u);
|
|
2086
|
+
return c && c.length > 80 ? c.slice(0, 77) + "…" : c;
|
|
2087
|
+
};
|
|
2088
|
+
if (o === r) return s;
|
|
2089
|
+
if (o === null || r === null || typeof o != typeof r || typeof o != "object" || typeof r != "object")
|
|
2090
|
+
return s.push({ type: "changed", path: a, oldVal: l(o), newVal: l(r) }), s;
|
|
2091
|
+
if (Array.isArray(o) && Array.isArray(r)) {
|
|
2092
|
+
const u = Math.max(o.length, r.length);
|
|
2093
|
+
for (let c = 0; c < u && s.length < 50; c++)
|
|
2094
|
+
c >= o.length ? s.push({ type: "added", path: `${a}[${c}]`, value: l(r[c]) }) : c >= r.length ? s.push({ type: "removed", path: `${a}[${c}]`, value: l(o[c]) }) : s.push(...Vt(o[c], r[c], `${a}[${c}]`));
|
|
2095
|
+
return s;
|
|
2096
|
+
}
|
|
2097
|
+
if (!Array.isArray(o) && !Array.isArray(r)) {
|
|
2098
|
+
const u = o, c = r, b = /* @__PURE__ */ new Set([...Object.keys(u), ...Object.keys(c)]);
|
|
2099
|
+
for (const N of b) {
|
|
2100
|
+
if (s.length >= 50) break;
|
|
2101
|
+
N in u ? N in c ? s.push(...Vt(u[N], c[N], `${a}.${N}`)) : s.push({ type: "removed", path: `${a}.${N}`, value: l(u[N]) }) : s.push({ type: "added", path: `${a}.${N}`, value: l(c[N]) });
|
|
2102
|
+
}
|
|
2103
|
+
}
|
|
2104
|
+
return s;
|
|
2105
|
+
}
|
|
2106
|
+
function Ce({ eventStore: o, onNavigate: r }) {
|
|
2107
|
+
const [a, s] = L(null), [l, u] = L([]);
|
|
2108
|
+
U(() => {
|
|
2109
|
+
const g = () => {
|
|
2110
|
+
s(o.getPerformanceMetrics()), u(o.getAllEvents());
|
|
2111
|
+
}, $ = o.subscribe(g);
|
|
2112
|
+
return g(), $;
|
|
2113
|
+
}, [o]);
|
|
2114
|
+
const c = it(() => {
|
|
2115
|
+
const g = (d) => {
|
|
2116
|
+
const p = typeof d == "number" ? d : typeof d == "string" ? Number(d) : Number.NaN;
|
|
2117
|
+
return !Number.isFinite(p) || p < 0 ? null : p;
|
|
2118
|
+
}, $ = Date.now(), I = 6e4, T = 60, E = I / T, z = l.flatMap((d) => {
|
|
2119
|
+
if (d?.type !== "query" && d?.type !== "mutation" && d?.type !== "action")
|
|
2120
|
+
return [];
|
|
2121
|
+
const p = typeof d.timestamp == "number" && Number.isFinite(d.timestamp) ? d.timestamp : null, i = g(d.endToEndDurationMs ?? d.duration);
|
|
2122
|
+
return p === null || i === null ? [] : [{ type: d.type, timestamp: p, duration: i }];
|
|
2123
|
+
}), O = (d) => {
|
|
2124
|
+
const p = new Array(T).fill(0), i = new Array(T).fill(0);
|
|
2125
|
+
for (const C of z) {
|
|
2126
|
+
if (d && C.type !== d) continue;
|
|
2127
|
+
const S = $ - C.timestamp;
|
|
2128
|
+
if (S > I || S < 0) continue;
|
|
2129
|
+
const M = Math.min(T - 1, Math.floor((I - S) / E));
|
|
2130
|
+
M < 0 || M >= T || (p[M] += C.duration, i[M]++);
|
|
2131
|
+
}
|
|
2132
|
+
return p.map((C, S) => i[S] > 0 ? C / i[S] : 0);
|
|
2133
|
+
};
|
|
2134
|
+
return {
|
|
2135
|
+
all: O(),
|
|
2136
|
+
query: O("query"),
|
|
2137
|
+
mutation: O("mutation"),
|
|
2138
|
+
action: O("action")
|
|
2139
|
+
};
|
|
2140
|
+
}, [l]), b = F((g) => {
|
|
2141
|
+
o.setFocusedEventId(g), r?.("activity");
|
|
2142
|
+
}, [o, r]);
|
|
2143
|
+
if (!a)
|
|
2144
|
+
return /* @__PURE__ */ t("div", { className: "flex flex-col h-full overflow-hidden p-3 gap-3", children: "Loading..." });
|
|
2145
|
+
const N = a.totalQueries + a.totalMutations + a.totalActions > 0, y = l.some(
|
|
2146
|
+
(g) => (g?.type === "query" || g?.type === "mutation" || g?.type === "action") && typeof g?.simulatedDelayMs == "number" && g.simulatedDelayMs > 0
|
|
2147
|
+
), D = a.totalQueries + a.totalMutations + a.totalActions, h = D > 0 ? a.totalQueries / D * 100 : 0, x = D > 0 ? a.totalMutations / D * 100 : 0, f = D > 0 ? a.totalActions / D * 100 : 0, m = Math.max(a.slowestOperations[0]?.duration ?? 0, 1);
|
|
2148
|
+
return /* @__PURE__ */ t("div", { className: "flex flex-col h-full overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex-1 min-h-0 overflow-y-auto p-3 flex flex-col gap-3", children: [
|
|
2149
|
+
!N && /* @__PURE__ */ n("div", { className: "flex flex-col items-center justify-center py-12 text-dt-text-muted gap-2", children: [
|
|
2150
|
+
/* @__PURE__ */ t("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: /* @__PURE__ */ t("path", { d: "M13 2L3 14h9l-1 8 10-12h-9l1-8z", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
|
|
2151
|
+
/* @__PURE__ */ t("p", { children: "No performance data yet" })
|
|
2152
|
+
] }),
|
|
2153
|
+
N && /* @__PURE__ */ n(X, { children: [
|
|
2154
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-1 text-[11px] font-mono flex-wrap px-1", children: [
|
|
2155
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "Total:" }),
|
|
2156
|
+
/* @__PURE__ */ t("span", { className: "font-semibold text-dt-text-secondary", children: D }),
|
|
2157
|
+
/* @__PURE__ */ t("span", { className: "text-dt-border mx-0.5", children: "|" }),
|
|
2158
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "Q:" }),
|
|
2159
|
+
/* @__PURE__ */ t("span", { className: "font-semibold text-dt-query", children: a.totalQueries }),
|
|
2160
|
+
/* @__PURE__ */ n("span", { className: "text-dt-text-muted/60 text-[10px]", children: [
|
|
2161
|
+
"(",
|
|
2162
|
+
h.toFixed(0),
|
|
2163
|
+
"%)"
|
|
2164
|
+
] }),
|
|
2165
|
+
/* @__PURE__ */ t("span", { className: "text-dt-border mx-0.5", children: "|" }),
|
|
2166
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "M:" }),
|
|
2167
|
+
/* @__PURE__ */ t("span", { className: "font-semibold text-dt-mutation", children: a.totalMutations }),
|
|
2168
|
+
/* @__PURE__ */ n("span", { className: "text-dt-text-muted/60 text-[10px]", children: [
|
|
2169
|
+
"(",
|
|
2170
|
+
x.toFixed(0),
|
|
2171
|
+
"%)"
|
|
2172
|
+
] }),
|
|
2173
|
+
/* @__PURE__ */ t("span", { className: "text-dt-border mx-0.5", children: "|" }),
|
|
2174
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "A:" }),
|
|
2175
|
+
/* @__PURE__ */ t("span", { className: "font-semibold text-dt-action", children: a.totalActions }),
|
|
2176
|
+
/* @__PURE__ */ n("span", { className: "text-dt-text-muted/60 text-[10px]", children: [
|
|
2177
|
+
"(",
|
|
2178
|
+
f.toFixed(0),
|
|
2179
|
+
"%)"
|
|
2180
|
+
] })
|
|
2181
|
+
] }),
|
|
2182
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: [
|
|
2183
|
+
/* @__PURE__ */ n("div", { className: "text-[11px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: [
|
|
2184
|
+
"Latency (60s window)",
|
|
2185
|
+
y && /* @__PURE__ */ t("span", { className: "ml-2 text-[10px] normal-case font-normal text-dt-warning/90", children: "includes simulated delay" })
|
|
2186
|
+
] }),
|
|
2187
|
+
/* @__PURE__ */ t(Dt, { label: "All", data: c.all, color: "#e4e4e7" }),
|
|
2188
|
+
/* @__PURE__ */ t(Dt, { label: "Query", data: c.query, color: "#60a5fa" }),
|
|
2189
|
+
/* @__PURE__ */ t(Dt, { label: "Mutation", data: c.mutation, color: "#a78bfa" }),
|
|
2190
|
+
/* @__PURE__ */ t(Dt, { label: "Action", data: c.action, color: "#34d399" })
|
|
2191
|
+
] }),
|
|
2192
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col border border-dt-border-light rounded-lg overflow-hidden", children: [
|
|
2193
|
+
/* @__PURE__ */ n("div", { className: "grid grid-cols-6 gap-0 px-2 py-1.5 bg-dt-bg-tertiary/50 text-[10px] font-semibold text-dt-text-muted uppercase tracking-wider", children: [
|
|
2194
|
+
/* @__PURE__ */ t("span", { children: "Type" }),
|
|
2195
|
+
/* @__PURE__ */ t("span", { children: "Avg" }),
|
|
2196
|
+
/* @__PURE__ */ t("span", { children: "P50" }),
|
|
2197
|
+
/* @__PURE__ */ t("span", { children: "P90" }),
|
|
2198
|
+
/* @__PURE__ */ t("span", { children: "P95" }),
|
|
2199
|
+
/* @__PURE__ */ t("span", { children: "P99" })
|
|
2200
|
+
] }),
|
|
2201
|
+
/* @__PURE__ */ n("div", { className: "grid grid-cols-6 gap-0 px-2 py-1.5 border-t border-dt-border-light/50 text-[11px] font-mono text-dt-text-secondary", children: [
|
|
2202
|
+
/* @__PURE__ */ t("span", { className: "text-dt-query font-bold", children: "Q" }),
|
|
2203
|
+
/* @__PURE__ */ t("span", { children: W(a.avgQueryDuration) }),
|
|
2204
|
+
/* @__PURE__ */ t("span", { children: W(a.p50QueryDuration) }),
|
|
2205
|
+
/* @__PURE__ */ t("span", { children: W(a.p90QueryDuration) }),
|
|
2206
|
+
/* @__PURE__ */ t("span", { children: W(a.p95QueryDuration) }),
|
|
2207
|
+
/* @__PURE__ */ t("span", { children: W(a.p99QueryDuration) })
|
|
2208
|
+
] }),
|
|
2209
|
+
/* @__PURE__ */ n("div", { className: "grid grid-cols-6 gap-0 px-2 py-1.5 border-t border-dt-border-light/50 text-[11px] font-mono text-dt-text-secondary", children: [
|
|
2210
|
+
/* @__PURE__ */ t("span", { className: "text-dt-mutation font-bold", children: "M" }),
|
|
2211
|
+
/* @__PURE__ */ t("span", { children: W(a.avgMutationDuration) }),
|
|
2212
|
+
/* @__PURE__ */ t("span", { children: W(a.p50MutationDuration) }),
|
|
2213
|
+
/* @__PURE__ */ t("span", { children: W(a.p90MutationDuration) }),
|
|
2214
|
+
/* @__PURE__ */ t("span", { children: W(a.p95MutationDuration) }),
|
|
2215
|
+
/* @__PURE__ */ t("span", { children: W(a.p99MutationDuration) })
|
|
2216
|
+
] }),
|
|
2217
|
+
/* @__PURE__ */ n("div", { className: "grid grid-cols-6 gap-0 px-2 py-1.5 border-t border-dt-border-light/50 text-[11px] font-mono text-dt-text-secondary", children: [
|
|
2218
|
+
/* @__PURE__ */ t("span", { className: "text-dt-action font-bold", children: "A" }),
|
|
2219
|
+
/* @__PURE__ */ t("span", { children: W(a.avgActionDuration) }),
|
|
2220
|
+
/* @__PURE__ */ t("span", { children: W(a.p50ActionDuration) }),
|
|
2221
|
+
/* @__PURE__ */ t("span", { children: W(a.p90ActionDuration) }),
|
|
2222
|
+
/* @__PURE__ */ t("span", { children: W(a.p95ActionDuration) }),
|
|
2223
|
+
/* @__PURE__ */ t("span", { children: W(a.p99ActionDuration) })
|
|
2224
|
+
] })
|
|
2225
|
+
] }),
|
|
2226
|
+
a.slowestOperations.length > 0 && /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
|
|
2227
|
+
/* @__PURE__ */ t("div", { className: "text-[11px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: "Slowest Operations" }),
|
|
2228
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col gap-0.5", children: a.slowestOperations.map((g, $) => /* @__PURE__ */ n(
|
|
2229
|
+
"button",
|
|
2230
|
+
{
|
|
2231
|
+
className: "flex items-center gap-2 text-[11px] py-0.5 px-1 bg-transparent border-none text-left cursor-pointer rounded hover:bg-white/[0.04] focus:outline-none focus:ring-1 focus:ring-dt-info/40",
|
|
2232
|
+
onClick: () => b(g.eventId),
|
|
2233
|
+
title: "Open operation in Activity",
|
|
2234
|
+
type: "button",
|
|
2235
|
+
children: [
|
|
2236
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-muted/40 w-4 text-right font-mono text-[10px]", children: $ + 1 }),
|
|
2237
|
+
/* @__PURE__ */ t("span", { className: `inline-flex items-center justify-center w-4 h-4 rounded text-[9px] font-bold ${g.type === "query" ? "text-dt-query" : g.type === "mutation" ? "text-dt-mutation" : "text-dt-action"}`, children: g.type[0].toUpperCase() }),
|
|
2238
|
+
/* @__PURE__ */ t("span", { className: "font-mono text-dt-text-secondary truncate flex-1", children: g.udfPath }),
|
|
2239
|
+
/* @__PURE__ */ t("span", { className: "font-mono text-dt-text-muted shrink-0", children: W(g.duration) }),
|
|
2240
|
+
/* @__PURE__ */ t("div", { className: "w-16 h-1.5 bg-dt-bg-tertiary rounded-full overflow-hidden shrink-0", children: /* @__PURE__ */ t(
|
|
2241
|
+
"div",
|
|
2242
|
+
{
|
|
2243
|
+
className: `h-full rounded-full ${g.type === "query" ? "bg-dt-query" : g.type === "mutation" ? "bg-dt-mutation" : "bg-dt-action"}`,
|
|
2244
|
+
style: { width: `${Math.min(100, Math.max(2, g.duration / m * 100))}%` }
|
|
2245
|
+
}
|
|
2246
|
+
) })
|
|
2247
|
+
]
|
|
2248
|
+
},
|
|
2249
|
+
g.eventId
|
|
2250
|
+
)) })
|
|
2251
|
+
] })
|
|
2252
|
+
] })
|
|
2253
|
+
] }) });
|
|
2254
|
+
}
|
|
2255
|
+
function Dt({ label: o, data: r, color: a }) {
|
|
2256
|
+
const s = r.map(
|
|
2257
|
+
(c) => typeof c == "number" && Number.isFinite(c) && c > 0 ? c : 0
|
|
2258
|
+
), l = Math.max(...s, 1), u = s[s.length - 1] || 0;
|
|
2259
|
+
return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
2260
|
+
/* @__PURE__ */ t("span", { className: "text-[10px] font-mono text-dt-text-muted w-14 shrink-0", children: o }),
|
|
2261
|
+
/* @__PURE__ */ t("div", { className: "flex-1 h-5 flex items-end gap-px", children: s.map((c, b) => /* @__PURE__ */ t(
|
|
2262
|
+
"div",
|
|
2263
|
+
{
|
|
2264
|
+
className: "flex-1 rounded-t-sm min-h-px",
|
|
2265
|
+
style: {
|
|
2266
|
+
height: `${Math.max(1, c / l * 100)}%`,
|
|
2267
|
+
backgroundColor: c > 0 ? a : "rgba(63,63,70,0.3)",
|
|
2268
|
+
opacity: c > 0 ? 0.5 + b / s.length * 0.5 : 0.2
|
|
2269
|
+
}
|
|
2270
|
+
},
|
|
2271
|
+
b
|
|
2272
|
+
)) }),
|
|
2273
|
+
/* @__PURE__ */ t("span", { className: "text-[10px] font-mono text-dt-text-muted w-14 text-right shrink-0", children: u > 0 ? W(u) : "—" })
|
|
2274
|
+
] });
|
|
2275
|
+
}
|
|
2276
|
+
function W(o) {
|
|
2277
|
+
return !Number.isFinite(o) || o < 0 ? "—" : o < 1e3 ? `${o.toFixed(3)}ms` : `${(o / 1e3).toFixed(3)}s`;
|
|
2278
|
+
}
|
|
2279
|
+
function De(o) {
|
|
2280
|
+
return o.type === "query" || o.type === "mutation" || o.type === "action";
|
|
2281
|
+
}
|
|
2282
|
+
function re(o) {
|
|
2283
|
+
return o.type === "query" ? `Q${o.queryId}` : o.type === "mutation" ? `M${o.requestId}` : `A${o.requestId}`;
|
|
2284
|
+
}
|
|
2285
|
+
function Se({ eventStore: o, onNavigate: r }) {
|
|
2286
|
+
const [a, s] = L([]), [l, u] = L(/* @__PURE__ */ new Map()), [c, b] = L(!0), [N, y] = L("all"), [D, h] = L(""), [x, f] = L(null), [m, g] = L(null), $ = ft(null), I = ft(null), T = F(
|
|
2287
|
+
(i) => {
|
|
2288
|
+
i && (o.setFocusedEventId(i), r?.("activity"));
|
|
2289
|
+
},
|
|
2290
|
+
[o, r]
|
|
2291
|
+
);
|
|
2292
|
+
U(() => {
|
|
2293
|
+
const i = () => {
|
|
2294
|
+
const S = o.getAllEvents(), M = /* @__PURE__ */ new Map(), H = [];
|
|
2295
|
+
for (const j of S) {
|
|
2296
|
+
if (j.type === "log") {
|
|
2297
|
+
H.push(j);
|
|
2298
|
+
continue;
|
|
2299
|
+
}
|
|
2300
|
+
De(j) && M.set(j.id, j);
|
|
2301
|
+
}
|
|
2302
|
+
s(H), u(M);
|
|
2303
|
+
}, C = o.subscribe(i);
|
|
2304
|
+
return i(), C;
|
|
2305
|
+
}, [o]);
|
|
2306
|
+
const E = it(() => {
|
|
2307
|
+
const i = D.trim().toLowerCase().split(/\s+/).filter((C) => C.length > 0);
|
|
2308
|
+
return a.filter((C) => {
|
|
2309
|
+
if (N !== "all" && C.level !== N) return !1;
|
|
2310
|
+
if (i.length === 0) return !0;
|
|
2311
|
+
const S = C.relatedEventId ? l.get(C.relatedEventId) : void 0, M = [
|
|
2312
|
+
C.message,
|
|
2313
|
+
C.level,
|
|
2314
|
+
C.relatedEventId ?? "",
|
|
2315
|
+
S?.udfPath ?? "",
|
|
2316
|
+
S?.type ?? "",
|
|
2317
|
+
S ? re(S) : ""
|
|
2318
|
+
].join(`
|
|
2319
|
+
`).toLowerCase();
|
|
2320
|
+
return i.every((H) => M.includes(H));
|
|
2321
|
+
});
|
|
2322
|
+
}, [a, N, D, l]), z = F((i) => {
|
|
2323
|
+
P(i.message), g(i.id), setTimeout(() => g(null), 300);
|
|
2324
|
+
}, []), O = F((i) => `[${new Date(i.timestamp).toLocaleTimeString([], {
|
|
2325
|
+
hour: "2-digit",
|
|
2326
|
+
minute: "2-digit",
|
|
2327
|
+
second: "2-digit",
|
|
2328
|
+
fractionalSecondDigits: 3
|
|
2329
|
+
})}] [${i.level.toUpperCase()}] ${i.message}`, []), d = F(() => {
|
|
2330
|
+
const i = E.map(O).join(`
|
|
2331
|
+
`);
|
|
2332
|
+
P(i);
|
|
2333
|
+
}, [E, O]);
|
|
2334
|
+
U(() => {
|
|
2335
|
+
const i = (C) => {
|
|
2336
|
+
if ($t()) {
|
|
2337
|
+
if ((C.metaKey || C.ctrlKey) && C.key === "k") {
|
|
2338
|
+
C.preventDefault(), $.current?.focus();
|
|
2339
|
+
return;
|
|
2340
|
+
}
|
|
2341
|
+
C.key === "Escape" && (N !== "all" || D) && (C.preventDefault(), y("all"), h(""));
|
|
2342
|
+
}
|
|
2343
|
+
};
|
|
2344
|
+
return window.addEventListener("keydown", i), () => window.removeEventListener("keydown", i);
|
|
2345
|
+
}, [N, D]), U(() => {
|
|
2346
|
+
c && I.current && I.current.scrollIntoView({ behavior: "smooth" });
|
|
2347
|
+
}, [E.length, c]);
|
|
2348
|
+
const p = F(
|
|
2349
|
+
(i) => {
|
|
2350
|
+
const C = i.relatedEventId ? l.get(i.relatedEventId) : void 0, S = new Date(i.timestamp).toLocaleTimeString([], {
|
|
2351
|
+
hour: "2-digit",
|
|
2352
|
+
minute: "2-digit",
|
|
2353
|
+
second: "2-digit",
|
|
2354
|
+
fractionalSecondDigits: 3
|
|
2355
|
+
}), M = [
|
|
2356
|
+
{ label: "Copy Message", action: () => P(i.message), shortcut: "⌘C" },
|
|
2357
|
+
{ label: "Copy Timestamp", action: () => P(S) }
|
|
2358
|
+
];
|
|
2359
|
+
return M.push({
|
|
2360
|
+
label: `Filter by Level: ${i.level}`,
|
|
2361
|
+
action: () => y(i.level),
|
|
2362
|
+
separator: !0
|
|
2363
|
+
}), i.relatedEventId && M.push({
|
|
2364
|
+
label: "Copy Related Event ID",
|
|
2365
|
+
action: () => P(i.relatedEventId)
|
|
2366
|
+
}), C && (M.push({
|
|
2367
|
+
label: "Copy Related Function Path",
|
|
2368
|
+
action: () => P(C.udfPath)
|
|
2369
|
+
}), M.push({
|
|
2370
|
+
label: "Filter by Related Function",
|
|
2371
|
+
action: () => h(C.udfPath)
|
|
2372
|
+
})), i.relatedEventId && r && M.push({
|
|
2373
|
+
label: "Go to Related Event",
|
|
2374
|
+
action: () => T(i.relatedEventId)
|
|
2375
|
+
}), M.push({
|
|
2376
|
+
label: "Copy as JSON",
|
|
2377
|
+
action: () => P(JSON.stringify(i, null, 2)),
|
|
2378
|
+
separator: !0
|
|
2379
|
+
}), M;
|
|
2380
|
+
},
|
|
2381
|
+
[T, r, l]
|
|
2382
|
+
);
|
|
2383
|
+
return /* @__PURE__ */ n("div", { className: "flex flex-col h-full overflow-hidden", children: [
|
|
2384
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-2 px-3 py-1.5 border-b border-dt-border-light", children: [
|
|
2385
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-0.5", children: ["all", "log", "info", "warn", "error"].map((i) => /* @__PURE__ */ t(
|
|
2386
|
+
"button",
|
|
2387
|
+
{
|
|
2388
|
+
className: `px-2 py-1 text-[11px] bg-transparent border rounded-md cursor-pointer transition-all ${N === i ? i === "info" ? "bg-dt-info/20 text-dt-info border-dt-info/30 font-medium" : i === "warn" ? "bg-dt-warning/20 text-dt-warning border-dt-warning/30 font-medium" : i === "error" ? "bg-dt-error/20 text-dt-error border-dt-error/30 font-medium" : "bg-white/10 text-dt-text-secondary border-dt-border-light font-medium" : i === "info" ? "border-transparent text-dt-text-muted hover:bg-dt-info/15 hover:text-dt-info" : i === "warn" ? "border-transparent text-dt-text-muted hover:bg-dt-warning/15 hover:text-dt-warning" : i === "error" ? "border-transparent text-dt-text-muted hover:bg-dt-error/15 hover:text-dt-error" : "border-transparent text-dt-text-muted hover:bg-white/5 hover:text-dt-text-tertiary"}`,
|
|
2389
|
+
onClick: () => y(i),
|
|
2390
|
+
children: i.charAt(0).toUpperCase() + i.slice(1)
|
|
2391
|
+
},
|
|
2392
|
+
i
|
|
2393
|
+
)) }),
|
|
2394
|
+
/* @__PURE__ */ t(
|
|
2395
|
+
Ut,
|
|
2396
|
+
{
|
|
2397
|
+
ref: $,
|
|
2398
|
+
value: D,
|
|
2399
|
+
onValueChange: h,
|
|
2400
|
+
onClear: () => h(""),
|
|
2401
|
+
placeholder: "Search msg/path/id... (Cmd/Ctrl+K)",
|
|
2402
|
+
className: "stretch"
|
|
2403
|
+
}
|
|
2404
|
+
),
|
|
2405
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-2 ml-auto", children: [
|
|
2406
|
+
/* @__PURE__ */ n(
|
|
2407
|
+
"button",
|
|
2408
|
+
{
|
|
2409
|
+
className: "px-2 py-1 text-[11px] bg-transparent border border-dt-border-light rounded-md cursor-pointer text-dt-text-muted hover:text-dt-text-secondary hover:bg-white/5 transition-colors disabled:opacity-30 disabled:cursor-default disabled:hover:bg-transparent disabled:hover:text-dt-text-muted",
|
|
2410
|
+
onClick: d,
|
|
2411
|
+
disabled: E.length === 0,
|
|
2412
|
+
title: "Copy all visible logs as plain text",
|
|
2413
|
+
children: [
|
|
2414
|
+
"Copy all (",
|
|
2415
|
+
E.length,
|
|
2416
|
+
")"
|
|
2417
|
+
]
|
|
2418
|
+
}
|
|
2419
|
+
),
|
|
2420
|
+
/* @__PURE__ */ n("label", { className: "flex items-center gap-1.5 text-[11px] text-dt-text-muted cursor-pointer select-none", children: [
|
|
2421
|
+
/* @__PURE__ */ t("input", { type: "checkbox", checked: c, onChange: (i) => b(i.target.checked) }),
|
|
2422
|
+
"Auto-scroll"
|
|
2423
|
+
] })
|
|
2424
|
+
] })
|
|
2425
|
+
] }),
|
|
2426
|
+
/* @__PURE__ */ n("div", { className: "flex-1 overflow-y-auto p-1", children: [
|
|
2427
|
+
E.length === 0 && /* @__PURE__ */ n("div", { className: "flex flex-col items-center justify-center py-12 text-dt-text-muted gap-2", children: [
|
|
2428
|
+
/* @__PURE__ */ t("p", { children: "No logs yet" }),
|
|
2429
|
+
/* @__PURE__ */ t("p", { className: "text-[11px] text-dt-text-muted/60", children: "Console output from functions will appear here" })
|
|
2430
|
+
] }),
|
|
2431
|
+
E.map((i) => {
|
|
2432
|
+
const C = i.relatedEventId ? l.get(i.relatedEventId) : void 0, S = C ? re(C) : null;
|
|
2433
|
+
return /* @__PURE__ */ n(
|
|
2434
|
+
"div",
|
|
2435
|
+
{
|
|
2436
|
+
className: `flex items-start gap-2 px-2 py-1 text-[11px] font-mono border-b border-dt-border-light/30 cursor-pointer select-none transition-colors duration-300 ${m === i.id ? "bg-white/10" : `hover:bg-white/[0.02] ${i.level === "warn" ? "bg-dt-warning/5" : i.level === "error" ? "bg-dt-error/5" : ""}`}`,
|
|
2437
|
+
onClick: () => z(i),
|
|
2438
|
+
onContextMenu: (M) => {
|
|
2439
|
+
M.preventDefault(), f({
|
|
2440
|
+
x: M.clientX,
|
|
2441
|
+
y: M.clientY,
|
|
2442
|
+
items: p(i)
|
|
2443
|
+
});
|
|
2444
|
+
},
|
|
2445
|
+
children: [
|
|
2446
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-muted/60 shrink-0", children: new Date(i.timestamp).toLocaleTimeString([], {
|
|
2447
|
+
hour: "2-digit",
|
|
2448
|
+
minute: "2-digit",
|
|
2449
|
+
second: "2-digit",
|
|
2450
|
+
fractionalSecondDigits: 3
|
|
2451
|
+
}) }),
|
|
2452
|
+
/* @__PURE__ */ t("span", { className: `font-semibold shrink-0 w-10 uppercase text-[10px] ${i.level === "info" ? "text-dt-info" : i.level === "warn" ? "text-dt-warning" : i.level === "error" ? "text-dt-error" : "text-dt-text-muted"}`, children: i.level.toUpperCase() }),
|
|
2453
|
+
/* @__PURE__ */ n("div", { className: "flex-1 min-w-0", children: [
|
|
2454
|
+
/* @__PURE__ */ t("div", { className: "text-dt-text-secondary break-all", children: i.message }),
|
|
2455
|
+
C && /* @__PURE__ */ n("div", { className: "text-[10px] text-dt-text-muted/70 truncate", title: `${C.type} ${C.udfPath}`, children: [
|
|
2456
|
+
C.type,
|
|
2457
|
+
" ",
|
|
2458
|
+
C.udfPath
|
|
2459
|
+
] })
|
|
2460
|
+
] }),
|
|
2461
|
+
i.relatedEventId && /* @__PURE__ */ t(
|
|
2462
|
+
"button",
|
|
2463
|
+
{
|
|
2464
|
+
className: "shrink-0 px-1 py-0.5 bg-transparent border border-dt-border-light/50 rounded text-[9px] font-mono text-dt-text-muted cursor-pointer hover:text-dt-info hover:border-dt-info/30 transition-colors",
|
|
2465
|
+
onClick: (M) => {
|
|
2466
|
+
M.stopPropagation(), T(i.relatedEventId);
|
|
2467
|
+
},
|
|
2468
|
+
title: C ? `Open ${C.udfPath}` : `From: ${i.relatedEventId}`,
|
|
2469
|
+
children: S ?? i.relatedEventId.split("-")[0]
|
|
2470
|
+
}
|
|
2471
|
+
)
|
|
2472
|
+
]
|
|
2473
|
+
},
|
|
2474
|
+
i.id
|
|
2475
|
+
);
|
|
2476
|
+
}),
|
|
2477
|
+
/* @__PURE__ */ t("div", { ref: I })
|
|
2478
|
+
] }),
|
|
2479
|
+
x && /* @__PURE__ */ t(
|
|
2480
|
+
Kt,
|
|
2481
|
+
{
|
|
2482
|
+
x: x.x,
|
|
2483
|
+
y: x.y,
|
|
2484
|
+
items: x.items,
|
|
2485
|
+
onClose: () => f(null)
|
|
2486
|
+
}
|
|
2487
|
+
)
|
|
2488
|
+
] });
|
|
2489
|
+
}
|
|
2490
|
+
function Me({ eventStore: o }) {
|
|
2491
|
+
const [r, a] = L(o.getSettings()), [s, l] = L(o.getSnapshots()), u = o.isPausedState(), c = o.isPersistenceEnabled();
|
|
2492
|
+
U(() => (a(o.getSettings()), o.subscribeSettings((g) => {
|
|
2493
|
+
a(g);
|
|
2494
|
+
})), [o]);
|
|
2495
|
+
const b = (m, g) => {
|
|
2496
|
+
o.saveSettings({ [m]: g });
|
|
2497
|
+
}, N = () => {
|
|
2498
|
+
const m = o.exportSession(), g = new Blob([JSON.stringify(m, null, 2)], {
|
|
2499
|
+
type: "application/json"
|
|
2500
|
+
}), $ = URL.createObjectURL(g), I = document.createElement("a");
|
|
2501
|
+
I.href = $, I.download = `concave-devtools-${Date.now()}.json`, I.click(), URL.revokeObjectURL($);
|
|
2502
|
+
}, y = () => {
|
|
2503
|
+
const m = document.createElement("input");
|
|
2504
|
+
m.type = "file", m.accept = ".json", m.onchange = async (g) => {
|
|
2505
|
+
const $ = g.target.files?.[0];
|
|
2506
|
+
if ($)
|
|
2507
|
+
try {
|
|
2508
|
+
const I = await $.text(), T = JSON.parse(I), E = o.importSession(T);
|
|
2509
|
+
alert(E ? "Session imported successfully!" : "Failed to import session. Invalid format.");
|
|
2510
|
+
} catch (I) {
|
|
2511
|
+
alert(`Failed to import session: ${I}`);
|
|
2512
|
+
}
|
|
2513
|
+
}, m.click();
|
|
2514
|
+
}, D = () => {
|
|
2515
|
+
o.createSnapshot(), l(o.getSnapshots());
|
|
2516
|
+
}, h = (m) => {
|
|
2517
|
+
confirm("Restore to this snapshot? Current state will be replaced.") && o.restoreSnapshot(m) && l(o.getSnapshots());
|
|
2518
|
+
}, x = () => {
|
|
2519
|
+
u ? o.resume() : o.pause(), a({ ...o.getSettings() });
|
|
2520
|
+
}, f = () => {
|
|
2521
|
+
o.clear(), l([]);
|
|
2522
|
+
};
|
|
2523
|
+
return /* @__PURE__ */ n("div", { className: "flex flex-col h-full overflow-y-auto p-3 gap-3", children: [
|
|
2524
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-1.5", children: [
|
|
2525
|
+
/* @__PURE__ */ t("h4", { className: "text-[11px] font-semibold text-dt-text-secondary uppercase tracking-wider m-0 pb-1 border-b border-dt-border-light", children: "Recording" }),
|
|
2526
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-2 px-2 py-1.5 rounded-md border border-dt-border-light/30 bg-dt-bg-secondary/30", children: [
|
|
2527
|
+
/* @__PURE__ */ t(
|
|
2528
|
+
"span",
|
|
2529
|
+
{
|
|
2530
|
+
className: `px-1.5 py-0.5 rounded text-[10px] font-semibold uppercase tracking-wide ${u ? "bg-dt-warning/20 text-dt-warning" : "bg-dt-success/20 text-dt-success"}`,
|
|
2531
|
+
children: u ? "Paused" : "Live"
|
|
2532
|
+
}
|
|
2533
|
+
),
|
|
2534
|
+
/* @__PURE__ */ t("span", { className: "text-[11px] text-dt-text-muted", children: u ? "No new events" : "Capturing events" }),
|
|
2535
|
+
/* @__PURE__ */ t(
|
|
2536
|
+
"button",
|
|
2537
|
+
{
|
|
2538
|
+
type: "button",
|
|
2539
|
+
className: `ml-auto px-2.5 py-1 rounded-md text-[11px] font-medium cursor-pointer border transition-all ${u ? "bg-dt-success/15 text-dt-success border-dt-success/30 hover:bg-dt-success/25" : "bg-dt-error/15 text-dt-error border-dt-error/30 hover:bg-dt-error/25"}`,
|
|
2540
|
+
onClick: x,
|
|
2541
|
+
children: u ? "Resume" : "Pause"
|
|
2542
|
+
}
|
|
2543
|
+
)
|
|
2544
|
+
] })
|
|
2545
|
+
] }),
|
|
2546
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-1.5", children: [
|
|
2547
|
+
/* @__PURE__ */ t("h4", { className: "text-[11px] font-semibold text-dt-text-secondary uppercase tracking-wider m-0 pb-1 border-b border-dt-border-light", children: "General" }),
|
|
2548
|
+
/* @__PURE__ */ n(
|
|
2549
|
+
"label",
|
|
2550
|
+
{
|
|
2551
|
+
className: `flex items-center gap-2 px-2 py-1.5 rounded-md border border-dt-border-light/30 text-[12px] ${c ? "cursor-pointer" : "cursor-not-allowed opacity-70"}`,
|
|
2552
|
+
children: [
|
|
2553
|
+
/* @__PURE__ */ t(
|
|
2554
|
+
"input",
|
|
2555
|
+
{
|
|
2556
|
+
type: "checkbox",
|
|
2557
|
+
checked: r.persistEvents,
|
|
2558
|
+
disabled: !c,
|
|
2559
|
+
onChange: (m) => b("persistEvents", m.target.checked)
|
|
2560
|
+
}
|
|
2561
|
+
),
|
|
2562
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-secondary", children: "Persist events" }),
|
|
2563
|
+
/* @__PURE__ */ t("span", { className: "ml-auto text-[10px] text-dt-text-muted", children: c ? "localStorage" : "disabled in panel" })
|
|
2564
|
+
]
|
|
2565
|
+
}
|
|
2566
|
+
),
|
|
2567
|
+
/* @__PURE__ */ n("label", { className: "flex items-center gap-2 px-2 py-1.5 rounded-md border border-dt-border-light/30 text-[12px] cursor-pointer", children: [
|
|
2568
|
+
/* @__PURE__ */ t(
|
|
2569
|
+
"input",
|
|
2570
|
+
{
|
|
2571
|
+
type: "checkbox",
|
|
2572
|
+
checked: r.captureLogLines,
|
|
2573
|
+
onChange: (m) => b("captureLogLines", m.target.checked)
|
|
2574
|
+
}
|
|
2575
|
+
),
|
|
2576
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-secondary", children: "Capture console logs" })
|
|
2577
|
+
] }),
|
|
2578
|
+
/* @__PURE__ */ n("label", { className: "flex items-center gap-2 px-2 py-1.5 rounded-md border border-dt-border-light/30 text-[12px] cursor-pointer", children: [
|
|
2579
|
+
/* @__PURE__ */ t(
|
|
2580
|
+
"input",
|
|
2581
|
+
{
|
|
2582
|
+
type: "checkbox",
|
|
2583
|
+
checked: r.autoPauseOnError,
|
|
2584
|
+
onChange: (m) => b("autoPauseOnError", m.target.checked)
|
|
2585
|
+
}
|
|
2586
|
+
),
|
|
2587
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-secondary", children: "Auto-pause on error" })
|
|
2588
|
+
] }),
|
|
2589
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-2 px-2 py-1.5 rounded-md border border-dt-border-light/30 text-[12px]", children: [
|
|
2590
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-secondary", children: "Max events" }),
|
|
2591
|
+
/* @__PURE__ */ t(
|
|
2592
|
+
"input",
|
|
2593
|
+
{
|
|
2594
|
+
type: "number",
|
|
2595
|
+
className: "w-20 bg-dt-bg-tertiary border border-dt-border-light rounded px-2 py-1 text-[12px] text-dt-text-secondary font-mono outline-none focus:border-dt-info/50",
|
|
2596
|
+
value: r.maxEvents,
|
|
2597
|
+
onChange: (m) => b("maxEvents", parseInt(m.target.value, 10) || 1e3),
|
|
2598
|
+
min: "100",
|
|
2599
|
+
max: "10000",
|
|
2600
|
+
step: "100"
|
|
2601
|
+
}
|
|
2602
|
+
),
|
|
2603
|
+
/* @__PURE__ */ t("span", { className: "ml-auto text-[10px] text-dt-text-muted", children: "100-10000" })
|
|
2604
|
+
] })
|
|
2605
|
+
] }),
|
|
2606
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-1.5", children: [
|
|
2607
|
+
/* @__PURE__ */ t("h4", { className: "text-[11px] font-semibold text-dt-text-secondary uppercase tracking-wider m-0 pb-1 border-b border-dt-border-light", children: "Network Simulation" }),
|
|
2608
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-2 px-2 py-1.5 rounded-md border border-dt-border-light/30 text-[12px]", children: [
|
|
2609
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-secondary", children: "Latency" }),
|
|
2610
|
+
/* @__PURE__ */ t(
|
|
2611
|
+
"input",
|
|
2612
|
+
{
|
|
2613
|
+
type: "number",
|
|
2614
|
+
className: "w-20 bg-dt-bg-tertiary border border-dt-border-light rounded px-2 py-1 text-[12px] text-dt-text-secondary font-mono outline-none focus:border-dt-info/50",
|
|
2615
|
+
value: r.wsLatencyMs,
|
|
2616
|
+
onChange: (m) => b("wsLatencyMs", Math.max(0, parseInt(m.target.value, 10) || 0)),
|
|
2617
|
+
min: "0",
|
|
2618
|
+
max: "10000",
|
|
2619
|
+
step: "50"
|
|
2620
|
+
}
|
|
2621
|
+
),
|
|
2622
|
+
/* @__PURE__ */ t("span", { className: "text-[10px] text-dt-text-muted", children: "ms" })
|
|
2623
|
+
] }),
|
|
2624
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-2 px-2 py-1.5 rounded-md border border-dt-border-light/30 text-[12px]", children: [
|
|
2625
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-secondary", children: "Jitter" }),
|
|
2626
|
+
/* @__PURE__ */ t(
|
|
2627
|
+
"input",
|
|
2628
|
+
{
|
|
2629
|
+
type: "number",
|
|
2630
|
+
className: "w-20 bg-dt-bg-tertiary border border-dt-border-light rounded px-2 py-1 text-[12px] text-dt-text-secondary font-mono outline-none focus:border-dt-info/50",
|
|
2631
|
+
value: r.wsJitterMs,
|
|
2632
|
+
onChange: (m) => b("wsJitterMs", Math.max(0, parseInt(m.target.value, 10) || 0)),
|
|
2633
|
+
min: "0",
|
|
2634
|
+
max: "5000",
|
|
2635
|
+
step: "25"
|
|
2636
|
+
}
|
|
2637
|
+
),
|
|
2638
|
+
/* @__PURE__ */ t("span", { className: "text-[10px] text-dt-text-muted", children: "ms" })
|
|
2639
|
+
] }),
|
|
2640
|
+
(r.wsLatencyMs > 0 || r.wsJitterMs > 0) && /* @__PURE__ */ n("div", { className: "flex items-center gap-2 px-2 py-1.5 rounded-md border border-dt-warning/30 bg-dt-warning/5 text-[11px]", children: [
|
|
2641
|
+
/* @__PURE__ */ t("span", { className: "px-1.5 py-0.5 rounded bg-dt-warning/20 text-dt-warning text-[10px] font-semibold uppercase tracking-wide", children: "Active" }),
|
|
2642
|
+
/* @__PURE__ */ n("span", { className: "text-dt-text-muted", children: [
|
|
2643
|
+
r.wsLatencyMs,
|
|
2644
|
+
"ms",
|
|
2645
|
+
r.wsJitterMs > 0 ? ` ±${r.wsJitterMs}ms` : ""
|
|
2646
|
+
] }),
|
|
2647
|
+
/* @__PURE__ */ t(
|
|
2648
|
+
"button",
|
|
2649
|
+
{
|
|
2650
|
+
type: "button",
|
|
2651
|
+
className: "ml-auto px-2 py-0.5 rounded-md text-[10px] font-medium cursor-pointer border bg-dt-warning/15 text-dt-warning border-dt-warning/30 hover:bg-dt-warning/25",
|
|
2652
|
+
onClick: () => {
|
|
2653
|
+
o.saveSettings({ wsLatencyMs: 0, wsJitterMs: 0 });
|
|
2654
|
+
},
|
|
2655
|
+
children: "Reset"
|
|
2656
|
+
}
|
|
2657
|
+
)
|
|
2658
|
+
] })
|
|
2659
|
+
] }),
|
|
2660
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-1.5", children: [
|
|
2661
|
+
/* @__PURE__ */ t("h4", { className: "text-[11px] font-semibold text-dt-text-secondary uppercase tracking-wider m-0 pb-1 border-b border-dt-border-light", children: "Session" }),
|
|
2662
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-1.5 flex-wrap", children: [
|
|
2663
|
+
/* @__PURE__ */ t(
|
|
2664
|
+
"button",
|
|
2665
|
+
{
|
|
2666
|
+
type: "button",
|
|
2667
|
+
className: "px-2.5 py-1 bg-dt-bg-tertiary border border-dt-border-light rounded-md text-[11px] text-dt-text-secondary cursor-pointer transition-all hover:bg-white/10 hover:border-dt-border",
|
|
2668
|
+
onClick: N,
|
|
2669
|
+
children: "Export"
|
|
2670
|
+
}
|
|
2671
|
+
),
|
|
2672
|
+
/* @__PURE__ */ t(
|
|
2673
|
+
"button",
|
|
2674
|
+
{
|
|
2675
|
+
type: "button",
|
|
2676
|
+
className: "px-2.5 py-1 bg-dt-bg-tertiary border border-dt-border-light rounded-md text-[11px] text-dt-text-secondary cursor-pointer transition-all hover:bg-white/10 hover:border-dt-border",
|
|
2677
|
+
onClick: y,
|
|
2678
|
+
children: "Import"
|
|
2679
|
+
}
|
|
2680
|
+
),
|
|
2681
|
+
/* @__PURE__ */ t(
|
|
2682
|
+
"button",
|
|
2683
|
+
{
|
|
2684
|
+
type: "button",
|
|
2685
|
+
className: "px-2.5 py-1 bg-dt-bg-tertiary border border-dt-border-light rounded-md text-[11px] text-dt-text-secondary cursor-pointer transition-all hover:bg-dt-error/15 hover:text-dt-error hover:border-dt-error/30",
|
|
2686
|
+
onClick: f,
|
|
2687
|
+
children: "Clear"
|
|
2688
|
+
}
|
|
2689
|
+
)
|
|
2690
|
+
] })
|
|
2691
|
+
] }),
|
|
2692
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-1.5", children: [
|
|
2693
|
+
/* @__PURE__ */ t("h4", { className: "text-[11px] font-semibold text-dt-text-secondary uppercase tracking-wider m-0 pb-1 border-b border-dt-border-light", children: "Time Travel" }),
|
|
2694
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-1.5 flex-wrap", children: [
|
|
2695
|
+
/* @__PURE__ */ t(
|
|
2696
|
+
"button",
|
|
2697
|
+
{
|
|
2698
|
+
type: "button",
|
|
2699
|
+
className: "px-2.5 py-1 bg-dt-bg-tertiary border border-dt-border-light rounded-md text-[11px] text-dt-text-secondary cursor-pointer transition-all hover:bg-white/10 hover:border-dt-border",
|
|
2700
|
+
onClick: D,
|
|
2701
|
+
children: "Snapshot"
|
|
2702
|
+
}
|
|
2703
|
+
),
|
|
2704
|
+
/* @__PURE__ */ n("span", { className: "px-1.5 py-0.5 rounded bg-dt-bg-tertiary text-[10px] text-dt-text-muted font-mono", children: [
|
|
2705
|
+
s.length,
|
|
2706
|
+
" saved"
|
|
2707
|
+
] })
|
|
2708
|
+
] }),
|
|
2709
|
+
s.length > 0 ? /* @__PURE__ */ t("div", { className: "flex flex-col gap-1 max-h-[180px] overflow-y-auto pr-1", children: [...s].reverse().map((m) => /* @__PURE__ */ n(
|
|
2710
|
+
"div",
|
|
2711
|
+
{
|
|
2712
|
+
className: "flex items-center gap-2 px-2 py-1 bg-dt-bg-tertiary/50 rounded border border-dt-border-light/30 text-[11px]",
|
|
2713
|
+
children: [
|
|
2714
|
+
/* @__PURE__ */ t(
|
|
2715
|
+
"span",
|
|
2716
|
+
{
|
|
2717
|
+
className: "text-dt-text-secondary font-mono",
|
|
2718
|
+
title: new Date(m.timestamp).toLocaleString(),
|
|
2719
|
+
children: new Date(m.timestamp).toLocaleTimeString([], {
|
|
2720
|
+
hour: "2-digit",
|
|
2721
|
+
minute: "2-digit",
|
|
2722
|
+
second: "2-digit"
|
|
2723
|
+
})
|
|
2724
|
+
}
|
|
2725
|
+
),
|
|
2726
|
+
/* @__PURE__ */ n("span", { className: "text-dt-text-muted", children: [
|
|
2727
|
+
m.events.length,
|
|
2728
|
+
"e"
|
|
2729
|
+
] }),
|
|
2730
|
+
/* @__PURE__ */ t(
|
|
2731
|
+
"button",
|
|
2732
|
+
{
|
|
2733
|
+
type: "button",
|
|
2734
|
+
className: "ml-auto px-1.5 py-0.5 bg-dt-info/15 text-dt-info border border-dt-info/30 rounded text-[10px] font-medium cursor-pointer hover:bg-dt-info/25",
|
|
2735
|
+
onClick: () => h(m.timestamp),
|
|
2736
|
+
children: "Restore"
|
|
2737
|
+
}
|
|
2738
|
+
)
|
|
2739
|
+
]
|
|
2740
|
+
},
|
|
2741
|
+
m.timestamp
|
|
2742
|
+
)) }) : /* @__PURE__ */ t("p", { className: "text-[11px] text-dt-text-muted/60 m-0", children: "No snapshots" })
|
|
2743
|
+
] }),
|
|
2744
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-1.5", children: [
|
|
2745
|
+
/* @__PURE__ */ t("h4", { className: "text-[11px] font-semibold text-dt-text-secondary uppercase tracking-wider m-0 pb-1 border-b border-dt-border-light", children: "Shortcuts" }),
|
|
2746
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
|
|
2747
|
+
/* @__PURE__ */ n("div", { className: "flex items-center justify-between text-[11px]", children: [
|
|
2748
|
+
/* @__PURE__ */ t("kbd", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary border border-dt-border-light rounded text-[10px] font-mono text-dt-text-tertiary", children: "Cmd/Ctrl + Shift + D" }),
|
|
2749
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "Toggle DevTools" })
|
|
2750
|
+
] }),
|
|
2751
|
+
/* @__PURE__ */ n("div", { className: "flex items-center justify-between text-[11px]", children: [
|
|
2752
|
+
/* @__PURE__ */ t("kbd", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary border border-dt-border-light rounded text-[10px] font-mono text-dt-text-tertiary", children: "Cmd/Ctrl + K" }),
|
|
2753
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "Focus search" })
|
|
2754
|
+
] }),
|
|
2755
|
+
/* @__PURE__ */ n("div", { className: "flex items-center justify-between text-[11px]", children: [
|
|
2756
|
+
/* @__PURE__ */ t("kbd", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary border border-dt-border-light rounded text-[10px] font-mono text-dt-text-tertiary", children: "Cmd/Ctrl + E" }),
|
|
2757
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "Export session" })
|
|
2758
|
+
] }),
|
|
2759
|
+
/* @__PURE__ */ n("div", { className: "flex items-center justify-between text-[11px]", children: [
|
|
2760
|
+
/* @__PURE__ */ t("kbd", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary border border-dt-border-light rounded text-[10px] font-mono text-dt-text-tertiary", children: "Cmd/Ctrl + P" }),
|
|
2761
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "Pause/resume" })
|
|
2762
|
+
] })
|
|
2763
|
+
] })
|
|
2764
|
+
] }),
|
|
2765
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-1.5", children: [
|
|
2766
|
+
/* @__PURE__ */ t("h4", { className: "text-[11px] font-semibold text-dt-text-secondary uppercase tracking-wider m-0 pb-1 border-b border-dt-border-light", children: "About" }),
|
|
2767
|
+
/* @__PURE__ */ n("p", { className: "m-0 text-[11px] text-dt-text-muted", children: [
|
|
2768
|
+
/* @__PURE__ */ t("span", { className: "text-dt-text-secondary font-semibold", children: "Concave DevTools" }),
|
|
2769
|
+
" ",
|
|
2770
|
+
/* @__PURE__ */ n("span", { children: [
|
|
2771
|
+
"v",
|
|
2772
|
+
ae
|
|
2773
|
+
] })
|
|
2774
|
+
] })
|
|
2775
|
+
] })
|
|
2776
|
+
] });
|
|
2777
|
+
}
|
|
2778
|
+
function $e({
|
|
2779
|
+
eventStore: o,
|
|
2780
|
+
position: r = "bottom-right",
|
|
2781
|
+
mode: a = "overlay",
|
|
2782
|
+
panelConnectionState: s
|
|
2783
|
+
}) {
|
|
2784
|
+
const l = a === "panel", [u, c] = L(() => {
|
|
2785
|
+
if (l) return !0;
|
|
2786
|
+
const p = jt("concave-devtools-open");
|
|
2787
|
+
return p ? JSON.parse(p) : !0;
|
|
2788
|
+
}), [b, N] = L("activity"), [y, D] = L([]), [h, x] = L(!1);
|
|
2789
|
+
U(() => {
|
|
2790
|
+
const p = o.subscribe((i) => {
|
|
2791
|
+
D(o.getAllEvents()), x(o.isPausedState());
|
|
2792
|
+
});
|
|
2793
|
+
return D(o.getAllEvents()), x(o.isPausedState()), p;
|
|
2794
|
+
}, [o]), U(() => {
|
|
2795
|
+
l || Rt("concave-devtools-open", JSON.stringify(u));
|
|
2796
|
+
}, [u, l]);
|
|
2797
|
+
const f = F(() => {
|
|
2798
|
+
o.clear(), D([]);
|
|
2799
|
+
}, [o]), m = F(() => {
|
|
2800
|
+
c(!1);
|
|
2801
|
+
}, []), g = F(() => {
|
|
2802
|
+
const p = o.exportSession(), i = new Blob([JSON.stringify(p, null, 2)], {
|
|
2803
|
+
type: "application/json"
|
|
2804
|
+
}), C = URL.createObjectURL(i), S = document.createElement("a");
|
|
2805
|
+
S.href = C, S.download = `concave-devtools-${Date.now()}.json`, S.click(), URL.revokeObjectURL(C);
|
|
2806
|
+
}, [o]), $ = F(() => {
|
|
2807
|
+
o.isPausedState() ? (o.resume(), x(!1)) : (o.pause(), x(!0));
|
|
2808
|
+
}, [o]);
|
|
2809
|
+
U(() => {
|
|
2810
|
+
const p = (i) => {
|
|
2811
|
+
if ((i.metaKey || i.ctrlKey) && i.shiftKey && i.key === "D") {
|
|
2812
|
+
i.preventDefault(), c((C) => !C);
|
|
2813
|
+
return;
|
|
2814
|
+
}
|
|
2815
|
+
$t() && ((i.metaKey || i.ctrlKey) && i.key === "e" && (i.preventDefault(), g()), (i.metaKey || i.ctrlKey) && i.key === "p" && (i.preventDefault(), $()));
|
|
2816
|
+
};
|
|
2817
|
+
return window.addEventListener("keydown", p), () => window.removeEventListener("keydown", p);
|
|
2818
|
+
}, [f, g, $]);
|
|
2819
|
+
const I = {
|
|
2820
|
+
"bottom-right": "bottom-4 right-4",
|
|
2821
|
+
"bottom-left": "bottom-4 left-4",
|
|
2822
|
+
"top-right": "top-4 right-4",
|
|
2823
|
+
"top-left": "top-4 left-4"
|
|
2824
|
+
}[r], T = y.filter(
|
|
2825
|
+
(p) => p.type === "query" || p.type === "mutation" || p.type === "action" || p.type === "auth"
|
|
2826
|
+
), E = o.getActiveSubscriptions().length, z = y.filter((p) => p.type === "log"), O = T.filter((p) => "status" in p && p.status === "error"), d = [
|
|
2827
|
+
{ id: "activity", label: "Activity", count: T.length, hasError: O.length > 0 },
|
|
2828
|
+
{ id: "subscriptions", label: "Subscriptions", count: E, hasError: !1 },
|
|
2829
|
+
{ id: "performance", label: "Performance", count: 0, hasError: !1 },
|
|
2830
|
+
{ id: "logs", label: "Logs", count: z.length, hasError: !1 },
|
|
2831
|
+
{ id: "settings", label: "Settings", count: 0, hasError: !1 }
|
|
2832
|
+
];
|
|
2833
|
+
return /* @__PURE__ */ n("div", { className: l ? "w-full h-full bg-dt-bg font-sans text-[13px] leading-normal text-dt-text-secondary antialiased" : `fixed z-[999999] font-sans text-[13px] leading-normal text-dt-text-secondary antialiased ${I}`, children: [
|
|
2834
|
+
!l && !u && /* @__PURE__ */ n(
|
|
2835
|
+
"button",
|
|
2836
|
+
{
|
|
2837
|
+
className: "flex items-center gap-2.5 px-[18px] py-3 bg-gradient-to-br from-zinc-900/[0.98] to-zinc-800/95 backdrop-blur-[20px] border border-dt-border rounded-[14px] text-dt-text-tertiary cursor-pointer shadow-lg relative overflow-hidden hover:scale-[1.02] hover:-translate-y-0.5 transition-all",
|
|
2838
|
+
onClick: () => c(!0),
|
|
2839
|
+
title: "Open Concave DevTools (Cmd/Ctrl+Shift+D)",
|
|
2840
|
+
"aria-label": "Open Concave DevTools",
|
|
2841
|
+
"aria-expanded": "false",
|
|
2842
|
+
children: [
|
|
2843
|
+
/* @__PURE__ */ n("svg", { width: "20", height: "20", viewBox: "0 0 32 32", fill: "none", children: [
|
|
2844
|
+
/* @__PURE__ */ t("rect", { width: "32", height: "32", rx: he, fill: xe }),
|
|
2845
|
+
/* @__PURE__ */ t("path", { d: be, fill: "white" })
|
|
2846
|
+
] }),
|
|
2847
|
+
O.length > 0 ? /* @__PURE__ */ t("span", { className: "bg-gradient-to-br from-red-500 to-red-600 text-white px-2 py-0.5 rounded-full text-[10px] font-bold tracking-wide shadow-md min-w-5 text-center", children: O.length }) : T.length > 0 ? /* @__PURE__ */ t("span", { className: "bg-gradient-to-br from-blue-500 to-blue-600 text-white px-2 py-0.5 rounded-full text-[10px] font-bold tracking-wide shadow-md min-w-5 text-center", children: T.length }) : null
|
|
2848
|
+
]
|
|
2849
|
+
}
|
|
2850
|
+
),
|
|
2851
|
+
(l || u) && /* @__PURE__ */ n("div", { className: l ? "w-full h-full bg-dt-bg flex flex-col overflow-hidden outline-none" : "w-[min(860px,calc(100vw-32px))] min-w-[300px] max-w-[calc(100vw-24px)] h-[min(620px,calc(100vh-32px))] min-h-[360px] max-h-[calc(100vh-24px)] bg-zinc-950/98 border border-dt-border rounded-2xl shadow-2xl flex flex-col overflow-hidden outline-none", role: "dialog", "aria-label": "Concave DevTools", "aria-modal": "false", tabIndex: -1, children: [
|
|
2852
|
+
/* @__PURE__ */ n("div", { className: "flex items-center justify-between border-b border-dt-border px-0 bg-dt-bg-secondary", children: [
|
|
2853
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-0 flex-1 overflow-x-auto", role: "tablist", "aria-label": "DevTools panels", children: d.map((p) => /* @__PURE__ */ n(
|
|
2854
|
+
"button",
|
|
2855
|
+
{
|
|
2856
|
+
id: `tab-${p.id}`,
|
|
2857
|
+
className: l ? `px-3 py-[7px] bg-transparent border-none text-[12px] cursor-pointer transition-colors whitespace-nowrap border-b-2 ${b === p.id ? "text-dt-info border-b-dt-info" : "text-dt-text-tertiary border-b-transparent hover:text-dt-text-secondary hover:bg-white/5"}` : `px-3 py-[7px] bg-transparent border-none text-[12px] cursor-pointer transition-colors whitespace-nowrap border-b-2 ${b === p.id ? "text-dt-info border-b-dt-info" : "text-dt-text-tertiary border-b-transparent hover:text-dt-text-secondary hover:bg-white/5"}`,
|
|
2858
|
+
onClick: () => N(p.id),
|
|
2859
|
+
"aria-label": `${p.label} panel`,
|
|
2860
|
+
"aria-selected": b === p.id,
|
|
2861
|
+
role: "tab",
|
|
2862
|
+
"aria-controls": `panel-${p.id}`,
|
|
2863
|
+
children: [
|
|
2864
|
+
/* @__PURE__ */ t("span", { children: p.label }),
|
|
2865
|
+
p.count > 0 && /* @__PURE__ */ t("span", { className: l ? `ml-1.5 px-1.5 py-0 rounded-full text-[10px] font-medium ${p.hasError ? "bg-dt-error/20 text-dt-error" : "bg-dt-bg-tertiary text-dt-text-tertiary"}` : `ml-1.5 px-1.5 py-0 rounded-full text-[10px] font-medium ${p.hasError ? "bg-dt-error/20 text-dt-error" : "bg-dt-bg-tertiary text-dt-text-tertiary"}`, children: p.count })
|
|
2866
|
+
]
|
|
2867
|
+
},
|
|
2868
|
+
p.id
|
|
2869
|
+
)) }),
|
|
2870
|
+
/* @__PURE__ */ n("div", { className: l ? "flex items-center gap-0.5 ml-auto pr-1" : "flex items-center gap-1.5 ml-auto", role: "toolbar", "aria-label": "DevTools quick actions", children: [
|
|
2871
|
+
/* @__PURE__ */ t(
|
|
2872
|
+
"button",
|
|
2873
|
+
{
|
|
2874
|
+
type: "button",
|
|
2875
|
+
className: l ? `flex items-center justify-center w-7 h-7 p-0 bg-transparent border-none rounded cursor-pointer transition-colors hover:bg-white/10 ${h ? "text-dt-text-muted hover:text-dt-text-secondary" : "text-dt-error hover:text-dt-error"}` : `flex items-center justify-center w-7 h-7 p-0 bg-transparent border-none rounded-md cursor-pointer transition-all relative hover:bg-zinc-600/20 active:scale-[0.94] ${h ? "text-dt-text-muted hover:text-dt-text-secondary" : "text-dt-error bg-dt-error/10 hover:bg-dt-error/15 hover:text-dt-error"}`,
|
|
2876
|
+
onClick: $,
|
|
2877
|
+
title: h ? "Start recording (Cmd/Ctrl+P)" : "Stop recording (Cmd/Ctrl+P)",
|
|
2878
|
+
"aria-label": h ? "Start recording" : "Stop recording",
|
|
2879
|
+
"aria-pressed": !h,
|
|
2880
|
+
children: h ? /* @__PURE__ */ t("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ t("circle", { cx: "8", cy: "8", r: "4.75", stroke: "currentColor", strokeWidth: "1.5" }) }) : /* @__PURE__ */ t("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ t("circle", { cx: "8", cy: "8", r: "4.75" }) })
|
|
2881
|
+
}
|
|
2882
|
+
),
|
|
2883
|
+
/* @__PURE__ */ t(
|
|
2884
|
+
"button",
|
|
2885
|
+
{
|
|
2886
|
+
type: "button",
|
|
2887
|
+
className: l ? "flex items-center justify-center w-7 h-7 p-0 bg-transparent border-none rounded text-dt-text-tertiary cursor-pointer transition-colors hover:bg-white/10 hover:text-dt-text-secondary" : "flex items-center justify-center w-7 h-7 p-0 bg-transparent border-none rounded-md text-dt-text-muted cursor-pointer transition-all relative hover:bg-zinc-600/20 hover:text-dt-text-secondary active:scale-[0.94]",
|
|
2888
|
+
onClick: g,
|
|
2889
|
+
title: "Export Session (Cmd/Ctrl+E)",
|
|
2890
|
+
"aria-label": "Export session",
|
|
2891
|
+
children: /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "currentColor", children: [
|
|
2892
|
+
/* @__PURE__ */ t("path", { d: "M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5z" }),
|
|
2893
|
+
/* @__PURE__ */ t("path", { d: "M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3z" })
|
|
2894
|
+
] })
|
|
2895
|
+
}
|
|
2896
|
+
),
|
|
2897
|
+
/* @__PURE__ */ t(
|
|
2898
|
+
"button",
|
|
2899
|
+
{
|
|
2900
|
+
type: "button",
|
|
2901
|
+
className: l ? "flex items-center justify-center w-7 h-7 p-0 bg-transparent border-none rounded text-dt-text-tertiary cursor-pointer transition-colors hover:bg-white/10 hover:text-dt-text-secondary" : "flex items-center justify-center w-7 h-7 p-0 bg-transparent border-none rounded-md text-dt-text-muted cursor-pointer transition-all relative hover:bg-zinc-600/20 hover:text-dt-text-secondary active:scale-[0.94]",
|
|
2902
|
+
onClick: f,
|
|
2903
|
+
title: "Clear all data",
|
|
2904
|
+
"aria-label": "Clear all data",
|
|
2905
|
+
children: /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
2906
|
+
/* @__PURE__ */ t("circle", { cx: "8", cy: "8", r: "5.5", stroke: "currentColor", strokeWidth: "1.2" }),
|
|
2907
|
+
/* @__PURE__ */ t("path", { d: "M4.5 11.5 11.5 4.5", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round" })
|
|
2908
|
+
] })
|
|
2909
|
+
}
|
|
2910
|
+
),
|
|
2911
|
+
!l && /* @__PURE__ */ t(
|
|
2912
|
+
"button",
|
|
2913
|
+
{
|
|
2914
|
+
type: "button",
|
|
2915
|
+
className: "flex items-center justify-center w-7 h-7 p-0 bg-transparent border-none rounded-md text-dt-text-muted cursor-pointer transition-all relative hover:bg-red-500/15 hover:text-dt-error active:scale-[0.94]",
|
|
2916
|
+
onClick: m,
|
|
2917
|
+
title: "Close (Cmd/Ctrl+Shift+D)",
|
|
2918
|
+
"aria-label": "Close DevTools",
|
|
2919
|
+
children: /* @__PURE__ */ t("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ t("path", { d: "M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z" }) })
|
|
2920
|
+
}
|
|
2921
|
+
)
|
|
2922
|
+
] })
|
|
2923
|
+
] }),
|
|
2924
|
+
/* @__PURE__ */ n("div", { className: "flex-1 min-h-0 flex flex-col", children: [
|
|
2925
|
+
b === "activity" && /* @__PURE__ */ t("div", { id: "panel-activity", className: "flex-1 min-h-0 flex flex-col", role: "tabpanel", "aria-labelledby": "tab-activity", children: /* @__PURE__ */ t(ke, { eventStore: o, panelConnectionState: l ? s : void 0 }) }),
|
|
2926
|
+
b === "subscriptions" && /* @__PURE__ */ t("div", { id: "panel-subscriptions", className: "flex-1 min-h-0 flex flex-col", role: "tabpanel", "aria-labelledby": "tab-subscriptions", children: /* @__PURE__ */ t(Ne, { eventStore: o }) }),
|
|
2927
|
+
b === "performance" && /* @__PURE__ */ t("div", { id: "panel-performance", className: "flex-1 min-h-0 flex flex-col", role: "tabpanel", "aria-labelledby": "tab-performance", children: /* @__PURE__ */ t(Ce, { eventStore: o, onNavigate: N }) }),
|
|
2928
|
+
b === "logs" && /* @__PURE__ */ t("div", { id: "panel-logs", className: "flex-1 min-h-0 flex flex-col", role: "tabpanel", "aria-labelledby": "tab-logs", children: /* @__PURE__ */ t(Se, { eventStore: o, onNavigate: N }) }),
|
|
2929
|
+
b === "settings" && /* @__PURE__ */ t("div", { id: "panel-settings", className: "flex-1 min-h-0 flex flex-col", role: "tabpanel", "aria-labelledby": "tab-settings", children: /* @__PURE__ */ t(Me, { eventStore: o }) })
|
|
2930
|
+
] })
|
|
2931
|
+
] })
|
|
2932
|
+
] });
|
|
2933
|
+
}
|
|
2934
|
+
var ut = {}, oe;
|
|
2935
|
+
function Ie() {
|
|
2936
|
+
if (oe) return ut;
|
|
2937
|
+
oe = 1;
|
|
2938
|
+
var o = se;
|
|
2939
|
+
if (process.env.NODE_ENV === "production")
|
|
2940
|
+
ut.createRoot = o.createRoot, ut.hydrateRoot = o.hydrateRoot;
|
|
2941
|
+
else {
|
|
2942
|
+
var r = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
2943
|
+
ut.createRoot = function(a, s) {
|
|
2944
|
+
r.usingClientEntryPoint = !0;
|
|
2945
|
+
try {
|
|
2946
|
+
return o.createRoot(a, s);
|
|
2947
|
+
} finally {
|
|
2948
|
+
r.usingClientEntryPoint = !1;
|
|
2949
|
+
}
|
|
2950
|
+
}, ut.hydrateRoot = function(a, s, l) {
|
|
2951
|
+
r.usingClientEntryPoint = !0;
|
|
2952
|
+
try {
|
|
2953
|
+
return o.hydrateRoot(a, s, l);
|
|
2954
|
+
} finally {
|
|
2955
|
+
r.usingClientEntryPoint = !1;
|
|
2956
|
+
}
|
|
2957
|
+
};
|
|
2958
|
+
}
|
|
2959
|
+
return ut;
|
|
2960
|
+
}
|
|
2961
|
+
var _e = Ie();
|
|
2962
|
+
const Le = '@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:"Fira Code","Monaco","Consolas",monospace;--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-400:oklch(85.2% .199 91.936);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-800:oklch(27.4% .006 286.033);--color-zinc-900:oklch(21% .006 285.885);--color-zinc-950:oklch(14.1% .005 285.823);--color-white:#fff;--spacing:.25rem;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--tracking-wider:.05em;--leading-normal:1.5;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-2xl:1rem;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-lg:16px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-dt-bg:#121214fa;--color-dt-bg-secondary:#18181bf2;--color-dt-bg-tertiary:#27272a99;--color-dt-border:#3f3f4699;--color-dt-border-light:#3f3f4666;--color-dt-text:#f4f4f5;--color-dt-text-secondary:#e4e4e7;--color-dt-text-tertiary:#a1a1aa;--color-dt-text-muted:#71717a;--color-dt-success:#22c55e;--color-dt-error:#ef4444;--color-dt-warning:#f59e0b;--color-dt-info:#3b82f6;--color-dt-query:#60a5fa;--color-dt-mutation:#a78bfa;--color-dt-action:#34d399}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.top-1\\/2{top:50%}.top-4{top:calc(var(--spacing)*4)}.right-1\\.5{right:calc(var(--spacing)*1.5)}.right-4{right:calc(var(--spacing)*4)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-4{bottom:calc(var(--spacing)*4)}.left-4{left:calc(var(--spacing)*4)}.z-\\[2\\]{z-index:2}.z-\\[999999\\]{z-index:999999}.z-\\[9999999\\]{z-index:9999999}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-0{margin:calc(var(--spacing)*0)}.mx-0\\.5{margin-inline:calc(var(--spacing)*.5)}.my-0\\.5{margin-block:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mr-1{margin-right:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-1\\.5{margin-left:calc(var(--spacing)*1.5)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-\\[min\\(620px\\,calc\\(100vh-32px\\)\\)\\]{height:min(620px,100vh - 32px)}.h-full{height:100%}.max-h-\\[80px\\]{max-height:80px}.max-h-\\[100px\\]{max-height:100px}.max-h-\\[150px\\]{max-height:150px}.max-h-\\[180px\\]{max-height:180px}.max-h-\\[200px\\]{max-height:200px}.max-h-\\[calc\\(100vh-24px\\)\\]{max-height:calc(100vh - 24px)}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-\\[360px\\]{min-height:360px}.min-h-px{min-height:1px}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2\\.5{width:calc(var(--spacing)*2.5)}.w-4{width:calc(var(--spacing)*4)}.w-7{width:calc(var(--spacing)*7)}.w-10{width:calc(var(--spacing)*10)}.w-14{width:calc(var(--spacing)*14)}.w-16{width:calc(var(--spacing)*16)}.w-20{width:calc(var(--spacing)*20)}.w-24{width:calc(var(--spacing)*24)}.w-\\[300px\\]{width:300px}.w-\\[320px\\]{width:320px}.w-\\[min\\(860px\\,calc\\(100vw-32px\\)\\)\\]{width:min(860px,100vw - 32px)}.w-full{width:100%}.max-w-\\[44\\%\\]{max-width:44%}.max-w-\\[150px\\]{max-width:150px}.max-w-\\[180px\\]{max-width:180px}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[280px\\]{max-width:280px}.max-w-\\[360px\\]{max-width:360px}.max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}.max-w-\\[min\\(58vw\\,680px\\)\\]{max-width:min(58vw,680px)}.max-w-\\[min\\(62vw\\,760px\\)\\]{max-width:min(62vw,760px)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-5{min-width:calc(var(--spacing)*5)}.min-w-\\[180px\\]{min-width:180px}.min-w-\\[300px\\]{min-width:300px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-150{--tw-scale-x:150%;--tw-scale-y:150%;--tw-scale-z:150%;scale:var(--tw-scale-x)var(--tw-scale-y)}.rotate-90{rotate:90deg}.animate-\\[dt-fade-in_0\\.1s_ease-out\\]{animation:.1s ease-out dt-fade-in}.animate-\\[dt-fade-in_0\\.15s_ease-out\\]{animation:.15s ease-out dt-fade-in}.animate-\\[dt-slide-in_0\\.2s_ease-out\\]{animation:.2s ease-out dt-slide-in}.animate-pulse{animation:var(--animate-pulse)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0{gap:calc(var(--spacing)*0)}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-\\[3px\\]{gap:3px}.gap-px{gap:1px}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\\[3px\\]{border-radius:3px}.rounded-\\[14px\\]{border-radius:14px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-sm{border-top-left-radius:var(--radius-sm);border-top-right-radius:var(--radius-sm)}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-none{--tw-border-style:none;border-style:none}.border-dt-border{border-color:var(--color-dt-border)}.border-dt-border-light{border-color:var(--color-dt-border-light)}.border-dt-border-light\\/30{border-color:#3f3f461f}@supports (color:color-mix(in lab,red,red)){.border-dt-border-light\\/30{border-color:color-mix(in oklab,var(--color-dt-border-light)30%,transparent)}}.border-dt-border-light\\/40{border-color:#3f3f4629}@supports (color:color-mix(in lab,red,red)){.border-dt-border-light\\/40{border-color:color-mix(in oklab,var(--color-dt-border-light)40%,transparent)}}.border-dt-border-light\\/50{border-color:#3f3f4633}@supports (color:color-mix(in lab,red,red)){.border-dt-border-light\\/50{border-color:color-mix(in oklab,var(--color-dt-border-light)50%,transparent)}}.border-dt-error\\/30{border-color:#ef44444d}@supports (color:color-mix(in lab,red,red)){.border-dt-error\\/30{border-color:color-mix(in oklab,var(--color-dt-error)30%,transparent)}}.border-dt-info\\/20{border-color:#3b82f633}@supports (color:color-mix(in lab,red,red)){.border-dt-info\\/20{border-color:color-mix(in oklab,var(--color-dt-info)20%,transparent)}}.border-dt-info\\/30{border-color:#3b82f64d}@supports (color:color-mix(in lab,red,red)){.border-dt-info\\/30{border-color:color-mix(in oklab,var(--color-dt-info)30%,transparent)}}.border-dt-mutation\\/20{border-color:#a78bfa33}@supports (color:color-mix(in lab,red,red)){.border-dt-mutation\\/20{border-color:color-mix(in oklab,var(--color-dt-mutation)20%,transparent)}}.border-dt-success\\/30{border-color:#22c55e4d}@supports (color:color-mix(in lab,red,red)){.border-dt-success\\/30{border-color:color-mix(in oklab,var(--color-dt-success)30%,transparent)}}.border-dt-warning\\/20{border-color:#f59e0b33}@supports (color:color-mix(in lab,red,red)){.border-dt-warning\\/20{border-color:color-mix(in oklab,var(--color-dt-warning)20%,transparent)}}.border-dt-warning\\/30{border-color:#f59e0b4d}@supports (color:color-mix(in lab,red,red)){.border-dt-warning\\/30{border-color:color-mix(in oklab,var(--color-dt-warning)30%,transparent)}}.border-transparent{border-color:#0000}.border-zinc-700\\/30{border-color:#3f3f464d}@supports (color:color-mix(in lab,red,red)){.border-zinc-700\\/30{border-color:color-mix(in oklab,var(--color-zinc-700)30%,transparent)}}.border-b-dt-info{border-bottom-color:var(--color-dt-info)}.border-b-transparent{border-bottom-color:#0000}.border-l-dt-error\\/40{border-left-color:#ef444466}@supports (color:color-mix(in lab,red,red)){.border-l-dt-error\\/40{border-left-color:color-mix(in oklab,var(--color-dt-error)40%,transparent)}}.border-l-dt-query\\/30{border-left-color:#60a5fa4d}@supports (color:color-mix(in lab,red,red)){.border-l-dt-query\\/30{border-left-color:color-mix(in oklab,var(--color-dt-query)30%,transparent)}}.bg-dt-action{background-color:var(--color-dt-action)}.bg-dt-action\\/20{background-color:#34d39933}@supports (color:color-mix(in lab,red,red)){.bg-dt-action\\/20{background-color:color-mix(in oklab,var(--color-dt-action)20%,transparent)}}.bg-dt-action\\/25{background-color:#34d39940}@supports (color:color-mix(in lab,red,red)){.bg-dt-action\\/25{background-color:color-mix(in oklab,var(--color-dt-action)25%,transparent)}}.bg-dt-bg{background-color:var(--color-dt-bg)}.bg-dt-bg-secondary{background-color:var(--color-dt-bg-secondary)}.bg-dt-bg-secondary\\/30{background-color:#18181b49}@supports (color:color-mix(in lab,red,red)){.bg-dt-bg-secondary\\/30{background-color:color-mix(in oklab,var(--color-dt-bg-secondary)30%,transparent)}}.bg-dt-bg-secondary\\/50{background-color:#18181b79}@supports (color:color-mix(in lab,red,red)){.bg-dt-bg-secondary\\/50{background-color:color-mix(in oklab,var(--color-dt-bg-secondary)50%,transparent)}}.bg-dt-bg-secondary\\/85{background-color:#18181bce}@supports (color:color-mix(in lab,red,red)){.bg-dt-bg-secondary\\/85{background-color:color-mix(in oklab,var(--color-dt-bg-secondary)85%,transparent)}}.bg-dt-bg-tertiary{background-color:var(--color-dt-bg-tertiary)}.bg-dt-bg-tertiary\\/30{background-color:#27272a2e}@supports (color:color-mix(in lab,red,red)){.bg-dt-bg-tertiary\\/30{background-color:color-mix(in oklab,var(--color-dt-bg-tertiary)30%,transparent)}}.bg-dt-bg-tertiary\\/50{background-color:#27272a4d}@supports (color:color-mix(in lab,red,red)){.bg-dt-bg-tertiary\\/50{background-color:color-mix(in oklab,var(--color-dt-bg-tertiary)50%,transparent)}}.bg-dt-error{background-color:var(--color-dt-error)}.bg-dt-error\\/5{background-color:#ef44440d}@supports (color:color-mix(in lab,red,red)){.bg-dt-error\\/5{background-color:color-mix(in oklab,var(--color-dt-error)5%,transparent)}}.bg-dt-error\\/10{background-color:#ef44441a}@supports (color:color-mix(in lab,red,red)){.bg-dt-error\\/10{background-color:color-mix(in oklab,var(--color-dt-error)10%,transparent)}}.bg-dt-error\\/15{background-color:#ef444426}@supports (color:color-mix(in lab,red,red)){.bg-dt-error\\/15{background-color:color-mix(in oklab,var(--color-dt-error)15%,transparent)}}.bg-dt-error\\/20{background-color:#ef444433}@supports (color:color-mix(in lab,red,red)){.bg-dt-error\\/20{background-color:color-mix(in oklab,var(--color-dt-error)20%,transparent)}}.bg-dt-error\\/25{background-color:#ef444440}@supports (color:color-mix(in lab,red,red)){.bg-dt-error\\/25{background-color:color-mix(in oklab,var(--color-dt-error)25%,transparent)}}.bg-dt-info\\/5{background-color:#3b82f60d}@supports (color:color-mix(in lab,red,red)){.bg-dt-info\\/5{background-color:color-mix(in oklab,var(--color-dt-info)5%,transparent)}}.bg-dt-info\\/15{background-color:#3b82f626}@supports (color:color-mix(in lab,red,red)){.bg-dt-info\\/15{background-color:color-mix(in oklab,var(--color-dt-info)15%,transparent)}}.bg-dt-info\\/20{background-color:#3b82f633}@supports (color:color-mix(in lab,red,red)){.bg-dt-info\\/20{background-color:color-mix(in oklab,var(--color-dt-info)20%,transparent)}}.bg-dt-mutation{background-color:var(--color-dt-mutation)}.bg-dt-mutation\\/10{background-color:#a78bfa1a}@supports (color:color-mix(in lab,red,red)){.bg-dt-mutation\\/10{background-color:color-mix(in oklab,var(--color-dt-mutation)10%,transparent)}}.bg-dt-mutation\\/20{background-color:#a78bfa33}@supports (color:color-mix(in lab,red,red)){.bg-dt-mutation\\/20{background-color:color-mix(in oklab,var(--color-dt-mutation)20%,transparent)}}.bg-dt-mutation\\/25{background-color:#a78bfa40}@supports (color:color-mix(in lab,red,red)){.bg-dt-mutation\\/25{background-color:color-mix(in oklab,var(--color-dt-mutation)25%,transparent)}}.bg-dt-query{background-color:var(--color-dt-query)}.bg-dt-query\\/20{background-color:#60a5fa33}@supports (color:color-mix(in lab,red,red)){.bg-dt-query\\/20{background-color:color-mix(in oklab,var(--color-dt-query)20%,transparent)}}.bg-dt-query\\/25{background-color:#60a5fa40}@supports (color:color-mix(in lab,red,red)){.bg-dt-query\\/25{background-color:color-mix(in oklab,var(--color-dt-query)25%,transparent)}}.bg-dt-query\\/\\[0\\.02\\]{background-color:#60a5fa05}@supports (color:color-mix(in lab,red,red)){.bg-dt-query\\/\\[0\\.02\\]{background-color:color-mix(in oklab,var(--color-dt-query)2%,transparent)}}.bg-dt-success{background-color:var(--color-dt-success)}.bg-dt-success\\/5{background-color:#22c55e0d}@supports (color:color-mix(in lab,red,red)){.bg-dt-success\\/5{background-color:color-mix(in oklab,var(--color-dt-success)5%,transparent)}}.bg-dt-success\\/15{background-color:#22c55e26}@supports (color:color-mix(in lab,red,red)){.bg-dt-success\\/15{background-color:color-mix(in oklab,var(--color-dt-success)15%,transparent)}}.bg-dt-success\\/20{background-color:#22c55e33}@supports (color:color-mix(in lab,red,red)){.bg-dt-success\\/20{background-color:color-mix(in oklab,var(--color-dt-success)20%,transparent)}}.bg-dt-warning{background-color:var(--color-dt-warning)}.bg-dt-warning\\/5{background-color:#f59e0b0d}@supports (color:color-mix(in lab,red,red)){.bg-dt-warning\\/5{background-color:color-mix(in oklab,var(--color-dt-warning)5%,transparent)}}.bg-dt-warning\\/15{background-color:#f59e0b26}@supports (color:color-mix(in lab,red,red)){.bg-dt-warning\\/15{background-color:color-mix(in oklab,var(--color-dt-warning)15%,transparent)}}.bg-dt-warning\\/20{background-color:#f59e0b33}@supports (color:color-mix(in lab,red,red)){.bg-dt-warning\\/20{background-color:color-mix(in oklab,var(--color-dt-warning)20%,transparent)}}.bg-transparent{background-color:#0000}.bg-white\\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.bg-white\\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.bg-white\\/\\[0\\.03\\]{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.03\\]{background-color:color-mix(in oklab,var(--color-white)3%,transparent)}}.bg-white\\/\\[0\\.06\\]{background-color:#ffffff0f}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.06\\]{background-color:color-mix(in oklab,var(--color-white)6%,transparent)}}.bg-white\\/\\[0\\.08\\]{background-color:#ffffff14}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.08\\]{background-color:color-mix(in oklab,var(--color-white)8%,transparent)}}.bg-yellow-400\\/25{background-color:#fac80040}@supports (color:color-mix(in lab,red,red)){.bg-yellow-400\\/25{background-color:color-mix(in oklab,var(--color-yellow-400)25%,transparent)}}.bg-yellow-400\\/30{background-color:#fac8004d}@supports (color:color-mix(in lab,red,red)){.bg-yellow-400\\/30{background-color:color-mix(in oklab,var(--color-yellow-400)30%,transparent)}}.bg-zinc-500\\/25{background-color:#71717b40}@supports (color:color-mix(in lab,red,red)){.bg-zinc-500\\/25{background-color:color-mix(in oklab,var(--color-zinc-500)25%,transparent)}}.bg-zinc-900\\/50{background-color:#18181b80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/50{background-color:color-mix(in oklab,var(--color-zinc-900)50%,transparent)}}.bg-zinc-900\\/\\[0\\.98\\]{background-color:#18181bfa}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/\\[0\\.98\\]{background-color:color-mix(in oklab,var(--color-zinc-900)98%,transparent)}}.bg-zinc-950\\/50{background-color:#09090b80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-950\\/50{background-color:color-mix(in oklab,var(--color-zinc-950)50%,transparent)}}.bg-zinc-950\\/98{background-color:#09090bfa}@supports (color:color-mix(in lab,red,red)){.bg-zinc-950\\/98{background-color:color-mix(in oklab,var(--color-zinc-950)98%,transparent)}}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-blue-500{--tw-gradient-from:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-red-500{--tw-gradient-from:var(--color-red-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-zinc-900\\/\\[0\\.98\\]{--tw-gradient-from:#18181bfa}@supports (color:color-mix(in lab,red,red)){.from-zinc-900\\/\\[0\\.98\\]{--tw-gradient-from:color-mix(in oklab,var(--color-zinc-900)98%,transparent)}}.from-zinc-900\\/\\[0\\.98\\]{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-blue-600{--tw-gradient-to:var(--color-blue-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-red-600{--tw-gradient-to:var(--color-red-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-zinc-800\\/95{--tw-gradient-to:#27272af2}@supports (color:color-mix(in lab,red,red)){.to-zinc-800\\/95{--tw-gradient-to:color-mix(in oklab,var(--color-zinc-800)95%,transparent)}}.to-zinc-800\\/95{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.p-0{padding:calc(var(--spacing)*0)}.p-0\\.5{padding:calc(var(--spacing)*.5)}.p-1{padding:calc(var(--spacing)*1)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-\\[3px\\]{padding:3px}.px-0{padding-inline:calc(var(--spacing)*0)}.px-0\\.5{padding-inline:calc(var(--spacing)*.5)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-\\[18px\\]{padding-inline:18px}.px-px{padding-inline:1px}.py-0{padding-block:calc(var(--spacing)*0)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-12{padding-block:calc(var(--spacing)*12)}.py-\\[7px\\]{padding-block:7px}.py-px{padding-block:1px}.pr-1{padding-right:calc(var(--spacing)*1)}.pr-7{padding-right:calc(var(--spacing)*7)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pl-4{padding-left:calc(var(--spacing)*4)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-dt-action{color:var(--color-dt-action)}.text-dt-border{color:var(--color-dt-border)}.text-dt-error{color:var(--color-dt-error)}.text-dt-info{color:var(--color-dt-info)}.text-dt-mutation{color:var(--color-dt-mutation)}.text-dt-mutation\\/70{color:#a78bfab3}@supports (color:color-mix(in lab,red,red)){.text-dt-mutation\\/70{color:color-mix(in oklab,var(--color-dt-mutation)70%,transparent)}}.text-dt-query{color:var(--color-dt-query)}.text-dt-success{color:var(--color-dt-success)}.text-dt-text{color:var(--color-dt-text)}.text-dt-text-muted{color:var(--color-dt-text-muted)}.text-dt-text-muted\\/40{color:#71717a66}@supports (color:color-mix(in lab,red,red)){.text-dt-text-muted\\/40{color:color-mix(in oklab,var(--color-dt-text-muted)40%,transparent)}}.text-dt-text-muted\\/60{color:#71717a99}@supports (color:color-mix(in lab,red,red)){.text-dt-text-muted\\/60{color:color-mix(in oklab,var(--color-dt-text-muted)60%,transparent)}}.text-dt-text-muted\\/70{color:#71717ab3}@supports (color:color-mix(in lab,red,red)){.text-dt-text-muted\\/70{color:color-mix(in oklab,var(--color-dt-text-muted)70%,transparent)}}.text-dt-text-muted\\/80{color:#71717acc}@supports (color:color-mix(in lab,red,red)){.text-dt-text-muted\\/80{color:color-mix(in oklab,var(--color-dt-text-muted)80%,transparent)}}.text-dt-text-muted\\/85{color:#71717ad9}@supports (color:color-mix(in lab,red,red)){.text-dt-text-muted\\/85{color:color-mix(in oklab,var(--color-dt-text-muted)85%,transparent)}}.text-dt-text-secondary{color:var(--color-dt-text-secondary)}.text-dt-text-tertiary{color:var(--color-dt-text-tertiary)}.text-dt-warning{color:var(--color-dt-warning)}.text-dt-warning\\/90{color:#f59e0be6}@supports (color:color-mix(in lab,red,red)){.text-dt-warning\\/90{color:color-mix(in oklab,var(--color-dt-warning)90%,transparent)}}.text-inherit{color:inherit}.text-white{color:var(--color-white)}.text-yellow-200{color:var(--color-yellow-200)}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.line-through{text-decoration-line:line-through}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.placeholder-dt-text-muted\\/40::placeholder{color:#71717a66}@supports (color:color-mix(in lab,red,red)){.placeholder-dt-text-muted\\/40::placeholder{color:color-mix(in oklab,var(--color-dt-text-muted)40%,transparent)}}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_0_1px_rgba\\(52\\,211\\,153\\,0\\.5\\)\\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#34d39980);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_0_1px_rgba\\(96\\,165\\,250\\,0\\.5\\)\\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#60a5fa80);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_0_1px_rgba\\(161\\,161\\,170\\,0\\.4\\)\\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#a1a1aa66);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_0_1px_rgba\\(167\\,139\\,250\\,0\\.5\\)\\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#a78bfa80);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_0_1px_rgba\\(239\\,68\\,68\\,0\\.5\\)\\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#ef444480);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_0_1px_rgba\\(245\\,158\\,11\\,0\\.5\\)\\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#f59e0b80);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_1px_2px_rgba\\(52\\,211\\,153\\,0\\.35\\)\\]{--tw-shadow:0 1px 2px var(--tw-shadow-color,#34d39959);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_1px_2px_rgba\\(96\\,165\\,250\\,0\\.35\\)\\]{--tw-shadow:0 1px 2px var(--tw-shadow-color,#60a5fa59);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_1px_2px_rgba\\(167\\,139\\,250\\,0\\.35\\)\\]{--tw-shadow:0 1px 2px var(--tw-shadow-color,#a78bfa59);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_1px_2px_rgba\\(245\\,158\\,11\\,0\\.35\\)\\]{--tw-shadow:0 1px 2px var(--tw-shadow-color,#f59e0b59);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-dt-info{--tw-ring-color:var(--color-dt-info)}.outline,.outline-1{outline-style:var(--tw-outline-style);outline-width:1px}.-outline-offset-1{outline-offset:-1px}.outline-dt-info\\/30{outline-color:#3b82f64d}@supports (color:color-mix(in lab,red,red)){.outline-dt-info\\/30{outline-color:color-mix(in oklab,var(--color-dt-info)30%,transparent)}}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-\\[20px\\]{--tw-backdrop-blur:blur(20px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-lg{--tw-backdrop-blur:blur(var(--blur-lg));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.placeholder\\:text-dt-text-muted\\/50::placeholder{color:#71717a80}@supports (color:color-mix(in lab,red,red)){.placeholder\\:text-dt-text-muted\\/50::placeholder{color:color-mix(in oklab,var(--color-dt-text-muted)50%,transparent)}}@media(hover:hover){.hover\\:-translate-y-0\\.5:hover{--tw-translate-y:calc(var(--spacing)*-.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.hover\\:scale-150:hover{--tw-scale-x:150%;--tw-scale-y:150%;--tw-scale-z:150%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\\:scale-\\[1\\.02\\]:hover{scale:1.02}.hover\\:border-dt-border:hover{border-color:var(--color-dt-border)}.hover\\:border-dt-border-light:hover{border-color:var(--color-dt-border-light)}.hover\\:border-dt-error\\/30:hover{border-color:#ef44444d}@supports (color:color-mix(in lab,red,red)){.hover\\:border-dt-error\\/30:hover{border-color:color-mix(in oklab,var(--color-dt-error)30%,transparent)}}.hover\\:border-dt-info\\/30:hover{border-color:#3b82f64d}@supports (color:color-mix(in lab,red,red)){.hover\\:border-dt-info\\/30:hover{border-color:color-mix(in oklab,var(--color-dt-info)30%,transparent)}}.hover\\:bg-dt-action\\/15:hover{background-color:#34d39926}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-dt-action\\/15:hover{background-color:color-mix(in oklab,var(--color-dt-action)15%,transparent)}}.hover\\:bg-dt-error\\/15:hover{background-color:#ef444426}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-dt-error\\/15:hover{background-color:color-mix(in oklab,var(--color-dt-error)15%,transparent)}}.hover\\:bg-dt-error\\/25:hover{background-color:#ef444440}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-dt-error\\/25:hover{background-color:color-mix(in oklab,var(--color-dt-error)25%,transparent)}}.hover\\:bg-dt-info\\/15:hover{background-color:#3b82f626}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-dt-info\\/15:hover{background-color:color-mix(in oklab,var(--color-dt-info)15%,transparent)}}.hover\\:bg-dt-info\\/25:hover{background-color:#3b82f640}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-dt-info\\/25:hover{background-color:color-mix(in oklab,var(--color-dt-info)25%,transparent)}}.hover\\:bg-dt-mutation\\/15:hover{background-color:#a78bfa26}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-dt-mutation\\/15:hover{background-color:color-mix(in oklab,var(--color-dt-mutation)15%,transparent)}}.hover\\:bg-dt-mutation\\/20:hover{background-color:#a78bfa33}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-dt-mutation\\/20:hover{background-color:color-mix(in oklab,var(--color-dt-mutation)20%,transparent)}}.hover\\:bg-dt-query\\/15:hover{background-color:#60a5fa26}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-dt-query\\/15:hover{background-color:color-mix(in oklab,var(--color-dt-query)15%,transparent)}}.hover\\:bg-dt-success\\/25:hover{background-color:#22c55e40}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-dt-success\\/25:hover{background-color:color-mix(in oklab,var(--color-dt-success)25%,transparent)}}.hover\\:bg-dt-warning\\/15:hover{background-color:#f59e0b26}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-dt-warning\\/15:hover{background-color:color-mix(in oklab,var(--color-dt-warning)15%,transparent)}}.hover\\:bg-dt-warning\\/25:hover{background-color:#f59e0b40}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-dt-warning\\/25:hover{background-color:color-mix(in oklab,var(--color-dt-warning)25%,transparent)}}.hover\\:bg-red-500\\/15:hover{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/15:hover{background-color:color-mix(in oklab,var(--color-red-500)15%,transparent)}}.hover\\:bg-white\\/5:hover{background-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/5:hover{background-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.hover\\:bg-white\\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/10:hover{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.hover\\:bg-white\\/\\[0\\.02\\]:hover{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/\\[0\\.02\\]:hover{background-color:color-mix(in oklab,var(--color-white)2%,transparent)}}.hover\\:bg-white\\/\\[0\\.03\\]:hover{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/\\[0\\.03\\]:hover{background-color:color-mix(in oklab,var(--color-white)3%,transparent)}}.hover\\:bg-white\\/\\[0\\.04\\]:hover{background-color:#ffffff0a}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/\\[0\\.04\\]:hover{background-color:color-mix(in oklab,var(--color-white)4%,transparent)}}.hover\\:bg-white\\/\\[0\\.06\\]:hover{background-color:#ffffff0f}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/\\[0\\.06\\]:hover{background-color:color-mix(in oklab,var(--color-white)6%,transparent)}}.hover\\:bg-zinc-600\\/20:hover{background-color:#52525c33}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-zinc-600\\/20:hover{background-color:color-mix(in oklab,var(--color-zinc-600)20%,transparent)}}.hover\\:text-dt-action:hover{color:var(--color-dt-action)}.hover\\:text-dt-error:hover{color:var(--color-dt-error)}.hover\\:text-dt-info:hover{color:var(--color-dt-info)}.hover\\:text-dt-mutation:hover{color:var(--color-dt-mutation)}.hover\\:text-dt-query:hover{color:var(--color-dt-query)}.hover\\:text-dt-text-secondary:hover{color:var(--color-dt-text-secondary)}.hover\\:text-dt-text-tertiary:hover{color:var(--color-dt-text-tertiary)}.hover\\:text-dt-warning:hover{color:var(--color-dt-warning)}}.focus\\:border-dt-info\\/50:focus{border-color:#3b82f680}@supports (color:color-mix(in lab,red,red)){.focus\\:border-dt-info\\/50:focus{border-color:color-mix(in oklab,var(--color-dt-info)50%,transparent)}}.focus\\:bg-dt-bg-tertiary:focus{background-color:var(--color-dt-bg-tertiary)}.focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-dt-info\\/40:focus{--tw-ring-color:#3b82f666}@supports (color:color-mix(in lab,red,red)){.focus\\:ring-dt-info\\/40:focus{--tw-ring-color:color-mix(in oklab,var(--color-dt-info)40%,transparent)}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\\:scale-\\[0\\.94\\]:active{scale:.94}.\\[\\&\\:\\:-webkit-search-cancel-button\\]\\:hidden::-webkit-search-cancel-button{display:none}}@keyframes dt-fade-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes dt-slide-in{0%{opacity:0;transform:translate(8px)}to{opacity:1;transform:translate(0)}}html{color-scheme:dark;background-color:#121214}:host{--sb-thumb:#71717a80;--sb-track:transparent}*{scrollbar-width:thin;scrollbar-color:var(--sb-thumb)var(--sb-track)}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:var(--sb-track)}::-webkit-scrollbar-thumb{background-color:var(--sb-thumb);border-radius:3px}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}';
|
|
2963
|
+
function Ae(o = {}) {
|
|
2964
|
+
if (window.__concaveDevToolsInstalled) {
|
|
2965
|
+
console.warn("[DevTools] Already initialized");
|
|
2966
|
+
return;
|
|
2967
|
+
}
|
|
2968
|
+
window.__concaveDevToolsInstalled = !0, console.log("[DevTools] Initializing UI...");
|
|
2969
|
+
const r = ue(), a = window.__concaveDevToolsEvents || [];
|
|
2970
|
+
console.log(`[DevTools] Loading ${a.length} captured events`), a.forEach((u) => {
|
|
2971
|
+
r.addEvent(u);
|
|
2972
|
+
});
|
|
2973
|
+
let s = a.length;
|
|
2974
|
+
setInterval(() => {
|
|
2975
|
+
const u = window.__concaveDevToolsEvents || [];
|
|
2976
|
+
u.length > s && (u.slice(s).forEach((b) => {
|
|
2977
|
+
r.addEvent(b);
|
|
2978
|
+
}), s = u.length);
|
|
2979
|
+
}, 100);
|
|
2980
|
+
const l = () => {
|
|
2981
|
+
const u = document.createElement("div");
|
|
2982
|
+
u.id = "concave-devtools-host", u.style.cssText = "position:fixed;z-index:999999;bottom:16px;right:16px;pointer-events:none;", document.body.appendChild(u);
|
|
2983
|
+
const c = u.attachShadow({ mode: "open" }), b = document.createElement("style");
|
|
2984
|
+
b.textContent = Le, c.appendChild(b);
|
|
2985
|
+
const N = document.createElement("div");
|
|
2986
|
+
N.id = "concave-devtools-root", N.style.cssText = "pointer-events:auto;", c.appendChild(N), _e.createRoot(N).render(/* @__PURE__ */ t($e, { eventStore: r, position: o.position })), console.log("[DevTools] UI mounted successfully");
|
|
2987
|
+
};
|
|
2988
|
+
document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", l) : l(), window.__concaveDevTools = {
|
|
2989
|
+
eventStore: r
|
|
2990
|
+
};
|
|
2991
|
+
}
|
|
2992
|
+
if (typeof window < "u") {
|
|
2993
|
+
const o = window.__concaveDevToolsConfig || {};
|
|
2994
|
+
o.autoInit !== !1 && setTimeout(() => {
|
|
2995
|
+
Ae(o);
|
|
2996
|
+
}, 100);
|
|
2997
|
+
}
|
|
2998
|
+
export {
|
|
2999
|
+
$e as D,
|
|
3000
|
+
Mt as E,
|
|
3001
|
+
Se as L,
|
|
3002
|
+
Ce as P,
|
|
3003
|
+
Ne as S,
|
|
3004
|
+
Me as a,
|
|
3005
|
+
gt as b,
|
|
3006
|
+
ue as g,
|
|
3007
|
+
Ae as i
|
|
3008
|
+
};
|