PageSourceSearch

https://nychthemeron.vercel.app/assets/AdminPage-zvry3Be5.js

js nychthemeron.vercel.app collected 2026-10-09 22:05:50 UTC 44,766 bytes, 5 lines download raw bytes

1import{r as c,j as e,aX as Oe,aY as Ue,l as te,aZ as He,a_ as Qe,a$ as We,m as de,d as Ze,h as Xe,b0 as Se,aw as ge,aA as ve,b1 as Ye,a9 as Je,b2 as ea,a3 as aa,ak as ta,ag as B,O as je,$ as sa,b3 as J,q as ra,z as ye,b4 as Ne,b5 as we}from"./vendor-ui-D1HVVX_b.js";import{a as G,N as na}from"./Navbar-DNnzohoT.js";import{k as j,l as ia,u as ca,d as la,H as oa,e as _e,c as g,s as o}from"./index-dNOZpEEP.js";import{a as ee}from"./useQuery-DfI5LXXJ.js";import{C as T,a as L,b as z,c as F,d as R}from"./card-DVJKtxLK.js";import{B as m}from"./button-CFbj7o_C.js";import{I as ke}from"./input-BVG916Da.js";import{T as da}from"./textarea-BOPl-8NH.js";import{D as pa,b as xa,d as Ce,c as Te,e as ma,f as ua}from"./dialog-DW6xudHq.js";import{m as ae}from"./vendor-framer-B4EWkOoB.js";import"./vendor-supabase-CXCDHvas.js";import"./useProfile-DJfBMmoO.js";import"./ModeToggle-CdUmTDbv.js";import"./vendor-react-D1Y29V_l.js";import"./index-DubIGhep.js";import"./formatDistanceToNow-Cgxttm8N.js";import"./en-US-BddybvhD.js";const $=c.forwardRef(({className:s,...n},i)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:i,className:j("w-full caption-bottom text-sm",s),...n})}));$.displayName="Table";const V=c.forwardRef(({className:s,...n},i)=>e.jsx("thead",{ref:i,className:j("[&_tr]:border-b",s),...n}));V.displayName="TableHeader";const K=c.forwardRef(({className:s,...n},i)=>e.jsx("tbody",{ref:i,className:j("[&_tr:last-child]:border-0",s),...n}));K.displayName="TableBody";const ha=c.forwardRef(({className:s,...n},i)=>e.jsx("tfoot",{ref:i,className:j("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...n}));ha.displayName="TableFooter";const u=c.forwardRef(({className:s,...n},i)=>e.jsx("tr",{ref:i,className:j("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",s),...n}));u.displayName="TableRow";const h=c.forwardRef(({className:s,...n},i)=>e.jsx("th",{ref:i,className:j("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",s),...n}));h.displayName="TableHead";const l=c.forwardRef(({className:s,...n},i)=>e.jsx("td",{ref:i,className:j("p-4 align-middle [&:has([role=checkbox])]:pr-0",s),...n}));l.displayName="TableCell";const ba=c.forwardRef(({className:s,...n},i)=>e.jsx("caption",{ref:i,className:j("mt-4 text-sm text-muted-foreground",s),...n}));ba.displayName="TableCaption";var se="Tabs",[fa]=Xe(se,[Se]),Re=Se(),[ga,pe]=fa(se),Pe=c.forwardRef((s,n)=>{const{__scopeTabs:i,value:x,onValueChange:b,defaultValue:y,orientation:p="horizontal",dir:_,activationMode:S="automatic",...P}=s,f=Oe(_),[d,k]=Ue({prop:x,onChange:b,defaultProp:y??"",caller:se});return e.jsx(ga,{scope:i,baseId:He(),value:d,onValueChange:k,orientation:p,dir:f,activationMode:S,children:e.jsx(te.div,{dir:f,"data-orientation":p,...P,ref:n})})});Pe.displayName=se;var De="TabsList",Ae=c.forwardRef((s,n)=>{const{__scopeTabs:i,loop:x=!0,...b}=s,y=pe(De,i),p=Re(i);return e.jsx(Qe,{asChild:!0,...p,orientation:y.orientation,dir:y.dir,loop:x,children:e.jsx(te.div,{role:"tablist","aria-orientation":y.orientation,...b,ref:n})})});Ae.displayName=De;var Ee="TabsTrigger",Le=c.forwardRef((s,n)=>{const{__scopeTabs:i,value:x,disabled:b=!1,...y}=s,p=pe(Ee,i),_=Re(i),S=Me(p.baseId,x),P=qe(p.baseId,x),f=x===p.value;return e.jsx(We,{asChild:!0,..._,focusable:!b,active:f,children:e.jsx(te.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":P,"data-state":f?"active":"inactive","data-disabled":b?"":void 0,disabled:b,id:S,...y,ref:n,onMouseDown:de(s.onMouseDown,d=>{!b&&d.button===0&&d.ctrlKey===!1?p.onValueChange(x):d.preventDefault()}),onKeyDown:de(s.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&p.onValueChange(x)}),onFocus:de(s.onFocus,()=>{const d=p.activationMode!=="manual";!f&&!b&&d&&p.onValueChange(x)})})})});Le.displayName=Ee;var Fe="TabsContent",Ie=c.forwardRef((s,n)=>{const{__scopeTabs:i,value:x,forceMount:b,children:y,...p}=s,_=pe(Fe,i),S=Me(_.baseId,x),P=qe(_.baseId,x),f=x===_.value,d=c.useRef(f);return c.useEffect(()=>{const k=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(k)},[]),e.jsx(Ze,{present:b||f,children:({present:k})=>e.jsx(te.div,{"data-state":f?"active":"inactive","data-orientation":_.orientation,role:"tabpanel","aria-labelledby":S,hidden:!k,id:P,tabIndex:0,...p,ref:n,style:{...s.style,animationDuration:d.current?"0s":void 0},children:k&&y})})});Ie.displayName=Fe;function Me(s,n){return`${s}-trigger-${n}`}function qe(s,n){return`${s}-content-${n}`}var va=Pe,Be=Ae,ze=Le,Ge=Ie;const ja=va,$e=c.forwardRef(({className:s,...n},i)=>e.jsx(Be,{ref:i,className:j("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",s),...n}));$e.displayName=Be.displayName;const O=c.forwardRef(({className:s,...n},i)=>e.jsx(ze,{ref:i,className:j("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",s),...n}));O.displayName=ze.displayName;const U=c.forwardRef(({className:s,...n},i)=>e.jsx(Ge,{ref:i,className:j("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...n}));U.displayName=Ge.displayName;const ya=ia("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function C({className:s,variant:n,...i}){return e.jsx("div",{className:j(ya({variant:n}),s),...i})}const Ba=()=>{const{user:s}=ca(),n=la(),[i,x]=c.useState(""),[b,y]=c.useState(!0),[p,_]=c.useState(!0),[S,P]=c.useState(!0),[f,d]=c.useState(!1),[k,D]=c.useState(""),[H,A]=c.useState(""),[v,I]=c.useState(null),{data:re,isLoading:ne}=ee({queryKey:["admin-stats"],queryFn:async()=>{const a=_e(),t=new Date(a.getTime()-1440*60*1e3).toISOString(),[{count:r},{count:N},{count:w}]=await Promise.all([o.from("posts").select("id",{count:"exact",head:!0}).gt("created_at",t),o.from("comments").select("id",{count:"exact",head:!0}).gt("created_at",t),o.from("profiles").select("id",{count:"exact",head:!0})]);
1return{usersTotal:w??0,postsLast24h:r??0,commentsLast24h:N??0}},staleTime:1e3*60}),{data:Q=[],isLoading:xe}=ee({queryKey:["admin-posts"],queryFn:async()=>{const{data:a,error:t}=await o.from("posts").select(`id, content, created_at, user_id,
2           profiles!posts_user_id_fkey ( username, display_name )`).order("created_at",{ascending:!1}).limit(50);if(t)throw t;return a.map(r=>({id:r.id,content:r.content,created_at:r.created_at,user_id:r.user_id,profiles:r.profiles}))}}),{data:W=[],isLoading:me}=ee({queryKey:["admin-users"],queryFn:async()=>{const{data:a,error:t}=await o.from("profiles").select("id, user_id, username, display_name, banned_until, ban_permanent, ban_reason, ban_scopes").order("created_at",{ascending:!1}).limit(200);if(t&&/ban_permanent/i.test(t.message||"")){const{data:r,error:N}=await o.from("profiles").select("id, user_id, username, display_name, banned_until, ban_reason, ban_scopes").order("created_at",{ascending:!1}).limit(200);if(N)throw N;return(r||[]).map(w=>({...w,ban_permanent:!1}))}if(t)throw t;return(a||[]).map(r=>({...r,ban_permanent:!!r.ban_permanent}))}}),{data:M=[],isLoading:ue}=ee({queryKey:["admin-pending-games"],queryFn:async()=>{const{data:a,error:t}=await o.from("game_house").select(`
3          id, title, description, html_storage_path, submitted_by, created_at, draft_data,
4          profiles!game_house_submitted_by_fkey ( username, display_name )
5        `).or("status.eq.pending,draft_data.neq.null").order("created_at",{ascending:!1});if(t)throw t;return a}}),ie=G({mutationFn:async a=>{const{data:t}=await o.from("posts").select("media_url").eq("id",a).single();if(t?.media_url&&t.media_url.includes("post-media"))try{const N=t.media_url.split("post-media/");if(N.length>1){const w=N[1].split(/[?#]/)[0];await o.storage.from("post-media").remove([w])}}catch(N){console.error("Storage cleanup failed:",N)}const{error:r}=await o.rpc("admin_delete_post",{p_post_id:a});if(r)throw r},onSuccess:()=>{n.invalidateQueries({queryKey:["admin-posts"]}),n.invalidateQueries({queryKey:["posts"]}),g.success("Post deleted as admin.")},onError:()=>g.error("Failed to delete post.")}),ce=G({mutationFn:async a=>{const t={p_user_id:a.userId,p_minutes:a.minutes,p_reason:a.reason??null,p_scopes:a.scopes};a.permanent&&(t.p_permanent=!0);const{error:r}=await o.rpc("admin_ban_user",t);if(r)throw r},onSuccess:()=>{n.invalidateQueries({queryKey:["admin-users"]}),g.success("User banned.")},onError:a=>{const t=String(a?.message||"");if(t.includes("admin_ban_user")&&t.includes("does not exist")){g.error("Permanent ban requires the latest DB migration. Run migration and try again.");return}g.error("Failed to ban user.")}}),E=G({mutationFn:async a=>{const{error:t}=await o.rpc("admin_unban_user",{p_user_id:a});if(t)throw t},onSuccess:()=>{n.invalidateQueries({queryKey:["admin-users"]}),g.success("User unbanned.")},onError:()=>g.error("Failed to unban user.")}),Z=G({mutationFn:async a=>{if(a.draft_data){a.html_storage_path&&await o.storage.from("game-house").remove([a.html_storage_path]);const{error:t}=await o.from("game_house").update({status:"approved",title:a.draft_data.title,description:a.draft_data.description,html_storage_path:a.draft_data.html_storage_path,draft_data:null}).eq("id",a.id);if(t)throw t}else{const{error:t}=await o.from("game_house").update({status:"approved"}).eq("id",a.id);if(t)throw t}if(s)try{const{error:t}=await o.rpc("notify_user_game_status",{p_user_id:a.submitted_by,p_actor_id:s.id,p_status:"approved"});t&&console.error("Failed to send approval notification:",t)}catch(t){console.error("Error sending approval notification:",t)}},onSuccess:()=>{n.invalidateQueries({queryKey:["admin-pending-games"]}),g.success("Game approved and is now live!")},onError:()=>g.error("Failed to approve game.")}),X=G({mutationFn:async a=>{if(a.draft_data){a.draft_data.html_storage_path&&await o.storage.from("game-house").remove([a.draft_data.html_storage_path]);const{error:t}=await o.from("game_house").update({status:"approved",draft_data:null}).eq("id",a.id);if(t)throw t}else{const{error:t}=await o.storage.from("game-house").remove([a.html_storage_path]);t&&console.error("Storage cleanup failed:",t);const{error:r}=await o.from("game_house").delete().eq("id",a.id);if(r)throw r}if(s)try{const{error:t}=await o.rpc("notify_user_game_status",{p_user_id:a.submitted_by,p_actor_id:s.id,p_status:"rejected"});t&&console.error("Failed to send rejection notification:",t)}catch(t){console.error("Error sending rejection notification:",t)}},onSuccess:(a,t)=>{n.invalidateQueries({queryKey:["admin-pending-games"]}),g.success(t.draft_data?"Edit rejected. Original game restored.":"Game rejected and deleted.")},onError:()=>g.error("Failed to reject game.")}),he=a=>{I({type:"delete_post",targetId:a}),D(""),A(""),d(!0)},be=(a,t,r,N=!1)=>{const w=[];if(b&&w.push("post","comment"),p&&w.push("social"),S&&w.push("message"),w.length===0){g.error("Select at least one action to block before banning.");return}I({type:"ban_user",targetId:a,params:{minutes:t,scopes:w,permanent:N},label:r}),D(""),A(""),d(!0)},fe=a=>{I({type:"unban_user",targetId:a}),D(""),A(""),d(!0)},Ve=()=>{if(k==="CONFIRM"&&v){if(v.type==="ban_user"&&!H.trim()){g.error("Please write a ban reason before banning.");return}switch(v.type){case"delete_post":ie.mutate(v.targetId);break;case"ban_user":ce.mutate({userId:v.targetId,minutes:v.params.minutes,reason:H.trim(),scopes:v.params.scopes,permanent:v.params.permanent});break;case"unban_user":E.mutate(v.targetId);break}d(!1),I(null),D(""),A("")}},le=a=>a.ban_permanent?!0:a.banned_until?new Date(a.banned_until)>_e():!1,Y=c.useMemo(()=>{const a=i.toLowerCase();
5return W.filter(t=>!a||t.username.toLowerCase().includes(a)||t.display_name.toLowerCase().includes(a))},[W,i]),q=c.useMemo(()=>W.filter(a=>le(a)),[W]),Ke={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.1}}},oe={hidden:{opacity:0,y:10},visible:{opacity:1,y:0}};return e.jsxs("div",{className:"min-h-screen bg-background text-foreground transition-colors duration-300",children:[e.jsx(oa,{children:e.jsx("title",{children:"Nychthemeron — Admin"})}),e.jsx(na,{}),e.jsxs("main",{className:"max-w-7xl mx-auto px-4 sm:px-6 py-6 sm:py-10 space-y-8 sm:space-y-10",children:[e.jsxs("header",{className:"flex flex-col md:flex-row md:items-end justify-between gap-6 border-b border-border pb-8",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("h1",{className:"text-2xl sm:text-4xl font-black tracking-tighter uppercase italic",children:["Moderation ",e.jsx("span",{className:"text-primary italic",children:"Command"})]}),e.jsx("p",{className:"text-muted-foreground font-medium text-sm",children:"Secured administrative oversight and behavioral control."})]}),e.jsx("div",{className:"flex items-center gap-3 bg-secondary/30 p-1 rounded-sm border border-border backdrop-blur-md",children:e.jsxs("div",{className:"px-3 py-1 flex items-center gap-2",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-emerald-500 animate-pulse"}),e.jsx("span",{className:"text-[10px] uppercase font-bold tracking-widest opacity-70",children:"Server Live"})]})})]}),e.jsx(pa,{open:f,onOpenChange:a=>{d(a),a||(I(null),D(""),A(""))},children:e.jsxs(xa,{className:"rounded-none border-border bg-background backdrop-blur-xl border-l-4 border-l-primary gap-6 p-6 sm:p-8",children:[e.jsx(Ce,{className:"sr-only",children:"Edit User"}),e.jsx(Te,{className:"sr-only",children:"Admin tool to modify user profile details and status."}),e.jsxs(ma,{className:"space-y-4",children:[e.jsx("div",{className:"bg-primary/20 p-4 w-fit border-2 border-primary/40 shadow-[0_0_20px_rgba(244,63,94,0.15)] mb-2",children:e.jsx(ge,{className:"w-8 h-8 text-primary",strokeWidth:2.5})}),e.jsxs("div",{children:[e.jsx(Ce,{className:"text-2xl font-black uppercase tracking-tight italic",children:"Authorization Required"}),e.jsxs(Te,{className:"text-[10px] font-bold uppercase text-muted-foreground",children:["Executing protocol: ",e.jsx("span",{className:"text-primary font-black underline decoration-primary/30",children:v?.type.replace(/_/g," ")})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("p",{className:"text-[11px] font-bold leading-relaxed uppercase italic text-muted-foreground",children:["This action is significant and will be logged. Type ",e.jsx("span",{className:"text-primary font-black underline",children:"CONFIRM"})," to bypass security locks."]}),v?.type==="ban_user"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-[10px] uppercase font-black tracking-widest text-primary",children:"Ban Reason"}),e.jsx(da,{id:"ban-reason",name:"ban-reason",autoComplete:"off",className:"rounded-none bg-background border-border min-h-20 text-[11px] font-medium placeholder:opacity-40 focus:border-primary/50",placeholder:"Write why this user is being banned...",value:H,onChange:a=>A(a.target.value),maxLength:300}),e.jsx("p",{className:"text-[9px] uppercase font-bold text-muted-foreground",children:"This reason is shown to the user while the ban is active."})]}),e.jsx(ke,{id:"admin-confirm",name:"admin-confirm",autoComplete:"off",className:"rounded-none bg-background border-border h-11 text-center font-black tracking-[0.2em] uppercase text-primary placeholder:opacity-20 translate-x-[2px] focus:border-primary/50",placeholder:"TYPE HERE",value:k,onChange:a=>D(a.target.value)})]}),e.jsxs(ua,{className:"flex sm:flex-row gap-2 mt-4",children:[e.jsx(m,{variant:"outline",className:"rounded-none h-11 flex-1 uppercase font-black text-[10px] border-border hover:bg-secondary/10 transition-all",onClick:()=>{d(!1),I(null),D(""),A("")},children:"Abort"}),e.jsx(m,{variant:"destructive",className:"rounded-none h-11 flex-1 uppercase font-black text-[10px] italic shadow-[4px_4px_0px_rgba(244,63,94,0.2)] disabled:opacity-30 disabled:grayscale transition-all active:translate-x-[2px] active:translate-y-[2px] active:shadow-none",disabled:k!=="CONFIRM"||v?.type==="ban_user"&&!H.trim(),onClick:Ve,children:"Execute"})]})]})}),e.jsxs(ae.section,{variants:Ke,initial:"hidden",animate:"visible",className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:[e.jsx(ae.div,{variants:oe,children:e.jsxs(T,{className:"rounded-none border-border bg-secondary/20 hover:bg-secondary/40 transition-all duration-300 overflow-hidden relative group",children:[e.jsx("div",{className:"absolute top-0 right-0 p-8 opacity-5 group-hover:opacity-10 transition-opacity translate-x-4 -translate-y-4",children:e.jsx(ve,{className:"w-24 h-24"})}),e.jsxs(L,{className:"pb-2",children:[e.jsx(z,{className:"uppercase text-[10px] font-black tracking-[0.2em] text-primary/70",children:"Population"}),e.jsx(F,{className:"text-4xl font-black italic",children:ne?"—":re?.usersTotal??0})]}),e.jsx(R,{children:e.jsx("p",{className:"text-xs text-muted-foreground font-bold",children:"Total registered citizens."})})]})}),e.jsx(ae.div,{variants:oe,children:e.jsxs(T,{className:"rounded-none border-border bg-secondary/20 hover:bg-secondary/40 transition-all duration-300 overflow-hidden relative group",children:[e.jsx("div",{className:"absolute top-0 right-0 p-8 opacity-5 group-hover:opacity-10 transition-opacity translate-x-4 -translate-y-4",children:e.jsx(Ye,{className:"w-24 h-24"})}),e.jsxs(L,{className:"pb-2",children:[e.jsx(z,{className:"uppercase text-[10px] font-black tracking-[0.2em] text-emerald-500/70",children:"Intelligence"}),e.jsx(F,{className:"text-4xl font-black italic",children:ne?"—":re?.postsLast24h??0})]}),e.jsx(R,{children:e.jsx("p",{className:"text-xs text-muted-foreground font-bold",children:"New posts in circulation (24h)."})})]})}),e.jsx(ae.div,{variants:oe,children:e.jsxs(T,{className:"rounded-none border-border bg-secondary/20 hover:bg-secondary/40 transition-all duration-300 overflow-hidden relative group",children:[e.jsx("div",{className:"absolute top-0 right-0 p-8 opacity-5 group-hover:opacity-10 transition-opacity translate-x-4 -translate-y-4",children:e.jsx(Je,{className:"w-24 h-24"})}),e.jsxs(L,{className:"pb-2",children:[e.jsx(z,{className:"uppercase text-[10px] font-black tracking-[0.2em] text-blue-500/70",children:"Engagement"}),e.jsx(F,{className:"text-4xl font-black italic",children:ne?"—":re?.commentsLast24h??0})]}),e.jsx(R,{children:e.jsx("p",{className:"text-xs text-muted-foreground font-bold",children:"Conversational volume (24h)."})})]})})]}),e.jsxs(ja,{defaultValue:"posts",className:"w-full space-y-6 sm:space-y-8",children:[e.jsx("div",{className:"overflow-x-auto scrollbar-hide",children:e.jsxs($e,{className:"bg-transparent border-b border-border w-full min-w-max justify-start gap-4 sm:gap-8 rounded-none h-auto p-0 pb-2",children:[e.jsxs(O,{value:"posts",className:"rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent px-2 pb-2 h-auto text-[10px] sm:text-[11px] uppercase font-black tracking-widest transition-all hover:text-primary",children:[e.jsx(ea,{className:"w-3 h-3 mr-2"}),"Live Posts"]}),e.jsxs(O,{value:"users",className:"rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent px-2 pb-2 h-auto text-[10px] sm:text-[11px] uppercase font-black tracking-widest transition-all hover:text-primary",children:[e.jsx(ve,{className:"w-3 h-3 mr-2"}),"All Users"]}),e.jsxs(O,{value:"banned",className:"rounded-none border-b-2 border-transparent data-[state=active]:border-destructive data-[state=active]:bg-transparent px-2 pb-2 h-auto text-[10px] sm:text-[11px] uppercase font-black tracking-widest transition-all hover:text-destructive",children:[e.jsx(aa,{className:"w-3 h-3 mr-2"}),"Banned Users",q.length>
50&&e.jsx(C,{variant:"destructive",className:"ml-2 rounded-none px-1 py-0 h-3.5 sm:h-4 text-[8px] sm:text-[9px] min-w-4 flex items-center justify-center",children:q.length})]}),e.jsxs(O,{value:"game-house",className:"rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent px-2 pb-2 h-auto text-[10px] sm:text-[11px] uppercase font-black tracking-widest transition-all hover:text-primary",children:[e.jsx(ta,{className:"w-3 h-3 mr-2"}),"Game House",M.length>0&&e.jsx(C,{className:"ml-2 rounded-none px-1 py-0 h-3.5 sm:h-4 text-[8px] sm:text-[9px] min-w-4 flex items-center justify-center",children:M.length})]})]})}),e.jsx(U,{value:"posts",className:"space-y-4 m-0 transition-all",children:e.jsxs(T,{className:"rounded-none border-border bg-secondary/10 overflow-hidden",children:[e.jsx(L,{className:"flex flex-row items-center justify-between border-b border-border py-4",children:e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(F,{className:"text-xs uppercase font-black tracking-widest flex items-center gap-2",children:"Operational Feed"}),e.jsx(z,{className:"text-[10px] font-medium",children:"Real-time surveillance of user-generated content."})]})}),e.jsxs(R,{className:"p-0",children:[e.jsx("div",{className:"md:hidden divide-y divide-border",children:xe?e.jsx("div",{className:"p-10 text-center text-[10px] uppercase font-black opacity-30 italic",children:"Retrieving stream..."}):Q.length===0?e.jsx("div",{className:"p-10 text-center text-[10px] uppercase font-black opacity-30 italic",children:"No activity detected."}):Q.map(a=>e.jsxs("div",{className:"p-4 space-y-3 bg-secondary/10",children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-xs font-black uppercase italic tracking-tight",children:a.profiles?.display_name??"Missing Entity"}),e.jsxs("span",{className:"text-[10px] text-primary font-bold",children:["@",a.profiles?.username??"null"]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 text-[9px] font-bold opacity-60",children:[e.jsx(B,{className:"w-2.5 h-2.5 text-primary"}),new Date(a.created_at).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})]})]}),e.jsx("p",{className:"text-[11px] font-medium leading-relaxed opacity-80 line-clamp-3",children:a.content}),e.jsx("div",{className:"flex justify-end pt-2",children:e.jsxs(m,{size:"sm",variant:"destructive",className:"h-8 w-full rounded-none text-[10px] font-black uppercase italic",onClick:()=>he(a.id),disabled:ie.isPending,children:[e.jsx(je,{className:"h-3.5 w-3.5 mr-2"}),"Eviscerate"]})})]},a.id))}),e.jsx("div",{className:"hidden md:block overflow-x-auto",children:e.jsxs($,{children:[e.jsx(V,{className:"bg-secondary/20 border-b border-border",children:e.jsxs(u,{className:"border-border hover:bg-transparent",children:[e.jsx(h,{className:"text-[10px] uppercase font-black tracking-widest text-muted-foreground py-3 h-auto",children:"Entity"}),e.jsx(h,{className:"text-[10px] uppercase font-black tracking-widest text-muted-foreground py-3 h-auto",children:"Payload"}),e.jsx(h,{className:"text-[10px] uppercase font-black tracking-widest text-muted-foreground py-3 h-auto",children:"Timestamp"}),e.jsx(h,{className:"text-right text-[10px] uppercase font-black tracking-widest text-muted-foreground py-3 h-auto",children:"Action"})]})}),e.jsx(K,{children:xe?e.jsx(u,{className:"hover:bg-transparent",children:e.jsx(l,{colSpan:4,className:"text-center py-10 text-[11px] uppercase font-bold opacity-50 italic",children:"Retrieving stream..."})}):Q.length===0?e.jsx(u,{className:"hover:bg-transparent",children:e.jsx(l,{colSpan:4,className:"text-center py-10 text-[11px] uppercase font-bold opacity-50 italic",children:"No activity detected."})}):Q.map(a=>e.jsxs(u,{className:"border-border group transition-colors hover:bg-secondary/10",children:[e.jsx(l,{className:"py-4",children:e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-xs font-black uppercase italic tracking-tight",children:a.profiles?.display_name??"Missing Entity"}),e.jsxs("span",{className:"text-[10px] text-primary font-bold",children:["@",a.profiles?.username??"null"]})]})}),e.jsx(l,{className:"py-4",children:e.jsx("p",{className:"text-[11px] font-medium leading-relaxed max-w-md line-clamp-2 opacity-80",children:a.content})}),e.jsx(l,{className:"py-4",children:e.jsxs("div",{className:"flex items-center gap-2 text-[10px] font-bold text-muted-foreground",children:[e.jsx(B,{className:"w-3 h-3 text-primary"}),new Date(a.created_at).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})]})}),e.jsx(l,{className:"text-right py-4",children:e.jsxs(m,{size:"sm",variant:"destructive",className:"h-8 rounded-none text-[10px] font-black uppercase italic opacity-0 group-hover:opacity-100 transition-all hover:scale-105",onClick:()=>he(a.id),disabled:ie.isPending,children:[e.jsx(je,{className:"h-3.5 w-3.5 mr-1"}),"Eviscerate"]})})]},a.id))})]})})]})]})}),e.jsx(U,{value:"users",className:"space-y-6 m-0 animate-in fade-in duration-500",children:e.jsxs("div",{className:"flex flex-col lg:flex-row gap-6",children:[e.jsxs("div",{className:"w-full lg:w-80 space-y-6 shrink-0",children:[e.jsxs(T,{className:"rounded-none border-border bg-secondary/5",children:[e.jsx(L,{className:"pb-4",children:e.jsx(F,{className:"text-[11px] uppercase font-black tracking-widest flex items-center gap-2",children:"Targeting Filters"})}),e.jsxs(R,{className:"space-y-6",children:[e.jsxs("div",{className:"relative",children:[e.jsx(sa,{className:"absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted-foreground"}),e.jsx(ke,{id:"user-search",name:"user-search",placeholder:"Search Identification...",className:"pl-9 h-10 rounded-none bg-background/50 border-border text-[11px] font-bold",value:i,onChange:a=>x(a.target.value)})]}),e.jsxs("div",{className:"space-y-4 pt-2",children:[e.jsx("h4",{className:"text-[10px] uppercase font-black tracking-widest text-primary",children:"Ban Scope Definition"}),e.jsx("div",{className:"space-y-3",children:[{id:"content",label:"Posts & Comments",state:b,setter:y},{id:"social",label:"Interactions (Likes/Follow)",state:p,setter:_},{id:"messages",label:"Private Whispers",state:S,setter:P}].map(a=>e.jsxs("label",{className:"flex items-center justify-between p-3 border border-border bg-background/30 cursor-pointer hover:bg-background/50 transition-colors",children:[e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-tight text-foreground",children:a.label}),e.jsx("div",{onClick:()=>a.setter(!a.state),className:`w-4 h-4 border-2 flex items-center justify-center transition-all ${a.state?"bg-primary border-primary":"border-white/10"}`,children:a.state&&e.jsx("div",{className:"w-1.5 h-1.5 bg-background font-black"})})]},a.id))})]})]})]}),e.jsx(T,{className:"rounded-none border-border bg-primary/5 p-4 border-l-4 border-l-primary",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx(ge,{className:"w-5 h-5 text-primary shrink-0"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-[10px] font-black uppercase tracking-widest leading-tight text-foreground",children:"Admin Protocol"}),e.jsx("p",{className:"text-[9px] font-bold leading-tight uppercase italic text-muted-foreground
5/80",children:"Sanctions applied here are absolute. Actions are logged and permanent."})]})]})})]}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(T,{className:"rounded-none border-border bg-secondary/5 overflow-hidden",children:e.jsxs(R,{className:"p-0",children:[e.jsx("div",{className:"md:hidden divide-y divide-border",children:me?e.jsx("div",{className:"p-10 text-center text-[10px] uppercase font-black opacity-30 italic",children:"Decrypting registry..."}):Y.length===0?e.jsx("div",{className:"p-10 text-center text-[10px] uppercase font-black opacity-30 italic",children:"No matches found."}):Y.map(a=>{const t=le(a);return e.jsxs("div",{className:"p-4 space-y-4 bg-secondary/5",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-xs font-black uppercase italic",children:a.display_name}),e.jsxs("span",{className:"text-[10px] font-bold text-muted-foreground",children:["@",a.username]})]}),t?e.jsx(C,{variant:"destructive",className:"rounded-none text-[8px] font-black uppercase italic px-1.5 py-0",children:"Restricted"}):e.jsx(C,{className:"rounded-none bg-emerald-500/10 text-emerald-500 border-emerald-500/20 text-[8px] font-black uppercase italic px-1.5 py-0",children:"Compliant"})]}),e.jsx("div",{className:"flex flex-col gap-2",children:t?e.jsxs(m,{size:"sm",variant:"outline",className:"h-8 w-full rounded-none border-emerald-500/50 text-emerald-500 text-[10px] font-black uppercase italic hover:bg-emerald-500 hover:text-white transition-all shadow-[2px_2px_0px_rgba(16,185,129,0.1)] active:shadow-none",onClick:()=>fe(a.user_id),disabled:E.isPending,children:[e.jsx(J,{className:"h-3.5 w-3.5 mr-2"}),"Amnesty"]}):e.jsx("div",{className:"grid grid-cols-2 gap-2",children:[{label:"1h",minutes:60},{label:"24h",minutes:1440},{label:"7d",minutes:10080},{label:"perm",minutes:0,permanent:!0}].map(r=>e.jsx(m,{size:"sm",variant:r.label==="7d"||r.permanent?"destructive":"outline",className:`h-8 rounded-none text-[9px] font-black uppercase border-border active:scale-95 transition-all ${r.label!=="7d"&&!r.permanent?"active:bg-primary/20 active:text-primary active:border-primary/50":""}`,onClick:()=>be(a.user_id,r.minutes,r.label,!!r.permanent),disabled:ce.isPending,children:r.label},r.label))})})]},a.id)})}),e.jsx("div",{className:"hidden md:block",children:e.jsxs($,{children:[e.jsx(V,{className:"bg-secondary/20 border-b border-border",children:e.jsxs(u,{className:"border-border hover:bg-transparent",children:[e.jsx(h,{className:"text-[10px] uppercase font-black tracking-widest text-muted-foreground py-3 h-auto",children:"Subject"}),e.jsx(h,{className:"text-[10px] uppercase font-black tracking-widest text-muted-foreground py-3 h-auto",children:"Status"}),e.jsx(h,{className:"text-right text-[10px] uppercase font-black tracking-widest text-muted-foreground py-3 h-auto",children:"Ban Application"})]})}),e.jsx(K,{children:me?e.jsx(u,{className:"hover:bg-transparent",children:e.jsx(l,{colSpan:3,className:"text-center py-10 text-[11px] uppercase font-bold opacity-50 italic",children:"Decrypting registry..."})}):Y.length===0?e.jsx(u,{className:"hover:bg-transparent",children:e.jsx(l,{colSpan:3,className:"text-center py-10 text-[11px] uppercase font-bold opacity-50 italic",children:"No matches found."})}):Y.map(a=>{const t=le(a);return e.jsxs(u,{className:"border-border group hover:bg-secondary/10",children:[e.jsx(l,{className:"py-4",children:e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-xs font-black uppercase italic italic",children:a.display_name}),e.jsxs("span",{className:"text-[10px] font-bold text-muted-foreground",children:["@",a.username]})]})}),e.jsx(l,{className:"py-4",children:t?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-1.5 h-1.5 bg-destructive rounded-full"}),e.jsx("span",{className:"text-[10px] uppercase font-black text-destructive tracking-widest italic",children:"Restricted"})]}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-1.5 h-1.5 bg-emerald-500 rounded-full"}),e.jsx("span",{className:"text-[10px] uppercase font-black text-emerald-500 tracking-widest italic",children:"Compliant"})]})}),e.jsx(l,{className:"text-right py-4",children:t?e.jsxs(m,{size:"sm",variant:"outline",className:"h-8 rounded-none border-emerald-500/30 text-emerald-500 text-[10px] font-black uppercase italic hover:bg-emerald-500 hover:text-white transition-all",onClick:()=>
5fe(a.user_id),disabled:E.isPending,children:[e.jsx(J,{className:"h-3.5 w-3.5 mr-1"}),"Amnesty"]}):e.jsx("div",{className:"flex justify-end gap-1.5",children:[{label:"1h",minutes:60},{label:"24h",minutes:1440},{label:"7d",minutes:10080},{label:"perm",minutes:0,permanent:!0}].map(r=>e.jsx(m,{size:"sm",variant:r.label==="7d"||r.permanent?"destructive":"outline",className:`h-8 rounded-none text-[9px] font-black uppercase border-border hover:scale-105 transition-transform ${r.label!=="7d"&&!r.permanent?"hover:bg-primary/20 hover:text-primary hover:border-primary/50":""}`,onClick:()=>be(a.user_id,r.minutes,r.label,!!r.permanent),disabled:ce.isPending,children:r.label},r.label))})})]},a.id)})})]})})]})})})]})}),e.jsx(U,{value:"banned",className:"space-y-4 m-0 animate-in slide-in-from-bottom-2 duration-500",children:e.jsxs(T,{className:"rounded-none border-destructive/20 bg-destructive/[0.03] overflow-hidden",children:[e.jsx(L,{className:"border-b border-destructive/10 py-5",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-destructive/10 text-destructive",children:e.jsx(ra,{className:"w-5 h-5"})}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(F,{className:"text-sm uppercase font-black tracking-[0.2em] text-destructive",children:"Sanction Registry"}),e.jsx(z,{className:"text-[10px] font-bold uppercase opacity-60 italic",children:"Active correctional measures across the infrastructure."})]})]})}),e.jsxs(R,{className:"p-0",children:[e.jsx("div",{className:"md:hidden divide-y divide-destructive/10",children:q.length===0?e.jsx("div",{className:"p-16 text-center text-[10px] uppercase font-black opacity-30 tracking-widest italic",children:"Zero active sanctions."}):q.map(a=>e.jsxs("div",{className:"p-4 space-y-4 bg-destructive/[0.03]",children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-xs font-black uppercase italic tracking-tight",children:a.display_name}),e.jsxs("span",{className:"text-[10px] text-destructive/70 font-bold",children:["@",a.username]})]}),e.jsx("div",{className:"flex flex-col items-end gap-1",children:a.ban_permanent?e.jsx(C,{className:"rounded-none bg-destructive text-white text-[8px] uppercase font-black px-2 py-0 border-none",children:"Permanent"}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-1 text-[9px] font-black uppercase text-destructive italic",children:[e.jsx(B,{className:"w-2.5 h-2.5"}),new Date(a.banned_until).toLocaleDateString()]}),e.jsx("span",{className:"text-[8px] font-bold opacity-40 uppercase leading-none",children:new Date(a.banned_until).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})})]}),e.jsx("div",{className:"flex flex-wrap gap-1",children:a.ban_scopes&&a.ban_scopes.length>0?a.ban_scopes.map(t=>e.jsx(C,{className:"rounded-none bg-destructive/10 text-destructive border-destructive/20 text-[8px] uppercase font-bold px-2 py-0",children:t},t)):e.jsx(C,{className:"rounded-none bg-destructive text-white text-[8px] uppercase font-black px-2 py-0 border-none",children:"GLOBAL"})}),e.jsxs(m,{size:"sm",variant:"destructive",className:"w-full h-9 rounded-none text-[10px] font-black uppercase italic shadow-[4px_4px_0px_rgba(244,63,94,0.1)] active:shadow-none transition-all",onClick:()=>E.mutate(a.user_id),disabled:E.isPending,children:[e.jsx(J,{className:"h-3.5 w-3.5 mr-2"}),"Pardon Subject"]})]},a.id))}),e.jsx("div",{className:"hidden md:block overflow-x-auto",children:e.jsxs($,{children:[e.jsx(V,{className:"bg-destructive/10",children:e.jsxs(u,{className:"border-destructive/10 hover:bg-transparent",children:[e.jsx(h,{className:"text-[10px] uppercase font-black tracking-widest text-destructive py-3 h-auto",children:"Subject"}),e.jsx(h,{className:"text-[10px] uppercase font-black tracking-widest text-destructive py-3 h-auto",children:"Expiration"}),e.jsx(h,{className:"text-[10px] uppercase font-black tracking-widest text-destructive py-3 h-auto",children:"Blocked Scopes"}),e.jsx(h,{className:"text-right text-[10px] uppercase font-black tracking-widest text-destructive py-3 h-auto",children:"Action"})]})}),e.jsx(K,{children:q.length===0?e.jsx(u,{className:"hover:bg-transparent",children:e.jsx(l,{colSpan:4,className:"text-center py-16 text-[11px] uppercase font-black opacity-30 tracking-widest italic",children:"Zero active sanctions detected."})}):q.map(a=>e.jsxs(u,{className:"border-destructive/10 group hover:bg-destructive/[0.05] transition-colors",children:[e.jsx(l,{className:"py-5",children:e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-xs font-black uppercase italic",children:a.display_name}),e.jsxs("span",{className:"text-[10px] text-destructive/70 font-bold",children:["@",a.username]})]})}),e.jsx(l,{className:"py-5",children:a.ban_permanent?e.jsx(C,{className:"rounded-none bg-destructive text-white text-[8px] uppercase font-black px-2 py-0 border-none",children:"Permanent"}):e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-black uppercase text-destructive/80 italic",children:[e.jsx(B,{className:"w-3 h-3"}),new Date(a.banned_until).toLocaleDateString()]}),e.jsx("div",{className:"text-[9px] font-bold opacity-50 uppercase leading-none",children:new Date(a.banned_until).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})}),e.jsx(l,{className:"py-5",children:e.jsx("div",{className:"flex flex-wrap gap-1",children:a.ban_scopes&&a.ban_scopes.length>0?a.ban_scopes.map(t=>e.jsx(C,{className:"rounded-none bg-destructive/10 text-destructive border-destructive/20 text-[8px] uppercase font-bold px-2 py-0",children:t},t)):e.jsx(C,{className:"rounded-none bg-destructive text-white text-[8px] uppercase font-black px-2 py-0 border-none",children:"GLOBAL"})})}),e.jsx(l,{className:"text-right py-5 text-destructive/80",children:e.jsxs(m,{size:"sm",variant:"destructive",className:"h-9 px-4 roun
5ded-none text-[10px] font-black uppercase italic transition-all hover:scale-105 active:scale-95 shadow-[4px_4px_0px_rgba(244,63,94,0.2)] hover:shadow-none",onClick:()=>E.mutate(a.user_id),disabled:E.isPending,children:[e.jsx(J,{className:"h-3.5 w-3.5 mr-2"}),"Pardon Subject"]})})]},a.id))})]})})]})]})}),e.jsx(U,{value:"game-house",className:"space-y-4 m-0 transition-all animate-in fade-in duration-500",children:e.jsxs(T,{className:"rounded-none border-border bg-secondary/10 overflow-hidden",children:[e.jsx(L,{className:"flex flex-row items-center justify-between border-b border-border py-4",children:e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(F,{className:"text-xs uppercase font-black tracking-widest flex items-center gap-2",children:"Pending Game Submissions"}),e.jsx(z,{className:"text-[10px] font-medium",children:"Review and moderate community games before they go live."})]})}),e.jsxs(R,{className:"p-0",children:[e.jsx("div",{className:"md:hidden divide-y divide-border",children:ue?e.jsx("div",{className:"p-10 text-center text-[10px] uppercase font-black opacity-30 italic",children:"Retrieving stream..."}):M.length===0?e.jsx("div",{className:"p-10 text-center text-[10px] uppercase font-black opacity-30 italic",children:"No pending games."}):M.map(a=>e.jsxs("div",{className:"p-4 space-y-3 bg-secondary/10",children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("span",{className:"text-xs font-black uppercase italic tracking-tight line-clamp-1 flex items-center gap-2",children:[a.draft_data?a.draft_data.title:a.title,a.draft_data&&e.jsx("span",{className:"bg-amber-500 text-black px-1.5 py-0.5 rounded-[2px] text-[8px] tracking-widest shrink-0",children:"EDIT"})]}),e.jsxs("span",{className:"text-[10px] text-primary font-bold",children:["@",a.profiles?.username]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 text-[9px] font-bold opacity-60",children:[e.jsx(B,{className:"w-2.5 h-2.5 text-primary"}),new Date(a.created_at).toLocaleDateString()]})]}),e.jsx("p",{className:"text-[11px] font-medium leading-relaxed opacity-80 line-clamp-2",children:a.draft_data?a.draft_data.description:a.description}),e.jsxs("div",{className:"flex flex-col gap-2 pt-2",children:[e.jsxs(m,{size:"sm",variant:"outline",className:"h-8 rounded-[3px] text-[10px] font-black uppercase italic",onClick:()=>window.open(`/game-house/play/${a.id}${a.draft_data?"?draft=true":""}`,"_blank"),children:[e.jsx(ye,{className:"w-3.5 h-3.5 mr-2"})," Preview"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(m,{size:"sm",className:"flex-1 h-8 bg-emerald-500 hover:bg-emerald-600 text-white rounded-[3px] text-[10px] font-black uppercase italic",onClick:()=>Z.mutate(a),disabled:Z.isPending,children:[e.jsx(Ne,{className:"w-3.5 h-3.5 mr-1"})," Approve"]}),e.jsxs(m,{size:"sm",variant:"destructive",className:"flex-1 h-8 rounded-[3px] text-[10px] font-black uppercase italic",onClick:()=>{window.confirm("Reject and delete game?")&&X.mutate(a)},disabled:X.isPending,children:[e.jsx(we,{className:"w-3.5 h-3.5 mr-1"})," Reject"]})]})]})]},a.id))}),e.jsx("div",{className:"hidden md:block overflow-x-auto",children:e.jsxs($,{children:[e.jsx(V,{className:"bg-secondary/20 border-b border-border",children:e.jsxs(u,{className:"border-border hover:bg-transparent",children:[e.jsx(h,{className:"text-[10px] uppercase font-black tracking-widest text-muted-foreground py-3 h-auto",children:"Game Info"}),e.jsx(h,{className:"text-[10px] uppercase font-black tracking-widest text-muted-foreground py-3 h-auto",children:"Submitter"}),e.jsx(h,{className:"text-[10px] uppercase font-black tracking-widest text-muted-foreground py-3 h-auto",children:"Date"}),e.jsx(h,{className:"text-right text-[10px] uppercase font-black tracking-widest text-muted-foreground py-3 h-auto",children:"Action"})]})}),e.jsx(K,{children:ue?e.jsx(u,{className:"hover:bg-transparent",children:e.jsx(l,{colSpan:4,className:"text-center py-10 text-[11px] uppercase font-bold opacity-50 italic",children:"Retrieving stream..."})}):M.length===0?e.jsx(u,{className:"hover:bg-transparent",children:e.jsx(l,{colSpan:4,className:"text-center py-10 text-[11px] uppercase font-bold opacity-50 italic",children:"No pending games."})}):M.map(a=>e.jsxs(u,{className:"border-border group transition-colors hover:bg-secondary/10",children:[e.jsx(l,{className:"py-4",children:e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("span",{className:"text-xs font-black uppercase italic tracking-tight flex items-center gap-2",children:[a.draft_data?a.draft_data.title:a.title,a.draft_data&&e.jsx("span",{className:"bg-amber-500 text-black px-1.5 py-0.5 rounded-[2px] text-[8px] tracking-widest",children:"EDIT"})]}),e.jsx("span",{className:"text-[10px] font-medium leading-relaxed max-w-xs line-clamp-1 opacity-80",children:a.draft_data?a.draft_data.description:a.description})]})}),e.jsx(l,{className:"py-4",children:e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-xs font-black uppercase italic tracking-tight",children:a.profiles?.display_name}),e.jsxs("span",{className:"text-[10px] text-primary font-bold",children:["@",a.profiles?.username]})]})}),e.jsx(l,{className:"py-4",children:e.jsxs("div",{className:"flex items-center gap-2 text-[10px] font-bold text-muted-foreground",children:[e.jsx(B,{className:"w-3 h-3 text-primary"}),new Date(a.created_at).toLocaleDateString()]})}),e.jsx(l,{className:"text-right py-4",children:e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[e.jsxs(m,{size:"sm",variant:"outline",className:"h-8 rounded-[3px] text-[10px] font-black uppercase italic transition-all hover:bg-primary/10",onClick:()=>window.open(`/game-house/play/${a.id}${a.draft_data?"?draft=true":""}`,"_blank"),children:[e.jsx(ye,{className:"w-3.5 h-3.5 mr-1"})," Preview"]}),e.jsxs(m,{size:"sm",className:"h-8 bg-emerald-500 hover:bg-emerald-600 text-white rounded-[3px] text-[10px] font-black uppercase italic transition-all",onClick:()=>Z.mutate(a),disabled:Z.isPending,children:[e.jsx(Ne,{className:"w-3.5 h-3.5 mr-1"})," Approve"]}),e.jsxs(m,{size:"sm",variant:"destructive",className:"h-8 rounded-[3px] text-[10px] font-black uppercase italic transition-all",onClick:()=>{window.confirm("Reject and delete game?")&&X.mutate(a)},disabled:X.isPending,children:[e.jsx(we,{className:"w-3.5 h-3.5 mr-1"})," Reject"]})]})})]},a.id))})]})})]})]})})]})]})]})};export{Ba as default};

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.