1"use strict";(globalThis.webpackChunkfrontend||=[]).push([[217],{77807(e,t,r){var n=r(9950),a=r(15441),s=r(36150),i=r(51778),o=r(70496),l=r(25081),d=r(81182),u=r(80873),c=r(13839),m=r(74955),h=r(25934),x=r(44414);const b=["admin-generation-queue-stale"];const p={orphan_pending:"orphaned pending",desynced_bull:"queue desynced",stuck_active_pending:"stuck in worker",stranded_processing:"never reached provider"};r.d(t,["G",0,()=>{const{admin:e}=(0,u.b)(),{showError:t,showSuccess:r}=(0,l.A)(),g=(0,a.jE)(),[f,v]=(0,n.useState)(!1),y=(0,c.j)(e)||(0,c._m)(null===e||void 0===e?void 0:e.permissions,c.$4.IMAGES_MANAGE),k=(0,s.I)({queryKey:b,queryFn:()=>m.ZJ.previewStaleGenerationQueues(),enabled:f&&y,staleTime:0}),w=(0,i.n)({mutationFn:()=>m.ZJ.clearStaleGenerationQueues(),onSuccess:e=>{v(!1),g.invalidateQueries({queryKey:b}),r(e.message,"Stale queues cleared")},onError:e=>{t((0,h.sO)(e,"Failed to clear stale queues"),"Stale queues")}}),j=k.data,N=(C=null===j||void 0===j?void 0:j.counts)?C.imagePending+C.imageStranded+C.videoPending+C.videoStranded:0;var C;const D=k.isLoading||k.isError||0===N,M=(0,n.useMemo)(()=>{if(k.isLoading)return"Checking for stuck image and video jobs\u2026";if(k.isError)return(0,h.sO)(k.error,"Could not load stale queue preview.");if(!j)return"This only fails jobs stuck for 15+ minutes with no live worker or provider job. Generations still in progress are left alone.";const e=[`This only fails jobs stuck for at least ${j.minAgeMinutes} minutes: orphaned pending rows and processing jobs that never reached the provider. Jobs waiting in the queue or generating with a provider id are not cleared.`,`Image pending: ${j.counts.imagePending}, stranded processing: ${j.counts.imageStranded}. Video pending: ${j.counts.videoPending}, stranded processing: ${j.counts.videoStranded}. Left alone (live / too new): ${j.counts.skippedLive+j.counts.skippedTooNew}.`];if(0===N)e.push("Nothing to clear right now.");else if(j.samples.length>0){const t=j.samples.slice(0,6);e.push(`Examples: ${t.map(e=>`${e.kind} #${e.id} (${p[e.reason]}, ${e.ageMinutes}m)`).join("; ")}${j.samples.length>t.length?"\u2026":""}`)}return e.join(" ")},[j,k.error,k.isError,k.isLoading,N]);return y?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)("button",{type:"button",onClick:()=>v(!0),className:"inline-flex shrink-0 items-center gap-2 rounded-lg bg-amber-600 px-4 py-2.5 text-sm font-medium text-white shadow-sm transition-colors hover:bg-amber-700",children:[(0,x.jsx)(d.OD,{className:"fa-solid fa-broom text-xs","aria-hidden":!0}),"Clear stale queues"]}),(0,x.jsx)(o.T,{open:f,onOpenChange:v,title:"Clear stale generation queues",description:M,confirmLabel:0===N?"Nothing to clear":`Clear ${N} stale job${1===N?"":"s"}`,cancelLabel:"Cancel",variant:"danger",isLoading:w.isPending||k.isLoading,confirmDisabled:D,closeOnConfirm:!1,onConfirm:()=>{D||w.isPending||w.mutate()}})]}):null}])},22852(e,t,r){var n=r(4174),a=r(81182),s=r(9950),i=r(44414);r.d(t,["J",0,e=>{var t,r,o;let{open:l,onOpenChange:d,title:u="Filters",description:c="Adjust filters and apply to update the list.",sections:m,children:h,onApply:x,onClearAll:b,applyLabel:p="Apply filters",clearLabel:g="Clear all"}=e;const f=m&&m.length>0,v=null!==(t=null===m||void 0===m||null===(r=m[0])||void 0===r?void 0:r.id)&&void 0!==t?t:"",[y,k]=(0,s.useState)(v);(0,s.useEffect)(()=>{l&&v&&k(v)},[l,v]);const w=(0,s.useMemo)(()=>{var e;return null!==m&&void 0!==m&&m.length?null!==(e=m.find(e=>e.id===y))&&void 0!==e?e:m[0]:null},[m,y]),j="auto"!==(null===w||void 0===w?void 0:w.layout);return(0,i.jsx)(n.bL,{open:l,onOpenChange:d,children:(0,i.jsxs)(n.ZL,{children:[(0,i.jsx)(n.hJ,{className:"fixed inset-0 z-[200] bg-black/50 backdrop-blur-sm"}),(0,i.jsxs)(n.UC,{className:"fixed left-1/2 top-1/2 z-[201] flex max-h-[min(94vh,780px)] min-h-0 w-[calc(100vw-1.5rem)] max-w-2xl -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-2xl border border-neutral-200 bg-white shadow-xl focus:outline-none dark:border-neutral-700 dark:bg-neutral-900 dark:shadow-black/40",children:[(0,i.jsxs)("div",{className:"shrink-0 px-5 pt-5 pb-3",children:[(0,i.jsx)(n.hE,{className:"text-lg font-semibold text-neutral-900 dark:text-white",children:u}),(0,i.jsx)(n.VY,{className:"mt-1 text-sm text-neutral-500 dark:text-neutral-400",children:c})]}),f?(0,i.jsxs)("div",{className:"flex min-w-0 border-y border-neutral-200 dark:border-neutral-800 "+(j?"min-h-[min(420px,52vh)] max-h-[min(72vh,62
10px)] flex-1 basis-0 items-stretch":"max-h-[min(64vh,580px)] shrink-0 items-start"),children:[(0,i.jsx)("nav",{className:"flex w-[min(12.5rem,38%)] shrink-0 flex-col gap-1 overflow-y-auto border-r border-neutral-200 bg-neutral-100/80 p-2.5 dark:border-neutral-800 dark:bg-neutral-950/70","aria-label":"Filter categories",children:m.map(e=>{var t;const r=e.id===y;return(0,i.jsxs)("button",{type:"button",onClick:()=>k(e.id),className:"flex w-full items-center gap-2.5 rounded-lg px-3 py-2.5 text-left text-sm font-medium transition-colors "+(r?"bg-sky-100 text-sky-950 shadow-sm ring-1 ring-sky-200/80 dark:bg-primary-500/25 dark:text-primary-50 dark:ring-primary-400/25":"text-neutral-600 hover:bg-white hover:shadow-sm dark:text-neutral-400 dark:hover:bg-neutral-800/90"),children:[(0,i.jsx)("i",{className:`${null!==(t=e.icon)&&void 0!==t?t:"fa-solid fa-sliders"} text-xs opacity-90`,"aria-hidden":!0}),(0,i.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.label}),r?(0,i.jsx)(a.OD,{className:"fa-solid fa-chevron-right text-[10px] opacity-70","aria-hidden":!0}):null]},e.id)})}),(0,i.jsx)("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col bg-neutral-50/90 dark:bg-neutral-900 "+(j?"min-h-[min(420px,52vh)]":""),children:w?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"flex shrink-0 items-center gap-2 border-b border-neutral-200 bg-white px-4 py-3 dark:border-neutral-800 dark:bg-neutral-900/90",children:[(0,i.jsx)("i",{className:`${null!==(o=w.icon)&&void 0!==o?o:"fa-solid fa-sliders"} text-[15px] text-primary-600 dark:text-primary-400`,"aria-hidden":!0}),(0,i.jsx)("span",{className:"text-sm font-semibold tracking-tight text-neutral-900 dark:text-white",children:w.label})]}),(0,i.jsx)("div",{className:"flex flex-col overflow-y-auto bg-white p-3 sm:p-4 dark:bg-neutral-900 "+(j?"min-h-0 flex-1 flex-col":"shrink-0"),children:(0,i.jsx)("div",{className:"min-w-0",children:w.content})})]}):null})]}):h?(0,i.jsx)("div",{className:"max-h-[min(52vh,440px)] overflow-y-auto px-5 pb-2",children:(0,i.jsx)("div",{className:"space-y-4 py-1",children:h})}):null,(0,i.jsxs)("div",{className:"flex shrink-0 flex-wrap items-center justify-end gap-2 border-t border-neutral-200 bg-white px-5 py-4 dark:border-neutral-800 dark:bg-neutral-950/50",children:[b?(0,i.jsx)("button",{type:"button",onClick:()=>{b()},className:"mr-auto rounded-lg px-3 py-2 text-sm font-medium text-neutral-600 hover:bg-neutral-200/80 dark:text-neutral-400 dark:hover:bg-neutral-800/80",children:g}):null,(0,i.jsx)(n.bm,{asChild:!0,children:(0,i.jsx)("button",{type:"button",className:"rounded-lg border border-neutral-200 bg-white px-3 py-2 text-sm font-medium text-neutral-700 hover:bg-neutral-50 dark:border-neutral-600 dar
1k:bg-neutral-900 dark:text-neutral-200 dark:hover:bg-neutral-800/70",children:"Cancel"})}),(0,i.jsx)("button",{type:"button",onClick:()=>{x(),d(!1)},className:"rounded-lg bg-primary-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-primary-700",children:p})]})]})]})})}])},43737(e,t,r){var n=r(36375),a=r(69954),s=r(88167),i=r(9950),o=r(22850),l=(r(76714),r(44414));function d(e){if(null===e||void 0===e||!e.trim())return;const t=(0,s.qg)(e,"yyyy-MM-dd",new Date);return(0,a.f)(t)?t:void 0}r.d(t,["y",0,e=>{var t,r;let{startValue:a,endValue:s,onStartChange:u,onEndChange:c,className:m,treatIncompleteRangeAsSingleDay:h,hideFooterHint:x}=e;const b=(0,i.useMemo)(()=>{const e=d(a),t=d(s);if(e||t)return{from:null!==e&&void 0!==e?e:void 0,to:null!==t&&void 0!==t?t:void 0}},[a,s]),p=null!==(t=null!==(r=null===b||void 0===b?void 0:b.from)&&void 0!==r?r:null===b||void 0===b?void 0:b.to)&&void 0!==t?t:new Date;return(0,l.jsxs)("div",{className:`admin-inline-daterange flex w-full flex-col ${null!==m&&void 0!==m?m:""}`,children:[(0,l.jsx)("div",{className:"w-full shrink-0",children:(0,l.jsx)(o.h,{mode:"range",selected:b,onSelect:e=>{if(!e)return u(""),void c("");const t=e.from?(0,n.GP)(e.from,"yyyy-MM-dd"):"",r=e.to?(0,n.GP)(e.to,"yyyy-MM-dd"):"";u(t),r?c(r):h&&e.from?c((0,n.GP)(e.from,"yyyy-MM-dd")):c("")},defaultMonth:p,numberOfMonths:1,className:"w-full max-w-none rounded-lg p-1 text-neutral-900 [--rdp-accent-color:theme(colors.primary.600)] [--rdp-accent-background-color:theme(colors.primary.50)] [--rdp-nav-height:3rem] dark:text-neutral-100 dark:[--rdp-accent-color:theme(colors.primary.400)] dark:[--rdp-accent-background-color:rgba(129,140,248,0.22)] !mx-0"})}),(0,l.jsxs)("div",{className:"mt-4 shrink-0 space-y-2 border-t border-neutral-100 pt-3 dark:border-neutral-800",children:[x?null:(0,l.jsx)("p",{className:"text-left text-xs leading-snug text-neutral-500 dark:text-neutral-400",children:"Choose a start date and an end date. Picking the same day twice limits results to that day."}),a||s?(0,l.jsx)("button",{type:"button",onClick:()=>{u(""),c("")},className:"w-full rounded-lg py-2 text-center text-xs font-medium text-neutral-500 hover:bg-neutral-100 hover:text-neutral-700 dark:text-neutral-400 dark:hover:bg-neutral-800 dark:hover:text-neutral-200",children:"Clear dates"}):null]})]})}])},89047(e,t,r){r.d(t,{o:()=>a});r(9950);var n=r(44414);function a(e){let{children:t,className:r=""}=e;return(0,n.jsx)("div",{className:`sticky top-0 z-20 border-b border-neutral-200/90 bg-white/95 px-6 py-4 shadow-[0_1px_0_rgba(15,23,42,0.04)] backdrop-blur-md dark:border-neutral-800/90 dark:bg-neutral-900/95 dark:shadow-[0_1px_0_rgba(0,0,0,0.15)] ${r}`.trim(),children:t})}},80493(e,t,r){r.d(t,{c:()=>a});r(9950);var n=r(44414);function a(e){let{active:t,label:r="Updating list\u2026",children:a,className:s=""}=e;return(0,n.jsxs)("div",{className:`relative ${s}`.trim(),children:[a,t?(0,n.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center rounded-b-xl bg-white/80 backdrop-blur-[1px] dark:bg-neutral-950/70","aria-busy":"true","aria-label":r,children:(0,n.jsxs)("div",{className:"flex flex-col items-center gap-2 rounded-xl border border-neutral-200/90 bg-white/95 px-5 py-4 shadow-md dark:border-neutral-700 dark:bg-neutral-900/95",children:[(0,n.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-primary-500 border-t-transparent","aria-hidden":!0}),(0,n.jsx)("span",{className:"text-xs font-medium text-neutral-600 dar
1k:text-neutral-300",children:r})]})}):null]})}},82138(e,t,r){var n=r(9950),a=r(76429),s=r(77457),i=r(27467),o=r(54826),l=r(44414);const d={error:{icon:o.TNq,bgColor:"bg-red-100 dark:bg-red-900/40",borderColor:"border-red-300 dark:border-red-700",textColor:"text-red-900 dark:text-red-100",iconColor:"text-red-600 dark:text-red-400"},success:{icon:o.A7C,bgColor:"bg-green-100 dark:bg-green-900/40",borderColor:"border-green-300 dark:border-green-700",textColor:"text-green-900 dark:text-green-100",iconColor:"text-green-600 dark:text-green-400"},warning:{icon:o.BS8,bgColor:"bg-primary-100 dark:bg-primary-900/40",borderColor:"border-primary-300 dark:border-primary-700",textColor:"text-primary-900 dark:text-primary-100",iconColor:"text-primary-600 dark:text-primary-400"},info:{icon:o.__w,bgColor:"bg-blue-100 dark:bg-blue-900/40",borderColor:"border-blue-300 dark:border-blue-700",textColor:"text-blue-900 dark:text-blue-100",iconColor:"text-blue-600 dark:text-blue-400"}};r.d(t,["F",0,e=>{let{status:t,title:r,message:u,mt:c,mb:m,onDismiss:h,autoDismissAfterMs:x}=e;const b=d[t],p=b.icon,g=Boolean(h)&&("error"===t||"warning"===t),{sizeMultiplier:f}=(0,i.ZE)(),v=Math.min(96,Math.round(18*f)),y=Math.min(96,Math.round(16*f));return(0,n.useEffect)(()=>{if(!h||!x||x<=0)return;const e=window.setTimeout(h,x);return()=>window.clearTimeout(e)},[h,x,u]),(0,l.jsx)(a.N,{children:(0,l.jsx)("div",{className:`${b.bgColor} ${b.borderColor} border rounded-lg p-4 relative`,style:{marginTop:c,marginBottom:m},children:(0,l.jsx)(s.P.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.3},children:(0,l.jsxs)("div",{className:"flex items-start gap-3",children:[(0,l.jsx)(p,{className:`${b.iconColor} flex-shrink-0 mt-0.5`,size:v}),(0,l.jsxs)("div",{className:"flex-1 min-w-0 pr-1",children:[r&&(0,l.jsx)("h4",{className:`${b.textColor} font-semibold text-sm mb-1`,children:r}),"string"===typeof u?(0,l.jsx)("p",{className:`${b.textColor} text-sm`,children:u}):(0,l.jsx)("div",{className:`${b.textColor} text-sm`,children:u})]}),g&&(0,l.jsx)("button",{type:"button",onClick:h,className:`flex-shrink-0 rounded-md p-1.5 transition-colors hover:bg-black/10 dark:hover:bg-white/10 ${b.textColor}`,"aria-label":"Dismiss",children:(0,l.jsx)(o.QCr,{size:y})})]})})})})}])},70496(e,t,r){r(9950);var n=r(81182),a=r(18247),s=r(44414);r.d(t,["T",0,e=>{let{open:t,onOpenChange:r,title:i,description:o,confirmLabel:l="Confirm",cancelLabel:d="Cancel",onConfirm:u,variant:c="default",isLoading:m=!1,confirmDisabled:h=!1,closeOnConfirm:x=!0}=e;return(0,s.jsx)(a.bL,{open:t,onOpenChange:r,children:(0,s.jsxs)(a.ZL,{children:[(0,s.jsx)(a.hJ,{className:"fixed inset-0 bg-black/75 backdrop-blur-sm z-50"}),(0,s.jsxs)(a.UC,{className:"fixed top-[50%] left-[50%] max-w-md w-[90vw] translate-x-[-50%] translate-y-[-50%] rounded-2xl bg-neutral-950 border border-neutral-800 shadow-2xl focus:outline-none z-50 overflow-hidden p-0",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3 px-5 py-4 border-b border-white/10",children:[(0,s.jsx)(a.hE,{className:"text-lg font-semibold text-white pr-2",children:i}),(0,s.jsx)("button",{type:"button","aria-label":"Close",disabled:m,onClick:()=>r(!1),className:"flex-shrink-0 w-9 h-9 rounded-full bg-white/10 text-white/80 hover:text-white hover:bg-white/15 transition-colors flex items-center justify-center disabled:opacity-40 disabled:cursor-not-allowed",children:(0,s.jsx)(n.OD,{className:"fa-solid fa-xmark text-sm"})})]}),(0,s.jsx)("div",{className:"px-5 py-4",children:(0,s.jsx)(a.VY,{className:"text-sm text-neutral-400 leading-relaxed",children:o})}),(0,s.jsxs)("div",{className:"flex items-center justify-end gap-3 px-5 py-4 border-t border-white/10 bg-neutral-900/80",children:[(0,s.jsx)(a.ZD,{asChild:!0,children:(0,s.jsx)("button",{type:"button",disabled:m,className:"px-5 py-2.5 rounded-xl text-sm font-medium border border-white/20 bg-transparent text-neutral-200 hover:bg-white/5 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:d})}),(0,s.jsx)(a.rc,{asChild:!0,children:(0,s.jsx)("button",{type:"button",onClick:()=>{m||h||(u(),x&&r(!1))},disabled:m||h,className:"px-5 py-2.5 rounded-xl text-sm font-medium transition-all shadow-md disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2 "+("danger"===c?"bg-red-600 text-white hover:bg-red-500":"bg-gradient-cta hover:brightness-110 text-white shadow-cta"),children:m?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"w-4 h-4 border-2 border-white border-t-transparent roun
1ded-full animate-spin"}),"Processing..."]}):l})})]})]})]})})}])},16208(e,t,r){var n=r(9950),a=r(81182),s=r(44414);const i=e=>{let{page:t,usersData:r,setPage:i,searchParams:o,setSearchParams:l,syncSearchParams:d=!0}=e;const u=r.meta.totalPages,c=r.meta.page||t,m=()=>window.innerWidth>=1300?10:window.innerWidth>=768?7:5,[h,x]=(0,n.useState)(m());(0,n.useEffect)(()=>{const e=()=>{x(m())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const b=(()=>{if(u<=h)return Array.from({length:u},(e,t)=>t+1);let e=Math.max(1,c-Math.floor(h/2)),t=Math.min(u,e+h-1);return t-e<h-1&&(e=Math.max(1,t-h+1)),Array.from({length:t-e+1},(t,r)=>e+r)})(),p=e=>{if(!(e<1||e>u||e===c)){if(i(e),d){const t=new URLSearchParams(o);t.set("page",e.toString()),l(t)}window.scrollTo({top:0,behavior:"smooth"})}},g=()=>p(1),f=()=>p(u);return u<=1?null:(0,s.jsx)("nav",{className:"mt-6 flex justify-center px-4",children:(0,s.jsxs)("div",{className:"flex items-center gap-1 sm:gap-2 w-full max-w-fit",children:[(0,s.jsx)("button",{type:"button",onClick:g,disabled:1===c,className:"flex-shrink-0 px-3 py-2 border border-neutral-200 dark:border-neutral-800 rounded-lg bg-white dark:bg-neutral-900 text-neutral-700 dark:text-neutral-300 hover:bg-neutral-50 dark:hover:bg-neutral-800/50 disabled:opacity-30 disabled:cursor-not-allowed transition-colors text-xs sm:text-sm font-medium","aria-label":"First page",children:(0,s.jsx)(a.OD,{className:"fa-solid fa-angles-left"})}),(0,s.jsxs)("button",{type:"button",onClick:()=>p(c-1),disabled:1===c,className:"flex-shrink-0 px-3 py-2 border border-neutral-200 dark:border-neutral-800 rounded-lg bg-white dark:bg-neutral-900 text-neutral-700 dark:text-neutral-300 hover:bg-neutral-50 dark:hover:bg-neutral-800/50 disabled:opacity-30 disabled:cursor-not-allowed transition-colors text-xs sm:text-sm font-medium","aria-label":"Previous page",children:[(0,s.jsx)(a.OD,{className:"fa-solid fa-chevron-left mr-1 sm:mr-2"}),(0,s.jsx)("span",{className:"hidden sm:inline",children:"Previous"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[b[0]>1&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{type:"button",onClick:g,className:"min-w-[32px] sm:min-w-[40px] h-8 sm:h-10 flex items-center justify-center rounded-lg text-xs sm:text-sm font-medium border border-neutral-200 dark:border-neutral-800 bg-white dark:bg-neutral-900 text-neutral-700 dark:text-neutral-300 hover:bg-neutral-50 dark:hover:bg-neutral-800/50 transition-colors",children:"1"}),b[0]>2&&(0,s.jsx)("span",{className:"px-2 text-neutral-500 dark:text-neutral-400",children:"..."})]}),b.map(e=>(0,s.jsx)("button",{type:"button",onClick:()=>p(e),className:"min-w-[32px] sm:min-w-[40px] h-8 sm:h-10 flex items-center justify-center rounded-lg text-xs sm:text-sm font-medium transition-all "+(c===e?"bg-primary-600 text-white shadow-md border-primary-600":"border border-neutral-200 dark:border-neutral-800 bg-white dark:bg-neutral-900 text-neutral-700 dark:text-neutral-300 hover:bg-neutral-50 dark:hover:bg-neutral-800/50"),"aria-label":`Page ${e}`,"aria-current":c===e?"page":void 0,children:e},e)),b[b.length-1]<u&&(0,s.jsxs)(s.Fragment,{children:[b[b.length-1]<u-1&&(0,s.jsx)("span",{className:"px-2 text-neutral-500 dark:text-neutral-400",children:"..."}),(0,s.jsx)("button",{type:"button",onClick:f,className:"min-w-[32px] sm:min-w-[40px] h-8 sm:h-10 flex items-center justify-center rounded-lg text-xs sm:text-sm font-medium border border-neutral-200 dark:border-neutral-800 bg-white dark:bg-neutral-900 text-neutral-700 dark:text-neutral-300 hover:bg-neutral-50 dark:hover:bg-neutral-800/50 transition-colors",children:u})]})]}),(0,s.jsxs)("button",{type:"button",onClick:()=>p(c+1),disabled:c===u,className:"flex-shrink-0 px-3 py-2 border border-neutral-200 dark:border-neutral-800 rounded-lg bg-white dark:bg-neutral-900 text-neutral-700 dark:text-neutral-300 hover:bg-neutral-50 dark:hover:bg-neutral-800/50 disabled:opacity-30 disabled:cursor-not-allowed transition-colors text-xs sm:text-sm font-medium","aria-label":"Next page",children:[(0,s.jsx)("span",{className:"hidden sm:inline",children:"Next"}),(0,s.jsx)(a.OD,{className:"fa-solid fa-chevron-right ml-1 sm:ml-2"})]}),(0,s.jsx)("button",{type:"button",onClick:f,disabled:c===u,className:"flex-shrink-0 px-3 py-2 border border-neutral-200 dark:border-neutral-800 rounded-lg bg-white dark:bg-neutral-900 text-neutral-700 dark:text-neutral-300 hover:bg-neutral-50 dark:hover:bg-neutral-800/50 disabled:opacity-30 disabled:cursor-not-allowed transition-colors text-xs sm:text-sm font-medium","aria-label":"Last page",children:(0,s.jsx)(a.OD,{className:"fa-solid fa-angles-right"})})]})})},o=n.memo(i);r.d(t,["A",0,o])},56113(e,t,r){r.d(t,{AdminVideos:()=>l});r(9950);var n=r(70778),a=r(88287),s=r(77807),i=r(33878),o=r(44414);const l=()=>(0,o.jsx)(a.U,{children:(0,o.jsx)("div",{className:"min-h-screen bg-neutral-50 dark:bg-gradient-app-canvas",children:(0,o.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[(0,o.jsxs)("div",{className:"mb-8 flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h1",{className:"text-2xl font-semibold text-neutral-900 dark:text-white mb-1",children:"Videos Management"}),(0,o.jsxs)("p",{className:"text-sm text-neutral-500 dark:text-neutral-400",children:["View and monitor generated videos (including lip-sync outputs). Use the filter to show lip-sync only, or open"," ",(0,o.jsx)(n.N_,{to:"/admin/generations",className:"text-primary-600 dark:text-primary-400 hover:underline",children:"Music & voice"})," ","for audio-only tools."]})]}),(0,o.jsx)(s.G,{})]}),(0,o.jsx)(i.A,{})]})})})},58247(e,t,r){const n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"short";if(!e)return"N/A";const r="string"===typeof e?new Date(e):e;return isNaN(r.getTime())?"N/A":"long"===t?r.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"}):r.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})},a=e=>{if(!e)return"N/A";
1return new Date(e).toLocaleString("en-GB",{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0,timeZone:"Africa/Lagos"})};r.d(t,["YS",0,a,"Yq",0,n,"ak",0,e=>{if(!e)return"N/A";const t="string"===typeof e?new Date(e):e;if(isNaN(t.getTime()))return"N/A";const r=new Date,a=Math.floor((r.getTime()-t.getTime())/1e3);if(a<0)return"just now";const s=604800,i=86400,o=3600,l=60;if(a<l)return"just now";if(a<o){const e=Math.floor(a/l);return`${e} ${1===e?"min":"mins"} ago`}if(a<i){const e=Math.floor(a/o);return`${e} ${1===e?"hr":"hrs"} ago`}if(a<s){const e=Math.floor(a/i);return`${e} ${1===e?"day":"days"} ago`}return n(t,"short")}])},25967(e,t,r){function n(e){return t=>{var r,n;if(null==t.clipboardData)return;const a=t.clipboardData.getData("text/plain");if(null==a)return;t.preventDefault();const s=t.currentTarget,i=null!==(r=s.selectionStart)&&void 0!==r?r:0,o=null!==(n=s.selectionEnd)&&void 0!==n?n:0;e(e=>e.slice(0,i)+a+e.slice(o));const l=i+a.length;queueMicrotask(()=>{try{s.setSelectionRange(l,l)}catch{}s.focus()})}}r.d(t,{C:()=>n})},18247(e,t,r){r.d(t,{UC:()=>M,VY:()=>$,ZD:()=>O,ZL:()=>C,bL:()=>N,hE:()=>S,hJ:()=>D,rc:()=>A});var n=r(9950),a=r(65797),s=r(61167),i=r(4174),o=r(20949),l=r(44414),d=Object.defineProperty,u=(e,t)=>d(e,"name",{value:t,configurable:!0}),[c,m]=(0,a.A)("AlertDialog",[i.Hs]),h=(0,i.Hs)(),x=u(e=>{const{__scopeAlertDialog:t,...r}=e,n=h(t);return(0,l.jsx)(i.bL,{...n,...r,modal:!0})},"AlertDialog"),b=(n.forwardRef(u(function(e,t){const{__scopeAlertDialog:r,...n}=e,a=h(r);return(0,l.jsx)(i.l9,{...a,...n,ref:t})},"AlertDialogTrigger")),u(e=>{const{__scopeAlertDialog:t,...r}=e,n=h(t);return(0,l.jsx)(i.ZL,{...n,...r})},"AlertDialogPortal")),p=n.forwardRef(u(function(e,t){const{__scopeAlertDialog:r,...n}=e,a=h(r);return(0,l.jsx)(i.hJ,{...a,...n,ref:t})},"AlertDialogOverlay")),[g,f]=c("AlertDialogContent"),v=n.forwardRef(u(function(e,t){const{__scopeAlertDialog:r,children:a,...d}=e,u=h(r),c=n.useRef(null),m=(0,s.s)(t,c),x=n.useRef(null);return(0,l.jsx)(g,{scope:r,cancelRef:x,children:(0,l.jsx)(i.UC,{role:"alertdialog",...u,...d,ref:m,onOpenAutoFocus:(0,o.mK)(d.onOpenAutoFocus,e=>{e.preventDefault(),x.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:a})})},"AlertDialogContent")),y=n.forwardRef(u(function(e,t){const{__scopeAlertDialog:r,...n}=e,a=h(r);return(0,l.jsx)(i.hE,{...a,...n,ref:t})},"AlertDialogTitle")),k=n.forwardRef(u(function(e,t){const{__scopeAlertDialog:r,...n}=e,a=h(r);return(0,l.jsx)(i.VY,{...a,...n,ref:t})},"AlertDialogDescription")),w=n.forwardRef(u(function(e,t){const{__scopeAlertDialog:r,...n}=e,a=h(r);return(0,l.jsx)(i.bm,{...a,...n,ref:t})},"AlertDialogAction")),j=n.forwardRef(u(function(e,t){const{__scopeAlertDialog:r,...n}=e,{cancelRef:a}=f("AlertDialogCancel",r),o=h(r),d=(0,s.s)(t,a);return(0,l.jsx)(i.bm,{...o,...n,ref:d})},"AlertDialogCancel")),N=x,C=b,D=p,M=v,A=w,O=j,S=y,$=k},51778(e,t,r){r.d(t,{n:()=>u});var n=r(15441),a=r(9950),s=r(61664),i=r(95732),o=r(15941),l=r(92750),d=class extends i.Q{#e;#t=void 0;#r;#n;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,s.f8)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,s.EN)(t.mutationKey)!==(0,s.EN)(this.options.mutationKey)?this.reset():"pending"===this.#r?.state.status&&this.#r.setOptions(this.options)}onSubscribe(){1===this.listeners.size&&this.#r&&(this.#r.addObserver(this),this.#a())}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#a(),this.#s(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#a(),this.#s()}mutate(e,t){return this.#n=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#a(){const e=this.#r?.state??(0,l.$)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#s(e){o.jG.batch(()=>
1{if(this.#n&&this.hasListeners()){const r=this.#t.variables,n=this.#t.context,a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if("success"===e?.type){try{this.#n.onSuccess?.(e.data,r,n,a)}catch(t){Promise.reject(t)}try{this.#n.onSettled?.(e.data,null,r,n,a)}catch(t){Promise.reject(t)}}else if("error"===e?.type){try{this.#n.onError?.(e.error,r,n,a)}catch(t){Promise.reject(t)}try{this.#n.onSettled?.(void 0,e.error,r,n,a)}catch(t){Promise.reject(t)}}}this.listeners.forEach(e=>{e(this.#t)})})}};function u(e,t){const r=(0,n.jE)(t),[i]=a.useState(()=>new d(r,e));a.useEffect(()=>{i.setOptions(e)},[i,e]);const l=a.useSyncExternalStore(a.useCallback(e=>i.subscribe(o.jG.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),u=a.useCallback(function(){i.mutate(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1]).catch(s.lQ)},[i]);if(l.error&&(0,s.GU)(i.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:u,mutateAsync:l.mutate}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.