1import{r as e,j as s}from"./vendor-react-BfgFmtGS.js";import{B as a}from"./badge-Cd6jhgwG.js";import{B as r}from"./button-CYJdLL_L.js";import{I as l}from"./input-Cv-gXlbe.js";import{T as i}from"./textarea-DHiKxIHY.js";import{S as d}from"./switch-D6ZBFPtn.js";import{S as n,a as t,b as o,c,d as m}from"./select-CqFAxzgg.js";import{A as u,h as x,a as h,b as p,c as b,d as _,e as g,f as j,g as f}from"./alert-dialog-DEiWzkJW.js";import{supabase as v}from"./supabase-client-2CObC91N.js";import{u as N}from"./useAuth-DynbexoK.js";import{a as w}from"./runtime-utils-GN4cODRt.js";import{S as y}from"./shield-CoYdFdVE.js";import{S as k}from"./search-D_LVchoc.js";import{L as C}from"./loader-circle-fXsKc0TP.js";import{R as S}from"./refresh-cw-BjP_646P.js";import{U as P}from"./user-round-BcYO0cxJ.js";import{L as B}from"./vendor-router-QOYqHwMx.js";import{E as L}from"./external-link-BI4-_4re.js";import{B as A}from"./ban-DClk00Tq.js";import{T as F}from"./triangle-alert-GY7W0Pyh.js";import{G as E}from"./globe-xPKErxGR.js";import{S as U}from"./save-PGMxai6K.js";import{L as z}from"./lock-D3L7n1Hp.js";import{E as R}from"./eye-off-YQaMGNXO.js";import{F as T}from"./flame-DueLJnbo.js";import{T as D}from"./trash-2-CLE9ZDje.js";import{C as O}from"./circle-check-DpwBxCoL.js";const $=e=>{const s=(e||"").trim();return s.length>0?s:null},H=e=>({full_name:e.full_name||"",username:e.username||"",avatar_url:e.avatar_url||"",profile_title:e.profile_title||"",bio:e.bio||"",profile_header_image_url:e.profile_header_image_url||"",profile_header_position_y:e.profile_header_position_y??50,board_sort_mode:e.board_sort_mode||"recent",public_profile_board_sort_mode:e.public_profile_board_sort_mode||"recent",onboarding_completed:!!e.onboarding_completed,onboarding_tasks_completed:!!e.onboarding_tasks_completed}),M=e=>({name:e.name||"",description:e.description||"",color:e.color||"",icon:e.icon||"",is_public:!!e.is_public,is_private:!!e.is_private,is_hidden:!!e.is_hidden,is_mature:!!e.is_mature});function I(){const{toast:d}=N(),[O,I]=e.useState(""),[q,G]=e.useState([]),[Q,W]=e.useState(null),[Z,J]=e.useState(null),[K,X]=e.useState({}),[ee,se]=e.useState(""),[ae,re]=e.useState(""),[le,ie]=e.useState(!1),[de,ne]=e.useState(!1),[te,oe]=e.useState(null),[ce,me]=e.useState(null),[ue,xe]=e.useState(!1),[he,pe]=e.useState(!1),be=e.useMemo(()=>q.find(e=>e.id===Q)||null,[Q,q]),_e=async(e=O)=>{ie(!0);try{let{data:s,error:a}=await v.rpc("admin_search_user_controls",{p_search_query:$(e),p_limit:25});if(a&&(e=>{const s=String((null==e?void 0:e.message)||(null==e?void 0:e.details)||e||"").toLowerCase();return s.includes("schema cache")&&s.includes("admin_search_user_controls")})(a)&&({data:s,error:a}=await v.rpc("admin_search_user_controls")),a)throw a;const r=e.trim().toLowerCase(),l=(s||[]).map(e=>({...e,boards:Array.isArray(e.boards)?e.boards:[]})),i=r?l.filter(e=>[e.email||"",e.full_name||"",e.username||"",e.id].some(e=>e.toLowerCase().includes(r))).slice(0,25):l.slice(0,25);G(i);const d=i.find(e=>e.id===Q)||i[0]||null;W((null==d?void 0:d.id)||null),d?(J(H(d)),se(d.banned_reason||""),re(d.public_sharing_disabled_reason||""),X(Object.fromEntries(d.boards.map(e=>[e.id,M(e)])))):(J(null),se(""),re(""),X({}))}catch(s){d({title:"Failed to load user controls",description:s.message,variant:"error"})}finally{ie(!1)}};e.useEffect(()=>{const e=window.setTimeout(()=>{_e(O)},250);return()=>window.clearTimeout(e)},[O]);const ge=e=>{Q&&G(s=>s.map(s=>s.id===Q?{...s,...e}:s))};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex flex-col gap-4 xl:flex-row xl:items-end xl:justify-between",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"inline-flex items-center gap-2 rounded-xl bg-destructive/10 px-3 py-1.5 text-sm font-bold text-destructive",children:[s.jsx(y,{className:"w-4 h-4"}),"Admin user control"]}),s.jsx("h2",{className:"mt-3 text-2xl font-black text-foreground",children:"Ban users, edit profiles, and moderate their boards"})]}),s.jsxs("div",{className:"flex w-full gap-2 xl:max-w-md",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(k,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),s.jsx(l,{value:O,onChange:e=>I(e.target.value),placeholder:"Search email, username, name, or user id",className:"h-11 rounded-xl pl-9"})]}),s.jsx(r,{variant:"outline",size:"icon",className:"h-11 w-11 rounded-xl",onClick:()=>{_e()},children:le?s.jsx(C,{className:"h-4 w-4 animate-spin"}):s.jsx(S,{className:"h-4 w-4"})})]})]}),s.jsxs("div",{className:"grid gap-5 xl:grid-cols-[320px_1fr]",children:[s.jsxs("div",{className:"rounded-2xl border border-border/50 bg-background/60 p-3",children:[s.jsx("div",{className:"mb-2 px-2 text-xs font-bold uppercase tracking-[0.2em] text-muted-foreground",children:"Users"}),s.jsx("div",{className:"max-h-[720px] space-y-2 overflow-y-auto pr-1",children:le&&0===q.length?s.jsxs("div",{className:"flex items-center justify-center gap-2 py-12 text-sm text-muted-foreground",children:[s.jsx(C,{className:"h-4 w-4 animate-spin"}),"Loading users"]}):0===q.length?s.jsx("div",{className:"py-12 text-center text-sm text-muted-foreground",children:"No users found."}):q.map(e=>s.jsx("button",{type:"button",onClick:()=>(e=>{W(e.id),J(H(e)),se(e.banned_reason||""),re(e.public_sharing_disabled_reason||""),X(Object.fromEntries(e.boards.map(e=>[e.id,M(e)])))})(e),className:w("w-full rounded-xl border p-3 text-left transition-colors",Q===e.id?"border-primary bg-primary/8":"border-border/40 bg-card/70 hover:border-primary/30"),children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-xl border border-border/50 bg-muted",children:e.avatar_url?s.jsx("img",{src:e.avatar_url,alt:"",className:"h-full w-full object-cover"}):s.jsx(P,{className:"h-4 w-4 text-muted-foreground"})}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("p",{className:"truncate text-sm font-bold text-foreground",children:e.full_name||e.username||"Anonymous"}),e.is_banned?s.jsx(a,{variant:"destructive",className:"shrink-0",children:"Banned"}):null]}),s.jsx("p",{className:"truncate text-xs text-muted-foreground",children:e.username?`@${e.username}`:e.email||e.id}),s.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:[e.board_count," boards · ",e.echo_count," echoes"]})]})]})},e.id))})]}),be&&Z?s.jsxs("div",{className:"space-y-5",children:[s.jsxs("div",{className:"rounded-2xl border border-border/50 bg-background/60 p-5",children:[s.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx("h3",{className:"text-xl font-black text-foreground",children:be.full_name||be.username||"Anonymous"}),be.username?s.jsxs(a,{variant:"outline",children:["@",be.username]}):null,be.is_admin?s.jsx(a,{variant:"secondary",children:"Admin"}):null,be.is_banned?s.jsx(a,{variant:"destructive",children:"Banned"}):s.jsx(a,{variant:"outline",children:"Active"}),be.public_sharing_disabled?s.jsx(a,{variant:"destructive",children:"Public Locked"}):null]}),s.jsx("p",{className:"mt-1 break-all text-sm text-muted-foreground",children:be.email||be.id})]}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[be.username?s.jsx(B,{to:`/u/${be.username}`,target:"_blank",children:s.jsxs(r,{variant:"outline",size:"sm",className:"rounded-xl gap-2",children:[s.jsx(L,{className:"h-4 w-4"}),"Public Profile"]})}
1):null,s.jsxs(r,{variant:be.is_banned?"outline":"destructive",size:"sm",className:"rounded-xl gap-2",disabled:ue,onClick:()=>{(async e=>{if(be){xe(!0);try{const{data:s,error:a}=await v.rpc("admin_set_user_ban",{p_user_id:be.id,p_is_banned:e,p_reason:e?$(ee):null});if(a)throw a;const r=(null==s?void 0:s[0])||{};ge(r),se(e?ee:""),d({title:e?"User banned":"User unbanned"})}catch(s){d({title:e?"Failed to ban user":"Failed to unban user",description:s.message,variant:"error"})}finally{xe(!1)}}})(!be.is_banned)},children:[ue?s.jsx(C,{className:"h-4 w-4 animate-spin"}):s.jsx(A,{className:"h-4 w-4"}),be.is_banned?"Unban":"Ban"]})]})]}),s.jsx("div",{className:"mt-4 rounded-xl border border-destructive/20 bg-destructive/5 p-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(F,{className:"mt-0.5 h-4 w-4 shrink-0 text-destructive"}),s.jsxs("div",{className:"flex-1 space-y-2",children:[s.jsx("p",{className:"text-sm font-bold text-foreground",children:"Ban status"}),s.jsx(i,{value:ee,onChange:e=>se(e.target.value),placeholder:"Reason shown in admin records",className:"min-h-[76px] rounded-xl bg-background"}),be.banned_at?s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Banned at ",new Date(be.banned_at).toLocaleString()]}):null]})]})}),s.jsx("div",{className:"mt-4 rounded-xl border border-orange-500/20 bg-orange-500/5 p-4",children:s.jsxs("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(E,{className:"mt-0.5 h-4 w-4 shrink-0 text-orange-500"}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-sm font-bold text-foreground",children:"Public sharing lock"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"When locked, all public boards and folders are made private and hidden, and this user cannot publish new public boards."}),s.jsx(i,{value:ae,onChange:e=>re(e.target.value),placeholder:"Reason shown in admin records",className:"min-h-[76px] rounded-xl bg-background"}),be.public_sharing_disabled_at?s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Locked at ",new Date(be.public_sharing_disabled_at).toLocaleString()]}):null]})]}),s.jsxs(r,{variant:be.public_sharing_disabled?"outline":"destructive",size:"sm",className:"rounded-xl gap-2",disabled:he,onClick:()=>{(async e=>{if(be){pe(!0);try{const{data:s,error:a}=await v.rpc("admin_set_user_public_sharing",{p_user_id:be.id,p_disabled:e,p_reason:e?$(ae):null});if(a)throw a;const r=(null==s?void 0:s[0])||{},l=e?be.boards.map(e=>({...e,is_public:!1,is_private:!0,is_hidden:!0})):be.boards;ge({...r,boards:l}),e&&X(e=>Object.fromEntries(l.map(s=>[s.id,{...e[s.id]||M(s),is_public:!1,is_private:!0,is_hidden:!0}]))),re(e?ae:""),d({title:e?"Public sharing locked":"Public sharing unlocked"})}catch(s){d({title:e?"Failed to lock public sharing":"Failed to unlock public sharing",description:s.message,variant:"error"})}finally{pe(!1)}}})(!be.public_sharing_disabled)},children:[he?s.jsx(C,{className:"h-4 w-4 animate-spin"}):s.jsx(y,{className:"h-4 w-4"}),be.public_sharing_disabled?"Unlock Public":"Lock Public"]})]})})]}),s.jsxs("div",{className:"rounded-2xl border border-border/50 bg-background/60 p-5",children:[s.jsxs("div",{className:"mb-4 flex items-center justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-black text-foreground",children:"Profile Settings"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Edit public profile fields and board display preferences."})]}),s.jsxs(r,{className:"rounded-xl gap-2",disabled:de,onClick:()=>{(async()=>{if(be&&Z){ne(!0);try{const{data:e,error:s}=await v.rpc("admin_update_user_profile_settings",{p_user_id:be.id,p_full_name:$(Z.full_name),p_username:$(Z.username),p_avatar_url:$(Z.avatar_url),p_profile_title:$(Z.profile_title),p_bio:$(Z.bio),p_profile_header_image_url:$(Z.profile_header_image_url),p_profile_header_position_y:Number(Z.profile_header_position_y??50),p_board_sort_mode:Z.board_sort_mode,p_public_profile_board_sort_mode:Z.public_profile_board_sort_mode,p_onboarding_completed:Z.onboarding_completed,p_onboarding_tasks_completed:Z.onboarding_tasks_completed});if(s)throw s;const a=(null==e?void 0:e[0])||{};ge(a),J(H({...be,...a})),d({title:"Profile settings saved"})}catch(e){d({title:"Failed to save profile",description:e.message,variant:"error"})}finally{ne(!1)}}})()},children:[de?s.jsx(C,{className:"h-4 w-4 animate-spin"}):s.jsx(U,{className:"h-4 w-4"}),"Save Profile"]})]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[s.jsx(V,{label:"Full Name",children:s.jsx(l,{value:Z.full_name||"",onChange:e=>J({...Z,full_name:e.target.value}),className:"rounded-xl"})}),s.jsx(V,{label:"Username",children:s.jsx(l,{value:Z.username||"",onChange:e=>J({...Z,username:e.target.value}),className:"rounded-xl"})}),s.jsx(V,{label:"Avatar URL",children:s.jsx(l,{value:Z.avatar_url||"",onChange:e=>J({...Z,avatar_url:e.target.value}),className:"rounded-xl"})}),s.jsx(V,{label:"Profile Title",children:s.jsx(l,{value:Z.profile_title||"",onChange:e=>J({...Z,profile_title:e.target.value}),className:"rounded-xl"})}),s.jsx(V,{label:"Header Image URL",children:s.jsx(l,{value:Z.profile_header_image_url||"",onChange:e=>J({...Z,profile_header_image_url:e.target.value}),className:"rounded-xl"})}),s.jsx(V,{label:"Header Position Y",children:s.jsx(l,{type:"number",min:0,max:100,value:Z.profile_header_position_y??50,onChange:e=>J({...Z,profile_header_position_y:Number(e.target.value)}),className:"rounded-xl"})}),s.jsx(V,{label:"Private Board Sort",children:s.jsxs(n,{value:Z.board_sort_mode,onValueChange:e=>J({...Z,board_sort_mode:e}),children:[s.jsx(t,{className:"rounded-xl",children:s.jsx(o,{})}),s.jsxs(c,{children:[s.jsx(m,{value:"recent",children:"Recent"}),s.jsx(m,{value:"alphabetical",children:"Alphabetical"}),s.jsx(m,{value:"canvas",children:"Canvas"})]})]})}),s.jsx(V,{label:"Public Profile Sort",children:s.jsxs(n,{value:Z.public_profile_board_sort_mode,onValueChange:e=>J({...Z,public_profile_board_sort_mode:e}),children:[s.jsx(t,{className:"rounded-xl",children:s.jsx(o,{})}),s.jsxs(c,{children:[s.jsx(m,{value:"recent",children:"Recent"}),s.jsx(m,{value:"canvas",children:"Canvas"})]})]})})]}),s.jsx("div",{className:"mt-4",children:s.jsx(V,{label:"Bio",children:s.jsx(i,{value:Z.bio||"",onChange:e=>J({...Z,bio:e.target.value}),className:"min-h-[110px] rounded-xl"})})}),s.jsxs("div",{className:"mt-4 flex flex-wrap gap-4",children:[s.jsx(Y,{label:"Onboarding complete",checked:Z.onboarding_completed,onCheckedChange:e=>J({...Z,onboarding_completed:e})}),s.jsx(Y,{label:"Checklist complete",checked:Z.onboarding_tasks_completed,onCheckedChange:e=>J({...Z,onboarding_tasks_completed:e})})]})]}),s.jsxs("div",{className:"rounded-2xl border border-border/50 bg-background/60 p-5",children:[s.jsxs("div",{className:"mb-4",children:[s.jsx("h3",{className:"text-lg font-black text-foreground",children:"Boards"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Edit board visibility and moderation flags, or permanently remove a board."})]}),s.jsx("div",{className:"space-y-4",children:0===be.boards.length?s.jsx("div",{className:"rounded-xl border border-dashed border-border/60 p-8 text-center text-sm text-muted-foreground",children:"This user has no boards."}):be.boards.map(e=>{const n=K[e.id]||M(e),t=!!be.public_sharing_disabled,o=be.username&&e.slug?`/u/${be.username}/${e.slug}`:`/admin/boards/${e.id}`;return s.jsxs("div",{className:"rounded-2xl border border-border/40 bg-card/70 p-4",children:[s.jsxs("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx("p",{className:"font-black text-foreground",children:e.name}),e.is_public?s.jsxs(a,{variant:"secondary",className:"gap-1",children:[s.jsx(E,{className:"h-3 w-3"}),"Public"]}):s.jsxs(a,{variant:"secondary",className:"gap-1",children:[s.jsx(z,{className:"h-3 w-3"}),"Private"]}),e.is_hidden?s.jsxs(a,{variant:"outline",className:"gap-1",children:[s.jsx(R,{className:"h-3 w-3"}),"Hidden"]}):null,e.is_mature?s.jsxs(a,{variant:"outline",className:"gap-1",children:[s.jsx(T,{className:"h-3 w-3"}),"Mature"]}):null]}),s.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:[e.memory_count||0," echoes · ",e.id]})]}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsx(B,{to:o,target:"_blank",children:s.jsxs(r,{variant:"outline",size:"sm",className:"rounded-xl gap-2",children:[s.jsx(L,{className:"h-4 w-4"}),"Open"]})}),s.jsxs(r,{variant:"outline",size:"sm",className:"rounded-xl gap-2",disabled:te===e.id,onClick:()=>{(async e=>{const s=K[e.id];if(!s)return;const a=!!(null==be?void 0:be.public_sharing_disabled);oe(e.id);try{const{data:r,error:l}=await v.rpc("admin_update_user_board_settings",{p_board_id:e.id,p_name:$(s.name)||e.name,p_description:$(s.description),p_color:$(s.color),p_icon:$(s.icon),p_is_public:!a&&s.is_public,p_is_private:!!a||s.is_private,p_is_hidden:!!a||s.is_hidden,p_is_mature:s.is_mature});if(l)throw l;const i=(null==r?void 0:r[0])||{};G(s=>s.map(s=>s.id===Q?{...s,boards:s.boards.map(s=>s.id===e.id?{...s,...i}:s)}:s)),X(s=>({...s,[e.id]:M({...e,...i})})),d({title:"Board settings saved"})}catch(r){d({title:"Failed to save board",description:r.message,variant:"error"})}finally{oe(null)}})(e)},children:[te===e.id?s.jsx(C,{className:"h-4 w-4 animate-spin"}):s.jsx(U,{className:"h-4 w-4"}),"Save"]}),s.jsxs(u,{children:[s.jsx(x,{asChild:!0,children:s.jsxs(r,{variant:"destructive",size:"sm",className:"rounded-xl gap-2",disabled:ce===e.id,children:[ce===e.id?s.jsx(C,{className:"h-4 w-4 animate-spin"}):s.jsx(D,{className:"h-4 w-4"}),"Delete"]})}),s.jsxs(h,{children:[s.jsxs(p,{children:[s.jsxs(b,{children:['Delete "',e.name,'"?']}),s.jsx(_,{children:"This permanently removes the board and its memberships. Echoes saved to the board are not deleted."})]}),s.jsxs(g,{children:[s.jsx(j,{children:"Cancel"}),s.jsx(f,{onClick:()=>{(async e=>{me(e.id);try{const{error:s}=await v.rpc("admin_delete_board",{p_board_id:e.id});if(s)throw s;G(s=>s.map(s=>s.id===Q?{...s,board_count:Math.max(0,(s.board_count||1)-1),boards:s.boards.filter(s=>s.id!==e.id)}:s)),X(s=>{const a={...s};return delete a[e.id],a}),d({title:"Board deleted",description:`"${e.name}" was removed.`})}catch(s){d({title:"Failed to delete board",description:s.message,variant:"error"})}finally{me(null)}})(e)},children:"Delete board"})]})]})]})]})]}),s.jsxs("div",{className:"mt-4 grid gap-4 md:grid-cols-2",children:[s.jsx(V,{label:"Board Name",children:s.jsx(l,{value:n.name,onChange:s=>X(a=>({...a,[e.id]:{...n,name:s.target.value}})),className:"rounded-xl"})}),s.jsx(V,{label:"Color",children:s.jsx(l,{value:n.color||"",onChange:s=>X(a=>({...a,[e.id]:{...n,color:s.target.value}})),className:"rounded-xl"})}),s.jsx(V,{label:"Icon",children:s.jsx(l,{value:n.icon||"",onChange:s=>X(a=>({...a,[e.id]:{...n,icon:s.target.value}})),className:"rounded-xl"})}),s.jsxs("div",{className:"flex flex-wrap items-end gap-4",children:[s.jsx(Y,{label:"Public",checked:!t&&n.is_public,disabled:t,onCheckedChange:s=>X(a=>({...a,[e.id]:{...n,is_public:s,is_private:!s}}))}),s.jsx(Y,{label:"Hidden",checked:n.is_hidden,onCheckedChange:s=>X(a=>({...a,[e.id]:{...n,is_hidden:s}}))}),s.jsx(Y,{label:"Mature",checked:n.is_mature,onCheckedChange:s=>X(a=>({...a,[e.id]:{...n,is_mature:s}}))})]})]}),t?s.jsx("p",{className:"mt-3 text-xs font-medium text-orange-600",children:"Public sharing is locked for this user. Saving forces this board private and hidden."}):null,s.jsx("div",{className:"mt-4",children:s.jsx(V,{label:"Description",children:s.jsx(i,{value:n.description||"",onChange:s=>X(a=>({...a,[e.id]:{...n,description:s.target.value}})),className:"min-h-[90px] rounded-xl"})})})]},e.id)})})]})]}):s.jsx("div",{className:"rounded-2xl border border-dashed border-border/60 bg-background/40 p-12 text-center text-muted-foreground",children:"Select a user to control the
1ir account, profile, and boards."})]})]})}function V({label:e,children:a}){return s.jsxs("label",{className:"block space-y-2",children:[s.jsx("span",{className:"text-[11px] font-bold uppercase tracking-[0.2em] text-muted-foreground",children:e}),a]})}function Y({label:e,checked:a,disabled:r=!1,onCheckedChange:l}){return s.jsxs("label",{className:w("flex items-center gap-2 rounded-xl border border-border/50 bg-background px-3 py-2",r&&"opacity-60"),children:[s.jsx(d,{checked:a,disabled:r,onCheckedChange:l}),s.jsxs("span",{className:"inline-flex items-center gap-1.5 text-sm font-semibold text-foreground",children:[a?s.jsx(O,{className:"h-4 w-4 text-emerald-600"}):null,e]})]})}export{I as AdminUserControlsPanel};
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.