bunqueue-dashboard 0.0.15 → 0.0.16
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/.vite/manifest.json +57 -57
- package/dist/assets/{AddJob-CgeLluaI.js → AddJob-CMIT6e17.js} +1 -1
- package/dist/assets/{Benchmark-DrUL2MGj.js → Benchmark-Dq1-vJ2k.js} +1 -1
- package/dist/assets/{CopilotPanel-fr19SCy4.js → CopilotPanel-BDZzDmVy.js} +1 -1
- package/dist/assets/{CopyButton-BRNz3U_X.js → CopyButton-XT7ykzf5.js} +1 -1
- package/dist/assets/{Cron-CGpba--B.js → Cron-9hndZ-Z5.js} +1 -1
- package/dist/assets/{CronManager-C8DgqC22.js → CronManager-BQupx6wZ.js} +1 -1
- package/dist/assets/{Database-3TVTb28B.js → Database-Difs7xYV.js} +1 -1
- package/dist/assets/{Diagnostics-Bx3SLh8R.js → Diagnostics-BzVDq9CH.js} +1 -1
- package/dist/assets/{Dlq-fvEtz0IH.js → Dlq-BCUVh_NO.js} +1 -1
- package/dist/assets/{DlqControl-BuoZGZiz.js → DlqControl-Cu2i1oq5.js} +1 -1
- package/dist/assets/{DlqPro-Dc4R2c0h.js → DlqPro-HBrCftLD.js} +1 -1
- package/dist/assets/{Flows-uJwr4Xtd.js → Flows-D3Bvkmd6.js} +1 -1
- package/dist/assets/{JobInspector-BHzMp9AE.js → JobInspector-B7zEuFhM.js} +1 -1
- package/dist/assets/{Jobs-B3ngaITT.js → Jobs-ovYRwmwi.js} +1 -1
- package/dist/assets/{JobsPro-B8ZXHQat.js → JobsPro-DNZivuzq.js} +1 -1
- package/dist/assets/{Logs-BFNzXnJu.js → Logs-CjM7MNYN.js} +1 -1
- package/dist/assets/{LogsPro-BsYmMhV3.js → LogsPro-P73LCkap.js} +1 -1
- package/dist/assets/{McpServer-Dp5CU2Ao.js → McpServer-CUK20-uN.js} +1 -1
- package/dist/assets/{Metrics-BIy2WsIk.js → Metrics-BodjiKpf.js} +1 -1
- package/dist/assets/{MetricsPro-59vtSH96.js → MetricsPro-CqcH6gJp.js} +1 -1
- package/dist/assets/{Overview-CKCv4aez.js → Overview-AwCA3XI2.js} +1 -1
- package/dist/assets/{Pagination-DdeRIp2i.js → Pagination-Cd6lHj2E.js} +1 -1
- package/dist/assets/{QueueControl-Bnk114Oa.js → QueueControl-D7J1JObu.js} +1 -1
- package/dist/assets/{QueueDetail-BjblUfMz.js → QueueDetail-BtiN0s3b.js} +1 -1
- package/dist/assets/{Queues-DLfqg-GX.js → Queues-LrodynCj.js} +1 -1
- package/dist/assets/{QueuesOverview-2q1ROf6f.js → QueuesOverview-DrYjyped.js} +1 -1
- package/dist/assets/{S3Backup-BnL4NviE.js → S3Backup-et1PcCC0.js} +1 -1
- package/dist/assets/{S3BackupPro-MKhVJfmN.js → S3BackupPro-BEo_EVAO.js} +1 -1
- package/dist/assets/{ServerControl-MwMUqZXA.js → ServerControl-BRLFRj7k.js} +1 -1
- package/dist/assets/{Settings-Bg4nYelW.js → Settings-CeRZgZU6.js} +1 -1
- package/dist/assets/{Usage-Cf-_mayK.js → Usage-CHCg6VNy.js} +1 -1
- package/dist/assets/{UsagePro-Dvnkxjtk.js → UsagePro-Cto9k5OI.js} +1 -1
- package/dist/assets/{Webhooks-DI-3YwZu.js → Webhooks-Cm3vZEp7.js} +1 -1
- package/dist/assets/{Workers-DzewyMtr.js → Workers-CVfx3TK-.js} +1 -1
- package/dist/assets/{WorkersPro-DXnomAJx.js → WorkersPro-BidtV_Bp.js} +1 -1
- package/dist/assets/{index-D6Nj5ksZ.js → index-C9fPU4bV.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/scripts/embedded.gen.ts +96 -96
- package/scripts/serve.ts +33 -6
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CopilotPanel-
|
|
2
|
-
import{r as e,t}from"./cn-CMFYpumL.js";import{a as n,c as r,f as i,i as a,l as o,m as s,n as c,o as l,p as u,r as d,s as f,t as p}from"./react-vendor-CHIHtdAC.js";import{a as m,i as h,n as g,r as _,t as v}from"./connectionStore-DI-LYcct.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var y=u(),b=e(s(),1),x=p();function S(){let[e,t]=(0,b.useState)(!1),[n,r]=(0,b.useState)(``),i=_(e=>e.baseUrl),a=_(e=>e.setToken),o=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let e=()=>t(!0);return window.addEventListener(`auth:required`,e),()=>window.removeEventListener(`auth:required`,e)},[]),(0,b.useEffect)(()=>{if(!e)return;let t=requestAnimationFrame(()=>o.current?.focus());return()=>cancelAnimationFrame(t)},[e]),e?(0,x.jsx)(`div`,{className:`fixed inset-0 z-[60] flex items-center justify-center bg-black/60 p-4`,children:(0,x.jsxs)(`form`,{onSubmit:e=>{e.preventDefault();let i=n.trim();i&&(a(i),r(``),t(!1))},role:`dialog`,"aria-modal":`true`,"aria-label":`Authentication required`,className:`w-full max-w-sm rounded-xl border border-line-strong bg-surface p-6 shadow-2xl`,children:[(0,x.jsx)(`h2`,{className:`text-lg font-semibold text-fg`,children:`Authentication required`}),(0,x.jsxs)(`p`,{className:`mt-1 text-sm text-muted`,children:[`The server at `,(0,x.jsx)(`span`,{className:`break-all font-mono text-fg`,children:i}),` rejected the request (401). Enter its bearer token to continue.`]}),(0,x.jsx)(`input`,{ref:o,type:`password`,value:n,onChange:e=>r(e.target.value),placeholder:`Bearer token`,"aria-label":`Bearer token`,autoComplete:`off`,className:`mt-4 w-full rounded-lg border border-line bg-surface-2 px-3 py-2 text-sm text-fg outline-none placeholder:text-faint focus-visible:ring-2 focus-visible:ring-accent/50`}),(0,x.jsxs)(`div`,{className:`mt-4 flex items-center justify-between gap-3`,children:[(0,x.jsx)(d,{to:`/settings`,onClick:()=>t(!1),className:`text-xs text-muted underline-offset-2 hover:text-fg hover:underline`,children:`Open Settings instead`}),(0,x.jsx)(`button`,{type:`submit`,disabled:!n.trim(),className:`rounded-lg bg-accent px-4 py-2 text-sm font-medium text-accent-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50 disabled:opacity-50`,children:`Unlock`})]})]})}):null}function C(e){typeof document<`u`&&(document.documentElement.dataset.theme=e,document.documentElement.style.colorScheme=e)}var w=m()(h((e,t)=>({theme:`dark`,toggle:()=>{let n=t().theme===`dark`?`light`:`dark`;C(n),e({theme:n})},setTheme:t=>{C(t),e({theme:t})}}),{name:`bq-dash-theme`,onRehydrateStorage:()=>e=>{e&&C(e.theme)}}));function ee(){C(w.getState().theme)}function T({children:e,...t}){return(0,x.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.75`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,...t,children:e})}var te=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`path`,{d:`M3 3v18h18`}),(0,x.jsx)(`rect`,{x:`7`,y:`12`,width:`3`,height:`6`}),(0,x.jsx)(`rect`,{x:`12`,y:`8`,width:`3`,height:`10`}),(0,x.jsx)(`rect`,{x:`17`,y:`5`,width:`3`,height:`13`})]}),E=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`line`,{x1:`8`,y1:`6`,x2:`21`,y2:`6`}),(0,x.jsx)(`line`,{x1:`8`,y1:`12`,x2:`21`,y2:`12`}),(0,x.jsx)(`line`,{x1:`8`,y1:`18`,x2:`21`,y2:`18`}),(0,x.jsx)(`line`,{x1:`3`,y1:`6`,x2:`3.01`,y2:`6`}),(0,x.jsx)(`line`,{x1:`3`,y1:`12`,x2:`3.01`,y2:`12`}),(0,x.jsx)(`line`,{x1:`3`,y1:`18`,x2:`3.01`,y2:`18`})]}),ne=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`rect`,{x:`2`,y:`7`,width:`20`,height:`14`,rx:`2`}),(0,x.jsx)(`path`,{d:`M16 7V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2`})]}),D=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`path`,{d:`M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z`}),(0,x.jsx)(`line`,{x1:`12`,y1:`9`,x2:`12`,y2:`13`}),(0,x.jsx)(`line`,{x1:`12`,y1:`17`,x2:`12.01`,y2:`17`})]}),re=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,x.jsx)(`polyline`,{points:`12 7 12 12 15 14`})]}),ie=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`path`,{d:`M3 3v18h18`}),(0,x.jsx)(`path`,{d:`m19 9-5 5-4-4-3 3`})]}),O=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`rect`,{x:`4`,y:`4`,width:`16`,height:`8`,rx:`2`}),(0,x.jsx)(`rect`,{x:`4`,y:`14`,width:`16`,height:`6`,rx:`2`}),(0,x.jsx)(`line`,{x1:`8`,y1:`8`,x2:`8.01`,y2:`8`}),(0,x.jsx)(`line`,{x1:`8`,y1:`17`,x2:`8.01`,y2:`17`})]}),ae=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`line`,{x1:`8`,y1:`6`,x2:`21`,y2:`6`}),(0,x.jsx)(`line`,{x1:`8`,y1:`12`,x2:`21`,y2:`12`}),(0,x.jsx)(`line`,{x1:`8`,y1:`18`,x2:`21`,y2:`18`}),(0,x.jsx)(`path`,{d:`M3 6h.01M3 12h.01M3 18h.01`})]}),oe=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`path`,{d:`M12 20V10`}),(0,x.jsx)(`path`,{d:`M18 20V4`}),(0,x.jsx)(`path`,{d:`M6 20v-4`})]}),se=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`ellipse`,{cx:`12`,cy:`5`,rx:`8`,ry:`3`}),(0,x.jsx)(`path`,{d:`M4 5v6c0 1.66 3.58 3 8 3s8-1.34 8-3V5`}),(0,x.jsx)(`path`,{d:`M4 11v6c0 1.66 3.58 3 8 3s8-1.34 8-3v-6`})]}),ce=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`16`,rx:`2`}),(0,x.jsx)(`path`,{d:`M3 10h18`}),(0,x.jsx)(`path`,{d:`M9 10v10`})]}),le=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`}),(0,x.jsx)(`path`,{d:`M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1Z`})]}),ue=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`circle`,{cx:`12`,cy:`12`,r:`4`}),(0,x.jsx)(`path`,{d:`M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41`})]}),de=e=>(0,x.jsx)(T,{...e,children:(0,x.jsx)(`path`,{d:`M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79Z`})}),fe=e=>(0,x.jsx)(T,{...e,children:(0,x.jsx)(`polyline`,{points:`15 18 9 12 15 6`})}),pe=e=>(0,x.jsx)(T,{...e,children:(0,x.jsx)(`polygon`,{points:`5 3 19 12 5 21 5 3`})}),me=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`rect`,{x:`6`,y:`4`,width:`4`,height:`16`}),(0,x.jsx)(`rect`,{x:`14`,y:`4`,width:`4`,height:`16`})]}),he=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`polyline`,{points:`3 6 5 6 21 6`}),(0,x.jsx)(`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`})]}),ge=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`polyline`,{points:`23 4 23 10 17 10`}),(0,x.jsx)(`polyline`,{points:`1 20 1 14 7 14`}),(0,x.jsx)(`path`,{d:`M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15`})]}),_e=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,x.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),ve=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`path`,{d:`M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8Z`}),(0,x.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]}),k=e=>(0,x.jsx)(T,{...e,children:(0,x.jsx)(`polygon`,{points:`13 2 3 14 12 14 11 22 21 10 12 10 13 2`})}),ye=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,x.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})]}),be=e=>(0,x.jsx)(T,{...e,children:(0,x.jsx)(`polyline`,{points:`20 6 9 17 4 12`})}),A=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`}),(0,x.jsx)(`polyline`,{points:`12 5 19 12 12 19`})]}),xe=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`}),(0,x.jsx)(`path`,{d:`M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1`})]}),Se=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`line`,{x1:`3`,y1:`6`,x2:`21`,y2:`6`}),(0,x.jsx)(`line`,{x1:`3`,y1:`12`,x2:`21`,y2:`12`}),(0,x.jsx)(`line`,{x1:`3`,y1:`18`,x2:`21`,y2:`18`})]}),Ce=class extends Error{status;constructor(e,t){super(e),this.status=t,this.name=`ApiError`}};async function j(e,t,n=!0){let r=await fetch(g()+e,{...t,headers:{"Content-Type":`application/json`,...v(),...t?.headers}});if(!r.ok){let e=`HTTP ${r.status}`;try{let t=await r.json();t?.error&&(e=t.error)}catch{}throw new Ce(e,r.status)}if(r.status===204)return;let i=await r.json();if(n&&i&&typeof i==`object`&&i.ok===!1){let e=i.error;throw new Ce(e??`Operation failed`,r.status)}return i}var M=e=>encodeURIComponent(e),N=(e,t)=>j(e,{method:`POST`,body:t?JSON.stringify(t):void 0}),we=(e,t)=>j(e,{method:`PUT`,body:t?JSON.stringify(t):void 0}),P=e=>j(e,{method:`DELETE`}),F={overview:()=>j(`/dashboard`),queues:(e=200,t=0)=>j(`/dashboard/queues?limit=${e}&offset=${t}`),queueDetail:(e,t=!0)=>j(`/dashboard/queues/${M(e)}?includeJobs=${t}`),stats:()=>j(`/stats`),storage:()=>j(`/storage`,void 0,!1),health:()=>j(`/health`,void 0,!1),jobsList:(e,t={})=>{let n=new URLSearchParams;return t.states?.length&&n.set(`states`,t.states.join(`,`)),n.set(`limit`,String(t.limit??50)),n.set(`offset`,String(t.offset??0)),j(`/queues/${M(e)}/jobs/list?${n.toString()}`)},job:e=>j(`/jobs/${M(e)}`),cancelJob:e=>P(`/jobs/${M(e)}`),promoteJob:e=>N(`/jobs/${M(e)}/promote`),retryJob:e=>N(`/jobs/${M(e)}/move-to-wait`),pause:e=>N(`/queues/${M(e)}/pause`),resume:e=>N(`/queues/${M(e)}/resume`),drain:e=>N(`/queues/${M(e)}/drain`),obliterate:e=>N(`/queues/${M(e)}/obliterate`),clean:(e,t=0,n=1e3)=>N(`/queues/${M(e)}/clean`,{grace:t,limit:n}),retryCompleted:e=>N(`/queues/${M(e)}/retry-completed`),setRateLimit:(e,t)=>we(`/queues/${M(e)}/rate-limit`,{limit:t}),clearRateLimit:e=>P(`/queues/${M(e)}/rate-limit`),setConcurrency:(e,t)=>we(`/queues/${M(e)}/concurrency`,{concurrency:t}),clearConcurrency:e=>P(`/queues/${M(e)}/concurrency`),dlq:(e,t=50,n=0)=>j(`/queues/${M(e)}/dlq?limit=${t}&offset=${n}`),dlqStats:e=>j(`/queues/${M(e)}/dlq/stats`),retryDlq:e=>N(`/queues/${M(e)}/dlq/retry`),purgeDlq:e=>N(`/queues/${M(e)}/dlq/purge`),crons:()=>j(`/crons`),deleteCron:e=>P(`/crons/${M(e)}`),workers:()=>j(`/workers`),eventsUrl:e=>g()+(e?`/events/queues/${M(e)}`:`/events`)};function Te(e){let t=!0;return()=>t?(t=!1,!0):!e()}function I(e,t=[],n={}){let r=_(e=>e.refreshMs),i=n.intervalMs??r,[a,o]=(0,b.useState)(null),[s,c]=(0,b.useState)(null),[l,u]=(0,b.useState)(!0),d=(0,b.useRef)(e);d.current=e;let f=(0,b.useRef)(!0),p=(0,b.useRef)(0),m=(0,b.useRef)(void 0),h=(0,b.useRef)(!0),g=(0,b.useRef)(!1),v=(0,b.useCallback)(async()=>{let e=++p.current;try{let t=await d.current();if(!f.current||e!==p.current)return;let n;try{n=JSON.stringify(t)}catch{n=String(Math.random())}n!==m.current&&(m.current=n,o(t)),g.current&&(g.current=!1,c(null))}catch(t){if(!f.current||e!==p.current)return;g.current=!0,c(t)}finally{f.current&&e===p.current&&h.current&&(h.current=!1,u(!1))}},[]);return(0,b.useEffect)(()=>{f.current=!0,m.current=void 0,h.current=!0,u(!0),g.current&&(g.current=!1,c(null));let e=null,t=!1,n=()=>typeof document<`u`&&document.hidden,r=Te(n),a=async()=>{t||(r()&&await v(),!t&&(e=setTimeout(a,i)))};a();let o=()=>{!n()&&!t&&v()};return typeof document<`u`&&document.addEventListener(`visibilitychange`,o),()=>{t=!0,f.current=!1,e&&clearTimeout(e),typeof document<`u`&&document.removeEventListener(`visibilitychange`,o)}},[i,v,...t]),{data:a,error:s,loading:l,refreshing:l,refetch:v}}function Ee(){let e=_(e=>e.baseUrl),t=e===`/api`?`localhost:6790`:e.replace(/^https?:\/\//,``);return(0,x.jsxs)(`div`,{className:`mx-3 mb-3 flex items-center gap-2.5 rounded-lg border border-line bg-surface px-3 py-2`,children:[(0,x.jsx)(`span`,{className:`flex size-7 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-accent to-fuchsia-600 text-[11px] font-bold text-white`,children:`bq`}),(0,x.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,x.jsx)(`div`,{className:`truncate text-xs font-medium text-fg`,children:`bunqueue`}),(0,x.jsx)(`div`,{className:`truncate font-mono text-[10px] text-faint`,title:e,children:t})]}),(0,x.jsx)(d,{to:`/settings`,"aria-label":`Settings`,className:`text-faint transition-colors hover:text-fg`,children:(0,x.jsx)(le,{className:`size-4`})})]})}var De=[{section:null,items:[{to:`/`,label:`Overview`,icon:te,end:!0}]},{section:`Queues`,items:[{to:`/queues`,label:`Queues`,icon:E},{to:`/jobs`,label:`Jobs`,icon:ne},{to:`/dlq`,label:`Dead Letter Queue`,icon:D},{to:`/cron`,label:`Cron Jobs`,icon:re},{to:`/flows`,label:`Flows`,icon:A}]},{section:`Monitoring`,items:[{to:`/metrics`,label:`Metrics`,icon:ie},{to:`/workers`,label:`Workers`,icon:O},{to:`/logs`,label:`Logs`,icon:ae}]},{section:`Control`,items:[{to:`/server`,label:`Server`,icon:O},{to:`/add-job`,label:`Add Job`,icon:ne},{to:`/job`,label:`Job Inspector`,icon:ve},{to:`/queue-control`,label:`Queue Control`,icon:E},{to:`/dlq-control`,label:`DLQ Control`,icon:D},{to:`/webhooks`,label:`Webhooks`,icon:k},{to:`/diagnostics`,label:`Diagnostics`,icon:ie},{to:`/benchmark`,label:`Benchmark`,icon:k}]},{section:`Management`,items:[{to:`/database`,label:`Database`,icon:ce},{to:`/mcp`,label:`MCP`,icon:k},{to:`/usage`,label:`Usage`,icon:oe},{to:`/s3`,label:`S3 Backup`,icon:se},{to:`/settings`,label:`Settings`,icon:le}]}];function Oe(){let e=_(e=>e.baseUrl),{data:n,error:r,loading:i}=I(async()=>({ok:(await F.health()).ok}),[],{intervalMs:15e3}),a=!r&&n!=null&&n.ok!==!1,o=e.replace(/^https?:\/\//,``)||`local`;return(0,x.jsxs)(`div`,{className:`mx-3 mb-4 flex items-center gap-2 rounded-lg border border-line bg-surface px-3 py-1.5`,children:[(0,x.jsx)(`span`,{className:t(`size-1.5 rounded-full`,i?`bg-zinc-500`:a?`bg-emerald-400`:`bg-red-400`),title:i?`connecting`:a?`connected`:`offline`}),(0,x.jsx)(`span`,{className:`truncate font-mono text-[11px] text-muted`,title:e,children:o}),(0,x.jsx)(`span`,{className:`sr-only`,children:i?`connecting`:a?`connected`:`offline`})]})}function ke(){let e=w(e=>e.theme),t=w(e=>e.toggle),n=e===`dark`;return(0,x.jsxs)(`button`,{type:`button`,onClick:t,className:`mx-3 mb-3 flex items-center gap-3 rounded-lg px-3 py-2 text-sm text-muted transition-colors hover:bg-surface-2 hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50`,children:[n?(0,x.jsx)(ue,{className:`size-4`}):(0,x.jsx)(de,{className:`size-4`}),n?`Light Mode`:`Dark Mode`]})}function Ae({open:e=!1,onClose:n}){return(0,x.jsxs)(x.Fragment,{children:[e&&(0,x.jsx)(`button`,{type:`button`,"aria-label":`Close navigation`,onClick:n,className:`fixed inset-0 z-40 bg-black/50 lg:hidden`}),(0,x.jsxs)(`aside`,{className:t(`flex w-60 shrink-0 flex-col border-r border-line bg-sidebar`,`fixed inset-y-0 left-0 z-50 transition-[transform,visibility] lg:static lg:z-auto lg:translate-x-0`,e?`translate-x-0`:`-translate-x-full lg:translate-x-0 invisible lg:visible`),children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-2 px-5 py-5`,children:[(0,x.jsx)(`span`,{className:`text-lg font-bold tracking-tight text-fg`,children:`bunqueue`}),(0,x.jsx)(`span`,{className:`rounded-md bg-accent/15 px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-accent`,children:`dash`}),(0,x.jsx)(`span`,{title:`Beta — under active development`,className:`rounded-md bg-amber-500/15 px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-warning`,children:`beta`})]}),(0,x.jsx)(`nav`,{className:`flex-1 overflow-y-auto px-3 pb-4`,children:De.map(e=>(0,x.jsxs)(`div`,{className:`mb-4`,children:[e.section&&(0,x.jsx)(`div`,{className:`px-2 pb-2 pt-1 text-[10px] font-semibold uppercase tracking-wider text-faint`,children:e.section}),(0,x.jsx)(`div`,{className:`flex flex-col gap-0.5`,children:e.items.map(({to:e,label:n,icon:r,end:i})=>(0,x.jsx)(a,{to:e,end:i,className:({isActive:e})=>t(`group relative flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50`,e?`bg-surface-2 text-fg`:`text-muted hover:bg-surface-2/60 hover:text-fg`),children:({isActive:e})=>(0,x.jsxs)(x.Fragment,{children:[e&&(0,x.jsx)(`span`,{className:`absolute inset-y-1.5 left-0 w-0.5 rounded-full bg-accent`}),(0,x.jsx)(r,{className:`size-[18px] shrink-0`}),(0,x.jsx)(`span`,{className:`truncate`,children:n})]})},e))})]},e.section??`root`))}),(0,x.jsx)(Oe,{}),(0,x.jsx)(ke,{}),(0,x.jsx)(Ee,{})]})]})}var je=`https://egeominotti.github.io/bunqueue-dashboard/docs/`;function Me(){let[e,t]=(0,b.useState)(!1),[n,r]=(0,b.useState)(``),[i,a]=(0,b.useState)(0),s=o(),c=w(e=>e.toggle),l=(0,b.useRef)(null),u=(0,b.useRef)(null),d=(0,b.useMemo)(()=>{let e=De.flatMap(e=>e.items.map(t=>({id:`nav:${t.to}`,label:t.label,hint:e.section??`Home`,run:()=>s(t.to)}))),t=[{id:`act:theme`,label:`Toggle theme (dark / light)`,hint:`Action`,run:c},{id:`act:docs`,label:`Open documentation`,hint:`Action`,run:()=>window.open(je,`_blank`,`noopener`)}];return[...e,...t]},[s,c]),f=(0,b.useMemo)(()=>{let e=n.trim().toLowerCase();return e?d.filter(t=>`${t.label} ${t.hint}`.toLowerCase().includes(e)):d},[d,n]);(0,b.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),t(e=>!e))},n=()=>t(!0);return window.addEventListener(`keydown`,e),window.addEventListener(`command-palette:open`,n),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`command-palette:open`,n)}},[]),(0,b.useEffect)(()=>{if(!e)return;let t=document.activeElement;r(``),a(0);let n=requestAnimationFrame(()=>l.current?.focus());return()=>{cancelAnimationFrame(n),t?.focus?.()}},[e]),(0,b.useEffect)(()=>{u.current?.querySelector(`[data-idx="${i}"]`)?.scrollIntoView({block:`nearest`})},[i]);let p=(0,b.useCallback)(()=>t(!1),[]),m=(0,b.useCallback)(e=>{e&&(e.run(),t(!1))},[]);return e?(0,x.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center p-4 pt-[12vh]`,children:[(0,x.jsx)(`button`,{type:`button`,"aria-label":`Close command palette`,onClick:p,className:`fixed inset-0 bg-black/50`}),(0,x.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":`Command palette`,className:`relative z-10 w-full max-w-lg overflow-hidden rounded-xl border border-line-strong bg-surface shadow-2xl`,children:[(0,x.jsx)(`input`,{ref:l,value:n,onChange:e=>{r(e.target.value),a(0)},onKeyDown:e=>{e.key===`Escape`?(e.preventDefault(),p()):e.key===`ArrowDown`?(e.preventDefault(),a(e=>Math.min(e+1,f.length-1))):e.key===`ArrowUp`?(e.preventDefault(),a(e=>Math.max(e-1,0))):e.key===`Enter`&&(e.preventDefault(),m(f[i]))},placeholder:`Search pages and actions…`,"aria-label":`Search pages and actions`,className:`w-full border-b border-line bg-transparent px-4 py-3 text-sm text-fg outline-none placeholder:text-faint`}),(0,x.jsxs)(`ul`,{ref:u,className:`max-h-80 overflow-y-auto py-2`,"aria-label":`Results`,children:[f.length===0&&(0,x.jsx)(`li`,{className:`px-4 py-6 text-center text-sm text-faint`,children:`No matches`}),f.map((e,t)=>(0,x.jsx)(`li`,{children:(0,x.jsxs)(`button`,{type:`button`,"data-idx":t,onMouseEnter:()=>a(t),onClick:()=>m(e),className:`flex w-full items-center justify-between gap-3 px-4 py-2 text-left text-sm transition-colors ${t===i?`bg-accent/15 text-fg`:`text-muted`}`,children:[(0,x.jsx)(`span`,{className:`truncate`,children:e.label}),(0,x.jsx)(`span`,{className:`shrink-0 text-xs text-faint`,children:e.hint})]})},e.id))]}),(0,x.jsxs)(`div`,{className:`flex items-center justify-between border-t border-line px-4 py-2 text-xs text-faint`,children:[(0,x.jsx)(`span`,{children:`↑↓ navigate · ↵ open · esc close`}),(0,x.jsx)(`span`,{className:`font-mono`,children:`⌘K`})]})]})]}):null}var L=()=>typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():`${Date.now()}`,R=new Map,z=(e,t,n)=>e.map(e=>e.id===t?n(e):e);function Ne(e){return{config:{provider:e.config.provider,baseURL:e.config.baseURL,model:e.config.model}}}var B=m()(h(e=>({open:!1,config:{provider:`anthropic`,baseURL:``,model:`claude-opus-4-8`,apiKey:``},messages:[],pending:[],busy:!1,setOpen:t=>e({open:t}),toggle:()=>e(e=>({open:!e.open})),setConfig:t=>e(e=>({config:{...e.config,...t}})),clear:()=>{for(let e of R.values())e(!1);R.clear(),e({messages:[],pending:[]})},cancelPending:()=>{for(let e of R.values())e(!1);R.clear(),e({pending:[]})},setBusy:t=>e({busy:t}),addUser:t=>e(e=>({messages:[...e.messages,{id:L(),role:`user`,content:t}]})),startAssistant:()=>{let t=L();return e(e=>({messages:[...e.messages,{id:t,role:`assistant`,content:``,tools:[]}]})),t},appendAssistant:(t,n)=>e(e=>({messages:z(e.messages,t,e=>({...e,content:e.content+n}))})),finishAssistant:(t,n)=>e(e=>({messages:z(e.messages,t,e=>({...e,error:!!n?.error,content:n?.error?e.content||n.error:e.content}))})),addTool:(t,n)=>e(e=>({messages:z(e.messages,t,e=>({...e,tools:[...e.tools??[],n]}))})),updateTool:(t,n,r)=>e(e=>({messages:z(e.messages,t,e=>({...e,tools:(e.tools??[]).map(e=>e.id===n?{...e,...r}:e)}))})),requestConfirm:t=>new Promise(n=>{let r=L();R.set(r,n),e(e=>({pending:[...e.pending,{...t,id:r}]}))}),resolveConfirm:(t,n)=>{let r=R.get(t);r&&(R.delete(t),r(n)),e(e=>({pending:e.pending.filter(e=>e.id!==t)}))}}),{name:`bq-dash-copilot`,partialize:e=>Ne(e),merge:(e,t)=>{let n=e??{};return{...t,config:{...t.config,...n.config??{},apiKey:``}}}})),Pe=(0,b.lazy)(()=>i(()=>import(`./CopilotPanel-fr19SCy4.js`).then(e=>({default:e.CopilotPanel})),__vite__mapDeps([0,1,2,3])));function Fe({className:e}){return(0,x.jsxs)(`svg`,{className:e,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:[(0,x.jsx)(`path`,{d:`M12 3l1.9 4.6L18.5 9.5 13.9 11.4 12 16l-1.9-4.6L5.5 9.5l4.6-1.9L12 3z`,fill:`currentColor`}),(0,x.jsx)(`path`,{d:`M19 14l.8 2 2 .8-2 .8-.8 2-.8-2-2-.8 2-.8.8-2z`,fill:`currentColor`,opacity:`0.7`})]})}function Ie(){let e=B(e=>e.open),t=B(e=>e.setOpen);return(0,x.jsxs)(x.Fragment,{children:[!e&&(0,x.jsxs)(`button`,{type:`button`,onClick:()=>t(!0),className:`fixed bottom-5 right-5 z-40 flex items-center gap-2 rounded-full border border-line bg-surface px-4 py-2.5 text-sm font-medium text-fg shadow-lg transition-colors hover:border-accent/50 hover:text-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50`,"aria-label":`Open Copilot`,children:[(0,x.jsx)(Fe,{className:`size-4 text-accent`}),`Copilot`,(0,x.jsx)(`span`,{className:`rounded bg-accent/15 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-accent`,children:`beta`})]}),e&&(0,x.jsx)(b.Suspense,{fallback:(0,x.jsx)(`div`,{className:`fixed inset-y-0 right-0 z-[60] flex w-full max-w-md items-center justify-center border-l border-line bg-surface text-sm text-muted`,children:`Loading Copilot…`}),children:(0,x.jsx)(Pe,{})})]})}var Le={default:`border border-line bg-surface-2 text-fg hover:bg-surface-2/70 hover:border-line-strong`,ghost:`text-muted hover:text-fg hover:bg-surface-2`,accent:`bg-accent text-accent-fg hover:opacity-90 border border-transparent`,danger:`border border-red-500/30 text-danger hover:bg-red-500/10 hover:border-red-500/50`,warning:`border border-amber-500/30 text-warning hover:bg-amber-500/10 hover:border-amber-500/50`,success:`bg-emerald-500 text-white hover:bg-emerald-500/90 border border-transparent`},Re={sm:`h-8 px-3 text-xs gap-1.5`,md:`h-9 px-4 text-sm gap-2`};function ze({children:e,variant:n=`default`,size:r=`md`,className:i,...a}){return(0,x.jsx)(`button`,{type:`button`,className:t(`inline-flex items-center justify-center rounded-lg font-medium transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50`,`disabled:cursor-not-allowed disabled:opacity-50`,Le[n],Re[r],i),...a,children:e})}function Be({children:e,className:n,variant:r=`ghost`,...i}){return(0,x.jsx)(`button`,{type:`button`,className:t(`inline-flex size-8 items-center justify-center rounded-lg transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50`,`disabled:cursor-not-allowed disabled:opacity-50`,Le[r],n),...i,children:e})}function V({children:e,className:n,padded:r=!0}){return(0,x.jsx)(`div`,{className:t(`rounded-xl border border-line bg-surface`,r&&`p-5`,n),children:e})}function Ve({title:e,action:t,icon:n}){return(0,x.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-3`,children:[(0,x.jsxs)(`h3`,{className:`flex items-center gap-2 text-base font-semibold text-fg`,children:[n,e]}),t]})}function He({className:e}){return(0,x.jsx)(`span`,{className:t(`inline-block size-4 animate-spin rounded-full border-2 border-current border-t-transparent`,e),role:`status`,"aria-label":`Loading`})}function Ue({label:e=`Loading…`}){return(0,x.jsxs)(`div`,{className:`flex items-center justify-center gap-3 py-16 text-sm text-muted`,children:[(0,x.jsx)(He,{}),e]})}function We({icon:e,title:t,hint:n,action:r}){return(0,x.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-line py-14 text-center`,children:[e&&(0,x.jsx)(`div`,{className:`text-faint [&>svg]:size-8`,children:e}),(0,x.jsx)(`div`,{className:`text-sm font-medium text-fg`,children:t}),n&&(0,x.jsx)(`div`,{className:`max-w-sm text-xs text-faint`,children:n}),r&&(0,x.jsx)(`div`,{className:`mt-2`,children:r})]})}function Ge({onRetry:e,message:t=`Not connected to the bunqueue server — showing empty data.`}){return(0,x.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-3 rounded-lg border border-amber-500/25 bg-amber-500/[0.06] px-4 py-2.5 text-sm`,children:[(0,x.jsx)(`span`,{className:`size-2 shrink-0 rounded-full bg-amber-400`,"aria-hidden":`true`}),(0,x.jsx)(`span`,{className:`text-amber-300/90 light:text-amber-700`,children:t}),e&&(0,x.jsx)(`button`,{type:`button`,onClick:e,className:`ml-auto shrink-0 rounded-md border border-amber-500/30 px-2.5 py-1 text-xs font-medium text-amber-200 light:text-amber-700 hover:border-amber-400/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50`,children:`Retry`})]})}function Ke({error:e,onRetry:t}){return(0,x.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-3 rounded-xl border border-red-500/20 bg-red-500/5 py-14 text-center`,children:[(0,x.jsx)(`div`,{className:`text-sm font-medium text-danger`,children:`Something went wrong`}),(0,x.jsx)(`div`,{className:`max-w-md text-xs text-faint`,children:e.message}),t&&(0,x.jsx)(`button`,{type:`button`,onClick:t,className:`mt-1 rounded-lg border border-line bg-surface-2 px-3 py-1.5 text-xs font-medium text-fg hover:border-line-strong`,children:`Retry`})]})}var qe=class extends b.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error(`ErrorBoundary caught an error`,e,t.componentStack)}componentDidUpdate(e){this.state.error&&e.resetKey!==this.props.resetKey&&this.setState({error:null})}render(){let{error:e}=this.state;return e?(0,x.jsx)(`div`,{className:`flex min-h-screen items-center justify-center p-6`,children:(0,x.jsxs)(V,{className:`w-full max-w-lg`,children:[(0,x.jsx)(Ke,{error:e}),(0,x.jsx)(`div`,{className:`mt-4 flex justify-center`,children:(0,x.jsx)(ze,{onClick:()=>window.location.reload(),children:`Reload`})})]})}):this.props.children}};function H(){if(typeof window>`u`)return!1;let{search:e,hash:t}=window.location;return new URLSearchParams(e).has(`demo`)||t.replace(/^#/,``)===`demo`}var Je=H(),U={"/":`Overview`,"/queues":`Queues`,"/jobs":`Jobs`,"/dlq":`Dead Letter Queue`,"/cron":`Cron Jobs`,"/flows":`Flows`,"/metrics":`Metrics`,"/workers":`Workers`,"/logs":`Logs`,"/server":`Server`,"/add-job":`Add Job`,"/job":`Job Inspector`,"/queue-control":`Queue Control`,"/cron-manager":`Cron Manager`,"/dlq-control":`DLQ Control`,"/webhooks":`Webhooks`,"/diagnostics":`Diagnostics`,"/benchmark":`Benchmark`,"/database":`Database`,"/mcp":`MCP`,"/usage":`Usage`,"/s3":`S3 Backup`,"/settings":`Settings`,"/overview-classic":`Overview (classic)`,"/queues-classic":`Queues (classic)`,"/jobs-classic":`Jobs (classic)`,"/dlq-classic":`DLQ (classic)`,"/metrics-classic":`Metrics (classic)`,"/logs-classic":`Logs (classic)`,"/s3-classic":`S3 Backup (classic)`};function Ye(e){if(U[e])return U[e];if(e.startsWith(`/queues/`)){let t=e.slice(8);try{t=decodeURIComponent(t)}catch{}return`${t} · Queue`}return`bunqueue`}function Xe({onMenu:e}){let{pathname:t}=r();return(0,x.jsxs)(`header`,{className:`sticky top-0 z-10 flex h-14 items-center justify-between gap-3 border-b border-line bg-bg/80 px-4 backdrop-blur sm:px-6 lg:px-8`,children:[(0,x.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,x.jsx)(`button`,{type:`button`,"aria-label":`Open navigation`,onClick:e,className:`-ml-1 flex size-9 shrink-0 items-center justify-center rounded-lg text-muted hover:bg-surface-2 hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50 lg:hidden`,children:(0,x.jsx)(Se,{className:`size-5`})}),(0,x.jsxs)(`div`,{className:`truncate text-sm text-muted`,children:[(0,x.jsx)(`span`,{className:`text-faint`,children:Ye(t)}),(0,x.jsx)(`span`,{className:`mx-2 hidden text-faint sm:inline`,children:`·`}),(0,x.jsx)(`span`,{className:`hidden text-faint sm:inline`,children:`bunqueue`})]})]}),(0,x.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[Je&&(0,x.jsxs)(`span`,{title:`Showing canned sample data. No real bunqueue server is connected.`,className:`hidden items-center gap-1.5 rounded-full border border-accent/40 bg-accent/10 px-2.5 py-1 text-xs font-medium text-accent sm:inline-flex`,children:[(0,x.jsx)(`span`,{className:`size-1.5 rounded-full bg-accent`}),`Live demo`]}),(0,x.jsxs)(`button`,{type:`button`,onClick:()=>window.dispatchEvent(new Event(`command-palette:open`)),title:`Command palette (⌘K)`,"aria-label":`Open command palette`,className:`hidden items-center gap-2 rounded-lg border border-line px-2.5 py-1.5 text-xs text-muted hover:bg-surface-2 hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50 sm:flex`,children:[(0,x.jsx)(`span`,{children:`Search`}),(0,x.jsx)(`kbd`,{className:`rounded border border-line bg-surface-2 px-1 font-mono text-[10px]`,children:`⌘K`})]}),(0,x.jsx)(d,{to:`/settings`,title:`Settings`,"aria-label":`Open settings`,className:`flex size-8 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-accent to-fuchsia-600 text-xs font-bold text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50`,children:`bq`})]})]})}function Ze(){let[e,t]=(0,b.useState)(!1),{pathname:i,key:a}=r();return(0,b.useEffect)(()=>t(!1),[i]),(0,b.useEffect)(()=>{if(!e)return;let n=e=>{e.key===`Escape`&&t(!1)};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e]),(0,x.jsx)(qe,{children:(0,x.jsxs)(`div`,{className:`flex h-screen overflow-hidden bg-bg text-fg`,children:[(0,x.jsx)(`a`,{href:`#main`,className:`sr-only rounded-md bg-accent px-3 py-2 text-sm font-medium text-accent-fg shadow-lg focus:not-sr-only focus:absolute focus:left-4 focus:top-3 focus:z-50`,children:`Skip to content`}),(0,x.jsx)(Ae,{open:e,onClose:()=>t(!1)}),(0,x.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,x.jsx)(Xe,{onMenu:()=>t(!0)}),(0,x.jsx)(`main`,{id:`main`,tabIndex:-1,className:`flex-1 overflow-y-auto px-4 py-5 outline-none sm:px-6 lg:px-8 lg:py-6`,children:(0,x.jsx)(b.Suspense,{fallback:(0,x.jsx)(`div`,{className:`p-2 text-sm text-muted`,children:`Loading…`}),children:(0,x.jsx)(qe,{resetKey:a,children:(0,x.jsx)(n,{})})})})]}),(0,x.jsx)(Me,{}),(0,x.jsx)(S,{}),(0,x.jsx)(Ie,{})]})})}var Qe={completed:`text-success bg-emerald-500/10`,active:`text-blue-400 light:text-blue-700 bg-blue-500/10`,failed:`text-danger bg-red-500/10`,waiting:`text-zinc-400 light:text-zinc-600 bg-zinc-500/10`,prioritized:`text-violet-400 light:text-violet-700 bg-violet-500/10`,delayed:`text-warning bg-amber-500/10`,paused:`text-orange-400 light:text-orange-700 bg-orange-500/10`,"waiting-children":`text-cyan-400 light:text-cyan-700 bg-cyan-500/10`,stalled:`text-orange-400 light:text-orange-700 bg-orange-500/10`,enqueued:`text-zinc-400 light:text-zinc-600 bg-zinc-500/10`,started:`text-blue-400 light:text-blue-700 bg-blue-500/10`,finished:`text-success bg-emerald-500/10`,retry:`text-warning bg-amber-500/10`,cancelled:`text-zinc-400 light:text-zinc-600 bg-zinc-500/10`,default:`text-zinc-400 light:text-zinc-600 bg-zinc-500/10`};function $e({status:e}){return(0,x.jsxs)(`span`,{className:t(`inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium capitalize`,Qe[(e||``).toLowerCase()]??Qe.default),children:[(0,x.jsx)(`span`,{className:`size-1.5 rounded-full bg-current`}),e||`unknown`]})}function et({label:e,tone:n=`green`}){return(0,x.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-xs font-medium text-muted`,children:[(0,x.jsx)(`span`,{className:t(`size-1.5 rounded-full`,n===`green`?`bg-emerald-400`:n===`amber`?`bg-amber-400`:n===`red`?`bg-red-400`:`bg-zinc-400`)}),e]})}function tt({title:e,description:t,live:n,actions:r,back:i}){return(0,x.jsxs)(`div`,{className:`mb-6 flex flex-wrap items-start justify-between gap-4`,children:[(0,x.jsxs)(`div`,{className:`flex items-start gap-3`,children:[i,(0,x.jsxs)(`div`,{children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,x.jsx)(`h1`,{className:`text-2xl font-bold tracking-tight text-fg`,children:e}),n&&(0,x.jsx)(et,{label:`Live`,tone:`green`})]}),t&&(0,x.jsx)(`p`,{className:`mt-1 text-sm text-muted`,children:t})]})]}),r&&(0,x.jsx)(`div`,{className:`flex flex-wrap items-center gap-2`,children:r})]})}var nt={default:`text-fg`,green:`text-success`,red:`text-danger`,blue:`text-blue-400`,amber:`text-warning`,accent:`text-accent`};function W({label:e,value:n,tone:r=`default`,hint:i,compact:a}){return(0,x.jsxs)(`div`,{className:t(`rounded-xl border border-line bg-surface`,a?`px-4 py-3`:`px-5 py-4`),children:[(0,x.jsx)(`div`,{className:`text-[11px] font-medium uppercase tracking-wider text-faint`,children:e}),(0,x.jsx)(`div`,{className:t(`mt-2 font-semibold tnum`,a?`text-xl`:`text-3xl`,nt[r]),children:n}),i!=null&&(0,x.jsx)(`div`,{className:`mt-1 text-xs text-faint`,children:i})]})}var G=class extends Error{status;constructor(e,t){super(e),this.status=t,this.name=`BqError`}};async function rt(e,t,n,r,i=!0){let a=await fetch(e+t,{...r,headers:{"Content-Type":`application/json`,...n,...r?.headers}});if(!a.ok){let e=`HTTP ${a.status}`;try{let t=await a.json();t?.error&&(e=t.error)}catch{}throw a.status===401&&typeof window<`u`&&window.dispatchEvent(new Event(`auth:required`)),new G(e,a.status)}if(a.status===204)return;let o=await a.text();if(!o)return;let s;try{s=JSON.parse(o)}catch{throw new G(`Invalid JSON response (HTTP ${a.status})`,a.status)}if(i&&s&&typeof s==`object`&&s.ok===!1){let e=s.error;throw new G(e??`Operation failed`,a.status)}return s}var K=(e,t,n=!0)=>rt(g(),e,v(),t,n),it=`http://localhost:6800`.replace(/\/$/,``),q=(e,t)=>rt(it,e,{},t),J=e=>encodeURIComponent(e),Y=(e,t)=>({method:e,body:t===void 0?void 0:JSON.stringify(t)}),at=[`job.pushed`,`job.started`,`job.completed`,`job.failed`,`job.progress`],X={overview:()=>K(`/dashboard`),queues:(e=500,t=0)=>K(`/dashboard/queues?limit=${e}&offset=${t}`),queuesSummary:()=>K(`/queues/summary`),queueDetail:(e,t=!0)=>K(`/dashboard/queues/${J(e)}?includeJobs=${t}`),stats:()=>K(`/stats`),storage:()=>K(`/storage`),health:()=>K(`/health`,void 0,!1),ping:()=>K(`/ping`),jobsList:(e,t,n=50,r=0)=>{let i=new URLSearchParams;return t?.length&&i.set(`states`,t.join(`,`)),i.set(`limit`,String(n)),i.set(`offset`,String(r)),K(`/queues/${J(e)}/jobs/list?${i}`)},job:e=>K(`/jobs/${J(e)}`),jobByCustomId:e=>K(`/jobs/custom/${J(e)}`),jobResult:e=>K(`/jobs/${J(e)}/result`),jobLogs:e=>K(`/jobs/${J(e)}/logs`),jobChildren:e=>K(`/jobs/${J(e)}/children`),addJob:(e,t)=>K(`/queues/${J(e)}/jobs`,Y(`POST`,t)),addJobsBulk:(e,t)=>K(`/queues/${J(e)}/jobs/bulk`,Y(`POST`,{jobs:t})),pullBatch:(e,t)=>K(`/queues/${J(e)}/jobs/pull-batch`,Y(`POST`,{count:t})),ackBatch:e=>K(`/jobs/ack-batch`,Y(`POST`,{ids:e})),cancelJob:e=>K(`/jobs/${J(e)}`,{method:`DELETE`}),promoteJob:e=>K(`/jobs/${J(e)}/promote`,Y(`POST`)),discardJob:e=>K(`/jobs/${J(e)}/discard`,Y(`POST`)),retryJob:e=>K(`/jobs/${J(e)}/move-to-wait`,Y(`POST`)),failJob:(e,t)=>K(`/jobs/${J(e)}/fail`,Y(`POST`,{error:t})),updateJobData:(e,t)=>K(`/jobs/${J(e)}/data`,Y(`PUT`,{data:t})),changePriority:(e,t)=>K(`/jobs/${J(e)}/priority`,Y(`PUT`,{priority:t})),changeDelay:(e,t)=>K(`/jobs/${J(e)}/delay`,Y(`PUT`,{delay:t})),moveToDelayed:(e,t)=>K(`/jobs/${J(e)}/move-to-delayed`,Y(`POST`,{delay:t})),addJobLog:(e,t,n)=>K(`/jobs/${J(e)}/logs`,Y(`POST`,{message:t,level:n})),clearJobLogs:e=>K(`/jobs/${J(e)}/logs`,{method:`DELETE`}),counts:e=>K(`/queues/${J(e)}/counts`),pause:e=>K(`/queues/${J(e)}/pause`,Y(`POST`)),resume:e=>K(`/queues/${J(e)}/resume`,Y(`POST`)),drain:e=>K(`/queues/${J(e)}/drain`,Y(`POST`)),obliterate:e=>K(`/queues/${J(e)}/obliterate`,Y(`POST`)),clean:(e,t={})=>K(`/queues/${J(e)}/clean`,Y(`POST`,t)),promoteJobs:(e,t)=>K(`/queues/${J(e)}/promote-jobs`,Y(`POST`,t==null?void 0:{count:t})),retryCompleted:(e,t)=>K(`/queues/${J(e)}/retry-completed`,Y(`POST`,t?{id:t}:void 0)),setRateLimit:(e,t)=>K(`/queues/${J(e)}/rate-limit`,Y(`PUT`,{limit:t})),clearRateLimit:e=>K(`/queues/${J(e)}/rate-limit`,{method:`DELETE`}),setConcurrency:(e,t)=>K(`/queues/${J(e)}/concurrency`,Y(`PUT`,{concurrency:t})),clearConcurrency:e=>K(`/queues/${J(e)}/concurrency`,{method:`DELETE`}),getStallConfig:e=>K(`/queues/${J(e)}/stall-config`),setStallConfig:(e,t)=>K(`/queues/${J(e)}/stall-config`,Y(`PUT`,{config:t})),getDlqConfig:e=>K(`/queues/${J(e)}/dlq-config`),setDlqConfig:(e,t)=>K(`/queues/${J(e)}/dlq-config`,Y(`PUT`,{config:t})),dlq:(e,t=100,n=0)=>K(`/queues/${J(e)}/dlq?limit=${t}&offset=${n}`),dlqStats:e=>K(`/queues/${J(e)}/dlq/stats`),retryDlq:(e,t)=>K(`/queues/${J(e)}/dlq/retry`,Y(`POST`,t?{jobId:t}:void 0)),purgeDlq:e=>K(`/queues/${J(e)}/dlq/purge`,Y(`POST`)),crons:()=>K(`/crons`),createCron:e=>K(`/crons`,Y(`POST`,e)),deleteCron:e=>K(`/crons/${J(e)}`,{method:`DELETE`}),webhooks:()=>K(`/webhooks`),addWebhook:e=>K(`/webhooks`,Y(`POST`,e)),removeWebhook:e=>K(`/webhooks/${J(e)}`,{method:`DELETE`}),setWebhookEnabled:(e,t)=>K(`/webhooks/${J(e)}/enabled`,Y(`PUT`,{enabled:t})),workers:()=>K(`/workers`),unregisterWorker:e=>K(`/workers/${J(e)}`,{method:`DELETE`}),eventsUrl:e=>g()+(e?`/events/queues/${J(e)}`:`/events`),db:{info:()=>q(`/db/info`),tables:()=>q(`/db/tables`),schema:e=>q(`/db/tables/${J(e)}/schema`),rows:(e,t=50,n=0,r,i=`asc`,a)=>q(`/db/tables/${J(e)}?limit=${t}&offset=${n}`+(r?`&orderBy=${J(r)}&dir=${i}`:``)+(a?.value?`&fcol=${J(a.column)}&fop=${a.op}&fval=${J(a.value)}`:``)),cell:(e,t,n)=>q(`/db/tables/${J(e)}/cell?rowid=${t}&column=${J(n)}`),query:e=>q(`/db/query`,Y(`POST`,{sql:e}))},agentBase:it,control:{status:()=>q(`/control/status`),start:()=>q(`/control/start`,{method:`POST`}),stop:()=>q(`/control/stop`,{method:`POST`}),restart:()=>q(`/control/restart`,{method:`POST`}),logs:()=>q(`/control/logs`),getConfig:()=>q(`/control/config`),setConfig:e=>q(`/control/config`,Y(`PUT`,e))}},ot=new Intl.NumberFormat(`de-DE`),st=new Intl.DateTimeFormat(`it-IT`,{day:`2-digit`,month:`2-digit`,year:`numeric`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`});function Z(e){return e==null||!Number.isFinite(e)?`0`:ot.format(e)}function ct(e,t=2){return e==null||!Number.isFinite(e)?`0%`:`${(e*100).toFixed(t)}%`}function lt(e,t){let n=e+t;return n>0?t/n:null}function ut(e){if(e==null||!Number.isFinite(e))return`—`;let t=new Date(e);return Number.isNaN(t.getTime())?`—`:st.format(t)}function dt(e,t=Date.now()){if(e==null||!Number.isFinite(e))return`—`;let n=Math.max(0,t-e),r=Math.floor(n/1e3);if(r<60)return`${r}s ago`;let i=Math.floor(r/60);if(i<60)return`${i}m ago`;let a=Math.floor(i/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}function ft(e){if(e==null||!Number.isFinite(e)||e<0)return`—`;if(e<1e3)return`${Math.round(e)}ms`;let t=e/1e3;if(t<59.95)return`${t.toFixed(1)}s`;let n=Math.round(t);return`${Math.floor(n/60)}m ${n%60}s`}function pt(e,t){if(e==null||t==null)return;let n=t-e;return n>=0?n:void 0}function mt(e){if(e==null||!Number.isFinite(e))return`—`;let t=Math.floor(e),n=Math.floor(t/86400),r=Math.floor(t%86400/3600),i=Math.floor(t%3600/60),a=[];return n&&a.push(`${n}d`),(r||n)&&a.push(`${r}h`),a.push(`${i}m`),a.join(` `)}function ht(e){return e==null||!Number.isFinite(e)?`0`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(Math.round(e))}function gt(e){return e==null||!Number.isFinite(e)?`—`:e>=1e3?`${(e/1e3).toFixed(2)}s`:`${e.toFixed(+(e<10))}ms`}var _t=/(?:\u001b\[[0-9;?]*[ -/]*[@-~]|\u001b[@-Z\\^_])/g;function vt(e){return e.replace(_t,``)}function yt(e){if(e==null||!Number.isFinite(e))return`—`;let t=[`B`,`KB`,`MB`,`GB`,`TB`],n=e,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r++;return`${n.toFixed(r===0?0:1)} ${t[r]}`}function bt(e){return!0}function xt(e){let t=`message`,n,r=[];for(let i of e.split(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CopilotPanel-BDZzDmVy.js","assets/cn-CMFYpumL.js","assets/react-vendor-CHIHtdAC.js","assets/form-PtDLk33Z.js","assets/AddJob-CMIT6e17.js","assets/Benchmark-Dq1-vJ2k.js","assets/AreaChart-DzUXW8u3.js","assets/CopyButton-XT7ykzf5.js","assets/CronManager-BQupx6wZ.js","assets/Pagination-Cd6lHj2E.js","assets/Database-Difs7xYV.js","assets/Diagnostics-BzVDq9CH.js","assets/DlqControl-Cu2i1oq5.js","assets/DlqPro-HBrCftLD.js","assets/Flows-D3Bvkmd6.js","assets/JobInspector-B7zEuFhM.js","assets/jobActions-CuOdMglt.js","assets/JobsPro-DNZivuzq.js","assets/LogsPro-P73LCkap.js","assets/McpServer-CUK20-uN.js","assets/MetricsPro-CqcH6gJp.js","assets/QueueControl-D7J1JObu.js","assets/QueuesOverview-DrYjyped.js","assets/S3BackupPro-BEo_EVAO.js","assets/connectionStore-DI-LYcct.js","assets/ServerControl-BRLFRj7k.js","assets/UsagePro-Cto9k5OI.js","assets/Webhooks-Cm3vZEp7.js","assets/WorkersPro-BidtV_Bp.js","assets/Cron-9hndZ-Z5.js","assets/Dlq-BCUVh_NO.js","assets/Jobs-ovYRwmwi.js","assets/Logs-CjM7MNYN.js","assets/Metrics-BodjiKpf.js","assets/Overview-AwCA3XI2.js","assets/QueueDetail-BtiN0s3b.js","assets/Queues-LrodynCj.js","assets/S3Backup-et1PcCC0.js","assets/Settings-CeRZgZU6.js","assets/Usage-CHCg6VNy.js","assets/Workers-CVfx3TK-.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e,t}from"./cn-CMFYpumL.js";import{a as n,c as r,f as i,i as a,l as o,m as s,n as c,o as l,p as u,r as d,s as f,t as p}from"./react-vendor-CHIHtdAC.js";import{a as m,i as h,n as g,r as _,t as v}from"./connectionStore-DI-LYcct.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var y=u(),b=e(s(),1),x=p();function S(){let[e,t]=(0,b.useState)(!1),[n,r]=(0,b.useState)(``),i=_(e=>e.baseUrl),a=_(e=>e.setToken),o=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let e=()=>t(!0);return window.addEventListener(`auth:required`,e),()=>window.removeEventListener(`auth:required`,e)},[]),(0,b.useEffect)(()=>{if(!e)return;let t=requestAnimationFrame(()=>o.current?.focus());return()=>cancelAnimationFrame(t)},[e]),e?(0,x.jsx)(`div`,{className:`fixed inset-0 z-[60] flex items-center justify-center bg-black/60 p-4`,children:(0,x.jsxs)(`form`,{onSubmit:e=>{e.preventDefault();let i=n.trim();i&&(a(i),r(``),t(!1))},role:`dialog`,"aria-modal":`true`,"aria-label":`Authentication required`,className:`w-full max-w-sm rounded-xl border border-line-strong bg-surface p-6 shadow-2xl`,children:[(0,x.jsx)(`h2`,{className:`text-lg font-semibold text-fg`,children:`Authentication required`}),(0,x.jsxs)(`p`,{className:`mt-1 text-sm text-muted`,children:[`The server at `,(0,x.jsx)(`span`,{className:`break-all font-mono text-fg`,children:i}),` rejected the request (401). Enter its bearer token to continue.`]}),(0,x.jsx)(`input`,{ref:o,type:`password`,value:n,onChange:e=>r(e.target.value),placeholder:`Bearer token`,"aria-label":`Bearer token`,autoComplete:`off`,className:`mt-4 w-full rounded-lg border border-line bg-surface-2 px-3 py-2 text-sm text-fg outline-none placeholder:text-faint focus-visible:ring-2 focus-visible:ring-accent/50`}),(0,x.jsxs)(`div`,{className:`mt-4 flex items-center justify-between gap-3`,children:[(0,x.jsx)(d,{to:`/settings`,onClick:()=>t(!1),className:`text-xs text-muted underline-offset-2 hover:text-fg hover:underline`,children:`Open Settings instead`}),(0,x.jsx)(`button`,{type:`submit`,disabled:!n.trim(),className:`rounded-lg bg-accent px-4 py-2 text-sm font-medium text-accent-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50 disabled:opacity-50`,children:`Unlock`})]})]})}):null}function C(e){typeof document<`u`&&(document.documentElement.dataset.theme=e,document.documentElement.style.colorScheme=e)}var w=m()(h((e,t)=>({theme:`dark`,toggle:()=>{let n=t().theme===`dark`?`light`:`dark`;C(n),e({theme:n})},setTheme:t=>{C(t),e({theme:t})}}),{name:`bq-dash-theme`,onRehydrateStorage:()=>e=>{e&&C(e.theme)}}));function ee(){C(w.getState().theme)}function T({children:e,...t}){return(0,x.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.75`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,...t,children:e})}var te=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`path`,{d:`M3 3v18h18`}),(0,x.jsx)(`rect`,{x:`7`,y:`12`,width:`3`,height:`6`}),(0,x.jsx)(`rect`,{x:`12`,y:`8`,width:`3`,height:`10`}),(0,x.jsx)(`rect`,{x:`17`,y:`5`,width:`3`,height:`13`})]}),E=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`line`,{x1:`8`,y1:`6`,x2:`21`,y2:`6`}),(0,x.jsx)(`line`,{x1:`8`,y1:`12`,x2:`21`,y2:`12`}),(0,x.jsx)(`line`,{x1:`8`,y1:`18`,x2:`21`,y2:`18`}),(0,x.jsx)(`line`,{x1:`3`,y1:`6`,x2:`3.01`,y2:`6`}),(0,x.jsx)(`line`,{x1:`3`,y1:`12`,x2:`3.01`,y2:`12`}),(0,x.jsx)(`line`,{x1:`3`,y1:`18`,x2:`3.01`,y2:`18`})]}),ne=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`rect`,{x:`2`,y:`7`,width:`20`,height:`14`,rx:`2`}),(0,x.jsx)(`path`,{d:`M16 7V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2`})]}),D=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`path`,{d:`M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z`}),(0,x.jsx)(`line`,{x1:`12`,y1:`9`,x2:`12`,y2:`13`}),(0,x.jsx)(`line`,{x1:`12`,y1:`17`,x2:`12.01`,y2:`17`})]}),re=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,x.jsx)(`polyline`,{points:`12 7 12 12 15 14`})]}),ie=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`path`,{d:`M3 3v18h18`}),(0,x.jsx)(`path`,{d:`m19 9-5 5-4-4-3 3`})]}),O=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`rect`,{x:`4`,y:`4`,width:`16`,height:`8`,rx:`2`}),(0,x.jsx)(`rect`,{x:`4`,y:`14`,width:`16`,height:`6`,rx:`2`}),(0,x.jsx)(`line`,{x1:`8`,y1:`8`,x2:`8.01`,y2:`8`}),(0,x.jsx)(`line`,{x1:`8`,y1:`17`,x2:`8.01`,y2:`17`})]}),ae=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`line`,{x1:`8`,y1:`6`,x2:`21`,y2:`6`}),(0,x.jsx)(`line`,{x1:`8`,y1:`12`,x2:`21`,y2:`12`}),(0,x.jsx)(`line`,{x1:`8`,y1:`18`,x2:`21`,y2:`18`}),(0,x.jsx)(`path`,{d:`M3 6h.01M3 12h.01M3 18h.01`})]}),oe=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`path`,{d:`M12 20V10`}),(0,x.jsx)(`path`,{d:`M18 20V4`}),(0,x.jsx)(`path`,{d:`M6 20v-4`})]}),se=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`ellipse`,{cx:`12`,cy:`5`,rx:`8`,ry:`3`}),(0,x.jsx)(`path`,{d:`M4 5v6c0 1.66 3.58 3 8 3s8-1.34 8-3V5`}),(0,x.jsx)(`path`,{d:`M4 11v6c0 1.66 3.58 3 8 3s8-1.34 8-3v-6`})]}),ce=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`16`,rx:`2`}),(0,x.jsx)(`path`,{d:`M3 10h18`}),(0,x.jsx)(`path`,{d:`M9 10v10`})]}),le=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`}),(0,x.jsx)(`path`,{d:`M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1Z`})]}),ue=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`circle`,{cx:`12`,cy:`12`,r:`4`}),(0,x.jsx)(`path`,{d:`M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41`})]}),de=e=>(0,x.jsx)(T,{...e,children:(0,x.jsx)(`path`,{d:`M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79Z`})}),fe=e=>(0,x.jsx)(T,{...e,children:(0,x.jsx)(`polyline`,{points:`15 18 9 12 15 6`})}),pe=e=>(0,x.jsx)(T,{...e,children:(0,x.jsx)(`polygon`,{points:`5 3 19 12 5 21 5 3`})}),me=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`rect`,{x:`6`,y:`4`,width:`4`,height:`16`}),(0,x.jsx)(`rect`,{x:`14`,y:`4`,width:`4`,height:`16`})]}),he=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`polyline`,{points:`3 6 5 6 21 6`}),(0,x.jsx)(`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`})]}),ge=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`polyline`,{points:`23 4 23 10 17 10`}),(0,x.jsx)(`polyline`,{points:`1 20 1 14 7 14`}),(0,x.jsx)(`path`,{d:`M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15`})]}),_e=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,x.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),ve=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`path`,{d:`M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8Z`}),(0,x.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]}),k=e=>(0,x.jsx)(T,{...e,children:(0,x.jsx)(`polygon`,{points:`13 2 3 14 12 14 11 22 21 10 12 10 13 2`})}),ye=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,x.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})]}),be=e=>(0,x.jsx)(T,{...e,children:(0,x.jsx)(`polyline`,{points:`20 6 9 17 4 12`})}),A=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`}),(0,x.jsx)(`polyline`,{points:`12 5 19 12 12 19`})]}),xe=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`}),(0,x.jsx)(`path`,{d:`M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1`})]}),Se=e=>(0,x.jsxs)(T,{...e,children:[(0,x.jsx)(`line`,{x1:`3`,y1:`6`,x2:`21`,y2:`6`}),(0,x.jsx)(`line`,{x1:`3`,y1:`12`,x2:`21`,y2:`12`}),(0,x.jsx)(`line`,{x1:`3`,y1:`18`,x2:`21`,y2:`18`})]}),Ce=class extends Error{status;constructor(e,t){super(e),this.status=t,this.name=`ApiError`}};async function j(e,t,n=!0){let r=await fetch(g()+e,{...t,headers:{"Content-Type":`application/json`,...v(),...t?.headers}});if(!r.ok){let e=`HTTP ${r.status}`;try{let t=await r.json();t?.error&&(e=t.error)}catch{}throw new Ce(e,r.status)}if(r.status===204)return;let i=await r.json();if(n&&i&&typeof i==`object`&&i.ok===!1){let e=i.error;throw new Ce(e??`Operation failed`,r.status)}return i}var M=e=>encodeURIComponent(e),N=(e,t)=>j(e,{method:`POST`,body:t?JSON.stringify(t):void 0}),we=(e,t)=>j(e,{method:`PUT`,body:t?JSON.stringify(t):void 0}),P=e=>j(e,{method:`DELETE`}),F={overview:()=>j(`/dashboard`),queues:(e=200,t=0)=>j(`/dashboard/queues?limit=${e}&offset=${t}`),queueDetail:(e,t=!0)=>j(`/dashboard/queues/${M(e)}?includeJobs=${t}`),stats:()=>j(`/stats`),storage:()=>j(`/storage`,void 0,!1),health:()=>j(`/health`,void 0,!1),jobsList:(e,t={})=>{let n=new URLSearchParams;return t.states?.length&&n.set(`states`,t.states.join(`,`)),n.set(`limit`,String(t.limit??50)),n.set(`offset`,String(t.offset??0)),j(`/queues/${M(e)}/jobs/list?${n.toString()}`)},job:e=>j(`/jobs/${M(e)}`),cancelJob:e=>P(`/jobs/${M(e)}`),promoteJob:e=>N(`/jobs/${M(e)}/promote`),retryJob:e=>N(`/jobs/${M(e)}/move-to-wait`),pause:e=>N(`/queues/${M(e)}/pause`),resume:e=>N(`/queues/${M(e)}/resume`),drain:e=>N(`/queues/${M(e)}/drain`),obliterate:e=>N(`/queues/${M(e)}/obliterate`),clean:(e,t=0,n=1e3)=>N(`/queues/${M(e)}/clean`,{grace:t,limit:n}),retryCompleted:e=>N(`/queues/${M(e)}/retry-completed`),setRateLimit:(e,t)=>we(`/queues/${M(e)}/rate-limit`,{limit:t}),clearRateLimit:e=>P(`/queues/${M(e)}/rate-limit`),setConcurrency:(e,t)=>we(`/queues/${M(e)}/concurrency`,{concurrency:t}),clearConcurrency:e=>P(`/queues/${M(e)}/concurrency`),dlq:(e,t=50,n=0)=>j(`/queues/${M(e)}/dlq?limit=${t}&offset=${n}`),dlqStats:e=>j(`/queues/${M(e)}/dlq/stats`),retryDlq:e=>N(`/queues/${M(e)}/dlq/retry`),purgeDlq:e=>N(`/queues/${M(e)}/dlq/purge`),crons:()=>j(`/crons`),deleteCron:e=>P(`/crons/${M(e)}`),workers:()=>j(`/workers`),eventsUrl:e=>g()+(e?`/events/queues/${M(e)}`:`/events`)};function Te(e){let t=!0;return()=>t?(t=!1,!0):!e()}function I(e,t=[],n={}){let r=_(e=>e.refreshMs),i=n.intervalMs??r,[a,o]=(0,b.useState)(null),[s,c]=(0,b.useState)(null),[l,u]=(0,b.useState)(!0),d=(0,b.useRef)(e);d.current=e;let f=(0,b.useRef)(!0),p=(0,b.useRef)(0),m=(0,b.useRef)(void 0),h=(0,b.useRef)(!0),g=(0,b.useRef)(!1),v=(0,b.useCallback)(async()=>{let e=++p.current;try{let t=await d.current();if(!f.current||e!==p.current)return;let n;try{n=JSON.stringify(t)}catch{n=String(Math.random())}n!==m.current&&(m.current=n,o(t)),g.current&&(g.current=!1,c(null))}catch(t){if(!f.current||e!==p.current)return;g.current=!0,c(t)}finally{f.current&&e===p.current&&h.current&&(h.current=!1,u(!1))}},[]);return(0,b.useEffect)(()=>{f.current=!0,m.current=void 0,h.current=!0,u(!0),g.current&&(g.current=!1,c(null));let e=null,t=!1,n=()=>typeof document<`u`&&document.hidden,r=Te(n),a=async()=>{t||(r()&&await v(),!t&&(e=setTimeout(a,i)))};a();let o=()=>{!n()&&!t&&v()};return typeof document<`u`&&document.addEventListener(`visibilitychange`,o),()=>{t=!0,f.current=!1,e&&clearTimeout(e),typeof document<`u`&&document.removeEventListener(`visibilitychange`,o)}},[i,v,...t]),{data:a,error:s,loading:l,refreshing:l,refetch:v}}function Ee(){let e=_(e=>e.baseUrl),t=e===`/api`?`localhost:6790`:e.replace(/^https?:\/\//,``);return(0,x.jsxs)(`div`,{className:`mx-3 mb-3 flex items-center gap-2.5 rounded-lg border border-line bg-surface px-3 py-2`,children:[(0,x.jsx)(`span`,{className:`flex size-7 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-accent to-fuchsia-600 text-[11px] font-bold text-white`,children:`bq`}),(0,x.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,x.jsx)(`div`,{className:`truncate text-xs font-medium text-fg`,children:`bunqueue`}),(0,x.jsx)(`div`,{className:`truncate font-mono text-[10px] text-faint`,title:e,children:t})]}),(0,x.jsx)(d,{to:`/settings`,"aria-label":`Settings`,className:`text-faint transition-colors hover:text-fg`,children:(0,x.jsx)(le,{className:`size-4`})})]})}var De=[{section:null,items:[{to:`/`,label:`Overview`,icon:te,end:!0}]},{section:`Queues`,items:[{to:`/queues`,label:`Queues`,icon:E},{to:`/jobs`,label:`Jobs`,icon:ne},{to:`/dlq`,label:`Dead Letter Queue`,icon:D},{to:`/cron`,label:`Cron Jobs`,icon:re},{to:`/flows`,label:`Flows`,icon:A}]},{section:`Monitoring`,items:[{to:`/metrics`,label:`Metrics`,icon:ie},{to:`/workers`,label:`Workers`,icon:O},{to:`/logs`,label:`Logs`,icon:ae}]},{section:`Control`,items:[{to:`/server`,label:`Server`,icon:O},{to:`/add-job`,label:`Add Job`,icon:ne},{to:`/job`,label:`Job Inspector`,icon:ve},{to:`/queue-control`,label:`Queue Control`,icon:E},{to:`/dlq-control`,label:`DLQ Control`,icon:D},{to:`/webhooks`,label:`Webhooks`,icon:k},{to:`/diagnostics`,label:`Diagnostics`,icon:ie},{to:`/benchmark`,label:`Benchmark`,icon:k}]},{section:`Management`,items:[{to:`/database`,label:`Database`,icon:ce},{to:`/mcp`,label:`MCP`,icon:k},{to:`/usage`,label:`Usage`,icon:oe},{to:`/s3`,label:`S3 Backup`,icon:se},{to:`/settings`,label:`Settings`,icon:le}]}];function Oe(){let e=_(e=>e.baseUrl),{data:n,error:r,loading:i}=I(async()=>({ok:(await F.health()).ok}),[],{intervalMs:15e3}),a=!r&&n!=null&&n.ok!==!1,o=e.replace(/^https?:\/\//,``)||`local`;return(0,x.jsxs)(`div`,{className:`mx-3 mb-4 flex items-center gap-2 rounded-lg border border-line bg-surface px-3 py-1.5`,children:[(0,x.jsx)(`span`,{className:t(`size-1.5 rounded-full`,i?`bg-zinc-500`:a?`bg-emerald-400`:`bg-red-400`),title:i?`connecting`:a?`connected`:`offline`}),(0,x.jsx)(`span`,{className:`truncate font-mono text-[11px] text-muted`,title:e,children:o}),(0,x.jsx)(`span`,{className:`sr-only`,children:i?`connecting`:a?`connected`:`offline`})]})}function ke(){let e=w(e=>e.theme),t=w(e=>e.toggle),n=e===`dark`;return(0,x.jsxs)(`button`,{type:`button`,onClick:t,className:`mx-3 mb-3 flex items-center gap-3 rounded-lg px-3 py-2 text-sm text-muted transition-colors hover:bg-surface-2 hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50`,children:[n?(0,x.jsx)(ue,{className:`size-4`}):(0,x.jsx)(de,{className:`size-4`}),n?`Light Mode`:`Dark Mode`]})}function Ae({open:e=!1,onClose:n}){return(0,x.jsxs)(x.Fragment,{children:[e&&(0,x.jsx)(`button`,{type:`button`,"aria-label":`Close navigation`,onClick:n,className:`fixed inset-0 z-40 bg-black/50 lg:hidden`}),(0,x.jsxs)(`aside`,{className:t(`flex w-60 shrink-0 flex-col border-r border-line bg-sidebar`,`fixed inset-y-0 left-0 z-50 transition-[transform,visibility] lg:static lg:z-auto lg:translate-x-0`,e?`translate-x-0`:`-translate-x-full lg:translate-x-0 invisible lg:visible`),children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-2 px-5 py-5`,children:[(0,x.jsx)(`span`,{className:`text-lg font-bold tracking-tight text-fg`,children:`bunqueue`}),(0,x.jsx)(`span`,{className:`rounded-md bg-accent/15 px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-accent`,children:`dash`}),(0,x.jsx)(`span`,{title:`Beta — under active development`,className:`rounded-md bg-amber-500/15 px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-warning`,children:`beta`})]}),(0,x.jsx)(`nav`,{className:`flex-1 overflow-y-auto px-3 pb-4`,children:De.map(e=>(0,x.jsxs)(`div`,{className:`mb-4`,children:[e.section&&(0,x.jsx)(`div`,{className:`px-2 pb-2 pt-1 text-[10px] font-semibold uppercase tracking-wider text-faint`,children:e.section}),(0,x.jsx)(`div`,{className:`flex flex-col gap-0.5`,children:e.items.map(({to:e,label:n,icon:r,end:i})=>(0,x.jsx)(a,{to:e,end:i,className:({isActive:e})=>t(`group relative flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50`,e?`bg-surface-2 text-fg`:`text-muted hover:bg-surface-2/60 hover:text-fg`),children:({isActive:e})=>(0,x.jsxs)(x.Fragment,{children:[e&&(0,x.jsx)(`span`,{className:`absolute inset-y-1.5 left-0 w-0.5 rounded-full bg-accent`}),(0,x.jsx)(r,{className:`size-[18px] shrink-0`}),(0,x.jsx)(`span`,{className:`truncate`,children:n})]})},e))})]},e.section??`root`))}),(0,x.jsx)(Oe,{}),(0,x.jsx)(ke,{}),(0,x.jsx)(Ee,{})]})]})}var je=`https://egeominotti.github.io/bunqueue-dashboard/docs/`;function Me(){let[e,t]=(0,b.useState)(!1),[n,r]=(0,b.useState)(``),[i,a]=(0,b.useState)(0),s=o(),c=w(e=>e.toggle),l=(0,b.useRef)(null),u=(0,b.useRef)(null),d=(0,b.useMemo)(()=>{let e=De.flatMap(e=>e.items.map(t=>({id:`nav:${t.to}`,label:t.label,hint:e.section??`Home`,run:()=>s(t.to)}))),t=[{id:`act:theme`,label:`Toggle theme (dark / light)`,hint:`Action`,run:c},{id:`act:docs`,label:`Open documentation`,hint:`Action`,run:()=>window.open(je,`_blank`,`noopener`)}];return[...e,...t]},[s,c]),f=(0,b.useMemo)(()=>{let e=n.trim().toLowerCase();return e?d.filter(t=>`${t.label} ${t.hint}`.toLowerCase().includes(e)):d},[d,n]);(0,b.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),t(e=>!e))},n=()=>t(!0);return window.addEventListener(`keydown`,e),window.addEventListener(`command-palette:open`,n),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`command-palette:open`,n)}},[]),(0,b.useEffect)(()=>{if(!e)return;let t=document.activeElement;r(``),a(0);let n=requestAnimationFrame(()=>l.current?.focus());return()=>{cancelAnimationFrame(n),t?.focus?.()}},[e]),(0,b.useEffect)(()=>{u.current?.querySelector(`[data-idx="${i}"]`)?.scrollIntoView({block:`nearest`})},[i]);let p=(0,b.useCallback)(()=>t(!1),[]),m=(0,b.useCallback)(e=>{e&&(e.run(),t(!1))},[]);return e?(0,x.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center p-4 pt-[12vh]`,children:[(0,x.jsx)(`button`,{type:`button`,"aria-label":`Close command palette`,onClick:p,className:`fixed inset-0 bg-black/50`}),(0,x.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":`Command palette`,className:`relative z-10 w-full max-w-lg overflow-hidden rounded-xl border border-line-strong bg-surface shadow-2xl`,children:[(0,x.jsx)(`input`,{ref:l,value:n,onChange:e=>{r(e.target.value),a(0)},onKeyDown:e=>{e.key===`Escape`?(e.preventDefault(),p()):e.key===`ArrowDown`?(e.preventDefault(),a(e=>Math.min(e+1,f.length-1))):e.key===`ArrowUp`?(e.preventDefault(),a(e=>Math.max(e-1,0))):e.key===`Enter`&&(e.preventDefault(),m(f[i]))},placeholder:`Search pages and actions…`,"aria-label":`Search pages and actions`,className:`w-full border-b border-line bg-transparent px-4 py-3 text-sm text-fg outline-none placeholder:text-faint`}),(0,x.jsxs)(`ul`,{ref:u,className:`max-h-80 overflow-y-auto py-2`,"aria-label":`Results`,children:[f.length===0&&(0,x.jsx)(`li`,{className:`px-4 py-6 text-center text-sm text-faint`,children:`No matches`}),f.map((e,t)=>(0,x.jsx)(`li`,{children:(0,x.jsxs)(`button`,{type:`button`,"data-idx":t,onMouseEnter:()=>a(t),onClick:()=>m(e),className:`flex w-full items-center justify-between gap-3 px-4 py-2 text-left text-sm transition-colors ${t===i?`bg-accent/15 text-fg`:`text-muted`}`,children:[(0,x.jsx)(`span`,{className:`truncate`,children:e.label}),(0,x.jsx)(`span`,{className:`shrink-0 text-xs text-faint`,children:e.hint})]})},e.id))]}),(0,x.jsxs)(`div`,{className:`flex items-center justify-between border-t border-line px-4 py-2 text-xs text-faint`,children:[(0,x.jsx)(`span`,{children:`↑↓ navigate · ↵ open · esc close`}),(0,x.jsx)(`span`,{className:`font-mono`,children:`⌘K`})]})]})]}):null}var L=()=>typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():`${Date.now()}`,R=new Map,z=(e,t,n)=>e.map(e=>e.id===t?n(e):e);function Ne(e){return{config:{provider:e.config.provider,baseURL:e.config.baseURL,model:e.config.model}}}var B=m()(h(e=>({open:!1,config:{provider:`anthropic`,baseURL:``,model:`claude-opus-4-8`,apiKey:``},messages:[],pending:[],busy:!1,setOpen:t=>e({open:t}),toggle:()=>e(e=>({open:!e.open})),setConfig:t=>e(e=>({config:{...e.config,...t}})),clear:()=>{for(let e of R.values())e(!1);R.clear(),e({messages:[],pending:[]})},cancelPending:()=>{for(let e of R.values())e(!1);R.clear(),e({pending:[]})},setBusy:t=>e({busy:t}),addUser:t=>e(e=>({messages:[...e.messages,{id:L(),role:`user`,content:t}]})),startAssistant:()=>{let t=L();return e(e=>({messages:[...e.messages,{id:t,role:`assistant`,content:``,tools:[]}]})),t},appendAssistant:(t,n)=>e(e=>({messages:z(e.messages,t,e=>({...e,content:e.content+n}))})),finishAssistant:(t,n)=>e(e=>({messages:z(e.messages,t,e=>({...e,error:!!n?.error,content:n?.error?e.content||n.error:e.content}))})),addTool:(t,n)=>e(e=>({messages:z(e.messages,t,e=>({...e,tools:[...e.tools??[],n]}))})),updateTool:(t,n,r)=>e(e=>({messages:z(e.messages,t,e=>({...e,tools:(e.tools??[]).map(e=>e.id===n?{...e,...r}:e)}))})),requestConfirm:t=>new Promise(n=>{let r=L();R.set(r,n),e(e=>({pending:[...e.pending,{...t,id:r}]}))}),resolveConfirm:(t,n)=>{let r=R.get(t);r&&(R.delete(t),r(n)),e(e=>({pending:e.pending.filter(e=>e.id!==t)}))}}),{name:`bq-dash-copilot`,partialize:e=>Ne(e),merge:(e,t)=>{let n=e??{};return{...t,config:{...t.config,...n.config??{},apiKey:``}}}})),Pe=(0,b.lazy)(()=>i(()=>import(`./CopilotPanel-BDZzDmVy.js`).then(e=>({default:e.CopilotPanel})),__vite__mapDeps([0,1,2,3])));function Fe({className:e}){return(0,x.jsxs)(`svg`,{className:e,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:[(0,x.jsx)(`path`,{d:`M12 3l1.9 4.6L18.5 9.5 13.9 11.4 12 16l-1.9-4.6L5.5 9.5l4.6-1.9L12 3z`,fill:`currentColor`}),(0,x.jsx)(`path`,{d:`M19 14l.8 2 2 .8-2 .8-.8 2-.8-2-2-.8 2-.8.8-2z`,fill:`currentColor`,opacity:`0.7`})]})}function Ie(){let e=B(e=>e.open),t=B(e=>e.setOpen);return(0,x.jsxs)(x.Fragment,{children:[!e&&(0,x.jsxs)(`button`,{type:`button`,onClick:()=>t(!0),className:`fixed bottom-5 right-5 z-40 flex items-center gap-2 rounded-full border border-line bg-surface px-4 py-2.5 text-sm font-medium text-fg shadow-lg transition-colors hover:border-accent/50 hover:text-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50`,"aria-label":`Open Copilot`,children:[(0,x.jsx)(Fe,{className:`size-4 text-accent`}),`Copilot`,(0,x.jsx)(`span`,{className:`rounded bg-accent/15 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-accent`,children:`beta`})]}),e&&(0,x.jsx)(b.Suspense,{fallback:(0,x.jsx)(`div`,{className:`fixed inset-y-0 right-0 z-[60] flex w-full max-w-md items-center justify-center border-l border-line bg-surface text-sm text-muted`,children:`Loading Copilot…`}),children:(0,x.jsx)(Pe,{})})]})}var Le={default:`border border-line bg-surface-2 text-fg hover:bg-surface-2/70 hover:border-line-strong`,ghost:`text-muted hover:text-fg hover:bg-surface-2`,accent:`bg-accent text-accent-fg hover:opacity-90 border border-transparent`,danger:`border border-red-500/30 text-danger hover:bg-red-500/10 hover:border-red-500/50`,warning:`border border-amber-500/30 text-warning hover:bg-amber-500/10 hover:border-amber-500/50`,success:`bg-emerald-500 text-white hover:bg-emerald-500/90 border border-transparent`},Re={sm:`h-8 px-3 text-xs gap-1.5`,md:`h-9 px-4 text-sm gap-2`};function ze({children:e,variant:n=`default`,size:r=`md`,className:i,...a}){return(0,x.jsx)(`button`,{type:`button`,className:t(`inline-flex items-center justify-center rounded-lg font-medium transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50`,`disabled:cursor-not-allowed disabled:opacity-50`,Le[n],Re[r],i),...a,children:e})}function Be({children:e,className:n,variant:r=`ghost`,...i}){return(0,x.jsx)(`button`,{type:`button`,className:t(`inline-flex size-8 items-center justify-center rounded-lg transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50`,`disabled:cursor-not-allowed disabled:opacity-50`,Le[r],n),...i,children:e})}function V({children:e,className:n,padded:r=!0}){return(0,x.jsx)(`div`,{className:t(`rounded-xl border border-line bg-surface`,r&&`p-5`,n),children:e})}function Ve({title:e,action:t,icon:n}){return(0,x.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-3`,children:[(0,x.jsxs)(`h3`,{className:`flex items-center gap-2 text-base font-semibold text-fg`,children:[n,e]}),t]})}function He({className:e}){return(0,x.jsx)(`span`,{className:t(`inline-block size-4 animate-spin rounded-full border-2 border-current border-t-transparent`,e),role:`status`,"aria-label":`Loading`})}function Ue({label:e=`Loading…`}){return(0,x.jsxs)(`div`,{className:`flex items-center justify-center gap-3 py-16 text-sm text-muted`,children:[(0,x.jsx)(He,{}),e]})}function We({icon:e,title:t,hint:n,action:r}){return(0,x.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-line py-14 text-center`,children:[e&&(0,x.jsx)(`div`,{className:`text-faint [&>svg]:size-8`,children:e}),(0,x.jsx)(`div`,{className:`text-sm font-medium text-fg`,children:t}),n&&(0,x.jsx)(`div`,{className:`max-w-sm text-xs text-faint`,children:n}),r&&(0,x.jsx)(`div`,{className:`mt-2`,children:r})]})}function Ge({onRetry:e,message:t=`Not connected to the bunqueue server — showing empty data.`}){return(0,x.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-3 rounded-lg border border-amber-500/25 bg-amber-500/[0.06] px-4 py-2.5 text-sm`,children:[(0,x.jsx)(`span`,{className:`size-2 shrink-0 rounded-full bg-amber-400`,"aria-hidden":`true`}),(0,x.jsx)(`span`,{className:`text-amber-300/90 light:text-amber-700`,children:t}),e&&(0,x.jsx)(`button`,{type:`button`,onClick:e,className:`ml-auto shrink-0 rounded-md border border-amber-500/30 px-2.5 py-1 text-xs font-medium text-amber-200 light:text-amber-700 hover:border-amber-400/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50`,children:`Retry`})]})}function Ke({error:e,onRetry:t}){return(0,x.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-3 rounded-xl border border-red-500/20 bg-red-500/5 py-14 text-center`,children:[(0,x.jsx)(`div`,{className:`text-sm font-medium text-danger`,children:`Something went wrong`}),(0,x.jsx)(`div`,{className:`max-w-md text-xs text-faint`,children:e.message}),t&&(0,x.jsx)(`button`,{type:`button`,onClick:t,className:`mt-1 rounded-lg border border-line bg-surface-2 px-3 py-1.5 text-xs font-medium text-fg hover:border-line-strong`,children:`Retry`})]})}var qe=class extends b.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error(`ErrorBoundary caught an error`,e,t.componentStack)}componentDidUpdate(e){this.state.error&&e.resetKey!==this.props.resetKey&&this.setState({error:null})}render(){let{error:e}=this.state;return e?(0,x.jsx)(`div`,{className:`flex min-h-screen items-center justify-center p-6`,children:(0,x.jsxs)(V,{className:`w-full max-w-lg`,children:[(0,x.jsx)(Ke,{error:e}),(0,x.jsx)(`div`,{className:`mt-4 flex justify-center`,children:(0,x.jsx)(ze,{onClick:()=>window.location.reload(),children:`Reload`})})]})}):this.props.children}};function H(){if(typeof window>`u`)return!1;let{search:e,hash:t}=window.location;return new URLSearchParams(e).has(`demo`)||t.replace(/^#/,``)===`demo`}var Je=H(),U={"/":`Overview`,"/queues":`Queues`,"/jobs":`Jobs`,"/dlq":`Dead Letter Queue`,"/cron":`Cron Jobs`,"/flows":`Flows`,"/metrics":`Metrics`,"/workers":`Workers`,"/logs":`Logs`,"/server":`Server`,"/add-job":`Add Job`,"/job":`Job Inspector`,"/queue-control":`Queue Control`,"/cron-manager":`Cron Manager`,"/dlq-control":`DLQ Control`,"/webhooks":`Webhooks`,"/diagnostics":`Diagnostics`,"/benchmark":`Benchmark`,"/database":`Database`,"/mcp":`MCP`,"/usage":`Usage`,"/s3":`S3 Backup`,"/settings":`Settings`,"/overview-classic":`Overview (classic)`,"/queues-classic":`Queues (classic)`,"/jobs-classic":`Jobs (classic)`,"/dlq-classic":`DLQ (classic)`,"/metrics-classic":`Metrics (classic)`,"/logs-classic":`Logs (classic)`,"/s3-classic":`S3 Backup (classic)`};function Ye(e){if(U[e])return U[e];if(e.startsWith(`/queues/`)){let t=e.slice(8);try{t=decodeURIComponent(t)}catch{}return`${t} · Queue`}return`bunqueue`}function Xe({onMenu:e}){let{pathname:t}=r();return(0,x.jsxs)(`header`,{className:`sticky top-0 z-10 flex h-14 items-center justify-between gap-3 border-b border-line bg-bg/80 px-4 backdrop-blur sm:px-6 lg:px-8`,children:[(0,x.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,x.jsx)(`button`,{type:`button`,"aria-label":`Open navigation`,onClick:e,className:`-ml-1 flex size-9 shrink-0 items-center justify-center rounded-lg text-muted hover:bg-surface-2 hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50 lg:hidden`,children:(0,x.jsx)(Se,{className:`size-5`})}),(0,x.jsxs)(`div`,{className:`truncate text-sm text-muted`,children:[(0,x.jsx)(`span`,{className:`text-faint`,children:Ye(t)}),(0,x.jsx)(`span`,{className:`mx-2 hidden text-faint sm:inline`,children:`·`}),(0,x.jsx)(`span`,{className:`hidden text-faint sm:inline`,children:`bunqueue`})]})]}),(0,x.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[Je&&(0,x.jsxs)(`span`,{title:`Showing canned sample data. No real bunqueue server is connected.`,className:`hidden items-center gap-1.5 rounded-full border border-accent/40 bg-accent/10 px-2.5 py-1 text-xs font-medium text-accent sm:inline-flex`,children:[(0,x.jsx)(`span`,{className:`size-1.5 rounded-full bg-accent`}),`Live demo`]}),(0,x.jsxs)(`button`,{type:`button`,onClick:()=>window.dispatchEvent(new Event(`command-palette:open`)),title:`Command palette (⌘K)`,"aria-label":`Open command palette`,className:`hidden items-center gap-2 rounded-lg border border-line px-2.5 py-1.5 text-xs text-muted hover:bg-surface-2 hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50 sm:flex`,children:[(0,x.jsx)(`span`,{children:`Search`}),(0,x.jsx)(`kbd`,{className:`rounded border border-line bg-surface-2 px-1 font-mono text-[10px]`,children:`⌘K`})]}),(0,x.jsx)(d,{to:`/settings`,title:`Settings`,"aria-label":`Open settings`,className:`flex size-8 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-accent to-fuchsia-600 text-xs font-bold text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50`,children:`bq`})]})]})}function Ze(){let[e,t]=(0,b.useState)(!1),{pathname:i,key:a}=r();return(0,b.useEffect)(()=>t(!1),[i]),(0,b.useEffect)(()=>{if(!e)return;let n=e=>{e.key===`Escape`&&t(!1)};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e]),(0,x.jsx)(qe,{children:(0,x.jsxs)(`div`,{className:`flex h-screen overflow-hidden bg-bg text-fg`,children:[(0,x.jsx)(`a`,{href:`#main`,className:`sr-only rounded-md bg-accent px-3 py-2 text-sm font-medium text-accent-fg shadow-lg focus:not-sr-only focus:absolute focus:left-4 focus:top-3 focus:z-50`,children:`Skip to content`}),(0,x.jsx)(Ae,{open:e,onClose:()=>t(!1)}),(0,x.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,x.jsx)(Xe,{onMenu:()=>t(!0)}),(0,x.jsx)(`main`,{id:`main`,tabIndex:-1,className:`flex-1 overflow-y-auto px-4 py-5 outline-none sm:px-6 lg:px-8 lg:py-6`,children:(0,x.jsx)(b.Suspense,{fallback:(0,x.jsx)(`div`,{className:`p-2 text-sm text-muted`,children:`Loading…`}),children:(0,x.jsx)(qe,{resetKey:a,children:(0,x.jsx)(n,{})})})})]}),(0,x.jsx)(Me,{}),(0,x.jsx)(S,{}),(0,x.jsx)(Ie,{})]})})}var Qe={completed:`text-success bg-emerald-500/10`,active:`text-blue-400 light:text-blue-700 bg-blue-500/10`,failed:`text-danger bg-red-500/10`,waiting:`text-zinc-400 light:text-zinc-600 bg-zinc-500/10`,prioritized:`text-violet-400 light:text-violet-700 bg-violet-500/10`,delayed:`text-warning bg-amber-500/10`,paused:`text-orange-400 light:text-orange-700 bg-orange-500/10`,"waiting-children":`text-cyan-400 light:text-cyan-700 bg-cyan-500/10`,stalled:`text-orange-400 light:text-orange-700 bg-orange-500/10`,enqueued:`text-zinc-400 light:text-zinc-600 bg-zinc-500/10`,started:`text-blue-400 light:text-blue-700 bg-blue-500/10`,finished:`text-success bg-emerald-500/10`,retry:`text-warning bg-amber-500/10`,cancelled:`text-zinc-400 light:text-zinc-600 bg-zinc-500/10`,default:`text-zinc-400 light:text-zinc-600 bg-zinc-500/10`};function $e({status:e}){return(0,x.jsxs)(`span`,{className:t(`inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium capitalize`,Qe[(e||``).toLowerCase()]??Qe.default),children:[(0,x.jsx)(`span`,{className:`size-1.5 rounded-full bg-current`}),e||`unknown`]})}function et({label:e,tone:n=`green`}){return(0,x.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-xs font-medium text-muted`,children:[(0,x.jsx)(`span`,{className:t(`size-1.5 rounded-full`,n===`green`?`bg-emerald-400`:n===`amber`?`bg-amber-400`:n===`red`?`bg-red-400`:`bg-zinc-400`)}),e]})}function tt({title:e,description:t,live:n,actions:r,back:i}){return(0,x.jsxs)(`div`,{className:`mb-6 flex flex-wrap items-start justify-between gap-4`,children:[(0,x.jsxs)(`div`,{className:`flex items-start gap-3`,children:[i,(0,x.jsxs)(`div`,{children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,x.jsx)(`h1`,{className:`text-2xl font-bold tracking-tight text-fg`,children:e}),n&&(0,x.jsx)(et,{label:`Live`,tone:`green`})]}),t&&(0,x.jsx)(`p`,{className:`mt-1 text-sm text-muted`,children:t})]})]}),r&&(0,x.jsx)(`div`,{className:`flex flex-wrap items-center gap-2`,children:r})]})}var nt={default:`text-fg`,green:`text-success`,red:`text-danger`,blue:`text-blue-400`,amber:`text-warning`,accent:`text-accent`};function W({label:e,value:n,tone:r=`default`,hint:i,compact:a}){return(0,x.jsxs)(`div`,{className:t(`rounded-xl border border-line bg-surface`,a?`px-4 py-3`:`px-5 py-4`),children:[(0,x.jsx)(`div`,{className:`text-[11px] font-medium uppercase tracking-wider text-faint`,children:e}),(0,x.jsx)(`div`,{className:t(`mt-2 font-semibold tnum`,a?`text-xl`:`text-3xl`,nt[r]),children:n}),i!=null&&(0,x.jsx)(`div`,{className:`mt-1 text-xs text-faint`,children:i})]})}var G=class extends Error{status;constructor(e,t){super(e),this.status=t,this.name=`BqError`}};async function rt(e,t,n,r,i=!0){let a=await fetch(e+t,{...r,headers:{"Content-Type":`application/json`,...n,...r?.headers}});if(!a.ok){let e=`HTTP ${a.status}`;try{let t=await a.json();t?.error&&(e=t.error)}catch{}throw a.status===401&&typeof window<`u`&&window.dispatchEvent(new Event(`auth:required`)),new G(e,a.status)}if(a.status===204)return;let o=await a.text();if(!o)return;let s;try{s=JSON.parse(o)}catch{throw new G(`Invalid JSON response (HTTP ${a.status})`,a.status)}if(i&&s&&typeof s==`object`&&s.ok===!1){let e=s.error;throw new G(e??`Operation failed`,a.status)}return s}var K=(e,t,n=!0)=>rt(g(),e,v(),t,n),it=(globalThis.__BUNQUEUE_AGENT_URL__||`http://localhost:6800`).replace(/\/$/,``),q=(e,t)=>rt(it,e,{},t),J=e=>encodeURIComponent(e),Y=(e,t)=>({method:e,body:t===void 0?void 0:JSON.stringify(t)}),at=[`job.pushed`,`job.started`,`job.completed`,`job.failed`,`job.progress`],X={overview:()=>K(`/dashboard`),queues:(e=500,t=0)=>K(`/dashboard/queues?limit=${e}&offset=${t}`),queuesSummary:()=>K(`/queues/summary`),queueDetail:(e,t=!0)=>K(`/dashboard/queues/${J(e)}?includeJobs=${t}`),stats:()=>K(`/stats`),storage:()=>K(`/storage`),health:()=>K(`/health`,void 0,!1),ping:()=>K(`/ping`),jobsList:(e,t,n=50,r=0)=>{let i=new URLSearchParams;return t?.length&&i.set(`states`,t.join(`,`)),i.set(`limit`,String(n)),i.set(`offset`,String(r)),K(`/queues/${J(e)}/jobs/list?${i}`)},job:e=>K(`/jobs/${J(e)}`),jobByCustomId:e=>K(`/jobs/custom/${J(e)}`),jobResult:e=>K(`/jobs/${J(e)}/result`),jobLogs:e=>K(`/jobs/${J(e)}/logs`),jobChildren:e=>K(`/jobs/${J(e)}/children`),addJob:(e,t)=>K(`/queues/${J(e)}/jobs`,Y(`POST`,t)),addJobsBulk:(e,t)=>K(`/queues/${J(e)}/jobs/bulk`,Y(`POST`,{jobs:t})),pullBatch:(e,t)=>K(`/queues/${J(e)}/jobs/pull-batch`,Y(`POST`,{count:t})),ackBatch:e=>K(`/jobs/ack-batch`,Y(`POST`,{ids:e})),cancelJob:e=>K(`/jobs/${J(e)}`,{method:`DELETE`}),promoteJob:e=>K(`/jobs/${J(e)}/promote`,Y(`POST`)),discardJob:e=>K(`/jobs/${J(e)}/discard`,Y(`POST`)),retryJob:e=>K(`/jobs/${J(e)}/move-to-wait`,Y(`POST`)),failJob:(e,t)=>K(`/jobs/${J(e)}/fail`,Y(`POST`,{error:t})),updateJobData:(e,t)=>K(`/jobs/${J(e)}/data`,Y(`PUT`,{data:t})),changePriority:(e,t)=>K(`/jobs/${J(e)}/priority`,Y(`PUT`,{priority:t})),changeDelay:(e,t)=>K(`/jobs/${J(e)}/delay`,Y(`PUT`,{delay:t})),moveToDelayed:(e,t)=>K(`/jobs/${J(e)}/move-to-delayed`,Y(`POST`,{delay:t})),addJobLog:(e,t,n)=>K(`/jobs/${J(e)}/logs`,Y(`POST`,{message:t,level:n})),clearJobLogs:e=>K(`/jobs/${J(e)}/logs`,{method:`DELETE`}),counts:e=>K(`/queues/${J(e)}/counts`),pause:e=>K(`/queues/${J(e)}/pause`,Y(`POST`)),resume:e=>K(`/queues/${J(e)}/resume`,Y(`POST`)),drain:e=>K(`/queues/${J(e)}/drain`,Y(`POST`)),obliterate:e=>K(`/queues/${J(e)}/obliterate`,Y(`POST`)),clean:(e,t={})=>K(`/queues/${J(e)}/clean`,Y(`POST`,t)),promoteJobs:(e,t)=>K(`/queues/${J(e)}/promote-jobs`,Y(`POST`,t==null?void 0:{count:t})),retryCompleted:(e,t)=>K(`/queues/${J(e)}/retry-completed`,Y(`POST`,t?{id:t}:void 0)),setRateLimit:(e,t)=>K(`/queues/${J(e)}/rate-limit`,Y(`PUT`,{limit:t})),clearRateLimit:e=>K(`/queues/${J(e)}/rate-limit`,{method:`DELETE`}),setConcurrency:(e,t)=>K(`/queues/${J(e)}/concurrency`,Y(`PUT`,{concurrency:t})),clearConcurrency:e=>K(`/queues/${J(e)}/concurrency`,{method:`DELETE`}),getStallConfig:e=>K(`/queues/${J(e)}/stall-config`),setStallConfig:(e,t)=>K(`/queues/${J(e)}/stall-config`,Y(`PUT`,{config:t})),getDlqConfig:e=>K(`/queues/${J(e)}/dlq-config`),setDlqConfig:(e,t)=>K(`/queues/${J(e)}/dlq-config`,Y(`PUT`,{config:t})),dlq:(e,t=100,n=0)=>K(`/queues/${J(e)}/dlq?limit=${t}&offset=${n}`),dlqStats:e=>K(`/queues/${J(e)}/dlq/stats`),retryDlq:(e,t)=>K(`/queues/${J(e)}/dlq/retry`,Y(`POST`,t?{jobId:t}:void 0)),purgeDlq:e=>K(`/queues/${J(e)}/dlq/purge`,Y(`POST`)),crons:()=>K(`/crons`),createCron:e=>K(`/crons`,Y(`POST`,e)),deleteCron:e=>K(`/crons/${J(e)}`,{method:`DELETE`}),webhooks:()=>K(`/webhooks`),addWebhook:e=>K(`/webhooks`,Y(`POST`,e)),removeWebhook:e=>K(`/webhooks/${J(e)}`,{method:`DELETE`}),setWebhookEnabled:(e,t)=>K(`/webhooks/${J(e)}/enabled`,Y(`PUT`,{enabled:t})),workers:()=>K(`/workers`),unregisterWorker:e=>K(`/workers/${J(e)}`,{method:`DELETE`}),eventsUrl:e=>g()+(e?`/events/queues/${J(e)}`:`/events`),db:{info:()=>q(`/db/info`),tables:()=>q(`/db/tables`),schema:e=>q(`/db/tables/${J(e)}/schema`),rows:(e,t=50,n=0,r,i=`asc`,a)=>q(`/db/tables/${J(e)}?limit=${t}&offset=${n}`+(r?`&orderBy=${J(r)}&dir=${i}`:``)+(a?.value?`&fcol=${J(a.column)}&fop=${a.op}&fval=${J(a.value)}`:``)),cell:(e,t,n)=>q(`/db/tables/${J(e)}/cell?rowid=${t}&column=${J(n)}`),query:e=>q(`/db/query`,Y(`POST`,{sql:e}))},agentBase:it,control:{status:()=>q(`/control/status`),start:()=>q(`/control/start`,{method:`POST`}),stop:()=>q(`/control/stop`,{method:`POST`}),restart:()=>q(`/control/restart`,{method:`POST`}),logs:()=>q(`/control/logs`),getConfig:()=>q(`/control/config`),setConfig:e=>q(`/control/config`,Y(`PUT`,e))}},ot=new Intl.NumberFormat(`de-DE`),st=new Intl.DateTimeFormat(`it-IT`,{day:`2-digit`,month:`2-digit`,year:`numeric`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`});function Z(e){return e==null||!Number.isFinite(e)?`0`:ot.format(e)}function ct(e,t=2){return e==null||!Number.isFinite(e)?`0%`:`${(e*100).toFixed(t)}%`}function lt(e,t){let n=e+t;return n>0?t/n:null}function ut(e){if(e==null||!Number.isFinite(e))return`—`;let t=new Date(e);return Number.isNaN(t.getTime())?`—`:st.format(t)}function dt(e,t=Date.now()){if(e==null||!Number.isFinite(e))return`—`;let n=Math.max(0,t-e),r=Math.floor(n/1e3);if(r<60)return`${r}s ago`;let i=Math.floor(r/60);if(i<60)return`${i}m ago`;let a=Math.floor(i/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}function ft(e){if(e==null||!Number.isFinite(e)||e<0)return`—`;if(e<1e3)return`${Math.round(e)}ms`;let t=e/1e3;if(t<59.95)return`${t.toFixed(1)}s`;let n=Math.round(t);return`${Math.floor(n/60)}m ${n%60}s`}function pt(e,t){if(e==null||t==null)return;let n=t-e;return n>=0?n:void 0}function mt(e){if(e==null||!Number.isFinite(e))return`—`;let t=Math.floor(e),n=Math.floor(t/86400),r=Math.floor(t%86400/3600),i=Math.floor(t%3600/60),a=[];return n&&a.push(`${n}d`),(r||n)&&a.push(`${r}h`),a.push(`${i}m`),a.join(` `)}function ht(e){return e==null||!Number.isFinite(e)?`0`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(Math.round(e))}function gt(e){return e==null||!Number.isFinite(e)?`—`:e>=1e3?`${(e/1e3).toFixed(2)}s`:`${e.toFixed(+(e<10))}ms`}var _t=/(?:\u001b\[[0-9;?]*[ -/]*[@-~]|\u001b[@-Z\\^_])/g;function vt(e){return e.replace(_t,``)}function yt(e){if(e==null||!Number.isFinite(e))return`—`;let t=[`B`,`KB`,`MB`,`GB`,`TB`],n=e,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r++;return`${n.toFixed(r===0?0:1)} ${t[r]}`}function bt(e){return!0}function xt(e){let t=`message`,n,r=[];for(let i of e.split(`
|
|
3
3
|
`)){if(!i||i.startsWith(`:`))continue;let e=i.indexOf(`:`),a=e===-1?i:i.slice(0,e),o=e===-1?``:i.slice(e+1).replace(/^ /,``);a===`event`?t=o:a===`data`?r.push(o):a===`id`&&(n=o)}if(r.length===0)return null;let i=r.join(`
|
|
4
4
|
`),a=i;try{a=JSON.parse(i)}catch{}return{id:n,event:t,data:a}}async function St(e,t,n){let r=await fetch(e,{headers:{Accept:`text/event-stream`,...v()},signal:n});if(!r.ok||!r.body)throw Error(`SSE connect failed: HTTP ${r.status}`);let i=r.body.getReader(),a=new TextDecoder,o=``;try{for(;;){let{done:e,value:n}=await i.read();if(e)break;o+=a.decode(n,{stream:!0});let r;for(;(r=o.indexOf(`
|
|
5
5
|
|
|
6
6
|
`))!==-1||(r=o.indexOf(`\r
|
|
7
7
|
\r
|
|
8
|
-
`))!==-1;){let e=o[r]===`\r`,n=o.slice(0,r);o=o.slice(r+(e?4:2));let i=xt(n.replace(/\r/g,``));i&&t(i)}}}finally{i.releaseLock()}}var Q={total:0,completed:0,failed:0,waiting:0,active:0},Ct=250;function wt(e){let t=e.includes(`:`)?e.split(`:`)[1]:e;switch(t){case`pushed`:case`added`:return`waiting`;case`pulled`:return`active`;case`progress`:return`active`;default:return t}}function Tt(e){let t=_(e=>e.baseUrl),n=_(e=>e.token),[r,i]=(0,b.useState)([]),[a,o]=(0,b.useState)(Q),[s,c]=(0,b.useState)(0),[l,u]=(0,b.useState)(!1),d=(0,b.useRef)([]),f=(0,b.useRef)([]),p=(0,b.useRef)({...Q});return(0,b.useEffect)(()=>{let t=new AbortController,n=0,r=!1;i([]),o(Q),d.current=[],f.current=[],p.current={...Q};let a=e=>new Promise(n=>{let r=()=>{clearTimeout(i),n()},i=setTimeout(()=>{t.signal.removeEventListener(`abort`,r),n()},e);t.signal.addEventListener(`abort`,r,{once:!0})}),s=e=>{if(bt(e)&&u(!0),!e.event.startsWith(`job:`))return;let t=e.data??{},r=wt(e.event),i={seq:++n,event:e.event,queue:t.queue,jobId:t.jobId,name:t.name,status:r,timestamp:t.timestamp??Date.now(),error:t.error,progress:t.progress};f.current.push(i);let a=p.current;a.total+=1,r===`completed`?a.completed+=1:r===`failed`?a.failed+=1:r===`waiting`?a.waiting+=1:r===`active`&&(a.active+=1),d.current.push(Date.now())};(async()=>{for(;!r;){try{await St(F.eventsUrl(e),s,t.signal)}catch{}if(r)break;u(!1),await a(2e3)}})();let c=setInterval(()=>{if(f.current.length){let e=f.current;f.current=[],e.reverse(),i(t=>[...e,...t].slice(0,Ct))}let e=p.current;e.total&&(p.current={...Q},o(t=>({total:t.total+e.total,completed:t.completed+e.completed,failed:t.failed+e.failed,waiting:t.waiting+e.waiting,active:t.active+e.active})))},150);return()=>{r=!0,t.abort(),clearInterval(c),u(!1)}},[e,t,n]),(0,b.useEffect)(()=>{let e=setInterval(()=>{let e=Date.now();d.current=d.current.filter(t=>e-t<5e3),c(d.current.length/5)},1e3);return()=>clearInterval(e)},[]),{events:r,counters:a,throughput:s,connected:l}}var Et={overview:{stats:{waiting:0,active:0,delayed:0,completed:0,dlq:0,totalPushed:0,totalPulled:0,totalCompleted:0,totalFailed:0,uptime:0},throughput:{pushPerSec:0,pullPerSec:0,completePerSec:0,failPerSec:0},memory:{heapUsed:0,heapTotal:0,rss:0},crons:{total:0}},queuesTotal:0,details:[],failedTotal:0};function Dt(){let e=_(e=>e.baseUrl),n=_(e=>e.token),{data:r,error:i,loading:a,refetch:o}=I(async()=>{let[e,t]=await Promise.all([X.overview(),X.queuesSummary()]),n=t.slice(0,6).map(e=>({name:e.name,paused:e.paused,counts:e.counts})),r=t.reduce((e,t)=>e+(t.counts?.failed??0),0);return{overview:e,queuesTotal:t.length,details:n,failedTotal:r}},[]);if(a&&!r&&!i)return(0,x.jsx)(Ue,{label:`Loading overview…`});let{overview:s,queuesTotal:c,details:l,failedTotal:u}=r??Et,{stats:f,throughput:p,memory:m,crons:h}=s,g=lt(f.completed,u),v=e===`/api`?`localhost:6790`:e.replace(/^https?:\/\//,``),y=f.uptime?mt(f.uptime/1e3):`—`,b=yt(m.rss*1024*1024),S=!!i;return(0,x.jsxs)(`div`,{children:[(0,x.jsx)(tt,{title:`Overview`,description:`Real-time system health at a glance.`,live:!0}),i&&(0,x.jsx)(Ge,{onRetry:o}),(0,x.jsxs)(`div`,{className:t(`mb-6 flex flex-wrap items-center justify-between gap-y-2 rounded-xl border px-5 py-4`,S?`border-amber-500/25 bg-amber-500/[0.06]`:`border-emerald-500/25 bg-emerald-500/[0.06]`),children:[(0,x.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,x.jsxs)(`span`,{className:`relative flex size-2.5`,children:[!S&&(0,x.jsx)(`span`,{className:`absolute inline-flex size-full animate-ping rounded-full bg-emerald-400 opacity-60`}),(0,x.jsx)(`span`,{className:t(`relative inline-flex size-2.5 rounded-full`,S?`bg-amber-400`:`bg-emerald-400`)})]}),(0,x.jsxs)(`div`,{className:`min-w-0`,children:[(0,x.jsx)(`div`,{className:t(`font-semibold`,S?`text-warning`:`text-success`),children:S?`Connection lost — showing last known data`:`bunqueue server connected`}),(0,x.jsxs)(`div`,{className:`truncate font-mono text-xs text-muted`,children:[v,` · uptime `,y,` · `,b,` RAM`]})]})]}),(0,x.jsx)(`span`,{className:t(`rounded-full px-3 py-1 text-xs font-medium`,S?`bg-amber-500/15 text-warning`:`bg-emerald-500/15 text-success`),children:S?`Stale`:`Online`})]}),(0,x.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 md:grid-cols-3 xl:grid-cols-6`,children:[(0,x.jsx)(W,{label:`Completed`,value:Z(f.completed),tone:`green`}),(0,x.jsx)(W,{label:`Failed`,value:Z(u),tone:u?`red`:`default`}),(0,x.jsx)(W,{label:`Waiting`,value:Z(f.waiting),tone:`amber`}),(0,x.jsx)(W,{label:`Active`,value:Z(f.active),tone:`blue`}),(0,x.jsx)(W,{label:`Error Rate`,value:g==null?`—`:ct(g),tone:g==null?`default`:g>.05?`red`:`green`}),(0,x.jsx)(W,{label:`DLQ`,value:Z(f.dlq),tone:f.dlq?`red`:`default`})]}),(0,x.jsxs)(`div`,{className:`mt-4 grid grid-cols-2 gap-4 md:grid-cols-3 xl:grid-cols-6`,children:[(0,x.jsx)(W,{label:`Push/sec`,value:p.pushPerSec.toFixed(1),tone:`accent`,hint:`jobs/sec`}),(0,x.jsx)(W,{label:`Pull/sec`,value:p.pullPerSec.toFixed(1),tone:`accent`,hint:`jobs/sec`}),(0,x.jsx)(W,{label:`Queues`,value:Z(c),hint:`${h.total} cron active`}),(0,x.jsx)(W,{label:`Total Pushed`,value:Z(f.totalPushed),hint:`since restart`}),(0,x.jsx)(W,{label:`API Keys`,value:+!!n,hint:n?`token set`:`no auth`}),(0,x.jsx)(W,{label:`Uptime`,value:y,hint:`${b} RAM`})]}),(0,x.jsxs)(`div`,{className:`mt-8`,children:[(0,x.jsx)(kt,{title:`Queue Health`,to:`/queues`}),l.length===0?(0,x.jsx)(V,{children:(0,x.jsx)(`p`,{className:`py-4 text-center text-sm text-faint`,children:`No queues yet.`})}):(0,x.jsx)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3`,children:l.map(e=>(0,x.jsxs)(d,{to:`/queues/${encodeURIComponent(e.name)}`,className:`rounded-xl border border-line bg-surface p-4 transition-colors hover:border-line-strong`,children:[(0,x.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-2`,children:[(0,x.jsx)(`span`,{className:`truncate font-mono text-sm font-medium text-accent`,children:e.name}),(0,x.jsx)(`span`,{className:t(`shrink-0 rounded-full px-2 py-0.5 text-[11px] font-medium`,e.paused?`bg-orange-500/10 text-orange-400`:`bg-emerald-500/10 text-success`),children:e.paused?`paused`:`active`})]}),(0,x.jsxs)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-1 font-mono text-xs text-faint`,children:[(0,x.jsx)($,{label:`W`,value:e.counts?.waiting,tone:`text-warning`}),(0,x.jsx)($,{label:`A`,value:e.counts?.active,tone:`text-blue-400`}),(0,x.jsx)($,{label:`C`,value:e.counts?.completed,tone:`text-success`}),(0,x.jsx)($,{label:`F`,value:e.counts?.failed,tone:`text-danger`})]})]},e.name))})]}),(0,x.jsx)(Ot,{})]})}function Ot(){let{events:e}=Tt();return(0,x.jsxs)(`div`,{className:`mt-8`,children:[(0,x.jsx)(kt,{title:`Recent Activity`,to:`/logs`}),(0,x.jsx)(V,{padded:!1,children:e.length===0?(0,x.jsx)(`p`,{className:`py-8 text-center text-sm text-faint`,children:`Waiting for live activity…`}):(0,x.jsx)(`ul`,{className:`divide-y divide-line`,children:e.slice(0,8).map(e=>(0,x.jsxs)(`li`,{className:`flex items-center justify-between px-5 py-3`,children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,x.jsx)(`span`,{className:t(`size-2 rounded-full`,At(e.status))}),(0,x.jsxs)(`div`,{className:`text-sm`,children:[(0,x.jsx)(`span`,{className:`font-mono font-medium text-fg`,children:e.queue||`—`}),(0,x.jsx)(`span`,{className:`text-faint`,children:` · `}),(0,x.jsx)(`span`,{className:`font-mono text-xs text-faint`,children:e.jobId?e.jobId.slice(0,8):`—`}),(0,x.jsx)(`span`,{className:`text-faint`,children:` · `}),(0,x.jsx)(`span`,{className:`capitalize text-muted`,children:e.status})]})]}),(0,x.jsx)(`span`,{className:`text-xs text-faint`,children:dt(e.timestamp)})]},e.seq))})})]})}function kt({title:e,to:t}){return(0,x.jsxs)(`div`,{className:`mb-3 flex items-center justify-between`,children:[(0,x.jsx)(`h2`,{className:`text-lg font-semibold text-fg`,children:e}),(0,x.jsxs)(d,{to:t,className:`flex items-center gap-1 text-sm text-muted hover:text-fg`,children:[`View All `,(0,x.jsx)(A,{className:`size-3.5`})]})]})}function $({label:e,value:n,tone:r}){return(0,x.jsxs)(`span`,{children:[e,` `,(0,x.jsx)(`span`,{className:t(`tnum font-semibold`,r),children:n==null?`—`:Z(n)})]})}function At(e){switch(e){case`completed`:return`bg-emerald-400`;case`failed`:return`bg-red-400`;case`active`:return`bg-blue-400`;case`waiting`:return`bg-amber-400`;default:return`bg-accent`}}function jt(){return(0,x.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-3 py-24 text-center`,children:[(0,x.jsx)(`div`,{className:`text-5xl font-bold text-faint`,children:`404`}),(0,x.jsx)(`p`,{className:`text-sm text-muted`,children:`This page does not exist.`}),(0,x.jsx)(d,{to:`/`,className:`rounded-lg border border-line bg-surface-2 px-4 py-2 text-sm font-medium text-fg hover:border-line-strong`,children:`Back to Overview`})]})}var Mt=(0,b.lazy)(()=>i(()=>import(`./AddJob-CgeLluaI.js`).then(e=>({default:e.AddJob})),__vite__mapDeps([4,1,2,3]))),Nt=(0,b.lazy)(()=>i(()=>import(`./Benchmark-DrUL2MGj.js`).then(e=>({default:e.Benchmark})),__vite__mapDeps([5,1,2,3,6,7]))),Pt=(0,b.lazy)(()=>i(()=>import(`./CronManager-C8DgqC22.js`).then(e=>({default:e.CronManager})),__vite__mapDeps([8,1,2,3,9]))),Ft=(0,b.lazy)(()=>i(()=>import(`./Database-3TVTb28B.js`).then(e=>({default:e.Database})),__vite__mapDeps([10,1,2,3,9,7]))),It=(0,b.lazy)(()=>i(()=>import(`./Diagnostics-Bx3SLh8R.js`).then(e=>({default:e.Diagnostics})),__vite__mapDeps([11,1,2]))),Lt=(0,b.lazy)(()=>i(()=>import(`./DlqControl-BuoZGZiz.js`).then(e=>({default:e.DlqControl})),__vite__mapDeps([12,1,2,3,9]))),Rt=(0,b.lazy)(()=>i(()=>import(`./DlqPro-Dc4R2c0h.js`).then(e=>({default:e.DlqPro})),__vite__mapDeps([13,1,2,3,9]))),zt=(0,b.lazy)(()=>i(()=>import(`./Flows-uJwr4Xtd.js`).then(e=>({default:e.Flows})),__vite__mapDeps([14,1,2]))),Bt=(0,b.lazy)(()=>i(()=>import(`./JobInspector-BHzMp9AE.js`).then(e=>({default:e.JobInspector})),__vite__mapDeps([15,1,2,3,7,16]))),Vt=(0,b.lazy)(()=>i(()=>import(`./JobsPro-B8ZXHQat.js`).then(e=>({default:e.JobsPro})),__vite__mapDeps([17,1,2,3,9,16]))),Ht=(0,b.lazy)(()=>i(()=>import(`./LogsPro-BsYmMhV3.js`).then(e=>({default:e.LogsPro})),__vite__mapDeps([18,1,2,3,9]))),Ut=(0,b.lazy)(()=>i(()=>import(`./McpServer-Dp5CU2Ao.js`).then(e=>({default:e.McpServer})),__vite__mapDeps([19,2,1,7]))),Wt=(0,b.lazy)(()=>i(()=>import(`./MetricsPro-59vtSH96.js`).then(e=>({default:e.MetricsPro})),__vite__mapDeps([20,1,2,9,6]))),Gt=(0,b.lazy)(()=>i(()=>import(`./QueueControl-Bnk114Oa.js`).then(e=>({default:e.QueueControl})),__vite__mapDeps([21,1,2,3]))),Kt=(0,b.lazy)(()=>i(()=>import(`./QueuesOverview-2q1ROf6f.js`).then(e=>({default:e.QueuesOverview})),__vite__mapDeps([22,1,2,9]))),qt=(0,b.lazy)(()=>i(()=>import(`./S3BackupPro-MKhVJfmN.js`).then(e=>({default:e.S3BackupPro})),__vite__mapDeps([23,1,2,24,3]))),Jt=(0,b.lazy)(()=>i(()=>import(`./ServerControl-MwMUqZXA.js`).then(e=>({default:e.ServerControl})),__vite__mapDeps([25,1,2,3,7]))),Yt=(0,b.lazy)(()=>i(()=>import(`./UsagePro-Dvnkxjtk.js`).then(e=>({default:e.UsagePro})),__vite__mapDeps([26,2,1]))),Xt=(0,b.lazy)(()=>i(()=>import(`./Webhooks-DI-3YwZu.js`).then(e=>({default:e.Webhooks})),__vite__mapDeps([27,1,2,3,9]))),Zt=(0,b.lazy)(()=>i(()=>import(`./WorkersPro-DXnomAJx.js`).then(e=>({default:e.WorkersPro})),__vite__mapDeps([28,1,2]))),Qt=(0,b.lazy)(()=>i(()=>import(`./Cron-CGpba--B.js`).then(e=>({default:e.Cron})),__vite__mapDeps([29,1,2,9]))),$t=(0,b.lazy)(()=>i(()=>import(`./Dlq-fvEtz0IH.js`).then(e=>({default:e.Dlq})),__vite__mapDeps([30,1,2,3,9]))),en=(0,b.lazy)(()=>i(()=>import(`./Jobs-B3ngaITT.js`).then(e=>({default:e.Jobs})),__vite__mapDeps([31,1,2,3]))),tn=(0,b.lazy)(()=>i(()=>import(`./Logs-BFNzXnJu.js`).then(e=>({default:e.Logs})),__vite__mapDeps([32,1,2,3,9]))),nn=(0,b.lazy)(()=>i(()=>import(`./Metrics-BIy2WsIk.js`).then(e=>({default:e.Metrics})),__vite__mapDeps([33,2,1]))),rn=(0,b.lazy)(()=>i(()=>import(`./Overview-CKCv4aez.js`).then(e=>({default:e.Overview})),__vite__mapDeps([34,2,1]))),an=(0,b.lazy)(()=>i(()=>import(`./QueueDetail-BjblUfMz.js`).then(e=>({default:e.QueueDetail})),__vite__mapDeps([35,1,2,3]))),on=(0,b.lazy)(()=>i(()=>import(`./Queues-DLfqg-GX.js`).then(e=>({default:e.Queues})),__vite__mapDeps([36,1,2,9]))),sn=(0,b.lazy)(()=>i(()=>import(`./S3Backup-BnL4NviE.js`).then(e=>({default:e.S3Backup})),__vite__mapDeps([37,2,1]))),cn=(0,b.lazy)(()=>i(()=>import(`./Settings-Bg4nYelW.js`).then(e=>({default:e.Settings})),__vite__mapDeps([38,1,2,24,3]))),ln=(0,b.lazy)(()=>i(()=>import(`./Usage-Cf-_mayK.js`).then(e=>({default:e.Usage})),__vite__mapDeps([39,2,1]))),un=(0,b.lazy)(()=>i(()=>import(`./Workers-DzewyMtr.js`).then(e=>({default:e.Workers})),__vite__mapDeps([40,1,2,9])));function dn(){return(0,x.jsx)(f,{children:(0,x.jsxs)(l,{element:(0,x.jsx)(Ze,{}),children:[(0,x.jsx)(l,{path:`/`,element:(0,x.jsx)(Dt,{})}),(0,x.jsx)(l,{path:`/overview-classic`,element:(0,x.jsx)(rn,{})}),(0,x.jsx)(l,{path:`/queues`,element:(0,x.jsx)(Kt,{})}),(0,x.jsx)(l,{path:`/queues-classic`,element:(0,x.jsx)(on,{})}),(0,x.jsx)(l,{path:`/queues/:name`,element:(0,x.jsx)(an,{})}),(0,x.jsx)(l,{path:`/jobs`,element:(0,x.jsx)(Vt,{})}),(0,x.jsx)(l,{path:`/jobs-classic`,element:(0,x.jsx)(en,{})}),(0,x.jsx)(l,{path:`/dlq`,element:(0,x.jsx)(Rt,{})}),(0,x.jsx)(l,{path:`/dlq-classic`,element:(0,x.jsx)($t,{})}),(0,x.jsx)(l,{path:`/cron`,element:(0,x.jsx)(Pt,{})}),(0,x.jsx)(l,{path:`/cron-classic`,element:(0,x.jsx)(Qt,{})}),(0,x.jsx)(l,{path:`/flows`,element:(0,x.jsx)(zt,{})}),(0,x.jsx)(l,{path:`/metrics`,element:(0,x.jsx)(Wt,{})}),(0,x.jsx)(l,{path:`/metrics-classic`,element:(0,x.jsx)(nn,{})}),(0,x.jsx)(l,{path:`/workers`,element:(0,x.jsx)(Zt,{})}),(0,x.jsx)(l,{path:`/workers-classic`,element:(0,x.jsx)(un,{})}),(0,x.jsx)(l,{path:`/logs`,element:(0,x.jsx)(Ht,{})}),(0,x.jsx)(l,{path:`/logs-classic`,element:(0,x.jsx)(tn,{})}),(0,x.jsx)(l,{path:`/server`,element:(0,x.jsx)(Jt,{})}),(0,x.jsx)(l,{path:`/add-job`,element:(0,x.jsx)(Mt,{})}),(0,x.jsx)(l,{path:`/job`,element:(0,x.jsx)(Bt,{})}),(0,x.jsx)(l,{path:`/queue-control`,element:(0,x.jsx)(Gt,{})}),(0,x.jsx)(l,{path:`/cron-manager`,element:(0,x.jsx)(Pt,{})}),(0,x.jsx)(l,{path:`/dlq-control`,element:(0,x.jsx)(Lt,{})}),(0,x.jsx)(l,{path:`/webhooks`,element:(0,x.jsx)(Xt,{})}),(0,x.jsx)(l,{path:`/diagnostics`,element:(0,x.jsx)(It,{})}),(0,x.jsx)(l,{path:`/benchmark`,element:(0,x.jsx)(Nt,{})}),(0,x.jsx)(l,{path:`/database`,element:(0,x.jsx)(Ft,{})}),(0,x.jsx)(l,{path:`/mcp`,element:(0,x.jsx)(Ut,{})}),(0,x.jsx)(l,{path:`/usage`,element:(0,x.jsx)(Yt,{})}),(0,x.jsx)(l,{path:`/usage-classic`,element:(0,x.jsx)(ln,{})}),(0,x.jsx)(l,{path:`/s3`,element:(0,x.jsx)(qt,{})}),(0,x.jsx)(l,{path:`/s3-classic`,element:(0,x.jsx)(sn,{})}),(0,x.jsx)(l,{path:`/settings`,element:(0,x.jsx)(cn,{})}),(0,x.jsx)(l,{path:`*`,element:(0,x.jsx)(jt,{})})]})})}ee();var fn=document.getElementById(`root`);if(!fn)throw Error(`Root element #root not found`);function pn(){(0,y.createRoot)(fn).render((0,x.jsx)(b.StrictMode,{children:(0,x.jsx)(c,{basename:`/`,children:(0,x.jsx)(dn,{})})}))}H()?i(()=>import(`./install-BvB40Zk0.js`).then(e=>e.installDemo()),[]).catch(()=>{}).finally(pn):pn();export{Te as A,ve as B,Ue as C,ze as D,Ve as E,fe as F,E as G,ae as H,ye as I,_e as J,ge as K,xe as L,F as M,A as N,Be as O,be as P,re as R,We as S,V as T,me as U,k as V,pe as W,O as X,he as Y,w as Z,W as _,ut as a,et as b,Z as c,mt as d,pt as f,X as g,at as h,ht as i,I as j,B as k,ct as l,G as m,lt as n,ft as o,vt as p,se as q,yt as r,gt as s,Tt as t,dt as u,tt as v,Ge as w,H as x,$e as y,D as z};
|
|
8
|
+
`))!==-1;){let e=o[r]===`\r`,n=o.slice(0,r);o=o.slice(r+(e?4:2));let i=xt(n.replace(/\r/g,``));i&&t(i)}}}finally{i.releaseLock()}}var Q={total:0,completed:0,failed:0,waiting:0,active:0},Ct=250;function wt(e){let t=e.includes(`:`)?e.split(`:`)[1]:e;switch(t){case`pushed`:case`added`:return`waiting`;case`pulled`:return`active`;case`progress`:return`active`;default:return t}}function Tt(e){let t=_(e=>e.baseUrl),n=_(e=>e.token),[r,i]=(0,b.useState)([]),[a,o]=(0,b.useState)(Q),[s,c]=(0,b.useState)(0),[l,u]=(0,b.useState)(!1),d=(0,b.useRef)([]),f=(0,b.useRef)([]),p=(0,b.useRef)({...Q});return(0,b.useEffect)(()=>{let t=new AbortController,n=0,r=!1;i([]),o(Q),d.current=[],f.current=[],p.current={...Q};let a=e=>new Promise(n=>{let r=()=>{clearTimeout(i),n()},i=setTimeout(()=>{t.signal.removeEventListener(`abort`,r),n()},e);t.signal.addEventListener(`abort`,r,{once:!0})}),s=e=>{if(bt(e)&&u(!0),!e.event.startsWith(`job:`))return;let t=e.data??{},r=wt(e.event),i={seq:++n,event:e.event,queue:t.queue,jobId:t.jobId,name:t.name,status:r,timestamp:t.timestamp??Date.now(),error:t.error,progress:t.progress};f.current.push(i);let a=p.current;a.total+=1,r===`completed`?a.completed+=1:r===`failed`?a.failed+=1:r===`waiting`?a.waiting+=1:r===`active`&&(a.active+=1),d.current.push(Date.now())};(async()=>{for(;!r;){try{await St(F.eventsUrl(e),s,t.signal)}catch{}if(r)break;u(!1),await a(2e3)}})();let c=setInterval(()=>{if(f.current.length){let e=f.current;f.current=[],e.reverse(),i(t=>[...e,...t].slice(0,Ct))}let e=p.current;e.total&&(p.current={...Q},o(t=>({total:t.total+e.total,completed:t.completed+e.completed,failed:t.failed+e.failed,waiting:t.waiting+e.waiting,active:t.active+e.active})))},150);return()=>{r=!0,t.abort(),clearInterval(c),u(!1)}},[e,t,n]),(0,b.useEffect)(()=>{let e=setInterval(()=>{let e=Date.now();d.current=d.current.filter(t=>e-t<5e3),c(d.current.length/5)},1e3);return()=>clearInterval(e)},[]),{events:r,counters:a,throughput:s,connected:l}}var Et={overview:{stats:{waiting:0,active:0,delayed:0,completed:0,dlq:0,totalPushed:0,totalPulled:0,totalCompleted:0,totalFailed:0,uptime:0},throughput:{pushPerSec:0,pullPerSec:0,completePerSec:0,failPerSec:0},memory:{heapUsed:0,heapTotal:0,rss:0},crons:{total:0}},queuesTotal:0,details:[],failedTotal:0};function Dt(){let e=_(e=>e.baseUrl),n=_(e=>e.token),{data:r,error:i,loading:a,refetch:o}=I(async()=>{let[e,t]=await Promise.all([X.overview(),X.queuesSummary()]),n=t.slice(0,6).map(e=>({name:e.name,paused:e.paused,counts:e.counts})),r=t.reduce((e,t)=>e+(t.counts?.failed??0),0);return{overview:e,queuesTotal:t.length,details:n,failedTotal:r}},[]);if(a&&!r&&!i)return(0,x.jsx)(Ue,{label:`Loading overview…`});let{overview:s,queuesTotal:c,details:l,failedTotal:u}=r??Et,{stats:f,throughput:p,memory:m,crons:h}=s,g=lt(f.completed,u),v=e===`/api`?`localhost:6790`:e.replace(/^https?:\/\//,``),y=f.uptime?mt(f.uptime/1e3):`—`,b=yt(m.rss*1024*1024),S=!!i;return(0,x.jsxs)(`div`,{children:[(0,x.jsx)(tt,{title:`Overview`,description:`Real-time system health at a glance.`,live:!0}),i&&(0,x.jsx)(Ge,{onRetry:o}),(0,x.jsxs)(`div`,{className:t(`mb-6 flex flex-wrap items-center justify-between gap-y-2 rounded-xl border px-5 py-4`,S?`border-amber-500/25 bg-amber-500/[0.06]`:`border-emerald-500/25 bg-emerald-500/[0.06]`),children:[(0,x.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,x.jsxs)(`span`,{className:`relative flex size-2.5`,children:[!S&&(0,x.jsx)(`span`,{className:`absolute inline-flex size-full animate-ping rounded-full bg-emerald-400 opacity-60`}),(0,x.jsx)(`span`,{className:t(`relative inline-flex size-2.5 rounded-full`,S?`bg-amber-400`:`bg-emerald-400`)})]}),(0,x.jsxs)(`div`,{className:`min-w-0`,children:[(0,x.jsx)(`div`,{className:t(`font-semibold`,S?`text-warning`:`text-success`),children:S?`Connection lost — showing last known data`:`bunqueue server connected`}),(0,x.jsxs)(`div`,{className:`truncate font-mono text-xs text-muted`,children:[v,` · uptime `,y,` · `,b,` RAM`]})]})]}),(0,x.jsx)(`span`,{className:t(`rounded-full px-3 py-1 text-xs font-medium`,S?`bg-amber-500/15 text-warning`:`bg-emerald-500/15 text-success`),children:S?`Stale`:`Online`})]}),(0,x.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 md:grid-cols-3 xl:grid-cols-6`,children:[(0,x.jsx)(W,{label:`Completed`,value:Z(f.completed),tone:`green`}),(0,x.jsx)(W,{label:`Failed`,value:Z(u),tone:u?`red`:`default`}),(0,x.jsx)(W,{label:`Waiting`,value:Z(f.waiting),tone:`amber`}),(0,x.jsx)(W,{label:`Active`,value:Z(f.active),tone:`blue`}),(0,x.jsx)(W,{label:`Error Rate`,value:g==null?`—`:ct(g),tone:g==null?`default`:g>.05?`red`:`green`}),(0,x.jsx)(W,{label:`DLQ`,value:Z(f.dlq),tone:f.dlq?`red`:`default`})]}),(0,x.jsxs)(`div`,{className:`mt-4 grid grid-cols-2 gap-4 md:grid-cols-3 xl:grid-cols-6`,children:[(0,x.jsx)(W,{label:`Push/sec`,value:p.pushPerSec.toFixed(1),tone:`accent`,hint:`jobs/sec`}),(0,x.jsx)(W,{label:`Pull/sec`,value:p.pullPerSec.toFixed(1),tone:`accent`,hint:`jobs/sec`}),(0,x.jsx)(W,{label:`Queues`,value:Z(c),hint:`${h.total} cron active`}),(0,x.jsx)(W,{label:`Total Pushed`,value:Z(f.totalPushed),hint:`since restart`}),(0,x.jsx)(W,{label:`API Keys`,value:+!!n,hint:n?`token set`:`no auth`}),(0,x.jsx)(W,{label:`Uptime`,value:y,hint:`${b} RAM`})]}),(0,x.jsxs)(`div`,{className:`mt-8`,children:[(0,x.jsx)(kt,{title:`Queue Health`,to:`/queues`}),l.length===0?(0,x.jsx)(V,{children:(0,x.jsx)(`p`,{className:`py-4 text-center text-sm text-faint`,children:`No queues yet.`})}):(0,x.jsx)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3`,children:l.map(e=>(0,x.jsxs)(d,{to:`/queues/${encodeURIComponent(e.name)}`,className:`rounded-xl border border-line bg-surface p-4 transition-colors hover:border-line-strong`,children:[(0,x.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-2`,children:[(0,x.jsx)(`span`,{className:`truncate font-mono text-sm font-medium text-accent`,children:e.name}),(0,x.jsx)(`span`,{className:t(`shrink-0 rounded-full px-2 py-0.5 text-[11px] font-medium`,e.paused?`bg-orange-500/10 text-orange-400`:`bg-emerald-500/10 text-success`),children:e.paused?`paused`:`active`})]}),(0,x.jsxs)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-1 font-mono text-xs text-faint`,children:[(0,x.jsx)($,{label:`W`,value:e.counts?.waiting,tone:`text-warning`}),(0,x.jsx)($,{label:`A`,value:e.counts?.active,tone:`text-blue-400`}),(0,x.jsx)($,{label:`C`,value:e.counts?.completed,tone:`text-success`}),(0,x.jsx)($,{label:`F`,value:e.counts?.failed,tone:`text-danger`})]})]},e.name))})]}),(0,x.jsx)(Ot,{})]})}function Ot(){let{events:e}=Tt();return(0,x.jsxs)(`div`,{className:`mt-8`,children:[(0,x.jsx)(kt,{title:`Recent Activity`,to:`/logs`}),(0,x.jsx)(V,{padded:!1,children:e.length===0?(0,x.jsx)(`p`,{className:`py-8 text-center text-sm text-faint`,children:`Waiting for live activity…`}):(0,x.jsx)(`ul`,{className:`divide-y divide-line`,children:e.slice(0,8).map(e=>(0,x.jsxs)(`li`,{className:`flex items-center justify-between px-5 py-3`,children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,x.jsx)(`span`,{className:t(`size-2 rounded-full`,At(e.status))}),(0,x.jsxs)(`div`,{className:`text-sm`,children:[(0,x.jsx)(`span`,{className:`font-mono font-medium text-fg`,children:e.queue||`—`}),(0,x.jsx)(`span`,{className:`text-faint`,children:` · `}),(0,x.jsx)(`span`,{className:`font-mono text-xs text-faint`,children:e.jobId?e.jobId.slice(0,8):`—`}),(0,x.jsx)(`span`,{className:`text-faint`,children:` · `}),(0,x.jsx)(`span`,{className:`capitalize text-muted`,children:e.status})]})]}),(0,x.jsx)(`span`,{className:`text-xs text-faint`,children:dt(e.timestamp)})]},e.seq))})})]})}function kt({title:e,to:t}){return(0,x.jsxs)(`div`,{className:`mb-3 flex items-center justify-between`,children:[(0,x.jsx)(`h2`,{className:`text-lg font-semibold text-fg`,children:e}),(0,x.jsxs)(d,{to:t,className:`flex items-center gap-1 text-sm text-muted hover:text-fg`,children:[`View All `,(0,x.jsx)(A,{className:`size-3.5`})]})]})}function $({label:e,value:n,tone:r}){return(0,x.jsxs)(`span`,{children:[e,` `,(0,x.jsx)(`span`,{className:t(`tnum font-semibold`,r),children:n==null?`—`:Z(n)})]})}function At(e){switch(e){case`completed`:return`bg-emerald-400`;case`failed`:return`bg-red-400`;case`active`:return`bg-blue-400`;case`waiting`:return`bg-amber-400`;default:return`bg-accent`}}function jt(){return(0,x.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-3 py-24 text-center`,children:[(0,x.jsx)(`div`,{className:`text-5xl font-bold text-faint`,children:`404`}),(0,x.jsx)(`p`,{className:`text-sm text-muted`,children:`This page does not exist.`}),(0,x.jsx)(d,{to:`/`,className:`rounded-lg border border-line bg-surface-2 px-4 py-2 text-sm font-medium text-fg hover:border-line-strong`,children:`Back to Overview`})]})}var Mt=(0,b.lazy)(()=>i(()=>import(`./AddJob-CMIT6e17.js`).then(e=>({default:e.AddJob})),__vite__mapDeps([4,1,2,3]))),Nt=(0,b.lazy)(()=>i(()=>import(`./Benchmark-Dq1-vJ2k.js`).then(e=>({default:e.Benchmark})),__vite__mapDeps([5,1,2,3,6,7]))),Pt=(0,b.lazy)(()=>i(()=>import(`./CronManager-BQupx6wZ.js`).then(e=>({default:e.CronManager})),__vite__mapDeps([8,1,2,3,9]))),Ft=(0,b.lazy)(()=>i(()=>import(`./Database-Difs7xYV.js`).then(e=>({default:e.Database})),__vite__mapDeps([10,1,2,3,9,7]))),It=(0,b.lazy)(()=>i(()=>import(`./Diagnostics-BzVDq9CH.js`).then(e=>({default:e.Diagnostics})),__vite__mapDeps([11,1,2]))),Lt=(0,b.lazy)(()=>i(()=>import(`./DlqControl-Cu2i1oq5.js`).then(e=>({default:e.DlqControl})),__vite__mapDeps([12,1,2,3,9]))),Rt=(0,b.lazy)(()=>i(()=>import(`./DlqPro-HBrCftLD.js`).then(e=>({default:e.DlqPro})),__vite__mapDeps([13,1,2,3,9]))),zt=(0,b.lazy)(()=>i(()=>import(`./Flows-D3Bvkmd6.js`).then(e=>({default:e.Flows})),__vite__mapDeps([14,1,2]))),Bt=(0,b.lazy)(()=>i(()=>import(`./JobInspector-B7zEuFhM.js`).then(e=>({default:e.JobInspector})),__vite__mapDeps([15,1,2,3,7,16]))),Vt=(0,b.lazy)(()=>i(()=>import(`./JobsPro-DNZivuzq.js`).then(e=>({default:e.JobsPro})),__vite__mapDeps([17,1,2,3,9,16]))),Ht=(0,b.lazy)(()=>i(()=>import(`./LogsPro-P73LCkap.js`).then(e=>({default:e.LogsPro})),__vite__mapDeps([18,1,2,3,9]))),Ut=(0,b.lazy)(()=>i(()=>import(`./McpServer-CUK20-uN.js`).then(e=>({default:e.McpServer})),__vite__mapDeps([19,2,1,7]))),Wt=(0,b.lazy)(()=>i(()=>import(`./MetricsPro-CqcH6gJp.js`).then(e=>({default:e.MetricsPro})),__vite__mapDeps([20,1,2,9,6]))),Gt=(0,b.lazy)(()=>i(()=>import(`./QueueControl-D7J1JObu.js`).then(e=>({default:e.QueueControl})),__vite__mapDeps([21,1,2,3]))),Kt=(0,b.lazy)(()=>i(()=>import(`./QueuesOverview-DrYjyped.js`).then(e=>({default:e.QueuesOverview})),__vite__mapDeps([22,1,2,9]))),qt=(0,b.lazy)(()=>i(()=>import(`./S3BackupPro-BEo_EVAO.js`).then(e=>({default:e.S3BackupPro})),__vite__mapDeps([23,1,2,24,3]))),Jt=(0,b.lazy)(()=>i(()=>import(`./ServerControl-BRLFRj7k.js`).then(e=>({default:e.ServerControl})),__vite__mapDeps([25,1,2,3,7]))),Yt=(0,b.lazy)(()=>i(()=>import(`./UsagePro-Cto9k5OI.js`).then(e=>({default:e.UsagePro})),__vite__mapDeps([26,2,1]))),Xt=(0,b.lazy)(()=>i(()=>import(`./Webhooks-Cm3vZEp7.js`).then(e=>({default:e.Webhooks})),__vite__mapDeps([27,1,2,3,9]))),Zt=(0,b.lazy)(()=>i(()=>import(`./WorkersPro-BidtV_Bp.js`).then(e=>({default:e.WorkersPro})),__vite__mapDeps([28,1,2]))),Qt=(0,b.lazy)(()=>i(()=>import(`./Cron-9hndZ-Z5.js`).then(e=>({default:e.Cron})),__vite__mapDeps([29,1,2,9]))),$t=(0,b.lazy)(()=>i(()=>import(`./Dlq-BCUVh_NO.js`).then(e=>({default:e.Dlq})),__vite__mapDeps([30,1,2,3,9]))),en=(0,b.lazy)(()=>i(()=>import(`./Jobs-ovYRwmwi.js`).then(e=>({default:e.Jobs})),__vite__mapDeps([31,1,2,3]))),tn=(0,b.lazy)(()=>i(()=>import(`./Logs-CjM7MNYN.js`).then(e=>({default:e.Logs})),__vite__mapDeps([32,1,2,3,9]))),nn=(0,b.lazy)(()=>i(()=>import(`./Metrics-BodjiKpf.js`).then(e=>({default:e.Metrics})),__vite__mapDeps([33,2,1]))),rn=(0,b.lazy)(()=>i(()=>import(`./Overview-AwCA3XI2.js`).then(e=>({default:e.Overview})),__vite__mapDeps([34,2,1]))),an=(0,b.lazy)(()=>i(()=>import(`./QueueDetail-BtiN0s3b.js`).then(e=>({default:e.QueueDetail})),__vite__mapDeps([35,1,2,3]))),on=(0,b.lazy)(()=>i(()=>import(`./Queues-LrodynCj.js`).then(e=>({default:e.Queues})),__vite__mapDeps([36,1,2,9]))),sn=(0,b.lazy)(()=>i(()=>import(`./S3Backup-et1PcCC0.js`).then(e=>({default:e.S3Backup})),__vite__mapDeps([37,2,1]))),cn=(0,b.lazy)(()=>i(()=>import(`./Settings-CeRZgZU6.js`).then(e=>({default:e.Settings})),__vite__mapDeps([38,1,2,24,3]))),ln=(0,b.lazy)(()=>i(()=>import(`./Usage-CHCg6VNy.js`).then(e=>({default:e.Usage})),__vite__mapDeps([39,2,1]))),un=(0,b.lazy)(()=>i(()=>import(`./Workers-CVfx3TK-.js`).then(e=>({default:e.Workers})),__vite__mapDeps([40,1,2,9])));function dn(){return(0,x.jsx)(f,{children:(0,x.jsxs)(l,{element:(0,x.jsx)(Ze,{}),children:[(0,x.jsx)(l,{path:`/`,element:(0,x.jsx)(Dt,{})}),(0,x.jsx)(l,{path:`/overview-classic`,element:(0,x.jsx)(rn,{})}),(0,x.jsx)(l,{path:`/queues`,element:(0,x.jsx)(Kt,{})}),(0,x.jsx)(l,{path:`/queues-classic`,element:(0,x.jsx)(on,{})}),(0,x.jsx)(l,{path:`/queues/:name`,element:(0,x.jsx)(an,{})}),(0,x.jsx)(l,{path:`/jobs`,element:(0,x.jsx)(Vt,{})}),(0,x.jsx)(l,{path:`/jobs-classic`,element:(0,x.jsx)(en,{})}),(0,x.jsx)(l,{path:`/dlq`,element:(0,x.jsx)(Rt,{})}),(0,x.jsx)(l,{path:`/dlq-classic`,element:(0,x.jsx)($t,{})}),(0,x.jsx)(l,{path:`/cron`,element:(0,x.jsx)(Pt,{})}),(0,x.jsx)(l,{path:`/cron-classic`,element:(0,x.jsx)(Qt,{})}),(0,x.jsx)(l,{path:`/flows`,element:(0,x.jsx)(zt,{})}),(0,x.jsx)(l,{path:`/metrics`,element:(0,x.jsx)(Wt,{})}),(0,x.jsx)(l,{path:`/metrics-classic`,element:(0,x.jsx)(nn,{})}),(0,x.jsx)(l,{path:`/workers`,element:(0,x.jsx)(Zt,{})}),(0,x.jsx)(l,{path:`/workers-classic`,element:(0,x.jsx)(un,{})}),(0,x.jsx)(l,{path:`/logs`,element:(0,x.jsx)(Ht,{})}),(0,x.jsx)(l,{path:`/logs-classic`,element:(0,x.jsx)(tn,{})}),(0,x.jsx)(l,{path:`/server`,element:(0,x.jsx)(Jt,{})}),(0,x.jsx)(l,{path:`/add-job`,element:(0,x.jsx)(Mt,{})}),(0,x.jsx)(l,{path:`/job`,element:(0,x.jsx)(Bt,{})}),(0,x.jsx)(l,{path:`/queue-control`,element:(0,x.jsx)(Gt,{})}),(0,x.jsx)(l,{path:`/cron-manager`,element:(0,x.jsx)(Pt,{})}),(0,x.jsx)(l,{path:`/dlq-control`,element:(0,x.jsx)(Lt,{})}),(0,x.jsx)(l,{path:`/webhooks`,element:(0,x.jsx)(Xt,{})}),(0,x.jsx)(l,{path:`/diagnostics`,element:(0,x.jsx)(It,{})}),(0,x.jsx)(l,{path:`/benchmark`,element:(0,x.jsx)(Nt,{})}),(0,x.jsx)(l,{path:`/database`,element:(0,x.jsx)(Ft,{})}),(0,x.jsx)(l,{path:`/mcp`,element:(0,x.jsx)(Ut,{})}),(0,x.jsx)(l,{path:`/usage`,element:(0,x.jsx)(Yt,{})}),(0,x.jsx)(l,{path:`/usage-classic`,element:(0,x.jsx)(ln,{})}),(0,x.jsx)(l,{path:`/s3`,element:(0,x.jsx)(qt,{})}),(0,x.jsx)(l,{path:`/s3-classic`,element:(0,x.jsx)(sn,{})}),(0,x.jsx)(l,{path:`/settings`,element:(0,x.jsx)(cn,{})}),(0,x.jsx)(l,{path:`*`,element:(0,x.jsx)(jt,{})})]})})}ee();var fn=document.getElementById(`root`);if(!fn)throw Error(`Root element #root not found`);function pn(){(0,y.createRoot)(fn).render((0,x.jsx)(b.StrictMode,{children:(0,x.jsx)(c,{basename:`/`,children:(0,x.jsx)(dn,{})})}))}H()?i(()=>import(`./install-BvB40Zk0.js`).then(e=>e.installDemo()),[]).catch(()=>{}).finally(pn):pn();export{Te as A,ve as B,Ue as C,ze as D,Ve as E,fe as F,E as G,ae as H,ye as I,_e as J,ge as K,xe as L,F as M,A as N,Be as O,be as P,re as R,We as S,V as T,me as U,k as V,pe as W,O as X,he as Y,w as Z,W as _,ut as a,et as b,Z as c,mt as d,pt as f,X as g,at as h,ht as i,I as j,B as k,ct as l,G as m,lt as n,ft as o,vt as p,se as q,yt as r,gt as s,Tt as t,dt as u,tt as v,Ge as w,H as x,$e as y,D as z};
|
package/dist/index.html
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</script>
|
|
19
19
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
20
20
|
<title>bunqueue · dashboard (beta)</title>
|
|
21
|
-
<script type="module" crossorigin src="/assets/index-
|
|
21
|
+
<script type="module" crossorigin src="/assets/index-C9fPU4bV.js"></script>
|
|
22
22
|
<link rel="modulepreload" crossorigin href="/assets/cn-CMFYpumL.js">
|
|
23
23
|
<link rel="modulepreload" crossorigin href="/assets/react-vendor-CHIHtdAC.js">
|
|
24
24
|
<link rel="modulepreload" crossorigin href="/assets/connectionStore-DI-LYcct.js">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bunqueue-dashboard",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Web dashboard for a bunqueue server (queues, jobs, DLQ, cron, metrics, workers, live activity). Run with `bunx bunqueue-dashboard` (requires Bun).",
|
|
6
6
|
"bin": {
|
package/scripts/embedded.gen.ts
CHANGED
|
@@ -1,106 +1,106 @@
|
|
|
1
1
|
// AUTO-GENERATED by scripts/gen-embed.ts — do not edit, not committed.
|
|
2
2
|
import f0 from "../dist/.vite/manifest.json" with { type: 'file' };
|
|
3
3
|
import f1 from "../dist/favicon.svg" with { type: 'file' };
|
|
4
|
-
import f2 from "../dist/assets/
|
|
5
|
-
import f3 from "../dist/assets/
|
|
6
|
-
import f4 from "../dist/assets/
|
|
7
|
-
import f5 from "../dist/assets/
|
|
8
|
-
import f6 from "../dist/assets/
|
|
9
|
-
import f7 from "../dist/assets/
|
|
10
|
-
import f8 from "../dist/assets/
|
|
11
|
-
import f9 from "../dist/assets/
|
|
12
|
-
import f10 from "../dist/assets/
|
|
13
|
-
import f11 from "../dist/assets/
|
|
14
|
-
import f12 from "../dist/assets/
|
|
15
|
-
import f13 from "../dist/assets/
|
|
16
|
-
import f14 from "../dist/assets/
|
|
17
|
-
import f15 from "../dist/assets/
|
|
18
|
-
import f16 from "../dist/assets/
|
|
19
|
-
import f17 from "../dist/assets/
|
|
20
|
-
import f18 from "../dist/assets/
|
|
21
|
-
import f19 from "../dist/assets/
|
|
22
|
-
import f20 from "../dist/assets/
|
|
23
|
-
import f21 from "../dist/assets/
|
|
24
|
-
import f22 from "../dist/assets/
|
|
25
|
-
import f23 from "../dist/assets/
|
|
26
|
-
import f24 from "../dist/assets/
|
|
27
|
-
import f25 from "../dist/assets/
|
|
28
|
-
import f26 from "../dist/assets/
|
|
29
|
-
import f27 from "../dist/assets/
|
|
30
|
-
import f28 from "../dist/assets/
|
|
31
|
-
import f29 from "../dist/assets/
|
|
32
|
-
import f30 from "../dist/assets/
|
|
33
|
-
import f31 from "../dist/assets/
|
|
34
|
-
import f32 from "../dist/assets/
|
|
35
|
-
import f33 from "../dist/assets/
|
|
36
|
-
import f34 from "../dist/assets/
|
|
37
|
-
import f35 from "../dist/assets/
|
|
38
|
-
import f36 from "../dist/assets/
|
|
39
|
-
import f37 from "../dist/assets/
|
|
40
|
-
import f38 from "../dist/assets/
|
|
41
|
-
import f39 from "../dist/assets/
|
|
42
|
-
import f40 from "../dist/assets/QueueDetail-
|
|
43
|
-
import f41 from "../dist/assets/
|
|
44
|
-
import f42 from "../dist/assets/
|
|
45
|
-
import f43 from "../dist/assets/
|
|
46
|
-
import f44 from "../dist/assets/
|
|
47
|
-
import f45 from "../dist/assets/
|
|
48
|
-
import f46 from "../dist/assets/
|
|
49
|
-
import f47 from "../dist/assets/
|
|
50
|
-
import f48 from "../dist/assets/
|
|
51
|
-
import f49 from "../dist/assets/
|
|
4
|
+
import f2 from "../dist/assets/LogsPro-P73LCkap.js" with { type: 'file' };
|
|
5
|
+
import f3 from "../dist/assets/AddJob-CMIT6e17.js" with { type: 'file' };
|
|
6
|
+
import f4 from "../dist/assets/DlqControl-Cu2i1oq5.js" with { type: 'file' };
|
|
7
|
+
import f5 from "../dist/assets/AreaChart-DzUXW8u3.js" with { type: 'file' };
|
|
8
|
+
import f6 from "../dist/assets/Overview-AwCA3XI2.js" with { type: 'file' };
|
|
9
|
+
import f7 from "../dist/assets/QueuesOverview-DrYjyped.js" with { type: 'file' };
|
|
10
|
+
import f8 from "../dist/assets/index-BWY8Yofc.css" with { type: 'file' };
|
|
11
|
+
import f9 from "../dist/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2" with { type: 'file' };
|
|
12
|
+
import f10 from "../dist/assets/S3Backup-et1PcCC0.js" with { type: 'file' };
|
|
13
|
+
import f11 from "../dist/assets/Logs-CjM7MNYN.js" with { type: 'file' };
|
|
14
|
+
import f12 from "../dist/assets/CronManager-BQupx6wZ.js" with { type: 'file' };
|
|
15
|
+
import f13 from "../dist/assets/JobInspector-B7zEuFhM.js" with { type: 'file' };
|
|
16
|
+
import f14 from "../dist/assets/Dlq-BCUVh_NO.js" with { type: 'file' };
|
|
17
|
+
import f15 from "../dist/assets/form-PtDLk33Z.js" with { type: 'file' };
|
|
18
|
+
import f16 from "../dist/assets/DlqPro-HBrCftLD.js" with { type: 'file' };
|
|
19
|
+
import f17 from "../dist/assets/index-C9fPU4bV.js" with { type: 'file' };
|
|
20
|
+
import f18 from "../dist/assets/Diagnostics-BzVDq9CH.js" with { type: 'file' };
|
|
21
|
+
import f19 from "../dist/assets/Pagination-Cd6lHj2E.js" with { type: 'file' };
|
|
22
|
+
import f20 from "../dist/assets/CopilotPanel-BDZzDmVy.js" with { type: 'file' };
|
|
23
|
+
import f21 from "../dist/assets/Jobs-ovYRwmwi.js" with { type: 'file' };
|
|
24
|
+
import f22 from "../dist/assets/JobsPro-DNZivuzq.js" with { type: 'file' };
|
|
25
|
+
import f23 from "../dist/assets/Cron-9hndZ-Z5.js" with { type: 'file' };
|
|
26
|
+
import f24 from "../dist/assets/CopyButton-XT7ykzf5.js" with { type: 'file' };
|
|
27
|
+
import f25 from "../dist/assets/react-vendor-CHIHtdAC.js" with { type: 'file' };
|
|
28
|
+
import f26 from "../dist/assets/WorkersPro-BidtV_Bp.js" with { type: 'file' };
|
|
29
|
+
import f27 from "../dist/assets/MetricsPro-CqcH6gJp.js" with { type: 'file' };
|
|
30
|
+
import f28 from "../dist/assets/jobActions-CuOdMglt.js" with { type: 'file' };
|
|
31
|
+
import f29 from "../dist/assets/Queues-LrodynCj.js" with { type: 'file' };
|
|
32
|
+
import f30 from "../dist/assets/connectionStore-DI-LYcct.js" with { type: 'file' };
|
|
33
|
+
import f31 from "../dist/assets/McpServer-CUK20-uN.js" with { type: 'file' };
|
|
34
|
+
import f32 from "../dist/assets/Usage-CHCg6VNy.js" with { type: 'file' };
|
|
35
|
+
import f33 from "../dist/assets/Settings-CeRZgZU6.js" with { type: 'file' };
|
|
36
|
+
import f34 from "../dist/assets/cn-CMFYpumL.js" with { type: 'file' };
|
|
37
|
+
import f35 from "../dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2" with { type: 'file' };
|
|
38
|
+
import f36 from "../dist/assets/Webhooks-Cm3vZEp7.js" with { type: 'file' };
|
|
39
|
+
import f37 from "../dist/assets/S3BackupPro-BEo_EVAO.js" with { type: 'file' };
|
|
40
|
+
import f38 from "../dist/assets/ServerControl-BRLFRj7k.js" with { type: 'file' };
|
|
41
|
+
import f39 from "../dist/assets/Workers-CVfx3TK-.js" with { type: 'file' };
|
|
42
|
+
import f40 from "../dist/assets/QueueDetail-BtiN0s3b.js" with { type: 'file' };
|
|
43
|
+
import f41 from "../dist/assets/Database-Difs7xYV.js" with { type: 'file' };
|
|
44
|
+
import f42 from "../dist/assets/UsagePro-Cto9k5OI.js" with { type: 'file' };
|
|
45
|
+
import f43 from "../dist/assets/QueueControl-D7J1JObu.js" with { type: 'file' };
|
|
46
|
+
import f44 from "../dist/assets/Metrics-BodjiKpf.js" with { type: 'file' };
|
|
47
|
+
import f45 from "../dist/assets/inter-latin-wght-normal-Dx4kXJAl.woff2" with { type: 'file' };
|
|
48
|
+
import f46 from "../dist/assets/install-BvB40Zk0.js" with { type: 'file' };
|
|
49
|
+
import f47 from "../dist/assets/Flows-D3Bvkmd6.js" with { type: 'file' };
|
|
50
|
+
import f48 from "../dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2" with { type: 'file' };
|
|
51
|
+
import f49 from "../dist/assets/Benchmark-Dq1-vJ2k.js" with { type: 'file' };
|
|
52
52
|
import f50 from "../dist/index.html" with { type: 'file' };
|
|
53
53
|
|
|
54
54
|
export const ASSETS: Record<string, string> = {
|
|
55
55
|
"/.vite/manifest.json": f0,
|
|
56
56
|
"/favicon.svg": f1,
|
|
57
|
-
"/assets/
|
|
58
|
-
"/assets/
|
|
59
|
-
"/assets/
|
|
60
|
-
"/assets/
|
|
61
|
-
"/assets/
|
|
62
|
-
"/assets/
|
|
63
|
-
"/assets/
|
|
64
|
-
"/assets/
|
|
65
|
-
"/assets/
|
|
66
|
-
"/assets/
|
|
67
|
-
"/assets/
|
|
68
|
-
"/assets/
|
|
69
|
-
"/assets/
|
|
70
|
-
"/assets/
|
|
71
|
-
"/assets/
|
|
72
|
-
"/assets/
|
|
73
|
-
"/assets/
|
|
74
|
-
"/assets/
|
|
75
|
-
"/assets/
|
|
76
|
-
"/assets/
|
|
77
|
-
"/assets/
|
|
78
|
-
"/assets/
|
|
79
|
-
"/assets/
|
|
80
|
-
"/assets/
|
|
81
|
-
"/assets/
|
|
82
|
-
"/assets/
|
|
83
|
-
"/assets/
|
|
84
|
-
"/assets/
|
|
85
|
-
"/assets/
|
|
86
|
-
"/assets/
|
|
87
|
-
"/assets/
|
|
88
|
-
"/assets/
|
|
89
|
-
"/assets/
|
|
90
|
-
"/assets/
|
|
91
|
-
"/assets/
|
|
92
|
-
"/assets/
|
|
93
|
-
"/assets/
|
|
94
|
-
"/assets/
|
|
95
|
-
"/assets/QueueDetail-
|
|
96
|
-
"/assets/
|
|
97
|
-
"/assets/
|
|
98
|
-
"/assets/
|
|
99
|
-
"/assets/
|
|
100
|
-
"/assets/
|
|
101
|
-
"/assets/
|
|
102
|
-
"/assets/
|
|
103
|
-
"/assets/
|
|
104
|
-
"/assets/
|
|
57
|
+
"/assets/LogsPro-P73LCkap.js": f2,
|
|
58
|
+
"/assets/AddJob-CMIT6e17.js": f3,
|
|
59
|
+
"/assets/DlqControl-Cu2i1oq5.js": f4,
|
|
60
|
+
"/assets/AreaChart-DzUXW8u3.js": f5,
|
|
61
|
+
"/assets/Overview-AwCA3XI2.js": f6,
|
|
62
|
+
"/assets/QueuesOverview-DrYjyped.js": f7,
|
|
63
|
+
"/assets/index-BWY8Yofc.css": f8,
|
|
64
|
+
"/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2": f9,
|
|
65
|
+
"/assets/S3Backup-et1PcCC0.js": f10,
|
|
66
|
+
"/assets/Logs-CjM7MNYN.js": f11,
|
|
67
|
+
"/assets/CronManager-BQupx6wZ.js": f12,
|
|
68
|
+
"/assets/JobInspector-B7zEuFhM.js": f13,
|
|
69
|
+
"/assets/Dlq-BCUVh_NO.js": f14,
|
|
70
|
+
"/assets/form-PtDLk33Z.js": f15,
|
|
71
|
+
"/assets/DlqPro-HBrCftLD.js": f16,
|
|
72
|
+
"/assets/index-C9fPU4bV.js": f17,
|
|
73
|
+
"/assets/Diagnostics-BzVDq9CH.js": f18,
|
|
74
|
+
"/assets/Pagination-Cd6lHj2E.js": f19,
|
|
75
|
+
"/assets/CopilotPanel-BDZzDmVy.js": f20,
|
|
76
|
+
"/assets/Jobs-ovYRwmwi.js": f21,
|
|
77
|
+
"/assets/JobsPro-DNZivuzq.js": f22,
|
|
78
|
+
"/assets/Cron-9hndZ-Z5.js": f23,
|
|
79
|
+
"/assets/CopyButton-XT7ykzf5.js": f24,
|
|
80
|
+
"/assets/react-vendor-CHIHtdAC.js": f25,
|
|
81
|
+
"/assets/WorkersPro-BidtV_Bp.js": f26,
|
|
82
|
+
"/assets/MetricsPro-CqcH6gJp.js": f27,
|
|
83
|
+
"/assets/jobActions-CuOdMglt.js": f28,
|
|
84
|
+
"/assets/Queues-LrodynCj.js": f29,
|
|
85
|
+
"/assets/connectionStore-DI-LYcct.js": f30,
|
|
86
|
+
"/assets/McpServer-CUK20-uN.js": f31,
|
|
87
|
+
"/assets/Usage-CHCg6VNy.js": f32,
|
|
88
|
+
"/assets/Settings-CeRZgZU6.js": f33,
|
|
89
|
+
"/assets/cn-CMFYpumL.js": f34,
|
|
90
|
+
"/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2": f35,
|
|
91
|
+
"/assets/Webhooks-Cm3vZEp7.js": f36,
|
|
92
|
+
"/assets/S3BackupPro-BEo_EVAO.js": f37,
|
|
93
|
+
"/assets/ServerControl-BRLFRj7k.js": f38,
|
|
94
|
+
"/assets/Workers-CVfx3TK-.js": f39,
|
|
95
|
+
"/assets/QueueDetail-BtiN0s3b.js": f40,
|
|
96
|
+
"/assets/Database-Difs7xYV.js": f41,
|
|
97
|
+
"/assets/UsagePro-Cto9k5OI.js": f42,
|
|
98
|
+
"/assets/QueueControl-D7J1JObu.js": f43,
|
|
99
|
+
"/assets/Metrics-BodjiKpf.js": f44,
|
|
100
|
+
"/assets/inter-latin-wght-normal-Dx4kXJAl.woff2": f45,
|
|
101
|
+
"/assets/install-BvB40Zk0.js": f46,
|
|
102
|
+
"/assets/Flows-D3Bvkmd6.js": f47,
|
|
103
|
+
"/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2": f48,
|
|
104
|
+
"/assets/Benchmark-Dq1-vJ2k.js": f49,
|
|
105
105
|
"/index.html": f50,
|
|
106
106
|
};
|