nestlens 0.8.2 → 0.8.3
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/dashboard/public/assets/{BatchesPage-BwrmRtTt.js → BatchesPage-CugoZztS.js} +1 -1
- package/dist/dashboard/public/assets/{CachePage-DV05hp-7.js → CachePage-BDYXsyI9.js} +1 -1
- package/dist/dashboard/public/assets/{ClickableBadge-CBxyGl8i.js → ClickableBadge-WXTZ8mFZ.js} +1 -1
- package/dist/dashboard/public/assets/{CommandsPage-Dw-x7K9h.js → CommandsPage-D6DtWReX.js} +1 -1
- package/dist/dashboard/public/assets/{DashboardPage-C9Nanxp_.js → DashboardPage-B0T6pIDE.js} +1 -1
- package/dist/dashboard/public/assets/{DumpsPage-C6HlcD6Z.js → DumpsPage-Dc6GbhFt.js} +1 -1
- package/dist/dashboard/public/assets/EntryDetailPage-CXBlrmgt.js +126 -0
- package/dist/dashboard/public/assets/{EntrySearchInput-BnH4obGW.js → EntrySearchInput-Dn_YW8ky.js} +1 -1
- package/dist/dashboard/public/assets/{EventsPage-Cm2po0yD.js → EventsPage-CFCZvgVn.js} +1 -1
- package/dist/dashboard/public/assets/{ExceptionsPage-D9vXlP_g.js → ExceptionsPage-CSwfuIx6.js} +1 -1
- package/dist/dashboard/public/assets/{GatesPage-Dbk_GiTE.js → GatesPage-1c_m1RG6.js} +1 -1
- package/dist/dashboard/public/assets/{GraphQLPage-B3QaxG8z.js → GraphQLPage-Ca4Bp7eW.js} +1 -1
- package/dist/dashboard/public/assets/{HttpClientPage-r86MGzn6.js → HttpClientPage-B6EX2Cn6.js} +1 -1
- package/dist/dashboard/public/assets/{JobsPage-RU5T4OT3.js → JobsPage-BqDREe3I.js} +1 -1
- package/dist/dashboard/public/assets/{LogsPage-ZvRGzxhk.js → LogsPage-BJTqqpaI.js} +1 -1
- package/dist/dashboard/public/assets/{MailPage-B-bAKd7c.js → MailPage-CMBFq4vj.js} +1 -1
- package/dist/dashboard/public/assets/{ModelsPage-C_FOyj87.js → ModelsPage-CxrhoZib.js} +1 -1
- package/dist/dashboard/public/assets/{NotificationsPage-1hGG29zQ.js → NotificationsPage-4vopw7N9.js} +1 -1
- package/dist/dashboard/public/assets/{PageHeader-CZvAn9P8.js → PageHeader-C3fEDhoW.js} +1 -1
- package/dist/dashboard/public/assets/{QueriesPage-COyQjzJF.js → QueriesPage-8dFsmtbC.js} +1 -1
- package/dist/dashboard/public/assets/{RedisPage-DwC_F3Te.js → RedisPage-CUm_y-o2.js} +1 -1
- package/dist/dashboard/public/assets/{RequestsPage-CwF4ag2x.js → RequestsPage-CL-SGIfb.js} +1 -1
- package/dist/dashboard/public/assets/{SchedulePage-CIRnC6LR.js → SchedulePage-CiYbYKau.js} +1 -1
- package/dist/dashboard/public/assets/{ViewsPage-KgHFAnPJ.js → ViewsPage-H2fqCqqr.js} +1 -1
- package/dist/dashboard/public/assets/{calendar-CgJAsLDi.js → calendar-CjRWMm3M.js} +1 -1
- package/dist/dashboard/public/assets/{circle-check-big-Coz9wTVW.js → circle-check-big-CDv3KUZt.js} +1 -1
- package/dist/dashboard/public/assets/{eye-lxGFIBGk.js → eye-UnqQQk4S.js} +1 -1
- package/dist/dashboard/public/assets/{format-BFldcnCk.js → format-PC0kH-TG.js} +1 -1
- package/dist/dashboard/public/assets/{index-DH4lvLqU.js → index-BzXsymsx.js} +10 -10
- package/dist/dashboard/public/assets/{search-DLa2BUqG.js → search-CfuNgVJJ.js} +1 -1
- package/dist/dashboard/public/assets/{types-BeD9iBPG.js → types-D_VtW7sK.js} +1 -1
- package/dist/dashboard/public/assets/vendor-DBTT3jXp.js +43 -0
- package/dist/dashboard/public/assets/{zap-DxsNw2x8.js → zap-W3THYjyr.js} +1 -1
- package/dist/dashboard/public/index.html +2 -2
- package/package.json +1 -8
- package/dist/dashboard/public/assets/EntryDetailPage-C_84DjL9.js +0 -125
- package/dist/dashboard/public/assets/vendor-B2nVRih0.js +0 -43
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DashboardPage-
|
|
2
|
-
var Se=Object.defineProperty;var _e=(s,a,e)=>a in s?Se(s,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[a]=e;var z=(s,a,e)=>_e(s,typeof a!="symbol"?a+"":a,e);import{r as Ee,a as Ne,g as Pe,b as r,u as Ce,L as D,O as Re,R as Le,c as p,N as Te,d as Ae,B as Oe}from"./vendor-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DashboardPage-B0T6pIDE.js","./vendor-DBTT3jXp.js","./ClickableBadge-WXTZ8mFZ.js","./zap-W3THYjyr.js","./calendar-CjRWMm3M.js","./RequestsPage-CL-SGIfb.js","./PageHeader-C3fEDhoW.js","./EntrySearchInput-Dn_YW8ky.js","./search-CfuNgVJJ.js","./types-D_VtW7sK.js","./QueriesPage-8dFsmtbC.js","./ExceptionsPage-CSwfuIx6.js","./circle-check-big-CDv3KUZt.js","./LogsPage-BJTqqpaI.js","./EventsPage-CFCZvgVn.js","./JobsPage-BqDREe3I.js","./CachePage-BDYXsyI9.js","./MailPage-CMBFq4vj.js","./SchedulePage-CiYbYKau.js","./format-PC0kH-TG.js","./HttpClientPage-B6EX2Cn6.js","./RedisPage-CUm_y-o2.js","./ModelsPage-CxrhoZib.js","./NotificationsPage-4vopw7N9.js","./ViewsPage-H2fqCqqr.js","./eye-UnqQQk4S.js","./CommandsPage-D6DtWReX.js","./GatesPage-1c_m1RG6.js","./BatchesPage-CugoZztS.js","./DumpsPage-Dc6GbhFt.js","./GraphQLPage-Ca4Bp7eW.js","./EntryDetailPage-CXBlrmgt.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Se=Object.defineProperty;var _e=(s,a,e)=>a in s?Se(s,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[a]=e;var z=(s,a,e)=>_e(s,typeof a!="symbol"?a+"":a,e);import{r as Ee,a as Ne,g as Pe,b as r,u as Ce,L as D,O as Re,R as Le,c as p,N as Te,d as Ae,B as Oe}from"./vendor-DBTT3jXp.js";(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))o(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const n of i.addedNodes)n.tagName==="LINK"&&n.rel==="modulepreload"&&o(n)}).observe(document,{childList:!0,subtree:!0});function e(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(l){if(l.ep)return;l.ep=!0;const i=e(l);fetch(l.href,i)}})();var G={exports:{}},M={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.production.min.js
|
|
5
5
|
*
|
|
@@ -7,7 +7,7 @@ var Se=Object.defineProperty;var _e=(s,a,e)=>a in s?Se(s,a,{enumerable:!0,config
|
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var Z;function De(){if(Z)return M;Z=1;var s=Ee(),a=Symbol.for("react.element"),e=Symbol.for("react.fragment"),
|
|
10
|
+
*/var Z;function De(){if(Z)return M;Z=1;var s=Ee(),a=Symbol.for("react.element"),e=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,l=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function n(c,d,y){var u,m={},f=null,j=null;y!==void 0&&(f=""+y),d.key!==void 0&&(f=""+d.key),d.ref!==void 0&&(j=d.ref);for(u in d)o.call(d,u)&&!i.hasOwnProperty(u)&&(m[u]=d[u]);if(c&&c.defaultProps)for(u in d=c.defaultProps,d)m[u]===void 0&&(m[u]=d[u]);return{$$typeof:a,type:c,key:f,ref:j,props:m,_owner:l.current}}return M.Fragment=e,M.jsx=n,M.jsxs=n,M}var X;function Me(){return X||(X=1,G.exports=De()),G.exports}var t=Me(),I={},Y;function qe(){if(Y)return I;Y=1;var s=Ne();return I.createRoot=s.createRoot,I.hydrateRoot=s.hydrateRoot,I}var $e=qe();const ze=Pe($e);let Ie={data:""},Ke=s=>{if(typeof window=="object"){let a=(s?s.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return a.nonce=window.__nonce__,a.parentNode||(s||document.head).appendChild(a),a.firstChild}return s||Ie},Ve=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Be=/\/\*[^]*?\*\/| +/g,ee=/\n+/g,A=(s,a)=>{let e="",o="",l="";for(let i in s){let n=s[i];i[0]=="@"?i[1]=="i"?e=i+" "+n+";":o+=i[1]=="f"?A(n,i):i+"{"+A(n,i[1]=="k"?"":a)+"}":typeof n=="object"?o+=A(n,a?a.replace(/([^,])+/g,c=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,d=>/&/.test(d)?d.replace(/&/g,c):c?c+" "+d:d)):i):n!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),l+=A.p?A.p(i,n):i+":"+n+";")}return e+(a&&l?a+"{"+l+"}":l)+o},L={},he=s=>{if(typeof s=="object"){let a="";for(let e in s)a+=e+he(s[e]);return a}return s},Fe=(s,a,e,o,l)=>{let i=he(s),n=L[i]||(L[i]=(d=>{let y=0,u=11;for(;y<d.length;)u=101*u+d.charCodeAt(y++)>>>0;return"go"+u})(i));if(!L[n]){let d=i!==s?s:(y=>{let u,m,f=[{}];for(;u=Ve.exec(y.replace(Be,""));)u[4]?f.shift():u[3]?(m=u[3].replace(ee," ").trim(),f.unshift(f[0][m]=f[0][m]||{})):f[0][u[1]]=u[2].replace(ee," ").trim();return f[0]})(s);L[n]=A(l?{["@keyframes "+n]:d}:d,e?"":"."+n)}let c=e&&L.g?L.g:null;return e&&(L.g=L[n]),((d,y,u,m)=>{m?y.data=y.data.replace(m,d):y.data.indexOf(d)===-1&&(y.data=u?d+y.data:y.data+d)})(L[n],a,o,c),n},He=(s,a,e)=>s.reduce((o,l,i)=>{let n=a[i];if(n&&n.call){let c=n(e),d=c&&c.props&&c.props.className||/^go/.test(c)&&c;n=d?"."+d:c&&typeof c=="object"?c.props?"":A(c,""):c===!1?"":c}return o+l+(n??"")},"");function F(s){let a=this||{},e=s.call?s(a.p):s;return Fe(e.unshift?e.raw?He(e,[].slice.call(arguments,1),a.p):e.reduce((o,l)=>Object.assign(o,l&&l.call?l(a.p):l),{}):e,Ke(a.target),a.g,a.o,a.k)}let me,J,Q;F.bind({g:1});let T=F.bind({k:1});function Ge(s,a,e,o){A.p=a,me=s,J=e,Q=o}function O(s,a){let e=this||{};return function(){let o=arguments;function l(i,n){let c=Object.assign({},i),d=c.className||l.className;e.p=Object.assign({theme:J&&J()},c),e.o=/ *go\d+/.test(d),c.className=F.apply(e,o)+(d?" "+d:"");let y=s;return s[0]&&(y=c.as||s,delete c.as),Q&&y[0]&&Q(c),me(y,c)}return l}}var Ue=s=>typeof s=="function",B=(s,a)=>Ue(s)?s(a):s,Je=(()=>{let s=0;return()=>(++s).toString()})(),pe=(()=>{let s;return()=>{if(s===void 0&&typeof window<"u"){let a=matchMedia("(prefers-reduced-motion: reduce)");s=!a||a.matches}return s}})(),Qe=20,W="default",xe=(s,a)=>{let{toastLimit:e}=s.settings;switch(a.type){case 0:return{...s,toasts:[a.toast,...s.toasts].slice(0,e)};case 1:return{...s,toasts:s.toasts.map(n=>n.id===a.toast.id?{...n,...a.toast}:n)};case 2:let{toast:o}=a;return xe(s,{type:s.toasts.find(n=>n.id===o.id)?1:0,toast:o});case 3:let{toastId:l}=a;return{...s,toasts:s.toasts.map(n=>n.id===l||l===void 0?{...n,dismissed:!0,visible:!1}:n)};case 4:return a.toastId===void 0?{...s,toasts:[]}:{...s,toasts:s.toasts.filter(n=>n.id!==a.toastId)};case 5:return{...s,pausedAt:a.time};case 6:let i=a.time-(s.pausedAt||0);return{...s,pausedAt:void 0,toasts:s.toasts.map(n=>({...n,pauseDuration:n.pauseDuration+i}))}}},V=[],fe={toasts:[],pausedAt:void 0,settings:{toastLimit:Qe}},R={},ye=(s,a=W)=>{R[a]=xe(R[a]||fe,s),V.forEach(([e,o])=>{e===a&&o(R[a])})},ge=s=>Object.keys(R).forEach(a=>ye(s,a)),We=s=>Object.keys(R).find(a=>R[a].toasts.some(e=>e.id===s)),H=(s=W)=>a=>{ye(a,s)},Ze={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Xe=(s={},a=W)=>{let[e,o]=r.useState(R[a]||fe),l=r.useRef(R[a]);r.useEffect(()=>(l.current!==R[a]&&o(R[a]),V.push([a,o]),()=>{let n=V.findIndex(([c])=>c===a);n>-1&&V.splice(n,1)}),[a]);let i=e.toasts.map(n=>{var c,d,y;return{...s,...s[n.type],...n,removeDelay:n.removeDelay||((c=s[n.type])==null?void 0:c.removeDelay)||(s==null?void 0:s.removeDelay),duration:n.duration||((d=s[n.type])==null?void 0:d.duration)||(s==null?void 0:s.duration)||Ze[n.type],style:{...s.style,...(y=s[n.type])==null?void 0:y.style,...n.style}}});return{...e,toasts:i}},Ye=(s,a="blank",e)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:a,ariaProps:{role:"status","aria-live":"polite"},message:s,pauseDuration:0,...e,id:(e==null?void 0:e.id)||Je()}),$=s=>(a,e)=>{let o=Ye(a,s,e);return H(o.toasterId||We(o.id))({type:2,toast:o}),o.id},_=(s,a)=>$("blank")(s,a);_.error=$("error");_.success=$("success");_.loading=$("loading");_.custom=$("custom");_.dismiss=(s,a)=>{let e={type:3,toastId:s};a?H(a)(e):ge(e)};_.dismissAll=s=>_.dismiss(void 0,s);_.remove=(s,a)=>{let e={type:4,toastId:s};a?H(a)(e):ge(e)};_.removeAll=s=>_.remove(void 0,s);_.promise=(s,a,e)=>{let o=_.loading(a.loading,{...e,...e==null?void 0:e.loading});return typeof s=="function"&&(s=s()),s.then(l=>{let i=a.success?B(a.success,l):void 0;return i?_.success(i,{id:o,...e,...e==null?void 0:e.success}):_.dismiss(o),l}).catch(l=>{let i=a.error?B(a.error,l):void 0;i?_.error(i,{id:o,...e,...e==null?void 0:e.error}):_.dismiss(o)}),s};var et=1e3,tt=(s,a="default")=>{let{toasts:e,pausedAt:o}=Xe(s,a),l=r.useRef(new Map).current,i=r.useCallback((m,f=et)=>{if(l.has(m))return;let j=setTimeout(()=>{l.delete(m),n({type:4,toastId:m})},f);l.set(m,j)},[]);r.useEffect(()=>{if(o)return;let m=Date.now(),f=e.map(j=>{if(j.duration===1/0)return;let v=(j.duration||0)+j.pauseDuration-(m-j.createdAt);if(v<0){j.visible&&_.dismiss(j.id);return}return setTimeout(()=>_.dismiss(j.id,a),v)});return()=>{f.forEach(j=>j&&clearTimeout(j))}},[e,o,a]);let n=r.useCallback(H(a),[a]),c=r.useCallback(()=>{n({type:5,time:Date.now()})},[n]),d=r.useCallback((m,f)=>{n({type:1,toast:{id:m,height:f}})},[n]),y=r.useCallback(()=>{o&&n({type:6,time:Date.now()})},[o,n]),u=r.useCallback((m,f)=>{let{reverseOrder:j=!1,gutter:v=8,defaultPosition:h}=f||{},k=e.filter(N=>(N.position||h)===(m.position||h)&&N.height),E=k.findIndex(N=>N.id===m.id),b=k.filter((N,C)=>C<E&&N.visible).length;return k.filter(N=>N.visible).slice(...j?[b+1]:[0,b]).reduce((N,C)=>N+(C.height||0)+v,0)},[e]);return r.useEffect(()=>{e.forEach(m=>{if(m.dismissed)i(m.id,m.removeDelay);else{let f=l.get(m.id);f&&(clearTimeout(f),l.delete(m.id))}})},[e,i]),{toasts:e,handlers:{updateHeight:d,startPause:c,endPause:y,calculateOffset:u}}},st=T`
|
|
11
11
|
from {
|
|
12
12
|
transform: scale(0) rotate(45deg);
|
|
13
13
|
opacity: 0;
|
|
@@ -153,7 +153,7 @@ to {
|
|
|
153
153
|
min-width: 20px;
|
|
154
154
|
animation: ${mt} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
155
155
|
forwards;
|
|
156
|
-
`,xt=({toast:s})=>{let{icon:a,type:e,iconTheme:
|
|
156
|
+
`,xt=({toast:s})=>{let{icon:a,type:e,iconTheme:o}=s;return a!==void 0?typeof a=="string"?r.createElement(pt,null,a):a:e==="blank"?null:r.createElement(ht,null,r.createElement(it,{...o}),e!=="loading"&&r.createElement(ut,null,e==="error"?r.createElement(nt,{...o}):r.createElement(dt,{...o})))},ft=s=>`
|
|
157
157
|
0% {transform: translate3d(0,${s*-200}%,0) scale(.6); opacity:.5;}
|
|
158
158
|
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
|
159
159
|
`,yt=s=>`
|
|
@@ -178,17 +178,17 @@ to {
|
|
|
178
178
|
color: inherit;
|
|
179
179
|
flex: 1 1 auto;
|
|
180
180
|
white-space: pre-line;
|
|
181
|
-
`,vt=(s,a)=>{let e=s.includes("top")?1:-1,[
|
|
181
|
+
`,vt=(s,a)=>{let e=s.includes("top")?1:-1,[o,l]=pe()?[gt,jt]:[ft(e),yt(e)];return{animation:a?`${T(o)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${T(l)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},wt=r.memo(({toast:s,position:a,style:e,children:o})=>{let l=s.height?vt(s.position||a||"top-center",s.visible):{opacity:0},i=r.createElement(xt,{toast:s}),n=r.createElement(kt,{...s.ariaProps},B(s.message,s));return r.createElement(bt,{className:s.className,style:{...l,...e,...s.style}},typeof o=="function"?o({icon:i,message:n}):r.createElement(r.Fragment,null,i,n))});Ge(r.createElement);var St=({id:s,className:a,style:e,onHeightUpdate:o,children:l})=>{let i=r.useCallback(n=>{if(n){let c=()=>{let d=n.getBoundingClientRect().height;o(s,d)};c(),new MutationObserver(c).observe(n,{subtree:!0,childList:!0,characterData:!0})}},[s,o]);return r.createElement("div",{ref:i,className:a,style:e},l)},_t=(s,a)=>{let e=s.includes("top"),o=e?{top:0}:{bottom:0},l=s.includes("center")?{justifyContent:"center"}:s.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:pe()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${a*(e?1:-1)}px)`,...o,...l}},Et=F`
|
|
182
182
|
z-index: 9999;
|
|
183
183
|
> * {
|
|
184
184
|
pointer-events: auto;
|
|
185
185
|
}
|
|
186
|
-
`,K=16,Nt=({reverseOrder:s,position:a="top-center",toastOptions:e,gutter:
|
|
186
|
+
`,K=16,Nt=({reverseOrder:s,position:a="top-center",toastOptions:e,gutter:o,children:l,toasterId:i,containerStyle:n,containerClassName:c})=>{let{toasts:d,handlers:y}=tt(e,i);return r.createElement("div",{"data-rht-toaster":i||"",style:{position:"fixed",zIndex:9999,top:K,left:K,right:K,bottom:K,pointerEvents:"none",...n},className:c,onMouseEnter:y.startPause,onMouseLeave:y.endPause},d.map(u=>{let m=u.position||a,f=y.calculateOffset(u,{reverseOrder:s,gutter:o,defaultPosition:a}),j=_t(m,f);return r.createElement(St,{id:u.id,key:u.id,onHeightUpdate:y.updateHeight,className:u.visible?Et:"",style:j},u.type==="custom"?B(u.message,u):l?l(u):r.createElement(wt,{toast:u,position:m}))}))},q=_;const Pt="modulepreload",Ct=function(s,a){return new URL(s,a).href},te={},w=function(a,e,o){let l=Promise.resolve();if(e&&e.length>0){let n=function(u){return Promise.all(u.map(m=>Promise.resolve(m).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};const c=document.getElementsByTagName("link"),d=document.querySelector("meta[property=csp-nonce]"),y=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));l=n(e.map(u=>{if(u=Ct(u,o),u in te)return;te[u]=!0;const m=u.endsWith(".css"),f=m?'[rel="stylesheet"]':"";if(!!o)for(let h=c.length-1;h>=0;h--){const k=c[h];if(k.href===u&&(!m||k.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${f}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":Pt,m||(v.as="script"),v.crossOrigin="",v.href=u,y&&v.setAttribute("nonce",y),document.head.appendChild(v),m)return new Promise((h,k)=>{v.addEventListener("load",h),v.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(n){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=n,window.dispatchEvent(c),!c.defaultPrevented)throw n}return l.then(n=>{for(const c of n||[])c.status==="rejected"&&i(c.reason);return a().catch(i)})};/**
|
|
187
187
|
* @license lucide-react v0.468.0 - ISC
|
|
188
188
|
*
|
|
189
189
|
* This source code is licensed under the ISC license.
|
|
190
190
|
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const Rt=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),je=(...s)=>s.filter((a,e,
|
|
191
|
+
*/const Rt=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),je=(...s)=>s.filter((a,e,o)=>!!a&&a.trim()!==""&&o.indexOf(a)===e).join(" ").trim();/**
|
|
192
192
|
* @license lucide-react v0.468.0 - ISC
|
|
193
193
|
*
|
|
194
194
|
* This source code is licensed under the ISC license.
|
|
@@ -198,12 +198,12 @@ to {
|
|
|
198
198
|
*
|
|
199
199
|
* This source code is licensed under the ISC license.
|
|
200
200
|
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
-
*/const Tt=r.forwardRef(({color:s="currentColor",size:a=24,strokeWidth:e=2,absoluteStrokeWidth:
|
|
201
|
+
*/const Tt=r.forwardRef(({color:s="currentColor",size:a=24,strokeWidth:e=2,absoluteStrokeWidth:o,className:l="",children:i,iconNode:n,...c},d)=>r.createElement("svg",{ref:d,...Lt,width:a,height:a,stroke:s,strokeWidth:o?Number(e)*24/Number(a):e,className:je("lucide",l),...c},[...n.map(([y,u])=>r.createElement(y,u)),...Array.isArray(i)?i:[i]]));/**
|
|
202
202
|
* @license lucide-react v0.468.0 - ISC
|
|
203
203
|
*
|
|
204
204
|
* This source code is licensed under the ISC license.
|
|
205
205
|
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/const g=(s,a)=>{const e=r.forwardRef(({className:
|
|
206
|
+
*/const g=(s,a)=>{const e=r.forwardRef(({className:o,...l},i)=>r.createElement(Tt,{ref:i,iconNode:a,className:je(`lucide-${Rt(s)}`,o),...l}));return e.displayName=`${s}`,e};/**
|
|
207
207
|
* @license lucide-react v0.468.0 - ISC
|
|
208
208
|
*
|
|
209
209
|
* This source code is licensed under the ISC license.
|
|
@@ -358,4 +358,4 @@ to {
|
|
|
358
358
|
*
|
|
359
359
|
* This source code is licensed under the ISC license.
|
|
360
360
|
* See the LICENSE file in the root directory of this source tree.
|
|
361
|
-
*/const es=g("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ke=()=>window.__NESTLENS_BASE__??"",ts=s=>`${window.location.origin}${ke()}/__nestlens__${s}`,ve=ts("/api");async function P(s,a){const e=await fetch(`${ve}${s}`,a);if(!e.ok)throw new Error(`API error: ${e.status}`);return e.json()}async function Ds(s){return P(`/entries/${s}`)}async function ss(){return P("/stats")}async function as(){return(await fetch(`${ve}/entries`,{method:"DELETE"})).json()}async function Ms(s){const a=new URLSearchParams;if(s.type&&a.set("type",s.type),s.limit&&a.set("limit",s.limit.toString()),s.beforeSequence!==void 0&&a.set("beforeSequence",s.beforeSequence.toString()),s.afterSequence!==void 0&&a.set("afterSequence",s.afterSequence.toString()),s.filters){const e=s.filters;e.levels&&e.levels.length>0&&a.set("levels",e.levels.join(",")),e.contexts&&e.contexts.length>0&&a.set("contexts",e.contexts.join(",")),e.queryTypes&&e.queryTypes.length>0&&a.set("queryTypes",e.queryTypes.join(",")),e.sources&&e.sources.length>0&&a.set("sources",e.sources.join(",")),e.slow!==void 0&&a.set("slow",e.slow.toString()),e.names&&e.names.length>0&&a.set("names",e.names.join(",")),e.methods&&e.methods.length>0&&a.set("methods",e.methods.join(",")),e.paths&&e.paths.length>0&&a.set("paths",e.paths.join(",")),e.resolved!==void 0&&a.set("resolved",e.resolved.toString()),e.statuses&&e.statuses.length>0&&a.set("statuses",e.statuses.join(",")),e.hostnames&&e.hostnames.length>0&&a.set("hostnames",e.hostnames.join(",")),e.controllers&&e.controllers.length>0&&a.set("controllers",e.controllers.join(",")),e.ips&&e.ips.length>0&&a.set("ips",e.ips.join(",")),e.eventNames&&e.eventNames.length>0&&a.set("eventNames",e.eventNames.join(",")),e.scheduleStatuses&&e.scheduleStatuses.length>0&&a.set("scheduleStatuses",e.scheduleStatuses.join(",")),e.scheduleNames&&e.scheduleNames.length>0&&a.set("scheduleNames",e.scheduleNames.join(",")),e.jobStatuses&&e.jobStatuses.length>0&&a.set("jobStatuses",e.jobStatuses.join(",")),e.jobNames&&e.jobNames.length>0&&a.set("jobNames",e.jobNames.join(",")),e.queues&&e.queues.length>0&&a.set("queues",e.queues.join(",")),e.cacheOperations&&e.cacheOperations.length>0&&a.set("cacheOperations",e.cacheOperations.join(",")),e.mailStatuses&&e.mailStatuses.length>0&&a.set("mailStatuses",e.mailStatuses.join(",")),e.redisStatuses&&e.redisStatuses.length>0&&a.set("redisStatuses",e.redisStatuses.join(",")),e.redisCommands&&e.redisCommands.length>0&&a.set("redisCommands",e.redisCommands.join(",")),e.modelActions&&e.modelActions.length>0&&a.set("modelActions",e.modelActions.join(",")),e.entities&&e.entities.length>0&&a.set("entities",e.entities.join(",")),e.modelSources&&e.modelSources.length>0&&a.set("modelSources",e.modelSources.join(",")),e.notificationTypes&&e.notificationTypes.length>0&&a.set("notificationTypes",e.notificationTypes.join(",")),e.notificationStatuses&&e.notificationStatuses.length>0&&a.set("notificationStatuses",e.notificationStatuses.join(",")),e.viewFormats&&e.viewFormats.length>0&&a.set("viewFormats",e.viewFormats.join(",")),e.viewStatuses&&e.viewStatuses.length>0&&a.set("viewStatuses",e.viewStatuses.join(",")),e.commandStatuses&&e.commandStatuses.length>0&&a.set("commandStatuses",e.commandStatuses.join(",")),e.commandNames&&e.commandNames.length>0&&a.set("commandNames",e.commandNames.join(",")),e.gateNames&&e.gateNames.length>0&&a.set("gateNames",e.gateNames.join(",")),e.gateResults&&e.gateResults.length>0&&a.set("gateResults",e.gateResults.join(",")),e.batchStatuses&&e.batchStatuses.length>0&&a.set("batchStatuses",e.batchStatuses.join(",")),e.batchOperations&&e.batchOperations.length>0&&a.set("batchOperations",e.batchOperations.join(",")),e.dumpStatuses&&e.dumpStatuses.length>0&&a.set("dumpStatuses",e.dumpStatuses.join(",")),e.dumpOperations&&e.dumpOperations.length>0&&a.set("dumpOperations",e.dumpOperations.join(",")),e.dumpFormats&&e.dumpFormats.length>0&&a.set("dumpFormats",e.dumpFormats.join(",")),e.operationTypes&&e.operationTypes.length>0&&a.set("operationTypes",e.operationTypes.join(",")),e.operationNames&&e.operationNames.length>0&&a.set("operationNames",e.operationNames.join(",")),e.hasErrors!==void 0&&a.set("hasErrors",e.hasErrors.toString()),e.hasN1!==void 0&&a.set("hasN1",e.hasN1.toString()),e.tags&&e.tags.length>0&&a.set("tags",e.tags.join(",")),e.search&&a.set("search",e.search)}return P(`/entries/cursor?${a.toString()}`)}async function qs(s){const a=new URLSearchParams;return s&&a.set("type",s),P(`/entries/latest-sequence?${a.toString()}`)}async function $s(s,a){const e=new URLSearchParams;return e.set("afterSequence",s.toString()),a&&e.set("type",a),P(`/entries/check-new?${e.toString()}`)}async function zs(){return P("/storage/stats")}async function Is(){return P("/pruning/status")}async function Ks(){return P("/pruning/run",{method:"POST"})}async function Vs(s){return P(`/entries/${s}/resolve`,{method:"PATCH"})}async function Bs(s){return P(`/entries/${s}/unresolve`,{method:"PATCH"})}async function rs(s){return P("/recording/pause",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:s})})}async function ns(){return P("/recording/resume",{method:"POST"})}async function os(){return P("/recording/status")}function is(s){const a=r.useCallback(e=>{const i=e.target,l=i.tagName==="INPUT"||i.tagName==="TEXTAREA"||i.isContentEditable;for(const o of s){const{key:n,ctrl:c,meta:d,shift:y,alt:u,handler:m,preventDefault:f=!0}=o;if(l&&n.toLowerCase()!=="escape")continue;const j=e.key.toLowerCase()===n.toLowerCase(),v=y?e.shiftKey:!e.shiftKey,h=u?e.altKey:!e.altKey;if(c){if((e.ctrlKey||e.metaKey)&&j&&v&&h){f&&e.preventDefault(),m(e);return}continue}if(d){if(e.metaKey&&!e.ctrlKey&&j&&v&&h){f&&e.preventDefault(),m(e);return}continue}if(!e.ctrlKey&&!e.metaKey&&j&&v&&h){f&&e.preventDefault(),m(e);return}}},[s]);r.useEffect(()=>(document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a)}),[a])}const we=r.createContext(void 0);function ls({children:s}){const[a,e]=r.useState(null),[i,l]=r.useState(null),o=r.useRef(!0),n=r.useCallback(async()=>{try{const c=await ss();e(c.data),l(null)}catch(c){const d=c instanceof Error?c:new Error("Failed to fetch stats");l(d),console.error("Failed to fetch stats:",c),o.current&&q.error("Failed to load statistics")}finally{o.current=!1}},[]);return r.useEffect(()=>{n();const c=setInterval(n,1e4);return()=>clearInterval(c)},[n]),t.jsx(we.Provider,{value:{stats:a,error:i,refreshStats:n},children:s})}function cs(){const s=r.useContext(we);if(s===void 0)throw new Error("useStats must be used within a StatsProvider");return s}function ce(){const[s,a]=r.useState(null),[e,i]=r.useState(!1);r.useEffect(()=>{const o=async()=>{try{const c=await os();a(c.data)}catch(c){console.error("Failed to fetch recording status:",c)}};o();const n=setInterval(o,5e3);return()=>clearInterval(n)},[]);const l=async()=>{if(!(!s||e)){i(!0);try{if(s.isPaused){const o=await ns();a(o.data),q.success("Recording resumed")}else{const o=await rs();a(o.data),q.success("Recording paused")}}catch{q.error("Failed to toggle recording")}finally{i(!1)}}};return s?t.jsx("button",{onClick:l,disabled:e,className:`p-2.5 rounded-lg transition-colors ${s.isPaused?"text-yellow-600 hover:text-yellow-700 dark:text-yellow-400 dark:hover:text-yellow-300 hover:bg-yellow-50 dark:hover:bg-yellow-900/20":"text-green-600 hover:text-green-700 dark:text-green-400 dark:hover:text-green-300 hover:bg-green-50 dark:hover:bg-green-900/20"} ${e?"opacity-50 cursor-not-allowed":""}`,"aria-label":s.isPaused?"Resume recording":"Pause recording",title:s.isPaused?"Resume Recording":"Pause Recording",children:s.isPaused?t.jsx(Qt,{className:"h-5 w-5"}):t.jsx(Jt,{className:"h-5 w-5"})}):null}const de={dashboard:"text-primary-500",request:"text-blue-500",query:"text-purple-500",graphql:"text-fuchsia-500",exception:"text-red-500",log:"text-green-500",job:"text-yellow-500",schedule:"text-gray-500",batch:"text-lime-500",command:"text-slate-500",cache:"text-cyan-500",redis:"text-rose-500",model:"text-violet-500","http-client":"text-indigo-500",mail:"text-pink-500",notification:"text-orange-500",event:"text-emerald-500",view:"text-teal-500",gate:"text-amber-500",dump:"text-stone-500"},ue=[{name:"Overview",items:[{name:"Dashboard",href:"/",icon:Bt,colorKey:"dashboard"}]},{name:"Core",items:[{name:"Requests",href:"/requests",icon:At,colorKey:"request"},{name:"Queries",href:"/queries",icon:$t,colorKey:"query"},{name:"GraphQL",href:"/graphql",icon:It,colorKey:"graphql"},{name:"Exceptions",href:"/exceptions",icon:be,badge:"exceptions",colorKey:"exception"},{name:"Logs",href:"/logs",icon:zt,colorKey:"log"}]},{name:"Background",items:[{name:"Jobs",href:"/jobs",icon:Mt,colorKey:"job"},{name:"Schedule",href:"/schedule",icon:qt,colorKey:"schedule"},{name:"Batches",href:"/batches",icon:Gt,colorKey:"batch"},{name:"Commands",href:"/commands",icon:Yt,colorKey:"command"}]},{name:"Data",items:[{name:"Cache",href:"/cache",icon:ne,colorKey:"cache"},{name:"Redis",href:"/redis",icon:Dt,colorKey:"redis"},{name:"Models",href:"/models",icon:Vt,colorKey:"model"}]},{name:"Communication",items:[{name:"HTTP Client",href:"/http-client",icon:Kt,colorKey:"http-client"},{name:"Mail",href:"/mail",icon:Ft,colorKey:"mail"},{name:"Notifications",href:"/notifications",icon:Ot,colorKey:"notification"},{name:"Events",href:"/events",icon:Wt,colorKey:"event"}]},{name:"System",items:[{name:"Views",href:"/views",icon:Ut,colorKey:"view"},{name:"Gates",href:"/gates",icon:Xt,colorKey:"gate"},{name:"Dumps",href:"/dumps",icon:ne,colorKey:"dump"}]}];function ds(){const s=Ce(),[a,e]=r.useState(!1),{stats:i}=cs(),[l,o]=r.useState(()=>{if(typeof window<"u"){const h=localStorage.getItem("nestlens-collapsed-groups");return h?new Set(JSON.parse(h)):new Set}return new Set}),[n,c]=r.useState(()=>typeof window<"u"?document.documentElement.classList.contains("dark"):!1),[d,y]=r.useState(()=>{if(typeof window<"u"){const h=localStorage.getItem("nestlens-theme");if(h==="system"||h==="light"||h==="dark")return h}return"system"}),u=r.useCallback(h=>{o(k=>{const E=new Set(k);return E.has(h)?E.delete(h):E.add(h),localStorage.setItem("nestlens-collapsed-groups",JSON.stringify([...E])),E})},[]),m=r.useCallback(h=>{if(!i)return 0;switch(h){case"exceptions":return i.unresolvedExceptions??i.byType.exception??0;default:return 0}},[i]),f=r.useCallback(h=>{let k=!1;h==="system"?k=window.matchMedia("(prefers-color-scheme: dark)").matches:k=h==="dark",k?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),c(k)},[]),j=r.useCallback(()=>{const h=n?"light":"dark";y(h),localStorage.setItem("nestlens-theme",h),f(h)},[n,f]),v=r.useCallback(async()=>{window.confirm("Are you sure you want to clear all entries?")&&(await as(),q.success("All entries cleared"),window.location.reload())},[]);return r.useEffect(()=>{if(f(d),d==="system"){const h=window.matchMedia("(prefers-color-scheme: dark)"),k=E=>{const b=E.matches;b?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),c(b)};return h.addEventListener("change",k),()=>h.removeEventListener("change",k)}},[d,f]),is([{key:"k",ctrl:!0,handler:()=>v()},{key:"Escape",handler:()=>{a&&e(!1)},preventDefault:!1},{key:"d",ctrl:!0,handler:()=>j()}]),t.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:[t.jsxs("div",{className:`fixed inset-0 z-50 lg:hidden ${a?"":"hidden"}`,children:[t.jsx("div",{className:"fixed inset-0 bg-gray-900/80",onClick:()=>e(!1)}),t.jsxs("div",{id:"mobile-sidebar","data-testid":"mobile-sidebar",className:"fixed inset-y-0 left-0 w-64 bg-white dark:bg-gray-800 flex flex-col",children:[t.jsxs("div",{className:"flex h-16 items-center justify-between px-4 border-b border-gray-200 dark:border-gray-700",children:[t.jsxs(D,{to:"/",className:"flex items-center space-x-2",children:[t.jsx(U,{className:"h-8 w-8 text-primary-600"}),t.jsx("span",{className:"text-xl font-bold text-gray-900 dark:text-white",children:"NestLens"})]}),t.jsx("button",{onClick:()=>e(!1),className:"text-gray-500 hover:text-gray-700 dark:text-gray-400","aria-label":"Close sidebar",children:t.jsx(es,{className:"h-6 w-6","aria-hidden":"true"})})]}),t.jsx("nav",{className:"flex-1 min-h-0 overflow-y-auto py-4 px-3",children:ue.map((h,k)=>{const E=l.has(h.name);return t.jsxs("div",{className:k>0?"mt-4":"",children:[t.jsxs("button",{onClick:()=>u(h.name),className:"flex items-center justify-between w-full px-2 py-1.5 text-xs font-semibold text-gray-400 dark:text-gray-500 uppercase tracking-wider hover:text-gray-600 dark:hover:text-gray-400 transition-colors","aria-expanded":!E,"aria-controls":`nav-group-${h.name.toLowerCase().replace(/\s+/g,"-")}`,children:[t.jsx("span",{children:h.name}),E?t.jsx(ae,{className:"h-3 w-3","aria-hidden":"true"}):t.jsx(se,{className:"h-3 w-3","aria-hidden":"true"})]}),!E&&t.jsx("div",{className:"mt-1 space-y-0.5",children:h.items.map(b=>{const N=b.href==="/"?s.pathname==="/":s.pathname.startsWith(b.href),C="badge"in b?m(b.badge):0;return t.jsxs(D,{to:b.href,"aria-current":N?"page":void 0,className:`group flex items-center justify-between px-3 py-2 rounded-lg transition-colors ${N?"bg-primary-50 text-primary-700 dark:bg-primary-900/50 dark:text-primary-200 font-medium":"text-gray-600 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800 hover:text-gray-900 dark:hover:text-white"}`,onClick:()=>e(!1),children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx(b.icon,{className:`h-4 w-4 ${de[b.colorKey]||"text-gray-400"}`}),t.jsx("span",{className:"text-sm",children:b.name})]}),C>0&&t.jsx("span",{className:"inline-flex items-center justify-center min-w-[20px] h-5 px-1.5 text-xs font-medium bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-400 rounded-full",children:C>99?"99+":C})]},b.name)})})]},h.name)})}),t.jsx("div",{className:"flex-shrink-0 p-3 border-t border-gray-200 dark:border-gray-700",children:t.jsxs("div",{className:"flex items-center justify-center gap-1",children:[t.jsx(ce,{}),t.jsx("button",{onClick:j,className:"p-2.5 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors","aria-label":n?"Switch to light mode":"Switch to dark mode",children:n?t.jsx(ie,{className:"h-5 w-5"}):t.jsx(oe,{className:"h-5 w-5"})}),t.jsx("button",{onClick:v,className:"p-2.5 text-gray-500 hover:text-red-600 dark:text-gray-400 dark:hover:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20 rounded-lg transition-colors","aria-label":"Clear all data",children:t.jsx(le,{className:"h-5 w-5"})}),t.jsx("a",{href:"https://github.com/mogretici/nestlens",target:"_blank",rel:"noopener noreferrer",className:"p-2.5 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors","aria-label":"Documentation",children:t.jsx(re,{className:"h-5 w-5"})})]})})]})]}),t.jsx("div",{"data-testid":"sidebar",className:"hidden lg:fixed lg:inset-y-0 lg:flex lg:w-64 lg:flex-col",children:t.jsxs("div",{className:"flex flex-col h-full bg-white dark:bg-gray-800 border-r border-gray-200 dark:border-gray-700",children:[t.jsx("div",{className:"flex h-16 items-center px-4 border-b border-gray-200 dark:border-gray-700",children:t.jsxs(D,{to:"/",className:"flex items-center space-x-2.5",children:[t.jsx("div",{className:"p-1.5 bg-primary-100 dark:bg-primary-900/50 rounded-lg",children:t.jsx(U,{className:"h-6 w-6 text-primary-600 dark:text-primary-400"})}),t.jsxs("div",{children:[t.jsx("span",{className:"text-lg font-bold text-gray-900 dark:text-white",children:"NestLens"}),t.jsxs("span",{className:"hidden xl:inline text-xs text-gray-400 dark:text-gray-500 ml-1.5",children:["v","0.8.2"]})]})]})}),t.jsx("nav",{className:"flex-1 min-h-0 overflow-y-auto py-4 px-3",children:ue.map((h,k)=>{const E=l.has(h.name);return t.jsxs("div",{className:k>0?"mt-6":"",children:[t.jsxs("button",{onClick:()=>u(h.name),className:"flex items-center justify-between w-full px-2 py-1.5 text-[11px] font-semibold text-gray-400 dark:text-gray-500 uppercase tracking-wider hover:text-gray-600 dark:hover:text-gray-400 transition-colors","aria-expanded":!E,"aria-controls":`desktop-nav-group-${h.name.toLowerCase().replace(/\s+/g,"-")}`,children:[t.jsx("span",{children:h.name}),E?t.jsx(ae,{className:"h-3 w-3","aria-hidden":"true"}):t.jsx(se,{className:"h-3 w-3","aria-hidden":"true"})]}),!E&&t.jsx("div",{className:"mt-1 space-y-0.5",children:h.items.map(b=>{const N=b.href==="/"?s.pathname==="/":s.pathname.startsWith(b.href),C="badge"in b?m(b.badge):0;return t.jsxs(D,{to:b.href,"aria-current":N?"page":void 0,className:`group flex items-center justify-between px-3 py-2 rounded-lg transition-all duration-150 ${N?"bg-primary-50 text-primary-700 dark:bg-primary-900/50 dark:text-primary-200 font-medium shadow-sm":"text-gray-600 hover:bg-gray-50 dark:text-gray-400 dark:hover:bg-gray-800/50 hover:text-gray-900 dark:hover:text-white"}`,children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx(b.icon,{className:`h-[18px] w-[18px] ${de[b.colorKey]||"text-gray-400"}`}),t.jsx("span",{className:"text-sm",children:b.name})]}),C>0&&t.jsx("span",{className:`inline-flex items-center justify-center min-w-[20px] h-5 px-1.5 text-xs font-semibold rounded-full transition-colors ${N?"bg-primary-200 text-primary-800 dark:bg-primary-800 dark:text-primary-200":"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-400"}`,children:C>99?"99+":C})]},b.name)})})]},h.name)})}),t.jsx("div",{className:"flex-shrink-0 p-3 border-t border-gray-200 dark:border-gray-700",children:t.jsxs("div",{className:"flex items-center justify-center gap-1",children:[t.jsx(ce,{}),t.jsx("button",{onClick:j,className:"p-2.5 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors","aria-label":n?"Switch to light mode":"Switch to dark mode",title:n?"Light Mode (⌘D)":"Dark Mode (⌘D)",children:n?t.jsx(ie,{className:"h-5 w-5"}):t.jsx(oe,{className:"h-5 w-5"})}),t.jsx("button",{onClick:v,className:"p-2.5 text-gray-500 hover:text-red-600 dark:text-gray-400 dark:hover:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20 rounded-lg transition-colors","aria-label":"Clear all data",title:"Clear All Data (⌘K)",children:t.jsx(le,{className:"h-5 w-5"})}),t.jsx("a",{href:"https://github.com/mogretici/nestlens",target:"_blank",rel:"noopener noreferrer",className:"p-2.5 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors","aria-label":"Documentation",title:"Documentation",children:t.jsx(re,{className:"h-5 w-5"})})]})})]})}),t.jsxs("div",{className:"lg:pl-64",children:[t.jsxs("header",{className:"sticky top-0 z-40 flex h-14 items-center gap-4 border-b border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 px-4 lg:hidden",children:[t.jsx("button",{onClick:()=>e(!0),className:"text-gray-500 hover:text-gray-700 dark:text-gray-400","aria-expanded":a,"aria-controls":"mobile-sidebar","aria-label":"Open navigation menu",children:t.jsx(Ht,{className:"h-6 w-6","aria-hidden":"true"})}),t.jsxs(D,{to:"/",className:"flex items-center space-x-2",children:[t.jsx(U,{className:"h-6 w-6 text-primary-600"}),t.jsx("span",{className:"text-lg font-bold text-gray-900 dark:text-white",children:"NestLens"})]})]}),t.jsx("main",{className:"p-4 lg:p-6",children:t.jsx(Re,{})})]})]})}function x(){return t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex flex-col items-center gap-3",children:[t.jsx("div",{className:"animate-spin rounded-full h-10 w-10 border-b-2 border-primary-600 dark:border-primary-400"}),t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Loading..."})]})})}const us=r.lazy(()=>w(()=>import("./DashboardPage-C9Nanxp_.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),hs=r.lazy(()=>w(()=>import("./RequestsPage-CwF4ag2x.js"),__vite__mapDeps([5,1,2,6,7,8,9]),import.meta.url)),ms=r.lazy(()=>w(()=>import("./QueriesPage-COyQjzJF.js"),__vite__mapDeps([10,1,2,6,7,8,9,3]),import.meta.url)),ps=r.lazy(()=>w(()=>import("./ExceptionsPage-D9vXlP_g.js"),__vite__mapDeps([11,1,2,6,7,8,9,12]),import.meta.url)),xs=r.lazy(()=>w(()=>import("./LogsPage-ZvRGzxhk.js"),__vite__mapDeps([13,1,2,6,7,8,9]),import.meta.url)),fs=r.lazy(()=>w(()=>import("./EventsPage-Cm2po0yD.js"),__vite__mapDeps([14,1,2,6,9]),import.meta.url)),ys=r.lazy(()=>w(()=>import("./JobsPage-RU5T4OT3.js"),__vite__mapDeps([15,1,2,6,9]),import.meta.url)),gs=r.lazy(()=>w(()=>import("./CachePage-DV05hp-7.js"),__vite__mapDeps([16,1,2,6,9]),import.meta.url)),js=r.lazy(()=>w(()=>import("./MailPage-B-bAKd7c.js"),__vite__mapDeps([17,1,2,6,9]),import.meta.url)),bs=r.lazy(()=>w(()=>import("./SchedulePage-CIRnC6LR.js"),__vite__mapDeps([18,1,19,2,6,9]),import.meta.url)),ks=r.lazy(()=>w(()=>import("./HttpClientPage-r86MGzn6.js"),__vite__mapDeps([20,1,2,6,9]),import.meta.url)),vs=r.lazy(()=>w(()=>import("./RedisPage-DwC_F3Te.js"),__vite__mapDeps([21,1,2,6,9]),import.meta.url)),ws=r.lazy(()=>w(()=>import("./ModelsPage-C_FOyj87.js"),__vite__mapDeps([22,1,2,6,9]),import.meta.url)),Ss=r.lazy(()=>w(()=>import("./NotificationsPage-1hGG29zQ.js"),__vite__mapDeps([23,1,2,6,9]),import.meta.url)),_s=r.lazy(()=>w(()=>import("./ViewsPage-KgHFAnPJ.js"),__vite__mapDeps([24,1,2,6,9,25]),import.meta.url)),Es=r.lazy(()=>w(()=>import("./CommandsPage-Dw-x7K9h.js"),__vite__mapDeps([26,1,2,6,9]),import.meta.url)),Ns=r.lazy(()=>w(()=>import("./GatesPage-Dbk_GiTE.js"),__vite__mapDeps([27,1,2,6,9]),import.meta.url)),Ps=r.lazy(()=>w(()=>import("./BatchesPage-BwrmRtTt.js"),__vite__mapDeps([28,1,2,6,9]),import.meta.url)),Cs=r.lazy(()=>w(()=>import("./DumpsPage-C6HlcD6Z.js"),__vite__mapDeps([29,1,2,6,9]),import.meta.url)),Rs=r.lazy(()=>w(()=>import("./GraphQLPage-B3QaxG8z.js"),__vite__mapDeps([30,1,2,7,8,6,9]),import.meta.url)),S=r.lazy(()=>w(()=>import("./EntryDetailPage-C_84DjL9.js"),__vite__mapDeps([31,1,2,9,8,3,12,19,4,25]),import.meta.url));function Ls(){return t.jsx(Le,{children:t.jsxs(p,{path:"/",element:t.jsx(ds,{}),children:[t.jsx(p,{index:!0,element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(us,{})})}),t.jsx(p,{path:"requests",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(hs,{})})}),t.jsx(p,{path:"queries",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(ms,{})})}),t.jsx(p,{path:"exceptions",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(ps,{})})}),t.jsx(p,{path:"logs",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(xs,{})})}),t.jsx(p,{path:"events",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(fs,{})})}),t.jsx(p,{path:"jobs",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(ys,{})})}),t.jsx(p,{path:"cache",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(gs,{})})}),t.jsx(p,{path:"mail",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(js,{})})}),t.jsx(p,{path:"schedule",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(bs,{})})}),t.jsx(p,{path:"http-client",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(ks,{})})}),t.jsx(p,{path:"redis",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(vs,{})})}),t.jsx(p,{path:"models",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(ws,{})})}),t.jsx(p,{path:"notifications",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(Ss,{})})}),t.jsx(p,{path:"views",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(_s,{})})}),t.jsx(p,{path:"commands",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(Es,{})})}),t.jsx(p,{path:"gates",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(Ns,{})})}),t.jsx(p,{path:"batches",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(Ps,{})})}),t.jsx(p,{path:"dumps",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(Cs,{})})}),t.jsx(p,{path:"graphql",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(Rs,{})})}),t.jsx(p,{path:"requests/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"queries/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"exceptions/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"logs/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"events/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"jobs/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"cache/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"mail/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"schedule/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"http-client/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"redis/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"models/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"notifications/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"views/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"commands/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"gates/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"batches/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"dumps/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"graphql/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"entries/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"*",element:t.jsx(Te,{to:"/",replace:!0})})]})})}class Ts extends r.Component{constructor(){super(...arguments);z(this,"state",{hasError:!1});z(this,"handleReload",()=>{window.location.reload()});z(this,"handleReset",()=>{this.setState({hasError:!1,error:void 0,errorInfo:void 0})})}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,i){console.error("ErrorBoundary caught an error:",e,i),this.setState({errorInfo:i})}render(){return this.state.hasError?this.props.fallback?this.props.fallback:t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900 p-4",children:t.jsxs("div",{className:"max-w-md w-full bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6 text-center",children:[t.jsx("div",{className:"mx-auto w-12 h-12 flex items-center justify-center rounded-full bg-red-100 dark:bg-red-900/30 mb-4",children:t.jsx(be,{className:"h-6 w-6 text-red-600 dark:text-red-400"})}),t.jsx("h1",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:"Something went wrong"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:"An unexpected error occurred. Please try refreshing the page."}),this.state.error&&t.jsx("div",{className:"mb-4 p-3 bg-red-50 dark:bg-red-900/20 rounded-lg text-left",children:t.jsx("p",{className:"text-sm font-mono text-red-600 dark:text-red-400 break-all",children:this.state.error.message})}),t.jsxs("div",{className:"flex gap-3 justify-center",children:[t.jsx("button",{onClick:this.handleReset,className:"px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-lg transition-colors",children:"Try Again"}),t.jsxs("button",{onClick:this.handleReload,className:"flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-primary-600 hover:bg-primary-700 rounded-lg transition-colors",children:[t.jsx(Zt,{className:"h-4 w-4"}),"Refresh Page"]})]}),!1]})}):this.props.children}}ze.createRoot(document.getElementById("root")).render(t.jsx(Ae.StrictMode,{children:t.jsx(Ts,{children:t.jsx(Oe,{basename:ke(),children:t.jsxs(ls,{children:[t.jsx(Ls,{}),t.jsx(Nt,{position:"bottom-right",toastOptions:{duration:3e3,style:{background:"#1f2937",color:"#f3f4f6",borderRadius:"0.5rem"},success:{iconTheme:{primary:"#10b981",secondary:"#f3f4f6"}},error:{iconTheme:{primary:"#ef4444",secondary:"#f3f4f6"}}}})]})})})}));export{At as A,Mt as B,qt as C,$t as D,zt as F,It as G,ne as H,Vt as L,Ft as M,Gt as P,Wt as R,Xt as S,be as T,es as X,Yt as a,Dt as b,g as c,Kt as d,Ot as e,Ut as f,ae as g,le as h,Zt as i,t as j,zs as k,Is as l,Ms as m,Bs as n,Vs as o,ts as p,qs as q,Ks as r,$s as s,se as t,cs as u,Qt as v,Ds as w,q as z};
|
|
361
|
+
*/const es=g("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ke=()=>window.__NESTLENS_BASE__??"",ts=s=>`${window.location.origin}${ke()}/__nestlens__${s}`,ve=ts("/api");async function P(s,a){const e=await fetch(`${ve}${s}`,a);if(!e.ok)throw new Error(`API error: ${e.status}`);return e.json()}async function Ds(s){return P(`/entries/${s}`)}async function ss(){return P("/stats")}async function as(){return(await fetch(`${ve}/entries`,{method:"DELETE"})).json()}async function Ms(s){const a=new URLSearchParams;if(s.type&&a.set("type",s.type),s.limit&&a.set("limit",s.limit.toString()),s.beforeSequence!==void 0&&a.set("beforeSequence",s.beforeSequence.toString()),s.afterSequence!==void 0&&a.set("afterSequence",s.afterSequence.toString()),s.filters){const e=s.filters;e.levels&&e.levels.length>0&&a.set("levels",e.levels.join(",")),e.contexts&&e.contexts.length>0&&a.set("contexts",e.contexts.join(",")),e.queryTypes&&e.queryTypes.length>0&&a.set("queryTypes",e.queryTypes.join(",")),e.sources&&e.sources.length>0&&a.set("sources",e.sources.join(",")),e.slow!==void 0&&a.set("slow",e.slow.toString()),e.names&&e.names.length>0&&a.set("names",e.names.join(",")),e.methods&&e.methods.length>0&&a.set("methods",e.methods.join(",")),e.paths&&e.paths.length>0&&a.set("paths",e.paths.join(",")),e.resolved!==void 0&&a.set("resolved",e.resolved.toString()),e.statuses&&e.statuses.length>0&&a.set("statuses",e.statuses.join(",")),e.hostnames&&e.hostnames.length>0&&a.set("hostnames",e.hostnames.join(",")),e.controllers&&e.controllers.length>0&&a.set("controllers",e.controllers.join(",")),e.ips&&e.ips.length>0&&a.set("ips",e.ips.join(",")),e.eventNames&&e.eventNames.length>0&&a.set("eventNames",e.eventNames.join(",")),e.scheduleStatuses&&e.scheduleStatuses.length>0&&a.set("scheduleStatuses",e.scheduleStatuses.join(",")),e.scheduleNames&&e.scheduleNames.length>0&&a.set("scheduleNames",e.scheduleNames.join(",")),e.jobStatuses&&e.jobStatuses.length>0&&a.set("jobStatuses",e.jobStatuses.join(",")),e.jobNames&&e.jobNames.length>0&&a.set("jobNames",e.jobNames.join(",")),e.queues&&e.queues.length>0&&a.set("queues",e.queues.join(",")),e.cacheOperations&&e.cacheOperations.length>0&&a.set("cacheOperations",e.cacheOperations.join(",")),e.mailStatuses&&e.mailStatuses.length>0&&a.set("mailStatuses",e.mailStatuses.join(",")),e.redisStatuses&&e.redisStatuses.length>0&&a.set("redisStatuses",e.redisStatuses.join(",")),e.redisCommands&&e.redisCommands.length>0&&a.set("redisCommands",e.redisCommands.join(",")),e.modelActions&&e.modelActions.length>0&&a.set("modelActions",e.modelActions.join(",")),e.entities&&e.entities.length>0&&a.set("entities",e.entities.join(",")),e.modelSources&&e.modelSources.length>0&&a.set("modelSources",e.modelSources.join(",")),e.notificationTypes&&e.notificationTypes.length>0&&a.set("notificationTypes",e.notificationTypes.join(",")),e.notificationStatuses&&e.notificationStatuses.length>0&&a.set("notificationStatuses",e.notificationStatuses.join(",")),e.viewFormats&&e.viewFormats.length>0&&a.set("viewFormats",e.viewFormats.join(",")),e.viewStatuses&&e.viewStatuses.length>0&&a.set("viewStatuses",e.viewStatuses.join(",")),e.commandStatuses&&e.commandStatuses.length>0&&a.set("commandStatuses",e.commandStatuses.join(",")),e.commandNames&&e.commandNames.length>0&&a.set("commandNames",e.commandNames.join(",")),e.gateNames&&e.gateNames.length>0&&a.set("gateNames",e.gateNames.join(",")),e.gateResults&&e.gateResults.length>0&&a.set("gateResults",e.gateResults.join(",")),e.batchStatuses&&e.batchStatuses.length>0&&a.set("batchStatuses",e.batchStatuses.join(",")),e.batchOperations&&e.batchOperations.length>0&&a.set("batchOperations",e.batchOperations.join(",")),e.dumpStatuses&&e.dumpStatuses.length>0&&a.set("dumpStatuses",e.dumpStatuses.join(",")),e.dumpOperations&&e.dumpOperations.length>0&&a.set("dumpOperations",e.dumpOperations.join(",")),e.dumpFormats&&e.dumpFormats.length>0&&a.set("dumpFormats",e.dumpFormats.join(",")),e.operationTypes&&e.operationTypes.length>0&&a.set("operationTypes",e.operationTypes.join(",")),e.operationNames&&e.operationNames.length>0&&a.set("operationNames",e.operationNames.join(",")),e.hasErrors!==void 0&&a.set("hasErrors",e.hasErrors.toString()),e.hasN1!==void 0&&a.set("hasN1",e.hasN1.toString()),e.tags&&e.tags.length>0&&a.set("tags",e.tags.join(",")),e.search&&a.set("search",e.search)}return P(`/entries/cursor?${a.toString()}`)}async function qs(s){const a=new URLSearchParams;return s&&a.set("type",s),P(`/entries/latest-sequence?${a.toString()}`)}async function $s(s,a){const e=new URLSearchParams;return e.set("afterSequence",s.toString()),a&&e.set("type",a),P(`/entries/check-new?${e.toString()}`)}async function zs(){return P("/storage/stats")}async function Is(){return P("/pruning/status")}async function Ks(){return P("/pruning/run",{method:"POST"})}async function Vs(s){return P(`/entries/${s}/resolve`,{method:"PATCH"})}async function Bs(s){return P(`/entries/${s}/unresolve`,{method:"PATCH"})}async function rs(s){return P("/recording/pause",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:s})})}async function ns(){return P("/recording/resume",{method:"POST"})}async function os(){return P("/recording/status")}function is(s){const a=r.useCallback(e=>{const o=e.target,l=o.tagName==="INPUT"||o.tagName==="TEXTAREA"||o.isContentEditable;for(const i of s){const{key:n,ctrl:c,meta:d,shift:y,alt:u,handler:m,preventDefault:f=!0}=i;if(l&&n.toLowerCase()!=="escape")continue;const j=e.key.toLowerCase()===n.toLowerCase(),v=y?e.shiftKey:!e.shiftKey,h=u?e.altKey:!e.altKey;if(c){if((e.ctrlKey||e.metaKey)&&j&&v&&h){f&&e.preventDefault(),m(e);return}continue}if(d){if(e.metaKey&&!e.ctrlKey&&j&&v&&h){f&&e.preventDefault(),m(e);return}continue}if(!e.ctrlKey&&!e.metaKey&&j&&v&&h){f&&e.preventDefault(),m(e);return}}},[s]);r.useEffect(()=>(document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a)}),[a])}const we=r.createContext(void 0);function ls({children:s}){const[a,e]=r.useState(null),[o,l]=r.useState(null),i=r.useRef(!0),n=r.useCallback(async()=>{try{const c=await ss();e(c.data),l(null)}catch(c){const d=c instanceof Error?c:new Error("Failed to fetch stats");l(d),console.error("Failed to fetch stats:",c),i.current&&q.error("Failed to load statistics")}finally{i.current=!1}},[]);return r.useEffect(()=>{n();const c=setInterval(n,1e4);return()=>clearInterval(c)},[n]),t.jsx(we.Provider,{value:{stats:a,error:o,refreshStats:n},children:s})}function cs(){const s=r.useContext(we);if(s===void 0)throw new Error("useStats must be used within a StatsProvider");return s}function ce(){const[s,a]=r.useState(null),[e,o]=r.useState(!1);r.useEffect(()=>{const i=async()=>{try{const c=await os();a(c.data)}catch(c){console.error("Failed to fetch recording status:",c)}};i();const n=setInterval(i,5e3);return()=>clearInterval(n)},[]);const l=async()=>{if(!(!s||e)){o(!0);try{if(s.isPaused){const i=await ns();a(i.data),q.success("Recording resumed")}else{const i=await rs();a(i.data),q.success("Recording paused")}}catch{q.error("Failed to toggle recording")}finally{o(!1)}}};return s?t.jsx("button",{onClick:l,disabled:e,className:`p-2.5 rounded-lg transition-colors ${s.isPaused?"text-yellow-600 hover:text-yellow-700 dark:text-yellow-400 dark:hover:text-yellow-300 hover:bg-yellow-50 dark:hover:bg-yellow-900/20":"text-green-600 hover:text-green-700 dark:text-green-400 dark:hover:text-green-300 hover:bg-green-50 dark:hover:bg-green-900/20"} ${e?"opacity-50 cursor-not-allowed":""}`,"aria-label":s.isPaused?"Resume recording":"Pause recording",title:s.isPaused?"Resume Recording":"Pause Recording",children:s.isPaused?t.jsx(Qt,{className:"h-5 w-5"}):t.jsx(Jt,{className:"h-5 w-5"})}):null}const de={dashboard:"text-primary-500",request:"text-blue-500",query:"text-purple-500",graphql:"text-fuchsia-500",exception:"text-red-500",log:"text-green-500",job:"text-yellow-500",schedule:"text-gray-500",batch:"text-lime-500",command:"text-slate-500",cache:"text-cyan-500",redis:"text-rose-500",model:"text-violet-500","http-client":"text-indigo-500",mail:"text-pink-500",notification:"text-orange-500",event:"text-emerald-500",view:"text-teal-500",gate:"text-amber-500",dump:"text-stone-500"},ue=[{name:"Overview",items:[{name:"Dashboard",href:"/",icon:Bt,colorKey:"dashboard"}]},{name:"Core",items:[{name:"Requests",href:"/requests",icon:At,colorKey:"request"},{name:"Queries",href:"/queries",icon:$t,colorKey:"query"},{name:"GraphQL",href:"/graphql",icon:It,colorKey:"graphql"},{name:"Exceptions",href:"/exceptions",icon:be,badge:"exceptions",colorKey:"exception"},{name:"Logs",href:"/logs",icon:zt,colorKey:"log"}]},{name:"Background",items:[{name:"Jobs",href:"/jobs",icon:Mt,colorKey:"job"},{name:"Schedule",href:"/schedule",icon:qt,colorKey:"schedule"},{name:"Batches",href:"/batches",icon:Gt,colorKey:"batch"},{name:"Commands",href:"/commands",icon:Yt,colorKey:"command"}]},{name:"Data",items:[{name:"Cache",href:"/cache",icon:ne,colorKey:"cache"},{name:"Redis",href:"/redis",icon:Dt,colorKey:"redis"},{name:"Models",href:"/models",icon:Vt,colorKey:"model"}]},{name:"Communication",items:[{name:"HTTP Client",href:"/http-client",icon:Kt,colorKey:"http-client"},{name:"Mail",href:"/mail",icon:Ft,colorKey:"mail"},{name:"Notifications",href:"/notifications",icon:Ot,colorKey:"notification"},{name:"Events",href:"/events",icon:Wt,colorKey:"event"}]},{name:"System",items:[{name:"Views",href:"/views",icon:Ut,colorKey:"view"},{name:"Gates",href:"/gates",icon:Xt,colorKey:"gate"},{name:"Dumps",href:"/dumps",icon:ne,colorKey:"dump"}]}];function ds(){const s=Ce(),[a,e]=r.useState(!1),{stats:o}=cs(),[l,i]=r.useState(()=>{if(typeof window<"u"){const h=localStorage.getItem("nestlens-collapsed-groups");return h?new Set(JSON.parse(h)):new Set}return new Set}),[n,c]=r.useState(()=>typeof window<"u"?document.documentElement.classList.contains("dark"):!1),[d,y]=r.useState(()=>{if(typeof window<"u"){const h=localStorage.getItem("nestlens-theme");if(h==="system"||h==="light"||h==="dark")return h}return"system"}),u=r.useCallback(h=>{i(k=>{const E=new Set(k);return E.has(h)?E.delete(h):E.add(h),localStorage.setItem("nestlens-collapsed-groups",JSON.stringify([...E])),E})},[]),m=r.useCallback(h=>{if(!o)return 0;switch(h){case"exceptions":return o.unresolvedExceptions??o.byType.exception??0;default:return 0}},[o]),f=r.useCallback(h=>{let k=!1;h==="system"?k=window.matchMedia("(prefers-color-scheme: dark)").matches:k=h==="dark",k?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),c(k)},[]),j=r.useCallback(()=>{const h=n?"light":"dark";y(h),localStorage.setItem("nestlens-theme",h),f(h)},[n,f]),v=r.useCallback(async()=>{window.confirm("Are you sure you want to clear all entries?")&&(await as(),q.success("All entries cleared"),window.location.reload())},[]);return r.useEffect(()=>{if(f(d),d==="system"){const h=window.matchMedia("(prefers-color-scheme: dark)"),k=E=>{const b=E.matches;b?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),c(b)};return h.addEventListener("change",k),()=>h.removeEventListener("change",k)}},[d,f]),is([{key:"k",ctrl:!0,handler:()=>v()},{key:"Escape",handler:()=>{a&&e(!1)},preventDefault:!1},{key:"d",ctrl:!0,handler:()=>j()}]),t.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:[t.jsxs("div",{className:`fixed inset-0 z-50 lg:hidden ${a?"":"hidden"}`,children:[t.jsx("div",{className:"fixed inset-0 bg-gray-900/80",onClick:()=>e(!1)}),t.jsxs("div",{id:"mobile-sidebar","data-testid":"mobile-sidebar",className:"fixed inset-y-0 left-0 w-64 bg-white dark:bg-gray-800 flex flex-col",children:[t.jsxs("div",{className:"flex h-16 items-center justify-between px-4 border-b border-gray-200 dark:border-gray-700",children:[t.jsxs(D,{to:"/",className:"flex items-center space-x-2",children:[t.jsx(U,{className:"h-8 w-8 text-primary-600"}),t.jsx("span",{className:"text-xl font-bold text-gray-900 dark:text-white",children:"NestLens"})]}),t.jsx("button",{onClick:()=>e(!1),className:"text-gray-500 hover:text-gray-700 dark:text-gray-400","aria-label":"Close sidebar",children:t.jsx(es,{className:"h-6 w-6","aria-hidden":"true"})})]}),t.jsx("nav",{className:"flex-1 min-h-0 overflow-y-auto py-4 px-3",children:ue.map((h,k)=>{const E=l.has(h.name);return t.jsxs("div",{className:k>0?"mt-4":"",children:[t.jsxs("button",{onClick:()=>u(h.name),className:"flex items-center justify-between w-full px-2 py-1.5 text-xs font-semibold text-gray-400 dark:text-gray-500 uppercase tracking-wider hover:text-gray-600 dark:hover:text-gray-400 transition-colors","aria-expanded":!E,"aria-controls":`nav-group-${h.name.toLowerCase().replace(/\s+/g,"-")}`,children:[t.jsx("span",{children:h.name}),E?t.jsx(ae,{className:"h-3 w-3","aria-hidden":"true"}):t.jsx(se,{className:"h-3 w-3","aria-hidden":"true"})]}),!E&&t.jsx("div",{className:"mt-1 space-y-0.5",children:h.items.map(b=>{const N=b.href==="/"?s.pathname==="/":s.pathname.startsWith(b.href),C="badge"in b?m(b.badge):0;return t.jsxs(D,{to:b.href,"aria-current":N?"page":void 0,className:`group flex items-center justify-between px-3 py-2 rounded-lg transition-colors ${N?"bg-primary-50 text-primary-700 dark:bg-primary-900/50 dark:text-primary-200 font-medium":"text-gray-600 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800 hover:text-gray-900 dark:hover:text-white"}`,onClick:()=>e(!1),children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx(b.icon,{className:`h-4 w-4 ${de[b.colorKey]||"text-gray-400"}`}),t.jsx("span",{className:"text-sm",children:b.name})]}),C>0&&t.jsx("span",{className:"inline-flex items-center justify-center min-w-[20px] h-5 px-1.5 text-xs font-medium bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-400 rounded-full",children:C>99?"99+":C})]},b.name)})})]},h.name)})}),t.jsx("div",{className:"flex-shrink-0 p-3 border-t border-gray-200 dark:border-gray-700",children:t.jsxs("div",{className:"flex items-center justify-center gap-1",children:[t.jsx(ce,{}),t.jsx("button",{onClick:j,className:"p-2.5 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors","aria-label":n?"Switch to light mode":"Switch to dark mode",children:n?t.jsx(ie,{className:"h-5 w-5"}):t.jsx(oe,{className:"h-5 w-5"})}),t.jsx("button",{onClick:v,className:"p-2.5 text-gray-500 hover:text-red-600 dark:text-gray-400 dark:hover:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20 rounded-lg transition-colors","aria-label":"Clear all data",children:t.jsx(le,{className:"h-5 w-5"})}),t.jsx("a",{href:"https://github.com/mogretici/nestlens",target:"_blank",rel:"noopener noreferrer",className:"p-2.5 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors","aria-label":"Documentation",children:t.jsx(re,{className:"h-5 w-5"})})]})})]})]}),t.jsx("div",{"data-testid":"sidebar",className:"hidden lg:fixed lg:inset-y-0 lg:flex lg:w-64 lg:flex-col",children:t.jsxs("div",{className:"flex flex-col h-full bg-white dark:bg-gray-800 border-r border-gray-200 dark:border-gray-700",children:[t.jsx("div",{className:"flex h-16 items-center px-4 border-b border-gray-200 dark:border-gray-700",children:t.jsxs(D,{to:"/",className:"flex items-center space-x-2.5",children:[t.jsx("div",{className:"p-1.5 bg-primary-100 dark:bg-primary-900/50 rounded-lg",children:t.jsx(U,{className:"h-6 w-6 text-primary-600 dark:text-primary-400"})}),t.jsxs("div",{children:[t.jsx("span",{className:"text-lg font-bold text-gray-900 dark:text-white",children:"NestLens"}),t.jsxs("span",{className:"hidden xl:inline text-xs text-gray-400 dark:text-gray-500 ml-1.5",children:["v","0.8.3"]})]})]})}),t.jsx("nav",{className:"flex-1 min-h-0 overflow-y-auto py-4 px-3",children:ue.map((h,k)=>{const E=l.has(h.name);return t.jsxs("div",{className:k>0?"mt-6":"",children:[t.jsxs("button",{onClick:()=>u(h.name),className:"flex items-center justify-between w-full px-2 py-1.5 text-[11px] font-semibold text-gray-400 dark:text-gray-500 uppercase tracking-wider hover:text-gray-600 dark:hover:text-gray-400 transition-colors","aria-expanded":!E,"aria-controls":`desktop-nav-group-${h.name.toLowerCase().replace(/\s+/g,"-")}`,children:[t.jsx("span",{children:h.name}),E?t.jsx(ae,{className:"h-3 w-3","aria-hidden":"true"}):t.jsx(se,{className:"h-3 w-3","aria-hidden":"true"})]}),!E&&t.jsx("div",{className:"mt-1 space-y-0.5",children:h.items.map(b=>{const N=b.href==="/"?s.pathname==="/":s.pathname.startsWith(b.href),C="badge"in b?m(b.badge):0;return t.jsxs(D,{to:b.href,"aria-current":N?"page":void 0,className:`group flex items-center justify-between px-3 py-2 rounded-lg transition-all duration-150 ${N?"bg-primary-50 text-primary-700 dark:bg-primary-900/50 dark:text-primary-200 font-medium shadow-sm":"text-gray-600 hover:bg-gray-50 dark:text-gray-400 dark:hover:bg-gray-800/50 hover:text-gray-900 dark:hover:text-white"}`,children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx(b.icon,{className:`h-[18px] w-[18px] ${de[b.colorKey]||"text-gray-400"}`}),t.jsx("span",{className:"text-sm",children:b.name})]}),C>0&&t.jsx("span",{className:`inline-flex items-center justify-center min-w-[20px] h-5 px-1.5 text-xs font-semibold rounded-full transition-colors ${N?"bg-primary-200 text-primary-800 dark:bg-primary-800 dark:text-primary-200":"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-400"}`,children:C>99?"99+":C})]},b.name)})})]},h.name)})}),t.jsx("div",{className:"flex-shrink-0 p-3 border-t border-gray-200 dark:border-gray-700",children:t.jsxs("div",{className:"flex items-center justify-center gap-1",children:[t.jsx(ce,{}),t.jsx("button",{onClick:j,className:"p-2.5 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors","aria-label":n?"Switch to light mode":"Switch to dark mode",title:n?"Light Mode (⌘D)":"Dark Mode (⌘D)",children:n?t.jsx(ie,{className:"h-5 w-5"}):t.jsx(oe,{className:"h-5 w-5"})}),t.jsx("button",{onClick:v,className:"p-2.5 text-gray-500 hover:text-red-600 dark:text-gray-400 dark:hover:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20 rounded-lg transition-colors","aria-label":"Clear all data",title:"Clear All Data (⌘K)",children:t.jsx(le,{className:"h-5 w-5"})}),t.jsx("a",{href:"https://github.com/mogretici/nestlens",target:"_blank",rel:"noopener noreferrer",className:"p-2.5 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors","aria-label":"Documentation",title:"Documentation",children:t.jsx(re,{className:"h-5 w-5"})})]})})]})}),t.jsxs("div",{className:"lg:pl-64",children:[t.jsxs("header",{className:"sticky top-0 z-40 flex h-14 items-center gap-4 border-b border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 px-4 lg:hidden",children:[t.jsx("button",{onClick:()=>e(!0),className:"text-gray-500 hover:text-gray-700 dark:text-gray-400","aria-expanded":a,"aria-controls":"mobile-sidebar","aria-label":"Open navigation menu",children:t.jsx(Ht,{className:"h-6 w-6","aria-hidden":"true"})}),t.jsxs(D,{to:"/",className:"flex items-center space-x-2",children:[t.jsx(U,{className:"h-6 w-6 text-primary-600"}),t.jsx("span",{className:"text-lg font-bold text-gray-900 dark:text-white",children:"NestLens"})]})]}),t.jsx("main",{className:"p-4 lg:p-6",children:t.jsx(Re,{})})]})]})}function x(){return t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex flex-col items-center gap-3",children:[t.jsx("div",{className:"animate-spin rounded-full h-10 w-10 border-b-2 border-primary-600 dark:border-primary-400"}),t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Loading..."})]})})}const us=r.lazy(()=>w(()=>import("./DashboardPage-B0T6pIDE.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),hs=r.lazy(()=>w(()=>import("./RequestsPage-CL-SGIfb.js"),__vite__mapDeps([5,1,2,6,7,8,9]),import.meta.url)),ms=r.lazy(()=>w(()=>import("./QueriesPage-8dFsmtbC.js"),__vite__mapDeps([10,1,2,6,7,8,9,3]),import.meta.url)),ps=r.lazy(()=>w(()=>import("./ExceptionsPage-CSwfuIx6.js"),__vite__mapDeps([11,1,2,6,7,8,9,12]),import.meta.url)),xs=r.lazy(()=>w(()=>import("./LogsPage-BJTqqpaI.js"),__vite__mapDeps([13,1,2,6,7,8,9]),import.meta.url)),fs=r.lazy(()=>w(()=>import("./EventsPage-CFCZvgVn.js"),__vite__mapDeps([14,1,2,6,9]),import.meta.url)),ys=r.lazy(()=>w(()=>import("./JobsPage-BqDREe3I.js"),__vite__mapDeps([15,1,2,6,9]),import.meta.url)),gs=r.lazy(()=>w(()=>import("./CachePage-BDYXsyI9.js"),__vite__mapDeps([16,1,2,6,9]),import.meta.url)),js=r.lazy(()=>w(()=>import("./MailPage-CMBFq4vj.js"),__vite__mapDeps([17,1,2,6,9]),import.meta.url)),bs=r.lazy(()=>w(()=>import("./SchedulePage-CiYbYKau.js"),__vite__mapDeps([18,1,19,2,6,9]),import.meta.url)),ks=r.lazy(()=>w(()=>import("./HttpClientPage-B6EX2Cn6.js"),__vite__mapDeps([20,1,2,6,9]),import.meta.url)),vs=r.lazy(()=>w(()=>import("./RedisPage-CUm_y-o2.js"),__vite__mapDeps([21,1,2,6,9]),import.meta.url)),ws=r.lazy(()=>w(()=>import("./ModelsPage-CxrhoZib.js"),__vite__mapDeps([22,1,2,6,9]),import.meta.url)),Ss=r.lazy(()=>w(()=>import("./NotificationsPage-4vopw7N9.js"),__vite__mapDeps([23,1,2,6,9]),import.meta.url)),_s=r.lazy(()=>w(()=>import("./ViewsPage-H2fqCqqr.js"),__vite__mapDeps([24,1,2,6,9,25]),import.meta.url)),Es=r.lazy(()=>w(()=>import("./CommandsPage-D6DtWReX.js"),__vite__mapDeps([26,1,2,6,9]),import.meta.url)),Ns=r.lazy(()=>w(()=>import("./GatesPage-1c_m1RG6.js"),__vite__mapDeps([27,1,2,6,9]),import.meta.url)),Ps=r.lazy(()=>w(()=>import("./BatchesPage-CugoZztS.js"),__vite__mapDeps([28,1,2,6,9]),import.meta.url)),Cs=r.lazy(()=>w(()=>import("./DumpsPage-Dc6GbhFt.js"),__vite__mapDeps([29,1,2,6,9]),import.meta.url)),Rs=r.lazy(()=>w(()=>import("./GraphQLPage-Ca4Bp7eW.js"),__vite__mapDeps([30,1,2,7,8,6,9]),import.meta.url)),S=r.lazy(()=>w(()=>import("./EntryDetailPage-CXBlrmgt.js"),__vite__mapDeps([31,1,2,9,8,3,12,19,4,25]),import.meta.url));function Ls(){return t.jsx(Le,{children:t.jsxs(p,{path:"/",element:t.jsx(ds,{}),children:[t.jsx(p,{index:!0,element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(us,{})})}),t.jsx(p,{path:"requests",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(hs,{})})}),t.jsx(p,{path:"queries",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(ms,{})})}),t.jsx(p,{path:"exceptions",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(ps,{})})}),t.jsx(p,{path:"logs",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(xs,{})})}),t.jsx(p,{path:"events",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(fs,{})})}),t.jsx(p,{path:"jobs",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(ys,{})})}),t.jsx(p,{path:"cache",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(gs,{})})}),t.jsx(p,{path:"mail",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(js,{})})}),t.jsx(p,{path:"schedule",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(bs,{})})}),t.jsx(p,{path:"http-client",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(ks,{})})}),t.jsx(p,{path:"redis",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(vs,{})})}),t.jsx(p,{path:"models",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(ws,{})})}),t.jsx(p,{path:"notifications",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(Ss,{})})}),t.jsx(p,{path:"views",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(_s,{})})}),t.jsx(p,{path:"commands",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(Es,{})})}),t.jsx(p,{path:"gates",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(Ns,{})})}),t.jsx(p,{path:"batches",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(Ps,{})})}),t.jsx(p,{path:"dumps",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(Cs,{})})}),t.jsx(p,{path:"graphql",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(Rs,{})})}),t.jsx(p,{path:"requests/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"queries/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"exceptions/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"logs/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"events/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"jobs/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"cache/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"mail/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"schedule/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"http-client/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"redis/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"models/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"notifications/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"views/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"commands/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"gates/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"batches/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"dumps/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"graphql/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"entries/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(x,{}),children:t.jsx(S,{})})}),t.jsx(p,{path:"*",element:t.jsx(Te,{to:"/",replace:!0})})]})})}class Ts extends r.Component{constructor(){super(...arguments);z(this,"state",{hasError:!1});z(this,"handleReload",()=>{window.location.reload()});z(this,"handleReset",()=>{this.setState({hasError:!1,error:void 0,errorInfo:void 0})})}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,o){console.error("ErrorBoundary caught an error:",e,o),this.setState({errorInfo:o})}render(){return this.state.hasError?this.props.fallback?this.props.fallback:t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900 p-4",children:t.jsxs("div",{className:"max-w-md w-full bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6 text-center",children:[t.jsx("div",{className:"mx-auto w-12 h-12 flex items-center justify-center rounded-full bg-red-100 dark:bg-red-900/30 mb-4",children:t.jsx(be,{className:"h-6 w-6 text-red-600 dark:text-red-400"})}),t.jsx("h1",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:"Something went wrong"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:"An unexpected error occurred. Please try refreshing the page."}),this.state.error&&t.jsx("div",{className:"mb-4 p-3 bg-red-50 dark:bg-red-900/20 rounded-lg text-left",children:t.jsx("p",{className:"text-sm font-mono text-red-600 dark:text-red-400 break-all",children:this.state.error.message})}),t.jsxs("div",{className:"flex gap-3 justify-center",children:[t.jsx("button",{onClick:this.handleReset,className:"px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-lg transition-colors",children:"Try Again"}),t.jsxs("button",{onClick:this.handleReload,className:"flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-primary-600 hover:bg-primary-700 rounded-lg transition-colors",children:[t.jsx(Zt,{className:"h-4 w-4"}),"Refresh Page"]})]}),!1]})}):this.props.children}}ze.createRoot(document.getElementById("root")).render(t.jsx(Ae.StrictMode,{children:t.jsx(Ts,{children:t.jsx(Oe,{basename:ke(),children:t.jsxs(ls,{children:[t.jsx(Ls,{}),t.jsx(Nt,{position:"bottom-right",toastOptions:{duration:3e3,style:{background:"#1f2937",color:"#f3f4f6",borderRadius:"0.5rem"},success:{iconTheme:{primary:"#10b981",secondary:"#f3f4f6"}},error:{iconTheme:{primary:"#ef4444",secondary:"#f3f4f6"}}}})]})})})}));export{At as A,Mt as B,qt as C,$t as D,zt as F,It as G,ne as H,Vt as L,Ft as M,Gt as P,Wt as R,Xt as S,be as T,es as X,Yt as a,Dt as b,g as c,Kt as d,Ot as e,Ut as f,ae as g,le as h,Zt as i,t as j,zs as k,Is as l,Ms as m,Bs as n,Vs as o,ts as p,qs as q,Ks as r,$s as s,se as t,cs as u,Qt as v,Ds as w,q as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as q,j as t,g as A}from"./index-
|
|
1
|
+
import{c as q,j as t,g as A}from"./index-BzXsymsx.js";import{b as d}from"./vendor-DBTT3jXp.js";import{g as b}from"./ClickableBadge-WXTZ8mFZ.js";/**
|
|
2
2
|
* @license lucide-react v0.468.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|