nestlens 0.17.2 → 0.17.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/dashboard/public/assets/{BatchDetailView-MwxKpCBw.js → BatchDetailView-DAtR5FPg.js} +1 -1
  2. package/dist/dashboard/public/assets/{BatchesPage-vFo0vIr2.js → BatchesPage-BPA6JhXD.js} +1 -1
  3. package/dist/dashboard/public/assets/{CacheDetailView-CcGupoLQ.js → CacheDetailView-DlShiGIf.js} +2 -2
  4. package/dist/dashboard/public/assets/{CachePage-CU847w5_.js → CachePage-4gqe08jc.js} +1 -1
  5. package/dist/dashboard/public/assets/{CommandDetailView-CVZrIKo6.js → CommandDetailView-D90ipdrR.js} +1 -1
  6. package/dist/dashboard/public/assets/{CommandsPage-BbiQyAea.js → CommandsPage-bO8ow8DA.js} +1 -1
  7. package/dist/dashboard/public/assets/{CopyButton-DpZHVixQ.js → CopyButton-DaF0vYeo.js} +1 -1
  8. package/dist/dashboard/public/assets/DashboardPage-DeKPc8p-.js +21 -0
  9. package/dist/dashboard/public/assets/{DataTable-CCXj8zzB.js → DataTable-CIlMLJo4.js} +9 -9
  10. package/dist/dashboard/public/assets/{DetailRow-C35E-Fg7.js → DetailRow-BC_kcJT3.js} +1 -1
  11. package/dist/dashboard/public/assets/{DumpDetailView-C3AszicE.js → DumpDetailView-CejsvpwV.js} +3 -3
  12. package/dist/dashboard/public/assets/{DumpsPage-nKkfeRGr.js → DumpsPage-BtDTjZ7O.js} +1 -1
  13. package/dist/dashboard/public/assets/EntryDetailPage-DUWwJ_hP.js +27 -0
  14. package/dist/dashboard/public/assets/EntrySearchInput-Iv-9Wirn.js +1 -0
  15. package/dist/dashboard/public/assets/{EventDetailView-i_T5zzxK.js → EventDetailView-gBzHbxMY.js} +1 -1
  16. package/dist/dashboard/public/assets/{EventsPage--LGwQSIW.js → EventsPage-B8t1V0Vx.js} +1 -1
  17. package/dist/dashboard/public/assets/{ExceptionDetailView-BD375JkM.js → ExceptionDetailView-CAJwXNN0.js} +2 -2
  18. package/dist/dashboard/public/assets/{ExceptionsPage-DJRQKir2.js → ExceptionsPage-BnoHLwKA.js} +1 -1
  19. package/dist/dashboard/public/assets/{GateDetailView-DjS0BcxS.js → GateDetailView-CmKN_iLu.js} +2 -2
  20. package/dist/dashboard/public/assets/{GatesPage-CP3_e7g1.js → GatesPage-Bgt4HOfH.js} +1 -1
  21. package/dist/dashboard/public/assets/GraphQLDetailView-CCMHYaLc.js +6 -0
  22. package/dist/dashboard/public/assets/{GraphQLPage-BCr6tRBy.js → GraphQLPage-C-lDawkW.js} +1 -1
  23. package/dist/dashboard/public/assets/HttpClientDetailView-tCQJY3WT.js +1 -0
  24. package/dist/dashboard/public/assets/{HttpClientPage-opI4zxU2.js → HttpClientPage-B0-n_3yk.js} +1 -1
  25. package/dist/dashboard/public/assets/{JobDetailView-4qAPrQWH.js → JobDetailView-COX5nxJL.js} +2 -2
  26. package/dist/dashboard/public/assets/{JobsPage-BuCIb8wu.js → JobsPage-BKGnM4ne.js} +1 -1
  27. package/dist/dashboard/public/assets/LogDetailView-CiFkQjNz.js +1 -0
  28. package/dist/dashboard/public/assets/{LogsPage-BYUqINeg.js → LogsPage-NIDMxNxD.js} +1 -1
  29. package/dist/dashboard/public/assets/{MailDetailView-BPFRJcUh.js → MailDetailView-B4hhGA3f.js} +2 -2
  30. package/dist/dashboard/public/assets/{MailPage-n712tj0J.js → MailPage-CYEkpVKG.js} +1 -1
  31. package/dist/dashboard/public/assets/{ModelDetailView-BDzUh_Kg.js → ModelDetailView-DiI8V80r.js} +1 -1
  32. package/dist/dashboard/public/assets/{ModelsPage-BgXuFcOx.js → ModelsPage-B9sb5wNN.js} +1 -1
  33. package/dist/dashboard/public/assets/{NotificationDetailView-D-wwNBBg.js → NotificationDetailView-jBvJjcrv.js} +1 -1
  34. package/dist/dashboard/public/assets/{NotificationsPage-eznKkQYP.js → NotificationsPage-CQmtJ4Uw.js} +1 -1
  35. package/dist/dashboard/public/assets/PageHeader-Tnp0JBDF.js +1 -0
  36. package/dist/dashboard/public/assets/QueriesPage-92MXcQ8v.js +1 -0
  37. package/dist/dashboard/public/assets/{QueryDetailView-BkUuf3JM.js → QueryDetailView-0RW6Mgfq.js} +2 -2
  38. package/dist/dashboard/public/assets/{RedisDetailView-EHqxefP1.js → RedisDetailView-B2ckYL3H.js} +1 -1
  39. package/dist/dashboard/public/assets/{RedisPage-BqyStSRQ.js → RedisPage-CZU4kHNw.js} +1 -1
  40. package/dist/dashboard/public/assets/RequestDetailView-Cm-OEVhR.js +1 -0
  41. package/dist/dashboard/public/assets/{RequestsPage-CSmOa0Pi.js → RequestsPage-CNVJHWoJ.js} +1 -1
  42. package/dist/dashboard/public/assets/{ScheduleDetailView-BPjjgHxu.js → ScheduleDetailView-CrBW0QSz.js} +1 -1
  43. package/dist/dashboard/public/assets/{SchedulePage-Brf1dEFU.js → SchedulePage-wVYGrpuQ.js} +1 -1
  44. package/dist/dashboard/public/assets/{UserCard-CEq6mQ5k.js → UserCard-B4mNJVOd.js} +1 -1
  45. package/dist/dashboard/public/assets/{ViewDetailView-DzuPi6K1.js → ViewDetailView-CMAf9inJ.js} +1 -1
  46. package/dist/dashboard/public/assets/{ViewsPage-ClbTUhv0.js → ViewsPage-76yfd6hO.js} +1 -1
  47. package/dist/dashboard/public/assets/{calendar-CMjU8s5-.js → calendar-DCypCI0I.js} +1 -1
  48. package/dist/dashboard/public/assets/{circle-alert-DQGZE3D0.js → circle-alert-BEvvepIR.js} +1 -1
  49. package/dist/dashboard/public/assets/{circle-check-big-Br_lvQdJ.js → circle-check-big-DZttXeD-.js} +1 -1
  50. package/dist/dashboard/public/assets/{circle-x-DFyAuyMN.js → circle-x-CioeSSBA.js} +1 -1
  51. package/dist/dashboard/public/assets/{eye-BlDJOCMu.js → eye-CwQoBjXn.js} +1 -1
  52. package/dist/dashboard/public/assets/{index-CNTaNUkj.js → index-BaD1MX7a.js} +2 -2
  53. package/dist/dashboard/public/assets/index-CMvt7uFU.css +1 -0
  54. package/dist/dashboard/public/assets/{search-CcMiea1V.js → search-BtkJjUPF.js} +1 -1
  55. package/dist/dashboard/public/assets/{send-CSgocT8I.js → send-CvZt49HP.js} +1 -1
  56. package/dist/dashboard/public/assets/{timer-CDc7JIAB.js → timer-D72f3hG4.js} +1 -1
  57. package/dist/dashboard/public/assets/{types-DqF5HlZi.js → types-BHYinjn2.js} +1 -1
  58. package/dist/dashboard/public/assets/{users-D9yOg5Si.js → users-BHTpEUZQ.js} +1 -1
  59. package/dist/dashboard/public/assets/{zap-QXV06WYA.js → zap-Cx84VGgd.js} +1 -1
  60. package/dist/dashboard/public/index.html +2 -2
  61. package/package.json +1 -1
  62. package/dist/dashboard/public/assets/DashboardPage-Ck0F9Z12.js +0 -21
  63. package/dist/dashboard/public/assets/EntryDetailPage-C63KztnI.js +0 -27
  64. package/dist/dashboard/public/assets/EntrySearchInput-BNjSxfmZ.js +0 -1
  65. package/dist/dashboard/public/assets/GraphQLDetailView-BubeJCJT.js +0 -6
  66. package/dist/dashboard/public/assets/HttpClientDetailView-yb-3URIg.js +0 -1
  67. package/dist/dashboard/public/assets/LogDetailView--AEX1d6S.js +0 -1
  68. package/dist/dashboard/public/assets/PageHeader-Dhs9cPza.js +0 -1
  69. package/dist/dashboard/public/assets/QueriesPage-Df7S76B_.js +0 -1
  70. package/dist/dashboard/public/assets/RequestDetailView-D0pFJlIF.js +0 -1
  71. package/dist/dashboard/public/assets/index-ReuerEhs.css +0 -1
@@ -1 +1 @@
1
- import{j as e,L as o,A as y,C as u}from"./index-CNTaNUkj.js";import{p as n,f as v}from"./date-Dwgqy666.js";import{D as r,f as k}from"./DetailRow-C35E-Fg7.js";import{C as m}from"./types-DqF5HlZi.js";import{C as w}from"./CopyButton-DpZHVixQ.js";import{C as g}from"./circle-x-DFyAuyMN.js";import{C as j}from"./circle-alert-DQGZE3D0.js";import{C}from"./circle-check-big-Br_lvQdJ.js";import"./vendor-DBTT3jXp.js";import"./EntryDetailPage-C63KztnI.js";import"./search-CcMiea1V.js";const p={completed:{icon:C,color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30"},partial:{icon:j,color:"text-yellow-500",bg:"bg-yellow-100 dark:bg-yellow-900/30"},failed:{icon:g,color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30"}};function h(a){return a?a<1024?`${a}B`:a<1024*1024?`${(a/1024).toFixed(1)}KB`:a<1024*1024*1024?`${(a/(1024*1024)).toFixed(1)}MB`:`${(a/(1024*1024*1024)).toFixed(1)}GB`:"-"}function E({entry:a}){const{payload:s,createdAt:c}=a,t=p[s.status]||p.completed,f=t.icon,{processedItems:x,totalItems:d,failedItems:l}=s,i=d>0?Math.round(x/d*100):0;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:`p-2 ${t.bg} rounded-lg`,children:e.jsx(o,{className:`h-5 w-5 ${t.color}`})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white font-mono",children:s.name}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Batch Operation"})]})]}),e.jsx(w,{text:s.name,label:"Copy batch name"})]})}),e.jsxs("div",{className:`grid ${s.memory!==void 0?"grid-cols-2 md:grid-cols-5":"grid-cols-2 md:grid-cols-4"} divide-x divide-gray-200 dark:divide-gray-700`,children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(f,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Status"})]}),e.jsx("p",{className:`text-lg font-bold ${t.color}`,children:s.status.toUpperCase()})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(y,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Progress"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[i,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"%"})]})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(u,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[s.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]}),l>0&&e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(g,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Failed"})]}),e.jsx("p",{className:"text-lg font-bold text-red-600 dark:text-red-400",children:l})]}),s.memory!==void 0&&e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(o,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Memory"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:h(s.memory)})]})]})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(r,{label:"Time",value:e.jsxs("span",{children:[k(n(c),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",v(n(c),{addSuffix:!0}),")"]})]})}),e.jsx(r,{label:"Name",value:e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white",children:s.name})}),s.operation&&e.jsx(r,{label:"Operation",value:e.jsx(m,{listType:"batches",filterType:"operations",filterValue:s.operation,children:s.operation})}),e.jsx(r,{label:"Status",value:e.jsx(m,{listType:"batches",filterType:"statuses",filterValue:s.status,children:s.status.toUpperCase()})}),e.jsx(r,{label:"Progress",value:e.jsxs("div",{children:[e.jsxs("div",{className:"text-sm font-mono",children:[x," / ",d," (",i,"%)"]}),e.jsx("div",{className:"mt-2 w-full bg-gray-200 dark:bg-gray-700 rounded-full h-2",children:e.jsx("div",{className:"bg-blue-600 dark:bg-blue-500 h-2 rounded-full transition-all",style:{width:`${i}%`}})})]})}),l>0&&e.jsx(r,{label:"Failed Items",value:e.jsx("span",{className:"text-red-600 dark:text-red-400 font-mono",children:l})}),e.jsx(r,{label:"Duration",value:`${s.duration}ms`}),s.batchSize&&e.jsx(r,{label:"Batch Size",value:s.batchSize}),s.memory!==void 0&&e.jsx(r,{label:"Memory",value:h(s.memory)})]})})]}),s.errors&&s.errors.length>0&&e.jsxs("div",{className:"card border-red-200 dark:border-red-800",children:[e.jsx("div",{className:"px-4 py-3 border-b border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-900/20",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(j,{className:"h-5 w-5 text-red-500"}),e.jsxs("h2",{className:"text-lg font-semibold text-red-700 dark:text-red-400",children:["Errors (",s.errors.length,")"]})]})}),e.jsx("div",{className:"divide-y divide-red-200 dark:divide-red-800",children:s.errors.map((N,b)=>e.jsx("div",{className:"p-4 bg-red-50/50 dark:bg-red-900/10",children:e.jsx("pre",{className:"text-sm text-red-600 dark:text-red-400 font-mono whitespace-pre-wrap overflow-x-auto",children:N})},b))})]})]})}export{E as default};
1
+ import{j as e,L as o,A as y,C as u}from"./index-BaD1MX7a.js";import{p as n,f as v}from"./date-Dwgqy666.js";import{D as r,f as k}from"./DetailRow-BC_kcJT3.js";import{C as m}from"./types-BHYinjn2.js";import{C as w}from"./CopyButton-DaF0vYeo.js";import{C as g}from"./circle-x-CioeSSBA.js";import{C as j}from"./circle-alert-BEvvepIR.js";import{C}from"./circle-check-big-DZttXeD-.js";import"./vendor-DBTT3jXp.js";import"./EntryDetailPage-DUWwJ_hP.js";import"./search-BtkJjUPF.js";const p={completed:{icon:C,color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30"},partial:{icon:j,color:"text-yellow-500",bg:"bg-yellow-100 dark:bg-yellow-900/30"},failed:{icon:g,color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30"}};function h(a){return a?a<1024?`${a}B`:a<1024*1024?`${(a/1024).toFixed(1)}KB`:a<1024*1024*1024?`${(a/(1024*1024)).toFixed(1)}MB`:`${(a/(1024*1024*1024)).toFixed(1)}GB`:"-"}function E({entry:a}){const{payload:s,createdAt:c}=a,t=p[s.status]||p.completed,f=t.icon,{processedItems:x,totalItems:d,failedItems:l}=s,i=d>0?Math.round(x/d*100):0;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:`p-2 ${t.bg} rounded-lg`,children:e.jsx(o,{className:`h-5 w-5 ${t.color}`})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white font-mono",children:s.name}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Batch Operation"})]})]}),e.jsx(w,{text:s.name,label:"Copy batch name"})]})}),e.jsxs("div",{className:`grid ${s.memory!==void 0?"grid-cols-2 md:grid-cols-5":"grid-cols-2 md:grid-cols-4"} divide-x divide-gray-200 dark:divide-gray-700`,children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(f,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Status"})]}),e.jsx("p",{className:`text-lg font-bold ${t.color}`,children:s.status.toUpperCase()})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(y,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Progress"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[i,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"%"})]})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(u,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[s.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]}),l>0&&e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(g,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Failed"})]}),e.jsx("p",{className:"text-lg font-bold text-red-600 dark:text-red-400",children:l})]}),s.memory!==void 0&&e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(o,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Memory"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:h(s.memory)})]})]})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"*:not-first:border-y-0",children:[e.jsx(r,{label:"Time",value:e.jsxs("span",{children:[k(n(c),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",v(n(c),{addSuffix:!0}),")"]})]})}),e.jsx(r,{label:"Name",value:e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white",children:s.name})}),s.operation&&e.jsx(r,{label:"Operation",value:e.jsx(m,{listType:"batches",filterType:"operations",filterValue:s.operation,children:s.operation})}),e.jsx(r,{label:"Status",value:e.jsx(m,{listType:"batches",filterType:"statuses",filterValue:s.status,children:s.status.toUpperCase()})}),e.jsx(r,{label:"Progress",value:e.jsxs("div",{children:[e.jsxs("div",{className:"text-sm font-mono",children:[x," / ",d," (",i,"%)"]}),e.jsx("div",{className:"mt-2 w-full bg-gray-200 dark:bg-gray-700 rounded-full h-2",children:e.jsx("div",{className:"bg-blue-600 dark:bg-blue-500 h-2 rounded-full transition-all",style:{width:`${i}%`}})})]})}),l>0&&e.jsx(r,{label:"Failed Items",value:e.jsx("span",{className:"text-red-600 dark:text-red-400 font-mono",children:l})}),e.jsx(r,{label:"Duration",value:`${s.duration}ms`}),s.batchSize&&e.jsx(r,{label:"Batch Size",value:s.batchSize}),s.memory!==void 0&&e.jsx(r,{label:"Memory",value:h(s.memory)})]})})]}),s.errors&&s.errors.length>0&&e.jsxs("div",{className:"card border-red-200 dark:border-red-800",children:[e.jsx("div",{className:"px-4 py-3 border-b border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-900/20",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(j,{className:"h-5 w-5 text-red-500"}),e.jsxs("h2",{className:"text-lg font-semibold text-red-700 dark:text-red-400",children:["Errors (",s.errors.length,")"]})]})}),e.jsx("div",{className:"divide-y divide-red-200 dark:divide-red-800",children:s.errors.map((b,N)=>e.jsx("div",{className:"p-4 bg-red-50/50 dark:bg-red-900/10",children:e.jsx("pre",{className:"text-sm text-red-600 dark:text-red-400 font-mono whitespace-pre-wrap overflow-x-auto",children:b})},N))})]})]})}export{E as default};
@@ -1 +1 @@
1
- import{j as t,L as c}from"./index-CNTaNUkj.js";import{e as B,b as D}from"./vendor-DBTT3jXp.js";import{f as T,p as A}from"./date-Dwgqy666.js";import{u as L,a as I,P as $,R as H,N as S,L as W}from"./PageHeader-Dhs9cPza.js";import{u as q,q as O,C as h}from"./types-DqF5HlZi.js";import{T as s,D as U,b as z}from"./DataTable-CCXj8zzB.js";import"./timer-CDc7JIAB.js";function Z(){const u=B(),{addFilter:o,clearAll:p,serverFilters:x,headerFilters:m}=q("batches"),{rangeFilters:g,windowMinutes:y}=L(),{entries:f,loading:j,refreshing:i,error:b,refresh:d,newEntriesCount:C,hasMore:k,loadMore:w,loadNew:N,autoRefreshEnabled:E,live:v,setAutoRefresh:R,meta:n,isHighlighted:F}=I({type:"batch",limit:50,filters:{...x,...g},windowMinutes:y}),l=f.filter(e=>O(e)),M=D.useMemo(()=>[{key:"name",header:"Name",minWidth:"200px",render:e=>t.jsx(s,{mono:!0,truncate:!0,maxWidth:"250px",children:e.payload.name})},{key:"operation",header:"Operation",width:"150px",render:e=>{const a=e.payload.operation;return a?t.jsx(h,{onClick:r=>{r.stopPropagation(),o("operations",a)},children:a}):t.jsx(s,{secondary:!0,children:"-"})}},{key:"progress",header:"Progress",width:"150px",render:e=>{const{processedItems:a,totalItems:r}=e.payload,P=r>0?Math.round(a/r*100):0;return t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(s,{children:`${a}/${r}`}),t.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:["(",P,"%)"]})]})}},{key:"status",header:"Status",width:"120px",render:e=>t.jsx(h,{onClick:a=>{a.stopPropagation(),o("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>e.payload.duration?t.jsx(U,{ms:e.payload.duration}):t.jsx(s,{secondary:!0,children:"-"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(s,{secondary:!0,className:"text-xs",children:T(A(e.createdAt),{addSuffix:!0})})}],[o]);return j&&l.length===0?t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):t.jsxs("div",{children:[t.jsx($,{title:"Batches",icon:c,iconColor:"text-blue-600 dark:text-blue-400",count:l.length,totalCount:n==null?void 0:n.total,clearable:{type:"batch",label:"batches",onCleared:d},refreshing:i,autoRefreshEnabled:E,live:v,onAutoRefreshToggle:R,filters:m,filterControls:t.jsx(H,{route:"batches"}),onClearAllFilters:p}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(S,{count:C,onClick:N,loading:i}),t.jsx(z,{columns:M,data:l,keyExtractor:e=>e.id,onRowClick:e=>u(`/batches/${e.id}`),rowClassName:e=>F(e.id)?"highlight-new":"",emptyMessage:"No batch operations recorded yet",error:b,onRetry:d,emptyIcon:t.jsx(c,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(W,{hasMore:k,onClick:w,loading:i})]})]})}export{Z as default};
1
+ import{j as t,L as c}from"./index-BaD1MX7a.js";import{e as B,b as D}from"./vendor-DBTT3jXp.js";import{f as T,p as A}from"./date-Dwgqy666.js";import{u as L,a as I,P as $,R as H,N as S,L as W}from"./PageHeader-Tnp0JBDF.js";import{u as q,q as O,C as h}from"./types-BHYinjn2.js";import{T as s,D as U,b as z}from"./DataTable-CIlMLJo4.js";import"./timer-D72f3hG4.js";function Z(){const u=B(),{addFilter:o,clearAll:p,serverFilters:x,headerFilters:m}=q("batches"),{rangeFilters:g,windowMinutes:y}=L(),{entries:f,loading:j,refreshing:i,error:b,refresh:d,newEntriesCount:C,hasMore:k,loadMore:w,loadNew:N,autoRefreshEnabled:E,live:v,setAutoRefresh:R,meta:n,isHighlighted:F}=I({type:"batch",limit:50,filters:{...x,...g},windowMinutes:y}),l=f.filter(e=>O(e)),M=D.useMemo(()=>[{key:"name",header:"Name",minWidth:"200px",render:e=>t.jsx(s,{mono:!0,truncate:!0,maxWidth:"250px",children:e.payload.name})},{key:"operation",header:"Operation",width:"150px",render:e=>{const a=e.payload.operation;return a?t.jsx(h,{onClick:r=>{r.stopPropagation(),o("operations",a)},children:a}):t.jsx(s,{secondary:!0,children:"-"})}},{key:"progress",header:"Progress",width:"150px",render:e=>{const{processedItems:a,totalItems:r}=e.payload,P=r>0?Math.round(a/r*100):0;return t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(s,{children:`${a}/${r}`}),t.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:["(",P,"%)"]})]})}},{key:"status",header:"Status",width:"120px",render:e=>t.jsx(h,{onClick:a=>{a.stopPropagation(),o("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>e.payload.duration?t.jsx(U,{ms:e.payload.duration}):t.jsx(s,{secondary:!0,children:"-"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(s,{secondary:!0,className:"text-xs",children:T(A(e.createdAt),{addSuffix:!0})})}],[o]);return j&&l.length===0?t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):t.jsxs("div",{children:[t.jsx($,{title:"Batches",icon:c,iconColor:"text-blue-600 dark:text-blue-400",count:l.length,totalCount:n==null?void 0:n.total,clearable:{type:"batch",label:"batches",onCleared:d},refreshing:i,autoRefreshEnabled:E,live:v,onAutoRefreshToggle:R,filters:m,filterControls:t.jsx(H,{route:"batches"}),onClearAllFilters:p}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(S,{count:C,onClick:N,loading:i}),t.jsx(z,{columns:M,data:l,keyExtractor:e=>e.id,onRowClick:e=>u(`/batches/${e.id}`),rowClassName:e=>F(e.id)?"highlight-new":"",emptyMessage:"No batch operations recorded yet",error:b,onRetry:d,emptyIcon:t.jsx(c,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(W,{hasMore:k,onClick:w,loading:i})]})]})}export{Z as default};
@@ -1,6 +1,6 @@
1
- import{c as h,j as e,D as d,C as g}from"./index-CNTaNUkj.js";import{p as o,f as p}from"./date-Dwgqy666.js";import{D as t,f as b}from"./DetailRow-C35E-Fg7.js";import{C as x}from"./types-DqF5HlZi.js";import{u as j,C as y,T as f}from"./EntryDetailPage-C63KztnI.js";import{C as u}from"./CopyButton-DpZHVixQ.js";import{C as N}from"./circle-check-big-Br_lvQdJ.js";import{C as v}from"./circle-x-DFyAuyMN.js";import{T as k}from"./timer-CDc7JIAB.js";import"./vendor-DBTT3jXp.js";import"./search-CcMiea1V.js";/**
1
+ import{c as h,j as e,D as d,C as g}from"./index-BaD1MX7a.js";import{p as o,f as p}from"./date-Dwgqy666.js";import{D as t,f as b}from"./DetailRow-BC_kcJT3.js";import{C as x}from"./types-BHYinjn2.js";import{u as j,C as y,T as f}from"./EntryDetailPage-DUWwJ_hP.js";import{C as u}from"./CopyButton-DaF0vYeo.js";import{C as N}from"./circle-check-big-DZttXeD-.js";import{C as v}from"./circle-x-CioeSSBA.js";import{T as k}from"./timer-D72f3hG4.js";import"./vendor-DBTT3jXp.js";import"./search-BtkJjUPF.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const T=h("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]),n={get:{label:"GET",color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30"},set:{label:"SET",color:"text-blue-500",bg:"bg-blue-100 dark:bg-blue-900/30"},del:{label:"DELETE",color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30"},clear:{label:"CLEAR",color:"text-orange-500",bg:"bg-orange-100 dark:bg-orange-900/30"}};function m(s){return s<60?`${s}s`:s<3600?`${Math.floor(s/60)}m`:s<86400?`${Math.floor(s/3600)}h`:`${Math.floor(s/86400)}d`}function K({entry:s}){const{payload:a,createdAt:i}=s,l=j(),r=n[a.operation]||n.get,c=a.value!==void 0?[{id:"value",label:"Value",content:e.jsx(y,{data:a.value,toolbarState:l.state,searchBar:l.SearchBar,maxHeight:400})}]:[];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:`p-2 ${r.bg} rounded-lg`,children:e.jsx(d,{className:`h-5 w-5 ${r.color}`})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:r.label}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Cache Operation"})]})]}),e.jsx(u,{text:a.key,label:"Copy cache key"})]})}),e.jsxs("div",{className:`grid ${a.operation==="get"?"grid-cols-2 md:grid-cols-4":"grid-cols-2 md:grid-cols-3"} divide-x divide-gray-200 dark:divide-gray-700`,children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(d,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Operation"})]}),e.jsx("p",{className:`text-lg font-bold ${r.color}`,children:r.label})]}),a.operation==="get"&&e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[a.hit?e.jsx(N,{className:"h-4 w-4"}):e.jsx(v,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Result"})]}),e.jsx("p",{className:`text-lg font-bold ${a.hit?"text-green-600 dark:text-green-400":"text-gray-500 dark:text-gray-400"}`,children:a.hit?"HIT":"MISS"})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(g,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[a.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]}),a.ttl!==void 0&&e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(k,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"TTL"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:m(a.ttl)})]})]})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(t,{label:"Time",value:e.jsxs("span",{children:[b(o(i),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",p(o(i),{addSuffix:!0}),")"]})]})}),e.jsx(t,{label:"Operation",value:e.jsx(x,{listType:"cache",filterType:"operations",filterValue:a.operation,children:a.operation.toUpperCase()})}),e.jsx(t,{label:"Key",value:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(T,{className:"h-4 w-4 text-gray-400 flex-shrink-0"}),e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white break-all",children:a.key})]})}),a.operation==="get"&&e.jsx(t,{label:"Result",value:e.jsx(x,{listType:"cache",filterType:"tags",filterValue:a.hit?"hit":"miss",children:a.hit?"HIT":"MISS"})}),e.jsx(t,{label:"Duration",value:`${a.duration}ms`}),a.ttl!==void 0&&e.jsx(t,{label:"TTL",value:`${a.ttl}s (${m(a.ttl)})`})]})})]}),c.length>0&&e.jsx(f,{tabs:c,defaultTab:"value",hashKey:"cache",headerRight:e.jsx(l.Toolbar,{data:a.value})})]})}export{K as default};
6
+ */const T=h("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]),n={get:{label:"GET",color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30"},set:{label:"SET",color:"text-blue-500",bg:"bg-blue-100 dark:bg-blue-900/30"},del:{label:"DELETE",color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30"},clear:{label:"CLEAR",color:"text-orange-500",bg:"bg-orange-100 dark:bg-orange-900/30"}};function m(s){return s<60?`${s}s`:s<3600?`${Math.floor(s/60)}m`:s<86400?`${Math.floor(s/3600)}h`:`${Math.floor(s/86400)}d`}function K({entry:s}){const{payload:a,createdAt:i}=s,l=j(),r=n[a.operation]||n.get,c=a.value!==void 0?[{id:"value",label:"Value",content:e.jsx(y,{data:a.value,toolbarState:l.state,searchBar:l.SearchBar,maxHeight:400})}]:[];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:`p-2 ${r.bg} rounded-lg`,children:e.jsx(d,{className:`h-5 w-5 ${r.color}`})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:r.label}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Cache Operation"})]})]}),e.jsx(u,{text:a.key,label:"Copy cache key"})]})}),e.jsxs("div",{className:`grid ${a.operation==="get"?"grid-cols-2 md:grid-cols-4":"grid-cols-2 md:grid-cols-3"} divide-x divide-gray-200 dark:divide-gray-700`,children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(d,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Operation"})]}),e.jsx("p",{className:`text-lg font-bold ${r.color}`,children:r.label})]}),a.operation==="get"&&e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[a.hit?e.jsx(N,{className:"h-4 w-4"}):e.jsx(v,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Result"})]}),e.jsx("p",{className:`text-lg font-bold ${a.hit?"text-green-600 dark:text-green-400":"text-gray-500 dark:text-gray-400"}`,children:a.hit?"HIT":"MISS"})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(g,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[a.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]}),a.ttl!==void 0&&e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(k,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"TTL"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:m(a.ttl)})]})]})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"*:not-first:border-y-0",children:[e.jsx(t,{label:"Time",value:e.jsxs("span",{children:[b(o(i),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",p(o(i),{addSuffix:!0}),")"]})]})}),e.jsx(t,{label:"Operation",value:e.jsx(x,{listType:"cache",filterType:"operations",filterValue:a.operation,children:a.operation.toUpperCase()})}),e.jsx(t,{label:"Key",value:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(T,{className:"h-4 w-4 text-gray-400 shrink-0"}),e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white break-all",children:a.key})]})}),a.operation==="get"&&e.jsx(t,{label:"Result",value:e.jsx(x,{listType:"cache",filterType:"tags",filterValue:a.hit?"hit":"miss",children:a.hit?"HIT":"MISS"})}),e.jsx(t,{label:"Duration",value:`${a.duration}ms`}),a.ttl!==void 0&&e.jsx(t,{label:"TTL",value:`${a.ttl}s (${m(a.ttl)})`})]})})]}),c.length>0&&e.jsx(f,{tabs:c,defaultTab:"value",hashKey:"cache",headerRight:e.jsx(l.Toolbar,{data:a.value})})]})}export{K as default};
@@ -1 +1 @@
1
- import{j as a,H as l}from"./index-CNTaNUkj.js";import{e as R,b as v}from"./vendor-DBTT3jXp.js";import{f as D,p as F}from"./date-Dwgqy666.js";import{u as M,a as A,P as H,R as P,N as B,L as I}from"./PageHeader-Dhs9cPza.js";import{u as L,f as S,C as n}from"./types-DqF5HlZi.js";import{T as i,D as W,b as K}from"./DataTable-CCXj8zzB.js";import"./timer-CDc7JIAB.js";function Q(){const d=R(),{clearAll:c,serverFilters:h,headerFilters:u}=L("cache"),{rangeFilters:p,windowMinutes:x}=M(),{entries:m,loading:y,refreshing:t,error:g,refresh:o,newEntriesCount:f,hasMore:j,loadMore:C,loadNew:k,autoRefreshEnabled:w,live:b,setAutoRefresh:N,meta:r,isHighlighted:T}=A({type:"cache",limit:50,filters:{...h,...p},windowMinutes:x}),s=m.filter(e=>S(e)),E=v.useMemo(()=>[{key:"operation",header:"Operation",width:"100px",render:e=>a.jsx(n,{listType:"cache",filterType:"operations",children:e.payload.operation})},{key:"key",header:"Key",minWidth:"200px",render:e=>a.jsx(i,{mono:!0,truncate:!0,maxWidth:"400px",children:e.payload.key.length>50?e.payload.key.substring(0,50)+"...":e.payload.key})},{key:"result",header:"Result",width:"80px",align:"center",render:e=>e.payload.operation==="get"?a.jsx(n,{listType:"cache",filterType:"tags",filterValue:e.payload.hit?"hit":"miss",children:e.payload.hit?"HIT":"MISS"}):a.jsx(i,{secondary:!0,children:"—"})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>a.jsx(W,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>a.jsx(i,{secondary:!0,className:"text-xs",children:D(F(e.createdAt),{addSuffix:!0})})}],[]);return y&&s.length===0?a.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):a.jsxs("div",{children:[a.jsx(H,{title:"Cache",icon:l,iconColor:"text-cyan-600 dark:text-cyan-400",count:s.length,totalCount:r==null?void 0:r.total,clearable:{type:"cache",label:"cache",onCleared:o},refreshing:t,autoRefreshEnabled:w,live:b,onAutoRefreshToggle:N,filters:u,filterControls:a.jsx(P,{route:"cache"}),onClearAllFilters:c}),a.jsxs("div",{className:"space-y-4",children:[a.jsx(B,{count:f,onClick:k,loading:t}),a.jsx(K,{columns:E,data:s,keyExtractor:e=>e.id,onRowClick:e=>d(`/cache/${e.id}`),rowClassName:e=>T(e.id)?"highlight-new":"",emptyMessage:"No cache operations recorded yet",error:g,onRetry:o,emptyIcon:a.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(I,{hasMore:j,onClick:C,loading:t})]})]})}export{Q as default};
1
+ import{j as a,H as l}from"./index-BaD1MX7a.js";import{e as R,b as v}from"./vendor-DBTT3jXp.js";import{f as D,p as F}from"./date-Dwgqy666.js";import{u as M,a as A,P as H,R as P,N as B,L as I}from"./PageHeader-Tnp0JBDF.js";import{u as L,f as S,C as n}from"./types-BHYinjn2.js";import{T as i,D as W,b as K}from"./DataTable-CIlMLJo4.js";import"./timer-D72f3hG4.js";function Q(){const d=R(),{clearAll:c,serverFilters:h,headerFilters:u}=L("cache"),{rangeFilters:p,windowMinutes:x}=M(),{entries:m,loading:y,refreshing:t,error:g,refresh:o,newEntriesCount:f,hasMore:j,loadMore:C,loadNew:k,autoRefreshEnabled:w,live:b,setAutoRefresh:N,meta:r,isHighlighted:T}=A({type:"cache",limit:50,filters:{...h,...p},windowMinutes:x}),s=m.filter(e=>S(e)),E=v.useMemo(()=>[{key:"operation",header:"Operation",width:"100px",render:e=>a.jsx(n,{listType:"cache",filterType:"operations",children:e.payload.operation})},{key:"key",header:"Key",minWidth:"200px",render:e=>a.jsx(i,{mono:!0,truncate:!0,maxWidth:"400px",children:e.payload.key.length>50?e.payload.key.substring(0,50)+"...":e.payload.key})},{key:"result",header:"Result",width:"80px",align:"center",render:e=>e.payload.operation==="get"?a.jsx(n,{listType:"cache",filterType:"tags",filterValue:e.payload.hit?"hit":"miss",children:e.payload.hit?"HIT":"MISS"}):a.jsx(i,{secondary:!0,children:"—"})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>a.jsx(W,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>a.jsx(i,{secondary:!0,className:"text-xs",children:D(F(e.createdAt),{addSuffix:!0})})}],[]);return y&&s.length===0?a.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):a.jsxs("div",{children:[a.jsx(H,{title:"Cache",icon:l,iconColor:"text-cyan-600 dark:text-cyan-400",count:s.length,totalCount:r==null?void 0:r.total,clearable:{type:"cache",label:"cache",onCleared:o},refreshing:t,autoRefreshEnabled:w,live:b,onAutoRefreshToggle:N,filters:u,filterControls:a.jsx(P,{route:"cache"}),onClearAllFilters:c}),a.jsxs("div",{className:"space-y-4",children:[a.jsx(B,{count:f,onClick:k,loading:t}),a.jsx(K,{columns:E,data:s,keyExtractor:e=>e.id,onRowClick:e=>d(`/cache/${e.id}`),rowClassName:e=>T(e.id)?"highlight-new":"",emptyMessage:"No cache operations recorded yet",error:g,onRetry:o,emptyIcon:a.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(I,{hasMore:j,onClick:C,loading:t})]})]})}export{Q as default};
@@ -1 +1 @@
1
- import{j as e,b as m,C as p}from"./index-CNTaNUkj.js";import{b as v}from"./vendor-DBTT3jXp.js";import{p as h,f as N}from"./date-Dwgqy666.js";import{D as t,f as k}from"./DetailRow-C35E-Fg7.js";import{C as b}from"./types-DqF5HlZi.js";import{u as c,C as n,T as C}from"./EntryDetailPage-C63KztnI.js";import{C as T}from"./CopyButton-DpZHVixQ.js";import{C as w}from"./circle-check-big-Br_lvQdJ.js";import{C as g}from"./circle-x-DFyAuyMN.js";import"./search-CcMiea1V.js";function I({entry:u}){const{payload:a,createdAt:x}=u,d=c(),l=c(),o=c(),[i,j]=v.useState("payload"),r=a.status==="completed"?{icon:w,color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30"}:a.status==="executing"?{icon:p,color:"text-blue-500",bg:"bg-blue-100 dark:bg-blue-900/30"}:{icon:g,color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30"},y=r.icon,s=[];a.payload!==void 0&&s.push({id:"payload",label:"Payload",content:e.jsx(n,{data:a.payload,toolbarState:d.state,searchBar:d.SearchBar,maxHeight:400})}),a.result!==void 0&&s.push({id:"result",label:"Result",content:e.jsx(n,{data:a.result,toolbarState:l.state,searchBar:l.SearchBar,maxHeight:400})}),a.metadata!==void 0&&s.push({id:"metadata",label:"Metadata",content:e.jsx(n,{data:a.metadata,toolbarState:o.state,searchBar:o.SearchBar,maxHeight:400})});const f=()=>{if(i==="payload"&&a.payload!==void 0)return e.jsx(d.Toolbar,{data:a.payload});if(i==="result"&&a.result!==void 0)return e.jsx(l.Toolbar,{data:a.result});if(i==="metadata"&&a.metadata!==void 0)return e.jsx(o.Toolbar,{data:a.metadata})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:`p-2 ${r.bg} rounded-lg`,children:e.jsx(m,{className:`h-5 w-5 ${r.color}`})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white font-mono",children:a.name}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Command Execution"})]})]}),e.jsx(T,{text:a.name,label:"Copy command"})]})}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 divide-x divide-gray-200 dark:divide-gray-700",children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(m,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Command"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white font-mono truncate",title:a.name,children:a.name})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(y,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Status"})]}),e.jsx("p",{className:`text-lg font-bold ${r.color}`,children:a.status.toUpperCase()})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(p,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[a.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]})]})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(t,{label:"Time",value:e.jsxs("span",{children:[k(h(x),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",N(h(x),{addSuffix:!0}),")"]})]})}),e.jsx(t,{label:"Command",value:e.jsx(b,{listType:"commands",filterType:"names",filterValue:a.name,children:a.name})}),a.handler&&e.jsx(t,{label:"Handler",value:e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white",children:a.handler})}),e.jsx(t,{label:"Status",value:e.jsx(b,{listType:"commands",filterType:"statuses",filterValue:a.status,children:a.status.toUpperCase()})}),e.jsx(t,{label:"Duration",value:a.duration!==void 0?`${a.duration}ms`:"-"})]})})]}),a.error&&e.jsxs("div",{className:"card border-red-200 dark:border-red-800",children:[e.jsx("div",{className:"px-4 py-3 border-b border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-900/20",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(g,{className:"h-5 w-5 text-red-500"}),e.jsx("h2",{className:"text-lg font-semibold text-red-700 dark:text-red-400",children:"Error"})]})}),e.jsx("div",{className:"p-4 bg-red-50/50 dark:bg-red-900/10",children:e.jsx("pre",{className:"text-sm text-red-600 dark:text-red-400 font-mono whitespace-pre-wrap overflow-x-auto",children:a.error})})]}),s.length>0&&e.jsx(C,{tabs:s,defaultTab:"payload",hashKey:"command",headerRight:f(),onTabChange:j})]})}export{I as default};
1
+ import{j as e,b as m,C as p}from"./index-BaD1MX7a.js";import{b as N}from"./vendor-DBTT3jXp.js";import{p as h,f as v}from"./date-Dwgqy666.js";import{D as t,f as k}from"./DetailRow-BC_kcJT3.js";import{C as b}from"./types-BHYinjn2.js";import{u as c,C as n,T as C}from"./EntryDetailPage-DUWwJ_hP.js";import{C as T}from"./CopyButton-DaF0vYeo.js";import{C as w}from"./circle-check-big-DZttXeD-.js";import{C as g}from"./circle-x-CioeSSBA.js";import"./search-BtkJjUPF.js";function I({entry:u}){const{payload:a,createdAt:x}=u,d=c(),l=c(),o=c(),[i,j]=N.useState("payload"),r=a.status==="completed"?{icon:w,color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30"}:a.status==="executing"?{icon:p,color:"text-blue-500",bg:"bg-blue-100 dark:bg-blue-900/30"}:{icon:g,color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30"},y=r.icon,s=[];a.payload!==void 0&&s.push({id:"payload",label:"Payload",content:e.jsx(n,{data:a.payload,toolbarState:d.state,searchBar:d.SearchBar,maxHeight:400})}),a.result!==void 0&&s.push({id:"result",label:"Result",content:e.jsx(n,{data:a.result,toolbarState:l.state,searchBar:l.SearchBar,maxHeight:400})}),a.metadata!==void 0&&s.push({id:"metadata",label:"Metadata",content:e.jsx(n,{data:a.metadata,toolbarState:o.state,searchBar:o.SearchBar,maxHeight:400})});const f=()=>{if(i==="payload"&&a.payload!==void 0)return e.jsx(d.Toolbar,{data:a.payload});if(i==="result"&&a.result!==void 0)return e.jsx(l.Toolbar,{data:a.result});if(i==="metadata"&&a.metadata!==void 0)return e.jsx(o.Toolbar,{data:a.metadata})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:`p-2 ${r.bg} rounded-lg`,children:e.jsx(m,{className:`h-5 w-5 ${r.color}`})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white font-mono",children:a.name}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Command Execution"})]})]}),e.jsx(T,{text:a.name,label:"Copy command"})]})}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 divide-x divide-gray-200 dark:divide-gray-700",children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(m,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Command"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white font-mono truncate",title:a.name,children:a.name})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(y,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Status"})]}),e.jsx("p",{className:`text-lg font-bold ${r.color}`,children:a.status.toUpperCase()})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(p,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[a.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]})]})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"*:not-first:border-y-0",children:[e.jsx(t,{label:"Time",value:e.jsxs("span",{children:[k(h(x),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",v(h(x),{addSuffix:!0}),")"]})]})}),e.jsx(t,{label:"Command",value:e.jsx(b,{listType:"commands",filterType:"names",filterValue:a.name,children:a.name})}),a.handler&&e.jsx(t,{label:"Handler",value:e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white",children:a.handler})}),e.jsx(t,{label:"Status",value:e.jsx(b,{listType:"commands",filterType:"statuses",filterValue:a.status,children:a.status.toUpperCase()})}),e.jsx(t,{label:"Duration",value:a.duration!==void 0?`${a.duration}ms`:"-"})]})})]}),a.error&&e.jsxs("div",{className:"card border-red-200 dark:border-red-800",children:[e.jsx("div",{className:"px-4 py-3 border-b border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-900/20",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(g,{className:"h-5 w-5 text-red-500"}),e.jsx("h2",{className:"text-lg font-semibold text-red-700 dark:text-red-400",children:"Error"})]})}),e.jsx("div",{className:"p-4 bg-red-50/50 dark:bg-red-900/10",children:e.jsx("pre",{className:"text-sm text-red-600 dark:text-red-400 font-mono whitespace-pre-wrap overflow-x-auto",children:a.error})})]}),s.length>0&&e.jsx(C,{tabs:s,defaultTab:"payload",hashKey:"command",headerRight:f(),onTabChange:j})]})}export{I as default};
@@ -1 +1 @@
1
- import{j as a,b as d}from"./index-CNTaNUkj.js";import{e as T,b as D}from"./vendor-DBTT3jXp.js";import{f as M,p as P}from"./date-Dwgqy666.js";import{u as A,a as B,P as H,R as L,N as W,L as S}from"./PageHeader-Dhs9cPza.js";import{u as I,o as U,C as m}from"./types-DqF5HlZi.js";import{T as i,D as $,b as q}from"./DataTable-CCXj8zzB.js";import"./timer-CDc7JIAB.js";function X(){const c=T(),{addFilter:t,clearAll:u,serverFilters:h,headerFilters:p}=I("commands"),{rangeFilters:x,windowMinutes:g}=A(),{entries:f,loading:y,refreshing:r,error:C,refresh:l,newEntriesCount:j,hasMore:k,loadMore:w,loadNew:b,autoRefreshEnabled:N,live:E,setAutoRefresh:R,meta:s,isHighlighted:v}=B({type:"command",limit:50,filters:{...h,...x},windowMinutes:g}),o=f.filter(e=>U(e)),F=D.useMemo(()=>[{key:"name",header:"Command",minWidth:"250px",render:e=>a.jsx(m,{onClick:n=>{n.stopPropagation(),t("names",e.payload.name)},className:"font-mono",children:e.payload.name})},{key:"handler",header:"Handler",minWidth:"200px",render:e=>e.payload.handler?a.jsx(i,{mono:!0,truncate:!0,maxWidth:"250px",children:e.payload.handler}):a.jsx(i,{secondary:!0,children:"-"})},{key:"status",header:"Status",width:"100px",render:e=>a.jsx(m,{onClick:n=>{n.stopPropagation(),t("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>a.jsx($,{ms:e.payload.duration??0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>a.jsx(i,{secondary:!0,className:"text-xs",children:M(P(e.createdAt),{addSuffix:!0})})}],[t]);return y&&o.length===0?a.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):a.jsxs("div",{children:[a.jsx(H,{title:"Commands",icon:d,iconColor:"text-green-600 dark:text-green-400",count:o.length,totalCount:s==null?void 0:s.total,clearable:{type:"command",label:"commands",onCleared:l},refreshing:r,autoRefreshEnabled:N,live:E,onAutoRefreshToggle:R,filters:p,filterControls:a.jsx(L,{route:"commands"}),onClearAllFilters:u}),a.jsxs("div",{className:"space-y-4",children:[a.jsx(W,{count:j,onClick:b,loading:r}),a.jsx(q,{columns:F,data:o,keyExtractor:e=>e.id,onRowClick:e=>c(`/commands/${e.id}`),rowClassName:e=>v(e.id)?"highlight-new":"",emptyMessage:"No commands recorded yet",error:C,onRetry:l,emptyIcon:a.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(S,{hasMore:k,onClick:w,loading:r})]})]})}export{X as default};
1
+ import{j as a,b as d}from"./index-BaD1MX7a.js";import{e as T,b as D}from"./vendor-DBTT3jXp.js";import{f as M,p as P}from"./date-Dwgqy666.js";import{u as A,a as B,P as H,R as L,N as W,L as S}from"./PageHeader-Tnp0JBDF.js";import{u as I,o as U,C as m}from"./types-BHYinjn2.js";import{T as i,D as $,b as q}from"./DataTable-CIlMLJo4.js";import"./timer-D72f3hG4.js";function X(){const c=T(),{addFilter:t,clearAll:u,serverFilters:h,headerFilters:p}=I("commands"),{rangeFilters:x,windowMinutes:g}=A(),{entries:f,loading:y,refreshing:r,error:C,refresh:l,newEntriesCount:j,hasMore:k,loadMore:w,loadNew:b,autoRefreshEnabled:N,live:E,setAutoRefresh:R,meta:s,isHighlighted:v}=B({type:"command",limit:50,filters:{...h,...x},windowMinutes:g}),o=f.filter(e=>U(e)),F=D.useMemo(()=>[{key:"name",header:"Command",minWidth:"250px",render:e=>a.jsx(m,{onClick:n=>{n.stopPropagation(),t("names",e.payload.name)},className:"font-mono",children:e.payload.name})},{key:"handler",header:"Handler",minWidth:"200px",render:e=>e.payload.handler?a.jsx(i,{mono:!0,truncate:!0,maxWidth:"250px",children:e.payload.handler}):a.jsx(i,{secondary:!0,children:"-"})},{key:"status",header:"Status",width:"100px",render:e=>a.jsx(m,{onClick:n=>{n.stopPropagation(),t("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>a.jsx($,{ms:e.payload.duration??0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>a.jsx(i,{secondary:!0,className:"text-xs",children:M(P(e.createdAt),{addSuffix:!0})})}],[t]);return y&&o.length===0?a.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):a.jsxs("div",{children:[a.jsx(H,{title:"Commands",icon:d,iconColor:"text-green-600 dark:text-green-400",count:o.length,totalCount:s==null?void 0:s.total,clearable:{type:"command",label:"commands",onCleared:l},refreshing:r,autoRefreshEnabled:N,live:E,onAutoRefreshToggle:R,filters:p,filterControls:a.jsx(L,{route:"commands"}),onClearAllFilters:u}),a.jsxs("div",{className:"space-y-4",children:[a.jsx(W,{count:j,onClick:b,loading:r}),a.jsx(q,{columns:F,data:o,keyExtractor:e=>e.id,onRowClick:e=>c(`/commands/${e.id}`),rowClassName:e=>v(e.id)?"highlight-new":"",emptyMessage:"No commands recorded yet",error:C,onRetry:l,emptyIcon:a.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(S,{hasMore:k,onClick:w,loading:r})]})]})}export{X as default};
@@ -1,3 +1,3 @@
1
- import{j as e,z as n}from"./index-CNTaNUkj.js";import{b as p}from"./vendor-DBTT3jXp.js";import{a as i,b as c}from"./EntryDetailPage-C63KztnI.js";function y({text:l,label:r="Copy",successMessage:x="Copied to clipboard!",className:t="",iconOnly:d=!1}){const[s,a]=p.useState(!1),o=async()=>{try{await navigator.clipboard.writeText(l),a(!0),n.success(x),setTimeout(()=>a(!1),2e3)}catch{n.error("Failed to copy")}};return d?e.jsx("button",{onClick:o,className:`p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors ${t}`,title:r,children:s?e.jsx(i,{className:"h-4 w-4 text-green-500"}):e.jsx(c,{className:"h-4 w-4 text-gray-500"})}):e.jsx("button",{onClick:o,className:`inline-flex items-center space-x-2 px-3 py-1.5 text-sm font-medium rounded-lg
1
+ import{j as e,z as n}from"./index-BaD1MX7a.js";import{b as p}from"./vendor-DBTT3jXp.js";import{a as i,b as c}from"./EntryDetailPage-DUWwJ_hP.js";function y({text:l,label:r="Copy",successMessage:x="Copied to clipboard!",className:t="",iconOnly:d=!1}){const[s,a]=p.useState(!1),o=async()=>{try{await navigator.clipboard.writeText(l),a(!0),n.success(x),setTimeout(()=>a(!1),2e3)}catch{n.error("Failed to copy")}};return d?e.jsx("button",{onClick:o,className:`p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors ${t}`,title:r,children:s?e.jsx(i,{className:"h-4 w-4 text-green-500"}):e.jsx(c,{className:"h-4 w-4 text-gray-500"})}):e.jsx("button",{onClick:o,className:`inline-flex items-center space-x-2 px-3 py-1.5 text-sm font-medium rounded-lg
2
2
  bg-gray-100 hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600
3
3
  text-gray-700 dark:text-gray-300 transition-colors ${t}`,children:s?e.jsxs(e.Fragment,{children:[e.jsx(i,{className:"h-4 w-4 text-green-500"}),e.jsx("span",{children:"Copied!"})]}):e.jsxs(e.Fragment,{children:[e.jsx(c,{className:"h-4 w-4"}),e.jsx("span",{children:r})]})})}export{y as C};
@@ -0,0 +1,21 @@
1
+ import{c as $,g as pe,j as e,X as he,a as be,z as j,r as fe,u as ke,T as v,D as oe,C as I,A as G,G as ve,F as je,B as Ne,P as we,b as Ee,H,d as Ce,L as Se,e as Te,M as $e,f as qe,R as Pe,h as Me,S as Le,i as X,k as Y,l as Re,m as ee,n as te,o as Ae,p as ae}from"./index-BaD1MX7a.js";import{b as c,e as De,L as Be}from"./vendor-DBTT3jXp.js";import{g as ie,f as C,p as S}from"./date-Dwgqy666.js";import{E as Ie}from"./eye-CwQoBjXn.js";import{Z as Fe}from"./zap-Cx84VGgd.js";import{C as Ge}from"./calendar-DCypCI0I.js";/**
2
+ * @license lucide-react v0.468.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const He=$("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
7
+ * @license lucide-react v0.468.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const ze=$("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
12
+ * @license lucide-react v0.468.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const Qe=$("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/**
17
+ * @license lucide-react v0.468.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const Ke=$("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);function Oe(){const[o,t]=c.useState([]),[g,l]=c.useState(!1),[d,m]=c.useState(""),[s,h]=c.useState(null),u=c.useCallback(async()=>{try{const n=await pe();t(n.data.map(({tag:x,count:k})=>({tag:x,count:k}))),h(null)}catch(n){h(n instanceof Error?n:new Error("Failed to load monitored tags"))}},[]);c.useEffect(()=>{const n=setTimeout(()=>void u(),0);return()=>clearTimeout(n)},[u]);const b=async()=>{const n=d.trim();if(n)try{await be(n),m(""),l(!1),await u(),j.success(`Keeping entries tagged ${n.toUpperCase()}`)}catch(x){j.error(`Could not monitor that tag: ${x instanceof Error?x.message:String(x)}`)}},q=async n=>{try{await fe(n),await u()}catch(x){j.error(`Could not stop monitoring: ${x instanceof Error?x.message:String(x)}`)}};return e.jsxs("div",{className:"pt-3 border-t border-gray-200 dark:border-gray-700","data-testid":"monitored-tags",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-gray-600 dark:text-gray-400",children:[e.jsx(Ie,{className:"h-4 w-4"}),e.jsx("span",{className:"text-sm",children:"Kept from pruning"})]}),!g&&e.jsx("button",{onClick:()=>l(!0),"aria-label":"Monitor a tag",className:"p-1 rounded-sm hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-500 focus:outline-hidden focus:ring-2 focus:ring-primary-500",children:e.jsx(ze,{className:"h-4 w-4"})})]}),s?e.jsxs("p",{className:"text-xs text-red-600 dark:text-red-400",role:"alert",children:[s.message,". This is not a list of nothing being kept."]}):e.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[o.length===0&&!g&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"No tag is monitored: everything is pruned by age."}),o.map(({tag:n,count:x})=>e.jsxs("span",{className:`inline-flex items-center rounded-sm px-1.5 py-0.5 text-xs font-bold uppercase tracking-wide shadow-sm ${ie(n)}`,children:[n,e.jsx("span",{className:"ml-1 font-normal opacity-80",children:x}),e.jsx("button",{onClick:()=>void q(n),"aria-label":`Stop monitoring ${n}`,className:"ml-1 hover:opacity-70 focus:outline-hidden focus:ring-2 focus:ring-primary-500 rounded-sm",children:e.jsx(he,{className:"h-3 w-3"})})]},n)),g&&e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx("input",{type:"text",value:d,onChange:n=>m(n.target.value),onKeyDown:n=>{n.key==="Enter"&&b(),n.key==="Escape"&&l(!1)},placeholder:"Tag to keep...","aria-label":"Tag to monitor",autoFocus:!0,className:"px-2 py-0.5 text-xs border rounded-sm dark:bg-gray-700 dark:border-gray-600 w-28 focus:outline-hidden focus:ring-2 focus:ring-primary-500"}),e.jsx("button",{onClick:()=>void b(),"aria-label":"Save monitored tag",className:"text-xs text-primary-600 dark:text-primary-400 focus:outline-hidden focus:ring-2 focus:ring-primary-500 rounded-sm",children:"✓"}),e.jsx("button",{onClick:()=>l(!1),"aria-label":"Cancel monitoring a tag",className:"text-xs text-gray-500 focus:outline-hidden focus:ring-2 focus:ring-primary-500 rounded-sm",children:"×"})]})]})]})}const le=[{name:"Core",types:[{key:"request",name:"Requests",icon:G,color:"blue",route:"/requests"},{key:"query",name:"Queries",icon:oe,color:"purple",route:"/queries"},{key:"graphql",name:"GraphQL",icon:ve,color:"fuchsia",route:"/graphql"},{key:"exception",name:"Exceptions",icon:v,color:"red",route:"/exceptions"},{key:"log",name:"Logs",icon:je,color:"green",route:"/logs"}]},{name:"Background",types:[{key:"job",name:"Jobs",icon:Ne,color:"yellow",route:"/jobs"},{key:"schedule",name:"Schedule",icon:Ge,color:"gray",route:"/schedule"},{key:"batch",name:"Batches",icon:we,color:"lime",route:"/batches"},{key:"command",name:"Commands",icon:Ee,color:"slate",route:"/commands"}]},{name:"Data",types:[{key:"cache",name:"Cache",icon:H,color:"cyan",route:"/cache"},{key:"redis",name:"Redis",icon:Ce,color:"rose",route:"/redis"},{key:"model",name:"Models",icon:Se,color:"violet",route:"/models"}]},{name:"Communication",types:[{key:"http-client",name:"HTTP Client",icon:Te,color:"indigo",route:"/http-client"},{key:"mail",name:"Mail",icon:$e,color:"pink",route:"/mail"},{key:"notification",name:"Notifications",icon:qe,color:"orange",route:"/notifications"},{key:"event",name:"Events",icon:Pe,color:"emerald",route:"/events"}]},{name:"System",types:[{key:"view",name:"Views",icon:Me,color:"teal",route:"/views"},{key:"gate",name:"Gates",icon:Le,color:"amber",route:"/gates"},{key:"dump",name:"Dumps",icon:H,color:"stone",route:"/dumps"}]}],re=le.flatMap(o=>o.types),se={request:"text-blue-500",query:"text-purple-500",graphql:"text-fuchsia-500",exception:"text-red-500",log:"text-green-500",event:"text-emerald-500",job:"text-yellow-500",cache:"text-cyan-500",mail:"text-pink-500",schedule:"text-gray-500","http-client":"text-indigo-500",redis:"text-rose-500",model:"text-violet-500",notification:"text-orange-500",view:"text-teal-500",command:"text-slate-500",gate:"text-amber-500",batch:"text-lime-500",dump:"text-stone-500"},Ue={request:"bg-blue-50 dark:bg-blue-900/20",query:"bg-purple-50 dark:bg-purple-900/20",graphql:"bg-fuchsia-50 dark:bg-fuchsia-900/20",exception:"bg-red-50 dark:bg-red-900/20",log:"bg-green-50 dark:bg-green-900/20",event:"bg-emerald-50 dark:bg-emerald-900/20",job:"bg-yellow-50 dark:bg-yellow-900/20",cache:"bg-cyan-50 dark:bg-cyan-900/20",mail:"bg-pink-50 dark:bg-pink-900/20",schedule:"bg-gray-50 dark:bg-gray-700/30","http-client":"bg-indigo-50 dark:bg-indigo-900/20",redis:"bg-rose-50 dark:bg-rose-900/20",model:"bg-violet-50 dark:bg-violet-900/20",notification:"bg-orange-50 dark:bg-orange-900/20",view:"bg-teal-50 dark:bg-teal-900/20",command:"bg-slate-50 dark:bg-slate-700/30",gate:"bg-amber-50 dark:bg-amber-900/20",batch:"bg-lime-50 dark:bg-lime-900/20",dump:"bg-stone-50 dark:bg-stone-700/30"};function Ze(o){if(o===0)return"0 B";const t=1024,g=["B","KB","MB","GB"],l=Math.floor(Math.log(o)/Math.log(t));return`${parseFloat((o/Math.pow(t,l)).toFixed(1))} ${g[l]}`}function ne(o){return o<1e3?`${Math.round(o)}ms`:`${(o/1e3).toFixed(2)}s`}function Je(o){const t=o.payload;switch(o.type){case"request":return`${t.method||"GET"} ${t.path||"/"}`;case"query":const g=t.query||"";return g.length>50?g.substring(0,50)+"...":g;case"exception":return t.name||"Exception";case"log":const l=t.message||"";return l.length>50?l.substring(0,50)+"...":l;case"event":return t.name||"Event";case"job":return t.name||"Job";case"cache":return`${(t.operation||"get").toUpperCase()} ${t.key||""}`;case"mail":return t.subject||"Mail";case"schedule":return t.name||"Task";default:return"Entry"}}function Ve(o){const t=o.payload;switch(o.type){case"request":const g=t.statusCode,l=t.duration;return g?`${g} · ${l?ne(l):""}`:null;case"query":const d=t.duration,m=t.slow;return`${d?ne(d):""} ${m?"· SLOW":""}`;case"exception":const s=t.message||"";return s.length>60?s.substring(0,60)+"...":s;case"log":return t.context||null;case"job":return t.queue||null;default:return null}}const F=5;function T({label:o,value:t,subtext:g,icon:l,trend:d,status:m="neutral",onClick:s}){const h={good:"text-emerald-500",warning:"text-amber-500",danger:"text-red-500",neutral:"text-gray-400 dark:text-gray-500"},u={good:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",warning:"bg-amber-100 dark:bg-amber-900/30 border-amber-300 dark:border-amber-700/50",danger:"bg-red-100 dark:bg-red-900/30 border-red-300 dark:border-red-700/50",neutral:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700"},b=s?"button":"div";return e.jsx(b,{onClick:s,className:`${u[m]} rounded-lg border p-4 ${s?"cursor-pointer hover:shadow-xs transition-all text-left w-full":""}`,children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider",children:o}),e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("p",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:typeof t=="number"?t.toLocaleString():t}),d&&e.jsx("span",{className:`flex items-center ${d==="up"?"text-emerald-500":"text-red-500"}`,children:d==="up"?e.jsx(Ke,{className:"h-3 w-3"}):e.jsx(Qe,{className:"h-3 w-3"})})]}),g&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:g})]}),e.jsx("div",{className:"p-2 rounded-lg bg-gray-100 dark:bg-gray-700/50",children:e.jsx(l,{className:`h-5 w-5 ${h[m]}`})})]})})}function at(){const o=De(),{stats:t,error:g,refreshStats:l}=ke(),[d,m]=c.useState(null),[s,h]=c.useState(null),[u,b]=c.useState(!1),[q,n]=c.useState(!0);c.useEffect(()=>{l()},[l]);const[x,k]=c.useState([]),[y,z]=c.useState(!1),[Q,P]=c.useState(1),[K,O]=c.useState(null),[U,de]=c.useState(0),[Z,M]=c.useState(!1),[L,R]=c.useState(null),[N,A]=c.useState([]);c.useEffect(()=>{const a=async()=>{try{const[i,p]=await Promise.all([ee(),te()]);m(i.data),h(p.data)}catch(i){console.error("Failed to fetch storage/pruning data:",i)}};a();const r=setInterval(a,3e4);return()=>clearInterval(r)},[]);const ce=async()=>{var a;b(!0);try{const r=await Ae(),[i,p]=await Promise.all([ee(),te()]);m(i.data),h(p.data),l();const f=((a=r.data)==null?void 0:a.deleted)??0;j.success(f===0?"Nothing was old enough to prune":`Pruned ${f.toLocaleString()} ${f===1?"entry":"entries"}`)}catch(r){j.error(`Could not prune: ${r instanceof Error?r.message:String(r)}`)}finally{b(!1)}};c.useEffect(()=>{let a=!0;return(async()=>{n(!0);try{const i=await ae({limit:F});if(!a)return;k(i.data),de(i.meta.total),M(i.meta.hasMore),R(i.meta.oldestSequence),P(1),A([]),O(null)}catch(i){if(!a)return;O(i instanceof Error?i:new Error("Failed to load activity"))}finally{a&&n(!1)}})(),()=>{a=!1}},[]);const ge=async()=>{if(!(!Z||!L||y)){z(!0);try{A(r=>[...r,{entries:x,oldestSeq:L}]);const a=await ae({limit:F,beforeSequence:L});k(a.data),M(a.meta.hasMore),R(a.meta.oldestSequence),P(r=>r+1)}catch(a){console.error("Failed to load next page:",a)}finally{z(!1)}}},xe=()=>{if(N.length===0)return;const a=N[N.length-1];A(r=>r.slice(0,-1)),k(a.entries),R(a.oldestSeq),M(!0),P(r=>r-1)},J=N.length>0,V=Z,D=Math.ceil(U/F);if(q)return e.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});if(!t&&g)return e.jsxs("div",{className:"card flex flex-col items-center justify-center py-16 px-4",role:"alert","data-testid":"stats-error",children:[e.jsx("div",{className:"p-3 rounded-full bg-red-50 dark:bg-red-900/20 mb-4",children:e.jsx(v,{className:"h-8 w-8 text-red-500 dark:text-red-400"})}),e.jsx("p",{className:"text-base font-medium text-gray-900 dark:text-white",children:"Could not reach NestLens"}),e.jsxs("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400 text-center max-w-md",children:[g.message,". Nothing on this page is known — it is not a report of an idle application."]}),e.jsx("button",{onClick:()=>void l(),className:"mt-5 px-3 py-1.5 rounded-lg text-sm font-medium bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors",children:"Try again"})]});const w=(t==null?void 0:t.byType.request)??0,B=(t==null?void 0:t.byType.exception)??0,W=(t==null?void 0:t.unresolvedExceptions)??B,E=(t==null?void 0:t.avgResponseTime)??0,_=(t==null?void 0:t.slowQueries)??0,me=E<200,ue=a=>{const r=re.find(i=>i.key===a);return(r==null?void 0:r.icon)??G},ye=a=>{const r=re.find(i=>i.key===a);return(r==null?void 0:r.route)||"/"};return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[e.jsx(T,{label:"Entries",value:(t==null?void 0:t.total)??0,subtext:"total recorded",icon:oe,status:"neutral"}),e.jsx(T,{label:"Errors",value:W,subtext:"unresolved exceptions",icon:v,status:W===0?"good":"danger",onClick:()=>o("/exceptions?resolved=false")}),e.jsx(T,{label:"Latency",value:E?`${Math.round(E)}ms`:"N/A",subtext:"avg response time",icon:I,status:E===0?"neutral":me?"good":"warning"}),e.jsx(T,{label:"Slow Queries",value:_,subtext:"exceeding threshold",icon:Fe,status:_===0?"good":"warning",onClick:()=>o("/queries?slow=true")})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-4",children:le.map(a=>e.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 overflow-hidden",children:[e.jsx("div",{className:"px-3 py-2.5 border-b border-gray-100 dark:border-gray-700/50 bg-gray-50/50 dark:bg-gray-800/50",children:e.jsx("h3",{className:"text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider",children:a.name})}),e.jsx("div",{className:"p-2.5",children:a.types.map(r=>{const i=r.key==="exception"?(t==null?void 0:t.unresolvedExceptions)??0:(t==null?void 0:t.byType[r.key])??0,p=r.icon,f=i>0;return e.jsxs(Be,{to:r.route,className:`group flex items-center gap-2.5 px-2.5 py-2 rounded-lg transition-all ${f?"hover:bg-gray-50 dark:hover:bg-gray-700/50":"opacity-50 hover:opacity-75"}`,children:[e.jsx("div",{className:`p-2 rounded-lg ${Ue[r.key]||"bg-gray-100 dark:bg-gray-700/50"} group-hover:scale-105 transition-transform`,children:e.jsx(p,{className:`h-3.5 w-3.5 ${se[r.key]||"text-gray-500"}`})}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:r.name})}),e.jsx("span",{className:`text-sm font-semibold tabular-nums ${f?"text-gray-900 dark:text-white":"text-gray-400 dark:text-gray-500"}`,children:i.toLocaleString()})]},r.key)})})]},a.name))}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-5",children:[e.jsxs("div",{className:"lg:col-span-2 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 overflow-hidden flex flex-col",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h2",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:"Recent Activity"}),y&&e.jsx("div",{className:"animate-spin rounded-full h-3 w-3 border-b-2 border-primary-600",role:"status","aria-label":"Loading"})]}),U>0&&e.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[Q," / ",D]})]}),e.jsxs("div",{className:"divide-y divide-gray-100 dark:divide-gray-700/50 flex-1 relative",style:{minHeight:"340px"},children:[y&&x.length>0&&e.jsx("div",{className:"absolute inset-0 bg-white/50 dark:bg-gray-800/50 z-10 pointer-events-none"}),x.length===0&&K?e.jsxs("div",{className:"p-8 text-center text-gray-500 dark:text-gray-400",role:"alert","data-testid":"activity-error",children:[e.jsx(v,{className:"h-7 w-7 mx-auto mb-2 text-red-500 dark:text-red-400"}),e.jsx("p",{className:"text-sm",children:"Could not load recent activity"}),e.jsxs("p",{className:"mt-1 text-xs",children:[K.message,". This is not a report of an idle application."]})]}):x.length===0&&!y?e.jsxs("div",{className:"p-8 text-center text-gray-500 dark:text-gray-400",children:[e.jsx(G,{className:"h-7 w-7 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"No entries recorded yet"})]}):x.length===0&&y?e.jsx("div",{className:"p-8 flex items-center justify-center",role:"status","aria-label":"Loading...",children:e.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-primary-600"})}):x.map(a=>{const r=ue(a.type),i=Je(a),p=Ve(a);return e.jsxs("div",{onClick:()=>o(`${ye(a.type)}/${a.id}`),className:"px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-700/30 cursor-pointer flex items-center gap-3 transition-colors",children:[e.jsx("div",{className:"shrink-0 p-2 rounded-lg bg-gray-100 dark:bg-gray-700/50",children:e.jsx(r,{className:`h-4 w-4 ${se[a.type]||"text-gray-500"}`})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`inline-flex px-1.5 py-0.5 rounded-sm text-[10px] font-semibold uppercase ${ie(a.type)}`,children:a.type}),e.jsx("span",{className:"text-sm text-gray-900 dark:text-white truncate font-mono",children:i})]}),p&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 truncate mt-0.5",children:p})]}),e.jsx("div",{className:"shrink-0 text-xs text-gray-400 dark:text-gray-500 whitespace-nowrap",children:C(S(a.createdAt),{addSuffix:!0})}),e.jsx(X,{className:"h-4 w-4 text-gray-300 dark:text-gray-600 shrink-0"})]},a.id)})]}),D>1&&e.jsxs("div",{className:"px-4 py-2.5 border-t border-gray-200 dark:border-gray-700 flex items-center justify-between bg-gray-50 dark:bg-gray-800/50",children:[e.jsxs("button",{onClick:xe,disabled:!J||y,className:`flex items-center gap-1 px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${J&&!y?"text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700":"text-gray-300 dark:text-gray-600 cursor-not-allowed"}`,children:[e.jsx(He,{className:"h-4 w-4"}),e.jsx("span",{children:"Previous"})]}),e.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Page ",Q," of ",D]}),e.jsxs("button",{onClick:ge,disabled:!V||y,className:`flex items-center gap-1 px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${V&&!y?"text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700":"text-gray-300 dark:text-gray-600 cursor-not-allowed"}`,children:[e.jsx("span",{children:"Next"}),e.jsx(X,{className:"h-4 w-4"})]})]})]}),e.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 overflow-hidden",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:"System Overview"})}),e.jsxs("div",{className:"p-4 space-y-4",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-gray-100 dark:border-gray-700/50",children:[e.jsxs("div",{className:"flex items-center gap-2 text-gray-600 dark:text-gray-400",children:[e.jsx(H,{className:"h-4 w-4"}),e.jsx("span",{className:"text-sm",children:"Database Size"})]}),e.jsx("span",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:d!=null&&d.databaseSize?Ze(d.databaseSize):"N/A"})]}),e.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-gray-100 dark:border-gray-700/50",children:[e.jsxs("div",{className:"flex items-center gap-2 text-gray-600 dark:text-gray-400",children:[e.jsx(v,{className:"h-4 w-4"}),e.jsx("span",{className:"text-sm",children:"Error Rate"})]}),e.jsxs("span",{className:`text-sm font-semibold ${w>0&&B/w*100<5?"text-emerald-600 dark:text-emerald-400":"text-red-600 dark:text-red-400"}`,children:[w>0?(B/w*100).toFixed(2):"0.00","%"]})]}),e.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-gray-100 dark:border-gray-700/50",children:[e.jsxs("div",{className:"flex items-center gap-2 text-gray-600 dark:text-gray-400",children:[e.jsx(I,{className:"h-4 w-4"}),e.jsx("span",{className:"text-sm",children:"Retention"})]}),e.jsx("span",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:(s==null?void 0:s.maxAge)!==void 0?`${s.maxAge}h`:"N/A"})]}),e.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-gray-100 dark:border-gray-700/50",children:[e.jsxs("div",{className:"flex items-center gap-2 text-gray-600 dark:text-gray-400",children:[e.jsx(Y,{className:"h-4 w-4"}),e.jsx("span",{className:"text-sm",children:"Last Prune"})]}),e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:s!=null&&s.lastRun?C(S(s.lastRun),{addSuffix:!0}):"Never"})]}),e.jsxs("div",{className:"flex items-center justify-between py-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-gray-600 dark:text-gray-400",children:[e.jsx(I,{className:"h-4 w-4"}),e.jsx("span",{className:"text-sm",children:"Next Prune"})]}),e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:s!=null&&s.nextRun?C(S(s.nextRun),{addSuffix:!0}):"N/A"})]})]}),e.jsx(Oe,{}),e.jsx("div",{className:"pt-3 border-t border-gray-200 dark:border-gray-700",children:e.jsxs("button",{onClick:ce,disabled:u||!(s!=null&&s.enabled),className:"w-full flex items-center justify-center gap-2 px-3 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[u?e.jsx(Re,{className:"h-4 w-4 animate-spin"}):e.jsx(Y,{className:"h-4 w-4"}),e.jsx("span",{children:u?"Pruning...":"Prune Now"})]})}),(d==null?void 0:d.oldestEntry)&&(d==null?void 0:d.newestEntry)&&e.jsx("div",{className:"pt-3 border-t border-gray-200 dark:border-gray-700",children:e.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:["Recording for ",C(S(d.oldestEntry))]})})]})]})]})]})}export{at as default};
@@ -1,9 +1,9 @@
1
- import{c as F,j as e,i as z,T as R}from"./index-CNTaNUkj.js";import{b as c}from"./vendor-DBTT3jXp.js";import{g as m}from"./date-Dwgqy666.js";/**
1
+ import{c as F,j as e,i as z,T as R}from"./index-BaD1MX7a.js";import{b as c}from"./vendor-DBTT3jXp.js";import{g as f}from"./date-Dwgqy666.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const T=F("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);function W({columns:r,rows:t=5}){return e.jsx(e.Fragment,{children:Array.from({length:t}).map((l,a)=>e.jsx("tr",{className:"animate-pulse",children:Array.from({length:r}).map((i,d)=>e.jsx("td",{className:"px-4 py-3",children:e.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded w-3/4"})},d))},a))})}function q({error:r,onRetry:t}){return e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 px-4",role:"alert","data-testid":"table-error",children:[e.jsx("div",{className:"p-3 rounded-full bg-red-50 dark:bg-red-900/20 mb-4",children:e.jsx(R,{className:"h-8 w-8 text-red-500 dark:text-red-400"})}),e.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white text-center",children:"Could not load these entries"}),e.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400 text-center max-w-sm",children:r.message}),t&&e.jsx("button",{onClick:t,className:"mt-4 px-3 py-1.5 rounded-lg text-sm font-medium bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors",children:"Try again"})]})}function B({message:r,icon:t}){return e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 px-4",children:[e.jsx("div",{className:"p-3 rounded-full bg-gray-100 dark:bg-gray-800 mb-4",children:t||e.jsx(T,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 text-center max-w-sm",children:r})]})}function K({columns:r,data:t,keyExtractor:l,onRowClick:a,loading:i=!1,emptyMessage:d="No data available",emptyIcon:y,error:b,onRetry:D,showChevron:p=!0,compact:j=!1,stickyHeader:E=!0,maxHeight:u,zebraStripes:I=!1,rowClassName:v}){const k=j?"px-3 py-2":"px-4 py-3",N=j?"px-3 py-2":"px-4 py-3",[h,x]=c.useState(-1),[w,A]=c.useState(-1),f=c.useRef(null),g=r.length+(p&&a?1:0),$=s=>{switch(s){case"center":return"text-center";case"right":return"text-right";default:return"text-left"}},S=c.useCallback((s,o,n)=>{if(a)switch(s.key){case"Enter":case" ":s.preventDefault(),a(o),A(n);break;case"ArrowDown":s.preventDefault(),n<t.length-1&&x(n+1);break;case"ArrowUp":s.preventDefault(),n>0&&x(n-1);break;case"Home":s.preventDefault(),x(0);break;case"End":s.preventDefault(),x(t.length-1);break}},[a,t.length]);return c.useEffect(()=>{if(h>=0&&f.current){const o=f.current.querySelectorAll("tbody tr[tabindex]")[h];o&&o.focus()}},[h]),e.jsx("div",{className:"card overflow-hidden",children:e.jsx("div",{className:`overflow-x-auto ${u?"overflow-y-auto":""}`,style:u?{maxHeight:u}:void 0,children:e.jsxs("table",{ref:f,className:"w-full border-collapse",role:"grid","aria-rowcount":t.length,"aria-colcount":g,children:[e.jsx("thead",{className:`bg-gray-50 dark:bg-gray-800/50 ${E?"sticky top-0 z-10":""}`,children:e.jsxs("tr",{role:"row",children:[r.map(s=>e.jsx("th",{scope:"col",role:"columnheader","aria-sort":s.sortable?"none":void 0,className:`
6
+ */const T=F("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);function W({columns:r,rows:t=5}){return e.jsx(e.Fragment,{children:Array.from({length:t}).map((l,a)=>e.jsx("tr",{className:"animate-pulse",children:Array.from({length:r}).map((i,d)=>e.jsx("td",{className:"px-4 py-3",children:e.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded-sm w-3/4"})},d))},a))})}function q({error:r,onRetry:t}){return e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 px-4",role:"alert","data-testid":"table-error",children:[e.jsx("div",{className:"p-3 rounded-full bg-red-50 dark:bg-red-900/20 mb-4",children:e.jsx(R,{className:"h-8 w-8 text-red-500 dark:text-red-400"})}),e.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white text-center",children:"Could not load these entries"}),e.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400 text-center max-w-sm",children:r.message}),t&&e.jsx("button",{onClick:t,className:"mt-4 px-3 py-1.5 rounded-lg text-sm font-medium bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors",children:"Try again"})]})}function B({message:r,icon:t}){return e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 px-4",children:[e.jsx("div",{className:"p-3 rounded-full bg-gray-100 dark:bg-gray-800 mb-4",children:t||e.jsx(T,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 text-center max-w-sm",children:r})]})}function K({columns:r,data:t,keyExtractor:l,onRowClick:a,loading:i=!1,emptyMessage:d="No data available",emptyIcon:y,error:b,onRetry:D,showChevron:p=!0,compact:j=!1,stickyHeader:E=!0,maxHeight:u,zebraStripes:I=!1,rowClassName:v}){const k=j?"px-3 py-2":"px-4 py-3",N=j?"px-3 py-2":"px-4 py-3",[h,x]=c.useState(-1),[w,A]=c.useState(-1),m=c.useRef(null),g=r.length+(p&&a?1:0),$=s=>{switch(s){case"center":return"text-center";case"right":return"text-right";default:return"text-left"}},S=c.useCallback((s,o,n)=>{if(a)switch(s.key){case"Enter":case" ":s.preventDefault(),a(o),A(n);break;case"ArrowDown":s.preventDefault(),n<t.length-1&&x(n+1);break;case"ArrowUp":s.preventDefault(),n>0&&x(n-1);break;case"Home":s.preventDefault(),x(0);break;case"End":s.preventDefault(),x(t.length-1);break}},[a,t.length]);return c.useEffect(()=>{if(h>=0&&m.current){const o=m.current.querySelectorAll("tbody tr[tabindex]")[h];o&&o.focus()}},[h]),e.jsx("div",{className:"card overflow-hidden",children:e.jsx("div",{className:`overflow-x-auto ${u?"overflow-y-auto":""}`,style:u?{maxHeight:u}:void 0,children:e.jsxs("table",{ref:m,className:"w-full border-collapse",role:"grid","aria-rowcount":t.length,"aria-colcount":g,children:[e.jsx("thead",{className:`bg-gray-50 dark:bg-gray-800/50 ${E?"sticky top-0 z-10":""}`,children:e.jsxs("tr",{role:"row",children:[r.map(s=>e.jsx("th",{scope:"col",role:"columnheader","aria-sort":s.sortable?"none":void 0,className:`
7
7
  ${N}
8
8
  ${$(s.headerAlign||s.align)}
9
9
  text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider
@@ -22,7 +22,7 @@ import{c as F,j as e,i as z,T as R}from"./index-CNTaNUkj.js";import{b as c}from"
22
22
  ${a?"cursor-pointer":""}
23
23
  ${I&&o%2===1?"bg-gray-50/50 dark:bg-gray-800/25":"bg-white dark:bg-gray-900"}
24
24
  hover:bg-primary-50/50 dark:hover:bg-primary-900/10
25
- focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-inset
25
+ focus:outline-hidden focus:ring-2 focus:ring-primary-500 focus:ring-inset
26
26
  ${w===o?"bg-primary-50 dark:bg-primary-900/20":""}
27
27
  ${v?v(s):""}
28
28
  `,children:[r.map(n=>e.jsx("td",{role:"gridcell",className:`
@@ -36,17 +36,17 @@ import{c as F,j as e,i as z,T as R}from"./index-CNTaNUkj.js";import{b as c}from"
36
36
  ${l?"block truncate":""}
37
37
  ${d}
38
38
  `,style:a?{maxWidth:a,display:"block"}:void 0,title:l&&typeof r=="string"?r:void 0,children:r})}function P({tags:r,max:t=3,onTagClick:l}){const a=r.slice(0,t),i=r.length-t;return r.length===0?e.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"—"}):e.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[a.map(d=>e.jsx("button",{onClick:l?y=>l(d,y):void 0,role:l?"button":void 0,tabIndex:l?0:void 0,"aria-label":l?`Click to filter by ${d.toUpperCase()}`:void 0,className:`
39
- inline-flex items-center px-2 py-0.5 rounded text-xs font-bold uppercase tracking-wide shadow
40
- ${m(d)}
39
+ inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-bold uppercase tracking-wide shadow-sm
40
+ ${f(d)}
41
41
  ${l?"cursor-pointer hover:scale-105":""}
42
42
  transition-transform
43
- `,children:d.toUpperCase()},d)),i>0&&e.jsxs("span",{className:"text-xs text-gray-400 dark:text-gray-500",children:["+",i]})]})}function _({ms:r,slowThreshold:t=1e3,verySlowThreshold:l=5e3}){let a,i;return r>=l?a="text-red-600 dark:text-red-400":r>=t?a="text-yellow-600 dark:text-yellow-400":a="text-gray-600 dark:text-gray-300",r>=1e3?i=`${(r/1e3).toFixed(2)}s`:i=`${Number.isInteger(r)?r:r.toFixed(2)}ms`,e.jsx("span",{className:`text-sm font-mono tabular-nums ${a}`,children:i})}function M({onClick:r}){const t=m("ERROR");return e.jsx("button",{onClick:r,className:`
44
- inline-flex items-center px-2 py-0.5 rounded text-xs font-bold uppercase tracking-wide shadow
43
+ `,children:d.toUpperCase()},d)),i>0&&e.jsxs("span",{className:"text-xs text-gray-400 dark:text-gray-500",children:["+",i]})]})}function _({ms:r,slowThreshold:t=1e3,verySlowThreshold:l=5e3}){let a,i;return r>=l?a="text-red-600 dark:text-red-400":r>=t?a="text-yellow-600 dark:text-yellow-400":a="text-gray-600 dark:text-gray-300",r>=1e3?i=`${(r/1e3).toFixed(2)}s`:i=`${Number.isInteger(r)?r:r.toFixed(2)}ms`,e.jsx("span",{className:`text-sm font-mono tabular-nums ${a}`,children:i})}function M({onClick:r}){const t=f("ERROR");return e.jsx("button",{onClick:r,className:`
44
+ inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-bold uppercase tracking-wide shadow-sm
45
45
  ${t}
46
46
  ${r?"cursor-pointer hover:scale-105":""}
47
47
  transition-transform
48
- `,children:"ERROR"})}function Q({count:r,onClick:t}){if(r===0)return null;const l=m("N+1");return e.jsx("button",{onClick:t,title:`${r} potential N+1 ${r===1?"query":"queries"} detected`,className:`
49
- inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-bold uppercase tracking-wide shadow
48
+ `,children:"ERROR"})}function Q({count:r,onClick:t}){if(r===0)return null;const l=f("N+1");return e.jsx("button",{onClick:t,title:`${r} potential N+1 ${r===1?"query":"queries"} detected`,className:`
49
+ inline-flex items-center gap-1 px-2 py-0.5 rounded-sm text-xs font-bold uppercase tracking-wide shadow-sm
50
50
  ${l}
51
51
  ${t?"cursor-pointer hover:scale-105":""}
52
52
  transition-transform
@@ -1 +1 @@
1
- import{t as m,a as M,c as b,n as _,b as E,m as Q,d as F,e as B}from"./date-Dwgqy666.js";import{j as T}from"./index-CNTaNUkj.js";function Y(r,e){var u,o,l,h;const t=M(),n=(e==null?void 0:e.weekStartsOn)??((o=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:o.weekStartsOn)??t.weekStartsOn??((h=(l=t.locale)==null?void 0:l.options)==null?void 0:h.weekStartsOn)??0,a=m(r,e==null?void 0:e.in),s=a.getDay(),i=(s<n?7:0)+s-n;return a.setDate(a.getDate()-i),a.setHours(0,0,0,0),a}function D(r,e){return Y(r,{...e,weekStartsOn:1})}function H(r,e){const t=m(r,e==null?void 0:e.in),n=t.getFullYear(),a=b(t,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);const s=D(a),i=b(t,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const u=D(i);return t.getTime()>=s.getTime()?n+1:t.getTime()>=u.getTime()?n:n-1}function S(r,e){const t=m(r,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}function X(r,e,t){const[n,a]=_(t==null?void 0:t.in,r,e),s=S(n),i=S(a),u=+s-E(s),o=+i-E(i);return Math.round((u-o)/Q)}function L(r,e){const t=H(r,e),n=b(r,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),D(n)}function R(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function I(r){return!(!R(r)&&typeof r!="number"||isNaN(+m(r)))}function j(r,e){const t=m(r,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}function $(r,e){const t=m(r,e==null?void 0:e.in);return X(t,j(t))+1}function V(r,e){const t=m(r,e==null?void 0:e.in),n=+D(t)-+L(t);return Math.round(n/F)+1}function C(r,e){var h,O,x,k;const t=m(r,e==null?void 0:e.in),n=t.getFullYear(),a=M(),s=(e==null?void 0:e.firstWeekContainsDate)??((O=(h=e==null?void 0:e.locale)==null?void 0:h.options)==null?void 0:O.firstWeekContainsDate)??a.firstWeekContainsDate??((k=(x=a.locale)==null?void 0:x.options)==null?void 0:k.firstWeekContainsDate)??1,i=b((e==null?void 0:e.in)||r,0);i.setFullYear(n+1,0,s),i.setHours(0,0,0,0);const u=Y(i,e),o=b((e==null?void 0:e.in)||r,0);o.setFullYear(n,0,s),o.setHours(0,0,0,0);const l=Y(o,e);return+t>=+u?n+1:+t>=+l?n:n-1}function J(r,e){var u,o,l,h;const t=M(),n=(e==null?void 0:e.firstWeekContainsDate)??((o=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:o.firstWeekContainsDate)??t.firstWeekContainsDate??((h=(l=t.locale)==null?void 0:l.options)==null?void 0:h.firstWeekContainsDate)??1,a=C(r,e),s=b((e==null?void 0:e.in)||r,0);return s.setFullYear(a,0,n),s.setHours(0,0,0,0),Y(s,e)}function K(r,e){const t=m(r,e==null?void 0:e.in),n=+Y(t,e)-+J(t,e);return Math.round(n/F)+1}function c(r,e){const t=r<0?"-":"",n=Math.abs(r).toString().padStart(e,"0");return t+n}const g={y(r,e){const t=r.getFullYear(),n=t>0?t:1-t;return c(e==="yy"?n%100:n,e.length)},M(r,e){const t=r.getMonth();return e==="M"?String(t+1):c(t+1,2)},d(r,e){return c(r.getDate(),e.length)},a(r,e){const t=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(r,e){return c(r.getHours()%12||12,e.length)},H(r,e){return c(r.getHours(),e.length)},m(r,e){return c(r.getMinutes(),e.length)},s(r,e){return c(r.getSeconds(),e.length)},S(r,e){const t=e.length,n=r.getMilliseconds(),a=Math.trunc(n*Math.pow(10,t-3));return c(a,e.length)}},y={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},W={G:function(r,e,t){const n=r.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(n,{width:"abbreviated"});case"GGGGG":return t.era(n,{width:"narrow"});case"GGGG":default:return t.era(n,{width:"wide"})}},y:function(r,e,t){if(e==="yo"){const n=r.getFullYear(),a=n>0?n:1-n;return t.ordinalNumber(a,{unit:"year"})}return g.y(r,e)},Y:function(r,e,t,n){const a=C(r,n),s=a>0?a:1-a;if(e==="YY"){const i=s%100;return c(i,2)}return e==="Yo"?t.ordinalNumber(s,{unit:"year"}):c(s,e.length)},R:function(r,e){const t=H(r);return c(t,e.length)},u:function(r,e){const t=r.getFullYear();return c(t,e.length)},Q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return c(n,2);case"Qo":return t.ordinalNumber(n,{unit:"quarter"});case"QQQ":return t.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(n,{width:"wide",context:"formatting"})}},q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return c(n,2);case"qo":return t.ordinalNumber(n,{unit:"quarter"});case"qqq":return t.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(n,{width:"wide",context:"standalone"})}},M:function(r,e,t){const n=r.getMonth();switch(e){case"M":case"MM":return g.M(r,e);case"Mo":return t.ordinalNumber(n+1,{unit:"month"});case"MMM":return t.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(n,{width:"wide",context:"formatting"})}},L:function(r,e,t){const n=r.getMonth();switch(e){case"L":return String(n+1);case"LL":return c(n+1,2);case"Lo":return t.ordinalNumber(n+1,{unit:"month"});case"LLL":return t.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(n,{width:"wide",context:"standalone"})}},w:function(r,e,t,n){const a=K(r,n);return e==="wo"?t.ordinalNumber(a,{unit:"week"}):c(a,e.length)},I:function(r,e,t){const n=V(r);return e==="Io"?t.ordinalNumber(n,{unit:"week"}):c(n,e.length)},d:function(r,e,t){return e==="do"?t.ordinalNumber(r.getDate(),{unit:"date"}):g.d(r,e)},D:function(r,e,t){const n=$(r);return e==="Do"?t.ordinalNumber(n,{unit:"dayOfYear"}):c(n,e.length)},E:function(r,e,t){const n=r.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(n,{width:"short",context:"formatting"});case"EEEE":default:return t.day(n,{width:"wide",context:"formatting"})}},e:function(r,e,t,n){const a=r.getDay(),s=(a-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return c(s,2);case"eo":return t.ordinalNumber(s,{unit:"day"});case"eee":return t.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(a,{width:"short",context:"formatting"});case"eeee":default:return t.day(a,{width:"wide",context:"formatting"})}},c:function(r,e,t,n){const a=r.getDay(),s=(a-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return c(s,e.length);case"co":return t.ordinalNumber(s,{unit:"day"});case"ccc":return t.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(a,{width:"narrow",context:"standalone"});case"cccccc":return t.day(a,{width:"short",context:"standalone"});case"cccc":default:return t.day(a,{width:"wide",context:"standalone"})}},i:function(r,e,t){const n=r.getDay(),a=n===0?7:n;switch(e){case"i":return String(a);case"ii":return c(a,e.length);case"io":return t.ordinalNumber(a,{unit:"day"});case"iii":return t.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(n,{width:"short",context:"formatting"});case"iiii":default:return t.day(n,{width:"wide",context:"formatting"})}},a:function(r,e,t){const a=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(r,e,t){const n=r.getHours();let a;switch(n===12?a=y.noon:n===0?a=y.midnight:a=n/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(r,e,t){const n=r.getHours();let a;switch(n>=17?a=y.evening:n>=12?a=y.afternoon:n>=4?a=y.morning:a=y.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(r,e,t){if(e==="ho"){let n=r.getHours()%12;return n===0&&(n=12),t.ordinalNumber(n,{unit:"hour"})}return g.h(r,e)},H:function(r,e,t){return e==="Ho"?t.ordinalNumber(r.getHours(),{unit:"hour"}):g.H(r,e)},K:function(r,e,t){const n=r.getHours()%12;return e==="Ko"?t.ordinalNumber(n,{unit:"hour"}):c(n,e.length)},k:function(r,e,t){let n=r.getHours();return n===0&&(n=24),e==="ko"?t.ordinalNumber(n,{unit:"hour"}):c(n,e.length)},m:function(r,e,t){return e==="mo"?t.ordinalNumber(r.getMinutes(),{unit:"minute"}):g.m(r,e)},s:function(r,e,t){return e==="so"?t.ordinalNumber(r.getSeconds(),{unit:"second"}):g.s(r,e)},S:function(r,e){return g.S(r,e)},X:function(r,e,t){const n=r.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return N(n);case"XXXX":case"XX":return w(n);case"XXXXX":case"XXX":default:return w(n,":")}},x:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"x":return N(n);case"xxxx":case"xx":return w(n);case"xxxxx":case"xxx":default:return w(n,":")}},O:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+q(n,":");case"OOOO":default:return"GMT"+w(n,":")}},z:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+q(n,":");case"zzzz":default:return"GMT"+w(n,":")}},t:function(r,e,t){const n=Math.trunc(+r/1e3);return c(n,e.length)},T:function(r,e,t){return c(+r,e.length)}};function q(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),a=Math.trunc(n/60),s=n%60;return s===0?t+String(a):t+String(a)+e+c(s,2)}function N(r,e){return r%60===0?(r>0?"-":"+")+c(Math.abs(r)/60,2):w(r,e)}function w(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),a=c(Math.trunc(n/60),2),s=c(n%60,2);return t+a+e+s}const v=(r,e)=>{switch(r){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},G=(r,e)=>{switch(r){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},U=(r,e)=>{const t=r.match(/(P+)(p+)?/)||[],n=t[1],a=t[2];if(!a)return v(r,e);let s;switch(n){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",v(n,e)).replace("{{time}}",G(a,e))},Z={p:G,P:U},A=/^D+$/,z=/^Y+$/,p=["D","DD","YY","YYYY"];function ee(r){return A.test(r)}function te(r){return z.test(r)}function re(r,e,t){const n=ne(r,e,t);if(console.warn(n),p.includes(r))throw new RangeError(n)}function ne(r,e,t){const n=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${e}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const ae=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,se=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ce=/^'([^]*?)'?$/,ie=/''/g,ue=/[a-zA-Z]/;function he(r,e,t){var h,O,x,k;const n=M(),a=n.locale??B,s=n.firstWeekContainsDate??((O=(h=n.locale)==null?void 0:h.options)==null?void 0:O.firstWeekContainsDate)??1,i=n.weekStartsOn??((k=(x=n.locale)==null?void 0:x.options)==null?void 0:k.weekStartsOn)??0,u=m(r,t==null?void 0:t.in);if(!I(u))throw new RangeError("Invalid time value");let o=e.match(se).map(f=>{const d=f[0];if(d==="p"||d==="P"){const P=Z[d];return P(f,a.formatLong)}return f}).join("").match(ae).map(f=>{if(f==="''")return{isToken:!1,value:"'"};const d=f[0];if(d==="'")return{isToken:!1,value:oe(f)};if(W[d])return{isToken:!0,value:f};if(d.match(ue))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:f}});a.localize.preprocessor&&(o=a.localize.preprocessor(u,o));const l={firstWeekContainsDate:s,weekStartsOn:i,locale:a};return o.map(f=>{if(!f.isToken)return f.value;const d=f.value;(te(d)||ee(d))&&re(d,e,String(r));const P=W[d[0]];return P(u,d,a.localize,l)}).join("")}function oe(r){const e=r.match(ce);return e?e[1].replace(ie,"'"):r}function me({label:r,value:e,className:t=""}){return T.jsxs("div",{className:`grid grid-cols-[180px_1fr] gap-4 py-3 border-b border-gray-100 dark:border-gray-700 last:border-0 ${t}`,children:[T.jsx("dt",{className:"text-sm font-medium text-gray-500 dark:text-gray-400",children:r}),T.jsx("dd",{className:"text-sm text-gray-900 dark:text-white break-all",children:e})]})}export{me as D,he as f};
1
+ import{t as m,a as M,c as b,n as _,b as E,m as Q,d as F,e as B}from"./date-Dwgqy666.js";import{j as T}from"./index-BaD1MX7a.js";function Y(r,e){var u,o,l,h;const t=M(),n=(e==null?void 0:e.weekStartsOn)??((o=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:o.weekStartsOn)??t.weekStartsOn??((h=(l=t.locale)==null?void 0:l.options)==null?void 0:h.weekStartsOn)??0,a=m(r,e==null?void 0:e.in),s=a.getDay(),i=(s<n?7:0)+s-n;return a.setDate(a.getDate()-i),a.setHours(0,0,0,0),a}function D(r,e){return Y(r,{...e,weekStartsOn:1})}function H(r,e){const t=m(r,e==null?void 0:e.in),n=t.getFullYear(),a=b(t,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);const s=D(a),i=b(t,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const u=D(i);return t.getTime()>=s.getTime()?n+1:t.getTime()>=u.getTime()?n:n-1}function S(r,e){const t=m(r,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}function X(r,e,t){const[n,a]=_(t==null?void 0:t.in,r,e),s=S(n),i=S(a),u=+s-E(s),o=+i-E(i);return Math.round((u-o)/Q)}function L(r,e){const t=H(r,e),n=b(r,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),D(n)}function R(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function I(r){return!(!R(r)&&typeof r!="number"||isNaN(+m(r)))}function j(r,e){const t=m(r,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}function $(r,e){const t=m(r,e==null?void 0:e.in);return X(t,j(t))+1}function V(r,e){const t=m(r,e==null?void 0:e.in),n=+D(t)-+L(t);return Math.round(n/F)+1}function C(r,e){var h,O,x,k;const t=m(r,e==null?void 0:e.in),n=t.getFullYear(),a=M(),s=(e==null?void 0:e.firstWeekContainsDate)??((O=(h=e==null?void 0:e.locale)==null?void 0:h.options)==null?void 0:O.firstWeekContainsDate)??a.firstWeekContainsDate??((k=(x=a.locale)==null?void 0:x.options)==null?void 0:k.firstWeekContainsDate)??1,i=b((e==null?void 0:e.in)||r,0);i.setFullYear(n+1,0,s),i.setHours(0,0,0,0);const u=Y(i,e),o=b((e==null?void 0:e.in)||r,0);o.setFullYear(n,0,s),o.setHours(0,0,0,0);const l=Y(o,e);return+t>=+u?n+1:+t>=+l?n:n-1}function J(r,e){var u,o,l,h;const t=M(),n=(e==null?void 0:e.firstWeekContainsDate)??((o=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:o.firstWeekContainsDate)??t.firstWeekContainsDate??((h=(l=t.locale)==null?void 0:l.options)==null?void 0:h.firstWeekContainsDate)??1,a=C(r,e),s=b((e==null?void 0:e.in)||r,0);return s.setFullYear(a,0,n),s.setHours(0,0,0,0),Y(s,e)}function K(r,e){const t=m(r,e==null?void 0:e.in),n=+Y(t,e)-+J(t,e);return Math.round(n/F)+1}function c(r,e){const t=r<0?"-":"",n=Math.abs(r).toString().padStart(e,"0");return t+n}const g={y(r,e){const t=r.getFullYear(),n=t>0?t:1-t;return c(e==="yy"?n%100:n,e.length)},M(r,e){const t=r.getMonth();return e==="M"?String(t+1):c(t+1,2)},d(r,e){return c(r.getDate(),e.length)},a(r,e){const t=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(r,e){return c(r.getHours()%12||12,e.length)},H(r,e){return c(r.getHours(),e.length)},m(r,e){return c(r.getMinutes(),e.length)},s(r,e){return c(r.getSeconds(),e.length)},S(r,e){const t=e.length,n=r.getMilliseconds(),a=Math.trunc(n*Math.pow(10,t-3));return c(a,e.length)}},y={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},W={G:function(r,e,t){const n=r.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(n,{width:"abbreviated"});case"GGGGG":return t.era(n,{width:"narrow"});case"GGGG":default:return t.era(n,{width:"wide"})}},y:function(r,e,t){if(e==="yo"){const n=r.getFullYear(),a=n>0?n:1-n;return t.ordinalNumber(a,{unit:"year"})}return g.y(r,e)},Y:function(r,e,t,n){const a=C(r,n),s=a>0?a:1-a;if(e==="YY"){const i=s%100;return c(i,2)}return e==="Yo"?t.ordinalNumber(s,{unit:"year"}):c(s,e.length)},R:function(r,e){const t=H(r);return c(t,e.length)},u:function(r,e){const t=r.getFullYear();return c(t,e.length)},Q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return c(n,2);case"Qo":return t.ordinalNumber(n,{unit:"quarter"});case"QQQ":return t.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(n,{width:"wide",context:"formatting"})}},q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return c(n,2);case"qo":return t.ordinalNumber(n,{unit:"quarter"});case"qqq":return t.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(n,{width:"wide",context:"standalone"})}},M:function(r,e,t){const n=r.getMonth();switch(e){case"M":case"MM":return g.M(r,e);case"Mo":return t.ordinalNumber(n+1,{unit:"month"});case"MMM":return t.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(n,{width:"wide",context:"formatting"})}},L:function(r,e,t){const n=r.getMonth();switch(e){case"L":return String(n+1);case"LL":return c(n+1,2);case"Lo":return t.ordinalNumber(n+1,{unit:"month"});case"LLL":return t.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(n,{width:"wide",context:"standalone"})}},w:function(r,e,t,n){const a=K(r,n);return e==="wo"?t.ordinalNumber(a,{unit:"week"}):c(a,e.length)},I:function(r,e,t){const n=V(r);return e==="Io"?t.ordinalNumber(n,{unit:"week"}):c(n,e.length)},d:function(r,e,t){return e==="do"?t.ordinalNumber(r.getDate(),{unit:"date"}):g.d(r,e)},D:function(r,e,t){const n=$(r);return e==="Do"?t.ordinalNumber(n,{unit:"dayOfYear"}):c(n,e.length)},E:function(r,e,t){const n=r.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(n,{width:"short",context:"formatting"});case"EEEE":default:return t.day(n,{width:"wide",context:"formatting"})}},e:function(r,e,t,n){const a=r.getDay(),s=(a-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return c(s,2);case"eo":return t.ordinalNumber(s,{unit:"day"});case"eee":return t.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(a,{width:"short",context:"formatting"});case"eeee":default:return t.day(a,{width:"wide",context:"formatting"})}},c:function(r,e,t,n){const a=r.getDay(),s=(a-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return c(s,e.length);case"co":return t.ordinalNumber(s,{unit:"day"});case"ccc":return t.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(a,{width:"narrow",context:"standalone"});case"cccccc":return t.day(a,{width:"short",context:"standalone"});case"cccc":default:return t.day(a,{width:"wide",context:"standalone"})}},i:function(r,e,t){const n=r.getDay(),a=n===0?7:n;switch(e){case"i":return String(a);case"ii":return c(a,e.length);case"io":return t.ordinalNumber(a,{unit:"day"});case"iii":return t.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(n,{width:"short",context:"formatting"});case"iiii":default:return t.day(n,{width:"wide",context:"formatting"})}},a:function(r,e,t){const a=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(r,e,t){const n=r.getHours();let a;switch(n===12?a=y.noon:n===0?a=y.midnight:a=n/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(r,e,t){const n=r.getHours();let a;switch(n>=17?a=y.evening:n>=12?a=y.afternoon:n>=4?a=y.morning:a=y.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(r,e,t){if(e==="ho"){let n=r.getHours()%12;return n===0&&(n=12),t.ordinalNumber(n,{unit:"hour"})}return g.h(r,e)},H:function(r,e,t){return e==="Ho"?t.ordinalNumber(r.getHours(),{unit:"hour"}):g.H(r,e)},K:function(r,e,t){const n=r.getHours()%12;return e==="Ko"?t.ordinalNumber(n,{unit:"hour"}):c(n,e.length)},k:function(r,e,t){let n=r.getHours();return n===0&&(n=24),e==="ko"?t.ordinalNumber(n,{unit:"hour"}):c(n,e.length)},m:function(r,e,t){return e==="mo"?t.ordinalNumber(r.getMinutes(),{unit:"minute"}):g.m(r,e)},s:function(r,e,t){return e==="so"?t.ordinalNumber(r.getSeconds(),{unit:"second"}):g.s(r,e)},S:function(r,e){return g.S(r,e)},X:function(r,e,t){const n=r.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return N(n);case"XXXX":case"XX":return w(n);case"XXXXX":case"XXX":default:return w(n,":")}},x:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"x":return N(n);case"xxxx":case"xx":return w(n);case"xxxxx":case"xxx":default:return w(n,":")}},O:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+q(n,":");case"OOOO":default:return"GMT"+w(n,":")}},z:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+q(n,":");case"zzzz":default:return"GMT"+w(n,":")}},t:function(r,e,t){const n=Math.trunc(+r/1e3);return c(n,e.length)},T:function(r,e,t){return c(+r,e.length)}};function q(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),a=Math.trunc(n/60),s=n%60;return s===0?t+String(a):t+String(a)+e+c(s,2)}function N(r,e){return r%60===0?(r>0?"-":"+")+c(Math.abs(r)/60,2):w(r,e)}function w(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),a=c(Math.trunc(n/60),2),s=c(n%60,2);return t+a+e+s}const v=(r,e)=>{switch(r){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},G=(r,e)=>{switch(r){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},U=(r,e)=>{const t=r.match(/(P+)(p+)?/)||[],n=t[1],a=t[2];if(!a)return v(r,e);let s;switch(n){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",v(n,e)).replace("{{time}}",G(a,e))},Z={p:G,P:U},A=/^D+$/,z=/^Y+$/,p=["D","DD","YY","YYYY"];function ee(r){return A.test(r)}function te(r){return z.test(r)}function re(r,e,t){const n=ne(r,e,t);if(console.warn(n),p.includes(r))throw new RangeError(n)}function ne(r,e,t){const n=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${e}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const ae=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,se=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ce=/^'([^]*?)'?$/,ie=/''/g,ue=/[a-zA-Z]/;function he(r,e,t){var h,O,x,k;const n=M(),a=n.locale??B,s=n.firstWeekContainsDate??((O=(h=n.locale)==null?void 0:h.options)==null?void 0:O.firstWeekContainsDate)??1,i=n.weekStartsOn??((k=(x=n.locale)==null?void 0:x.options)==null?void 0:k.weekStartsOn)??0,u=m(r,t==null?void 0:t.in);if(!I(u))throw new RangeError("Invalid time value");let o=e.match(se).map(f=>{const d=f[0];if(d==="p"||d==="P"){const P=Z[d];return P(f,a.formatLong)}return f}).join("").match(ae).map(f=>{if(f==="''")return{isToken:!1,value:"'"};const d=f[0];if(d==="'")return{isToken:!1,value:oe(f)};if(W[d])return{isToken:!0,value:f};if(d.match(ue))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:f}});a.localize.preprocessor&&(o=a.localize.preprocessor(u,o));const l={firstWeekContainsDate:s,weekStartsOn:i,locale:a};return o.map(f=>{if(!f.isToken)return f.value;const d=f.value;(te(d)||ee(d))&&re(d,e,String(r));const P=W[d[0]];return P(u,d,a.localize,l)}).join("")}function oe(r){const e=r.match(ce);return e?e[1].replace(ie,"'"):r}function me({label:r,value:e,className:t=""}){return T.jsxs("div",{className:`grid grid-cols-[180px_1fr] gap-4 py-3 border-b border-gray-100 dark:border-gray-700 last:border-0 ${t}`,children:[T.jsx("dt",{className:"text-sm font-medium text-gray-500 dark:text-gray-400",children:r}),T.jsx("dd",{className:"text-sm text-gray-900 dark:text-white break-all",children:e})]})}export{me as D,he as f};
@@ -1,11 +1,11 @@
1
- import{c as n,j as e,H as d,D as h,F as j,C as g}from"./index-CNTaNUkj.js";import{p as c,f as u}from"./date-Dwgqy666.js";import{D as a,f}from"./DetailRow-C35E-Fg7.js";import{C as l}from"./types-DqF5HlZi.js";import{C as N}from"./CopyButton-DpZHVixQ.js";import{C as y}from"./circle-check-big-Br_lvQdJ.js";import{C as x}from"./circle-x-DFyAuyMN.js";import"./vendor-DBTT3jXp.js";import"./EntryDetailPage-C63KztnI.js";import"./search-CcMiea1V.js";/**
1
+ import{c as n,j as e,H as d,D as h,F as j,C as g}from"./index-BaD1MX7a.js";import{p as c,f as u}from"./date-Dwgqy666.js";import{D as a,f}from"./DetailRow-BC_kcJT3.js";import{C as l}from"./types-BHYinjn2.js";import{C as N}from"./CopyButton-DaF0vYeo.js";import{C as b}from"./circle-check-big-DZttXeD-.js";import{C as x}from"./circle-x-CioeSSBA.js";import"./vendor-DBTT3jXp.js";import"./EntryDetailPage-DUWwJ_hP.js";import"./search-BtkJjUPF.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const b=n("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
6
+ */const y=n("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
7
7
  * @license lucide-react v0.468.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */const k=n("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);function o(r){return r?r<1024?`${r}B`:r<1024*1024?`${(r/1024).toFixed(1)}KB`:r<1024*1024*1024?`${(r/(1024*1024)).toFixed(1)}MB`:`${(r/(1024*1024*1024)).toFixed(1)}GB`:"-"}const v={export:"text-blue-600 dark:text-blue-400",import:"text-purple-600 dark:text-purple-400",backup:"text-green-600 dark:text-green-400",restore:"text-orange-600 dark:text-orange-400",migrate:"text-cyan-600 dark:text-cyan-400"};function V({entry:r}){const{payload:s,createdAt:i}=r,t=s.status==="completed"?{icon:y,color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30"}:{icon:x,color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30"},m=t.icon,p=v[s.operation]||"text-gray-600 dark:text-gray-400";return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:`p-2 ${t.bg} rounded-lg`,children:e.jsx(d,{className:`h-5 w-5 ${t.color}`})}),e.jsxs("div",{children:[e.jsxs("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:[s.operation.toUpperCase()," - ",s.format]}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Data Dump"})]})]}),(s.source||s.destination)&&e.jsx(N,{text:s.destination||s.source||"",label:"Copy path"})]})}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 divide-x divide-gray-200 dark:divide-gray-700",children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(d,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Operation"})]}),e.jsx("p",{className:`text-lg font-bold ${p}`,children:s.operation.toUpperCase()})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(m,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Status"})]}),e.jsx("p",{className:`text-lg font-bold ${t.color}`,children:s.status.toUpperCase()})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(h,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Records"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:s.recordCount!==void 0?s.recordCount.toLocaleString():"-"})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(j,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Size"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:o(s.fileSize)})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(g,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[s.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]})]})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(a,{label:"Time",value:e.jsxs("span",{children:[f(c(i),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",u(c(i),{addSuffix:!0}),")"]})]})}),e.jsx(a,{label:"Operation",value:e.jsx(l,{listType:"dumps",filterType:"operations",filterValue:s.operation,children:s.operation.toUpperCase()})}),e.jsx(a,{label:"Format",value:e.jsx(l,{listType:"dumps",filterType:"formats",filterValue:s.format,children:s.format})}),e.jsx(a,{label:"Status",value:e.jsx(l,{listType:"dumps",filterType:"statuses",filterValue:s.status,children:s.status.toUpperCase()})}),s.source&&e.jsx(a,{label:"Source",value:e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white break-all",children:s.source})}),s.destination&&e.jsx(a,{label:"Destination",value:e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white break-all",children:s.destination})}),s.recordCount!==void 0&&e.jsx(a,{label:"Records",value:s.recordCount.toLocaleString()}),e.jsx(a,{label:"Size",value:o(s.fileSize)}),e.jsx(a,{label:"Duration",value:`${s.duration}ms`}),s.compressed&&e.jsx(a,{label:"Compressed",value:e.jsxs("span",{className:"inline-flex items-center space-x-1",children:[e.jsx(b,{className:"h-4 w-4 text-blue-500"}),e.jsx("span",{children:"Yes"})]})}),s.encrypted&&e.jsx(a,{label:"Encrypted",value:e.jsxs("span",{className:"inline-flex items-center space-x-1",children:[e.jsx(k,{className:"h-4 w-4 text-green-500"}),e.jsx("span",{children:"Yes"})]})})]})})]}),s.error&&e.jsxs("div",{className:"card border-red-200 dark:border-red-800",children:[e.jsx("div",{className:"px-4 py-3 border-b border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-900/20",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(x,{className:"h-5 w-5 text-red-500"}),e.jsx("h2",{className:"text-lg font-semibold text-red-700 dark:text-red-400",children:"Error"})]})}),e.jsx("div",{className:"p-4 bg-red-50/50 dark:bg-red-900/10",children:e.jsx("pre",{className:"text-sm text-red-600 dark:text-red-400 font-mono whitespace-pre-wrap overflow-x-auto",children:s.error})})]})]})}export{V as default};
11
+ */const k=n("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);function o(r){return r?r<1024?`${r}B`:r<1024*1024?`${(r/1024).toFixed(1)}KB`:r<1024*1024*1024?`${(r/(1024*1024)).toFixed(1)}MB`:`${(r/(1024*1024*1024)).toFixed(1)}GB`:"-"}const v={export:"text-blue-600 dark:text-blue-400",import:"text-purple-600 dark:text-purple-400",backup:"text-green-600 dark:text-green-400",restore:"text-orange-600 dark:text-orange-400",migrate:"text-cyan-600 dark:text-cyan-400"};function V({entry:r}){const{payload:s,createdAt:i}=r,t=s.status==="completed"?{icon:b,color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30"}:{icon:x,color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30"},m=t.icon,p=v[s.operation]||"text-gray-600 dark:text-gray-400";return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:`p-2 ${t.bg} rounded-lg`,children:e.jsx(d,{className:`h-5 w-5 ${t.color}`})}),e.jsxs("div",{children:[e.jsxs("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:[s.operation.toUpperCase()," - ",s.format]}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Data Dump"})]})]}),(s.source||s.destination)&&e.jsx(N,{text:s.destination||s.source||"",label:"Copy path"})]})}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 divide-x divide-gray-200 dark:divide-gray-700",children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(d,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Operation"})]}),e.jsx("p",{className:`text-lg font-bold ${p}`,children:s.operation.toUpperCase()})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(m,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Status"})]}),e.jsx("p",{className:`text-lg font-bold ${t.color}`,children:s.status.toUpperCase()})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(h,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Records"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:s.recordCount!==void 0?s.recordCount.toLocaleString():"-"})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(j,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Size"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:o(s.fileSize)})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(g,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[s.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]})]})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"*:not-first:border-y-0",children:[e.jsx(a,{label:"Time",value:e.jsxs("span",{children:[f(c(i),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",u(c(i),{addSuffix:!0}),")"]})]})}),e.jsx(a,{label:"Operation",value:e.jsx(l,{listType:"dumps",filterType:"operations",filterValue:s.operation,children:s.operation.toUpperCase()})}),e.jsx(a,{label:"Format",value:e.jsx(l,{listType:"dumps",filterType:"formats",filterValue:s.format,children:s.format})}),e.jsx(a,{label:"Status",value:e.jsx(l,{listType:"dumps",filterType:"statuses",filterValue:s.status,children:s.status.toUpperCase()})}),s.source&&e.jsx(a,{label:"Source",value:e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white break-all",children:s.source})}),s.destination&&e.jsx(a,{label:"Destination",value:e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white break-all",children:s.destination})}),s.recordCount!==void 0&&e.jsx(a,{label:"Records",value:s.recordCount.toLocaleString()}),e.jsx(a,{label:"Size",value:o(s.fileSize)}),e.jsx(a,{label:"Duration",value:`${s.duration}ms`}),s.compressed&&e.jsx(a,{label:"Compressed",value:e.jsxs("span",{className:"inline-flex items-center space-x-1",children:[e.jsx(y,{className:"h-4 w-4 text-blue-500"}),e.jsx("span",{children:"Yes"})]})}),s.encrypted&&e.jsx(a,{label:"Encrypted",value:e.jsxs("span",{className:"inline-flex items-center space-x-1",children:[e.jsx(k,{className:"h-4 w-4 text-green-500"}),e.jsx("span",{children:"Yes"})]})})]})})]}),s.error&&e.jsxs("div",{className:"card border-red-200 dark:border-red-800",children:[e.jsx("div",{className:"px-4 py-3 border-b border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-900/20",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(x,{className:"h-5 w-5 text-red-500"}),e.jsx("h2",{className:"text-lg font-semibold text-red-700 dark:text-red-400",children:"Error"})]})}),e.jsx("div",{className:"p-4 bg-red-50/50 dark:bg-red-900/10",children:e.jsx("pre",{className:"text-sm text-red-600 dark:text-red-400 font-mono whitespace-pre-wrap overflow-x-auto",children:s.error})})]})]})}export{V as default};
@@ -1 +1 @@
1
- import{j as r,H as p}from"./index-CNTaNUkj.js";import{e as M,b as P}from"./vendor-DBTT3jXp.js";import{f as S,p as T}from"./date-Dwgqy666.js";import{u as b,a as A,P as $,R as z,N as H,L}from"./PageHeader-Dhs9cPza.js";import{u as U,r as G,C as l}from"./types-DqF5HlZi.js";import{T as o,D as I,b as K}from"./DataTable-CCXj8zzB.js";import"./timer-CDc7JIAB.js";function Y(){const u=M(),{addFilter:t,clearAll:c,serverFilters:m,headerFilters:h}=U("dumps"),{rangeFilters:x,windowMinutes:g}=b(),{entries:f,loading:y,refreshing:s,error:C,refresh:d,newEntriesCount:j,hasMore:w,loadMore:k,loadNew:N,autoRefreshEnabled:F,live:v,setAutoRefresh:D,meta:i,isHighlighted:E}=A({type:"dump",limit:50,filters:{...m,...x},windowMinutes:g}),n=f.filter(e=>G(e)),R=e=>e?e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)}MB`:`${(e/(1024*1024*1024)).toFixed(1)}GB`:"-",B=P.useMemo(()=>[{key:"operation",header:"Operation",width:"120px",render:e=>r.jsx(l,{onClick:a=>{a.stopPropagation(),t("operations",e.payload.operation)},children:e.payload.operation.toUpperCase()})},{key:"format",header:"Format",width:"100px",render:e=>r.jsx(l,{onClick:a=>{a.stopPropagation(),t("formats",e.payload.format)},className:"font-mono",children:e.payload.format})},{key:"records",header:"Records",width:"100px",align:"right",render:e=>e.payload.recordCount!==void 0?r.jsx(o,{children:e.payload.recordCount.toLocaleString()}):r.jsx(o,{secondary:!0,children:"-"})},{key:"size",header:"Size",width:"100px",align:"right",render:e=>r.jsx(o,{children:R(e.payload.fileSize)})},{key:"status",header:"Status",width:"100px",render:e=>r.jsx(l,{onClick:a=>{a.stopPropagation(),t("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>r.jsx(I,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>r.jsx(o,{secondary:!0,className:"text-xs",children:S(T(e.createdAt),{addSuffix:!0})})}],[t]);return y&&n.length===0?r.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:r.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):r.jsxs("div",{children:[r.jsx($,{title:"Dumps",icon:p,iconColor:"text-slate-600 dark:text-slate-400",count:n.length,totalCount:i==null?void 0:i.total,clearable:{type:"dump",label:"dumps",onCleared:d},refreshing:s,autoRefreshEnabled:F,live:v,onAutoRefreshToggle:D,filters:h,filterControls:r.jsx(z,{route:"dumps"}),onClearAllFilters:c}),r.jsxs("div",{className:"space-y-4",children:[r.jsx(H,{count:j,onClick:N,loading:s}),r.jsx(K,{columns:B,data:n,keyExtractor:e=>e.id,onRowClick:e=>u(`/dumps/${e.id}`),rowClassName:e=>E(e.id)?"highlight-new":"",emptyMessage:"No data dumps recorded yet",error:C,onRetry:d,emptyIcon:r.jsx(p,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),r.jsx(L,{hasMore:w,onClick:k,loading:s})]})]})}export{Y as default};
1
+ import{j as r,H as p}from"./index-BaD1MX7a.js";import{e as M,b as P}from"./vendor-DBTT3jXp.js";import{f as S,p as T}from"./date-Dwgqy666.js";import{u as b,a as A,P as $,R as z,N as H,L}from"./PageHeader-Tnp0JBDF.js";import{u as U,r as G,C as l}from"./types-BHYinjn2.js";import{T as o,D as I,b as K}from"./DataTable-CIlMLJo4.js";import"./timer-D72f3hG4.js";function Y(){const u=M(),{addFilter:t,clearAll:c,serverFilters:m,headerFilters:h}=U("dumps"),{rangeFilters:x,windowMinutes:g}=b(),{entries:f,loading:y,refreshing:s,error:C,refresh:d,newEntriesCount:j,hasMore:w,loadMore:k,loadNew:N,autoRefreshEnabled:F,live:v,setAutoRefresh:D,meta:i,isHighlighted:E}=A({type:"dump",limit:50,filters:{...m,...x},windowMinutes:g}),n=f.filter(e=>G(e)),R=e=>e?e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)}MB`:`${(e/(1024*1024*1024)).toFixed(1)}GB`:"-",B=P.useMemo(()=>[{key:"operation",header:"Operation",width:"120px",render:e=>r.jsx(l,{onClick:a=>{a.stopPropagation(),t("operations",e.payload.operation)},children:e.payload.operation.toUpperCase()})},{key:"format",header:"Format",width:"100px",render:e=>r.jsx(l,{onClick:a=>{a.stopPropagation(),t("formats",e.payload.format)},className:"font-mono",children:e.payload.format})},{key:"records",header:"Records",width:"100px",align:"right",render:e=>e.payload.recordCount!==void 0?r.jsx(o,{children:e.payload.recordCount.toLocaleString()}):r.jsx(o,{secondary:!0,children:"-"})},{key:"size",header:"Size",width:"100px",align:"right",render:e=>r.jsx(o,{children:R(e.payload.fileSize)})},{key:"status",header:"Status",width:"100px",render:e=>r.jsx(l,{onClick:a=>{a.stopPropagation(),t("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>r.jsx(I,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>r.jsx(o,{secondary:!0,className:"text-xs",children:S(T(e.createdAt),{addSuffix:!0})})}],[t]);return y&&n.length===0?r.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:r.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):r.jsxs("div",{children:[r.jsx($,{title:"Dumps",icon:p,iconColor:"text-slate-600 dark:text-slate-400",count:n.length,totalCount:i==null?void 0:i.total,clearable:{type:"dump",label:"dumps",onCleared:d},refreshing:s,autoRefreshEnabled:F,live:v,onAutoRefreshToggle:D,filters:h,filterControls:r.jsx(z,{route:"dumps"}),onClearAllFilters:c}),r.jsxs("div",{className:"space-y-4",children:[r.jsx(H,{count:j,onClick:N,loading:s}),r.jsx(K,{columns:B,data:n,keyExtractor:e=>e.id,onRowClick:e=>u(`/dumps/${e.id}`),rowClassName:e=>E(e.id)?"highlight-new":"",emptyMessage:"No data dumps recorded yet",error:C,onRetry:d,emptyIcon:r.jsx(p,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),r.jsx(L,{hasMore:w,onClick:k,loading:s})]})]})}export{Y as default};