1import{c as Se,h as Yn,j as o,i as b,B as X,X as qn,N as Qn,k as Jn,H as Zn,l as et,F as nt,G as tt,m as ot,n as ie,o as je,r as i,A as rt,P as q,p as G,q as x,D as at,s as st,t as _,v as ce,w as it,x as Ie,y as ct,R as ut,z as dt,E as lt,I as ft,J as pt,K as ae,a as mt,M as gt,u as xt,O as ht,S as vt,Q as wt,T as bt,g as Ce}from"./index-D1RDWLxz.js";import{F as Mt,H as yt,B as Ct}from"./handshake-CYs7jVA0.js";import{u as Nt}from"./index-DiQyyjCx.js";import{h as _t,u as Rt,F as St,R as jt}from"./Combination-Bz7oc-u_.js";import{c as Ee,R as It,I as Et}from"./index-vsLmjcIS.js";import{u as Ne}from"./index-Cg8Bl-PN.js";import{C as Dt}from"./chevron-right-DxOPRiRi.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const Pt=Se("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 7 * @license lucide-react v0.462.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const At=Se("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]),Tt=({isOpen:e,onClose:t})=>{var s;const{data:n}=Yn({queryKey:["admin","stats"],queryFn:()=>Jn.getStats(),refetchInterval:3e4}),r=((s=n==null?void 0:n.data)==null?void 0:s.pending_registrations)||0,a=[{to:"/admin/dashboard",icon:Zn,label:"Dashboard"},{to:"/admin/solutions",icon:et,label:"Solutions"},{to:"/admin/projects",icon:Mt,label:"Projects"},{to:"/admin/blogs",icon:nt,label:"Blogs"},{to:"/admin/partners",icon:yt,label:"Partners"},{to:"/admin/trainings",icon:Ct,label:"Trainings"},{to:"/admin/registrations",icon:tt,label:"Registrations"}];return o.jsxs(o.Fragment,{children:[e&&o.jsx("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm z-40 lg:hidden",onClick:t,role:"presentation","aria-hidden":"true"}),o.jsx("aside",{id:"admin-sidebar",className:b("fixed top-0 left-0 z-50 min-h-full w-64 bg-card border-r border-border transition-transform duration-300 lg:translate-x-0 lg:static lg:z-auto lg:min-h-0",e?"translate-x-0":"-translate-x-full"),role:"navigation","aria-label":"Admin navigation","aria-hidden":!e&&window.innerWidth<1024,children:o.jsxs("div",{className:"flex flex-col h-full lg:h-auto",children:[o.jsxs("div",{className:"flex items-center justify-between p-4 sm:p-6 border-b border-border min-h-[56px] sm:min-h-[64px]",children:[o.jsxs("div",{className:"flex items-center gap-2 sm:gap-3",children:[o.jsx("img",{src:"/favicon.png",alt:"AI-ROS Logo",className:"h-7 w-7 sm:h-8 sm:w-8 dark:brightness-0 dark:invert transition-all"}),o.jsx("h2",{className:"text-base sm:text-lg font-semibold text-foreground",children:"Admin Panel"})]}),o.jsx(X,{variant:"ghost",size:"icon",className:"lg:hidden h-10 w-10 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",onClick:t,"aria-label":"Close navigation menu",children:o.jsx(qn,{className:"h-5 w-5","aria-hidden":"true"})})]}),o.jsx("nav",{className:"flex-1 p-3 sm:p-4 space-y-1 sm:space-y-2 overflow-y-auto","aria-label":"Main navigation",children:a.map(c=>{const d=c.icon,f=c.to==="/admin/registrations"&&r>0;return o.jsxs(Qn,{to:c.to,onClick:()=>{window.innerWidth<1024&&t()},className:({isActive:m})=>b("flex items-center gap-3 px-4 py-3 rounded-lg text-sm font-medium transition-colors min-h-[44px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 relative",m?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground active:bg-accent/80"),"aria-current":({isActive:m})=>m?"page":void 0,children:[o.jsx(d,{className:"h-5 w-5 flex-shrink-0","aria-hidden":"true"}),o.jsx("span",{className:"flex-1",children:c.label}),f&&o.jsx("span",{className:"flex items-center justify-center min-w-[20px] h-5 px-1.5 bg-destructive text-destructive-foreground text-xs font-bold rounded-full",children:r>99?"99+":r})]},c.to)})}),o.jsx("div",{className:"p-3 sm:p-4 border-t border-border",role:"contentinfo",children:o.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Admin Dashboard v1.0"})})]})})]})};var se=["Enter"," "],kt=["ArrowDown","PageUp","Home"],De=["ArrowUp","PageDown","End"],Ot=[...kt,...De],Lt={ltr:[...se,"ArrowRight"],rtl:[...se,"ArrowLeft"]},Ft={ltr:["ArrowLeft"],rtl:["ArrowRight"]},K="Menu",[L,Gt,Kt]=ot(K),[j,Pe]=ie(K,[Kt,je,Ee]),Q=je(),Ae=Ee(),[$t,I]=j(K),[Ut,$]=j(K),Te=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:s,modal:c=!0}=e,d=Q(t),[f,m]=i.useState(null),l=i.useRef(!1),u=ce(s),g=Nt(a);return i.useEffect(()=>{const v=()=>{l.current=!0,document.addEventListener("pointerdown",h,{capture:!0,once:!0}),document.addEventListener("pointermove",h,{capture:!0,once:!0})},h=()=>l.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",h,{capture:!0}),document.removeEventListener("pointermove",h,{capture:!0})}},[]),o.jsx(ut,{...d,children:o.jsx($t,{scope:t,open:n,onOpenChange:u,content:f,onContentChange:m,children:o.jsx(Ut,{scope:t,onClose:i.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:l,dir:g,modal:c,children:r})})})};Te.displayName=K;var Bt="MenuAnchor",ue=i.forwardRef((e,t)=>
vendor: 16,677 bytes, line 11
11{const{__scopeMenu:n,...r}=e,a=Q(n);return o.jsx(rt,{...a,...r,ref:t})});ue.displayName=Bt;var de="MenuPortal",[zt,ke]=j(de,{forceMount:void 0}),Oe=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,s=I(de,t);return o.jsx(zt,{scope:t,forceMount:n,children:o.jsx(q,{present:n||s.open,children:o.jsx(dt,{asChild:!0,container:a,children:r})})})};Oe.displayName=de;var y="MenuContent",[Vt,le]=j(y),Le=i.forwardRef((e,t)=>{const n=ke(y,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,s=I(y,e.__scopeMenu),c=$(y,e.__scopeMenu);return o.jsx(L.Provider,{scope:e.__scopeMenu,children:o.jsx(q,{present:r||s.open,children:o.jsx(L.Slot,{scope:e.__scopeMenu,children:c.modal?o.jsx(Ht,{...a,ref:t}):o.jsx(Xt,{...a,ref:t})})})})}),Ht=i.forwardRef((e,t)=>{const n=I(y,e.__scopeMenu),r=i.useRef(null),a=G(t,r);return i.useEffect(()=>{const s=r.current;if(s)return _t(s)},[]),o.jsx(fe,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:x(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Xt=i.forwardRef((e,t)=>{const n=I(y,e.__scopeMenu);return o.jsx(fe,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Wt=lt("MenuContent.ScrollLock"),fe=i.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:c,disableOutsidePointerEvents:d,onEntryFocus:f,onEscapeKeyDown:m,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:g,onDismiss:v,disableOutsideScroll:h,...S}=e,E=I(y,n),T=$(y,n),U=Q(n),B=Ae(n),he=Gt(n),[Bn,ve]=i.useState(null),z=i.useRef(null),zn=G(t,z,E.onContentChange),V=i.useRef(0),H=i.useRef(""),Vn=i.useRef(0),ee=i.useRef(null),we=i.useRef("right"),ne=i.useRef(0),Hn=h?jt:i.Fragment,Xn=h?{as:Wt,allowPinchZoom:!0}:void 0,Wn=p=>{var P,Me;const M=H.current+p,C=he().filter(N=>!N.disabled),R=document.activeElement,te=(P=C.find(N=>N.ref.current===R))==null?void 0:P.textValue,oe=C.map(N=>N.textValue),be=so(oe,M,te),k=(Me=C.find(N=>N.textValue===be))==null?void 0:Me.ref.current;(function N(ye){H.current=ye,window.clearTimeout(V.current),ye!==""&&(V.current=window.setTimeout(()=>N(""),1e3))})(M),k&&setTimeout(()=>k.focus())};i.useEffect(()=>()=>window.clearTimeout(V.current),[]),Rt();const D=i.useCallback(p=>{var C,R;return we.current===((C=ee.current)==null?void 0:C.side)&&co(p,(R=ee.current)==null?void 0:R.area)},[]);return o.jsx(Vt,{scope:n,searchRef:H,onItemEnter:i.useCallback(p=>{D(p)&&p.preventDefault()},[D]),onItemLeave:i.useCallback(p=>{var M;D(p)||((M=z.current)==null||M.focus(),ve(null))},[D]),onTriggerLeave:i.useCallback(p=>{D(p)&&p.preventDefault()},[D]),pointerGraceTimerRef:Vn,onPointerGraceIntentChange:i.useCallback(p=>{ee.current=p},[]),children:o.jsx(Hn,{...Xn,children:o.jsx(St,{asChild:!0,trapped:a,onMountAutoFocus:x(s,p=>{var M;p.preventDefault(),(M=z.current)==null||M.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:o.jsx(at,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:m,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:g,onDismiss:v,children:o.jsx(It,{asChild:!0,...B,dir:T.dir,orientation:"vertical",loop:r,currentTabStopId:Bn,onCurrentTabStopIdChange:ve,onEntryFocus:x(f,p=>{T.isUsingKeyboardRef.current||p.preventDefault()}),preventScrollOnEntryFocus:!0,children:o.jsx(st,{role:"menu","aria-orientation":"vertical","data-state":Ze(E.open),"data-radix-menu-content":"",dir:T.dir,...U,...S,ref:zn,style:{outline:"none",...S.style},onKeyDown:x(S.onKeyDown,p=>{const C=p.target.closest("[data-radix-menu-content]")===p.currentTarget,R=p.ctrlKey||p.altKey||p.metaKey,te=p.key.length===1;C&&(p.key==="Tab"&&p.preventDefault(),!R&&te&&Wn(p.key));const oe=z.current;if(p.target!==oe||!Ot.includes(p.key))return;p.preventDefault();const k=he().filter(P=>!P.disabled).map(P=>P.ref.current);De.includes(p.key)&&k.reverse(),ro(k)}),onBlur:x(e.onBlur,p=>{p.currentTarget.contains(p.target)||(window.clearTimeout(V.current),H.current="")}),onPointerMove:x(e.onPointerMove,F(p=>{const M=p.target,C=ne.current!==p.clientX;if(p.currentTarget.contains(M)&&C){const R=p.clientX>ne.current?"right":"left";we.current=R,ne.current=p.clientX}}))})})})})})})});Le.displayName=y;var Yt="MenuGroup",pe=i.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return o.jsx(_.div,{role:"group",...r,ref:t})});pe.displayName=Yt;var qt="MenuLabel",Fe=i.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return o.jsx(_.div,{...r,ref:t})});Fe.displayName=qt;var W="MenuItem",_e="menu.itemSelect",J=i.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,s=i.useRef(null),c=$(W,e.__scopeMenu),d=le(W,e.__scopeMenu),f=G(t,s),m=i.useRef(!1),l=()=>{const u=s.current;if(!n&&u){const g=new CustomEvent(_e,{bubbles:!0,cancelable:!0});u.addEventListener(_e,v=>r==null?void 0:r(v),{once:!0}),ct(u,g),g.defaultPrevented?m.current=!1:c.onClose()}};return o.jsx(Ge,{...a,ref:f,disabled:n,onClick:x(e.onClick,l),onPointerDown:u=>{var g;(g=e.onPointerDown)==null||g.call(e,u),m.current=!0},onPointerUp:x(e.onPointerUp,u=>{var g;m.current||(g=u.currentTarget)==null||g.click()}),onKeyDown:x(e.onKeyDown,u=>{const g=d.searchRef.current!=="";n||g&&u.key===" "||se.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});J.displayName=W;var Ge=i.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...s}=e,c=le(W,n),d=Ae(n),f=i.useRef(null),m=G(t,f),[l,u]=i.useState(!1),[g,v]=i.useState("");return i.useEffect(()=>{const h=f.current;h&&v((h.textContent??"").trim())},[s.children]),o.jsx(L.ItemSlot,{scope:n,disabled:r,textValue:a??g,children:o.jsx(Et,{asChild:!0,...d,focusable:!r,children:o.jsx(_.div,{role:"menuitem","data-highlighted":l?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:m,onPointerMove:x(e.onPointerMove,F(h=>{r?c.onItemLeave(h):(c.onItemEnter(h),h.defaultPrevented||h.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:x(e.onPointerLeave,F(h=>c.onItemLeave(h))),onFocus:x(e.onFocus,()=>u(!0)),onBlur:x(e.onBlur,()=>u(!1))})})})}),Qt="MenuCheckboxItem",Ke=i.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return o.jsx(Ve,{scope:e.__scopeMenu,checked:n,children:o.jsx(J,{role:"menuitemcheckbox","aria-checked":Y(n)?"mixed":n,...a,ref:t,"data-state":ge(n),onSelect:x(a.onSelect,()=>r==null?void 0:r(Y(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ke.displayName=Qt;var $e="MenuRadioGroup",[Jt,Zt]=j($e,{value:void 0,onValueChange:()=>{}}),Ue=i.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,s=ce(r);return o.jsx(Jt,{scope:e.__scopeMenu,value:n,onValueChange:s,children:o.jsx(pe,{...a,ref:t})})});Ue.displayName=$e;var Be="MenuRadioItem",ze=i.forwardRef((e,t)=>{const{value:n,...r}=e,a=Zt(Be,e.__scopeMenu),s=n===a.value;return o.jsx(Ve,{scope:e.__scopeMenu,checked:s,children:o.jsx(J,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":ge(s),onSelect:x(r.onSelect,()=>{var c;return(c=a.onValueChange)==null?void 0:c.call(a,n)},{checkForDefaultPrevented:!1})})})});ze.displayName=Be;var me="MenuItemIndicator",[Ve,eo]=j(me,{checked:!1}),He=i.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,s=eo(me,n);return o.jsx(q,{present:r||Y(s.checked)||s.checked===!0,children:o.jsx(_.span,{...a,ref:t,"data-state":ge(s.checked)})})});He.displayName=me;var no="MenuSeparator",Xe=i.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return o.jsx(_.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Xe.displayName=no;var to="MenuArrow",We=i.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=Q(n);return o.jsx(it,{...a,...r,ref:t})});We.displayName=to;var oo="MenuSub",[wr,Ye]=j(oo),O="MenuSubTrigger",qe=i.forwardRef((e,t)=>{const n=I(O,e.__scopeMenu),r=$(O,e.__scopeMenu),a=Ye(O,e.__scopeMenu),s=le(O,e.__scopeMenu),c=i.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:f}=s,m={__scopeMenu:e.__scopeMenu},l=i.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return i.useEffect(()=>l,[l]),i.useEffect(()=>{const u=d.current;return()=>{window.clearTimeout(u),f(null)}},[d,f]),o.jsx(ue,{asChild:!0,...m,children:o.jsx(Ge,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":Ze(n.open),...e,ref:Ie(t,a.onTriggerChange),onClick:u=>{var g;(g=e.onClick)==null||g.call(e,u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:x(e.onPointerMove,F(u=>{s.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!n.open&&!c.current&&(s.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),l()},100))})),onPointerLeave:x(e.onPointerLeave,F(u=>{var v,h;l();const g=(v=n.content)==null?void 0:v.getBoundingClientRect();if(g){const S=(h=n.content)==null?void 0:h.dataset.side,E=S==="right",T=E?-5:5,U=g[E?"left":"right"],B=g[E?"right":"left"];s.onPointerGraceIntentChange({area:[{x:u.clientX+T,y:u.clientY},{x:U,y:g.top},{x:B,y:g.top},{x:B,y:g.bottom},{x:U,y:g.bottom}],side:S}),window.clearTimeout(d.current),d.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(u),u.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:x(e.onKeyDown,u=>{var v;const g=s.searchRef.current!=="";e.disabled||g&&u.key===" "||Lt[r.dir].includes(u.key)&&(n.onOpenChange(!0),(v=n.content)==null||v.focus(),u.preventDefault())})})})});qe.displayName=O;var Qe="MenuSubContent",Je=i.forwardRef((e,t)=>{const n=ke(y,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,s=I(y,e.__scopeMenu),c=$(y,e.__scopeMenu),d=Ye(Qe,e.__scopeMenu),f=i.useRef(null),m=G(t,f);return o.jsx(L.Provider,{scope:e.__scopeMenu,children:o.jsx(q,{present:r||s.open,children:o.jsx(L.Slot,{scope:e.__scopeMenu,children:o.jsx(fe,{id:d.contentId,"aria-labelledby":d.triggerId,...a,ref:m,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:l=>{var u;c.isUsingKeyboardRef.current&&((u=f.current)==null||u.focus()),l.preventDefault()},onCloseAutoFocus:l=>l.preventDefault(),onFocusOutside:x(e.onFocusOutside,l=>{l.target!==d.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:x(e.onEscapeKeyDown,l=>{c.onClose(),l.preventDefault()}),onKeyDown:x(e.onKeyDown,l=>{var v;const u=l.currentTarget.contains(l.target),g=Ft[c.dir].includes(l.key);u&&g&&(s.onOpenChange(!1),(v=d.trigger)==null||v.focus(),l.preventDefault())})})})})})});Je.displayName=Qe;function Ze(e){return e?"open":"closed"}function Y(e){return e==="indeterminate"}function ge(e){return Y(e)?"indeterminate":e?"checked":"unchecked"}function ro(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function ao(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function so(e,t,n){const a=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let c=ao(e,Math.max(s,0));a.length===1&&(c=c.filter(m=>m!==n));const f=c.find(m=>m.toLowerCase().startsWith(a.toLowerCase()));return f!==n?f:void 0}function io(e,t){const{x:n,y:r}=e;let a=!1;for(let s=0,c=t.length-1;s<t.length;c=s++){const d=t[s],f=t[c],m=d.x,l=d.y,u=f.x,g=f.y;l>r!=g>r&&n<(u-m)*(r-l)/(g-l)+m&&(a=!a)}return a}function co(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return io(n,t)}function F(e){return t=>t.pointerType==="mouse"?e(t):void 0}var uo=Te,lo=ue,fo=Oe,po=Le,mo=pe,go=Fe,xo=J,ho=Ke,vo=Ue,wo=ze,bo=He,Mo=Xe,yo=We,Co=qe,No=Je,Z="DropdownMenu",[_o,br]=ie(Z,[Pe]),w=Pe(),[Ro,en]=_o(Z),nn=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:s,onOpenChange:c,modal:d=!0}=e,f=w(t),m=i.useRef(null),[l,u]=ft({prop:a,defaultProp:s??!1,onChange:c,caller:Z});return o.jsx(Ro,{scope:t,triggerId:Ne(),triggerRef:m,contentId:Ne(),open:l,onOpenChange:u,onOpenToggle:i.useCallback(()=>u(g=>!g),[u]),modal:d,children:o.jsx(uo,{...f,open:l,onOpenChange:u,dir:r,modal:d,children:n})})};nn.displayName=Z;var tn="DropdownMenuTrigger",on=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,s=en(tn,n),c=w(n);return o.jsx(lo,{asChild:!0,...c,children:o.jsx(_.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:Ie(t,s.triggerRef),onPointerDown:x(e.onPointerDown,d=>{!r&&d.button===0&&d.ctrlKey===!1&&(s.onOpenToggle(),s.open||d.preventDefault())}),onKeyDown:x(e.onKeyDown,d=>{r||(["Enter"," "].includes(d.key)&&s.onOpenToggle(),d.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(d.key)&&d.preventDefault())})})})});on.displayName=tn;var So="DropdownMenuPortal",rn=e=>{const{__scopeDropdownMenu:t,...n}=e,r=w(t);return o.jsx(fo,{...r,...n})};rn.displayName=So;var an="DropdownMenuContent",sn=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=en(an,n),s=w(n),c=i.useRef(!1);return o.jsx(po,{id:a.contentId,"aria-labelledby":a.triggerId,...s,...r,ref:t,onCloseAutoFocus:x(e.onCloseAutoFocus,d=>{var f;c.current||(f=a.triggerRef.current)==null||f.focus(),c.current=!1,d.preventDefault()}),onInteractOutside:x(e.onInteractOutside,d=>{const f=d.detail.originalEvent,m=f.button===0&&f.ctrlKey===!0,l=f.button===2||m;(!a.modal||l)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});sn.displayName=an;var jo="DropdownMenuGroup",Io=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=w(n);return o.jsx(mo,{...a,...r,ref:t})});Io.displayName=jo;var Eo="DropdownMenuLabel",cn=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=w(n);return o.jsx(go,{...a,...r,ref:t})});cn.displayName=Eo;var Do="DropdownMenuItem",un=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=w(n);return o.jsx(xo,{...a,...r,ref:t})});un.displayName=Do;var Po="DropdownMenuCheckboxItem",dn=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=w(n);return o.jsx(ho,{...a,...r,ref:t})});dn.displayName=Po;var Ao="DropdownMenuRadioGroup",To=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=w(n);return o.jsx(vo,{...a,...r,ref:t})});To.displayName=Ao;var ko="DropdownMenuRadioItem",ln=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=w(n);return o.jsx(wo,{...a,...r,ref:t})});ln.displayName=ko;var Oo="DropdownMenuItemIndicator",fn=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=w(n);return o.jsx(bo,{...a,...r,ref:t})});fn.displayName=Oo;var Lo="DropdownMenuSeparator",pn=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=w(n);return o.jsx(Mo,{...a,...r,ref:t})});pn.displayName=Lo;var Fo="DropdownMenuArrow",Go=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=w(n);return o.jsx(yo,{...a,...r,ref:t})});Go.displayName=Fo;var Ko="DropdownMenuSubTrigger",mn=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=w(n);return o.jsx(Co,{...a,...r,ref:t})});mn.displayName=Ko;var $o="DropdownMenuSubContent",gn=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=w(n);return o.jsx(No,{...a,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});gn.displayName=$o;var Uo=nn,Bo=on,zo=rn,xn=sn,hn=cn,vn=un,wn=dn,bn=ln,Mn=fn,yn=pn,Cn=mn,Nn=gn;const Vo=Uo,Ho=Bo,Xo=i.forwardRef(({className:e,inset:t,children:n,...r},a)=>o.jsxs(Cn,{ref:a,className:b("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...r,children:[n,o.jsx(Dt,{className:"ml-auto h-4 w-4"})]}));Xo.displayName=Cn.displayName;const Wo=i.forwardRef(({className:e,...t},n)=>o.jsx(Nn,{ref:n,className:b("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
11de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Wo.displayName=Nn.displayName;const _n=i.forwardRef(({className:e,sideOffset:t=4,...n},r)=>o.jsx(zo,{children:o.jsx(xn,{ref:r,sideOffset:t,className:b("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));_n.displayName=xn.displayName;const Rn=i.forwardRef(({className:e,inset:t,...n},r)=>o.jsx(vn,{ref:r,className:b("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...n}));Rn.displayName=vn.displayName;const Yo=i.forwardRef(({className:e,children:t,checked:n,...r},a)=>o.jsxs(wn,{ref:a,className:b("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:n,...r,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(Mn,{children:o.jsx(pt,{className:"h-4 w-4"})})}),t]}));Yo.displayName=wn.displayName;const qo=i.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(bn,{ref:r,className:b("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(Mn,{children:o.jsx(Pt,{className:"h-2 w-2 fill-current"})})}),t]}));qo.displayName=bn.displayName;const Sn=i.forwardRef(({className:e,inset:t,...n},r)=>o.jsx(hn,{ref:r,className:b("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Sn.displayName=hn.displayName;const jn=i.forwardRef(({className:e,...t},n)=>o.jsx(yn,{ref:n,className:b("-mx-1 my-1 h-px bg-muted",e),...t}));jn.displayName=yn.displayName;var In={exports:{}},En={};/** 12 * @license React 13 * use-sync-external-store-shim.production.js 14 * 15 * Copyright (c) Meta Platforms, Inc. and affiliates. 16 * 17 * This source code is licensed under the MIT license found in the 18 * LICENSE file in the root directory of this source tree. 19 */var A=i;function Qo(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Jo=typeof Object.is=="function"?Object.is:Qo,Zo=A.useState,er=A.useEffect,nr=A.useLayoutEffect,tr=A.useDebugValue;function or(e,t){var n=t(),r=Zo({inst:{value:n,getSnapshot:t}}),a=r[0].inst,s=r[1];return nr(function(){a.value=n,a.getSnapshot=t,re(a)&&s({inst:a})},[e,n,t]),er(function(){return re(a)&&s({inst:a}),e(function(){re(a)&&s({inst:a})})},[e]),tr(n),n}function re(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Jo(e,n)}catch{return!0}}function rr(e,t){return t()}var ar=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?rr:or;En.useSyncExternalStore=A.useSyncExternalStore!==void 0?A.useSyncExternalStore:ar;In.exports=En;var sr=In.exports;function ir(){return sr.useSyncExternalStore(cr,()=>!0,()=>!1)}function cr(){return()=>{}}var xe="Avatar",[ur,Mr]=ie(xe),[dr,Dn]=ur(xe),Pn=i.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[a,s]=i.useState("idle");return o.jsx(dr,{scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:s,children:o.jsx(_.span,{...r,ref:t})})});Pn.displayName=xe;var An="AvatarImage",Tn=i.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:a=()=>{},...s}=e,c=Dn(An,n),d=lr(r,s),f=ce(m=>{a(m),c.onImageLoadingStatusChange(m)});return ae(()=>{d!=="idle"&&f(d)},[d,f]),d==="loaded"?o.jsx(_.img,{...s,ref:t,src:r}):null});Tn.displayName=An;var kn="AvatarFallback",On=i.forwardRef((e,t)=>
19{const{__scopeAvatar:n,delayMs:r,...a}=e,s=Dn(kn,n),[c,d]=i.useState(r===void 0);return i.useEffect(()=>{if(r!==void 0){const f=window.setTimeout(()=>d(!0),r);return()=>window.clearTimeout(f)}},[r]),c&&s.imageLoadingStatus!=="loaded"?o.jsx(_.span,{...a,ref:t}):null});On.displayName=kn;function Re(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function lr(e,{referrerPolicy:t,crossOrigin:n}){const r=ir(),a=i.useRef(null),s=r?(a.current||(a.current=new window.Image),a.current):null,[c,d]=i.useState(()=>Re(s,e));return ae(()=>{d(Re(s,e))},[s,e]),ae(()=>{const f=u=>()=>{d(u)};if(!s)return;const m=f("loaded"),l=f("error");return s.addEventListener("load",m),s.addEventListener("error",l),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",m),s.removeEventListener("error",l)}},[s,n,t]),c}var Ln=Pn,Fn=Tn,Gn=On;const Kn=i.forwardRef(({className:e,...t},n)=>o.jsx(Ln,{ref:n,className:b("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Kn.displayName=Ln.displayName;const $n=i.forwardRef(({className:e,...t},n)=>o.jsx(Fn,{ref:n,className:b("aspect-square h-full w-full",e),...t}));$n.displayName=Fn.displayName;const Un=i.forwardRef(({className:e,...t},n)=>o.jsx(Gn,{ref:n,className:b("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Un.displayName=Gn.displayName;const yr=()=>{const[e,t]=i.useState(!1),{user:n,logout:r}=mt(),{theme:a,setTheme:s}=gt(),c=xt(),d=async()=>{try{await r(),Ce.success("Logged out successfully"),c("/admin/login")}catch(l){console.error("Logout error:",l),Ce.error("Failed to logout")}},f=()=>n!=null&&n.name?n.name.split(" ").map(l=>l[0]).join("").toUpperCase().slice(0,2):"AD",m=()=>{s(a==="light"?"dark":"light")};return o.jsxs("div",{className:"bg-background flex flex-col lg:flex-row min-h-screen",children:[o.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:absolute focus:top-4 focus:left-4 focus:z-50 focus:px-4 focus:py-2 focus:bg-primary focus:text-primary-foreground focus:rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:"Skip to main content"}),o.jsx(Tt,{isOpen:e,onClose:()=>t(!1)}),o.jsxs("div",{className:"w-full lg:flex-1 flex flex-col min-w-0",children:[o.jsx("header",{className:"sticky top-0 z-30 border-b border-border bg-card flex-shrink-0",role:"banner",children:o.jsxs("div",{className:"flex items-center justify-between min-h-[56px] sm:min-h-[64px] p-4 sm:p-6 gap-2 sm:gap-4",children:[o.jsxs("div",{className:"flex items-center gap-2 sm:gap-4",children:[o.jsx(X,{variant:"ghost",size:"icon",className:"lg:hidden h-10 w-10 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",onClick:()=>t(!0),"aria-label":"Open navigation menu","aria-expanded":e,"aria-controls":"admin-sidebar",children:o.jsx(ht,{className:"h-5 w-5","aria-hidden":"true"})}),o.jsx("h1",{className:"text-base sm:text-lg font-semibold text-foreground",children:"Content Management"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs(X,{variant:"ghost",size:"icon",onClick:m,className:"h-10 w-10 rounded-full focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","aria-label":"Toggle theme",children:[o.jsx(vt,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),o.jsx(wt,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"})]}),o.jsxs(Vo,{children:[o.jsx(Ho,{asChild:!0,children:o.jsx(X,{variant:"ghost",className:"relative h-10 w-10 rounded-full focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","aria-label":`User menu for ${(n==null?void 0:n.name)||"admin"}`,children:o.jsxs(Kn,{className:"h-10 w-10",children:[o.jsx($n,{src:n==null?void 0:n.avatar,alt:`${n==null?void 0:n.name}'s avatar`}),o.jsx(Un,{className:"bg-primary text-primary-foreground","aria-label":`${n==null?void 0:n.name} initials`,children:f()})]})})}),o.jsxs(_n,{className:"w-56",align:"end",forceMount:!0,children:[o.jsx(Sn,{className:"font-normal",children:o.jsxs("div",{className:"flex flex-col space-y-1",children:[o.jsx("p",{className:"text-sm font-medium leading-none",children:n==null?void 0:n.name}),o.jsx("p",{className:"text-xs leading-none text-muted-foreground truncate",children:n==null?void 0:n.email})]})}),o.jsx(jn,{}),o.jsxs(Rn,{onClick:d,children:[o.jsx(At,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),o.jsx("span",{children:"Log out"})]})]})]})]})]})}),o.jsx("main",{id:"main-content",className:"flex-1 p-3 sm:p-4 lg:p-5",role:"main",tabIndex:-1,
19children:o.jsx(bt,{})})]})]})};export{yr 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.