bunqueue-dashboard 0.0.18 → 0.0.19

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.
Files changed (69) hide show
  1. package/dist/.vite/manifest.json +135 -60
  2. package/dist/assets/AddJob-pXSBfCte.js +3 -0
  3. package/dist/assets/Alerts-DdXuzRJe.js +1 -0
  4. package/dist/assets/Benchmark-DFdrF54C.js +1 -0
  5. package/dist/assets/BulkAddJobs-BrCaYvgB.js +5 -0
  6. package/dist/assets/{CopilotPanel-C9ojQ_8d.js → CopilotPanel-BQrRrGXD.js} +1 -1
  7. package/dist/assets/{CopyButton-BC6QECSJ.js → CopyButton-D39F1wIH.js} +1 -1
  8. package/dist/assets/Cron-Ctas3GOV.js +1 -0
  9. package/dist/assets/CronManager-tK96LeNt.js +1 -0
  10. package/dist/assets/{Database--bK9pYZF.js → Database-CLUujevy.js} +3 -3
  11. package/dist/assets/Diagnostics-Wbdmc5hx.js +1 -0
  12. package/dist/assets/{Dlq-Bs1pupY2.js → Dlq-B2QZSDU6.js} +1 -1
  13. package/dist/assets/DlqControl-D9xzve29.js +1 -0
  14. package/dist/assets/DlqPro-ByRwkv1s.js +1 -0
  15. package/dist/assets/Flows-Bb2WdFa0.js +1 -0
  16. package/dist/assets/JobInspector-BTZS6pI-.js +2 -0
  17. package/dist/assets/Jobs-CUWqc7-2.js +1 -0
  18. package/dist/assets/JobsPro-BWweJCnr.js +1 -0
  19. package/dist/assets/{Logs-yn92V_T8.js → Logs-D5EqmgBR.js} +1 -1
  20. package/dist/assets/LogsPro-C14Lju7q.js +1 -0
  21. package/dist/assets/{McpServer-CNt7kssG.js → McpServer-CQh8KRNo.js} +1 -1
  22. package/dist/assets/{Metrics-CbscCpvx.js → Metrics-BjNcCmTp.js} +1 -1
  23. package/dist/assets/MetricsPro-CcK7hYQf.js +1 -0
  24. package/dist/assets/{Overview-BOuOPWsb.js → Overview-CkMHyr1F.js} +1 -1
  25. package/dist/assets/{Pagination-Bj1z6OlD.js → Pagination-DYMlK0Hm.js} +1 -1
  26. package/dist/assets/QueueActions-Cg2hdDsu.js +1 -0
  27. package/dist/assets/QueueControl-BY9w4OuO.js +1 -0
  28. package/dist/assets/{QueueDetail-BSUH0Nl6.js → QueueDetail-BbtTrGuU.js} +1 -1
  29. package/dist/assets/QueueDetailPro-25QnEp1Q.js +1 -0
  30. package/dist/assets/{Queues-BEQlaWVc.js → Queues-MXia1p1i.js} +1 -1
  31. package/dist/assets/QueuesOverview-Rai_zPUB.js +1 -0
  32. package/dist/assets/{S3Backup-BmRt-Z8V.js → S3Backup-ChWVmznV.js} +1 -1
  33. package/dist/assets/S3BackupPro-JU_hxhXm.js +1 -0
  34. package/dist/assets/{ServerControl-Bhr9FEXF.js → ServerControl-Dirs9r5Q.js} +3 -3
  35. package/dist/assets/{Settings-46jsrfhd.js → Settings-D0XEFZj5.js} +1 -1
  36. package/dist/assets/{Usage-BFLZC7pV.js → Usage-vvNehwcX.js} +1 -1
  37. package/dist/assets/UsagePro-D_-jHCJY.js +1 -0
  38. package/dist/assets/Webhooks-B4DugS-x.js +1 -0
  39. package/dist/assets/{Workers-DBXrLvfS.js → Workers-CvV7eZrD.js} +1 -1
  40. package/dist/assets/WorkersPro-t5SD6hbP.js +1 -0
  41. package/dist/assets/exportFile-tdUeW5m5.js +2 -0
  42. package/dist/assets/index-C3t3ByS-.css +1 -0
  43. package/dist/assets/index-C5VVVkqi.js +8 -0
  44. package/dist/assets/promisePool-Daxkc1OB.js +1 -0
  45. package/dist/assets/useThroughputSeries-B6m-M93j.js +1 -0
  46. package/dist/index.html +2 -2
  47. package/package.json +1 -1
  48. package/scripts/embedded.gen.ts +112 -98
  49. package/dist/assets/AddJob-vk3jh1Zk.js +0 -3
  50. package/dist/assets/Benchmark-CpViF2ZC.js +0 -1
  51. package/dist/assets/Cron-Bbf7mRaK.js +0 -1
  52. package/dist/assets/CronManager-CeNUeoOc.js +0 -1
  53. package/dist/assets/Diagnostics-CGJPsWZQ.js +0 -1
  54. package/dist/assets/DlqControl-BLKVzYQC.js +0 -1
  55. package/dist/assets/DlqPro-D8SmIQUs.js +0 -1
  56. package/dist/assets/Flows-BOogljnP.js +0 -1
  57. package/dist/assets/JobInspector-Cp4ZuQGI.js +0 -2
  58. package/dist/assets/Jobs-C2HYkZXi.js +0 -1
  59. package/dist/assets/JobsPro-D0uclU0B.js +0 -1
  60. package/dist/assets/LogsPro-DSiV8Ajj.js +0 -1
  61. package/dist/assets/MetricsPro-CBiFDVne.js +0 -1
  62. package/dist/assets/QueueControl-Bl4l9dT6.js +0 -1
  63. package/dist/assets/QueuesOverview-BBjcyzz2.js +0 -1
  64. package/dist/assets/S3BackupPro-Dsq0erDm.js +0 -1
  65. package/dist/assets/UsagePro-D0k-82eG.js +0 -1
  66. package/dist/assets/Webhooks-DChTcBSv.js +0 -1
  67. package/dist/assets/WorkersPro-B6I9Ilbq.js +0 -1
  68. package/dist/assets/index-BFjeS9FG.js +0 -8
  69. package/dist/assets/index-BWY8Yofc.css +0 -1
@@ -1 +1 @@
1
- import{r as e}from"./cn-CMFYpumL.js";import{l as t,m as n,r,t as i,u as a}from"./react-vendor-CHIHtdAC.js";import{A as o,B as s,M as c,O as l,R as u,S as d,T as f,V as p,_ as m,b as h,c as g,f as _,g as v,k as y,l as b,m as x,n as S,o as C,q as w,u as T,w as E,x as D}from"./index-BFjeS9FG.js";import{n as O,t as k}from"./form-PtDLk33Z.js";var A=e(n(),1),j=i();function M({queue:e}){return(0,j.jsxs)(`div`,{className:`mt-8`,children:[(0,j.jsx)(`h2`,{className:`mb-3 text-lg font-semibold text-fg`,children:`Configuration`}),(0,j.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 lg:grid-cols-2`,children:[(0,j.jsx)(P,{queue:e}),(0,j.jsx)(F,{queue:e})]})]})}function N(){let[e,t]=(0,A.useState)(!1),[n,r]=(0,A.useState)(null),[i,a]=(0,A.useState)(!1);return{busy:e,error:n,done:i,run:async e=>{t(!0),r(null),a(!1);try{await e(),a(!0),setTimeout(()=>a(!1),2e3)}catch(e){r(e.message)}finally{t(!1)}}}}function P({queue:e}){let[t,n]=(0,A.useState)(``),{busy:r,error:i,done:a,run:o}=N();return(0,j.jsxs)(d,{children:[(0,j.jsxs)(`div`,{className:`mb-4 flex items-center justify-between`,children:[(0,j.jsx)(`h3`,{className:`text-base font-semibold text-fg`,children:`Rate Limit`}),(0,j.jsx)(u,{className:`size-4 text-faint`})]}),(0,j.jsx)(k,{label:`Max jobs / second`,children:(0,j.jsx)(O,{type:`number`,inputMode:`numeric`,placeholder:`100`,value:t,onChange:e=>n(e.target.value)})}),(0,j.jsxs)(`div`,{className:`mt-4 flex items-center gap-2`,children:[(0,j.jsx)(E,{variant:`accent`,size:`sm`,disabled:r||!t,onClick:()=>o(()=>y.setRateLimit(e,Number(t))),children:`Set`}),(0,j.jsx)(E,{size:`sm`,disabled:r,onClick:()=>o(()=>y.clearRateLimit(e)),children:`Clear`}),a&&(0,j.jsx)(`span`,{className:`text-xs text-emerald-400`,children:`Saved`}),i&&(0,j.jsx)(`span`,{className:`text-xs text-red-400`,children:i})]})]})}function F({queue:e}){let[t,n]=(0,A.useState)(``),{busy:r,error:i,done:a,run:o}=N();return(0,j.jsxs)(d,{children:[(0,j.jsxs)(`div`,{className:`mb-4 flex items-center justify-between`,children:[(0,j.jsx)(`h3`,{className:`text-base font-semibold text-fg`,children:`Concurrency`}),(0,j.jsx)(w,{className:`size-4 text-faint`})]}),(0,j.jsx)(k,{label:`Concurrency`,children:(0,j.jsx)(O,{type:`number`,inputMode:`numeric`,placeholder:`5`,value:t,onChange:e=>n(e.target.value)})}),(0,j.jsxs)(`div`,{className:`mt-4 flex items-center gap-2`,children:[(0,j.jsx)(E,{variant:`accent`,size:`sm`,disabled:r||!t,onClick:()=>o(()=>y.setConcurrency(e,Number(t))),children:`Set`}),(0,j.jsx)(E,{size:`sm`,disabled:r,onClick:()=>o(()=>y.clearConcurrency(e)),children:`Clear`}),a&&(0,j.jsx)(`span`,{className:`text-xs text-emerald-400`,children:`Saved`}),i&&(0,j.jsx)(`span`,{className:`text-xs text-red-400`,children:i})]})]})}var I=[`active`,`waiting`,`completed`,`failed`,`delayed`,`paused`],L={detail:{ok:!1,name:``,counts:{waiting:0,active:0,completed:0,failed:0,delayed:0,prioritized:0,paused:0},paused:!1,priorityCounts:{},dlqPreview:[],timestamp:0},jobs:[]};function R(){let{name:e=``}=a(),n=t(),[i,u]=(0,A.useState)(null),[d,w]=(0,A.useState)(null),{data:O,error:k,loading:N,refetch:P}=l((0,A.useCallback)(async()=>{let[t,n]=await Promise.all([y.queueDetail(e,!1),y.jobsList(e,{states:I,limit:12})]);return{detail:t,jobs:n.jobs??[]}},[e]),[e]),F=async(e,t,r)=>{if(!(r&&!window.confirm(r))){u(e),w(null);try{if(await t(),e===`obliterate`){n(`/queues`);return}await P()}catch(e){w(e.message)}finally{u(null)}}};if(N&&!O&&!k)return(0,j.jsx)(h,{label:`Loading ${e}…`});let R=O??L,{detail:z}=R,B=z.counts,V=S(B.completed??0,B.failed??0)??0,H=[...R.jobs].sort((e,t)=>(t.createdAt??0)-(e.createdAt??0));return(0,j.jsxs)(`div`,{children:[k&&(0,j.jsx)(D,{onRetry:P}),(0,j.jsxs)(`div`,{className:`mb-6 flex flex-wrap items-start justify-between gap-4`,children:[(0,j.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,j.jsx)(f,{"aria-label":`Back to queues`,onClick:()=>n(`/queues`),children:(0,j.jsx)(c,{className:`size-4`})}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h1`,{className:`font-mono text-2xl font-bold tracking-tight text-fg`,children:e}),(0,j.jsxs)(`div`,{className:`mt-1.5 flex items-center gap-3`,children:[(0,j.jsx)(m,{label:z.paused?`Paused`:`Active`,tone:z.paused?`amber`:`green`}),(0,j.jsx)(m,{label:`Live`,tone:`green`})]})]})]}),(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[z.paused?(0,j.jsxs)(E,{variant:`success`,size:`sm`,disabled:i!=null,onClick:()=>F(`resume`,()=>y.resume(e)),children:[(0,j.jsx)(p,{className:`size-3.5`}),` Resume`]}):(0,j.jsxs)(E,{variant:`warning`,size:`sm`,disabled:i!=null,onClick:()=>F(`pause`,()=>y.pause(e)),children:[(0,j.jsx)(s,{className:`size-3.5`}),` Pause`]}),(0,j.jsx)(E,{size:`sm`,disabled:i!=null,onClick:()=>F(`drain`,()=>y.drain(e),`Drain all waiting jobs from "${e}"?`),children:`Drain`}),(0,j.jsx)(E,{variant:`danger`,size:`sm`,disabled:i!=null,onClick:()=>F(`obliterate`,()=>y.obliterate(e),`Obliterate "${e}"? This removes the queue and all its jobs.`),children:`Obliterate`})]})]}),d&&(0,j.jsx)(`div`,{className:`mb-4 rounded-lg border border-red-500/20 bg-red-500/5 px-4 py-2 text-sm text-red-400`,children:d}),(0,j.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 md:grid-cols-3 xl:grid-cols-6`,children:[(0,j.jsx)(x,{label:`Waiting`,value:g(B.waiting),tone:`amber`}),(0,j.jsx)(x,{label:`Active`,value:g(B.active),tone:`blue`}),(0,j.jsx)(x,{label:`Completed`,value:g(B.completed),tone:`green`}),(0,j.jsx)(x,{label:`Failed`,value:g(B.failed),tone:B.failed?`red`:`default`}),(0,j.jsx)(x,{label:`Delayed`,value:g(B.delayed),tone:`default`}),(0,j.jsx)(x,{label:`Error Rate`,value:b(V),tone:V>.05?`red`:`green`})]}),(0,j.jsxs)(`div`,{className:`mt-8`,children:[(0,j.jsxs)(`div`,{className:`mb-3 flex items-center justify-between`,children:[(0,j.jsx)(`h2`,{className:`text-lg font-semibold text-fg`,children:`Recent Jobs`}),(0,j.jsxs)(r,{to:`/jobs?queue=${encodeURIComponent(e)}`,className:`flex items-center gap-1 text-sm text-muted hover:text-fg`,children:[`View all jobs `,(0,j.jsx)(o,{className:`size-3.5`})]})]}),(0,j.jsx)(`div`,{className:`overflow-hidden rounded-xl border border-line bg-surface`,children:(0,j.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,j.jsx)(`thead`,{children:(0,j.jsxs)(`tr`,{className:`border-b border-line text-left text-[11px] uppercase tracking-wider text-faint`,children:[(0,j.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`ID`}),(0,j.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Name`}),(0,j.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Status`}),(0,j.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Duration`}),(0,j.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Created`})]})}),(0,j.jsx)(`tbody`,{children:H.length===0?(0,j.jsx)(`tr`,{children:(0,j.jsx)(`td`,{colSpan:5,className:`px-5 py-12 text-center text-sm text-faint`,children:`No recent jobs.`})}):H.map(e=>(0,j.jsxs)(`tr`,{className:`border-b border-line last:border-0 hover:bg-surface-2/40`,children:[(0,j.jsx)(`td`,{className:`px-5 py-3 font-mono text-xs text-muted`,children:e.id}),(0,j.jsx)(`td`,{className:`px-5 py-3 text-fg`,children:e.data?.name||`unknown`}),(0,j.jsx)(`td`,{className:`px-5 py-3`,children:(0,j.jsx)(v,{status:String(e.state??e.status??`waiting`)})}),(0,j.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:C(_(e.startedAt,e.completedAt))}),(0,j.jsx)(`td`,{className:`px-5 py-3 text-right text-faint`,children:T(e.createdAt)})]},e.id))})]})})]}),(0,j.jsx)(M,{queue:e})]})}export{R as QueueDetail};
1
+ import{r as e}from"./cn-CMFYpumL.js";import{l as t,m as n,r,t as i,u as a}from"./react-vendor-CHIHtdAC.js";import{A as o,H as s,J as c,M as l,O as u,S as d,T as f,V as p,_ as m,b as h,c as g,f as _,g as v,k as y,l as b,m as x,n as S,o as C,u as w,w as T,x as E,z as D}from"./index-C5VVVkqi.js";import{n as O,t as k}from"./form-PtDLk33Z.js";var A=e(n(),1),j=i();function M({queue:e}){return(0,j.jsxs)(`div`,{className:`mt-8`,children:[(0,j.jsx)(`h2`,{className:`mb-3 text-lg font-semibold text-fg`,children:`Configuration`}),(0,j.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 lg:grid-cols-2`,children:[(0,j.jsx)(P,{queue:e}),(0,j.jsx)(F,{queue:e})]})]})}function N(){let[e,t]=(0,A.useState)(!1),[n,r]=(0,A.useState)(null),[i,a]=(0,A.useState)(!1);return{busy:e,error:n,done:i,run:async e=>{t(!0),r(null),a(!1);try{await e(),a(!0),setTimeout(()=>a(!1),2e3)}catch(e){r(e.message)}finally{t(!1)}}}}function P({queue:e}){let[t,n]=(0,A.useState)(``),{busy:r,error:i,done:a,run:o}=N();return(0,j.jsxs)(d,{children:[(0,j.jsxs)(`div`,{className:`mb-4 flex items-center justify-between`,children:[(0,j.jsx)(`h3`,{className:`text-base font-semibold text-fg`,children:`Rate Limit`}),(0,j.jsx)(D,{className:`size-4 text-faint`})]}),(0,j.jsx)(k,{label:`Max jobs / second`,children:(0,j.jsx)(O,{type:`number`,inputMode:`numeric`,placeholder:`100`,value:t,onChange:e=>n(e.target.value)})}),(0,j.jsxs)(`div`,{className:`mt-4 flex items-center gap-2`,children:[(0,j.jsx)(T,{variant:`accent`,size:`sm`,disabled:r||!t,onClick:()=>o(()=>y.setRateLimit(e,Number(t))),children:`Set`}),(0,j.jsx)(T,{size:`sm`,disabled:r,onClick:()=>o(()=>y.clearRateLimit(e)),children:`Clear`}),a&&(0,j.jsx)(`span`,{className:`text-xs text-emerald-400`,children:`Saved`}),i&&(0,j.jsx)(`span`,{className:`text-xs text-red-400`,children:i})]})]})}function F({queue:e}){let[t,n]=(0,A.useState)(``),{busy:r,error:i,done:a,run:o}=N();return(0,j.jsxs)(d,{children:[(0,j.jsxs)(`div`,{className:`mb-4 flex items-center justify-between`,children:[(0,j.jsx)(`h3`,{className:`text-base font-semibold text-fg`,children:`Concurrency`}),(0,j.jsx)(c,{className:`size-4 text-faint`})]}),(0,j.jsx)(k,{label:`Concurrency`,children:(0,j.jsx)(O,{type:`number`,inputMode:`numeric`,placeholder:`5`,value:t,onChange:e=>n(e.target.value)})}),(0,j.jsxs)(`div`,{className:`mt-4 flex items-center gap-2`,children:[(0,j.jsx)(T,{variant:`accent`,size:`sm`,disabled:r||!t,onClick:()=>o(()=>y.setConcurrency(e,Number(t))),children:`Set`}),(0,j.jsx)(T,{size:`sm`,disabled:r,onClick:()=>o(()=>y.clearConcurrency(e)),children:`Clear`}),a&&(0,j.jsx)(`span`,{className:`text-xs text-emerald-400`,children:`Saved`}),i&&(0,j.jsx)(`span`,{className:`text-xs text-red-400`,children:i})]})]})}var I=[`active`,`waiting`,`completed`,`failed`,`delayed`,`paused`],L={detail:{ok:!1,name:``,counts:{waiting:0,active:0,completed:0,failed:0,delayed:0,prioritized:0,paused:0},paused:!1,priorityCounts:{},dlqPreview:[],timestamp:0},jobs:[]};function R(){let{name:e=``}=a(),n=t(),[i,c]=(0,A.useState)(null),[d,D]=(0,A.useState)(null),{data:O,error:k,loading:N,refetch:P}=u((0,A.useCallback)(async()=>{let[t,n]=await Promise.all([y.queueDetail(e,!1),y.jobsList(e,{states:I,limit:12})]);return{detail:t,jobs:n.jobs??[]}},[e]),[e]),F=async(e,t,r)=>{if(!(r&&!window.confirm(r))){c(e),D(null);try{if(await t(),e===`obliterate`){n(`/queues`);return}await P()}catch(e){D(e.message)}finally{c(null)}}};if(N&&!O&&!k)return(0,j.jsx)(h,{label:`Loading ${e}…`});let R=O??L,{detail:z}=R,B=z.counts,V=S(B.completed??0,B.failed??0)??0,H=[...R.jobs].sort((e,t)=>(t.createdAt??0)-(e.createdAt??0));return(0,j.jsxs)(`div`,{children:[k&&(0,j.jsx)(E,{onRetry:P}),(0,j.jsxs)(`div`,{className:`mb-6 flex flex-wrap items-start justify-between gap-4`,children:[(0,j.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,j.jsx)(f,{"aria-label":`Back to queues`,onClick:()=>n(`/queues`),children:(0,j.jsx)(l,{className:`size-4`})}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h1`,{className:`font-mono text-2xl font-bold tracking-tight text-fg`,children:e}),(0,j.jsxs)(`div`,{className:`mt-1.5 flex items-center gap-3`,children:[(0,j.jsx)(m,{label:z.paused?`Paused`:`Active`,tone:z.paused?`amber`:`green`}),(0,j.jsx)(m,{label:`Live`,tone:`green`})]})]})]}),(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[z.paused?(0,j.jsxs)(T,{variant:`success`,size:`sm`,disabled:i!=null,onClick:()=>F(`resume`,()=>y.resume(e)),children:[(0,j.jsx)(s,{className:`size-3.5`}),` Resume`]}):(0,j.jsxs)(T,{variant:`warning`,size:`sm`,disabled:i!=null,onClick:()=>F(`pause`,()=>y.pause(e)),children:[(0,j.jsx)(p,{className:`size-3.5`}),` Pause`]}),(0,j.jsx)(T,{size:`sm`,disabled:i!=null,onClick:()=>F(`drain`,()=>y.drain(e),`Drain all waiting jobs from "${e}"?`),children:`Drain`}),(0,j.jsx)(T,{variant:`danger`,size:`sm`,disabled:i!=null,onClick:()=>F(`obliterate`,()=>y.obliterate(e),`Obliterate "${e}"? This removes the queue and all its jobs.`),children:`Obliterate`})]})]}),d&&(0,j.jsx)(`div`,{className:`mb-4 rounded-lg border border-red-500/20 bg-red-500/5 px-4 py-2 text-sm text-red-400`,children:d}),(0,j.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 md:grid-cols-3 xl:grid-cols-6`,children:[(0,j.jsx)(x,{label:`Waiting`,value:g(B.waiting),tone:`amber`}),(0,j.jsx)(x,{label:`Active`,value:g(B.active),tone:`blue`}),(0,j.jsx)(x,{label:`Completed`,value:g(B.completed),tone:`green`}),(0,j.jsx)(x,{label:`Failed`,value:g(B.failed),tone:B.failed?`red`:`default`}),(0,j.jsx)(x,{label:`Delayed`,value:g(B.delayed),tone:`default`}),(0,j.jsx)(x,{label:`Error Rate`,value:b(V),tone:V>.05?`red`:`green`})]}),(0,j.jsxs)(`div`,{className:`mt-8`,children:[(0,j.jsxs)(`div`,{className:`mb-3 flex items-center justify-between`,children:[(0,j.jsx)(`h2`,{className:`text-lg font-semibold text-fg`,children:`Recent Jobs`}),(0,j.jsxs)(r,{to:`/jobs?queue=${encodeURIComponent(e)}`,className:`flex items-center gap-1 text-sm text-muted hover:text-fg`,children:[`View all jobs `,(0,j.jsx)(o,{className:`size-3.5`})]})]}),(0,j.jsx)(`div`,{className:`overflow-hidden rounded-xl border border-line bg-surface`,children:(0,j.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,j.jsx)(`thead`,{children:(0,j.jsxs)(`tr`,{className:`border-b border-line text-left text-[11px] uppercase tracking-wider text-faint`,children:[(0,j.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`ID`}),(0,j.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Name`}),(0,j.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Status`}),(0,j.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Duration`}),(0,j.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Created`})]})}),(0,j.jsx)(`tbody`,{children:H.length===0?(0,j.jsx)(`tr`,{children:(0,j.jsx)(`td`,{colSpan:5,className:`px-5 py-12 text-center text-sm text-faint`,children:`No recent jobs.`})}):H.map(e=>(0,j.jsxs)(`tr`,{className:`border-b border-line last:border-0 hover:bg-surface-2/40`,children:[(0,j.jsx)(`td`,{className:`px-5 py-3 font-mono text-xs text-muted`,children:e.id}),(0,j.jsx)(`td`,{className:`px-5 py-3 text-fg`,children:e.data?.name||`unknown`}),(0,j.jsx)(`td`,{className:`px-5 py-3`,children:(0,j.jsx)(v,{status:String(e.state??e.status??`waiting`)})}),(0,j.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:C(_(e.startedAt,e.completedAt))}),(0,j.jsx)(`td`,{className:`px-5 py-3 text-right text-faint`,children:w(e.createdAt)})]},e.id))})]})})]}),(0,j.jsx)(M,{queue:e})]})}export{R as QueueDetail};
@@ -0,0 +1 @@
1
+ import{r as e,t}from"./cn-CMFYpumL.js";import{l as n,m as r,r as i,t as a,u as o}from"./react-vendor-CHIHtdAC.js";import{A as s,C as c,M as l,O as u,S as d,T as f,_ as p,b as m,c as h,et as g,h as _,l as v,m as y,n as b,o as x,tt as S,w as C,x as w}from"./index-C5VVVkqi.js";import{t as T}from"./AreaChart-DzUXW8u3.js";import{t as E}from"./useThroughputSeries-B6m-M93j.js";import{i as D,n as O,r as k,t as A}from"./QueueActions-Cg2hdDsu.js";var j=e(r(),1),M=a(),N=[`waiting`,`active`,`completed`,`failed`,`delayed`,`paused`],P=[`active`,`waiting`,`completed`,`failed`,`delayed`],F=2e3;function I(){let{name:e=``}=o(),r=n(),[a,I]=(0,j.useState)(!1),[L,R]=(0,j.useState)(null),{data:z,error:B,loading:V,refetch:H}=u((0,j.useCallback)(async()=>{if(!e)return null;let[t,n,r,i]=await Promise.all([g.queueDetail(e,!1),g.getStallConfig(e).catch(()=>null),g.getDlqConfig(e).catch(()=>null),g.jobsList(e,P,12).catch(()=>({ok:!1,jobs:[]}))]);return{queue:e,detail:t,stall:n?.config??null,dlq:r?.config??null,jobs:i.jobs??[]}},[e]),[e]),U=z&&z.queue===e?z:null,[W,G]=(0,j.useState)([]),K=(0,j.useRef)(null);(0,j.useEffect)(()=>{let e=U?.detail?.counts;e&&(K.current=(e.waiting??0)+(e.active??0)+(e.delayed??0))},[U]),(0,j.useEffect)(()=>{K.current=null,G([]);let e=setInterval(()=>{let e=K.current;e!=null&&G(t=>[...t,e].slice(-40))},F);return()=>clearInterval(e)},[e]);let q=(t,n,r)=>{r&&!window.confirm(r)||(I(!0),R(null),n().then(n=>{let r=n?.count,i=`${t}${r==null?` ✓`:`: ${r}`}`;R({ok:!0,text:i}),S.success(i,e),H()}).catch(e=>{let n=e.message;R({ok:!1,text:n}),S.error(`${t} failed`,n)}).finally(()=>I(!1)))},J=()=>{window.confirm(`Obliterate "${e}"? This removes the queue and all its jobs.`)&&(I(!0),g.obliterate(e).then(()=>{S.success(`Queue obliterated`,e),r(`/queues`)}).catch(e=>{let t=e.message;R({ok:!1,text:t}),S.error(`Obliterate failed`,t),I(!1)}))},Y=U?.detail,X=Y?.counts,Z=X?b(X.completed??0,X.failed??0)??0:0,Q=E(W);return(0,M.jsxs)(`div`,{children:[(0,M.jsx)(_,{title:(0,M.jsx)(`span`,{className:`font-mono`,children:e}),description:`Full per-queue operations and live backlog.`,live:!0,back:(0,M.jsx)(f,{"aria-label":`Back to queues`,onClick:()=>r(`/queues`),children:(0,M.jsx)(l,{className:`size-4`})}),actions:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(i,{to:`/jobs?queue=${encodeURIComponent(e)}`,className:`flex items-center gap-1 rounded-lg border border-line px-3 py-1.5 text-sm text-muted hover:bg-surface-2 hover:text-fg`,children:[`Jobs `,(0,M.jsx)(s,{className:`size-3.5`})]}),(0,M.jsxs)(i,{to:`/dlq`,className:`flex items-center gap-1 rounded-lg border border-line px-3 py-1.5 text-sm text-muted hover:bg-surface-2 hover:text-fg`,children:[`DLQ `,(0,M.jsx)(s,{className:`size-3.5`})]}),(0,M.jsx)(C,{variant:`danger`,size:`sm`,disabled:a,onClick:J,children:`Obliterate`})]})}),B&&(0,M.jsx)(w,{onRetry:H}),V&&!U&&!B?(0,M.jsx)(m,{label:`Loading ${e}…`}):!Y||!X?!B&&(0,M.jsx)(`p`,{className:`text-sm text-faint`,children:`Queue not found.`}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`div`,{className:`mb-6 flex flex-wrap items-center gap-3`,children:[(0,M.jsx)(p,{label:Y.paused?`Paused`:`Active`,tone:Y.paused?`amber`:`green`}),L&&(0,M.jsx)(`span`,{className:L.ok?`text-xs text-success`:`text-xs text-danger`,children:L.text})]}),(0,M.jsx)(`div`,{className:`mb-6 grid grid-cols-2 gap-3 md:grid-cols-3 xl:grid-cols-6`,children:N.map(e=>(0,M.jsx)(y,{label:e,value:h(X[e]),tone:e===`failed`&&X.failed?`red`:`default`,compact:!0},e))}),(0,M.jsxs)(d,{className:`mb-6`,children:[(0,M.jsx)(c,{title:`Backlog depth`,action:(0,M.jsx)(`span`,{className:t(`rounded-full px-2 py-0.5 text-[11px] font-medium`,Q.draining?`bg-emerald-500/10 text-success`:Q.label===`accumulating`?`bg-red-500/10 text-danger`:`bg-surface-2 text-muted`),children:Q.label})}),W.length<2?(0,M.jsx)(`p`,{className:`py-6 text-center text-xs text-faint`,children:`Sampling… the backlog trend appears after a few polls.`}):(0,M.jsx)(T,{height:140,ariaLabel:`${e} backlog depth`,series:[{label:`depth`,color:`var(--accent)`,points:W,area:!0}]}),(0,M.jsxs)(`div`,{className:`mt-1 flex items-center justify-between text-xs text-faint`,children:[(0,M.jsx)(`span`,{children:`waiting + active + delayed`}),(0,M.jsxs)(`span`,{className:`tnum`,children:[`Error rate `,v(Z)]})]})]}),(0,M.jsx)(A,{queue:e,paused:Y.paused,busy:a,run:q}),(0,M.jsx)(O,{queue:e,busy:a,run:q}),(0,M.jsxs)(`div`,{className:`mb-6 grid grid-cols-1 gap-6 lg:grid-cols-2`,children:[U.stall&&(0,M.jsx)(D,{queue:e,config:U.stall,onSaved:()=>{R({ok:!0,text:`Stall config saved ✓`}),S.success(`Stall config saved`,e)}},e),U.dlq&&(0,M.jsx)(k,{queue:e,config:U.dlq,onSaved:()=>{R({ok:!0,text:`DLQ config saved ✓`}),S.success(`DLQ config saved`,e)}},e)]}),(0,M.jsxs)(d,{padded:!1,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between px-5 py-3`,children:[(0,M.jsx)(`h2`,{className:`text-base font-semibold text-fg`,children:`Recent jobs`}),(0,M.jsxs)(i,{to:`/jobs?queue=${encodeURIComponent(e)}`,className:`flex items-center gap-1 text-sm text-muted hover:text-fg`,children:[`View all `,(0,M.jsx)(s,{className:`size-3.5`})]})]}),(0,M.jsx)(`div`,{className:`overflow-x-auto border-t border-line`,children:(0,M.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{className:`border-b border-line text-left text-[11px] uppercase tracking-wider text-faint`,children:[(0,M.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`ID`}),(0,M.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`State`}),(0,M.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Attempts`}),(0,M.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Duration`})]})}),(0,M.jsx)(`tbody`,{children:U.jobs.length===0?(0,M.jsx)(`tr`,{children:(0,M.jsx)(`td`,{colSpan:4,className:`px-5 py-10 text-center text-sm text-faint`,children:`No recent jobs.`})}):U.jobs.map(e=>(0,M.jsxs)(`tr`,{className:`border-b border-line last:border-0 hover:bg-surface-2/40`,children:[(0,M.jsx)(`td`,{className:`px-5 py-3`,children:(0,M.jsx)(i,{to:`/job?id=${encodeURIComponent(e.id)}`,className:`font-mono text-xs text-accent hover:underline`,children:e.id})}),(0,M.jsx)(`td`,{className:`px-5 py-3 text-muted`,children:e.state??`—`}),(0,M.jsxs)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:[e.attempts??0,` / `,e.maxAttempts??`?`]}),(0,M.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:x(e.startedAt&&e.completedAt?e.completedAt-e.startedAt:void 0)})]},e.id))})]})})]})]})]})}export{I as QueueDetailPro};
@@ -1 +1 @@
1
- import{r as e,t}from"./cn-CMFYpumL.js";import{l as n,m as r,t as i}from"./react-vendor-CHIHtdAC.js";import{A as a,G as o,H as s,O as c,b as l,c as u,h as d,k as f,m as p,x as m}from"./index-BFjeS9FG.js";import{t as h}from"./Pagination-Bj1z6OlD.js";var g=e(r(),1),_=i(),v=20,y={ok:!1,queues:[],total:0,limit:v,offset:0,timestamp:0};function b(){let e=n(),[r,i]=(0,g.useState)(``),[b,x]=(0,g.useState)(0),{data:S,error:C,loading:w,refetch:T}=c(()=>f.queues(v,b*v),[b]),E=S??y,D=(0,g.useMemo)(()=>{let e=E.queues,t=r.trim().toLowerCase();return t?e.filter(e=>e.name.toLowerCase().includes(t)):e},[E,r]);if(w&&!S&&!C)return(0,_.jsx)(l,{label:`Loading queues…`});let O=E.queues.reduce((e,t)=>(e.waiting+=t.waiting,e.active+=t.active,e.delayed+=t.delayed,e.dlq+=t.dlq,e),{waiting:0,active:0,delayed:0,dlq:0});return(0,_.jsxs)(`div`,{children:[C&&(0,_.jsx)(m,{onRetry:T}),(0,_.jsx)(d,{title:`Queues`,description:`${E.total} queues`,live:!0}),(0,_.jsxs)(`div`,{className:`mb-6 grid grid-cols-2 gap-4 md:grid-cols-4`,children:[(0,_.jsx)(p,{label:`Waiting`,value:u(O.waiting),tone:`amber`,compact:!0}),(0,_.jsx)(p,{label:`Active`,value:u(O.active),tone:`blue`,compact:!0}),(0,_.jsx)(p,{label:`Delayed`,value:u(O.delayed),tone:`default`,compact:!0}),(0,_.jsx)(p,{label:`DLQ`,value:u(O.dlq),tone:O.dlq?`red`:`default`,compact:!0})]}),(0,_.jsxs)(`div`,{className:`relative mb-4 max-w-sm`,children:[(0,_.jsx)(o,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-faint`}),(0,_.jsx)(`input`,{value:r,onChange:e=>i(e.target.value),placeholder:`Search queues…`,className:`h-9 w-full rounded-lg border border-line bg-surface pl-9 pr-3 text-sm text-fg placeholder:text-faint focus:border-accent/60 focus:outline-none focus:ring-2 focus:ring-accent/30`})]}),(0,_.jsx)(`div`,{className:`overflow-hidden rounded-xl border border-line bg-surface`,children:(0,_.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,_.jsx)(`thead`,{children:(0,_.jsxs)(`tr`,{className:`border-b border-line text-left text-[11px] uppercase tracking-wider text-faint`,children:[(0,_.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Queue`}),(0,_.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Waiting`}),(0,_.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Active`}),(0,_.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Delayed`}),(0,_.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`DLQ`}),(0,_.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Status`}),(0,_.jsx)(`th`,{className:`w-10 px-5 py-3`})]})}),(0,_.jsx)(`tbody`,{children:D.length===0?(0,_.jsx)(`tr`,{children:(0,_.jsx)(`td`,{colSpan:7,className:`px-5 py-12 text-center text-sm text-faint`,children:r?`No queues match on this page.`:`No queues yet.`})}):D.map(n=>(0,_.jsxs)(`tr`,{onClick:()=>e(`/queues/${encodeURIComponent(n.name)}`),className:`group cursor-pointer border-b border-line last:border-0 transition-colors hover:bg-surface-2/50`,children:[(0,_.jsx)(`td`,{className:`px-5 py-3`,children:(0,_.jsxs)(`span`,{className:`flex items-center gap-2 font-medium text-fg`,children:[(0,_.jsx)(s,{className:`size-4 text-faint`}),n.name]})}),(0,_.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:u(n.waiting)}),(0,_.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-blue-400`,children:u(n.active)}),(0,_.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:u(n.delayed)}),(0,_.jsx)(`td`,{className:t(`px-5 py-3 text-right tnum`,n.dlq?`text-red-400`:`text-muted`),children:u(n.dlq)}),(0,_.jsx)(`td`,{className:`px-5 py-3`,children:(0,_.jsxs)(`span`,{className:t(`inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium`,n.paused?`bg-orange-500/10 text-orange-400`:`bg-emerald-500/10 text-emerald-400`),children:[(0,_.jsx)(`span`,{className:`size-1.5 rounded-full bg-current`}),n.paused?`Paused`:`Active`]})}),(0,_.jsx)(`td`,{className:`px-5 py-3 text-faint`,children:(0,_.jsx)(a,{className:`size-4 opacity-0 transition-opacity group-hover:opacity-100`})})]},n.name))})]})}),(0,_.jsx)(h,{page:b,pageSize:v,total:E.total,onPageChange:x,label:`queues`})]})}export{b as Queues};
1
+ import{r as e,t}from"./cn-CMFYpumL.js";import{l as n,m as r,t as i}from"./react-vendor-CHIHtdAC.js";import{A as a,K as o,O as s,U as c,b as l,c as u,h as d,k as f,m as p,x as m}from"./index-C5VVVkqi.js";import{t as h}from"./Pagination-DYMlK0Hm.js";var g=e(r(),1),_=i(),v=20,y={ok:!1,queues:[],total:0,limit:v,offset:0,timestamp:0};function b(){let e=n(),[r,i]=(0,g.useState)(``),[b,x]=(0,g.useState)(0),{data:S,error:C,loading:w,refetch:T}=s(()=>f.queues(v,b*v),[b]),E=S??y,D=(0,g.useMemo)(()=>{let e=E.queues,t=r.trim().toLowerCase();return t?e.filter(e=>e.name.toLowerCase().includes(t)):e},[E,r]);if(w&&!S&&!C)return(0,_.jsx)(l,{label:`Loading queues…`});let O=E.queues.reduce((e,t)=>(e.waiting+=t.waiting,e.active+=t.active,e.delayed+=t.delayed,e.dlq+=t.dlq,e),{waiting:0,active:0,delayed:0,dlq:0});return(0,_.jsxs)(`div`,{children:[C&&(0,_.jsx)(m,{onRetry:T}),(0,_.jsx)(d,{title:`Queues`,description:`${E.total} queues`,live:!0}),(0,_.jsxs)(`div`,{className:`mb-6 grid grid-cols-2 gap-4 md:grid-cols-4`,children:[(0,_.jsx)(p,{label:`Waiting`,value:u(O.waiting),tone:`amber`,compact:!0}),(0,_.jsx)(p,{label:`Active`,value:u(O.active),tone:`blue`,compact:!0}),(0,_.jsx)(p,{label:`Delayed`,value:u(O.delayed),tone:`default`,compact:!0}),(0,_.jsx)(p,{label:`DLQ`,value:u(O.dlq),tone:O.dlq?`red`:`default`,compact:!0})]}),(0,_.jsxs)(`div`,{className:`relative mb-4 max-w-sm`,children:[(0,_.jsx)(o,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-faint`}),(0,_.jsx)(`input`,{value:r,onChange:e=>i(e.target.value),placeholder:`Search queues…`,className:`h-9 w-full rounded-lg border border-line bg-surface pl-9 pr-3 text-sm text-fg placeholder:text-faint focus:border-accent/60 focus:outline-none focus:ring-2 focus:ring-accent/30`})]}),(0,_.jsx)(`div`,{className:`overflow-hidden rounded-xl border border-line bg-surface`,children:(0,_.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,_.jsx)(`thead`,{children:(0,_.jsxs)(`tr`,{className:`border-b border-line text-left text-[11px] uppercase tracking-wider text-faint`,children:[(0,_.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Queue`}),(0,_.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Waiting`}),(0,_.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Active`}),(0,_.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Delayed`}),(0,_.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`DLQ`}),(0,_.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Status`}),(0,_.jsx)(`th`,{className:`w-10 px-5 py-3`})]})}),(0,_.jsx)(`tbody`,{children:D.length===0?(0,_.jsx)(`tr`,{children:(0,_.jsx)(`td`,{colSpan:7,className:`px-5 py-12 text-center text-sm text-faint`,children:r?`No queues match on this page.`:`No queues yet.`})}):D.map(n=>(0,_.jsxs)(`tr`,{onClick:()=>e(`/queues/${encodeURIComponent(n.name)}`),className:`group cursor-pointer border-b border-line last:border-0 transition-colors hover:bg-surface-2/50`,children:[(0,_.jsx)(`td`,{className:`px-5 py-3`,children:(0,_.jsxs)(`span`,{className:`flex items-center gap-2 font-medium text-fg`,children:[(0,_.jsx)(c,{className:`size-4 text-faint`}),n.name]})}),(0,_.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:u(n.waiting)}),(0,_.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-blue-400`,children:u(n.active)}),(0,_.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:u(n.delayed)}),(0,_.jsx)(`td`,{className:t(`px-5 py-3 text-right tnum`,n.dlq?`text-red-400`:`text-muted`),children:u(n.dlq)}),(0,_.jsx)(`td`,{className:`px-5 py-3`,children:(0,_.jsxs)(`span`,{className:t(`inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium`,n.paused?`bg-orange-500/10 text-orange-400`:`bg-emerald-500/10 text-emerald-400`),children:[(0,_.jsx)(`span`,{className:`size-1.5 rounded-full bg-current`}),n.paused?`Paused`:`Active`]})}),(0,_.jsx)(`td`,{className:`px-5 py-3 text-faint`,children:(0,_.jsx)(a,{className:`size-4 opacity-0 transition-opacity group-hover:opacity-100`})})]},n.name))})]})}),(0,_.jsx)(h,{page:b,pageSize:v,total:E.total,onPageChange:x,label:`queues`})]})}export{b as Queues};
@@ -0,0 +1 @@
1
+ import{r as e,t}from"./cn-CMFYpumL.js";import{l as n,m as r,r as i,t as a}from"./react-vendor-CHIHtdAC.js";import{A as o,H as s,K as c,O as l,T as u,U as d,V as f,b as p,c as m,et as h,h as g,m as _,tt as v,w as y,x as b}from"./index-C5VVVkqi.js";import{t as x}from"./Pagination-DYMlK0Hm.js";import{t as S}from"./promisePool-Daxkc1OB.js";var C=e(r(),1),w=a(),T=6,E=15;function D(){let e=n(),[r,a]=(0,C.useState)(``),[D,O]=(0,C.useState)(0),[k,A]=(0,C.useState)(new Set),[j,M]=(0,C.useState)(!1),[N,P]=(0,C.useState)(null),{data:F,error:I,loading:L,refetch:R}=l(()=>h.queuesSummary(),[]),z=F??[],B=(0,C.useMemo)(()=>{let e=r.trim().toLowerCase();return[...e?z.filter(t=>t.name.toLowerCase().includes(e)):z].sort((e,t)=>e.name.localeCompare(t.name))},[z,r]),V=(0,C.useMemo)(()=>z.reduce((e,t)=>(e.waiting+=t.counts.waiting,e.active+=t.counts.active,e.failed+=t.counts.failed,e.paused+=+!!t.paused,e),{waiting:0,active:0,failed:0,paused:0}),[z]),H=Math.max(1,Math.ceil(B.length/E)),U=Math.min(D,H-1),W=B.slice(U*E,U*E+E),G=async e=>{A(t=>new Set(t).add(e.name)),P(null);try{await(e.paused?h.resume(e.name):h.pause(e.name)),P({ok:!0,text:`${e.name} ${e.paused?`resumed`:`paused`} ✓`})}catch(t){P({ok:!1,text:t.message}),v.error(`Failed to ${e.paused?`resume`:`pause`} ${e.name}`,t.message)}finally{A(t=>{let n=new Set(t);return n.delete(e.name),n}),R()}},K=async e=>{let t=z.filter(t=>e===`pause`?!t.paused:t.paused);if(t.length===0){v.info(`No queues to ${e}`);return}if(!window.confirm(`${e===`pause`?`Pause`:`Resume`} ${t.length} queue(s)?`))return;M(!0),P(null);let n=(await S(t,T,t=>e===`pause`?h.pause(t.name):h.resume(t.name))).filter(e=>e.status===`rejected`).length,r=`${e===`pause`?`Paused`:`Resumed`} ${t.length-n}/${t.length} queues${n?`, ${n} failed`:``}`;P({ok:n===0,text:r}),n===0?v.success(r):v.error(r),M(!1),R()};return L&&!F&&!I?(0,w.jsx)(p,{label:`Loading queues…`}):(0,w.jsxs)(`div`,{children:[(0,w.jsx)(g,{title:`Queues`,description:`${z.length} queues`,live:!0,actions:z.length>0?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(y,{variant:`warning`,size:`sm`,disabled:j||V.paused>=z.length,onClick:()=>K(`pause`),children:[(0,w.jsx)(f,{className:`size-3.5`}),` Pause all`]}),(0,w.jsxs)(y,{variant:`success`,size:`sm`,disabled:j||V.paused===0,onClick:()=>K(`resume`),children:[(0,w.jsx)(s,{className:`size-3.5`}),` Resume all`]})]}):void 0}),I&&(0,w.jsx)(b,{onRetry:R}),(0,w.jsxs)(`div`,{className:`mb-6 grid grid-cols-2 gap-4 md:grid-cols-4`,children:[(0,w.jsx)(_,{label:`Waiting`,value:m(V.waiting),tone:`amber`,compact:!0}),(0,w.jsx)(_,{label:`Active`,value:m(V.active),tone:`blue`,compact:!0}),(0,w.jsx)(_,{label:`Failed`,value:m(V.failed),tone:V.failed?`red`:`default`,compact:!0}),(0,w.jsx)(_,{label:`Paused`,value:m(V.paused),tone:V.paused?`amber`:`default`,compact:!0})]}),(0,w.jsxs)(`div`,{className:`relative mb-4 max-w-sm`,children:[(0,w.jsx)(c,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-faint`}),(0,w.jsx)(`input`,{value:r,onChange:e=>{a(e.target.value),O(0)},placeholder:`Search queues…`,"aria-label":`Filter queues`,className:`h-9 w-full rounded-lg border border-line bg-surface pl-9 pr-3 text-sm text-fg placeholder:text-faint focus:border-accent/60 focus:outline-none focus:ring-2 focus:ring-accent/30`})]}),N&&(0,w.jsx)(`div`,{className:t(`mb-3 text-sm`,N.ok?`text-success`:`text-danger`),children:N.text}),(0,w.jsx)(`div`,{className:`overflow-x-auto rounded-xl border border-line bg-surface`,children:(0,w.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,w.jsx)(`thead`,{children:(0,w.jsxs)(`tr`,{className:`border-b border-line text-left text-[11px] uppercase tracking-wider text-faint`,children:[(0,w.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Queue`}),(0,w.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Waiting`}),(0,w.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Active`}),(0,w.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Completed`}),(0,w.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Failed`}),(0,w.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Delayed`}),(0,w.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Status`}),(0,w.jsx)(`th`,{className:`w-24 px-5 py-3 text-right font-medium`,children:`Actions`})]})}),(0,w.jsx)(`tbody`,{children:W.length===0?(0,w.jsx)(`tr`,{children:(0,w.jsx)(`td`,{colSpan:8,className:`px-5 py-12 text-center text-sm text-faint`,children:r?`No queues match your search.`:`No queues yet.`})}):W.map(n=>{let r=k.has(n.name);return(0,w.jsxs)(`tr`,{onClick:()=>e(`/queues/${encodeURIComponent(n.name)}`),className:`group cursor-pointer border-b border-line last:border-0 transition-colors hover:bg-surface-2/50`,children:[(0,w.jsx)(`td`,{className:`px-5 py-3`,children:(0,w.jsxs)(i,{to:`/queues/${encodeURIComponent(n.name)}`,onClick:e=>e.stopPropagation(),className:`flex items-center gap-2 rounded font-medium text-fg hover:text-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50`,children:[(0,w.jsx)(d,{className:`size-4 text-faint`}),n.name]})}),(0,w.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-warning`,children:m(n.counts.waiting)}),(0,w.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-blue-400`,children:m(n.counts.active)}),(0,w.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-success`,children:m(n.counts.completed)}),(0,w.jsx)(`td`,{className:t(`px-5 py-3 text-right tnum`,n.counts.failed?`text-danger`:`text-muted`),children:m(n.counts.failed)}),(0,w.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:m(n.counts.delayed)}),(0,w.jsx)(`td`,{className:`px-5 py-3`,children:(0,w.jsxs)(`span`,{className:t(`inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium`,n.paused?`bg-orange-500/10 text-orange-400`:`bg-emerald-500/10 text-success`),children:[(0,w.jsx)(`span`,{className:`size-1.5 rounded-full bg-current`}),n.paused?`Paused`:`Active`]})}),(0,w.jsx)(`td`,{className:`px-5 py-3`,children:(0,w.jsxs)(`div`,{className:`flex items-center justify-end gap-1`,children:[(0,w.jsx)(u,{"aria-label":n.paused?`Resume queue`:`Pause queue`,disabled:r,onClick:e=>{e.stopPropagation(),G(n)},children:n.paused?(0,w.jsx)(s,{className:`size-3.5 text-success`}):(0,w.jsx)(f,{className:`size-3.5 text-warning`})}),(0,w.jsx)(o,{className:`size-4 text-faint opacity-0 transition-opacity group-hover:opacity-100`})]})})]},n.name)})})]})}),(0,w.jsx)(x,{page:U,pageSize:E,total:B.length,onPageChange:O,label:`queues`})]})}export{D as QueuesOverview};
@@ -1 +1 @@
1
- import{t as e}from"./react-vendor-CHIHtdAC.js";import{C as t,O as n,S as r,b as i,h as a,k as o,x as s}from"./index-BFjeS9FG.js";var c=e(),l=[[`S3_BACKUP_ENABLED`,`Set to 1 to enable periodic backups`],[`S3_BUCKET`,`Target bucket name`],[`S3_REGION`,`Bucket region (default us-east-1)`],[`S3_ENDPOINT`,`Custom endpoint (for S3-compatible stores)`],[`S3_ACCESS_KEY_ID`,`Access key`],[`S3_SECRET_ACCESS_KEY`,`Secret key`],[`S3_BACKUP_INTERVAL`,`Interval in ms (default 21600000 = 6h)`],[`S3_BACKUP_RETENTION`,`Backups to keep (default 7)`]];function u(){let{data:e,error:u,loading:d,refetch:f}=n(()=>o.storage(),[]);return(0,c.jsxs)(`div`,{children:[u&&(0,c.jsx)(s,{onRetry:f}),(0,c.jsx)(a,{title:`S3 Backup`,description:`SQLite snapshot backups to object storage.`,live:!0}),(0,c.jsx)(`div`,{className:`mb-6 rounded-lg border border-line bg-surface/60 px-4 py-3 text-sm text-muted`,children:`S3 backup runs on the server and is configured via environment variables — it cannot be toggled from the dashboard. The status below reflects the connected server's storage.`}),(0,c.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 lg:grid-cols-2`,children:[(0,c.jsxs)(r,{children:[(0,c.jsx)(t,{title:`Storage status`}),d&&!e&&!u?(0,c.jsx)(i,{}):(0,c.jsxs)(`dl`,{className:`divide-y divide-line text-sm`,children:[(0,c.jsxs)(`div`,{className:`flex items-center justify-between py-2.5`,children:[(0,c.jsx)(`dt`,{className:`text-muted`,children:`Disk`}),(0,c.jsx)(`dd`,{className:e?.status?.diskFull?`font-medium text-red-400`:`font-medium text-emerald-400`,children:e?.status?.diskFull?`Full`:`Healthy`})]}),(0,c.jsxs)(`div`,{className:`flex items-center justify-between py-2.5`,children:[(0,c.jsx)(`dt`,{className:`text-muted`,children:`Path`}),(0,c.jsx)(`dd`,{className:`font-mono text-xs text-fg`,children:String(e?.status?.path??`—`)})]})]})]}),(0,c.jsxs)(r,{children:[(0,c.jsx)(t,{title:`Configuration (server env)`}),(0,c.jsx)(`dl`,{className:`divide-y divide-line text-sm`,children:l.map(([e,t])=>(0,c.jsxs)(`div`,{className:`flex items-center justify-between gap-4 py-2.5`,children:[(0,c.jsx)(`dt`,{className:`font-mono text-xs text-accent/90`,children:e}),(0,c.jsx)(`dd`,{className:`text-right text-xs text-faint`,children:t})]},e))})]})]})]})}export{u as S3Backup};
1
+ import{t as e}from"./react-vendor-CHIHtdAC.js";import{C as t,O as n,S as r,b as i,h as a,k as o,x as s}from"./index-C5VVVkqi.js";var c=e(),l=[[`S3_BACKUP_ENABLED`,`Set to 1 to enable periodic backups`],[`S3_BUCKET`,`Target bucket name`],[`S3_REGION`,`Bucket region (default us-east-1)`],[`S3_ENDPOINT`,`Custom endpoint (for S3-compatible stores)`],[`S3_ACCESS_KEY_ID`,`Access key`],[`S3_SECRET_ACCESS_KEY`,`Secret key`],[`S3_BACKUP_INTERVAL`,`Interval in ms (default 21600000 = 6h)`],[`S3_BACKUP_RETENTION`,`Backups to keep (default 7)`]];function u(){let{data:e,error:u,loading:d,refetch:f}=n(()=>o.storage(),[]);return(0,c.jsxs)(`div`,{children:[u&&(0,c.jsx)(s,{onRetry:f}),(0,c.jsx)(a,{title:`S3 Backup`,description:`SQLite snapshot backups to object storage.`,live:!0}),(0,c.jsx)(`div`,{className:`mb-6 rounded-lg border border-line bg-surface/60 px-4 py-3 text-sm text-muted`,children:`S3 backup runs on the server and is configured via environment variables — it cannot be toggled from the dashboard. The status below reflects the connected server's storage.`}),(0,c.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 lg:grid-cols-2`,children:[(0,c.jsxs)(r,{children:[(0,c.jsx)(t,{title:`Storage status`}),d&&!e&&!u?(0,c.jsx)(i,{}):(0,c.jsxs)(`dl`,{className:`divide-y divide-line text-sm`,children:[(0,c.jsxs)(`div`,{className:`flex items-center justify-between py-2.5`,children:[(0,c.jsx)(`dt`,{className:`text-muted`,children:`Disk`}),(0,c.jsx)(`dd`,{className:e?.status?.diskFull?`font-medium text-red-400`:`font-medium text-emerald-400`,children:e?.status?.diskFull?`Full`:`Healthy`})]}),(0,c.jsxs)(`div`,{className:`flex items-center justify-between py-2.5`,children:[(0,c.jsx)(`dt`,{className:`text-muted`,children:`Path`}),(0,c.jsx)(`dd`,{className:`font-mono text-xs text-fg`,children:String(e?.status?.path??`—`)})]})]})]}),(0,c.jsxs)(r,{children:[(0,c.jsx)(t,{title:`Configuration (server env)`}),(0,c.jsx)(`dl`,{className:`divide-y divide-line text-sm`,children:l.map(([e,t])=>(0,c.jsxs)(`div`,{className:`flex items-center justify-between gap-4 py-2.5`,children:[(0,c.jsx)(`dt`,{className:`font-mono text-xs text-accent/90`,children:e}),(0,c.jsx)(`dd`,{className:`text-right text-xs text-faint`,children:t})]},e))})]})]})]})}export{u as S3Backup};
@@ -0,0 +1 @@
1
+ import{r as e}from"./cn-CMFYpumL.js";import{m as t,t as n}from"./react-vendor-CHIHtdAC.js";import{a as r,o as i}from"./connectionStore-CCopJeU7.js";import{G as a,S as o,et as s,h as c,w as l,y as u}from"./index-C5VVVkqi.js";import{a as d,n as f,r as p,t as m}from"./form-PtDLk33Z.js";var h=e(t(),1);function g(e){return{endpoint:e.endpoint,region:e.region,bucket:e.bucket,schedule:e.schedule,pathPrefix:e.pathPrefix}}var _=i()(r(e=>({endpoint:``,region:`us-east-1`,bucket:``,accessKeyId:``,secretAccessKey:``,schedule:`disabled`,pathPrefix:``,set:t=>e(t)}),{name:`bq-dash-s3`,partialize:g})),v=n();function y(){let e=_(),[t,n]=(0,h.useState)(null),[r,i]=(0,h.useState)(!1),g=e.bucket.trim()!==``;return(0,v.jsxs)(`div`,{children:[(0,v.jsx)(c,{title:`S3 Backup`,description:`Automatic backups to S3-compatible storage.`}),(0,v.jsxs)(`div`,{className:`mb-6 flex items-center justify-between rounded-xl border border-line bg-surface px-5 py-4`,children:[(0,v.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,v.jsx)(`span`,{className:`flex size-10 items-center justify-center rounded-lg bg-surface-2 text-faint`,children:(0,v.jsx)(a,{className:`size-5`})}),(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`div`,{className:`font-semibold text-fg`,children:g?`Backup configured`:`No backup configured`}),(0,v.jsx)(`div`,{className:`text-xs text-faint`,children:g?`Target: ${e.bucket}`:`Set up S3 to protect your queue data`})]})]}),(0,v.jsx)(`span`,{className:g?`rounded-full bg-emerald-500/10 px-3 py-1 text-xs font-medium text-success`:`rounded-full bg-amber-500/10 px-3 py-1 text-xs font-medium text-warning`,children:g?`Ready`:`Configure`})]}),(0,v.jsx)(`div`,{className:`mb-6 rounded-lg border border-line bg-surface/60 px-4 py-2.5 text-xs text-faint`,children:`bunqueue reads S3 backup settings from server environment variables (S3_BUCKET, S3_REGION, …). This form helps you assemble that configuration; it is stored locally in your browser.`}),(0,v.jsxs)(o,{className:`mb-6`,children:[(0,v.jsx)(`h3`,{className:`mb-1 text-base font-semibold text-fg`,children:`Connection Settings`}),(0,v.jsx)(`p`,{className:`mb-4 text-xs text-faint`,children:`Works with AWS S3, Cloudflare R2, MinIO, DigitalOcean Spaces, and any S3-compatible provider.`}),(0,v.jsxs)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-2`,children:[(0,v.jsx)(m,{label:`Endpoint`,children:(0,v.jsx)(f,{value:e.endpoint,onChange:t=>e.set({endpoint:t.target.value}),placeholder:`https://s3.amazonaws.com`})}),(0,v.jsx)(m,{label:`Region`,children:(0,v.jsx)(f,{value:e.region,onChange:t=>e.set({region:t.target.value}),placeholder:`us-east-1`})}),(0,v.jsx)(`div`,{className:`md:col-span-2`,children:(0,v.jsx)(m,{label:`Bucket name`,children:(0,v.jsx)(f,{value:e.bucket,onChange:t=>e.set({bucket:t.target.value}),placeholder:`my-bunqueue-backups`})})}),(0,v.jsx)(m,{label:`Access key ID`,children:(0,v.jsx)(f,{value:e.accessKeyId,onChange:t=>e.set({accessKeyId:t.target.value}),placeholder:`AKIA…`})}),(0,v.jsx)(m,{label:`Secret access key`,children:(0,v.jsx)(f,{type:`password`,value:e.secretAccessKey,onChange:t=>e.set({secretAccessKey:t.target.value}),placeholder:`••••••••••••••••`})}),(0,v.jsx)(`p`,{className:`-mt-2 text-xs text-faint md:col-span-2`,children:`Keys are kept in memory only and cleared on reload.`}),(0,v.jsxs)(`div`,{children:[(0,v.jsx)(p,{children:`Backup schedule`}),(0,v.jsxs)(d,{value:e.schedule,onChange:t=>e.set({schedule:t.target.value}),className:`mt-1.5`,children:[(0,v.jsx)(`option`,{value:`disabled`,children:`Disabled`}),(0,v.jsx)(`option`,{value:`6h`,children:`Every 6 hours`}),(0,v.jsx)(`option`,{value:`12h`,children:`Every 12 hours`}),(0,v.jsx)(`option`,{value:`24h`,children:`Every 24 hours`})]})]}),(0,v.jsx)(m,{label:`Path prefix (optional)`,children:(0,v.jsx)(f,{value:e.pathPrefix,onChange:t=>e.set({pathPrefix:t.target.value}),placeholder:`backups/production/`})})]}),(0,v.jsxs)(`div`,{className:`mt-5 flex flex-wrap items-center gap-2`,children:[(0,v.jsx)(l,{variant:`accent`,onClick:()=>{i(!0),setTimeout(()=>i(!1),2e3)},children:`Save Configuration`}),(0,v.jsx)(l,{onClick:async()=>{n(null);try{let e=await s.storage();n({ok:!e.data?.diskFull,msg:e.data?.diskFull?`Server disk is full`:`Server storage reachable`})}catch(e){n({ok:!1,msg:e.message})}},children:`Test Connection`}),(0,v.jsx)(l,{disabled:!0,title:`Trigger a manual backup — requires server-side S3 config`,children:`Backup Now`}),r&&(0,v.jsx)(`span`,{className:`text-xs text-success`,children:`Saved locally (keys excluded)`}),t&&(0,v.jsx)(`span`,{className:t.ok?`text-xs text-success`:`text-xs text-danger`,children:t.msg})]})]}),(0,v.jsxs)(o,{children:[(0,v.jsx)(`h3`,{className:`mb-4 text-base font-semibold text-fg`,children:`Backup History`}),(0,v.jsx)(u,{icon:(0,v.jsx)(a,{}),title:`No backups yet`,hint:`Configure your S3 connection and run a backup to get started.`})]})]})}export{y as S3BackupPro};
@@ -1,3 +1,3 @@
1
- import{r as e,t}from"./cn-CMFYpumL.js";import{m as n,t as r}from"./react-vendor-CHIHtdAC.js";import{B as i,C as a,G as o,O as s,S as c,U as l,V as u,Z as d,a as f,d as p,h as m,p as h,r as g,u as _,w as v,x as y}from"./index-BFjeS9FG.js";import{i as b,n as x,t as S}from"./form-PtDLk33Z.js";import{t as C}from"./CopyButton-BC6QECSJ.js";var w=e(n(),1),T=r();function E({children:e}){return(0,T.jsx)(`code`,{className:`rounded bg-surface-2 px-1.5 py-0.5 text-xs text-fg`,children:e})}function D({agentBase:e}){return(0,T.jsx)(c,{children:(0,T.jsxs)(`details`,{className:`group`,children:[(0,T.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center justify-between gap-2`,children:[(0,T.jsx)(`span`,{className:`text-base font-semibold text-fg`,children:`How server control works`}),(0,T.jsx)(`span`,{className:`text-xs text-muted transition-transform group-open:rotate-90`,children:`▶`})]}),(0,T.jsxs)(`div`,{className:`mt-4 space-y-4 text-sm leading-relaxed text-muted`,children:[(0,T.jsxs)(`p`,{children:[`A browser can't start or stop an OS process, so the dashboard talks to a small local`,` `,(0,T.jsx)(`span`,{className:`font-medium text-fg`,children:`control agent`}),` (`,(0,T.jsx)(E,{children:e}),`) that supervises the bunqueue server process — start, stop and restart — and streams its logs back here.`]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`mb-1 font-medium text-fg`,children:`Launch & environment`}),(0,T.jsxs)(`p`,{children:[`The agent runs your `,(0,T.jsx)(`span`,{className:`text-fg`,children:`Command`}),` and injects`,` `,(0,T.jsx)(E,{children:`HTTP_PORT`}),`, `,(0,T.jsx)(E,{children:`TCP_PORT`}),` and `,(0,T.jsx)(E,{children:`BUNQUEUE_DATA_PATH`}),` — plus any `,(0,T.jsx)(`span`,{className:`text-fg`,children:`Environment variables`}),` you add — into its environment. The default `,(0,T.jsx)(E,{children:`bunqueue start`}),` needs a globally-installed binary; pointing the command at a local entry (e.g.`,` `,(0,T.jsx)(E,{children:`bun run /path/to/bunqueue/src/main.ts`}),`) works without one.`]})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`mb-1 font-medium text-fg`,children:`When changes apply`}),(0,T.jsxs)(`p`,{children:[`Config is editable any time, but `,(0,T.jsx)(`span`,{className:`text-fg`,children:`Command`}),`, ports and data path only take effect on the `,(0,T.jsx)(`span`,{className:`text-fg`,children:`next start/restart`}),` `,`— the running process keeps the config it launched with until then.`]})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`mb-1 font-medium text-fg`,children:`Data path`}),(0,T.jsxs)(`p`,{children:[`Relative paths resolve against the `,(0,T.jsx)(`span`,{className:`text-fg`,children:`agent's`}),` working directory. SQLite creates the database `,(0,T.jsx)(`span`,{className:`text-fg`,children:`file`}),` but not its parent `,(0,T.jsx)(`span`,{className:`text-fg`,children:`folder`}),` — if start fails with`,` `,(0,T.jsx)(E,{children:`SQLITE_CANTOPEN`}),`, create the directory first or use a path whose folder already exists.`]})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`mb-1 font-medium text-fg`,children:`Security`}),(0,T.jsxs)(`p`,{children:[`The agent can spawn processes, so it binds `,(0,T.jsx)(E,{children:`127.0.0.1`}),` only, locks CORS to an allowlist (never `,(0,T.jsx)(E,{children:`*`}),`), rejects any disallowed `,(0,T.jsx)(E,{children:`Origin`}),` or`,` `,(0,T.jsx)(E,{children:`Host`}),` with a `,(0,T.jsx)(E,{children:`403`}),` (the latter blocks DNS-rebinding reads), and honours an optional `,(0,T.jsx)(E,{children:`AGENT_TOKEN`}),` on state-changing requests. Keep its port on loopback.`]}),(0,T.jsxs)(`p`,{children:[`If you started the agent with `,(0,T.jsx)(E,{children:`AGENT_TOKEN`}),`, enter that token under`,` `,(0,T.jsx)(`span`,{className:`text-fg`,children:`Settings → Agent token`}),` (or when the lock screen prompts) so start / stop / restart and config changes are authorized.`]})]})]})]})})}var O=0,k=e=>Object.entries(e).map(([e,t])=>({id:O++,key:e,value:t})),A=e=>{let t={};for(let n of e){let e=n.key.trim();e&&(t[e]=n.value)}return t},j=[`AUTH_TOKENS`,`LOG_LEVEL`,`S3_BACKUP_ENABLED`,`S3_BUCKET`,`METRICS_ENABLED`];function M({value:e,onChange:t,disabled:n}){let[r,i]=(0,w.useState)(()=>k(e)),a=e=>{i(e),t(A(e))},o=(e,t)=>a(r.map(n=>n.id===e?{...n,...t}:n)),s=(e=``)=>a([...r,{id:O++,key:e,value:``}]),c=e=>a(r.filter(t=>t.id!==e)),l=new Set(r.map(e=>e.key.trim()).filter(Boolean)),u=r.map(e=>e.key.trim()).filter((e,t,n)=>e&&n.indexOf(e)!==t);return(0,T.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[r.length===0&&(0,T.jsxs)(`p`,{className:`text-xs leading-relaxed text-faint`,children:[`No custom variables. The agent already injects`,` `,(0,T.jsx)(`code`,{className:`rounded bg-surface-2 px-1 py-0.5`,children:`HTTP_PORT`}),`,`,` `,(0,T.jsx)(`code`,{className:`rounded bg-surface-2 px-1 py-0.5`,children:`TCP_PORT`}),` and`,` `,(0,T.jsx)(`code`,{className:`rounded bg-surface-2 px-1 py-0.5`,children:`BUNQUEUE_DATA_PATH`}),`.`]}),r.map(e=>(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(`div`,{className:`w-2/5 shrink-0`,children:(0,T.jsx)(x,{className:`font-mono`,placeholder:`KEY`,value:e.key,disabled:n,onChange:t=>o(e.id,{key:t.target.value})})}),(0,T.jsx)(`span`,{className:`text-faint`,children:`=`}),(0,T.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,T.jsx)(x,{className:`font-mono`,placeholder:`value`,value:e.value,disabled:n,onChange:t=>o(e.id,{value:t.target.value})})}),(0,T.jsx)(`button`,{type:`button`,"aria-label":`Remove ${e.key||`variable`}`,disabled:n,onClick:()=>c(e.id),className:`shrink-0 rounded-md px-2 py-1 text-xs text-faint transition-colors hover:text-danger disabled:opacity-40`,children:`✕`})]},e.id)),u.length>0&&(0,T.jsxs)(`p`,{className:`text-xs text-warning`,children:[`Duplicate key`,u.length>1?`s`:``,` — the last value wins: `,u.join(`, `)]}),(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 pt-1`,children:[(0,T.jsx)(v,{size:`sm`,variant:`ghost`,disabled:n,onClick:()=>s(),children:`+ Add variable`}),j.filter(e=>!l.has(e)).map(e=>(0,T.jsxs)(`button`,{type:`button`,disabled:n,onClick:()=>s(e),className:`rounded-md border border-line bg-surface-2 px-2 py-1 font-mono text-[11px] text-muted transition-colors hover:border-line-strong hover:text-fg disabled:opacity-40`,children:[`+ `,e]},e))]})]})}var N=[`all`,`stdout`,`stderr`,`sys`],P=e=>`${new Date(e).toLocaleTimeString([],{hour12:!1})}.${String(e%1e3).padStart(3,`0`)}`,F=e=>e===`stderr`?`text-danger/90`:e===`sys`?`text-accent/80`:`text-muted`;function I(){let{data:e}=R(),n=(0,w.useMemo)(()=>e?.lines??[],[e]),[r,i]=(0,w.useState)(`all`),[a,s]=(0,w.useState)(``),[l,u]=(0,w.useState)(!0),[d,f]=(0,w.useState)(!1),p=(0,w.useRef)(null),m=(0,w.useMemo)(()=>{let e=a.trim().toLowerCase();return n.map(e=>e.line.includes(`\x1B`)?{...e,line:h(e.line)}:e).filter(t=>(r===`all`||t.stream===r)&&(!e||t.line.toLowerCase().includes(e)))},[n,r,a]);(0,w.useEffect)(()=>{if(!l)return;let e=p.current;e&&(e.scrollTop=e.scrollHeight)},[m.length,l]);let g=(0,w.useMemo)(()=>m.map(e=>d?`${P(e.ts)} [${e.stream}] ${e.line}`:e.line).join(`
2
- `),[m,d]);return(0,T.jsxs)(c,{padded:!1,className:`overflow-hidden`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-b border-line px-4 py-3`,children:[(0,T.jsx)(`h3`,{className:`mr-1 text-base font-semibold text-fg`,children:`Process logs`}),(0,T.jsx)(b,{options:N,value:r,onChange:i}),(0,T.jsxs)(`div`,{className:`relative min-w-40 flex-1`,children:[(0,T.jsx)(o,{className:`pointer-events-none absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-faint`}),(0,T.jsx)(`input`,{value:a,onChange:e=>s(e.target.value),"aria-label":`Filter log lines`,placeholder:`Filter…`,className:`h-8 w-full rounded-lg border border-line bg-surface-2 pl-8 pr-2 text-xs text-fg placeholder:text-faint focus:border-accent/60 focus:outline-none focus:ring-2 focus:ring-accent/30`})]}),(0,T.jsx)(L,{on:l,onClick:()=>u(e=>!e),label:`Follow`}),(0,T.jsx)(L,{on:d,onClick:()=>f(e=>!e),label:`Times`}),(0,T.jsx)(C,{value:g}),(0,T.jsx)(`button`,{type:`button`,onClick:()=>{let e=new Blob([g],{type:`text/plain`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`bunqueue-logs-${Date.now()}.log`,n.click(),URL.revokeObjectURL(t)},disabled:m.length===0,className:`rounded-md border border-line bg-surface-2 px-2 py-1 text-xs text-muted transition-colors hover:text-fg disabled:opacity-40`,children:`Download`})]}),(0,T.jsx)(`div`,{ref:p,className:`max-h-80 min-h-40 overflow-y-auto p-4 font-mono text-xs leading-relaxed`,children:m.length===0?(0,T.jsx)(`p`,{className:`text-faint`,children:n.length===0?`No output yet.`:`No lines match the current filter.`}):m.map(e=>(0,T.jsxs)(`div`,{className:t(`whitespace-pre-wrap`,F(e.stream)),children:[d&&(0,T.jsx)(`span`,{className:`mr-2 text-faint`,children:P(e.ts)}),e.line]},e.seq))}),(0,T.jsxs)(`div`,{className:`flex items-center justify-between border-t border-line px-4 py-2 text-[11px] text-faint`,children:[(0,T.jsx)(`span`,{children:m.length===n.length?`${n.length} lines`:`${m.length} of ${n.length} lines`}),(0,T.jsx)(`span`,{children:l?`following tail`:`paused`})]})]})}function L({on:e,onClick:n,label:r}){return(0,T.jsx)(`button`,{type:`button`,onClick:n,"aria-pressed":e,className:t(`rounded-md border px-2 py-1 text-xs transition-colors`,e?`border-accent/40 bg-accent/10 text-accent`:`border-line bg-surface-2 text-muted hover:text-fg`),children:r})}function R(){return s(()=>d.control.logs(),[])}var z={running:{label:`Running`,tone:`text-success`,dot:`bg-emerald-400`},starting:{label:`Starting`,tone:`text-warning`,dot:`bg-amber-400`},stopping:{label:`Stopping`,tone:`text-warning`,dot:`bg-amber-400`},stopped:{label:`Stopped`,tone:`text-danger`,dot:`bg-red-400`}};function B({startedAt:e}){let[,t]=(0,w.useState)(0);return(0,w.useEffect)(()=>{let e=setInterval(()=>t(e=>e+1),1e3);return()=>clearInterval(e)},[]),(0,T.jsx)(T.Fragment,{children:p((Date.now()-e)/1e3)})}function V({label:e,children:t,title:n}){return(0,T.jsxs)(`div`,{className:`min-w-0`,title:n,children:[(0,T.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-wider text-faint`,children:e}),(0,T.jsx)(`div`,{className:`mt-0.5 truncate font-mono text-sm text-fg`,children:t})]})}function H({status:e,agentBase:n,transitioning:r,stale:a=!1,vitals:o=null,busy:s,onStart:c,onStop:d,onRestart:p}){let m=e?.status??`stopped`,h=m===`running`,g=z[m]??z.stopped,_=!!e?.healthy&&!a,y=!h&&e?.exitCode!=null&&e.exitCode!==0,b=e?.runningConfig??e?.config??null,x=`http://localhost:${b?.httpPort??6790}`;return(0,T.jsxs)(`section`,{className:`mb-6 overflow-hidden rounded-xl border border-line bg-surface`,children:[(0,T.jsx)(`div`,{className:t(`h-0.5 bg-gradient-to-r to-transparent`,h&&_?`from-emerald-400/80 via-emerald-400/25`:h||r?`from-amber-400/80 via-amber-400/25`:`from-red-400/70 via-red-400/20`)}),(0,T.jsxs)(`div`,{className:`flex flex-col gap-5 p-5 lg:flex-row lg:items-center lg:justify-between`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,T.jsxs)(`span`,{className:`relative flex size-3.5 shrink-0`,children:[h&&_&&(0,T.jsx)(`span`,{className:`absolute inline-flex size-full rounded-full bg-emerald-400 opacity-50 motion-safe:animate-ping`}),(0,T.jsx)(`span`,{className:t(`relative inline-flex size-3.5 rounded-full`,g.dot)})]}),(0,T.jsxs)(`div`,{className:`min-w-0`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-3 gap-y-1`,children:[(0,T.jsx)(`span`,{className:t(`text-2xl font-bold tracking-tight`,g.tone),children:r&&s?`${s}…`:g.label}),e?.version&&(0,T.jsxs)(`span`,{className:`font-mono text-xs text-muted`,children:[`bunqueue v`,e.version]}),y&&(0,T.jsxs)(`span`,{className:`rounded-full bg-red-500/15 px-2 py-0.5 font-mono text-[11px] font-medium text-danger`,children:[`crashed · exit `,e?.exitCode]})]}),(0,T.jsx)(`div`,{className:`mt-1 font-mono text-xs text-muted`,children:a?(0,T.jsxs)(`span`,{className:`text-warning`,children:[`last known: pid `,e?.pid??`—`,` — agent unreachable, state may have changed`]}):h?(0,T.jsxs)(T.Fragment,{children:[_?`healthy`:`waiting for health…`,` · pid `,e?.pid??`—`,` · up`,` `,e?.startedAt?(0,T.jsx)(B,{startedAt:e.startedAt}):`—`]}):`process not running — start it below or point the dashboard at an external server`})]})]}),(0,T.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,T.jsxs)(v,{variant:`success`,disabled:h||r||a,onClick:c,children:[(0,T.jsx)(u,{className:`size-4`}),` Start`]}),(0,T.jsxs)(v,{variant:`warning`,disabled:!h||r||a,onClick:d,children:[(0,T.jsx)(i,{className:`size-4`}),` Stop`]}),(0,T.jsxs)(v,{disabled:r||a,onClick:p,children:[(0,T.jsx)(l,{className:`size-4`}),` Restart`]})]})]}),(0,T.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 border-t border-line bg-surface-2/30 px-5 py-4 md:grid-cols-3 xl:grid-cols-7`,children:[(0,T.jsx)(V,{label:`Memory`,children:o?.memory?.rss==null?(0,T.jsx)(`span`,{className:`text-faint`,children:`—`}):(0,T.jsxs)(`span`,{title:`heap ${o.memory.heapUsed??`?`} / ${o.memory.heapTotal??`?`} MB`,children:[o.memory.rss,` MB rss`]})}),(0,T.jsx)(V,{label:`Connections`,children:o?.connections?`${o.connections.tcp??0} tcp · ${o.connections.ws??0} ws · ${o.connections.sse??0} sse`:(0,T.jsx)(`span`,{className:`text-faint`,children:`—`})}),(0,T.jsx)(V,{label:`API endpoint`,title:x,children:h?(0,T.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,T.jsx)(`a`,{href:`${x}/health`,target:`_blank`,rel:`noreferrer`,className:`truncate text-accent hover:underline`,children:x}),(0,T.jsx)(C,{value:x})]}):(0,T.jsx)(`span`,{className:`text-faint`,children:x})}),(0,T.jsx)(V,{label:`Ports`,children:b?`${b.httpPort} http · ${b.tcpPort} tcp`:`—`}),(0,T.jsx)(V,{label:`Started`,children:h&&e?.startedAt?f(e.startedAt):`—`}),(0,T.jsx)(V,{label:`Control agent`,title:n,children:n.replace(/^https?:\/\//,``)}),(0,T.jsx)(V,{label:`Launch command`,title:b?.command,children:b?.command??`—`})]})]})}var U=[{key:`size`,label:`Database`,color:`bg-accent`},{key:`walSize`,label:`WAL`,color:`bg-amber-400`},{key:`shmSize`,label:`SHM`,color:`bg-zinc-500`}];function W({db:e}){let n=e.totalSize||0;return(0,T.jsxs)(c,{children:[(0,T.jsxs)(`div`,{className:`mb-1 flex items-baseline justify-between gap-2`,children:[(0,T.jsx)(`h3`,{className:`text-base font-semibold text-fg`,children:`Storage`}),(0,T.jsx)(`span`,{className:`font-mono text-xs text-muted`,children:e.exists?`${g(n)} on disk`:`not created yet`})]}),(0,T.jsxs)(`p`,{className:`mb-4 flex items-center gap-1.5 truncate font-mono text-xs text-faint`,title:e.path,children:[(0,T.jsx)(`span`,{className:`truncate`,children:e.path}),(0,T.jsx)(C,{value:e.path})]}),e.exists&&n>0?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`div`,{className:`flex h-2.5 overflow-hidden rounded-full bg-surface-2`,children:U.map(r=>{let i=e[r.key];return i?(0,T.jsx)(`div`,{className:t(`h-full`,r.color),style:{width:`${i/n*100}%`},title:`${r.label}: ${g(i)}`},r.key):null})}),(0,T.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-x-5 gap-y-1.5 font-mono text-[11px] text-faint`,children:[U.map(n=>(0,T.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,T.jsx)(`span`,{className:t(`size-2 rounded-full`,n.color)}),n.label,` `,(0,T.jsx)(`span`,{className:`text-fg`,children:g(e[n.key])})]},n.key)),e.mtimeMs?(0,T.jsxs)(`span`,{className:`ml-auto`,children:[`written `,_(e.mtimeMs)]}):null]})]}):(0,T.jsx)(`p`,{className:`rounded-lg border border-dashed border-line px-4 py-6 text-center text-sm text-faint`,children:`The database appears here after the first start — SQLite creates the file at the configured data path.`})]})}function G(){let{data:e,error:t,refetch:n}=s(()=>d.control.status(),[]),[r,i]=(0,w.useState)(null),[o,l]=(0,w.useState)(null),u=e?.status===`running`,{data:f}=s(()=>u?d.health():Promise.resolve(null),[u]),p=u?f??null:null,h=async(e,t,r)=>{if(!(r&&!window.confirm(r))){i(e),l(null);try{await t(),await n()}catch(e){l(e.message)}finally{i(null)}}};if(t&&!e)return(0,T.jsxs)(`div`,{children:[(0,T.jsx)(m,{title:`Server`,description:`Start, stop and restart the bunqueue server.`}),(0,T.jsx)(y,{message:`Control agent unreachable — server lifecycle controls are unavailable.`,onRetry:n}),(0,T.jsxs)(c,{children:[(0,T.jsx)(a,{title:`Control agent not running`}),(0,T.jsxs)(`p`,{className:`text-sm text-muted`,children:[`The local control agent is unreachable at`,` `,(0,T.jsx)(`code`,{className:`rounded bg-surface-2 px-1.5 py-0.5 text-xs`,children:d.agentBase}),`. It manages the bunqueue server process (start / stop / restart). Start it with:`]}),(0,T.jsxs)(`pre`,{className:`mt-3 overflow-x-auto rounded-lg border border-line bg-surface-2 px-3 py-2 text-xs`,children:[`bun start`,` `,`# agent + dashboard together (recommended)`,`
3
- `,`bun run agent`,` `,`# agent only, if the dashboard is already running`]}),(0,T.jsx)(`p`,{className:`mt-3 text-xs text-faint`,children:`This page reconnects automatically once the agent is up — no reload needed.`})]})]});let g=e?.status??`stopped`,_=g===`running`,v=g===`starting`||g===`stopping`||r!=null,b=t!=null&&e!=null;return(0,T.jsxs)(`div`,{children:[(0,T.jsx)(m,{title:`Server`,description:`Supervise the bunqueue server process — lifecycle, configuration, storage and logs.`}),o&&(0,T.jsx)(`div`,{className:`mb-4 rounded-lg border border-red-500/20 bg-red-500/5 px-4 py-2 text-sm text-danger`,children:o}),b&&(0,T.jsx)(`div`,{className:`mb-4 rounded-lg border border-amber-500/20 bg-amber-500/5 px-4 py-2 text-sm text-warning`,children:`Control agent unreachable — showing last known state. Lifecycle actions are disabled until it responds again.`}),(0,T.jsx)(H,{status:e,agentBase:d.agentBase,stale:b,vitals:p,transitioning:v,busy:r,onStart:()=>h(`starting`,()=>d.control.start()),onStop:()=>h(`stopping`,()=>d.control.stop(),`Stop the bunqueue server?`),onRestart:()=>h(`restarting`,()=>d.control.restart(),`Restart the bunqueue server?`)}),(0,T.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 lg:grid-cols-2`,children:[(0,T.jsx)(K,{status:e,onSaved:n,running:_,transitioning:v}),(0,T.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[e?.db&&(0,T.jsx)(W,{db:e.db}),(0,T.jsx)(I,{})]})]}),(0,T.jsx)(`div`,{className:`mt-6`,children:(0,T.jsx)(D,{agentBase:d.agentBase})})]})}function K({status:e,onSaved:t,running:n,transitioning:r}){let[i,o]=(0,w.useState)(null),[s,u]=(0,w.useState)(!1),[f,p]=(0,w.useState)(!1),[m,h]=(0,w.useState)(null);(0,w.useEffect)(()=>{e?.config&&!i&&o(e.config)},[e,i]);let g=i??e?.config??null;if(!g)return(0,T.jsx)(c,{children:`Loading…`});let _=e=>o({...g,...e}),y=e?.runningConfig??null,b=(e={})=>JSON.stringify(Object.keys(e).sort().map(t=>[t,e[t]])),C=n&&y!=null&&(y.command!==g.command||y.httpPort!==g.httpPort||y.tcpPort!==g.tcpPort||y.dataPath!==g.dataPath||b(y.extraEnv)!==b(g.extraEnv)),E=r||f,D=()=>{u(!0),setTimeout(()=>u(!1),2e3)},O=()=>{let e=e=>Number.isInteger(e)&&e>=1&&e<=65535;return e(g.httpPort)?e(g.tcpPort)?g.httpPort===g.tcpPort?`HTTP and TCP ports must differ`:null:`TCP port must be an integer between 1 and 65535`:`HTTP port must be an integer between 1 and 65535`};return(0,T.jsxs)(c,{children:[(0,T.jsx)(a,{title:`Configuration`}),(0,T.jsx)(`p`,{className:`mb-3 text-xs text-muted`,children:n?`Ports and data path apply on the next restart — edit freely, then restart.`:`Edit and save; the config is used the next time the server starts.`}),(0,T.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,T.jsx)(S,{label:`Command`,hint:`The exact command the agent runs to launch bunqueue. It receives HTTP_PORT, TCP_PORT and BUNQUEUE_DATA_PATH in its environment. The default needs a global 'bunqueue' binary — or point it at a local entry, e.g. bun run /path/to/bunqueue/src/main.ts.`,children:(0,T.jsx)(x,{value:g.command,disabled:E,onChange:e=>_({command:e.target.value}),placeholder:`bunqueue start`})}),(0,T.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,T.jsx)(S,{label:`HTTP port`,hint:`Dashboard API + SSE.`,children:(0,T.jsx)(x,{type:`number`,min:1,max:65535,value:g.httpPort,disabled:E,onChange:e=>_({httpPort:Number(e.target.value)})})}),(0,T.jsx)(S,{label:`TCP port`,hint:`Binary protocol. Must differ from HTTP.`,children:(0,T.jsx)(x,{type:`number`,min:1,max:65535,value:g.tcpPort,disabled:E,onChange:e=>_({tcpPort:Number(e.target.value)})})})]}),(0,T.jsx)(S,{label:`Data path`,hint:`SQLite database file, relative to the agent's working directory. The parent folder must already exist — SQLite creates the file, not the directory.`,children:(0,T.jsx)(x,{value:g.dataPath,disabled:E,onChange:e=>_({dataPath:e.target.value})})}),(0,T.jsx)(S,{label:`Environment variables`,hint:`Injected into the server process on start, on top of the ports + data path. Applies on the next restart.`,children:(0,T.jsx)(M,{value:g.extraEnv??{},onChange:e=>_({extraEnv:e}),disabled:E})}),(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,T.jsx)(v,{variant:`accent`,size:`sm`,disabled:E,onClick:async()=>{let e=O();if(e){h(e);return}h(null);try{await d.control.setConfig(g),D(),t()}catch(e){h(e.message)}},children:`Save config`}),n&&(0,T.jsxs)(v,{variant:`warning`,size:`sm`,disabled:E,onClick:async()=>{let e=O();if(e){h(e);return}if(window.confirm(`Save configuration and restart the server to apply it?`)){h(null),p(!0);try{await d.control.setConfig(g),await d.control.restart(),D(),t()}catch(e){h(e.message)}finally{p(!1)}}},children:[(0,T.jsx)(l,{className:`size-3.5`}),` Save & restart`]}),C&&!s&&(0,T.jsx)(`span`,{className:`text-xs text-warning`,children:`Restart to apply changes`}),s&&(0,T.jsx)(`span`,{className:`text-xs text-success`,children:`Saved`}),m&&(0,T.jsx)(`span`,{className:`text-xs text-danger`,children:m})]})]})]})}export{G as ServerControl};
1
+ import{r as e,t}from"./cn-CMFYpumL.js";import{m as n,t as r}from"./react-vendor-CHIHtdAC.js";import{C as i,H as a,K as o,O as s,S as c,V as l,W as u,a as d,d as f,et as p,h as m,p as h,r as g,u as _,w as v,x as y}from"./index-C5VVVkqi.js";import{i as b,n as x,t as S}from"./form-PtDLk33Z.js";import{t as C}from"./CopyButton-D39F1wIH.js";var w=e(n(),1),T=r();function E({children:e}){return(0,T.jsx)(`code`,{className:`rounded bg-surface-2 px-1.5 py-0.5 text-xs text-fg`,children:e})}function D({agentBase:e}){return(0,T.jsx)(c,{children:(0,T.jsxs)(`details`,{className:`group`,children:[(0,T.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center justify-between gap-2`,children:[(0,T.jsx)(`span`,{className:`text-base font-semibold text-fg`,children:`How server control works`}),(0,T.jsx)(`span`,{className:`text-xs text-muted transition-transform group-open:rotate-90`,children:`▶`})]}),(0,T.jsxs)(`div`,{className:`mt-4 space-y-4 text-sm leading-relaxed text-muted`,children:[(0,T.jsxs)(`p`,{children:[`A browser can't start or stop an OS process, so the dashboard talks to a small local`,` `,(0,T.jsx)(`span`,{className:`font-medium text-fg`,children:`control agent`}),` (`,(0,T.jsx)(E,{children:e}),`) that supervises the bunqueue server process — start, stop and restart — and streams its logs back here.`]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`mb-1 font-medium text-fg`,children:`Launch & environment`}),(0,T.jsxs)(`p`,{children:[`The agent runs your `,(0,T.jsx)(`span`,{className:`text-fg`,children:`Command`}),` and injects`,` `,(0,T.jsx)(E,{children:`HTTP_PORT`}),`, `,(0,T.jsx)(E,{children:`TCP_PORT`}),` and `,(0,T.jsx)(E,{children:`BUNQUEUE_DATA_PATH`}),` — plus any `,(0,T.jsx)(`span`,{className:`text-fg`,children:`Environment variables`}),` you add — into its environment. The default `,(0,T.jsx)(E,{children:`bunqueue start`}),` needs a globally-installed binary; pointing the command at a local entry (e.g.`,` `,(0,T.jsx)(E,{children:`bun run /path/to/bunqueue/src/main.ts`}),`) works without one.`]})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`mb-1 font-medium text-fg`,children:`When changes apply`}),(0,T.jsxs)(`p`,{children:[`Config is editable any time, but `,(0,T.jsx)(`span`,{className:`text-fg`,children:`Command`}),`, ports and data path only take effect on the `,(0,T.jsx)(`span`,{className:`text-fg`,children:`next start/restart`}),` `,`— the running process keeps the config it launched with until then.`]})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`mb-1 font-medium text-fg`,children:`Data path`}),(0,T.jsxs)(`p`,{children:[`Relative paths resolve against the `,(0,T.jsx)(`span`,{className:`text-fg`,children:`agent's`}),` working directory. SQLite creates the database `,(0,T.jsx)(`span`,{className:`text-fg`,children:`file`}),` but not its parent `,(0,T.jsx)(`span`,{className:`text-fg`,children:`folder`}),` — if start fails with`,` `,(0,T.jsx)(E,{children:`SQLITE_CANTOPEN`}),`, create the directory first or use a path whose folder already exists.`]})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`mb-1 font-medium text-fg`,children:`Security`}),(0,T.jsxs)(`p`,{children:[`The agent can spawn processes, so it binds `,(0,T.jsx)(E,{children:`127.0.0.1`}),` only, locks CORS to an allowlist (never `,(0,T.jsx)(E,{children:`*`}),`), rejects any disallowed `,(0,T.jsx)(E,{children:`Origin`}),` or`,` `,(0,T.jsx)(E,{children:`Host`}),` with a `,(0,T.jsx)(E,{children:`403`}),` (the latter blocks DNS-rebinding reads), and honours an optional `,(0,T.jsx)(E,{children:`AGENT_TOKEN`}),` on state-changing requests. Keep its port on loopback.`]}),(0,T.jsxs)(`p`,{children:[`If you started the agent with `,(0,T.jsx)(E,{children:`AGENT_TOKEN`}),`, enter that token under`,` `,(0,T.jsx)(`span`,{className:`text-fg`,children:`Settings → Agent token`}),` (or when the lock screen prompts) so start / stop / restart and config changes are authorized.`]})]})]})]})})}var O=0,k=e=>Object.entries(e).map(([e,t])=>({id:O++,key:e,value:t})),A=e=>{let t={};for(let n of e){let e=n.key.trim();e&&(t[e]=n.value)}return t},j=[`AUTH_TOKENS`,`LOG_LEVEL`,`S3_BACKUP_ENABLED`,`S3_BUCKET`,`METRICS_ENABLED`];function M({value:e,onChange:t,disabled:n}){let[r,i]=(0,w.useState)(()=>k(e)),a=e=>{i(e),t(A(e))},o=(e,t)=>a(r.map(n=>n.id===e?{...n,...t}:n)),s=(e=``)=>a([...r,{id:O++,key:e,value:``}]),c=e=>a(r.filter(t=>t.id!==e)),l=new Set(r.map(e=>e.key.trim()).filter(Boolean)),u=r.map(e=>e.key.trim()).filter((e,t,n)=>e&&n.indexOf(e)!==t);return(0,T.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[r.length===0&&(0,T.jsxs)(`p`,{className:`text-xs leading-relaxed text-faint`,children:[`No custom variables. The agent already injects`,` `,(0,T.jsx)(`code`,{className:`rounded bg-surface-2 px-1 py-0.5`,children:`HTTP_PORT`}),`,`,` `,(0,T.jsx)(`code`,{className:`rounded bg-surface-2 px-1 py-0.5`,children:`TCP_PORT`}),` and`,` `,(0,T.jsx)(`code`,{className:`rounded bg-surface-2 px-1 py-0.5`,children:`BUNQUEUE_DATA_PATH`}),`.`]}),r.map(e=>(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(`div`,{className:`w-2/5 shrink-0`,children:(0,T.jsx)(x,{className:`font-mono`,placeholder:`KEY`,value:e.key,disabled:n,onChange:t=>o(e.id,{key:t.target.value})})}),(0,T.jsx)(`span`,{className:`text-faint`,children:`=`}),(0,T.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,T.jsx)(x,{className:`font-mono`,placeholder:`value`,value:e.value,disabled:n,onChange:t=>o(e.id,{value:t.target.value})})}),(0,T.jsx)(`button`,{type:`button`,"aria-label":`Remove ${e.key||`variable`}`,disabled:n,onClick:()=>c(e.id),className:`shrink-0 rounded-md px-2 py-1 text-xs text-faint transition-colors hover:text-danger disabled:opacity-40`,children:`✕`})]},e.id)),u.length>0&&(0,T.jsxs)(`p`,{className:`text-xs text-warning`,children:[`Duplicate key`,u.length>1?`s`:``,` — the last value wins: `,u.join(`, `)]}),(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 pt-1`,children:[(0,T.jsx)(v,{size:`sm`,variant:`ghost`,disabled:n,onClick:()=>s(),children:`+ Add variable`}),j.filter(e=>!l.has(e)).map(e=>(0,T.jsxs)(`button`,{type:`button`,disabled:n,onClick:()=>s(e),className:`rounded-md border border-line bg-surface-2 px-2 py-1 font-mono text-[11px] text-muted transition-colors hover:border-line-strong hover:text-fg disabled:opacity-40`,children:[`+ `,e]},e))]})]})}var N=[`all`,`stdout`,`stderr`,`sys`],P=e=>`${new Date(e).toLocaleTimeString([],{hour12:!1})}.${String(e%1e3).padStart(3,`0`)}`,F=e=>e===`stderr`?`text-danger/90`:e===`sys`?`text-accent/80`:`text-muted`;function I(){let{data:e}=R(),n=(0,w.useMemo)(()=>e?.lines??[],[e]),[r,i]=(0,w.useState)(`all`),[a,s]=(0,w.useState)(``),[l,u]=(0,w.useState)(!0),[d,f]=(0,w.useState)(!1),p=(0,w.useRef)(null),m=(0,w.useMemo)(()=>{let e=a.trim().toLowerCase();return n.map(e=>e.line.includes(`\x1B`)?{...e,line:h(e.line)}:e).filter(t=>(r===`all`||t.stream===r)&&(!e||t.line.toLowerCase().includes(e)))},[n,r,a]);(0,w.useEffect)(()=>{if(!l)return;let e=p.current;e&&(e.scrollTop=e.scrollHeight)},[m.length,l]);let g=(0,w.useMemo)(()=>m.map(e=>d?`${P(e.ts)} [${e.stream}] ${e.line}`:e.line).join(`
2
+ `),[m,d]);return(0,T.jsxs)(c,{padded:!1,className:`overflow-hidden`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-b border-line px-4 py-3`,children:[(0,T.jsx)(`h3`,{className:`mr-1 text-base font-semibold text-fg`,children:`Process logs`}),(0,T.jsx)(b,{options:N,value:r,onChange:i}),(0,T.jsxs)(`div`,{className:`relative min-w-40 flex-1`,children:[(0,T.jsx)(o,{className:`pointer-events-none absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-faint`}),(0,T.jsx)(`input`,{value:a,onChange:e=>s(e.target.value),"aria-label":`Filter log lines`,placeholder:`Filter…`,className:`h-8 w-full rounded-lg border border-line bg-surface-2 pl-8 pr-2 text-xs text-fg placeholder:text-faint focus:border-accent/60 focus:outline-none focus:ring-2 focus:ring-accent/30`})]}),(0,T.jsx)(L,{on:l,onClick:()=>u(e=>!e),label:`Follow`}),(0,T.jsx)(L,{on:d,onClick:()=>f(e=>!e),label:`Times`}),(0,T.jsx)(C,{value:g}),(0,T.jsx)(`button`,{type:`button`,onClick:()=>{let e=new Blob([g],{type:`text/plain`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`bunqueue-logs-${Date.now()}.log`,n.click(),URL.revokeObjectURL(t)},disabled:m.length===0,className:`rounded-md border border-line bg-surface-2 px-2 py-1 text-xs text-muted transition-colors hover:text-fg disabled:opacity-40`,children:`Download`})]}),(0,T.jsx)(`div`,{ref:p,className:`max-h-80 min-h-40 overflow-y-auto p-4 font-mono text-xs leading-relaxed`,children:m.length===0?(0,T.jsx)(`p`,{className:`text-faint`,children:n.length===0?`No output yet.`:`No lines match the current filter.`}):m.map(e=>(0,T.jsxs)(`div`,{className:t(`whitespace-pre-wrap`,F(e.stream)),children:[d&&(0,T.jsx)(`span`,{className:`mr-2 text-faint`,children:P(e.ts)}),e.line]},e.seq))}),(0,T.jsxs)(`div`,{className:`flex items-center justify-between border-t border-line px-4 py-2 text-[11px] text-faint`,children:[(0,T.jsx)(`span`,{children:m.length===n.length?`${n.length} lines`:`${m.length} of ${n.length} lines`}),(0,T.jsx)(`span`,{children:l?`following tail`:`paused`})]})]})}function L({on:e,onClick:n,label:r}){return(0,T.jsx)(`button`,{type:`button`,onClick:n,"aria-pressed":e,className:t(`rounded-md border px-2 py-1 text-xs transition-colors`,e?`border-accent/40 bg-accent/10 text-accent`:`border-line bg-surface-2 text-muted hover:text-fg`),children:r})}function R(){return s(()=>p.control.logs(),[])}var z={running:{label:`Running`,tone:`text-success`,dot:`bg-emerald-400`},starting:{label:`Starting`,tone:`text-warning`,dot:`bg-amber-400`},stopping:{label:`Stopping`,tone:`text-warning`,dot:`bg-amber-400`},stopped:{label:`Stopped`,tone:`text-danger`,dot:`bg-red-400`}};function B({startedAt:e}){let[,t]=(0,w.useState)(0);return(0,w.useEffect)(()=>{let e=setInterval(()=>t(e=>e+1),1e3);return()=>clearInterval(e)},[]),(0,T.jsx)(T.Fragment,{children:f((Date.now()-e)/1e3)})}function V({label:e,children:t,title:n}){return(0,T.jsxs)(`div`,{className:`min-w-0`,title:n,children:[(0,T.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-wider text-faint`,children:e}),(0,T.jsx)(`div`,{className:`mt-0.5 truncate font-mono text-sm text-fg`,children:t})]})}function H({status:e,agentBase:n,transitioning:r,stale:i=!1,vitals:o=null,busy:s,onStart:c,onStop:f,onRestart:p}){let m=e?.status??`stopped`,h=m===`running`,g=z[m]??z.stopped,_=!!e?.healthy&&!i,y=!h&&e?.exitCode!=null&&e.exitCode!==0,b=e?.runningConfig??e?.config??null,x=`http://localhost:${b?.httpPort??6790}`;return(0,T.jsxs)(`section`,{className:`mb-6 overflow-hidden rounded-xl border border-line bg-surface`,children:[(0,T.jsx)(`div`,{className:t(`h-0.5 bg-gradient-to-r to-transparent`,h&&_?`from-emerald-400/80 via-emerald-400/25`:h||r?`from-amber-400/80 via-amber-400/25`:`from-red-400/70 via-red-400/20`)}),(0,T.jsxs)(`div`,{className:`flex flex-col gap-5 p-5 lg:flex-row lg:items-center lg:justify-between`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,T.jsxs)(`span`,{className:`relative flex size-3.5 shrink-0`,children:[h&&_&&(0,T.jsx)(`span`,{className:`absolute inline-flex size-full rounded-full bg-emerald-400 opacity-50 motion-safe:animate-ping`}),(0,T.jsx)(`span`,{className:t(`relative inline-flex size-3.5 rounded-full`,g.dot)})]}),(0,T.jsxs)(`div`,{className:`min-w-0`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-3 gap-y-1`,children:[(0,T.jsx)(`span`,{className:t(`text-2xl font-bold tracking-tight`,g.tone),children:r&&s?`${s}…`:g.label}),e?.version&&(0,T.jsxs)(`span`,{className:`font-mono text-xs text-muted`,children:[`bunqueue v`,e.version]}),y&&(0,T.jsxs)(`span`,{className:`rounded-full bg-red-500/15 px-2 py-0.5 font-mono text-[11px] font-medium text-danger`,children:[`crashed · exit `,e?.exitCode]})]}),(0,T.jsx)(`div`,{className:`mt-1 font-mono text-xs text-muted`,children:i?(0,T.jsxs)(`span`,{className:`text-warning`,children:[`last known: pid `,e?.pid??`—`,` — agent unreachable, state may have changed`]}):h?(0,T.jsxs)(T.Fragment,{children:[_?`healthy`:`waiting for health…`,` · pid `,e?.pid??`—`,` · up`,` `,e?.startedAt?(0,T.jsx)(B,{startedAt:e.startedAt}):`—`]}):`process not running — start it below or point the dashboard at an external server`})]})]}),(0,T.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,T.jsxs)(v,{variant:`success`,disabled:h||r||i,onClick:c,children:[(0,T.jsx)(a,{className:`size-4`}),` Start`]}),(0,T.jsxs)(v,{variant:`warning`,disabled:!h||r||i,onClick:f,children:[(0,T.jsx)(l,{className:`size-4`}),` Stop`]}),(0,T.jsxs)(v,{disabled:r||i,onClick:p,children:[(0,T.jsx)(u,{className:`size-4`}),` Restart`]})]})]}),(0,T.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 border-t border-line bg-surface-2/30 px-5 py-4 md:grid-cols-3 xl:grid-cols-7`,children:[(0,T.jsx)(V,{label:`Memory`,children:o?.memory?.rss==null?(0,T.jsx)(`span`,{className:`text-faint`,children:`—`}):(0,T.jsxs)(`span`,{title:`heap ${o.memory.heapUsed??`?`} / ${o.memory.heapTotal??`?`} MB`,children:[o.memory.rss,` MB rss`]})}),(0,T.jsx)(V,{label:`Connections`,children:o?.connections?`${o.connections.tcp??0} tcp · ${o.connections.ws??0} ws · ${o.connections.sse??0} sse`:(0,T.jsx)(`span`,{className:`text-faint`,children:`—`})}),(0,T.jsx)(V,{label:`API endpoint`,title:x,children:h?(0,T.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,T.jsx)(`a`,{href:`${x}/health`,target:`_blank`,rel:`noreferrer`,className:`truncate text-accent hover:underline`,children:x}),(0,T.jsx)(C,{value:x})]}):(0,T.jsx)(`span`,{className:`text-faint`,children:x})}),(0,T.jsx)(V,{label:`Ports`,children:b?`${b.httpPort} http · ${b.tcpPort} tcp`:`—`}),(0,T.jsx)(V,{label:`Started`,children:h&&e?.startedAt?d(e.startedAt):`—`}),(0,T.jsx)(V,{label:`Control agent`,title:n,children:n.replace(/^https?:\/\//,``)}),(0,T.jsx)(V,{label:`Launch command`,title:b?.command,children:b?.command??`—`})]})]})}var U=[{key:`size`,label:`Database`,color:`bg-accent`},{key:`walSize`,label:`WAL`,color:`bg-amber-400`},{key:`shmSize`,label:`SHM`,color:`bg-zinc-500`}];function W({db:e}){let n=e.totalSize||0;return(0,T.jsxs)(c,{children:[(0,T.jsxs)(`div`,{className:`mb-1 flex items-baseline justify-between gap-2`,children:[(0,T.jsx)(`h3`,{className:`text-base font-semibold text-fg`,children:`Storage`}),(0,T.jsx)(`span`,{className:`font-mono text-xs text-muted`,children:e.exists?`${g(n)} on disk`:`not created yet`})]}),(0,T.jsxs)(`p`,{className:`mb-4 flex items-center gap-1.5 truncate font-mono text-xs text-faint`,title:e.path,children:[(0,T.jsx)(`span`,{className:`truncate`,children:e.path}),(0,T.jsx)(C,{value:e.path})]}),e.exists&&n>0?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`div`,{className:`flex h-2.5 overflow-hidden rounded-full bg-surface-2`,children:U.map(r=>{let i=e[r.key];return i?(0,T.jsx)(`div`,{className:t(`h-full`,r.color),style:{width:`${i/n*100}%`},title:`${r.label}: ${g(i)}`},r.key):null})}),(0,T.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-x-5 gap-y-1.5 font-mono text-[11px] text-faint`,children:[U.map(n=>(0,T.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,T.jsx)(`span`,{className:t(`size-2 rounded-full`,n.color)}),n.label,` `,(0,T.jsx)(`span`,{className:`text-fg`,children:g(e[n.key])})]},n.key)),e.mtimeMs?(0,T.jsxs)(`span`,{className:`ml-auto`,children:[`written `,_(e.mtimeMs)]}):null]})]}):(0,T.jsx)(`p`,{className:`rounded-lg border border-dashed border-line px-4 py-6 text-center text-sm text-faint`,children:`The database appears here after the first start — SQLite creates the file at the configured data path.`})]})}function G(){let{data:e,error:t,refetch:n}=s(()=>p.control.status(),[]),[r,a]=(0,w.useState)(null),[o,l]=(0,w.useState)(null),u=e?.status===`running`,{data:d}=s(()=>u?p.health():Promise.resolve(null),[u]),f=u?d??null:null,h=async(e,t,r)=>{if(!(r&&!window.confirm(r))){a(e),l(null);try{await t(),await n()}catch(e){l(e.message)}finally{a(null)}}};if(t&&!e)return(0,T.jsxs)(`div`,{children:[(0,T.jsx)(m,{title:`Server`,description:`Start, stop and restart the bunqueue server.`}),(0,T.jsx)(y,{message:`Control agent unreachable — server lifecycle controls are unavailable.`,onRetry:n}),(0,T.jsxs)(c,{children:[(0,T.jsx)(i,{title:`Control agent not running`}),(0,T.jsxs)(`p`,{className:`text-sm text-muted`,children:[`The local control agent is unreachable at`,` `,(0,T.jsx)(`code`,{className:`rounded bg-surface-2 px-1.5 py-0.5 text-xs`,children:p.agentBase}),`. It manages the bunqueue server process (start / stop / restart). Start it with:`]}),(0,T.jsxs)(`pre`,{className:`mt-3 overflow-x-auto rounded-lg border border-line bg-surface-2 px-3 py-2 text-xs`,children:[`bun start`,` `,`# agent + dashboard together (recommended)`,`
3
+ `,`bun run agent`,` `,`# agent only, if the dashboard is already running`]}),(0,T.jsx)(`p`,{className:`mt-3 text-xs text-faint`,children:`This page reconnects automatically once the agent is up — no reload needed.`})]})]});let g=e?.status??`stopped`,_=g===`running`,v=g===`starting`||g===`stopping`||r!=null,b=t!=null&&e!=null;return(0,T.jsxs)(`div`,{children:[(0,T.jsx)(m,{title:`Server`,description:`Supervise the bunqueue server process — lifecycle, configuration, storage and logs.`}),o&&(0,T.jsx)(`div`,{className:`mb-4 rounded-lg border border-red-500/20 bg-red-500/5 px-4 py-2 text-sm text-danger`,children:o}),b&&(0,T.jsx)(`div`,{className:`mb-4 rounded-lg border border-amber-500/20 bg-amber-500/5 px-4 py-2 text-sm text-warning`,children:`Control agent unreachable — showing last known state. Lifecycle actions are disabled until it responds again.`}),(0,T.jsx)(H,{status:e,agentBase:p.agentBase,stale:b,vitals:f,transitioning:v,busy:r,onStart:()=>h(`starting`,()=>p.control.start()),onStop:()=>h(`stopping`,()=>p.control.stop(),`Stop the bunqueue server?`),onRestart:()=>h(`restarting`,()=>p.control.restart(),`Restart the bunqueue server?`)}),(0,T.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 lg:grid-cols-2`,children:[(0,T.jsx)(K,{status:e,onSaved:n,running:_,transitioning:v}),(0,T.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[e?.db&&(0,T.jsx)(W,{db:e.db}),(0,T.jsx)(I,{})]})]}),(0,T.jsx)(`div`,{className:`mt-6`,children:(0,T.jsx)(D,{agentBase:p.agentBase})})]})}function K({status:e,onSaved:t,running:n,transitioning:r}){let[a,o]=(0,w.useState)(null),[s,l]=(0,w.useState)(!1),[d,f]=(0,w.useState)(!1),[m,h]=(0,w.useState)(null);(0,w.useEffect)(()=>{e?.config&&!a&&o(e.config)},[e,a]);let g=a??e?.config??null;if(!g)return(0,T.jsx)(c,{children:`Loading…`});let _=e=>o({...g,...e}),y=e?.runningConfig??null,b=(e={})=>JSON.stringify(Object.keys(e).sort().map(t=>[t,e[t]])),C=n&&y!=null&&(y.command!==g.command||y.httpPort!==g.httpPort||y.tcpPort!==g.tcpPort||y.dataPath!==g.dataPath||b(y.extraEnv)!==b(g.extraEnv)),E=r||d,D=()=>{l(!0),setTimeout(()=>l(!1),2e3)},O=()=>{let e=e=>Number.isInteger(e)&&e>=1&&e<=65535;return e(g.httpPort)?e(g.tcpPort)?g.httpPort===g.tcpPort?`HTTP and TCP ports must differ`:null:`TCP port must be an integer between 1 and 65535`:`HTTP port must be an integer between 1 and 65535`};return(0,T.jsxs)(c,{children:[(0,T.jsx)(i,{title:`Configuration`}),(0,T.jsx)(`p`,{className:`mb-3 text-xs text-muted`,children:n?`Ports and data path apply on the next restart — edit freely, then restart.`:`Edit and save; the config is used the next time the server starts.`}),(0,T.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,T.jsx)(S,{label:`Command`,hint:`The exact command the agent runs to launch bunqueue. It receives HTTP_PORT, TCP_PORT and BUNQUEUE_DATA_PATH in its environment. The default needs a global 'bunqueue' binary — or point it at a local entry, e.g. bun run /path/to/bunqueue/src/main.ts.`,children:(0,T.jsx)(x,{value:g.command,disabled:E,onChange:e=>_({command:e.target.value}),placeholder:`bunqueue start`})}),(0,T.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,T.jsx)(S,{label:`HTTP port`,hint:`Dashboard API + SSE.`,children:(0,T.jsx)(x,{type:`number`,min:1,max:65535,value:g.httpPort,disabled:E,onChange:e=>_({httpPort:Number(e.target.value)})})}),(0,T.jsx)(S,{label:`TCP port`,hint:`Binary protocol. Must differ from HTTP.`,children:(0,T.jsx)(x,{type:`number`,min:1,max:65535,value:g.tcpPort,disabled:E,onChange:e=>_({tcpPort:Number(e.target.value)})})})]}),(0,T.jsx)(S,{label:`Data path`,hint:`SQLite database file, relative to the agent's working directory. The parent folder must already exist — SQLite creates the file, not the directory.`,children:(0,T.jsx)(x,{value:g.dataPath,disabled:E,onChange:e=>_({dataPath:e.target.value})})}),(0,T.jsx)(S,{label:`Environment variables`,hint:`Injected into the server process on start, on top of the ports + data path. Applies on the next restart.`,children:(0,T.jsx)(M,{value:g.extraEnv??{},onChange:e=>_({extraEnv:e}),disabled:E})}),(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,T.jsx)(v,{variant:`accent`,size:`sm`,disabled:E,onClick:async()=>{let e=O();if(e){h(e);return}h(null);try{await p.control.setConfig(g),D(),t()}catch(e){h(e.message)}},children:`Save config`}),n&&(0,T.jsxs)(v,{variant:`warning`,size:`sm`,disabled:E,onClick:async()=>{let e=O();if(e){h(e);return}if(window.confirm(`Save configuration and restart the server to apply it?`)){h(null),f(!0);try{await p.control.setConfig(g),await p.control.restart(),D(),t()}catch(e){h(e.message)}finally{f(!1)}}},children:[(0,T.jsx)(u,{className:`size-3.5`}),` Save & restart`]}),C&&!s&&(0,T.jsx)(`span`,{className:`text-xs text-warning`,children:`Restart to apply changes`}),s&&(0,T.jsx)(`span`,{className:`text-xs text-success`,children:`Saved`}),m&&(0,T.jsx)(`span`,{className:`text-xs text-danger`,children:m})]})]})]})}export{G as ServerControl};
@@ -1 +1 @@
1
- import{r as e}from"./cn-CMFYpumL.js";import{m as t,t as n}from"./react-vendor-CHIHtdAC.js";import{i as r}from"./connectionStore-CCopJeU7.js";import{C as i,J as a,L as o,S as s,T as c,h as l,k as u,w as d}from"./index-BFjeS9FG.js";import{a as f,n as p,t as m}from"./form-PtDLk33Z.js";var h=e(t(),1),g=n(),_=[[`1000`,`1 second`],[`2000`,`2 seconds`],[`3000`,`3 seconds`],[`5000`,`5 seconds`],[`10000`,`10 seconds`]];function v(e){if(e.startsWith(`/`))return!0;try{let t=new URL(e);return t.protocol===`http:`||t.protocol===`https:`}catch{return!1}}function y(){let{baseUrl:e,token:t,agentToken:n,refreshMs:y,setBaseUrl:b,setToken:x,setAgentToken:S,setRefreshMs:C}=r(),{theme:w,setTheme:T}=a(),[E,D]=(0,h.useState)(!1),[O,k]=(0,h.useState)(null),[A,j]=(0,h.useState)(e),[M,N]=(0,h.useState)(t),[P,F]=(0,h.useState)(n),[I,L]=(0,h.useState)(!1),[R,z]=(0,h.useState)(null),[B,V]=(0,h.useState)(!1);return(0,g.jsxs)(`div`,{children:[(0,g.jsx)(l,{title:`Settings`,description:`Connection and appearance.`}),(0,g.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 lg:grid-cols-2`,children:[(0,g.jsxs)(s,{children:[(0,g.jsx)(i,{title:`Connection`}),(0,g.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,g.jsx)(m,{label:`Server URL`,children:(0,g.jsx)(p,{value:A,onChange:e=>{j(e.target.value),z(null)},placeholder:`/api or https://queue.example.com`})}),R&&(0,g.jsx)(`p`,{className:`-mt-2 text-xs text-danger`,children:R}),(0,g.jsxs)(`p`,{className:`-mt-2 text-xs text-faint`,children:[`Use `,(0,g.jsx)(`code`,{className:`font-mono`,children:`/api`}),` in dev (proxied to localhost:6790), or the server origin in production.`]}),(0,g.jsx)(m,{label:`Bearer token (optional)`,hint:`Kept in memory only — re-enter after reload, or set VITE_BUNQUEUE_TOKEN.`,children:(0,g.jsxs)(`div`,{className:`relative`,children:[(0,g.jsx)(p,{type:I?`text`:`password`,value:M,onChange:e=>N(e.target.value),placeholder:`only if AUTH_TOKENS is set`,className:`pr-10`}),(0,g.jsx)(c,{"aria-label":I?`Hide token`:`Show token`,className:`absolute right-0.5 top-1/2 -translate-y-1/2`,onClick:()=>L(e=>!e),children:(0,g.jsx)(o,{className:`size-4`})})]})}),(0,g.jsx)(m,{label:`Agent token (optional)`,hint:`Only if the control agent runs with AGENT_TOKEN. Memory only — or set VITE_BUNQUEUE_AGENT_TOKEN.`,children:(0,g.jsx)(p,{type:I?`text`:`password`,value:P,onChange:e=>F(e.target.value),placeholder:`only if AGENT_TOKEN is set`})}),(0,g.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,g.jsx)(d,{variant:`accent`,onClick:()=>{let e=A.trim();if(!v(e)){z(`Must be an http(s) URL or a path starting with '/'.`);return}z(null),b(e),x(M),S(P),V(!0),setTimeout(()=>V(!1),2e3)},children:`Save`}),(0,g.jsx)(d,{onClick:async()=>{D(!0),k(null);let e=performance.now();try{let t=await u.health(),n=Math.round(performance.now()-e);k({ok:t.ok!==!1,msg:`Connected in ${n}ms${t.version?` · bunqueue v${t.version}`:``}`})}catch(e){k({ok:!1,msg:e.message})}finally{D(!1)}},disabled:E,children:E?`Testing…`:`Test connection`}),B&&(0,g.jsx)(`span`,{className:`text-sm text-success`,children:`Saved ✓`}),O&&(0,g.jsx)(`span`,{className:O.ok?`text-sm text-success`:`text-sm text-danger`,children:O.msg})]})]})]}),(0,g.jsxs)(s,{children:[(0,g.jsx)(i,{title:`Appearance & refresh`}),(0,g.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,g.jsx)(m,{label:`Theme`,children:(0,g.jsxs)(f,{value:w,onChange:e=>T(e.target.value),children:[(0,g.jsx)(`option`,{value:`dark`,children:`Dark`}),(0,g.jsx)(`option`,{value:`light`,children:`Light`})]})}),(0,g.jsx)(m,{label:`Refresh interval`,children:(0,g.jsx)(f,{value:String(y),onChange:e=>C(Number(e.target.value)),children:_.map(([e,t])=>(0,g.jsx)(`option`,{value:e,children:t},e))})})]})]})]})]})}export{y as Settings};
1
+ import{r as e}from"./cn-CMFYpumL.js";import{m as t,t as n}from"./react-vendor-CHIHtdAC.js";import{i as r}from"./connectionStore-CCopJeU7.js";import{C as i,R as a,S as o,T as s,Y as c,h as l,k as u,w as d}from"./index-C5VVVkqi.js";import{a as f,n as p,t as m}from"./form-PtDLk33Z.js";var h=e(t(),1),g=n(),_=[[`1000`,`1 second`],[`2000`,`2 seconds`],[`3000`,`3 seconds`],[`5000`,`5 seconds`],[`10000`,`10 seconds`]];function v(e){if(e.startsWith(`/`))return!0;try{let t=new URL(e);return t.protocol===`http:`||t.protocol===`https:`}catch{return!1}}function y(){let{baseUrl:e,token:t,agentToken:n,refreshMs:y,setBaseUrl:b,setToken:x,setAgentToken:S,setRefreshMs:C}=r(),{theme:w,setTheme:T}=c(),[E,D]=(0,h.useState)(!1),[O,k]=(0,h.useState)(null),[A,j]=(0,h.useState)(e),[M,N]=(0,h.useState)(t),[P,F]=(0,h.useState)(n),[I,L]=(0,h.useState)(!1),[R,z]=(0,h.useState)(null),[B,V]=(0,h.useState)(!1);return(0,g.jsxs)(`div`,{children:[(0,g.jsx)(l,{title:`Settings`,description:`Connection and appearance.`}),(0,g.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 lg:grid-cols-2`,children:[(0,g.jsxs)(o,{children:[(0,g.jsx)(i,{title:`Connection`}),(0,g.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,g.jsx)(m,{label:`Server URL`,children:(0,g.jsx)(p,{value:A,onChange:e=>{j(e.target.value),z(null)},placeholder:`/api or https://queue.example.com`})}),R&&(0,g.jsx)(`p`,{className:`-mt-2 text-xs text-danger`,children:R}),(0,g.jsxs)(`p`,{className:`-mt-2 text-xs text-faint`,children:[`Use `,(0,g.jsx)(`code`,{className:`font-mono`,children:`/api`}),` in dev (proxied to localhost:6790), or the server origin in production.`]}),(0,g.jsx)(m,{label:`Bearer token (optional)`,hint:`Kept in memory only — re-enter after reload, or set VITE_BUNQUEUE_TOKEN.`,children:(0,g.jsxs)(`div`,{className:`relative`,children:[(0,g.jsx)(p,{type:I?`text`:`password`,value:M,onChange:e=>N(e.target.value),placeholder:`only if AUTH_TOKENS is set`,className:`pr-10`}),(0,g.jsx)(s,{"aria-label":I?`Hide token`:`Show token`,className:`absolute right-0.5 top-1/2 -translate-y-1/2`,onClick:()=>L(e=>!e),children:(0,g.jsx)(a,{className:`size-4`})})]})}),(0,g.jsx)(m,{label:`Agent token (optional)`,hint:`Only if the control agent runs with AGENT_TOKEN. Memory only — or set VITE_BUNQUEUE_AGENT_TOKEN.`,children:(0,g.jsx)(p,{type:I?`text`:`password`,value:P,onChange:e=>F(e.target.value),placeholder:`only if AGENT_TOKEN is set`})}),(0,g.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,g.jsx)(d,{variant:`accent`,onClick:()=>{let e=A.trim();if(!v(e)){z(`Must be an http(s) URL or a path starting with '/'.`);return}z(null),b(e),x(M),S(P),V(!0),setTimeout(()=>V(!1),2e3)},children:`Save`}),(0,g.jsx)(d,{onClick:async()=>{D(!0),k(null);let e=performance.now();try{let t=await u.health(),n=Math.round(performance.now()-e);k({ok:t.ok!==!1,msg:`Connected in ${n}ms${t.version?` · bunqueue v${t.version}`:``}`})}catch(e){k({ok:!1,msg:e.message})}finally{D(!1)}},disabled:E,children:E?`Testing…`:`Test connection`}),B&&(0,g.jsx)(`span`,{className:`text-sm text-success`,children:`Saved ✓`}),O&&(0,g.jsx)(`span`,{className:O.ok?`text-sm text-success`:`text-sm text-danger`,children:O.msg})]})]})]}),(0,g.jsxs)(o,{children:[(0,g.jsx)(i,{title:`Appearance & refresh`}),(0,g.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,g.jsx)(m,{label:`Theme`,children:(0,g.jsxs)(f,{value:w,onChange:e=>T(e.target.value),children:[(0,g.jsx)(`option`,{value:`dark`,children:`Dark`}),(0,g.jsx)(`option`,{value:`light`,children:`Light`})]})}),(0,g.jsx)(m,{label:`Refresh interval`,children:(0,g.jsx)(f,{value:String(y),onChange:e=>C(Number(e.target.value)),children:_.map(([e,t])=>(0,g.jsx)(`option`,{value:e,children:t},e))})})]})]})]})]})}export{y as Settings};
@@ -1 +1 @@
1
- import{t as e}from"./react-vendor-CHIHtdAC.js";import{C as t,O as n,S as r,b as i,c as a,d as o,h as s,k as c,m as l,r as u,x as d}from"./index-BFjeS9FG.js";var f=e(),p={stats:{waiting:0,active:0,delayed:0,completed:0,dlq:0,totalPushed:0,totalPulled:0,totalCompleted:0,totalFailed:0,uptime:0},memory:{heapUsed:0,heapTotal:0,rss:0},workers:{total:0,active:0},crons:{total:0},storage:{}};function m(){let{data:e,error:m,loading:g,refetch:_}=n(()=>c.overview(),[]);if(g&&!e&&!m)return(0,f.jsx)(i,{label:`Loading usage…`});let{stats:v,memory:y,workers:b,crons:x,storage:S}=e??p;return(0,f.jsxs)(`div`,{children:[(0,f.jsx)(s,{title:`Usage`,description:`Cumulative resource usage on the connected server.`,live:!0}),m&&(0,f.jsx)(d,{onRetry:_}),(0,f.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 md:grid-cols-4`,children:[(0,f.jsx)(l,{label:`Jobs Pushed`,value:a(v.totalPushed)}),(0,f.jsx)(l,{label:`Jobs Completed`,value:a(v.totalCompleted),tone:`green`}),(0,f.jsx)(l,{label:`Jobs Failed`,value:a(v.totalFailed),tone:v.totalFailed?`red`:`default`}),(0,f.jsx)(l,{label:`Jobs Pulled`,value:a(v.totalPulled),tone:`blue`})]}),(0,f.jsxs)(`div`,{className:`mt-6 grid grid-cols-1 gap-6 lg:grid-cols-2`,children:[(0,f.jsxs)(r,{children:[(0,f.jsx)(t,{title:`Runtime`}),(0,f.jsxs)(`dl`,{className:`divide-y divide-line text-sm`,children:[(0,f.jsx)(h,{label:`Uptime`,value:o(v.uptime)}),(0,f.jsx)(h,{label:`Heap used`,value:u(y.heapUsed*1024*1024)}),(0,f.jsx)(h,{label:`RSS`,value:u(y.rss*1024*1024)}),(0,f.jsx)(h,{label:`Workers`,value:`${b.active} active / ${b.total}`}),(0,f.jsx)(h,{label:`Cron jobs`,value:String(x.total)})]})]}),(0,f.jsxs)(r,{children:[(0,f.jsx)(t,{title:`Storage`}),(0,f.jsxs)(`dl`,{className:`divide-y divide-line text-sm`,children:[(0,f.jsx)(h,{label:`Status`,value:S.diskFull?`Disk full`:`Healthy`}),(0,f.jsx)(h,{label:`Path`,value:String(S.path??`—`),mono:!0}),S.error?(0,f.jsx)(h,{label:`Error`,value:String(S.error)}):null]})]})]})]})}function h({label:e,value:t,mono:n}){return(0,f.jsxs)(`div`,{className:`flex items-center justify-between py-2.5`,children:[(0,f.jsx)(`dt`,{className:`text-muted`,children:e}),(0,f.jsx)(`dd`,{className:n?`font-mono text-xs text-fg`:`font-medium text-fg`,children:t})]})}export{m as Usage};
1
+ import{t as e}from"./react-vendor-CHIHtdAC.js";import{C as t,O as n,S as r,b as i,c as a,d as o,h as s,k as c,m as l,r as u,x as d}from"./index-C5VVVkqi.js";var f=e(),p={stats:{waiting:0,active:0,delayed:0,completed:0,dlq:0,totalPushed:0,totalPulled:0,totalCompleted:0,totalFailed:0,uptime:0},memory:{heapUsed:0,heapTotal:0,rss:0},workers:{total:0,active:0},crons:{total:0},storage:{}};function m(){let{data:e,error:m,loading:g,refetch:_}=n(()=>c.overview(),[]);if(g&&!e&&!m)return(0,f.jsx)(i,{label:`Loading usage…`});let{stats:v,memory:y,workers:b,crons:x,storage:S}=e??p;return(0,f.jsxs)(`div`,{children:[(0,f.jsx)(s,{title:`Usage`,description:`Cumulative resource usage on the connected server.`,live:!0}),m&&(0,f.jsx)(d,{onRetry:_}),(0,f.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 md:grid-cols-4`,children:[(0,f.jsx)(l,{label:`Jobs Pushed`,value:a(v.totalPushed)}),(0,f.jsx)(l,{label:`Jobs Completed`,value:a(v.totalCompleted),tone:`green`}),(0,f.jsx)(l,{label:`Jobs Failed`,value:a(v.totalFailed),tone:v.totalFailed?`red`:`default`}),(0,f.jsx)(l,{label:`Jobs Pulled`,value:a(v.totalPulled),tone:`blue`})]}),(0,f.jsxs)(`div`,{className:`mt-6 grid grid-cols-1 gap-6 lg:grid-cols-2`,children:[(0,f.jsxs)(r,{children:[(0,f.jsx)(t,{title:`Runtime`}),(0,f.jsxs)(`dl`,{className:`divide-y divide-line text-sm`,children:[(0,f.jsx)(h,{label:`Uptime`,value:o(v.uptime)}),(0,f.jsx)(h,{label:`Heap used`,value:u(y.heapUsed*1024*1024)}),(0,f.jsx)(h,{label:`RSS`,value:u(y.rss*1024*1024)}),(0,f.jsx)(h,{label:`Workers`,value:`${b.active} active / ${b.total}`}),(0,f.jsx)(h,{label:`Cron jobs`,value:String(x.total)})]})]}),(0,f.jsxs)(r,{children:[(0,f.jsx)(t,{title:`Storage`}),(0,f.jsxs)(`dl`,{className:`divide-y divide-line text-sm`,children:[(0,f.jsx)(h,{label:`Status`,value:S.diskFull?`Disk full`:`Healthy`}),(0,f.jsx)(h,{label:`Path`,value:String(S.path??`—`),mono:!0}),S.error?(0,f.jsx)(h,{label:`Error`,value:String(S.error)}):null]})]})]})]})}function h({label:e,value:t,mono:n}){return(0,f.jsxs)(`div`,{className:`flex items-center justify-between py-2.5`,children:[(0,f.jsx)(`dt`,{className:`text-muted`,children:e}),(0,f.jsx)(`dd`,{className:n?`font-mono text-xs text-fg`:`font-medium text-fg`,children:t})]})}export{m as Usage};
@@ -0,0 +1 @@
1
+ import{t as e}from"./react-vendor-CHIHtdAC.js";import{C as t,O as n,S as r,b as i,c as a,d as o,et as s,h as c,l,m as u,n as d,r as f,u as p,x as m}from"./index-C5VVVkqi.js";var h=e(),g={overview:{stats:{waiting:0,active:0,delayed:0,completed:0,dlq:0,totalPushed:0,totalPulled:0,totalCompleted:0,totalFailed:0,uptime:0},memory:{heapUsed:0,heapTotal:0,rss:0},crons:{total:0}},storage:{},failedTotal:0};function _(){let{data:e,error:_,loading:y,refetch:b}=n(async()=>{let[e,t,n]=await Promise.all([s.overview(),s.storage(),s.queuesSummary()]),r=n.reduce((e,t)=>e+(t.counts?.failed??0),0);return{overview:e,storage:t.data??{},failedTotal:r}},[]);if(y&&!e&&!_)return(0,h.jsx)(i,{label:`Loading usage…`});let x=e??g,{stats:S,memory:C,crons:w}=x.overview,{storage:T,failedTotal:E}=x,D=d(S.completed,E),O=S.uptime?o(S.uptime/1e3):`—`;return(0,h.jsxs)(`div`,{children:[(0,h.jsx)(c,{title:`Usage`,description:`Cumulative resource usage on the connected server.`,live:!0}),_&&(0,h.jsx)(m,{onRetry:b}),(0,h.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 md:grid-cols-3 xl:grid-cols-6`,children:[(0,h.jsx)(u,{label:`Completed`,value:a(S.completed),tone:`green`}),(0,h.jsx)(u,{label:`Failed`,value:a(E),tone:E?`red`:`default`}),(0,h.jsx)(u,{label:`Waiting`,value:a(S.waiting),tone:`amber`}),(0,h.jsx)(u,{label:`Active`,value:a(S.active),tone:`blue`}),(0,h.jsx)(u,{label:`Error Rate`,value:D==null?`—`:l(D),tone:D==null?`default`:D>.05?`red`:`green`}),(0,h.jsx)(u,{label:`Uptime`,value:O})]}),(0,h.jsxs)(`div`,{className:`mt-6 grid grid-cols-1 gap-6 lg:grid-cols-2`,children:[(0,h.jsxs)(r,{children:[(0,h.jsx)(t,{title:`Runtime`}),(0,h.jsxs)(`dl`,{className:`divide-y divide-line text-sm`,children:[(0,h.jsx)(v,{label:`Jobs pushed (since restart)`,value:a(S.totalPushed)}),(0,h.jsx)(v,{label:`Jobs pulled (since restart)`,value:a(S.totalPulled)}),(0,h.jsx)(v,{label:`Heap used`,value:f(C.heapUsed*1024*1024)}),(0,h.jsx)(v,{label:`RSS`,value:f(C.rss*1024*1024)}),(0,h.jsx)(v,{label:`Cron jobs`,value:String(w.total)})]})]}),(0,h.jsxs)(r,{children:[(0,h.jsx)(t,{title:`Storage`}),T.diskFull?(0,h.jsxs)(`div`,{className:`rounded-lg border border-red-500/25 bg-red-500/[0.06] px-4 py-3`,children:[(0,h.jsx)(`div`,{className:`font-semibold text-danger`,children:`Disk full — writes suspended`}),T.error&&(0,h.jsx)(`div`,{className:`mt-1 text-xs text-muted`,children:T.error}),T.since!=null&&(0,h.jsxs)(`div`,{className:`mt-1 text-xs text-faint`,children:[`since `,p(T.since)]})]}):(0,h.jsxs)(`div`,{className:`rounded-lg border border-emerald-500/25 bg-emerald-500/[0.06] px-4 py-3`,children:[(0,h.jsx)(`div`,{className:`font-semibold text-success`,children:`Healthy`}),(0,h.jsx)(`div`,{className:`mt-1 text-xs text-faint`,children:`Disk writes are being accepted.`})]})]})]})]})}function v({label:e,value:t}){return(0,h.jsxs)(`div`,{className:`flex items-center justify-between py-2.5`,children:[(0,h.jsx)(`dt`,{className:`text-muted`,children:e}),(0,h.jsx)(`dd`,{className:`font-medium text-fg`,children:t})]})}export{_ as UsagePro};
@@ -0,0 +1 @@
1
+ import{r as e}from"./cn-CMFYpumL.js";import{m as t,t as n}from"./react-vendor-CHIHtdAC.js";import{$ as r,C as i,O as a,S as o,T as s,b as c,c as l,et as u,h as d,q as f,u as p,w as m,x as h,y as g,z as _}from"./index-C5VVVkqi.js";import{n as v,o as y,t as b}from"./form-PtDLk33Z.js";import{t as x}from"./Pagination-DYMlK0Hm.js";var S=e(t(),1),C=n();function w(){let{data:e,error:t,loading:n,refetch:r}=a(()=>u.webhooks(),[]),m=e?.data?.webhooks??[],[v,b]=(0,S.useState)(0),w=Math.max(1,Math.ceil(m.length/15)),E=Math.min(v,w-1),[D,O]=(0,S.useState)(null),k=async e=>{O(null);try{await e(),r()}catch(e){O(e.message)}};return(0,C.jsxs)(`div`,{children:[(0,C.jsx)(d,{title:`Webhooks`,description:`HTTP callbacks fired on job events.`,live:!0}),t&&(0,C.jsx)(h,{onRetry:r}),D&&(0,C.jsx)(`div`,{className:`mb-4 rounded-lg border border-red-500/20 bg-red-500/5 px-4 py-2 text-sm text-danger`,children:D}),(0,C.jsxs)(o,{className:`mb-6`,children:[(0,C.jsx)(i,{title:`Add webhook`}),(0,C.jsx)(T,{onAdd:async e=>{await u.addWebhook(e),r()}})]}),n&&!e&&!t?(0,C.jsx)(c,{label:`Loading webhooks…`}):m.length===0?(0,C.jsx)(g,{icon:(0,C.jsx)(_,{}),title:`No webhooks`,hint:`Add one above to receive job-event callbacks.`}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`div`,{className:`overflow-x-auto rounded-xl border border-line bg-surface`,children:(0,C.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,C.jsx)(`thead`,{children:(0,C.jsxs)(`tr`,{className:`border-b border-line text-left text-[11px] uppercase tracking-wider text-faint`,children:[(0,C.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`URL`}),(0,C.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Events`}),(0,C.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Queue`}),(0,C.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Success / Fail`}),(0,C.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Last`}),(0,C.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Enabled`}),(0,C.jsx)(`th`,{className:`w-12 px-5 py-3`})]})}),(0,C.jsx)(`tbody`,{children:m.slice(E*15,E*15+15).map(e=>(0,C.jsxs)(`tr`,{className:`border-b border-line last:border-0 align-top hover:bg-surface-2/40`,children:[(0,C.jsx)(`td`,{className:`max-w-xs truncate px-5 py-3 font-mono text-xs text-fg`,children:e.url}),(0,C.jsx)(`td`,{className:`px-5 py-3 text-xs text-muted`,children:e.events.join(`, `)}),(0,C.jsx)(`td`,{className:`px-5 py-3 font-mono text-xs text-muted`,children:e.queue??`all`}),(0,C.jsxs)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:[(0,C.jsx)(`span`,{className:`text-success`,children:l(e.successCount)}),` / `,(0,C.jsx)(`span`,{className:e.failureCount?`text-danger`:``,children:l(e.failureCount)})]}),(0,C.jsx)(`td`,{className:`px-5 py-3 text-right text-faint`,children:p(e.lastTriggered)}),(0,C.jsx)(`td`,{className:`px-5 py-3`,children:(0,C.jsx)(y,{checked:e.enabled,label:`${e.enabled?`Disable`:`Enable`} webhook`,onChange:t=>k(()=>u.setWebhookEnabled(e.id,t))})}),(0,C.jsx)(`td`,{className:`px-5 py-3 text-right`,children:(0,C.jsx)(s,{"aria-label":`Remove webhook`,onClick:()=>window.confirm(`Remove webhook for ${e.url}?`)&&k(()=>u.removeWebhook(e.id)),children:(0,C.jsx)(f,{className:`size-3.5`})})})]},e.id))})]})}),(0,C.jsx)(x,{page:E,pageSize:15,total:m.length,onPageChange:b,label:`webhooks`})]})]})}function T({onAdd:e}){let[t,n]=(0,S.useState)(``),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(``),[c,l]=(0,S.useState)([`job.completed`,`job.failed`]),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(!1),h=e=>l(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),g=async()=>{if(!f){if(d(null),!t.trim()||c.length===0){d(`URL and at least one event are required`);return}p(!0);try{await e({url:t,events:c,queue:i.trim()||void 0,secret:o.trim()||void 0}),n(``),s(``)}catch(e){d(e.message)}finally{p(!1)}}};return(0,C.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:e=>{e.preventDefault(),g()},children:[(0,C.jsxs)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-3`,children:[(0,C.jsx)(`div`,{className:`md:col-span-1`,children:(0,C.jsx)(b,{label:`URL`,children:(0,C.jsx)(v,{value:t,onChange:e=>n(e.target.value),placeholder:`https://example.com/hook`})})}),(0,C.jsx)(b,{label:`Queue (optional)`,children:(0,C.jsx)(v,{value:i,onChange:e=>a(e.target.value),placeholder:`all queues`})}),(0,C.jsx)(b,{label:`Secret (optional)`,children:(0,C.jsx)(v,{type:`password`,autoComplete:`new-password`,value:o,onChange:e=>s(e.target.value),placeholder:`HMAC signing secret`})})]}),(0,C.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:r.map(e=>(0,C.jsx)(`button`,{type:`button`,"aria-pressed":c.includes(e),onClick:()=>h(e),className:c.includes(e)?`rounded-full bg-accent/15 px-3 py-1 text-xs font-medium text-accent`:`rounded-full border border-line px-3 py-1 text-xs font-medium text-muted hover:text-fg`,children:e},e))}),(0,C.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,C.jsx)(m,{type:`submit`,variant:`accent`,size:`sm`,disabled:f,children:f?`Adding…`:`Add webhook`}),u&&(0,C.jsx)(`span`,{className:`text-xs text-danger`,children:u})]})]})}export{w as Webhooks};
@@ -1 +1 @@
1
- import{r as e}from"./cn-CMFYpumL.js";import{m as t,t as n}from"./react-vendor-CHIHtdAC.js";import{O as r,b as i,c as a,h as o,k as s,m as c,q as l,u,x as d,y as f}from"./index-BFjeS9FG.js";import{t as p}from"./Pagination-Bj1z6OlD.js";var m=e(t(),1),h=n(),g=20,_={workers:{total:0,active:0,list:[],truncated:!1}};function v(){let{data:e,error:t,loading:n,refetch:v}=r(()=>s.overview(),[]),[y,b]=(0,m.useState)(0);if(n&&!e&&!t)return(0,h.jsx)(i,{label:`Loading workers…`});let{workers:x}=e??_,S=Math.max(1,Math.ceil(x.list.length/g)),C=Math.min(y,S-1),w=x.list.slice(C*g,C*g+g);return(0,h.jsxs)(`div`,{children:[t&&(0,h.jsx)(d,{onRetry:v}),(0,h.jsx)(o,{title:`Workers`,description:`Registered workers and their throughput.`,live:!0}),(0,h.jsxs)(`div`,{className:`mb-6 grid grid-cols-2 gap-4 md:grid-cols-4`,children:[(0,h.jsx)(c,{label:`Total`,value:a(x.total),compact:!0}),(0,h.jsx)(c,{label:`Active`,value:a(x.active),tone:`green`,compact:!0})]}),x.list.length===0?(0,h.jsx)(f,{icon:(0,h.jsx)(l,{}),title:`No workers registered`,hint:`Workers appear here once they connect and register with the server.`}):(0,h.jsx)(`div`,{className:`overflow-x-auto rounded-xl border border-line bg-surface`,children:(0,h.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,h.jsx)(`thead`,{children:(0,h.jsxs)(`tr`,{className:`border-b border-line text-left text-[11px] uppercase tracking-wider text-faint`,children:[(0,h.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Worker`}),(0,h.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Queues`}),(0,h.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Active`}),(0,h.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Processed`}),(0,h.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Failed`}),(0,h.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Last Seen`})]})}),(0,h.jsx)(`tbody`,{children:w.map(e=>(0,h.jsxs)(`tr`,{className:`border-b border-line last:border-0 hover:bg-surface-2/40`,children:[(0,h.jsxs)(`td`,{className:`px-5 py-3`,children:[(0,h.jsx)(`div`,{className:`font-medium text-fg`,children:e.name||`worker`}),(0,h.jsx)(`div`,{className:`font-mono text-[11px] text-faint`,children:e.id})]}),(0,h.jsx)(`td`,{className:`px-5 py-3 font-mono text-xs text-muted`,children:e.queues.join(`, `)||`—`}),(0,h.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-blue-400`,children:a(e.activeJobs)}),(0,h.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:a(e.processedJobs)}),(0,h.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:a(e.failedJobs)}),(0,h.jsx)(`td`,{className:`px-5 py-3 text-right text-faint`,children:u(e.lastSeen)})]},e.id))})]})}),x.truncated&&(0,h.jsxs)(`p`,{className:`mt-3 text-xs text-amber-400`,children:[`Showing first `,a(x.list.length),` of `,a(x.total),` `,`workers.`]}),(0,h.jsx)(p,{page:C,pageSize:g,total:x.list.length,onPageChange:b,label:`workers`})]})}export{v as Workers};
1
+ import{r as e}from"./cn-CMFYpumL.js";import{m as t,t as n}from"./react-vendor-CHIHtdAC.js";import{J as r,O as i,b as a,c as o,h as s,k as c,m as l,u,x as d,y as f}from"./index-C5VVVkqi.js";import{t as p}from"./Pagination-DYMlK0Hm.js";var m=e(t(),1),h=n(),g=20,_={workers:{total:0,active:0,list:[],truncated:!1}};function v(){let{data:e,error:t,loading:n,refetch:v}=i(()=>c.overview(),[]),[y,b]=(0,m.useState)(0);if(n&&!e&&!t)return(0,h.jsx)(a,{label:`Loading workers…`});let{workers:x}=e??_,S=Math.max(1,Math.ceil(x.list.length/g)),C=Math.min(y,S-1),w=x.list.slice(C*g,C*g+g);return(0,h.jsxs)(`div`,{children:[t&&(0,h.jsx)(d,{onRetry:v}),(0,h.jsx)(s,{title:`Workers`,description:`Registered workers and their throughput.`,live:!0}),(0,h.jsxs)(`div`,{className:`mb-6 grid grid-cols-2 gap-4 md:grid-cols-4`,children:[(0,h.jsx)(l,{label:`Total`,value:o(x.total),compact:!0}),(0,h.jsx)(l,{label:`Active`,value:o(x.active),tone:`green`,compact:!0})]}),x.list.length===0?(0,h.jsx)(f,{icon:(0,h.jsx)(r,{}),title:`No workers registered`,hint:`Workers appear here once they connect and register with the server.`}):(0,h.jsx)(`div`,{className:`overflow-x-auto rounded-xl border border-line bg-surface`,children:(0,h.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,h.jsx)(`thead`,{children:(0,h.jsxs)(`tr`,{className:`border-b border-line text-left text-[11px] uppercase tracking-wider text-faint`,children:[(0,h.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Worker`}),(0,h.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Queues`}),(0,h.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Active`}),(0,h.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Processed`}),(0,h.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Failed`}),(0,h.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Last Seen`})]})}),(0,h.jsx)(`tbody`,{children:w.map(e=>(0,h.jsxs)(`tr`,{className:`border-b border-line last:border-0 hover:bg-surface-2/40`,children:[(0,h.jsxs)(`td`,{className:`px-5 py-3`,children:[(0,h.jsx)(`div`,{className:`font-medium text-fg`,children:e.name||`worker`}),(0,h.jsx)(`div`,{className:`font-mono text-[11px] text-faint`,children:e.id})]}),(0,h.jsx)(`td`,{className:`px-5 py-3 font-mono text-xs text-muted`,children:e.queues.join(`, `)||`—`}),(0,h.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-blue-400`,children:o(e.activeJobs)}),(0,h.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:o(e.processedJobs)}),(0,h.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:o(e.failedJobs)}),(0,h.jsx)(`td`,{className:`px-5 py-3 text-right text-faint`,children:u(e.lastSeen)})]},e.id))})]})}),x.truncated&&(0,h.jsxs)(`p`,{className:`mt-3 text-xs text-amber-400`,children:[`Showing first `,o(x.list.length),` of `,o(x.total),` `,`workers.`]}),(0,h.jsx)(p,{page:C,pageSize:g,total:x.list.length,onPageChange:b,label:`workers`})]})}export{v as Workers};
@@ -0,0 +1 @@
1
+ import{r as e,t}from"./cn-CMFYpumL.js";import{m as n,t as r}from"./react-vendor-CHIHtdAC.js";import{J as i,O as a,T as o,b as s,c,et as l,h as u,m as d,q as f,u as p,x as m,y as h}from"./index-C5VVVkqi.js";var g=e(n(),1),_=r(),v=100;function y(){let{data:e,error:n,loading:r,refetch:y}=a(async()=>(await l.workers()).data?.workers??[],[]),[b,x]=(0,g.useState)(new Set),[S,C]=(0,g.useState)(null);if(r&&!e&&!n)return(0,_.jsx)(s,{label:`Loading workers…`});let w=e??[],T=w.slice(0,v),E=w.filter(e=>e.status===`active`).length,D=w.length-E,O=w.reduce((e,t)=>e+(t.activeJobs??0),0),k=async e=>{if(window.confirm(`Unregister worker "${e.id}"? It can re-register on its next heartbeat.`)){x(t=>new Set(t).add(e.id)),C(null);try{await l.unregisterWorker(e.id),C({ok:!0,text:`Unregistered ${e.id} ✓`})}catch(e){C({ok:!1,text:`Unregister failed: ${e.message}`})}finally{x(t=>{let n=new Set(t);return n.delete(e.id),n}),y()}}};return(0,_.jsxs)(`div`,{children:[(0,_.jsx)(u,{title:`Workers`,description:`Registered workers and their throughput.`,live:!n}),n&&(0,_.jsx)(m,{onRetry:y}),(0,_.jsxs)(`div`,{className:`mb-6 grid grid-cols-2 gap-4 md:grid-cols-4`,children:[(0,_.jsx)(d,{label:`Total`,value:c(w.length),compact:!0}),(0,_.jsx)(d,{label:`Active`,value:c(E),tone:`green`,compact:!0}),(0,_.jsx)(d,{label:`Stale`,value:c(D),tone:D?`amber`:`default`,compact:!0}),(0,_.jsx)(d,{label:`Active Jobs`,value:c(O),tone:`blue`,compact:!0})]}),S&&(0,_.jsx)(`div`,{className:t(`mb-3 text-sm`,S.ok?`text-success`:`text-danger`),children:S.text}),w.length===0?(0,_.jsx)(h,{icon:(0,_.jsx)(i,{}),title:`No workers registered`,hint:`Workers appear here once they connect and register with the server.`}):(0,_.jsx)(`div`,{className:`overflow-x-auto rounded-xl border border-line bg-surface`,children:(0,_.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,_.jsx)(`thead`,{children:(0,_.jsxs)(`tr`,{className:`border-b border-line text-left text-[11px] uppercase tracking-wider text-faint`,children:[(0,_.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Worker`}),(0,_.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Queues`}),(0,_.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Status`}),(0,_.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Active`}),(0,_.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Processed`}),(0,_.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Failed`}),(0,_.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Last Seen`}),(0,_.jsx)(`th`,{className:`w-16 px-5 py-3 text-right font-medium`,children:`Actions`})]})}),(0,_.jsx)(`tbody`,{children:T.map(e=>(0,_.jsxs)(`tr`,{className:`border-b border-line last:border-0 hover:bg-surface-2/40`,children:[(0,_.jsxs)(`td`,{className:`px-5 py-3`,children:[(0,_.jsx)(`div`,{className:`font-medium text-fg`,children:e.name||`worker`}),(0,_.jsx)(`div`,{className:`font-mono text-[11px] text-faint`,children:e.id})]}),(0,_.jsx)(`td`,{className:`px-5 py-3 font-mono text-xs text-muted`,children:e.queues.join(`, `)||`—`}),(0,_.jsx)(`td`,{className:`px-5 py-3`,children:(0,_.jsx)(`span`,{className:t(`rounded-full px-2 py-0.5 text-[11px] font-medium`,e.status===`active`?`bg-emerald-500/10 text-success`:`bg-amber-500/10 text-warning`),children:e.status})}),(0,_.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-blue-400`,children:c(e.activeJobs)}),(0,_.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:c(e.processedJobs)}),(0,_.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:c(e.failedJobs)}),(0,_.jsx)(`td`,{className:`px-5 py-3 text-right text-faint`,children:p(e.lastSeen)}),(0,_.jsx)(`td`,{className:`px-5 py-3`,children:(0,_.jsx)(`div`,{className:`flex justify-end`,children:(0,_.jsx)(o,{"aria-label":`Unregister worker ${e.id}`,disabled:b.has(e.id),onClick:()=>k(e),children:(0,_.jsx)(f,{className:`size-3.5`})})})})]},e.id))})]})}),w.length>v&&(0,_.jsxs)(`p`,{className:`mt-3 text-xs text-warning`,children:[`Showing first `,c(v),` of `,c(w.length),` workers.`]})]})}export{y as WorkersPro};
@@ -0,0 +1,2 @@
1
+ function e(e,t,n=`application/octet-stream`){if(typeof document>`u`)return;let r=t instanceof Blob?t:new Blob([t],{type:n}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=e,document.body.appendChild(a),a.click(),a.remove(),setTimeout(()=>URL.revokeObjectURL(i),0)}function t(t,n){e(t.endsWith(`.json`)?t:`${t}.json`,JSON.stringify(n,null,2),`application/json`)}function n(e){if(e==null)return``;let t=typeof e!=`number`&&typeof e!=`boolean`,n=typeof e==`object`?JSON.stringify(e):String(e);return t&&/^[=+\-@\t\r]/.test(n)&&(n=`'${n}`),/[",\n\r]/.test(n)?`"${n.replace(/"/g,`""`)}"`:n}function r(e,t){let r=t??(()=>{let t=[],n=new Set;for(let r of e)for(let e of Object.keys(r))n.has(e)||(n.add(e),t.push(e));return t})(),i=r.map(n).join(`,`),a=e.map(e=>r.map(t=>n(e[t])).join(`,`)).join(`
2
+ `);return a?`${i}\n${a}`:i}function i(t,n,i){e(t.endsWith(`.csv`)?t:`${t}.csv`,r(n,i),`text/csv;charset=utf-8`)}export{t as n,i as t};
@@ -0,0 +1 @@
1
+ @font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/inter-latin-wght-normal-Dx4kXJAl.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:"Inter Variable", ui-sans-serif, system-ui, sans-serif;--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-700:oklch(55.3% .195 38.402);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-700:oklch(55.5% .163 48.998);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-cyan-700:oklch(52% .105 223.128);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-700:oklch(48.8% .243 264.376);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-500:oklch(60.6% .25 292.717);--color-violet-700:oklch(49.1% .27 292.581);--color-fuchsia-600:oklch(59.1% .293 322.896);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--text-5xl:3rem;--text-5xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:"Inter Variable", ui-sans-serif, system-ui, sans-serif;--default-mono-font-family:"JetBrains Mono Variable", ui-monospace, "SF Mono", Menlo, monospace}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--line)}html,body,#root{height:100%}html{font-size:clamp(13.5px,12.7px + .28vw,16px)}body{background:var(--bg);color:var(--text);font-family:var(--font-sans);letter-spacing:-.005em;font-optical-sizing:auto;font-feature-settings:"cv11", "ss01";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizelegibility;line-height:1.55}h1,h2{letter-spacing:-.02em}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--surface-2);border:2px solid var(--bg);border-radius:8px}::-webkit-scrollbar-thumb:hover{background:var(--line-strong)}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:0}.inset-y-0{inset-block:0}.inset-y-1\.5{inset-block:calc(var(--spacing) * 1.5)}.top-0{top:0}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.right-0{right:0}.right-0\.5{right:calc(var(--spacing) * .5)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.right-5{right:calc(var(--spacing) * 5)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-5{bottom:calc(var(--spacing) * 5)}.left-0{left:0}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-3{left:calc(var(--spacing) * 3)}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.z-\[55\]{z-index:55}.z-\[60\]{z-index:60}.col-span-2{grid-column:span 2/span 2}.col-span-full{grid-column:1/-1}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.mx-2{margin-inline:calc(var(--spacing) * 2)}.mx-3{margin-inline:calc(var(--spacing) * 3)}.-mt-2{margin-top:calc(var(--spacing) * -2)}.-mt-3{margin-top:calc(var(--spacing) * -3)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-8{margin-top:calc(var(--spacing) * 8)}.-mr-1{margin-right:calc(var(--spacing) * -1)}.mr-1{margin-right:var(--spacing)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mr-auto{margin-right:auto}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.-ml-1{margin-left:calc(var(--spacing) * -1)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.size-1\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-2\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-\[18px\]{width:18px;height:18px}.size-full{width:100%;height:100%}.h-0\.5{height:calc(var(--spacing) * .5)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-14{height:calc(var(--spacing) * 14)}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\[28rem\]{max-height:28rem}.max-h-\[70vh\]{max-height:70vh}.min-h-0{min-height:0}.min-h-40{min-height:calc(var(--spacing) * 40)}.min-h-screen{min-height:100vh}.w-0\.5{width:calc(var(--spacing) * .5)}.w-1{width:var(--spacing)}.w-2\/5{width:40%}.w-4{width:calc(var(--spacing) * 4)}.w-10{width:calc(var(--spacing) * 10)}.w-11{width:calc(var(--spacing) * 11)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-36{width:calc(var(--spacing) * 36)}.w-40{width:calc(var(--spacing) * 40)}.w-48{width:calc(var(--spacing) * 48)}.w-56{width:calc(var(--spacing) * 56)}.w-60{width:calc(var(--spacing) * 60)}.w-80{width:calc(var(--spacing) * 80)}.w-full{width:100%}.max-w-56{max-width:calc(var(--spacing) * 56)}.max-w-\[16rem\]{max-width:16rem}.max-w-\[24rem\]{max-width:24rem}.max-w-\[85\%\]{max-width:85%}.max-w-\[calc\(100vw-2rem\)\]{max-width:calc(100vw - 2rem)}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.min-w-40{min-width:calc(var(--spacing) * 40)}.min-w-56{min-width:calc(var(--spacing) * 56)}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-1{--tw-translate-x:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-6{--tw-translate-x:calc(var(--spacing) * 6);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize-y{resize:vertical}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-around{justify-content:space-around}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:0}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-x-5{column-gap:calc(var(--spacing) * 5)}.gap-x-6{column-gap:calc(var(--spacing) * 6)}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.gap-y-4{row-gap:calc(var(--spacing) * 4)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-line>:not(:last-child)){border-color:var(--line)}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-br-sm{border-bottom-right-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-accent\/30{border-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.border-accent\/30{border-color:color-mix(in oklab, var(--accent) 30%, transparent)}}.border-accent\/40{border-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.border-accent\/40{border-color:color-mix(in oklab, var(--accent) 40%, transparent)}}.border-accent\/50{border-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.border-accent\/50{border-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.border-amber-500\/20{border-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/20{border-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.border-amber-500\/25{border-color:#f99c0040}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/25{border-color:color-mix(in oklab, var(--color-amber-500) 25%, transparent)}}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/30{border-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.border-blue-400\/60{border-color:#54a2ff99}@supports (color:color-mix(in lab, red, red)){.border-blue-400\/60{border-color:color-mix(in oklab, var(--color-blue-400) 60%, transparent)}}.border-current{border-color:currentColor}.border-danger\/30{border-color:var(--danger)}@supports (color:color-mix(in lab, red, red)){.border-danger\/30{border-color:color-mix(in oklab, var(--danger) 30%, transparent)}}.border-danger\/40{border-color:var(--danger)}@supports (color:color-mix(in lab, red, red)){.border-danger\/40{border-color:color-mix(in oklab, var(--danger) 40%, transparent)}}.border-danger\/50{border-color:var(--danger)}@supports (color:color-mix(in lab, red, red)){.border-danger\/50{border-color:color-mix(in oklab, var(--danger) 50%, transparent)}}.border-emerald-500\/25{border-color:#00bb7f40}@supports (color:color-mix(in lab, red, red)){.border-emerald-500\/25{border-color:color-mix(in oklab, var(--color-emerald-500) 25%, transparent)}}.border-line{border-color:var(--line)}.border-line-strong{border-color:var(--line-strong)}.border-line\/60{border-color:var(--line)}@supports (color:color-mix(in lab, red, red)){.border-line\/60{border-color:color-mix(in oklab, var(--line) 60%, transparent)}}.border-red-500\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab, red, red)){.border-red-500\/20{border-color:color-mix(in oklab, var(--color-red-500) 20%, transparent)}}.border-red-500\/25{border-color:#fb2c3640}@supports (color:color-mix(in lab, red, red)){.border-red-500\/25{border-color:color-mix(in oklab, var(--color-red-500) 25%, transparent)}}.border-red-500\/30{border-color:#fb2c364d}@supports (color:color-mix(in lab, red, red)){.border-red-500\/30{border-color:color-mix(in oklab, var(--color-red-500) 30%, transparent)}}.border-success\/40{border-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.border-success\/40{border-color:color-mix(in oklab, var(--success) 40%, transparent)}}.border-success\/50{border-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.border-success\/50{border-color:color-mix(in oklab, var(--success) 50%, transparent)}}.border-transparent{border-color:#0000}.border-warning\/40{border-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.border-warning\/40{border-color:color-mix(in oklab, var(--warning) 40%, transparent)}}.border-warning\/50{border-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.border-warning\/50{border-color:color-mix(in oklab, var(--warning) 50%, transparent)}}.border-t-transparent{border-top-color:#0000}.bg-accent,.bg-accent\/10{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\/10{background-color:color-mix(in oklab, var(--accent) 10%, transparent)}}.bg-accent\/15{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\/15{background-color:color-mix(in oklab, var(--accent) 15%, transparent)}}.bg-accent\/\[0\.06\]{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\/\[0\.06\]{background-color:color-mix(in oklab, var(--accent) 6%, transparent)}}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-500\/5{background-color:#f99c000d}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/5{background-color:color-mix(in oklab, var(--color-amber-500) 5%, transparent)}}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/10{background-color:color-mix(in oklab, var(--color-amber-500) 10%, transparent)}}.bg-amber-500\/15{background-color:#f99c0026}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/15{background-color:color-mix(in oklab, var(--color-amber-500) 15%, transparent)}}.bg-amber-500\/\[0\.06\]{background-color:#f99c000f}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/\[0\.06\]{background-color:color-mix(in oklab, var(--color-amber-500) 6%, transparent)}}.bg-bg,.bg-bg\/80{background-color:var(--bg)}@supports (color:color-mix(in lab, red, red)){.bg-bg\/80{background-color:color-mix(in oklab, var(--bg) 80%, transparent)}}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.bg-black\/30{background-color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-400\/10{background-color:#54a2ff1a}@supports (color:color-mix(in lab, red, red)){.bg-blue-400\/10{background-color:color-mix(in oklab, var(--color-blue-400) 10%, transparent)}}.bg-blue-500\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab, red, red)){.bg-blue-500\/10{background-color:color-mix(in oklab, var(--color-blue-500) 10%, transparent)}}.bg-current{background-color:currentColor}.bg-cyan-500\/10{background-color:#00b7d71a}@supports (color:color-mix(in lab, red, red)){.bg-cyan-500\/10{background-color:color-mix(in oklab, var(--color-cyan-500) 10%, transparent)}}.bg-danger\/10{background-color:var(--danger)}@supports (color:color-mix(in lab, red, red)){.bg-danger\/10{background-color:color-mix(in oklab, var(--danger) 10%, transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/10{background-color:color-mix(in oklab, var(--color-emerald-500) 10%, transparent)}}.bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/15{background-color:color-mix(in oklab, var(--color-emerald-500) 15%, transparent)}}.bg-emerald-500\/\[0\.06\]{background-color:#00bb7f0f}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/\[0\.06\]{background-color:color-mix(in oklab, var(--color-emerald-500) 6%, transparent)}}.bg-orange-500\/10{background-color:#fe6e001a}@supports (color:color-mix(in lab, red, red)){.bg-orange-500\/10{background-color:color-mix(in oklab, var(--color-orange-500) 10%, transparent)}}.bg-red-400{background-color:var(--color-red-400)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/5{background-color:#fb2c360d}@supports (color:color-mix(in lab, red, red)){.bg-red-500\/5{background-color:color-mix(in oklab, var(--color-red-500) 5%, transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab, red, red)){.bg-red-500\/10{background-color:color-mix(in oklab, var(--color-red-500) 10%, transparent)}}.bg-red-500\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab, red, red)){.bg-red-500\/15{background-color:color-mix(in oklab, var(--color-red-500) 15%, transparent)}}.bg-red-500\/40{background-color:#fb2c3666}@supports (color:color-mix(in lab, red, red)){.bg-red-500\/40{background-color:color-mix(in oklab, var(--color-red-500) 40%, transparent)}}.bg-red-500\/\[0\.06\]{background-color:#fb2c360f}@supports (color:color-mix(in lab, red, red)){.bg-red-500\/\[0\.06\]{background-color:color-mix(in oklab, var(--color-red-500) 6%, transparent)}}.bg-sidebar{background-color:var(--sidebar)}.bg-success\/10{background-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.bg-success\/10{background-color:color-mix(in oklab, var(--success) 10%, transparent)}}.bg-surface{background-color:var(--surface)}.bg-surface-2,.bg-surface-2\/30{background-color:var(--surface-2)}@supports (color:color-mix(in lab, red, red)){.bg-surface-2\/30{background-color:color-mix(in oklab, var(--surface-2) 30%, transparent)}}.bg-surface-2\/50{background-color:var(--surface-2)}@supports (color:color-mix(in lab, red, red)){.bg-surface-2\/50{background-color:color-mix(in oklab, var(--surface-2) 50%, transparent)}}.bg-surface\/60{background-color:var(--surface)}@supports (color:color-mix(in lab, red, red)){.bg-surface\/60{background-color:color-mix(in oklab, var(--surface) 60%, transparent)}}.bg-transparent{background-color:#0000}.bg-violet-500\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab, red, red)){.bg-violet-500\/10{background-color:color-mix(in oklab, var(--color-violet-500) 10%, transparent)}}.bg-warning\/10{background-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\/10{background-color:color-mix(in oklab, var(--warning) 10%, transparent)}}.bg-warning\/15{background-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\/15{background-color:color-mix(in oklab, var(--warning) 15%, transparent)}}.bg-white{background-color:var(--color-white)}.bg-zinc-400{background-color:var(--color-zinc-400)}.bg-zinc-500{background-color:var(--color-zinc-500)}.bg-zinc-500\/10{background-color:#71717b1a}@supports (color:color-mix(in lab, red, red)){.bg-zinc-500\/10{background-color:color-mix(in oklab, var(--color-zinc-500) 10%, transparent)}}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-accent{--tw-gradient-from:var(--accent);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-400\/80{--tw-gradient-from:#fcbb00cc}@supports (color:color-mix(in lab, red, red)){.from-amber-400\/80{--tw-gradient-from:color-mix(in oklab, var(--color-amber-400) 80%, transparent)}}.from-amber-400\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-emerald-400\/80{--tw-gradient-from:#00d294cc}@supports (color:color-mix(in lab, red, red)){.from-emerald-400\/80{--tw-gradient-from:color-mix(in oklab, var(--color-emerald-400) 80%, transparent)}}.from-emerald-400\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-red-400\/70{--tw-gradient-from:#ff6568b3}@supports (color:color-mix(in lab, red, red)){.from-red-400\/70{--tw-gradient-from:color-mix(in oklab, var(--color-red-400) 70%, transparent)}}.from-red-400\/70{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-amber-400\/25{--tw-gradient-via:#fcbb0040}@supports (color:color-mix(in lab, red, red)){.via-amber-400\/25{--tw-gradient-via:color-mix(in oklab, var(--color-amber-400) 25%, transparent)}}.via-amber-400\/25{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-emerald-400\/25{--tw-gradient-via:#00d29440}@supports (color:color-mix(in lab, red, red)){.via-emerald-400\/25{--tw-gradient-via:color-mix(in oklab, var(--color-emerald-400) 25%, transparent)}}.via-emerald-400\/25{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-red-400\/20{--tw-gradient-via:#ff656833}@supports (color:color-mix(in lab, red, red)){.via-red-400\/20{--tw-gradient-via:color-mix(in oklab, var(--color-red-400) 20%, transparent)}}.via-red-400\/20{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-fuchsia-600{--tw-gradient-to:var(--color-fuchsia-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-14{padding-block:calc(var(--spacing) * 14)}.py-16{padding-block:calc(var(--spacing) * 16)}.py-24{padding-block:calc(var(--spacing) * 24)}.pt-1{padding-top:var(--spacing)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pt-\[12vh\]{padding-top:12vh}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pr-12{padding-right:calc(var(--spacing) * 12)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pl-0\.5{padding-left:calc(var(--spacing) * .5)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-9{padding-left:calc(var(--spacing) * 9)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-top{vertical-align:top}.font-mono{font-family:JetBrains Mono Variable,ui-monospace,SF Mono,Menlo,monospace}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent{color:var(--accent)}.text-accent-fg{color:var(--accent-fg)}.text-accent\/80{color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.text-accent\/80{color:color-mix(in oklab, var(--accent) 80%, transparent)}}.text-accent\/90{color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.text-accent\/90{color:color-mix(in oklab, var(--accent) 90%, transparent)}}.text-amber-200{color:var(--color-amber-200)}.text-amber-300\/90{color:#ffd236e6}@supports (color:color-mix(in lab, red, red)){.text-amber-300\/90{color:color-mix(in oklab, var(--color-amber-300) 90%, transparent)}}.text-amber-400{color:var(--color-amber-400)}.text-amber-400\/90{color:#fcbb00e6}@supports (color:color-mix(in lab, red, red)){.text-amber-400\/90{color:color-mix(in oklab, var(--color-amber-400) 90%, transparent)}}.text-blue-400{color:var(--color-blue-400)}.text-cyan-400{color:var(--color-cyan-400)}.text-danger,.text-danger\/80{color:var(--danger)}@supports (color:color-mix(in lab, red, red)){.text-danger\/80{color:color-mix(in oklab, var(--danger) 80%, transparent)}}.text-danger\/90{color:var(--danger)}@supports (color:color-mix(in lab, red, red)){.text-danger\/90{color:color-mix(in oklab, var(--danger) 90%, transparent)}}.text-emerald-400{color:var(--color-emerald-400)}.text-faint,.text-faint\/70{color:var(--text-faint)}@supports (color:color-mix(in lab, red, red)){.text-faint\/70{color:color-mix(in oklab, var(--text-faint) 70%, transparent)}}.text-fg{color:var(--text)}.text-line{color:var(--line)}.text-muted{color:var(--text-muted)}.text-orange-400{color:var(--color-orange-400)}.text-red-400{color:var(--color-red-400)}.text-red-400\/90{color:#ff6568e6}@supports (color:color-mix(in lab, red, red)){.text-red-400\/90{color:color-mix(in oklab, var(--color-red-400) 90%, transparent)}}.text-success{color:var(--success)}.text-violet-400{color:var(--color-violet-400)}.text-warning{color:var(--warning)}.text-white{color:var(--color-white)}.text-zinc-400{color:var(--color-zinc-400)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline-offset-2{text-underline-offset:2px}.accent-accent{accent-color:var(--accent)}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-accent{--tw-ring-color:var(--accent)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[transform\,visibility\]{transition-property:transform,visibility;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}.group-open\:rotate-90:is(:where(.group):is([open],:popover-open,:open) *){rotate:90deg}@media (hover:hover){.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\:text-faint::placeholder{color:var(--text-faint)}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}@media (hover:hover){.hover\:border-accent\/50:hover{border-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.hover\:border-accent\/50:hover{border-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.hover\:border-amber-400\/50:hover{border-color:#fcbb0080}@supports (color:color-mix(in lab, red, red)){.hover\:border-amber-400\/50:hover{border-color:color-mix(in oklab, var(--color-amber-400) 50%, transparent)}}.hover\:border-amber-500\/50:hover{border-color:#f99c0080}@supports (color:color-mix(in lab, red, red)){.hover\:border-amber-500\/50:hover{border-color:color-mix(in oklab, var(--color-amber-500) 50%, transparent)}}.hover\:border-line-strong:hover{border-color:var(--line-strong)}.hover\:border-red-500\/50:hover{border-color:#fb2c3680}@supports (color:color-mix(in lab, red, red)){.hover\:border-red-500\/50:hover{border-color:color-mix(in oklab, var(--color-red-500) 50%, transparent)}}.hover\:bg-amber-500\/10:hover{background-color:#f99c001a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-500\/10:hover{background-color:color-mix(in oklab, var(--color-amber-500) 10%, transparent)}}.hover\:bg-emerald-500\/90:hover{background-color:#00bb7fe6}@supports (color:color-mix(in lab, red, red)){.hover\:bg-emerald-500\/90:hover{background-color:color-mix(in oklab, var(--color-emerald-500) 90%, transparent)}}.hover\:bg-red-500\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-red-500\/10:hover{background-color:color-mix(in oklab, var(--color-red-500) 10%, transparent)}}.hover\:bg-surface-2:hover,.hover\:bg-surface-2\/40:hover{background-color:var(--surface-2)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-surface-2\/40:hover{background-color:color-mix(in oklab, var(--surface-2) 40%, transparent)}}.hover\:bg-surface-2\/50:hover{background-color:var(--surface-2)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-surface-2\/50:hover{background-color:color-mix(in oklab, var(--surface-2) 50%, transparent)}}.hover\:bg-surface-2\/60:hover{background-color:var(--surface-2)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-surface-2\/60:hover{background-color:color-mix(in oklab, var(--surface-2) 60%, transparent)}}.hover\:bg-surface-2\/70:hover{background-color:var(--surface-2)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-surface-2\/70:hover{background-color:color-mix(in oklab, var(--surface-2) 70%, transparent)}}.hover\:text-accent:hover{color:var(--accent)}.hover\:text-danger:hover{color:var(--danger)}.hover\:text-fg:hover{color:var(--text)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}}.focus\:not-sr-only:focus{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.focus\:absolute:focus{position:absolute}.focus\:top-3:focus{top:calc(var(--spacing) * 3)}.focus\:left-4:focus{left:calc(var(--spacing) * 4)}.focus\:z-50:focus{z-index:50}.focus\:border-accent\/60:focus{border-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.focus\:border-accent\/60:focus{border-color:color-mix(in oklab, var(--accent) 60%, transparent)}}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-accent\/30:focus{--tw-ring-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.focus\:ring-accent\/30:focus{--tw-ring-color:color-mix(in oklab, var(--accent) 30%, transparent)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-accent\/40:focus-visible{--tw-ring-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-accent\/40:focus-visible{--tw-ring-color:color-mix(in oklab, var(--accent) 40%, transparent)}}.focus-visible\:ring-accent\/50:focus-visible{--tw-ring-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-accent\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media (hover:hover){.disabled\:hover\:text-faint:disabled:hover{color:var(--text-faint)}}@media (prefers-reduced-motion:no-preference){.motion-safe\:animate-ping{animation:var(--animate-ping)}}@media (width>=40rem){.sm\:flex{display:flex}.sm\:inline{display:inline}.sm\:inline-flex{display:inline-flex}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:px-6{padding-inline:calc(var(--spacing) * 6)}}@media (width>=48rem){.md\:col-span-1{grid-column:span 1/span 1}.md\:col-span-2{grid-column:span 2/span 2}.md\:max-w-xs{max-width:var(--container-xs)}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}@media (width>=64rem){.lg\:visible{visibility:visible}.lg\:static{position:static}.lg\:z-auto{z-index:auto}.lg\:col-span-1{grid-column:span 1/span 1}.lg\:col-span-2{grid-column:span 2/span 2}.lg\:col-span-3{grid-column:span 3/span 3}.lg\:hidden{display:none}.lg\:translate-x-0{--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-\[1fr_260px\]{grid-template-columns:1fr 260px}.lg\:flex-row{flex-direction:row}.lg\:items-center{align-items:center}.lg\:justify-between{justify-content:space-between}.lg\:px-8{padding-inline:calc(var(--spacing) * 8)}.lg\:py-6{padding-block:calc(var(--spacing) * 6)}}@media (width>=80rem){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xl\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.xl\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.xl\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}}.light\:text-amber-700:where([data-theme=light],[data-theme=light] *){color:var(--color-amber-700)}.light\:text-blue-700:where([data-theme=light],[data-theme=light] *){color:var(--color-blue-700)}.light\:text-cyan-700:where([data-theme=light],[data-theme=light] *){color:var(--color-cyan-700)}.light\:text-orange-700:where([data-theme=light],[data-theme=light] *){color:var(--color-orange-700)}.light\:text-violet-700:where([data-theme=light],[data-theme=light] *){color:var(--color-violet-700)}.light\:text-zinc-600:where([data-theme=light],[data-theme=light] *){color:var(--color-zinc-600)}.\[\&\>svg\]\:size-8>svg{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.tnum{font-variant-numeric:tabular-nums;font-feature-settings:"tnum"}}:root,[data-theme=dark]{--bg:#08080a;--surface:#0e0e12;--surface-2:#17171c;--line:#ffffff12;--line-strong:#ffffff1f;--text:#f4f4f5;--text-muted:#a8a8b3;--text-faint:#868c98;--sidebar:#09090b;--accent:#db2777;--accent-fg:#fff;--success:#34d399;--warning:#fbbf24;--danger:#f87171}[data-theme=light]{--bg:#fafafa;--surface:#fff;--surface-2:#f4f4f5;--line:#00000014;--line-strong:#00000024;--text:#18181b;--text-muted:#52525b;--text-faint:#71717a;--sidebar:#fff;--accent:#db2777;--accent-fg:#fff;--success:#047857;--warning:#b45309;--danger:#dc2626}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}