@lensjs/core 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/lens.cjs +32 -27
- package/dist/core/lens.d.cts +27 -3
- package/dist/core/lens.d.ts +27 -3
- package/dist/core/lens.js +32 -27
- package/dist/{index-DiLfwsvc.d.cts → index-CMvlRWcQ.d.cts} +5 -4
- package/dist/{index-DiLfwsvc.d.ts → index-CMvlRWcQ.d.ts} +5 -4
- package/dist/index.cjs +59 -39
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +59 -39
- package/dist/stores/better_sqlite.cjs +2 -0
- package/dist/stores/better_sqlite.js +2 -0
- package/dist/stores/index.cjs +2 -0
- package/dist/stores/index.js +2 -0
- package/dist/ui/assets/{CacheActionBadge-3t8U516j.js → CacheActionBadge-DhWgzJKU.js} +1 -1
- package/dist/ui/assets/CacheEntriesTable-BHqlkmET.js +1 -0
- package/dist/ui/assets/CacheEntryContainer-Bp2C09iw.js +2 -0
- package/dist/ui/assets/{CacheEntryDetails-Dm-oXALj.js → CacheEntryDetails-BUZc5j1q.js} +1 -1
- package/dist/ui/assets/CacheEntryDetailsContainer-C_EUSu_d.js +2 -0
- package/dist/ui/assets/ExceptionContainer-DYNMF7Fh.js +2 -0
- package/dist/ui/assets/{ExceptionDetails-gmpSQ_eu.js → ExceptionDetails-OVDydGbv.js} +1 -1
- package/dist/ui/assets/ExceptionDetailsContainer-xXWwVaQA.js +2 -0
- package/dist/ui/assets/{ExceptionTable-BhrX9MSS.js → ExceptionTable-D9KqPbq2.js} +1 -1
- package/dist/ui/assets/{LoadMore-26PcNWcP.js → LoadMore-CG1d6vXW.js} +1 -1
- package/dist/ui/assets/QueriesContainer-CMcyoEiM.js +2 -0
- package/dist/ui/assets/{QueryDetailsContainer-BjQM9QIb.js → QueryDetailsContainer-DFQCEBLy.js} +1 -1
- package/dist/ui/assets/{QueryTable-szgIT5Uc.js → QueryTable-WVYW33VB.js} +1 -1
- package/dist/ui/assets/RequestDetails-BIY8CWBr.js +1 -0
- package/dist/ui/assets/{RequestDetailsContainer-XYPFJFX0.js → RequestDetailsContainer-Apuww5Zb.js} +2 -2
- package/dist/ui/assets/{RequestsContainer-D0QPK2Ii.js → RequestsContainer-BGQCjoDx.js} +2 -2
- package/dist/ui/assets/{RequetsTable-6Fqchsrt.js → RequetsTable-C0uox4Jg.js} +1 -1
- package/dist/ui/assets/{StatusCode-CfVCLID2.js → StatusCode-1rRaEP-3.js} +1 -1
- package/dist/ui/assets/TabbedDataViewer-Cj9wJA8v.js +1 -0
- package/dist/ui/assets/{Table-CGe8JwTO.js → Table-B7P54I_5.js} +1 -1
- package/dist/ui/assets/{columns-Cw7tw3Em.js → columns-DpE4hBXR.js} +1 -1
- package/dist/ui/assets/{columns-RiCoo9Ea.js → columns-T9b-fLbu.js} +1 -1
- package/dist/ui/assets/{columns-BFxCubt5.js → columns-yzAlNtNs.js} +1 -1
- package/dist/ui/assets/{index-BzFeZyjf.css → index-B2QCOgug.css} +1 -1
- package/dist/ui/assets/{index-XoJlyTFO.js → index-ymy5EHnx.js} +2 -2
- package/dist/ui/assets/{useCacheEntries-SCADuxKq.js → useCacheEntries-C5Y3eu1s.js} +1 -1
- package/dist/ui/assets/{useExceptions-BMGL3nir.js → useExceptions-CN6DxiEv.js} +1 -1
- package/dist/ui/assets/{useLensApi-BYyiIIZR.js → useLensApi-ufHx5Ujl.js} +1 -1
- package/dist/ui/assets/{useLoadMore-CksOcXOF.js → useLoadMore-dVvcuWYt.js} +1 -1
- package/dist/ui/assets/{useQueries-6nYr0oG5.js → useQueries-BsRJ7RGS.js} +1 -1
- package/dist/ui/index.html +2 -2
- package/dist/utils/index.cjs +28 -12
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +27 -12
- package/package.json +1 -1
- package/dist/ui/assets/CacheEntriesTable-BqLquILg.js +0 -1
- package/dist/ui/assets/CacheEntryContainer-B86waEsR.js +0 -2
- package/dist/ui/assets/CacheEntryDetailsContainer-BCyXGgkx.js +0 -2
- package/dist/ui/assets/ExceptionContainer-DSQBz5cb.js +0 -2
- package/dist/ui/assets/ExceptionDetailsContainer-BHIz-TUv.js +0 -2
- package/dist/ui/assets/QueriesContainer-BSF-O4s3.js +0 -2
- package/dist/ui/assets/RequestDetails-CvQhX-2F.js +0 -1
- package/dist/ui/assets/TabbedDataViewer-Cl5ednx4.js +0 -1
package/dist/index.js
CHANGED
|
@@ -284,6 +284,8 @@ var BetterSqliteStore = class extends Store {
|
|
|
284
284
|
return this.mapRow(row, true);
|
|
285
285
|
}
|
|
286
286
|
setupSchema() {
|
|
287
|
+
this.connection.exec("PRAGMA journal_mode = WAL;");
|
|
288
|
+
this.connection.exec("PRAGMA synchronous = NORMAL;");
|
|
287
289
|
const createTable = `
|
|
288
290
|
CREATE TABLE IF NOT EXISTS ${TABLE_NAME} (
|
|
289
291
|
id TEXT PRIMARY KEY,
|
|
@@ -340,6 +342,7 @@ __export(utils_exports, {
|
|
|
340
342
|
getMeta: () => getMeta,
|
|
341
343
|
interpolateQuery: () => interpolateQuery,
|
|
342
344
|
isStaticFile: () => isStaticFile,
|
|
345
|
+
normalizePath: () => normalizePath,
|
|
343
346
|
prepareIgnoredPaths: () => prepareIgnoredPaths,
|
|
344
347
|
prettyHrTime: () => prettyHrTime,
|
|
345
348
|
shouldIgnoreCurrentPath: () => shouldIgnoreCurrentPath,
|
|
@@ -356,34 +359,44 @@ var generateRandomUuid = () => {
|
|
|
356
359
|
function interpolateQuery(query, bindings) {
|
|
357
360
|
const formatValue = (value) => {
|
|
358
361
|
if (value === null || value === void 0) return "NULL";
|
|
359
|
-
if (typeof value === "string")
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
if (
|
|
363
|
-
return
|
|
364
|
-
|
|
362
|
+
if (typeof value === "string") {
|
|
363
|
+
return `'${value.replace(/'/g, "''")}'`;
|
|
364
|
+
}
|
|
365
|
+
if (value instanceof DateTime) {
|
|
366
|
+
return `'${value.toISO()}'`;
|
|
367
|
+
}
|
|
368
|
+
if (value instanceof Date) {
|
|
369
|
+
return `'${value.toISOString()}'`;
|
|
370
|
+
}
|
|
371
|
+
if (Array.isArray(value)) {
|
|
372
|
+
return value.map((v) => formatValue(v)).join(", ");
|
|
373
|
+
}
|
|
374
|
+
if (typeof value === "object") {
|
|
365
375
|
return `'${JSON.stringify(value).replace(/'/g, "''")}'`;
|
|
376
|
+
}
|
|
366
377
|
return value.toString();
|
|
367
378
|
};
|
|
368
379
|
if (Array.isArray(bindings)) {
|
|
369
380
|
let i = 0;
|
|
370
381
|
return query.replace(/\?/g, () => {
|
|
371
|
-
if (i >= bindings.length)
|
|
382
|
+
if (i >= bindings.length) {
|
|
372
383
|
throw new Error("Not enough bindings for placeholders");
|
|
384
|
+
}
|
|
373
385
|
return formatValue(bindings[i++]);
|
|
374
386
|
});
|
|
375
387
|
}
|
|
376
388
|
return query.replace(/(\$|\:)(\w+)/g, (match, prefix, keyOrIndex) => {
|
|
377
389
|
let value;
|
|
378
390
|
if (prefix === "$" && /^\d+$/.test(keyOrIndex)) {
|
|
379
|
-
const
|
|
380
|
-
|
|
381
|
-
if (index < 0 || index >= keys.length)
|
|
391
|
+
const placeholder = `$${keyOrIndex}`;
|
|
392
|
+
if (!(placeholder in bindings)) {
|
|
382
393
|
throw new Error(`Missing binding for ${match}`);
|
|
383
|
-
|
|
394
|
+
}
|
|
395
|
+
value = bindings[placeholder];
|
|
384
396
|
} else {
|
|
385
|
-
if (!(keyOrIndex in bindings))
|
|
397
|
+
if (!(keyOrIndex in bindings)) {
|
|
386
398
|
throw new Error(`Missing binding for ${match}`);
|
|
399
|
+
}
|
|
387
400
|
value = bindings[keyOrIndex];
|
|
388
401
|
}
|
|
389
402
|
return formatValue(value);
|
|
@@ -423,6 +436,7 @@ function prepareIgnoredPaths(path4, ignoredPaths) {
|
|
|
423
436
|
...ignoredPaths,
|
|
424
437
|
new RegExp(`^/?${normalizedPath}(/|$)`),
|
|
425
438
|
/^\/?lens-config$/,
|
|
439
|
+
/^\/?favicon\.ico$/,
|
|
426
440
|
/^\/\.well-known\//
|
|
427
441
|
];
|
|
428
442
|
return { ignoredPaths, normalizedPath };
|
|
@@ -453,6 +467,9 @@ function prettyHrTime(hrtime, verbose = false) {
|
|
|
453
467
|
}
|
|
454
468
|
return `${(ms / 1e3).toFixed(1)} s`;
|
|
455
469
|
}
|
|
470
|
+
function normalizePath(path4) {
|
|
471
|
+
return path4.startsWith("/") ? path4 : `/${path4}`;
|
|
472
|
+
}
|
|
456
473
|
|
|
457
474
|
// src/core/lens.ts
|
|
458
475
|
var Lens = class {
|
|
@@ -482,8 +499,7 @@ var Lens = class {
|
|
|
482
499
|
basePath: config.basePath
|
|
483
500
|
});
|
|
484
501
|
adapter.registerRoutes(apiRoutes);
|
|
485
|
-
const
|
|
486
|
-
const uiPath = path2.resolve(this.normalizeDirName(__dirname2), "ui");
|
|
502
|
+
const uiPath = this.getUiPath();
|
|
487
503
|
adapter.serveUI(uiPath, config.basePath, getUiConfig());
|
|
488
504
|
}
|
|
489
505
|
static setStore(store) {
|
|
@@ -503,22 +519,9 @@ var Lens = class {
|
|
|
503
519
|
}
|
|
504
520
|
return this.adapter;
|
|
505
521
|
}
|
|
506
|
-
static
|
|
507
|
-
const
|
|
508
|
-
|
|
509
|
-
Container.singleton("uiConfig", () => {
|
|
510
|
-
return {
|
|
511
|
-
appName: config.appName,
|
|
512
|
-
path: `/${config.basePath}`,
|
|
513
|
-
api: {
|
|
514
|
-
requests: `/${config.basePath}/api/requests`,
|
|
515
|
-
queries: `/${config.basePath}/api/queries`,
|
|
516
|
-
cache: `/${config.basePath}/api/cache`,
|
|
517
|
-
exceptions: `/${config.basePath}/api/exceptions`,
|
|
518
|
-
truncate: `/${config.basePath}/api/truncate`
|
|
519
|
-
}
|
|
520
|
-
};
|
|
521
|
-
});
|
|
522
|
+
static getUiPath() {
|
|
523
|
+
const { __dirname: __dirname2 } = getMeta(import.meta.url);
|
|
524
|
+
return path2.resolve(this.normalizeDirName(__dirname2), "ui");
|
|
522
525
|
}
|
|
523
526
|
static getRoutes({ basePath }) {
|
|
524
527
|
const apiRoutes = [
|
|
@@ -529,52 +532,69 @@ var Lens = class {
|
|
|
529
532
|
},
|
|
530
533
|
{
|
|
531
534
|
method: "GET",
|
|
532
|
-
path:
|
|
535
|
+
path: `/${basePath}/api/requests`,
|
|
533
536
|
handler: async (data) => await ApiController.getRequests(data)
|
|
534
537
|
},
|
|
535
538
|
{
|
|
536
539
|
method: "GET",
|
|
537
|
-
path:
|
|
540
|
+
path: `/${basePath}/api/requests/:id`,
|
|
538
541
|
handler: async (data) => await ApiController.getRequest(data)
|
|
539
542
|
},
|
|
540
543
|
{
|
|
541
544
|
method: "GET",
|
|
542
|
-
path:
|
|
545
|
+
path: `/${basePath}/api/queries`,
|
|
543
546
|
handler: async (data) => await ApiController.getQueries(data)
|
|
544
547
|
},
|
|
545
548
|
{
|
|
546
549
|
method: "GET",
|
|
547
|
-
path:
|
|
550
|
+
path: `/${basePath}/api/queries/:id`,
|
|
548
551
|
handler: async (data) => await ApiController.getQuery(data)
|
|
549
552
|
},
|
|
550
553
|
{
|
|
551
554
|
method: "GET",
|
|
552
|
-
path:
|
|
555
|
+
path: `/${basePath}/api/cache`,
|
|
553
556
|
handler: async (data) => await ApiController.getCacheEntries(data)
|
|
554
557
|
},
|
|
555
558
|
{
|
|
556
559
|
method: "GET",
|
|
557
|
-
path:
|
|
560
|
+
path: `/${basePath}/api/cache/:id`,
|
|
558
561
|
handler: async (data) => await ApiController.getCacheEntry(data)
|
|
559
562
|
},
|
|
560
563
|
{
|
|
561
564
|
method: "GET",
|
|
562
|
-
path:
|
|
565
|
+
path: `/${basePath}/api/exceptions`,
|
|
563
566
|
handler: async (data) => await ApiController.getExceptions(data)
|
|
564
567
|
},
|
|
565
568
|
{
|
|
566
569
|
method: "GET",
|
|
567
|
-
path:
|
|
570
|
+
path: `/${basePath}/api/exceptions/:id`,
|
|
568
571
|
handler: async (data) => await ApiController.getException(data)
|
|
569
572
|
},
|
|
570
573
|
{
|
|
571
574
|
method: "DELETE",
|
|
572
|
-
path:
|
|
575
|
+
path: `/${basePath}/api/truncate`,
|
|
573
576
|
handler: async () => await ApiController.truncate()
|
|
574
577
|
}
|
|
575
578
|
];
|
|
576
579
|
return { apiRoutes };
|
|
577
580
|
}
|
|
581
|
+
static async bindContainerDeps(config) {
|
|
582
|
+
const dbStore = await this.getStore();
|
|
583
|
+
Container.singleton("store", () => dbStore);
|
|
584
|
+
Container.singleton("uiConfig", () => {
|
|
585
|
+
return {
|
|
586
|
+
appName: config.appName,
|
|
587
|
+
path: `/${config.basePath}`,
|
|
588
|
+
api: {
|
|
589
|
+
requests: `/${config.basePath}/api/requests`,
|
|
590
|
+
queries: `/${config.basePath}/api/queries`,
|
|
591
|
+
cache: `/${config.basePath}/api/cache`,
|
|
592
|
+
exceptions: `/${config.basePath}/api/exceptions`,
|
|
593
|
+
truncate: `/${config.basePath}/api/truncate`
|
|
594
|
+
}
|
|
595
|
+
};
|
|
596
|
+
});
|
|
597
|
+
}
|
|
578
598
|
static async getDefaultStore() {
|
|
579
599
|
const store = new BetterSqliteStore();
|
|
580
600
|
await store.initialize();
|
|
@@ -137,6 +137,8 @@ var BetterSqliteStore = class extends Store {
|
|
|
137
137
|
return this.mapRow(row, true);
|
|
138
138
|
}
|
|
139
139
|
setupSchema() {
|
|
140
|
+
this.connection.exec("PRAGMA journal_mode = WAL;");
|
|
141
|
+
this.connection.exec("PRAGMA synchronous = NORMAL;");
|
|
140
142
|
const createTable = `
|
|
141
143
|
CREATE TABLE IF NOT EXISTS ${TABLE_NAME} (
|
|
142
144
|
id TEXT PRIMARY KEY,
|
|
@@ -101,6 +101,8 @@ var BetterSqliteStore = class extends Store {
|
|
|
101
101
|
return this.mapRow(row, true);
|
|
102
102
|
}
|
|
103
103
|
setupSchema() {
|
|
104
|
+
this.connection.exec("PRAGMA journal_mode = WAL;");
|
|
105
|
+
this.connection.exec("PRAGMA synchronous = NORMAL;");
|
|
104
106
|
const createTable = `
|
|
105
107
|
CREATE TABLE IF NOT EXISTS ${TABLE_NAME} (
|
|
106
108
|
id TEXT PRIMARY KEY,
|
package/dist/stores/index.cjs
CHANGED
|
@@ -137,6 +137,8 @@ var BetterSqliteStore = class extends Store {
|
|
|
137
137
|
return this.mapRow(row, true);
|
|
138
138
|
}
|
|
139
139
|
setupSchema() {
|
|
140
|
+
this.connection.exec("PRAGMA journal_mode = WAL;");
|
|
141
|
+
this.connection.exec("PRAGMA synchronous = NORMAL;");
|
|
140
142
|
const createTable = `
|
|
141
143
|
CREATE TABLE IF NOT EXISTS ${TABLE_NAME} (
|
|
142
144
|
id TEXT PRIMARY KEY,
|
package/dist/stores/index.js
CHANGED
|
@@ -101,6 +101,8 @@ var BetterSqliteStore = class extends Store {
|
|
|
101
101
|
return this.mapRow(row, true);
|
|
102
102
|
}
|
|
103
103
|
setupSchema() {
|
|
104
|
+
this.connection.exec("PRAGMA journal_mode = WAL;");
|
|
105
|
+
this.connection.exec("PRAGMA synchronous = NORMAL;");
|
|
104
106
|
const createTable = `
|
|
105
107
|
CREATE TABLE IF NOT EXISTS ${TABLE_NAME} (
|
|
106
108
|
id TEXT PRIMARY KEY,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./index-
|
|
1
|
+
import{j as r}from"./index-ymy5EHnx.js";const d=({action:e})=>{const t={hit:"bg-green-100 text-green-800 dark:bg-green-600 dark:text-white",miss:"bg-amber-100 text-amber-800 dark:bg-amber-600 dark:text-white",write:"bg-blue-100 text-blue-800 dark:bg-blue-600 dark:text-white",delete:"bg-red-100 text-red-800 dark:bg-red-600 dark:text-white",clear:"bg-gray-100 text-gray-800 dark:bg-gray-600 dark:text-white"};return r.jsx("span",{className:`rounded px-2 py-1 text-sm font-semibold ${t[e]||t.clear}`,children:e})};export{d as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as a}from"./index-ymy5EHnx.js";import{L as s}from"./LoadMore-CG1d6vXW.js";import{T as t}from"./Table-B7P54I_5.js";import{g as r}from"./columns-yzAlNtNs.js";import"./index-BRRKsoNv.js";import"./CacheActionBadge-DhWgzJKU.js";const p=({hasMoreObject:o})=>a.jsxs("div",{className:"w-full",children:[a.jsx("div",{className:"overflow-x-auto",children:a.jsx(t,{columns:r(),data:o.data})}),a.jsx(s,{paginatedPage:o})]});export{p as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CacheEntriesTable-BHqlkmET.js","./index-ymy5EHnx.js","./index-B2QCOgug.css","./LoadMore-CG1d6vXW.js","./Table-B7P54I_5.js","./columns-yzAlNtNs.js","./index-BRRKsoNv.js","./CacheActionBadge-DhWgzJKU.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as t,j as a,_ as s}from"./index-ymy5EHnx.js";import{u as i}from"./useLoadMore-dVvcuWYt.js";import{u as m}from"./useCacheEntries-C5Y3eu1s.js";import"./useLensApi-ufHx5Ujl.js";const n=t.lazy(()=>s(()=>import("./CacheEntriesTable-BHqlkmET.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)),_=()=>{const{loadMoreItems:e,getItems:r}=m(),o=i({paginatedPage:e});return t.useEffect(()=>{r()},[]),a.jsx(n,{hasMoreObject:o})};export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a,L as s,q as i,k as r}from"./index-
|
|
1
|
+
import{j as a,L as s,q as i,k as r}from"./index-ymy5EHnx.js";import{D as n,T as o,J as u}from"./TabbedDataViewer-Cj9wJA8v.js";import{C as d}from"./CacheActionBadge-DhWgzJKU.js";function y({data:e}){const t=[e.lens_entry_id?{label:"Request",value:a.jsx(s,{to:`${i(r()).REQUESTS}/${e.lens_entry_id}`,className:"text-blue-600 hover:underline font-semibold",children:"View Request"}),className:"text-gray-900 dark:text-gray-100"}:null,{label:"Operation",value:a.jsx(d,{action:e.data.action}),className:"text-gray-900 dark:text-gray-100"},e.data.data.key?{label:"Key",value:e.data.data.key??"__",className:"text-gray-900 dark:text-gray-100"}:null].filter(l=>!!l);return a.jsxs("div",{className:"flex flex-col gap-4",children:[a.jsx(n,{title:"Details",items:t}),a.jsx(o,{tabs:[{id:"value",label:"Value",shouldShow:!!e.data.data.value,content:a.jsx(u,{data:e.data.data.value})}],defaultActiveTab:"value"})]})}export{y as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CacheEntryDetails-BUZc5j1q.js","./index-ymy5EHnx.js","./index-B2QCOgug.css","./TabbedDataViewer-Cj9wJA8v.js","./CacheActionBadge-DhWgzJKU.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{m as o,r as s,j as r,_ as i}from"./index-ymy5EHnx.js";import{u as m}from"./useCacheEntries-C5Y3eu1s.js";import"./useLensApi-ufHx5Ujl.js";const n=s.lazy(()=>i(()=>import("./CacheEntryDetails-BUZc5j1q.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),E=()=>{const{item:e,getItem:a}=m(),{id:t}=o();return s.useEffect(()=>{t&&a(t)},[t]),r.jsx("div",{children:e&&r.jsx(n,{data:e})})};export{E as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ExceptionTable-D9KqPbq2.js","./index-ymy5EHnx.js","./index-B2QCOgug.css","./LoadMore-CG1d6vXW.js","./Table-B7P54I_5.js","./columns-DpE4hBXR.js","./index-BRRKsoNv.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as t,j as s,_ as a}from"./index-ymy5EHnx.js";import{u as i}from"./useLoadMore-dVvcuWYt.js";import{u as m}from"./useExceptions-CN6DxiEv.js";import"./useLensApi-ufHx5Ujl.js";const n=t.lazy(()=>a(()=>import("./ExceptionTable-D9KqPbq2.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)),_=()=>{const{loadMoreItems:e,getItems:o}=m(),r=i({paginatedPage:e});return t.useEffect(()=>{o()},[]),s.jsx(n,{hasMoreObject:r})};export{_ as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as g,j as e,L as j,q as N,k as v}from"./index-
|
|
1
|
+
import{o as g,j as e,L as j,q as N,k as v}from"./index-ymy5EHnx.js";import{D as w,T as S}from"./TabbedDataViewer-Cj9wJA8v.js";/**
|
|
2
2
|
* @license lucide-react v0.542.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ExceptionDetails-OVDydGbv.js","./index-ymy5EHnx.js","./index-B2QCOgug.css","./TabbedDataViewer-Cj9wJA8v.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{m as a,r as s,j as r,_ as i}from"./index-ymy5EHnx.js";import{u as m}from"./useExceptions-CN6DxiEv.js";import"./useLensApi-ufHx5Ujl.js";const n=s.lazy(()=>i(()=>import("./ExceptionDetails-OVDydGbv.js"),__vite__mapDeps([0,1,2,3]),import.meta.url)),x=()=>{const{item:e,getItem:o}=m(),{id:t}=a();return s.useEffect(()=>{t&&o(t)},[t]),r.jsx("div",{children:e&&r.jsx(n,{data:e})})};export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./index-
|
|
1
|
+
import{j as a}from"./index-ymy5EHnx.js";import{L as s}from"./LoadMore-CG1d6vXW.js";import{T as t}from"./Table-B7P54I_5.js";import{g as r}from"./columns-DpE4hBXR.js";import"./index-BRRKsoNv.js";const d=({hasMoreObject:o})=>a.jsxs("div",{className:"w-full",children:[a.jsx("div",{className:"overflow-x-auto",children:a.jsx(t,{columns:r(),data:o.data})}),a.jsx(s,{paginatedPage:o})]});export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as o}from"./index-
|
|
1
|
+
import{j as o}from"./index-ymy5EHnx.js";import{t}from"./Table-B7P54I_5.js";function n({paginatedPage:r}){return r.hasMore?o.jsx("div",{className:"flex justify-center p-4",children:o.jsx("button",{onClick:r.loadMore,disabled:r.loading,className:t("px-4 py-2 rounded-md bg-gray-200 text-gray-800 dark:bg-neutral-800 dark:text-white text-sm hover:bg-gray-300 dark:hover:bg-neutral-700 transition-colors",r.loading&&"opacity-50 cursor-not-allowed"),children:r.loading?"Loading...":"Load More"})}):null}export{n as L};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./QueryTable-WVYW33VB.js","./index-ymy5EHnx.js","./index-B2QCOgug.css","./LoadMore-CG1d6vXW.js","./Table-B7P54I_5.js","./columns-T9b-fLbu.js","./index-BRRKsoNv.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e,j as s,_ as a}from"./index-ymy5EHnx.js";import{u as i}from"./useQueries-BsRJ7RGS.js";import{u}from"./useLoadMore-dVvcuWYt.js";import"./useLensApi-ufHx5Ujl.js";const m=e.lazy(()=>a(()=>import("./QueryTable-WVYW33VB.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)),f=()=>{const{loadMoreRequests:r,fetchQueries:t}=i(),o=u({paginatedPage:r});return e.useEffect(()=>{t()},[]),s.jsx(m,{hasMoreObject:o})};export{f as default};
|
package/dist/ui/assets/{QueryDetailsContainer-BjQM9QIb.js → QueryDetailsContainer-DFQCEBLy.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as zt,j as N,r as D,L as Ht,q as Jt,k as Zt,m as te}from"./index-
|
|
1
|
+
import{o as zt,j as N,r as D,L as Ht,q as Jt,k as Zt,m as te}from"./index-ymy5EHnx.js";import{u as ee}from"./useQueries-BsRJ7RGS.js";import{D as ie,T as se}from"./TabbedDataViewer-Cj9wJA8v.js";import{f as ne}from"./index-BRRKsoNv.js";import"./useLensApi-ufHx5Ujl.js";function _e(h){return h&&h.__esModule&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h}/**
|
|
2
2
|
* @license lucide-react v0.542.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./index-
|
|
1
|
+
import{j as a}from"./index-ymy5EHnx.js";import{L as s}from"./LoadMore-CG1d6vXW.js";import{T as r}from"./Table-B7P54I_5.js";import{g as t}from"./columns-T9b-fLbu.js";import"./index-BRRKsoNv.js";const n=({hasMoreObject:o})=>a.jsxs("div",{className:"w-full",children:[a.jsx("div",{className:"overflow-x-auto",children:a.jsx(r,{columns:t(),data:o.data})}),a.jsx(s,{paginatedPage:o})]});export{n as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as n,j as e}from"./index-ymy5EHnx.js";import{D as r,T as o}from"./TabbedDataViewer-Cj9wJA8v.js";import{T as d}from"./Table-B7P54I_5.js";import{g as i}from"./columns-T9b-fLbu.js";import{g as m}from"./columns-DpE4hBXR.js";import{g as u}from"./columns-yzAlNtNs.js";import{f as c}from"./index-BRRKsoNv.js";import{R as x,S as b}from"./StatusCode-1rRaEP-3.js";import"./CacheActionBadge-DhWgzJKU.js";const h=({request:a})=>{const t=n.useMemo(()=>c(a?.request.data?.createdAt),[a?.request.data.createdAt]);if(!a||!a.request)return e.jsx(r,{title:"Request Details",items:[],emptyMessage:"No request data available"});const s=()=>a?.request.data?.headers?.host||"Unknown",l=n.useMemo(()=>[{label:"Time",value:t,className:"text-gray-900 dark:text-gray-100"},{label:"Hostname",value:s(),className:"text-gray-900 dark:text-gray-100 font-mono"},{label:"Method",value:a.request.data.method?e.jsx(x,{method:a.request.data.method}):"Unknown"},{label:"Request ID",value:a.request.data.id||"N/A",className:"text-gray-700 dark:text-gray-300 font-mono text-sm"},{label:"Path",value:a.request.data.path||"N/A",className:"text-gray-900 dark:text-gray-100 font-mono"},{label:"Status",value:a.request.data.status?e.jsx(b,{status:a.request.data.status}):"N/A"},{label:"Duration",value:a.request.data.duration||"N/A",className:"text-gray-900 dark:text-gray-100 font-medium"},{label:"IP Address",value:a.request.data.ip||"N/A",className:"text-gray-900 dark:text-gray-100 font-mono"}],[a.request.data,t]);return e.jsx(r,{title:"Request Details",items:l})},A=({request:a})=>{const t=[{id:"payload",label:"Payload",data:a?.request?.data?.body},{id:"headers",label:"Headers",data:a?.request?.data?.headers}],s=[{id:"response-body",label:"Body",data:a?.request?.data?.response?.json},{id:"response-headers",label:"Headers",data:a?.request?.data?.response?.headers}],l=[{id:"request-queries",label:`Queries (${a?.queries?.length})`,shouldShow:a?.queries?.length>0,content:e.jsx(d,{columns:i(),data:a?.queries})},{id:"request-cache",label:`Cache (${a?.cacheEntries.length})`,shouldShow:a?.cacheEntries.length>0,content:e.jsx(d,{columns:u(),data:a?.cacheEntries})},{id:"request-exceptions",label:`Exceptions (${a.exceptions.length})`,shouldShow:a.exceptions.length>0,content:e.jsx(d,{columns:m(),data:a.exceptions})}];return e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(h,{request:a}),a?.request?.data?.user&&e.jsx(r,{title:"User",items:[{label:"ID",value:a?.request?.data?.user?.id},{label:"Email",value:a?.request?.data?.user?.email},{label:"Name",value:a?.request?.data?.user?.name}]}),e.jsx(o,{tabs:t,title:"Request Data",defaultActiveTab:"payload"}),e.jsx(o,{tabs:s,title:"Response Data",defaultActiveTab:"response-body"}),e.jsx(o,{tabs:l})]})};export{A as default};
|
package/dist/ui/assets/{RequestDetailsContainer-XYPFJFX0.js → RequestDetailsContainer-Apuww5Zb.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./RequestDetails-
|
|
2
|
-
import{S as V,p as k,a as l,s as w,b as y,n as x,i as I,c as L,t as W,f as $,d as K,e as j,g as H,r as p,h as N,u as J,k as G,l as X,m as Y,j as T,_ as Z}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./RequestDetails-BIY8CWBr.js","./index-ymy5EHnx.js","./index-B2QCOgug.css","./TabbedDataViewer-Cj9wJA8v.js","./Table-B7P54I_5.js","./columns-T9b-fLbu.js","./index-BRRKsoNv.js","./columns-DpE4hBXR.js","./columns-yzAlNtNs.js","./CacheActionBadge-DhWgzJKU.js","./StatusCode-1rRaEP-3.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{S as V,p as k,a as l,s as w,b as y,n as x,i as I,c as L,t as W,f as $,d as K,e as j,g as H,r as p,h as N,u as J,k as G,l as X,m as Y,j as T,_ as Z}from"./index-ymy5EHnx.js";var tt=class extends V{constructor(t,e){super(),this.options=e,this.#s=t,this.#r=null,this.#i=k(),this.bindMethods(),this.setOptions(e)}#s;#t=void 0;#p=void 0;#e=void 0;#n;#c;#i;#r;#R;#l;#d;#o;#h;#a;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),A(this.#t,this.options)?this.#u():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Q(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Q(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#g(),this.#C(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,s=this.#t;if(this.options=this.#s.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof l(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#O(),this.#t.setOptions(this.options),e._defaulted&&!w(this.options,e)&&this.#s.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&B(this.#t,s,this.options,e)&&this.#u(),this.updateResult(),i&&(this.#t!==s||l(this.options.enabled,this.#t)!==l(e.enabled,this.#t)||y(this.options.staleTime,this.#t)!==y(e.staleTime,this.#t))&&this.#b();const a=this.#v();i&&(this.#t!==s||l(this.options.enabled,this.#t)!==l(e.enabled,this.#t)||a!==this.#a)&&this.#m(a)}getOptimisticResult(t){const e=this.#s.getQueryCache().build(this.#s,t),s=this.createResult(e,t);return st(this,s)&&(this.#e=s,this.#c=this.options,this.#n=this.#t.state),s}getCurrentResult(){return this.#e}trackResult(t,e){return new Proxy(t,{get:(s,i)=>(this.trackProp(i),e?.(i),i==="promise"&&!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(s,i))})}trackProp(t){this.#f.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#s.defaultQueryOptions(t),s=this.#s.getQueryCache().build(this.#s,e);return s.fetch().then(()=>this.createResult(s,e))}fetch(t){return this.#u({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#e))}#u(t){this.#O();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(x)),e}#b(){this.#g();const t=y(this.options.staleTime,this.#t);if(I||this.#e.isStale||!L(t))return;const s=W(this.#e.dataUpdatedAt,t)+1;this.#o=setTimeout(()=>{this.#e.isStale||this.updateResult()},s)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#m(t){this.#C(),this.#a=t,!(I||l(this.options.enabled,this.#t)===!1||!L(this.#a)||this.#a===0)&&(this.#h=setInterval(()=>{(this.options.refetchIntervalInBackground||$.isFocused())&&this.#u()},this.#a))}#y(){this.#b(),this.#m(this.#v())}#g(){this.#o&&(clearTimeout(this.#o),this.#o=void 0)}#C(){this.#h&&(clearInterval(this.#h),this.#h=void 0)}createResult(t,e){const s=this.#t,i=this.options,a=this.#e,u=this.#n,r=this.#c,o=t!==s?t.state:this.#p,{state:d}=t;let n={...d},m=!1,h;if(e._optimisticResults){const c=this.hasListeners(),g=!c&&A(t,e),v=c&&B(t,s,e,i);(g||v)&&(n={...n,...K(d.data,t.options)}),e._optimisticResults==="isRestoring"&&(n.fetchStatus="idle")}let{error:_,errorUpdatedAt:P,status:R}=n;h=n.data;let D=!1;if(e.placeholderData!==void 0&&h===void 0&&R==="pending"){let c;a?.isPlaceholderData&&e.placeholderData===r?.placeholderData?(c=a.data,D=!0):c=typeof e.placeholderData=="function"?e.placeholderData(this.#d?.state.data,this.#d):e.placeholderData,c!==void 0&&(R="success",h=j(a?.data,c,e),m=!0)}if(e.select&&h!==void 0&&!D)if(a&&h===u?.data&&e.select===this.#R)h=this.#l;else try{this.#R=e.select,h=e.select(h),h=j(a?.data,h,e),this.#l=h,this.#r=null}catch(c){this.#r=c}this.#r&&(_=this.#r,h=this.#l,P=Date.now(),R="error");const O=n.fetchStatus==="fetching",S=R==="pending",E=R==="error",U=S&&O,M=h!==void 0,f={status:R,fetchStatus:n.fetchStatus,isPending:S,isSuccess:R==="success",isError:E,isInitialLoading:U,isLoading:U,data:h,dataUpdatedAt:n.dataUpdatedAt,error:_,errorUpdatedAt:P,failureCount:n.fetchFailureCount,failureReason:n.fetchFailureReason,errorUpdateCount:n.errorUpdateCount,isFetched:n.dataUpdateCount>0||n.errorUpdateCount>0,isFetchedAfterMount:n.dataUpdateCount>o.dataUpdateCount||n.errorUpdateCount>o.errorUpdateCount,isFetching:O,isRefetching:O&&!S,isLoadingError:E&&!M,isPaused:n.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:E&&M,isStale:F(t,e),refetch:this.refetch,promise:this.#i,isEnabled:l(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const c=C=>{f.status==="error"?C.reject(f.error):f.data!==void 0&&C.resolve(f.data)},g=()=>{const C=this.#i=f.promise=k();c(C)},v=this.#i;switch(v.status){case"pending":t.queryHash===s.queryHash&&c(v);break;case"fulfilled":(f.status==="error"||f.data!==v.value)&&g();break;case"rejected":(f.status!=="error"||f.error!==v.reason)&&g();break}}return f}updateResult(){const t=this.#e,e=this.createResult(this.#t,this.options);if(this.#n=this.#t.state,this.#c=this.options,this.#n.data!==void 0&&(this.#d=this.#t),w(e,t))return;this.#e=e;const s=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!this.#f.size)return!0;const u=new Set(a??this.#f);return this.options.throwOnError&&u.add("error"),Object.keys(this.#e).some(r=>{const b=r;return this.#e[b]!==t[b]&&u.has(b)})};this.#S({listeners:s()})}#O(){const t=this.#s.getQueryCache().build(this.#s,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#p=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#S(t){H.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#e)}),this.#s.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function et(t,e){return l(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function A(t,e){return et(t,e)||t.state.data!==void 0&&Q(t,e,e.refetchOnMount)}function Q(t,e,s){if(l(e.enabled,t)!==!1&&y(e.staleTime,t)!=="static"){const i=typeof s=="function"?s(t):s;return i==="always"||i!==!1&&F(t,e)}return!1}function B(t,e,s,i){return(t!==e||l(i.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&F(t,s)}function F(t,e){return l(e.enabled,t)!==!1&&t.isStaleByTime(y(e.staleTime,t))}function st(t,e){return!w(t.getCurrentResult(),e)}var z=p.createContext(!1),it=()=>p.useContext(z);z.Provider;function rt(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var at=p.createContext(rt()),nt=()=>p.useContext(at),ot=(t,e)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(e.isReset()||(t.retryOnMount=!1))},ht=t=>{p.useEffect(()=>{t.clearReset()},[t])},ut=({result:t,errorResetBoundary:e,throwOnError:s,query:i,suspense:a})=>t.isError&&!e.isReset()&&!t.isFetching&&i&&(a&&t.data===void 0||N(s,[t.error,i])),ct=t=>{if(t.suspense){const e=i=>i==="static"?i:Math.max(i??1e3,1e3),s=t.staleTime;t.staleTime=typeof s=="function"?(...i)=>e(s(...i)):e(s),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},lt=(t,e)=>t.isLoading&&t.isFetching&&!e,dt=(t,e)=>t?.suspense&&e.isPending,q=(t,e,s)=>e.fetchOptimistic(t).catch(()=>{s.clearReset()});function ft(t,e,s){const i=it(),a=nt(),u=J(),r=u.defaultQueryOptions(t);u.getDefaultOptions().queries?._experimental_beforeQuery?.(r),r._optimisticResults=i?"isRestoring":"optimistic",ct(r),ot(r,a),ht(a);const b=!u.getQueryCache().get(r.queryHash),[o]=p.useState(()=>new e(u,r)),d=o.getOptimisticResult(r),n=!i&&t.subscribed!==!1;if(p.useSyncExternalStore(p.useCallback(m=>{const h=n?o.subscribe(H.batchCalls(m)):x;return o.updateResult(),h},[o,n]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),p.useEffect(()=>{o.setOptions(r)},[r,o]),dt(r,d))throw q(r,o,a);if(ut({result:d,errorResetBoundary:a,throwOnError:r.throwOnError,query:u.getQueryCache().get(r.queryHash),suspense:r.suspense}))throw d.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(r,d),r.experimental_prefetchInRender&&!I&<(d,i)&&(b?q(r,o,a):u.getQueryCache().get(r.queryHash)?.promise)?.catch(x).finally(()=>{o.updateResult()}),r.notifyOnChangeProps?d:o.trackResult(d)}function pt(t,e){return ft(t,tt)}async function Rt(t,e){const s=await fetch(t,{headers:{"Content-Type":"application/json"},...e});if(!s.ok)throw new Error(`Failed to fetch: ${t}`);return s.json()}function bt(t,e){const s=G();return pt({queryKey:["request",t],queryFn:async()=>await Rt(X(`${s.api.requests}/${t}`)),enabled:!!t,...e})}const vt=p.lazy(()=>Z(()=>import("./RequestDetails-BIY8CWBr.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url)),gt=()=>{const{id:t}=Y(),{data:e}=bt(t);return T.jsx(T.Fragment,{children:e?.data&&T.jsx(vt,{request:e?.data})})};export{gt as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./RequetsTable-
|
|
2
|
-
import{r as e,j as p,_ as m}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./RequetsTable-C0uox4Jg.js","./index-ymy5EHnx.js","./index-B2QCOgug.css","./LoadMore-CG1d6vXW.js","./Table-B7P54I_5.js","./StatusCode-1rRaEP-3.js","./index-BRRKsoNv.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e,j as p,_ as m}from"./index-ymy5EHnx.js";import{D as h,u as _}from"./useLensApi-ufHx5Ujl.js";import{u as E}from"./useLoadMore-dVvcuWYt.js";const y={queries:[],cacheEntries:[],exceptions:[],request:{created_at:"",data:{body:{},createdAt:"",duration:"",headers:{},id:"",ip:"",method:"GET",path:"",response:{headers:{},json:{}},status:0,user:null},id:"",lens_entry_id:null,type:"request"}};function M(){const[t,o]=e.useState([]),[r,d]=e.useState(y),[c,s]=e.useState(!1),[i,q]=e.useState(h),{getAllRequests:a,getRequestById:l}=_(),f=e.useCallback(async n=>{s(!0),l(n).then(u=>{d({request:u.data,queries:[],cacheEntries:[],exceptions:[]})}).finally(()=>{s(!1)})},[l]),R=e.useCallback(async n=>{s(!0),a(n).then(u=>{o(u.data),q(u.meta)}).finally(()=>{s(!1)})},[a]);return{loadMoreRequests:e.useMemo(()=>({initialData:t,meta:i,loading:c,fetchRawPage:a}),[t,i,c,a]),fetchRequests:R,fetchRequest:f,request:r}}const g=e.lazy(()=>m(()=>import("./RequetsTable-C0uox4Jg.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)),L=()=>{const{loadMoreRequests:t,fetchRequests:o}=M(),r=E({paginatedPage:t});return e.useEffect(()=>{o()},[]),p.jsx(g,{hasMoreObject:r})};export{L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as o,k as d,j as e,L as s}from"./index-
|
|
1
|
+
import{q as o,k as d,j as e,L as s}from"./index-ymy5EHnx.js";import{L as i}from"./LoadMore-CG1d6vXW.js";import{C as m,T as u}from"./Table-B7P54I_5.js";import{R as l,S as x}from"./StatusCode-1rRaEP-3.js";import{h as c}from"./index-BRRKsoNv.js";const h=()=>{const a=o(d());return[{name:"Method",render:t=>e.jsx(l,{method:t.data.method})},{name:"Path",render:t=>e.jsx(s,{to:`${a.REQUESTS}/${t.id}`,className:"line-clamp-2 max-w-80 min-w-40 text-base text-blue-600 dark:text-neutral-200 hover:underline",children:t.data.path})},{name:"Status",render:t=>e.jsx(x,{status:t.data.status})},{name:"Duration",value:t=>t.data.duration},{name:"Happened",render:t=>{const{label:n,exact:r}=c(t.data.createdAt);return e.jsx("span",{title:r,children:n})},position:"end",class:"min-w-32"},{name:"Actions",render:t=>e.jsx(s,{to:`${a.REQUESTS}/${t.id}`,className:"transition-colors duration-100 hover:text-white",children:e.jsx(m,{size:20})}),position:"end"}]},S=({hasMoreObject:a})=>e.jsxs("div",{children:[e.jsx(u,{columns:h(),data:a.data}),e.jsx(i,{paginatedPage:a})]});export{S as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./index-
|
|
1
|
+
import{j as r}from"./index-ymy5EHnx.js";function g({method:e}){const t={GET:"bg-gray-100 text-gray-800 dark:bg-gray-600 dark:text-white",POST:"bg-blue-100 text-blue-800 dark:bg-blue-600 dark:text-white",PUT:"bg-yellow-100 text-yellow-800 dark:bg-yellow-600 dark:text-white",DELETE:"bg-red-100 text-red-800 dark:bg-red-600 dark:text-white"};return r.jsx("span",{className:`rounded px-2 py-1 text-sm font-semibold ${t[e.toUpperCase()]||"bg-gray-100 text-gray-800 dark:bg-gray-600 dark:text-white"}`,children:e})}const d=e=>e>=200&&e<300?"bg-green-100 text-green-800 dark:bg-green-700 dark:text-green-100":e>=300&&e<400?"bg-blue-100 text-blue-800 dark:bg-blue-700 dark:text-blue-100":e>=400&&e<500?"bg-yellow-100 text-yellow-800 dark:bg-yellow-700 dark:text-yellow-100":e>=500?"bg-red-100 text-red-800 dark:bg-red-700 dark:text-red-100":"bg-gray-100 text-gray-800 dark:bg-neutral-700 dark:text-neutral-200",l=({status:e})=>r.jsx("span",{className:`rounded-lg px-2 py-1 text-sm font-semibold ${d(e)}`,children:e});export{g as R,l as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as a,r as f}from"./index-ymy5EHnx.js";const La=({title:r,items:e,emptyMessage:t="No data available"})=>!e||e.length===0||e.every(l=>!l.value)?a.jsxs("div",{className:"bg-white dark:bg-neutral-800 border border-gray-200 dark:border-neutral-700 rounded-lg shadow-sm p-6",children:[a.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:r})," ",a.jsx("p",{className:"text-center text-gray-500 dark:text-gray-400",children:t})]}):a.jsxs("div",{className:"bg-white dark:bg-neutral-800 border border-gray-200 dark:border-neutral-700 rounded-lg shadow-sm",children:[a.jsx("div",{className:"px-6 py-4 border-b border-gray-200 dark:border-neutral-700 bg-gray-50 dark:bg-neutral-900",children:a.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:r})}),a.jsx("div",{className:"px-6 py-4",children:a.jsx("div",{className:"space-y-4",children:e.map((l,s)=>a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start gap-2",children:[a.jsx("div",{className:"w-full sm:w-32 flex-shrink-0",children:a.jsx("span",{className:"text-sm font-medium text-gray-500 dark:text-gray-400",children:l.label})}),a.jsx("div",{className:"flex-1",children:typeof l.value=="string"?a.jsx("span",{className:`text-sm ${l.className||""}`,children:l.value}):l.value})]},s))})})]});function n(){return n=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var l in t)({}).hasOwnProperty.call(t,l)&&(r[l]=t[l])}return r},n.apply(null,arguments)}function h(r,e){if(r==null)return{};var t={};for(var l in r)if({}.hasOwnProperty.call(r,l)){if(e.indexOf(l)!==-1)continue;t[l]=r[l]}return t}var le={},se=f.createContext(le),kr=(r,e)=>n({},r,e),Rr=()=>f.useContext(se),W=f.createContext(()=>{});W.displayName="JVR.DispatchShowTools";function Vr(){return f.useReducer(kr,le)}function ne(){return f.useContext(W)}var ie=r=>{var{initial:e,dispatch:t,children:l}=r;return a.jsx(se.Provider,{value:e,children:a.jsx(W.Provider,{value:t,children:l})})};ie.displayName="JVR.ShowTools";var oe={},de=f.createContext(oe),Sr=(r,e)=>n({},r,e),Q=()=>f.useContext(de),q=f.createContext(()=>{});q.displayName="JVR.DispatchExpands";function Lr(){return f.useReducer(Sr,oe)}function Tr(){return f.useContext(q)}var ve=r=>{var{initial:e,dispatch:t,children:l}=r;return a.jsx(de.Provider,{value:e,children:a.jsx(q.Provider,{value:t,children:l})})};ve.displayName="JVR.Expands";var ue={Str:{as:"span","data-type":"string",style:{color:"var(--w-rjv-type-string-color, #cb4b16)"},className:"w-rjv-type",children:"string"},Url:{as:"a",style:{color:"var(--w-rjv-type-url-color, #0969da)"},"data-type":"url",className:"w-rjv-type",children:"url"},Undefined:{style:{color:"var(--w-rjv-type-undefined-color, #586e75)"},as:"span","data-type":"undefined",className:"w-rjv-type",children:"undefined"},Null:{style:{color:"var(--w-rjv-type-null-color, #d33682)"},as:"span","data-type":"null",className:"w-rjv-type",children:"null"},Map:{style:{color:"var(--w-rjv-type-map-color, #268bd2)",marginRight:3},as:"span","data-type":"map",className:"w-rjv-type",children:"Map"},Nan:{style:{color:"var(--w-rjv-type-nan-color, #859900)"},as:"span","data-type":"nan",className:"w-rjv-type",children:"NaN"},Bigint:{style:{color:"var(--w-rjv-type-bigint-color, #268bd2)"},as:"span","data-type":"bigint",className:"w-rjv-type",children:"bigint"},Int:{style:{color:"var(--w-rjv-type-int-color, #268bd2)"},as:"span","data-type":"int",className:"w-rjv-type",children:"int"},Set:{style:{color:"var(--w-rjv-type-set-color, #268bd2)",marginRight:3},as:"span","data-type":"set",className:"w-rjv-type",children:"Set"},Float:{style:{color:"var(--w-rjv-type-float-color, #859900)"},as:"span","data-type":"float",className:"w-rjv-type",children:"float"},True:{style:{color:"var(--w-rjv-type-boolean-color, #2aa198)"},as:"span","data-type":"bool",className:"w-rjv-type",children:"bool"},False:{style:{color:"var(--w-rjv-type-boolean-color, #2aa198)"},as:"span","data-type":"bool",className:"w-rjv-type",children:"bool"},Date:{style:{color:"var(--w-rjv-type-date-color, #268bd2)"},as:"span","data-type":"date",className:"w-rjv-type",children:"date"}},ce=f.createContext(ue),Jr=(r,e)=>n({},r,e),g=()=>f.useContext(ce),H=f.createContext(()=>{});H.displayName="JVR.DispatchTypes";function Er(){return f.useReducer(Jr,ue)}function Br(){return f.useContext(H)}function pe(r){var{initial:e,dispatch:t,children:l}=r;return a.jsx(ce.Provider,{value:e,children:a.jsx(H.Provider,{value:t,children:l})})}pe.displayName="JVR.Types";var Dr=["style"];function ye(r){var{style:e}=r,t=h(r,Dr),l=n({cursor:"pointer",height:"1em",width:"1em",userSelect:"none",display:"inline-flex"},e);return a.jsx("svg",n({viewBox:"0 0 24 24",fill:"var(--w-rjv-arrow-color, currentColor)",style:l},t,{children:a.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})}))}ye.displayName="JVR.TriangleArrow";var me={Arrow:{as:"span",className:"w-rjv-arrow",style:{transform:"rotate(0deg)",transition:"all 0.3s"},children:a.jsx(ye,{})},Colon:{as:"span",style:{color:"var(--w-rjv-colon-color, var(--w-rjv-color))",marginLeft:0,marginRight:2},className:"w-rjv-colon",children:":"},Quote:{as:"span",style:{color:"var(--w-rjv-quotes-color, #236a7c)"},className:"w-rjv-quotes",children:'"'},ValueQuote:{as:"span",style:{color:"var(--w-rjv-quotes-string-color, #cb4b16)"},className:"w-rjv-quotes",children:'"'},BracketsLeft:{as:"span",style:{color:"var(--w-rjv-brackets-color, #236a7c)"},className:"w-rjv-brackets-start",children:"["},BracketsRight:{as:"span",style:{color:"var(--w-rjv-brackets-color, #236a7c)"},className:"w-rjv-brackets-end",children:"]"},BraceLeft:{as:"span",style:{color:"var(--w-rjv-curlybraces-color, #236a7c)"},className:"w-rjv-curlybraces-start",children:"{"},BraceRight:{as:"span",style:{color:"var(--w-rjv-curlybraces-color, #236a7c)"},className:"w-rjv-curlybraces-end",children:"}"}},fe=f.createContext(me),$r=(r,e)=>n({},r,e),S=()=>f.useContext(fe),G=f.createContext(()=>{});G.displayName="JVR.DispatchSymbols";function Mr(){return f.useReducer($r,me)}function Ir(){return f.useContext(G)}var he=r=>{var{initial:e,dispatch:t,children:l}=r;return a.jsx(fe.Provider,{value:e,children:a.jsx(G.Provider,{value:t,children:l})})};he.displayName="JVR.Symbols";var xe={Copied:{className:"w-rjv-copied",style:{height:"1em",width:"1em",cursor:"pointer",verticalAlign:"middle",marginLeft:5}},CountInfo:{as:"span",className:"w-rjv-object-size",style:{color:"var(--w-rjv-info-color, #0000004d)",paddingLeft:8,fontStyle:"italic"}},CountInfoExtra:{as:"span",className:"w-rjv-object-extra",style:{paddingLeft:8}},Ellipsis:{as:"span",style:{cursor:"pointer",color:"var(--w-rjv-ellipsis-color, #cb4b16)",userSelect:"none"},className:"w-rjv-ellipsis",children:"..."},Row:{as:"div",className:"w-rjv-line"},KeyName:{as:"span",className:"w-rjv-object-key"}},je=f.createContext(xe),Ar=(r,e)=>n({},r,e),E=()=>f.useContext(je),X=f.createContext(()=>{});X.displayName="JVR.DispatchSection";function _r(){return f.useReducer(Ar,xe)}function Fr(){return f.useContext(X)}var Ne=r=>{var{initial:e,dispatch:t,children:l}=r;return a.jsx(je.Provider,{value:e,children:a.jsx(X.Provider,{value:t,children:l})})};Ne.displayName="JVR.Section";var ge={objectSortKeys:!1,indentWidth:15},Y=f.createContext(ge);Y.displayName="JVR.Context";var Ce=f.createContext(()=>{});Ce.displayName="JVR.DispatchContext";function Kr(r,e){return n({},r,e)}var _=()=>f.useContext(Y),be=r=>{var{children:e,initialState:t,initialTypes:l}=r,[s,d]=f.useReducer(Kr,Object.assign({},ge,t)),[v,i]=Vr(),[o,p]=Lr(),[u,c]=Er(),[y,m]=Mr(),[j,x]=_r();return f.useEffect(()=>d(n({},t)),[t]),a.jsx(Y.Provider,{value:s,children:a.jsx(Ce.Provider,{value:d,children:a.jsx(ie,{initial:v,dispatch:i,children:a.jsx(ve,{initial:o,dispatch:p,children:a.jsx(pe,{initial:n({},u,l),dispatch:c,children:a.jsx(he,{initial:y,dispatch:m,children:a.jsx(Ne,{initial:j,dispatch:x,children:e})})})})})})})};be.displayName="JVR.Provider";function Or(r){if(r==null)throw new TypeError("Cannot destructure "+r)}var Pr=["isNumber","value","parentValue","keyName","keys"],Ur=["as","render"],Qr=["as","render"],Zr=["as","render"],zr=["as","style","render"],Wr=["as","render"],qr=["as","render"],Hr=["as","render"],Gr=["as","render"],Z=r=>{var{Quote:e={}}=S(),{isNumber:t,value:l,parentValue:s,keyName:d,keys:v}=r,i=h(r,Pr);if(t)return null;var{as:o,render:p}=e,u=h(e,Ur),c=o||"span",y=n({},i,u),m={value:l,parentValue:s,keyName:d,keys:v||(d?[d]:[])},j=p&&typeof p=="function"&&p(y,m);return j||a.jsx(c,n({},y))};Z.displayName="JVR.Quote";var P=r=>{var{ValueQuote:e={}}=S(),t=n({},(Or(r),r)),{as:l,render:s}=e,d=h(e,Qr),v=l||"span",i=n({},t,d),o=s&&typeof s=="function"&&s(i,{});return o||a.jsx(v,n({},i))};P.displayName="JVR.ValueQuote";var we=r=>{var{value:e,parentValue:t,keyName:l,keys:s}=r,{Colon:d={}}=S(),{as:v,render:i}=d,o=h(d,Zr),p=v||"span",u=i&&typeof i=="function"&&i(o,{value:e,parentValue:t,keyName:l,keys:s||(l?[l]:[])});return u||a.jsx(p,n({},o))};we.displayName="JVR.Colon";var ke=r=>{var{Arrow:e={}}=S(),t=Q(),{expandKey:l,style:s,value:d,parentValue:v,keyName:i,keys:o}=r,p=!!t[l],{as:u,style:c,render:y}=e,m=h(e,zr),j=u||"span",x=y&&typeof y=="function",C=n({},m,{"data-expanded":p,style:n({},c,s)}),b={value:d,parentValue:v,keyName:i,keys:o||(i?[i]:[])},k=x&&y(C,b);return k||a.jsx(j,n({},m,{style:n({},c,s)}))};ke.displayName="JVR.Arrow";var Re=r=>{var{isBrackets:e,value:t,parentValue:l,keyName:s,keys:d}=r,{BracketsLeft:v={},BraceLeft:i={}}=S(),o={value:t,parentValue:l,keyName:s,keys:d||(s?[s]:[])};if(e){var{as:p,render:u}=v,c=h(v,Wr),y=p||"span",m=u&&typeof u=="function"&&u(c,o);return m||a.jsx(y,n({},c))}var{as:j,render:x}=i,C=h(i,qr),b=j||"span",k=x&&typeof x=="function"&&x(C,o);return k||a.jsx(b,n({},C))};Re.displayName="JVR.BracketsOpen";var ee=r=>{var{isBrackets:e,isVisiable:t,value:l,parentValue:s,keyName:d,keys:v}=r,i={value:l,parentValue:s,keyName:d,keys:v||(d?[d]:[])};if(!t)return null;var{BracketsRight:o={},BraceRight:p={}}=S();if(e){var{as:u,render:c}=o,y=h(o,Hr),m=u||"span",j=c&&typeof c=="function"&&c(y,i);return j||a.jsx(m,n({},y))}var{as:x,render:C}=p,b=h(p,Gr),k=x||"span",w=C&&typeof C=="function"&&C(b,i);return w||a.jsx(k,n({},b))};ee.displayName="JVR.BracketsClose";var Ve=r=>{var e,{keyName:t,value:l,expandKey:s,parentValue:d,level:v,keys:i=[]}=r,o=Q(),{collapsed:p,shouldExpandNodeInitially:u}=_(),c=typeof p=="boolean"?p:typeof p=="number"?v>p:!1,y=(e=o[s])!=null?e:c,m=u&&u(y,{value:l,keys:i,level:v,keyName:t,parentValue:d});if(o[s]===void 0&&m)return null;var j=Object.keys(l).length;if(y||j===0)return null;var x={paddingLeft:4},C={keyName:t,value:l,keys:i,parentValue:d},b=Array.isArray(l),k=l instanceof Set;return a.jsx("div",{style:x,children:a.jsx(ee,n({isBrackets:b||k},C,{isVisiable:!0}))})};Ve.displayName="JVR.NestedClose";var Xr=["as","render"],Yr=["as","render"],ea=["as","render"],ra=["as","render"],aa=["as","render"],ta=["as","render"],la=["as","render"],sa=["as","render"],na=["as","render"],ia=["as","render"],oa=["as","render"],da=["as","render"],va=["as","render"],z=r=>{if(r===void 0)return"0n";if(typeof r=="string")try{r=BigInt(r)}catch{return"0n"}return r?r.toString()+"n":"0n"},Se=r=>{var{value:e,keyName:t}=r,{Set:l={},displayDataTypes:s}=g(),d=e instanceof Set;if(!d||!s)return null;var{as:v,render:i}=l,o=h(l,Xr),p=i&&typeof i=="function",u=p&&i(o,{type:"type",value:e,keyName:t});if(u)return u;var c=v||"span";return a.jsx(c,n({},o))};Se.displayName="JVR.SetComp";var Le=r=>{var{value:e,keyName:t}=r,{Map:l={},displayDataTypes:s}=g(),d=e instanceof Map;if(!d||!s)return null;var{as:v,render:i}=l,o=h(l,Yr),p=i&&typeof i=="function",u=p&&i(o,{type:"type",value:e,keyName:t});if(u)return u;var c=v||"span";return a.jsx(c,n({},o))};Le.displayName="JVR.MapComp";var B={opacity:.75,paddingRight:4},Te=r=>{var{children:e="",keyName:t,keys:l}=r,{Str:s={},displayDataTypes:d}=g(),{shortenTextAfterLength:v=30,stringEllipsis:i="..."}=_(),{as:o,render:p}=s,u=h(s,ea),c=e,[y,m]=f.useState(v&&c.length>v);f.useEffect(()=>m(v&&c.length>v),[v]);var j=o||"span",x=n({},B,s.style||{});v>0&&(u.style=n({},u.style,{cursor:c.length<=v?"initial":"pointer"}),c.length>v&&(u.onClick=()=>{m(!y)}));var C=y?""+c.slice(0,v)+i:c,b=p&&typeof p=="function",k=b&&p(n({},u,{style:x}),{type:"type",value:e,keyName:t,keys:l}),w=y?"w-rjv-value w-rjv-value-short":"w-rjv-value",V=b&&p(n({},u,{children:C,className:w}),{type:"value",value:e,keyName:t,keys:l});return a.jsxs(f.Fragment,{children:[d&&(k||a.jsx(j,n({},u,{style:x}))),V||a.jsxs(f.Fragment,{children:[a.jsx(P,{}),a.jsx(j,n({},u,{className:w,children:C})),a.jsx(P,{})]})]})};Te.displayName="JVR.TypeString";var Je=r=>{var{children:e,keyName:t,keys:l}=r,{True:s={},displayDataTypes:d}=g(),{as:v,render:i}=s,o=h(s,ra),p=v||"span",u=n({},B,s.style||{}),c=i&&typeof i=="function",y=c&&i(n({},o,{style:u}),{type:"type",value:e,keyName:t,keys:l}),m=c&&i(n({},o,{children:e,className:"w-rjv-value"}),{type:"value",value:e,keyName:t,keys:l});return a.jsxs(f.Fragment,{children:[d&&(y||a.jsx(p,n({},o,{style:u}))),m||a.jsx(p,n({},o,{className:"w-rjv-value",children:e?.toString()}))]})};Je.displayName="JVR.TypeTrue";var Ee=r=>{var{children:e,keyName:t,keys:l}=r,{False:s={},displayDataTypes:d}=g(),{as:v,render:i}=s,o=h(s,aa),p=v||"span",u=n({},B,s.style||{}),c=i&&typeof i=="function",y=c&&i(n({},o,{style:u}),{type:"type",value:e,keyName:t,keys:l}),m=c&&i(n({},o,{children:e,className:"w-rjv-value"}),{type:"value",value:e,keyName:t,keys:l});return a.jsxs(f.Fragment,{children:[d&&(y||a.jsx(p,n({},o,{style:u}))),m||a.jsx(p,n({},o,{className:"w-rjv-value",children:e?.toString()}))]})};Ee.displayName="JVR.TypeFalse";var Be=r=>{var{children:e,keyName:t,keys:l}=r,{Float:s={},displayDataTypes:d}=g(),{as:v,render:i}=s,o=h(s,ta),p=v||"span",u=n({},B,s.style||{}),c=i&&typeof i=="function",y=c&&i(n({},o,{style:u}),{type:"type",value:e,keyName:t,keys:l}),m=c&&i(n({},o,{children:e,className:"w-rjv-value"}),{type:"value",value:e,keyName:t,keys:l});return a.jsxs(f.Fragment,{children:[d&&(y||a.jsx(p,n({},o,{style:u}))),m||a.jsx(p,n({},o,{className:"w-rjv-value",children:e?.toString()}))]})};Be.displayName="JVR.TypeFloat";var De=r=>{var{children:e,keyName:t,keys:l}=r,{Int:s={},displayDataTypes:d}=g(),{as:v,render:i}=s,o=h(s,la),p=v||"span",u=n({},B,s.style||{}),c=i&&typeof i=="function",y=c&&i(n({},o,{style:u}),{type:"type",value:e,keyName:t,keys:l}),m=c&&i(n({},o,{children:e,className:"w-rjv-value"}),{type:"value",value:e,keyName:t,keys:l});return a.jsxs(f.Fragment,{children:[d&&(y||a.jsx(p,n({},o,{style:u}))),m||a.jsx(p,n({},o,{className:"w-rjv-value",children:e?.toString()}))]})};De.displayName="JVR.TypeInt";var $e=r=>{var{children:e,keyName:t,keys:l}=r,{Bigint:s={},displayDataTypes:d}=g(),{as:v,render:i}=s,o=h(s,sa),p=v||"span",u=n({},B,s.style||{}),c=i&&typeof i=="function",y=c&&i(n({},o,{style:u}),{type:"type",value:e,keyName:t,keys:l}),m=c&&i(n({},o,{children:e,className:"w-rjv-value"}),{type:"value",value:e,keyName:t,keys:l});return a.jsxs(f.Fragment,{children:[d&&(y||a.jsx(p,n({},o,{style:u}))),m||a.jsx(p,n({},o,{className:"w-rjv-value",children:z(e?.toString())}))]})};$e.displayName="JVR.TypeFloat";var Me=r=>{var{children:e,keyName:t,keys:l}=r,{Url:s={},displayDataTypes:d}=g(),{as:v,render:i}=s,o=h(s,na),p=v||"span",u=n({},B,s.style),c=i&&typeof i=="function",y=c&&i(n({},o,{style:u}),{type:"type",value:e,keyName:t,keys:l}),m=c&&i(n({},o,{children:e?.href,className:"w-rjv-value"}),{type:"value",value:e,keyName:t,keys:l});return a.jsxs(f.Fragment,{children:[d&&(y||a.jsx(p,n({},o,{style:u}))),m||a.jsxs("a",n({href:e?.href,target:"_blank"},o,{className:"w-rjv-value",children:[a.jsx(P,{}),e?.href,a.jsx(P,{})]}))]})};Me.displayName="JVR.TypeUrl";var Ie=r=>{var{children:e,keyName:t,keys:l}=r,{Date:s={},displayDataTypes:d}=g(),{as:v,render:i}=s,o=h(s,ia),p=v||"span",u=n({},B,s.style||{}),c=i&&typeof i=="function",y=c&&i(n({},o,{style:u}),{type:"type",value:e,keyName:t,keys:l}),m=e instanceof Date?e.toLocaleString():e,j=c&&i(n({},o,{children:m,className:"w-rjv-value"}),{type:"value",value:e,keyName:t,keys:l});return a.jsxs(f.Fragment,{children:[d&&(y||a.jsx(p,n({},o,{style:u}))),j||a.jsx(p,n({},o,{className:"w-rjv-value",children:m}))]})};Ie.displayName="JVR.TypeDate";var Ae=r=>{var{children:e,keyName:t,keys:l}=r,{Undefined:s={},displayDataTypes:d}=g(),{as:v,render:i}=s,o=h(s,oa),p=v||"span",u=n({},B,s.style||{}),c=i&&typeof i=="function",y=c&&i(n({},o,{style:u}),{type:"type",value:e,keyName:t,keys:l}),m=c&&i(n({},o,{children:e,className:"w-rjv-value"}),{type:"value",value:e,keyName:t,keys:l});return a.jsxs(f.Fragment,{children:[d&&(y||a.jsx(p,n({},o,{style:u}))),m]})};Ae.displayName="JVR.TypeUndefined";var _e=r=>{var{children:e,keyName:t,keys:l}=r,{Null:s={},displayDataTypes:d}=g(),{as:v,render:i}=s,o=h(s,da),p=v||"span",u=n({},B,s.style||{}),c=i&&typeof i=="function",y=c&&i(n({},o,{style:u}),{type:"type",value:e,keyName:t,keys:l}),m=c&&i(n({},o,{children:e,className:"w-rjv-value"}),{type:"value",value:e,keyName:t,keys:l});return a.jsxs(f.Fragment,{children:[d&&(y||a.jsx(p,n({},o,{style:u}))),m]})};_e.displayName="JVR.TypeNull";var Fe=r=>{var{children:e,keyName:t,keys:l}=r,{Nan:s={},displayDataTypes:d}=g(),{as:v,render:i}=s,o=h(s,va),p=v||"span",u=n({},B,s.style||{}),c=i&&typeof i=="function",y=c&&i(n({},o,{style:u}),{type:"type",value:e,keyName:t,keys:l}),m=c&&i(n({},o,{children:e?.toString(),className:"w-rjv-value"}),{type:"value",value:e,keyName:t,keys:l});return a.jsxs(f.Fragment,{children:[d&&(y||a.jsx(p,n({},o,{style:u}))),m]})};Fe.displayName="JVR.TypeNan";var ua=r=>Number(r)===r&&r%1!==0||isNaN(r),Ke=r=>{var{value:e,keyName:t,keys:l}=r,s={keyName:t,keys:l};return e instanceof URL?a.jsx(Me,n({},s,{children:e})):typeof e=="string"?a.jsx(Te,n({},s,{children:e})):e===!0?a.jsx(Je,n({},s,{children:e})):e===!1?a.jsx(Ee,n({},s,{children:e})):e===null?a.jsx(_e,n({},s,{children:e})):e===void 0?a.jsx(Ae,n({},s,{children:e})):e instanceof Date?a.jsx(Ie,n({},s,{children:e})):typeof e=="number"&&isNaN(e)?a.jsx(Fe,n({},s,{children:e})):typeof e=="number"&&ua(e)?a.jsx(Be,n({},s,{children:e})):typeof e=="bigint"?a.jsx($e,n({},s,{children:e})):typeof e=="number"?a.jsx(De,n({},s,{children:e})):null};Ke.displayName="JVR.Value";function M(r,e,t){var l=Ir(),s=[r.className,e.className].filter(Boolean).join(" "),d=n({},r,e,{className:s,style:n({},r.style,e.style),children:e.children||r.children});f.useEffect(()=>l({[t]:d}),[e])}function L(r,e,t){var l=Br(),s=[r.className,e.className].filter(Boolean).join(" "),d=n({},r,e,{className:s,style:n({},r.style,e.style),children:e.children||r.children});f.useEffect(()=>l({[t]:d}),[e])}function F(r,e,t){var l=Fr(),s=[r.className,e.className].filter(Boolean).join(" "),d=n({},r,e,{className:s,style:n({},r.style,e.style),children:e.children||r.children});f.useEffect(()=>l({[t]:d}),[e])}var ca=["as","render"],Oe=r=>{var{KeyName:e={}}=E();return F(e,r,"KeyName"),null};Oe.displayName="JVR.KeyName";var Pe=r=>{var{children:e,value:t,parentValue:l,keyName:s,keys:d}=r,v=typeof e=="number",i={color:v?"var(--w-rjv-key-number, #268bd2)":"var(--w-rjv-key-string, #002b36)"},{KeyName:o={}}=E(),{as:p,render:u}=o,c=h(o,ca);c.style=n({},c.style,i);var y=p||"span",m=u&&typeof u=="function"&&u(n({},c,{children:e}),{value:t,parentValue:l,keyName:s,keys:d||(s?[s]:[])});return m||a.jsx(y,n({},c,{children:e}))};Pe.displayName="JVR.KeyNameComp";var pa=["children","value","parentValue","keyName","keys"],ya=["as","render","children"],Ue=r=>{var{Row:e={}}=E();return F(e,r,"Row"),null};Ue.displayName="JVR.Row";var Qe=r=>{var{children:e,value:t,parentValue:l,keyName:s,keys:d}=r,v=h(r,pa),{Row:i={}}=E(),{as:o,render:p}=i,u=h(i,ya),c=o||"div",y=p&&typeof p=="function"&&p(n({},v,u,{children:e}),{value:t,keyName:s,parentValue:l,keys:d});return y||a.jsx(c,n({},v,u,{children:e}))};Qe.displayName="JVR.RowComp";function ma(r){var e=f.useRef();return f.useEffect(()=>{e.current=r}),e.current}function fa(r){var{value:e,highlightUpdates:t,highlightContainer:l}=r,s=ma(e),d=f.useMemo(()=>{if(!t||s===void 0)return!1;if(typeof e!=typeof s)return!0;if(typeof e=="number")return isNaN(e)&&isNaN(s)?!1:e!==s;if(Array.isArray(e)!==Array.isArray(s))return!0;if(typeof e=="object"||typeof e=="function")return!1;if(e!==s)return!0},[t,e]);f.useEffect(()=>{l&&l.current&&d&&"animate"in l.current&&l.current.animate([{backgroundColor:"var(--w-rjv-update-color, #ebcb8b)"},{backgroundColor:""}],{duration:1e3,easing:"ease-in"})},[d,e,l])}var ha=["keyName","value","parentValue","expandKey","keys","beforeCopy"],xa=["as","render"],re=r=>{var{keyName:e,value:t,parentValue:l,expandKey:s,keys:d,beforeCopy:v}=r,i=h(r,ha),{onCopied:o,enableClipboard:p,beforeCopy:u}=_(),c=Rr(),y=c[s],[m,j]=f.useState(!1),{Copied:x={}}=E(),C=x?.beforeCopy;if(p===!1||!y)return null;var b=I=>{I.stopPropagation();var J="";typeof t=="number"&&t===1/0?J="Infinity":typeof t=="number"&&isNaN(t)?J="NaN":typeof t=="bigint"?J=z(t):t instanceof Date?J=t.toLocaleString():J=JSON.stringify(t,(K,O)=>typeof O=="bigint"?z(O):O,2);var $=v||C||u;$&&typeof $=="function"&&(J=$(J,e,t,l,s,d)),o&&o(J,t),j(!0);var U=navigator.clipboard||{writeText(K){return new Promise((O,wr)=>{var A=document.createElement("textarea");A.style.position="absolute",A.style.opacity="0",A.style.left="-99999999px",A.value=K,document.body.appendChild(A),A.select(),document.execCommand("copy")?O():wr(),A.remove()})}};U.writeText(J).then(()=>{var K=setTimeout(()=>{j(!1),clearTimeout(K)},3e3)}).catch(K=>{})},k={style:{display:"inline-flex"},fill:m?"var(--w-rjv-copied-success-color, #28a745)":"var(--w-rjv-copied-color, currentColor)",onClick:b},{render:w}=x,V=h(x,xa),R=n({},V,i,k,{style:n({},V.style,i.style,k.style)}),T=w&&typeof w=="function",D=T&&w(n({},R,{"data-copied":m}),{value:t,keyName:e,keys:d,parentValue:l});return D||(m?a.jsx("svg",n({viewBox:"0 0 32 36"},R,{children:a.jsx("path",{d:"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,15.2249049 C29.1403264,13.8627542 29.9736597,13.1778155 30,13.1700887 C30,11.9705278 30,10.0804982 30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,26.1114493 L27.5,28.4926435 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M28.5589286,16 L32,19.6 L21.0160714,30.5382252 L13.5303571,24.2571429 L17.1303571,20.6571429 L21.0160714,24.5428571 L28.5589286,16 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z"})})):a.jsx("svg",n({viewBox:"0 0 32 36"},R,{children:a.jsx("path",{d:"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,20 L30,20 L30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,29 L27.5,29 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M22.5,21.5 L22.5,16.5 L12.5,24 L22.5,31.5 L22.5,26.5 L32,26.5 L32,21.5 L22.5,21.5 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z"})})))};re.displayName="JVR.Copied";function Ze(){var r=f.useRef(null);return r.current===null&&(r.current="custom-id-"+Math.random().toString(36).substr(2,9)),r.current}var ze=r=>{var e,{keyName:t,value:l,expandKey:s="",level:d,keys:v=[],parentValue:i}=r,o=Q(),{objectSortKeys:p,indentWidth:u,collapsed:c,shouldExpandNodeInitially:y}=_(),m=typeof c=="boolean"?c:typeof c=="number"?d>c:!1,j=(e=o[s])!=null?e:m,x=y&&y(j,{value:l,keys:v,level:d,keyName:t,parentValue:i});if(o[s]===void 0&&x||j)return null;var C=Array.isArray(l),b=C?Object.entries(l).map(w=>[Number(w[0]),w[1]]):Object.entries(l);p&&(b=p===!0?b.sort((w,V)=>{var[R]=w,[T]=V;return typeof R=="string"&&typeof T=="string"?R.localeCompare(T):0}):b.sort((w,V)=>{var[R,T]=w,[D,I]=V;return typeof R=="string"&&typeof D=="string"?p(R,D,T,I):0}));var k={borderLeft:"var(--w-rjv-border-left-width, 1px) var(--w-rjv-line-style, solid) var(--w-rjv-line-color, #ebebeb)",paddingLeft:u,marginLeft:6};return a.jsx("div",{className:"w-rjv-wrap",style:k,children:b.map((w,V)=>{var[R,T]=w;return a.jsx(We,{parentValue:l,keyName:R,keys:[...v,R],value:T,level:d},V)})})};ze.displayName="JVR.KeyValues";var ae=r=>{var{keyName:e,parentValue:t,keys:l,value:s}=r,{highlightUpdates:d}=_(),v=typeof e=="number",i=f.useRef(null);fa({value:s,highlightUpdates:d,highlightContainer:i});var o={keyName:e,value:s,keys:l,parentValue:t};return a.jsxs(f.Fragment,{children:[a.jsxs("span",{ref:i,children:[a.jsx(Z,n({isNumber:v,"data-placement":"left"},o)),a.jsx(Pe,n({},o,{children:e})),a.jsx(Z,n({isNumber:v,"data-placement":"right"},o))]}),a.jsx(we,n({},o))]})};ae.displayName="JVR.KayName";var We=r=>{var{keyName:e,value:t,parentValue:l,level:s=0,keys:d=[]}=r,v=ne(),i=Ze(),o=Array.isArray(t),p=t instanceof Set,u=t instanceof Map,c=t instanceof Date,y=t instanceof URL,m=t&&typeof t=="object"&&!o&&!p&&!u&&!c&&!y,j=m||o||p||u;if(j){var x=p?Array.from(t):u?Object.fromEntries(t):t;return a.jsx(te,{keyName:e,value:x,parentValue:l,initialValue:t,keys:d,level:s+1})}var C={onMouseEnter:()=>v({[i]:!0}),onMouseLeave:()=>v({[i]:!1})};return a.jsxs(Qe,n({className:"w-rjv-line",value:t,keyName:e,keys:d,parentValue:l},C,{children:[a.jsx(ae,{keyName:e,value:t,keys:d,parentValue:l}),a.jsx(Ke,{keyName:e,value:t,keys:d}),a.jsx(re,{keyName:e,value:t,keys:d,parentValue:l,expandKey:i})]}))};We.displayName="JVR.KeyValuesItem";var ja=["value","keyName"],Na=["as","render"],qe=r=>{var{CountInfoExtra:e={}}=E();return F(e,r,"CountInfoExtra"),null};qe.displayName="JVR.CountInfoExtra";var He=r=>{var{value:e={},keyName:t}=r,l=h(r,ja),{CountInfoExtra:s={}}=E(),{as:d,render:v}=s,i=h(s,Na);if(!v&&!i.children)return null;var o=d||"span",p=v&&typeof v=="function",u=n({},i,l),c=p&&v(u,{value:e,keyName:t});return c||a.jsx(o,n({},u))};He.displayName="JVR.CountInfoExtraComps";var ga=["value","keyName"],Ca=["as","render"],Ge=r=>{var{CountInfo:e={}}=E();return F(e,r,"CountInfo"),null};Ge.displayName="JVR.CountInfo";var Xe=r=>{var{value:e={},keyName:t}=r,l=h(r,ga),{displayObjectSize:s}=_(),{CountInfo:d={}}=E();if(!s)return null;var{as:v,render:i}=d,o=h(d,Ca),p=v||"span";o.style=n({},o.style,r.style);var u=Object.keys(e).length;o.children||(o.children=u+" item"+(u===1?"":"s"));var c=n({},o,l),y=i&&typeof i=="function",m=y&&i(n({},c,{"data-length":u}),{value:e,keyName:t});return m||a.jsx(p,n({},c))};Xe.displayName="JVR.CountInfoComp";var ba=["as","render"],Ye=r=>{var{Ellipsis:e={}}=E();return F(e,r,"Ellipsis"),null};Ye.displayName="JVR.Ellipsis";var er=r=>{var{isExpanded:e,value:t,keyName:l}=r,{Ellipsis:s={}}=E(),{as:d,render:v}=s,i=h(s,ba),o=d||"span",p=v&&typeof v=="function"&&v(n({},i,{"data-expanded":e}),{value:t,keyName:l});return p||(!e||typeof t=="object"&&Object.keys(t).length==0?null:a.jsx(o,n({},i)))};er.displayName="JVR.EllipsisComp";var rr=r=>{var e,{keyName:t,expandKey:l,keys:s=[],initialValue:d,value:v,parentValue:i,level:o}=r,p=Q(),u=Tr(),{onExpand:c,collapsed:y,shouldExpandNodeInitially:m}=_(),j=typeof y=="boolean"?y:typeof y=="number"?o>y:!1,x=(e=p[l])!=null?e:j,C=m&&m(x,{value:v,keys:s,level:o,keyName:t,parentValue:i});p[l]===void 0&&m&&(x=!!C);var b=()=>{var U={expand:!x,value:v,keyid:l,keyName:t};c&&c(U),u({[l]:U.expand})},k={display:"inline-flex",alignItems:"center"},w={transform:"rotate("+(x?"-90":"0")+"deg)",transition:"all 0.3s"},V=Object.keys(v).length,R=typeof v=="object",T=Array.isArray(v),D=v instanceof Set,I=V!==0&&(T||D||R),J={style:k};I&&(J.onClick=b);var $={keyName:t,value:v,keys:s,parentValue:i};return a.jsxs("span",n({},J,{children:[I&&a.jsx(ke,n({style:w,expandKey:l},$)),(t||typeof t=="number")&&a.jsx(ae,n({},$)),a.jsx(Se,{value:d,keyName:t}),a.jsx(Le,{value:d,keyName:t}),a.jsx(Re,n({isBrackets:T||D},$)),a.jsx(er,{keyName:t,value:v,isExpanded:x}),a.jsx(ee,n({isVisiable:x||!I,isBrackets:T||D},$)),a.jsx(Xe,{value:v,keyName:t}),a.jsx(He,{value:v,keyName:t}),a.jsx(re,{keyName:t,value:v,expandKey:l,parentValue:i,keys:s})]}))};rr.displayName="JVR.NestedOpen";var wa=["className","children","parentValue","keyid","level","value","initialValue","keys","keyName"],te=f.forwardRef((r,e)=>{var{className:t="",parentValue:l,level:s=1,value:d,initialValue:v,keys:i,keyName:o}=r,p=h(r,wa),u=ne(),c=Ze(),y=[t,"w-rjv-inner"].filter(Boolean).join(" "),m={onMouseEnter:()=>u({[c]:!0}),onMouseLeave:()=>u({[c]:!1})};return a.jsxs("div",n({className:y,ref:e},p,m,{children:[a.jsx(rr,{expandKey:c,value:d,level:s,keys:i,parentValue:l,keyName:o,initialValue:v}),a.jsx(ze,{expandKey:c,value:d,level:s,keys:i,parentValue:l,keyName:o}),a.jsx(Ve,{expandKey:c,value:d,level:s,keys:i,parentValue:l,keyName:o})]}))});te.displayName="JVR.Container";var ar=r=>{var{BraceLeft:e={}}=S();return M(e,r,"BraceLeft"),null};ar.displayName="JVR.BraceLeft";var tr=r=>{var{BraceRight:e={}}=S();return M(e,r,"BraceRight"),null};tr.displayName="JVR.BraceRight";var lr=r=>{var{BracketsLeft:e={}}=S();return M(e,r,"BracketsLeft"),null};lr.displayName="JVR.BracketsLeft";var sr=r=>{var{BracketsRight:e={}}=S();return M(e,r,"BracketsRight"),null};sr.displayName="JVR.BracketsRight";var nr=r=>{var{Arrow:e={}}=S();return M(e,r,"Arrow"),null};nr.displayName="JVR.Arrow";var ir=r=>{var{Colon:e={}}=S();return M(e,r,"Colon"),null};ir.displayName="JVR.Colon";var or=r=>{var{Quote:e={}}=S();return M(e,r,"Quote"),null};or.displayName="JVR.Quote";var dr=r=>{var{ValueQuote:e={}}=S();return M(e,r,"ValueQuote"),null};dr.displayName="JVR.ValueQuote";var vr=r=>{var{Bigint:e={}}=g();return L(e,r,"Bigint"),null};vr.displayName="JVR.Bigint";var ur=r=>{var{Date:e={}}=g();return L(e,r,"Date"),null};ur.displayName="JVR.Date";var cr=r=>{var{False:e={}}=g();return L(e,r,"False"),null};cr.displayName="JVR.False";var pr=r=>{var{Float:e={}}=g();return L(e,r,"Float"),null};pr.displayName="JVR.Float";var yr=r=>{var{Int:e={}}=g();return L(e,r,"Int"),null};yr.displayName="JVR.Int";var mr=r=>{var{Map:e={}}=g();return L(e,r,"Map"),null};mr.displayName="JVR.Map";var fr=r=>{var{Nan:e={}}=g();return L(e,r,"Nan"),null};fr.displayName="JVR.Nan";var hr=r=>{var{Null:e={}}=g();return L(e,r,"Null"),null};hr.displayName="JVR.Null";var xr=r=>{var{Set:e={}}=g();return L(e,r,"Set"),null};xr.displayName="JVR.Set";var jr=r=>{var{Str:e={}}=g();return L(e,r,"Str"),null};jr.displayName="JVR.StringText";var Nr=r=>{var{True:e={}}=g();return L(e,r,"True"),null};Nr.displayName="JVR.True";var gr=r=>{var{Undefined:e={}}=g();return L(e,r,"Undefined"),null};gr.displayName="JVR.Undefined";var Cr=r=>{var{Url:e={}}=g();return L(e,r,"Url"),null};Cr.displayName="JVR.Url";var br=r=>{var{Copied:e={}}=E();return F(e,r,"Copied"),null};br.displayName="JVR.Copied";var ka=["className","style","value","children","collapsed","shouldExpandNodeInitially","indentWidth","displayObjectSize","shortenTextAfterLength","stringEllipsis","highlightUpdates","enableClipboard","displayDataTypes","objectSortKeys","onExpand","onCopied","beforeCopy"],N=f.forwardRef((r,e)=>{var{className:t="",style:l,value:s,children:d,collapsed:v,shouldExpandNodeInitially:i,indentWidth:o=15,displayObjectSize:p=!0,shortenTextAfterLength:u=30,stringEllipsis:c,highlightUpdates:y=!0,enableClipboard:m=!0,displayDataTypes:j=!0,objectSortKeys:x=!1,onExpand:C,onCopied:b,beforeCopy:k}=r,w=h(r,ka),V=n({lineHeight:1.4,fontFamily:"var(--w-rjv-font-family, Menlo, monospace)",color:"var(--w-rjv-color, #002b36)",backgroundColor:"var(--w-rjv-background-color, #00000000)",fontSize:13},l),R=["w-json-view-container","w-rjv",t].filter(Boolean).join(" ");return a.jsxs(be,{initialState:{value:s,objectSortKeys:x,indentWidth:o,shouldExpandNodeInitially:i,displayObjectSize:p,collapsed:v,enableClipboard:m,shortenTextAfterLength:u,stringEllipsis:c,highlightUpdates:y,onCopied:b,onExpand:C,beforeCopy:k},initialTypes:{displayDataTypes:j},children:[a.jsx(te,n({value:s},w,{ref:e,className:R,style:V})),d]})});N.Bigint=vr;N.Date=ur;N.False=cr;N.Float=pr;N.Int=yr;N.Map=mr;N.Nan=fr;N.Null=hr;N.Set=xr;N.String=jr;N.True=Nr;N.Undefined=gr;N.Url=Cr;N.ValueQuote=dr;N.Arrow=nr;N.Colon=ir;N.Quote=or;N.Ellipsis=Ye;N.BraceLeft=ar;N.BraceRight=tr;N.BracketsLeft=lr;N.BracketsRight=sr;N.Copied=br;N.CountInfo=Ge;N.CountInfoExtra=qe;N.KeyName=Oe;N.Row=Ue;N.displayName="JVR.JsonView";var Ra={"--w-rjv-font-family":"monospace","--w-rjv-color":"#88c0d0","--w-rjv-key-string":"#88c0d0","--w-rjv-background-color":"#2e3440","--w-rjv-line-color":"#4c566a","--w-rjv-arrow-color":"var(--w-rjv-color)","--w-rjv-edit-color":"var(--w-rjv-color)","--w-rjv-info-color":"#c7c7c74d","--w-rjv-update-color":"#88c0cf75","--w-rjv-copied-color":"#119cc0","--w-rjv-copied-success-color":"#28a745","--w-rjv-curlybraces-color":"#8fbcbb","--w-rjv-colon-color":"#6d9fac","--w-rjv-brackets-color":"#8fbcbb","--w-rjv-quotes-color":"var(--w-rjv-key-string)","--w-rjv-quotes-string-color":"var(--w-rjv-type-string-color)","--w-rjv-type-string-color":"#a3be8c","--w-rjv-type-int-color":"#b48ead","--w-rjv-type-float-color":"#859900","--w-rjv-type-bigint-color":"#b48ead","--w-rjv-type-boolean-color":"#d08770","--w-rjv-type-date-color":"#41a2c2","--w-rjv-type-url-color":"#5e81ac","--w-rjv-type-null-color":"#5e81ac","--w-rjv-type-nan-color":"#859900","--w-rjv-type-undefined-color":"#586e75"};const Va=({data:r})=>{const[e,t]=f.useState(!1),l=async()=>{try{await navigator.clipboard.writeText(JSON.stringify(r,null,2)),t(!0),setTimeout(()=>t(!1),2e3)}catch(v){console.error("Failed to copy: ",v)}},s=()=>a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),a.jsx("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})]}),d=()=>a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:a.jsx("path",{d:"M20 6 9 17l-5-5"})});return a.jsxs("div",{className:"bg-neutral-50 dark:bg-slate-900 rounded-lg p-4 font-mono text-sm overflow-x-auto relative",children:[a.jsx("button",{onClick:l,className:`absolute top-3 right-3 p-2 rounded-md transition-colors ${e?"bg-green-100 text-green-600 dark:bg-green-900/30 dark:text-green-400":"bg-white text-neutral-500 hover:text-neutral-700 hover:bg-neutral-100 dark:bg-slate-800 dark:text-neutral-400 dark:hover:text-neutral-300 dark:hover:bg-slate-700"}`,title:e?"Copied!":"Copy to clipboard",children:e?a.jsx(d,{}):a.jsx(s,{})}),a.jsx("div",{className:"whitespace-pre-wrap pr-12 text-neutral-800 dark:text-neutral-200 min-h-10",children:typeof r=="string"||Array.isArray(r)?a.jsx("pre",{children:JSON.stringify(r,null,2)}):a.jsx(N,{value:r,enableClipboard:!1,style:Ra,collapsed:!1,displayDataTypes:!1,displayObjectSize:!1})})]})},Ta=({tabs:r,title:e,defaultActiveTab:t})=>{r=r.filter(d=>d.shouldShow===void 0||d.shouldShow);const[l,s]=f.useState(t||r[0]?.id||"");return r.length?a.jsxs("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-[15px] shadow-sm",children:[e&&a.jsx("div",{className:"px-6 py-4 rounded-t-[15px] border-b border-neutral-200 dark:border-neutral-700 bg-neutral-50 dark:bg-neutral-900",children:a.jsx("h2",{className:"text-lg font-semibold text-neutral-900 dark:text-neutral-100",children:e})}),a.jsx("div",{className:"border-b rounded-[15px] border-neutral-200 dark:border-neutral-700",children:a.jsx("nav",{className:"flex space-x-8 px-6","aria-label":"Tabs",children:r.map(d=>a.jsx("button",{onClick:()=>s(d.id),className:`py-4 px-1 border-b-2 font-medium text-sm transition-colors duration-200 ${l===d.id?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-300 hover:border-neutral-300 dark:hover:border-neutral-600"}`,children:d.label},d.id))})}),a.jsx("div",{className:"p-6 ",children:r.map(d=>a.jsx("div",{className:l===d.id?"block":"hidden",children:d.content?a.jsx("div",{children:d.content}):a.jsx(a.Fragment,{children:d.data&&a.jsx(Va,{data:d.data})})},d.id))})]}):null};export{La as D,Va as J,Ta as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as r,k as i,j as t,L as o}from"./index-
|
|
1
|
+
import{q as r,k as i,j as t,L as o}from"./index-ymy5EHnx.js";import{h as d}from"./index-BRRKsoNv.js";import{C as m}from"./Table-B7P54I_5.js";const p=()=>{const a=r(i());return[{name:"Type",render:e=>t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"font-medium text-sm text-gray-900 dark:text-gray-100",children:e.data.name||t.jsx("span",{className:"italic text-gray-400",children:"Unknown"})}),t.jsx("span",{className:"text-xs text-red-600 dark:text-red-400 truncate max-w-xs",title:e.data.message,children:e.data.message})]})},{name:"Happened",render:e=>{const{label:s,exact:n}=d(e.data.createdAt);return t.jsx("span",{title:n,children:s})},position:"end",class:"min-w-32"},{name:"Actions",render:e=>t.jsx(o,{to:`${a.EXCEPTIONS}/${e.id}`,className:"transition-colors duration-100 hover:text-white",children:t.jsx(m,{size:20})}),position:"end"}]};export{p as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as r,k as i,j as t,L as o}from"./index-
|
|
1
|
+
import{q as r,k as i,j as t,L as o}from"./index-ymy5EHnx.js";import{h as l}from"./index-BRRKsoNv.js";import{C as d}from"./Table-B7P54I_5.js";function m(a){return t.jsx("span",{className:"text-red-600 dark:text-red-400 font-mono",children:a})}const p=()=>{const a=r(i());return[{name:"Query",render:e=>t.jsx("div",{className:"max-w-xl",children:t.jsx("code",{className:"text-sm font-mono text-slate-800 dark:text-slate-300 leading-relaxed line-clamp-1",title:e.data.query,children:m(e.data.query)})})},{name:"Duration",render:e=>t.jsx("div",{className:"col-span-1 text-right",children:t.jsx("span",{className:"text-sm text-slate-600 dark:text-slate-400 font-mono",children:e.data.duration})})},{name:"Provider",render:e=>t.jsx("div",{className:"col-span-2 text-right",children:t.jsx("span",{className:"text-sm text-slate-600 dark:text-slate-400 font-mono",children:e.data.type})})},{name:"Happened",render:e=>{const{label:s,exact:n}=l(e.data.createdAt);return t.jsx("span",{className:"text-nowrap",title:n,children:s})},position:"end",class:"min-w-32"},{name:"Actions",render:e=>t.jsx(o,{to:`${a.QUERIES}/${e.id}`,className:"transition-colors duration-100 hover:text-white",children:t.jsx(d,{size:20})}),position:"end"}]};export{p as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as o,k as r,j as t,L as i}from"./index-
|
|
1
|
+
import{q as o,k as r,j as t,L as i}from"./index-ymy5EHnx.js";import{h as m}from"./index-BRRKsoNv.js";import{C as c}from"./CacheActionBadge-DhWgzJKU.js";import{C as d}from"./Table-B7P54I_5.js";const x=()=>{const a=o(r());return[{name:"Key",value:e=>e.data.data.key||"__"},{name:"Operation",render:e=>t.jsx(c,{action:e.data.action})},{name:"Happened",render:e=>{const{label:n,exact:s}=m(e.data.createdAt);return t.jsx("span",{title:s,children:n})},position:"end",class:"min-w-32"},{name:"Actions",render:e=>t.jsx(i,{to:`${a.CACHE_ENTRIES}/${e.id}`,className:"transition-colors duration-100 hover:text-white",children:t.jsx(d,{size:20})}),position:"end"}]};export{x as g};
|